| /f-stack/freebsd/arm/freescale/imx/ |
| H A D | imx6_usbphy.c | 69 struct resource *mem_res; member 86 if (sc->mem_res != NULL) in usbphy_detach() 87 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in usbphy_detach() 103 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in usbphy_attach() 105 if (sc->mem_res == NULL) { in usbphy_attach() 117 if (BUS_SPACE_PHYSADDR(sc->mem_res, 0) == PWD_PHY1_REG_PHYSADDR) { in usbphy_attach() 151 bus_write_4(sc->mem_res, CTRL_SET_REG, CTRL_SFTRST); in usbphy_attach() 152 bus_write_4(sc->mem_res, CTRL_CLR_REG, CTRL_SFTRST | CTRL_CLKGATE); in usbphy_attach() 155 bus_write_4(sc->mem_res, CTRL_SET_REG, in usbphy_attach() 159 bus_write_4(sc->mem_res, PWD_REG, 0); in usbphy_attach()
|
| H A D | imx6_src.c | 53 struct resource *mem_res; member 62 return (bus_read_4(sc->mem_res, off)); in RD4() 69 bus_write_4(sc->mem_res, off, val); in WR4() 106 if (sc->mem_res != NULL) in src_detach() 107 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in src_detach() 123 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in src_attach() 125 if (sc->mem_res == NULL) { in src_attach()
|
| H A D | imx6_ccm.c | 62 struct resource *mem_res; member 71 return (bus_read_4(sc->mem_res, off)); in RD4() 78 bus_write_4(sc->mem_res, off, val); in WR4() 139 if (sc->mem_res != NULL) in ccm_detach() 140 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in ccm_detach() 157 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in ccm_attach() 159 if (sc->mem_res == NULL) { in ccm_attach()
|
| H A D | imx_iomux.c | 72 struct resource *mem_res; member 110 return (bus_read_4(sc->mem_res, off)); in RD4() 117 bus_write_4(sc->mem_res, off, val); in WR4() 237 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in iomux_attach() 239 if (sc->mem_res == NULL) { in iomux_attach()
|
| /f-stack/freebsd/mips/mediatek/ |
| H A D | mtk_sysctl.c | 53 struct resource *mem_res; member 111 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in mtk_sysctl_attach() 114 if (sc->mem_res == NULL) { in mtk_sysctl_attach() 132 if (sc->mem_res) in mtk_sysctl_detach() 134 sc->mem_res); in mtk_sysctl_detach() 147 val = bus_read_4(mtk_sysctl_sc->mem_res, reg); in mtk_sysctl_get() 158 bus_write_4(mtk_sysctl_sc->mem_res, reg, val); in mtk_sysctl_set() 168 val = bus_read_4(mtk_sysctl_sc->mem_res, reg); in mtk_sysctl_clr_set() 171 bus_write_4(mtk_sysctl_sc->mem_res, reg, val); in mtk_sysctl_clr_set()
|
| /f-stack/freebsd/arm/nvidia/ |
| H A D | tegra_sdhci.c | 104 struct resource * mem_res; member 124 return (bus_read_4(sc->mem_res, off)); in RD4() 133 return (bus_read_1(sc->mem_res, off)); in tegra_sdhci_read_1() 152 val32 = bus_read_4(sc->mem_res, off); in tegra_sdhci_read_4() 176 bus_write_1(sc->mem_res, off, val); in tegra_sdhci_write_1() 186 bus_write_2(sc->mem_res, off, val); in tegra_sdhci_write_2() 196 bus_write_4(sc->mem_res, off, val); in tegra_sdhci_write_4() 277 if (!sc->mem_res) { in tegra_sdhci_attach() 411 if (sc->mem_res != NULL) in tegra_sdhci_attach() 432 rman_get_rid(sc->mem_res), in tegra_sdhci_detach() [all …]
|
| H A D | tegra_mc.c | 99 #define WR4(_sc, _r, _v) bus_write_4((_sc)->mem_res, (_r), (_v)) 100 #define RD4(_sc, _r) bus_read_4((_sc)->mem_res, (_r)) 121 struct resource *mem_res; member 221 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in tegra_mc_attach() 223 if (sc->mem_res == NULL) { in tegra_mc_attach() 274 if (sc->mem_res != NULL) in tegra_mc_attach() 275 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra_mc_attach() 291 if (sc->mem_res != NULL) in tegra_mc_detach() 292 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra_mc_detach()
|
| H A D | tegra_rtc.c | 77 #define WR4(_sc, _r, _v) bus_write_4((_sc)->mem_res, (_r), (_v)) 78 #define RD4(_sc, _r) bus_read_4((_sc)->mem_res, (_r)) 99 struct resource *mem_res; member 200 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in tegra_rtc_attach() 202 if (sc->mem_res == NULL) { in tegra_rtc_attach() 260 if (sc->mem_res != NULL) in tegra_rtc_attach() 261 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra_rtc_attach() 277 if (sc->mem_res != NULL) in tegra_rtc_detach() 278 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra_rtc_detach()
|
| H A D | tegra_lic.c | 67 #define WR4(_sc, _b, _r, _v) bus_write_4((_sc)->mem_res[_b], (_r), (_v)) 68 #define RD4(_sc, _b, _r) bus_read_4((_sc)->mem_res[_b], (_r)) 87 struct resource *mem_res[nitems(lic_spec)]; member 222 if (bus_alloc_resources(dev, lic_spec, sc->mem_res)) { in tegra_lic_attach() 229 if (sc->mem_res[i] == NULL) in tegra_lic_attach() 242 bus_release_resources(dev, lic_spec, sc->mem_res); in tegra_lic_attach() 254 if (sc->mem_res[i] == NULL) in tegra_lic_detach() 257 sc->mem_res[i]); in tegra_lic_detach()
|
| H A D | tegra_gpio.c | 64 #define WR4(_sc, _r, _v) bus_write_4((_sc)->mem_res, (_r), (_v)) 65 #define RD4(_sc, _r) bus_read_4((_sc)->mem_res, (_r)) 129 struct resource *mem_res; member 351 bus_write_4(sc->mem_res, reg + GPIO_REGNUM(tgi->irq), tmp); in intr_write_masked() 363 tmp = bus_read_4(sc->mem_res, reg + GPIO_REGNUM(tgi->irq)); in intr_write_modify() 366 bus_write_4(sc->mem_res, reg + GPIO_REGNUM(tgi->irq), tmp); in intr_write_modify() 410 val = bus_read_4(sc->mem_res, GPIO_INT_STA + in tegra_gpio_intr() 412 val &= bus_read_4(sc->mem_res, GPIO_INT_ENB + in tegra_gpio_intr() 746 if (sc->mem_res != NULL) in tegra_gpio_detach() 747 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra_gpio_detach() [all …]
|
| H A D | tegra_efuse.c | 53 #define RD4(_sc, _r) bus_read_4((_sc)->mem_res, (FUSES_START + (_r))) 58 struct resource *mem_res; member 458 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in tegra_efuse_attach() 460 if (sc->mem_res == NULL) { in tegra_efuse_attach() 502 if (sc->mem_res != NULL) in tegra_efuse_attach() 503 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra_efuse_attach() 519 if (sc->mem_res != NULL) in tegra_efuse_detach() 520 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in tegra_efuse_detach()
|
| /f-stack/freebsd/contrib/vchiq/interface/vchiq_arm/ |
| H A D | vchiq_kmod.c | 71 struct resource * mem_res; member 154 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); in bcm_vchiq_attach() 155 if (sc->mem_res == NULL) { in bcm_vchiq_attach() 160 sc->bst = rman_get_bustag(sc->mem_res); in bcm_vchiq_attach() 161 sc->bsh = rman_get_bushandle(sc->mem_res); in bcm_vchiq_attach() 212 sc->mem_res); in bcm_vchiq_detach()
|
| /f-stack/freebsd/arm/versatile/ |
| H A D | versatile_sic.c | 78 struct resource * mem_res; member 88 bus_read_4(sc->mem_res, (reg)) 90 bus_write_4(sc->mem_res, (reg), (val)) 232 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in versatile_sic_attach() 234 if (sc->mem_res == NULL) { in versatile_sic_attach() 286 if (sc->mem_res == NULL) in versatile_sic_detach() 288 rman_get_rid(sc->mem_res), sc->mem_res); in versatile_sic_detach()
|
| H A D | versatile_pci.c | 100 bus_read_4(sc->mem_res[MEM_CORE], (reg)) 102 bus_write_4(sc->mem_res[MEM_CORE], (reg), (val)) 105 bus_read_4(sc->mem_res[MEM_BASE], (reg)) 107 bus_write_4(sc->mem_res[MEM_BASE], (reg), (val)) 110 bus_read_4(sc->mem_res[MEM_CONF_BASE], (reg)) 112 bus_write_4(sc->mem_res[MEM_CONF_BASE], (reg), (val)) 114 bus_write_2(sc->mem_res[MEM_CONF_BASE], (reg), (val)) 116 bus_write_1(sc->mem_res[MEM_CONF_BASE], (reg), (val)) 119 struct resource* mem_res[MEM_REGIONS]; member 171 sc->mem_res); in versatile_pci_attach() [all …]
|
| /f-stack/freebsd/arm/xilinx/ |
| H A D | zy7_gpio.c | 95 struct resource *mem_res; /* Memory resource */ member 98 #define WR4(sc, off, val) bus_write_4((sc)->mem_res, (off), (val)) 99 #define RD4(sc, off) bus_read_4((sc)->mem_res, (off)) 314 sc->mem_res = bus_alloc_resource_any(dev, in zy7_gpio_attach() 316 if (sc->mem_res == NULL) { in zy7_gpio_attach() 338 if (sc->mem_res != NULL) { in zy7_gpio_detach() 341 rman_get_rid(sc->mem_res), sc->mem_res); in zy7_gpio_detach()
|
| H A D | zy7_spi.c | 68 struct resource *mem_res; member 97 #define RD4(sc, off) (bus_read_4((sc)->mem_res, (off))) 98 #define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val))) 408 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in zy7_spi_attach() 410 if (sc->mem_res == NULL) { in zy7_spi_attach() 465 if (sc->mem_res != NULL) { in zy7_spi_detach() 483 if (sc->mem_res != NULL) in zy7_spi_detach() 485 rman_get_rid(sc->mem_res), sc->mem_res); in zy7_spi_detach()
|
| H A D | zy7_slcr.c | 65 struct resource *mem_res; member 78 #define RD4(sc, off) (bus_read_4((sc)->mem_res, (off))) 79 #define WR4(sc, off, val) (bus_write_4((sc)->mem_res, (off), (val))) 589 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in zy7_slcr_attach() 591 if (sc->mem_res == NULL) { in zy7_slcr_attach() 685 if (sc->mem_res != NULL) in zy7_slcr_detach() 687 rman_get_rid(sc->mem_res), sc->mem_res); in zy7_slcr_detach()
|
| /f-stack/freebsd/arm64/qoriq/ |
| H A D | qoriq_therm.c | 77 struct resource *mem_res; member 111 bus_write_4(sc->mem_res, addr, val); in WR4() 119 val = bus_read_4(sc->mem_res, addr); in RD4() 273 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in qoriq_therm_attach() 275 if (sc->mem_res == NULL) { in qoriq_therm_attach() 365 if (sc->mem_res != NULL) in qoriq_therm_attach() 366 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in qoriq_therm_attach() 384 if (sc->mem_res != NULL) in qoriq_therm_detach() 385 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in qoriq_therm_detach()
|
| /f-stack/freebsd/arm/freescale/ |
| H A D | fsl_ocotp.c | 95 struct resource *mem_res; member 104 return (bus_read_4(sc->mem_res, off)); in RD4() 126 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in ocotp_attach() 128 if (sc->mem_res == NULL) { in ocotp_attach()
|
| /f-stack/freebsd/arm/ti/ |
| H A D | ti_sdhci.c | 72 struct resource * mem_res; member 140 return (bus_read_4(sc->mem_res, off + sc->mmchs_reg_off)); in ti_mmchs_read_4() 147 bus_write_4(sc->mem_res, off + sc->mmchs_reg_off, val); in ti_mmchs_write_4() 154 return (bus_read_4(sc->mem_res, off + sc->sdhci_reg_off)); in RD4() 161 bus_write_4(sc->mem_res, off + sc->sdhci_reg_off, val); in WR4() 245 bus_read_multi_4(sc->mem_res, off + sc->sdhci_reg_off, data, count); in ti_sdhci_read_multi_4() 342 bus_write_multi_4(sc->mem_res, off + sc->sdhci_reg_off, data, count); in ti_sdhci_write_multi_4() 570 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in ti_sdhci_attach() 572 if (!sc->mem_res) { in ti_sdhci_attach() 703 if (sc->mem_res) in ti_sdhci_attach() [all …]
|
| H A D | ti_edma3.c | 107 struct resource * mem_res[1]; member 126 #define ti_edma3_cc_rd_4(reg) bus_read_4(ti_edma3_sc->mem_res[0], reg) 127 #define ti_edma3_cc_wr_4(reg, val) bus_write_4(ti_edma3_sc->mem_res[0], reg, val) 171 err = bus_alloc_resources(dev, ti_edma3_mem_spec, sc->mem_res); in ti_edma3_attach() 415 bus_write_region_4(ti_edma3_sc->mem_res[0], TI_EDMA3CC_OPT(ch), in ti_edma3_param_write() 422 bus_read_region_4(ti_edma3_sc->mem_res[0], TI_EDMA3CC_OPT(ch), in ti_edma3_param_read()
|
| H A D | ti_prcm.c | 73 struct resource * mem_res; member 162 sc->mem_res = bus_alloc_resource(sc->dev, SYS_RES_MEMORY, &rid, in ti_prcm_attach() 169 if (sc->mem_res == NULL) { in ti_prcm_attach() 173 sc->bst = rman_get_bustag(sc->mem_res); in ti_prcm_attach() 174 sc->bsh = rman_get_bushandle(sc->mem_res); in ti_prcm_attach()
|
| /f-stack/freebsd/mips/ingenic/ |
| H A D | jz4780_clk.h | 83 struct resource *mem_res); 87 struct resource *mem_res, uint32_t mem_reg); 91 struct resource *mem_res);
|
| /f-stack/freebsd/arm64/freescale/imx/ |
| H A D | imx8mq_ccm.c | 271 struct resource *mem_res; member 282 return (bus_read_4(sc->mem_res, off)); in CCU_READ4() 289 bus_write_4(sc->mem_res, off, val); in CCU_WRITE4() 299 if (sc->mem_res != NULL) in ccm_detach() 300 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in ccm_detach() 320 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in ccm_attach() 322 if (sc->mem_res == NULL) { in ccm_attach()
|
| /f-stack/freebsd/arm/mv/ |
| H A D | mv_ap806_sei.c | 78 struct resource *mem_res; member 91 #define RD4(sc, reg) bus_read_4((sc)->mem_res, (reg)) 92 #define WR4(sc, reg, val) bus_write_4((sc)->mem_res, (reg), (val)) 319 sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in mv_ap806_sei_attach() 321 if (sc->mem_res == NULL) { in mv_ap806_sei_attach() 372 if (sc->mem_res != NULL) in mv_ap806_sei_attach() 373 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); in mv_ap806_sei_attach()
|