Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82a96f57 authored by Krzysztof Halasa's avatar Krzysztof Halasa Committed by Russell King
Browse files

[ARM] 4713/3: Adds drivers for IXP4xx QMgr and NPE features



This patch adds drivers for IXP4xx hardware Queue Manager and for
Network Processor Engines. Requires patch #4712 (reading/writing
CPU feature (aka fuse) bits).

Posted to linux-arm-kernel on 2 Dec 2007 and revised.

Signed-off-by: default avatarKrzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c18f6581
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -189,6 +189,20 @@ config IXP4XX_INDIRECT_PCI
	  need to use the indirect method instead. If you don't know
	  need to use the indirect method instead. If you don't know
	  what you need, leave this option unselected.
	  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
endmenu


endif
endif
+2 −0
Original line number Original line Diff line number Diff line
@@ -30,3 +30,5 @@ obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
obj-$(CONFIG_MACH_WG302V2)	+= wg302v2-setup.o
obj-$(CONFIG_MACH_WG302V2)	+= wg302v2-setup.o


obj-$(CONFIG_PCI)		+= $(obj-pci-$(CONFIG_PCI)) common-pci.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
+741 −0

File added.

Preview size limit exceeded, changes collapsed.

+274 −0

File added.

Preview size limit exceeded, changes collapsed.

+39 −0
Original line number Original line Diff line number Diff line
#ifndef __IXP4XX_NPE_H
#define __IXP4XX_NPE_H

#include <linux/kernel.h>

extern const char *npe_names[];

struct npe_regs {
	u32 exec_addr, exec_data, exec_status_cmd, exec_count;
	u32 action_points[4];
	u32 watchpoint_fifo, watch_count;
	u32 profile_count;
	u32 messaging_status, messaging_control;
	u32 mailbox_status, /*messaging_*/ in_out_fifo;
};

struct npe {
	struct resource *mem_res;
	struct npe_regs __iomem *regs;
	u32 regs_phys;
	int id;
	int valid;
};


static inline const char *npe_name(struct npe *npe)
{
	return npe_names[npe->id];
}

int npe_running(struct npe *npe);
int npe_send_message(struct npe *npe, const void *msg, const char *what);
int npe_recv_message(struct npe *npe, void *msg, const char *what);
int npe_send_recv_message(struct npe *npe, void *msg, const char *what);
int npe_load_firmware(struct npe *npe, const char *name, struct device *dev);
struct npe *npe_request(int id);
void npe_release(struct npe *npe);

#endif /* __IXP4XX_NPE_H */
Loading