++static int __init hss_init_module(void)
++{
++ if ((ixp4xx_read_feature_bits() &
++ (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) !=
++ (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS))
++ return -ENOSYS;
++ return platform_driver_register(&drv);
++}
++
++static void __exit hss_cleanup_module(void)
++{
++ platform_driver_unregister(&drv);
++}
++
++MODULE_AUTHOR("Krzysztof Halasa");
++MODULE_DESCRIPTION("Intel IXP4xx HSS driver");
++MODULE_LICENSE("GPL v2");
++module_init(hss_init_module);
++module_exit(hss_cleanup_module);
+Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+===================================================================
+--- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
++++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+@@ -15,10 +15,6 @@
+ *
+ */
+
+-#ifndef __ASM_ARCH_HARDWARE_H__
+-#error "Do not include this directly, instead #include <asm/hardware.h>"
+-#endif
+-
+ #ifndef _ASM_ARM_IXP4XX_H_
+ #define _ASM_ARM_IXP4XX_H_
+
+@@ -607,4 +603,36 @@
+
+ #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
+
++/* "fuse" bits of IXP_EXP_CFG2 */
++#define IXP4XX_FEATURE_RCOMP (1 << 0)
++#define IXP4XX_FEATURE_USB_DEVICE (1 << 1)
++#define IXP4XX_FEATURE_HASH (1 << 2)
++#define IXP4XX_FEATURE_AES (1 << 3)
++#define IXP4XX_FEATURE_DES (1 << 4)
++#define IXP4XX_FEATURE_HDLC (1 << 5)
++#define IXP4XX_FEATURE_AAL (1 << 6)
++#define IXP4XX_FEATURE_HSS (1 << 7)
++#define IXP4XX_FEATURE_UTOPIA (1 << 8)
++#define IXP4XX_FEATURE_NPEB_ETH0 (1 << 9)
++#define IXP4XX_FEATURE_NPEC_ETH (1 << 10)
++#define IXP4XX_FEATURE_RESET_NPEA (1 << 11)
++#define IXP4XX_FEATURE_RESET_NPEB (1 << 12)
++#define IXP4XX_FEATURE_RESET_NPEC (1 << 13)
++#define IXP4XX_FEATURE_PCI (1 << 14)
++#define IXP4XX_FEATURE_ECC_TIMESYNC (1 << 15)
++#define IXP4XX_FEATURE_UTOPIA_PHY_LIMIT (3 << 16)
++#define IXP4XX_FEATURE_USB_HOST (1 << 18)
++#define IXP4XX_FEATURE_NPEA_ETH (1 << 19)
++#define IXP4XX_FEATURE_NPEB_ETH_1_TO_3 (1 << 20)
++#define IXP4XX_FEATURE_RSA (1 << 21)
++#define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
++#define IXP4XX_FEATURE_RESERVED (0xFF << 24)
++
++#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC | \
++ IXP4XX_FEATURE_USB_HOST | \
++ IXP4XX_FEATURE_NPEA_ETH | \
++ IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \
++ IXP4XX_FEATURE_RSA | \
++ IXP4XX_FEATURE_XSCALE_MAX_FREQ)
++
+ #endif
+Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/cpu.h
+===================================================================
+--- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/cpu.h
++++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/cpu.h
+@@ -28,4 +28,19 @@ extern unsigned int processor_id;
+ #define cpu_is_ixp46x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
+ IXP465_PROCESSOR_ID_VALUE)
+
++static inline u32 ixp4xx_read_feature_bits(void)
++{
++ unsigned int val = ~*IXP4XX_EXP_CFG2;
++ val &= ~IXP4XX_FEATURE_RESERVED;
++ if (!cpu_is_ixp46x())
++ val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
++
++ return val;
++}
++
++static inline void ixp4xx_write_feature_bits(u32 value)
++{
++ *IXP4XX_EXP_CFG2 = ~value;
++}
++
+ #endif /* _ASM_ARCH_CPU_H */
+Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/hardware.h
+===================================================================
+--- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/hardware.h
++++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/hardware.h
+@@ -27,13 +27,13 @@
+
+ #define pcibios_assign_all_busses() 1
+
++/* Register locations and bits */
++#include "ixp4xx-regs.h"
++
+ #ifndef __ASSEMBLER__
+ #include <asm/arch/cpu.h>
+ #endif
+
+-/* Register locations and bits */
+-#include "ixp4xx-regs.h"
+-
+ /* Platform helper functions and definitions */
+ #include "platform.h"
+
+Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/uncompress.h
+===================================================================
+--- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/uncompress.h
++++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/uncompress.h
+@@ -13,7 +13,7 @@
+ #ifndef _ARCH_UNCOMPRESS_H_
+ #define _ARCH_UNCOMPRESS_H_
+
+-#include <asm/hardware.h>
++#include "ixp4xx-regs.h"
+ #include <asm/mach-types.h>
+ #include <linux/serial_reg.h>
+
+Index: linux-2.6.24.7/arch/arm/kernel/setup.c
+===================================================================
+--- linux-2.6.24.7.orig/arch/arm/kernel/setup.c
++++ linux-2.6.24.7/arch/arm/kernel/setup.c
+@@ -62,6 +62,7 @@ extern int root_mountflags;
+ extern void _stext, _text, _etext, __data_start, _edata, _end;
+
+ unsigned int processor_id;
++EXPORT_SYMBOL(processor_id);
+ unsigned int __machine_arch_type;
+ EXPORT_SYMBOL(__machine_arch_type);
+
+Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/Kconfig
+===================================================================
+--- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/Kconfig
++++ linux-2.6.24.7/arch/arm/mach-ixp4xx/Kconfig
+@@ -262,6 +262,20 @@ config IXP4XX_INDIRECT_PCI
+ need to use the indirect method instead. If you don't know
+ what you need, leave this option unselected.
+
++config IXP4XX_QMGR
++ tristate "IXP4xx Queue Manager support"
++ help
++ This driver supports IXP4xx built-in hardware queue manager
++ and is automatically selected by Ethernet and HSS drivers.
++
++config IXP4XX_NPE
++ tristate "IXP4xx Network Processor Engine support"
++ select HOTPLUG
++ select FW_LOADER
++ help
++ This driver supports IXP4xx built-in network coprocessors
++ and is automatically selected by Ethernet and HSS drivers.
++
+ endmenu
+
+ endif
+Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/Makefile
+===================================================================
+--- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/Makefile
++++ linux-2.6.24.7/arch/arm/mach-ixp4xx/Makefile
+@@ -48,3 +48,5 @@ obj-$(CONFIG_MACH_AP1000) += ap1000-setu
+ obj-$(CONFIG_MACH_TW5334) += tw5334-setup.o
+
+ obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
++obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
++obj-$(CONFIG_IXP4XX_NPE) += ixp4xx_npe.o
+Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/qmgr.h
+===================================================================
+--- /dev/null
++++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/qmgr.h
+@@ -0,0 +1,126 @@
++/*
++ * Copyright (C) 2007 Krzysztof Halasa <khc@pm.waw.pl>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of version 2 of the GNU General Public License
++ * as published by the Free Software Foundation.
++ */
++
++#ifndef IXP4XX_QMGR_H
++#define IXP4XX_QMGR_H