 +		u32 *mr)
 +{
 +	*mr = MICRON_V_MR_165;
-+	/* we need peripheral clocks for i2c */
-+	per_clocks_enable();
++	/* we need timer early for i2c */
++	timer_init();
 +	switch (get_board_revision()) {
-+	case 0: /* Micron 1286MB/256MB, 1/2 banks of 128MB */
++	case REVISION_0: /* Micron 1286MB/256MB, 1/2 banks of 128MB */
 +		*mcfg = MICRON_V_MCFG_165(128 << 20);
 +		*ctrla = MICRON_V_ACTIMA_165;
 +		*ctrlb = MICRON_V_ACTIMB_165;
 +		*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
 +		break;
-+	case 1: /* Micron 256MB/512MB, 1/2 banks of 256MB */
++	case REVISION_1: /* Micron 256MB/512MB, 1/2 banks of 256MB */
 +		*mcfg = MICRON_V_MCFG_165(256 << 20);
 +		*ctrla = MICRON_V_ACTIMA_165;
 +		*ctrlb = MICRON_V_ACTIMB_165;
 +		*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
 +		break;
-+	case 2: /* Hynix 256MB/512MB, 1/2 banks of 256MB */
++	case REVISION_2: /* Hynix 256MB/512MB, 1/2 banks of 256MB */
 +		*mcfg = HYNIX_V_MCFG_165(256 << 20);
 +		*ctrla = HYNIX_V_ACTIMA_165;
 +		*ctrlb = HYNIX_V_ACTIMB_165;

 int board_mmc_init(bd_t *bis)
 {
 	omap_mmc_init(0);
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 79eb466..d9f54d1 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -149,6 +149,25 @@
 #define CONFIG_JFFS2_PART_SIZE		0xf980000	/* size of jffs2 */
 							/* partition */
 
+/* NAND boot config */
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+#define CONFIG_SYS_NAND_PAGE_COUNT	64


Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
---
 arch/arm/cpu/armv7/omap-common/spl.c  |    4 ++
 arch/arm/include/asm/arch-omap3/mem.h |   26 ++++++++++++++
 board/overo/config.mk                 |   28 ---------------
 board/overo/overo.c                   |   61 +++++++++++++++++++++++++++++++--
 board/overo/overo.h                   |    5 +++
 drivers/i2c/omap24xx_i2c.c            |   12 +++---
 include/configs/omap3_overo.h         |   55 +++++++++++++++++++++++++++++-
 7 files changed, 153 insertions(+), 38 deletions(-)
 delete mode 100644 board/overo/config.mk

diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c
index 9c35a09..7cec52f 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -172,10 +172,13 @@ void preloader_console_init(void)
 
 	printf("\nU-Boot SPL %s (%s - %s)\n", u_boot_rev, U_BOOT_DATE,
 		U_BOOT_TIME);
+#if !defined(CONFIG_OMAP3_OVERO)
 	omap_rev_string(rev_string_buffer);
 	printf("Texas Instruments %s\n", rev_string_buffer);
+#endif
 }
 
+#if !defined(CONFIG_OMAP3_OVERO)
 void __omap_rev_string(char *str)
 {
 	sprintf(str, "Revision detection unimplemented");
@@ -183,3 +186,4 @@ void __omap_rev_string(char *str)
 
 void omap_rev_string(char *str)
 	__attribute__((weak, alias("__omap_rev_string")));
+#endif
diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h
index 5fd02d4..4ca929e 100644
--- a/arch/arm/include/asm/arch-omap3/mem.h
+++ b/arch/arm/include/asm/arch-omap3/mem.h
@@ -123,6 +123,32 @@ enum {
 		V_MCFG_BANKALLOCATION_RBC |			\
 		V_MCFG_B32NOT16_32 | V_MCFG_DEEPPD_EN | V_MCFG_RAMTYPE_DDR
 
+/* Hynix part of Overo (165MHz optimized) 6.06ns */
+#define HYNIX_TDAL_165   6
+#define HYNIX_TDPL_165   3
