Home
last modified time | relevance | path

Searched refs:pdata (Results 1 – 25 of 146) sorted by relevance

123456

/u-boot/drivers/rng/
A Dstm32mp1_rng.c56 readl(pdata->base + RNG_DR); in stm32_rng_read()
87 err = clk_enable(&pdata->clk); in stm32_rng_init()
95 writel(0, pdata->base + RNG_SR); in stm32_rng_init()
102 writel(0, pdata->base + RNG_CR); in stm32_rng_cleanup()
104 return clk_disable(&pdata->clk); in stm32_rng_cleanup()
111 reset_assert(&pdata->rst); in stm32_rng_probe()
113 reset_deassert(&pdata->rst); in stm32_rng_probe()
115 return stm32_rng_init(pdata); in stm32_rng_probe()
122 return stm32_rng_cleanup(pdata); in stm32_rng_remove()
130 pdata->base = dev_read_addr(dev); in stm32_rng_of_to_plat()
[all …]
A Drockchip_rng.c80 struct rk_rng_plat *pdata = dev_get_priv(dev); in rk_v1_rng_read() local
89 pdata->base + CRYPTO_V1_TRNG_CTRL); in rk_v1_rng_read()
111 struct rk_rng_plat *pdata = dev_get_priv(dev); in rk_v2_rng_read() local
149 struct rk_rng_plat *pdata = dev_get_priv(dev); in rockchip_rng_read() local
154 if (!pdata->soc_data || !pdata->soc_data->rk_rng_read) in rockchip_rng_read()
164 ret = pdata->soc_data->rk_rng_read(dev, buf, in rockchip_rng_read()
173 struct rk_rng_plat *pdata = dev_get_priv(dev); in rockchip_rng_of_to_plat() local
175 memset(pdata, 0x00, sizeof(*pdata)); in rockchip_rng_of_to_plat()
177 pdata->base = (fdt_addr_t)dev_read_addr_ptr(dev); in rockchip_rng_of_to_plat()
178 if (!pdata->base) in rockchip_rng_of_to_plat()
[all …]
A Dmeson-rng.c29 struct meson_rng_plat *pdata = dev_get_plat(dev); in meson_rng_read() local
33 u32 rand = readl(pdata->base); in meson_rng_read()
55 struct meson_rng_plat *pdata = dev_get_plat(dev); in meson_rng_probe() local
58 err = clk_enable(&pdata->clk); in meson_rng_probe()
73 struct meson_rng_plat *pdata = dev_get_plat(dev); in meson_rng_remove() local
75 return clk_disable(&pdata->clk); in meson_rng_remove()
86 struct meson_rng_plat *pdata = dev_get_plat(dev); in meson_rng_of_to_plat() local
89 pdata->base = dev_read_addr(dev); in meson_rng_of_to_plat()
90 if (!pdata->base) in meson_rng_of_to_plat()
94 err = clk_get_by_name(dev, "core", &pdata->clk); in meson_rng_of_to_plat()
A Diproc_rng200.c40 static void iproc_rng200_enable(struct iproc_rng200_plat *pdata, bool enable) in iproc_rng200_enable() argument
42 void __iomem *rng_base = pdata->base; in iproc_rng200_enable()
55 static void iproc_rng200_restart(struct iproc_rng200_plat *pdata) in iproc_rng200_restart() argument
57 void __iomem *rng_base = pdata->base; in iproc_rng200_restart()
60 iproc_rng200_enable(pdata, false); in iproc_rng200_restart()
82 iproc_rng200_enable(pdata, true); in iproc_rng200_restart()
157 struct iproc_rng200_plat *pdata = dev_get_plat(dev); in iproc_rng200_of_to_plat() local
159 pdata->base = devfdt_map_physmem(dev, sizeof(void *)); in iproc_rng200_of_to_plat()
160 if (!pdata->base) in iproc_rng200_of_to_plat()
/u-boot/drivers/thermal/
A Dimx_tmu.c151 val = readl(&pdata->regs->regs_v1.site[pdata->id].tritsr); in read_temperature()
190 mdelay(pdata->polling_delay); in imx_tmu_get_temp()
292 if (!pdata->regs) in imx_tmu_enable_msite()
300 writel(pdata->id << 30, &pdata->regs->regs_v3.tps); in imx_tmu_enable_msite()
355 pdata->zone_node = 1; in imx_tmu_bind()
386 if (pdata->zone_node) { in imx_tmu_parse_fdt()
389 if (!pdata->regs) in imx_tmu_parse_fdt()
408 pdata->id = args.args[0]; in imx_tmu_parse_fdt()
410 pdata->id = 0; in imx_tmu_parse_fdt()
432 pdata->id, pdata->polling_delay, pdata->critical, pdata->alert); in imx_tmu_parse_fdt()
[all …]
A Dimx_scu_thermal.c64 while (cpu_temp >= pdata->alert) { in imx_sc_thermal_get_temp()
66 cpu_temp, pdata->alert, pdata->critical); in imx_sc_thermal_get_temp()
68 mdelay(pdata->polling_delay); in imx_sc_thermal_get_temp()
72 if (cpu_temp >= pdata->alert && !pdata->alert) in imx_sc_thermal_get_temp()
106 pdata->zone_node = 1; in imx_sc_thermal_bind()
140 if (pdata->zone_node) in imx_sc_thermal_of_to_plat()
154 pdata->id = args.args[0]; in imx_sc_thermal_of_to_plat()
156 pdata->id = 0; in imx_sc_thermal_of_to_plat()
169 pdata->critical = fdtdec_get_int(gd->fdt_blob, in imx_sc_thermal_of_to_plat()
174 pdata->alert = fdtdec_get_int(gd->fdt_blob, in imx_sc_thermal_of_to_plat()
[all …]
/u-boot/drivers/usb/phy/
A Drockchip_usb2_phy.c65 writel(val, pdata->regs_phy + reg->offset); in property_enable()
71 struct dwc2_plat_otg_data *pdata = dev->pdata; in otg_phy_init() local
78 if (ofnode_device_is_compatible(pdata->phy_of_node, in otg_phy_init()
90 pdata->priv = phy_cfg; in otg_phy_init()
92 property_enable(pdata, &phy_cfg->soft_con, false); in otg_phy_init()
95 property_enable(pdata, &phy_cfg->port_reset, true); in otg_phy_init()
97 property_enable(pdata, &phy_cfg->port_reset, false); in otg_phy_init()
103 struct dwc2_plat_otg_data *pdata = dev->pdata; in otg_phy_off() local
104 struct rockchip_usb2_phy_cfg *phy_cfg = pdata->priv; in otg_phy_off()
107 property_enable(pdata, &phy_cfg->soft_con, true); in otg_phy_off()
[all …]
/u-boot/drivers/power/domain/
A Dimx8m-power-domain.c34 struct imx8m_power_domain_plat *pdata; in imx8m_power_domain_on() local
36 pdata = dev_get_plat(dev); in imx8m_power_domain_on()
38 if (pdata->resource_id < 0) in imx8m_power_domain_on()
41 if (pdata->has_pd) in imx8m_power_domain_on()
42 power_domain_on(&pdata->pd); in imx8m_power_domain_on()
53 struct imx8m_power_domain_plat *pdata; in imx8m_power_domain_off() local
54 pdata = dev_get_plat(dev); in imx8m_power_domain_off()
56 if (pdata->resource_id < 0) in imx8m_power_domain_off()
62 if (pdata->has_pd) in imx8m_power_domain_off()
63 power_domain_off(&pdata->pd); in imx8m_power_domain_off()
[all …]
A Dimx8-power-domain-legacy.c104 struct imx8_power_domain_plat *pdata; in imx8_power_domain_on() local
124 pdata->resource_id); in imx8_power_domain_on()
130 if (pdata->resource_id != SC_R_NONE) { in imx8_power_domain_on()
155 struct imx8_power_domain_plat *pdata; in imx8_power_domain_off_node() local
159 pdata = dev_get_plat(dev); in imx8_power_domain_off_node()
179 if (pdata->resource_id != SC_R_NONE) { in imx8_power_domain_off_node()
206 struct imx8_power_domain_plat *pdata; in imx8_power_domain_off_parentnodes() local
211 pdata = in imx8_power_domain_off_parentnodes()
242 if (pdata->resource_id != SC_R_NONE) { in imx8_power_domain_off_parentnodes()
244 pdata->resource_id, in imx8_power_domain_off_parentnodes()
[all …]
/u-boot/drivers/power/regulator/
A Dtps62360_regulator.c46 struct tps62360_regulator_pdata *pdata = dev_get_plat(dev); in tps62360_regulator_set_value() local
49 if (uV < pdata->config->vmin || uV > pdata->config->vmax) in tps62360_regulator_set_value()
52 uV -= pdata->config->vmin; in tps62360_regulator_set_value()
61 return dm_i2c_write(pdata->i2c, TPS62360_REG_SET0 + pdata->vsel_offset, in tps62360_regulator_set_value()
69 struct tps62360_regulator_pdata *pdata = dev_get_plat(dev); in tps62360_regulator_get_value() local
71 ret = dm_i2c_read(pdata->i2c, TPS62360_REG_SET0 + pdata->vsel_offset, in tps62360_regulator_get_value()
78 return (u32)regval * TPS62360_VSEL_STEPSIZE + pdata->config->vmin; in tps62360_regulator_get_value()
83 struct tps62360_regulator_pdata *pdata = dev_get_plat(dev); in tps62360_regulator_probe() local
88 pdata->config = (void *)dev_get_driver_data(dev); in tps62360_regulator_probe()
93 pdata->vsel_offset = vsel0 + vsel1 * 2; in tps62360_regulator_probe()
[all …]
A Dtps65910_regulator.c145 int vin = pdata->supply; in tps65910_regulator_get_value()
162 if (!pdata) in tps65910_ldo_get_value()
164 vin = pdata->supply; in tps65910_ldo_get_value()
166 switch (pdata->unit) { in tps65910_ldo_get_value()
220 int vin = pdata->supply; in tps65910_ldo_set_value()
222 switch (pdata->unit) { in tps65910_ldo_set_value()
310 switch (pdata->unit) { in tps65910_buck_get_value()
329 switch (pdata->unit) { in buck_set_vdd1_vdd2_value()
374 if (pdata->unit == TPS65910_UNIT_VIO) in tps65910_buck_set_value()
397 if (pdata->unit > TPS65910_UNIT_VMMC) in tps65910_regulator_of_to_plat()
[all …]
/u-boot/drivers/net/
A Dgmac_rockchip.c64 pdata->clock_input = true; in gmac_rockchip_of_to_plat()
66 pdata->clock_input = false; in gmac_rockchip_of_to_plat()
398 DELAY_ENABLE(RK3228, pdata->tx_delay, pdata->rx_delay)); in rk3228_gmac_set_to_rgmii()
421 DELAY_ENABLE(RK3288, pdata->rx_delay, pdata->tx_delay) | in rk3288_gmac_set_to_rgmii()
476 DELAY_ENABLE(RK3328, pdata->tx_delay, pdata->rx_delay)); in rk3328_gmac_set_to_rgmii()
517 DELAY_ENABLE(RK3368, pdata->tx_delay, pdata->rx_delay) | in rk3368_gmac_set_to_rgmii()
537 DELAY_ENABLE(RK3399, pdata->tx_delay, pdata->rx_delay) | in rk3399_gmac_set_to_rgmii()
601 pdata->tx_delay = 0; in gmac_rockchip_probe()
602 pdata->rx_delay = 0; in gmac_rockchip_probe()
631 pdata->tx_delay = 0; in gmac_rockchip_probe()
[all …]
A Ddwmac_socfpga.c30 struct dwmac_socfpga_plat *pdata = dev_get_plat(dev); in dwmac_socfpga_of_to_plat() local
61 pdata->phy_intf = range + args.args[0]; in dwmac_socfpga_of_to_plat()
62 pdata->reg_shift = args.args[1]; in dwmac_socfpga_of_to_plat()
69 struct dwmac_socfpga_plat *pdata = dev_get_plat(dev); in dwmac_socfpga_do_setphy() local
70 u32 modemask = SYSMGR_EMACGRP_CTRL_PHYSEL_MASK << pdata->reg_shift; in dwmac_socfpga_do_setphy()
73 u32 index = ((u64)pdata->phy_intf - socfpga_get_sysmgr_addr() - in dwmac_socfpga_do_setphy()
80 modereg << pdata->reg_shift); in dwmac_socfpga_do_setphy()
86 clrsetbits_le32(pdata->phy_intf, modemask, in dwmac_socfpga_do_setphy()
87 modereg << pdata->reg_shift); in dwmac_socfpga_do_setphy()
95 struct dwmac_socfpga_plat *pdata = dev_get_plat(dev); in dwmac_socfpga_probe() local
[all …]
A Dfsl_mdio.c156 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in tsec_mdio_read() local
159 if (pdata && pdata->mii_bus) in tsec_mdio_read()
160 return tsec_phy_read(pdata->mii_bus, addr, devad, reg); in tsec_mdio_read()
168 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in tsec_mdio_write() local
171 if (pdata && pdata->mii_bus) in tsec_mdio_write()
172 return tsec_phy_write(pdata->mii_bus, addr, devad, reg, val); in tsec_mdio_write()
179 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in tsec_mdio_reset() local
182 if (pdata && pdata->mii_bus) in tsec_mdio_reset()
183 return fsl_pq_mdio_reset(pdata->mii_bus); in tsec_mdio_reset()
219 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in tsec_mdio_probe() local
[all …]
/u-boot/drivers/pinctrl/
A Dpinctrl-single.c57 if ((reg < 0) || (reg > pdata->offset)) { in single_configure_pins()
61 reg += pdata->base; in single_configure_pins()
63 switch (pdata->width) { in single_configure_pins()
72 pdata->width); in single_configure_pins()
91 if ((reg < 0) || (reg > pdata->offset)) { in single_configure_bits()
95 reg += pdata->base; in single_configure_bits()
100 switch (pdata->width) { in single_configure_bits()
109 pdata->width); in single_configure_bits()
158 pdata->width = in single_of_to_plat()
164 pdata->offset = of_reg[1] - pdata->width / 8; in single_of_to_plat()
[all …]
/u-boot/drivers/w1/
A Dmxc_w1.c62 u16 *ctrl_addr = &pdata->regs->control; in mxc_w1_touch_bit()
82 struct mxc_w1_pdata *pdata = dev_get_plat(dev); in mxc_w1_read_byte() local
83 struct mxc_w1_regs *regs = pdata->regs; in mxc_w1_read_byte()
91 ret |= (mxc_w1_touch_bit(pdata, 1) << i); in mxc_w1_read_byte()
110 struct mxc_w1_regs *regs = pdata->regs; in mxc_w1_write_byte()
117 mxc_w1_touch_bit(pdata, (byte >> i) & 0x1); in mxc_w1_write_byte()
139 reg_val = readw(&pdata->regs->control); in mxc_w1_reset()
148 u8 id_bit = mxc_w1_touch_bit(pdata, 1); in mxc_w1_triplet()
149 u8 comp_bit = mxc_w1_touch_bit(pdata, 1); in mxc_w1_triplet()
164 mxc_w1_touch_bit(pdata, bdir); in mxc_w1_triplet()
[all …]
A Dw1-gpio.c36 struct w1_gpio_pdata *pdata = dev_get_plat(dev); in w1_gpio_read_bit() local
39 dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); in w1_gpio_read_bit()
42 dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_IN); in w1_gpio_read_bit()
45 val = dm_gpio_get_value(&pdata->gpio); in w1_gpio_read_bit()
66 struct w1_gpio_pdata *pdata = dev_get_plat(dev); in w1_gpio_write_bit() local
68 dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); in w1_gpio_write_bit()
72 dm_gpio_set_value(&pdata->gpio, 1); in w1_gpio_write_bit()
87 struct w1_gpio_pdata *pdata = dev_get_plat(dev); in w1_gpio_reset() local
94 dm_gpio_set_value(&pdata->gpio, 0); in w1_gpio_reset()
102 val = dm_gpio_get_value(&pdata->gpio); in w1_gpio_reset()
[all …]
/u-boot/net/
A Deth-uclass.c148 struct eth_pdata *pdata; in eth_get_ethaddr() local
151 pdata = dev_get_plat(eth_get_dev()); in eth_get_ethaddr()
152 return pdata->enetaddr; in eth_get_ethaddr()
197 struct eth_pdata *pdata; in eth_write_hwaddr() local
205 pdata = dev_get_plat(dev); in eth_write_hwaddr()
208 dev->name, pdata->enetaddr); in eth_write_hwaddr()
247 memset(pdata->enetaddr, 0, ARP_HLEN); in on_ethaddr()
561 source, pdata->enetaddr); in eth_post_probe()
570 pdata->enetaddr); in eth_post_probe()
574 net_random_ethaddr(pdata->enetaddr); in eth_post_probe()
[all …]
A Dmdio-uclass.c96 struct mdio_perdev_priv *pdata = dev_get_uclass_priv(dev); in dm_mdio_post_probe() local
98 pdata->mii_bus = mdio_alloc(); in dm_mdio_post_probe()
99 pdata->mii_bus->read = mdio_read; in dm_mdio_post_probe()
100 pdata->mii_bus->write = mdio_write; in dm_mdio_post_probe()
101 pdata->mii_bus->reset = mdio_reset; in dm_mdio_post_probe()
102 pdata->mii_bus->priv = dev; in dm_mdio_post_probe()
103 strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN - 1); in dm_mdio_post_probe()
105 return mdio_register(pdata->mii_bus); in dm_mdio_post_probe()
110 struct mdio_perdev_priv *pdata = dev_get_uclass_priv(dev); in dm_mdio_pre_remove() local
115 mdio_unregister(pdata->mii_bus); in dm_mdio_pre_remove()
[all …]
A Ddsa-uclass.c332 pdata->master_node = ofnode_null(); in dsa_post_bind()
342 pdata->num_ports = ofnode_get_child_count(node); in dsa_post_bind()
343 if (pdata->num_ports <= 0 || pdata->num_ports > DSA_MAX_PORTS) { in dsa_post_bind()
345 pdata->num_ports); in dsa_post_bind()
357 pdata->cpu_port_node = pnode; in dsa_post_bind()
361 if (!ofnode_valid(pdata->master_node)) { in dsa_post_bind()
372 ofnode_get_name(pdata->master_node), pdata->cpu_port); in dsa_post_bind()
374 for (i = 0; i < pdata->num_ports; i++) { in dsa_post_bind()
383 if (i == pdata->cpu_port) in dsa_post_bind()
441 priv->num_ports = pdata->num_ports; in dsa_pre_probe()
[all …]
/u-boot/drivers/usb/gadget/
A Ddwc2_udc_otg_phy.c42 unsigned int usb_phy_ctrl = dev->pdata->usb_phy_ctrl; in otg_phy_init()
44 (struct dwc2_usbotg_phy *)dev->pdata->regs_phy; in otg_phy_init()
46 dev->pdata->phy_control(1); in otg_phy_init()
54 if (dev->pdata->usb_flags == PHY0_SLEEP) /* C210 Universal */ in otg_phy_init()
80 unsigned int usb_phy_ctrl = dev->pdata->usb_phy_ctrl; in otg_phy_off()
82 (struct dwc2_usbotg_phy *)dev->pdata->regs_phy; in otg_phy_off()
100 dev->pdata->phy_control(0); in otg_phy_off()
/u-boot/drivers/mtd/
A Daltera_qspi.c111 ulong base = (ulong)pdata->base; in write_buff()
140 struct altera_qspi_regs *regs = pdata->regs; in altera_qspi_erase()
159 flash = pdata->base + addr; in altera_qspi_erase()
160 last = pdata->base + addr + mtd->erasesize; in altera_qspi_erase()
203 memcpy_fromio(buf, pdata->base + from, len); in altera_qspi_read()
214 struct altera_qspi_regs *regs = pdata->regs; in altera_qspi_write()
217 memcpy_toio(pdata->base + to, buf, len); in altera_qspi_write()
240 struct altera_qspi_regs *regs = pdata->regs; in altera_qspi_get_locked_range()
383 pdata->regs = base; in altera_qspi_of_to_plat()
385 pdata->base = base; in altera_qspi_of_to_plat()
[all …]
/u-boot/drivers/mmc/
A Dmeson_gx_mmc.c30 struct meson_mmc_plat *pdata = mmc->priv; in get_regbase() local
32 return pdata->regbase; in get_regbase()
163 struct meson_mmc_plat *pdata = mmc->priv; in meson_mmc_setup_addr() local
176 data_addr = (ulong) pdata->w_buf; in meson_mmc_setup_addr()
201 struct meson_mmc_plat *pdata = mmc->priv; in meson_dm_mmc_send_cmd() local
231 free(pdata->w_buf); in meson_dm_mmc_send_cmd()
253 pdata->regbase = (void *)addr; in meson_mmc_of_to_plat()
262 struct mmc *mmc = &pdata->mmc; in meson_mmc_probe()
263 struct mmc_config *cfg = &pdata->cfg; in meson_mmc_probe()
286 mmc->priv = pdata; in meson_mmc_probe()
[all …]
/u-boot/drivers/net/fm/
A Dmemac_phy.c248 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in fm_mdio_read() local
251 if (pdata && pdata->mii_bus) in fm_mdio_read()
252 return memac_mdio_read(pdata->mii_bus, addr, devad, reg); in fm_mdio_read()
260 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in fm_mdio_write() local
263 if (pdata && pdata->mii_bus) in fm_mdio_write()
264 return memac_mdio_write(pdata->mii_bus, addr, devad, reg, val); in fm_mdio_write()
271 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in fm_mdio_reset() local
274 if (pdata && pdata->mii_bus) in fm_mdio_reset()
275 return memac_mdio_reset(pdata->mii_bus); in fm_mdio_reset()
294 struct mdio_perdev_priv *pdata = (dev) ? dev_get_uclass_priv(dev) : in fm_mdio_probe() local
[all …]
/u-boot/drivers/demo/
A Ddemo-uclass.c69 struct dm_demo_pdata *pdata = dev_get_plat(dev); in demo_parse_dt() local
72 pdata->sides = fdtdec_get_int(gd->fdt_blob, dn, "sides", 0); in demo_parse_dt()
73 pdata->colour = fdt_getprop(gd->fdt_blob, dn, "colour", NULL); in demo_parse_dt()
74 if (!pdata->sides || !pdata->colour) { in demo_parse_dt()

Completed in 2562 milliseconds

123456