/freebsd/sys/dev/bhnd/cores/chipc/ |
H A D | chipc_spi.h | 67 struct resource *sc_res; /**< SPI registers */ member 75 #define SPI_BARRIER_WRITE(sc) bus_barrier((sc)->sc_res, 0, 0, \ 77 #define SPI_BARRIER_READ(sc) bus_barrier((sc)->sc_res, 0, 0, \ 79 #define SPI_BARRIER_RW(sc) bus_barrier((sc)->sc_res, 0, 0, \ 83 #define SPI_WRITE(sc, reg, val) bus_write_4(sc->sc_res, (reg), (val)); 85 #define SPI_READ(sc, reg) bus_read_4(sc->sc_res, (reg))
|
H A D | chipc_spi.c | 87 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, in chipc_spi_attach() 89 if (sc->sc_res == NULL) { in chipc_spi_attach() 145 if (sc->sc_res != NULL) in chipc_spi_attach() 147 sc->sc_res); in chipc_spi_attach() 167 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); in chipc_spi_detach()
|
/freebsd/sys/powerpc/mpc85xx/ |
H A D | atpic.c | 56 struct resource *sc_res[2]; member 123 val = bus_read_1(sc->sc_res[icu], ofs); in atpic_read() 131 bus_write_1(sc->sc_res[icu], ofs, val); in atpic_write() 132 bus_barrier(sc->sc_res[icu], ofs, 2 - ofs, in atpic_write() 199 sc->sc_res[ATPIC_MASTER] = bus_alloc_resource_any(dev, SYS_RES_IOPORT, in atpic_isa_attach() 201 if (sc->sc_res[ATPIC_MASTER] == NULL) in atpic_isa_attach() 205 sc->sc_res[ATPIC_SLAVE] = bus_alloc_resource_any(dev, SYS_RES_IOPORT, in atpic_isa_attach() 207 if (sc->sc_res[ATPIC_SLAVE] == NULL) in atpic_isa_attach() 231 if (sc->sc_res[ATPIC_SLAVE] != NULL) in atpic_isa_attach() 233 sc->sc_rid[ATPIC_SLAVE], sc->sc_res[ATPIC_SLAV in atpic_isa_attach() [all...] |
H A D | pci_mpc85xx.c | 153 struct resource *sc_res; member 322 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, in fsl_pcib_attach() 324 if (sc->sc_res == NULL) { in fsl_pcib_attach() 328 sc->sc_bst = rman_get_bustag(sc->sc_res); in fsl_pcib_attach() 329 sc->sc_bsh = rman_get_bushandle(sc->sc_res); in fsl_pcib_attach() 332 ipreg = bus_read_4(sc->sc_res, REG_PEX_IP_BLK_REV1); in fsl_pcib_attach() 702 error = law_pci_target(sc->sc_res, &sc->sc_iomem_target, in fsl_pcib_decode_win()
|
/freebsd/sys/dev/hwpmc/ |
H A D | pmu_dmc620.c | 62 struct resource *sc_res[2]; member 69 #define RD4(sc, r) bus_read_4((sc)->sc_res[0], (r)) 70 #define WR4(sc, r, v) bus_write_4((sc)->sc_res[0], (r), (v)) 138 i = bus_alloc_resources(dev, pmu_dmc620_res_spec, sc->sc_res); in pmu_dmc620_acpi_attach() 158 if (sc->sc_res[1] != NULL && bus_setup_intr(dev, sc->sc_res[1], in pmu_dmc620_acpi_attach() 161 bus_release_resources(dev, pmu_dmc620_res_spec, sc->sc_res); in pmu_dmc620_acpi_attach() 176 if (sc->sc_res[1] != NULL) { in pmu_dmc620_acpi_detach() 177 bus_teardown_intr(dev, sc->sc_res[1], sc->sc_ih); in pmu_dmc620_acpi_detach() 179 bus_release_resources(dev, pmu_dmc620_res_spec, sc->sc_res); in pmu_dmc620_acpi_detach()
|
/freebsd/sys/arm/ti/omap4/ |
H A D | omap4_prcm_clks.c | 173 struct resource *sc_res; member 520 clk_mem_res = sc->sc_res; in omap4_clk_generic_activate() 586 clk_mem_res = sc->sc_res; in omap4_clk_generic_deactivate() 655 clk_mem_res = sc->sc_res; in omap4_clk_generic_accessible() 731 clk_mem_res = sc->sc_res; in omap4_clk_gptimer_set_source() 775 clk_mem_res = sc->sc_res; in omap4_clk_gptimer_get_source_freq() 824 clk_mem_res = sc->sc_res; in omap4_clk_hsmmc_set_source() 884 clk_mem_res = sc->sc_res; in omap4_clk_hsmmc_get_source_freq() 938 clksel = bus_read_4(sc->sc_res, CM_SYS_CLKSEL_OFFSET); in omap4_clk_get_sysclk_freq() 999 clksel = bus_read_4(sc->sc_res, CM_CLKSEL_DPLL_MPU); in omap4_clk_get_arm_fclk_freq() [all …]
|
/freebsd/sys/arm/freescale/imx/ |
H A D | imx_wdog.c | 57 struct resource *sc_res[2]; member 90 return (bus_read_2(sc->sc_res[MEMRES], offs)); in RD2() 97 bus_write_2(sc->sc_res[MEMRES], offs, val); in WR2() 164 imx_wdog_cpu_reset(BUS_SPACE_PHYSADDR(sc->sc_res[MEMRES], WDOG_CR_REG)); in imx_wdog_intr() 192 if (bus_alloc_resources(dev, imx_wdog_spec, sc->sc_res)) { in imx_wdog_attach() 207 bus_setup_intr(sc->sc_dev, sc->sc_res[IRQRES], in imx_wdog_attach()
|
H A D | imx_gpio.c | 118 struct resource *sc_res[3]; /* 1 x mem, 2 x IRQ */ member 824 if (bus_alloc_resources(dev, imx_gpio_spec, sc->sc_res)) { in imx51_gpio_attach() 826 bus_release_resources(dev, imx_gpio_spec, sc->sc_res); in imx51_gpio_attach() 831 sc->sc_iot = rman_get_bustag(sc->sc_res[0]); in imx51_gpio_attach() 832 sc->sc_ioh = rman_get_bushandle(sc->sc_res[0]); in imx51_gpio_attach() 839 if ((bus_setup_intr(dev, sc->sc_res[1 + irq], INTR_TYPE_CLK, in imx51_gpio_attach() 896 bus_teardown_intr(dev, sc->sc_res[irq + FIRST_IRQRES], in imx51_gpio_detach() 899 bus_release_resources(dev, imx_gpio_spec, sc->sc_res); in imx51_gpio_detach()
|
/freebsd/sys/dev/gem/ |
H A D | if_gem_pci.c | 171 if (bus_alloc_resources(dev, gem_pci_res_spec, sc->sc_res)) { in gem_pci_attach() 173 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res); in gem_pci_attach() 275 bus_read_region_1(sc->sc_res[GEM_RES_MEM], in gem_pci_attach() 295 if (bus_setup_intr(dev, sc->sc_res[GEM_RES_INTR], INTR_TYPE_NET | in gem_pci_attach() 305 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res); in gem_pci_attach() 315 bus_teardown_intr(dev, sc->sc_res[GEM_RES_INTR], sc->sc_ih); in gem_pci_detach() 318 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res); in gem_pci_detach()
|
H A D | if_gemvar.h | 118 struct resource *sc_res[2]; member 180 bus_barrier((sc)->sc_res[GEM_RES_MEM], (offs), (len), (flags)) 183 bus_read_ ## n((sc)->sc_res[GEM_RES_MEM], (offs)) 198 bus_write_ ## n((sc)->sc_res[GEM_RES_MEM], (offs), (v))
|
/freebsd/sys/dev/agp/ |
H A D | agp_i810.c | 206 struct resource *sc_res[2]; member 796 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL)); in agp_i810_dump_regs() 807 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL)); in agp_i830_dump_regs() 818 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL)); in agp_i855_dump_regs() 829 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL)); in agp_i915_dump_regs() 842 bus_read_4(sc->sc_res[0], AGP_I965_PGTBL_CTL2)); in agp_i965_dump_regs() 913 switch (bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL) & in agp_i915_get_stolen_size() 1098 pgetbl_ctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); in agp_i965_get_gtt_total_entries() 1135 pgetbl_ctl2 = bus_read_4(sc->sc_res[0], AGP_I965_PGTBL_CTL2); in agp_gen5_adjust_pgtbl_size() 1137 bus_write_4(sc->sc_res[ in agp_gen5_adjust_pgtbl_size() [all...] |
/freebsd/sys/dev/stge/ |
H A D | if_stgereg.h | 90 bus_write_4((_sc)->sc_res[0], (reg), (val)) 92 bus_write_2((_sc)->sc_res[0], (reg), (val)) 94 bus_write_1((_sc)->sc_res[0], (reg), (val)) 97 bus_read_4((_sc)->sc_res[0], (reg)) 99 bus_read_2((_sc)->sc_res[0], (reg)) 101 bus_read_1((_sc)->sc_res[0], (reg)) 104 bus_barrier((_sc)->sc_res[0], reg, length, flags) 634 struct resource *sc_res[2]; member
|
/freebsd/sys/dev/amdgpio/ |
H A D | amdgpio.c | 65 return (bus_read_4(sc->sc_res[0], off)); in amdgpio_read_4() 72 bus_write_4(sc->sc_res[0], off, val); in amdgpio_write_4() 125 if (sc->sc_res[0] == NULL) in amdgpio_valid_pin() 381 if (bus_alloc_resources(dev, amdgpio_spec, sc->sc_res)) { in amdgpio_attach() 386 sc->sc_bst = rman_get_bustag(sc->sc_res[0]); in amdgpio_attach() 387 sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]); in amdgpio_attach() 420 bus_release_resources(dev, amdgpio_spec, sc->sc_res); in amdgpio_attach() 437 bus_release_resources(dev, amdgpio_spec, sc->sc_res); in amdgpio_detach()
|
/freebsd/sys/arm64/arm64/ |
H A D | cmn600.c | 51 #define RD4(sc, r) bus_read_4((sc)->sc_res[0], (r)) 52 #define RD8(sc, r) bus_read_8((sc)->sc_res[0], (r)) 53 #define WR4(sc, r, v) bus_write_4((sc)->sc_res[0], (r), (v)) 54 #define WR8(sc, r, v) bus_write_8((sc)->sc_res[0], (r), (v)) 100 struct resource *sc_res[3]; member 687 i = bus_alloc_resources(dev, cmn600_res_spec, sc->sc_res); in cmn600_acpi_attach() 721 if (bus_setup_intr(dev, sc->sc_res[2], INTR_TYPE_MISC | INTR_MPSAFE, in cmn600_acpi_attach() 723 bus_release_resources(dev, cmn600_res_spec, sc->sc_res); in cmn600_acpi_attach() 728 if (bus_bind_intr(dev, sc->sc_res[2], cpu)) { in cmn600_acpi_attach() 729 bus_teardown_intr(dev, sc->sc_res[2], sc->sc_ih); in cmn600_acpi_attach() [all …]
|
/freebsd/sys/dev/cesa/ |
H A D | cesa.h | 92 bus_read_4((sc)->sc_res[RES_CESA_REGS], (reg)) 94 bus_write_4((sc)->sc_res[RES_CESA_REGS], (reg), (val)) 97 bus_read_4((sc)->sc_res[RES_TDMA_REGS], (reg)) 99 bus_write_4((sc)->sc_res[RES_TDMA_REGS], (reg), (val)) 226 struct resource *sc_res[RES_CESA_NUM]; member
|
/freebsd/sys/arm/allwinner/ |
H A D | a10_dmac.c | 72 struct resource * sc_res[2]; member 86 #define DMA_READ(sc, reg) bus_read_4((sc)->sc_res[0], (reg)) 87 #define DMA_WRITE(sc, reg, val) bus_write_4((sc)->sc_res[0], (reg), (val)) 118 if (bus_alloc_resources(dev, a10dmac_spec, sc->sc_res)) { in a10dmac_attach() 161 error = bus_setup_intr(dev, sc->sc_res[1], INTR_MPSAFE | INTR_TYPE_MISC, in a10dmac_attach() 165 bus_release_resources(dev, a10dmac_spec, sc->sc_res); in a10dmac_attach()
|
/freebsd/sys/dev/etherswitch/mtkswitch/ |
H A D | mtkswitchvar.h | 59 struct resource *sc_res; member 129 bus_read_4((_sc)->sc_res, (_reg)) 131 bus_write_4((_sc)->sc_res, (_reg), (_val))
|
/freebsd/sys/dev/cas/ |
H A D | if_casvar.h | 143 struct resource *sc_res[2]; member 201 bus_barrier((sc)->sc_res[CAS_RES_MEM], (offs), (len), (flags)) 204 bus_read_ ## n((sc)->sc_res[CAS_RES_MEM], (offs)) 210 bus_write_ ## n((sc)->sc_res[CAS_RES_MEM], (offs), (v))
|
/freebsd/sys/dev/cfi/ |
H A D | cfi_core.c | 206 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, in cfi_probe() 208 if (sc->sc_res == NULL) in cfi_probe() 211 sc->sc_tag = rman_get_bustag(sc->sc_res); in cfi_probe() 212 sc->sc_handle = rman_get_bushandle(sc->sc_res); in cfi_probe() 284 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); in cfi_probe() 304 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, in cfi_attach() 310 if (sc->sc_res == NULL) in cfi_attach() 313 sc->sc_tag = rman_get_bustag(sc->sc_res); in cfi_attach() 314 sc->sc_handle = rman_get_bushandle(sc->sc_res); in cfi_attach() 502 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); in cfi_detach()
|
/freebsd/sys/arm/broadcom/bcm2835/ |
H A D | bcm2835_gpio.c | 115 struct resource * sc_res[BCM_GPIO_IRQS + 1]; member 758 if (sc->sc_res[1] == NULL || sc->sc_res[2] == NULL) in bcm_gpio_intr_attach() 765 if (bus_setup_intr(dev, sc->sc_res[1], INTR_TYPE_MISC | INTR_MPSAFE, in bcm_gpio_intr_attach() 768 if (bus_setup_intr(dev, sc->sc_res[2], INTR_TYPE_MISC | INTR_MPSAFE, in bcm_gpio_intr_attach() 782 bus_teardown_intr(dev, sc->sc_res[1], sc->sc_intrhand[0]); in bcm_gpio_intr_detach() 784 bus_teardown_intr(dev, sc->sc_res[2], sc->sc_intrhand[1]); in bcm_gpio_intr_detach() 803 if (bus_alloc_resources(dev, bcm_gpio_res_spec, sc->sc_res) != 0) { in bcm_gpio_attach() 807 sc->sc_bst = rman_get_bustag(sc->sc_res[0]); in bcm_gpio_attach() 808 sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]); in bcm_gpio_attach() 851 bus_release_resources(dev, bcm_gpio_res_spec, sc->sc_res); in bcm_gpio_attach()
|
/freebsd/sys/arm/ti/ |
H A D | ti_pinmux.c | 422 if (bus_alloc_resources(dev, ti_pinmux_res_spec, sc->sc_res)) { in ti_pinmux_attach() 427 sc->sc_bst = rman_get_bustag(sc->sc_res[0]); in ti_pinmux_attach() 428 sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]); in ti_pinmux_attach()
|
H A D | ti_scm.h | 47 struct resource * sc_res[4]; member
|
/freebsd/sys/arm64/rockchip/ |
H A D | rk_gpio.c | 97 struct resource *sc_res[2]; member 273 if (bus_alloc_resources(dev, rk_gpio_spec, sc->sc_res)) { in rk_gpio_attach() 275 bus_release_resources(dev, rk_gpio_spec, sc->sc_res); in rk_gpio_attach() 280 sc->sc_bst = rman_get_bustag(sc->sc_res[0]); in rk_gpio_attach() 281 sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]); in rk_gpio_attach() 296 if ((err = bus_setup_intr(dev, sc->sc_res[1], in rk_gpio_attach() 392 bus_release_resources(dev, rk_gpio_spec, sc->sc_res); in rk_gpio_detach()
|
/freebsd/sys/dev/safexcel/ |
H A D | safexcel_var.h | 407 struct resource *sc_res; member 422 #define SAFEXCEL_WRITE(sc, off, val) bus_write_4((sc)->sc_res, (off), (val)) 423 #define SAFEXCEL_READ(sc, off) bus_read_4((sc)->sc_res, (off))
|
/freebsd/sys/dev/proto/ |
H A D | proto.h | 53 struct proto_res sc_res[PROTO_RES_MAX]; member
|