diff options
author | raj <raj@FreeBSD.org> | 2008-11-19 11:57:16 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2008-11-19 11:57:16 +0000 |
commit | d8ed8b66e61ebe7d14f72986b26430fa74f6973c (patch) | |
tree | 458e19217e8562fdb5a294ca6a386340aac7689c /sys | |
parent | 59c341efe8739a9ca3f1073acf15eb71579b561f (diff) | |
download | FreeBSD-src-d8ed8b66e61ebe7d14f72986b26430fa74f6973c.zip FreeBSD-src-d8ed8b66e61ebe7d14f72986b26430fa74f6973c.tar.gz |
Improve style(9) and other cosmetics in Marvell SOCs code.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/mv/common.c | 23 | ||||
-rw-r--r-- | sys/arm/mv/mvvar.h | 60 | ||||
-rw-r--r-- | sys/arm/mv/obio.c | 45 |
3 files changed, 64 insertions, 64 deletions
diff --git a/sys/arm/mv/common.c b/sys/arm/mv/common.c index 2c09a0b..5c8d003 100644 --- a/sys/arm/mv/common.c +++ b/sys/arm/mv/common.c @@ -580,7 +580,7 @@ decode_win_usb_setup(uint32_t ctrl) * field in the ctrl reg */ cr = (((ddr_size(i) - 1) & 0xffff0000) | - (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1); + (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1); /* Set the first free USB window */ for (j = 0; j < MV_WIN_USB_MAX; j++) { @@ -663,7 +663,7 @@ decode_win_eth_setup(uint32_t base) for (i = 0; i < MV_WIN_DDR_MAX; i++) if (ddr_is_active(i)) { - br = ddr_base(i) | (ddr_attr(i) << 8) | ddr_target(i); + br = ddr_base(i) | (ddr_attr(i) << 8) | ddr_target(i); sz = ((ddr_size(i) - 1) & 0xffff0000); /* Set the first free ETH window */ @@ -808,7 +808,7 @@ win_idma_can_remap(int i) /* IDMA decode windows 0-3 have remap capability */ if (i < 4) return (1); - + return (0); } @@ -837,7 +837,7 @@ decode_win_idma_setup(void) */ for (i = 0; i < MV_WIN_DDR_MAX; i++) if (ddr_is_active(i)) { - br = ddr_base(i) | (ddr_attr(i) << 8) | ddr_target(i); + br = ddr_base(i) | (ddr_attr(i) << 8) | ddr_target(i); sz = ((ddr_size(i) - 1) & 0xffff0000); /* Place DDR entries in non-remapped windows */ @@ -864,7 +864,7 @@ decode_win_idma_setup(void) for (i = 0; i < idma_wins_no; i++) if (idma_wins[i].target > 0) { br = (idma_wins[i].base & 0xffff0000) | - (idma_wins[i].attr << 8) | idma_wins[i].target; + (idma_wins[i].attr << 8) | idma_wins[i].target; sz = ((idma_wins[i].size - 1) & 0xffff0000); /* Set the first free IDMA window */ @@ -875,7 +875,8 @@ decode_win_idma_setup(void) /* Configure window */ win_idma_br_write(j, br); win_idma_sz_write(j, sz); - if (win_idma_can_remap(j) && idma_wins[j].remap >= 0) + if (win_idma_can_remap(j) && + idma_wins[j].remap >= 0) win_idma_har_write(j, idma_wins[j].remap); /* Set protection RW on all channels */ @@ -914,8 +915,8 @@ decode_win_idma_valid(void) for (i = 0; i < idma_wins_no; i++, wintab++) { if (wintab->target == 0) { - printf("IDMA window#%d: DDR target window is not supposed " - "to be reprogrammed!\n", i); + printf("IDMA window#%d: DDR target window is not " + "supposed to be reprogrammed!\n", i); rv = 0; } @@ -929,7 +930,7 @@ decode_win_idma_valid(void) b = wintab->base; e = b + s - 1; if (s > (0xFFFFFFFF - b + 1)) { - /* XXX this boundary check should accont for 64bit and + /* XXX this boundary check should account for 64bit and * remapping.. */ printf("IDMA window#%d: no space for size 0x%08x at " "0x%08x\n", i, s, b); @@ -939,8 +940,8 @@ decode_win_idma_valid(void) j = decode_win_overlap(i, idma_wins_no, &idma_wins[0]); if (j >= 0) { - printf("IDMA window#%d: (0x%08x - 0x%08x) overlaps with " - "#%d (0x%08x - 0x%08x)\n", i, b, e, j, + printf("IDMA window#%d: (0x%08x - 0x%08x) overlaps " + "with " "#%d (0x%08x - 0x%08x)\n", i, b, e, j, idma_wins[j].base, idma_wins[j].base + idma_wins[j].size - 1); rv = 0; diff --git a/sys/arm/mv/mvvar.h b/sys/arm/mv/mvvar.h index 79aeec6..645c9ac7 100644 --- a/sys/arm/mv/mvvar.h +++ b/sys/arm/mv/mvvar.h @@ -95,27 +95,27 @@ struct decode_win { }; extern const struct obio_pci mv_pci_info[]; -extern bus_space_tag_t obio_tag; -extern struct obio_device obio_devices[]; -extern const struct decode_win *cpu_wins; -extern const struct decode_win *idma_wins; -extern int cpu_wins_no; -extern int idma_wins_no; +extern bus_space_tag_t obio_tag; +extern struct obio_device obio_devices[]; +extern const struct decode_win *cpu_wins; +extern const struct decode_win *idma_wins; +extern int cpu_wins_no; +extern int idma_wins_no; /* Function prototypes */ -int mv_gpio_setup_intrhandler(const char *name, driver_filter_t *filt, +int mv_gpio_setup_intrhandler(const char *name, driver_filter_t *filt, void (*hand)(void *), void *arg, int pin, int flags, void **cookiep); -void mv_gpio_intr_mask(int pin); -void mv_gpio_intr_unmask(int pin); -int mv_gpio_configure(uint32_t pin, uint32_t flags, uint32_t mask); -void mv_gpio_out(uint32_t pin, uint8_t val, uint8_t enable); -uint8_t mv_gpio_in(uint32_t pin); - -int platform_pmap_init(void); -int soc_decode_win(void); -void soc_id(uint32_t *dev, uint32_t *rev); -void soc_identify(void); -void soc_dump_decode_win(void); +void mv_gpio_intr_mask(int pin); +void mv_gpio_intr_unmask(int pin); +int mv_gpio_configure(uint32_t pin, uint32_t flags, uint32_t mask); +void mv_gpio_out(uint32_t pin, uint8_t val, uint8_t enable); +uint8_t mv_gpio_in(uint32_t pin); + +int platform_pmap_init(void); +int soc_decode_win(void); +void soc_id(uint32_t *dev, uint32_t *rev); +void soc_identify(void); +void soc_dump_decode_win(void); uint32_t soc_power_ctrl_get(uint32_t mask); int decode_win_cpu_set(int target, int attr, vm_paddr_t base, uint32_t size, @@ -123,20 +123,20 @@ int decode_win_cpu_set(int target, int attr, vm_paddr_t base, uint32_t size, int decode_win_overlap(int, int, const struct decode_win *); int win_cpu_can_remap(int); -void decode_win_idma_dump(void); -void decode_win_idma_setup(void); -int decode_win_idma_valid(void); +void decode_win_idma_dump(void); +void decode_win_idma_setup(void); +int decode_win_idma_valid(void); -int ddr_is_active(int i); -uint32_t ddr_base(int i); -uint32_t ddr_size(int i); -uint32_t ddr_attr(int i); -uint32_t ddr_target(int i); +int ddr_is_active(int i); +uint32_t ddr_base(int i); +uint32_t ddr_size(int i); +uint32_t ddr_attr(int i); +uint32_t ddr_target(int i); -uint32_t cpu_extra_feat(void); -uint32_t get_tclk(void); -uint32_t read_cpu_ctrl(uint32_t); -void write_cpu_ctrl(uint32_t, uint32_t); +uint32_t cpu_extra_feat(void); +uint32_t get_tclk(void); +uint32_t read_cpu_ctrl(uint32_t); +void write_cpu_ctrl(uint32_t, uint32_t); enum mbus_device_ivars { MBUS_IVAR_BASE, diff --git a/sys/arm/mv/obio.c b/sys/arm/mv/obio.c index 1977148..2e1eacd 100644 --- a/sys/arm/mv/obio.c +++ b/sys/arm/mv/obio.c @@ -40,9 +40,9 @@ __FBSDID("$FreeBSD$"); #include <arm/mv/mvvar.h> #include <arm/mv/mvreg.h> -static void mbus_identify(driver_t *, device_t); -static int mbus_probe(device_t); -static int mbus_attach(device_t); +static void mbus_identify(driver_t *, device_t); +static int mbus_probe(device_t); +static int mbus_attach(device_t); static void mbus_identify(driver_t *driver, device_t parent) @@ -62,10 +62,10 @@ mbus_probe(device_t dev) static int mbus_attach(device_t dev) { - struct obio_softc *sc; - struct obio_device *od; - int i; - device_t child; + struct obio_softc *sc; + struct obio_device *od; + int i; + device_t child; sc = device_get_softc(dev); @@ -124,15 +124,14 @@ mbus_attach(device_t dev) static int mbus_print_child(device_t dev, device_t child) { - struct obio_device *od; - int rv; + struct obio_device *od; + int rv; od = (struct obio_device *)device_get_ivars(child); if (od == NULL) panic("Unknown device on %s", device_get_nameunit(dev)); rv = 0; - rv += bus_print_child_header(dev, child); rv += resource_list_print_type(&od->od_resources, "at mem", @@ -153,7 +152,7 @@ static int mbus_setup_intr(device_t dev, device_t child, struct resource *ires, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { - struct obio_softc *sc; + struct obio_softc *sc; int error; sc = (struct obio_softc *)device_get_softc(dev); @@ -186,7 +185,7 @@ mbus_teardown_intr(device_t dev, device_t child, struct resource *ires, void *co static int mbus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { - struct obio_device *od; + struct obio_device *od; od = (struct obio_device *)device_get_ivars(child); @@ -205,7 +204,7 @@ mbus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) static struct resource_list * mbus_get_resource_list(device_t dev, device_t child) { - struct obio_device *od; + struct obio_device *od; od = (struct obio_device *)device_get_ivars(child); @@ -219,13 +218,13 @@ static struct resource * mbus_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { - struct obio_softc *sc; - struct obio_device *od; - struct resource *rv; - struct resource_list *rl; - struct resource_list_entry *rle = NULL; - struct rman *rm; - int needactivate; + struct obio_softc *sc; + struct obio_device *od; + struct resource *rv; + struct resource_list *rl; + struct resource_list_entry *rle = NULL; + struct rman *rm; + int needactivate; sc = (struct obio_softc *)device_get_softc(dev); @@ -293,9 +292,9 @@ static int mbus_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - struct obio_device *od; - struct resource_list *rl; - struct resource_list_entry *rle; + struct obio_device *od; + struct resource_list *rl; + struct resource_list_entry *rle; if (device_get_parent(child) == dev) { od = (struct obio_device *)device_get_ivars(child); |