diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2008-04-29 20:40:36 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2008-04-29 20:40:36 +0000 |
commit | cfef3688dc850783df0516ee1dc6147b6b3bdffc (patch) | |
tree | d040a550755abda10a3373d9c766a4d0207e5f4c /target/linux | |
parent | a9c19c6e49dd9fbc2d2d1b49aeb1fea6344db5cd (diff) | |
download | upstream-cfef3688dc850783df0516ee1dc6147b6b3bdffc.tar.gz upstream-cfef3688dc850783df0516ee1dc6147b6b3bdffc.tar.bz2 upstream-cfef3688dc850783df0516ee1dc6147b6b3bdffc.zip |
the ds1672 can be detected -- fix the driver and remove unneeded hacks
SVN-Revision: 10984
Diffstat (limited to 'target/linux')
3 files changed, 17 insertions, 87 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.24/403-ds1672_detect.patch b/target/linux/generic-2.6/patches-2.6.24/403-ds1672_detect.patch new file mode 100644 index 0000000000..c3eb72c988 --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.24/403-ds1672_detect.patch @@ -0,0 +1,16 @@ +--- linux-2.6.24.5/drivers/rtc/rtc-ds1672.c 2008-04-19 03:53:39.000000000 +0200 ++++ linux-2.6.24.5-owrt/drivers/rtc/rtc-ds1672.c 2008-04-29 22:16:41.000000000 +0200 +@@ -13,10 +13,10 @@ + #include <linux/i2c.h> + #include <linux/rtc.h> + +-#define DRV_VERSION "0.3" ++#define DRV_VERSION "0.4" + +-/* Addresses to scan: none. This chip cannot be detected. */ +-static unsigned short normal_i2c[] = { I2C_CLIENT_END }; ++/* Addresses to scan: 0x68 */ ++static unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END }; + + /* Insmod parameters */ + I2C_CLIENT_INSMOD; diff --git a/target/linux/ixp4xx/patches-2.6.24/190-cambria_support.patch b/target/linux/ixp4xx/patches-2.6.24/190-cambria_support.patch index 4f7f996b2f..4fbc1de8a6 100644 --- a/target/linux/ixp4xx/patches-2.6.24/190-cambria_support.patch +++ b/target/linux/ixp4xx/patches-2.6.24/190-cambria_support.patch @@ -125,7 +125,7 @@ diff -Nur linux-2.6.24.5/arch/arm/mach-ixp4xx/cambria-pci.c linux-2.6.24.5-owrt/ diff -Nur linux-2.6.24.5/arch/arm/mach-ixp4xx/cambria-setup.c linux-2.6.24.5-owrt/arch/arm/mach-ixp4xx/cambria-setup.c --- linux-2.6.24.5/arch/arm/mach-ixp4xx/cambria-setup.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.5-owrt/arch/arm/mach-ixp4xx/cambria-setup.c 2008-04-28 21:07:16.000000000 +0200 -@@ -0,0 +1,280 @@ +@@ -0,0 +1,250 @@ +/* + * arch/arm/mach-ixp4xx/cambria-setup.c + * @@ -303,35 +303,6 @@ diff -Nur linux-2.6.24.5/arch/arm/mach-ixp4xx/cambria-setup.c linux-2.6.24.5-owr + &cambria_eth[1], +}; + -+static char cambria_rtc_probe[] __initdata = "rtc-ds1672.probe=0,0x68 "; -+ -+static void __init cambria_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(cambria_rtc_probe) + strlen(p) + 1 + 4) >> 2; -+ strlcpy(t->u.cmdline.cmdline, cambria_rtc_probe, COMMAND_LINE_SIZE); -+ strlcpy(t->u.cmdline.cmdline + strlen(cambria_rtc_probe), p, -+ COMMAND_LINE_SIZE - strlen(cambria_rtc_probe)); -+ -+ /* Terminate the table. */ -+ t = tag_next(t); -+ t->hdr.tag = ATAG_NONE; -+ t->hdr.size = 0; -+} -+ +#ifdef CONFIG_SENSORS_EEPROM +static int cambria_eeprom_do(struct notifier_block *self, unsigned long event, void *t) +{ @@ -398,7 +369,6 @@ diff -Nur linux-2.6.24.5/arch/arm/mach-ixp4xx/cambria-setup.c linux-2.6.24.5-owr + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, -+ .fixup = cambria_fixup, + .map_io = ixp4xx_map_io, + .init_irq = ixp4xx_init_irq, + .timer = &ixp4xx_timer, diff --git a/target/linux/ixp4xx/patches-2.6.24/298-avila_rtc_fixup.patch b/target/linux/ixp4xx/patches-2.6.24/298-avila_rtc_fixup.patch deleted file mode 100644 index b7cf71ce39..0000000000 --- a/target/linux/ixp4xx/patches-2.6.24/298-avila_rtc_fixup.patch +++ /dev/null @@ -1,56 +0,0 @@ -Index: linux-2.6.24.2/arch/arm/mach-ixp4xx/avila-setup.c -=================================================================== ---- linux-2.6.24.2.orig/arch/arm/mach-ixp4xx/avila-setup.c -+++ linux-2.6.24.2/arch/arm/mach-ixp4xx/avila-setup.c -@@ -163,6 +163,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(); -@@ -192,6 +221,7 @@ MACHINE_START(AVILA, "Gateworks Avila Ne - /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ - .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, -@@ -209,6 +239,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc - /* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */ - .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, |