1 diff -Nur linux-2.6.24.2/arch/arm/mach-ixp4xx/ixp4xx_npe.c linux-2.6.24.2-owrt/arch/arm/mach-ixp4xx/ixp4xx_npe.c
2 --- linux-2.6.24.2/arch/arm/mach-ixp4xx/ixp4xx_npe.c 2008-04-22 12:24:29.000000000 +0200
3 +++ linux-2.6.24.2-owrt/arch/arm/mach-ixp4xx/ixp4xx_npe.c 2008-04-24 13:26:56.000000000 +0200
5 for (i = 0; i < image->size; i++)
6 image->data[i] = swab32(image->data[i]);
8 - if (!cpu_is_ixp46x() && ((image->id >> 28) & 0xF /* device ID */)) {
9 - print_npe(KERN_INFO, npe, "IXP46x firmware ignored on "
10 + if (cpu_is_ixp42x() && ((image->id >> 28) & 0xF /* device ID */)) {
11 + print_npe(KERN_INFO, npe, "IXP46x/IXP43x firmware ignored on "
16 "revision 0x%X:%X\n", (image->id >> 16) & 0xFF,
17 (image->id >> 8) & 0xFF, image->id & 0xFF);
19 - if (!cpu_is_ixp46x()) {
20 + if (cpu_is_ixp42x()) {
22 instr_size = NPE_A_42X_INSTR_SIZE;
24 diff -Nur linux-2.6.24.2/drivers/net/arm/ixp4xx_eth.c linux-2.6.24.2-owrt/drivers/net/arm/ixp4xx_eth.c
25 --- linux-2.6.24.2/drivers/net/arm/ixp4xx_eth.c 2008-04-22 12:24:29.000000000 +0200
26 +++ linux-2.6.24.2-owrt/drivers/net/arm/ixp4xx_eth.c 2008-04-24 18:23:24.000000000 +0200
28 #include <linux/kernel.h>
29 #include <linux/mii.h>
30 #include <linux/platform_device.h>
31 +#include <asm/arch/cpu.h>
32 #include <asm/arch/npe.h>
33 #include <asm/arch/qmgr.h>
35 @@ -1238,12 +1239,16 @@
37 static int __init eth_init_module(void)
39 - if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0))
42 - /* All MII PHY accesses use NPE-B Ethernet registers */
43 spin_lock_init(&mdio_lock);
44 - mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
45 + if (!cpu_is_ixp43x())
46 + /* All MII PHY accesses use NPE-B Ethernet registers */
47 + mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
50 + /* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */
51 + mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT;
53 __raw_writel(DEFAULT_CORE_CNTRL, &mdio_regs->core_control);
55 return platform_driver_register(&drv);
56 diff -Nur linux-2.6.24.2/include/asm-arm/arch-ixp4xx/cpu.h linux-2.6.24.2-owrt/include/asm-arm/arch-ixp4xx/cpu.h
57 --- linux-2.6.24.2/include/asm-arm/arch-ixp4xx/cpu.h 2008-04-22 12:24:29.000000000 +0200
58 +++ linux-2.6.24.2-owrt/include/asm-arm/arch-ixp4xx/cpu.h 2008-04-24 18:15:29.000000000 +0200
60 val &= ~IXP4XX_FEATURE_RESERVED;
62 val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
63 + if (cpu_is_ixp42x())
64 + val &= ~IXP4XX_FEATURE_IXP43X_46X;
68 diff -Nur linux-2.6.24.2/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h linux-2.6.24.2-owrt/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
69 --- linux-2.6.24.2/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2008-04-22 12:24:29.000000000 +0200
70 +++ linux-2.6.24.2-owrt/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h 2008-04-24 18:15:13.000000000 +0200
72 #define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
73 #define IXP4XX_FEATURE_RESERVED (0xFF << 24)
75 -#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC | \
76 +#define IXP4XX_FEATURE_IXP43X_46X (IXP4XX_FEATURE_ECC_TIMESYNC | \
77 IXP4XX_FEATURE_USB_HOST | \
78 IXP4XX_FEATURE_NPEA_ETH | \
79 - IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \
80 - IXP4XX_FEATURE_RSA | \
81 IXP4XX_FEATURE_XSCALE_MAX_FREQ)
83 +#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \