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