diff options
Diffstat (limited to 'packages/linux/linux-2.6.23/mpc8313e-rdb')
3 files changed, 62 insertions, 22 deletions
diff --git a/packages/linux/linux-2.6.23/mpc8313e-rdb/defconfig b/packages/linux/linux-2.6.23/mpc8313e-rdb/defconfig index 6ac9151be6..2cd1cb3b1a 100644 --- a/packages/linux/linux-2.6.23/mpc8313e-rdb/defconfig +++ b/packages/linux/linux-2.6.23/mpc8313e-rdb/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.23 -# Wed Nov 28 23:32:31 2007 +# Wed Dec 5 10:34:37 2007 # # CONFIG_PPC64 is not set @@ -1467,6 +1467,7 @@ CONFIG_LEDS_MPC8313E_RDB=m CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=m CONFIG_LEDS_TRIGGER_HEARTBEAT=m +CONFIG_LEDS_TRIGGER_CPU_ACTIVITY=m # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set CONFIG_RTC_LIB=y diff --git a/packages/linux/linux-2.6.23/mpc8313e-rdb/mpc8313e-rdb-leds.patch b/packages/linux/linux-2.6.23/mpc8313e-rdb/mpc8313e-rdb-leds.patch index d8a477af2a..56176c1095 100644 --- a/packages/linux/linux-2.6.23/mpc8313e-rdb/mpc8313e-rdb-leds.patch +++ b/packages/linux/linux-2.6.23/mpc8313e-rdb/mpc8313e-rdb-leds.patch @@ -1,6 +1,6 @@ diff -urN linux-2.6.23.orig/drivers/leds/Kconfig linux-2.6.23/drivers/leds/Kconfig --- linux-2.6.23.orig/drivers/leds/Kconfig 2007-10-09 22:31:38.000000000 +0200 -+++ linux-2.6.23/drivers/leds/Kconfig 2007-11-29 09:02:42.000000000 +0100 ++++ linux-2.6.23/drivers/leds/Kconfig 2007-12-03 11:08:06.000000000 +0100 @@ -101,6 +101,12 @@ outputs. To be useful the particular board must have LEDs and they must be connected to the GPIO lines. @@ -16,8 +16,8 @@ diff -urN linux-2.6.23.orig/drivers/leds/Kconfig linux-2.6.23/drivers/leds/Kconf config LEDS_TRIGGERS diff -urN linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c linux-2.6.23/drivers/leds/leds-mpc8313e-rdb.c --- linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.23/drivers/leds/leds-mpc8313e-rdb.c 2007-11-29 09:02:42.000000000 +0100 -@@ -0,0 +1,128 @@ ++++ linux-2.6.23/drivers/leds/leds-mpc8313e-rdb.c 2007-12-03 11:08:36.000000000 +0100 +@@ -0,0 +1,127 @@ +/* + * drivers/leds/leds-mpc8313e-rdb.c + * Copyright (C) 2007 Leon Woestenberg <leon@sidebranch.com> @@ -38,18 +38,18 @@ diff -urN linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c linux-2.6.23/driver +#include <linux/err.h> +#include <asm/io.h> + -+int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain, -+ int assignment, int has_irq); -+int par_io_data_set(u8 port, u8 pin, u8 val); ++#define LEDS_BASE 0xfa000000 ++#define LEDS_SIZE 0x2 + +static struct platform_dev *leds_pdev = NULL; +static struct resource *led_mem = NULL; -+static void *p = NULL; ++static void *led_io = NULL; ++static u8 led_state = 0; + +static void mpc8313leds_green_set(struct led_classdev *led_cdev, enum led_brightness value) +{ -+ int d = ioread16(p); -+ iowrite16(value?d&~1:d|1, p); ++ led_state = value ? led_state&~32 : led_state|32; ++ iowrite8(led_state, led_io); +} + +static struct led_classdev mpc8313_green_led = { @@ -59,8 +59,8 @@ diff -urN linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c linux-2.6.23/driver + +static void mpc8313leds_yellow_set(struct led_classdev *led_cdev, enum led_brightness value) +{ -+ int d = ioread16(p); -+ iowrite16(value?d&~2:d|2, p); ++ led_state = value ? led_state&~64 : led_state|64; ++ iowrite8(led_state, led_io); +} + +static struct led_classdev mpc8313_yellow_led = { @@ -70,8 +70,8 @@ diff -urN linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c linux-2.6.23/driver + +static void mpc8313leds_red_set(struct led_classdev *led_cdev, enum led_brightness value) +{ -+ int d = ioread16(p); -+ iowrite16(value?d&~4:d|4, p); ++ led_state = value ? led_state&~128 : led_state|128; ++ iowrite8(led_state, led_io); +} + +static struct led_classdev mpc8313_red_led = { @@ -117,12 +117,11 @@ diff -urN linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c linux-2.6.23/driver + +static int __init mpc8313leds_init(void) +{ -+ led_mem = request_mem_region(0xfa000000, 0x100, "mpc8313-leds"); -+ if (led_mem == NULL) return -ENOMEM; -+ p = ioremap(0xfa000000, 0x100); -+ if (p == NULL) ++ if (!(led_mem = request_mem_region(LEDS_BASE, LEDS_SIZE, "mpc8313-leds"))) ++ return -ENOMEM; ++ if (!(led_io = ioremap(LEDS_BASE, LEDS_SIZE))) + { -+ if (led_mem) release_mem_region(0xfa000000, 0x100); ++ release_mem_region(LEDS_BASE, LEDS_SIZE); + led_mem = NULL; + return -ENOMEM; + } @@ -133,7 +132,7 @@ diff -urN linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c linux-2.6.23/driver + +static void __exit mpc8313leds_exit(void) +{ -+ if (led_mem) release_mem_region(0xfa000000, 0x100); ++ if (led_mem) release_mem_region(LEDS_BASE, LEDS_SIZE); + led_mem = NULL; + platform_driver_unregister(&mpc8313leds_driver); + @@ -145,10 +144,10 @@ diff -urN linux-2.6.23.orig/drivers/leds/leds-mpc8313e-rdb.c linux-2.6.23/driver + +MODULE_AUTHOR("Leon Woestenberg <leon@sidebranch.com>"); +MODULE_DESCRIPTION("MPC8313E-RDB LED driver"); -+ ++MODULE_LICENSE("GPL"); diff -urN linux-2.6.23.orig/drivers/leds/Makefile linux-2.6.23/drivers/leds/Makefile --- linux-2.6.23.orig/drivers/leds/Makefile 2007-10-09 22:31:38.000000000 +0200 -+++ linux-2.6.23/drivers/leds/Makefile 2007-11-29 09:03:09.000000000 +0100 ++++ linux-2.6.23/drivers/leds/Makefile 2007-12-03 11:08:06.000000000 +0100 @@ -17,6 +17,7 @@ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o diff --git a/packages/linux/linux-2.6.23/mpc8313e-rdb/mpc8313e-rdb-rtc.patch b/packages/linux/linux-2.6.23/mpc8313e-rdb/mpc8313e-rdb-rtc.patch new file mode 100644 index 0000000000..4177a3d4a9 --- /dev/null +++ b/packages/linux/linux-2.6.23/mpc8313e-rdb/mpc8313e-rdb-rtc.patch @@ -0,0 +1,40 @@ +diff -urN linux-2.6.23.orig/arch/powerpc/boot/dts/mpc8313erdb.dts linux-2.6.23/arch/powerpc/boot/dts/mpc8313erdb.dts +--- linux-2.6.23.orig/arch/powerpc/boot/dts/mpc8313erdb.dts 2007-10-09 22:31:38.000000000 +0200 ++++ linux-2.6.23/arch/powerpc/boot/dts/mpc8313erdb.dts 2007-12-01 13:16:55.000000000 +0100 +@@ -54,12 +54,20 @@ + }; + + i2c@3000 { ++ #address-cells = <1>; ++ #size-cells = <0>; + device_type = "i2c"; + compatible = "fsl-i2c"; + reg = <3000 100>; + interrupts = <e 8>; + interrupt-parent = < &ipic >; + dfsrr; ++ ++ rtc@68 { ++ device_type = "rtc"; ++ compatible = "dallas,ds1339"; ++ reg = <68>; ++ }; + }; + + i2c@3100 { +diff -urN linux-2.6.23.orig/arch/powerpc/sysdev/fsl_soc.c linux-2.6.23/arch/powerpc/sysdev/fsl_soc.c +--- linux-2.6.23.orig/arch/powerpc/sysdev/fsl_soc.c 2007-10-09 22:31:38.000000000 +0200 ++++ linux-2.6.23/arch/powerpc/sysdev/fsl_soc.c 2007-12-01 13:08:30.000000000 +0100 +@@ -319,6 +319,12 @@ + {"ricoh,rs5c372b", "rtc-rs5c372", "rs5c372b",}, + {"ricoh,rv5c386", "rtc-rs5c372", "rv5c386",}, + {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",}, ++ {"dallas,ds1307", "rtc-ds1307", "ds1307",}, ++ {"dallas,ds1337", "rtc-ds1307", "ds1337",}, ++ {"dallas,ds1338", "rtc-ds1307", "ds1338",}, ++ {"dallas,ds1339", "rtc-ds1307", "ds1339",}, ++ {"dallas,ds1340", "rtc-ds1307", "ds1340",}, ++ {"stm,m41t00", "rtc-ds1307", "m41t00"}, + }; + + static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info) |