summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/010-rtc_new_style.patch1040
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/014_ixp4xx_i2c_gpio.patch (renamed from target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_i2c_gpio.patch)0
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/015-ixp4xx_update_defconfig.patch1726
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/016-dsmg600_auto_power_on.patch62
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/017-nas100d_auto_power_on.patch113
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_rtc_info.patch156
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/021-ixp4xx_use_leds_gpio.patch242
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/031-ixp4xx-net-drivers-nslu2.patch88
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/031-nslu2_nas100d_ethernet_support.patch235
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/032-ixp4xx-net-drivers-nas100d.patch87
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/032-subsume_power_files.patch873
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/033-velocity_be.patch897
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/091-nslu2_rtc_fixup.patch55
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/092-nas100d_rtc_fixup.patch55
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/095-dsmg600_rtc_fixup.patch56
15 files changed, 5268 insertions, 417 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.24/010-rtc_new_style.patch b/target/linux/ixp4xx/patches-2.6.24/010-rtc_new_style.patch
new file mode 100644
index 000000000..279abb1e1
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.24/010-rtc_new_style.patch
@@ -0,0 +1,1040 @@
+---
+ drivers/rtc/rtc-isl1208.c | 357 +++++++++++++++++++++-------------------------
+ 1 file changed, 170 insertions(+), 187 deletions(-)
+
+Index: linux-2.6.24-arm/drivers/rtc/rtc-isl1208.c
+===================================================================
+--- linux-2.6.24-arm.orig/drivers/rtc/rtc-isl1208.c 2008-02-01 13:33:11.000000000 +1030
++++ linux-2.6.24-arm/drivers/rtc/rtc-isl1208.c 2008-02-01 13:36:24.000000000 +1030
+@@ -15,16 +15,15 @@
+ #include <linux/bcd.h>
+ #include <linux/rtc.h>
+
+-#define DRV_NAME "isl1208"
+-#define DRV_VERSION "0.2"
++#define DRV_VERSION "0.3"
+
+ /* Register map */
+ /* rtc section */
+ #define ISL1208_REG_SC 0x00
+ #define ISL1208_REG_MN 0x01
+ #define ISL1208_REG_HR 0x02
+-#define ISL1208_REG_HR_MIL (1<<7) /* 24h/12h mode */
+-#define ISL1208_REG_HR_PM (1<<5) /* PM/AM bit in 12h mode */
++#define ISL1208_REG_HR_MIL (1<<7) /* 24h/12h mode */
++#define ISL1208_REG_HR_PM (1<<5) /* PM/AM bit in 12h mode */
+ #define ISL1208_REG_DT 0x03
+ #define ISL1208_REG_MO 0x04
+ #define ISL1208_REG_YR 0x05
+@@ -33,14 +32,14 @@
+
+ /* control/status section */
+ #define ISL1208_REG_SR 0x07
+-#define ISL1208_REG_SR_ARST (1<<7) /* auto reset */
+-#define ISL1208_REG_SR_XTOSCB (1<<6) /* crystal oscillator */
+-#define ISL1208_REG_SR_WRTC (1<<4) /* write rtc */
+-#define ISL1208_REG_SR_ALM (1<<2) /* alarm */
+-#define ISL1208_REG_SR_BAT (1<<1) /* battery */
+-#define ISL1208_REG_SR_RTCF (1<<0) /* rtc fail */
++#define ISL1208_REG_SR_ARST (1<<7) /* auto reset */
++#define ISL1208_REG_SR_XTOSCB (1<<6) /* crystal oscillator */
++#define ISL1208_REG_SR_WRTC (1<<4) /* write rtc */
++#define ISL1208_REG_SR_ALM (1<<2) /* alarm */
++#define ISL1208_REG_SR_BAT (1<<1) /* battery */
++#define ISL1208_REG_SR_RTCF (1<<0) /* rtc fail */
+ #define ISL1208_REG_INT 0x08
+-#define ISL1208_REG_09 0x09 /* reserved */
++#define ISL1208_REG_09 0x09 /* reserved */
+ #define ISL1208_REG_ATR 0x0a
+ #define ISL1208_REG_DTR 0x0b
+
+@@ -58,35 +57,18 @@
+ #define ISL1208_REG_USR2 0x13
+ #define ISL1208_USR_SECTION_LEN 2
+
+-/* i2c configuration */
+-#define ISL1208_I2C_ADDR 0xde
+-
+-static unsigned short normal_i2c[] = {
+- ISL1208_I2C_ADDR>>1, I2C_CLIENT_END
+-};
+-I2C_CLIENT_INSMOD; /* defines addr_data */
+-
+-static int isl1208_attach_adapter(struct i2c_adapter *adapter);
+-static int isl1208_detach_client(struct i2c_client *client);
+-
+-static struct i2c_driver isl1208_driver = {
+- .driver = {
+- .name = DRV_NAME,
+- },
+- .id = I2C_DRIVERID_ISL1208,
+- .attach_adapter = &isl1208_attach_adapter,
+- .detach_client = &isl1208_detach_client,
+-};
++static struct i2c_driver isl1208_driver;
+
+ /* block read */
+ static int
+ isl1208_i2c_read_regs(struct i2c_client *client, u8 reg, u8 buf[],
+- unsigned len)
++ unsigned len)
+ {
+ u8 reg_addr[1] = { reg };
+ struct i2c_msg msgs[2] = {
+- { client->addr, client->flags, sizeof(reg_addr), reg_addr },
+- { client->addr, client->flags | I2C_M_RD, len, buf }
++ {client->addr, client->flags, sizeof(reg_addr), reg_addr}
++ ,
++ {client->addr, client->flags | I2C_M_RD, len, buf}
+ };
+ int ret;
+
+@@ -103,15 +85,14 @@
+ /* block write */
+ static int
+ isl1208_i2c_set_regs(struct i2c_client *client, u8 reg, u8 const buf[],
+- unsigned len)
++ unsigned len)
+ {
+ u8 i2c_buf[ISL1208_REG_USR2 + 2];
+ struct i2c_msg msgs[1] = {
+- { client->addr, client->flags, len + 1, i2c_buf }
++ {client->addr, client->flags, len + 1, i2c_buf}
+ };
+ int ret;
+
+- BUG_ON(len == 0);
+ BUG_ON(reg > ISL1208_REG_USR2);
+ BUG_ON(reg + len > ISL1208_REG_USR2 + 1);
+
+@@ -125,7 +106,8 @@
+ }
+
+ /* simple check to see wether we have a isl1208 */
+-static int isl1208_i2c_validate_client(struct i2c_client *client)
++static int
++isl1208_i2c_validate_client(struct i2c_client *client)
+ {
+ u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
+ u8 zero_mask[ISL1208_RTC_SECTION_LEN] = {
+@@ -139,24 +121,29 @@
+ return ret;
+
+ for (i = 0; i < ISL1208_RTC_SECTION_LEN; ++i) {
+- if (regs[i] & zero_mask[i]) /* check if bits are cleared */
++ if (regs[i] & zero_mask[i]) /* check if bits are cleared */
+ return -ENODEV;
+ }
+
+ return 0;
+ }
+
+-static int isl1208_i2c_get_sr(struct i2c_client *client)
++static int
++isl1208_i2c_get_sr(struct i2c_client *client)
+ {
+- return i2c_smbus_read_byte_data(client, ISL1208_REG_SR) == -1 ? -EIO:0;
++ int sr = i2c_smbus_read_byte_data(client, ISL1208_REG_SR);
++ if (sr < 0)
++ return -EIO;
++
++ return sr;
+ }
+
+-static int isl1208_i2c_get_atr(struct i2c_client *client)
++static int
++isl1208_i2c_get_atr(struct i2c_client *client)
+ {
+ int atr = i2c_smbus_read_byte_data(client, ISL1208_REG_ATR);
+-
+ if (atr < 0)
+- return -EIO;
++ return atr;
+
+ /* The 6bit value in the ATR register controls the load
+ * capacitance C_load * in steps of 0.25pF
+@@ -169,51 +156,54 @@
+ *
+ */
+
+- atr &= 0x3f; /* mask out lsb */
+- atr ^= 1<<5; /* invert 6th bit */
+- atr += 2*9; /* add offset of 4.5pF; unit[atr] = 0.25pF */
++ atr &= 0x3f; /* mask out lsb */
++ atr ^= 1 << 5; /* invert 6th bit */
++ atr += 2 * 9; /* add offset of 4.5pF; unit[atr] = 0.25pF */
+
+ return atr;
+ }
+
+-static int isl1208_i2c_get_dtr(struct i2c_client *client)
++static int
++isl1208_i2c_get_dtr(struct i2c_client *client)
+ {
+ int dtr = i2c_smbus_read_byte_data(client, ISL1208_REG_DTR);
+-
+ if (dtr < 0)
+ return -EIO;
+
+ /* dtr encodes adjustments of {-60,-40,-20,0,20,40,60} ppm */
+- dtr = ((dtr & 0x3) * 20) * (dtr & (1<<2) ? -1 : 1);
++ dtr = ((dtr & 0x3) * 20) * (dtr & (1 << 2) ? -1 : 1);
+
+ return dtr;
+ }
+
+-static int isl1208_i2c_get_usr(struct i2c_client *client)
++static int
++isl1208_i2c_get_usr(struct i2c_client *client)
+ {
+ u8 buf[ISL1208_USR_SECTION_LEN] = { 0, };
+ int ret;
+
+- ret = isl1208_i2c_read_regs (client, ISL1208_REG_USR1, buf,
+- ISL1208_USR_SECTION_LEN);
++ ret = isl1208_i2c_read_regs(client, ISL1208_REG_USR1, buf,
++ ISL1208_USR_SECTION_LEN);
+ if (ret < 0)
+ return ret;
+
+ return (buf[1] << 8) | buf[0];
+ }
+
+-static int isl1208_i2c_set_usr(struct i2c_client *client, u16 usr)
++static int
++isl1208_i2c_set_usr(struct i2c_client *client, u16 usr)
+ {
+ u8 buf[ISL1208_USR_SECTION_LEN];
+
+ buf[0] = usr & 0xff;
+ buf[1] = (usr >> 8) & 0xff;
+
+- return isl1208_i2c_set_regs (client, ISL1208_REG_USR1, buf,
+- ISL1208_USR_SECTION_LEN);
++ return isl1208_i2c_set_regs(client, ISL1208_REG_USR1, buf,
++ ISL1208_USR_SECTION_LEN);
+ }
+
+-static int isl1208_rtc_proc(struct device *dev, struct seq_file *seq)
++static int
++isl1208_rtc_proc(struct device *dev, struct seq_file *seq)
+ {
+ struct i2c_client *const client = to_i2c_client(dev);
+ int sr, dtr, atr, usr;
+@@ -230,20 +220,19 @@
+ (sr & ISL1208_REG_SR_ALM) ? " ALM" : "",
+ (sr & ISL1208_REG_SR_WRTC) ? " WRTC" : "",
+ (sr & ISL1208_REG_SR_XTOSCB) ? " XTOSCB" : "",
+- (sr & ISL1208_REG_SR_ARST) ? " ARST" : "",
+- sr);
++ (sr & ISL1208_REG_SR_ARST) ? " ARST" : "", sr);
+
+ seq_printf(seq, "batt_status\t: %s\n",
+ (sr & ISL1208_REG_SR_RTCF) ? "bad" : "okay");
+
+ dtr = isl1208_i2c_get_dtr(client);
+- if (dtr >= 0 -1)
++ if (dtr >= 0 - 1)
+ seq_printf(seq, "digital_trim\t: %d ppm\n", dtr);
+
+ atr = isl1208_i2c_get_atr(client);
+ if (atr >= 0)
+ seq_printf(seq, "analog_trim\t: %d.%.2d pF\n",
+- atr>>2, (atr&0x3)*25);
++ atr >> 2, (atr & 0x3) * 25);
+
+ usr = isl1208_i2c_get_usr(client);
+ if (usr >= 0)
+@@ -252,9 +241,8 @@
+ return 0;
+ }
+
+-
+-static int isl1208_i2c_read_time(struct i2c_client *client,
+- struct rtc_time *tm)
++static int
++isl1208_i2c_read_time(struct i2c_client *client, struct rtc_time *tm)
+ {
+ int sr;
+ u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
+@@ -274,27 +262,30 @@
+
+ tm->tm_sec = BCD2BIN(regs[ISL1208_REG_SC]);
+ tm->tm_min = BCD2BIN(regs[ISL1208_REG_MN]);
+- { /* HR field has a more complex interpretation */
++
++ /* HR field has a more complex interpretation */
++ {
+ const u8 _hr = regs[ISL1208_REG_HR];
+- if (_hr & ISL1208_REG_HR_MIL) /* 24h format */
++ if (_hr & ISL1208_REG_HR_MIL) /* 24h format */
+ tm->tm_hour = BCD2BIN(_hr & 0x3f);
+- else { // 12h format
++ else {
++ /* 12h format */
+ tm->tm_hour = BCD2BIN(_hr & 0x1f);
+- if (_hr & ISL1208_REG_HR_PM) /* PM flag set */
++ if (_hr & ISL1208_REG_HR_PM) /* PM flag set */
+ tm->tm_hour += 12;
+ }
+ }
+
+ tm->tm_mday = BCD2BIN(regs[ISL1208_REG_DT]);
+- tm->tm_mon = BCD2BIN(regs[ISL1208_REG_MO]) - 1; /* rtc starts at 1 */
++ tm->tm_mon = BCD2BIN(regs[ISL1208_REG_MO]) - 1; /* rtc starts at 1 */
+ tm->tm_year = BCD2BIN(regs[ISL1208_REG_YR]) + 100;
+ tm->tm_wday = BCD2BIN(regs[ISL1208_REG_DW]);
+
+ return 0;
+ }
+
+-static int isl1208_i2c_read_alarm(struct i2c_client *client,
+- struct rtc_wkalrm *alarm)
++static int
++isl1208_i2c_read_alarm(struct i2c_client *client, struct rtc_wkalrm *alarm)
+ {
+ struct rtc_time *const tm = &alarm->time;
+ u8 regs[ISL1208_ALARM_SECTION_LEN] = { 0, };
+@@ -307,7 +298,7 @@
+ }
+
+ sr = isl1208_i2c_read_regs(client, ISL1208_REG_SCA, regs,
+- ISL1208_ALARM_SECTION_LEN);
++ ISL1208_ALARM_SECTION_LEN);
+ if (sr < 0) {
+ dev_err(&client->dev, "%s: reading alarm section failed\n",
+ __func__);
+@@ -315,23 +306,25 @@
+ }
+
+ /* MSB of each alarm register is an enable bit */
+- tm->tm_sec = BCD2BIN(regs[ISL1208_REG_SCA-ISL1208_REG_SCA] & 0x7f);
+- tm->tm_min = BCD2BIN(regs[ISL1208_REG_MNA-ISL1208_REG_SCA] & 0x7f);
+- tm->tm_hour = BCD2BIN(regs[ISL1208_REG_HRA-ISL1208_REG_SCA] & 0x3f);
+- tm->tm_mday = BCD2BIN(regs[ISL1208_REG_DTA-ISL1208_REG_SCA] & 0x3f);
+- tm->tm_mon = BCD2BIN(regs[ISL1208_REG_MOA-ISL1208_REG_SCA] & 0x1f)-1;
+- tm->tm_wday = BCD2BIN(regs[ISL1208_REG_DWA-ISL1208_REG_SCA] & 0x03);
++ tm->tm_sec = BCD2BIN(regs[ISL1208_REG_SCA - ISL1208_REG_SCA] & 0x7f);
++ tm->tm_min = BCD2BIN(regs[ISL1208_REG_MNA - ISL1208_REG_SCA] & 0x7f);
++ tm->tm_hour = BCD2BIN(regs[ISL1208_REG_HRA - ISL1208_REG_SCA] & 0x3f);
++ tm->tm_mday = BCD2BIN(regs[ISL1208_REG_DTA - ISL1208_REG_SCA] & 0x3f);
++ tm->tm_mon =
++ BCD2BIN(regs[ISL1208_REG_MOA - ISL1208_REG_SCA] & 0x1f) - 1;
++ tm->tm_wday = BCD2BIN(regs[ISL1208_REG_DWA - ISL1208_REG_SCA] & 0x03);
+
+ return 0;
+ }
+
+-static int isl1208_rtc_read_time(struct device *dev, struct rtc_time *tm)
++static int
++isl1208_rtc_read_time(struct device *dev, struct rtc_time *tm)
+ {
+ return isl1208_i2c_read_time(to_i2c_client(dev), tm);
+ }
+
+-static int isl1208_i2c_set_time(struct i2c_client *client,
+- struct rtc_time const *tm)
++static int
++isl1208_i2c_set_time(struct i2c_client *client, struct rtc_time const *tm)
+ {
+ int sr;
+ u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
+@@ -353,7 +346,7 @@
+ }
+
+ /* set WRTC */
+- sr = i2c_smbus_write_byte_data (client, ISL1208_REG_SR,
++ sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR,
+ sr | ISL1208_REG_SR_WRTC);
+ if (sr < 0) {
+ dev_err(&client->dev, "%s: writing SR failed\n", __func__);
+@@ -369,7 +362,7 @@
+ }
+
+ /* clear WRTC again */
+- sr = i2c_smbus_write_byte_data (client, ISL1208_REG_SR,
++ sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR,
+ sr & ~ISL1208_REG_SR_WRTC);
+ if (sr < 0) {
+ dev_err(&client->dev, "%s: writing SR failed\n", __func__);
+@@ -380,70 +373,69 @@
+ }
+
+
+-static int isl1208_rtc_set_time(struct device *dev, struct rtc_time *tm)
++static int
++isl1208_rtc_set_time(struct device *dev, struct rtc_time *tm)
+ {
+ return isl1208_i2c_set_time(to_i2c_client(dev), tm);
+ }
+
+-static int isl1208_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
++static int
++isl1208_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
+ {
+ return isl1208_i2c_read_alarm(to_i2c_client(dev), alarm);
+ }
+
+ static const struct rtc_class_ops isl1208_rtc_ops = {
+- .proc = isl1208_rtc_proc,
+- .read_time = isl1208_rtc_read_time,
+- .set_time = isl1208_rtc_set_time,
+- .read_alarm = isl1208_rtc_read_alarm,
+- //.set_alarm = isl1208_rtc_set_alarm,
++ .proc = isl1208_rtc_proc,
++ .read_time = isl1208_rtc_read_time,
++ .set_time = isl1208_rtc_set_time,
++ .read_alarm = isl1208_rtc_read_alarm,
++ /*.set_alarm = isl1208_rtc_set_alarm, */
+ };
+
+ /* sysfs interface */
+
+-static ssize_t isl1208_sysfs_show_atrim(struct device *dev,
+- struct device_attribute *attr,
+- char *buf)
++static ssize_t
++isl1208_sysfs_show_atrim(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+- int atr;
+-
+- atr = isl1208_i2c_get_atr(to_i2c_client(dev));
++ int atr = isl1208_i2c_get_atr(to_i2c_client(dev));
+ if (atr < 0)
+ return atr;
+
+- return sprintf(buf, "%d.%.2d pF\n", atr>>2, (atr&0x3)*25);
++ return sprintf(buf, "%d.%.2d pF\n", atr >> 2, (atr & 0x3) * 25);
+ }
++
+ static DEVICE_ATTR(atrim, S_IRUGO, isl1208_sysfs_show_atrim, NULL);
+
+-static ssize_t isl1208_sysfs_show_dtrim(struct device *dev,
+- struct device_attribute *attr,
+- char *buf)
++static ssize_t
++isl1208_sysfs_show_dtrim(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+- int dtr;
+-
+- dtr = isl1208_i2c_get_dtr(to_i2c_client(dev));
++ int dtr = isl1208_i2c_get_dtr(to_i2c_client(dev));
+ if (dtr < 0)
+ return dtr;
+
+ return sprintf(buf, "%d ppm\n", dtr);
+ }
++
+ static DEVICE_ATTR(dtrim, S_IRUGO, isl1208_sysfs_show_dtrim, NULL);
+
+-static ssize_t isl1208_sysfs_show_usr(struct device *dev,
+- struct device_attribute *attr,
+- char *buf)
++static ssize_t
++isl1208_sysfs_show_usr(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+- int usr;
+-
+- usr = isl1208_i2c_get_usr(to_i2c_client(dev));
++ int usr = isl1208_i2c_get_usr(to_i2c_client(dev));
+ if (usr < 0)
+ return usr;
+
+ return sprintf(buf, "0x%.4x\n", usr);
+ }
+
+-static ssize_t isl1208_sysfs_store_usr(struct device *dev,
+- struct device_attribute *attr,
+- const char *buf, size_t count)
++static ssize_t
++isl1208_sysfs_store_usr(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
+ {
+ int usr = -1;
+
+@@ -460,124 +452,116 @@
+
+ return isl1208_i2c_set_usr(to_i2c_client(dev), usr) ? -EIO : count;
+ }
++
+ static DEVICE_ATTR(usr, S_IRUGO | S_IWUSR, isl1208_sysfs_show_usr,
+ isl1208_sysfs_store_usr);
+
+ static int
+-isl1208_probe(struct i2c_adapter *adapter, int addr, int kind)
++isl1208_sysfs_register(struct device *dev)
+ {
+- int rc = 0;
+- struct i2c_client *new_client = NULL;
+- struct rtc_device *rtc = NULL;
++ int err;
++
++ err = device_create_file(dev, &dev_attr_atrim);
++ if (err)
++ return err;
+
+- if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
+- rc = -ENODEV;
+- goto failout;
++ err = device_create_file(dev, &dev_attr_dtrim);
++ if (err) {
++ device_remove_file(dev, &dev_attr_atrim);
++ return err;
+ }
+
+- new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
+- if (new_client == NULL) {
+- rc = -ENOMEM;
+- goto failout;
++ err = device_create_file(dev, &dev_attr_usr);
++ if (err) {
++ device_remove_file(dev, &dev_attr_atrim);
++ device_remove_file(dev, &dev_attr_dtrim);
+ }
+
+- new_client->addr = addr;
+- new_client->adapter = adapter;
+- new_client->driver = &isl1208_driver;
+- new_client->flags = 0;
+- strcpy(new_client->name, DRV_NAME);
++ return 0;
++}
+
+- if (kind < 0) {
+- rc = isl1208_i2c_validate_client(new_client);
+- if (rc < 0)
+- goto failout;
+- }
++static int
++isl1208_sysfs_unregister(struct device *dev)
++{
++ device_remove_file(dev, &dev_attr_atrim);
++ device_remove_file(dev, &dev_attr_atrim);
++ device_remove_file(dev, &dev_attr_usr);
++
++ return 0;
++}
++
++static int
++isl1208_probe(struct i2c_client *client)
++{
++ int rc = 0;
++ struct rtc_device *rtc;
+
+- rc = i2c_attach_client(new_client);
+- if (rc < 0)
+- goto failout;
++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
++ return -ENODEV;
+
+- dev_info(&new_client->dev,
++ if (isl1208_i2c_validate_client(client) < 0)
++ return -ENODEV;
++
++ dev_info(&client->dev,
+ "chip found, driver version " DRV_VERSION "\n");
+
+ rtc = rtc_device_register(isl1208_driver.driver.name,
+- &new_client->dev,
+- &isl1208_rtc_ops, THIS_MODULE);
+-
+- if (IS_ERR(rtc)) {
+- rc = PTR_ERR(rtc);
+- goto failout_detach;
+- }
++ &client->dev, &isl1208_rtc_ops,
++ THIS_MODULE);
++ if (IS_ERR(rtc))
++ return PTR_ERR(rtc);
+
+- i2c_set_clientdata(new_client, rtc);
++ i2c_set_clientdata(client, rtc);
+
+- rc = isl1208_i2c_get_sr(new_client);
++ rc = isl1208_i2c_get_sr(client);
+ if (rc < 0) {
+- dev_err(&new_client->dev, "reading status failed\n");
+- goto failout_unregister;
++ dev_err(&client->dev, "reading status failed\n");
++ goto exit_unregister;
+ }
+
+ if (rc & ISL1208_REG_SR_RTCF)
+- dev_warn(&new_client->dev, "rtc power failure detected, "
++ dev_warn(&client->dev, "rtc power failure detected, "
+ "please set clock.\n");
+
+- rc = device_create_file(&new_client->dev, &dev_attr_atrim);
+- if (rc < 0)
+- goto failout_unregister;
+- rc = device_create_file(&new_client->dev, &dev_attr_dtrim);
+- if (rc < 0)
+- goto failout_atrim;
+- rc = device_create_file(&new_client->dev, &dev_attr_usr);
+- if (rc < 0)
+- goto failout_dtrim;
++ rc = isl1208_sysfs_register(&client->dev);
++ if (rc)
++ goto exit_unregister;
+
+ return 0;
+
+- failout_dtrim:
+- device_remove_file(&new_client->dev, &dev_attr_dtrim);
+- failout_atrim:
+- device_remove_file(&new_client->dev, &dev_attr_atrim);
+- failout_unregister:
++ exit_unregister:
+ rtc_device_unregister(rtc);
+- failout_detach:
+- i2c_detach_client(new_client);
+- failout:
+- kfree(new_client);
+- return rc;
+-}
+
+-static int
+-isl1208_attach_adapter (struct i2c_adapter *adapter)
+-{
+- return i2c_probe(adapter, &addr_data, isl1208_probe);
++ return rc;
+ }
+
+ static int
+-isl1208_detach_client(struct i2c_client *client)
++isl1208_remove(struct i2c_client *client)
+ {
+- int rc;
+- struct rtc_device *const rtc = i2c_get_clientdata(client);
+-
+- if (rtc)
+- rtc_device_unregister(rtc); /* do we need to kfree? */
+-
+- rc = i2c_detach_client(client);
+- if (rc)
+- return rc;
++ struct rtc_device *rtc = i2c_get_clientdata(client);
+
+- kfree(client);
++ isl1208_sysfs_unregister(&client->dev);
++ rtc_device_unregister(rtc);
+
+ return 0;
+ }
+
+-/* module management */
++static struct i2c_driver isl1208_driver = {
++ .driver = {
++ .name = "rtc-isl1208",
++ },
++ .probe = isl1208_probe,
++ .remove = isl1208_remove,
++};
+
+-static int __init isl1208_init(void)
++static int __init
++isl1208_init(void)
+ {
+ return i2c_add_driver(&isl1208_driver);
+ }
+
+-static void __exit isl1208_exit(void)
++static void __exit
++isl1208_exit(void)
+ {
+ i2c_del_driver(&isl1208_driver);
+ }
+---
+ drivers/rtc/rtc-pcf8563.c | 109 +++++++++++++---------------------------------
+ 1 file changed, 32 insertions(+), 77 deletions(-)
+
+Index: linux-2.6.24-armeb/drivers/rtc/rtc-pcf8563.c
+===================================================================
+--- linux-2.6.24-armeb.orig/drivers/rtc/rtc-pcf8563.c 2008-01-30 13:50:01.000000000 +1030
++++ linux-2.6.24-armeb/drivers/rtc/rtc-pcf8563.c 2008-01-30 13:51:55.000000000 +1030
+@@ -18,17 +18,7 @@
+ #include <linux/bcd.h>
+ #include <linux/rtc.h>
+
+-#define DRV_VERSION "0.4.2"
+-
+-/* Addresses to scan: none
+- * This chip cannot be reliably autodetected. An empty eeprom
+- * located at 0x51 will pass the validation routine due to
+- * the way the registers are implemented.
+- */
+-static unsigned short normal_i2c[] = { I2C_CLIENT_END };
+-
+-/* Module parameters */
+-I2C_CLIENT_INSMOD;
++#define DRV_VERSION "0.4.3"
+
+ #define PCF8563_REG_ST1 0x00 /* status */
+ #define PCF8563_REG_ST2 0x01
+@@ -53,8 +43,10 @@
+ #define PCF8563_SC_LV 0x80 /* low voltage */
+ #define PCF8563_MO_C 0x80 /* century */
+
++static struct i2c_driver pcf8563_driver;
++
+ struct pcf8563 {
+- struct i2c_client client;
++ struct rtc_device *rtc;
+ /*
+ * The meaning of MO_C bit varies by the chip type.
+ * From PCF8563 datasheet: this bit is toggled when the years
+@@ -72,16 +64,13 @@
+ int c_polarity; /* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */
+ };
+
+-static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind);
+-static int pcf8563_detach(struct i2c_client *client);
+-
+ /*
+ * In the routines that deal directly with the pcf8563 hardware, we use
+ * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch.
+ */
+ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
+ {
+- struct pcf8563 *pcf8563 = container_of(client, struct pcf8563, client);
++ struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
+ unsigned char buf[13] = { PCF8563_REG_ST1 };
+
+ struct i2c_msg msgs[] = {
+@@ -138,7 +127,7 @@
+
+ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
+ {
+- struct pcf8563 *pcf8563 = container_of(client, struct pcf8563, client);
++ struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
+ int i, err;
+ unsigned char buf[9];
+
+@@ -257,100 +246,66 @@
+ .set_time = pcf8563_rtc_set_time,
+ };
+
+-static int pcf8563_attach(struct i2c_adapter *adapter)
+-{
+- return i2c_probe(adapter, &addr_data, pcf8563_probe);
+-}
+-
+-static struct i2c_driver pcf8563_driver = {
+- .driver = {
+- .name = "pcf8563",
+- },
+- .id = I2C_DRIVERID_PCF8563,
+- .attach_adapter = &pcf8563_attach,
+- .detach_client = &pcf8563_detach,
+-};
+-
+-static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind)
++static int pcf8563_probe(struct i2c_client *client)
+ {
+ struct pcf8563 *pcf8563;
+- struct i2c_client *client;
+- struct rtc_device *rtc;
+
+ int err = 0;
+
+- dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&client->dev, "%s\n", __FUNCTION__);
+
+- if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
+- err = -ENODEV;
+- goto exit;
+- }
++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
++ return -ENODEV;
+
+- if (!(pcf8563 = kzalloc(sizeof(struct pcf8563), GFP_KERNEL))) {
+- err = -ENOMEM;
+- goto exit;
+- }
+-
+- client = &pcf8563->client;
+- client->addr = address;
+- client->driver = &pcf8563_driver;
+- client->adapter = adapter;
+-
+- strlcpy(client->name, pcf8563_driver.driver.name, I2C_NAME_SIZE);
++ if (!(pcf8563 = kzalloc(sizeof(struct pcf8563), GFP_KERNEL)))
++ return -ENOMEM;
+
+ /* Verify the chip is really an PCF8563 */
+- if (kind < 0) {
+- if (pcf8563_validate_client(client) < 0) {
+- err = -ENODEV;
+- goto exit_kfree;
+- }
+- }
+-
+- /* Inform the i2c layer */
+- if ((err = i2c_attach_client(client)))
++ if (pcf8563_validate_client(client) < 0) {
++ err = -ENODEV;
+ goto exit_kfree;
++ }
+
+ dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
+
+- rtc = rtc_device_register(pcf8563_driver.driver.name, &client->dev,
++ pcf8563->rtc = rtc_device_register(pcf8563_driver.driver.name, &client->dev,
+ &pcf8563_rtc_ops, THIS_MODULE);
+
+- if (IS_ERR(rtc)) {
+- err = PTR_ERR(rtc);
+- goto exit_detach;
++ if (IS_ERR(pcf8563->rtc)) {
++ err = PTR_ERR(pcf8563->rtc);
++ goto exit_kfree;
+ }
+
+- i2c_set_clientdata(client, rtc);
++ i2c_set_clientdata(client, pcf8563);
+
+ return 0;
+
+-exit_detach:
+- i2c_detach_client(client);
+-
+ exit_kfree:
+ kfree(pcf8563);
+
+-exit:
+ return err;
+ }
+
+-static int pcf8563_detach(struct i2c_client *client)
++static int pcf8563_remove(struct i2c_client *client)
+ {
+- struct pcf8563 *pcf8563 = container_of(client, struct pcf8563, client);
+- int err;
+- struct rtc_device *rtc = i2c_get_clientdata(client);
++ struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
+
+- if (rtc)
+- rtc_device_unregister(rtc);
+-
+- if ((err = i2c_detach_client(client)))
+- return err;
++ if (pcf8563->rtc)
++ rtc_device_unregister(pcf8563->rtc);
+
+ kfree(pcf8563);
+
+ return 0;
+ }
+
++static struct i2c_driver pcf8563_driver = {
++ .driver = {
++ .name = "rtc-pcf8563",
++ },
++ .probe = pcf8563_probe,
++ .remove = pcf8563_remove,
++};
++
+ static int __init pcf8563_init(void)
+ {
+ return i2c_add_driver(&pcf8563_driver);
+---
+ drivers/rtc/rtc-x1205.c | 128 ++++++++++++++++--------------------------------
+ 1 file changed, 43 insertions(+), 85 deletions(-)
+
+Index: linux-2.6.24-armeb/drivers/rtc/rtc-x1205.c
+===================================================================
+--- linux-2.6.24-armeb.orig/drivers/rtc/rtc-x1205.c 2008-01-30 13:50:44.000000000 +1030
++++ linux-2.6.24-armeb/drivers/rtc/rtc-x1205.c 2008-01-30 13:51:35.000000000 +1030
+@@ -22,20 +22,7 @@
+ #include <linux/rtc.h>
+ #include <linux/delay.h>
+
+-#define DRV_VERSION "1.0.7"
+-
+-/* Addresses to scan: none. This chip is located at
+- * 0x6f and uses a two bytes register addressing.
+- * Two bytes need to be written to read a single register,
+- * while most other chips just require one and take the second
+- * one as the data to be written. To prevent corrupting
+- * unknown chips, the user must explicitly set the probe parameter.
+- */
+-
+-static unsigned short normal_i2c[] = { I2C_CLIENT_END };
+-
+-/* Insmod parameters */
+-I2C_CLIENT_INSMOD;
++#define DRV_VERSION "1.0.8"
+
+ /* offsets into CCR area */
+
+@@ -91,19 +78,7 @@
+
+ #define X1205_HR_MIL 0x80 /* Set in ccr.hour for 24 hr mode */
+
+-/* Prototypes */
+-static int x1205_attach(struct i2c_adapter *adapter);
+-static int x1205_detach(struct i2c_client *client);
+-static int x1205_probe(struct i2c_adapter *adapter, int address, int kind);
+-
+-static struct i2c_driver x1205_driver = {
+- .driver = {
+- .name = "x1205",
+- },
+- .id = I2C_DRIVERID_X1205,
+- .attach_adapter = &x1205_attach,
+- .detach_client = &x1205_detach,
+-};
++static struct i2c_driver x1205_driver;
+
+ /*
+ * In the routines that deal directly with the x1205 hardware, we use
+@@ -497,58 +472,51 @@
+ }
+ static DEVICE_ATTR(dtrim, S_IRUGO, x1205_sysfs_show_dtrim, NULL);
+
+-static int x1205_attach(struct i2c_adapter *adapter)
++static int x1205_sysfs_register(struct device *dev)
++{
++ int err;
++
++ err = device_create_file(dev, &dev_attr_atrim);
++ if (err)
++ return err;
++
++ err = device_create_file(dev, &dev_attr_dtrim);
++ if (err)
++ device_remove_file(dev, &dev_attr_atrim);
++
++ return err;
++}
++
++static void x1205_sysfs_unregister(struct device *dev)
+ {
+- return i2c_probe(adapter, &addr_data, x1205_probe);
++ device_remove_file(dev, &dev_attr_atrim);
++ device_remove_file(dev, &dev_attr_dtrim);
+ }
+
+-static int x1205_probe(struct i2c_adapter *adapter, int address, int kind)
++
++static int x1205_probe(struct i2c_client *client)
+ {
+ int err = 0;
+ unsigned char sr;
+- struct i2c_client *client;
+ struct rtc_device *rtc;
+
+- dev_dbg(&adapter->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&client->dev, "%s\n", __FUNCTION__);
+
+- if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) {
+- err = -ENODEV;
+- goto exit;
++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
++ return -ENODEV;
+ }
+
+- if (!(client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL))) {
+- err = -ENOMEM;
+- goto exit;
++ if (x1205_validate_client(client) < 0) {
++ return -ENODEV;
+ }
+
+- /* I2C client */
+- client->addr = address;
+- client->driver = &x1205_driver;
+- client->adapter = adapter;
+-
+- strlcpy(client->name, x1205_driver.driver.name, I2C_NAME_SIZE);
+-
+- /* Verify the chip is really an X1205 */
+- if (kind < 0) {
+- if (x1205_validate_client(client) < 0) {
+- err = -ENODEV;
+- goto exit_kfree;
+- }
+- }
+-
+- /* Inform the i2c layer */
+- if ((err = i2c_attach_client(client)))
+- goto exit_kfree;
+-
+ dev_info(&client->dev, "chip found, driver version " DRV_VERSION "\n");
+
+ rtc = rtc_device_register(x1205_driver.driver.name, &client->dev,
+ &x1205_rtc_ops, THIS_MODULE);
+
+- if (IS_ERR(rtc)) {
+- err = PTR_ERR(rtc);
+- goto exit_detach;
+- }
++ if (IS_ERR(rtc))
++ return PTR_ERR(rtc);
+
+ i2c_set_clientdata(client, rtc);
+
+@@ -565,45 +533,35 @@
+ else
+ dev_err(&client->dev, "couldn't read status\n");
+
+- err = device_create_file(&client->dev, &dev_attr_atrim);
+- if (err) goto exit_devreg;
+- err = device_create_file(&client->dev, &dev_attr_dtrim);
+- if (err) goto exit_atrim;
++ err = x1205_sysfs_register(&client->dev);
++ if (err)
++ goto exit_devreg;
+
+ return 0;
+
+-exit_atrim:
+- device_remove_file(&client->dev, &dev_attr_atrim);
+-
+ exit_devreg:
+ rtc_device_unregister(rtc);
+
+-exit_detach:
+- i2c_detach_client(client);
+-
+-exit_kfree:
+- kfree(client);
+-
+-exit:
+ return err;
+ }
+
+-static int x1205_detach(struct i2c_client *client)
++static int x1205_remove(struct i2c_client *client)
+ {
+- int err;
+ struct rtc_device *rtc = i2c_get_clientdata(client);
+
+- if (rtc)
+- rtc_device_unregister(rtc);
+-
+- if ((err = i2c_detach_client(client)))
+- return err;
+-
+- kfree(client);
+-
++ rtc_device_unregister(rtc);
++ x1205_sysfs_unregister(&client->dev);
+ return 0;
+ }
+
++static struct i2c_driver x1205_driver = {
++ .driver = {
++ .name = "rtc-x1205",
++ },
++ .probe = x1205_probe,
++ .remove = x1205_remove,
++};
++
+ static int __init x1205_init(void)
+ {
+ return i2c_add_driver(&x1205_driver);
diff --git a/target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_i2c_gpio.patch b/target/linux/ixp4xx/patches-2.6.24/014_ixp4xx_i2c_gpio.patch
index b1b561232..b1b561232 100644
--- a/target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_i2c_gpio.patch
+++ b/target/linux/ixp4xx/patches-2.6.24/014_ixp4xx_i2c_gpio.patch
diff --git a/target/linux/ixp4xx/patches-2.6.24/015-ixp4xx_update_defconfig.patch b/target/linux/ixp4xx/patches-2.6.24/015-ixp4xx_update_defconfig.patch
new file mode 100644
index 000000000..c52c15c2d
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.24/015-ixp4xx_update_defconfig.patch
@@ -0,0 +1,1726 @@
+From 9882d8cedd79d23e939fa5f6017253f63fc97821 Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 09:41:10 +1030
+Subject: ixp4xx: Update ixp4xx_defconfig, enabling all supported boards (Patch #4766)
+
+This updates the defconfig for the ixp4xx machine in arch/arm/config
+taking all the defaults, with the following additions:
+
+1) Enable support for the nslu2, loft, gateway7001, wg302v2,
+ dsmg600, and gtwx5715 boards.
+2) Enable EABI, OABI, HOTPLUG and FW_LOADER.
+3) Enable the RTC subsystem, with drivers for the RTC chips on the
+ nslu2 (x1205) and nas100d/dsmg600 (pcf8563) boards.
+4) Enable the LEDS subsystem to support the nslu2, nas100d and
+ dsmg600 boards. Enable the ixp4xx beeper driver.
+5) Enable the USB subsystem, USB host driver support and USB mass
+ storage support (required for boot disk on nslu2 board).
+6) Enable the ATA subsystem, with drivers for the nas100d/dsmg600
+ (pata_artop) and avila (ixp4xx_cf) boards.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
+
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git5
+
+diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
+index db850a5..2d5ae33 100644
+--- a/arch/arm/configs/ixp4xx_defconfig
++++ b/arch/arm/configs/ixp4xx_defconfig
+@@ -1,69 +1,96 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.15
+-# Tue Jan 3 03:20:40 2006
++# Linux kernel version: 2.6.24-rc8
++# Wed Jan 23 17:26:16 2008
+ #
+ CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_GENERIC_CLOCKEVENTS=y
+ CONFIG_MMU=y
+-CONFIG_UID16=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=y
++CONFIG_STACKTRACE_SUPPORT=y
++CONFIG_LOCKDEP_SUPPORT=y
++CONFIG_TRACE_IRQFLAGS_SUPPORT=y
++CONFIG_HARDIRQS_SW_RESEND=y
++CONFIG_GENERIC_IRQ_PROBE=y
+ CONFIG_RWSEM_GENERIC_SPINLOCK=y
++# CONFIG_ARCH_HAS_ILOG2_U32 is not set
++# CONFIG_ARCH_HAS_ILOG2_U64 is not set
++CONFIG_GENERIC_HWEIGHT=y
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
++CONFIG_ZONE_DMA=y
++CONFIG_VECTORS_BASE=0xffff0000
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+ #
+-# Code maturity level options
++# General setup
+ #
+ CONFIG_EXPERIMENTAL=y
+-CONFIG_CLEAN_COMPILE=y
+ CONFIG_BROKEN_ON_SMP=y
+ CONFIG_INIT_ENV_ARG_LIMIT=32
+-
+-#
+-# General setup
+-#
+ CONFIG_LOCALVERSION=""
+ CONFIG_LOCALVERSION_AUTO=y
+ CONFIG_SWAP=y
+ CONFIG_SYSVIPC=y
++CONFIG_SYSVIPC_SYSCTL=y
+ # CONFIG_POSIX_MQUEUE is not set
+ CONFIG_BSD_PROCESS_ACCT=y
+ # CONFIG_BSD_PROCESS_ACCT_V3 is not set
+-CONFIG_SYSCTL=y
++# CONFIG_TASKSTATS is not set
++# CONFIG_USER_NS is not set
++# CONFIG_PID_NS is not set
+ # CONFIG_AUDIT is not set
+-# CONFIG_HOTPLUG is not set
+-CONFIG_KOBJECT_UEVENT=y
+ # CONFIG_IKCONFIG is not set
++CONFIG_LOG_BUF_SHIFT=14
++# CONFIG_CGROUPS is not set
++CONFIG_FAIR_GROUP_SCHED=y
++CONFIG_FAIR_USER_SCHED=y
++# CONFIG_FAIR_CGROUP_SCHED is not set
++CONFIG_SYSFS_DEPRECATED=y
++# CONFIG_RELAY is not set
++CONFIG_BLK_DEV_INITRD=y
+ CONFIG_INITRAMFS_SOURCE=""
+ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++CONFIG_SYSCTL=y
+ CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++CONFIG_SYSCTL_SYSCALL=y
+ CONFIG_KALLSYMS=y
+ # CONFIG_KALLSYMS_ALL is not set
+ # CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
+ CONFIG_PRINTK=y
+ CONFIG_BUG=y
++CONFIG_ELF_CORE=y
+ CONFIG_BASE_FULL=y
+ CONFIG_FUTEX=y
++CONFIG_ANON_INODES=y
+ CONFIG_EPOLL=y
++CONFIG_SIGNALFD=y
++CONFIG_EVENTFD=y
+ CONFIG_SHMEM=y
+-CONFIG_CC_ALIGN_FUNCTIONS=0
+-CONFIG_CC_ALIGN_LABELS=0
+-CONFIG_CC_ALIGN_LOOPS=0
+-CONFIG_CC_ALIGN_JUMPS=0
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_SLUB_DEBUG=y
++# CONFIG_SLAB is not set
++CONFIG_SLUB=y
++# CONFIG_SLOB is not set
++CONFIG_SLABINFO=y
++CONFIG_RT_MUTEXES=y
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
+-
+-#
+-# Loadable module support
+-#
+ CONFIG_MODULES=y
+ # CONFIG_MODULE_UNLOAD is not set
+-CONFIG_OBSOLETE_MODPARM=y
+ CONFIG_MODVERSIONS=y
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ CONFIG_KMOD=y
+-
+-#
+-# Block layer
+-#
++CONFIG_BLOCK=y
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_LSF is not set
++# CONFIG_BLK_DEV_BSG is not set
+
+ #
+ # IO Schedulers
+@@ -81,28 +108,39 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
+ #
+ # System Type
+ #
++# CONFIG_ARCH_AAEC2000 is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_REALVIEW is not set
++# CONFIG_ARCH_VERSATILE is not set
++# CONFIG_ARCH_AT91 is not set
+ # CONFIG_ARCH_CLPS7500 is not set
+ # CONFIG_ARCH_CLPS711X is not set
+ # CONFIG_ARCH_CO285 is not set
+ # CONFIG_ARCH_EBSA110 is not set
++# CONFIG_ARCH_EP93XX is not set
+ # CONFIG_ARCH_FOOTBRIDGE is not set
+-# CONFIG_ARCH_INTEGRATOR is not set
+-# CONFIG_ARCH_IOP3XX is not set
+-CONFIG_ARCH_IXP4XX=y
++# CONFIG_ARCH_NETX is not set
++# CONFIG_ARCH_H720X is not set
++# CONFIG_ARCH_IMX is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IXP23XX is not set
+ # CONFIG_ARCH_IXP2000 is not set
++CONFIG_ARCH_IXP4XX=y
+ # CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_KS8695 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_MXC is not set
++# CONFIG_ARCH_PNX4008 is not set
+ # CONFIG_ARCH_PXA is not set
+ # CONFIG_ARCH_RPC is not set
+ # CONFIG_ARCH_SA1100 is not set
+ # CONFIG_ARCH_S3C2410 is not set
+ # CONFIG_ARCH_SHARK is not set
+ # CONFIG_ARCH_LH7A40X is not set
++# CONFIG_ARCH_DAVINCI is not set
+ # CONFIG_ARCH_OMAP is not set
+-# CONFIG_ARCH_VERSATILE is not set
+-# CONFIG_ARCH_REALVIEW is not set
+-# CONFIG_ARCH_IMX is not set
+-# CONFIG_ARCH_H720X is not set
+-# CONFIG_ARCH_AAEC2000 is not set
+ CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
+
+ #
+@@ -112,8 +150,12 @@ CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
+ #
+ # IXP4xx Platforms
+ #
+-CONFIG_ARCH_AVILA=y
++CONFIG_MACH_NSLU2=y
++CONFIG_MACH_AVILA=y
++CONFIG_MACH_LOFT=y
+ CONFIG_ARCH_ADI_COYOTE=y
++CONFIG_MACH_GATEWAY7001=y
++CONFIG_MACH_WG302V2=y
+ CONFIG_ARCH_IXDP425=y
+ CONFIG_MACH_IXDPG425=y
+ CONFIG_MACH_IXDP465=y
+@@ -121,17 +163,27 @@ CONFIG_MACH_KIXRP435=y
+ CONFIG_ARCH_IXCDP1100=y
+ CONFIG_ARCH_PRPMC1100=y
+ CONFIG_MACH_NAS100D=y
++CONFIG_MACH_DSMG600=y
+ CONFIG_ARCH_IXDP4XX=y
+ CONFIG_CPU_IXP46X=y
+ CONFIG_CPU_IXP43X=y
+-# CONFIG_MACH_GTWX5715 is not set
++CONFIG_MACH_GTWX5715=y
+
+ #
+ # IXP4xx Options
+ #
++CONFIG_DMABOUNCE=y
+ # CONFIG_IXP4XX_INDIRECT_PCI is not set
+
+ #
++# Boot options
++#
++
++#
++# Power management
++#
++
++#
+ # Processor Type
+ #
+ CONFIG_CPU_32=y
+@@ -140,33 +192,40 @@ CONFIG_CPU_32v5=y
+ CONFIG_CPU_ABRT_EV5T=y
+ CONFIG_CPU_CACHE_VIVT=y
+ CONFIG_CPU_TLB_V4WBI=y
++CONFIG_CPU_CP15=y
++CONFIG_CPU_CP15_MMU=y
+
+ #
+ # Processor Features
+ #
+ # CONFIG_ARM_THUMB is not set
+ CONFIG_CPU_BIG_ENDIAN=y
++# CONFIG_CPU_DCACHE_DISABLE is not set
++# CONFIG_OUTER_CACHE is not set
++# CONFIG_IWMMXT is not set
+ CONFIG_XSCALE_PMU=y
+-CONFIG_DMABOUNCE=y
+
+ #
+ # Bus support
+ #
+-CONFIG_ISA_DMA_API=y
+ CONFIG_PCI=y
+-CONFIG_PCI_LEGACY_PROC=y
++CONFIG_PCI_SYSCALL=y
++# CONFIG_ARCH_SUPPORTS_MSI is not set
++CONFIG_PCI_LEGACY=y
+ # CONFIG_PCI_DEBUG is not set
+-
+-#
+-# PCCARD (PCMCIA/CardBus) support
+-#
+ # CONFIG_PCCARD is not set
+
+ #
+ # Kernel Features
+ #
++# CONFIG_TICK_ONESHOT is not set
++# CONFIG_NO_HZ is not set
++# CONFIG_HIGH_RES_TIMERS is not set
++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+ # CONFIG_PREEMPT is not set
+-# CONFIG_NO_IDLE_HZ is not set
++CONFIG_HZ=100
++CONFIG_AEABI=y
++CONFIG_OABI_COMPAT=y
+ # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+ CONFIG_SELECT_MEMORY_MODEL=y
+ CONFIG_FLATMEM_MANUAL=y
+@@ -175,7 +234,12 @@ CONFIG_FLATMEM_MANUAL=y
+ CONFIG_FLATMEM=y
+ CONFIG_FLAT_NODE_MEM_MAP=y
+ # CONFIG_SPARSEMEM_STATIC is not set
++# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+ CONFIG_SPLIT_PTLOCK_CPUS=4096
++# CONFIG_RESOURCES_64BIT is not set
++CONFIG_ZONE_DMA_FLAG=1
++CONFIG_BOUNCE=y
++CONFIG_VIRT_TO_BUS=y
+ CONFIG_ALIGNMENT_TRAP=y
+
+ #
+@@ -185,6 +249,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
+ CONFIG_ZBOOT_ROM_BSS=0x0
+ CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs"
+ # CONFIG_XIP_KERNEL is not set
++# CONFIG_KEXEC is not set
+
+ #
+ # Floating point emulation
+@@ -203,13 +268,12 @@ CONFIG_FPE_NWFPE=y
+ CONFIG_BINFMT_ELF=y
+ # CONFIG_BINFMT_AOUT is not set
+ # CONFIG_BINFMT_MISC is not set
+-# CONFIG_ARTHUR is not set
+
+ #
+ # Power management options
+ #
+ # CONFIG_PM is not set
+-# CONFIG_APM is not set
++CONFIG_SUSPEND_UP_POSSIBLE=y
+
+ #
+ # Networking
+@@ -219,11 +283,13 @@ CONFIG_NET=y
+ #
+ # Networking options
+ #
+-CONFIG_PACKET=m
++CONFIG_PACKET=y
+ CONFIG_PACKET_MMAP=y
+ CONFIG_UNIX=y
+ CONFIG_XFRM=y
+ # CONFIG_XFRM_USER is not set
++# CONFIG_XFRM_SUB_POLICY is not set
++# CONFIG_XFRM_MIGRATE is not set
+ # CONFIG_NET_KEY is not set
+ CONFIG_INET=y
+ CONFIG_IP_MULTICAST=y
+@@ -232,9 +298,7 @@ CONFIG_ASK_IP_FIB_HASH=y
+ # CONFIG_IP_FIB_TRIE is not set
+ CONFIG_IP_FIB_HASH=y
+ CONFIG_IP_MULTIPLE_TABLES=y
+-CONFIG_IP_ROUTE_FWMARK=y
+ CONFIG_IP_ROUTE_MULTIPATH=y
+-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
+ CONFIG_IP_ROUTE_VERBOSE=y
+ CONFIG_IP_PNP=y
+ CONFIG_IP_PNP_DHCP=y
+@@ -251,15 +315,18 @@ CONFIG_SYN_COOKIES=y
+ # CONFIG_INET_AH is not set
+ # CONFIG_INET_ESP is not set
+ # CONFIG_INET_IPCOMP is not set
+-CONFIG_INET_TUNNEL=m
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_XFRM_MODE_BEET=y
++# CONFIG_INET_LRO is not set
+ CONFIG_INET_DIAG=y
+ CONFIG_INET_TCP_DIAG=y
+ # CONFIG_TCP_CONG_ADVANCED is not set
+-CONFIG_TCP_CONG_BIC=y
+-
+-#
+-# IP: Virtual Server Configuration
+-#
++CONFIG_TCP_CONG_CUBIC=y
++CONFIG_DEFAULT_TCP_CONG="cubic"
++# CONFIG_TCP_MD5SIG is not set
+ CONFIG_IP_VS=m
+ CONFIG_IP_VS_DEBUG=y
+ CONFIG_IP_VS_TAB_BITS=12
+@@ -290,6 +357,9 @@ CONFIG_IP_VS_SH=m
+ # IPVS application helper
+ #
+ # CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
+ CONFIG_NETFILTER=y
+ # CONFIG_NETFILTER_DEBUG is not set
+ CONFIG_BRIDGE_NETFILTER=y
+@@ -298,70 +368,57 @@ CONFIG_BRIDGE_NETFILTER=y
+ # Core Netfilter Configuration
+ #
+ # CONFIG_NETFILTER_NETLINK is not set
++# CONFIG_NF_CONNTRACK_ENABLED is not set
++# CONFIG_NF_CONNTRACK is not set
++CONFIG_NETFILTER_XTABLES=m
++# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
++# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
++# CONFIG_NETFILTER_XT_TARGET_MARK is not set
++# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
++# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
++# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
++# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
++# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
++# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
++# CONFIG_NETFILTER_XT_MATCH_ESP is not set
++# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
++# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
++# CONFIG_NETFILTER_XT_MATCH_MAC is not set
++# CONFIG_NETFILTER_XT_MATCH_MARK is not set
++# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
++# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
++# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
++# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
++# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
++# CONFIG_NETFILTER_XT_MATCH_REALM is not set
++# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
++# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
++# CONFIG_NETFILTER_XT_MATCH_STRING is not set
++# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
++# CONFIG_NETFILTER_XT_MATCH_TIME is not set
++# CONFIG_NETFILTER_XT_MATCH_U32 is not set
++# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+ #
+ # IP: Netfilter Configuration
+ #
+-CONFIG_IP_NF_CONNTRACK=m
+-# CONFIG_IP_NF_CT_ACCT is not set
+-# CONFIG_IP_NF_CONNTRACK_MARK is not set
+-# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
+-# CONFIG_IP_NF_CT_PROTO_SCTP is not set
+-CONFIG_IP_NF_FTP=m
+-CONFIG_IP_NF_IRC=m
+-# CONFIG_IP_NF_NETBIOS_NS is not set
+-# CONFIG_IP_NF_TFTP is not set
+-# CONFIG_IP_NF_AMANDA is not set
+-# CONFIG_IP_NF_PPTP is not set
+ CONFIG_IP_NF_QUEUE=m
+ CONFIG_IP_NF_IPTABLES=m
+-CONFIG_IP_NF_MATCH_LIMIT=m
+ # CONFIG_IP_NF_MATCH_IPRANGE is not set
+-CONFIG_IP_NF_MATCH_MAC=m
+-# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+-CONFIG_IP_NF_MATCH_MARK=m
+-CONFIG_IP_NF_MATCH_MULTIPORT=m
+ CONFIG_IP_NF_MATCH_TOS=m
+ # CONFIG_IP_NF_MATCH_RECENT is not set
+ # CONFIG_IP_NF_MATCH_ECN is not set
+-# CONFIG_IP_NF_MATCH_DSCP is not set
+-CONFIG_IP_NF_MATCH_AH_ESP=m
+-CONFIG_IP_NF_MATCH_LENGTH=m
++# CONFIG_IP_NF_MATCH_AH is not set
+ CONFIG_IP_NF_MATCH_TTL=m
+-CONFIG_IP_NF_MATCH_TCPMSS=m
+-# CONFIG_IP_NF_MATCH_HELPER is not set
+-CONFIG_IP_NF_MATCH_STATE=m
+-# CONFIG_IP_NF_MATCH_CONNTRACK is not set
+ CONFIG_IP_NF_MATCH_OWNER=m
+-# CONFIG_IP_NF_MATCH_PHYSDEV is not set
+ # CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+-# CONFIG_IP_NF_MATCH_REALM is not set
+-# CONFIG_IP_NF_MATCH_SCTP is not set
+-# CONFIG_IP_NF_MATCH_DCCP is not set
+-# CONFIG_IP_NF_MATCH_COMMENT is not set
+-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
+-# CONFIG_IP_NF_MATCH_STRING is not set
+ CONFIG_IP_NF_FILTER=m
+ CONFIG_IP_NF_TARGET_REJECT=m
+ CONFIG_IP_NF_TARGET_LOG=m
+ CONFIG_IP_NF_TARGET_ULOG=m
+-CONFIG_IP_NF_TARGET_TCPMSS=m
+-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
+-CONFIG_IP_NF_NAT=m
+-CONFIG_IP_NF_NAT_NEEDED=y
+-CONFIG_IP_NF_TARGET_MASQUERADE=m
+-CONFIG_IP_NF_TARGET_REDIRECT=m
+-# CONFIG_IP_NF_TARGET_NETMAP is not set
+-# CONFIG_IP_NF_TARGET_SAME is not set
+-CONFIG_IP_NF_NAT_SNMP_BASIC=m
+-CONFIG_IP_NF_NAT_IRC=m
+-CONFIG_IP_NF_NAT_FTP=m
+ CONFIG_IP_NF_MANGLE=m
+ CONFIG_IP_NF_TARGET_TOS=m
+ # CONFIG_IP_NF_TARGET_ECN is not set
+-# CONFIG_IP_NF_TARGET_DSCP is not set
+-CONFIG_IP_NF_TARGET_MARK=m
+-# CONFIG_IP_NF_TARGET_CLASSIFY is not set
+ # CONFIG_IP_NF_TARGET_TTL is not set
+ # CONFIG_IP_NF_RAW is not set
+ CONFIG_IP_NF_ARPTABLES=m
+@@ -372,16 +429,9 @@ CONFIG_IP_NF_ARPFILTER=m
+ # Bridge: Netfilter Configuration
+ #
+ # CONFIG_BRIDGE_NF_EBTABLES is not set
+-
+-#
+-# DCCP Configuration (EXPERIMENTAL)
+-#
+ # CONFIG_IP_DCCP is not set
+-
+-#
+-# SCTP Configuration (EXPERIMENTAL)
+-#
+ # CONFIG_IP_SCTP is not set
++# CONFIG_TIPC is not set
+ CONFIG_ATM=y
+ CONFIG_ATM_CLIP=y
+ # CONFIG_ATM_CLIP_NO_ICMP is not set
+@@ -397,25 +447,17 @@ CONFIG_LLC=m
+ CONFIG_IPX=m
+ # CONFIG_IPX_INTERN is not set
+ CONFIG_ATALK=m
+-CONFIG_DEV_APPLETALK=y
++CONFIG_DEV_APPLETALK=m
+ CONFIG_IPDDP=m
+ CONFIG_IPDDP_ENCAP=y
+ CONFIG_IPDDP_DECAP=y
+ CONFIG_X25=m
+ CONFIG_LAPB=m
+-# CONFIG_NET_DIVERT is not set
+ CONFIG_ECONET=m
+ CONFIG_ECONET_AUNUDP=y
+ CONFIG_ECONET_NATIVE=y
+ CONFIG_WAN_ROUTER=m
+-
+-#
+-# QoS and/or fair queueing
+-#
+ CONFIG_NET_SCHED=y
+-CONFIG_NET_SCH_CLK_JIFFIES=y
+-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
+-# CONFIG_NET_SCH_CLK_CPU is not set
+
+ #
+ # Queueing/Scheduling
+@@ -425,6 +467,7 @@ CONFIG_NET_SCH_HTB=m
+ # CONFIG_NET_SCH_HFSC is not set
+ # CONFIG_NET_SCH_ATM is not set
+ CONFIG_NET_SCH_PRIO=m
++# CONFIG_NET_SCH_RR is not set
+ CONFIG_NET_SCH_RED=m
+ CONFIG_NET_SCH_SFQ=m
+ CONFIG_NET_SCH_TEQL=m
+@@ -449,10 +492,17 @@ CONFIG_NET_CLS_U32=m
+ CONFIG_NET_CLS_RSVP=m
+ CONFIG_NET_CLS_RSVP6=m
+ # CONFIG_NET_EMATCH is not set
+-# CONFIG_NET_CLS_ACT is not set
++CONFIG_NET_CLS_ACT=y
++CONFIG_NET_ACT_POLICE=y
++# CONFIG_NET_ACT_GACT is not set
++# CONFIG_NET_ACT_MIRRED is not set
++# CONFIG_NET_ACT_IPT is not set
++# CONFIG_NET_ACT_NAT is not set
++# CONFIG_NET_ACT_PEDIT is not set
++# CONFIG_NET_ACT_SIMP is not set
+ CONFIG_NET_CLS_POLICE=y
+ # CONFIG_NET_CLS_IND is not set
+-CONFIG_NET_ESTIMATOR=y
++CONFIG_NET_SCH_FIFO=y
+
+ #
+ # Network testing
+@@ -461,7 +511,18 @@ CONFIG_NET_PKTGEN=m
+ # CONFIG_HAMRADIO is not set
+ # CONFIG_IRDA is not set
+ # CONFIG_BT is not set
++# CONFIG_AF_RXRPC is not set
++CONFIG_FIB_RULES=y
++
++#
++# Wireless
++#
++# CONFIG_CFG80211 is not set
++# CONFIG_WIRELESS_EXT is not set
++# CONFIG_MAC80211 is not set
+ # CONFIG_IEEE80211 is not set
++# CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
+
+ #
+ # Device Drivers
+@@ -470,19 +531,14 @@ CONFIG_NET_PKTGEN=m
+ #
+ # Generic Driver Options
+ #
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+ CONFIG_STANDALONE=y
+ CONFIG_PREVENT_FIRMWARE_BUILD=y
+-# CONFIG_FW_LOADER is not set
++CONFIG_FW_LOADER=y
+ # CONFIG_DEBUG_DRIVER is not set
+-
+-#
+-# Connector - unified userspace <-> kernelspace linker
+-#
++# CONFIG_DEBUG_DEVRES is not set
++# CONFIG_SYS_HYPERVISOR is not set
+ # CONFIG_CONNECTOR is not set
+-
+-#
+-# Memory Technology Devices (MTD)
+-#
+ CONFIG_MTD=y
+ # CONFIG_MTD_DEBUG is not set
+ # CONFIG_MTD_CONCAT is not set
+@@ -498,11 +554,14 @@ CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
+ # User Modules And Translation Layers
+ #
+ CONFIG_MTD_CHAR=y
++CONFIG_MTD_BLKDEVS=y
+ CONFIG_MTD_BLOCK=y
+ # CONFIG_FTL is not set
+ # CONFIG_NFTL is not set
+ # CONFIG_INFTL is not set
+ # CONFIG_RFD_FTL is not set
++# CONFIG_SSFDC is not set
++# CONFIG_MTD_OOPS is not set
+
+ #
+ # RAM/ROM/Flash chip drivers
+@@ -528,7 +587,6 @@ CONFIG_MTD_CFI_UTIL=y
+ # CONFIG_MTD_RAM is not set
+ # CONFIG_MTD_ROM is not set
+ # CONFIG_MTD_ABSENT is not set
+-# CONFIG_MTD_XIP is not set
+
+ #
+ # Mapping drivers for chip access
+@@ -538,6 +596,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
+ # CONFIG_MTD_ARM_INTEGRATOR is not set
+ CONFIG_MTD_IXP4XX=y
+ # CONFIG_MTD_PCI is not set
++# CONFIG_MTD_INTEL_VR_NOR is not set
+ # CONFIG_MTD_PLATRAM is not set
+
+ #
+@@ -547,7 +606,6 @@ CONFIG_MTD_IXP4XX=y
+ # CONFIG_MTD_SLRAM is not set
+ # CONFIG_MTD_PHRAM is not set
+ # CONFIG_MTD_MTDRAM is not set
+-# CONFIG_MTD_BLKMTD is not set
+ # CONFIG_MTD_BLOCK2MTD is not set
+
+ #
+@@ -556,33 +614,24 @@ CONFIG_MTD_IXP4XX=y
+ # CONFIG_MTD_DOC2000 is not set
+ # CONFIG_MTD_DOC2001 is not set
+ # CONFIG_MTD_DOC2001PLUS is not set
+-
+-#
+-# NAND Flash Device Drivers
+-#
+ CONFIG_MTD_NAND=m
+ # CONFIG_MTD_NAND_VERIFY_WRITE is not set
++# CONFIG_MTD_NAND_ECC_SMC is not set
++# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+ CONFIG_MTD_NAND_IDS=m
+ # CONFIG_MTD_NAND_DISKONCHIP is not set
++# CONFIG_MTD_NAND_CAFE is not set
+ # CONFIG_MTD_NAND_NANDSIM is not set
+-
+-#
+-# OneNAND Flash Device Drivers
+-#
++# CONFIG_MTD_NAND_PLATFORM is not set
++# CONFIG_MTD_ALAUDA is not set
+ # CONFIG_MTD_ONENAND is not set
+
+ #
+-# Parallel port support
++# UBI - Unsorted block images
+ #
++# CONFIG_MTD_UBI is not set
+ # CONFIG_PARPORT is not set
+-
+-#
+-# Plug and Play support
+-#
+-
+-#
+-# Block devices
+-#
++CONFIG_BLK_DEV=y
+ # CONFIG_BLK_CPQ_DA is not set
+ # CONFIG_BLK_CPQ_CISS_DA is not set
+ # CONFIG_BLK_DEV_DAC960 is not set
+@@ -592,17 +641,20 @@ CONFIG_BLK_DEV_LOOP=y
+ # CONFIG_BLK_DEV_CRYPTOLOOP is not set
+ # CONFIG_BLK_DEV_NBD is not set
+ # CONFIG_BLK_DEV_SX8 is not set
++# CONFIG_BLK_DEV_UB is not set
+ CONFIG_BLK_DEV_RAM=y
+ CONFIG_BLK_DEV_RAM_COUNT=16
+ CONFIG_BLK_DEV_RAM_SIZE=8192
+-CONFIG_BLK_DEV_INITRD=y
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+ # CONFIG_CDROM_PKTCDVD is not set
+ # CONFIG_ATA_OVER_ETH is not set
+-
+-#
+-# ATA/ATAPI/MFM/RLL support
+-#
++CONFIG_MISC_DEVICES=y
++# CONFIG_PHANTOM is not set
++# CONFIG_EEPROM_93CX6 is not set
++# CONFIG_SGI_IOC4 is not set
++# CONFIG_TIFM_CORE is not set
+ CONFIG_IDE=y
++CONFIG_IDE_MAX_HWIFS=4
+ CONFIG_BLK_DEV_IDE=y
+
+ #
+@@ -614,24 +666,28 @@ CONFIG_BLK_DEV_IDEDISK=y
+ # CONFIG_BLK_DEV_IDECD is not set
+ # CONFIG_BLK_DEV_IDETAPE is not set
+ # CONFIG_BLK_DEV_IDEFLOPPY is not set
++# CONFIG_BLK_DEV_IDESCSI is not set
+ # CONFIG_IDE_TASK_IOCTL is not set
++CONFIG_IDE_PROC_FS=y
+
+ #
+ # IDE chipset support/bugfixes
+ #
+ CONFIG_IDE_GENERIC=y
++# CONFIG_BLK_DEV_PLATFORM is not set
++
++#
++# PCI IDE chipsets support
++#
+ CONFIG_BLK_DEV_IDEPCI=y
+ # CONFIG_IDEPCI_SHARE_IRQ is not set
++CONFIG_IDEPCI_PCIBUS_ORDER=y
+ # CONFIG_BLK_DEV_OFFBOARD is not set
+ # CONFIG_BLK_DEV_GENERIC is not set
+ # CONFIG_BLK_DEV_OPTI621 is not set
+-# CONFIG_BLK_DEV_SL82C105 is not set
+ CONFIG_BLK_DEV_IDEDMA_PCI=y
+-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+-# CONFIG_IDEDMA_PCI_AUTO is not set
+ # CONFIG_BLK_DEV_AEC62XX is not set
+ # CONFIG_BLK_DEV_ALI15X3 is not set
+-# CONFIG_BLK_DEV_AMD74XX is not set
+ CONFIG_BLK_DEV_CMD64X=y
+ # CONFIG_BLK_DEV_TRIFLEX is not set
+ # CONFIG_BLK_DEV_CY82C693 is not set
+@@ -639,93 +695,162 @@ CONFIG_BLK_DEV_CMD64X=y
+ # CONFIG_BLK_DEV_CS5530 is not set
+ # CONFIG_BLK_DEV_HPT34X is not set
+ CONFIG_BLK_DEV_HPT366=y
++# CONFIG_BLK_DEV_JMICRON is not set
+ # CONFIG_BLK_DEV_SC1200 is not set
+ # CONFIG_BLK_DEV_PIIX is not set
++# CONFIG_BLK_DEV_IT8213 is not set
+ # CONFIG_BLK_DEV_IT821X is not set
+ # CONFIG_BLK_DEV_NS87415 is not set
+ # CONFIG_BLK_DEV_PDC202XX_OLD is not set
+ CONFIG_BLK_DEV_PDC202XX_NEW=y
+-# CONFIG_PDC202XX_FORCE is not set
+ # CONFIG_BLK_DEV_SVWKS is not set
+ # CONFIG_BLK_DEV_SIIMAGE is not set
++# CONFIG_BLK_DEV_SL82C105 is not set
+ # CONFIG_BLK_DEV_SLC90E66 is not set
+ # CONFIG_BLK_DEV_TRM290 is not set
+ # CONFIG_BLK_DEV_VIA82CXXX is not set
++# CONFIG_BLK_DEV_TC86C001 is not set
+ # CONFIG_IDE_ARM is not set
+ CONFIG_BLK_DEV_IDEDMA=y
+-# CONFIG_IDEDMA_IVB is not set
+-# CONFIG_IDEDMA_AUTO is not set
++CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+ # CONFIG_BLK_DEV_HD is not set
+
+ #
+ # SCSI device support
+ #
+ # CONFIG_RAID_ATTRS is not set
+-# CONFIG_SCSI is not set
+-
+-#
+-# Multi-device support (RAID and LVM)
+-#
++CONFIG_SCSI=y
++CONFIG_SCSI_DMA=y
++# CONFIG_SCSI_TGT is not set
++# CONFIG_SCSI_NETLINK is not set
++# CONFIG_SCSI_PROC_FS is not set
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++# CONFIG_CHR_DEV_ST is not set
++# CONFIG_CHR_DEV_OSST is not set
++# CONFIG_BLK_DEV_SR is not set
++# CONFIG_CHR_DEV_SG is not set
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++# CONFIG_SCSI_CONSTANTS is not set
++# CONFIG_SCSI_LOGGING is not set
++# CONFIG_SCSI_SCAN_ASYNC is not set
++CONFIG_SCSI_WAIT_SCAN=m
++
++#
++# SCSI Transports
++#
++# CONFIG_SCSI_SPI_ATTRS is not set
++# CONFIG_SCSI_FC_ATTRS is not set
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++# CONFIG_SCSI_SAS_LIBSAS is not set
++# CONFIG_SCSI_SRP_ATTRS is not set
++# CONFIG_SCSI_LOWLEVEL is not set
++CONFIG_ATA=y
++# CONFIG_ATA_NONSTANDARD is not set
++# CONFIG_SATA_AHCI is not set
++# CONFIG_SATA_SVW is not set
++# CONFIG_ATA_PIIX is not set
++# CONFIG_SATA_MV is not set
++# CONFIG_SATA_NV is not set
++# CONFIG_PDC_ADMA is not set
++# CONFIG_SATA_QSTOR is not set
++# CONFIG_SATA_PROMISE is not set
++# CONFIG_SATA_SX4 is not set
++# CONFIG_SATA_SIL is not set
++# CONFIG_SATA_SIL24 is not set
++# CONFIG_SATA_SIS is not set
++# CONFIG_SATA_ULI is not set
++# CONFIG_SATA_VIA is not set
++# CONFIG_SATA_VITESSE is not set
++# CONFIG_SATA_INIC162X is not set
++# CONFIG_PATA_ALI is not set
++# CONFIG_PATA_AMD is not set
++CONFIG_PATA_ARTOP=y
++# CONFIG_PATA_ATIIXP is not set
++# CONFIG_PATA_CMD640_PCI is not set
++# CONFIG_PATA_CMD64X is not set
++# CONFIG_PATA_CS5520 is not set
++# CONFIG_PATA_CS5530 is not set
++# CONFIG_PATA_CYPRESS is not set
++# CONFIG_PATA_EFAR is not set
++# CONFIG_ATA_GENERIC is not set
++# CONFIG_PATA_HPT366 is not set
++# CONFIG_PATA_HPT37X is not set
++# CONFIG_PATA_HPT3X2N is not set
++# CONFIG_PATA_HPT3X3 is not set
++# CONFIG_PATA_IT821X is not set
++# CONFIG_PATA_IT8213 is not set
++# CONFIG_PATA_JMICRON is not set
++# CONFIG_PATA_TRIFLEX is not set
++# CONFIG_PATA_MARVELL is not set
++# CONFIG_PATA_MPIIX is not set
++# CONFIG_PATA_OLDPIIX is not set
++# CONFIG_PATA_NETCELL is not set
++# CONFIG_PATA_NS87410 is not set
++# CONFIG_PATA_NS87415 is not set
++# CONFIG_PATA_OPTI is not set
++# CONFIG_PATA_OPTIDMA is not set
++# CONFIG_PATA_PDC_OLD is not set
++# CONFIG_PATA_RADISYS is not set
++# CONFIG_PATA_RZ1000 is not set
++# CONFIG_PATA_SC1200 is not set
++# CONFIG_PATA_SERVERWORKS is not set
++# CONFIG_PATA_PDC2027X is not set
++# CONFIG_PATA_SIL680 is not set
++# CONFIG_PATA_SIS is not set
++# CONFIG_PATA_VIA is not set
++# CONFIG_PATA_WINBOND is not set
++# CONFIG_PATA_PLATFORM is not set
++CONFIG_PATA_IXP4XX_CF=y
+ # CONFIG_MD is not set
+-
+-#
+-# Fusion MPT device support
+-#
+ # CONFIG_FUSION is not set
+
+ #
+ # IEEE 1394 (FireWire) support
+ #
++# CONFIG_FIREWIRE is not set
+ # CONFIG_IEEE1394 is not set
+-
+-#
+-# I2O device support
+-#
+ # CONFIG_I2O is not set
+-
+-#
+-# Network device support
+-#
+ CONFIG_NETDEVICES=y
++# CONFIG_NETDEVICES_MULTIQUEUE is not set
++# CONFIG_IFB is not set
+ CONFIG_DUMMY=y
+ # CONFIG_BONDING is not set
++# CONFIG_MACVLAN is not set
+ # CONFIG_EQUALIZER is not set
+ # CONFIG_TUN is not set
+-
+-#
+-# ARCnet devices
+-#
++# CONFIG_VETH is not set
+ # CONFIG_ARCNET is not set
+-
+-#
+-# PHY device support
+-#
+ # CONFIG_PHYLIB is not set
+-
+-#
+-# Ethernet (10 or 100Mbit)
+-#
+ CONFIG_NET_ETHERNET=y
+ CONFIG_MII=y
++# CONFIG_AX88796 is not set
+ # CONFIG_HAPPYMEAL is not set
+ # CONFIG_SUNGEM is not set
+ # CONFIG_CASSINI is not set
+ # CONFIG_NET_VENDOR_3COM is not set
+ # CONFIG_SMC91X is not set
+ # CONFIG_DM9000 is not set
+-
+-#
+-# Tulip family network device support
+-#
+ # CONFIG_NET_TULIP is not set
+ # CONFIG_HP100 is not set
++# CONFIG_IBM_NEW_EMAC_ZMII is not set
++# CONFIG_IBM_NEW_EMAC_RGMII is not set
++# CONFIG_IBM_NEW_EMAC_TAH is not set
++# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+ CONFIG_NET_PCI=y
+ # CONFIG_PCNET32 is not set
+ # CONFIG_AMD8111_ETH is not set
+ # CONFIG_ADAPTEC_STARFIRE is not set
+ # CONFIG_B44 is not set
+ # CONFIG_FORCEDETH is not set
+-# CONFIG_DGRS is not set
+ CONFIG_EEPRO100=y
+ # CONFIG_E100 is not set
+ # CONFIG_FEALNX is not set
+@@ -738,93 +863,75 @@ CONFIG_EEPRO100=y
+ # CONFIG_SUNDANCE is not set
+ # CONFIG_TLAN is not set
+ # CONFIG_VIA_RHINE is not set
+-
+-#
+-# Ethernet (1000 Mbit)
+-#
++# CONFIG_SC92031 is not set
++CONFIG_NETDEV_1000=y
+ # CONFIG_ACENIC is not set
+ # CONFIG_DL2K is not set
+ # CONFIG_E1000 is not set
++# CONFIG_E1000E is not set
++# CONFIG_IP1000 is not set
+ # CONFIG_NS83820 is not set
+ # CONFIG_HAMACHI is not set
+ # CONFIG_YELLOWFIN is not set
+ # CONFIG_R8169 is not set
+ # CONFIG_SIS190 is not set
+ # CONFIG_SKGE is not set
++# CONFIG_SKY2 is not set
+ # CONFIG_SK98LIN is not set
+ # CONFIG_VIA_VELOCITY is not set
+ # CONFIG_TIGON3 is not set
+ # CONFIG_BNX2 is not set
+-
+-#
+-# Ethernet (10000 Mbit)
+-#
++# CONFIG_QLA3XXX is not set
++# CONFIG_ATL1 is not set
++CONFIG_NETDEV_10000=y
+ # CONFIG_CHELSIO_T1 is not set
++# CONFIG_CHELSIO_T3 is not set
++# CONFIG_IXGBE is not set
+ # CONFIG_IXGB is not set
+ # CONFIG_S2IO is not set
+-
+-#
+-# Token Ring devices
+-#
++# CONFIG_MYRI10GE is not set
++# CONFIG_NETXEN_NIC is not set
++# CONFIG_NIU is not set
++# CONFIG_MLX4_CORE is not set
++# CONFIG_TEHUTI is not set
+ # CONFIG_TR is not set
+
+ #
+-# Wireless LAN (non-hamradio)
+-#
+-CONFIG_NET_RADIO=y
+-
+-#
+-# Obsolete Wireless cards support (pre-802.11)
+-#
+-# CONFIG_STRIP is not set
+-
+-#
+-# Wireless 802.11b ISA/PCI cards support
+-#
+-# CONFIG_AIRO is not set
+-CONFIG_HERMES=y
+-# CONFIG_PLX_HERMES is not set
+-# CONFIG_TMD_HERMES is not set
+-# CONFIG_NORTEL_HERMES is not set
+-CONFIG_PCI_HERMES=y
+-# CONFIG_ATMEL is not set
+-
+-#
+-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
++# Wireless LAN
+ #
+-# CONFIG_PRISM54 is not set
+-# CONFIG_HOSTAP is not set
+-CONFIG_NET_WIRELESS=y
++# CONFIG_WLAN_PRE80211 is not set
++# CONFIG_WLAN_80211 is not set
+
+ #
+-# Wan interfaces
++# USB Network Adapters
+ #
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET is not set
+ CONFIG_WAN=y
+-# CONFIG_DSCC4 is not set
+ # CONFIG_LANMEDIA is not set
+-# CONFIG_SYNCLINK_SYNCPPP is not set
+ CONFIG_HDLC=m
+-CONFIG_HDLC_RAW=y
++CONFIG_HDLC_RAW=m
+ # CONFIG_HDLC_RAW_ETH is not set
+-CONFIG_HDLC_CISCO=y
+-CONFIG_HDLC_FR=y
+-CONFIG_HDLC_PPP=y
+-CONFIG_HDLC_X25=y
++CONFIG_HDLC_CISCO=m
++CONFIG_HDLC_FR=m
++CONFIG_HDLC_PPP=m
++CONFIG_HDLC_X25=m
+ # CONFIG_PCI200SYN is not set
+ # CONFIG_WANXL is not set
+ # CONFIG_PC300 is not set
++# CONFIG_PC300TOO is not set
+ # CONFIG_FARSYNC is not set
++# CONFIG_DSCC4 is not set
+ CONFIG_DLCI=m
+-CONFIG_DLCI_COUNT=24
+ CONFIG_DLCI_MAX=8
+-CONFIG_WAN_ROUTER_DRIVERS=y
++CONFIG_WAN_ROUTER_DRIVERS=m
+ # CONFIG_CYCLADES_SYNC is not set
+ # CONFIG_LAPBETHER is not set
+ # CONFIG_X25_ASY is not set
+-
+-#
+-# ATM drivers
+-#
++CONFIG_ATM_DRIVERS=y
+ # CONFIG_ATM_DUMMY is not set
+ CONFIG_ATM_TCP=m
+ # CONFIG_ATM_LANAI is not set
+@@ -842,20 +949,19 @@ CONFIG_ATM_TCP=m
+ # CONFIG_HIPPI is not set
+ # CONFIG_PPP is not set
+ # CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
+ # CONFIG_SHAPER is not set
+ # CONFIG_NETCONSOLE is not set
+ # CONFIG_NETPOLL is not set
+ # CONFIG_NET_POLL_CONTROLLER is not set
+-
+-#
+-# ISDN subsystem
+-#
+ # CONFIG_ISDN is not set
+
+ #
+ # Input device support
+ #
+ CONFIG_INPUT=y
++# CONFIG_INPUT_FF_MEMLESS is not set
++# CONFIG_INPUT_POLLDEV is not set
+
+ #
+ # Userland interfaces
+@@ -865,7 +971,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
+ CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+ # CONFIG_INPUT_JOYDEV is not set
+-# CONFIG_INPUT_TSDEV is not set
+ # CONFIG_INPUT_EVDEV is not set
+ # CONFIG_INPUT_EVBUG is not set
+
+@@ -875,8 +980,16 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+ # CONFIG_INPUT_KEYBOARD is not set
+ # CONFIG_INPUT_MOUSE is not set
+ # CONFIG_INPUT_JOYSTICK is not set
++# CONFIG_INPUT_TABLET is not set
+ # CONFIG_INPUT_TOUCHSCREEN is not set
+-# CONFIG_INPUT_MISC is not set
++CONFIG_INPUT_MISC=y
++CONFIG_INPUT_IXP4XX_BEEPER=y
++# CONFIG_INPUT_ATI_REMOTE is not set
++# CONFIG_INPUT_ATI_REMOTE2 is not set
++# CONFIG_INPUT_KEYSPAN_REMOTE is not set
++# CONFIG_INPUT_POWERMATE is not set
++# CONFIG_INPUT_YEALINK is not set
++# CONFIG_INPUT_UINPUT is not set
+
+ #
+ # Hardware I/O ports
+@@ -895,7 +1008,9 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+ #
+ CONFIG_SERIAL_8250=y
+ CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_SERIAL_8250_PCI=y
+ CONFIG_SERIAL_8250_NR_UARTS=2
++CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+ # CONFIG_SERIAL_8250_EXTENDED is not set
+
+ #
+@@ -907,51 +1022,17 @@ CONFIG_SERIAL_CORE_CONSOLE=y
+ CONFIG_UNIX98_PTYS=y
+ CONFIG_LEGACY_PTYS=y
+ CONFIG_LEGACY_PTY_COUNT=256
+-
+-#
+-# IPMI
+-#
+ # CONFIG_IPMI_HANDLER is not set
+-
+-#
+-# Watchdog Cards
+-#
+-CONFIG_WATCHDOG=y
+-# CONFIG_WATCHDOG_NOWAYOUT is not set
+-
+-#
+-# Watchdog Device Drivers
+-#
+-# CONFIG_SOFT_WATCHDOG is not set
+-CONFIG_IXP4XX_WATCHDOG=y
+-
+-#
+-# PCI-based Watchdog Cards
+-#
+-# CONFIG_PCIPCWATCHDOG is not set
+-# CONFIG_WDTPCI is not set
++CONFIG_HW_RANDOM=m
++CONFIG_HW_RANDOM_IXP4XX=m
+ # CONFIG_NVRAM is not set
+-# CONFIG_RTC is not set
+-# CONFIG_DTLK is not set
+ # CONFIG_R3964 is not set
+ # CONFIG_APPLICOM is not set
+-
+-#
+-# Ftape, the floppy tape device driver
+-#
+-# CONFIG_DRM is not set
+ # CONFIG_RAW_DRIVER is not set
+-
+-#
+-# TPM devices
+-#
+ # CONFIG_TCG_TPM is not set
+-# CONFIG_TELCLOCK is not set
+-
+-#
+-# I2C support
+-#
++CONFIG_DEVPORT=y
+ CONFIG_I2C=y
++CONFIG_I2C_BOARDINFO=y
+ CONFIG_I2C_CHARDEV=y
+
+ #
+@@ -969,57 +1050,68 @@ CONFIG_I2C_ALGOBIT=y
+ # CONFIG_I2C_ALI15X3 is not set
+ # CONFIG_I2C_AMD756 is not set
+ # CONFIG_I2C_AMD8111 is not set
++# CONFIG_I2C_GPIO is not set
+ # CONFIG_I2C_I801 is not set
+ # CONFIG_I2C_I810 is not set
+ # CONFIG_I2C_PIIX4 is not set
+ # CONFIG_I2C_IOP3XX is not set
+ CONFIG_I2C_IXP4XX=y
+ # CONFIG_I2C_NFORCE2 is not set
++# CONFIG_I2C_OCORES is not set
+ # CONFIG_I2C_PARPORT_LIGHT is not set
+ # CONFIG_I2C_PROSAVAGE is not set
+ # CONFIG_I2C_SAVAGE4 is not set
+-# CONFIG_SCx200_ACB is not set
++# CONFIG_I2C_SIMTEC is not set
+ # CONFIG_I2C_SIS5595 is not set
+ # CONFIG_I2C_SIS630 is not set
+ # CONFIG_I2C_SIS96X is not set
++# CONFIG_I2C_TAOS_EVM is not set
+ # CONFIG_I2C_STUB is not set
++# CONFIG_I2C_TINY_USB is not set
+ # CONFIG_I2C_VIA is not set
+ # CONFIG_I2C_VIAPRO is not set
+ # CONFIG_I2C_VOODOO3 is not set
+-# CONFIG_I2C_PCA_ISA is not set
+
+ #
+ # Miscellaneous I2C Chip support
+ #
+ # CONFIG_SENSORS_DS1337 is not set
+ # CONFIG_SENSORS_DS1374 is not set
++# CONFIG_DS1682 is not set
+ CONFIG_SENSORS_EEPROM=y
+ # CONFIG_SENSORS_PCF8574 is not set
+ # CONFIG_SENSORS_PCA9539 is not set
+ # CONFIG_SENSORS_PCF8591 is not set
+-# CONFIG_SENSORS_RTC8564 is not set
+ # CONFIG_SENSORS_MAX6875 is not set
+-# CONFIG_RTC_X1205_I2C is not set
++# CONFIG_SENSORS_TSL2550 is not set
+ # CONFIG_I2C_DEBUG_CORE is not set
+ # CONFIG_I2C_DEBUG_ALGO is not set
+ # CONFIG_I2C_DEBUG_BUS is not set
+ # CONFIG_I2C_DEBUG_CHIP is not set
+
+ #
+-# Hardware Monitoring support
++# SPI support
+ #
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++# CONFIG_W1 is not set
++# CONFIG_POWER_SUPPLY is not set
+ CONFIG_HWMON=y
+ # CONFIG_HWMON_VID is not set
++# CONFIG_SENSORS_AD7418 is not set
+ # CONFIG_SENSORS_ADM1021 is not set
+ # CONFIG_SENSORS_ADM1025 is not set
+ # CONFIG_SENSORS_ADM1026 is not set
++# CONFIG_SENSORS_ADM1029 is not set
+ # CONFIG_SENSORS_ADM1031 is not set
+ # CONFIG_SENSORS_ADM9240 is not set
+-# CONFIG_SENSORS_ASB100 is not set
++# CONFIG_SENSORS_ADT7470 is not set
+ # CONFIG_SENSORS_ATXP1 is not set
+ # CONFIG_SENSORS_DS1621 is not set
+-# CONFIG_SENSORS_FSCHER is not set
+-# CONFIG_SENSORS_FSCPOS is not set
++# CONFIG_SENSORS_I5K_AMB is not set
++# CONFIG_SENSORS_F71805F is not set
++# CONFIG_SENSORS_F71882FG is not set
++# CONFIG_SENSORS_F75375S is not set
+ # CONFIG_SENSORS_GL518SM is not set
+ # CONFIG_SENSORS_GL520SM is not set
+ # CONFIG_SENSORS_IT87 is not set
+@@ -1033,67 +1125,268 @@ CONFIG_HWMON=y
+ # CONFIG_SENSORS_LM87 is not set
+ # CONFIG_SENSORS_LM90 is not set
+ # CONFIG_SENSORS_LM92 is not set
++# CONFIG_SENSORS_LM93 is not set
+ # CONFIG_SENSORS_MAX1619 is not set
++# CONFIG_SENSORS_MAX6650 is not set
+ # CONFIG_SENSORS_PC87360 is not set
++# CONFIG_SENSORS_PC87427 is not set
+ # CONFIG_SENSORS_SIS5595 is not set
++# CONFIG_SENSORS_DME1737 is not set
+ # CONFIG_SENSORS_SMSC47M1 is not set
++# CONFIG_SENSORS_SMSC47M192 is not set
+ # CONFIG_SENSORS_SMSC47B397 is not set
++# CONFIG_SENSORS_THMC50 is not set
+ # CONFIG_SENSORS_VIA686A is not set
++# CONFIG_SENSORS_VT1211 is not set
++# CONFIG_SENSORS_VT8231 is not set
+ # CONFIG_SENSORS_W83781D is not set
++# CONFIG_SENSORS_W83791D is not set
+ # CONFIG_SENSORS_W83792D is not set
++# CONFIG_SENSORS_W83793 is not set
+ # CONFIG_SENSORS_W83L785TS is not set
+ # CONFIG_SENSORS_W83627HF is not set
+ # CONFIG_SENSORS_W83627EHF is not set
+ # CONFIG_HWMON_DEBUG_CHIP is not set
++CONFIG_WATCHDOG=y
++# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+ #
+-# Misc devices
++# Watchdog Device Drivers
+ #
++# CONFIG_SOFT_WATCHDOG is not set
++CONFIG_IXP4XX_WATCHDOG=y
+
+ #
+-# Multimedia Capabilities Port drivers
++# PCI-based Watchdog Cards
+ #
++# CONFIG_PCIPCWATCHDOG is not set
++# CONFIG_WDTPCI is not set
+
+ #
+-# Multimedia devices
++# USB-based Watchdog Cards
+ #
+-# CONFIG_VIDEO_DEV is not set
++# CONFIG_USBPCWATCHDOG is not set
+
+ #
+-# Digital Video Broadcasting Devices
++# Sonics Silicon Backplane
+ #
+-# CONFIG_DVB is not set
++CONFIG_SSB_POSSIBLE=y
++# CONFIG_SSB is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_SM501 is not set
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++# CONFIG_DVB_CORE is not set
++CONFIG_DAB=y
++# CONFIG_USB_DABUSB is not set
+
+ #
+ # Graphics support
+ #
++# CONFIG_DRM is not set
++# CONFIG_VGASTATE is not set
++# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+ # CONFIG_FB is not set
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++
++#
++# Display device support
++#
++# CONFIG_DISPLAY_SUPPORT is not set
+
+ #
+ # Sound
+ #
+ # CONFIG_SOUND is not set
++CONFIG_HID_SUPPORT=y
++CONFIG_HID=y
++# CONFIG_HID_DEBUG is not set
++# CONFIG_HIDRAW is not set
+
+ #
+-# USB support
++# USB Input Devices
+ #
++CONFIG_USB_HID=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++# CONFIG_HID_FF is not set
++# CONFIG_USB_HIDDEV is not set
++CONFIG_USB_SUPPORT=y
+ CONFIG_USB_ARCH_HAS_HCD=y
+ CONFIG_USB_ARCH_HAS_OHCI=y
+-# CONFIG_USB is not set
++CONFIG_USB_ARCH_HAS_EHCI=y
++CONFIG_USB=y
++# CONFIG_USB_DEBUG is not set
++
++#
++# Miscellaneous USB options
++#
++CONFIG_USB_DEVICEFS=y
++# CONFIG_USB_DEVICE_CLASS is not set
++# CONFIG_USB_DYNAMIC_MINORS is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_EHCI_HCD=y
++# CONFIG_USB_EHCI_SPLIT_ISO is not set
++# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
++# CONFIG_USB_EHCI_TT_NEWSCHED is not set
++# CONFIG_USB_ISP116X_HCD is not set
++CONFIG_USB_OHCI_HCD=y
++# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
++# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
++CONFIG_USB_OHCI_LITTLE_ENDIAN=y
++CONFIG_USB_UHCI_HCD=y
++# CONFIG_USB_SL811_HCD is not set
++# CONFIG_USB_R8A66597_HCD is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
+
+ #
+ # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+ #
+
+ #
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=y
++# CONFIG_USB_STORAGE_DEBUG is not set
++# CONFIG_USB_STORAGE_DATAFAB is not set
++# CONFIG_USB_STORAGE_FREECOM is not set
++# CONFIG_USB_STORAGE_ISD200 is not set
++# CONFIG_USB_STORAGE_DPCM is not set
++# CONFIG_USB_STORAGE_USBAT is not set
++# CONFIG_USB_STORAGE_SDDR09 is not set
++# CONFIG_USB_STORAGE_SDDR55 is not set
++# CONFIG_USB_STORAGE_JUMPSHOT is not set
++# CONFIG_USB_STORAGE_ALAUDA is not set
++# CONFIG_USB_STORAGE_KARMA is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++# CONFIG_USB_MON is not set
++
++#
++# USB port drivers
++#
++
++#
++# USB Serial Converter support
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_ADUTUX is not set
++# CONFIG_USB_AUERSWALD is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_BERRY_CHARGE is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_PHIDGET is not set
++# CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_FTDI_ELAN is not set
++# CONFIG_USB_APPLEDISPLAY is not set
++# CONFIG_USB_SISUSBVGA is not set
++# CONFIG_USB_LD is not set
++# CONFIG_USB_TRANCEVIBRATOR is not set
++# CONFIG_USB_IOWARRIOR is not set
++# CONFIG_USB_TEST is not set
++
++#
++# USB DSL modem support
++#
++# CONFIG_USB_ATM is not set
++
++#
+ # USB Gadget Support
+ #
+ # CONFIG_USB_GADGET is not set
++# CONFIG_MMC is not set
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=y
+
+ #
+-# MMC/SD Card support
++# LED drivers
++#
++CONFIG_LEDS_IXP4XX=y
++# CONFIG_LEDS_GPIO is not set
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_TIMER=y
++CONFIG_LEDS_TRIGGER_IDE_DISK=y
++CONFIG_LEDS_TRIGGER_HEARTBEAT=y
++CONFIG_RTC_LIB=y
++CONFIG_RTC_CLASS=y
++CONFIG_RTC_HCTOSYS=y
++CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
++# CONFIG_RTC_DEBUG is not set
++
++#
++# RTC interfaces
++#
++CONFIG_RTC_INTF_SYSFS=y
++CONFIG_RTC_INTF_PROC=y
++CONFIG_RTC_INTF_DEV=y
++# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
++# CONFIG_RTC_DRV_TEST is not set
++
++#
++# I2C RTC drivers
++#
++# CONFIG_RTC_DRV_DS1307 is not set
++# CONFIG_RTC_DRV_DS1374 is not set
++# CONFIG_RTC_DRV_DS1672 is not set
++# CONFIG_RTC_DRV_MAX6900 is not set
++# CONFIG_RTC_DRV_RS5C372 is not set
++# CONFIG_RTC_DRV_ISL1208 is not set
++CONFIG_RTC_DRV_X1205=y
++CONFIG_RTC_DRV_PCF8563=y
++# CONFIG_RTC_DRV_PCF8583 is not set
++# CONFIG_RTC_DRV_M41T80 is not set
++
++#
++# SPI RTC drivers
++#
++
++#
++# Platform RTC drivers
++#
++# CONFIG_RTC_DRV_CMOS is not set
++# CONFIG_RTC_DRV_DS1553 is not set
++# CONFIG_RTC_DRV_STK17TA8 is not set
++# CONFIG_RTC_DRV_DS1742 is not set
++# CONFIG_RTC_DRV_M48T86 is not set
++# CONFIG_RTC_DRV_M48T59 is not set
++# CONFIG_RTC_DRV_V3020 is not set
++
++#
++# on-CPU RTC drivers
+ #
+-# CONFIG_MMC is not set
+
+ #
+ # File systems
+@@ -1107,16 +1400,19 @@ CONFIG_EXT3_FS=y
+ CONFIG_EXT3_FS_XATTR=y
+ CONFIG_EXT3_FS_POSIX_ACL=y
+ # CONFIG_EXT3_FS_SECURITY is not set
++# CONFIG_EXT4DEV_FS is not set
+ CONFIG_JBD=y
+-# CONFIG_JBD_DEBUG is not set
+ CONFIG_FS_MBCACHE=y
+ # CONFIG_REISERFS_FS is not set
+ # CONFIG_JFS_FS is not set
+ CONFIG_FS_POSIX_ACL=y
+ # CONFIG_XFS_FS is not set
++# CONFIG_GFS2_FS is not set
++# CONFIG_OCFS2_FS is not set
+ # CONFIG_MINIX_FS is not set
+ # CONFIG_ROMFS_FS is not set
+ CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
+ # CONFIG_QUOTA is not set
+ CONFIG_DNOTIFY=y
+ # CONFIG_AUTOFS_FS is not set
+@@ -1140,11 +1436,12 @@ CONFIG_DNOTIFY=y
+ # Pseudo filesystems
+ #
+ CONFIG_PROC_FS=y
++CONFIG_PROC_SYSCTL=y
+ CONFIG_SYSFS=y
+ CONFIG_TMPFS=y
++# CONFIG_TMPFS_POSIX_ACL is not set
+ # CONFIG_HUGETLB_PAGE is not set
+-CONFIG_RAMFS=y
+-# CONFIG_RELAYFS_FS is not set
++# CONFIG_CONFIGFS_FS is not set
+
+ #
+ # Miscellaneous filesystems
+@@ -1156,13 +1453,15 @@ CONFIG_RAMFS=y
+ # CONFIG_BEFS_FS is not set
+ # CONFIG_BFS_FS is not set
+ # CONFIG_EFS_FS is not set
+-# CONFIG_JFFS_FS is not set
+ CONFIG_JFFS2_FS=y
+ CONFIG_JFFS2_FS_DEBUG=0
+ CONFIG_JFFS2_FS_WRITEBUFFER=y
++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+ # CONFIG_JFFS2_SUMMARY is not set
++# CONFIG_JFFS2_FS_XATTR is not set
+ # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+ CONFIG_JFFS2_ZLIB=y
++# CONFIG_JFFS2_LZO is not set
+ CONFIG_JFFS2_RTIME=y
+ # CONFIG_JFFS2_RUBIN is not set
+ # CONFIG_CRAMFS is not set
+@@ -1171,10 +1470,7 @@ CONFIG_JFFS2_RTIME=y
+ # CONFIG_QNX4FS_FS is not set
+ # CONFIG_SYSV_FS is not set
+ # CONFIG_UFS_FS is not set
+-
+-#
+-# Network File Systems
+-#
++CONFIG_NETWORK_FILESYSTEMS=y
+ CONFIG_NFS_FS=y
+ CONFIG_NFS_V3=y
+ # CONFIG_NFS_V3_ACL is not set
+@@ -1186,6 +1482,7 @@ CONFIG_LOCKD=y
+ CONFIG_LOCKD_V4=y
+ CONFIG_NFS_COMMON=y
+ CONFIG_SUNRPC=y
++# CONFIG_SUNRPC_BIND34 is not set
+ # CONFIG_RPCSEC_GSS_KRB5 is not set
+ # CONFIG_RPCSEC_GSS_SPKM3 is not set
+ # CONFIG_SMB_FS is not set
+@@ -1193,7 +1490,6 @@ CONFIG_SUNRPC=y
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+ # CONFIG_AFS_FS is not set
+-# CONFIG_9P_FS is not set
+
+ #
+ # Partition Types
+@@ -1213,37 +1509,53 @@ CONFIG_MSDOS_PARTITION=y
+ # CONFIG_SGI_PARTITION is not set
+ # CONFIG_ULTRIX_PARTITION is not set
+ # CONFIG_SUN_PARTITION is not set
++# CONFIG_KARMA_PARTITION is not set
+ # CONFIG_EFI_PARTITION is not set
+-
+-#
+-# Native Language Support
+-#
++# CONFIG_SYSV68_PARTITION is not set
+ # CONFIG_NLS is not set
+-
+-#
+-# Profiling support
+-#
++# CONFIG_DLM is not set
++CONFIG_INSTRUMENTATION=y
+ # CONFIG_PROFILING is not set
++# CONFIG_MARKERS is not set
+
+ #
+ # Kernel hacking
+ #
+ # CONFIG_PRINTK_TIME is not set
+-CONFIG_DEBUG_KERNEL=y
++CONFIG_ENABLE_WARN_DEPRECATED=y
++CONFIG_ENABLE_MUST_CHECK=y
+ CONFIG_MAGIC_SYSRQ=y
+-CONFIG_LOG_BUF_SHIFT=14
++# CONFIG_UNUSED_SYMBOLS is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_HEADERS_CHECK is not set
++CONFIG_DEBUG_KERNEL=y
++# CONFIG_DEBUG_SHIRQ is not set
+ CONFIG_DETECT_SOFTLOCKUP=y
++CONFIG_SCHED_DEBUG=y
+ # CONFIG_SCHEDSTATS is not set
+-# CONFIG_DEBUG_SLAB is not set
++# CONFIG_TIMER_STATS is not set
++# CONFIG_SLUB_DEBUG_ON is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
+ # CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_LOCK_ALLOC is not set
++# CONFIG_PROVE_LOCKING is not set
++# CONFIG_LOCK_STAT is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+ CONFIG_DEBUG_BUGVERBOSE=y
+ # CONFIG_DEBUG_INFO is not set
+-# CONFIG_DEBUG_FS is not set
+ # CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_LIST is not set
++# CONFIG_DEBUG_SG is not set
+ CONFIG_FRAME_POINTER=y
++CONFIG_FORCED_INLINING=y
++# CONFIG_BOOT_PRINTK_DELAY is not set
+ # CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_FAULT_INJECTION is not set
++# CONFIG_SAMPLES is not set
+ # CONFIG_DEBUG_USER is not set
+ CONFIG_DEBUG_ERRORS=y
+ CONFIG_DEBUG_LL=y
+@@ -1254,22 +1566,22 @@ CONFIG_DEBUG_LL=y
+ #
+ # CONFIG_KEYS is not set
+ # CONFIG_SECURITY is not set
+-
+-#
+-# Cryptographic options
+-#
++# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+ # CONFIG_CRYPTO is not set
+
+ #
+-# Hardware crypto devices
+-#
+-
+-#
+ # Library routines
+ #
++CONFIG_BITREVERSE=y
+ # CONFIG_CRC_CCITT is not set
+ # CONFIG_CRC16 is not set
++# CONFIG_CRC_ITU_T is not set
+ CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
+ # CONFIG_LIBCRC32C is not set
+ CONFIG_ZLIB_INFLATE=y
+ CONFIG_ZLIB_DEFLATE=y
++CONFIG_PLIST=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_IOPORT=y
++CONFIG_HAS_DMA=y
+--
+1.5.2.5
+
diff --git a/target/linux/ixp4xx/patches-2.6.24/016-dsmg600_auto_power_on.patch b/target/linux/ixp4xx/patches-2.6.24/016-dsmg600_auto_power_on.patch
index 2a1f2415f..003fed9e6 100644
--- a/target/linux/ixp4xx/patches-2.6.24/016-dsmg600_auto_power_on.patch
+++ b/target/linux/ixp4xx/patches-2.6.24/016-dsmg600_auto_power_on.patch
@@ -1,23 +1,26 @@
-Upgrade the power and reset button handling for the DSMG600:
+From 67e494e3e03ef807255f084800d8658b89ff5fec Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 10:00:25 +1030
+Subject: ixp4xx: Button updates for the dsmg600 board (Patch #4769)
+
* Remove the superfluous declaration of ctrl_alt_del().
* Convert GPIO and IRQ handling to use the <asm/gpio.h> api.
* Perform the reset on the release of the power button, so that
- NAS devices which have been set to auto-power-on (by bridging
- the power button) do not continuously power cycle.
+ NAS devices which have been set to auto-power-on (by solder
+ bridging the power button) do not continuously power cycle.
* Remove all superflous constants from dsmg600.h
Signed-off-by: Rod Whitby <rod@whitby.id.au>
+Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
----
- arch/arm/mach-ixp4xx/dsmg600-power.c | 24 ++++++++++++++----------
- include/asm-arm/arch-ixp4xx/dsmg600.h | 7 +------
- 2 files changed, 15 insertions(+), 16 deletions(-)
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git5
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c
-===================================================================
---- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/dsmg600-power.c 2008-01-11 16:20:26.000000000 +1030
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c 2008-01-11 16:20:30.000000000 +1030
-@@ -26,10 +26,9 @@
+diff --git a/arch/arm/mach-ixp4xx/dsmg600-power.c b/arch/arm/mach-ixp4xx/dsmg600-power.c
+index 3471787..db63987 100644
+--- a/arch/arm/mach-ixp4xx/dsmg600-power.c
++++ b/arch/arm/mach-ixp4xx/dsmg600-power.c
+@@ -26,14 +26,13 @@
#include <linux/jiffies.h>
#include <linux/timer.h>
@@ -29,7 +32,12 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c
/* This is used to make sure the power-button pusher is serious. The button
* must be held until the value of this counter reaches zero.
*/
-@@ -47,9 +46,16 @@
+-static volatile int power_button_countdown;
++static int power_button_countdown;
+
+ /* Must hold the button down for at least this many counts to be processed */
+ #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
+@@ -47,22 +46,27 @@ static void dsmg600_power_handler(unsigned long data)
* state of the power button.
*/
@@ -37,17 +45,20 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c
+ if (gpio_get_value(DSMG600_PB_GPIO)) {
/* IO Pin is 1 (button pushed) */
-+ if (power_button_countdown > 0) {
++ if (power_button_countdown > 0)
+ power_button_countdown--;
-+ }
+
+ } else {
+
+ /* Done on button release, to allow for auto-power-on mods. */
if (power_button_countdown == 0) {
- /* Signal init to do the ctrlaltdel action, this will bypass
- * init if it hasn't started and do a kernel_restart.
-@@ -58,11 +64,9 @@
+- /* Signal init to do the ctrlaltdel action, this will bypass
+- * init if it hasn't started and do a kernel_restart.
++ /* Signal init to do the ctrlaltdel action,
++ * this will bypass init if it hasn't started
++ * and do a kernel_restart.
+ */
+ ctrl_alt_del();
/* Change the state of the power LED to "blink" */
gpio_line_set(DSMG600_LED_PWR_GPIO, IXP4XX_GPIO_LOW);
@@ -61,7 +72,7 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c
}
mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500));
-@@ -81,12 +85,12 @@
+@@ -81,12 +85,12 @@ static int __init dsmg600_power_init(void)
if (!(machine_is_dsmg600()))
return 0;
@@ -76,7 +87,7 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c
return -EIO;
}
-@@ -114,7 +118,7 @@
+@@ -114,7 +118,7 @@ static void __exit dsmg600_power_exit(void)
del_timer_sync(&dsmg600_power_timer);
@@ -85,10 +96,10 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c
}
module_init(dsmg600_power_init);
-Index: linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/dsmg600.h
-===================================================================
---- linux-2.6.23.12-armeb.orig/include/asm-arm/arch-ixp4xx/dsmg600.h 2008-01-11 16:20:26.000000000 +1030
-+++ linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/dsmg600.h 2008-01-11 16:20:30.000000000 +1030
+diff --git a/include/asm-arm/arch-ixp4xx/dsmg600.h b/include/asm-arm/arch-ixp4xx/dsmg600.h
+index a19605a..b7673e1 100644
+--- a/include/asm-arm/arch-ixp4xx/dsmg600.h
++++ b/include/asm-arm/arch-ixp4xx/dsmg600.h
@@ -40,18 +40,13 @@
/* Buttons */
@@ -109,3 +120,6 @@ Index: linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/dsmg600.h
-
#define DSMG600_LED_WLAN_GPIO 14
-#define DSMG600_LED_WLAN_BM (1L << DSMG600_LED_WLAN_GPIO)
+--
+1.5.2.5
+
diff --git a/target/linux/ixp4xx/patches-2.6.24/017-nas100d_auto_power_on.patch b/target/linux/ixp4xx/patches-2.6.24/017-nas100d_auto_power_on.patch
index b77df4850..1be3bb700 100644
--- a/target/linux/ixp4xx/patches-2.6.24/017-nas100d_auto_power_on.patch
+++ b/target/linux/ixp4xx/patches-2.6.24/017-nas100d_auto_power_on.patch
@@ -1,20 +1,28 @@
-Upgrade the power and reset button handling for the NAS100D:
+From 6261e59795d861f21f63878944900a3da713348c Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 09:53:46 +1030
+Subject: ixp4xx: Button and LED updates for the nas100d board (Patch #4768)
+
* Convert GPIO and IRQ handling to use the <asm/gpio.h> api.
* Perform the reset only after the power button has been held down
for at least two seconds. Do the reset on the release of the power
button, so that NAS devices which have been set to auto-power-on (by
- bridging the power button) do not continuously power cycle.
+ solder bridging the power button) do not continuously power cycle.
* Remove all superflous constants from nas100d.h
* Add LED constants to nas100d.h while we're there.
-Also, update the board LED setup code to use constants.
+ * Update the board LED setup code to use those constants.
Signed-off-by: Rod Whitby <rod@whitby.id.au>
+Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
+
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git5
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-power.c
-===================================================================
---- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/nas100d-power.c 2008-01-11 16:59:20.000000000 +1030
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-power.c 2008-01-11 17:03:23.000000000 +1030
-@@ -21,15 +21,61 @@
+diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c
+index 29aa98d..4c1c01b 100644
+--- a/arch/arm/mach-ixp4xx/nas100d-power.c
++++ b/arch/arm/mach-ixp4xx/nas100d-power.c
+@@ -21,15 +21,59 @@
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/reboot.h>
@@ -25,12 +33,10 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-power.c
#include <asm/mach-types.h>
-static irqreturn_t nas100d_reset_handler(int irq, void *dev_id)
-+extern void ctrl_alt_del(void);
-+
+/* This is used to make sure the power-button pusher is serious. The button
+ * must be held until the value of this counter reaches zero.
+ */
-+static volatile int power_button_countdown;
++static int power_button_countdown;
+
+/* Must hold the button down for at least this many counts to be processed */
+#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
@@ -50,16 +56,16 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-power.c
+ if (gpio_get_value(NAS100D_PB_GPIO)) {
+
+ /* IO Pin is 1 (button pushed) */
-+ if (power_button_countdown > 0) {
++ if (power_button_countdown > 0)
+ power_button_countdown--;
-+ }
+
+ } else {
+
+ /* Done on button release, to allow for auto-power-on mods. */
+ if (power_button_countdown == 0) {
-+ /* Signal init to do the ctrlaltdel action, this will bypass
-+ * init if it hasn't started and do a kernel_restart.
++ /* Signal init to do the ctrlaltdel action,
++ * this will bypass init if it hasn't started
++ * and do a kernel_restart.
+ */
+ ctrl_alt_del();
+
@@ -80,7 +86,7 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-power.c
return IRQ_HANDLED;
}
-@@ -39,17 +85,30 @@
+@@ -39,17 +83,30 @@ static int __init nas100d_power_init(void)
if (!(machine_is_nas100d()))
return 0;
@@ -114,7 +120,7 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-power.c
return 0;
}
-@@ -58,7 +117,9 @@
+@@ -58,7 +115,9 @@ static void __exit nas100d_power_exit(void)
if (!(machine_is_nas100d()))
return;
@@ -125,40 +131,11 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-power.c
}
module_init(nas100d_power_init);
-Index: linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/nas100d.h
-===================================================================
---- linux-2.6.23.12-armeb.orig/include/asm-arm/arch-ixp4xx/nas100d.h 2008-01-11 16:59:20.000000000 +1030
-+++ linux-2.6.23.12-armeb/include/asm-arm/arch-ixp4xx/nas100d.h 2008-01-11 17:03:23.000000000 +1030
-@@ -38,15 +38,15 @@
-
- /* Buttons */
-
--#define NAS100D_PB_GPIO 14
--#define NAS100D_RB_GPIO 4
-+#define NAS100D_PB_GPIO 14 /* power button */
-+#define NAS100D_RB_GPIO 4 /* reset button */
-+
-+/* Power control */
-+
- #define NAS100D_PO_GPIO 12 /* power off */
-
--#define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14
--#define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4
-+/* LEDs */
-
--/*
--#define NAS100D_PB_BM (1L << NAS100D_PB_GPIO)
--#define NAS100D_PO_BM (1L << NAS100D_PO_GPIO)
--#define NAS100D_RB_BM (1L << NAS100D_RB_GPIO)
--*/
-+#define NAS100D_LED_WLAN_GPIO 0
-+#define NAS100D_LED_DISK_GPIO 3
-+#define NAS100D_LED_PWR_GPIO 15
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c
-===================================================================
---- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2008-01-11 17:03:23.000000000 +1030
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c 2008-01-11 17:06:15.000000000 +1030
-@@ -44,20 +44,20 @@
+diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
+index 54d884f..213a4ce 100644
+--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
++++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
+@@ -43,20 +43,20 @@ static struct platform_device nas100d_flash = {
static struct resource nas100d_led_resources[] = {
{
.name = "wlan", /* green led */
@@ -172,7 +149,7 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c
- .name = "ready", /* blue power led (off is flashing!) */
- .start = 15,
- .end = 15,
-+ .name = "power", /* blue power led (off is flashing!) */
++ .name = "power", /* blue power led (off=flashing) */
+ .start = NAS100D_LED_PWR_GPIO,
+ .end = NAS100D_LED_PWR_GPIO,
.flags = IXP4XX_GPIO_LOW,
@@ -186,3 +163,35 @@ Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c
.flags = IXP4XX_GPIO_LOW,
},
};
+diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h
+index 131e0a1..98d9378 100644
+--- a/include/asm-arm/arch-ixp4xx/nas100d.h
++++ b/include/asm-arm/arch-ixp4xx/nas100d.h
+@@ -38,15 +38,15 @@
+
+ /* Buttons */
+
+-#define NAS100D_PB_GPIO 14
+-#define NAS100D_RB_GPIO 4
++#define NAS100D_PB_GPIO 14 /* power button */
++#define NAS100D_RB_GPIO 4 /* reset button */
++
++/* Power control */
++
+ #define NAS100D_PO_GPIO 12 /* power off */
+
+-#define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14
+-#define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4
++/* LEDs */
+
+-/*
+-#define NAS100D_PB_BM (1L << NAS100D_PB_GPIO)
+-#define NAS100D_PO_BM (1L << NAS100D_PO_GPIO)
+-#define NAS100D_RB_BM (1L << NAS100D_RB_GPIO)
+-*/
++#define NAS100D_LED_WLAN_GPIO 0
++#define NAS100D_LED_DISK_GPIO 3
++#define NAS100D_LED_PWR_GPIO 15
+--
+1.5.2.5
+
diff --git a/target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_rtc_info.patch b/target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_rtc_info.patch
new file mode 100644
index 000000000..fab383f11
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_rtc_info.patch
@@ -0,0 +1,156 @@
+From 88721db37ead2212a54c1392e2e65bae78d2604b Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 10:05:48 +1030
+Subject: ixp4xx: Register nslu2 rtc i2c_board_info (Patch #4772)
+
+Register the i2c board info related to the RTC chip on the nslu2 board
+to allow it to be found automatically on boot.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
+
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git5
+
+diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
+index 332a066..ebeb566 100644
+--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
++++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
+@@ -19,6 +19,7 @@
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
+ #include <linux/leds.h>
++#include <linux/i2c.h>
+ #include <linux/i2c-gpio.h>
+
+ #include <asm/mach-types.h>
+@@ -49,6 +50,12 @@ static struct i2c_gpio_platform_data nslu2_i2c_gpio_data = {
+ .scl_pin = NSLU2_SCL_PIN,
+ };
+
++static struct i2c_board_info __initdata nslu2_i2c_board_info [] = {
++ {
++ I2C_BOARD_INFO("rtc-x1205", 0x6f),
++ },
++};
++
+ #ifdef CONFIG_LEDS_IXP4XX
+ static struct resource nslu2_led_resources[] = {
+ {
+@@ -207,6 +214,9 @@ static void __init nslu2_init(void)
+
+ pm_power_off = nslu2_power_off;
+
++ i2c_register_board_info(0, nslu2_i2c_board_info,
++ ARRAY_SIZE(nslu2_i2c_board_info));
++
+ /*
+ * This is only useful on a modified machine, but it is valuable
+ * to have it first in order to see debug messages, and so that
+--
+1.5.2.5
+
+From d4ef1ee0daf96e42bf93421960eaded71e189712 Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 10:07:29 +1030
+Subject: ixp4xx: Register nas100d rtc i2c_board_info (Patch #4773)
+
+Register the i2c board info related to the RTC chip on the nas100d
+board to allow it to be found automatically on boot.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
+
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git5
+
+diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
+index b0884c2..09f75b9 100644
+--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
++++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
+@@ -17,6 +17,7 @@
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
+ #include <linux/leds.h>
++#include <linux/i2c.h>
+ #include <linux/i2c-gpio.h>
+
+ #include <asm/mach-types.h>
+@@ -41,6 +42,12 @@ static struct platform_device nas100d_flash = {
+ .resource = &nas100d_flash_resource,
+ };
+
++static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
++ {
++ I2C_BOARD_INFO("rtc-pcf8563", 0x51),
++ },
++};
++
+ #ifdef CONFIG_LEDS_IXP4XX
+ static struct resource nas100d_led_resources[] = {
+ {
+@@ -181,6 +188,9 @@ static void __init nas100d_init(void)
+
+ pm_power_off = nas100d_power_off;
+
++ i2c_register_board_info(0, nas100d_i2c_board_info,
++ ARRAY_SIZE(nas100d_i2c_board_info));
++
+ /*
+ * This is only useful on a modified machine, but it is valuable
+ * to have it first in order to see debug messages, and so that
+--
+1.5.2.5
+
+From aa9d35dae397402f57f1baa8d53fed75d76aed8d Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 10:09:41 +1030
+Subject: ixp4xx: Register dsmg600 rtc i2c_board_info (Patch #4774)
+
+Register the i2c board info related to the RTC chip on the dsmg600
+board to allow it to be found automatically on boot.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
+
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git5
+
+diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
+index c473d40..a1c44ef 100644
+--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
++++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
+@@ -14,6 +14,7 @@
+ #include <linux/kernel.h>
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
++#include <linux/i2c.h>
+ #include <linux/i2c-gpio.h>
+
+ #include <asm/mach-types.h>
+@@ -51,6 +52,12 @@ static struct platform_device dsmg600_i2c_gpio = {
+ },
+ };
+
++static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
++ {
++ I2C_BOARD_INFO("rtc-pcf8563", 0x51),
++ },
++};
++
+ #ifdef CONFIG_LEDS_CLASS
+ static struct resource dsmg600_led_resources[] = {
+ {
+@@ -158,6 +165,9 @@ static void __init dsmg600_init(void)
+
+ pm_power_off = dsmg600_power_off;
+
++ i2c_register_board_info(0, dsmg600_i2c_board_info,
++ ARRAY_SIZE(dsmg600_i2c_board_info));
++
+ /* The UART is required on the DSM-G600 (Redboot cannot use the
+ * NIC) -- do it here so that it does *not* get removed if
+ * platform_add_devices fails!
+--
+1.5.2.5
+
diff --git a/target/linux/ixp4xx/patches-2.6.24/021-ixp4xx_use_leds_gpio.patch b/target/linux/ixp4xx/patches-2.6.24/021-ixp4xx_use_leds_gpio.patch
new file mode 100644
index 000000000..9ec7a4fe9
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.24/021-ixp4xx_use_leds_gpio.patch
@@ -0,0 +1,242 @@
+From 383256474f2ba043bdb57a657f9d786df88780f1 Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 17:17:29 +1030
+Subject: ixp4xx: Use leds-gpio driver instead of IXP4XX-GPIO-LED driver
+
+These are the only three boards to use the IXP4XX-GPIO-LED driver, and
+they can all use the new leds-gpio driver instead with no change in
+functionality.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+--
+PATCH FOLLOWS
+KernelVersion: v2.6.24-1915-gc9b12e6
+
+diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
+index 2d5ae33..77fe3b0 100644
+--- a/arch/arm/configs/ixp4xx_defconfig
++++ b/arch/arm/configs/ixp4xx_defconfig
+@@ -1330,8 +1330,8 @@ CONFIG_LEDS_CLASS=y
+ #
+ # LED drivers
+ #
+-CONFIG_LEDS_IXP4XX=y
+-# CONFIG_LEDS_GPIO is not set
++# CONFIG_LEDS_IXP4XX is not set
++CONFIG_LEDS_GPIO=y
+
+ #
+ # LED Triggers
+diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
+index a1c44ef..d0e1295 100644
+--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
++++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
+@@ -14,6 +14,7 @@
+ #include <linux/kernel.h>
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
++#include <linux/leds.h>
+ #include <linux/i2c.h>
+ #include <linux/i2c-gpio.h>
+
+@@ -58,29 +59,28 @@ static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
+ },
+ };
+
+-#ifdef CONFIG_LEDS_CLASS
+-static struct resource dsmg600_led_resources[] = {
++static struct gpio_led dsmg600_led_pins[] = {
+ {
+- .name = "power",
+- .start = DSMG600_LED_PWR_GPIO,
+- .end = DSMG600_LED_PWR_GPIO,
+- .flags = IXP4XX_GPIO_HIGH,
++ .name = "power",
++ .gpio = DSMG600_LED_PWR_GPIO,
+ },
+ {
+- .name = "wlan",
+- .start = DSMG600_LED_WLAN_GPIO,
+- .end = DSMG600_LED_WLAN_GPIO,
+- .flags = IXP4XX_GPIO_LOW,
++ .name = "wlan",
++ .gpio = DSMG600_LED_WLAN_GPIO,
++ .active_low = true,
+ },
+ };
+
++static struct gpio_led_platform_data dsmg600_led_data = {
++ .num_leds = ARRAY_SIZE(dsmg600_led_pins),
++ .leds = dsmg600_led_pins,
++};
++
+ static struct platform_device dsmg600_leds = {
+- .name = "IXP4XX-GPIO-LED",
+- .id = -1,
+- .num_resources = ARRAY_SIZE(dsmg600_led_resources),
+- .resource = dsmg600_led_resources,
++ .name = "leds-gpio",
++ .id = -1,
++ .dev.platform_data = &dsmg600_led_data,
+ };
+-#endif
+
+ static struct resource dsmg600_uart_resources[] = {
+ {
+@@ -128,6 +128,7 @@ static struct platform_device dsmg600_uart = {
+ static struct platform_device *dsmg600_devices[] __initdata = {
+ &dsmg600_i2c_gpio,
+ &dsmg600_flash,
++ &dsmg600_leds,
+ };
+
+ static void dsmg600_power_off(void)
+@@ -175,11 +176,6 @@ static void __init dsmg600_init(void)
+ (void)platform_device_register(&dsmg600_uart);
+
+ platform_add_devices(dsmg600_devices, ARRAY_SIZE(dsmg600_devices));
+-
+-#ifdef CONFIG_LEDS_CLASS
+- /* We don't care whether or not this works. */
+- (void)platform_device_register(&dsmg600_leds);
+-#endif
+ }
+
+ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
+diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
+index dc782d0..5801579 100644
+--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
++++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
+@@ -46,35 +46,34 @@ static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
+ },
+ };
+
+-#ifdef CONFIG_LEDS_IXP4XX
+-static struct resource nas100d_led_resources[] = {
++static struct gpio_led nas100d_led_pins[] = {
+ {
+ .name = "wlan", /* green led */
+- .start = NAS100D_LED_WLAN_GPIO,
+- .end = NAS100D_LED_WLAN_GPIO,
+- .flags = IXP4XX_GPIO_LOW,
++ .gpio = NAS100D_LED_WLAN_GPIO,
++ .active_low = true,
+ },
+ {
+ .name = "power", /* blue power led (off=flashing) */
+- .start = NAS100D_LED_PWR_GPIO,
+- .end = NAS100D_LED_PWR_GPIO,
+- .flags = IXP4XX_GPIO_LOW,
++ .gpio = NAS100D_LED_PWR_GPIO,
++ .active_low = true,
+ },
+ {
+ .name = "disk", /* yellow led */
+- .start = NAS100D_LED_DISK_GPIO,
+- .end = NAS100D_LED_DISK_GPIO,
+- .flags = IXP4XX_GPIO_LOW,
++ .gpio = NAS100D_LED_DISK_GPIO,
++ .active_low = true,
+ },
+ };
+
++static struct gpio_led_platform_data nas100d_led_data = {
++ .num_leds = ARRAY_SIZE(nas100d_led_pins),
++ .leds = nas100d_led_pins,
++};
++
+ static struct platform_device nas100d_leds = {
+- .name = "IXP4XX-GPIO-LED",
++ .name = "leds-gpio",
+ .id = -1,
+- .num_resources = ARRAY_SIZE(nas100d_led_resources),
+- .resource = nas100d_led_resources,
++ .dev.platform_data = &nas100d_led_data,
+ };
+-#endif
+
+ static struct i2c_gpio_platform_data nas100d_i2c_gpio_data = {
+ .sda_pin = NAS100D_SDA_PIN,
+@@ -135,9 +134,7 @@ static struct platform_device nas100d_uart = {
+ static struct platform_device *nas100d_devices[] __initdata = {
+ &nas100d_i2c_gpio,
+ &nas100d_flash,
+-#ifdef CONFIG_LEDS_IXP4XX
+ &nas100d_leds,
+-#endif
+ };
+
+ static void nas100d_power_off(void)
+diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
+index 16d091c..41d55c8 100644
+--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
++++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
+@@ -54,41 +54,37 @@ static struct i2c_board_info __initdata nslu2_i2c_board_info [] = {
+ },
+ };
+
+-#ifdef CONFIG_LEDS_IXP4XX
+-static struct resource nslu2_led_resources[] = {
++static struct gpio_led nslu2_led_pins[] = {
+ {
+ .name = "ready", /* green led */
+- .start = NSLU2_LED_GRN_GPIO,
+- .end = NSLU2_LED_GRN_GPIO,
+- .flags = IXP4XX_GPIO_HIGH,
++ .gpio = NSLU2_LED_GRN_GPIO,
+ },
+ {
+ .name = "status", /* red led */
+- .start = NSLU2_LED_RED_GPIO,
+- .end = NSLU2_LED_RED_GPIO,
+- .flags = IXP4XX_GPIO_HIGH,
++ .gpio = NSLU2_LED_RED_GPIO,
+ },
+ {
+ .name = "disk-1",
+- .start = NSLU2_LED_DISK1_GPIO,
+- .end = NSLU2_LED_DISK1_GPIO,
+- .flags = IXP4XX_GPIO_LOW,
++ .gpio = NSLU2_LED_DISK1_GPIO,
++ .active_low = true,
+ },
+ {
+ .name = "disk-2",
+- .start = NSLU2_LED_DISK2_GPIO,
+- .end = NSLU2_LED_DISK2_GPIO,
+- .flags = IXP4XX_GPIO_LOW,
++ .gpio = NSLU2_LED_DISK2_GPIO,
++ .active_low = true,
+ },
+ };
+
++static struct gpio_led_platform_data nslu2_led_data = {
++ .num_leds = ARRAY_SIZE(nslu2_led_pins),
++ .leds = nslu2_led_pins,
++};
++
+ static struct platform_device nslu2_leds = {
+- .name = "IXP4XX-GPIO-LED",
++ .name = "leds-gpio",
+ .id = -1,
+- .num_resources = ARRAY_SIZE(nslu2_led_resources),
+- .resource = nslu2_led_resources,
++ .dev.platform_data = &nslu2_led_data,
+ };
+-#endif
+
+ static struct platform_device nslu2_i2c_gpio = {
+ .name = "i2c-gpio",
+@@ -151,9 +147,7 @@ static struct platform_device *nslu2_devices[] __initdata = {
+ &nslu2_i2c_gpio,
+ &nslu2_flash,
+ &nslu2_beeper,
+-#ifdef CONFIG_LEDS_IXP4XX
+ &nslu2_leds,
+-#endif
+ };
+
+ static void nslu2_power_off(void)
+--
+1.5.2.5
+
diff --git a/target/linux/ixp4xx/patches-2.6.24/031-ixp4xx-net-drivers-nslu2.patch b/target/linux/ixp4xx/patches-2.6.24/031-ixp4xx-net-drivers-nslu2.patch
deleted file mode 100644
index d4c710c04..000000000
--- a/target/linux/ixp4xx/patches-2.6.24/031-ixp4xx-net-drivers-nslu2.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c
-===================================================================
---- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2008-01-08 15:28:13.000000000 +1030
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c 2008-01-08 15:28:32.000000000 +1030
-@@ -24,6 +24,7 @@
- #include <asm/mach/arch.h>
- #include <asm/mach/flash.h>
- #include <asm/mach/time.h>
-+#include <asm/io.h>
-
- static struct flash_platform_data nslu2_flash_data = {
- .map_name = "cfi_probe",
-@@ -140,6 +141,23 @@
- .resource = nslu2_uart_resources,
- };
-
-+/* Built-in 10/100 Ethernet MAC interfaces */
-+static struct eth_plat_info nslu2_plat_eth[] = {
-+ {
-+ .phy = 1,
-+ .rxq = 3,
-+ .txreadyq = 20,
-+ }
-+};
-+
-+static struct platform_device nslu2_eth[] = {
-+ {
-+ .name = "ixp4xx_eth",
-+ .id = IXP4XX_ETH_NPEB,
-+ .dev.platform_data = nslu2_plat_eth,
-+ }
-+};
-+
- static struct platform_device *nslu2_devices[] __initdata = {
- &nslu2_i2c_gpio,
- &nslu2_flash,
-@@ -147,6 +165,7 @@
- #ifdef CONFIG_LEDS_IXP4XX
- &nslu2_leds,
- #endif
-+ &nslu2_eth[0],
- };
-
- static void nslu2_power_off(void)
-@@ -175,6 +194,9 @@
-
- static void __init nslu2_init(void)
- {
-+ uint8_t __iomem *f;
-+ int i;
-+
- ixp4xx_sys_init();
-
- nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
-@@ -191,6 +213,33 @@
- (void)platform_device_register(&nslu2_uart);
-
- platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
-+
-+
-+ /*
-+ * Map in a portion of the flash and read the MAC address.
-+ * Since it is stored in BE in the flash itself, we need to
-+ * byteswap it if we're in LE mode.
-+ */
-+ if ((f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x40000))) {
-+#ifdef __ARMEB__
-+ for (i = 0; i < 6; i++) {
-+ nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + i);
-+ }
-+#else
-+ nslu2_plat_eth[0].hwaddr[0] = readb(f + 0x3FFB0 + 3);
-+ nslu2_plat_eth[0].hwaddr[1] = readb(f + 0x3FFB0 + 2);
-+ nslu2_plat_eth[0].hwaddr[2] = readb(f + 0x3FFB0 + 1);
-+ nslu2_plat_eth[0].hwaddr[3] = readb(f + 0x3FFB0 + 0);
-+ nslu2_plat_eth[0].hwaddr[4] = readb(f + 0x3FFB0 + 7);
-+ nslu2_plat_eth[0].hwaddr[5] = readb(f + 0x3FFB0 + 6);
-+#endif
-+ iounmap(f);
-+ }
-+ printk(KERN_INFO "NSLU2: Using MAC address %.2x:%.2x:%.2x:%.2x:%.2x:%.2x for port 0\n",
-+ nslu2_plat_eth[0].hwaddr[0], nslu2_plat_eth[0].hwaddr[1],
-+ nslu2_plat_eth[0].hwaddr[2], nslu2_plat_eth[0].hwaddr[3],
-+ nslu2_plat_eth[0].hwaddr[4], nslu2_plat_eth[0].hwaddr[5]);
-+
- }
-
- MACHINE_START(NSLU2, "Linksys NSLU2")
diff --git a/target/linux/ixp4xx/patches-2.6.24/031-nslu2_nas100d_ethernet_support.patch b/target/linux/ixp4xx/patches-2.6.24/031-nslu2_nas100d_ethernet_support.patch
new file mode 100644
index 000000000..001c73ba6
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.24/031-nslu2_nas100d_ethernet_support.patch
@@ -0,0 +1,235 @@
+From af66bd3b3324d51f0c43b7672b7a0563db425377 Mon Sep 17 00:00:00 2001
+From: Rod Whitby <rod@whitby.id.au>
+Date: Tue, 29 Jan 2008 10:03:19 +1030
+Subject: ixp4xx: Ethernet support for the nslu2 and nas100d boards
+
+Enables the new ixp4xx qmgr and npe drivers in ixp4xx_defconfig.
+
+Sets up the corresponding platform data for the nslu2 and nas100d
+boards, and reads the ethernet MAC address from the internal flash.
+
+Tested on both little-endian and big-endian kernels.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+Signed-off-by: Michael Westerhof <mwester@dls.net>
+Tested-by: Tom King <tom@websb.net>
+
+PATCH FOLLOWS
+KernelVersion: v2.6.24-1916-g3832564
+
+diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
+index 77fe3b0..efa0485 100644
+--- a/arch/arm/configs/ixp4xx_defconfig
++++ b/arch/arm/configs/ixp4xx_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.24-rc8
+-# Wed Jan 23 17:26:16 2008
++# Linux kernel version: 2.6.24
++# Sun Jan 27 07:33:38 2008
+ #
+ CONFIG_ARM=y
+ CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+@@ -174,6 +174,8 @@ CONFIG_MACH_GTWX5715=y
+ #
+ CONFIG_DMABOUNCE=y
+ # CONFIG_IXP4XX_INDIRECT_PCI is not set
++CONFIG_IXP4XX_QMGR=y
++CONFIG_IXP4XX_NPE=y
+
+ #
+ # Boot options
+@@ -832,6 +834,7 @@ CONFIG_DUMMY=y
+ # CONFIG_PHYLIB is not set
+ CONFIG_NET_ETHERNET=y
+ CONFIG_MII=y
++CONFIG_IXP4XX_ETH=y
+ # CONFIG_AX88796 is not set
+ # CONFIG_HAPPYMEAL is not set
+ # CONFIG_SUNGEM is not set
+@@ -925,6 +928,7 @@ CONFIG_HDLC_X25=m
+ # CONFIG_PC300TOO is not set
+ # CONFIG_FARSYNC is not set
+ # CONFIG_DSCC4 is not set
++# CONFIG_IXP4XX_HSS is not set
+ CONFIG_DLCI=m
+ CONFIG_DLCI_MAX=8
+ CONFIG_WAN_ROUTER_DRIVERS=m
+diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
+index 5801579..a432226 100644
+--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
++++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
+@@ -12,6 +12,7 @@
+ *
+ */
+
++#include <linux/if_ether.h>
+ #include <linux/kernel.h>
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
+@@ -22,6 +23,7 @@
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/flash.h>
++#include <asm/io.h>
+
+ static struct flash_platform_data nas100d_flash_data = {
+ .map_name = "cfi_probe",
+@@ -131,10 +133,28 @@ static struct platform_device nas100d_uart = {
+ .resource = nas100d_uart_resources,
+ };
+
++/* Built-in 10/100 Ethernet MAC interfaces */
++static struct eth_plat_info nas100d_plat_eth[] = {
++ {
++ .phy = 0,
++ .rxq = 3,
++ .txreadyq = 20,
++ }
++};
++
++static struct platform_device nas100d_eth[] = {
++ {
++ .name = "ixp4xx_eth",
++ .id = IXP4XX_ETH_NPEB,
++ .dev.platform_data = nas100d_plat_eth,
++ }
++};
++
+ static struct platform_device *nas100d_devices[] __initdata = {
+ &nas100d_i2c_gpio,
+ &nas100d_flash,
+ &nas100d_leds,
++ &nas100d_eth[0],
+ };
+
+ static void nas100d_power_off(void)
+@@ -150,6 +170,10 @@ static void nas100d_power_off(void)
+
+ static void __init nas100d_init(void)
+ {
++ DECLARE_MAC_BUF(mac_buf);
++ uint8_t __iomem *f;
++ int i;
++
+ ixp4xx_sys_init();
+
+ /* gpio 14 and 15 are _not_ clocks */
+@@ -172,6 +196,25 @@ static void __init nas100d_init(void)
+ (void)platform_device_register(&nas100d_uart);
+
+ platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));
++
++ /*
++ * Map in a portion of the flash and read the MAC address.
++ * Since it is stored in BE in the flash itself, we need to
++ * byteswap it if we're in LE mode.
++ */
++ f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x1000000);
++ if (f) {
++ for (i = 0; i < 6; i++)
++#ifdef __ARMEB__
++ nas100d_plat_eth[0].hwaddr[i] = readb(f + 0xFC0FD8 + i);
++#else
++ nas100d_plat_eth[0].hwaddr[i] = readb(f + 0xFC0FD8 + (i^3));
++#endif
++ iounmap(f);
++ }
++ printk(KERN_INFO "NAS100D: Using MAC address %s for port 0\n",
++ print_mac(mac_buf, nas100d_plat_eth[0].hwaddr));
++
+ }
+
+ MACHINE_START(NAS100D, "Iomega NAS 100d")
+diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
+index 41d55c8..fd9ec17 100644
+--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
++++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
+@@ -14,6 +14,7 @@
+ * Changed to conform to new style __init ixdp425 kas11 10/22/04
+ */
+
++#include <linux/if_ether.h>
+ #include <linux/kernel.h>
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
+@@ -25,6 +26,7 @@
+ #include <asm/mach/arch.h>
+ #include <asm/mach/flash.h>
+ #include <asm/mach/time.h>
++#include <asm/io.h>
+
+ static struct flash_platform_data nslu2_flash_data = {
+ .map_name = "cfi_probe",
+@@ -143,11 +145,29 @@ static struct platform_device nslu2_uart = {
+ .resource = nslu2_uart_resources,
+ };
+
++/* Built-in 10/100 Ethernet MAC interfaces */
++static struct eth_plat_info nslu2_plat_eth[] = {
++ {
++ .phy = 1,
++ .rxq = 3,
++ .txreadyq = 20,
++ }
++};
++
++static struct platform_device nslu2_eth[] = {
++ {
++ .name = "ixp4xx_eth",
++ .id = IXP4XX_ETH_NPEB,
++ .dev.platform_data = nslu2_plat_eth,
++ }
++};
++
+ static struct platform_device *nslu2_devices[] __initdata = {
+ &nslu2_i2c_gpio,
+ &nslu2_flash,
+ &nslu2_beeper,
+ &nslu2_leds,
++ &nslu2_eth[0],
+ };
+
+ static void nslu2_power_off(void)
+@@ -176,6 +196,10 @@ static struct sys_timer nslu2_timer = {
+
+ static void __init nslu2_init(void)
+ {
++ DECLARE_MAC_BUF(mac_buf);
++ uint8_t __iomem *f;
++ int i;
++
+ ixp4xx_sys_init();
+
+ nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
+@@ -195,6 +219,26 @@ static void __init nslu2_init(void)
+ (void)platform_device_register(&nslu2_uart);
+
+ platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
++
++
++ /*
++ * Map in a portion of the flash and read the MAC address.
++ * Since it is stored in BE in the flash itself, we need to
++ * byteswap it if we're in LE mode.
++ */
++ f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x40000);
++ if (f) {
++ for (i = 0; i < 6; i++)
++#ifdef __ARMEB__
++ nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + i);
++#else
++ nslu2_plat_eth[0].hwaddr[i] = readb(f + 0x3FFB0 + (i^3));
++#endif
++ iounmap(f);
++ }
++ printk(KERN_INFO "NSLU2: Using MAC address %s for port 0\n",
++ print_mac(mac_buf, nslu2_plat_eth[0].hwaddr));
++
+ }
+
+ MACHINE_START(NSLU2, "Linksys NSLU2")
+--
+1.5.2.5
+
diff --git a/target/linux/ixp4xx/patches-2.6.24/032-ixp4xx-net-drivers-nas100d.patch b/target/linux/ixp4xx/patches-2.6.24/032-ixp4xx-net-drivers-nas100d.patch
deleted file mode 100644
index 143473378..000000000
--- a/target/linux/ixp4xx/patches-2.6.24/032-ixp4xx-net-drivers-nas100d.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Index: linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c
-===================================================================
---- linux-2.6.23.12-armeb.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2008-01-08 15:22:07.000000000 +1030
-+++ linux-2.6.23.12-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c 2008-01-08 15:32:32.000000000 +1030
-@@ -21,6 +21,7 @@
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/flash.h>
-+#include <asm/io.h>
-
- static struct flash_platform_data nas100d_flash_data = {
- .map_name = "cfi_probe",
-@@ -125,12 +126,30 @@
- .resource = nas100d_uart_resources,
- };
-
-+/* Built-in 10/100 Ethernet MAC interfaces */
-+static struct eth_plat_info nas100d_plat_eth[] = {
-+ {
-+ .phy = 0,
-+ .rxq = 3,
-+ .txreadyq = 20,
-+ }
-+};
-+
-+static struct platform_device nas100d_eth[] = {
-+ {
-+ .name = "ixp4xx_eth",
-+ .id = IXP4XX_ETH_NPEB,
-+ .dev.platform_data = nas100d_plat_eth,
-+ }
-+};
-+
- static struct platform_device *nas100d_devices[] __initdata = {
- &nas100d_i2c_gpio,
- &nas100d_flash,
- #ifdef CONFIG_LEDS_IXP4XX
- &nas100d_leds,
- #endif
-+ &nas100d_eth[0],
- };
-
- static void nas100d_power_off(void)
-@@ -146,6 +165,9 @@
-
- static void __init nas100d_init(void)
- {
-+ uint8_t __iomem *f;
-+ int i;
-+
- ixp4xx_sys_init();
-
- /* gpio 14 and 15 are _not_ clocks */
-@@ -165,6 +187,33 @@
- (void)platform_device_register(&nas100d_uart);
-
- platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));
-+
-+
-+ /*
-+ * Map in a portion of the flash and read the MAC address.
-+ * Since it is stored in BE in the flash itself, we need to
-+ * byteswap it if we're in LE mode.
-+ */
-+ if ((f = ioremap(IXP4XX_EXP_BUS_BASE(0), 0x1000000))) {
-+#ifdef __ARMEB__
-+ for (i = 0; i < 6; i++) {
-+ nas100d_plat_eth[0].hwaddr[i] = readb(f + 0xFC0FD8 + i);
-+ }
-+#else
-+ nas100d_plat_eth[0].hwaddr[0] = readb(f + 0xFC0FD8 + 3);
-+ nas100d_plat_eth[0].hwaddr[1] = readb(f + 0xFC0FD8 + 2);
-+ nas100d_plat_eth[0].hwaddr[2] = readb(f + 0xFC0FD8 + 1);
-+ nas100d_plat_eth[0].hwaddr[3] = readb(f + 0xFC0FD8 + 0);
-+ nas100d_plat_eth[0].hwaddr[4] = readb(f + 0xFC0FD8 + 7);
-+ nas100d_plat_eth[0].hwaddr[5] = readb(f + 0xFC0FD8 + 6);
-+#endif
-+ iounmap(f);
-+ }
-+ printk(KERN_INFO "NAS100D: Using MAC address %.2x:%.2x:%.2x:%.2x:%.2x:%.2x for port 0\n",
-+ nas100d_plat_eth[0].hwaddr[0], nas100d_plat_eth[0].hwaddr[1],
-+ nas100d_plat_eth[0].hwaddr[2], nas100d_plat_eth[0].hwaddr[3],
-+ nas100d_plat_eth[0].hwaddr[4], nas100d_plat_eth[0].hwaddr[5]);
-+
- }
-
- MACHINE_START(NAS100D, "Iomega NAS 100d")
diff --git a/target/linux/ixp4xx/patches-2.6.24/032-subsume_power_files.patch b/target/linux/ixp4xx/patches-2.6.24/032-subsume_power_files.patch
new file mode 100644
index 000000000..fa4070ba2
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.24/032-subsume_power_files.patch
@@ -0,0 +1,873 @@
+From: Rod Whitby <rod@whitby.id.au>
+Subject: ixp4xx: Merge nslu2-power.c into nslu2-setup.c (Patch #4807)
+
+There is no reason to have power control in a separate file from the
+board setup code. Merge it back into the board setup file, removing
+superfluous header includes and removing superfluous constants from
+the machine header file.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+--
+PATCH FOLLOWS
+KernelVersion: v2.6.24-1917-gaf66bd3
+
+Index: linux-2.6.24-armeb/arch/arm/mach-ixp4xx/Makefile
+===================================================================
+--- linux-2.6.24-armeb.orig/arch/arm/mach-ixp4xx/Makefile 2008-02-03 22:45:22.000000000 +1030
++++ linux-2.6.24-armeb/arch/arm/mach-ixp4xx/Makefile 2008-02-03 22:45:44.000000000 +1030
+@@ -23,7 +23,7 @@
+ obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o
+ obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-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
+ obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
+ obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
+ obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
+Index: linux-2.6.24-armeb/arch/arm/mach-ixp4xx/nslu2-power.c
+===================================================================
+--- linux-2.6.24-armeb.orig/arch/arm/mach-ixp4xx/nslu2-power.c 2008-02-03 22:45:10.000000000 +1030
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,92 +0,0 @@
+-/*
+- * arch/arm/mach-ixp4xx/nslu2-power.c
+- *
+- * NSLU2 Power/Reset driver
+- *
+- * Copyright (C) 2005 Tower Technologies
+- *
+- * based on nslu2-io.c
+- * Copyright (C) 2004 Karen Spearel
+- *
+- * Author: Alessandro Zummo <a.zummo@towertech.it>
+- * Maintainers: http://www.nslu2-linux.org/
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- *
+- */
+-
+-#include <linux/module.h>
+-#include <linux/reboot.h>
+-#include <linux/irq.h>
+-#include <linux/interrupt.h>
+-#include <linux/reboot.h>
+-
+-#include <asm/mach-types.h>
+-
+-static irqreturn_t nslu2_power_handler(int irq, void *dev_id)
+-{
+- /* Signal init to do the ctrlaltdel action, this will bypass init if
+- * it hasn't started and do a kernel_restart.
+- */
+- ctrl_alt_del();
+-
+- return IRQ_HANDLED;
+-}
+-
+-static irqreturn_t nslu2_reset_handler(int irq, void *dev_id)
+-{
+- /* This is the paper-clip reset, it shuts the machine down directly.
+- */
+- machine_power_off();
+-
+- return IRQ_HANDLED;
+-}
+-
+-static int __init nslu2_power_init(void)
+-{
+- if (!(machine_is_nslu2()))
+- return 0;
+-
+- *IXP4XX_GPIO_GPISR = 0x20400000; /* read the 2 irqs to clr */
+-
+- set_irq_type(NSLU2_RB_IRQ, IRQT_LOW);
+- set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH);
+-
+- if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler,
+- IRQF_DISABLED, "NSLU2 reset button", NULL) < 0) {
+-
+- printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
+- NSLU2_RB_IRQ);
+-
+- return -EIO;
+- }
+-
+- if (request_irq(NSLU2_PB_IRQ, &nslu2_power_handler,
+- IRQF_DISABLED, "NSLU2 power button", NULL) < 0) {
+-
+- printk(KERN_DEBUG "Power Button IRQ %d not available\n",
+- NSLU2_PB_IRQ);
+-
+- return -EIO;
+- }
+-
+- return 0;
+-}
+-
+-static void __exit nslu2_power_exit(void)
+-{
+- if (!(machine_is_nslu2()))
+- return;
+-
+- free_irq(NSLU2_RB_IRQ, NULL);
+- free_irq(NSLU2_PB_IRQ, NULL);
+-}
+-
+-module_init(nslu2_power_init);
+-module_exit(nslu2_power_exit);
+-
+-MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
+-MODULE_DESCRIPTION("NSLU2 Power/Reset driver");
+-MODULE_LICENSE("GPL");
+Index: linux-2.6.24-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c
+===================================================================
+--- linux-2.6.24-armeb.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2008-02-03 22:45:22.000000000 +1030
++++ linux-2.6.24-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c 2008-02-03 22:45:44.000000000 +1030
+@@ -3,22 +3,26 @@
+ *
+ * NSLU2 board-setup
+ *
+- * based ixdp425-setup.c:
++ * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au>
++ *
++ * based on ixdp425-setup.c:
+ * Copyright (C) 2003-2004 MontaVista Software, Inc.
++ * based on nslu2-power.c:
++ * Copyright (C) 2005 Tower Technologies
+ *
+ * Author: Mark Rakes <mrakes at mac.com>
+ * Author: Rod Whitby <rod@whitby.id.au>
++ * Author: Alessandro Zummo <a.zummo@towertech.it>
+ * Maintainers: http://www.nslu2-linux.org/
+ *
+- * Fixed missing init_time in MACHINE_START kas11 10/22/04
+- * Changed to conform to new style __init ixdp425 kas11 10/22/04
+ */
+
+ #include <linux/if_ether.h>
+-#include <linux/kernel.h>
++#include <linux/irq.h>
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
+ #include <linux/leds.h>
++#include <linux/reboot.h>
+ #include <linux/i2c.h>
+ #include <linux/i2c-gpio.h>
+
+@@ -27,6 +31,7 @@
+ #include <asm/mach/flash.h>
+ #include <asm/mach/time.h>
+ #include <asm/io.h>
++#include <asm/gpio.h>
+
+ static struct flash_platform_data nslu2_flash_data = {
+ .map_name = "cfi_probe",
+@@ -181,6 +186,25 @@
+ gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH);
+ }
+
++static irqreturn_t nslu2_power_handler(int irq, void *dev_id)
++{
++ /* Signal init to do the ctrlaltdel action, this will bypass init if
++ * it hasn't started and do a kernel_restart.
++ */
++ ctrl_alt_del();
++
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t nslu2_reset_handler(int irq, void *dev_id)
++{
++ /* This is the paper-clip reset, it shuts the machine down directly.
++ */
++ machine_power_off();
++
++ return IRQ_HANDLED;
++}
++
+ static void __init nslu2_timer_init(void)
+ {
+ /* The xtal on this machine is non-standard. */
+@@ -206,8 +230,6 @@
+ nslu2_flash_resource.end =
+ IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
+
+- pm_power_off = nslu2_power_off;
+-
+ i2c_register_board_info(0, nslu2_i2c_board_info,
+ ARRAY_SIZE(nslu2_i2c_board_info));
+
+@@ -220,6 +242,23 @@
+
+ platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
+
++ pm_power_off = nslu2_power_off;
++
++ if (request_irq(gpio_to_irq(NSLU2_RB_GPIO), &nslu2_reset_handler,
++ IRQF_DISABLED | IRQF_TRIGGER_LOW,
++ "NSLU2 reset button", NULL) < 0) {
++
++ printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
++ gpio_to_irq(NSLU2_RB_GPIO));
++ }
++
++ if (request_irq(gpio_to_irq(NSLU2_PB_GPIO), &nslu2_power_handler,
++ IRQF_DISABLED | IRQF_TRIGGER_HIGH,
++ "NSLU2 power button", NULL) < 0) {
++
++ printk(KERN_DEBUG "Power Button IRQ %d not available\n",
++ gpio_to_irq(NSLU2_PB_GPIO));
++ }
+
+ /*
+ * Map in a portion of the flash and read the MAC address.
+Index: linux-2.6.24-armeb/include/asm-arm/arch-ixp4xx/nslu2.h
+===================================================================
+--- linux-2.6.24-armeb.orig/include/asm-arm/arch-ixp4xx/nslu2.h 2008-02-03 22:45:11.000000000 +1030
++++ linux-2.6.24-armeb/include/asm-arm/arch-ixp4xx/nslu2.h 2008-02-03 22:45:44.000000000 +1030
+@@ -39,34 +39,17 @@
+
+ /* Buttons */
+
+-#define NSLU2_PB_GPIO 5
++#define NSLU2_PB_GPIO 5 /* power button */
+ #define NSLU2_PO_GPIO 8 /* power off */
+-#define NSLU2_RB_GPIO 12
+-
+-#define NSLU2_PB_IRQ IRQ_IXP4XX_GPIO5
+-#define NSLU2_RB_IRQ IRQ_IXP4XX_GPIO12
+-
+-#define NSLU2_PB_BM (1L << NSLU2_PB_GPIO)
+-#define NSLU2_PO_BM (1L << NSLU2_PO_GPIO)
+-#define NSLU2_RB_BM (1L << NSLU2_RB_GPIO)
++#define NSLU2_RB_GPIO 12 /* reset button */
+
+ /* Buzzer */
+
+ #define NSLU2_GPIO_BUZZ 4
+-#define NSLU2_BZ_BM (1L << NSLU2_GPIO_BUZZ)
+
+ /* LEDs */
+
+ #define NSLU2_LED_RED_GPIO 0
+ #define NSLU2_LED_GRN_GPIO 1
+-
+-#define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED_GPIO)
+-#define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN_GPIO)
+-
+ #define NSLU2_LED_DISK1_GPIO 3
+ #define NSLU2_LED_DISK2_GPIO 2
+-
+-#define NSLU2_LED_DISK1_BM (1L << NSLU2_LED_DISK1_GPIO)
+-#define NSLU2_LED_DISK2_BM (1L << NSLU2_LED_DISK2_GPIO)
+-
+-
+From: Rod Whitby <rod@whitby.id.au>
+Subject: ixp4xx: Merge nas100d-power.c into nas100d-setup.c (Patch #4808)
+
+There is no reason to have power control in a separate file from the
+board setup code. Merge it back into the board setup file and remove
+superfluous header includes.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+--
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git9
+
+diff --git a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile
+index 4fc7316..a7880ab 100644
+--- a/arch/arm/mach-ixp4xx/Makefile
++++ b/arch/arm/mach-ixp4xx/Makefile
+@@ -24,7 +24,7 @@ obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o
+ obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o
+ obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
+ obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o
+-obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
++obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o
+ obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
+ obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
+ obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
+diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c
+deleted file mode 100644
+index 4c1c01b..0000000
+--- a/arch/arm/mach-ixp4xx/nas100d-power.c
++++ /dev/null
+@@ -1,128 +0,0 @@
+-/*
+- * arch/arm/mach-ixp4xx/nas100d-power.c
+- *
+- * NAS 100d Power/Reset driver
+- *
+- * Copyright (C) 2005 Tower Technologies
+- *
+- * based on nas100d-io.c
+- * Copyright (C) 2004 Karen Spearel
+- *
+- * Author: Alessandro Zummo <a.zummo@towertech.it>
+- * Maintainers: http://www.nslu2-linux.org/
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- *
+- */
+-
+-#include <linux/interrupt.h>
+-#include <linux/irq.h>
+-#include <linux/module.h>
+-#include <linux/reboot.h>
+-#include <linux/jiffies.h>
+-#include <linux/timer.h>
+-
+-#include <asm/gpio.h>
+-#include <asm/mach-types.h>
+-
+-/* This is used to make sure the power-button pusher is serious. The button
+- * must be held until the value of this counter reaches zero.
+- */
+-static int power_button_countdown;
+-
+-/* Must hold the button down for at least this many counts to be processed */
+-#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
+-
+-static void nas100d_power_handler(unsigned long data);
+-static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler, 0, 0);
+-
+-static void nas100d_power_handler(unsigned long data)
+-{
+- /* This routine is called twice per second to check the
+- * state of the power button.
+- */
+-
+- if (gpio_get_value(NAS100D_PB_GPIO)) {
+-
+- /* IO Pin is 1 (button pushed) */
+- if (power_button_countdown > 0)
+- power_button_countdown--;
+-
+- } else {
+-
+- /* Done on button release, to allow for auto-power-on mods. */
+- if (power_button_countdown == 0) {
+- /* Signal init to do the ctrlaltdel action,
+- * this will bypass init if it hasn't started
+- * and do a kernel_restart.
+- */
+- ctrl_alt_del();
+-
+- /* Change the state of the power LED to "blink" */
+- gpio_line_set(NAS100D_LED_PWR_GPIO, IXP4XX_GPIO_LOW);
+- } else {
+- power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
+- }
+- }
+-
+- mod_timer(&nas100d_power_timer, jiffies + msecs_to_jiffies(500));
+-}
+-
+-static irqreturn_t nas100d_reset_handler(int irq, void *dev_id)
+-{
+- /* This is the paper-clip reset, it shuts the machine down directly. */
+- machine_power_off();
+-
+- return IRQ_HANDLED;
+-}
+-
+-static int __init nas100d_power_init(void)
+-{
+- if (!(machine_is_nas100d()))
+- return 0;
+-
+- set_irq_type(gpio_to_irq(NAS100D_RB_GPIO), IRQT_LOW);
+-
+- if (request_irq(gpio_to_irq(NAS100D_RB_GPIO), &nas100d_reset_handler,
+- IRQF_DISABLED, "NAS100D reset button", NULL) < 0) {
+-
+- printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
+- gpio_to_irq(NAS100D_RB_GPIO));
+-
+- return -EIO;
+- }
+-
+- /* The power button on the Iomega NAS100d is on GPIO 14, but
+- * it cannot handle interrupts on that GPIO line. So we'll
+- * have to poll it with a kernel timer.
+- */
+-
+- /* Make sure that the power button GPIO is set up as an input */
+- gpio_line_config(NAS100D_PB_GPIO, IXP4XX_GPIO_IN);
+-
+- /* Set the initial value for the power button IRQ handler */
+- power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
+-
+- mod_timer(&nas100d_power_timer, jiffies + msecs_to_jiffies(500));
+-
+- return 0;
+-}
+-
+-static void __exit nas100d_power_exit(void)
+-{
+- if (!(machine_is_nas100d()))
+- return;
+-
+- del_timer_sync(&nas100d_power_timer);
+-
+- free_irq(gpio_to_irq(NAS100D_RB_GPIO), NULL);
+-}
+-
+-module_init(nas100d_power_init);
+-module_exit(nas100d_power_exit);
+-
+-MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
+-MODULE_DESCRIPTION("NAS100D Power/Reset driver");
+-MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
+index a432226..4cecae8 100644
+--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
++++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
+@@ -3,8 +3,14 @@
+ *
+ * NAS 100d board-setup
+ *
+- * based ixdp425-setup.c:
++ * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au>
++ *
++ * based on ixdp425-setup.c:
+ * Copyright (C) 2003-2004 MontaVista Software, Inc.
++ * based on nas100d-power.c:
++ * Copyright (C) 2005 Tower Technologies
++ * based on nas100d-io.c
++ * Copyright (C) 2004 Karen Spearel
+ *
+ * Author: Alessandro Zummo <a.zummo@towertech.it>
+ * Author: Rod Whitby <rod@whitby.id.au>
+@@ -13,10 +19,13 @@
+ */
+
+ #include <linux/if_ether.h>
+-#include <linux/kernel.h>
++#include <linux/irq.h>
++#include <linux/jiffies.h>
++#include <linux/timer.h>
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
+ #include <linux/leds.h>
++#include <linux/reboot.h>
+ #include <linux/i2c.h>
+ #include <linux/i2c-gpio.h>
+
+@@ -24,6 +33,7 @@
+ #include <asm/mach/arch.h>
+ #include <asm/mach/flash.h>
+ #include <asm/io.h>
++#include <asm/gpio.h>
+
+ static struct flash_platform_data nas100d_flash_data = {
+ .map_name = "cfi_probe",
+@@ -168,6 +178,57 @@ static void nas100d_power_off(void)
+ gpio_line_set(NAS100D_PO_GPIO, IXP4XX_GPIO_HIGH);
+ }
+
++/* This is used to make sure the power-button pusher is serious. The button
++ * must be held until the value of this counter reaches zero.
++ */
++static int power_button_countdown;
++
++/* Must hold the button down for at least this many counts to be processed */
++#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
++
++static void nas100d_power_handler(unsigned long data);
++static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler, 0, 0);
++
++static void nas100d_power_handler(unsigned long data)
++{
++ /* This routine is called twice per second to check the
++ * state of the power button.
++ */
++
++ if (gpio_get_value(NAS100D_PB_GPIO)) {
++
++ /* IO Pin is 1 (button pushed) */
++ if (power_button_countdown > 0)
++ power_button_countdown--;
++
++ } else {
++
++ /* Done on button release, to allow for auto-power-on mods. */
++ if (power_button_countdown == 0) {
++ /* Signal init to do the ctrlaltdel action,
++ * this will bypass init if it hasn't started
++ * and do a kernel_restart.
++ */
++ ctrl_alt_del();
++
++ /* Change the state of the power LED to "blink" */
++ gpio_line_set(NAS100D_LED_PWR_GPIO, IXP4XX_GPIO_LOW);
++ } else {
++ power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
++ }
++ }
++
++ mod_timer(&nas100d_power_timer, jiffies + msecs_to_jiffies(500));
++}
++
++static irqreturn_t nas100d_reset_handler(int irq, void *dev_id)
++{
++ /* This is the paper-clip reset, it shuts the machine down directly. */
++ machine_power_off();
++
++ return IRQ_HANDLED;
++}
++
+ static void __init nas100d_init(void)
+ {
+ DECLARE_MAC_BUF(mac_buf);
+@@ -183,8 +244,6 @@ static void __init nas100d_init(void)
+ nas100d_flash_resource.end =
+ IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
+
+- pm_power_off = nas100d_power_off;
+-
+ i2c_register_board_info(0, nas100d_i2c_board_info,
+ ARRAY_SIZE(nas100d_i2c_board_info));
+
+@@ -197,6 +256,29 @@ static void __init nas100d_init(void)
+
+ platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));
+
++ pm_power_off = nas100d_power_off;
++
++ if (request_irq(gpio_to_irq(NAS100D_RB_GPIO), &nas100d_reset_handler,
++ IRQF_DISABLED | IRQF_TRIGGER_LOW,
++ "NAS100D reset button", NULL) < 0) {
++
++ printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
++ gpio_to_irq(NAS100D_RB_GPIO));
++ }
++
++ /* The power button on the Iomega NAS100d is on GPIO 14, but
++ * it cannot handle interrupts on that GPIO line. So we'll
++ * have to poll it with a kernel timer.
++ */
++
++ /* Make sure that the power button GPIO is set up as an input */
++ gpio_line_config(NAS100D_PB_GPIO, IXP4XX_GPIO_IN);
++
++ /* Set the initial value for the power button IRQ handler */
++ power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
++
++ mod_timer(&nas100d_power_timer, jiffies + msecs_to_jiffies(500));
++
+ /*
+ * Map in a portion of the flash and read the MAC address.
+ * Since it is stored in BE in the flash itself, we need to
+--
+1.5.2.5
+
+From: Rod Whitby <rod@whitby.id.au>
+Subject: ixp4xx: Merge dsmg600-power.c into dsmg600-setup.c (Patch #4809)
+
+There is no reason to have power control in a separate file from the
+board setup code. Merge it back into the board setup file and remove
+superfluous header includes.
+
+Signed-off-by: Rod Whitby <rod@whitby.id.au>
+--
+PATCH FOLLOWS
+KernelVersion: 2.6.24-git9
+
+diff --git a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile
+index a7880ab..c195688 100644
+--- a/arch/arm/mach-ixp4xx/Makefile
++++ b/arch/arm/mach-ixp4xx/Makefile
+@@ -25,7 +25,7 @@ obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o
+ obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
+ obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o
+ obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o
+-obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
++obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o
+ obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
+ obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
+
+diff --git a/arch/arm/mach-ixp4xx/dsmg600-power.c b/arch/arm/mach-ixp4xx/dsmg600-power.c
+deleted file mode 100644
+index db63987..0000000
+--- a/arch/arm/mach-ixp4xx/dsmg600-power.c
++++ /dev/null
+@@ -1,129 +0,0 @@
+-/*
+- * arch/arm/mach-ixp4xx/dsmg600-power.c
+- *
+- * DSM-G600 Power/Reset driver
+- * Author: Michael Westerhof <mwester@dls.net>
+- *
+- * Based on nslu2-power.c
+- * Copyright (C) 2005 Tower Technologies
+- * Author: Alessandro Zummo <a.zummo@towertech.it>
+- *
+- * which was based on nslu2-io.c
+- * Copyright (C) 2004 Karen Spearel
+- *
+- * Maintainers: http://www.nslu2-linux.org/
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- *
+- */
+-
+-#include <linux/module.h>
+-#include <linux/reboot.h>
+-#include <linux/interrupt.h>
+-#include <linux/irq.h>
+-#include <linux/jiffies.h>
+-#include <linux/timer.h>
+-
+-#include <asm/gpio.h>
+-#include <asm/mach-types.h>
+-
+-/* This is used to make sure the power-button pusher is serious. The button
+- * must be held until the value of this counter reaches zero.
+- */
+-static int power_button_countdown;
+-
+-/* Must hold the button down for at least this many counts to be processed */
+-#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
+-
+-static void dsmg600_power_handler(unsigned long data);
+-static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler, 0, 0);
+-
+-static void dsmg600_power_handler(unsigned long data)
+-{
+- /* This routine is called twice per second to check the
+- * state of the power button.
+- */
+-
+- if (gpio_get_value(DSMG600_PB_GPIO)) {
+-
+- /* IO Pin is 1 (button pushed) */
+- if (power_button_countdown > 0)
+- power_button_countdown--;
+-
+- } else {
+-
+- /* Done on button release, to allow for auto-power-on mods. */
+- if (power_button_countdown == 0) {
+- /* Signal init to do the ctrlaltdel action,
+- * this will bypass init if it hasn't started
+- * and do a kernel_restart.
+- */
+- ctrl_alt_del();
+-
+- /* Change the state of the power LED to "blink" */
+- gpio_line_set(DSMG600_LED_PWR_GPIO, IXP4XX_GPIO_LOW);
+- } else {
+- power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
+- }
+- }
+-
+- mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500));
+-}
+-
+-static irqreturn_t dsmg600_reset_handler(int irq, void *dev_id)
+-{
+- /* This is the paper-clip reset, it shuts the machine down directly. */
+- machine_power_off();
+-
+- return IRQ_HANDLED;
+-}
+-
+-static int __init dsmg600_power_init(void)
+-{
+- if (!(machine_is_dsmg600()))
+- return 0;
+-
+- if (request_irq(gpio_to_irq(DSMG600_RB_GPIO), &dsmg600_reset_handler,
+- IRQF_DISABLED | IRQF_TRIGGER_LOW, "DSM-G600 reset button",
+- NULL) < 0) {
+-
+- printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
+- gpio_to_irq(DSMG600_RB_GPIO));
+-
+- return -EIO;
+- }
+-
+- /* The power button on the D-Link DSM-G600 is on GPIO 15, but
+- * it cannot handle interrupts on that GPIO line. So we'll
+- * have to poll it with a kernel timer.
+- */
+-
+- /* Make sure that the power button GPIO is set up as an input */
+- gpio_line_config(DSMG600_PB_GPIO, IXP4XX_GPIO_IN);
+-
+- /* Set the initial value for the power button IRQ handler */
+- power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
+-
+- mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500));
+-
+- return 0;
+-}
+-
+-static void __exit dsmg600_power_exit(void)
+-{
+- if (!(machine_is_dsmg600()))
+- return;
+-
+- del_timer_sync(&dsmg600_power_timer);
+-
+- free_irq(gpio_to_irq(DSMG600_RB_GPIO), NULL);
+-}
+-
+-module_init(dsmg600_power_init);
+-module_exit(dsmg600_power_exit);
+-
+-MODULE_AUTHOR("Michael Westerhof <mwester@dls.net>");
+-MODULE_DESCRIPTION("DSM-G600 Power/Reset driver");
+-MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
+index d0e1295..6886596 100644
+--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
++++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
+@@ -1,20 +1,29 @@
+ /*
+ * DSM-G600 board-setup
+ *
++ * Copyright (C) 2008 Rod Whitby <rod@whitby.id.au>
+ * Copyright (C) 2006 Tower Technologies
+- * Author: Alessandro Zummo <a.zummo@towertech.it>
+ *
+- * based ixdp425-setup.c:
++ * based on ixdp425-setup.c:
+ * Copyright (C) 2003-2004 MontaVista Software, Inc.
++ * based on nslu2-power.c:
++ * Copyright (C) 2005 Tower Technologies
++ * based on nslu2-io.c:
++ * Copyright (C) 2004 Karen Spearel
+ *
+ * Author: Alessandro Zummo <a.zummo@towertech.it>
++ * Author: Michael Westerhof <mwester@dls.net>
++ * Author: Rod Whitby <rod@whitby.id.au>
+ * Maintainers: http://www.nslu2-linux.org/
+ */
+
+-#include <linux/kernel.h>
++#include <linux/irq.h>
++#include <linux/jiffies.h>
++#include <linux/timer.h>
+ #include <linux/serial.h>
+ #include <linux/serial_8250.h>
+ #include <linux/leds.h>
++#include <linux/reboot.h>
+ #include <linux/i2c.h>
+ #include <linux/i2c-gpio.h>
+
+@@ -22,6 +31,7 @@
+ #include <asm/mach/arch.h>
+ #include <asm/mach/flash.h>
+ #include <asm/mach/time.h>
++#include <asm/gpio.h>
+
+ static struct flash_platform_data dsmg600_flash_data = {
+ .map_name = "cfi_probe",
+@@ -140,6 +150,57 @@ static void dsmg600_power_off(void)
+ gpio_line_set(DSMG600_PO_GPIO, IXP4XX_GPIO_HIGH);
+ }
+
++/* This is used to make sure the power-button pusher is serious. The button
++ * must be held until the value of this counter reaches zero.
++ */
++static int power_button_countdown;
++
++/* Must hold the button down for at least this many counts to be processed */
++#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
++
++static void dsmg600_power_handler(unsigned long data);
++static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler, 0, 0);
++
++static void dsmg600_power_handler(unsigned long data)
++{
++ /* This routine is called twice per second to check the
++ * state of the power button.
++ */
++
++ if (gpio_get_value(DSMG600_PB_GPIO)) {
++
++ /* IO Pin is 1 (button pushed) */
++ if (power_button_countdown > 0)
++ power_button_countdown--;
++
++ } else {
++
++ /* Done on button release, to allow for auto-power-on mods. */
++ if (power_button_countdown == 0) {
++ /* Signal init to do the ctrlaltdel action,
++ * this will bypass init if it hasn't started
++ * and do a kernel_restart.
++ */
++ ctrl_alt_del();
++
++ /* Change the state of the power LED to "blink" */
++ gpio_line_set(DSMG600_LED_PWR_GPIO, IXP4XX_GPIO_LOW);
++ } else {
++ power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
++ }
++ }
++
++ mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500));
++}
++
++static irqreturn_t dsmg600_reset_handler(int irq, void *dev_id)
++{
++ /* This is the paper-clip reset, it shuts the machine down directly. */
++ machine_power_off();
++
++ return IRQ_HANDLED;
++}
++
+ static void __init dsmg600_timer_init(void)
+ {
+ /* The xtal on this machine is non-standard. */
+@@ -164,8 +225,6 @@ static void __init dsmg600_init(void)
+ dsmg600_flash_resource.end =
+ IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
+
+- pm_power_off = dsmg600_power_off;
+-
+ i2c_register_board_info(0, dsmg600_i2c_board_info,
+ ARRAY_SIZE(dsmg600_i2c_board_info));
+
+@@ -176,6 +235,29 @@ static void __init dsmg600_init(void)
+ (void)platform_device_register(&dsmg600_uart);
+
+ platform_add_devices(dsmg600_devices, ARRAY_SIZE(dsmg600_devices));
++
++ pm_power_off = dsmg600_power_off;
++
++ if (request_irq(gpio_to_irq(DSMG600_RB_GPIO), &dsmg600_reset_handler,
++ IRQF_DISABLED | IRQF_TRIGGER_LOW,
++ "DSM-G600 reset button", NULL) < 0) {
++
++ printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
++ gpio_to_irq(DSMG600_RB_GPIO));
++ }
++
++ /* The power button on the D-Link DSM-G600 is on GPIO 15, but
++ * it cannot handle interrupts on that GPIO line. So we'll
++ * have to poll it with a kernel timer.
++ */
++
++ /* Make sure that the power button GPIO is set up as an input */
++ gpio_line_config(DSMG600_PB_GPIO, IXP4XX_GPIO_IN);
++
++ /* Set the initial value for the power button IRQ handler */
++ power_button_countdown = PBUTTON_HOLDDOWN_COUNT;
++
++ mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500));
+ }
+
+ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
+--
+1.5.2.5
+
diff --git a/target/linux/ixp4xx/patches-2.6.24/033-velocity_be.patch b/target/linux/ixp4xx/patches-2.6.24/033-velocity_be.patch
new file mode 100644
index 000000000..e1d212d9c
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.24/033-velocity_be.patch
@@ -0,0 +1,897 @@
+diff -Naur linux-2.6.24.orig/drivers/net/via-velocity.c linux-2.6.24/drivers/net/via-velocity.c
+--- linux-2.6.24.orig/drivers/net/via-velocity.c 2008-01-31 23:11:26.000000000 -0600
++++ linux-2.6.24/drivers/net/via-velocity.c 2008-02-01 01:12:15.000000000 -0600
+@@ -254,11 +254,31 @@
+ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("VIA Networking Velocity Family Gigabit Ethernet Adapter Driver");
+
++/* Valid values for vdebug (additive, this is a bitmask):
++ * 0x00 => off
++ * 0x01 => always on
++ * 0x02 => additional detail on tx (rx, too, if anyone implements same)
++ * 0x04 => detail the initialization process
++ * 0x08 => spot debug detail; to be used as developers see fit
++ */
++static int vdebug = 0;
++
++/* HAIL - these macros are for the normal 0x01-type tracing... */
++#define HAIL(S) \
++ if (vdebug&1) printk(KERN_NOTICE "%s\n", (S));
++#define HAILS(S,T) \
++ if (vdebug&1) printk(KERN_NOTICE "%s -> status=0x%x\n", (S), (T));
++
+ #define VELOCITY_PARAM(N,D) \
+ static int N[MAX_UNITS]=OPTION_DEFAULT;\
+ module_param_array(N, int, NULL, 0); \
+ MODULE_PARM_DESC(N, D);
+
++#define VELO_DEBUG_MIN 0
++#define VELO_DEBUG_MAX 255
++#define VELO_DEBUG_DEF 0
++VELOCITY_PARAM(velo_debug, "Debug level");
++
+ #define RX_DESC_MIN 64
+ #define RX_DESC_MAX 255
+ #define RX_DESC_DEF 64
+@@ -557,12 +577,12 @@
+ if (val == -1)
+ *opt |= (def ? flag : 0);
+ else if (val < 0 || val > 1) {
+- printk(KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (0-1)\n",
+- devname, name);
++ printk(KERN_NOTICE "via-velocity: the value of parameter %s is invalid, the valid range is (0-1)\n",
++ name);
+ *opt |= (def ? flag : 0);
+ } else {
+- printk(KERN_INFO "%s: set parameter %s to %s\n",
+- devname, name, val ? "TRUE" : "FALSE");
++ printk(KERN_INFO "via-velocity: set parameter %s to %s\n",
++ name, val ? "TRUE" : "FALSE");
+ *opt |= (val ? flag : 0);
+ }
+ }
+@@ -580,6 +600,7 @@
+ static void __devinit velocity_get_options(struct velocity_opt *opts, int index, char *devname)
+ {
+
++ velocity_set_int_opt(&opts->velo_debug, velo_debug[index], VELO_DEBUG_MIN, VELO_DEBUG_MAX, VELO_DEBUG_DEF, "velo_debug", devname);
+ velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname);
+ velocity_set_int_opt(&opts->DMA_length, DMA_length[index], DMA_LENGTH_MIN, DMA_LENGTH_MAX, DMA_LENGTH_DEF, "DMA_length", devname);
+ velocity_set_int_opt(&opts->numrx, RxDescriptors[index], RX_DESC_MIN, RX_DESC_MAX, RX_DESC_DEF, "RxDescriptors", devname);
+@@ -593,6 +614,7 @@
+ velocity_set_int_opt((int *) &opts->wol_opts, wol_opts[index], WOL_OPT_MIN, WOL_OPT_MAX, WOL_OPT_DEF, "Wake On Lan options", devname);
+ velocity_set_int_opt((int *) &opts->int_works, int_works[index], INT_WORKS_MIN, INT_WORKS_MAX, INT_WORKS_DEF, "Interrupt service works", devname);
+ opts->numrx = (opts->numrx & ~3);
++ vdebug = opts->velo_debug;
+ }
+
+ /**
+@@ -608,6 +630,8 @@
+ struct mac_regs __iomem * regs = vptr->mac_regs;
+ unsigned short vid;
+
++ HAIL("velocity_init_cam_filter");
++
+ /* Turn on MCFG_PQEN, turn off MCFG_RTGOPT */
+ WORD_REG_BITS_SET(MCFG_PQEN, MCFG_RTGOPT, &regs->MCFG);
+ WORD_REG_BITS_ON(MCFG_VIDFR, &regs->MCFG);
+@@ -636,8 +660,10 @@
+ } else {
+ u16 temp = 0;
+ mac_set_vlan_cam(regs, 0, (u8 *) &temp);
+- temp = 1;
+- mac_set_vlan_cam_mask(regs, (u8 *) &temp);
++ /* temp = 1; BE */
++ /* mac_set_vlan_cam_mask(regs, (u8 *) &temp); BE */
++ vptr->vCAMmask[0] |= 1; /* BE */
++ mac_set_vlan_cam_mask(regs, vptr->vCAMmask); /* BE */
+ }
+ }
+
+@@ -675,13 +701,15 @@
+ struct mac_regs __iomem * regs = vptr->mac_regs;
+ int i;
+
++ HAIL("velocity_rx_reset");
+ vptr->rd_dirty = vptr->rd_filled = vptr->rd_curr = 0;
+
+ /*
+ * Init state, all RD entries belong to the NIC
+ */
+ for (i = 0; i < vptr->options.numrx; ++i)
+- vptr->rd_ring[i].rdesc0.owner = OWNED_BY_NIC;
++ /* vptr->rd_ring[i].rdesc0.owner = OWNED_BY_NIC; BE */
++ vptr->rd_ring[i].rdesc0 |= cpu_to_le32(BE_OWNED_BY_NIC); /* BE */
+
+ writew(vptr->options.numrx, &regs->RBRDU);
+ writel(vptr->rd_pool_dma, &regs->RDBaseLo);
+@@ -704,12 +732,15 @@
+ struct mac_regs __iomem * regs = vptr->mac_regs;
+ int i, mii_status;
+
++ if (vdebug&5) printk(KERN_NOTICE "velocity_init_registers: entering\n");
++
+ mac_wol_reset(regs);
+
+ switch (type) {
+ case VELOCITY_INIT_RESET:
+ case VELOCITY_INIT_WOL:
+
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: RESET or WOL\n");
+ netif_stop_queue(vptr->dev);
+
+ /*
+@@ -737,12 +768,13 @@
+
+ case VELOCITY_INIT_COLD:
+ default:
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: COLD or default\n");
+ /*
+ * Do reset
+ */
+ velocity_soft_reset(vptr);
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: soft reset complete.\n");
+ mdelay(5);
+-
+ mac_eeprom_reload(regs);
+ for (i = 0; i < 6; i++) {
+ writeb(vptr->dev->dev_addr[i], &(regs->PAR[i]));
+@@ -760,11 +792,16 @@
+ */
+ BYTE_REG_BITS_SET(CFGB_OFSET, (CFGB_CRANDOM | CFGB_CAP | CFGB_MBA | CFGB_BAKOPT), &regs->CFGB);
+
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: Initializing CAM filter\n");
+ /*
+ * Init CAM filter
+ */
++ if (vdebug&8) printk(KERN_NOTICE "velocity: spot debug: about to init CAM filters\n");
++ mdelay(5); /* MJW - ARM processors, kernel 2.6.19 - this fixes oopses and hangs */
+ velocity_init_cam_filter(vptr);
++ if (vdebug&8) printk(KERN_NOTICE "velocity: spot debug: init CAM filters complete\n");
+
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: Setting packet filter\n");
+ /*
+ * Set packet filter: Receive directed and broadcast address
+ */
+@@ -774,10 +811,12 @@
+ * Enable MII auto-polling
+ */
+ enable_mii_autopoll(regs);
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: enable_mii_autopoll complete.\n");
+
+ vptr->int_mask = INT_MASK_DEF;
+
+- writel(cpu_to_le32(vptr->rd_pool_dma), &regs->RDBaseLo);
++ /* writel(cpu_to_le32(vptr->rd_pool_dma), &regs->RDBaseLo); BE */
++ writel((vptr->rd_pool_dma), &regs->RDBaseLo); /* BE */
+ writew(vptr->options.numrx - 1, &regs->RDCSize);
+ mac_rx_queue_run(regs);
+ mac_rx_queue_wake(regs);
+@@ -785,10 +824,13 @@
+ writew(vptr->options.numtx - 1, &regs->TDCSize);
+
+ for (i = 0; i < vptr->num_txq; i++) {
+- writel(cpu_to_le32(vptr->td_pool_dma[i]), &(regs->TDBaseLo[i]));
++ /* writel(cpu_to_le32(vptr->td_pool_dma[i]), &(regs->TDBaseLo[i])); BE */
++ writel((vptr->td_pool_dma[i]), &(regs->TDBaseLo[i])); /* BE */
+ mac_tx_queue_run(regs, i);
+ }
+
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: DMA settings complete.\n");
++
+ init_flow_control_register(vptr);
+
+ writel(CR0_STOP, &regs->CR0Clr);
+@@ -807,8 +849,10 @@
+
+ enable_flow_control_ability(vptr);
+ mac_hw_mibs_init(regs);
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: Set interrupt mask\n");
+ mac_write_int_mask(vptr->int_mask, regs);
+ mac_clear_isr(regs);
++ if (vdebug&4) printk(KERN_NOTICE "velocity_init_registers: complete.\n");
+
+ }
+ }
+@@ -826,6 +870,7 @@
+ struct mac_regs __iomem * regs = vptr->mac_regs;
+ int i = 0;
+
++ HAIL("velocity_soft_reset");
+ writel(CR0_SFRST, &regs->CR0Set);
+
+ for (i = 0; i < W_MAX_TIMEOUT; i++) {
+@@ -888,6 +933,7 @@
+ VELOCITY_FULL_DRV_NAM, VELOCITY_VERSION);
+ printk(KERN_INFO "Copyright (c) 2002, 2003 VIA Networking Technologies, Inc.\n");
+ printk(KERN_INFO "Copyright (c) 2004 Red Hat Inc.\n");
++ printk(KERN_INFO "BE support, misc. fixes MJW 01Jan2007 - may be unstable\n");
+ first = 0;
+ }
+
+@@ -1104,6 +1150,7 @@
+ dma_addr_t pool_dma;
+ u8 *pool;
+
++ HAIL("velocity_init_rings");
+ /*
+ * Allocate all RD/TD rings a single pool
+ */
+@@ -1166,6 +1213,7 @@
+ static void velocity_free_rings(struct velocity_info *vptr)
+ {
+ int size;
++ HAIL("velocity_free_rings");
+
+ size = vptr->options.numrx * sizeof(struct rx_desc) +
+ vptr->options.numtx * sizeof(struct tx_desc) * vptr->num_txq;
+@@ -1182,6 +1230,7 @@
+ struct mac_regs __iomem *regs = vptr->mac_regs;
+ int avail, dirty, unusable;
+
++ HAIL("velocity_give_many_rx_descs");
+ /*
+ * RD number must be equal to 4X per hardware spec
+ * (programming guide rev 1.20, p.13)
+@@ -1195,7 +1244,8 @@
+ dirty = vptr->rd_dirty - unusable;
+ for (avail = vptr->rd_filled & 0xfffc; avail; avail--) {
+ dirty = (dirty > 0) ? dirty - 1 : vptr->options.numrx - 1;
+- vptr->rd_ring[dirty].rdesc0.owner = OWNED_BY_NIC;
++ /* vptr->rd_ring[dirty].rdesc0.owner = OWNED_BY_NIC; BE */
++ vptr->rd_ring[dirty].rdesc0 |= cpu_to_le32(BE_OWNED_BY_NIC); /* BE */
+ }
+
+ writew(vptr->rd_filled & 0xfffc, &regs->RBRDU);
+@@ -1205,12 +1255,14 @@
+ static int velocity_rx_refill(struct velocity_info *vptr)
+ {
+ int dirty = vptr->rd_dirty, done = 0, ret = 0;
++ HAIL("velocity_rx_refill");
+
+ do {
+ struct rx_desc *rd = vptr->rd_ring + dirty;
+
+ /* Fine for an all zero Rx desc at init time as well */
+- if (rd->rdesc0.owner == OWNED_BY_NIC)
++ /* if (rd->rdesc0.owner == OWNED_BY_NIC) BE */
++ if (rd->rdesc0 & cpu_to_le32(BE_OWNED_BY_NIC)) /* BE */
+ break;
+
+ if (!vptr->rd_info[dirty].skb) {
+@@ -1244,6 +1296,7 @@
+ int ret;
+ int mtu = vptr->dev->mtu;
+
++ HAIL("velocity_init_rd_ring");
+ vptr->rx_buf_sz = (mtu <= ETH_DATA_LEN) ? PKT_BUF_SZ : mtu + 32;
+
+ vptr->rd_info = kcalloc(vptr->options.numrx,
+@@ -1275,6 +1328,7 @@
+ {
+ int i;
+
++ HAIL("velocity_free_rd_ring");
+ if (vptr->rd_info == NULL)
+ return;
+
+@@ -1314,6 +1368,7 @@
+ struct tx_desc *td;
+ struct velocity_td_info *td_info;
+
++ HAIL("velocity_init_td_ring");
+ /* Init the TD ring entries */
+ for (j = 0; j < vptr->num_txq; j++) {
+ curr = vptr->td_pool_dma[j];
+@@ -1350,6 +1405,7 @@
+ struct velocity_td_info * td_info = &(vptr->td_infos[q][n]);
+ int i;
+
++ HAIL("velocity_free_td_ring_entry");
+ if (td_info == NULL)
+ return;
+
+@@ -1379,6 +1435,7 @@
+ {
+ int i, j;
+
++ HAIL("velocity_free_td_ring");
+ for (j = 0; j < vptr->num_txq; j++) {
+ if (vptr->td_infos[j] == NULL)
+ continue;
+@@ -1406,34 +1463,42 @@
+ struct net_device_stats *stats = &vptr->stats;
+ int rd_curr = vptr->rd_curr;
+ int works = 0;
++ u16 wRSR; /* BE */
+
++ HAILS("velocity_rx_srv", status);
+ do {
+ struct rx_desc *rd = vptr->rd_ring + rd_curr;
+
+ if (!vptr->rd_info[rd_curr].skb)
+ break;
+
+- if (rd->rdesc0.owner == OWNED_BY_NIC)
++ /* if (rd->rdesc0.owner == OWNED_BY_NIC) BE */
++ if (rd->rdesc0 & cpu_to_le32(BE_OWNED_BY_NIC)) /* BE */
+ break;
+
+ rmb();
+
++ wRSR = (u16)(cpu_to_le32(rd->rdesc0)); /* BE */
+ /*
+ * Don't drop CE or RL error frame although RXOK is off
+ */
+- if ((rd->rdesc0.RSR & RSR_RXOK) || (!(rd->rdesc0.RSR & RSR_RXOK) && (rd->rdesc0.RSR & (RSR_CE | RSR_RL)))) {
++ /* if ((rd->rdesc0.RSR & RSR_RXOK) || (!(rd->rdesc0.RSR & RSR_RXOK) && (rd->rdesc0.RSR & (RSR_CE | RSR_RL)))) { BE */
++ if ((wRSR & RSR_RXOK) || (!(wRSR & RSR_RXOK) && (wRSR & (RSR_CE | RSR_RL)))) { /* BE */
+ if (velocity_receive_frame(vptr, rd_curr) < 0)
+ stats->rx_dropped++;
+ } else {
+- if (rd->rdesc0.RSR & RSR_CRC)
++ /* if (rd->rdesc0.RSR & RSR_CRC) BE */
++ if (wRSR & RSR_CRC) /* BE */
+ stats->rx_crc_errors++;
+- if (rd->rdesc0.RSR & RSR_FAE)
++ /* if (rd->rdesc0.RSR & RSR_FAE) BE */
++ if (wRSR & RSR_FAE) /* BE */
+ stats->rx_frame_errors++;
+
+ stats->rx_dropped++;
+ }
+
+- rd->inten = 1;
++ /* rd->inten = 1; BE */
++ rd->ltwo |= cpu_to_le32(BE_INT_ENABLE); /* BE */
+
+ vptr->dev->last_rx = jiffies;
+
+@@ -1464,13 +1529,21 @@
+
+ static inline void velocity_rx_csum(struct rx_desc *rd, struct sk_buff *skb)
+ {
++ u8 bCSM;
++ HAIL("velocity_rx_csum");
+ skb->ip_summed = CHECKSUM_NONE;
+
+- if (rd->rdesc1.CSM & CSM_IPKT) {
+- if (rd->rdesc1.CSM & CSM_IPOK) {
+- if ((rd->rdesc1.CSM & CSM_TCPKT) ||
+- (rd->rdesc1.CSM & CSM_UDPKT)) {
+- if (!(rd->rdesc1.CSM & CSM_TUPOK)) {
++// if (rd->rdesc1.CSM & CSM_IPKT) {
++// if (rd->rdesc1.CSM & CSM_IPOK) {
++// if ((rd->rdesc1.CSM & CSM_TCPKT) ||
++// (rd->rdesc1.CSM & CSM_UDPKT)) {
++// if (!(rd->rdesc1.CSM & CSM_TUPOK)) {
++ bCSM = (u8)(cpu_to_le32(rd->rdesc1) >> 16); /* BE */
++ if (bCSM & CSM_IPKT) {
++ if (bCSM & CSM_IPOK) {
++ if ((bCSM & CSM_TCPKT) ||
++ (bCSM & CSM_UDPKT)) {
++ if (!(bCSM & CSM_TUPOK)) { /* BE */
+ return;
+ }
+ }
+@@ -1496,9 +1569,11 @@
+ {
+ int ret = -1;
+
++ HAIL("velocity_rx_copy");
+ if (pkt_size < rx_copybreak) {
+ struct sk_buff *new_skb;
+
++ HAIL("velocity_rx_copy (working...)");
+ new_skb = dev_alloc_skb(pkt_size + 2);
+ if (new_skb) {
+ new_skb->dev = vptr->dev;
+@@ -1529,10 +1604,12 @@
+ static inline void velocity_iph_realign(struct velocity_info *vptr,
+ struct sk_buff *skb, int pkt_size)
+ {
++ HAIL("velocity_iph_realign");
+ /* FIXME - memmove ? */
+ if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) {
+ int i;
+
++ HAIL("velocity_iph_realign (working...)");
+ for (i = pkt_size; i >= 0; i--)
+ *(skb->data + i + 2) = *(skb->data + i);
+ skb_reserve(skb, 2);
+@@ -1551,19 +1628,27 @@
+ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
+ {
+ void (*pci_action)(struct pci_dev *, dma_addr_t, size_t, int);
++ u16 pkt_len; /* BE */
++ u16 wRSR; /* BE */
++ struct sk_buff *skb;
+ struct net_device_stats *stats = &vptr->stats;
+ struct velocity_rd_info *rd_info = &(vptr->rd_info[idx]);
+ struct rx_desc *rd = &(vptr->rd_ring[idx]);
+- int pkt_len = rd->rdesc0.len;
+- struct sk_buff *skb;
++ /* int pkt_len = rd->rdesc0.len BE */;
++
++ pkt_len = ((cpu_to_le32(rd->rdesc0) >> 16) & 0x00003FFFUL); /* BE */
++ wRSR = (u16)(cpu_to_le32(rd->rdesc0)); /* BE */
+
+- if (rd->rdesc0.RSR & (RSR_STP | RSR_EDP)) {
++ HAIL("velocity_receive_frame");
++ /* if (rd->rdesc0.RSR & (RSR_STP | RSR_EDP)) { BE */
++ if (wRSR & (RSR_STP | RSR_EDP)) { /* BE */
+ VELOCITY_PRT(MSG_LEVEL_VERBOSE, KERN_ERR " %s : the received frame span multple RDs.\n", vptr->dev->name);
+ stats->rx_length_errors++;
+ return -EINVAL;
+ }
+
+- if (rd->rdesc0.RSR & RSR_MAR)
++ /* if (rd->rdesc0.RSR & RSR_MAR) BE */
++ if (wRSR & RSR_MAR) /* BE */
+ vptr->stats.multicast++;
+
+ skb = rd_info->skb;
+@@ -1576,7 +1661,8 @@
+ */
+
+ if (vptr->flags & VELOCITY_FLAGS_VAL_PKT_LEN) {
+- if (rd->rdesc0.RSR & RSR_RL) {
++ /* if (rd->rdesc0.RSR & RSR_RL) { BE */
++ if (wRSR & RSR_RL) { /* BE */
+ stats->rx_length_errors++;
+ return -EINVAL;
+ }
+@@ -1620,6 +1706,7 @@
+ struct rx_desc *rd = &(vptr->rd_ring[idx]);
+ struct velocity_rd_info *rd_info = &(vptr->rd_info[idx]);
+
++ HAIL("velocity_alloc_rx_buf");
+ rd_info->skb = dev_alloc_skb(vptr->rx_buf_sz + 64);
+ if (rd_info->skb == NULL)
+ return -ENOMEM;
+@@ -1637,10 +1724,14 @@
+ */
+
+ *((u32 *) & (rd->rdesc0)) = 0;
+- rd->len = cpu_to_le32(vptr->rx_buf_sz);
+- rd->inten = 1;
++ /* rd->len = cpu_to_le32(vptr->rx_buf_sz); BE */
++ /* rd->inten = 1; BE */
+ rd->pa_low = cpu_to_le32(rd_info->skb_dma);
+- rd->pa_high = 0;
++ /* rd->pa_high = 0; BE */
++ rd->ltwo &= cpu_to_le32(0xC000FFFFUL); /* BE */
++ rd->ltwo |= cpu_to_le32((vptr->rx_buf_sz << 16)); /* BE */
++ rd->ltwo |= cpu_to_le32(BE_INT_ENABLE); /* BE */
++ rd->ltwo &= cpu_to_le32(0xFFFF0000UL); /* BE */
+ return 0;
+ }
+
+@@ -1661,9 +1752,11 @@
+ int full = 0;
+ int idx;
+ int works = 0;
++ u16 wTSR; /* BE */
+ struct velocity_td_info *tdinfo;
+ struct net_device_stats *stats = &vptr->stats;
+
++ HAILS("velocity_tx_srv", status);
+ for (qnum = 0; qnum < vptr->num_txq; qnum++) {
+ for (idx = vptr->td_tail[qnum]; vptr->td_used[qnum] > 0;
+ idx = (idx + 1) % vptr->options.numtx) {
+@@ -1674,22 +1767,29 @@
+ td = &(vptr->td_rings[qnum][idx]);
+ tdinfo = &(vptr->td_infos[qnum][idx]);
+
+- if (td->tdesc0.owner == OWNED_BY_NIC)
++ /* if (td->tdesc0.owner == OWNED_BY_NIC) BE */
++ if (td->tdesc0 & cpu_to_le32(BE_OWNED_BY_NIC)) /* BE */
+ break;
+
+ if ((works++ > 15))
+ break;
+
+- if (td->tdesc0.TSR & TSR0_TERR) {
++ wTSR = (u16)cpu_to_le32(td->tdesc0);
++ /* if (td->tdesc0.TSR & TSR0_TERR) { BE */
++ if (wTSR & TSR0_TERR) { /* BE */
+ stats->tx_errors++;
+ stats->tx_dropped++;
+- if (td->tdesc0.TSR & TSR0_CDH)
++ /* if (td->tdesc0.TSR & TSR0_CDH) BE */
++ if (wTSR & TSR0_CDH) /* BE */
+ stats->tx_heartbeat_errors++;
+- if (td->tdesc0.TSR & TSR0_CRS)
++ /* if (td->tdesc0.TSR & TSR0_CRS) BE */
++ if (wTSR & TSR0_CRS) /* BE */
+ stats->tx_carrier_errors++;
+- if (td->tdesc0.TSR & TSR0_ABT)
++ /* if (td->tdesc0.TSR & TSR0_ABT) BE */
++ if (wTSR & TSR0_ABT) /* BE */
+ stats->tx_aborted_errors++;
+- if (td->tdesc0.TSR & TSR0_OWC)
++ /* if (td->tdesc0.TSR & TSR0_OWC) BE */
++ if (wTSR & TSR0_OWC) /* BE */
+ stats->tx_window_errors++;
+ } else {
+ stats->tx_packets++;
+@@ -1778,6 +1878,7 @@
+
+ static void velocity_error(struct velocity_info *vptr, int status)
+ {
++ HAILS("velocity_error", status);
+
+ if (status & ISR_TXSTLI) {
+ struct mac_regs __iomem * regs = vptr->mac_regs;
+@@ -1867,6 +1968,7 @@
+ struct sk_buff *skb = tdinfo->skb;
+ int i;
+
++ HAIL("velocity_free_tx_buf");
+ /*
+ * Don't unmap the pre-allocated tx_bufs
+ */
+@@ -2067,6 +2169,7 @@
+ struct velocity_td_info *tdinfo;
+ unsigned long flags;
+ int index;
++ u32 lbufsz; /* BE */
+
+ int pktlen = skb->len;
+
+@@ -2083,9 +2186,18 @@
+ td_ptr = &(vptr->td_rings[qnum][index]);
+ tdinfo = &(vptr->td_infos[qnum][index]);
+
+- td_ptr->tdesc1.TCPLS = TCPLS_NORMAL;
+- td_ptr->tdesc1.TCR = TCR0_TIC;
+- td_ptr->td_buf[0].queue = 0;
++ td_ptr->tdesc0 = 0x00000000UL; /* BE */
++ td_ptr->tdesc1 = 0x00000000UL; /* BE */
++
++ /* td_ptr->tdesc1.TCPLS = TCPLS_NORMAL; BE */
++ td_ptr->tdesc1 &= cpu_to_le32(0xfcffffffUL); /* BE */
++ td_ptr->tdesc1 |= cpu_to_le32(((u32)TCPLS_NORMAL) << 24); /* BE */
++
++ /* td_ptr->tdesc1.TCR = TCR0_TIC; BE */
++ td_ptr->tdesc1 |= cpu_to_le32(BE_TCR_TIC); /* BE */
++
++ /* td_ptr->td_buf[0].queue = 0; BE */
++ td_ptr->td_buf[0].ltwo &= cpu_to_le32(~BE_QUEUE_ENABLE); /* BE */
+
+ /*
+ * Pad short frames.
+@@ -2097,20 +2209,36 @@
+ memset(tdinfo->buf + skb->len, 0, ETH_ZLEN - skb->len);
+ tdinfo->skb = skb;
+ tdinfo->skb_dma[0] = tdinfo->buf_dma;
+- td_ptr->tdesc0.pktsize = pktlen;
++ /* td_ptr->tdesc0.pktsize = pktlen; */
++ td_ptr->tdesc0 &= cpu_to_le32(0xc000ffffUL); /* BE */
++ lbufsz = pktlen; /* Assign, and make sure it's unsigned 32 bits - BE */
++ lbufsz = lbufsz << 16; /* BE - shift over */
++ td_ptr->tdesc0 |= cpu_to_le32(lbufsz); /* BE */
++
+ td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]);
+- td_ptr->td_buf[0].pa_high = 0;
+- td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize;
++ /* td_ptr->td_buf[0].pa_high = 0; */
++ /* td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize; */
++ td_ptr->td_buf[0].ltwo = cpu_to_le32(lbufsz); /* BE */
+ tdinfo->nskb_dma = 1;
+- td_ptr->tdesc1.CMDZ = 2;
++ /* td_ptr->tdesc1.CMDZ = 2; */
++ td_ptr->tdesc1 &= cpu_to_le32(0x0fffffffUL); /* BE */
++ td_ptr->tdesc1 |= cpu_to_le32(((u32)0x2) << 28); /* BE */
+ } else
+ #ifdef VELOCITY_ZERO_COPY_SUPPORT
++ /*
++ * BE - NOTE on the VELOCITY_ZERO_COPY_SUPPORT:
++ * This block of code has NOT been patched up for BE support, as
++ * it is certainly broken -- if it compiles at all. Since the BE
++ * fixes depend on the broken code, attempts to convert to BE support
++ * would almost certainly confuse more than help.
++ */
+ if (skb_shinfo(skb)->nr_frags > 0) {
+ int nfrags = skb_shinfo(skb)->nr_frags;
+ tdinfo->skb = skb;
+ if (nfrags > 6) {
+ skb_copy_from_linear_data(skb, tdinfo->buf, skb->len);
+ tdinfo->skb_dma[0] = tdinfo->buf_dma;
++ /* BE: Er, exactly what value are we assigning in this next line? */
+ td_ptr->tdesc0.pktsize =
+ td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]);
+ td_ptr->td_buf[0].pa_high = 0;
+@@ -2127,6 +2255,7 @@
+ /* FIXME: support 48bit DMA later */
+ td_ptr->td_buf[i].pa_low = cpu_to_le32(tdinfo->skb_dma);
+ td_ptr->td_buf[i].pa_high = 0;
++ /* BE: This next line can't be right: */
+ td_ptr->td_buf[i].bufsize = skb->len->skb->data_len;
+
+ for (i = 0; i < nfrags; i++) {
+@@ -2144,7 +2273,7 @@
+ }
+
+ } else
+-#endif
++#endif /* (broken) VELOCITY_ZERO_COPY_SUPPORT */
+ {
+ /*
+ * Map the linear network buffer into PCI space and
+@@ -2152,19 +2281,29 @@
+ */
+ tdinfo->skb = skb;
+ tdinfo->skb_dma[0] = pci_map_single(vptr->pdev, skb->data, pktlen, PCI_DMA_TODEVICE);
+- td_ptr->tdesc0.pktsize = pktlen;
++ /* td_ptr->tdesc0.pktsize = pktlen; BE */
++ td_ptr->tdesc0 &= cpu_to_le32(0xc000ffffUL); /* BE */
++ lbufsz = pktlen; /* Assign, and make sure it's unsigned 32 bits - BE */
++ lbufsz = lbufsz << 16; /* BE */
++ td_ptr->tdesc0 |= cpu_to_le32(lbufsz); /* BE */
+ td_ptr->td_buf[0].pa_low = cpu_to_le32(tdinfo->skb_dma[0]);
+- td_ptr->td_buf[0].pa_high = 0;
+- td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize;
++ /* td_ptr->td_buf[0].pa_high = 0; BE */
++ /* td_ptr->td_buf[0].bufsize = td_ptr->tdesc0.pktsize; BE */
++ td_ptr->td_buf[0].ltwo = cpu_to_le32(lbufsz); /* BE */
+ tdinfo->nskb_dma = 1;
+- td_ptr->tdesc1.CMDZ = 2;
++ /* td_ptr->tdesc1.CMDZ = 2; BE */
++ td_ptr->tdesc1 &= cpu_to_le32(0x0fffffffUL); /* BE */
++ td_ptr->tdesc1 |= cpu_to_le32(((u32)0x2) << 28); /* BE */
+ }
+
+ if (vptr->vlgrp && vlan_tx_tag_present(skb)) {
+- td_ptr->tdesc1.pqinf.VID = vlan_tx_tag_get(skb);
+- td_ptr->tdesc1.pqinf.priority = 0;
+- td_ptr->tdesc1.pqinf.CFI = 0;
+- td_ptr->tdesc1.TCR |= TCR0_VETAG;
++ /* td_ptr->tdesc1.pqinf.VID = vlan_tx_tag_get(skb); BE */
++ /* td_ptr->tdesc1.pqinf.priority = 0; BE */
++ /* td_ptr->tdesc1.pqinf.CFI = 0; BE */
++ /* td_ptr->tdesc1.TCR |= TCR0_VETAG; BE */
++ td_ptr->tdesc1 &= cpu_to_le32(0xFFFF0000UL); /* BE */
++ td_ptr->tdesc1 |= cpu_to_le32(vlan_tx_tag_get(skb)); /* BE */
++ td_ptr->tdesc1 |= cpu_to_le32(BE_TCR_VETAG); /* BE */
+ }
+
+ /*
+@@ -2174,26 +2313,34 @@
+ && (skb->ip_summed == CHECKSUM_PARTIAL)) {
+ const struct iphdr *ip = ip_hdr(skb);
+ if (ip->protocol == IPPROTO_TCP)
+- td_ptr->tdesc1.TCR |= TCR0_TCPCK;
++ /* td_ptr->tdesc1.TCR |= TCR0_TCPCK; BE */
++ td_ptr->tdesc1 |= cpu_to_le32(BE_TCR_TCPCK); /* BE */
+ else if (ip->protocol == IPPROTO_UDP)
+- td_ptr->tdesc1.TCR |= (TCR0_UDPCK);
+- td_ptr->tdesc1.TCR |= TCR0_IPCK;
+- }
++ /* td_ptr->tdesc1.TCR |= (TCR0_UDPCK); BE */
++ td_ptr->tdesc1 |= cpu_to_le32(BE_TCR_UDPCK); /* BE */
++ /* td_ptr->tdesc1.TCR |= TCR0_IPCK; BE */
++ td_ptr->tdesc1 |= cpu_to_le32(BE_TCR_IPCK); /* BE */
++ }
+ {
+
+ int prev = index - 1;
+
+ if (prev < 0)
+ prev = vptr->options.numtx - 1;
+- td_ptr->tdesc0.owner = OWNED_BY_NIC;
++ /* td_ptr->tdesc0.owner = OWNED_BY_NIC; BE */
++ td_ptr->tdesc0 |= cpu_to_le32(BE_OWNED_BY_NIC); /* BE */
+ vptr->td_used[qnum]++;
+ vptr->td_curr[qnum] = (index + 1) % vptr->options.numtx;
+
+ if (AVAIL_TD(vptr, qnum) < 1)
+ netif_stop_queue(dev);
+
+- td_ptr = &(vptr->td_rings[qnum][prev]);
+- td_ptr->td_buf[0].queue = 1;
++ td_ptr = &(vptr->td_rings[qnum][prev]);
++ /* td_ptr->td_buf[0].queue = 1; BE */
++ td_ptr->td_buf[0].ltwo |= cpu_to_le32(BE_QUEUE_ENABLE); /* BE */
++ if (vdebug&2) printk(KERN_NOTICE "velocity_xmit: (%s) len=%d idx=%d tdesc0=0x%x tdesc1=0x%x ltwo=0x%x\n",
++ (pktlen<ETH_ZLEN) ? "short" : "normal", pktlen, index,
++ td_ptr->tdesc0, td_ptr->tdesc1, td_ptr->td_buf[0].ltwo);
+ mac_tx_queue_wake(vptr->mac_regs, qnum);
+ }
+ dev->trans_start = jiffies;
+@@ -2219,7 +2366,7 @@
+ u32 isr_status;
+ int max_count = 0;
+
+-
++ HAIL("velocity_intr");
+ spin_lock(&vptr->lock);
+ isr_status = mac_read_isr(vptr->mac_regs);
+
+@@ -2238,7 +2385,10 @@
+
+ while (isr_status != 0) {
+ mac_write_isr(vptr->mac_regs, isr_status);
+- if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
++ HAILS("velocity_intr",isr_status);
++ /* MJW - velocity_error is ALWAYS called; need to mask off some other flags */
++ /* if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) */
++ if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI | ISR_PTX0I | ISR_ISR0)))
+ velocity_error(vptr, isr_status);
+ if (isr_status & (ISR_PRXI | ISR_PPRXI))
+ max_count += velocity_rx_srv(vptr, isr_status);
+@@ -2276,6 +2426,7 @@
+ int i;
+ struct dev_mc_list *mclist;
+
++ HAIL("velocity_set_multi");
+ if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
+ writel(0xffffffff, &regs->MARCAM[0]);
+ writel(0xffffffff, &regs->MARCAM[4]);
+@@ -2319,6 +2470,7 @@
+ {
+ struct velocity_info *vptr = netdev_priv(dev);
+
++ HAIL("net_device_stats");
+ /* If the hardware is down, don't touch MII */
+ if(!netif_running(dev))
+ return &vptr->stats;
+@@ -2363,6 +2515,7 @@
+ struct velocity_info *vptr = netdev_priv(dev);
+ int ret;
+
++ HAIL("velocity_ioctl");
+ /* If we are asked for information and the device is power
+ saving then we need to bring the device back up to talk to it */
+
+@@ -2581,6 +2734,8 @@
+ {
+ u16 ww;
+
++ HAIL("velocity_mii_read");
++ HAIL("velocity_mii_write");
+ /*
+ * Disable MIICR_MAUTO, so that mii addr can be set normally
+ */
+diff -Naur linux-2.6.24.orig/drivers/net/via-velocity.h linux-2.6.24/drivers/net/via-velocity.h
+--- linux-2.6.24.orig/drivers/net/via-velocity.h 2008-01-31 23:11:26.000000000 -0600
++++ linux-2.6.24/drivers/net/via-velocity.h 2008-02-01 01:12:15.000000000 -0600
+@@ -196,64 +196,70 @@
+ * Receive descriptor
+ */
+
+-struct rdesc0 {
+- u16 RSR; /* Receive status */
+- u16 len:14; /* Received packet length */
+- u16 reserved:1;
+- u16 owner:1; /* Who owns this buffer ? */
+-};
+-
+-struct rdesc1 {
+- u16 PQTAG;
+- u8 CSM;
+- u8 IPKT;
+-};
++//struct rdesc0 {
++// u16 RSR; /* Receive status */
++// u16 len:14; /* Received packet length */
++// u16 reserved:1;
++// u16 owner:1; /* Who owns this buffer ? */
++//};
++
++//struct rdesc1 {
++// u16 PQTAG;
++// u8 CSM;
++// u8 IPKT;
++//};
+
+ struct rx_desc {
+- struct rdesc0 rdesc0;
+- struct rdesc1 rdesc1;
++// struct rdesc0 rdesc0;
++// struct rdesc1 rdesc1;
++ u32 rdesc0;
++ u32 rdesc1;
+ u32 pa_low; /* Low 32 bit PCI address */
+- u16 pa_high; /* Next 16 bit PCI address (48 total) */
+- u16 len:15; /* Frame size */
+- u16 inten:1; /* Enable interrupt */
++// u16 pa_high; /* Next 16 bit PCI address (48 total) */
++// u16 len:15; /* Frame size */
++// u16 inten:1; /* Enable interrupt */
++ u32 ltwo;
+ } __attribute__ ((__packed__));
+
+ /*
+ * Transmit descriptor
+ */
+
+-struct tdesc0 {
+- u16 TSR; /* Transmit status register */
+- u16 pktsize:14; /* Size of frame */
+- u16 reserved:1;
+- u16 owner:1; /* Who owns the buffer */
+-};
+-
+-struct pqinf { /* Priority queue info */
+- u16 VID:12;
+- u16 CFI:1;
+- u16 priority:3;
+-} __attribute__ ((__packed__));
+-
+-struct tdesc1 {
+- struct pqinf pqinf;
+- u8 TCR;
+- u8 TCPLS:2;
+- u8 reserved:2;
+- u8 CMDZ:4;
+-} __attribute__ ((__packed__));
++//struct tdesc0 {
++// u16 TSR; /* Transmit status register */
++// u16 pktsize:14; /* Size of frame */
++// u16 reserved:1;
++// u16 owner:1; /* Who owns the buffer */
++//};
++
++//struct pqinf { /* Priority queue info */
++// u16 VID:12;
++// u16 CFI:1;
++// u16 priority:3;
++//} __attribute__ ((__packed__));
++
++//struct tdesc1 {
++// struct pqinf pqinf;
++// u8 TCR;
++// u8 TCPLS:2;
++// u8 reserved:2;
++// u8 CMDZ:4;
++//} __attribute__ ((__packed__));
+
+ struct td_buf {
+ u32 pa_low;
+- u16 pa_high;
+- u16 bufsize:14;
+- u16 reserved:1;
+- u16 queue:1;
++// u16 pa_high;
++// u16 bufsize:14;
++// u16 reserved:1;
++// u16 queue:1;
++ u32 ltwo;
+ } __attribute__ ((__packed__));
+
+ struct tx_desc {
+- struct tdesc0 tdesc0;
+- struct tdesc1 tdesc1;
++// struct tdesc0 tdesc0;
++// struct tdesc1 tdesc1;
++ u32 tdesc0;
++ u32 tdesc1;
+ struct td_buf td_buf[7];
+ };
+
+@@ -279,6 +285,16 @@
+ OWNED_BY_NIC = 1
+ };
+
++/* Constants added for the BE fixes */
++#define BE_OWNED_BY_NIC 0x80000000UL
++#define BE_INT_ENABLE 0x80000000UL
++#define BE_QUEUE_ENABLE 0x80000000UL
++#define BE_TCR_TIC 0x00800000UL
++#define BE_TCR_VETAG 0x00200000UL
++#define BE_TCR_TCPCK 0x00040000UL
++#define BE_TCR_UDPCK 0x00080000UL
++#define BE_TCR_IPCK 0x00100000UL
++
+
+ /*
+ * MAC registers and macros.
+@@ -1512,6 +1528,7 @@
+ };
+
+ struct velocity_opt {
++ int velo_debug; /* debug flag */
+ int numrx; /* Number of RX descriptors */
+ int numtx; /* Number of TX descriptors */
+ enum speed_opt spd_dpx; /* Media link mode */
diff --git a/target/linux/ixp4xx/patches-2.6.24/091-nslu2_rtc_fixup.patch b/target/linux/ixp4xx/patches-2.6.24/091-nslu2_rtc_fixup.patch
deleted file mode 100644
index 49ca1e2dc..000000000
--- a/target/linux/ixp4xx/patches-2.6.24/091-nslu2_rtc_fixup.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -uprN linux-2.6.23.orig/arch/arm/mach-ixp4xx/nslu2-setup.c linux-2.6.23/arch/arm/mach-ixp4xx/nslu2-setup.c
---- linux-2.6.23.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-10-09 15:31:38.000000000 -0500
-+++ linux-2.6.23/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-10-11 01:04:46.000000000 -0500
-@@ -19,6 +19,7 @@
- #include <linux/serial_8250.h>
- #include <linux/leds.h>
-
-+#include <asm/setup.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/flash.h>
-@@ -171,6 +172,35 @@ static struct sys_timer nslu2_timer = {
- .init = nslu2_timer_init,
- };
-
-+static char nslu2_rtc_probe[] __initdata = "rtc-isl1208.ignore=0,0x6f rtc-x1205.probe=0,0x6f ";
-+
-+static void __init nslu2_fixup(struct machine_desc *desc,
-+ struct tag *tags, char **cmdline, struct meminfo *mi)
-+{
-+ struct tag *t = tags;
-+ char *p = *cmdline;
-+
-+ /* Find the end of the tags table, taking note of any cmdline tag. */
-+ for (; t->hdr.size; t = tag_next(t)) {
-+ if (t->hdr.tag == ATAG_CMDLINE) {
-+ p = t->u.cmdline.cmdline;
-+ }
-+ }
-+
-+ /* Overwrite the end of the table with a new cmdline tag. */
-+ t->hdr.tag = ATAG_CMDLINE;
-+ t->hdr.size = (sizeof (struct tag_header) +
-+ strlen(nslu2_rtc_probe) + strlen(p) + 1 + 4) >> 2;
-+ strlcpy(t->u.cmdline.cmdline, nslu2_rtc_probe, COMMAND_LINE_SIZE);
-+ strlcpy(t->u.cmdline.cmdline + strlen(nslu2_rtc_probe), p,
-+ COMMAND_LINE_SIZE - strlen(nslu2_rtc_probe));
-+
-+ /* Terminate the table. */
-+ t = tag_next(t);
-+ t->hdr.tag = ATAG_NONE;
-+ t->hdr.size = 0;
-+}
-+
- static void __init nslu2_init(void)
- {
- ixp4xx_sys_init();
-@@ -196,6 +226,7 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
- .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
- .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
- .boot_params = 0x00000100,
-+ .fixup = nslu2_fixup,
- .map_io = ixp4xx_map_io,
- .init_irq = ixp4xx_init_irq,
- .timer = &nslu2_timer,
diff --git a/target/linux/ixp4xx/patches-2.6.24/092-nas100d_rtc_fixup.patch b/target/linux/ixp4xx/patches-2.6.24/092-nas100d_rtc_fixup.patch
deleted file mode 100644
index a6fda8627..000000000
--- a/target/linux/ixp4xx/patches-2.6.24/092-nas100d_rtc_fixup.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -uprN linux-2.6.23.orig/arch/arm/mach-ixp4xx/nas100d-setup.c linux-2.6.23/arch/arm/mach-ixp4xx/nas100d-setup.c
---- linux-2.6.23.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-10-09 15:31:38.000000000 -0500
-+++ linux-2.6.23/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-10-11 01:06:33.000000000 -0500
-@@ -17,6 +17,7 @@
- #include <linux/serial_8250.h>
- #include <linux/leds.h>
-
-+#include <asm/setup.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/flash.h>
-@@ -142,6 +143,35 @@ static void nas100d_power_off(void)
- gpio_line_set(NAS100D_PO_GPIO, IXP4XX_GPIO_HIGH);
- }
-
-+static char nas100d_rtc_probe[] __initdata = "rtc-pcf8563.probe=0,0x51 ";
-+
-+static void __init nas100d_fixup(struct machine_desc *desc,
-+ struct tag *tags, char **cmdline, struct meminfo *mi)
-+{
-+ struct tag *t = tags;
-+ char *p = *cmdline;
-+
-+ /* Find the end of the tags table, taking note of any cmdline tag. */
-+ for (; t->hdr.size; t = tag_next(t)) {
-+ if (t->hdr.tag == ATAG_CMDLINE) {
-+ p = t->u.cmdline.cmdline;
-+ }
-+ }
-+
-+ /* Overwrite the end of the table with a new cmdline tag. */
-+ t->hdr.tag = ATAG_CMDLINE;
-+ t->hdr.size = (sizeof (struct tag_header) +
-+ strlen(nas100d_rtc_probe) + strlen(p) + 1 + 4) >> 2;
-+ strlcpy(t->u.cmdline.cmdline, nas100d_rtc_probe, COMMAND_LINE_SIZE);
-+ strlcpy(t->u.cmdline.cmdline + strlen(nas100d_rtc_probe), p,
-+ COMMAND_LINE_SIZE - strlen(nas100d_rtc_probe));
-+
-+ /* Terminate the table. */
-+ t = tag_next(t);
-+ t->hdr.tag = ATAG_NONE;
-+ t->hdr.size = 0;
-+}
-+
- static void __init nas100d_init(void)
- {
- ixp4xx_sys_init();
-@@ -170,6 +200,7 @@ MACHINE_START(NAS100D, "Iomega NAS 100d"
- .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
- .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
- .boot_params = 0x00000100,
-+ .fixup = nas100d_fixup,
- .map_io = ixp4xx_map_io,
- .init_irq = ixp4xx_init_irq,
- .timer = &ixp4xx_timer,
diff --git a/target/linux/ixp4xx/patches-2.6.24/095-dsmg600_rtc_fixup.patch b/target/linux/ixp4xx/patches-2.6.24/095-dsmg600_rtc_fixup.patch
deleted file mode 100644
index 3d1350115..000000000
--- a/target/linux/ixp4xx/patches-2.6.24/095-dsmg600_rtc_fixup.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Index: linux-2.6.22-rc4-armeb/arch/arm/mach-ixp4xx/dsmg600-setup.c
-===================================================================
---- linux-2.6.22-rc4-armeb.orig/arch/arm/mach-ixp4xx/dsmg600-setup.c
-+++ linux-2.6.22-rc4-armeb/arch/arm/mach-ixp4xx/dsmg600-setup.c
-@@ -16,6 +16,7 @@
- #include <linux/serial_8250.h>
- #include <linux/i2c-gpio.h>
-
-+#include <asm/setup.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/flash.h>
-@@ -145,6 +146,35 @@ static struct sys_timer dsmg600_timer =
- .init = dsmg600_timer_init,
- };
-
-+static char dsmg600_rtc_probe[] __initdata = "rtc-pcf8563.probe=0,0x51 ";
-+
-+static void __init dsmg600_fixup(struct machine_desc *desc,
-+ struct tag *tags, char **cmdline, struct meminfo *mi)
-+{
-+ struct tag *t = tags;
-+ char *p = *cmdline;
-+
-+ /* Find the end of the tags table, taking note of any cmdline tag. */
-+ for (; t->hdr.size; t = tag_next(t)) {
-+ if (t->hdr.tag == ATAG_CMDLINE) {
-+ p = t->u.cmdline.cmdline;
-+ }
-+ }
-+
-+ /* Overwrite the end of the table with a new cmdline tag. */
-+ t->hdr.tag = ATAG_CMDLINE;
-+ t->hdr.size = (sizeof (struct tag_header) +
-+ strlen(dsmg600_rtc_probe) + strlen(p) + 1 + 4) >> 2;
-+ strlcpy(t->u.cmdline.cmdline, dsmg600_rtc_probe, COMMAND_LINE_SIZE);
-+ strlcpy(t->u.cmdline.cmdline + strlen(dsmg600_rtc_probe), p,
-+ COMMAND_LINE_SIZE - strlen(dsmg600_rtc_probe));
-+
-+ /* Terminate the table. */
-+ t = tag_next(t);
-+ t->hdr.tag = ATAG_NONE;
-+ t->hdr.size = 0;
-+}
-+
- static void __init dsmg600_init(void)
- {
- ixp4xx_sys_init();
-@@ -177,6 +207,7 @@ MACHINE_START(DSMG600, "D-Link DSM-G600
- .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
- .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
- .boot_params = 0x00000100,
-+ .fixup = dsmg600_fixup,
- .map_io = ixp4xx_map_io,
- .init_irq = ixp4xx_init_irq,
- .timer = &dsmg600_timer,