Lines Matching refs:pfc_base

62 static void pfc_rcar_write(uintptr_t pfc_base, uint32_t offs, uint32_t val)  in pfc_rcar_write()  argument
64 sys_write32(~val, pfc_base + PFC_RCAR_PMMR); in pfc_rcar_write()
65 sys_write32(val, pfc_base + offs); in pfc_rcar_write()
69 static void pfc_rcar_set_gpsr(uintptr_t pfc_base, in pfc_rcar_set_gpsr() argument
80 uint32_t val = sys_read32(pfc_base + PFC_RCAR_GPSR + in pfc_rcar_set_gpsr()
88 pfc_rcar_write(pfc_base, PFC_RCAR_GPSR + bank * sizeof(uint32_t), val); in pfc_rcar_set_gpsr()
92 static void pfc_rcar_set_ipsr(uintptr_t pfc_base, in pfc_rcar_set_ipsr() argument
96 uint32_t val = sys_read32(pfc_base + reg_offs); in pfc_rcar_set_ipsr()
100 pfc_rcar_write(pfc_base, reg_offs, val); in pfc_rcar_set_ipsr()
127 static int pfc_rcar_set_drive_strength(uintptr_t pfc_base, uint16_t pin, in pfc_rcar_set_drive_strength() argument
148 val = sys_read32(pfc_base + reg); in pfc_rcar_set_drive_strength()
152 pfc_rcar_write(pfc_base, reg, val); in pfc_rcar_set_drive_strength()
176 int pfc_rcar_set_bias(uintptr_t pfc_base, uint16_t pin, uint16_t flags) in pfc_rcar_set_bias() argument
187 val = sys_read32(pfc_base + bias_reg->puen); in pfc_rcar_set_bias()
189 sys_write32(val & ~BIT(bit), pfc_base + bias_reg->puen); in pfc_rcar_set_bias()
192 sys_write32(val | BIT(bit), pfc_base + bias_reg->puen); in pfc_rcar_set_bias()
195 val = sys_read32(pfc_base + bias_reg->pud); in pfc_rcar_set_bias()
197 sys_write32(val | BIT(bit), pfc_base + bias_reg->pud); in pfc_rcar_set_bias()
199 sys_write32(val & ~BIT(bit), pfc_base + bias_reg->pud); in pfc_rcar_set_bias()
274 static void pfc_rcar_set_voltage(uintptr_t pfc_base, uint16_t pin, uint16_t voltage) in pfc_rcar_set_voltage() argument
285 val = sys_read32(pfc_base + voltage_reg->offset); in pfc_rcar_set_voltage()
304 pfc_rcar_write(pfc_base, voltage_reg->offset, val); in pfc_rcar_set_voltage()
312 uintptr_t pfc_base; in pinctrl_configure_pin() local
323 pfc_base = reg_base[reg_index]; in pinctrl_configure_pin()
327 pfc_rcar_set_gpsr(pfc_base, pin->pin, false); in pinctrl_configure_pin()
335 pfc_rcar_set_voltage(pfc_base, pin->pin, pin->voltage); in pinctrl_configure_pin()
343 pfc_rcar_set_ipsr(pfc_base, &pin->func); in pinctrl_configure_pin()
347 pfc_rcar_set_gpsr(pfc_base, pin->pin, true); in pinctrl_configure_pin()
351 ret = pfc_rcar_set_bias(pfc_base, pin->pin, pin->flags); in pinctrl_configure_pin()
359 ret = pfc_rcar_set_drive_strength(pfc_base, pin->pin, in pinctrl_configure_pin()