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

12

/freebsd-current/sys/dev/bhnd/cores/chipc/
H A Dchipc_spi.h67 struct resource *sc_res; /**< SPI registers */ member in struct:chipc_spi_softc
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,
89 if (sc->sc_res == NULL) {
146 if (sc->sc_res != NULL)
148 sc->sc_res);
168 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res);
/freebsd-current/sys/arm/ti/
H A Dti_scm.h47 struct resource * sc_res[4]; member in struct:ti_scm_softc
H A Dti_pinmux.h65 struct resource * sc_res[4]; member in struct:ti_pinmux_softc
H A Dti_pinmux.c422 if (bus_alloc_resources(dev, ti_pinmux_res_spec, sc->sc_res)) {
427 sc->sc_bst = rman_get_bustag(sc->sc_res[0]);
428 sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]);
/freebsd-current/sys/dev/hwpmc/
H A Dpmu_dmc620.c62 struct resource *sc_res[2]; member in struct:pmu_dmc620_softc
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);
158 if (sc->sc_res[1] != NULL && bus_setup_intr(dev, sc->sc_res[1],
161 bus_release_resources(dev, pmu_dmc620_res_spec, sc->sc_res);
176 if (sc->sc_res[1] != NULL) {
177 bus_teardown_intr(dev, sc->sc_res[1], sc->sc_ih);
179 bus_release_resources(dev, pmu_dmc620_res_spec, sc->sc_res);
[all...]
/freebsd-current/sys/powerpc/mpc85xx/
H A Datpic.c56 struct resource *sc_res[2]; member in struct:atpic_softc
123 val = bus_read_1(sc->sc_res[icu], ofs);
131 bus_write_1(sc->sc_res[icu], ofs, val);
132 bus_barrier(sc->sc_res[icu], ofs, 2 - ofs,
199 sc->sc_res[ATPIC_MASTER] = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
201 if (sc->sc_res[ATPIC_MASTER] == NULL)
205 sc->sc_res[ATPIC_SLAVE] = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
207 if (sc->sc_res[ATPIC_SLAVE] == NULL)
231 if (sc->sc_res[ATPIC_SLAVE] != NULL)
233 sc->sc_rid[ATPIC_SLAVE], sc->sc_res[ATPIC_SLAV
[all...]
/freebsd-current/sys/dev/proto/
H A Dproto.h53 struct proto_res sc_res[PROTO_RES_MAX]; member in struct:proto_softc
/freebsd-current/sys/dev/etherswitch/mtkswitch/
H A Dmtkswitchvar.h59 struct resource *sc_res; member in struct:mtkswitch_softc
129 bus_read_4((_sc)->sc_res, (_reg))
131 bus_write_4((_sc)->sc_res, (_reg), (_val))
/freebsd-current/sys/arm/freescale/imx/
H A Dimx_wdog.c57 struct resource *sc_res[2]; member in struct:imx_wdog_softc
90 return (bus_read_2(sc->sc_res[MEMRES], offs));
97 bus_write_2(sc->sc_res[MEMRES], offs, val);
164 imx_wdog_cpu_reset(BUS_SPACE_PHYSADDR(sc->sc_res[MEMRES], WDOG_CR_REG));
192 if (bus_alloc_resources(dev, imx_wdog_spec, sc->sc_res)) {
207 bus_setup_intr(sc->sc_dev, sc->sc_res[IRQRES],
H A Dimx_gpio.c118 struct resource *sc_res[3]; /* 1 x mem, 2 x IRQ */ member in struct:imx51_gpio_softc
823 if (bus_alloc_resources(dev, imx_gpio_spec, sc->sc_res)) {
825 bus_release_resources(dev, imx_gpio_spec, sc->sc_res);
830 sc->sc_iot = rman_get_bustag(sc->sc_res[0]);
831 sc->sc_ioh = rman_get_bushandle(sc->sc_res[0]);
838 if ((bus_setup_intr(dev, sc->sc_res[1 + irq], INTR_TYPE_CLK,
895 bus_teardown_intr(dev, sc->sc_res[irq + FIRST_IRQRES],
898 bus_release_resources(dev, imx_gpio_spec, sc->sc_res);
/freebsd-current/sys/arm/ti/omap4/
H A Domap4_prcm_clks.c173 struct resource *sc_res; member in struct:omap4_prcm_softc
520 clk_mem_res = sc->sc_res;
586 clk_mem_res = sc->sc_res;
655 clk_mem_res = sc->sc_res;
731 clk_mem_res = sc->sc_res;
775 clk_mem_res = sc->sc_res;
824 clk_mem_res = sc->sc_res;
884 clk_mem_res = sc->sc_res;
938 clksel = bus_read_4(sc->sc_res, CM_SYS_CLKSEL_OFFSET);
999 clksel = bus_read_4(sc->sc_res, CM_CLKSEL_DPLL_MP
[all...]
/freebsd-current/sys/dev/gem/
H A Dif_gem_pci.c171 if (bus_alloc_resources(dev, gem_pci_res_spec, sc->sc_res)) {
173 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res);
275 bus_read_region_1(sc->sc_res[GEM_RES_MEM],
295 if (bus_setup_intr(dev, sc->sc_res[GEM_RES_INTR], INTR_TYPE_NET |
305 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res);
315 bus_teardown_intr(dev, sc->sc_res[GEM_RES_INTR], sc->sc_ih);
318 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res);
H A Dif_gemvar.h118 struct resource *sc_res[2]; member in struct:gem_softc
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-current/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 in struct:cesa_softc
/freebsd-current/sys/dev/amdgpio/
H A Damdgpio.c65 return (bus_read_4(sc->sc_res[0], off));
72 bus_write_4(sc->sc_res[0], off, val);
125 if (sc->sc_res[0] == NULL)
381 if (bus_alloc_resources(dev, amdgpio_spec, sc->sc_res)) {
386 sc->sc_bst = rman_get_bustag(sc->sc_res[0]);
387 sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]);
420 bus_release_resources(dev, amdgpio_spec, sc->sc_res);
437 bus_release_resources(dev, amdgpio_spec, sc->sc_res);
/freebsd-current/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 in struct:stge_softc
/freebsd-current/sys/dev/cas/
H A Dif_casvar.h143 struct resource *sc_res[2]; member in struct:cas_softc
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-current/sys/dev/cfi/
H A Dcfi_var.h55 struct resource *sc_res; member in struct:cfi_softc
H A Dcfi_core.c207 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid,
209 if (sc->sc_res == NULL)
212 sc->sc_tag = rman_get_bustag(sc->sc_res);
213 sc->sc_handle = rman_get_bushandle(sc->sc_res);
287 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res);
307 sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rid,
313 if (sc->sc_res == NULL)
316 sc->sc_tag = rman_get_bustag(sc->sc_res);
317 sc->sc_handle = rman_get_bushandle(sc->sc_res);
505 bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rid, sc->sc_res);
[all...]
/freebsd-current/sys/dev/agp/
H A Dagp_i810.c206 struct resource *sc_res[2]; member in struct:agp_i810_softc
796 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL));
807 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL));
818 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL));
829 bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL));
842 bus_read_4(sc->sc_res[0], AGP_I965_PGTBL_CTL2));
913 switch (bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL) &
1098 pgetbl_ctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL);
1135 pgetbl_ctl2 = bus_read_4(sc->sc_res[0], AGP_I965_PGTBL_CTL2);
1137 bus_write_4(sc->sc_res[
[all...]
/freebsd-current/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 in struct:cmn600_softc
695 i = bus_alloc_resources(dev, cmn600_res_spec, sc->sc_res);
729 if (bus_setup_intr(dev, sc->sc_res[2], INTR_TYPE_MISC | INTR_MPSAFE,
731 bus_release_resources(dev, cmn600_res_spec, sc->sc_res);
736 if (bus_bind_intr(dev, sc->sc_res[2], cpu)) {
737 bus_teardown_intr(dev, sc->sc_res[
[all...]
/freebsd-current/sys/arm/allwinner/
H A Da10_dmac.c72 struct resource * sc_res[2]; member in struct:a10dmac_softc
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)) {
161 error = bus_setup_intr(dev, sc->sc_res[1], INTR_MPSAFE | INTR_TYPE_MISC,
165 bus_release_resources(dev, a10dmac_spec, sc->sc_res);
/freebsd-current/sys/dev/safexcel/
H A Dsafexcel_var.h407 struct resource *sc_res; member in struct:safexcel_softc
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-current/sys/arm/broadcom/bcm2835/
H A Dbcm2835_gpio.c115 struct resource * sc_res[BCM_GPIO_IRQS + 1]; member in struct:bcm_gpio_softc
758 if (sc->sc_res[1] == NULL || sc->sc_res[2] == NULL)
765 if (bus_setup_intr(dev, sc->sc_res[1], INTR_TYPE_MISC | INTR_MPSAFE,
768 if (bus_setup_intr(dev, sc->sc_res[2], INTR_TYPE_MISC | INTR_MPSAFE,
782 bus_teardown_intr(dev, sc->sc_res[1], sc->sc_intrhand[0]);
784 bus_teardown_intr(dev, sc->sc_res[2], sc->sc_intrhand[1]);
803 if (bus_alloc_resources(dev, bcm_gpio_res_spec, sc->sc_res) != 0) {
807 sc->sc_bst = rman_get_bustag(sc->sc_res[0]);
808 sc->sc_bsh = rman_get_bushandle(sc->sc_res[
[all...]

Completed in 311 milliseconds

12