[8.09] [package] busybox: add 2 upstream fixes
[openwrt/svn-archive/archive.git] / target / linux / rdc / patches-2.6.24 / 004-rdc_fixes.patch
1 diff -urN linux-2.6.24/arch/x86/Kconfig linux-2.6.24.new/arch/x86/Kconfig
2 --- linux-2.6.24/arch/x86/Kconfig 2008-01-24 23:58:37.000000000 +0100
3 +++ linux-2.6.24.new/arch/x86/Kconfig 2008-02-11 18:24:27.000000000 +0100
4 @@ -300,6 +300,17 @@
5 supposed to run on these EM64T-based machines. Only choose this option
6 if you have one of these machines.
7
8 +config X86_RDC
9 + bool "Support for RDC 3211 boards"
10 + select GENERIC_GPIO
11 + select LEDS_GPIO
12 + select LEDS_CLASS
13 + help
14 + Support for RDC 3211 systems. Say 'Y' here if the kernel is
15 + supposed to run on an IA-32 RDC R3211 system.
16 + Only choose this option if you have such as system, otherwise you
17 + should say N here.
18 +
19 endchoice
20
21 config SCHED_NO_NO_OMIT_FRAME_POINTER
22 diff -urN linux-2.6.24/arch/x86/kernel/reboot_fixups_32.c linux-2.6.24.new/arch/x86/kernel/reboot_fixups_32.c
23 --- linux-2.6.24/arch/x86/kernel/reboot_fixups_32.c 2008-01-24 23:58:37.000000000 +0100
24 +++ linux-2.6.24.new/arch/x86/kernel/reboot_fixups_32.c 2008-02-11 18:26:18.000000000 +0100
25 @@ -30,6 +30,17 @@
26 udelay(50); /* shouldn't get here but be safe and spin a while */
27 }
28
29 +static void r8610_reset(struct pci_dev *dev)
30 +{
31 + int i;
32 +
33 + outl(0x80003840,0xCF8);
34 + i=inl(0xCFC);
35 + i |= 0x1600;
36 + outl(i,0xCFC);
37 + outb(1,0x92);
38 +}
39 +
40 struct device_fixup {
41 unsigned int vendor;
42 unsigned int device;
43 @@ -40,6 +51,7 @@
44 { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },
45 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },
46 { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE, cs5530a_warm_reset },
47 +{ PCI_VENDOR_ID_RDC, PCI_DEVICE_ID_RDC_R6030, r8610_reset },
48 };
49
50 /*
51 diff -urN linux-2.6.24/arch/x86/Makefile_32 linux-2.6.24.new/arch/x86/Makefile_32
52 --- linux-2.6.24/arch/x86/Makefile_32 2008-01-24 23:58:37.000000000 +0100
53 +++ linux-2.6.24.new/arch/x86/Makefile_32 2008-02-11 18:25:12.000000000 +0100
54 @@ -99,6 +99,11 @@
55 mcore-$(CONFIG_X86_ES7000) := arch/x86/mach-default
56 core-$(CONFIG_X86_ES7000) := arch/x86/mach-es7000/
57
58 +# RDC subarch support
59 +mflags-$(CONFIG_X86_RDC) := -Iinclude/asm-x86/mach-rdc
60 +mcore-$(CONFIG_X86_RDC) := arch/x86/mach-default
61 +core-$(CONFIG_X86_RDC) += arch/x86/mach-rdc/
62 +
63 # Xen paravirtualization support
64 core-$(CONFIG_XEN) += arch/x86/xen/
65
66 diff -urN linux-2.6.24/include/asm-x86/timex.h linux-2.6.24.new/include/asm-x86/timex.h
67 --- linux-2.6.24/include/asm-x86/timex.h 2008-01-24 23:58:37.000000000 +0100
68 +++ linux-2.6.24.new/include/asm-x86/timex.h 2008-02-11 18:25:43.000000000 +0100
69 @@ -7,6 +7,8 @@
70
71 #ifdef CONFIG_X86_ELAN
72 # define PIT_TICK_RATE 1189200 /* AMD Elan has different frequency! */
73 +#elif defined(CONFIG_X86_RDC)
74 +# define PIT_TICK_RATE 1041667 /* Underlying HZ for R8610 */
75 #else
76 # define PIT_TICK_RATE 1193182 /* Underlying HZ */
77 #endif