From a0e006b86b435e15c7ce4580a952f7ec6f7895fb Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 5 Aug 2009 13:48:22 +0000 Subject: [rdc] add experimental support for 2.6.30 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17131 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../rdc/patches-2.6.30/001-rdc3210_flash_map.patch | 63 ++++++++++++++++++++++ .../linux/rdc/patches-2.6.30/003-rootfstype.patch | 11 ++++ .../rdc/patches-2.6.30/004-yenta_mystery.patch | 20 +++++++ .../rdc/patches-2.6.30/005-fix_amit_breakage.patch | 40 ++++++++++++++ .../rdc/patches-2.6.30/008-r8610_flash_map.patch | 29 ++++++++++ .../009-rdc321x_select_embedded.patch | 10 ++++ 6 files changed, 173 insertions(+) create mode 100644 target/linux/rdc/patches-2.6.30/001-rdc3210_flash_map.patch create mode 100644 target/linux/rdc/patches-2.6.30/003-rootfstype.patch create mode 100644 target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch create mode 100644 target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch create mode 100644 target/linux/rdc/patches-2.6.30/008-r8610_flash_map.patch create mode 100644 target/linux/rdc/patches-2.6.30/009-rdc321x_select_embedded.patch (limited to 'target/linux/rdc/patches-2.6.30') diff --git a/target/linux/rdc/patches-2.6.30/001-rdc3210_flash_map.patch b/target/linux/rdc/patches-2.6.30/001-rdc3210_flash_map.patch new file mode 100644 index 000000000..2c35b841a --- /dev/null +++ b/target/linux/rdc/patches-2.6.30/001-rdc3210_flash_map.patch @@ -0,0 +1,63 @@ +--- a/drivers/mtd/maps/Kconfig ++++ b/drivers/mtd/maps/Kconfig +@@ -112,6 +112,50 @@ config MTD_SUN_UFLASH + Sun Microsystems boardsets. This driver will require CFI support + in the kernel, so if you did not enable CFI previously, do that now. + ++config MTD_RDC3210 ++ tristate "CFI Flash device mapped on RDC3210" ++ depends on X86 && MTD_CFI && MTD_PARTITIONS ++ help ++ RDC-3210 is the flash device we find on Ralink reference board. ++ ++config MTD_RDC3210_STATIC_MAP ++ bool "Partitions on RDC3210 mapped statically" if MTD_RDC3210 ++ select MTD_RDC3210_FACTORY_PRESENT ++ help ++ The mapping driver will use the static partition map for the ++ RDC-3210 flash device. ++ ++config MTD_RDC3210_FACTORY_PRESENT ++ bool "Reserve a partition on RDC3210 for factory presets" ++ depends on MTD_RDC3210 ++ default y ++ help ++ The mapping driver will reserve a partition on the RDC-3210 flash ++ device for resetting flash contents to factory defaults. ++ ++config MTD_RDC3210_ALLOW_JFFS2 ++ bool "JFFS2 filesystem usable in a partition on RDC3210" ++ depends on MTD_RDC3210 && !MTD_RDC3210_STATIC_MAP ++ help ++ The mapping driver will align a partition on the RDC-3210 flash ++ device to an erase-block boundary so that a JFFS2 filesystem may ++ reside on it. ++ ++config MTD_RDC3210_SIZE ++ hex "Amount of flash memory on RDC3210" ++ depends on MTD_RDC3210 ++ default "0x400000" ++ help ++ Total size in bytes of the RDC-3210 flash device ++ ++config MTD_RDC3210_BUSWIDTH ++ int "Width of CFI Flash device mapped on RDC3210" ++ depends on MTD_RDC3210 ++ default "2" ++ help ++ Number of bytes addressed on the RDC-3210 flash device before ++ addressing the same chip again ++ + config MTD_SC520CDP + tristate "CFI Flash device mapped on AMD SC520 CDP" + depends on X86 && MTD_CFI && MTD_CONCAT +--- a/drivers/mtd/maps/Makefile ++++ b/drivers/mtd/maps/Makefile +@@ -27,6 +27,7 @@ obj-$(CONFIG_MTD_PHYSMAP_OF) += physmap_ + obj-$(CONFIG_MTD_PMC_MSP_EVM) += pmcmsp-flash.o + obj-$(CONFIG_MTD_PMC_MSP_RAMROOT)+= pmcmsp-ramroot.o + obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o ++obj-$(CONFIG_MTD_RDC3210) += rdc3210.o + obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o + obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o + obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o diff --git a/target/linux/rdc/patches-2.6.30/003-rootfstype.patch b/target/linux/rdc/patches-2.6.30/003-rootfstype.patch new file mode 100644 index 000000000..386e63897 --- /dev/null +++ b/target/linux/rdc/patches-2.6.30/003-rootfstype.patch @@ -0,0 +1,11 @@ +--- a/init/do_mounts.c ++++ b/init/do_mounts.c +@@ -189,6 +189,8 @@ static void __init get_fs_names(char *pa + { + char *s = page; + ++ if (!root_fs_names) ++ root_fs_names = "squashfs,jffs2"; + if (root_fs_names) { + strcpy(page, root_fs_names); + while (*s++) { diff --git a/target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch b/target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch new file mode 100644 index 000000000..4c2e2face --- /dev/null +++ b/target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch @@ -0,0 +1,20 @@ +--- a/drivers/pcmcia/yenta_socket.c ++++ b/drivers/pcmcia/yenta_socket.c +@@ -1174,6 +1174,17 @@ static int __devinit yenta_probe (struct + + /* We must finish initialization here */ + ++#ifdef CONFIG_X86_RDC ++/* #define YO_TI1510_DATASHEET_GUY_EXPLAIN_THIS_JUNK 0x0044f044 */ ++#define YO_TI1510_DATASHEET_GUY_EXPLAIN_THIS_JUNK 0x0844b060 ++/* #define YO_TI1510_DATASHEET_GUY_EXPLAIN_THIS_JUNK 0x0044d044 */ ++ ++ config_writel(socket, 32*4, YO_TI1510_DATASHEET_GUY_EXPLAIN_THIS_JUNK); ++ config_writel(socket, 35*4, 0x00000022); ++ config_writel(socket, 36*4, 0x60200000); ++ config_writel(socket, 40*4, 0x7e020000); ++#endif ++ + if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, IRQF_SHARED, "yenta", socket)) { + /* No IRQ or request_irq failed. Poll */ + socket->cb_irq = 0; /* But zero is a valid IRQ number. */ diff --git a/target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch b/target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch new file mode 100644 index 000000000..8103e841d --- /dev/null +++ b/target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch @@ -0,0 +1,40 @@ +--- a/arch/x86/boot/boot.h ++++ b/arch/x86/boot/boot.h +@@ -62,7 +62,7 @@ static inline void outl(u32 v, u16 port) + { + asm volatile("outl %0,%1" : : "a" (v), "dN" (port)); + } +-static inline u32 inl(u32 port) ++static inline u32 inl(u16 port) + { + u32 v; + asm volatile("inl %1,%0" : "=a" (v) : "dN" (port)); +--- a/arch/x86/boot/pm.c ++++ b/arch/x86/boot/pm.c +@@ -14,6 +14,9 @@ + + #include "boot.h" + #include ++#ifdef CONFIG_X86_RDC ++#include ++#endif + + /* + * Invoke the realmode switch hook if present; otherwise +@@ -156,6 +159,16 @@ void go_to_protected_mode(void) + die(); + } + ++#ifdef CONFIG_X86_RDC ++ { ++ u32 bootctl; ++ ++ outl(0x80003840, RDC3210_CFGREG_ADDR); ++ bootctl = inl(RDC3210_CFGREG_DATA) | 0x07ff0000; ++ outl(bootctl, RDC3210_CFGREG_DATA); ++ } ++#endif ++ + /* Reset coprocessor (IGNNE#) */ + reset_coprocessor(); + diff --git a/target/linux/rdc/patches-2.6.30/008-r8610_flash_map.patch b/target/linux/rdc/patches-2.6.30/008-r8610_flash_map.patch new file mode 100644 index 000000000..e0ccb83cc --- /dev/null +++ b/target/linux/rdc/patches-2.6.30/008-r8610_flash_map.patch @@ -0,0 +1,29 @@ +Index: linux-2.6.29.5/drivers/mtd/maps/Kconfig +=================================================================== +--- linux-2.6.29.5.orig/drivers/mtd/maps/Kconfig 2009-06-19 11:26:44.000000000 +0200 ++++ linux-2.6.29.5/drivers/mtd/maps/Kconfig 2009-06-19 11:26:45.000000000 +0200 +@@ -167,6 +167,12 @@ + Number of bytes addressed on the RDC-3210 flash device before + addressing the same chip again + ++config MTD_R8610 ++ tristate "CFI flash device mapped on R8610" ++ depends on X86 && MTD_CFI && MTD_PARTITIONS ++ help ++ Flash support for the RDC R8610 evaluation board. ++ + config MTD_SC520CDP + tristate "CFI Flash device mapped on AMD SC520 CDP" + depends on X86 && MTD_CFI && MTD_CONCAT +Index: linux-2.6.29.5/drivers/mtd/maps/Makefile +=================================================================== +--- linux-2.6.29.5.orig/drivers/mtd/maps/Makefile 2009-06-19 11:26:44.000000000 +0200 ++++ linux-2.6.29.5/drivers/mtd/maps/Makefile 2009-06-19 11:26:45.000000000 +0200 +@@ -28,6 +28,7 @@ + obj-$(CONFIG_MTD_PMC_MSP_RAMROOT)+= pmcmsp-ramroot.o + obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o + obj-$(CONFIG_MTD_RDC3210) += rdc3210.o ++obj-$(CONFIG_MTD_R8610) += r8610.o + obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o + obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o + obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o diff --git a/target/linux/rdc/patches-2.6.30/009-rdc321x_select_embedded.patch b/target/linux/rdc/patches-2.6.30/009-rdc321x_select_embedded.patch new file mode 100644 index 000000000..84ab6c5c2 --- /dev/null +++ b/target/linux/rdc/patches-2.6.30/009-rdc321x_select_embedded.patch @@ -0,0 +1,10 @@ +--- a/arch/x86/Kconfig 2009-06-19 15:06:16.000000000 +0200 ++++ b/arch/x86/Kconfig 2009-06-19 15:06:01.000000000 +0200 +@@ -380,6 +380,7 @@ + depends on X86_EXTENDED_PLATFORM + select M486 + select X86_REBOOTFIXUPS ++ select EMBEDDED + ---help--- + This option is needed for RDC R-321x system-on-chip, also known + as R-8610-(G). -- cgit v1.2.3