NanoPayload

Annotated stage2.c

6:d94bf387cc11
2015-06-05 Paul Boddie Added support for multiple stages.
paul@6 1
/*
paul@6 2
 * Ben NanoNote stage 2 payload test.
paul@6 3
 *
paul@6 4
 * Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
paul@6 5
 * Copyright (C) Wolfgang Spraul <wolfgang@sharism.cc>
paul@6 6
 *
paul@6 7
 * This program is free software; you can redistribute it and/or modify it under
paul@6 8
 * the terms of the GNU General Public License as published by the Free Software
paul@6 9
 * Foundation; either version 3 of the License, or (at your option) any later
paul@6 10
 * version.
paul@6 11
 *
paul@6 12
 * This program is distributed in the hope that it will be useful, but WITHOUT
paul@6 13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
paul@6 14
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
paul@6 15
 * details.
paul@6 16
 *
paul@6 17
 * You should have received a copy of the GNU General Public License along with
paul@6 18
 * this program.  If not, see <http://www.gnu.org/licenses/>.
paul@6 19
 */
paul@6 20
paul@6 21
#include "jz4740.h"
paul@6 22
#include "board-nanonote.h"
paul@6 23
#include "nanonote.h"
paul@6 24
paul@6 25
/* These arguments are initialised by usbboot and are defined in...
paul@6 26
   /etc/xburst-tools/usbboot.cfg. */
paul@6 27
paul@6 28
struct fw_args *fw_args;
paul@6 29
volatile u32 CPU_ID;
paul@6 30
volatile u32 UART_BASE;
paul@6 31
volatile u32 CONFIG_BAUDRATE;
paul@6 32
volatile u8 SDRAM_BW16;
paul@6 33
volatile u8 SDRAM_BANK4;
paul@6 34
volatile u8 SDRAM_ROW;
paul@6 35
volatile u8 SDRAM_COL;
paul@6 36
volatile u8 CONFIG_MOBILE_SDRAM;
paul@6 37
volatile u32 CFG_CPU_SPEED;
paul@6 38
volatile u32 CFG_EXTAL;
paul@6 39
volatile u8 PHM_DIV;
paul@6 40
volatile u8 IS_SHARE;
paul@6 41
paul@6 42
void c_main(void)
paul@6 43
{
paul@6 44
	__gpio_as_output(GPIO_SD_CMD);
paul@6 45
	__gpio_set_pin(GPIO_SD_CMD);
paul@6 46
}