#include <linux/types.h>
#include <linux/string.h>
#include <linux/timer.h>
-#include <linux/jiffies.h>
+#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/bootmem.h>
struct linux_prom_registers *regs,
int nregs)
{
- if(fhc->num_fhc_ranges)
+ if (fhc->num_fhc_ranges)
adjust_regs(regs, nregs, fhc->fhc_ranges,
fhc->num_fhc_ranges);
}
void apply_central_ranges(struct linux_central *central,
struct linux_prom_registers *regs, int nregs)
{
- if(central->num_central_ranges)
+ if (central->num_central_ranges)
adjust_regs(regs, nregs, central->central_ranges,
central->num_central_ranges);
}
prom_printf("FHC: Cannot find any toplevel firehose controllers.\n");
prom_halt();
}
- while(node) {
+ while (node) {
struct linux_fhc *fhc;
int board;
u32 tmp;
fhc_ranges_init(node, fhc);
/* Non-central FHC's have 64-bit OBP format registers. */
- if(prom_getproperty(node, "reg",
+ if (prom_getproperty(node, "reg",
(char *)&fpregs[0], sizeof(fpregs)) == -1) {
prom_printf("FHC: Fatal error, cannot get fhc regs.\n");
prom_halt();
fhc->board = board;
tmp = upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_JCTRL);
- if((tmp & FHC_JTAG_CTRL_MENAB) != 0)
+ if ((tmp & FHC_JTAG_CTRL_MENAB) != 0)
fhc->jtag_master = 1;
else
fhc->jtag_master = 0;
/* Look for the next FHC. */
node = prom_getsibling(node);
- if(node == 0)
+ if (node == 0)
break;
node = prom_searchsiblings(node, "fhc");
- if(node == 0)
+ if (node == 0)
break;
}
}
int clknode, nslots, tmp, nregs;
clknode = prom_searchsiblings(prom_getchild(fnode), "clock-board");
- if(clknode == 0 || clknode == -1) {
+ if (clknode == 0 || clknode == -1) {
prom_printf("Critical error, central lacks clock-board.\n");
prom_halt();
}
central->clkregs = ((((unsigned long)cregs[1].which_io) << 32UL) |
((unsigned long)cregs[1].phys_addr));
- if(nregs == 2)
+ if (nregs == 2)
central->clkver = 0UL;
else
central->clkver = ((((unsigned long)cregs[2].which_io) << 32UL) |
nslots = 8;
break;
case 0x80:
- if(central->clkver != 0UL &&
+ if (central->clkver != 0UL &&
upa_readb(central->clkver) != 0) {
- if((upa_readb(central->clkver) & 0x80) != 0)
+ if ((upa_readb(central->clkver) & 0x80) != 0)
nslots = 4;
else
nslots = 5;
{
struct linux_fhc *fhc;
- for(fhc = fhc_list; fhc != NULL; fhc = fhc->next) {
+ for (fhc = fhc_list; fhc != NULL; fhc = fhc->next) {
u32 tmp;
/* Clear all of the interrupt mapping registers
tmp = upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_CTRL);
/* All non-central boards have this bit set. */
- if(! IS_CENTRAL_FHC(fhc))
+ if (! IS_CENTRAL_FHC(fhc))
tmp |= FHC_CONTROL_IXIST;
/* For all FHCs, clear the firmware synchronization
int cnode, fnode, err;
cnode = prom_finddevice("/central");
- if(cnode == 0 || cnode == -1) {
+ if (cnode == 0 || cnode == -1) {
if (this_is_starfire)
starfire_cpu_setup();
return;
fhc->parent = central_bus;
fnode = prom_searchsiblings(prom_getchild(cnode), "fhc");
- if(fnode == 0 || fnode == -1) {
+ if (fnode == 0 || fnode == -1) {
prom_printf("Critical error, central board lacks fhc.\n");
prom_halt();
}
tmp = upa_readb(central->clkregs + CLOCK_CTRL);
/* NOTE: reverse logic on this bit */
- if(on)
+ if (on)
tmp &= ~(CLOCK_CTRL_RLED);
else
tmp |= CLOCK_CTRL_RLED;
struct linux_fhc *fhc;
central_ledblink(central_bus, led_state);
- for(fhc = fhc_list; fhc != NULL; fhc = fhc->next)
- if(! IS_CENTRAL_FHC(fhc))
+ for (fhc = fhc_list; fhc != NULL; fhc = fhc->next)
+ if (! IS_CENTRAL_FHC(fhc))
fhc_ledblink(fhc, led_state);
led_state = ! led_state;
sftimer.expires = jiffies + (HZ >> 1);