Date: Sat, 23 Feb 2008 22:44:23 GMT From: Rafal Jaworowski <raj@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 136045 for review Message-ID: <200802232244.m1NMiN6W045399@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=136045 Change 136045 by raj@raj_mimi on 2008/02/23 22:43:26 Fix style issues in OCP, other easthetics. Affected files ... .. //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#5 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.h#2 edit Differences ... ==== //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#5 (text+ko) ==== @@ -80,29 +80,29 @@ * Bus interface definition */ static device_method_t ocpbus_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, ocpbus_probe), - DEVMETHOD(device_attach, ocpbus_attach), - DEVMETHOD(device_shutdown, ocpbus_shutdown), + /* Device interface */ + DEVMETHOD(device_probe, ocpbus_probe), + DEVMETHOD(device_attach, ocpbus_attach), + DEVMETHOD(device_shutdown, ocpbus_shutdown), - /* Bus interface */ - DEVMETHOD(bus_print_child, ocpbus_print_child), - DEVMETHOD(bus_read_ivar, ocpbus_read_ivar), - DEVMETHOD(bus_setup_intr, ocpbus_setup_intr), - DEVMETHOD(bus_teardown_intr, ocpbus_teardown_intr), + /* Bus interface */ + DEVMETHOD(bus_print_child, ocpbus_print_child), + DEVMETHOD(bus_read_ivar, ocpbus_read_ivar), + DEVMETHOD(bus_setup_intr, ocpbus_setup_intr), + DEVMETHOD(bus_teardown_intr, ocpbus_teardown_intr), - DEVMETHOD(bus_get_resource, ocpbus_get_resource), - DEVMETHOD(bus_alloc_resource, ocpbus_alloc_resource), - DEVMETHOD(bus_release_resource, ocpbus_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_get_resource, ocpbus_get_resource), + DEVMETHOD(bus_alloc_resource, ocpbus_alloc_resource), + DEVMETHOD(bus_release_resource, ocpbus_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - { 0, 0 } + { 0, 0 } }; static driver_t ocpbus_driver = { - "ocpbus", - ocpbus_methods, + "ocpbus", + ocpbus_methods, sizeof(struct ocpbus_softc) }; @@ -206,8 +206,7 @@ static int ocpbus_probe (device_t dev) { - - device_set_desc(dev, "on-chip peripheral bus"); + device_set_desc(dev, "On-Chip Peripherals bus"); return (BUS_PROBE_DEFAULT); } @@ -245,12 +244,13 @@ sc->sc_irq.rm_end = end; sc->sc_irq.rm_type = RMAN_ARRAY; sc->sc_irq.rm_descr = "Interrupt request lines"; - if (rman_init(&sc->sc_irq) || rman_manage_region(&sc->sc_irq, start, end)) + if (rman_init(&sc->sc_irq) || + rman_manage_region(&sc->sc_irq, start, end)) panic("ocpbus_attach IRQ rman"); /* Set up I/O mem rman */ sc->sc_mem.rm_type = RMAN_ARRAY; - sc->sc_mem.rm_descr = "OCPBus Device Memory"; + sc->sc_mem.rm_descr = "OCPBus Device Memory"; error = rman_init(&sc->sc_mem); if (error) { device_printf(dev, "rman_init() failed. error = %d\n", error); @@ -284,10 +284,9 @@ static int ocpbus_shutdown(device_t dev) { - return(0); + return(0); } - struct ocp_resource { int sr_devtype; int sr_unit; @@ -300,11 +299,11 @@ const struct ocp_resource mpc8555_resources[] = { {OCPBUS_DEVTYPE_PIC, 0, SYS_RES_MEMORY, 0, OCPE500_OPENPIC_OFF, OCPE500_OPENPIC_SIZE}, - + {OCPBUS_DEVTYPE_QUICC, 0, SYS_RES_MEMORY, 0, OCPE500_QUICC_OFF, OCPE500_QUICC_SIZE}, {OCPBUS_DEVTYPE_QUICC, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(30), 1}, - + {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_MEMORY, 0, OCPE500_TSEC0_OFF, OCPE500_TSEC_SIZE}, {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(13), 1}, @@ -325,14 +324,14 @@ {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 0, PIC_IRQ_INT(21), 1}, {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 1, PIC_IRQ_INT(22), 1}, {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 2, PIC_IRQ_INT(23), 1}, - + {OCPBUS_DEVTYPE_UART, 0, SYS_RES_MEMORY, 0, OCPE500_UART0_OFF, OCPE500_UART_SIZE}, {OCPBUS_DEVTYPE_UART, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(26), 1}, {OCPBUS_DEVTYPE_UART, 1, SYS_RES_MEMORY, 0, OCPE500_UART1_OFF, OCPE500_UART_SIZE}, {OCPBUS_DEVTYPE_UART, 1, SYS_RES_IRQ, 0, PIC_IRQ_INT(26), 1}, - + {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 0, OCPE500_PCI0_OFF, OCPE500_PCI_SIZE}, {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI0}, @@ -343,18 +342,18 @@ {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI1}, {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 0, OCPE500_PCI2_OFF, OCPE500_PCI_SIZE}, - {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI2}, - {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI2}, - + {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 0, OCPE500_LBC_OFF, OCPE500_LBC_SIZE}, {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_LBC}, {OCPBUS_DEVTYPE_I2C, 0, SYS_RES_MEMORY, 0, OCPE500_I2C0_OFF, - OCPE500_I2C_SIZE}, + OCPE500_I2C_SIZE}, {OCPBUS_DEVTYPE_I2C, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(27), 1}, {OCPBUS_DEVTYPE_I2C, 1, SYS_RES_MEMORY, 0, OCPE500_I2C1_OFF, - OCPE500_I2C_SIZE}, + OCPE500_I2C_SIZE}, {OCPBUS_DEVTYPE_I2C, 1, SYS_RES_IRQ, 0, PIC_IRQ_INT(27), 1}, {0} @@ -456,7 +455,7 @@ rman_set_bustag(rv, &bs_be_tag); rman_set_bushandle(rv, rman_get_start(rv)); - return (rv); + return (rv); } static int @@ -542,7 +541,6 @@ ocpbus_release_resource(device_t dev, device_t child, int type, int rid, struct resource *res) { - return (rman_release_resource(res)); } @@ -550,7 +548,7 @@ ocpbus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filter, driver_intr_t *ihand, void *arg, void **cookiep) { - int error; + int error; if (res == NULL) panic("ocpbus_setup_intr: NULL irq resource!"); ==== //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #ifndef _MACHINE_OCPE500_H_ #define _MACHINE_OCPE500_H_ - + /* * Local access registers. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802232244.m1NMiN6W045399>