Commit 4b218e9b authored by Scott Wood's avatar Scott Wood Committed by Paul Mackerras

[POWERPC] Whitespace cleanup in arch/powerpc

Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 16a15a30
This diff is collapsed.
...@@ -272,7 +272,7 @@ void do_IRQ(struct pt_regs *regs) ...@@ -272,7 +272,7 @@ void do_IRQ(struct pt_regs *regs)
struct thread_info *curtp, *irqtp; struct thread_info *curtp, *irqtp;
#endif #endif
irq_enter(); irq_enter();
#ifdef CONFIG_DEBUG_STACKOVERFLOW #ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 2KB free? */ /* Debugging check for stack overflow: is there less than 2KB free? */
...@@ -321,7 +321,7 @@ void do_IRQ(struct pt_regs *regs) ...@@ -321,7 +321,7 @@ void do_IRQ(struct pt_regs *regs)
/* That's not SMP safe ... but who cares ? */ /* That's not SMP safe ... but who cares ? */
ppc_spurious_interrupts++; ppc_spurious_interrupts++;
irq_exit(); irq_exit();
set_irq_regs(old_regs); set_irq_regs(old_regs);
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
......
...@@ -89,24 +89,24 @@ init_internal_rtc(void) ...@@ -89,24 +89,24 @@ init_internal_rtc(void)
static int __init get_freq(char *name, unsigned long *val) static int __init get_freq(char *name, unsigned long *val)
{ {
struct device_node *cpu; struct device_node *cpu;
const unsigned int *fp; const unsigned int *fp;
int found = 0; int found = 0;
/* The cpu node should have timebase and clock frequency properties */ /* The cpu node should have timebase and clock frequency properties */
cpu = of_find_node_by_type(NULL, "cpu"); cpu = of_find_node_by_type(NULL, "cpu");
if (cpu) { if (cpu) {
fp = of_get_property(cpu, name, NULL); fp = of_get_property(cpu, name, NULL);
if (fp) { if (fp) {
found = 1; found = 1;
*val = *fp; *val = *fp;
} }
of_node_put(cpu); of_node_put(cpu);
} }
return found; return found;
} }
/* The decrementer counts at the system (internal) clock frequency divided by /* The decrementer counts at the system (internal) clock frequency divided by
...@@ -122,7 +122,7 @@ void __init mpc8xx_calibrate_decr(void) ...@@ -122,7 +122,7 @@ void __init mpc8xx_calibrate_decr(void)
sit8xx_t *sys_tmr2; sit8xx_t *sys_tmr2;
int irq, virq; int irq, virq;
clk_r1 = (cark8xx_t *) immr_map(im_clkrstk); clk_r1 = (cark8xx_t *) immr_map(im_clkrstk);
/* Unlock the SCCR. */ /* Unlock the SCCR. */
out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY); out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY);
...@@ -130,24 +130,24 @@ void __init mpc8xx_calibrate_decr(void) ...@@ -130,24 +130,24 @@ void __init mpc8xx_calibrate_decr(void)
immr_unmap(clk_r1); immr_unmap(clk_r1);
/* Force all 8xx processors to use divide by 16 processor clock. */ /* Force all 8xx processors to use divide by 16 processor clock. */
clk_r2 = (car8xx_t *) immr_map(im_clkrst); clk_r2 = (car8xx_t *) immr_map(im_clkrst);
setbits32(&clk_r2->car_sccr, 0x02000000); setbits32(&clk_r2->car_sccr, 0x02000000);
immr_unmap(clk_r2); immr_unmap(clk_r2);
/* Processor frequency is MHz. /* Processor frequency is MHz.
*/ */
ppc_tb_freq = 50000000; ppc_tb_freq = 50000000;
if (!get_freq("bus-frequency", &ppc_tb_freq)) { if (!get_freq("bus-frequency", &ppc_tb_freq)) {
printk(KERN_ERR "WARNING: Estimating decrementer frequency " printk(KERN_ERR "WARNING: Estimating decrementer frequency "
"(not found)\n"); "(not found)\n");
} }
ppc_tb_freq /= 16; ppc_tb_freq /= 16;
ppc_proc_freq = 50000000; ppc_proc_freq = 50000000;
if (!get_freq("clock-frequency", &ppc_proc_freq)) if (!get_freq("clock-frequency", &ppc_proc_freq))
printk(KERN_ERR "WARNING: Estimating processor frequency" printk(KERN_ERR "WARNING: Estimating processor frequency"
"(not found)\n"); "(not found)\n");
printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
/* Perform some more timer/timebase initialization. This used /* Perform some more timer/timebase initialization. This used
* to be done elsewhere, but other changes caused it to get * to be done elsewhere, but other changes caused it to get
...@@ -164,7 +164,7 @@ void __init mpc8xx_calibrate_decr(void) ...@@ -164,7 +164,7 @@ void __init mpc8xx_calibrate_decr(void)
* we guarantee the registers are locked, then we unlock them * we guarantee the registers are locked, then we unlock them
* for our use. * for our use.
*/ */
sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY); out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY);
out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY); out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY);
out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY); out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY);
...@@ -180,8 +180,8 @@ void __init mpc8xx_calibrate_decr(void) ...@@ -180,8 +180,8 @@ void __init mpc8xx_calibrate_decr(void)
* we have to enable the timebase). The decrementer interrupt * we have to enable the timebase). The decrementer interrupt
* is wired into the vector table, nothing to do here for that. * is wired into the vector table, nothing to do here for that.
*/ */
cpu = of_find_node_by_type(NULL, "cpu"); cpu = of_find_node_by_type(NULL, "cpu");
virq= irq_of_parse_and_map(cpu, 0); virq= irq_of_parse_and_map(cpu, 0);
irq = irq_map[virq].hwirq; irq = irq_map[virq].hwirq;
sys_tmr2 = (sit8xx_t *) immr_map(im_sit); sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
...@@ -211,10 +211,10 @@ int mpc8xx_set_rtc_time(struct rtc_time *tm) ...@@ -211,10 +211,10 @@ int mpc8xx_set_rtc_time(struct rtc_time *tm)
sit8xx_t *sys_tmr2; sit8xx_t *sys_tmr2;
int time; int time;
sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk); sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
sys_tmr2 = (sit8xx_t *) immr_map(im_sit); sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec); tm->tm_hour, tm->tm_min, tm->tm_sec);
out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY); out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY);
out_be32(&sys_tmr2->sit_rtc, time); out_be32(&sys_tmr2->sit_rtc, time);
...@@ -233,8 +233,8 @@ void mpc8xx_get_rtc_time(struct rtc_time *tm) ...@@ -233,8 +233,8 @@ void mpc8xx_get_rtc_time(struct rtc_time *tm)
/* Get time from the RTC. */ /* Get time from the RTC. */
data = in_be32(&sys_tmr->sit_rtc); data = in_be32(&sys_tmr->sit_rtc);
to_tm(data, tm); to_tm(data, tm);
tm->tm_year -= 1900; tm->tm_year -= 1900;
tm->tm_mon -= 1; tm->tm_mon -= 1;
immr_unmap(sys_tmr); immr_unmap(sys_tmr);
return; return;
} }
...@@ -298,7 +298,7 @@ void __init m8xx_pic_init(void) ...@@ -298,7 +298,7 @@ void __init m8xx_pic_init(void)
int irq; int irq;
if (mpc8xx_pic_init()) { if (mpc8xx_pic_init()) {
printk(KERN_ERR "Failed interrupt 8xx controller initialization\n"); printk(KERN_ERR "Failed interrupt 8xx controller initialization\n");
return; return;
} }
......
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
#define CPM_MAP_SIZE (0x4000) #define CPM_MAP_SIZE (0x4000)
static void m8xx_cpm_dpinit(void); static void m8xx_cpm_dpinit(void);
static uint host_buffer; /* One page of host buffer */ static uint host_buffer; /* One page of host buffer */
static uint host_end; /* end + 1 */ static uint host_end; /* end + 1 */
cpm8xx_t *cpmp; /* Pointer to comm processor space */ cpm8xx_t *cpmp; /* Pointer to comm processor space */
cpic8xx_t *cpic_reg; cpic8xx_t *cpic_reg;
static struct device_node *cpm_pic_node; static struct device_node *cpm_pic_node;
static struct irq_host *cpm_pic_host; static struct irq_host *cpm_pic_host;
...@@ -115,7 +115,7 @@ static int cpm_pic_host_map(struct irq_host *h, unsigned int virq, ...@@ -115,7 +115,7 @@ static int cpm_pic_host_map(struct irq_host *h, unsigned int virq,
* and return. This is a no-op function so we don't need any special * and return. This is a no-op function so we don't need any special
* tests in the interrupt handler. * tests in the interrupt handler.
*/ */
static irqreturn_t cpm_error_interrupt(int irq, void *dev) static irqreturn_t cpm_error_interrupt(int irq, void *dev)
{ {
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -181,7 +181,7 @@ unsigned int cpm_pic_init(void) ...@@ -181,7 +181,7 @@ unsigned int cpm_pic_init(void)
printk(KERN_ERR "CPM PIC init: can not find cpm node\n"); printk(KERN_ERR "CPM PIC init: can not find cpm node\n");
goto end; goto end;
} }
eirq= irq_of_parse_and_map(np, 0); eirq = irq_of_parse_and_map(np, 0);
if (eirq == NO_IRQ) if (eirq == NO_IRQ)
goto end; goto end;
...@@ -197,15 +197,15 @@ unsigned int cpm_pic_init(void) ...@@ -197,15 +197,15 @@ unsigned int cpm_pic_init(void)
void cpm_reset(void) void cpm_reset(void)
{ {
cpm8xx_t *commproc; cpm8xx_t *commproc;
sysconf8xx_t *siu_conf; sysconf8xx_t *siu_conf;
commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE);
#ifdef CONFIG_UCODE_PATCH #ifdef CONFIG_UCODE_PATCH
/* Perform a reset. /* Perform a reset.
*/ */
out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG); out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG);
/* Wait for it. /* Wait for it.
*/ */
...@@ -307,7 +307,7 @@ static rh_block_t cpm_boot_dpmem_rh_block[16]; ...@@ -307,7 +307,7 @@ static rh_block_t cpm_boot_dpmem_rh_block[16];
static rh_info_t cpm_dpmem_info; static rh_info_t cpm_dpmem_info;
#define CPM_DPMEM_ALIGNMENT 8 #define CPM_DPMEM_ALIGNMENT 8
static u8* dpram_vbase; static u8 *dpram_vbase;
static uint dpram_pbase; static uint dpram_pbase;
void m8xx_cpm_dpinit(void) void m8xx_cpm_dpinit(void)
......
...@@ -201,7 +201,7 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode) ...@@ -201,7 +201,7 @@ int cpm2_clk_setup(enum cpm_clk_target target, int clock, int mode)
} }
if (mode == CPM_CLK_RX) if (mode == CPM_CLK_RX)
shift +=3; shift += 3;
for (i=0; i<24; i++) { for (i=0; i<24; i++) {
if (clk_map[i][0] == target && clk_map[i][1] == clock) { if (clk_map[i][0] == target && clk_map[i][1] == clock) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment