b8cf2a9517a88b40adec6e8179ec00276da60361
[openwrt/staging/florian.git] / target / linux / rdc-2.6 / patches / 000-rdc_fixes.patch
1 diff -urN linux-2.6.19/arch/i386/Kconfig linux-2.6.19.new/arch/i386/Kconfig
2 --- linux-2.6.19/arch/i386/Kconfig 2006-11-29 22:57:37.000000000 +0100
3 +++ linux-2.6.19.new/arch/i386/Kconfig 2006-12-17 17:13:33.000000000 +0100
4 @@ -180,6 +180,14 @@
5 Only choose this option if you have such a system, otherwise you
6 should say N here.
7
8 +config X86_RDC
9 + bool "Support for RDC 3211 boards"
10 + help
11 + Support for RDC 3211 systems. Say 'Y' here if the kernel is
12 + supposed to run on an IA-32 RDC R3211 system.
13 + Only choose this option if you have such as system, otherwise you
14 + should say N here.
15 +
16 endchoice
17
18 config ACPI_SRAT
19 diff -urN linux-2.6.19/arch/i386/Makefile linux-2.6.19.new/arch/i386/Makefile
20 --- linux-2.6.19/arch/i386/Makefile 2006-11-29 22:57:37.000000000 +0100
21 +++ linux-2.6.19.new/arch/i386/Makefile 2006-12-17 17:13:33.000000000 +0100
22 @@ -92,6 +92,10 @@
23 mflags-$(CONFIG_X86_ES7000) := -Iinclude/asm-i386/mach-es7000
24 mcore-$(CONFIG_X86_ES7000) := mach-default
25 core-$(CONFIG_X86_ES7000) := arch/i386/mach-es7000/
26 +# RDC subarch support
27 +mflags-$(CONFIG_X86_RDC) := -Iinclude/asm-i386/mach-rdc
28 +mcore-$(CONFIG_X86_RDC) := mach-default
29 +core-$(CONFIG_X86_RDC) += arch/i386/mach-rdc/
30
31 # default subarch .h files
32 mflags-y += -Iinclude/asm-i386/mach-default
33 diff -urN linux-2.6.19/arch/i386/mach-rdc/Makefile linux-2.6.19.new/arch/i386/mach-rdc/Makefile
34 --- linux-2.6.19/arch/i386/mach-rdc/Makefile 1970-01-01 01:00:00.000000000 +0100
35 +++ linux-2.6.19.new/arch/i386/mach-rdc/Makefile 2006-12-17 17:13:33.000000000 +0100
36 @@ -0,0 +1,5 @@
37 +#
38 +# Makefile for the linux kernel.
39 +#
40 +
41 +obj-$(CONFIG_X86_RDC) := gpio.o platform.o
42 --- timex.h 2007-08-07 10:44:03.816112250 -0700
43 +++ linux/include/asm-i386/timex.h 2007-08-07 10:48:47.905866750 -0700
44 @@ -11,6 +11,8 @@
45
46 #ifdef CONFIG_X86_ELAN
47 # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */
48 +#elif defined(CONFIG_X86_RDC)
49 +# define CLOCK_TICK_RATE 1041667 /* Underlying HZ for R8610 */
50 #else
51 # define CLOCK_TICK_RATE 1193182 /* Underlying HZ */
52 #endif
53 --- reboot_fixups.c 2007-08-07 12:02:00.908412250 -0700
54 +++ linux/arch/i386/kernel/reboot_fixups.c 2007-08-07 12:18:49.391438500 -0700
55 @@ -13,6 +13,17 @@
56 #include <linux/pci.h>
57 #include <asm/reboot_fixups.h>
58 #include <asm/msr.h>
59 +
60 +static void r8610_reset(struct pci_dev *dev)
61 +{
62 + int i;
63 +
64 + outl(0x80003840,0xCF8);
65 + i=inl(0xCFC);
66 + i |= 0x1600;
67 + outl(i,0xCFC);
68 + outb(1,0x92);
69 +}
70
71 static void cs5530a_warm_reset(struct pci_dev *dev)
72 {
73 @@ -40,6 +53,7 @@
74 };
75
76 static struct device_fixup fixups_table[] = {
77 +{ 0x17F3, 0x6030, r8610_reset },
78 { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },
79 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },
80 };