From 082ad237ce4418d321ebd2791cf78996167b0529 Mon Sep 17 00:00:00 2001 From: rwhitby Date: Fri, 11 Jan 2008 07:22:29 +0000 Subject: Renumbered the avila-related patches, since nslu2-linux no longer carries them. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10164 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.23/014-eeprom_new_notifier.patch | 187 --------------------- .../patches-2.6.23/053-avila_mac_plat_info.patch | 43 ----- .../patches-2.6.23/093-avila_rtc_fixup.patch | 55 ------ .../patches-2.6.23/294-eeprom_new_notifier.patch | 187 +++++++++++++++++++++ .../patches-2.6.23/296-avila_mac_plat_info.patch | 43 +++++ .../patches-2.6.23/298-avila_rtc_fixup.patch | 55 ++++++ 6 files changed, 285 insertions(+), 285 deletions(-) delete mode 100644 target/linux/ixp4xx/patches-2.6.23/014-eeprom_new_notifier.patch delete mode 100644 target/linux/ixp4xx/patches-2.6.23/053-avila_mac_plat_info.patch delete mode 100644 target/linux/ixp4xx/patches-2.6.23/093-avila_rtc_fixup.patch create mode 100644 target/linux/ixp4xx/patches-2.6.23/294-eeprom_new_notifier.patch create mode 100644 target/linux/ixp4xx/patches-2.6.23/296-avila_mac_plat_info.patch create mode 100644 target/linux/ixp4xx/patches-2.6.23/298-avila_rtc_fixup.patch (limited to 'target/linux') diff --git a/target/linux/ixp4xx/patches-2.6.23/014-eeprom_new_notifier.patch b/target/linux/ixp4xx/patches-2.6.23/014-eeprom_new_notifier.patch deleted file mode 100644 index 4aa7a988b..000000000 --- a/target/linux/ixp4xx/patches-2.6.23/014-eeprom_new_notifier.patch +++ /dev/null @@ -1,187 +0,0 @@ -diff -uprN linux-2.6.23.orig/drivers/i2c/chips/eeprom.c linux-2.6.23/drivers/i2c/chips/eeprom.c ---- linux-2.6.23.orig/drivers/i2c/chips/eeprom.c 2007-10-09 15:31:38.000000000 -0500 -+++ linux-2.6.23/drivers/i2c/chips/eeprom.c 2007-10-11 00:57:25.000000000 -0500 -@@ -33,6 +33,8 @@ - #include - #include - #include -+#include -+#include - - /* Addresses to scan */ - static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, -@@ -41,26 +43,7 @@ static unsigned short normal_i2c[] = { 0 - /* Insmod parameters */ - I2C_CLIENT_INSMOD_1(eeprom); - -- --/* Size of EEPROM in bytes */ --#define EEPROM_SIZE 256 -- --/* possible types of eeprom devices */ --enum eeprom_nature { -- UNKNOWN, -- VAIO, --}; -- --/* Each client has this additional data */ --struct eeprom_data { -- struct i2c_client client; -- struct mutex update_lock; -- u8 valid; /* bitfield, bit!=0 if slice is valid */ -- unsigned long last_updated[8]; /* In jiffies, 8 slices */ -- u8 data[EEPROM_SIZE]; /* Register values */ -- enum eeprom_nature nature; --}; -- -+ATOMIC_NOTIFIER_HEAD(eeprom_chain); - - static int eeprom_attach_adapter(struct i2c_adapter *adapter); - static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind); -@@ -191,6 +174,7 @@ static int eeprom_detect(struct i2c_adap - data->valid = 0; - mutex_init(&data->update_lock); - data->nature = UNKNOWN; -+ data->attr = &eeprom_attr; - - /* Tell the I2C layer a new client has arrived */ - if ((err = i2c_attach_client(new_client))) -@@ -214,6 +198,9 @@ static int eeprom_detect(struct i2c_adap - if (err) - goto exit_detach; - -+ /* call the notifier chain */ -+ atomic_notifier_call_chain(&eeprom_chain, EEPROM_REGISTER, data); -+ - return 0; - - exit_detach: -@@ -239,6 +226,41 @@ static int eeprom_detach_client(struct i - return 0; - } - -+/** -+ * register_eeprom_notifier - register a 'user' of EEPROM devices. -+ * @nb: pointer to notifier info structure -+ * -+ * Registers a callback function to be called upon detection -+ * of an EEPROM device. Detection invokes the 'add' callback -+ * with the kobj of the mutex and a bin_attribute which allows -+ * read from the EEPROM. The intention is that the notifier -+ * will be able to read system configuration from the notifier. -+ * -+ * Only EEPROMs detected *after* the addition of the notifier -+ * are notified. I.e. EEPROMs already known to the system -+ * will not be notified - add the notifier from board level -+ * code! -+ */ -+int register_eeprom_notifier(struct notifier_block *nb) -+{ -+ return atomic_notifier_chain_register(&eeprom_chain, nb); -+} -+ -+/** -+ * unregister_eeprom_notifier - unregister a 'user' of EEPROM devices. -+ * @old: pointer to notifier info structure -+ * -+ * Removes a callback function from the list of 'users' to be -+ * notified upon detection of EEPROM devices. -+ */ -+int unregister_eeprom_notifier(struct notifier_block *nb) -+{ -+ return atomic_notifier_chain_unregister(&eeprom_chain, nb); -+} -+ -+EXPORT_SYMBOL_GPL(register_eeprom_notifier); -+EXPORT_SYMBOL_GPL(unregister_eeprom_notifier); -+ - static int __init eeprom_init(void) - { - return i2c_add_driver(&eeprom_driver); -diff -uprN linux-2.6.23.orig/include/linux/eeprom.h linux-2.6.23/include/linux/eeprom.h ---- linux-2.6.23.orig/include/linux/eeprom.h 1969-12-31 18:00:00.000000000 -0600 -+++ linux-2.6.23/include/linux/eeprom.h 2007-10-11 00:57:25.000000000 -0500 -@@ -0,0 +1,71 @@ -+#ifndef _LINUX_EEPROM_H -+#define _LINUX_EEPROM_H -+/* -+ * EEPROM notifier header -+ * -+ * Copyright (C) 2006 John Bowler -+ */ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#ifndef __KERNEL__ -+#error This is a kernel header -+#endif -+ -+#include -+#include -+#include -+ -+/* Size of EEPROM in bytes */ -+#define EEPROM_SIZE 256 -+ -+/* possible types of eeprom devices */ -+enum eeprom_nature { -+ UNKNOWN, -+ VAIO, -+}; -+ -+/* Each client has this additional data */ -+struct eeprom_data { -+ struct i2c_client client; -+ struct mutex update_lock; -+ u8 valid; /* bitfield, bit!=0 if slice is valid */ -+ unsigned long last_updated[8]; /* In jiffies, 8 slices */ -+ u8 data[EEPROM_SIZE]; /* Register values */ -+ enum eeprom_nature nature; -+ struct bin_attribute *attr; -+}; -+ -+/* -+ * This is very basic. -+ * -+ * If an EEPROM is detected on the I2C bus (this only works for -+ * I2C EEPROMs) the notifier chain is called with -+ * both the I2C information and the kobject for the sysfs -+ * device which has been registers. It is then possible to -+ * read from the device via the bin_attribute::read method -+ * to extract configuration information. -+ * -+ * Register the notifier in the board level code, there is no -+ * need to unregister it but you can if you want (it will save -+ * a little bit or kernel memory to do so). -+ */ -+ -+extern int register_eeprom_notifier(struct notifier_block *nb); -+extern int unregister_eeprom_notifier(struct notifier_block *nb); -+ -+#endif /* _LINUX_EEPROM_H */ -diff -uprN linux-2.6.23.orig/include/linux/notifier.h linux-2.6.23/include/linux/notifier.h ---- linux-2.6.23.orig/include/linux/notifier.h 2007-10-09 15:31:38.000000000 -0500 -+++ linux-2.6.23/include/linux/notifier.h 2007-10-11 00:57:25.000000000 -0500 -@@ -231,5 +231,8 @@ static inline int notifier_to_errno(int - #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ - #define PM_POST_SUSPEND 0x0004 /* Suspend finished */ - -+/* eeprom notifier chain */ -+#define EEPROM_REGISTER 0x0001 -+ - #endif /* __KERNEL__ */ - #endif /* _LINUX_NOTIFIER_H */ diff --git a/target/linux/ixp4xx/patches-2.6.23/053-avila_mac_plat_info.patch b/target/linux/ixp4xx/patches-2.6.23/053-avila_mac_plat_info.patch deleted file mode 100644 index e4813fe2c..000000000 --- a/target/linux/ixp4xx/patches-2.6.23/053-avila_mac_plat_info.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c -index e38f45f..10ed5d6 100644 ---- a/arch/arm/mach-ixp4xx/avila-setup.c -+++ b/arch/arm/mach-ixp4xx/avila-setup.c -@@ -132,10 +132,37 @@ static struct platform_device avila_pata = { - .resource = avila_pata_resources, - }; - -+/* Built-in 10/100 Ethernet MAC interfaces */ -+static struct eth_plat_info avila_plat_eth[] = { -+ { -+ .phy = 0, -+ .rxq = 3, -+ .txreadyq = 20, -+ }, { -+ .phy = 1, -+ .rxq = 4, -+ .txreadyq = 21, -+ } -+}; -+ -+static struct platform_device avila_eth[] = { -+ { -+ .name = "ixp4xx_eth", -+ .id = IXP4XX_ETH_NPEB, -+ .dev.platform_data = avila_plat_eth, -+ }, { -+ .name = "ixp4xx_eth", -+ .id = IXP4XX_ETH_NPEC, -+ .dev.platform_data = avila_plat_eth + 1, -+ } -+}; -+ - static struct platform_device *avila_devices[] __initdata = { - &avila_i2c_gpio, - &avila_flash, -- &avila_uart -+ &avila_uart, -+ &avila_eth[0], -+ &avila_eth[1], - }; - - static void __init avila_init(void) diff --git a/target/linux/ixp4xx/patches-2.6.23/093-avila_rtc_fixup.patch b/target/linux/ixp4xx/patches-2.6.23/093-avila_rtc_fixup.patch deleted file mode 100644 index f706c100a..000000000 --- a/target/linux/ixp4xx/patches-2.6.23/093-avila_rtc_fixup.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -uprN linux-2.6.23.orig/arch/arm/mach-ixp4xx/avila-setup.c linux-2.6.23/arch/arm/mach-ixp4xx/avila-setup.c ---- linux-2.6.23.orig/arch/arm/mach-ixp4xx/avila-setup.c 2007-10-09 15:31:38.000000000 -0500 -+++ linux-2.6.23/arch/arm/mach-ixp4xx/avila-setup.c 2007-10-11 01:08:21.000000000 -0500 -@@ -138,6 +138,35 @@ static struct platform_device *avila_dev - &avila_uart - }; - -+static char avila_rtc_probe[] __initdata = "rtc-ds1672.probe=0,0x68 "; -+ -+static void __init avila_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(avila_rtc_probe) + strlen(p) + 1 + 4) >> 2; -+ strlcpy(t->u.cmdline.cmdline, avila_rtc_probe, COMMAND_LINE_SIZE); -+ strlcpy(t->u.cmdline.cmdline + strlen(avila_rtc_probe), p, -+ COMMAND_LINE_SIZE - strlen(avila_rtc_probe)); -+ -+ /* Terminate the table. */ -+ t = tag_next(t); -+ t->hdr.tag = ATAG_NONE; -+ t->hdr.size = 0; -+} -+ - static void __init avila_init(void) - { - ixp4xx_sys_init(); -@@ -165,6 +194,7 @@ MACHINE_START(AVILA, "Gateworks Avila Ne - /* Maintainer: Deepak Saxena */ - .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, - .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, -+ .fixup = avila_fixup, - .map_io = ixp4xx_map_io, - .init_irq = ixp4xx_init_irq, - .timer = &ixp4xx_timer, -@@ -182,6 +212,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc - /* Maintainer: Tom Billman */ - .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, - .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, -+ .fixup = avila_fixup, - .map_io = ixp4xx_map_io, - .init_irq = ixp4xx_init_irq, - .timer = &ixp4xx_timer, diff --git a/target/linux/ixp4xx/patches-2.6.23/294-eeprom_new_notifier.patch b/target/linux/ixp4xx/patches-2.6.23/294-eeprom_new_notifier.patch new file mode 100644 index 000000000..4aa7a988b --- /dev/null +++ b/target/linux/ixp4xx/patches-2.6.23/294-eeprom_new_notifier.patch @@ -0,0 +1,187 @@ +diff -uprN linux-2.6.23.orig/drivers/i2c/chips/eeprom.c linux-2.6.23/drivers/i2c/chips/eeprom.c +--- linux-2.6.23.orig/drivers/i2c/chips/eeprom.c 2007-10-09 15:31:38.000000000 -0500 ++++ linux-2.6.23/drivers/i2c/chips/eeprom.c 2007-10-11 00:57:25.000000000 -0500 +@@ -33,6 +33,8 @@ + #include + #include + #include ++#include ++#include + + /* Addresses to scan */ + static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, +@@ -41,26 +43,7 @@ static unsigned short normal_i2c[] = { 0 + /* Insmod parameters */ + I2C_CLIENT_INSMOD_1(eeprom); + +- +-/* Size of EEPROM in bytes */ +-#define EEPROM_SIZE 256 +- +-/* possible types of eeprom devices */ +-enum eeprom_nature { +- UNKNOWN, +- VAIO, +-}; +- +-/* Each client has this additional data */ +-struct eeprom_data { +- struct i2c_client client; +- struct mutex update_lock; +- u8 valid; /* bitfield, bit!=0 if slice is valid */ +- unsigned long last_updated[8]; /* In jiffies, 8 slices */ +- u8 data[EEPROM_SIZE]; /* Register values */ +- enum eeprom_nature nature; +-}; +- ++ATOMIC_NOTIFIER_HEAD(eeprom_chain); + + static int eeprom_attach_adapter(struct i2c_adapter *adapter); + static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind); +@@ -191,6 +174,7 @@ static int eeprom_detect(struct i2c_adap + data->valid = 0; + mutex_init(&data->update_lock); + data->nature = UNKNOWN; ++ data->attr = &eeprom_attr; + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) +@@ -214,6 +198,9 @@ static int eeprom_detect(struct i2c_adap + if (err) + goto exit_detach; + ++ /* call the notifier chain */ ++ atomic_notifier_call_chain(&eeprom_chain, EEPROM_REGISTER, data); ++ + return 0; + + exit_detach: +@@ -239,6 +226,41 @@ static int eeprom_detach_client(struct i + return 0; + } + ++/** ++ * register_eeprom_notifier - register a 'user' of EEPROM devices. ++ * @nb: pointer to notifier info structure ++ * ++ * Registers a callback function to be called upon detection ++ * of an EEPROM device. Detection invokes the 'add' callback ++ * with the kobj of the mutex and a bin_attribute which allows ++ * read from the EEPROM. The intention is that the notifier ++ * will be able to read system configuration from the notifier. ++ * ++ * Only EEPROMs detected *after* the addition of the notifier ++ * are notified. I.e. EEPROMs already known to the system ++ * will not be notified - add the notifier from board level ++ * code! ++ */ ++int register_eeprom_notifier(struct notifier_block *nb) ++{ ++ return atomic_notifier_chain_register(&eeprom_chain, nb); ++} ++ ++/** ++ * unregister_eeprom_notifier - unregister a 'user' of EEPROM devices. ++ * @old: pointer to notifier info structure ++ * ++ * Removes a callback function from the list of 'users' to be ++ * notified upon detection of EEPROM devices. ++ */ ++int unregister_eeprom_notifier(struct notifier_block *nb) ++{ ++ return atomic_notifier_chain_unregister(&eeprom_chain, nb); ++} ++ ++EXPORT_SYMBOL_GPL(register_eeprom_notifier); ++EXPORT_SYMBOL_GPL(unregister_eeprom_notifier); ++ + static int __init eeprom_init(void) + { + return i2c_add_driver(&eeprom_driver); +diff -uprN linux-2.6.23.orig/include/linux/eeprom.h linux-2.6.23/include/linux/eeprom.h +--- linux-2.6.23.orig/include/linux/eeprom.h 1969-12-31 18:00:00.000000000 -0600 ++++ linux-2.6.23/include/linux/eeprom.h 2007-10-11 00:57:25.000000000 -0500 +@@ -0,0 +1,71 @@ ++#ifndef _LINUX_EEPROM_H ++#define _LINUX_EEPROM_H ++/* ++ * EEPROM notifier header ++ * ++ * Copyright (C) 2006 John Bowler ++ */ ++ ++/* ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#ifndef __KERNEL__ ++#error This is a kernel header ++#endif ++ ++#include ++#include ++#include ++ ++/* Size of EEPROM in bytes */ ++#define EEPROM_SIZE 256 ++ ++/* possible types of eeprom devices */ ++enum eeprom_nature { ++ UNKNOWN, ++ VAIO, ++}; ++ ++/* Each client has this additional data */ ++struct eeprom_data { ++ struct i2c_client client; ++ struct mutex update_lock; ++ u8 valid; /* bitfield, bit!=0 if slice is valid */ ++ unsigned long last_updated[8]; /* In jiffies, 8 slices */ ++ u8 data[EEPROM_SIZE]; /* Register values */ ++ enum eeprom_nature nature; ++ struct bin_attribute *attr; ++}; ++ ++/* ++ * This is very basic. ++ * ++ * If an EEPROM is detected on the I2C bus (this only works for ++ * I2C EEPROMs) the notifier chain is called with ++ * both the I2C information and the kobject for the sysfs ++ * device which has been registers. It is then possible to ++ * read from the device via the bin_attribute::read method ++ * to extract configuration information. ++ * ++ * Register the notifier in the board level code, there is no ++ * need to unregister it but you can if you want (it will save ++ * a little bit or kernel memory to do so). ++ */ ++ ++extern int register_eeprom_notifier(struct notifier_block *nb); ++extern int unregister_eeprom_notifier(struct notifier_block *nb); ++ ++#endif /* _LINUX_EEPROM_H */ +diff -uprN linux-2.6.23.orig/include/linux/notifier.h linux-2.6.23/include/linux/notifier.h +--- linux-2.6.23.orig/include/linux/notifier.h 2007-10-09 15:31:38.000000000 -0500 ++++ linux-2.6.23/include/linux/notifier.h 2007-10-11 00:57:25.000000000 -0500 +@@ -231,5 +231,8 @@ static inline int notifier_to_errno(int + #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ + #define PM_POST_SUSPEND 0x0004 /* Suspend finished */ + ++/* eeprom notifier chain */ ++#define EEPROM_REGISTER 0x0001 ++ + #endif /* __KERNEL__ */ + #endif /* _LINUX_NOTIFIER_H */ diff --git a/target/linux/ixp4xx/patches-2.6.23/296-avila_mac_plat_info.patch b/target/linux/ixp4xx/patches-2.6.23/296-avila_mac_plat_info.patch new file mode 100644 index 000000000..e4813fe2c --- /dev/null +++ b/target/linux/ixp4xx/patches-2.6.23/296-avila_mac_plat_info.patch @@ -0,0 +1,43 @@ +diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c +index e38f45f..10ed5d6 100644 +--- a/arch/arm/mach-ixp4xx/avila-setup.c ++++ b/arch/arm/mach-ixp4xx/avila-setup.c +@@ -132,10 +132,37 @@ static struct platform_device avila_pata = { + .resource = avila_pata_resources, + }; + ++/* Built-in 10/100 Ethernet MAC interfaces */ ++static struct eth_plat_info avila_plat_eth[] = { ++ { ++ .phy = 0, ++ .rxq = 3, ++ .txreadyq = 20, ++ }, { ++ .phy = 1, ++ .rxq = 4, ++ .txreadyq = 21, ++ } ++}; ++ ++static struct platform_device avila_eth[] = { ++ { ++ .name = "ixp4xx_eth", ++ .id = IXP4XX_ETH_NPEB, ++ .dev.platform_data = avila_plat_eth, ++ }, { ++ .name = "ixp4xx_eth", ++ .id = IXP4XX_ETH_NPEC, ++ .dev.platform_data = avila_plat_eth + 1, ++ } ++}; ++ + static struct platform_device *avila_devices[] __initdata = { + &avila_i2c_gpio, + &avila_flash, +- &avila_uart ++ &avila_uart, ++ &avila_eth[0], ++ &avila_eth[1], + }; + + static void __init avila_init(void) diff --git a/target/linux/ixp4xx/patches-2.6.23/298-avila_rtc_fixup.patch b/target/linux/ixp4xx/patches-2.6.23/298-avila_rtc_fixup.patch new file mode 100644 index 000000000..f706c100a --- /dev/null +++ b/target/linux/ixp4xx/patches-2.6.23/298-avila_rtc_fixup.patch @@ -0,0 +1,55 @@ +diff -uprN linux-2.6.23.orig/arch/arm/mach-ixp4xx/avila-setup.c linux-2.6.23/arch/arm/mach-ixp4xx/avila-setup.c +--- linux-2.6.23.orig/arch/arm/mach-ixp4xx/avila-setup.c 2007-10-09 15:31:38.000000000 -0500 ++++ linux-2.6.23/arch/arm/mach-ixp4xx/avila-setup.c 2007-10-11 01:08:21.000000000 -0500 +@@ -138,6 +138,35 @@ static struct platform_device *avila_dev + &avila_uart + }; + ++static char avila_rtc_probe[] __initdata = "rtc-ds1672.probe=0,0x68 "; ++ ++static void __init avila_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(avila_rtc_probe) + strlen(p) + 1 + 4) >> 2; ++ strlcpy(t->u.cmdline.cmdline, avila_rtc_probe, COMMAND_LINE_SIZE); ++ strlcpy(t->u.cmdline.cmdline + strlen(avila_rtc_probe), p, ++ COMMAND_LINE_SIZE - strlen(avila_rtc_probe)); ++ ++ /* Terminate the table. */ ++ t = tag_next(t); ++ t->hdr.tag = ATAG_NONE; ++ t->hdr.size = 0; ++} ++ + static void __init avila_init(void) + { + ixp4xx_sys_init(); +@@ -165,6 +194,7 @@ MACHINE_START(AVILA, "Gateworks Avila Ne + /* Maintainer: Deepak Saxena */ + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, ++ .fixup = avila_fixup, + .map_io = ixp4xx_map_io, + .init_irq = ixp4xx_init_irq, + .timer = &ixp4xx_timer, +@@ -182,6 +212,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc + /* Maintainer: Tom Billman */ + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, ++ .fixup = avila_fixup, + .map_io = ixp4xx_map_io, + .init_irq = ixp4xx_init_irq, + .timer = &ixp4xx_timer, -- cgit v1.2.3