Date: Tue, 1 Sep 2020 21:43:05 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365123 - in head/sys/dev/bhnd: . bcma bhndb cores/chipc cores/chipc/pwrctl cores/pci cores/pcie2 cores/pmu cores/usb nvram siba Message-ID: <202009012143.081Lh5v0039437@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Tue Sep 1 21:43:05 2020 New Revision: 365123 URL: https://svnweb.freebsd.org/changeset/base/365123 Log: bhnd: clean up empty lines in .c and .h files Modified: head/sys/dev/bhnd/bcma/bcma.c head/sys/dev/bhnd/bcma/bcma_bhndb.c head/sys/dev/bhnd/bcma/bcma_dmp.h head/sys/dev/bhnd/bcma/bcma_erom.c head/sys/dev/bhnd/bcma/bcma_eromreg.h head/sys/dev/bhnd/bcma/bcma_subr.c head/sys/dev/bhnd/bcma/bcmavar.h head/sys/dev/bhnd/bhnd.c head/sys/dev/bhnd/bhnd.h head/sys/dev/bhnd/bhnd_debug.h head/sys/dev/bhnd/bhnd_erom.c head/sys/dev/bhnd/bhnd_erom.h head/sys/dev/bhnd/bhnd_eromvar.h head/sys/dev/bhnd/bhnd_ids.h head/sys/dev/bhnd/bhnd_match.h head/sys/dev/bhnd/bhnd_private.h head/sys/dev/bhnd/bhnd_subr.c head/sys/dev/bhnd/bhnd_types.h head/sys/dev/bhnd/bhndb/bhnd_bhndb.c head/sys/dev/bhnd/bhndb/bhndb.c head/sys/dev/bhnd/bhndb/bhndb.h head/sys/dev/bhnd/bhndb/bhndb_hwdata.h head/sys/dev/bhnd/bhndb/bhndb_pci.c head/sys/dev/bhnd/bhndb/bhndb_pci_hwdata.c head/sys/dev/bhnd/bhndb/bhndb_pci_hwdata.h head/sys/dev/bhnd/bhndb/bhndb_pci_sprom.c head/sys/dev/bhnd/bhndb/bhndb_pcireg.h head/sys/dev/bhnd/bhndb/bhndb_private.h head/sys/dev/bhnd/bhndb/bhndb_subr.c head/sys/dev/bhnd/cores/chipc/chipc.c head/sys/dev/bhnd/cores/chipc/chipc_cfi.c head/sys/dev/bhnd/cores/chipc/chipc_gpio.c head/sys/dev/bhnd/cores/chipc/chipc_subr.c head/sys/dev/bhnd/cores/chipc/chipcreg.h head/sys/dev/bhnd/cores/chipc/chipcvar.h head/sys/dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl.c head/sys/dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c head/sys/dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctlvar.h head/sys/dev/bhnd/cores/pci/bhnd_pci.c head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c head/sys/dev/bhnd/cores/pci/bhnd_pci_hostbvar.h head/sys/dev/bhnd/cores/pci/bhnd_pcireg.h head/sys/dev/bhnd/cores/pci/bhnd_pcivar.h head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostbvar.h head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_reg.h head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_var.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu.c head/sys/dev/bhnd/cores/pmu/bhnd_pmu.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c head/sys/dev/bhnd/cores/pmu/bhnd_pmu_private.h head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c head/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h head/sys/dev/bhnd/cores/usb/bhnd_ehci.c head/sys/dev/bhnd/cores/usb/bhnd_usb.c head/sys/dev/bhnd/nvram/bhnd_nvram.h head/sys/dev/bhnd/nvram/bhnd_nvram_data.c head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcm.c head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcmvar.h head/sys/dev/bhnd/nvram/bhnd_nvram_data_btxt.c head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom_subr.c head/sys/dev/bhnd/nvram/bhnd_nvram_data_spromvar.h head/sys/dev/bhnd/nvram/bhnd_nvram_data_tlv.c head/sys/dev/bhnd/nvram/bhnd_nvram_io.c head/sys/dev/bhnd/nvram/bhnd_nvram_iobuf.c head/sys/dev/bhnd/nvram/bhnd_nvram_ioptr.c head/sys/dev/bhnd/nvram/bhnd_nvram_iores.c head/sys/dev/bhnd/nvram/bhnd_nvram_store.c head/sys/dev/bhnd/nvram/bhnd_nvram_subr.c head/sys/dev/bhnd/nvram/bhnd_nvram_value.c head/sys/dev/bhnd/nvram/bhnd_nvram_value.h head/sys/dev/bhnd/nvram/bhnd_nvram_value_fmts.c head/sys/dev/bhnd/nvram/bhnd_nvram_value_prf.c head/sys/dev/bhnd/nvram/bhnd_nvram_value_subr.c head/sys/dev/bhnd/nvram/bhnd_sprom.c head/sys/dev/bhnd/siba/siba.c head/sys/dev/bhnd/siba/siba_bhndb.c head/sys/dev/bhnd/siba/siba_erom.c head/sys/dev/bhnd/siba/siba_subr.c head/sys/dev/bhnd/siba/sibareg.h head/sys/dev/bhnd/siba/sibavar.h Modified: head/sys/dev/bhnd/bcma/bcma.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bcma/bcma.c Tue Sep 1 21:43:05 2020 (r365123) @@ -140,10 +140,10 @@ bcma_read_ivar(device_t dev, device_t child, int index { const struct bcma_devinfo *dinfo; const struct bhnd_core_info *ci; - + dinfo = device_get_ivars(child); ci = &dinfo->corecfg->core_info; - + switch (index) { case BHND_IVAR_VENDOR: *result = ci->vendor; @@ -500,7 +500,7 @@ bcma_get_region_count(device_t dev, device_t child, bh dinfo = device_get_ivars(child); ports = bcma_corecfg_get_port_list(dinfo->corecfg, type); - + STAILQ_FOREACH(port, ports, sp_link) { if (port->sp_num == port_num) return (port->sp_num_maps); @@ -518,7 +518,7 @@ bcma_get_port_rid(device_t dev, device_t child, bhnd_p struct bcma_map *map; struct bcma_sport_list *ports; struct bcma_sport *port; - + dinfo = device_get_ivars(child); ports = bcma_corecfg_get_port_list(dinfo->corecfg, port_type); @@ -584,7 +584,7 @@ bcma_get_region_addr(device_t dev, device_t child, bhn struct bcma_map *map; struct bcma_sport_list *ports; struct bcma_sport *port; - + dinfo = device_get_ivars(child); ports = bcma_corecfg_get_port_list(dinfo->corecfg, port_type); @@ -710,7 +710,7 @@ bcma_add_children(device_t bus) /* EOF while parsing cores is expected */ if (error == ENOENT) error = 0; - + cleanup: bhnd_erom_free(erom); @@ -723,13 +723,12 @@ cleanup: return (error); } - static device_method_t bcma_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bcma_probe), DEVMETHOD(device_attach, bcma_attach), DEVMETHOD(device_detach, bcma_detach), - + /* Bus interface */ DEVMETHOD(bus_add_child, bcma_add_child), DEVMETHOD(bus_child_deleted, bcma_child_deleted), Modified: head/sys/dev/bhnd/bcma/bcma_bhndb.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_bhndb.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bcma/bcma_bhndb.c Tue Sep 1 21:43:05 2020 (r365123) @@ -99,7 +99,7 @@ bcma_bhndb_suspend_child(device_t dev, device_t child) if (device_get_parent(child) != dev) BUS_SUSPEND_CHILD(device_get_parent(dev), child); - + if (device_is_suspended(child)) return (EBUSY); @@ -113,7 +113,7 @@ bcma_bhndb_suspend_child(device_t dev, device_t child) if (dinfo->res_agent != NULL) BHNDB_SUSPEND_RESOURCE(device_get_parent(dev), dev, SYS_RES_MEMORY, dinfo->res_agent->res); - + return (0); } @@ -169,7 +169,7 @@ DEFINE_CLASS_2(bhnd, bcma_bhndb_driver, bcma_bhndb_met sizeof(struct bcma_softc), bhnd_bhndb_driver, bcma_driver); DRIVER_MODULE(bcma_bhndb, bhndb, bcma_bhndb_driver, bhnd_devclass, NULL, NULL); - + MODULE_VERSION(bcma_bhndb, 1); MODULE_DEPEND(bcma_bhndb, bcma, 1, 1, 1); MODULE_DEPEND(bcma_bhndb, bhnd, 1, 1, 1); Modified: head/sys/dev/bhnd/bcma/bcma_dmp.h ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_dmp.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bcma/bcma_dmp.h Tue Sep 1 21:43:05 2020 (r365123) @@ -219,7 +219,6 @@ #define BCMA_DMP_COMPONENTID2 0xff8 #define BCMA_DMP_COMPONENTID3 0xffc - /* OOBSEL(IN|OUT) */ #define BCMA_DMP_OOBSEL_MASK 0xFF /**< OOB selector mask */ #define BCMA_DMP_OOBSEL_EN (1<<7) /**< OOB selector enable bit */ Modified: head/sys/dev/bhnd/bcma/bcma_erom.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_erom.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bcma/bcma_erom.c Tue Sep 1 21:43:05 2020 (r365123) @@ -79,7 +79,6 @@ static int bcma_erom_seek_next(struct bcma_erom *ero static int bcma_erom_region_to_port_type(struct bcma_erom *erom, uint8_t region_type, bhnd_port_type *port_type); - static int bcma_erom_peek32(struct bcma_erom *erom, uint32_t *entry); @@ -302,7 +301,7 @@ bcma_erom_lookup_core_addr(bhnd_erom_t *erom, const st /* Otherwise, seek to next block of region records */ while (1) { uint8_t next_type, next_port; - + if ((error = bcma_erom_skip_sport_region(sc))) return (error); @@ -676,7 +675,7 @@ bcma_erom_seek_matching_core(struct bcma_erom *sc, /* Save the core offset */ core_offset = bcma_erom_tell(sc); - + /* Parse the core */ if ((error = bcma_erom_parse_core(sc, &ec))) return (error); @@ -744,11 +743,11 @@ bcma_erom_parse_core(struct bcma_erom *erom, struct bc /* Parse CoreDescA */ if ((error = bcma_erom_read32(erom, &entry))) return (error); - + /* Handle EOF */ if (entry == BCMA_EROM_TABLE_EOF) return (ENOENT); - + if (!BCMA_EROM_ENTRY_IS(entry, CORE)) { EROM_LOG(erom, "Unexpected EROM entry 0x%x (type=%s)\n", entry, bcma_erom_entry_type_name(entry)); @@ -758,7 +757,7 @@ bcma_erom_parse_core(struct bcma_erom *erom, struct bc core->vendor = BCMA_EROM_GET_ATTR(entry, COREA_DESIGNER); core->device = BCMA_EROM_GET_ATTR(entry, COREA_ID); - + /* Parse CoreDescB */ if ((error = bcma_erom_read32(erom, &entry))) return (error); @@ -794,7 +793,7 @@ bcma_erom_parse_mport(struct bcma_erom *erom, struct b /* Parse the master port descriptor */ if ((error = bcma_erom_read32(erom, &entry))) return (error); - + if (!BCMA_EROM_ENTRY_IS(entry, MPORT)) return (EINVAL); @@ -957,7 +956,7 @@ bcma_erom_corecfg_fill_port_regions(struct bcma_erom * /* Fetch the list to be populated */ sports = bcma_corecfg_get_port_list(corecfg, port_type); - + /* Allocate a new port descriptor */ sport = bcma_alloc_sport(port_num, port_type); if (sport == NULL) @@ -1109,7 +1108,7 @@ bcma_erom_next_corecfg(struct bcma_erom *erom, struct core.device, core.rev); if (cfg == NULL) return (ENOMEM); - + /* These are 5-bit values in the EROM table, and should never be able * to overflow BCMA_PID_MAX. */ KASSERT(core.num_mport <= BCMA_PID_MAX, ("unsupported mport count")); @@ -1135,7 +1134,7 @@ bcma_erom_next_corecfg(struct bcma_erom *erom, struct for (uint8_t i = 0; i < core.num_mport; i++) { struct bcma_mport *mport; struct bcma_erom_mport mpd; - + /* Parse the master port descriptor */ error = bcma_erom_parse_mport(erom, &mpd); if (error) @@ -1154,7 +1153,6 @@ bcma_erom_next_corecfg(struct bcma_erom *erom, struct /* Update dinfo */ STAILQ_INSERT_TAIL(&cfg->master_ports, mport, mp_link); } - /* * Determine whether this is a bridge device; if so, we can @@ -1184,7 +1182,7 @@ bcma_erom_next_corecfg(struct bcma_erom *erom, struct cfg->num_bridge_ports = 0; } } - + /* Device/bridge port descriptors */ for (uint8_t sp_num = 0; sp_num < core.num_dport; sp_num++) { error = bcma_erom_corecfg_fill_port_regions(erom, cfg, sp_num, @@ -1203,7 +1201,6 @@ bcma_erom_next_corecfg(struct bcma_erom *erom, struct goto failed; } - /* Wrapper (aka device management) descriptors (for slave ports). */ for (uint8_t i = 0; i < core.num_swrap; i++) { /* Slave wrapper ports are not numbered distinctly from master @@ -1250,7 +1247,7 @@ bcma_erom_next_corecfg(struct bcma_erom *erom, struct *result = cfg; return (0); - + failed: if (cfg != NULL) bcma_free_corecfg(cfg); Modified: head/sys/dev/bhnd/bcma/bcma_eromreg.h ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_eromreg.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bcma/bcma_eromreg.h Tue Sep 1 21:43:05 2020 (r365123) @@ -105,7 +105,6 @@ #define BCMA_EROM_MPORT_ID_MASK 0x000000F0 /* AXI master ID (unique per master). */ #define BCMA_EROM_MPORT_ID_SHIFT 4 - /* EROM Slave Port MMIO Region Descriptor */ #define BCMA_EROM_REGION_BASE_MASK 0xFFFFF000 /* region base address */ #define BCMA_EROM_REGION_BASE_SHIFT 0 Modified: head/sys/dev/bhnd/bcma/bcma_subr.c ============================================================================== --- head/sys/dev/bhnd/bcma/bcma_subr.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bcma/bcma_subr.c Tue Sep 1 21:43:05 2020 (r365123) @@ -81,7 +81,7 @@ bcma_alloc_corecfg(u_int core_index, int core_unit, ui .core_idx = core_index, .unit = core_unit }; - + STAILQ_INIT(&cfg->master_ports); cfg->num_master_ports = 0; @@ -111,7 +111,7 @@ bcma_free_corecfg(struct bcma_corecfg *corecfg) STAILQ_FOREACH_SAFE(mport, &corecfg->master_ports, mp_link, mnext) { free(mport, M_BHND); } - + STAILQ_FOREACH_SAFE(sport, &corecfg->dev_ports, sp_link, snext) { bcma_free_sport(sport); } @@ -119,7 +119,7 @@ bcma_free_corecfg(struct bcma_corecfg *corecfg) STAILQ_FOREACH_SAFE(sport, &corecfg->bridge_ports, sp_link, snext) { bcma_free_sport(sport); } - + STAILQ_FOREACH_SAFE(sport, &corecfg->wrapper_ports, sp_link, snext) { bcma_free_sport(sport); } @@ -198,8 +198,6 @@ bcma_dinfo_init_port_resource_info(device_t bus, struc } } - - /** * Allocate the per-core agent register block for a device info structure. * @@ -297,7 +295,7 @@ bcma_dinfo_init_intrs(device_t bus, device_t child, if (dinfo->num_intrs == UINT_MAX) return (ENOMEM); - + selout = bhnd_bus_read_4(dinfo->res_agent, BCMA_DMP_OOBSELOUT( BCMA_OOB_BANK_INTR, sel)); @@ -330,7 +328,7 @@ struct bcma_devinfo * bcma_alloc_dinfo(device_t bus) { struct bcma_devinfo *dinfo; - + dinfo = malloc(sizeof(struct bcma_devinfo), M_BHND, M_NOWAIT|M_ZERO); if (dinfo == NULL) return (NULL); @@ -406,7 +404,7 @@ bcma_init_dinfo(device_t bus, device_t child, struct b } intr->i_mapped = true; - + /* Add to resource list */ intr->i_rid = resource_list_add_next(&dinfo->resources, SYS_RES_IRQ, intr->i_irq, intr->i_irq, 1); @@ -459,7 +457,6 @@ bcma_free_dinfo(device_t bus, device_t child, struct b free(dinfo, M_BHND); } - /** * Allocate and initialize a new interrupt descriptor. * @@ -517,11 +514,11 @@ struct bcma_sport * bcma_alloc_sport(bcma_pid_t port_num, bhnd_port_type port_type) { struct bcma_sport *sport; - + sport = malloc(sizeof(struct bcma_sport), M_BHND, M_NOWAIT); if (sport == NULL) return NULL; - + sport->sp_num = port_num; sport->sp_type = port_type; sport->sp_num_maps = 0; @@ -545,7 +542,6 @@ bcma_free_sport(struct bcma_sport *sport) { free(sport, M_BHND); } - /** * Given a bcma(4) child's device info, spin waiting for the device's DMP Modified: head/sys/dev/bhnd/bcma/bcmavar.h ============================================================================== --- head/sys/dev/bhnd/bcma/bcmavar.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bcma/bcmavar.h Tue Sep 1 21:43:05 2020 (r365123) @@ -62,7 +62,6 @@ #define BCMA_DINFO_COREIDX(_dinfo) \ ((_dinfo)->corecfg->core_info.core_idx) - /** BCMA port identifier. */ typedef u_int bcma_pid_t; #define BCMA_PID_MAX UINT_MAX /**< Maximum bcma_pid_t value */ @@ -165,10 +164,10 @@ struct bcma_corecfg { u_long num_dev_ports; /**< number of device slave port descriptors. */ struct bcma_sport_list dev_ports; /**< device port descriptors */ - + u_long num_bridge_ports; /**< number of bridge slave port descriptors. */ struct bcma_sport_list bridge_ports; /**< bridge port descriptors */ - + u_long num_wrapper_ports; /**< number of wrapper slave port descriptors. */ struct bcma_sport_list wrapper_ports; /**< wrapper port descriptors */ }; @@ -189,7 +188,6 @@ struct bcma_devinfo { void *pmu_info; /**< Bus-managed PMU state, or NULL */ }; - /** BMCA per-instance state */ struct bcma_softc { Modified: head/sys/dev/bhnd/bhnd.c ============================================================================== --- head/sys/dev/bhnd/bhnd.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd.c Tue Sep 1 21:43:05 2020 (r365123) @@ -90,7 +90,6 @@ static const struct bhnd_nomatch { { BHND_MFGID_ARM, BHND_COREID_PL301, true }, { BHND_MFGID_ARM, BHND_COREID_APB_BRIDGE, true }, { BHND_MFGID_ARM, BHND_COREID_AXI_UNMAPPED, false }, - { BHND_MFGID_INVALID, BHND_COREID_INVALID, false } }; @@ -491,7 +490,7 @@ bhnd_generic_release_pmu(device_t dev, device_t child) device_t pmu_dev; GIANT_REQUIRED; /* for newbus */ - + sc = device_get_softc(dev); if (device_get_parent(child) != dev) @@ -756,7 +755,6 @@ bhnd_generic_release_ext_rsrc(device_t dev, device_t c if ((clkctl = bhnd_get_pmu_info(child)) == NULL) panic("no active PMU allocation"); - BHND_ASSERT_CLKCTL_AVAIL(clkctl); sc = device_get_softc(dev); @@ -844,8 +842,7 @@ bhnd_generic_print_child(device_t dev, device_t child) retval += bus_print_child_header(dev, child); rl = BUS_GET_RESOURCE_LIST(dev, child); - - + if (rl != NULL) { retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#jx"); @@ -889,7 +886,7 @@ bhnd_generic_probe_nomatch(device_t dev, device_t chil report = true; break; } - + if (!report) return; @@ -935,13 +932,12 @@ bhnd_child_location_str(device_t dev, device_t child, { bhnd_addr_t addr; bhnd_size_t size; - + if (device_get_parent(child) != dev) { return (BUS_CHILD_LOCATION_STR(device_get_parent(dev), child, buf, buflen)); } - if (bhnd_get_region_addr(child, BHND_PORT_DEVICE, 0, 0, &addr, &size)) { /* No device default port/region */ if (buflen > 0) @@ -1010,7 +1006,6 @@ bhnd_generic_resume_child(device_t dev, device_t child return bus_generic_resume_child(dev, child); } - /** * Default bhnd(4) bus driver implementation of BUS_SETUP_INTR(). * @@ -1176,7 +1171,7 @@ static device_method_t bhnd_methods[] = { DEVMETHOD(bhnd_bus_write_multi_1, bhnd_write_multi_1), DEVMETHOD(bhnd_bus_write_multi_2, bhnd_write_multi_2), DEVMETHOD(bhnd_bus_write_multi_4, bhnd_write_multi_4), - + DEVMETHOD(bhnd_bus_read_multi_stream_1, bhnd_read_multi_stream_1), DEVMETHOD(bhnd_bus_read_multi_stream_2, bhnd_read_multi_stream_2), DEVMETHOD(bhnd_bus_read_multi_stream_4, bhnd_read_multi_stream_4), Modified: head/sys/dev/bhnd/bhnd.h ============================================================================== --- head/sys/dev/bhnd/bhnd.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd.h Tue Sep 1 21:43:05 2020 (r365123) @@ -108,7 +108,6 @@ enum { }; - /** * Per-core IOCTL flags common to all bhnd(4) cores. */ @@ -207,7 +206,6 @@ struct bhnd_board_info { uint32_t board_flags3; /**< Board flags 3 (see BHND_BFL3_*) */ }; - /** * Chip Identification * @@ -307,7 +305,6 @@ struct bhnd_dma_translation { */ uint32_t flags; }; - #define BHND_DMA_TRANSLATION_TABLE_END { 0, 0, 0, 0 } #define BHND_DMA_IS_TRANSLATION_TABLE_END(_dt) \ @@ -377,7 +374,6 @@ struct bhnd_device_quirk { #define BHND_BOARD_QUIRK(_board, _flags) \ {{ BHND_MATCH_BOARD_TYPE(_board) }, \ (_flags) } - #define BHND_DEVICE_QUIRK_END { { BHND_MATCH_ANY }, 0 } #define BHND_DEVICE_QUIRK_IS_END(_q) \ (((_q)->desc.m.match_flags == 0) && (_q)->quirks == 0) @@ -409,7 +405,6 @@ struct bhnd_device { #define BHND_DEVICE(_vendor, _device, _desc, _quirks, ...) \ _BHND_DEVICE(_vendor, _device, _desc, _quirks, \ ## __VA_ARGS__, 0) - #define BHND_DEVICE_END { { BHND_MATCH_ANY }, NULL, NULL, 0 } #define BHND_DEVICE_IS_END(_d) \ (BHND_MATCH_IS_ANY(&(_d)->core) && (_d)->desc == NULL) @@ -764,7 +759,6 @@ bhnd_get_chipid(device_t dev) { return (BHND_BUS_GET_CHIPID(device_get_parent(dev), dev)); }; - /** * Read the current value of a bhnd(4) device's per-core I/O control register. * @@ -1309,7 +1303,6 @@ bhnd_alloc_resource(device_t dev, int type, int *rid, return BHND_BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, type, rid, start, end, count, flags); } - /** * Allocate a resource from a device's parent bhnd(4) bus, using the Modified: head/sys/dev/bhnd/bhnd_debug.h ============================================================================== --- head/sys/dev/bhnd/bhnd_debug.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_debug.h Tue Sep 1 21:43:05 2020 (r365123) @@ -108,7 +108,6 @@ } while(0); #endif /* BHND_LOGGING > BHND_INFO_LEVEL */ - #define _BHND_RAWPRINTFN printf( #define _BHND_DEVPRINTFN(dev) device_printf(dev, Modified: head/sys/dev/bhnd/bhnd_erom.c ============================================================================== --- head/sys/dev/bhnd/bhnd_erom.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_erom.c Tue Sep 1 21:43:05 2020 (r365123) @@ -312,7 +312,6 @@ bhnd_erom_read_chipid(struct bhnd_erom_io *eio, struct return (0); } - /** * Attempt to map @p size bytes at @p addr, replacing any existing * @p eio mapping. Modified: head/sys/dev/bhnd/bhnd_erom.h ============================================================================== --- head/sys/dev/bhnd/bhnd_erom.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_erom.h Tue Sep 1 21:43:05 2020 (r365123) @@ -90,7 +90,6 @@ struct bhnd_erom { KOBJ_FIELDS; }; - /** Number of additional bytes to reserve for statically allocated * bhnd_erom instances. */ #define BHND_EROM_STATIC_BYTES 64 Modified: head/sys/dev/bhnd/bhnd_eromvar.h ============================================================================== --- head/sys/dev/bhnd/bhnd_eromvar.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_eromvar.h Tue Sep 1 21:43:05 2020 (r365123) @@ -59,10 +59,8 @@ typedef uint32_t (bhnd_erom_io_read_t)(struct bhnd_ero /** @see bhnd_erom_io_fini() */ typedef void (bhnd_erom_io_fini_t)(struct bhnd_erom_io *eio); - int bhnd_erom_read_chipid(struct bhnd_erom_io *eio, struct bhnd_chipid *cid); - /** * Abstract EROM bus I/O support. Modified: head/sys/dev/bhnd/bhnd_ids.h ============================================================================== --- head/sys/dev/bhnd/bhnd_ids.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_ids.h Tue Sep 1 21:43:05 2020 (r365123) @@ -67,7 +67,6 @@ */ #define OCP_VENDOR_BCM 0x4243 /**< Broadcom OCP vendor id */ - /* PCI vendor IDs */ #define PCI_VENDOR_ASUSTEK 0x1043 #define PCI_VENDOR_EPIGRAM 0xfeda @@ -88,15 +87,12 @@ #define PCI_VENDOR_RICOH 0x1180 /* Ricoh */ #define PCI_VENDOR_JMICRON 0x197b - /* PCMCIA vendor IDs */ #define PCMCIA_VENDOR_BROADCOM 0x02d0 - /* SDIO vendor IDs */ #define SDIO_VENDOR_BROADCOM 0x00BF - /* USB dongle VID/PIDs */ #define USB_VID_BROADCOM 0x0a5c #define USB_PID_BCM4328 0xbd12 @@ -119,11 +115,9 @@ #define USB_PID_BCM_DNGL_BDC 0x0bdc /* BDC USB device controller IP? */ #define USB_PID_BCM_DNGL_JTAG 0x4a44 - /* HW USB BLOCK [CPULESS USB] PIDs */ #define USB_PID_CCM_HWUSB_43239 43239 - /* PCI Device IDs */ #define PCI_DEVID_BCM4210 0x1072 /* never used */ #define PCI_DEVID_BCM4230 0x1086 /* never used */ @@ -228,14 +222,12 @@ #define PCI_DEVID_PCIXX21_FLASHMEDIA0 0x8033 /* TI PCI xx21 Standard Host Controller */ #define PCI_DEVID_PCIXX21_SDIOH0 0x8034 /* TI PCI xx21 Standard Host Controller */ - /* PCI Subsystem Vendor IDs */ #define PCI_SUBVENDOR_BCM943228HMB 0x0607 #define PCI_SUBVENDOR_BCM94313HMGBL 0x0608 #define PCI_SUBVENDOR_BCM94313HMG 0x0609 #define PCI_SUBVENDOR_BCM943142HM 0x0611 - /* PCI Subsystem Device IDs */ #define PCI_SUBDEVID_BCM43143_D11N2G 0x4366 /* 43143 802.11n 2.4G device */ @@ -296,7 +288,6 @@ #define PCI_SUBDEVID_BCM_R5C822_SDIOH 0x0822 /* Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host */ #define PCI_SUBDEVID_BCM_JMICRON_SDIOH 0x2381 /* JMicron Standard SDIO Host Controller */ - /* Broadcom ChipCommon Chip IDs */ #define BHND_CHIPID_BCM4306 0x4306 /* 4306 chipcommon chipid */ #define BHND_CHIPID_BCM4311 0x4311 /* 4311 PCIe 802.11a/b/g */ @@ -381,7 +372,6 @@ #define BHND_CHIPID_BCM5357 0x5357 /* 5357 chipcommon chipid */ #define BHND_CHIPID_BCM53572 53572 /* 53572 chipcommon chipid */ - /* Broadcom ChipCommon Package IDs */ #define BHND_PKGID_BCM4303 2 /* 4303 package id */ #define BHND_PKGID_BCM4309 1 /* 4309 package id */ @@ -522,8 +512,6 @@ #define BHND_COREID_4706_GMAC 0x52d /* Gigabit MAC core */ #define BHND_COREID_AMEMC 0x52e /* DDR1/2 cadence/denali memory controller core */ - - /* ARM PrimeCell Peripherial IDs. These were derived from inspection of the * PrimeCell-compatible BCM4331 cores, but due to lack of documentation, the * surmised core name/description may be incorrect. */ @@ -593,7 +581,6 @@ */ #define BHND_BFL_EXTLNA_TX 0x20000000 /* Temp boardflag to indicate to */ - /* Boardflags2 */ #define BHND_BFL2_RXBB_INT_REG_DIS 0x00000001 /* Board has an external rxbb regulator */ #define BHND_BFL2_APLL_WAR 0x00000002 /* Flag to implement alternative A-band PLL settings */ @@ -642,7 +629,6 @@ #define BHND_BFL2_LNA1BYPFORTR2G 0x40000000 /* acphy, enable lna1 bypass for clip gain, 2g */ #define BHND_BFL2_LNA1BYPFORTR5G 0x80000000 /* acphy, enable lna1 bypass for clip gain, 5g */ - /* SROM 11 - 11ac boardflag definitions */ #define BHND_BFL_SROM11_BTCOEX 0x00000001 /* Board supports BTCOEX */ #define BHND_BFL_SROM11_WLAN_BT_SH_XTL 0x00000002 /* bluetooth and wlan share same crystal */ @@ -653,7 +639,6 @@ #define BHND_BFL2_SROM11_ANAPACTRL_2G 0x00100000 /* 2G ext PAs are ctrl-ed by analog PA ctrl lines */ #define BHND_BFL2_SROM11_ANAPACTRL_5G 0x00200000 /* 5G ext PAs are ctrl-ed by analog PA ctrl lines */ - /* Boardflags3 */ #define BHND_BFL3_FEMCTRL_SUB 0x00000007 /* acphy, subrevs of femctrl on top of srom_femctrl */ #define BHND_BFL3_RCAL_WAR 0x00000008 /* acphy, rcal war active on this board (4335a0) */ @@ -680,7 +665,6 @@ #define BHND_BFL3_EN_NONBRCM_TXBF 0x10000000 /* acphy, enable non-brcm TXBF */ #define BHND_BFL3_EN_P2PLINK_TXBF 0x20000000 /* acphy, enable TXBF in p2p links */ - /* board specific GPIO assignment, gpio 0-3 are also customer-configurable led */ #define BHND_GPIO_BOARD_BTC3W_IN 0x850 /* bit 4 is RF_ACTIVE, bit 6 is STATUS, bit 11 is PRI */ #define BHND_GPIO_BOARD_BTC3W_OUT 0x020 /* bit 5 is TX_CONF */ @@ -730,7 +714,6 @@ #define BHND_BOARD_BU2050 0x041f - #define BHND_BOARD_BCM94309G 0x0421 #define BHND_BOARD_BU4704 0x0423 @@ -738,7 +721,6 @@ #define BHND_BOARD_BCM94306PC 0x0425 /* pcmcia 3.3v 4306 card */ - #define BHND_BOARD_BCM94702MN 0x0428 /* BCM4702 1U CompactPCI Board */ @@ -761,8 +743,6 @@ /* 11a-only minipci */ #define BHND_BOARD_BCM94308MP 0x0430 - - #define BHND_BOARD_BU4712 0x0444 #define BHND_BOARD_BU4712SD 0x045d Modified: head/sys/dev/bhnd/bhnd_match.h ============================================================================== --- head/sys/dev/bhnd/bhnd_match.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_match.h Tue Sep 1 21:43:05 2020 (r365123) @@ -50,7 +50,7 @@ struct bhnd_hwrev_match { #define _BHND_COPY_MATCH_FIELD(_src, _name) \ .m.match._name = (_src)->m.match._name, \ ._name = (_src)->_name - + /* Set match field @p _name with @p _value */ #define _BHND_SET_MATCH_FIELD(_name, _value) \ .m.match._name = 1, ._name = _value @@ -112,7 +112,7 @@ struct bhnd_core_match { flags_unused:2; } match; } m; - + uint16_t core_vendor; /**< required JEP106 device vendor */ uint16_t core_id; /**< required core ID */ struct bhnd_hwrev_match core_rev; /**< matching core revisions. */ @@ -261,7 +261,6 @@ struct bhnd_board_match { #define BHND_MATCH_BOARD(_vend, _type) \ BHND_MATCH_BOARD_VENDOR(_vend), BHND_MATCH_BOARD_TYPE(_type) - /** * A bhnd(4) device match descriptor. * @@ -292,7 +291,7 @@ struct bhnd_device_match { flags_unused:15; } match; } m; - + uint16_t core_vendor; /**< required JEP106 device vendor */ uint16_t core_id; /**< required core ID */ struct bhnd_hwrev_match core_rev; /**< matching core revisions. */ Modified: head/sys/dev/bhnd/bhnd_private.h ============================================================================== --- head/sys/dev/bhnd/bhnd_private.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_private.h Tue Sep 1 21:43:05 2020 (r365123) @@ -96,7 +96,7 @@ struct bhnd_core_clkctl { #define BHND_CLKCTL_WRITE_4(_clkctl, _val) \ bhnd_bus_write_4((_clkctl)->cc_res, (_clkctl)->cc_res_offset, (_val)) - + #define BHND_CLKCTL_SET_4(_clkctl, _val, _mask) \ BHND_CLKCTL_WRITE_4((_clkctl), \ ((_val) & (_mask)) | (BHND_CLKCTL_READ_4(_clkctl) & ~(_mask))) Modified: head/sys/dev/bhnd/bhnd_subr.c ============================================================================== --- head/sys/dev/bhnd/bhnd_subr.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_subr.c Tue Sep 1 21:43:05 2020 (r365123) @@ -169,7 +169,6 @@ static const struct bhnd_core_desc { "PL368 Device Management Interface" }, { BHND_MFGID_ARM, BHND_PRIMEID_MWRAP, BHND_DEVCLASS_OTHER, "PL369 Device Management Interface" }, - { 0, 0, 0, NULL } }; @@ -276,7 +275,7 @@ bhnd_find_core_desc(uint16_t vendor, uint16_t device) return (&bhnd_core_descs[i]); } - + return (NULL); } @@ -290,7 +289,7 @@ const char * bhnd_find_core_name(uint16_t vendor, uint16_t device) { const struct bhnd_core_desc *desc; - + if ((desc = bhnd_find_core_desc(vendor, device)) == NULL) return ("unknown"); @@ -307,7 +306,7 @@ bhnd_devclass_t bhnd_find_core_class(uint16_t vendor, uint16_t device) { const struct bhnd_core_desc *desc; - + if ((desc = bhnd_find_core_desc(vendor, device)) == NULL) return (BHND_DEVCLASS_OTHER); @@ -654,7 +653,6 @@ bhnd_match_core(const struct bhnd_core_info *cores, u_ return (NULL); } - /** * Find the first core in @p cores with the given @p class. * @@ -676,7 +674,6 @@ bhnd_find_core(const struct bhnd_core_info *cores, u_i return bhnd_match_core(cores, num_cores, &md); } - /** * Create an equality match descriptor for @p core. * @@ -697,7 +694,6 @@ bhnd_core_get_match_desc(const struct bhnd_core_info * }); } - /** * Return true if the @p lhs is equal to @p rhs. * @@ -942,7 +938,7 @@ bhnd_device_lookup(device_t dev, const struct bhnd_dev /* hostb implies BHND_ATTACH_ADAPTER requirement */ if (dflags & BHND_DF_HOSTB) dflags |= BHND_DF_ADAPTER; - + if (dflags & BHND_DF_ADAPTER) if (attach_type != BHND_ATTACH_ADAPTER) continue; @@ -999,7 +995,6 @@ bhnd_device_quirks(device_t dev, const struct bhnd_dev return (quirks); } - /** * Allocate bhnd(4) resources defined in @p rs from a parent bus. * @@ -1444,7 +1439,6 @@ bhnd_nvram_getvar_int32(device_t dev, const char *name return (bhnd_nvram_getvar_int(dev, name, value, sizeof(*value))); } - /** * Read an NVRAM variable's array value. * @@ -1799,7 +1793,6 @@ bhnd_set_default_core_desc(device_t dev) bhnd_set_custom_core_desc(dev, bhnd_get_device_name(dev)); } - /** * Using the bhnd @p chip_id, populate the bhnd(4) bus @p dev's device * description. @@ -1843,7 +1836,7 @@ bhnd_set_default_bus_desc(device_t dev, const struct b } else { device_set_desc(dev, bus_name); } - + } /** @@ -2236,7 +2229,7 @@ bhnd_bus_generic_alloc_resource(device_t dev, device_t br = malloc(sizeof(struct bhnd_resource), M_BHND, M_NOWAIT); if (br == NULL) goto failed; - + br->direct = false; br->res = res; @@ -2248,7 +2241,7 @@ bhnd_bus_generic_alloc_resource(device_t dev, device_t } return (br); - + failed: if (res != NULL) BUS_RELEASE_RESOURCE(dev, child, type, *rid, res); @@ -2275,7 +2268,6 @@ bhnd_bus_generic_release_resource(device_t dev, device free(r, M_BHND); return (0); } - /** * Helper function for implementing BHND_BUS_ACTIVATE_RESOURCE(). Modified: head/sys/dev/bhnd/bhnd_types.h ============================================================================== --- head/sys/dev/bhnd/bhnd_types.h Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhnd_types.h Tue Sep 1 21:43:05 2020 (r365123) @@ -122,14 +122,14 @@ typedef enum { * acceptable. */ BHND_CLOCK_ILP = (1 << 1), - + /** * Active Low-Power (ALP). * * Low-latency register access and low-rate DMA. */ BHND_CLOCK_ALP = (1 << 2), - + /** * High Throughput (HT). * @@ -183,6 +183,5 @@ typedef uint64_t bhnd_addr_t; /** BHND bus size. */ typedef uint64_t bhnd_size_t; #define BHND_SIZE_MAX UINT64_MAX /**< Maximum bhnd_size_t value */ - #endif /* _BHND_BHND_TYPES_H_ */ Modified: head/sys/dev/bhnd/bhndb/bhnd_bhndb.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhnd_bhndb.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhndb/bhnd_bhndb.c Tue Sep 1 21:43:05 2020 (r365123) @@ -72,7 +72,6 @@ bhnd_bhndb_get_attach_type(device_t dev, device_t chil return (BHND_ATTACH_ADAPTER); } - static bool bhnd_bhndb_is_hw_disabled(device_t dev, device_t child) { @@ -81,7 +80,6 @@ bhnd_bhndb_is_hw_disabled(device_t dev, device_t child /* Delegate to parent bridge */ return (BHNDB_IS_CORE_DISABLED(device_get_parent(dev), dev, &core)); } - static device_t bhnd_bhndb_find_hostb_device(device_t dev) Modified: head/sys/dev/bhnd/bhndb/bhndb.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb.c Tue Sep 1 21:42:49 2020 (r365122) +++ head/sys/dev/bhnd/bhndb/bhndb.c Tue Sep 1 21:43:05 2020 (r365123) @@ -451,7 +451,7 @@ bhndb_init_region_cfg(struct bhndb_softc *sc, bhnd_ero direct_msg = prio >= prio_min ? "direct" : "indirect"; type_msg = region->static_regwin ? "static" : "dynamic"; - + device_printf(sc->dev, "region 0x%llx+0x%llx priority " "%u %s/%s", (unsigned long long) region->addr, @@ -649,7 +649,7 @@ bhndb_generic_detach(device_t dev) /* Clean up our driver state. */ bhndb_free_resources(sc->bus_res); - + BHNDB_LOCK_DESTROY(sc); return (0); @@ -690,7 +690,7 @@ bhndb_generic_resume(device_t dev) error = 0; for (size_t i = 0; i < bus_res->dwa_count; i++) { dwa = &bus_res->dw_alloc[i]; - + /* Skip regions that were not previously used */ if (bhndb_dw_is_free(bus_res, dwa) && dwa->target == 0x0) continue; @@ -858,7 +858,7 @@ bhndb_add_child(device_t dev, u_int order, const char { struct bhndb_devinfo *dinfo; device_t child; - + child = device_add_child_ordered(dev, order, name, unit); if (child == NULL) return (NULL); @@ -1016,7 +1016,7 @@ bhndb_alloc_resource(device_t dev, device_t child, int child); if (rv == NULL) return (NULL); - + rman_set_rid(rv, *rid); /* Activate */ @@ -1099,7 +1099,7 @@ bhndb_adjust_resource(device_t dev, device_t child, in struct rman *rm; rman_res_t mstart, mend; int error; - + sc = device_get_softc(dev); error = 0; @@ -1219,7 +1219,7 @@ bhndb_activate_static_region(struct bhndb_softc *sc, bridge_res = bhndb_host_resource_for_regwin(sc->bus_res->res, win); if (bridge_res == NULL) return (ENXIO); - + /* Calculate subregion offset within the parent resource */ parent_offset = r_start - region->addr; parent_offset += win->win_offset; @@ -1340,7 +1340,7 @@ bhndb_try_activate_resource(struct bhndb_softc *sc, de /* Only MMIO resources can be mapped via register windows */ KASSERT(type == SYS_RES_MEMORY, ("invalid type: %d", type)); - + r_start = rman_get_start(r); r_size = rman_get_size(r); @@ -1537,7 +1537,7 @@ bhndb_activate_bhnd_resource(device_t dev, device_t ch KASSERT(!r->direct, ("direct flag set on inactive resource")); - + KASSERT(!(rman_get_flags(r->res) & RF_ACTIVE), ("RF_ACTIVE set on inactive resource")); @@ -1769,7 +1769,7 @@ bhndb_io_resource(struct bhndb_softc *sc, bus_addr_t a (unsigned long long) addr, (unsigned long long) addr+size-1); } - + error = bhndb_dw_set_addr(sc->dev, sc->bus_res, dwa, addr, size); if (error) { @@ -2161,7 +2161,7 @@ bhndb_get_dma_translation(device_t dev, device_t child masked = (dwin->addr_mask | dwin->addrext_mask) & addr_mask; if (masked == 0) continue; - + /* Is this a better match? */ if (match == NULL || masked > match_addr_mask) { match = dwin; @@ -2264,7 +2264,7 @@ static device_method_t bhndb_methods[] = { DEVMETHOD(bhnd_bus_deregister_provider, bhnd_bus_generic_sr_deregister_provider), *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009012143.081Lh5v0039437>