Home
last modified time | relevance | path

Searched refs:sc_res (Results 1 – 25 of 39) sorted by relevance

12

/freebsd/sys/dev/bhnd/cores/chipc/
H A Dchipc_spi.h67 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 Dchipc_spi.c87 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()
146 if (sc->sc_res != NULL) in chipc_spi_attach()
148 sc->sc_res); in chipc_spi_attach()
168 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); in chipc_spi_detach()
/freebsd/sys/powerpc/mpc85xx/
H A Datpic.c56 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()
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_SLAVE]); in atpic_isa_attach()
234 if (sc->sc_res[ATPIC_MASTER] != NULL) in atpic_isa_attach()
[all …]
H A Dpci_mpc85xx.c153 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()
697 error = law_pci_target(sc->sc_res, &sc->sc_iomem_target, in fsl_pcib_decode_win()
/freebsd/sys/dev/hwpmc/
H A Dpmu_dmc620.c62 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 Domap4_prcm_clks.c173 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()
1087 clk_mem_res = sc->sc_res; in omap4_clk_hsusbhost_activate()
1343 clk_mem_res = sc->sc_res; in omap4_clk_hsusbhost_set_source()
[all …]
/freebsd/sys/arm/freescale/imx/
H A Dimx_wdog.c57 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 Dimx_gpio.c118 struct resource *sc_res[3]; /* 1 x mem, 2 x IRQ */ member
823 if (bus_alloc_resources(dev, imx_gpio_spec, sc->sc_res)) { in imx51_gpio_attach()
825 bus_release_resources(dev, imx_gpio_spec, sc->sc_res); in imx51_gpio_attach()
830 sc->sc_iot = rman_get_bustag(sc->sc_res[0]); in imx51_gpio_attach()
831 sc->sc_ioh = rman_get_bushandle(sc->sc_res[0]); in imx51_gpio_attach()
838 if ((bus_setup_intr(dev, sc->sc_res[1 + irq], INTR_TYPE_CLK, in imx51_gpio_attach()
895 bus_teardown_intr(dev, sc->sc_res[irq + FIRST_IRQRES], in imx51_gpio_detach()
898 bus_release_resources(dev, imx_gpio_spec, sc->sc_res); in imx51_gpio_detach()
/freebsd/sys/dev/gem/
H A Dif_gem_pci.c171 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 Dif_gemvar.h118 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 Dagp_i810.c206 struct resource *sc_res[2]; member
796 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL)); in agp_i810_dump_regs()
1200 bus_write_4(sc->sc_res[0], AGP_I810_PGTBL_CTL, in agp_i810_install_gatt()
1300 sc->sc_res); in agp_i810_attach()
1329 bus_write_4(sc->sc_res[0], AGP_I810_PGTBL_CTL, 0); in agp_i810_deinstall_gatt()
1377 bus_write_4(sc->sc_res[0], AGP_I810_PGTBL_CTL, in agp_i810_resume()
1525 bus_write_4(sc->sc_res[1], index * 4, pte); in agp_i915_write_gtt()
1632 pte = bus_read_4(sc->sc_res[1], index * 4); in agp_i915_read_gtt_pte()
1853 bus_write_4(sc->sc_res[0], in agp_i810_bind_memory()
2008 hic = bus_read_4(sc->sc_res[0], AGP_I830_HIC); in agp_i830_chipset_flush()
[all …]
/freebsd/sys/dev/amdgpio/
H A Damdgpio.c65 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/dev/stge/
H A Dif_stgereg.h90 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/arm64/arm64/
H A Dcmn600.c51 #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
731 bus_release_resources(dev, cmn600_res_spec, sc->sc_res); in cmn600_acpi_attach()
736 if (bus_bind_intr(dev, sc->sc_res[2], cpu)) { in cmn600_acpi_attach()
737 bus_teardown_intr(dev, sc->sc_res[2], sc->sc_ih); in cmn600_acpi_attach()
753 if (sc->sc_res[2] != NULL) { in cmn600_acpi_detach()
754 bus_teardown_intr(dev, sc->sc_res[2], sc->sc_ih); in cmn600_acpi_detach()
[all …]
/freebsd/sys/dev/cesa/
H A Dcesa.h92 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/dev/etherswitch/mtkswitch/
H A Dmtkswitchvar.h59 struct resource *sc_res; member
129 bus_read_4((_sc)->sc_res, (_reg))
131 bus_write_4((_sc)->sc_res, (_reg), (_val))
/freebsd/sys/arm/allwinner/
H A Da10_dmac.c72 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/cas/
H A Dif_casvar.h143 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 Dcfi_core.c207 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, in cfi_probe()
209 if (sc->sc_res == NULL) in cfi_probe()
212 sc->sc_tag = rman_get_bustag(sc->sc_res); in cfi_probe()
213 sc->sc_handle = rman_get_bushandle(sc->sc_res); in cfi_probe()
287 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); in cfi_probe()
307 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid, in cfi_attach()
313 if (sc->sc_res == NULL) in cfi_attach()
316 sc->sc_tag = rman_get_bustag(sc->sc_res); in cfi_attach()
317 sc->sc_handle = rman_get_bushandle(sc->sc_res); in cfi_attach()
505 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res); in cfi_detach()
/freebsd/sys/arm/ti/
H A Dti_pinmux.c422 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 Dti_scm.h47 struct resource * sc_res[4]; member
/freebsd/sys/arm/broadcom/bcm2835/
H A Dbcm2835_gpio.c115 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/dev/safexcel/
H A Dsafexcel_var.h407 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/arm64/rockchip/
H A Drk_gpio.c97 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/proto/
H A Dproto.h53 struct proto_res sc_res[PROTO_RES_MAX]; member

12