diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-02-02 14:51:10 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-07 06:38:44 -0500 |
commit | e060e084e7d9e1c62d02cb6b8d3fe07db5317eaa (patch) | |
tree | f51d6afd552911fa29f1f8feb47d57429e93ff66 /arch/powerpc/platforms | |
parent | 30f5933657d17fbbc743ce9522543ba50ce2e834 (diff) |
[PATCH] powerpc: Lindent platforms/83xx
Ran arch/powerpc/platforms/83xx through Lindent
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_sys.c | 31 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_sys.h | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc83xx.h | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/pci.c | 8 |
4 files changed, 20 insertions, 23 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 7d5a27829bc8..7c18b4cd5db4 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -69,15 +69,14 @@ mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
69 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; | 69 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; |
70 | return PCI_IRQ_TABLE_LOOKUP; | 70 | return PCI_IRQ_TABLE_LOOKUP; |
71 | } | 71 | } |
72 | #endif /* CONFIG_PCI */ | 72 | #endif /* CONFIG_PCI */ |
73 | 73 | ||
74 | /* ************************************************************************ | 74 | /* ************************************************************************ |
75 | * | 75 | * |
76 | * Setup the architecture | 76 | * Setup the architecture |
77 | * | 77 | * |
78 | */ | 78 | */ |
79 | static void __init | 79 | static void __init mpc834x_sys_setup_arch(void) |
80 | mpc834x_sys_setup_arch(void) | ||
81 | { | 80 | { |
82 | struct device_node *np; | 81 | struct device_node *np; |
83 | 82 | ||
@@ -86,14 +85,14 @@ mpc834x_sys_setup_arch(void) | |||
86 | 85 | ||
87 | np = of_find_node_by_type(NULL, "cpu"); | 86 | np = of_find_node_by_type(NULL, "cpu"); |
88 | if (np != 0) { | 87 | if (np != 0) { |
89 | unsigned int *fp = (int *) get_property(np, "clock-frequency", NULL); | 88 | unsigned int *fp = |
89 | (int *)get_property(np, "clock-frequency", NULL); | ||
90 | if (fp != 0) | 90 | if (fp != 0) |
91 | loops_per_jiffy = *fp / HZ; | 91 | loops_per_jiffy = *fp / HZ; |
92 | else | 92 | else |
93 | loops_per_jiffy = 50000000 / HZ; | 93 | loops_per_jiffy = 50000000 / HZ; |
94 | of_node_put(np); | 94 | of_node_put(np); |
95 | } | 95 | } |
96 | |||
97 | #ifdef CONFIG_PCI | 96 | #ifdef CONFIG_PCI |
98 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 97 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
99 | add_bridge(np); | 98 | add_bridge(np); |
@@ -104,14 +103,13 @@ mpc834x_sys_setup_arch(void) | |||
104 | #endif | 103 | #endif |
105 | 104 | ||
106 | #ifdef CONFIG_ROOT_NFS | 105 | #ifdef CONFIG_ROOT_NFS |
107 | ROOT_DEV = Root_NFS; | 106 | ROOT_DEV = Root_NFS; |
108 | #else | 107 | #else |
109 | ROOT_DEV = Root_HDA1; | 108 | ROOT_DEV = Root_HDA1; |
110 | #endif | 109 | #endif |
111 | } | 110 | } |
112 | 111 | ||
113 | void __init | 112 | void __init mpc834x_sys_init_IRQ(void) |
114 | mpc834x_sys_init_IRQ(void) | ||
115 | { | 113 | { |
116 | u8 senses[8] = { | 114 | u8 senses[8] = { |
117 | 0, /* EXT 0 */ | 115 | 0, /* EXT 0 */ |
@@ -140,28 +138,27 @@ mpc834x_sys_init_IRQ(void) | |||
140 | } | 138 | } |
141 | 139 | ||
142 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | 140 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) |
143 | extern ulong ds1374_get_rtc_time(void); | 141 | extern ulong ds1374_get_rtc_time(void); |
144 | extern int ds1374_set_rtc_time(ulong); | 142 | extern int ds1374_set_rtc_time(ulong); |
145 | 143 | ||
146 | static int __init | 144 | static int __init mpc834x_rtc_hookup(void) |
147 | mpc834x_rtc_hookup(void) | ||
148 | { | 145 | { |
149 | struct timespec tv; | 146 | struct timespec tv; |
150 | 147 | ||
151 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | 148 | ppc_md.get_rtc_time = ds1374_get_rtc_time; |
152 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | 149 | ppc_md.set_rtc_time = ds1374_set_rtc_time; |
153 | 150 | ||
154 | tv.tv_nsec = 0; | 151 | tv.tv_nsec = 0; |
155 | tv.tv_sec = (ppc_md.get_rtc_time)(); | 152 | tv.tv_sec = (ppc_md.get_rtc_time) (); |
156 | do_settimeofday(&tv); | 153 | do_settimeofday(&tv); |
157 | 154 | ||
158 | return 0; | 155 | return 0; |
159 | } | 156 | } |
157 | |||
160 | late_initcall(mpc834x_rtc_hookup); | 158 | late_initcall(mpc834x_rtc_hookup); |
161 | #endif | 159 | #endif |
162 | 160 | ||
163 | void __init | 161 | void __init platform_init(void) |
164 | platform_init(void) | ||
165 | { | 162 | { |
166 | /* setup the PowerPC module struct */ | 163 | /* setup the PowerPC module struct */ |
167 | ppc_md.setup_arch = mpc834x_sys_setup_arch; | 164 | ppc_md.setup_arch = mpc834x_sys_setup_arch; |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h index e4ca39f6a862..fedecb73f7ff 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.h +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.h | |||
@@ -20,4 +20,4 @@ | |||
20 | #define PIRQC MPC83xx_IRQ_EXT6 | 20 | #define PIRQC MPC83xx_IRQ_EXT6 |
21 | #define PIRQD MPC83xx_IRQ_EXT7 | 21 | #define PIRQD MPC83xx_IRQ_EXT7 |
22 | 22 | ||
23 | #endif /* __MACH_MPC83XX_SYS_H__ */ | 23 | #endif /* __MACH_MPC83XX_SYS_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 228d5c463f71..01cae106912b 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -14,4 +14,4 @@ extern int mpc83xx_exclude_device(u_char bus, u_char devfn); | |||
14 | extern void mpc83xx_restart(char *cmd); | 14 | extern void mpc83xx_restart(char *cmd); |
15 | extern long mpc83xx_time_init(void); | 15 | extern long mpc83xx_time_init(void); |
16 | 16 | ||
17 | #endif /* __MPC83XX_H__ */ | 17 | #endif /* __MPC83XX_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 70e28fcdb38f..16f7d3b30e1d 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -61,7 +61,7 @@ int __init add_bridge(struct device_node *dev) | |||
61 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | 61 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); |
62 | 62 | ||
63 | /* Get bus range if any */ | 63 | /* Get bus range if any */ |
64 | bus_range = (int *) get_property(dev, "bus-range", &len); | 64 | bus_range = (int *)get_property(dev, "bus-range", &len); |
65 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 65 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
66 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 66 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
67 | " bus 0\n", dev->full_name); | 67 | " bus 0\n", dev->full_name); |
@@ -83,7 +83,7 @@ int __init add_bridge(struct device_node *dev) | |||
83 | if ((rsrc.start & 0xfffff) == 0x8500) { | 83 | if ((rsrc.start & 0xfffff) == 0x8500) { |
84 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); | 84 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); |
85 | } | 85 | } |
86 | /* PCI 2*/ | 86 | /* PCI 2 */ |
87 | if ((rsrc.start & 0xfffff) == 0x8600) { | 87 | if ((rsrc.start & 0xfffff) == 0x8600) { |
88 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); | 88 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); |
89 | primary = 0; | 89 | primary = 0; |
@@ -93,10 +93,10 @@ int __init add_bridge(struct device_node *dev) | |||
93 | 93 | ||
94 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " | 94 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " |
95 | "Firmware bus number: %d->%d\n", | 95 | "Firmware bus number: %d->%d\n", |
96 | rsrc.start, hose->first_busno, hose->last_busno); | 96 | rsrc.start, hose->first_busno, hose->last_busno); |
97 | 97 | ||
98 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | 98 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", |
99 | hose, hose->cfg_addr, hose->cfg_data); | 99 | hose, hose->cfg_addr, hose->cfg_data); |
100 | 100 | ||
101 | /* Interpret the "ranges" property */ | 101 | /* Interpret the "ranges" property */ |
102 | /* This also maps the I/O region and sets isa_io/mem_base */ | 102 | /* This also maps the I/O region and sets isa_io/mem_base */ |