upgrade the ixp4xx ethernet driver to v0.3.1, split the Gateway 7001 support to two patches
SVN-Revision: 6489
This commit is contained in:
parent
5acf90187b
commit
b97c7c0af6
9 changed files with 2873 additions and 1149 deletions
|
@ -18,7 +18,9 @@ CONFIG_ARCH_AVILA=y
|
||||||
# CONFIG_ARCH_INTEGRATOR is not set
|
# CONFIG_ARCH_INTEGRATOR is not set
|
||||||
# CONFIG_ARCH_IOP32X is not set
|
# CONFIG_ARCH_IOP32X is not set
|
||||||
# CONFIG_ARCH_IOP33X is not set
|
# CONFIG_ARCH_IOP33X is not set
|
||||||
# CONFIG_ARCH_IXDP425 is not set
|
CONFIG_MACH_PRONGHORN=y
|
||||||
|
CONFIG_MACH_PRONGHORNMETRO=y
|
||||||
|
CONFIG_ARCH_IXDP425=y
|
||||||
CONFIG_ARCH_IXDP4XX=y
|
CONFIG_ARCH_IXDP4XX=y
|
||||||
# CONFIG_ARCH_IXP2000 is not set
|
# CONFIG_ARCH_IXP2000 is not set
|
||||||
# CONFIG_ARCH_IXP23XX is not set
|
# CONFIG_ARCH_IXP23XX is not set
|
||||||
|
@ -203,6 +205,7 @@ CONFIG_IXP4XX_NPE=y
|
||||||
CONFIG_IXP4XX_NPE_FW_LOAD=y
|
CONFIG_IXP4XX_NPE_FW_LOAD=y
|
||||||
CONFIG_IXP4XX_NPE_FW_MTD=y
|
CONFIG_IXP4XX_NPE_FW_MTD=y
|
||||||
CONFIG_IXP4XX_QMGR=y
|
CONFIG_IXP4XX_QMGR=y
|
||||||
|
CONFIG_IXP4XX_CRYPTO=y
|
||||||
CONFIG_IXP4XX_WATCHDOG=y
|
CONFIG_IXP4XX_WATCHDOG=y
|
||||||
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
|
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
|
||||||
CONFIG_JFFS2_FS_DEBUG=0
|
CONFIG_JFFS2_FS_DEBUG=0
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,36 +0,0 @@
|
||||||
|
|
||||||
---
|
|
||||||
drivers/net/ixp4xx/ixp4xx_qmgr.c | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- linux-ixp4xx.orig/drivers/net/ixp4xx/ixp4xx_qmgr.c 2006-10-15 18:52:35.000000000 +0200
|
|
||||||
+++ linux-ixp4xx/drivers/net/ixp4xx/ixp4xx_qmgr.c 2006-10-15 18:54:32.000000000 +0200
|
|
||||||
@@ -107,7 +107,7 @@ static int get_free_qspace(struct qm_qmg
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static inline int log2(int x)
|
|
||||||
+static inline int _log2(int x)
|
|
||||||
{
|
|
||||||
int r=0;
|
|
||||||
while(x>>=1)
|
|
||||||
@@ -127,7 +127,7 @@ static inline int log2(int x)
|
|
||||||
*/
|
|
||||||
static int conf_q_regs(struct qm_queue *queue)
|
|
||||||
{
|
|
||||||
- int bsize = log2(queue->len/16);
|
|
||||||
+ int bsize = _log2(queue->len/16);
|
|
||||||
int baddr = queue->addr + IX_QMGR_QCFG_SIZE;
|
|
||||||
|
|
||||||
/* +2, because baddr is in words and not in bytes */
|
|
||||||
@@ -141,8 +141,8 @@ void queue_set_watermarks(struct qm_queu
|
|
||||||
u32 val;
|
|
||||||
/* calculate the register values
|
|
||||||
* 0->0, 1->1, 2->2, 4->3, 8->4 16->5...*/
|
|
||||||
- ne = log2(ne<<1) & 0x7;
|
|
||||||
- nf = log2(nf<<1) & 0x7;
|
|
||||||
+ ne = _log2(ne<<1) & 0x7;
|
|
||||||
+ nf = _log2(nf<<1) & 0x7;
|
|
||||||
|
|
||||||
/* Mask out old watermarks */
|
|
||||||
val = queue_read_cfg_reg(queue) & ~0xfc000000;
|
|
|
@ -1,31 +1,10 @@
|
||||||
Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
|
diff -Naupr a/drivers/net/ixp4xx/mac_driver.c b/drivers/net/ixp4xx/mac_driver.c
|
||||||
===================================================================
|
--- a/drivers/net/ixp4xx/mac_driver.c 2007-01-12 21:54:40.000000000 -0700
|
||||||
--- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/platform.h
|
+++ b/drivers/net/ixp4xx/mac_driver.c 2007-01-12 22:27:18.000000000 -0700
|
||||||
+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
|
@@ -350,6 +350,16 @@ static int ixmac_open (struct net_device
|
||||||
@@ -100,6 +100,7 @@ struct mac_plat_info {
|
mac->npe_stat_num = i<NPE_STAT_NUM ? NPE_STAT_NUM_BASE : NPE_STAT_NUM;
|
||||||
int phy_id; /* ID of the connected PHY (PCB/platform dependent) */
|
mac->npe_stat_num += NPE_Q_STAT_NUM;
|
||||||
int rxq_id; /* Queue ID of the RX-free q*/
|
|
||||||
int txq_id; /* Where to push the outgoing packets */
|
|
||||||
+ unsigned char hwaddr[6]; /* Desired hardware address */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
Index: linux-2.6.19/drivers/net/ixp4xx/mac_driver.c
|
|
||||||
===================================================================
|
|
||||||
--- linux-2.6.19.orig/drivers/net/ixp4xx/mac_driver.c
|
|
||||||
+++ linux-2.6.19/drivers/net/ixp4xx/mac_driver.c
|
|
||||||
@@ -189,6 +189,24 @@ static int ixmac_open (struct net_device
|
|
||||||
}
|
|
||||||
mac->rxq_pkt += RX_QUEUE_PREFILL;
|
|
||||||
|
|
||||||
+ /* printk(KERN_INFO "...Platform MAC=0x%02x%02x%02x%02x%02x%02x\n",
|
|
||||||
+ mac->plat->hwaddr[0],
|
|
||||||
+ mac->plat->hwaddr[1],
|
|
||||||
+ mac->plat->hwaddr[2],
|
|
||||||
+ mac->plat->hwaddr[3],
|
|
||||||
+ mac->plat->hwaddr[4],
|
|
||||||
+ mac->plat->hwaddr[5]
|
|
||||||
+ ); */
|
|
||||||
+ /* Only use platform or random if there's currently no device hw addr */
|
+ /* Only use platform or random if there's currently no device hw addr */
|
||||||
+ if (is_zero_ether_addr(dev->dev_addr)) {
|
+ if (is_zero_ether_addr(dev->dev_addr)) {
|
||||||
+ if (is_zero_ether_addr(mac->plat->hwaddr)) {
|
+ if (is_zero_ether_addr(mac->plat->hwaddr)) {
|
||||||
|
@ -36,25 +15,27 @@ Index: linux-2.6.19/drivers/net/ixp4xx/mac_driver.c
|
||||||
+ memcpy(dev->dev_addr, mac->plat->hwaddr, 6);
|
+ memcpy(dev->dev_addr, mac->plat->hwaddr, 6);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
mac_init(mac);
|
|
||||||
npe_mh_set_rxqid(npe, mac->plat, RX_DONE_QID);
|
|
||||||
mac_set_uniaddr(dev);
|
mac_set_uniaddr(dev);
|
||||||
@@ -434,9 +452,15 @@ static int mac_probe(struct platform_dev
|
media_check(dev, 1);
|
||||||
* following commands:
|
ixmac_set_rx_mode(dev);
|
||||||
* "ip link set address 02:03:04:04:04:01 dev eth0"
|
@@ -691,20 +701,6 @@ static int mac_probe(struct platform_dev
|
||||||
* "ifconfig eth0 hw ether 02:03:04:04:04:07"
|
|
||||||
|
INIT_WORK(&mac->mdio_thread, mac_mdio_thread, dev);
|
||||||
|
|
||||||
|
- /* The place of the MAC address is very system dependent.
|
||||||
|
- * Here we use a random one to be replaced by one of the
|
||||||
|
- * following commands:
|
||||||
|
- * "ip link set address 02:03:04:04:04:01 dev eth0"
|
||||||
|
- * "ifconfig eth0 hw ether 02:03:04:04:04:07"
|
||||||
- */
|
- */
|
||||||
|
-
|
||||||
|
- if (is_zero_ether_addr(plat->hwaddr)) {
|
||||||
- random_ether_addr(dev->dev_addr);
|
- random_ether_addr(dev->dev_addr);
|
||||||
- dev->dev_addr[5] = plat->phy_id;
|
- dev->dev_addr[5] = plat->phy_id;
|
||||||
+ */
|
- }
|
||||||
+/* Note: moved to ixmac_open to allow notifiers to run for compiled in modules
|
- else
|
||||||
+ if (is_zero_ether_addr(plat->hwaddr)) {
|
- memcpy(dev->dev_addr, plat->hwaddr, 6);
|
||||||
+ random_ether_addr(dev->dev_addr);
|
-
|
||||||
+ dev->dev_addr[5] = plat->phy_id;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ memcpy(dev->dev_addr, plat->hwaddr, 6);
|
|
||||||
+*/
|
|
||||||
|
|
||||||
printk(KERN_INFO IXMAC_NAME " driver " IXMAC_VERSION
|
printk(KERN_INFO IXMAC_NAME " driver " IXMAC_VERSION
|
||||||
": %s on %s with PHY[%d] initialized\n",
|
": %s on %s with PHY[%d] initialized\n",
|
||||||
|
dev->name, npe->plat->name, plat->phy_id);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
Index: linux-2.6.19/drivers/net/ixp4xx/Kconfig
|
diff -Naupr a/drivers/net/ixp4xx/Kconfig b/drivers/net/ixp4xx/Kconfig
|
||||||
===================================================================
|
--- a/drivers/net/ixp4xx/Kconfig 2007-01-12 21:54:40.000000000 -0700
|
||||||
--- linux-2.6.19.orig/drivers/net/ixp4xx/Kconfig
|
+++ b/drivers/net/ixp4xx/Kconfig 2007-01-12 23:28:50.000000000 -0700
|
||||||
+++ linux-2.6.19/drivers/net/ixp4xx/Kconfig
|
|
||||||
@@ -11,6 +11,7 @@ config IXP4XX_NPE
|
@@ -11,6 +11,7 @@ config IXP4XX_NPE
|
||||||
tristate "IXP4xx NPE support"
|
tristate "IXP4xx NPE support"
|
||||||
depends on ARCH_IXP4XX
|
depends on ARCH_IXP4XX
|
||||||
|
@ -33,22 +32,19 @@ Index: linux-2.6.19/drivers/net/ixp4xx/Kconfig
|
||||||
config IXP4XX_MAC
|
config IXP4XX_MAC
|
||||||
tristate "IXP4xx MAC support"
|
tristate "IXP4xx MAC support"
|
||||||
depends on IXP4XX_NPE
|
depends on IXP4XX_NPE
|
||||||
Index: linux-2.6.19/drivers/net/ixp4xx/Makefile
|
diff -Naupr a/drivers/net/ixp4xx/Makefile b/drivers/net/ixp4xx/Makefile
|
||||||
===================================================================
|
--- a/drivers/net/ixp4xx/Makefile 2007-01-12 21:54:40.000000000 -0700
|
||||||
--- linux-2.6.19.orig/drivers/net/ixp4xx/Makefile
|
+++ b/drivers/net/ixp4xx/Makefile 2007-01-12 23:28:50.000000000 -0700
|
||||||
+++ linux-2.6.19/drivers/net/ixp4xx/Makefile
|
@@ -1,5 +1,6 @@
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
|
obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
|
||||||
obj-$(CONFIG_IXP4XX_NPE) += ixp4xx_npe.o
|
obj-$(CONFIG_IXP4XX_NPE) += ixp4xx_npe.o
|
||||||
obj-$(CONFIG_IXP4XX_MAC) += ixp4xx_mac.o
|
|
||||||
+obj-$(CONFIG_IXP4XX_NPE_FW_MTD) += npe_ucode.o
|
+obj-$(CONFIG_IXP4XX_NPE_FW_MTD) += npe_ucode.o
|
||||||
|
obj-$(CONFIG_IXP4XX_MAC) += ixp4xx_mac.o
|
||||||
|
obj-$(CONFIG_IXP4XX_CRYPTO) += ixp4xx_crypto.o
|
||||||
|
|
||||||
ixp4xx_npe-objs := ucode_dl.o npe_mh.o
|
diff -Naupr a/drivers/net/ixp4xx/npe_ucode.c b/drivers/net/ixp4xx/npe_ucode.c
|
||||||
ixp4xx_mac-objs := mac_driver.o qmgr_eth.o phy.o
|
--- a/drivers/net/ixp4xx/npe_ucode.c 1969-12-31 17:00:00.000000000 -0700
|
||||||
Index: linux-2.6.19/drivers/net/ixp4xx/npe_ucode.c
|
+++ b/drivers/net/ixp4xx/npe_ucode.c 2007-01-12 23:28:50.000000000 -0700
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ linux-2.6.19/drivers/net/ixp4xx/npe_ucode.c
|
|
||||||
@@ -0,0 +1,185 @@
|
@@ -0,0 +1,185 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Provide an NPE platform device for microcode handling
|
+ * Provide an NPE platform device for microcode handling
|
||||||
|
@ -235,10 +231,9 @@ Index: linux-2.6.19/drivers/net/ixp4xx/npe_ucode.c
|
||||||
+
|
+
|
||||||
+MODULE_LICENSE("GPL");
|
+MODULE_LICENSE("GPL");
|
||||||
+MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
|
+MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
|
||||||
Index: linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
diff -Naupr a/drivers/net/ixp4xx/ucode_dl.c b/drivers/net/ixp4xx/ucode_dl.c
|
||||||
===================================================================
|
--- a/drivers/net/ixp4xx/ucode_dl.c 2007-01-12 21:54:40.000000000 -0700
|
||||||
--- linux-2.6.19.orig/drivers/net/ixp4xx/ucode_dl.c
|
+++ b/drivers/net/ixp4xx/ucode_dl.c 2007-01-12 23:28:50.000000000 -0700
|
||||||
+++ linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
|
||||||
@@ -16,6 +16,7 @@
|
@@ -16,6 +16,7 @@
|
||||||
#include <linux/firmware.h>
|
#include <linux/firmware.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
|
@ -247,9 +242,9 @@ Index: linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
@@ -30,6 +31,12 @@
|
@@ -26,6 +27,12 @@
|
||||||
#define IMG_SIZE(image) (((image)->size * sizeof(u32)) + \
|
#define DL_MAGIC 0xfeedf00d
|
||||||
sizeof(struct dl_image))
|
#define DL_MAGIC_SWAP 0x0df0edfe
|
||||||
|
|
||||||
+#define IMG_REV_MAJOR(id) (((id) >> 8) & 0x0f)
|
+#define IMG_REV_MAJOR(id) (((id) >> 8) & 0x0f)
|
||||||
+#define IMG_REV_MINOR(id) ((id) & 0x0f)
|
+#define IMG_REV_MINOR(id) ((id) & 0x0f)
|
||||||
|
@ -257,9 +252,9 @@ Index: linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
||||||
+#define IMG_NPE(id) (((id) >> 24) & 0x0f)
|
+#define IMG_NPE(id) (((id) >> 24) & 0x0f)
|
||||||
+#define IMG_IXP(id) (((id) >> 28) & 0x0f)
|
+#define IMG_IXP(id) (((id) >> 28) & 0x0f)
|
||||||
+
|
+
|
||||||
#define BT_INSTR 0
|
#define EOF_BLOCK 0xf
|
||||||
#define BT_DATA 1
|
#define IMG_SIZE(image) (((image)->size * sizeof(u32)) + \
|
||||||
|
sizeof(struct dl_image))
|
||||||
@@ -38,21 +45,6 @@ enum blk_type {
|
@@ -38,21 +45,6 @@ enum blk_type {
|
||||||
data,
|
data,
|
||||||
};
|
};
|
||||||
|
@ -282,8 +277,8 @@ Index: linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
||||||
struct dl_codeblock {
|
struct dl_codeblock {
|
||||||
u32 npe_addr;
|
u32 npe_addr;
|
||||||
u32 size;
|
u32 size;
|
||||||
@@ -134,23 +126,41 @@ struct device *get_npe_by_id(int id)
|
@@ -127,20 +119,33 @@ download_block(struct npe_info *npe, str
|
||||||
&id, match_by_npeid);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
-static int store_npe_image(struct dl_image *image, struct device *dev)
|
-static int store_npe_image(struct dl_image *image, struct device *dev)
|
||||||
|
@ -292,21 +287,14 @@ Index: linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
||||||
struct dl_block *blk;
|
struct dl_block *blk;
|
||||||
struct dl_codeblock *cb;
|
struct dl_codeblock *cb;
|
||||||
struct npe_info *npe;
|
struct npe_info *npe;
|
||||||
- int ret=0;
|
int ret=0;
|
||||||
+ int ret = 0;
|
|
||||||
+ u16 crc;
|
+ u16 crc;
|
||||||
|
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
- dev = get_npe_by_id( (image->id >> 24) & 0xf);
|
- dev = get_npe_by_id( (image->id >> 24) & 0xf);
|
||||||
- put_device(dev);
|
|
||||||
+ dev = get_npe_by_id(IMG_NPE(image->id));
|
+ dev = get_npe_by_id(IMG_NPE(image->id));
|
||||||
+ if (dev)
|
return_npe_dev(dev);
|
||||||
+ put_device(dev);
|
|
||||||
+ // XXX shouldn't this put_device be outside if(!dev) ?
|
|
||||||
+ else
|
|
||||||
+ printk(KERN_ERR "npe: cannot find npe for image %x\n", IMG_NPE(image->id));
|
|
||||||
}
|
}
|
||||||
+
|
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@ -323,25 +311,9 @@ Index: linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
||||||
+ crc = crc16(0, (u8 *) image, IMG_SIZE(image));
|
+ crc = crc16(0, (u8 *) image, IMG_SIZE(image));
|
||||||
+
|
+
|
||||||
npe = dev_get_drvdata(dev);
|
npe = dev_get_drvdata(dev);
|
||||||
|
if (npe->loaded && (npe->usage > 0)) {
|
||||||
- if ( npe_status(npe) & IX_NPEDL_EXCTL_STATUS_RUN) {
|
|
||||||
+ if (npe_status(npe) & IX_NPEDL_EXCTL_STATUS_RUN) {
|
|
||||||
printk(KERN_INFO "Cowardly refusing to reload an Image "
|
printk(KERN_INFO "Cowardly refusing to reload an Image "
|
||||||
"into the running %s\n", npe->plat->name);
|
@@ -267,8 +272,7 @@ static ssize_t ucode_write(struct file *
|
||||||
return 0; /* indicate success anyway... */
|
|
||||||
@@ -173,9 +183,9 @@ static int store_npe_image(struct dl_ima
|
|
||||||
*(u32*)npe->img_info = cpu_to_be32(image->id);
|
|
||||||
npe_start(npe);
|
|
||||||
|
|
||||||
- printk(KERN_INFO "Image loaded to %s Func:%x, Rel: %x:%x, Status: %x\n",
|
|
||||||
+ printk(KERN_INFO "npe: firmware loaded to %s, func: %02x, rev: %x.%x, status: %x, crc: %x\n",
|
|
||||||
npe->plat->name, npe->img_info[1], npe->img_info[2],
|
|
||||||
- npe->img_info[3], npe_status(npe));
|
|
||||||
+ npe->img_info[3], npe_status(npe), crc);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -265,8 +275,7 @@ static ssize_t ucode_write(struct file *
|
|
||||||
|
|
||||||
static void npe_firmware_probe(struct device *dev)
|
static void npe_firmware_probe(struct device *dev)
|
||||||
{
|
{
|
||||||
|
@ -351,27 +323,17 @@ Index: linux-2.6.19/drivers/net/ixp4xx/ucode_dl.c
|
||||||
const struct firmware *fw_entry;
|
const struct firmware *fw_entry;
|
||||||
struct npe_info *npe = dev_get_drvdata(dev);
|
struct npe_info *npe = dev_get_drvdata(dev);
|
||||||
struct dl_image *image;
|
struct dl_image *image;
|
||||||
@@ -388,7 +397,7 @@ static int npe_probe(struct platform_dev
|
@@ -477,3 +481,4 @@ MODULE_AUTHOR("Christian Hohnstaedt <cho
|
||||||
|
|
||||||
npe->plat = plat;
|
|
||||||
disable_npe_irq(npe);
|
|
||||||
- if (! (npe_status(npe) & IX_NPEDL_EXCTL_STATUS_RUN))
|
|
||||||
+ if (!(npe_status(npe) & IX_NPEDL_EXCTL_STATUS_RUN))
|
|
||||||
npe_firmware_probe(&pdev->dev);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
@@ -464,3 +473,4 @@ MODULE_LICENSE("GPL");
|
|
||||||
MODULE_AUTHOR("Christian Hohnstaedt <chohnstaedt@innominate.com>");
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(get_npe_by_id);
|
EXPORT_SYMBOL(get_npe_by_id);
|
||||||
|
EXPORT_SYMBOL(return_npe_dev);
|
||||||
+EXPORT_SYMBOL(store_npe_image);
|
+EXPORT_SYMBOL(store_npe_image);
|
||||||
Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
|
diff -Naupr a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h
|
||||||
===================================================================
|
--- a/include/asm-arm/arch-ixp4xx/platform.h 2007-01-12 21:54:40.000000000 -0700
|
||||||
--- linux-2.6.19.orig/include/asm-arm/arch-ixp4xx/platform.h
|
+++ b/include/asm-arm/arch-ixp4xx/platform.h 2007-01-12 23:28:50.000000000 -0700
|
||||||
+++ linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
|
@@ -89,6 +89,21 @@ struct ixp4xx_i2c_pins {
|
||||||
@@ -86,6 +86,20 @@ struct ixp4xx_i2c_pins {
|
|
||||||
unsigned long scl_pin;
|
struct sys_timer;
|
||||||
};
|
|
||||||
|
|
||||||
+struct dl_block {
|
+struct dl_block {
|
||||||
+ u32 type;
|
+ u32 type;
|
||||||
|
@ -387,27 +349,28 @@ Index: linux-2.6.19/include/asm-arm/arch-ixp4xx/platform.h
|
||||||
+ struct dl_block block[0];
|
+ struct dl_block block[0];
|
||||||
+ } u;
|
+ } u;
|
||||||
+};
|
+};
|
||||||
|
+
|
||||||
struct npe_plat_data {
|
struct npe_plat_data {
|
||||||
const char *name;
|
const char *name;
|
||||||
int data_size;
|
int data_size;
|
||||||
@@ -103,6 +117,9 @@ struct mac_plat_info {
|
@@ -108,6 +123,10 @@ struct mac_plat_info {
|
||||||
unsigned char hwaddr[6]; /* Desired hardware address */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
+struct npe_ucode_platform_data {
|
+struct npe_ucode_platform_data {
|
||||||
+ unsigned char *mtd_partition;
|
+ unsigned char *mtd_partition;
|
||||||
+};
|
+};
|
||||||
|
+
|
||||||
struct sys_timer;
|
/*
|
||||||
|
* Frequency of clock used for primary clocksource
|
||||||
Index: linux-2.6.19/include/linux/ixp_npe.h
|
*/
|
||||||
===================================================================
|
diff -Naupr a/include/linux/ixp_npe.h b/include/linux/ixp_npe.h
|
||||||
--- linux-2.6.19.orig/include/linux/ixp_npe.h
|
--- a/include/linux/ixp_npe.h 2007-01-12 21:54:40.000000000 -0700
|
||||||
+++ linux-2.6.19/include/linux/ixp_npe.h
|
+++ b/include/linux/ixp_npe.h 2007-01-12 23:28:50.000000000 -0700
|
||||||
@@ -71,6 +71,7 @@ static inline u32 npe_read_ecs_reg(struc
|
@@ -99,6 +99,7 @@ extern void npe_reset(struct npe_info *n
|
||||||
}
|
|
||||||
|
|
||||||
extern struct device *get_npe_by_id(int id);
|
extern struct device *get_npe_by_id(int id);
|
||||||
|
extern void return_npe_dev(struct device *dev);
|
||||||
+extern int store_npe_image(struct dl_image *image, struct device *dev);
|
+extern int store_npe_image(struct dl_image *image, struct device *dev);
|
||||||
|
|
||||||
/* NPE Messages */
|
/* NPE Messages */
|
||||||
|
|
|
@ -2,7 +2,7 @@ Index: linux-2.6.19/arch/arm/mach-ixp4xx/nslu2-setup.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- linux-2.6.19.orig/arch/arm/mach-ixp4xx/nslu2-setup.c
|
--- linux-2.6.19.orig/arch/arm/mach-ixp4xx/nslu2-setup.c
|
||||||
+++ linux-2.6.19/arch/arm/mach-ixp4xx/nslu2-setup.c
|
+++ linux-2.6.19/arch/arm/mach-ixp4xx/nslu2-setup.c
|
||||||
@@ -137,6 +137,28 @@ static struct platform_device nslu2_uart
|
@@ -137,6 +137,29 @@ static struct platform_device nslu2_uart
|
||||||
.resource = nslu2_uart_resources,
|
.resource = nslu2_uart_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ Index: linux-2.6.19/arch/arm/mach-ixp4xx/nslu2-setup.c
|
||||||
+ .eth_id = 0,
|
+ .eth_id = 0,
|
||||||
+ .rxq_id = 27,
|
+ .rxq_id = 27,
|
||||||
+ .txq_id = 24,
|
+ .txq_id = 24,
|
||||||
|
+ .rxdoneq_id = 4,
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+static struct platform_device mac0 = {
|
+static struct platform_device mac0 = {
|
||||||
|
|
|
@ -2,7 +2,7 @@ Index: linux-2.6.19/arch/arm/mach-ixp4xx/nas100d-setup.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- linux-2.6.19.orig/arch/arm/mach-ixp4xx/nas100d-setup.c
|
--- linux-2.6.19.orig/arch/arm/mach-ixp4xx/nas100d-setup.c
|
||||||
+++ linux-2.6.19/arch/arm/mach-ixp4xx/nas100d-setup.c
|
+++ linux-2.6.19/arch/arm/mach-ixp4xx/nas100d-setup.c
|
||||||
@@ -123,12 +123,35 @@ static struct platform_device nas100d_ua
|
@@ -123,12 +123,36 @@ static struct platform_device nas100d_ua
|
||||||
.resource = nas100d_uart_resources,
|
.resource = nas100d_uart_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ Index: linux-2.6.19/arch/arm/mach-ixp4xx/nas100d-setup.c
|
||||||
+ .eth_id = 0,
|
+ .eth_id = 0,
|
||||||
+ .rxq_id = 27,
|
+ .rxq_id = 27,
|
||||||
+ .txq_id = 24,
|
+ .txq_id = 24,
|
||||||
|
+ .rxdoneq_id = 4,
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+static struct platform_device mac0 = {
|
+static struct platform_device mac0 = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
diff -Nur linux-2.6.19/arch/arm/boot/compressed/head-xscale.S linux-2.6.19-owrt/arch/arm/boot/compressed/head-xscale.S
|
diff -Nur linux-2.6.19.2/arch/arm/boot/compressed/head-xscale.S linux-2.6.19.2-owrt/arch/arm/boot/compressed/head-xscale.S
|
||||||
--- linux-2.6.19/arch/arm/boot/compressed/head-xscale.S 2006-11-29 22:57:37.000000000 +0100
|
--- linux-2.6.19.2/arch/arm/boot/compressed/head-xscale.S 2007-01-10 20:10:37.000000000 +0100
|
||||||
+++ linux-2.6.19-owrt/arch/arm/boot/compressed/head-xscale.S 2006-12-19 13:17:38.000000000 +0100
|
+++ linux-2.6.19.2-owrt/arch/arm/boot/compressed/head-xscale.S 2007-03-03 22:42:42.000000000 +0100
|
||||||
@@ -46,6 +46,11 @@
|
@@ -46,6 +46,11 @@
|
||||||
orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
|
orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,9 +13,9 @@ diff -Nur linux-2.6.19/arch/arm/boot/compressed/head-xscale.S linux-2.6.19-owrt/
|
||||||
#ifdef CONFIG_ARCH_IXP2000
|
#ifdef CONFIG_ARCH_IXP2000
|
||||||
mov r1, #-1
|
mov r1, #-1
|
||||||
mov r0, #0xd6000000
|
mov r0, #0xd6000000
|
||||||
diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.19-owrt/arch/arm/mach-ixp4xx/coyote-setup.c
|
diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/coyote-setup.c
|
||||||
--- linux-2.6.19/arch/arm/mach-ixp4xx/coyote-setup.c 2006-11-29 22:57:37.000000000 +0100
|
--- linux-2.6.19.2/arch/arm/mach-ixp4xx/coyote-setup.c 2007-01-10 20:10:37.000000000 +0100
|
||||||
+++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2006-12-19 13:17:38.000000000 +0100
|
+++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2007-03-03 23:33:35.000000000 +0100
|
||||||
@@ -1,9 +1,10 @@
|
@@ -1,9 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* arch/arm/mach-ixp4xx/coyote-setup.c
|
* arch/arm/mach-ixp4xx/coyote-setup.c
|
||||||
|
@ -28,71 +28,12 @@ diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.19-owrt/arc
|
||||||
*
|
*
|
||||||
* Author: Deepak Saxena <dsaxena@plexity.net>
|
* Author: Deepak Saxena <dsaxena@plexity.net>
|
||||||
*/
|
*/
|
||||||
@@ -73,9 +74,57 @@
|
@@ -111,6 +112,19 @@
|
||||||
.resource = &coyote_uart_resource,
|
|
||||||
};
|
|
||||||
|
|
||||||
+/* MACs */
|
|
||||||
+static struct resource res_mac0 = {
|
|
||||||
+ .start = IXP4XX_EthB_BASE_PHYS,
|
|
||||||
+ .end = IXP4XX_EthB_BASE_PHYS + 0x1ff,
|
|
||||||
+ .flags = IORESOURCE_MEM,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static struct resource res_mac1 = {
|
|
||||||
+ .start = IXP4XX_EthC_BASE_PHYS,
|
|
||||||
+ .end = IXP4XX_EthC_BASE_PHYS + 0x1ff,
|
|
||||||
+ .flags = IORESOURCE_MEM,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static struct mac_plat_info plat_mac0 = {
|
|
||||||
+ .npe_id = 1,
|
|
||||||
+ .phy_id = 0,
|
|
||||||
+ .eth_id = 0,
|
|
||||||
+ .rxq_id = 27,
|
|
||||||
+ .txq_id = 24,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static struct mac_plat_info plat_mac1 = {
|
|
||||||
+ .npe_id = 2,
|
|
||||||
+ .phy_id = 1,
|
|
||||||
+ .eth_id = 1,
|
|
||||||
+ .rxq_id = 28,
|
|
||||||
+ .txq_id = 25,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static struct platform_device mac0 = {
|
|
||||||
+ .name = "ixp4xx_mac",
|
|
||||||
+ .id = 0,
|
|
||||||
+ .dev.platform_data = &plat_mac0,
|
|
||||||
+ .num_resources = 1,
|
|
||||||
+ .resource = &res_mac0,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static struct platform_device mac1 = {
|
|
||||||
+ .name = "ixp4xx_mac",
|
|
||||||
+ .id = 1,
|
|
||||||
+ .dev.platform_data = &plat_mac1,
|
|
||||||
+ .num_resources = 1,
|
|
||||||
+ .resource = &res_mac1,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static struct platform_device *coyote_devices[] __initdata = {
|
|
||||||
&coyote_flash,
|
|
||||||
- &coyote_uart
|
|
||||||
+ &coyote_uart,
|
|
||||||
+ &mac0,
|
|
||||||
+ &mac1
|
|
||||||
};
|
|
||||||
|
|
||||||
static void __init coyote_init(void)
|
|
||||||
@@ -111,6 +160,19 @@
|
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+#ifdef CONFIG_MACH_GATEWAY7001
|
+#ifdef CONFIG_MACH_GATEWAY7001
|
||||||
+MACHINE_START(GATEWAY7001, "Gateway 7001")
|
+MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
|
||||||
+ /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
|
+ /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
|
||||||
+ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
|
+ .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
|
||||||
+ .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
|
+ .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
|
||||||
|
@ -107,9 +48,9 @@ diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.19-owrt/arc
|
||||||
/*
|
/*
|
||||||
* IXDPG425 is identical to Coyote except for which serial port
|
* IXDPG425 is identical to Coyote except for which serial port
|
||||||
* is connected.
|
* is connected.
|
||||||
diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.19-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c
|
diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c
|
||||||
--- linux-2.6.19/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100
|
--- linux-2.6.19.2/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2006-12-19 13:18:18.000000000 +0100
|
+++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2007-03-03 22:42:42.000000000 +0100
|
||||||
@@ -0,0 +1,68 @@
|
@@ -0,0 +1,68 @@
|
||||||
+/*
|
+/*
|
||||||
+ * arch/arch/mach-ixp4xx/gateway7001-pci.c
|
+ * arch/arch/mach-ixp4xx/gateway7001-pci.c
|
||||||
|
@ -179,9 +120,9 @@ diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.19-owrt/
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+subsys_initcall(gateway7001_pci_init);
|
+subsys_initcall(gateway7001_pci_init);
|
||||||
diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/Kconfig linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Kconfig
|
diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/Kconfig linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Kconfig
|
||||||
--- linux-2.6.19/arch/arm/mach-ixp4xx/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
--- linux-2.6.19.2/arch/arm/mach-ixp4xx/Kconfig 2007-01-10 20:10:37.000000000 +0100
|
||||||
+++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Kconfig 2006-12-19 13:17:38.000000000 +0100
|
+++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Kconfig 2007-03-03 22:42:42.000000000 +0100
|
||||||
@@ -33,6 +33,14 @@
|
@@ -33,6 +33,14 @@
|
||||||
Engineering Coyote Gateway Reference Platform. For more
|
Engineering Coyote Gateway Reference Platform. For more
|
||||||
information on this platform, see <file:Documentation/arm/IXP4xx>.
|
information on this platform, see <file:Documentation/arm/IXP4xx>.
|
||||||
|
@ -197,9 +138,9 @@ diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/Kconfig linux-2.6.19-owrt/arch/arm/m
|
||||||
config ARCH_IXDP425
|
config ARCH_IXDP425
|
||||||
bool "IXDP425"
|
bool "IXDP425"
|
||||||
help
|
help
|
||||||
diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/Makefile linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Makefile
|
diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/Makefile linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Makefile
|
||||||
--- linux-2.6.19/arch/arm/mach-ixp4xx/Makefile 2006-11-29 22:57:37.000000000 +0100
|
--- linux-2.6.19.2/arch/arm/mach-ixp4xx/Makefile 2007-01-10 20:10:37.000000000 +0100
|
||||||
+++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Makefile 2006-12-19 13:17:38.000000000 +0100
|
+++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Makefile 2007-03-03 22:42:42.000000000 +0100
|
||||||
@@ -20,5 +20,6 @@
|
@@ -20,5 +20,6 @@
|
||||||
obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
|
obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
|
||||||
obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o
|
obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o
|
||||||
|
@ -207,9 +148,9 @@ diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/Makefile linux-2.6.19-owrt/arch/arm/
|
||||||
+obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o coyote-setup.o
|
+obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o coyote-setup.o
|
||||||
|
|
||||||
obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
|
obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
|
||||||
diff -Nur linux-2.6.19/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.19-owrt/include/asm-arm/arch-ixp4xx/uncompress.h
|
diff -Nur linux-2.6.19.2/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.19.2-owrt/include/asm-arm/arch-ixp4xx/uncompress.h
|
||||||
--- linux-2.6.19/include/asm-arm/arch-ixp4xx/uncompress.h 2006-11-29 22:57:37.000000000 +0100
|
--- linux-2.6.19.2/include/asm-arm/arch-ixp4xx/uncompress.h 2007-01-10 20:10:37.000000000 +0100
|
||||||
+++ linux-2.6.19-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2006-12-19 13:17:38.000000000 +0100
|
+++ linux-2.6.19.2-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2007-03-03 22:42:42.000000000 +0100
|
||||||
@@ -38,9 +38,9 @@
|
@@ -38,9 +38,9 @@
|
||||||
static __inline__ void __arch_decomp_setup(unsigned long arch_id)
|
static __inline__ void __arch_decomp_setup(unsigned long arch_id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/coyote-setup.c
|
||||||
|
--- linux-2.6.19.2/arch/arm/mach-ixp4xx/coyote-setup.c 2007-03-03 23:34:46.000000000 +0100
|
||||||
|
+++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2007-03-03 23:42:47.000000000 +0100
|
||||||
|
@@ -74,9 +74,57 @@
|
||||||
|
.resource = &coyote_uart_resource,
|
||||||
|
};
|
||||||
|
|
||||||
|
+static struct resource res_mac0 = {
|
||||||
|
+ .start = IXP4XX_EthB_BASE_PHYS,
|
||||||
|
+ .end = IXP4XX_EthB_BASE_PHYS + 0x1ff,
|
||||||
|
+ .flags = IORESOURCE_MEM,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct resource res_mac1 = {
|
||||||
|
+ .start = IXP4XX_EthC_BASE_PHYS,
|
||||||
|
+ .end = IXP4XX_EthC_BASE_PHYS + 0x1ff,
|
||||||
|
+ .flags = IORESOURCE_MEM,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct mac_plat_info plat_mac0 = {
|
||||||
|
+ .npe_id = 1,
|
||||||
|
+ .phy_id = 1,
|
||||||
|
+ .eth_id = 0,
|
||||||
|
+ .rxq_id = 27,
|
||||||
|
+ .txq_id = 24,
|
||||||
|
+ .rxdoneq_id = 4,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct mac_plat_info plat_mac1 = {
|
||||||
|
+ .npe_id = 2,
|
||||||
|
+ .phy_id = 2,
|
||||||
|
+ .eth_id = 1,
|
||||||
|
+ .rxq_id = 28,
|
||||||
|
+ .txq_id = 25,
|
||||||
|
+ .rxdoneq_id = 5,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct platform_device mac0 = {
|
||||||
|
+ .name = "ixp4xx_mac",
|
||||||
|
+ .id = 0,
|
||||||
|
+ .dev.platform_data = &plat_mac0,
|
||||||
|
+ .num_resources = 1,
|
||||||
|
+ .resource = &res_mac0,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct platform_device mac1 = {
|
||||||
|
+ .name = "ixp4xx_mac",
|
||||||
|
+ .id = 1,
|
||||||
|
+ .dev.platform_data = &plat_mac1,
|
||||||
|
+ .num_resources = 1,
|
||||||
|
+ .resource = &res_mac1,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static struct platform_device *coyote_devices[] __initdata = {
|
||||||
|
&coyote_flash,
|
||||||
|
- &coyote_uart
|
||||||
|
+ &coyote_uart,
|
||||||
|
+ &mac0,
|
||||||
|
+ &mac1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init coyote_init(void)
|
Loading…
Reference in a new issue