1 --- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c
2 +++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
4 for (i = 0; i < image->size; i++)
5 image->data[i] = swab32(image->data[i]);
7 - if (!cpu_is_ixp46x() && ((image->id >> 28) & 0xF /* device ID */)) {
8 - print_npe(KERN_INFO, npe, "IXP46x firmware ignored on "
9 + if (cpu_is_ixp42x() && ((image->id >> 28) & 0xF /* device ID */)) {
10 + print_npe(KERN_INFO, npe, "IXP46x/IXP43x firmware ignored on "
15 "revision 0x%X:%X\n", (image->id >> 16) & 0xFF,
16 (image->id >> 8) & 0xFF, image->id & 0xFF);
18 - if (!cpu_is_ixp46x()) {
19 + if (cpu_is_ixp42x()) {
21 instr_size = NPE_A_42X_INSTR_SIZE;
23 --- a/drivers/net/arm/ixp4xx_eth.c
24 +++ b/drivers/net/arm/ixp4xx_eth.c
26 #include <linux/kernel.h>
27 #include <linux/mii.h>
28 #include <linux/platform_device.h>
29 +#include <asm/arch/cpu.h>
30 #include <asm/arch/npe.h>
31 #include <asm/arch/qmgr.h>
33 @@ -1338,12 +1339,16 @@
35 static int __init eth_init_module(void)
37 - if (!(ixp4xx_read_feature_bits() & IXP4XX_FEATURE_NPEB_ETH0))
40 - /* All MII PHY accesses use NPE-B Ethernet registers */
41 spin_lock_init(&mdio_lock);
42 - mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
43 + if (!cpu_is_ixp43x())
44 + /* All MII PHY accesses use NPE-B Ethernet registers */
45 + mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthB_BASE_VIRT;
48 + /* IXP43x lacks NPE-B and uses NPE-C for MII PHY access */
49 + mdio_regs = (struct eth_regs __iomem *)IXP4XX_EthC_BASE_VIRT;
51 __raw_writel(DEFAULT_CORE_CNTRL, &mdio_regs->core_control);
53 return platform_driver_register(&drv);
54 --- a/include/asm-arm/arch-ixp4xx/cpu.h
55 +++ b/include/asm-arm/arch-ixp4xx/cpu.h
57 val &= ~IXP4XX_FEATURE_RESERVED;
59 val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
60 + if (cpu_is_ixp42x())
61 + val &= ~IXP4XX_FEATURE_IXP43X_46X;
65 --- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
66 +++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
68 #define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
69 #define IXP4XX_FEATURE_RESERVED (0xFF << 24)
71 -#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC | \
72 +#define IXP4XX_FEATURE_IXP43X_46X (IXP4XX_FEATURE_ECC_TIMESYNC | \
73 IXP4XX_FEATURE_USB_HOST | \
74 IXP4XX_FEATURE_NPEA_ETH | \
75 - IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \
76 - IXP4XX_FEATURE_RSA | \
77 IXP4XX_FEATURE_XSCALE_MAX_FREQ)
79 +#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \