add missing dependencies on PCI/PCMCIA/USB support
[openwrt.git] / target / linux / ixp4xx / patches / 070-ixp4xx_freq_fixup.patch
1 This patch is required as the frequency fixup in nslu2_init does not
2 run sufficiently early in the boot sequence to take effect. In
3 addition the dsmg600 setup code behaviour has been improved such
4 that a 'fixup' routine is avoided.
5
6 Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
7
8 Index: linux-2.6.21-arm/arch/arm/mach-ixp4xx/nslu2-setup.c
9 ===================================================================
10 --- linux-2.6.21-arm.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-07 12:05:40.000000000 -0700
11 +++ linux-2.6.21-arm/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-07 12:15:56.000000000 -0700
12 @@ -22,6 +22,7 @@
13 #include <asm/mach-types.h>
14 #include <asm/mach/arch.h>
15 #include <asm/mach/flash.h>
16 +#include <asm/mach/time.h>
17
18 static struct flash_platform_data nslu2_flash_data = {
19 .map_name = "cfi_probe",
20 @@ -157,10 +158,21 @@
21 gpio_line_set(NSLU2_PO_GPIO, IXP4XX_GPIO_HIGH);
22 }
23
24 -static void __init nslu2_init(void)
25 +static void __init nslu2_timer_init(void)
26 {
27 - ixp4xx_timer_freq = NSLU2_FREQ;
28 + /* The xtal on this machine is non-standard. */
29 + ixp4xx_timer_freq = NSLU2_FREQ;
30 +
31 + /* Call standard timer_init function. */
32 + ixp4xx_timer_init();
33 +}
34
35 +static struct sys_timer nslu2_timer = {
36 + .init = nslu2_timer_init,
37 +};
38 +
39 +static void __init nslu2_init(void)
40 +{
41 ixp4xx_sys_init();
42
43 nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
44 @@ -185,6 +197,6 @@
45 .boot_params = 0x00000100,
46 .map_io = ixp4xx_map_io,
47 .init_irq = ixp4xx_init_irq,
48 - .timer = &ixp4xx_timer,
49 + .timer = &nslu2_timer,
50 .init_machine = nslu2_init,
51 MACHINE_END
52 Index: linux-2.6.21-arm/arch/arm/mach-ixp4xx/common.c
53 ===================================================================
54 --- linux-2.6.21-arm.orig/arch/arm/mach-ixp4xx/common.c 2007-05-07 12:05:40.000000000 -0700
55 +++ linux-2.6.21-arm/arch/arm/mach-ixp4xx/common.c 2007-05-07 12:15:16.000000000 -0700
56 @@ -269,7 +269,7 @@
57 .handler = ixp4xx_timer_interrupt,
58 };
59
60 -static void __init ixp4xx_timer_init(void)
61 +void __init ixp4xx_timer_init(void)
62 {
63 /* Clear Pending Interrupt by writing '1' to it */
64 *IXP4XX_OSST = IXP4XX_OSST_TIMER_1_PEND;
65 Index: linux-2.6.21-arm/include/asm-arm/arch-ixp4xx/platform.h
66 ===================================================================
67 --- linux-2.6.21-arm.orig/include/asm-arm/arch-ixp4xx/platform.h 2007-05-07 12:05:40.000000000 -0700
68 +++ linux-2.6.21-arm/include/asm-arm/arch-ixp4xx/platform.h 2007-05-07 12:15:16.000000000 -0700
69 @@ -113,6 +113,7 @@
70 extern void ixp4xx_map_io(void);
71 extern void ixp4xx_init_irq(void);
72 extern void ixp4xx_sys_init(void);
73 +extern void ixp4xx_timer_init(void);
74 extern struct sys_timer ixp4xx_timer;
75 extern void ixp4xx_pci_preinit(void);
76 struct pci_sys_data;
77 Index: linux-2.6.21-arm/arch/arm/mach-ixp4xx/dsmg600-setup.c
78 ===================================================================
79 --- linux-2.6.21-arm.orig/arch/arm/mach-ixp4xx/dsmg600-setup.c 2007-05-07 12:05:42.000000000 -0700
80 +++ linux-2.6.21-arm/arch/arm/mach-ixp4xx/dsmg600-setup.c 2007-05-07 12:16:07.000000000 -0700
81 @@ -18,6 +18,7 @@
82 #include <asm/mach-types.h>
83 #include <asm/mach/arch.h>
84 #include <asm/mach/flash.h>
85 +#include <asm/mach/time.h>
86
87 static struct flash_platform_data dsmg600_flash_data = {
88 .map_name = "cfi_probe",
89 @@ -128,6 +129,19 @@
90 gpio_line_set(DSMG600_PO_GPIO, IXP4XX_GPIO_HIGH);
91 }
92
93 +static void __init dsmg600_timer_init(void)
94 +{
95 + /* The xtal on this machine is non-standard. */
96 + ixp4xx_timer_freq = DSMG600_FREQ;
97 +
98 + /* Call standard timer_init function. */
99 + ixp4xx_timer_init();
100 +}
101 +
102 +static struct sys_timer dsmg600_timer = {
103 + .init = dsmg600_timer_init,
104 +};
105 +
106 static void __init dsmg600_init(void)
107 {
108 ixp4xx_sys_init();
109 @@ -155,21 +169,13 @@
110 #endif
111 }
112
113 -static void __init dsmg600_fixup(struct machine_desc *desc,
114 - struct tag *tags, char **cmdline, struct meminfo *mi)
115 -{
116 - /* The xtal on this machine is non-standard. */
117 - ixp4xx_timer_freq = DSMG600_FREQ;
118 -}
119 -
120 MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
121 /* Maintainer: www.nslu2-linux.org */
122 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
123 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
124 .boot_params = 0x00000100,
125 - .fixup = dsmg600_fixup,
126 .map_io = ixp4xx_map_io,
127 .init_irq = ixp4xx_init_irq,
128 - .timer = &ixp4xx_timer,
129 + .timer = &dsmg600_timer,
130 .init_machine = dsmg600_init,
131 MACHINE_END
This page took 0.055041 seconds and 5 git commands to generate.