 
 Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
 ---
- arch/arm/include/asm/arch-omap3/mem.h |   27 +++++++++++++++
- board/overo/config.mk                 |   28 ----------------
- board/overo/overo.c                   |   57 ++++++++++++++++++++++++++++++++-
- include/configs/omap3_overo.h         |   56 +++++++++++++++++++++++++++++++-
- 4 files changed, 138 insertions(+), 30 deletions(-)
+ 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..18998d8 100644
+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,33 @@ enum {
+@@ -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

+		u32 *mr)
+{
+	*mr = MICRON_V_MR_165;
+	/* we need peripheral clocks for i2c */
+	per_clocks_enable();
+	switch (get_board_revision()) {
+	case 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 */
+		*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 */
+		*mcfg = HYNIX_V_MCFG_165(256 << 20);
+		*ctrla = HYNIX_V_ACTIMA_165;
+		*ctrlb = HYNIX_V_ACTIMB_165;

 	if (!gpio_request(112, "") &&
 	    !gpio_request(113, "") &&
 	    !gpio_request(115, "")) {
@@ -119,13 +134,53 @@ int get_board_revision(void)
 			   gpio_get_value(113) << 1 |
 			   gpio_get_value(112);
 	} else {
-		printf("Error: unable to acquire board revision GPIOs\n");
+		puts("Error: unable to acquire board revision GPIOs\n");
 		revision = -1;
 	}
 
 	return revision;
 }
 
