diff options
Diffstat (limited to 'packages/ixp4xx')
25 files changed, 863 insertions, 1023 deletions
diff --git a/packages/ixp4xx/ixp-osal-1.5/2.6.patch b/packages/ixp4xx/ixp-osal-1.5/2.6.patch index c762ddb9c7..3e47fe28de 100644 --- a/packages/ixp4xx/ixp-osal-1.5/2.6.patch +++ b/packages/ixp4xx/ixp-osal-1.5/2.6.patch @@ -49,10 +49,10 @@ diff -Naur ixp_osal.orig/include/linux-2.6.h ixp_osal/include/linux-2.6.h +# define IXP425_EXP_BUS_BASE2_PHYS IXP4XX_EXP_BUS_CS2_BASE_PHYS +#endif +#if !defined (IXP425_EthA_BASE_PHYS) -+# define IXP425_EthA_BASE_PHYS IXP4XX_EthA_BASE_PHYS ++# define IXP425_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000) +#endif +#if !defined (IXP425_EthB_BASE_PHYS) -+# define IXP425_EthB_BASE_PHYS IXP4XX_EthB_BASE_PHYS ++# define IXP425_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000) +#endif +#if !defined (IXP425_ICMR) +# define IXP425_ICMR IXP4XX_ICMR diff --git a/packages/ixp4xx/ixp-osal-2.0/2.6.patch b/packages/ixp4xx/ixp-osal-2.0/2.6.patch index 8dc31d48df..6c143859a4 100644 --- a/packages/ixp4xx/ixp-osal-2.0/2.6.patch +++ b/packages/ixp4xx/ixp-osal-2.0/2.6.patch @@ -37,10 +37,10 @@ diff -Naur ixp_osal.orig/include/linux-2.6.h ixp_osal/include/linux-2.6.h +# define IXP425_EXP_BUS_BASE2_PHYS IXP4XX_EXP_BUS_CS2_BASE_PHYS +#endif +#if !defined (IXP425_EthA_BASE_PHYS) -+# define IXP425_EthA_BASE_PHYS IXP4XX_EthA_BASE_PHYS ++# define IXP425_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000) +#endif +#if !defined (IXP425_EthB_BASE_PHYS) -+# define IXP425_EthB_BASE_PHYS IXP4XX_EthB_BASE_PHYS ++# define IXP425_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000) +#endif +#if !defined (IXP425_ICMR) +# define IXP425_ICMR IXP4XX_ICMR diff --git a/packages/ixp4xx/ixp-osal-2.0/le.patch b/packages/ixp4xx/ixp-osal-2.0/le.patch index c941bbc318..ecb93d7d76 100644 --- a/packages/ixp4xx/ixp-osal-2.0/le.patch +++ b/packages/ixp4xx/ixp-osal-2.0/le.patch @@ -1,329 +1,39 @@ -diff -bBdurN hannes/ixp_osal/include/IxOsalAssert.h merged/ixp_osal/include/IxOsalAssert.h ---- ixp_osal/include/IxOsalAssert.h 2005-04-17 20:56:26.000000000 -0700 -+++ ixp_osal/include/IxOsalAssert.h 2005-10-07 15:08:43.119207986 -0700 -@@ -70,6 +70,9 @@ - * This will be conditionally compiled out and - * may be used for test purposes. - */ -+#ifndef __ARMEB__ -+#define IX_OSAL_ENSURE_ON -+#endif /* ! __ARMEB__ */ - #ifdef IX_OSAL_ENSURE_ON - #define IX_OSAL_ENSURE(c, str) do { \ - if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, str, \ -@@ -79,5 +82,14 @@ - #define IX_OSAL_ENSURE(c, str) - #endif - -+#ifndef __ARMEB__ -+#ifdef DEBUG_ACDC -+#define TRACE() printk("ixp400: %s(): line %d\n", __FUNCTION__, __LINE__) -+#define PRINTK(args...) printk(args...) -+#else -+#define TRACE() while (0) {} -+#define PRINTK(args...) while (0) {} -+#endif -+#endif /* ! __ARMEB__ */ - - #endif /* IX_OSAL_ASSERT_H */ -diff -bBdurN hannes/ixp_osal/include/modules/ioMem/IxOsalMemAccess.h merged/ixp_osal/include/modules/ioMem/IxOsalMemAccess.h ---- ixp_osal/include/modules/ioMem/IxOsalMemAccess.h 2005-04-17 20:56:25.000000000 -0700 -+++ ixp_osal/include/modules/ioMem/IxOsalMemAccess.h 2005-10-07 15:08:43.115207734 -0700 -@@ -84,7 +84,12 @@ +diff -urp ixp_osal/.pc/le.patch/include/modules/ioMem/IxOsalMemAccess.h ixp_osal/include/modules/ioMem/IxOsalMemAccess.h +--- ixp_osal/.pc/le.patch/include/modules/ioMem/IxOsalMemAccess.h 2005-04-17 20:56:25.000000000 -0700 ++++ ixp_osal/include/modules/ioMem/IxOsalMemAccess.h 2005-11-19 16:44:33.414684841 -0800 +@@ -84,7 +84,7 @@ #elif defined (IX_OSAL_LINUX_LE) -+#ifndef __ARMEB__ -+//#define IX_SDRAM_LE_DATA_COHERENT +-#define IX_SDRAM_LE_DATA_COHERENT +#define IX_SDRAM_LE_ADDRESS_COHERENT -+#else /* __ARMEB__ */ - #define IX_SDRAM_LE_DATA_COHERENT -+#endif /* __ARMEB__ */ #elif defined (IX_OSAL_WINCE_LE) -@@ -232,7 +237,11 @@ - Redefine per OS if dynamic memory maps are used - and I/O memory is accessed via functions instead of raw pointer access. */ - -+#ifndef __ARMEB__ -+#define IX_OSAL_READ_LONG_COOKIE(wCookie) (BARF; readl((UINT32) (wCookie) )) -+#else /* __ARMEB__ */ - #define IX_OSAL_READ_LONG_COOKIE(wCookie) (readl((UINT32) (wCookie) )) -+#endif /* __ARMEB__ */ - #define IX_OSAL_READ_SHORT_COOKIE(sCookie) (readw((UINT32) (sCookie) )) - #define IX_OSAL_READ_BYTE_COOKIE(bCookie) (readb((UINT32) (bCookie) )) - #define IX_OSAL_WRITE_LONG_COOKIE(wCookie, wData) (writel(wData, (UINT32) (wCookie) )) -@@ -343,7 +352,11 @@ - #include <asm/io.h> - #endif /* ndef __wince */ - -+#ifndef __ARMEB__ -+#define IX_OSAL_READ_LONG_IO(wAddr) IX_OSAL_READ_LONG_COOKIE(wAddr); BARF; -+#else /* __ARMEB__ */ - #define IX_OSAL_READ_LONG_IO(wAddr) IX_OSAL_READ_LONG_COOKIE(wAddr) -+#endif /* __ARMEB__ */ - #define IX_OSAL_READ_SHORT_IO(sAddr) IX_OSAL_READ_SHORT_COOKIE(sAddr) - #define IX_OSAL_READ_BYTE_IO(bAddr) IX_OSAL_READ_BYTE_COOKIE(bAddr) - #define IX_OSAL_WRITE_LONG_IO(wAddr, wData) IX_OSAL_WRITE_LONG_COOKIE(wAddr, wData) -diff -bBdurN hannes/ixp_osal/os/linux/include/core/IxOsalOs.h merged/ixp_osal/os/linux/include/core/IxOsalOs.h ---- ixp_osal/os/linux/include/core/IxOsalOs.h 2005-10-07 09:29:02.388729473 -0700 -+++ ixp_osal/os/linux/include/core/IxOsalOs.h 2005-10-07 15:08:43.127208490 -0700 -@@ -53,10 +53,16 @@ - #error "Uncached memory not supported in linux environment" - #endif - -+#ifndef __ARMEB__ -+#include <linux/config.h> -+#include <linux/version.h> -+#endif /* ! __ARMEB__ */ - #include <linux/cache.h> - #include <linux/mm.h> -+#ifdef __ARMEB__ - #include <linux/config.h> - #include <linux/version.h> -+#endif /* __ARMEB__ */ - #include <asm/pgalloc.h> - - /** -@@ -67,21 +73,41 @@ - - #define IX_OSAL_OS_MMU_PHYS_TO_VIRT(addr) ((addr) ? phys_to_virt((unsigned int)(addr)) : 0) - -+ - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+#ifndef __ARMEB__ -+extern void ix_dcache_invalidate_range(unsigned long start, unsigned long size) -+; -+extern void ix_dcache_flush_range(unsigned long start, unsigned long size); -+ -+#else /* __ARMEB__ */ - /* - * 2.6 kernels do not export the required cache functions. - */ - extern void ixOsalCacheInvalidateRange(unsigned long start, unsigned long size); - extern void ixOsalCacheFlushRange(unsigned long start, unsigned long size); -+#endif /* __ARMEB__ */ - -+#ifndef __ARMEB__ -+#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( ix_dcache_invalidate_range((__u32)addr, (__u32)addr + size )) -+#else /* __ARMEB__ */ - #define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) \ - ixOsalCacheInvalidateRange((unsigned long)addr, (unsigned long)addr + size) - #define IX_OSAL_OS_CACHE_FLUSH(addr, size) \ - ixOsalCacheFlushRange((unsigned long)addr, (unsigned long)addr + size ) -+#endif /* __ARMEB__ */ - -+#ifndef __ARMEB__ -+#define IX_OSAL_OS_CACHE_FLUSH(addr, size) ( ix_dcache_flush_range((__u32)addr, (__u32)addr + size )) -+#endif /* ! __ARMEB__ */ - #else -+#ifndef __ARMEB__ -+#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size )) -+#endif /* ! __ARMEB__ */ - -+#ifdef __ARMEB__ - #define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size )) -+#endif /* __ARMEB__ */ - #define IX_OSAL_OS_CACHE_FLUSH(addr, size) ( clean_dcache_range((__u32)addr, (__u32)addr + size )) - #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */ - -diff -bBdurN hannes/ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400.h merged/ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400.h ---- ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400.h 2005-10-07 09:29:02.392729725 -0700 -+++ ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400.h 2005-10-07 15:08:43.147209748 -0700 -@@ -110,6 +149,9 @@ - #define IX_OSAL_IXP400_NPEB_VIRT_BASE IXP425_NPEB_BASE_VIRT - #define IX_OSAL_IXP400_NPEC_VIRT_BASE IXP425_NPEC_BASE_VIRT - #define IX_OSAL_IXP400_PERIPHERAL_VIRT_BASE IXP425_PERIPHERAL_BASE_VIRT -+#ifndef __ARMEB__ -+#define IX_OSAL_IXP400_QMGR_VIRT_BASE IXP425_QMGR_BASE_VIRT -+#endif /* ! __ARMEB__ */ - #define IX_OSAL_IXP400_OSTS_VIRT_BASE IXP425_TIMER_BASE_VIRT - #define IX_OSAL_IXP400_USB_VIRT_BASE IXP425_USB_BASE_VIRT - #define IX_OSAL_IXP400_EXP_CFG_VIRT_BASE IXP425_EXP_CFG_BASE_VIRT -diff -bBdurN hannes/ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h merged/ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h ---- ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h 2005-04-17 20:56:27.000000000 -0700 -+++ ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h 2005-10-07 15:08:43.147209748 -0700 -@@ -171,7 +171,12 @@ +diff -urp ixp_osal/.pc/le.patch/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h +--- ixp_osal/.pc/le.patch/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h 2005-04-17 20:56:27.000000000 -0700 ++++ ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h 2005-11-19 16:45:35.298578949 -0800 +@@ -171,7 +171,7 @@ ***************************/ #if (IX_COMPONENT_NAME == ix_qmgr) -+#ifndef __ARMEB__ -+//#define IX_OSAL_LE_DC_MAPPING +-#define IX_OSAL_LE_DC_MAPPING +#define IX_OSAL_LE_AC_MAPPING -+#else /* __ARMEB__ */ - #define IX_OSAL_LE_DC_MAPPING -+#endif /* __ARMEB__ */ #endif /* qmgr */ -diff -bBdurN hannes/ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h merged/ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h ---- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-10-07 09:29:02.392729725 -0700 -+++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-10-07 15:08:43.143209496 -0700 -@@ -85,6 +85,17 @@ - * Queue Manager - */ - { -+#ifndef __ARMEB__ -+ IX_OSAL_DYNAMIC_MAP, /* type */ -+ IX_OSAL_IXP400_QMGR_PHYS_BASE, /* physicalAddress */ -+ IX_OSAL_IXP400_QMGR_MAP_SIZE, /* size */ -+ 0, -+ ixOsalLinuxMemMap, /* mapFunction */ -+ ixOsalLinuxMemUnmap, /* unmapFunction */ -+ 0, -+ IX_OSAL_BE | IX_OSAL_LE_AC, /* endianType */ -+ "qMgr" /* name */ -+#else /* __ARMEB__ */ - #ifdef IXP425_QMGR_BASE_VIRT - IX_OSAL_STATIC_MAP, /* type */ - IX_OSAL_IXP400_QMGR_PHYS_BASE, /* physicalAddress */ -@@ -103,6 +114,7 @@ +diff -urp ixp_osal/.pc/le.patch/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h +--- ixp_osal/.pc/le.patch/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-11-19 15:53:11.808771607 -0800 ++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-11-19 16:51:40.729574072 -0800 +@@ -101,7 +101,7 @@ IxOsalMemoryMap ixOsalGlobalMemoryMap[] + ixOsalLinuxMemUnmap, /* unmapFunction */ + #endif 0, /* refCount */ - IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */ +- IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */ ++ IX_OSAL_BE | IX_OSAL_LE_AC, /* endianType */ "qMgr" /* name */ -+#endif /* __ARMEB__ */ }, - /* -diff -bBdurN hannes/ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c merged/ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c ---- ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c 2005-10-07 09:29:02.388729473 -0700 -+++ ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c 2005-10-07 15:08:43.159210503 -0700 -@@ -210,6 +210,7 @@ - free_pages ((unsigned int) memptr, order); - } - } -+#ifdef __ARMEB__ - - - /* -@@ -266,3 +267,4 @@ - #undef IX_CLM - - #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */ -+#endif /* __ARMEB__ */ -diff -bBdurN hannes/ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c merged/ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c ---- ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 2005-10-07 09:29:02.388729473 -0700 -+++ ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 2005-10-07 15:08:43.159210503 -0700 -@@ -48,6 +48,9 @@ - #include <linux/spinlock.h> - #include <linux/ipc.h> - #include <linux/msg.h> -+#ifndef __ARMEB__ -+#include <linux/spinlock.h> -+#endif /* ! __ARMEB__ */ - #include <linux/interrupt.h> - - #include "IxOsal.h" -diff -bBdurN hannes/ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c merged/ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c ---- ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 2005-10-07 09:29:02.388729473 -0700 -+++ ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 2005-10-07 15:08:43.163210755 -0700 -@@ -46,6 +46,9 @@ - */ - - #include <linux/slab.h> -+#ifndef __ARMEB__ -+//#include <asm-arm/hardirq.h> -+#endif /* ! __ARMEB__ */ - #include <linux/hardirq.h> - #include "IxOsal.h" - -@@ -93,7 +96,11 @@ - { - - IX_STATUS ixStatus = IX_SUCCESS; -+#ifndef __ARMEB__ -+ UINT32 timeoutTime; -+#else /* __ARMEB__ */ - unsigned long timeoutTime; -+#endif /* __ARMEB__ */ - - if (sid == NULL) - { -diff -bBdurN hannes/ixp_osal/os/linux/src/core/IxOsalOsServices.c merged/ixp_osal/os/linux/src/core/IxOsalOsServices.c ---- ixp_osal/os/linux/src/core/IxOsalOsServices.c 2005-10-07 09:29:02.392729725 -0700 -+++ ixp_osal/os/linux/src/core/IxOsalOsServices.c 2005-10-07 15:08:43.163210755 -0700 -@@ -90,8 +89,12 @@ - /* - * General interrupt handler - */ -+#ifndef __ARMEB__ -+static irqreturn_t ixOsalOsIsrProxy (int irq, void *dev_id, struct pt_regs *regs) -+#else /* __ARMEB__ */ - static irqreturn_t - ixOsalOsIsrProxy (int irq, void *dev_id, struct pt_regs *regs) -+#endif /* __ARMEB__ */ - { - IxOsalInfoType *isr_proxy_info = (IxOsalInfoType *) dev_id; - -@@ -197,12 +200,20 @@ - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) - unsigned long flags; - local_irq_save(flags); -+#ifndef __ARMEB__ -+ return (int)flags; -+#endif /* __ARMEB__ */ - #else - UINT32 flags; - save_flags (flags); - cli (); -+#ifndef __ARMEB__ -+ return flags; -+#endif /* ! __ARMEB__ */ - #endif -+#ifdef __ARMEB__ - return (UINT32)flags; -+#endif /* __ARMEB__ */ - } - - /* Enable interrupts and task scheduling, -@@ -212,11 +223,15 @@ - PUBLIC void - ixOsalIrqUnlock (UINT32 lockKey) - { --# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+#ifndef __ARMEB__ -+ local_irq_restore(lockKey); -+#else /* __ARMEB__ */ - local_irq_restore((unsigned long)lockKey); --# else -+#endif /* __ARMEB__ */ -+#else - restore_flags (lockKey); --# endif -+#endif - } - - PUBLIC UINT32 -@@ -341,7 +356,11 @@ - PUBLIC void - ixOsalSleep (UINT32 milliseconds) - { -+#ifndef __ARMEB__ -+ if (milliseconds != 0) -+#else /* __ARMEB__ */ - if (milliseconds*HZ >= 1000) -+#endif /* __ARMEB__ */ - { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout ((milliseconds * HZ) / 1000); -diff -bBdurN hannes/ixp_osal/os/linux/src/core/IxOsalOsSymbols.c merged/ixp_osal/os/linux/src/core/IxOsalOsSymbols.c ---- ixp_osal/os/linux/src/core/IxOsalOsSymbols.c 2005-10-07 09:29:02.388729473 -0700 -+++ ixp_osal/os/linux/src/core/IxOsalOsSymbols.c 2005-10-07 15:08:43.167211007 -0700 -@@ -64,10 +64,12 @@ - - EXPORT_SYMBOL (ixOsalCacheDmaMalloc); - EXPORT_SYMBOL (ixOsalCacheDmaFree); -+#ifdef __ARMEB__ - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) - EXPORT_SYMBOL (ixOsalCacheInvalidateRange); - EXPORT_SYMBOL (ixOsalCacheFlushRange); - #endif -+#endif /* __ARMEB__ */ - - EXPORT_SYMBOL (ixOsalThreadCreate); - EXPORT_SYMBOL (ixOsalThreadStart); diff -bBdurN hannes/ixp_osal/include/modules/ioMem/IxOsalIoMem.h merged/ixp_osal/include/modules/ioMem/IxOsalIoMem.h --- ixp_osal/include/modules/ioMem/IxOsalIoMem.h 2005-04-17 20:56:25.000000000 -0700 +++ ixp_osal/include/modules/ioMem/IxOsalIoMem.h 2005-10-07 16:20:27.786083595 -0700 diff --git a/packages/ixp4xx/ixp-osal-2.1/.mtn2git_empty b/packages/ixp4xx/ixp-osal-2.1/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/ixp4xx/ixp-osal-2.1/.mtn2git_empty diff --git a/packages/ixp4xx/ixp-osal-2.1/2.6.patch b/packages/ixp4xx/ixp-osal-2.1/2.6.patch new file mode 100644 index 0000000000..6bf1c2c32d --- /dev/null +++ b/packages/ixp4xx/ixp-osal-2.1/2.6.patch @@ -0,0 +1,137 @@ +--- ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 2005-08-24 00:16:37.000000000 +0200 ++++ ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 2005-08-24 00:18:02.000000000 +0200 +@@ -45,9 +45,9 @@ + * -- End Intel Copyright Notice -- + */ + #include <linux/linkage.h> ++#include <linux/spinlock.h> + #include <linux/ipc.h> + #include <linux/msg.h> +-#include <linux/spinlock.h> + #include <linux/interrupt.h> + + #include "IxOsal.h" +--- ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 2005-08-24 00:16:37.000000000 +0200 ++++ ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 2005-08-26 15:58:16.000000000 +0200 +@@ -46,7 +46,7 @@ + */ + + #include <linux/slab.h> +-#include <asm-arm/hardirq.h> ++#include <linux/hardirq.h> + #include "IxOsal.h" + + /* Define a large number */ +@@ -93,7 +93,7 @@ + { + + IX_STATUS ixStatus = IX_SUCCESS; +- UINT32 timeoutTime; ++ unsigned long timeoutTime; + + if (sid == NULL) + { +@@ -261,7 +261,7 @@ ixOsalMutexInit (IxOsalMutex * mutex) + PUBLIC IX_STATUS + ixOsalMutexLock (IxOsalMutex * mutex, INT32 timeout) + { +- UINT32 timeoutTime; ++ unsigned long timeoutTime; + + if (in_irq ()) + { +--- ixp_osal/os/linux/src/core/IxOsalOsServices.c 2005-04-17 20:56:28.000000000 -0700 ++++ ixp_osal/os/linux/src/core/IxOsalOsServices.c 2005-10-01 16:37:00.876444607 -0700 +@@ -54,6 +54,7 @@ + #include <linux/time.h> + #include <linux/sched.h> + #include <linux/slab.h> ++#include <linux/interrupt.h> + + #include "IxOsal.h" + +@@ -89,7 +90,7 @@ + /* + * General interrupt handler + */ +-static void ++static irqreturn_t + ixOsalOsIsrProxy (int irq, void *dev_id, struct pt_regs *regs) + { + IxOsalInfoType *isr_proxy_info = (IxOsalInfoType *) dev_id; +@@ -98,6 +99,7 @@ + "ixOsalOsIsrProxy: Interrupt used before ixOsalIrqBind was invoked"); + + isr_proxy_info->routine (isr_proxy_info->parameter); ++ return IRQ_HANDLED; + } + + /* +@@ -105,11 +107,12 @@ + * This handler saves the interrupted Program Counter (PC) + * into a global variable + */ +-static void ++static irqreturn_t + ixOsalOsIsrProxyWithPC (int irq, void *dev_id, struct pt_regs *regs) + { + ixOsalLinuxInterruptedPc = regs->ARM_pc; + ixOsalOsIsrProxy(irq, dev_id, regs); ++ return IRQ_HANDLED; + } + + /************************************** +@@ -191,10 +194,15 @@ + PUBLIC UINT32 + ixOsalIrqLock () + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++ unsigned long flags; ++ local_irq_save(flags); ++#else + UINT32 flags; + save_flags (flags); + cli (); +- return flags; ++#endif ++ return (UINT32)flags; + } + + /* Enable interrupts and task scheduling, +@@ -204,7 +212,11 @@ + PUBLIC void + ixOsalIrqUnlock (UINT32 lockKey) + { ++# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++ local_irq_restore((unsigned long)lockKey); ++# else + restore_flags (lockKey); ++# endif + } + + PUBLIC UINT32 +@@ -329,7 +341,7 @@ + PUBLIC void + ixOsalSleep (UINT32 milliseconds) + { +- if (milliseconds != 0) ++ if (milliseconds*HZ >= 1000) + { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout ((milliseconds * HZ) / 1000); +--- ixp_osal/os/linux/src/core/IxOsalOsThread.c 2005-11-20 00:59:09.734097888 -0800 ++++ ixp_osal/os/linux/src/core/IxOsalOsThread.c 2005-11-20 01:00:07.057705036 -0800 +@@ -65,12 +65,7 @@ thread_internal (void *unused) + void *arg = IxOsalOsThreadData.arg; + static int seq = 0; + +- daemonize (); +- reparent_to_init (); +- +- exit_files (current); +- +- snprintf(current->comm, sizeof(current->comm), "IxOsal %d", ++seq); ++ daemonize ("IxOsal %d", ++seq); + + up (&IxOsalThreadMutex); + diff --git a/packages/ixp4xx/ixp-osal-2.1/Makefile.patch b/packages/ixp4xx/ixp-osal-2.1/Makefile.patch new file mode 100644 index 0000000000..f852ea2b26 --- /dev/null +++ b/packages/ixp4xx/ixp-osal-2.1/Makefile.patch @@ -0,0 +1,27 @@ +diff -Naur ixp_osal.orig/Makefile ixp_osal/Makefile +--- ixp_osal.orig/Makefile 2005-08-24 00:16:37.000000000 +0200 ++++ ixp_osal/Makefile 2005-08-24 00:18:02.000000000 +0200 +@@ -172,7 +172,7 @@ + + # TODO push this to linux make + ifeq ($(IX_OSAL_MK_HOST_OS), linux) +-INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp425/ ++INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp4xx/ + endif + + CFLAGS += $(INCLUDE_DIRS:%=-I%) +--- ixp_osal/os/linux/make/macros.mk.orig 2005-10-01 15:50:19.544167880 -0700 ++++ ixp_osal/os/linux/make/macros.mk 2005-10-01 15:50:43.053647239 -0700 +@@ -88,10 +88,10 @@ + # Compiler & linker options + + # Compiler flags +-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale ++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale + + CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common \ +- -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE \ ++ -pipe -mapcs-32 -msoft-float -DMODULE \ + -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS) -DEXPORT_SYMTAB + + # Linux linker flags diff --git a/packages/ixp4xx/ixp-osal-2.1/assert.patch b/packages/ixp4xx/ixp-osal-2.1/assert.patch new file mode 100644 index 0000000000..1dfc84ed12 --- /dev/null +++ b/packages/ixp4xx/ixp-osal-2.1/assert.patch @@ -0,0 +1,37 @@ +# Unnecessary patch - reduces the code size slightly, gives clearer +# messages if IX_OSAL_ENSURE_ON is set +--- ixp_osal/include/IxOsalAssert.h 2005-11-20 15:19:59.128189352 -0800 ++++ ixp_osal/include/IxOsalAssert.h 2005-11-20 15:20:46.099145048 -0800 +@@ -72,8 +72,8 @@ + */ + #ifdef IX_OSAL_ENSURE_ON + #define IX_OSAL_ENSURE(c, str) do { \ +-if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, str, \ +-0, 0, 0, 0, 0, 0); } while (0) ++if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, __FILE__ ": line %d: " str, \ ++__LINE__, 0, 0, 0, 0, 0); } while (0) + + #else + #define IX_OSAL_ENSURE(c, str) +--- ixp_osal/os/linux/include/core/IxOsalOsAssert.h 2005-09-24 20:57:00.000000000 -0700 ++++ ixp_osal/os/linux/include/core/IxOsalOsAssert.h 2005-11-20 15:25:32.273152843 -0800 +@@ -47,11 +47,18 @@ + + #ifndef IxOsalOsAssert_H + #define IxOsalOsAssert_H ++#ifdef IX_OSAL_ENSURE_ON + #define IX_OSAL_OS_ASSERT(c) if(!(c)) \ + { \ +- ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "Assertion failure \n", 0, 0, 0, 0, 0, 0);\ ++ ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "%s line %d: Assertion failure: %s\n", (int)__FILE__, __LINE__, (int)#c, 0, 0, 0);\ + BUG(); \ + } ++#else ++#define IX_OSAL_OS_ASSERT(c) if(!(c)) \ ++ { \ ++ BUG(); \ ++ } ++#endif + + /* + * Place holder. diff --git a/packages/ixp4xx/ixp-osal-2.1/invalidate-cache.patch b/packages/ixp4xx/ixp-osal-2.1/invalidate-cache.patch new file mode 100644 index 0000000000..c6ec6ed6a7 --- /dev/null +++ b/packages/ixp4xx/ixp-osal-2.1/invalidate-cache.patch @@ -0,0 +1,110 @@ +--- ixp_osal/os/linux/include/core/IxOsalOs.h 2005-08-24 00:16:37.000000000 +0200 ++++ ixp_osal/os/linux/include/core/IxOsalOs.h 2005-08-26 01:56:22.000000000 +0200 +@@ -56,6 +56,7 @@ + #include <linux/cache.h> + #include <linux/mm.h> + #include <linux/config.h> ++#include <linux/version.h> + #include <asm/pgalloc.h> + + /** +@@ -66,9 +67,23 @@ + + #define IX_OSAL_OS_MMU_PHYS_TO_VIRT(addr) ((addr) ? phys_to_virt((unsigned int)(addr)) : 0) + +-#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size )) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++/* ++ * 2.6 kernels do not export the required cache functions. ++ */ ++extern void ixOsalCacheInvalidateRange(unsigned long start, unsigned long size); ++extern void ixOsalCacheFlushRange(unsigned long start, unsigned long size); ++ ++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) \ ++ixOsalCacheInvalidateRange((unsigned long)addr, (unsigned long)addr + size) ++#define IX_OSAL_OS_CACHE_FLUSH(addr, size) \ ++ixOsalCacheFlushRange((unsigned long)addr, (unsigned long)addr + size ) + ++#else ++ ++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size )) + #define IX_OSAL_OS_CACHE_FLUSH(addr, size) ( clean_dcache_range((__u32)addr, (__u32)addr + size )) ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */ + + #define printf printk /* For backword compatibility, needs to move to better location */ + +--- ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c 2005-08-24 00:16:37.000000000 +0200 ++++ ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c 2005-08-26 01:56:22.000000000 +0200 +@@ -210,3 +210,59 @@ + free_pages ((unsigned int) memptr, order); + } + } ++ ++ ++/* ++ * 2.6 kernels do not export the required cache functions. ++ */ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++ ++#define _IX_STR(x) #x ++#define IX_STR(x) _IX_STR(x) ++#define IX_CLM IX_STR(IX_OSAL_CACHE_LINE_SIZE-1) ++ ++/* ++ * reimplementation of kernel's invalidate_dcache_range() ++ */ ++void ++ixOsalCacheInvalidateRange(unsigned long start, unsigned long size) ++{ ++ __asm__ ++ (" tst %0, #" IX_CLM "\n" ++ " mcrne p15, 0, %0, c7, c10, 1 @ clean D cache line\n" ++ " bic %0, %0, #" IX_CLM "\n" ++ " tst %1, #" IX_CLM "\n" ++ " mcrne p15, 0, %1, c7, c10, 1 @ clean D cache line\n" ++ "1: mcr p15, 0, %0, c7, c6, 1 @ invalidate D cache line\n" ++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n" ++ " cmp %0, %1\n" ++ " blo 1b\n" ++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n" ++ : /* no output */ ++ : "r"(start), "r"(size) ++ : "cc"); ++} ++ ++/* ++ * reimplementation of kernel's invalidate_dcache_range() ++ */ ++void ++ixOsalCacheFlushRange(unsigned long start, unsigned long size) ++{ ++ __asm__ ++ (" bic %0, %0, #" IX_CLM "\n" ++ "1: mcr p15, 0, %0, c7, c10, 1 @ clean D cache line\n" ++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n" ++ " cmp %0, %1\n" ++ " blo 1b\n" ++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n" ++ : /* no output */ ++ : "r"(start), "r"(size) ++ : "cc"); ++} ++ ++#undef _IX_STR ++#undef IX_STR ++#undef IX_CLM ++ ++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */ +--- ixp_osal/os/linux/src/core/IxOsalOsSymbols.c 2005-08-24 00:16:37.000000000 +0200 ++++ ixp_osal/os/linux/src/core/IxOsalOsSymbols.c 2005-08-30 19:19:33.000000000 +0200 +@@ -64,6 +64,10 @@ + + EXPORT_SYMBOL (ixOsalCacheDmaMalloc); + EXPORT_SYMBOL (ixOsalCacheDmaFree); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) ++EXPORT_SYMBOL (ixOsalCacheInvalidateRange); ++EXPORT_SYMBOL (ixOsalCacheFlushRange); ++#endif + + EXPORT_SYMBOL (ixOsalThreadCreate); + EXPORT_SYMBOL (ixOsalThreadStart); diff --git a/packages/ixp4xx/ixp-osal-2.1/ixp4xx-header.patch b/packages/ixp4xx/ixp-osal-2.1/ixp4xx-header.patch new file mode 100644 index 0000000000..28bd3d362b --- /dev/null +++ b/packages/ixp4xx/ixp-osal-2.1/ixp4xx-header.patch @@ -0,0 +1,105 @@ +--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-11-20 00:51:37.637649252 -0800 ++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-11-20 00:51:45.890168551 -0800 +@@ -53,6 +53,8 @@ + #error "Error: IxOsalOsIxp425Sys.h cannot be included directly before IxOsalOsIxp400.h" + #endif + ++#include "IxOsalOsIxp425Base.h" ++ + /* Memory Base Address */ + #define IX_OSAL_IXP400_EXP_BUS_PHYS_BASE IXP425_EXP_BUS_BASE2_PHYS + #define IX_OSAL_IXP400_EXP_BUS_BOOT_PHYS_BASE IXP425_EXP_BUS_BASE1_PHYS +@@ -98,14 +98,14 @@ IxOsalMemoryMap ixOsalGlobalMemoryMap[] + * Queue Manager + */ + { +- IX_OSAL_STATIC_MAP, /* type */ ++ IX_OSAL_DYNAMIC_MAP, /* type */ + IX_OSAL_IXP400_QMGR_PHYS_BASE, /* physicalAddress */ + IX_OSAL_IXP400_QMGR_MAP_SIZE, /* size */ +- IX_OSAL_IXP400_QMGR_VIRT_BASE, /* virtualAddress */ +- NULL, /* mapFunction */ +- NULL, /* unmapFunction */ ++ 0, /* virtualAddress */ ++ ixOsalLinuxMemMap, /* mapFunction */ ++ ixOsalLinuxMemUnmap, /* unmapFunction */ + 0, /* refCount */ + IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */ + "qMgr" /* name */ + }, + +--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Base.h 2005-09-06 00:17:15.000000000 -0700 ++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Base.h 2005-11-20 08:25:18.402543995 -0800 +@@ -0,0 +1,72 @@ ++/* ++ * Glue for the current linux definitons of this stuff. ++ */ ++#ifndef IxOsalOsIxp425Base_H ++#define IxOsalOsIxp425Base_H 1 ++#include <asm-arm/arch-ixp4xx/ixp4xx-regs.h> ++ ++/* Force Address Coherent (the default) mapping on LE - Linux 2.6 ++ * does not have a way of changing it. ++ */ ++#if defined IX_OSAL_LINUX_LE ++# if !defined IX_OSAL_ENFORCED_LE_AC_MAPPING ++# define IX_OSAL_ENFORCED_LE_AC_MAPPING ++# endif ++# if defined IX_OSAL_LE_DC_MAPPING ++# error Little Endian Data Coherent mapping not supported on this platform ++# endif ++ ++/* This doesn't matter on a BE build because it will never be used, ++ * however it will be selected and will fail on an LE build. ++ */ ++# undef IX_OSAL_LE_DC ++# define IX_OSAL_LE_DC IX_OSAL_LE_DC_IS_INVALID_ON_THIS_PLATFORM ++#endif ++ ++/* Physical addresses. */ ++#define IXP425_PERIPHERAL_BASE_PHYS IXP4XX_PERIPHERAL_BASE_PHYS ++#define IXP425_EXP_CFG_BASE_PHYS IXP4XX_EXP_CFG_BASE_PHYS ++#define IXP425_PCI_CFG_BASE_PHYS IXP4XX_PCI_CFG_BASE_PHYS ++ ++//#define IXP425_EXP_BUS_BASE1_PHYS ++#define IXP425_EXP_BUS_BASE2_PHYS IXP4XX_EXP_BUS_CS2_BASE_PHYS ++//#define IXP425_EXP_BUS_CS0_BASE_PHYS ++//#define IXP425_EXP_BUS_CS1_BASE_PHYS ++//#define IXP425_EXP_BUS_CS4_BASE_PHYS ++#define IXP425_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000) ++#define IXP425_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000) ++//#define IXP425_GPIO_BASE_PHYS ++#define IXP425_INTC_BASE_PHYS IXP4XX_INTC_BASE_PHYS ++//#define IXP425_NPEA_BASE_PHYS ++//#define IXP425_NPEB_BASE_PHYS ++//#define IXP425_NPEC_BASE_PHYS ++//#define IXP425_PMU_BASE_PHYS ++#define IXP425_QMGR_BASE_PHYS IXP4XX_QMGR_BASE_PHYS ++#define IXP425_TIMER_BASE_PHYS IXP4XX_TIMER_BASE_PHYS ++//#define IXP425_UART1_BASE_PHYS ++//#define IXP425_UART2_BASE_PHYS ++#define IXP425_USB_BASE_PHYS IXP4XX_USB_BASE_PHYS ++ ++/* Virtual addresses. */ ++#define IXP425_PERIPHERAL_BASE_VIRT IXP4XX_PERIPHERAL_BASE_VIRT ++#define IXP425_PERIPHERAL_REGION_SIZE IXP4XX_PERIPHERAL_REGION_SIZE ++#define IXP425_EXP_CFG_BASE_VIRT IXP4XX_EXP_CFG_BASE_VIRT ++#define IXP425_PCI_CFG_BASE_VIRT IXP4XX_PCI_CFG_BASE_VIRT ++ ++//#define IXP425_EthA_BASE_VIRT ++//#define IXP425_EthB_BASE_VIRT ++//#define IXP425_GPIO_BASE_VIRT ++//#define IXP425_NPEA_BASE_VIRT ++//#define IXP425_NPEB_BASE_VIRT ++//#define IXP425_NPEC_BASE_VIRT ++//#define IXP425_QMGR_BASE_VIRT /* must be ioremapped on Linux 2.6 */ ++//#define IXP425_TIMER_BASE_VIRT ++//#define IXP425_UART1_BASE_VIRT ++//#define IXP425_UART2_BASE_VIRT ++//#define IXP425_USB_BASE_VIRT ++ ++/* Miscellaneous stuff. */ ++#define IRQ_IXP425_XSCALE_PMU IRQ_IXP4XX_XSCALE_PMU ++#define IXP425_ICMR IXP4XX_ICMR ++#define IRQ_IXP425_USB IRQ_IXP4XX_USB ++#endif diff --git a/packages/ixp4xx/ixp-osal-2.1/le.patch b/packages/ixp4xx/ixp-osal-2.1/le.patch new file mode 100644 index 0000000000..3fc5ddf624 --- /dev/null +++ b/packages/ixp4xx/ixp-osal-2.1/le.patch @@ -0,0 +1,64 @@ +--- ixp_osal/include/modules/ioMem/IxOsalIoMem.h 2005-04-17 20:56:25.000000000 -0700 ++++ ixp_osal/include/modules/ioMem/IxOsalIoMem.h 2005-10-07 16:20:27.786083595 -0700 +@@ -105,8 +105,8 @@ + #endif /* ndef __wince */ + + #define IX_OSAL_SWAP_SHORT(sData) ((sData >> 8) | ((sData & 0xFF) << 8)) +-#define IX_OSAL_SWAP_SHORT_ADDRESS(sAddr) ((sAddr) ^ 0x2) +-#define IX_OSAL_SWAP_BYTE_ADDRESS(bAddr) ((bAddr) ^ 0x3) ++#define IX_OSAL_SWAP_SHORT_ADDRESS(sAddr) ((UINT16*)((UINT32)(sAddr) ^ 0x2)) ++#define IX_OSAL_SWAP_BYTE_ADDRESS(bAddr) ((UINT8*)((UINT32)(bAddr) ^ 0x3)) + + #define IX_OSAL_BE_XSTOBUSL(wData) (wData) + #define IX_OSAL_BE_XSTOBUSS(sData) (sData) +--- ixp_osal/include/modules/ioMem/IxOsalMemAccess.h 2005-04-17 20:56:25.000000000 -0700 ++++ ixp_osal/include/modules/ioMem/IxOsalMemAccess.h 2005-11-19 16:44:33.414684841 -0800 +@@ -84,7 +84,7 @@ + + #elif defined (IX_OSAL_LINUX_LE) + +-#define IX_SDRAM_LE_DATA_COHERENT ++#define IX_SDRAM_LE_ADDRESS_COHERENT + + #elif defined (IX_OSAL_WINCE_LE) + +--- ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h 2005-04-17 20:56:27.000000000 -0700 ++++ ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h 2005-11-19 16:45:35.298578949 -0800 +@@ -171,7 +171,7 @@ + ***************************/ + #if (IX_COMPONENT_NAME == ix_qmgr) + +-#define IX_OSAL_LE_DC_MAPPING ++#define IX_OSAL_LE_AC_MAPPING + + #endif /* qmgr */ + +--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-11-19 15:53:11.808771607 -0800 ++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-11-19 16:51:40.729574072 -0800 +@@ -101,6 +101,6 @@ IxOsalMemoryMap ixOsalGlobalMemoryMap[] + ixOsalLinuxMemUnmap, /* unmapFunction */ + 0, /* refCount */ +- IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */ ++ IX_OSAL_BE | IX_OSAL_LE_AC, /* endianType */ + "qMgr" /* name */ + }, + +--- ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c 2005-09-24 20:57:03.000000000 -0700 ++++ ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c 2005-11-20 15:21:33.670138502 -0800 +@@ -45,6 +45,7 @@ + * -- End Intel Copyright Notice -- + */ + ++#include <asm/page.h> + #include <asm/io.h> + #include <linux/ioport.h> + +@@ -54,6 +54,8 @@ + PUBLIC void + ixOsalLinuxMemMap (IxOsalMemoryMap * map) + { ++ /* Linux requires LE mappings to use address coherency */ ++ IX_OSAL_ENSURE((map->mapEndianType & IX_OSAL_LE_DC) == 0, "LE Data Coherency not supported"); + map->virtualAddress = (UINT32) ioremap (map->physicalAddress, map->size); + } + diff --git a/packages/ixp4xx/ixp-osal_1.5.bb b/packages/ixp4xx/ixp-osal_1.5.bb index 8de9983dda..c0e0cb930c 100644 --- a/packages/ixp4xx/ixp-osal_1.5.bb +++ b/packages/ixp4xx/ixp-osal_1.5.bb @@ -21,7 +21,7 @@ LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425 SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/ixp400AccessLibrary-1_5.zip" SRC_URI += "file://2.6.patch;patch=1" S = "${WORKDIR}/ixp_osal" -PR = "r0" +PR = "r1" COMPATIBLE_HOST = "^armeb-linux.*" diff --git a/packages/ixp4xx/ixp-osal_2.0.bb b/packages/ixp4xx/ixp-osal_2.0.bb index be72d9215b..c5ddf66bef 100644 --- a/packages/ixp4xx/ixp-osal_2.0.bb +++ b/packages/ixp4xx/ixp-osal_2.0.bb @@ -17,13 +17,17 @@ LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425 # not required.) # # Store the file with the name given below in your downloads directory +# and store the 32 character md5sum of the file in a file of the same +# name with the additional extension .md5: +# +# IPL_ixp400AccessLibrary-2_0.zip.md5 # SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_0.zip" SRC_URI += "file://Makefile.patch;patch=1" SRC_URI += "file://2.6.patch;patch=1" SRC_URI += "file://le.patch;patch=1" S = "${WORKDIR}/ixp_osal" -PR = "r2" +PR = "r4" COMPATIBLE_HOST = "^arm.*-linux.*" diff --git a/packages/ixp4xx/ixp-osal_2.1.bb b/packages/ixp4xx/ixp-osal_2.1.bb new file mode 100644 index 0000000000..7b5ec197ba --- /dev/null +++ b/packages/ixp4xx/ixp-osal_2.1.bb @@ -0,0 +1,95 @@ +# Intel ixp4xx access library software. Note that this has an Intel +# license which restricts its use. +MAINTAINER = "NSLU2 Linux <nslu2-linux@yahoogroups.com>" +HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp420.htm" +LICENSE = "http://www.intel.com/design/network/swsup/np_sla/ixp400.htm" +LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm" +# You must download the following software to your OpenEmbedded downloads +# directory before using this package: +# +# IPL_ixp400AccessLibrary-2_1.zip +# +# To do this go to the LICENSE_HOMEPAGE above, register/login (using a +# web browser which is supported by the login page), this will give you +# access to the web page from which you can download the software - you +# need the: "IntelĀ® IXP400 Software and RedBoot* Boot Loader" and, from +# this the "Intel Hardware Access Software" (versions 2.1 encryption is +# not required.) +# +# Store the file with the name given below in your downloads directory +# and store the 32 character md5sum of the file in a file of the same +# name with the additional extension .md5: +# +# IPL_ixp400AccessLibrary-2_1.zip.md5 +# +SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_1.zip" +SRC_URI += "file://Makefile.patch;patch=1" +SRC_URI += "file://2.6.patch;patch=1" +SRC_URI += "file://invalidate-cache.patch;patch=1" +SRC_URI += "file://ixp4xx-header.patch;patch=1" +SRC_URI += "file://le.patch;patch=1" +SRC_URI += "file://assert.patch;patch=1" + +S = "${WORKDIR}/ixp_osal" +PR = "r0" + +COMPATIBLE_HOST = "^arm.*-linux.*" + +inherit module + +# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as +# required. Notice that this has to be done for each separately built +# module as well! +KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}" +KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}" + +IX_TARGET = "linux${ARCH_BYTE_SEX}" +IX_ENSURE = "" +#IX_ENSURE = "IX_OSAL_ENSURE_ON=1" + +EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \ + 'LD=${KERNEL_LD}' \ + 'AR=${AR}' \ + 'IX_XSCALE_SW=${S}' \ + 'IX_TARGET=${IX_TARGET}' \ + 'IX_DEVICE=ixp42X' \ + ${IX_ENSURE} \ + 'LINUX_SRC=${STAGING_KERNEL_DIR}' \ + 'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \ + " + +OSAL_PATH = "lib/ixp425/linux/${IX_TARGET}" +# This is a somewhat arbitrary choice: +OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal" + +do_compile () { + oe_runmake ${OSAL_PATH}/libosal.a ${OSAL_PATH}/ixp_osal.o +} + +do_stage () { + # Clean the directory first, this ensures incremental builds have + # a slightly better chance of working + rm -rf ${OSAL_DIR} + install -d ${OSAL_DIR} + + # First the include files, maintain the tree structure (ixp4xx-csr + # expects the exact same tree) + cp -rf --dereference include ${OSAL_DIR} + install -d ${OSAL_DIR}/os/linux + cp -rf --dereference os/linux/include ${OSAL_DIR}/os/linux + + # Install the library/object + install -d ${OSAL_DIR}/${OSAL_PATH} + rm -f ${OSAL_DIR}/libosal + install -m 0644 ${OSAL_PATH}/libosal.a ${OSAL_DIR}/${OSAL_PATH} + touch ${OSAL_DIR}/libosal + rm -f ${OSAL_DIR}/module + install -m 0644 ${OSAL_PATH}/ixp_osal.o ${OSAL_DIR}/${OSAL_PATH} + touch ${OSAL_DIR}/module +} + +# This stuff doesn't install anything... +PACKAGES = "" + +do_install () { +} diff --git a/packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch b/packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch index 585320c7ec..c5a907e1f1 100644 --- a/packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch +++ b/packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch @@ -1,26 +1,6 @@ diff -Naur ixp400_xscale_sw.orig/Makefile ixp400_xscale_sw/Makefile --- ixp400_xscale_sw/.pc/Makefile.patch/Makefile 2005-04-17 20:54:58.000000000 -0700 +++ ixp400_xscale_sw/Makefile 2005-10-01 18:15:08.422924549 -0700 -@@ -104,8 +104,8 @@ - vxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc dmaAcc - vxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc - vxsim_COMPONENTS := $(BI_ENDIAN_COMPONENTS) dmaAcc --linuxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc dmaAcc oslinux --linuxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc oslinux -+linuxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) dmaAcc oslinux -+linuxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) oslinux - - #The lists below contain the set of components available for each target platform - # specific to the ixp46X device -@@ -132,7 +132,7 @@ - # Codelet components - # Codeletes listed in BI_ENDIAN_CODELETS_COMPONENTS must work for both - # big and little endian OSs. --BI_ENDIAN_CODELETS_COMPONENTS := hssAcc ethAcc perfProfAcc atm -+BI_ENDIAN_CODELETS_COMPONENTS := hssAcc ethAcc atm - - #Codelet components only applicable to ixp46x - ixp46X_BI_ENDIAN_CODELETS_COMPONENTS := timeSyncAcc parityENAcc @@ -312,9 +312,9 @@ else # linux compiler flags diff --git a/packages/ixp4xx/ixp4xx-csr-2.0/le.patch b/packages/ixp4xx/ixp4xx-csr-2.0/le.patch index f1f0e09ff8..e32b795755 100644 --- a/packages/ixp4xx/ixp4xx-csr-2.0/le.patch +++ b/packages/ixp4xx/ixp4xx-csr-2.0/le.patch @@ -1,696 +1,24 @@ -diff -bBdurN hannes/ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h merged/ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h ---- ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h 2005-10-07 09:28:48.147833350 -0700 -+++ ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h 2005-10-07 15:08:42.343159153 -0700 -@@ -113,7 +113,11 @@ - * @return IX_FAIL - Error initialising codelet +--- ixp400_xscale_sw/.pc/le.patch/src/include/IxQMgr.h 2005-04-17 20:55:31.000000000 -0700 ++++ ixp400_xscale_sw/src/include/IxQMgr.h 2005-11-19 16:01:52.817556623 -0800 +@@ -87,7 +87,9 @@ + /* + * Define QMgr's IoMem macros, in DC mode if in LE + * regular if in BE. (Note: For Linux LSP gold release +- * may need to adjust mode. ++ * may need to adjust mode. For standard Linux kernels ++ * data coherent access is not used, therefore address ++ * coherency must be set. */ - IX_STATUS -+#ifndef __ARMEB__ -+ixDmaAccCodeletInit(IxDmaNpeId npeId); -+#else /* __ARMEB__ */ - ixDmaAccCodeletInit(IxNpeDlNpeId npeId); -+#endif /* __ARMEB__ */ + #if defined (__BIG_ENDIAN) - /** - * @fn ixDmaAccCodeletTestPerform( UINT16 transferLength, -diff -bBdurN hannes/ixp400_xscale_sw/src/ethAcc/IxEthAccDataPlane.c merged/ixp400_xscale_sw/src/ethAcc/IxEthAccDataPlane.c ---- ixp400_xscale_sw/src/ethAcc/IxEthAccDataPlane.c 2005-04-17 20:55:12.000000000 -0700 -+++ ixp400_xscale_sw/src/ethAcc/IxEthAccDataPlane.c 2005-10-07 15:08:42.511169725 -0700 -@@ -59,6 +59,16 @@ - #include "IxEthAcc_p.h" - #include "IxEthAccQueueAssign_p.h" - -+#ifndef __ARMEB__ -+#ifdef DEBUG_ACDC -+#define TRACE printk("%s: %s(): line %d\n", "IxEth", __FUNCTION__, __LINE__) -+#define PRINTK(args...) printk(args) -+#else -+#define TRACE while (0) {} -+#define PRINTK(args...) while (0) {} -+#endif -+ -+#endif /* ! __ARMEB__ */ - extern PUBLIC IxEthAccMacState ixEthAccMacState[]; - extern PUBLIC UINT32 ixEthAccNewSrcMask; - -@@ -252,7 +262,13 @@ - - if (qEntry != 0) - { -+#ifndef __ARMEB__ -+ PRINTK("qEntry = %p %d ",qEntry, mask); -+#endif /* ! __ARMEB__ */ - /* mask NPE bits (e.g. priority, port ...) */ -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - qEntry &= mask; - - #if IX_ACC_DRAM_PHYS_OFFSET != 0 -@@ -270,6 +286,14 @@ - - /* preload the cacheline used by xscale */ - IX_ACC_DATA_CACHE_PRELOAD(mbufPtr); -+#ifndef __ARMEB__ -+ PRINTK("%p\n", mbufPtr ); -+ -+#if 0 -+ {int junk = *(int*)mbufPtr; -+ printk("j=%d\n", junk);} -+#endif -+#endif /* ! __ARMEB__ */ - } - else - { -@@ -506,15 +530,30 @@ - ixEthAccMbufFromRxQ(IX_OSAL_MBUF *mbuf) - { - UINT32 len; -+#ifndef __ARMEB__ -+ TRACE; -+ PRINTK("mbuf=%p\n", mbuf); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* endianess swap for tci and flags - note: this is done only once, even for chained buffers */ - IX_ETHACC_NE_FLAGS(mbuf) = IX_OSAL_SWAP_BE_SHARED_SHORT(IX_ETHACC_NE_FLAGS(mbuf)); -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - IX_ETHACC_NE_VLANTCI(mbuf) = IX_OSAL_SWAP_BE_SHARED_SHORT(IX_ETHACC_NE_VLANTCI(mbuf)); -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* test for unchained mbufs */ - if (IX_ETHACC_NE_NEXT(mbuf) == 0) - { -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - /* unchained mbufs */ - IX_ETH_ACC_STATS_INC(ixEthAccDataStats.unchainedRxMBufs); - -@@ -531,11 +570,19 @@ - IX_OSAL_MBUF *ptr = mbuf; - IX_OSAL_MBUF *nextPtr; - UINT32 frmLen; -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* convert the frame length */ - frmLen = IX_OSAL_SWAP_BE_SHARED_LONG(IX_ETHACC_NE_LEN(mbuf)); - IX_OSAL_MBUF_PKT_LEN(mbuf) = (frmLen & IX_ETHNPE_ACC_PKTLENGTH_MASK); -+#ifndef __ARMEB__ -+ PRINTK("frm len %d\n", frmLen); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* chained mbufs */ - do - { -@@ -547,6 +594,9 @@ - - /* get the next pointer */ - PTR_NPE2VIRT(IX_OSAL_MBUF *,IX_ETHACC_NE_NEXT(ptr), nextPtr); -+#ifndef __ARMEB__ -+ PRINTK("nextptr %p\n", nextPtr); -+#endif /* ! __ARMEB__ */ - if (nextPtr != NULL) - { - nextPtr = (IX_OSAL_MBUF *)((UINT8 *)nextPtr - offsetof(IX_OSAL_MBUF,ix_ne)); -@@ -558,6 +608,9 @@ - ptr = nextPtr; - } - while (ptr != NULL); -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - } - } - -@@ -1449,7 +1502,11 @@ - { - UINT32 flags; - IxEthDBStatus result; -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - #ifndef NDEBUG - /* Prudent to at least check the port is within range */ - if (portId >= IX_ETH_ACC_NUMBER_OF_PORTS) -@@ -1461,18 +1518,33 @@ - return FALSE; - } - #endif -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* convert fields from mbuf header */ - ixEthAccMbufFromRxQ(mbufPtr); -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* check about any special processing for this frame */ - flags = IX_ETHACC_NE_FLAGS(mbufPtr); - if ((flags & (IX_ETHACC_NE_FILTERMASK | IX_ETHACC_NE_NEWSRCMASK)) == 0) - { -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - /* "best case" scenario : nothing special to do for this frame */ - return TRUE; - } -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* if a new source MAC address is detected by the NPE, - * update IxEthDB with the portId and the MAC address. - */ -@@ -1501,7 +1573,11 @@ - RX_STATS_INC(portId, rxUnlearnedMacAddress); - } - } -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* check if this frame should have been filtered - * by the NPE and take the appropriate action - */ -@@ -1542,7 +1618,11 @@ - /* indicate that frame should not be subjected to further processing */ - return FALSE; - } -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - return TRUE; - } - -@@ -1588,6 +1668,9 @@ - */ - IX_ETH_ACC_STATS_INC(ixEthAccDataStats.rxCallbackCounter); - -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - do - { - /* -@@ -1602,7 +1685,12 @@ - rxQReadStatus = ixQMgrQBurstRead(qId, - IX_ETH_ACC_MAX_RX_FRAME_CONSUME_PER_CALLBACK, - qEntryPtr); -+#ifndef __ARMEB__ -+ // TRACE; -+ PRINTK("rxQReadStatus = %d\n", rxQReadStatus); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - #ifndef NDEBUG - if ((rxQReadStatus != IX_QMGR_Q_UNDERFLOW) - && (rxQReadStatus != IX_SUCCESS)) -@@ -1623,9 +1711,16 @@ - nextQEntry = *qEntryPtr; - nextMbufPtr = ixEthAccEntryFromQConvert(nextQEntry, - IX_ETHNPE_QM_Q_RXENET_ADDR_MASK); -+#ifndef __ARMEB__ -+ // TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - while(nextQEntry != 0) - { -+#ifndef __ARMEB__ -+ int res; -+#endif /* ! __ARMEB__ */ - /* get the next entry */ - qEntry = nextQEntry; - mbufPtr = nextMbufPtr; -@@ -1648,7 +1743,11 @@ - nextQEntry = *(++qEntryPtr); - nextMbufPtr = ixEthAccEntryFromQConvert(nextQEntry, - IX_ETHNPE_QM_Q_RXENET_ADDR_MASK); -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* - * Get Port and Npe ID from message. - */ -@@ -1659,7 +1758,12 @@ - /* process frame, check the return code and skip the remaining of - * the loop if the frame is to be filtered out - */ -+#ifndef __ARMEB__ -+ res = ixEthRxFrameProcess(portId, mbufPtr); -+ if (res) -+#else /* __ARMEB__ */ - if (ixEthRxFrameProcess(portId, mbufPtr)) -+#endif /* __ARMEB__ */ - { - /* destination portId for this packet */ - destPortId = IX_ETHACC_NE_DESTPORTID(mbufPtr); -@@ -1682,7 +1786,11 @@ - callbackId); - } - } -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* - * increment priority stats - */ -@@ -1696,6 +1804,9 @@ - /* - * Call user level callback. - */ -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - ixEthAccPortData[portId].ixEthAccRxData.rxCallbackFn( - ixEthAccPortData[portId].ixEthAccRxData.rxCallbackTag, - mbufPtr, -@@ -1703,6 +1814,9 @@ - } - } - } while (rxQReadStatus == IX_SUCCESS); -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - } - - /** -@@ -2092,10 +2206,19 @@ - - do{ - qEntryPtr = txDoneQEntry; -+#ifndef __ARMEB__ -+ // TRACE; -+#endif /* ! __ARMEB__ */ - txDoneQReadStatus = ixQMgrQBurstRead(IX_ETH_ACC_TX_FRAME_DONE_ETH_Q, - IX_ETH_ACC_MAX_TX_FRAME_DONE_CONSUME_PER_CALLBACK, - qEntryPtr); -+#ifndef __ARMEB__ -+ if (txDoneQReadStatus == 0 && qEntryPtr[0] == 0) -+ return; -+ PRINTK("txDoneQReadStatus %d\n", txDoneQReadStatus); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - #ifndef NDEBUG - if (txDoneQReadStatus != IX_QMGR_Q_UNDERFLOW - && (txDoneQReadStatus != IX_SUCCESS)) -@@ -2113,6 +2236,9 @@ - - while(qEntry != 0) - { -+#ifndef __ARMEB__ -+ TRACE; -+#endif /* ! __ARMEB__ */ - mbufPtr = ixEthAccEntryFromQConvert(qEntry, - IX_ETHNPE_QM_Q_TXENET_ADDR_MASK); - -@@ -2126,7 +2252,11 @@ - return; - } - #endif -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* endianness conversions and stats updates */ - ixEthAccMbufFromTxQ(mbufPtr); - -@@ -2151,14 +2281,22 @@ - #endif - - TX_STATS_INC(portId,txDoneClientCallback); -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* - * Call user level callback. - */ - ixEthAccPortData[portId].ixEthAccTxData.txBufferDoneCallbackFn( - ixEthAccPortData[portId].ixEthAccTxData.txCallbackTag, - mbufPtr); -+#ifndef __ARMEB__ -+ TRACE; -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* move to next queue entry */ - qEntry = *(++qEntryPtr); - -diff -bBdurN hannes/ixp400_xscale_sw/src/ethAcc/IxEthAccMii.c merged/ixp400_xscale_sw/src/ethAcc/IxEthAccMii.c ---- ixp400_xscale_sw/src/ethAcc/IxEthAccMii.c 2005-04-17 20:55:13.000000000 -0700 -+++ ixp400_xscale_sw/src/ethAcc/IxEthAccMii.c 2005-10-07 15:08:42.515169976 -0700 -@@ -94,6 +94,12 @@ - (mdioCommand >> 24) & 0xff); - } - -+#ifndef __ARMEB__ -+#if defined(IX_OSAL_LINUX_LE) -+//#error it is defined -+#endif -+ -+#endif /* ! __ARMEB__ */ - PRIVATE void - ixEthAccMdioCmdRead(UINT32 *data) - { -@@ -241,6 +246,9 @@ - - while(miiTimeout) - { -+#ifndef __ARMEB__ -+ ixOsalSleep(ixEthAccMiiAccessTimeout); -+#endif /* ! __ARMEB__ */ - - ixEthAccMdioCmdRead(®val); - -@@ -249,7 +257,9 @@ - break; - } - /* Sleep for a while */ -+#ifdef __ARMEB__ - ixOsalSleep(ixEthAccMiiAccessTimeout); -+#endif /* __ARMEB__ */ - miiTimeout--; - } - -@@ -321,6 +331,9 @@ - - while(miiTimeout) - { -+#ifndef __ARMEB__ -+ ixOsalSleep(ixEthAccMiiAccessTimeout); -+#endif /* ! __ARMEB__ */ - - ixEthAccMdioCmdRead(®val); - -@@ -330,7 +343,9 @@ - break; - } - /* Sleep for a while */ -+#ifdef __ARMEB__ - ixOsalSleep(ixEthAccMiiAccessTimeout); -+#endif /* __ARMEB__ */ - miiTimeout--; - } - -diff -bBdurN hannes/ixp400_xscale_sw/src/ethAcc/include/IxEthAccMac_p.h merged/ixp400_xscale_sw/src/ethAcc/include/IxEthAccMac_p.h ---- ixp400_xscale_sw/src/ethAcc/include/IxEthAccMac_p.h 2005-04-17 20:56:03.000000000 -0700 -+++ ixp400_xscale_sw/src/ethAcc/include/IxEthAccMac_p.h 2005-10-07 15:08:42.467166956 -0700 -@@ -46,7 +46,11 @@ - #define IxEthAccMac_p_H - - #include "IxOsal.h" -+#ifndef __ARMEB__ -+#define BIT(x) (1 << (x)) -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - #define IX_ETH_ACC_MAX_MULTICAST_ADDRESSES 256 - #define IX_ETH_ACC_NUM_PORTS 3 - #define IX_ETH_ACC_MAX_FRAME_SIZE_DEFAULT 1536 -diff -bBdurN hannes/ixp400_xscale_sw/src/ethMii/IxEthMii.c merged/ixp400_xscale_sw/src/ethMii/IxEthMii.c ---- ixp400_xscale_sw/src/ethMii/IxEthMii.c 2005-04-17 20:55:18.000000000 -0700 -+++ ixp400_xscale_sw/src/ethMii/IxEthMii.c 2005-10-07 15:08:42.575173752 -0700 -@@ -110,6 +110,14 @@ - /*Need to read the register twice here to flush PHY*/ - ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID1_REG, ®valId1); - ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID1_REG, ®valId1); -+#ifndef __ARMEB__ -+ ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID1_REG, ®valId1); -+ ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID1_REG, ®valId1); -+ ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID1_REG, ®valId1); -+ ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID2_REG, ®valId2); -+ ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID2_REG, ®valId2); -+ ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID2_REG, ®valId2); -+#endif /* ! __ARMEB__ */ - ixEthAccMiiReadRtn(i, IX_ETH_MII_PHY_ID2_REG, ®valId2); - ixEthMiiPhyId[i] = (regvalId1 << IX_ETH_MII_REG_SHL) | regvalId2; - if ((ixEthMiiPhyId[i] == IX_ETH_MII_KS8995_PHY_ID) -diff -bBdurN hannes/ixp400_xscale_sw/src/ethMii/IxEthMii_p.h merged/ixp400_xscale_sw/src/ethMii/IxEthMii_p.h ---- ixp400_xscale_sw/src/ethMii/IxEthMii_p.h 2005-04-17 20:55:18.000000000 -0700 -+++ ixp400_xscale_sw/src/ethMii/IxEthMii_p.h 2005-10-07 15:08:42.579174004 -0700 -@@ -52,7 +52,11 @@ - - #ifndef IxEthMii_p_H - #define IxEthMii_p_H -+#ifndef __ARMEB__ -+#define BIT(x) (1 << (x)) -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - - /* MII definitions - these have been verified against the LXT971 and - LXT972 PHYs*/ -diff -bBdurN hannes/ixp400_xscale_sw/src/include/IxQMgr.h merged/ixp400_xscale_sw/src/include/IxQMgr.h ---- ixp400_xscale_sw/src/include/IxQMgr.h 2005-04-17 20:55:31.000000000 -0700 -+++ ixp400_xscale_sw/src/include/IxQMgr.h 2005-10-07 15:08:42.723183066 -0700 -@@ -96,8 +96,13 @@ +@@ -96,8 +98,8 @@ #else -+#ifndef __ARMEB__ +-#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_DC +-#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_DC +#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_AC +#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_AC -+#else /* __ARMEB__ */ - #define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_DC - #define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_DC -+#endif /* __ARMEB__ */ #endif -@@ -1340,7 +1345,11 @@ - { - /* get the queue status */ - UINT32 status = IX_QMGR_INLINE_READ_LONG(infoPtr->qUOStatRegAddr); -+#ifndef __ARMEB__ -+ PRINTK("Qstatus %d\n", status); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - if (status & infoPtr->qUflowStatBitMask) - { - /* clear the underflow status bit if it was set */ -diff -bBdurN hannes/ixp400_xscale_sw/src/include/IxTypes.h merged/ixp400_xscale_sw/src/include/IxTypes.h ---- ixp400_xscale_sw/src/include/IxTypes.h 2005-10-07 09:28:48.151833601 -0700 -+++ ixp400_xscale_sw/src/include/IxTypes.h 2005-10-07 15:08:42.735183821 -0700 -@@ -79,10 +79,12 @@ - #endif - #endif - -+#ifdef __ARMEB__ - #ifndef BIT - #define BIT(x) ((1)<<(x)) - #endif - -+#endif /* __ARMEB__ */ - #include "IxOsalBackward.h" - - #endif /* IxTypes_H */ -diff -bBdurN hannes/ixp400_xscale_sw/src/osServices/IxOsServices.c merged/ixp400_xscale_sw/src/osServices/IxOsServices.c ---- ixp400_xscale_sw/src/osServices/IxOsServices.c 2005-04-17 20:55:38.000000000 -0700 -+++ ixp400_xscale_sw/src/osServices/IxOsServices.c 2005-10-07 15:08:42.827189611 -0700 -@@ -172,3 +172,61 @@ - ixOsalYield (); - } - -+#ifndef __ARMEB__ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) -+ -+/* -+ * 2.6 kernels do not export the required cache management routines so -+ * reimplement them here. -+ */ -+ -+#define _IX_STR(x) #x -+#define IX_STR(x) _IX_STR(x) -+#define IX_CLM IX_STR(IX_XSCALE_CACHE_LINE_SIZE-1) -+ -+/* -+ * IX_ACC_DATA_CACHE_INVALIDATE(addr, size) -+ */ -+void -+ix_dcache_invalidate_range(unsigned long start, unsigned long size) -+{ -+ __asm__ -+ (" tst %0, #" IX_CLM "\n" -+ " mcrne p15, 0, %0, c7, c10, 1 @ clean D cache line\n" -+ " bic %0, %0, #" IX_CLM "\n" -+ " tst %1, #" IX_CLM "\n" -+ " mcrne p15, 0, %1, c7, c10, 1 @ clean D cache line\n" -+ "1: mcr p15, 0, %0, c7, c6, 1 @ invalidate D cache line\n" -+ " add %0, %0, #" IX_STR(IX_XSCALE_CACHE_LINE_SIZE) "\n" -+ " cmp %0, %1\n" -+ " blo 1b\n" -+ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n" -+ : /* no output */ -+ : "r"(start), "r"(size) -+ : "cc"); -+} -+ -+/* -+ * IX_ACC_DATA_CACHE_FLUSH(addr, size) -+ */ -+void -+ix_dcache_flush_range(unsigned long start, unsigned long size) -+{ -+ __asm__ -+ (" bic %0, %0, #" IX_CLM "\n" -+ "1: mcr p15, 0, %0, c7, c10, 1 @ clean D cache line\n" -+ " add %0, %0, #" IX_STR(IX_XSCALE_CACHE_LINE_SIZE) "\n" -+ " cmp %0, %1\n" -+ " blo 1b\n" -+ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n" -+ : /* no output */ -+ : "r"(start), "r"(size) -+ : "cc"); -+} -+ -+#undef _IX_STR -+#undef IX_STR -+#undef IX_CLM -+ -+#endif -+#endif /* ! __ARMEB__ */ -diff -bBdurN hannes/ixp400_xscale_sw/src/osServices/IxOsServicesSymbols.c merged/ixp400_xscale_sw/src/osServices/IxOsServicesSymbols.c ---- ixp400_xscale_sw/src/osServices/IxOsServicesSymbols.c 2005-04-17 20:55:39.000000000 -0700 -+++ ixp400_xscale_sw/src/osServices/IxOsServicesSymbols.c 2005-10-07 15:08:42.827189611 -0700 -@@ -74,6 +74,11 @@ - EXPORT_SYMBOL (ixOsServYield); - EXPORT_SYMBOL (ixOsalOsIxp400BackwardPoolInit); - EXPORT_SYMBOL (ixOsalOsIxp400BackwardMbufPoolGet); -+#ifndef __ARMEB__ -+EXPORT_SYMBOL(ix_dcache_invalidate_range); -+EXPORT_SYMBOL(ix_dcache_flush_range); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - #endif /* __linux */ - -diff -bBdurN hannes/ixp400_xscale_sw/src/oslinux/IxLinuxInit.c merged/ixp400_xscale_sw/src/oslinux/IxLinuxInit.c ---- ixp400_xscale_sw/src/oslinux/IxLinuxInit.c 2005-10-07 14:55:03.931659764 -0700 -+++ ixp400_xscale_sw/src/oslinux/IxLinuxInit.c 2005-10-07 15:08:42.831189862 -0700 -@@ -99,6 +99,9 @@ - /* Init and cleanup functions for module */ - static int __init ixp400_sw_init_module(void) - { -+#ifndef __ARMEB__ -+ ixOsalLogLevelSet(IX_OSAL_LOG_LVL_ALL); -+#endif /* ! __ARMEB__ */ - /* Add initialization code here */ - #ifdef DEBUG - printk("\n\n"__FUNCTION__": addr=%p\n\n", ixp400_sw_init_module); -diff -bBdurN hannes/ixp400_xscale_sw/src/qmgr/IxQMgrInit.c merged/ixp400_xscale_sw/src/qmgr/IxQMgrInit.c ---- ixp400_xscale_sw/src/qmgr/IxQMgrInit.c 2005-04-17 20:55:44.000000000 -0700 -+++ ixp400_xscale_sw/src/qmgr/IxQMgrInit.c 2005-10-07 15:08:42.923195652 -0700 -@@ -84,13 +84,25 @@ - - /* Initialise the QCfg component */ - ixQMgrQCfgInit (); -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* Initialise the Dispatcher component */ - ixQMgrDispatcherInit (); -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* Initialise the Access component */ - ixQMgrQAccessInit (); -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* Initialization complete */ - qMgrIsInitialized = TRUE; - -diff -bBdurN hannes/ixp400_xscale_sw/src/qmgr/IxQMgrQCfg.c merged/ixp400_xscale_sw/src/qmgr/IxQMgrQCfg.c ---- ixp400_xscale_sw/src/qmgr/IxQMgrQCfg.c 2005-04-17 20:55:45.000000000 -0700 -+++ ixp400_xscale_sw/src/qmgr/IxQMgrQCfg.c 2005-10-07 15:08:42.931196155 -0700 -@@ -150,7 +150,11 @@ - ixQMgrQCfgInit (void) - { - int loopIndex; -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - for (loopIndex=0; loopIndex < IX_QMGR_MAX_NUM_QUEUES;loopIndex++) - { - /* info for code inlining */ -@@ -167,10 +171,18 @@ - ixQMgrQInlinedReadWriteInfo[loopIndex].qSizeInEntries = 0; - ixQMgrQInlinedReadWriteInfo[loopIndex].qConfigRegAddr = zeroedPlaceHolder; - } -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* Initialise the AqmIf component */ - ixQMgrAqmIfInit (); -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - /* Reset all queues to have queue name = NULL, entry size = 0 and - * isConfigured = false - */ -@@ -188,11 +200,23 @@ - - /* Statistics */ - stats.wmSetCnt = 0; -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - ixQMgrAqmIfSramBaseAddressGet (&freeSramAddress); -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - ixOsalMutexInit(&ixQMgrQCfgMutex); -+#ifndef __ARMEB__ -+ TRACE(); -+#else /* __ARMEB__ */ - -+#endif /* __ARMEB__ */ - cfgInitialized = TRUE; - } - diff --git a/packages/ixp4xx/ixp4xx-csr-2.1/.mtn2git_empty b/packages/ixp4xx/ixp4xx-csr-2.1/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/ixp4xx/ixp4xx-csr-2.1/.mtn2git_empty diff --git a/packages/ixp4xx/ixp4xx-csr-2.1/Makefile.patch b/packages/ixp4xx/ixp4xx-csr-2.1/Makefile.patch new file mode 100644 index 0000000000..b90a3d7da4 --- /dev/null +++ b/packages/ixp4xx/ixp4xx-csr-2.1/Makefile.patch @@ -0,0 +1,59 @@ +--- ixp400_xscale_sw/Makefile 2005-11-20 08:43:17.610454268 -0800 ++++ ixp400_xscale_sw/Makefile 2005-11-20 08:44:37.387474319 -0800 +@@ -297,9 +297,9 @@ endif + else # IX_TARGET_OS == vxworks + # linux compiler flags + MAKE_DEP_FLAG := -M +-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale ++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale + +-CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS) ++CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS) + ifndef IX_INCLUDE_MICROCODE + CFLAGS += -DIX_NPEDL_READ_MICROCODE_FROM_FILE + endif +@@ -867,9 +867,11 @@ $(NPE_DAT) : $(NPE_CONVERTER) + + ifeq ($(IX_HOST_OS),linux) + ifndef IX_INCLUDE_MICROCODE ++ifdef IX_BUILD_MICROCODE + Makefile: $(NPE_CONVERTER) $(NPE_DAT) + endif + endif ++endif + + ################################################################ + # Rules to check that macros are defined. +@@ -1321,10 +1323,18 @@ ixp400.o : $(OBJ_DIR)/ixp400.o + + ifndef IX_INCLUDE_MICROCODE + $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(OSAL_MODULE) ++ touch $(OBJ_DIR)/ixp400.c ++ cp Makefile.kmod26 $(OBJ_DIR)/Makefile ++ make -C $(OBJ_DIR) + $(LD) $(LDFLAGS) $^ -o $@ ++ make -C $(OBJ_DIR) + else + $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(NPE_PRODUCTION_HEADER_OBJ) $(OSAL_MODULE) ++ touch $(OBJ_DIR)/ixp400.c ++ cp Makefile.kmod26 $(OBJ_DIR)/Makefile ++ make -C $(OBJ_DIR) + $(LD) $(LDFLAGS) $^ -o $@ ++ make -C $(OBJ_DIR) + endif + + +--- ixp400_xscale_sw/Makefile.kmod26 1970-01-01 01:00:00.000000000 +0100 ++++ ixp400_xscale_sw/Makefile.kmod26 2005-08-24 22:33:12.000000000 +0200 +@@ -0,0 +1,11 @@ ++obj-m := ixp400.o ++ ++PWD := $(shell pwd) ++ ++LINUX_SRC := $($(IX_TARGET)_KERNEL_DIR) ++ ++default: ++ $(MAKE) ARCH=arm CROSS_COMPILE=$(LINUX_CROSS_COMPILE) $(KERNEL_VERBOSE) -C $(LINUX_SRC) SUBDIRS=$(PWD) modules ++ ++clean: ++ rm -f ixp400.ko diff --git a/packages/ixp4xx/ixp4xx-csr-2.1/bit-macro.patch b/packages/ixp4xx/ixp4xx-csr-2.1/bit-macro.patch new file mode 100644 index 0000000000..5cdb395f28 --- /dev/null +++ b/packages/ixp4xx/ixp4xx-csr-2.1/bit-macro.patch @@ -0,0 +1,14 @@ +--- ixp400_xscale_sw/src/include/IxTypes.h 2005-08-24 00:16:36.000000000 +0200 ++++ ixp400_xscale_sw/src/include/IxTypes.h 2005-08-26 01:19:15.000000000 +0200 +@@ -79,6 +79,10 @@ + #endif + #endif + ++#ifndef BIT ++#define BIT(x) ((1)<<(x)) ++#endif ++ + #include "IxOsalBackward.h" + + #endif /* IxTypes_H */ + diff --git a/packages/ixp4xx/ixp4xx-csr-2.1/ixethdb-header.patch b/packages/ixp4xx/ixp4xx-csr-2.1/ixethdb-header.patch new file mode 100644 index 0000000000..e426afe914 --- /dev/null +++ b/packages/ixp4xx/ixp4xx-csr-2.1/ixethdb-header.patch @@ -0,0 +1,11 @@ +--- ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h.orig 2005-11-20 08:51:54.710993353 -0800 ++++ ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h 2005-11-20 08:51:57.559172578 -0800 +@@ -693,7 +693,7 @@ IX_ETH_DB_PUBLIC UINT32 ixEthDBEntryXORH + IX_ETH_DB_PUBLIC UINT32 ixEthDBKeyXORHash(void *macAddress); + + /* Port updates */ +-IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBFeature type); ++IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType type); + IX_ETH_DB_PUBLIC void ixEthDBUpdatePortLearningTrees(IxEthDBPortMap triggerPorts); + IX_ETH_DB_PUBLIC void ixEthDBNPEAccessRequest(IxEthDBPortId portID); + IX_ETH_DB_PUBLIC void ixEthDBUpdateLock(void); diff --git a/packages/ixp4xx/ixp4xx-csr-2.1/ixnpemhconfigisr-is-private.patch b/packages/ixp4xx/ixp4xx-csr-2.1/ixnpemhconfigisr-is-private.patch new file mode 100644 index 0000000000..6f853ac19e --- /dev/null +++ b/packages/ixp4xx/ixp4xx-csr-2.1/ixnpemhconfigisr-is-private.patch @@ -0,0 +1,18 @@ +--- ixp400_xscale_sw/src/npeMh/IxNpeMhSymbols.c.orig 2005-11-20 08:59:46.816701092 -0800 ++++ ixp400_xscale_sw/src/npeMh/IxNpeMhSymbols.c 2005-11-20 08:59:54.561188422 -0800 +@@ -63,7 +63,6 @@ EXPORT_SYMBOL(ixNpeMhMessagesReceive); + EXPORT_SYMBOL(ixNpeMhShow); + EXPORT_SYMBOL(ixNpeMhShowReset); + +-extern void ixNpeMhConfigIsr (void *parameter); + extern BOOL ixNpeMhConfigInFifoIsFull(IxNpeMhNpeId npeId); + extern BOOL ixNpeMhConfigOutFifoIsEmpty (IxNpeMhNpeId npeId); + extern void ixNpeMhConfigLockRelease (IxNpeMhNpeId npeId); +@@ -72,7 +71,6 @@ extern void ixNpeMhConfigOutFifoRead (Ix + extern void ixNpeMhConfigInFifoWrite (IxNpeMhNpeId npeId,IxNpeMhMessage message); + extern struct ixNpeMhConfigNpeInfo ixNpeMhConfigNpeInfo[IX_NPEMH_NUM_NPES]; + +-EXPORT_SYMBOL(ixNpeMhConfigIsr); + EXPORT_SYMBOL(ixNpeMhConfigInFifoIsFull); + EXPORT_SYMBOL(ixNpeMhConfigOutFifoIsEmpty); + EXPORT_SYMBOL(ixNpeMhConfigLockRelease); diff --git a/packages/ixp4xx/ixp4xx-csr-2.1/le.patch b/packages/ixp4xx/ixp4xx-csr-2.1/le.patch new file mode 100644 index 0000000000..b62389cbee --- /dev/null +++ b/packages/ixp4xx/ixp4xx-csr-2.1/le.patch @@ -0,0 +1,13 @@ +--- ixp400_xscale_sw/.pc/le.patch/src/include/IxQMgr.h 2005-04-17 20:55:31.000000000 -0700 ++++ ixp400_xscale_sw/src/include/IxQMgr.h 2005-11-19 16:01:52.817556623 -0800 +@@ -96,8 +98,8 @@ + + #else + +-#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_DC +-#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_DC ++#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_AC ++#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_AC + + #endif + diff --git a/packages/ixp4xx/ixp4xx-csr_1.4.bb b/packages/ixp4xx/ixp4xx-csr_1.4.bb index ca502ca4d9..788d303c67 100644 --- a/packages/ixp4xx/ixp4xx-csr_1.4.bb +++ b/packages/ixp4xx/ixp4xx-csr_1.4.bb @@ -25,7 +25,7 @@ SRC_URI += "file://badpaths.patch;patch=1" SRC_URI += "file://build-timing-annoyance.patch;patch=1" S = "${WORKDIR}/ixp400_xscale_sw" -PR = "r5" +PR = "r6" COMPATIBLE_HOST = "^armeb-linux.*" diff --git a/packages/ixp4xx/ixp4xx-csr_1.5.bb b/packages/ixp4xx/ixp4xx-csr_1.5.bb index d07e464f91..2feef7ea4a 100644 --- a/packages/ixp4xx/ixp4xx-csr_1.5.bb +++ b/packages/ixp4xx/ixp4xx-csr_1.5.bb @@ -24,7 +24,7 @@ SRC_URI += "http://www.intel.com/Please-Read-The-BB-File/ixp400NpeLibrary-1_5.zi SRC_URI += "file://2.6.patch;patch=1" DEPENDS = "ixp-osal" S = "${WORKDIR}/ixp400_xscale_sw" -PR = "r0" +PR = "r1" COMPATIBLE_HOST = "^armeb-linux.*" diff --git a/packages/ixp4xx/ixp4xx-csr_2.0.bb b/packages/ixp4xx/ixp4xx-csr_2.0.bb index 025a5ed49b..963ecc2f64 100644 --- a/packages/ixp4xx/ixp4xx-csr_2.0.bb +++ b/packages/ixp4xx/ixp4xx-csr_2.0.bb @@ -18,6 +18,11 @@ LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425 # versions 2.0, encryption is not required.) # # Store the files with the names given below in your downloads directory +# and store the 32 character md5sum of the file in a file of the same +# name with the additional extension .md5: +# +# IPL_ixp400AccessLibrary-2_0.zip.md5 +# IPL_ixp400NpeLibrary-2_0_5.zip.md5 # SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_0.zip" SRC_URI += "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400NpeLibrary-2_0_5.zip" @@ -27,7 +32,7 @@ SRC_URI += "file://2.6.14.patch;patch=1" SRC_URI += "file://le.patch;patch=1" DEPENDS = "ixp-osal" S = "${WORKDIR}/ixp400_xscale_sw" -PR = "r3" +PR = "r6" COMPATIBLE_HOST = "^arm.*-linux.*" @@ -45,6 +50,12 @@ OSAL_PATH = "lib/ixp425/linux/${IX_TARGET}" # This is a somewhat arbitrary choice: OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal" +# COMPONENTS: do not build all the components, this just creates a +# ridiculously large module which duplicates functionality in the +# available Linux drivers. +COMPONENTS = "qmgr npeMh npeDl ethAcc ethDB ethMii featureCtrl osServices oslinux" +CODELETS_COMPONENTS = "" + # NOTE: IX_INCLUDE_MICROCODE causes the microcode to be included in # the ixp4xx-csr module, this *requires* the IPL_ixp400NpeLibrary-2_0.zip # to be added to the SRC_URI - see above. @@ -53,6 +64,8 @@ EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \ 'AR=${AR}' \ 'IX_XSCALE_SW=${S}' \ 'IX_TARGET=${IX_TARGET}' \ + '${IX_TARGET}_COMPONENTS=${COMPONENTS}' \ + '${IX_TARGET}_CODELETS_COMPONENTS=${CODELETS_COMPONENTS}' \ 'IX_DEVICE=ixp42X' \ 'IX_MPHY=1' \ 'IX_MPHYSINGLEPORT=1' \ @@ -75,6 +88,8 @@ do_stage () { install -m 0644 src/include/*.h ${STAGING_INCDIR}/linux/ixp4xx-csr/ } +PACKAGES = "${PN}" + do_install () { install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400 install -m 0644 lib/${IX_TARGET}/ixp400.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400/ diff --git a/packages/ixp4xx/ixp4xx-csr_2.1.bb b/packages/ixp4xx/ixp4xx-csr_2.1.bb new file mode 100644 index 0000000000..6da973b0d7 --- /dev/null +++ b/packages/ixp4xx/ixp4xx-csr_2.1.bb @@ -0,0 +1,113 @@ +# Intel ixp4xx access library software. Note that this has an Intel +# license which restricts its use. +MAINTAINER = "NSLU2 Linux <nslu2-linux@yahoogroups.com>" +HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp420.htm" +LICENSE = "http://www.intel.com/design/network/swsup/np_sla/ixp400.htm" +LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm" +# You must download the following software to your OpenEmbedded downloads +# directory before using this package: +# +# IPL_ixp400AccessLibrary-2_1.zip +# IPL_ixp400NpeLibrary-2_1.zip +# +# To do this go to the LICENSE_HOMEPAGE above, register/login (using a +# web browser which is supported by the login page), this will give you +# access to the web page from which you can download the software - you +# need the: "IntelĀ® IXP400 Software and RedBoot* Boot Loader" and, from +# this the "Intel Hardware Access Software" and "NPE Microcode" (both +# versions 2.1, encryption is not required.) +# +# Store the files with the names given below in your downloads directory +# and store the 32 character md5sum of the file in a file of the same +# name with the additional extension .md5: +# +# IPL_ixp400AccessLibrary-2_1.zip.md5 +# IPL_ixp400NpeLibrary-2_1.zip.md5 +# +SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_1.zip" +SRC_URI += "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400NpeLibrary-2_1.zip" +SRC_URI += "file://Makefile.patch;patch=1" +SRC_URI += "file://ixethdb-header.patch;patch=1" +SRC_URI += "file://bit-macro.patch;patch=1" +SRC_URI += "file://ixnpemhconfigisr-is-private.patch;patch=1" +SRC_URI += "file://le.patch;patch=1" + +DEPENDS = "ixp-osal" +S = "${WORKDIR}/ixp400_xscale_sw" +PR = "r0" + +COMPATIBLE_HOST = "^arm.*-linux.*" + +inherit module + +# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as +# required. Notice that this has to be done for each separately built +# module as well! +KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}" +KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}" + +IX_TARGET = "linux${ARCH_BYTE_SEX}" +IX_ENSURE = "" +#IX_ENSURE = "IX_OSAL_ENSURE_ON=1" + +OSAL_PATH = "lib/ixp425/linux/${IX_TARGET}" +# This is a somewhat arbitrary choice: +OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal" + +# COMPONENTS: do not build all the components, this just creates a +# ridiculously large module which duplicates functionality in the +# available Linux drivers. +COMPONENTS = "qmgr npeMh npeDl ethAcc ethDB ethMii featureCtrl osServices oslinux" +CODELETS_COMPONENTS = "" + +# NOTE: IX_INCLUDE_MICROCODE causes the microcode to be included in +# the ixp4xx-csr module, this *requires* the IPL_ixp400NpeLibrary-2_1.zip +# to be added to the SRC_URI - see above. +EXTRA_OEMAKE = "'AR=${AR}' \ + 'IX_XSCALE_SW=${S}' \ + 'IX_TARGET=${IX_TARGET}' \ + '${IX_TARGET}_COMPONENTS=${COMPONENTS}' \ + '${IX_TARGET}_CODELETS_COMPONENTS=${CODELETS_COMPONENTS}' \ + 'IX_DEVICE=ixp42X' \ + 'IX_MPHY=1' \ + 'IX_MPHYSINGLEPORT=1' \ + 'IX_INCLUDE_MICROCODE=1' \ + ${IX_ENSURE} \ + 'LINUX_SRC=${STAGING_KERNEL_DIR}' \ + 'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \ + 'OSAL_DIR=${OSAL_DIR}' \ + 'OSAL_IMAGE=${OSAL_DIR}/${OSAL_PATH}/libosal.a' \ + 'OSAL_MODULE=${OSAL_DIR}/${OSAL_PATH}/ixp_osal.o' \ + " + +MAKE_TARGETS = "lib/${IX_TARGET}/ixp400.o" + +KCONFIG_FILE = "${STAGING_KERNEL_DIR}/kernel-config" +do_stage () { + install -d ${STAGING_INCDIR}/linux/ixp4xx-csr + install -m 0644 src/include/*.h ${STAGING_INCDIR}/linux/ixp4xx-csr/ + # Since Module.symvers in the kernel staging directory doesn't include + # the symbols from ixp400.o we need to add them to another file for + # the ixp400-eth build + rm -f '${STAGING_KERNEL_DIR}/ixp400-csr.symvers' + . '${KCONFIG_FILE}' + if '${STAGING_KERNEL_DIR}/scripts/mod/modpost' \ + ${CONFIG_MODVERSIONS:+-m} \ + ${CONFIG_MODULE_SRCVERSION_ALL:+-a} \ + -i '${STAGING_KERNEL_DIR}/Module.symvers' \ + -o '${STAGING_KERNEL_DIR}/ixp400-csr.symvers' \ + ${MAKE_TARGETS} >&2 | egrep . + then + echo "MODPOST errors - see above" + return 1 + else + return 0 + fi +} + +PACKAGES = "${PN}" + +do_install () { + install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400 + install -m 0644 lib/${IX_TARGET}/ixp400.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/ixp400/ +} |