summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2012-01-12 14:58:51 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:59 +0200
commitfa6bcad633752fc296e85f7eb46132626b91b857 (patch)
tree8da124235b17862c9c14714e5dc30492aa83f915
parent2ca835ac89ca2ceb0ac1d37b0d38b7025b905fa4 (diff)
sdi: u5500: detect pre-R3A boards
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-u5500-sdi.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c
index 0600c95278d..76d3cbe10d1 100644
--- a/arch/arm/mach-ux500/board-u5500-sdi.c
+++ b/arch/arm/mach-ux500/board-u5500-sdi.c
@@ -233,31 +233,24 @@ static void sdi1_configure(void)
#define SDI_PID_V1 0x00480180
#define SDI_PID_V2 0x10480180
-#define BACKUPRAM_ROM_DEBUG_ADDR 0xFFC
-#define MMC_BLOCK_ID 0x20
void __init u5500_sdi_init(struct device *parent)
{
u32 periphid = 0;
- int mmc_blk = 0;
if (cpu_is_u5500v1())
periphid = SDI_PID_V1;
else
periphid = SDI_PID_V2;
- if (cpu_is_u5500v2())
- /*
- * Fix me in 5500 v2.1
- * Dynamic detection of booting device by reading
- * ROM debug register from BACKUP RAM and register the
- * corresponding EMMC.
- * This is done due to wrong configuration of MMC0 clock
- * in ROM code for u5500 v2.
- */
- mmc_blk = readl(__io_address(U5500_BACKUPRAM1_BASE) +
- BACKUPRAM_ROM_DEBUG_ADDR);
-
- if (mmc_blk & MMC_BLOCK_ID)
+ /*
+ * Fix me in 5500 v2.1
+ * Dynamic detection of booting device by reading
+ * ROM debug register from BACKUP RAM and register the
+ * corresponding EMMC.
+ * This is done due to wrong configuration of MMC0 clock
+ * in ROM code for u5500 v2.
+ */
+ if (u5500_get_boot_mmc() == 2)
db5500_add_sdi2(parent, &u5500_sdi2_data, periphid);
else
db5500_add_sdi0(parent, &u5500_sdi0_data, periphid);