1 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/ixp4xx_npe.c
2 ===================================================================
3 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/ixp4xx_npe.c
4 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/ixp4xx_npe.c
5 @@ -571,8 +571,8 @@ int npe_load_firmware(struct npe *npe, c
6 for (i = 0; i < image->size; i++)
7 image->data[i] = swab32(image->data[i]);
9 - if (!cpu_is_ixp46x() && ((image->id >> 28) & 0xF /* device ID */)) {
10 - print_npe(KERN_INFO, npe, "IXP46x firmware ignored on "
11 + if (cpu_is_ixp42x() && ((image->id >> 28) & 0xF /* device ID */)) {
12 + print_npe(KERN_INFO, npe, "IXP46x/IXP43x firmware ignored on "
16 @@ -594,7 +594,7 @@ int npe_load_firmware(struct npe *npe, c
17 "revision 0x%X:%X\n", (image->id >> 16) & 0xFF,
18 (image->id >> 8) & 0xFF, image->id & 0xFF);
20 - if (!cpu_is_ixp46x()) {
21 + if (cpu_is_ixp42x()) {
23 instr_size = NPE_A_42X_INSTR_SIZE;
25 Index: linux-2.6.24.7/drivers/net/arm/ixp4xx_eth.c
26 ===================================================================
27 --- linux-2.6.24.7.orig/drivers/net/arm/ixp4xx_eth.c
28 +++ linux-2.6.24.7/drivers/net/arm/ixp4xx_eth.c
30 #include <linux/kernel.h>
31 #include <linux/mii.h>
32 #include <linux/platform_device.h>
33 +#include <asm/arch/cpu.h>
34 #include <asm/arch/npe.h>
35 #include <asm/arch/qmgr.h>
37 @@ -1335,12 +1336,16 @@ static struct platform_driver drv = {
39 static int __init eth_init_module(void)
41 - if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0))
44 - /* All MII PHY accesses use NPE-B Ethernet registers */
45 spin_lock_init(&mdio_lock);
46 - mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
47 + if (!cpu_is_ixp43x())
48 + /* All MII PHY accesses use NPE-B Ethernet registers */
49 + mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
52 + /* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */
53 + mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT;
55 __raw_writel(DEFAULT_CORE_CNTRL, &mdio_regs->core_control);
57 return platform_driver_register(&drv);
58 Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/cpu.h
59 ===================================================================
60 --- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/cpu.h
61 +++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/cpu.h
62 @@ -34,6 +34,8 @@ static inline u32 ixp4xx_read_feature_bi
63 val &= ~IXP4XX_FEATURE_RESERVED;
65 val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
66 + if (cpu_is_ixp42x())
67 + val &= ~IXP4XX_FEATURE_IXP43X_46X;
71 Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
72 ===================================================================
73 --- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
74 +++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
76 #define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
77 #define IXP4XX_FEATURE_RESERVED (0xFF << 24)
79 -#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC | \
80 +#define IXP4XX_FEATURE_IXP43X_46X (IXP4XX_FEATURE_ECC_TIMESYNC | \
81 IXP4XX_FEATURE_USB_HOST | \
82 IXP4XX_FEATURE_NPEA_ETH | \
83 - IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \
84 - IXP4XX_FEATURE_RSA | \
85 IXP4XX_FEATURE_XSCALE_MAX_FREQ)
87 +#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \