1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[rdc] add experimental support for 2.6.30

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17131 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian
2009-08-05 13:48:22 +00:00
parent 272ebcedf7
commit a0e006b86b
7 changed files with 494 additions and 0 deletions

View File

@@ -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

View File

@@ -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++) {

View File

@@ -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. */

View File

@@ -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 <asm/segment.h>
+#ifdef CONFIG_X86_RDC
+#include <asm/mach-rdc/rdc321x_defs.h>
+#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();

View File

@@ -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

View File

@@ -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).