/openbsd/sys/arch/armv7/exynos/ |
H A D | exclock.c | 56 #define HREAD4(sc, reg) \ macro 392 HREAD4(sc, CLOCK_APLL_CON0), 0); in exclock_get_pll_clk() 396 HREAD4(sc, CLOCK_MPLL_CON0), 0); in exclock_get_pll_clk() 400 HREAD4(sc, CLOCK_BPLL_CON0), 0); in exclock_get_pll_clk() 404 HREAD4(sc, CLOCK_EPLL_CON0), in exclock_get_pll_clk() 405 HREAD4(sc, CLOCK_EPLL_CON1)); in exclock_get_pll_clk() 409 HREAD4(sc, CLOCK_VPLL_CON0), in exclock_get_pll_clk() 410 HREAD4(sc, CLOCK_VPLL_CON1)); in exclock_get_pll_clk() 454 div = HREAD4(sc, CLOCK_CLK_DIV_CPU0); in exclock_get_armclk() 485 div = HREAD4(sc, CLOCK_CLK_DIV_TOP1); in exclock_get_i2cclk() [all …]
|
/openbsd/sys/arch/riscv64/dev/ |
H A D | stfrng.c | 50 #define HREAD4(sc, reg) \ macro 124 stat = HREAD4(sc, RNG_STAT); in stfrng_rnd() 126 istat = HREAD4(sc, RNG_ISTAT); in stfrng_rnd() 129 enqueue_randomness(HREAD4(sc, RNG_DATA0)); in stfrng_rnd() 130 enqueue_randomness(HREAD4(sc, RNG_DATA1)); in stfrng_rnd() 131 enqueue_randomness(HREAD4(sc, RNG_DATA2)); in stfrng_rnd() 132 enqueue_randomness(HREAD4(sc, RNG_DATA3)); in stfrng_rnd() 133 enqueue_randomness(HREAD4(sc, RNG_DATA4)); in stfrng_rnd() 134 enqueue_randomness(HREAD4(sc, RNG_DATA5)); in stfrng_rnd() 135 enqueue_randomness(HREAD4(sc, RNG_DATA6)); in stfrng_rnd() [all …]
|
H A D | mpfclock.c | 90 #define HREAD4(sc, reg) \ macro 144 sc->sc_clkcfg = HREAD4(sc, CLOCK_CONFIG_CR); in mpfclock_attach() 210 val = HREAD4(sc, SUBBLK_CLOCK_CR); in mpfclock_enable() 214 val = HREAD4(sc, SUBBLK_RESET_CR); in mpfclock_enable() 218 val = HREAD4(sc, SUBBLK_RESET_CR); in mpfclock_enable() 222 val = HREAD4(sc, SUBBLK_CLOCK_CR); in mpfclock_enable()
|
/openbsd/sys/dev/fdt/ |
H A D | amlpciephy.c | 45 #define HREAD4(sc, reg) \ macro 50 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 52 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 129 reg = HREAD4(sc, PHY_R0); in amlpciephy_enable() 146 reg = HREAD4(sc, PHY_R0); in amlpciephy_enable() 199 if (HREAD4(sc, PHY_R5) & PHY_R5_PHY_CR_ACK) in amlpciephy_addr() 209 if ((HREAD4(sc, PHY_R5) & PHY_R5_PHY_CR_ACK) == 0) in amlpciephy_addr() 229 if (HREAD4(sc, PHY_R5) & PHY_R5_PHY_CR_ACK) in amlpciephy_read() 237 reg = HREAD4(sc, PHY_R5); in amlpciephy_read() 261 if (HREAD4(sc, PHY_R5) & PHY_R5_PHY_CR_ACK) in amlpciephy_write() [all …]
|
H A D | qcaoss.c | 53 #define HREAD4(sc, reg) \ macro 116 if (HREAD4(sc, AOSS_DESC_MAGIC) != AOSS_MAGIC || in qcaoss_attach() 117 HREAD4(sc, AOSS_DESC_VERSION) != AOSS_VERSION) { in qcaoss_attach() 122 sc->sc_offset = HREAD4(sc, AOSS_DESC_MCORE_MBOX_OFFSET); in qcaoss_attach() 123 sc->sc_size = HREAD4(sc, AOSS_DESC_MCORE_MBOX_SIZE); in qcaoss_attach() 130 HREAD4(sc, AOSS_DESC_UCORE_LINK_STATE)); in qcaoss_attach() 136 if (HREAD4(sc, AOSS_DESC_MCORE_LINK_STATE_ACK) == AOSS_STATE_UP) in qcaoss_attach() 149 if (HREAD4(sc, AOSS_DESC_UCORE_CH_STATE) == AOSS_STATE_UP) in qcaoss_attach() 162 if (HREAD4(sc, AOSS_DESC_MCORE_CH_STATE_ACK) == AOSS_STATE_UP) in qcaoss_attach() 200 KASSERT(HREAD4(sc, sc->sc_offset) == len); in qcaoss_send() [all …]
|
H A D | mvrng.c | 48 #define HREAD4(sc, reg) \ macro 53 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 55 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 123 status = HREAD4(sc, RNG_STATUS); in mvrng_rnd() 130 detune = ~HREAD4(sc, RNG_FROENABLE) & RNG_FROENABLE_MASK; in mvrng_rnd() 138 enqueue_randomness(HREAD4(sc, RNG_OUTPUT0)); in mvrng_rnd() 139 enqueue_randomness(HREAD4(sc, RNG_OUTPUT1)); in mvrng_rnd() 140 enqueue_randomness(HREAD4(sc, RNG_OUTPUT2)); in mvrng_rnd() 141 enqueue_randomness(HREAD4(sc, RNG_OUTPUT3)); in mvrng_rnd()
|
H A D | imxrtc.c | 39 #define HREAD4(sc, reg) \ macro 105 cr = HREAD4(sc, LPCR); in imxrtc_gettime() 115 mr = HREAD4(sc, LPSRTCMR); in imxrtc_gettime() 116 lr = HREAD4(sc, LPSRTCLR); in imxrtc_gettime() 119 mr = HREAD4(sc, LPSRTCMR); in imxrtc_gettime() 120 lr = HREAD4(sc, LPSRTCLR); in imxrtc_gettime() 144 cr = HREAD4(sc, LPCR); in imxrtc_settime() 148 if ((HREAD4(sc, LPCR) & LPCR_SRTC_ENV) == 0) in imxrtc_settime() 160 if (HREAD4(sc, LPCR) & LPCR_SRTC_ENV) in imxrtc_settime()
|
H A D | exrtc.c | 41 #define HREAD4(sc, reg) \ macro 104 dt.dt_sec = FROMBCD(HREAD4(sc, RTCSEC)); in exrtc_gettime() 105 dt.dt_min = FROMBCD(HREAD4(sc, RTCMIN)); in exrtc_gettime() 106 dt.dt_hour = FROMBCD(HREAD4(sc, RTCHOUR)); in exrtc_gettime() 107 dt.dt_day = FROMBCD(HREAD4(sc, RTCDAY)); in exrtc_gettime() 108 dt.dt_mon = FROMBCD(HREAD4(sc, RTCMON)); in exrtc_gettime() 109 dt.dt_year = FROMBCD(HREAD4(sc, RTCYEAR)) + 1900; in exrtc_gettime() 112 if (dt.dt_sec > FROMBCD(HREAD4(sc, RTCSEC)) && !retried) { in exrtc_gettime() 144 val = HREAD4(sc, RTCCTRL); in exrtc_settime()
|
H A D | rkiis.c | 131 #define HREAD4(sc, reg) \ macro 297 sr = HREAD4(sc, I2S_INTSR); in rkiis_intr() 346 txcr = HREAD4(sc, I2S_TXCR); in rkiis_set_format() 347 rxcr = HREAD4(sc, I2S_RXCR); in rkiis_set_format() 348 ckr = HREAD4(sc, I2S_CKR); in rkiis_set_format() 446 ckr = HREAD4(sc, I2S_CKR); in rkiis_set_params() 535 val = HREAD4(sc, I2S_XFER); in rkiis_trigger_output() 542 val = HREAD4(sc, I2S_INTCR); in rkiis_trigger_output() 574 val = HREAD4(sc, I2S_XFER); in rkiis_halt_output() 579 val = HREAD4(sc, I2S_INTCR); in rkiis_halt_output() [all …]
|
H A D | amlclock.c | 106 #define HREAD4(sc, reg) \ macro 211 reg = HREAD4(sc, offset); in amlclock_get_cpu_freq() 255 reg = HREAD4(sc, offset); in amlclock_set_cpu_freq() 306 reg = HREAD4(sc, offset); in amlclock_set_cpu_freq() 317 reg = HREAD4(sc, offset); in amlclock_set_cpu_freq() 330 reg = HREAD4(sc, offset); in amlclock_set_cpu_freq() 337 reg = HREAD4(sc, offset); in amlclock_set_cpu_freq() 348 reg = HREAD4(sc, offset); in amlclock_set_cpu_freq() 361 reg = HREAD4(sc, offset); in amlclock_set_cpu_freq() 395 reg = HREAD4(sc, offset); in amlclock_set_pll_freq() [all …]
|
H A D | imxanatop.c | 91 #define HREAD4(sc, reg) \ macro 96 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 98 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 240 reg = HREAD4(ir->ir_sc, ir->ir_reg_offset); in imxanatop_set_voltage() 249 reg = HREAD4(ir->ir_sc, ir->ir_delay_reg_offset); in imxanatop_set_voltage() 269 if (HREAD4(sc, ANALOG_PLL_ARM) in imxanatop_decode_pll() 272 div = HREAD4(sc, ANALOG_PLL_ARM) in imxanatop_decode_pll() 276 div = HREAD4(sc, ANALOG_PLL_SYS) in imxanatop_decode_pll() 280 div = HREAD4(sc, ANALOG_PLL_USB2) in imxanatop_decode_pll() 295 / ANALOG_PFD_528_PFDx_FRAC(HREAD4(sc, ANALOG_PFD_528), pfd); in imxanatop_get_pll2_pfd() [all …]
|
H A D | imxspi.c | 121 #define HREAD4(sc, reg) \ macro 126 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 200 while (HREAD4(sc, SPI_STATREG) & SPI_STATREG_RR) in imxspi_attachhook() 201 HREAD4(sc, SPI_RXDATA); in imxspi_attachhook() 246 configreg = HREAD4(sc, SPI_CONFIGREG); in imxspi_config() 296 state = HREAD4(sc, SPI_STATREG); in imxspi_wait_state() 342 while (HREAD4(sc, SPI_STATREG) & SPI_STATREG_RR) in imxspi_transfer() 343 HREAD4(sc, SPI_RXDATA); in imxspi_transfer() 354 if (HREAD4(sc, SPI_STATREG) & SPI_STATREG_TF) in imxspi_transfer() 366 in[i] = HREAD4(sc, SPI_RXDATA); in imxspi_transfer() [all …]
|
H A D | amldwusb.c | 105 #define HREAD4(sc, reg) \ macro 110 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 112 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 175 reg = HREAD4(sc, USB_R1); in amldwusb_attach() 182 reg = HREAD4(sc, USB_R5); in amldwusb_attach() 220 reg = HREAD4(sc, USB_R3); in amldwusb_init_usb3() 229 reg = HREAD4(sc, USB_R2); in amldwusb_init_usb3() 233 reg = HREAD4(sc, USB_R2); in amldwusb_init_usb3() 241 reg = HREAD4(sc, USB_R1); in amldwusb_init_usb3()
|
H A D | imxccm.c | 176 #define HREAD4(sc, reg) \ macro 361 uint32_t ccsr = HREAD4(sc, CCM_CCSR); in imxccm_get_armclk() 403 uint32_t podf = HREAD4(sc, CCM_CSCDR2); in imxccm_get_ecspiclk() 446 switch((HREAD4(sc, CCM_CBCMR) in imxccm_get_periphclk() 458 switch((HREAD4(sc, CCM_CBCMR) in imxccm_get_periphclk() 569 mux = HREAD4(sc, sc->sc_muxs[idx].reg); in imxccm_imx7d_enet() 592 mux = HREAD4(sc, sc->sc_muxs[idx].reg); in imxccm_imx7d_i2c() 615 mux = HREAD4(sc, sc->sc_muxs[idx].reg); in imxccm_imx7d_uart() 636 mux = HREAD4(sc, sc->sc_muxs[idx].reg); in imxccm_imx7d_usdhc() 779 mux = HREAD4(sc, sc->sc_muxs[idx].reg); in imxccm_imx8mm_enet() [all …]
|
H A D | dwmmc.c | 155 #define HREAD4(sc, reg) \ macro 317 hcon = HREAD4(sc, SDMMC_HCON); in dwmmc_attach() 336 fifoth = HREAD4(sc, SDMMC_FIFOTH); in dwmmc_attach() 547 stat = HREAD4(sc, SDMMC_IDSTS(sc)); in dwmmc_intr() 555 stat = HREAD4(sc, SDMMC_MINTSTS); in dwmmc_intr() 624 cdetect = HREAD4(sc, SDMMC_CDETECT); in dwmmc_card_detect() 844 if ((HREAD4(sc, SDMMC_BMOD) & in dwmmc_dma_reset() 906 status = HREAD4(sc, SDMMC_STATUS); in dwmmc_exec_command() 953 if ((HREAD4(sc, SDMMC_CTRL) & in dwmmc_exec_command() 985 status = HREAD4(sc, SDMMC_RINTSTS); in dwmmc_exec_command() [all …]
|
H A D | imxpwm.c | 53 #define HREAD4(sc, reg) \ macro 58 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 60 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 138 prescale = ((HREAD4(sc, PWM_CR) >> PWM_CR_PRESCALER_SHIFT) & in imxpwm_get_state() 144 if (HREAD4(sc, PWM_CR) & PWM_CR_EN) in imxpwm_get_state() 147 pcycles = HREAD4(sc, PWM_PR); in imxpwm_get_state() 155 dcycles = HREAD4(sc, PWM_SAR); in imxpwm_get_state() 195 if ((HREAD4(sc, PWM_CR) & PWM_CR_SWR) == 0) in imxpwm_set_state()
|
H A D | rkcomphy.c | 99 #define HREAD4(sc, reg) \ macro 104 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 106 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 176 reg = HREAD4(sc, COMBO_PIPE_PHY_REG(32)); in rkcomphy_rk3568_pll_tune() 183 reg = HREAD4(sc, COMBO_PIPE_PHY_REG(5)); in rkcomphy_rk3568_pll_tune() 226 reg = HREAD4(sc, COMBO_PIPE_PHY_REG(31)); in rkcomphy_rk3568_enable() 234 reg = HREAD4(sc, COMBO_PIPE_PHY_REG(14)); in rkcomphy_rk3568_enable() 277 reg = HREAD4(sc, COMBO_PIPE_PHY_REG(14)); in rkcomphy_rk3568_enable() 281 reg = HREAD4(sc, COMBO_PIPE_PHY_REG(15)); in rkcomphy_rk3568_enable() 299 reg = HREAD4(sc, COMBO_PIPE_PHY_REG(31)); in rkcomphy_rk3568_enable() [all …]
|
H A D | mvclock.c | 31 #define HREAD4(sc, reg) \ macro 414 reg = HREAD4(sc, PERIPH_CLK_DIS); in a3700_periph_enable() 426 reg = HREAD4(sc, PERIPH_TBG_SEL); in a3700_periph_tbg_get_frequency() 436 uint32_t reg = HREAD4(sc, off); in a3700_periph_get_div() 444 uint32_t reg = HREAD4(sc, off); in a3700_periph_get_double_div() 480 vcodiv = HREAD4(sc, TBG_CTRL8); in a3700_tbg_get_frequency() 485 vcodiv = HREAD4(sc, TBG_CTRL8); in a3700_tbg_get_frequency() 490 vcodiv = HREAD4(sc, TBG_CTRL1); in a3700_tbg_get_frequency() 495 vcodiv = HREAD4(sc, TBG_CTRL1); in a3700_tbg_get_frequency() 504 reg = HREAD4(sc, TBG_CTRL0); in a3700_tbg_get_frequency() [all …]
|
H A D | sxirsb.c | 60 #define HREAD4(sc, reg) \ macro 65 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 67 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 188 if ((HREAD4(sc, RSB_CTRL) & RSB_CTRL_SOFT_RESET) == 0) in sxirsb_init() 215 if ((HREAD4(sc, RSB_DMCR) & RSB_DMCR_DEVICE_MODE_START) == 0) in sxirsb_init() 235 if ((HREAD4(sc, RSB_CTRL) & RSB_CTRL_START_TRANS) == 0) in sxirsb_init() 286 if ((HREAD4(sc, RSB_CTRL) & RSB_CTRL_START_TRANS) == 0) in sxirsb_do_trans() 290 stat = HREAD4(sc, RSB_STAT); in sxirsb_do_trans() 314 return HREAD4(sc, RSB_DATA); in rsb_read_1() 332 return HREAD4(sc, RSB_DATA); in rsb_read_2()
|
H A D | rkiic.c | 69 #define HREAD4(sc, reg) \ macro 74 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 76 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 207 if (HREAD4(sc, RKI2C_IPD) & RKI2C_IPD_START) in rkiic_send_start() 226 if (HREAD4(sc, RKI2C_IPD) & RKI2C_IPD_STOP) in rkiic_send_stop() 264 if (HREAD4(sc, RKI2C_IPD) & RKI2C_IPD_MBTF) in rkiic_write() 303 if (HREAD4(sc, RKI2C_IPD) & RKI2C_IPD_MBRF) in rkiic_read() 315 rxdata = HREAD4(sc, RKI2C_RXDATA0 + i); in rkiic_read() 325 con = HREAD4(sc, RKI2C_CON); in rkiic_read() 349 con = HREAD4(sc, RKI2C_CON); in rkiic_exec()
|
H A D | rkpwm.c | 44 #define HREAD4(sc, reg) \ macro 49 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 51 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 135 cycles = HREAD4(sc, PWM_V2_PERIOD); in rkpwm_get_state() 136 act_cycles = HREAD4(sc, PWM_V2_DUTY); in rkpwm_get_state() 141 if (HREAD4(sc, PWM_V2_CTRL) & PWM_V2_CTRL_ENABLE) in rkpwm_get_state()
|
/openbsd/sys/arch/armv7/omap/ |
H A D | omrng.c | 55 #define HREAD4(sc, reg) \ macro 60 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 62 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 136 status = HREAD4(sc, RNG_STATUS); in omrng_rnd() 143 detune = ~HREAD4(sc, RNG_FROENABLE) & RNG_FROENABLE_MASK; in omrng_rnd() 151 enqueue_randomness(HREAD4(sc, RNG_OUTPUT0)); in omrng_rnd() 152 enqueue_randomness(HREAD4(sc, RNG_OUTPUT1)); in omrng_rnd()
|
H A D | ommmc.c | 221 #define HREAD4(sc, reg) \ macro 366 caps = HREAD4(sc, MMCHS_CAPA); in ommmc_attach() 661 reg = HREAD4(sc, MMCHS_HCTL); in ommmc_bus_power() 746 reg = HREAD4(sc, MMCHS_SYSCTL); in ommmc_bus_clock() 834 state = HREAD4(sc, MMCHS_PSTATE); in ommmc_wait_state() 881 v0 = HREAD4(sc, MMCHS_RSP10); in ommmc_exec_command() 882 v1 = HREAD4(sc, MMCHS_RSP32); in ommmc_exec_command() 883 v2 = HREAD4(sc, MMCHS_RSP54); in ommmc_exec_command() 884 v3 = HREAD4(sc, MMCHS_RSP76); in ommmc_exec_command() 1136 HREAD4(sc, MMCHS_SYSCTL))); in ommmc_soft_reset() [all …]
|
/openbsd/sys/arch/arm64/dev/ |
H A D | aplpmgr.c | 43 #define HREAD4(sc, reg) \ macro 183 val = HREAD4(sc, ps->ps_offset); in aplpmgr_enable() 189 val = HREAD4(sc, ps->ps_offset); in aplpmgr_enable() 211 val = HREAD4(sc, ps->ps_offset); in aplpmgr_reset() 214 val = HREAD4(sc, ps->ps_offset); in aplpmgr_reset() 218 val = HREAD4(sc, ps->ps_offset); in aplpmgr_reset() 221 val = HREAD4(sc, ps->ps_offset); in aplpmgr_reset()
|
H A D | aplnco.c | 42 #define HREAD4(sc, reg) \ macro 47 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 49 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 180 div = HREAD4(sc, NCO_DIV(idx)); in aplnco_get_frequency() 187 inc1 = HREAD4(sc, NCO_INC1(idx)); in aplnco_get_frequency() 188 inc2 = HREAD4(sc, NCO_INC2(idx)); in aplnco_get_frequency() 227 ctrl = HREAD4(sc, NCO_CTRL(idx)); in aplnco_set_frequency()
|