aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/etrax
diff options
context:
space:
mode:
authorClaudio Mignanti <c.mignanti@gmail.com>2009-04-09 16:21:56 +0000
committerClaudio Mignanti <c.mignanti@gmail.com>2009-04-09 16:21:56 +0000
commit4dd7a65697af641f080c07b21cee1a56999d112f (patch)
treef2ee4ff0827e1087392345f2fd7c2c7322b4f598 /target/linux/etrax
parentd2042b0ef4549f8b1ab0e33d8c8f55abd68ae4ae (diff)
downloadupstream-4dd7a65697af641f080c07b21cee1a56999d112f.tar.gz
upstream-4dd7a65697af641f080c07b21cee1a56999d112f.tar.bz2
upstream-4dd7a65697af641f080c07b21cee1a56999d112f.zip
patches for 2.6.28
SVN-Revision: 15174
Diffstat (limited to 'target/linux/etrax')
-rw-r--r--target/linux/etrax/patches-2.6.28/100-compile-fixes.patch97
-rw-r--r--target/linux/etrax/patches-2.6.28/100-cris-makefiles.patch55
-rw-r--r--target/linux/etrax/patches-2.6.28/300-sysfs.patch43
-rw-r--r--target/linux/etrax/patches-2.6.28/400-Kconfig_source.patch17
-rw-r--r--target/linux/etrax/patches-2.6.28/500-i2c_gvc.patch45
-rw-r--r--target/linux/etrax/patches-2.6.28/600-fix_serial_cris.patch29
6 files changed, 189 insertions, 97 deletions
diff --git a/target/linux/etrax/patches-2.6.28/100-compile-fixes.patch b/target/linux/etrax/patches-2.6.28/100-compile-fixes.patch
deleted file mode 100644
index ac448be600..0000000000
--- a/target/linux/etrax/patches-2.6.28/100-compile-fixes.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-Index: linux-2.6.28/arch/cris/Makefile
-===================================================================
---- linux-2.6.28.orig/arch/cris/Makefile 2008-12-25 00:26:37.000000000 +0100
-+++ linux-2.6.28/arch/cris/Makefile 2009-01-09 22:52:39.000000000 +0100
-@@ -40,7 +40,7 @@
-
- LD = $(CROSS_COMPILE)ld -mcrislinux
-
--OBJCOPYFLAGS := -O binary -R .note -R .comment -S
-+OBJCOPYFLAGS := -O binary -R .bss -R .note -R .note.gnu.build-id -R .comment -S
-
- CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
-
-Index: linux-2.6.28/arch/cris/arch-v10/boot/Makefile
-===================================================================
---- linux-2.6.28.orig/arch/cris/arch-v10/boot/Makefile 2008-12-25 00:26:37.000000000 +0100
-+++ linux-2.6.28/arch/cris/arch-v10/boot/Makefile 2009-01-09 22:52:39.000000000 +0100
-@@ -13,7 +13,6 @@
-
- $(obj)/compressed/vmlinux: $(obj)/Image FORCE
- $(Q)$(MAKE) $(build)=$(obj)/compressed $@
-- $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
-
- $(obj)/zImage: $(obj)/compressed/vmlinux
- @cp $< $@
-Index: linux-2.6.28/arch/cris/arch-v10/boot/compressed/misc.c
-===================================================================
---- linux-2.6.28.orig/arch/cris/arch-v10/boot/compressed/misc.c 2008-12-25 00:26:37.000000000 +0100
-+++ linux-2.6.28/arch/cris/arch-v10/boot/compressed/misc.c 2009-01-10 18:00:45.000000000 +0100
-@@ -5,7 +5,7 @@
- * adapted for Linux.
- *
- * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
-- * puts by Nick Holloway 1993, better puts by Martin Mares 1995
-+ * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
- * adaptation for Linux/CRIS Axis Communications AB, 1999
- *
- */
-@@ -102,7 +102,6 @@
- static long bytes_out = 0;
- static uch *output_data;
- static unsigned long output_ptr = 0;
--static void puts(const char *);
-
- /* the "heap" is put directly after the BSS ends, at end */
-
-@@ -115,7 +114,7 @@
- /* decompressor info and error messages to serial console */
-
- static void
--puts(const char *s)
-+putstr(const char *s)
- {
- #ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
- while (*s) {
-@@ -188,9 +187,9 @@
-
- static void error(char *x)
- {
-- puts("\n\n");
-- puts(x);
-- puts("\n\n -- System halted\n");
-+ putstr("\n\n");
-+ putstr(x);
-+ putstr("\n\n -- System halted\n");
-
- while (1); /* Halt */
- }
-@@ -236,11 +235,11 @@
-
- __asm__ volatile ("move $vr,%0" : "=rm" (revision));
- if (revision < 10) {
-- puts("You need an ETRAX 100LX to run linux 2.6\n");
-+ putstr("You need an ETRAX 100LX to run linux 2.6\n");
- while (1);
- }
-
-- puts("Uncompressing Linux...\n");
-+ putstr("Uncompressing Linux...\n");
- gunzip();
-- puts("Done. Now booting the kernel.\n");
-+ putstr("Done. Now booting the kernel.\n");
- }
-Index: linux-2.6.28/arch/cris/arch-v10/mm/init.c
-===================================================================
---- linux-2.6.28.orig/arch/cris/arch-v10/mm/init.c 2008-12-25 00:26:37.000000000 +0100
-+++ linux-2.6.28/arch/cris/arch-v10/mm/init.c 2009-01-09 22:52:39.000000000 +0100
-@@ -184,6 +184,9 @@
-
- free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
- }
-+void free_initrd_mem(unsigned long start, unsigned long end)
-+{
-+}
-
- /* Initialize remaps of some I/O-ports. It is important that this
- * is called before any driver is initialized.
diff --git a/target/linux/etrax/patches-2.6.28/100-cris-makefiles.patch b/target/linux/etrax/patches-2.6.28/100-cris-makefiles.patch
new file mode 100644
index 0000000000..6495c4957f
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/100-cris-makefiles.patch
@@ -0,0 +1,55 @@
+diff -urN linux-2.6.28.clean/arch/cris/Makefile linux-2.6.28.mod/arch/cris/Makefile
+--- linux-2.6.28.clean/arch/cris/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28.mod/arch/cris/Makefile 2009-04-07 11:52:30.000000000 +0200
+@@ -40,7 +40,7 @@
+
+ LD = $(CROSS_COMPILE)ld -mcrislinux
+
+-OBJCOPYFLAGS := -O binary -R .note -R .comment -S
++OBJCOPYFLAGS := -O binary -R .bss -R .note -R .note.gnu.build-id -R .comment -S
+
+ CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
+
+diff -urN linux-2.6.28.clean/arch/cris/arch-v10/boot/Makefile linux-2.6.28.mod/arch/cris/arch-v10/boot/Makefile
+--- linux-2.6.28.clean/arch/cris/arch-v10/boot/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28.mod/arch/cris/arch-v10/boot/Makefile 2009-04-07 11:55:01.000000000 +0200
+@@ -2,8 +2,6 @@
+ # arch/cris/arch-v10/boot/Makefile
+ #
+
+-OBJCOPYFLAGS = -O binary --remove-section=.bss
+-
+ subdir- := compressed rescue
+ targets := Image
+
+@@ -13,7 +11,7 @@
+
+ $(obj)/compressed/vmlinux: $(obj)/Image FORCE
+ $(Q)$(MAKE) $(build)=$(obj)/compressed $@
+- $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
++# $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
+
+ $(obj)/zImage: $(obj)/compressed/vmlinux
+ @cp $< $@
+diff -urN linux-2.6.28.clean/arch/cris/arch-v10/boot/compressed/Makefile linux-2.6.28.mod/arch/cris/arch-v10/boot/compressed/Makefile
+--- linux-2.6.28.clean/arch/cris/arch-v10/boot/compressed/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28.mod/arch/cris/arch-v10/boot/compressed/Makefile 2009-04-07 11:53:02.000000000 +0200
+@@ -6,7 +6,6 @@
+ ccflags-y += -O2 $(LINUXINCLUDE)
+ ldflags-y += -T $(srctree)/$(src)/decompress.lds
+ OBJECTS = $(obj)/head.o $(obj)/misc.o
+-OBJCOPYFLAGS = -O binary --remove-section=.bss
+
+ quiet_cmd_image = BUILD $@
+ cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
+diff -urN linux-2.6.28.clean/arch/cris/arch-v10/boot/rescue/Makefile linux-2.6.28.mod/arch/cris/arch-v10/boot/rescue/Makefile
+--- linux-2.6.28.clean/arch/cris/arch-v10/boot/rescue/Makefile 2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.28.mod/arch/cris/arch-v10/boot/rescue/Makefile 2009-04-07 11:53:09.000000000 +0200
+@@ -5,7 +5,6 @@
+ ccflags-y += -O2 $(LINUXINCLUDE)
+ asflags-y += $(LINUXINCLUDE)
+ ldflags-y += -T $(srctree)/$(src)/rescue.lds
+-OBJCOPYFLAGS = -O binary --remove-section=.bss
+ obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
+ OBJECT := $(obj)/head.o
+
diff --git a/target/linux/etrax/patches-2.6.28/300-sysfs.patch b/target/linux/etrax/patches-2.6.28/300-sysfs.patch
new file mode 100644
index 0000000000..9f415b4a82
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/300-sysfs.patch
@@ -0,0 +1,43 @@
+--- a/drivers/serial/crisv10.c
++++ b/drivers/serial/crisv10.c
+@@ -27,6 +27,7 @@ static char *serial_version = "$Revision
+ #include <linux/kernel.h>
+ #include <linux/mutex.h>
+ #include <linux/bitops.h>
++#include <linux/device.h>
+
+ #include <asm/io.h>
+ #include <asm/irq.h>
+@@ -4384,6 +4385,7 @@ static const struct tty_operations rs_op
+ .tiocmset = rs_tiocmset
+ };
+
++static struct class *rs_class;
+ static int __init
+ rs_init(void)
+ {
+@@ -4518,6 +4520,24 @@ rs_init(void)
+ #endif
+ #endif /* CONFIG_SVINTO_SIM */
+
++ rs_class = class_create(THIS_MODULE, "rs_tty");
++#ifdef CONFIG_ETRAX_SERIAL_PORT0
++ device_create(rs_class, NULL,
++ MKDEV(TTY_MAJOR, 64), NULL, "ttyS0");
++#endif
++#ifdef CONFIG_ETRAX_SERIAL_PORT1
++ device_create(rs_class, NULL,
++ MKDEV(TTY_MAJOR, 65), NULL, "ttyS1");
++#endif
++#ifdef CONFIG_ETRAX_SERIAL_PORT2
++ device_create(rs_class, NULL,
++ MKDEV(TTY_MAJOR, 66), NULL, "ttyS2");
++#endif
++#ifdef CONFIG_ETRAX_SERIAL_PORT3
++ device_create(rs_class, NULL,
++ MKDEV(TTY_MAJOR, 67), NULL, "ttyS3");
++#endif
++
+ return 0;
+ }
+
diff --git a/target/linux/etrax/patches-2.6.28/400-Kconfig_source.patch b/target/linux/etrax/patches-2.6.28/400-Kconfig_source.patch
new file mode 100644
index 0000000000..d0fdbf5897
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/400-Kconfig_source.patch
@@ -0,0 +1,17 @@
+Index: linux-2.6.28.9/arch/cris/Kconfig
+===================================================================
+--- linux-2.6.28.9.orig/arch/cris/Kconfig 2009-03-23 22:55:52.000000000 +0100
++++ linux-2.6.28.9/arch/cris/Kconfig 2009-04-08 16:53:30.000000000 +0200
+@@ -662,6 +662,12 @@
+
+ source "drivers/ide/Kconfig"
+
++source "drivers/scsi/Kconfig"
++
++source "drivers/media/Kconfig"
++
++source "sound/Kconfig"
++
+ source "drivers/net/Kconfig"
+
+ source "drivers/i2c/Kconfig"
diff --git a/target/linux/etrax/patches-2.6.28/500-i2c_gvc.patch b/target/linux/etrax/patches-2.6.28/500-i2c_gvc.patch
new file mode 100644
index 0000000000..7eed8b2a71
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/500-i2c_gvc.patch
@@ -0,0 +1,45 @@
+Index: linux-2.6.25.20/arch/cris/arch-v10/drivers/Kconfig
+===================================================================
+--- linux-2.6.25.20.orig/arch/cris/arch-v10/drivers/Kconfig 2009-02-09 09:30:40.000000000 +0100
++++ linux-2.6.25.20/arch/cris/arch-v10/drivers/Kconfig 2009-02-09 21:23:12.000000000 +0100
+@@ -450,11 +450,18 @@
+ i2c_arg = I2C_READARG(STA013_READ_ADDR, reg);
+ val = ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
+
++config ETRAX_I2C_GVC
++ bool "I2C GVC support"
++ depends on ETRAX_ARCH_V10 && !ETRAX_I2C
++ select ETRAX_I2C_USES_PB_NOT_PB_I2C
++ help
++ Enables an I2C driver with Geert Vancompernolle improvement.
++
+ # this is true for most products since PB-I2C seems to be somewhat
+ # flawed..
+ config ETRAX_I2C_USES_PB_NOT_PB_I2C
+ bool "I2C uses PB not PB-I2C"
+- depends on ETRAX_I2C
++ depends on ETRAX_I2C || ETRAX_I2C_GVC
+ help
+ Select whether to use the special I2C mode in the PB I/O register or
+ not. This option needs to be selected in order to use some drivers
+@@ -478,7 +485,7 @@
+
+ config ETRAX_I2C_EEPROM
+ bool "I2C EEPROM (non-volatile RAM) support"
+- depends on ETRAX_I2C
++ depends on ETRAX_I2C || ETRAX_I2C_GVC
+ help
+ Enables I2C EEPROM (non-volatile RAM) on PB0 and PB1 using the I2C
+ driver. Select size option: Probed, 2k, 8k, 16k.
+Index: linux-2.6.25.20/arch/cris/arch-v10/drivers/Makefile
+===================================================================
+--- linux-2.6.25.20.orig/arch/cris/arch-v10/drivers/Makefile 2009-02-09 09:30:41.000000000 +0100
++++ linux-2.6.25.20/arch/cris/arch-v10/drivers/Makefile 2009-02-09 09:35:39.000000000 +0100
+@@ -4,6 +4,7 @@
+
+ obj-$(CONFIG_ETRAX_AXISFLASHMAP) += axisflashmap.o
+ obj-$(CONFIG_ETRAX_I2C) += i2c.o
++obj-$(CONFIG_ETRAX_I2C_GVC) += i2c_gvc.o
+ obj-$(CONFIG_ETRAX_I2C_EEPROM) += eeprom.o
+ obj-$(CONFIG_ETRAX_GPIO) += gpio.o
+ obj-$(CONFIG_ETRAX_DS1302) += ds1302.o
diff --git a/target/linux/etrax/patches-2.6.28/600-fix_serial_cris.patch b/target/linux/etrax/patches-2.6.28/600-fix_serial_cris.patch
new file mode 100644
index 0000000000..0c54b7b886
--- /dev/null
+++ b/target/linux/etrax/patches-2.6.28/600-fix_serial_cris.patch
@@ -0,0 +1,29 @@
+Index: linux-2.6.28.9/drivers/serial/crisv10.c
+===================================================================
+--- linux-2.6.28.9.orig/drivers/serial/crisv10.c 2009-04-08 16:47:06.000000000 +0200
++++ linux-2.6.28.9/drivers/serial/crisv10.c 2009-04-08 16:47:27.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <linux/mutex.h>
+ #include <linux/bitops.h>
+ #include <linux/device.h>
++#include <linux/proc_fs.h>
+
+ #include <asm/io.h>
+ #include <asm/irq.h>
+@@ -4389,7 +4390,6 @@
+ .break_ctl = rs_break,
+ .send_xchar = rs_send_xchar,
+ .wait_until_sent = rs_wait_until_sent,
+- .read_proc = rs_read_proc,
+ .tiocmget = rs_tiocmget,
+ .tiocmset = rs_tiocmset
+ };
+@@ -4455,7 +4455,7 @@
+ if (tty_register_driver(driver))
+ panic("Couldn't register serial driver\n");
+ /* do some initializing for the separate ports */
+-
++ driver->proc_entry->read_proc = rs_read_proc;
+ for (i = 0, info = rs_table; i < NR_PORTS; i++,info++) {
+ if (info->enabled) {
+ if (cris_request_io_interface(info->io_if,