static char *failed = "*** failed ***\n";
#endif
+static void info_action_check()
+{
+ struct info_action *ia = (struct info_action *) CONFIG_INFO_ADDRESS;
+ struct mmc *mmc = find_mmc_device(1);
+
+ if (ia->magic == INFO_ACTION_MAGIC) {
+ switch (ia->action) {
+ case INFO_ACTION_SDCARD_BOOT:
+ if (!mmc)
+ printf("sdcard scan failed\n");
+ else {
+ mmc_init(mmc);
+ printf("sdcard scan success\n");
+ run_command("run loaduimage", 0);
+ run_command("run sdboot", 0);
+ }
+ break;
+ case INFO_ACTION_LCD_CONSOLE:
+ break;
+ default:
+ break;
+ }
+ }
+}
+
/************************************************************************
*
* This is the next part if the initialization sequence: we are now
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
+ info_action_check();
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
puts ("Net: ");
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
+#define INFO_ACTION_MAGIC 0xcafe
+
+struct info_action {
+ u16 magic;
+ u16 action;
+};
+
+enum {
+ INFO_ACTION_RESERVED, /* Since action should be start 1 */
+ INFO_ACTION_SDCARD_BOOT,
+ INFO_ACTION_LCD_CONSOLE,
+};
/*
* Function Prototypes
*/
#define CONFIG_SERIAL_MULTI 1
#define CONFIG_SERIAL2 1 /* we use SERIAL 2 on S5PC100 */
+/* INFORM0~3 registers are cleared by asserting XnRESET pin */
+/* INFORM4~7 registers are cleared only by power-up reset */
+#define CONFIG_INFO_ADDRESS 0xE010F010 /* INFORM4 */
+
/*
* spi gpio
*/
#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
-#define CONFIG_BOOTCOMMAND \
- "if mmc rescan 1; then " \
- "if run loaduimage; then " \
- "run sdboot; " \
- "else run ubifsboot; " \
- "fi; " \
- "else run ubifsboot; fi"
+#define CONFIG_BOOTCOMMAND "run ubifsboot"
#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
#define CONFIG_SERIAL_MULTI 1
#define CONFIG_SERIAL2 1 /* we use SERIAL 2 on S5PC210 */
+/* INFORM0~3 registers are cleared by asserting XnRESET pin */
+/* INFORM4~7 registers are cleared only by power-up reset */
+#define CONFIG_INFO_ADDRESS 0x10020810 /* INFORM4 */
+
/*
* spi gpio
*/
#define NORMAL_MTDPARTS_DEFAULT MTDPARTS_DEFAULT
-#define CONFIG_BOOTCOMMAND \
- "if mmc rescan 1; then " \
- "if run loaduimage; then " \
- "run sdboot; " \
- "else run ubifsboot; " \
- "fi; " \
- "else run ubifsboot; fi"
+#define CONFIG_BOOTCOMMAND "run ubifsboot"
#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"