aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/8xx
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-08-20 12:36:19 -0400
committerPaul Mackerras <paulus@samba.org>2007-08-22 01:21:47 -0400
commit4b218e9bb2fbbc57b5a05de41d77c056a134528c (patch)
treedf4bc0a676589d2d2ee506398d64ea0ca5021474 /arch/powerpc/platforms/8xx
parent16a15a30f8a09af6ce2dc4fd6eec9b454c1fe488 (diff)
[POWERPC] Whitespace cleanup in arch/powerpc
Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/8xx')
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index f1693550c70c..601b389b570b 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -89,24 +89,24 @@ init_internal_rtc(void)
89 89
90static int __init get_freq(char *name, unsigned long *val) 90static int __init get_freq(char *name, unsigned long *val)
91{ 91{
92 struct device_node *cpu; 92 struct device_node *cpu;
93 const unsigned int *fp; 93 const unsigned int *fp;
94 int found = 0; 94 int found = 0;
95 95
96 /* The cpu node should have timebase and clock frequency properties */ 96 /* The cpu node should have timebase and clock frequency properties */
97 cpu = of_find_node_by_type(NULL, "cpu"); 97 cpu = of_find_node_by_type(NULL, "cpu");
98 98
99 if (cpu) { 99 if (cpu) {
100 fp = of_get_property(cpu, name, NULL); 100 fp = of_get_property(cpu, name, NULL);
101 if (fp) { 101 if (fp) {
102 found = 1; 102 found = 1;
103 *val = *fp; 103 *val = *fp;
104 } 104 }
105 105
106 of_node_put(cpu); 106 of_node_put(cpu);
107 } 107 }
108 108
109 return found; 109 return found;
110} 110}
111 111
112/* The decrementer counts at the system (internal) clock frequency divided by 112/* The decrementer counts at the system (internal) clock frequency divided by
@@ -122,7 +122,7 @@ void __init mpc8xx_calibrate_decr(void)
122 sit8xx_t *sys_tmr2; 122 sit8xx_t *sys_tmr2;
123 int irq, virq; 123 int irq, virq;
124 124
125 clk_r1 = (cark8xx_t *) immr_map(im_clkrstk); 125 clk_r1 = (cark8xx_t *) immr_map(im_clkrstk);
126 126
127 /* Unlock the SCCR. */ 127 /* Unlock the SCCR. */
128 out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY); 128 out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY);
@@ -130,24 +130,24 @@ void __init mpc8xx_calibrate_decr(void)
130 immr_unmap(clk_r1); 130 immr_unmap(clk_r1);
131 131
132 /* Force all 8xx processors to use divide by 16 processor clock. */ 132 /* Force all 8xx processors to use divide by 16 processor clock. */
133 clk_r2 = (car8xx_t *) immr_map(im_clkrst); 133 clk_r2 = (car8xx_t *) immr_map(im_clkrst);
134 setbits32(&clk_r2->car_sccr, 0x02000000); 134 setbits32(&clk_r2->car_sccr, 0x02000000);
135 immr_unmap(clk_r2); 135 immr_unmap(clk_r2);
136 136
137 /* Processor frequency is MHz. 137 /* Processor frequency is MHz.
138 */ 138 */
139 ppc_tb_freq = 50000000; 139 ppc_tb_freq = 50000000;
140 if (!get_freq("bus-frequency", &ppc_tb_freq)) { 140 if (!get_freq("bus-frequency", &ppc_tb_freq)) {
141 printk(KERN_ERR "WARNING: Estimating decrementer frequency " 141 printk(KERN_ERR "WARNING: Estimating decrementer frequency "
142 "(not found)\n"); 142 "(not found)\n");
143 } 143 }
144 ppc_tb_freq /= 16; 144 ppc_tb_freq /= 16;
145 ppc_proc_freq = 50000000; 145 ppc_proc_freq = 50000000;
146 if (!get_freq("clock-frequency", &ppc_proc_freq)) 146 if (!get_freq("clock-frequency", &ppc_proc_freq))
147 printk(KERN_ERR "WARNING: Estimating processor frequency" 147 printk(KERN_ERR "WARNING: Estimating processor frequency"
148 "(not found)\n"); 148 "(not found)\n");
149 149
150 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); 150 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
151 151
152 /* Perform some more timer/timebase initialization. This used 152 /* Perform some more timer/timebase initialization. This used
153 * to be done elsewhere, but other changes caused it to get 153 * to be done elsewhere, but other changes caused it to get
@@ -164,7 +164,7 @@ void __init mpc8xx_calibrate_decr(void)
164 * we guarantee the registers are locked, then we unlock them 164 * we guarantee the registers are locked, then we unlock them
165 * for our use. 165 * for our use.
166 */ 166 */
167 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); 167 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
168 out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY); 168 out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY);
169 out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY); 169 out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY);
170 out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY); 170 out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY);
@@ -180,8 +180,8 @@ void __init mpc8xx_calibrate_decr(void)
180 * we have to enable the timebase). The decrementer interrupt 180 * we have to enable the timebase). The decrementer interrupt
181 * is wired into the vector table, nothing to do here for that. 181 * is wired into the vector table, nothing to do here for that.
182 */ 182 */
183 cpu = of_find_node_by_type(NULL, "cpu"); 183 cpu = of_find_node_by_type(NULL, "cpu");
184 virq= irq_of_parse_and_map(cpu, 0); 184 virq= irq_of_parse_and_map(cpu, 0);
185 irq = irq_map[virq].hwirq; 185 irq = irq_map[virq].hwirq;
186 186
187 sys_tmr2 = (sit8xx_t *) immr_map(im_sit); 187 sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
@@ -211,10 +211,10 @@ int mpc8xx_set_rtc_time(struct rtc_time *tm)
211 sit8xx_t *sys_tmr2; 211 sit8xx_t *sys_tmr2;
212 int time; 212 int time;
213 213
214 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); 214 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
215 sys_tmr2 = (sit8xx_t *) immr_map(im_sit); 215 sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
216 time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, 216 time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
217 tm->tm_hour, tm->tm_min, tm->tm_sec); 217 tm->tm_hour, tm->tm_min, tm->tm_sec);
218 218
219 out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY); 219 out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY);
220 out_be32(&sys_tmr2->sit_rtc, time); 220 out_be32(&sys_tmr2->sit_rtc, time);
@@ -233,8 +233,8 @@ void mpc8xx_get_rtc_time(struct rtc_time *tm)
233 /* Get time from the RTC. */ 233 /* Get time from the RTC. */
234 data = in_be32(&sys_tmr->sit_rtc); 234 data = in_be32(&sys_tmr->sit_rtc);
235 to_tm(data, tm); 235 to_tm(data, tm);
236 tm->tm_year -= 1900; 236 tm->tm_year -= 1900;
237 tm->tm_mon -= 1; 237 tm->tm_mon -= 1;
238 immr_unmap(sys_tmr); 238 immr_unmap(sys_tmr);
239 return; 239 return;
240} 240}
@@ -298,7 +298,7 @@ void __init m8xx_pic_init(void)
298 int irq; 298 int irq;
299 299
300 if (mpc8xx_pic_init()) { 300 if (mpc8xx_pic_init()) {
301 printk(KERN_ERR "Failed interrupt 8xx controller initialization\n"); 301 printk(KERN_ERR "Failed interrupt 8xx controller initialization\n");
302 return; 302 return;
303 } 303 }
304 304