return ret;
}
+#ifdef CONFIG_SPL_BUILD
+/*
+ * Routine: get_board_mem_timings
+ * Description: If we use SPL then there is no x-loader nor config header
+ * so we have to setup the DDR timings ourself on both banks.
+ */
+void get_board_mem_timings(struct board_sdrc_timings *timings)
+{
+#if defined(CONFIG_SYS_BOARD_OMAP3_HA)
+ /*
+ * Switch baseboard LED to red upon power-on
+ */
+ MUX_OMAP3_HA();
+
+ /* Request a gpio before using it */
+ gpio_request(111, "");
+ /* Sets the gpio as output and its value to 1, switch LED to red */
+ gpio_direction_output(111, 1);
+#endif
+
+ if (tao3530_revision() < 3) {
+ /* 256MB / Bank */
+ timings->mcfg = MCFG(256 << 20, 14); /* RAS-width 14 */
+ timings->ctrla = HYNIX_V_ACTIMA_165;
+ timings->ctrlb = HYNIX_V_ACTIMB_165;
+ } else {
+ /* 128MB / Bank */
+ timings->mcfg = MCFG(128 << 20, 13); /* RAS-width 13 */
+ timings->ctrla = MICRON_V_ACTIMA_165;
+ timings->ctrlb = MICRON_V_ACTIMB_165;
+ }
+
+ timings->mr = MICRON_V_MR_165;
+ timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
+}
+#endif
+
/*
* Routine: board_init
* Description: Early hardware init.
writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
- dieid_num_r();
-
- /* Set memory size environment variable, depending on revision */
switch (tao3530_revision()) {
- case 0x2: /* Rev C1 -- 256MB */
- setenv("mem_size", "mem=256M");
- break;
- case 0x3: /* Rev A2/B2 -- 128MB */
- setenv("mem_size", "mem=128M");
- break;
+ case 0:
+ puts("TAO-3530 REV Reserve 1\n");
+ break;
+ case 1:
+ puts("TAO-3530 REV Reserve 2\n");
+ break;
+ case 2:
+ puts("TAO-3530 REV Cx\n");
+ break;
+ case 3:
+ puts("TAO-3530 REV Ax/Bx\n");
+ break;
default:
- printf("Warning: Unknown TAO3530 rev, setting mem=128M\n");
+ puts("Unknown board revision\n");
}
+ omap_die_id_display();
+
return 0;
}
void set_muxconf_regs(void)
{
MUX_TAO3530();
+#if defined(CONFIG_SYS_BOARD_OMAP3_HA)
+ MUX_OMAP3_HA();
+#endif
}
-#ifdef CONFIG_GENERIC_MMC
+#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
int board_mmc_init(bd_t *bis)
{
omap_mmc_init(0, 0, 0, -1, -1);
}
#endif
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+ twl4030_power_mmc_init(0);
+}
+#endif
+
#if defined(CONFIG_USB_EHCI) && !defined(CONFIG_SPL_BUILD)
/* Call usb_stop() before starting the kernel */
void show_boot_progress(int val)