[PATCH 107/133] [Jaunty SRU] ARM.imx51 Freescale:ENGR00112977 Support the removal of debug board in MX51 3Stack
Brad Figg
brad.figg at canonical.com
Thu Jul 9 16:49:37 UTC 2009
From: Lily Zhang <r58066 at freescale.com>
1) Remove CPLD CS1 codes since MX51 debug board is connected via CS5
2) Don't register SMSC911X if the debug board is not conntected
Signed-off-by: Lily Zhang <r58066 at freescale.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
arch/arm/mach-mx51/mx51_3stack.c | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/arch/arm/mach-mx51/mx51_3stack.c b/arch/arm/mach-mx51/mx51_3stack.c
index 0582b2f..481afa9 100644
--- a/arch/arm/mach-mx51/mx51_3stack.c
+++ b/arch/arm/mach-mx51/mx51_3stack.c
@@ -457,11 +457,13 @@ static struct platform_device smsc_lan9217_device = {
};
static void mxc_init_enet(void)
{
- smsc_lan9217_device.resource[0].start =
- LAN9217_BASE_ADDR(cpld_base_addr);
- smsc_lan9217_device.resource[0].end = LAN9217_BASE_ADDR(cpld_base_addr)
- + 0x100;
- (void)platform_device_register(&smsc_lan9217_device);
+ if (cpld_base_addr) {
+ smsc_lan9217_device.resource[0].start =
+ LAN9217_BASE_ADDR(cpld_base_addr);
+ smsc_lan9217_device.resource[0].end =
+ LAN9217_BASE_ADDR(cpld_base_addr) + 0x100;
+ (void)platform_device_register(&smsc_lan9217_device);
+ }
}
#else
static inline void mxc_init_enet(void)
@@ -748,19 +750,9 @@ static int __init mxc_expio_init(void)
if ((__raw_readw(brd_io + MAGIC_NUMBER1_REG) != 0xAAAA) ||
(__raw_readw(brd_io + MAGIC_NUMBER2_REG) != 0x5555) ||
(__raw_readw(brd_io + MAGIC_NUMBER3_REG) != 0xCAFE)) {
- iounmap((void *)brd_io);
- brd_io = (u32) ioremap(BOARD_IO_ADDR(CS1_BASE_ADDR), SZ_4K);
- if (brd_io == 0)
- return -ENOMEM;
-
- if ((__raw_readw(brd_io + MAGIC_NUMBER1_REG) != 0xAAAA) ||
- (__raw_readw(brd_io + MAGIC_NUMBER2_REG) != 0x5555) ||
- (__raw_readw(brd_io + MAGIC_NUMBER3_REG) != 0xCAFE)) {
- iounmap((void *)brd_io);
- brd_io = 0;
- return -ENODEV;
- }
- cpld_base_addr = CS1_BASE_ADDR;
+ pr_info("3-Stack Debug board not detected \n");
+ cpld_base_addr = 0;
+ return -ENODEV;
} else {
cpld_base_addr = CS5_BASE_ADDR;
}
--
1.6.0.4
More information about the kernel-team
mailing list