/u-boot/drivers/ram/mediatek/ |
A D | ddr3-mt7629.c | 273 ret = clk_set_parent(&priv->phy, &priv->phy_mux); in mtk_ddr3_init() 278 writel(0x00003010, priv->emi + EMI_CONA); in mtk_ddr3_init() 279 writel(0x00000000, priv->emi + EMI_CONF); in mtk_ddr3_init() 280 writel(0x000006b8, priv->emi + EMI_CONM); in mtk_ddr3_init() 337 writel(0x0, priv->ddrphy + DDRPHY_PLL1); in mtk_ddr3_init() 338 writel(0x0, priv->ddrphy + DDRPHY_PLL2); in mtk_ddr3_init() 422 ret = clk_set_parent(&priv->mem, &priv->mem_mux); in mtk_ddr3_init() 688 if (priv->emi == FDT_ADDR_T_NONE) in mtk_ddr3_probe() 692 if (priv->ddrphy == FDT_ADDR_T_NONE) in mtk_ddr3_probe() 696 if (priv->dramc_ao == FDT_ADDR_T_NONE) in mtk_ddr3_probe() [all …]
|
/u-boot/drivers/mmc/ |
A D | renesas-sdhi.c | 192 priv->tap_num + 1) % priv->tap_num; in renesas_sdhi_check_scc_error() 198 priv->tap_num - 1) % priv->tap_num; in renesas_sdhi_check_scc_error() 224 priv->tap_set = (priv->tap_set + in renesas_sdhi_check_scc_error() 225 priv->tap_num + 1) % priv->tap_num; in renesas_sdhi_check_scc_error() 227 priv->tap_set = (priv->tap_set + in renesas_sdhi_check_scc_error() 228 priv->tap_num - 1) % priv->tap_num; in renesas_sdhi_check_scc_error() 234 tmio_sd_writel(priv, priv->tap_set >> ((priv->nrtaps == 4) ? 1 : 0), in renesas_sdhi_check_scc_error() 411 priv->tap_num + 1) % priv->tap_num; in renesas_sdhi_hs400() 415 priv->tap_num - 1) % priv->tap_num; in renesas_sdhi_hs400() 427 tmio_sd_writel(priv, priv->tap_set >> 1, in renesas_sdhi_hs400() [all …]
|
/u-boot/drivers/i2c/ |
A D | i2c-versatile.c | 33 udelay(priv->delay); in versatile_sda_set() 40 udelay(priv->delay); in versatile_sda_get() 47 udelay(priv->delay); in versatile_scl_set() 54 udelay(priv->delay); in versatile_scl_get() 61 udelay(priv->delay); in versatile_i2c_start() 62 versatile_sda_set(priv, 1); in versatile_i2c_start() 63 versatile_scl_set(priv, 1); in versatile_i2c_start() 64 versatile_sda_set(priv, 0); in versatile_i2c_start() 82 udelay(priv->delay); in versatile_i2c_read_bit() 92 udelay(priv->delay); in versatile_i2c_write_bit() [all …]
|
A D | acpi_i2c.c | 109 if (priv->wake) { in acpi_i2c_fill_ssdt() 115 if (priv->probed || priv->property_count || priv->compat_string || in acpi_i2c_fill_ssdt() 125 if (priv->compat_string) in acpi_i2c_fill_ssdt() 128 if (priv->probed) in acpi_i2c_fill_ssdt() 133 priv->irq_gpio.flags & in acpi_i2c_fill_ssdt() 156 &priv->reset_gpio, priv->reset_delay_ms, in acpi_i2c_fill_ssdt() 157 priv->reset_off_delay_ms, &priv->enable_gpio, in acpi_i2c_fill_ssdt() 158 priv->enable_delay_ms, priv->enable_off_delay_ms, in acpi_i2c_fill_ssdt() 159 &priv->stop_gpio, priv->stop_delay_ms, in acpi_i2c_fill_ssdt() 160 priv->stop_off_delay_ms); in acpi_i2c_fill_ssdt() [all …]
|
/u-boot/drivers/net/ |
A D | mtk_eth.c | 530 struct mtk_eth_priv *priv = bus->priv; in mtk_mdio_read() local 533 return priv->mii_read(priv, addr, reg); in mtk_mdio_read() 535 return priv->mmd_read(priv, addr, devad, reg); in mtk_mdio_read() 541 struct mtk_eth_priv *priv = bus->priv; in mtk_mdio_write() local 544 return priv->mii_write(priv, addr, reg, val); in mtk_mdio_write() 583 mdio_bus->priv = (void *)priv; in mtk_mdio_register() 606 priv->mmd_write(priv, phy_addr, 0x1f, reg, val); in mt753x_core_reg_write() 855 priv->mii_write(priv, i, 0x1f, 0x1); in mt7531_phy_setting() 856 val = priv->mii_read(priv, i, PHY_EXT_REG_14); in mt7531_phy_setting() 903 mt7531_core_pll_setup(priv, priv->mcm); in mt7531_setup() [all …]
|
A D | dc2114x.c | 306 priv->tx_ring[priv->tx_new].buf = cpu_to_le32(phys_to_bus(priv->devno, in send_setup_frame() 326 priv->tx_new = (priv->tx_new + 1) % NUM_TX_DESC; in send_setup_frame() 347 priv->tx_ring[priv->tx_new].buf = cpu_to_le32(phys_to_bus(priv->devno, in dc21x4x_send_common() 363 priv->tx_ring[priv->tx_new].status = 0x0; in dc21x4x_send_common() 438 dc2114x_outl(priv, phys_to_bus(priv->devno, (u32)&priv->rx_ring), in dc21x4x_init_common() 440 dc2114x_outl(priv, phys_to_bus(priv->devno, (u32)&priv->tx_ring), in dc21x4x_init_common() 539 priv->rx_new = (priv->rx_new + 1) % priv->rx_ring_size; in dc21x4x_recv() 589 priv = memalign(32, sizeof(*priv)); in dc21x4x_initialize() 594 memset(priv, 0, sizeof(*priv)); in dc21x4x_initialize() 667 priv->rx_new = (priv->rx_new + 1) % priv->rx_ring_size; in dc2114x_recv() [all …]
|
A D | smc911x.c | 200 priv->enetaddr[0] = addrl; in smc911x_read_mac_address() 261 smc911x_phy_reset(priv); in smc911x_phy_configure() 309 smc911x_reset(priv); in smc911x_init_common() 317 smc911x_enable(priv); in smc911x_init_common() 364 smc911x_reset(priv); in smc911x_halt_common() 408 if (!dev || !priv) in smc911x_miiphy_read() 425 if (!dev || !priv) in smc911x_miiphy_write() 497 priv = calloc(1, sizeof(*priv)); in smc911x_initialize() 498 if (!priv) in smc911x_initialize() 512 memcpy(priv->dev.enetaddr, priv->enetaddr, 6); in smc911x_initialize() [all …]
|
A D | mt7620-eth.c | 349 struct mt7620_eth_priv *priv = bus->priv; in mt7620_mdio_read() local 379 struct mt7620_eth_priv *priv = bus->priv; in mt7620_mdio_write() local 419 mdio_bus->priv = (void *)priv; in mt7620_mdio_register() 564 mt7620_phy_restart_an(priv, priv->port_cfg[0].phy_addr); in mt7620_gsw_ephy_init() 780 mt7620_setup_gmac_mode(priv, 1, priv->port_cfg[1].mode); in mt7620_gsw_init() 781 mt7620_setup_gmac_mode(priv, 2, priv->port_cfg[0].mode); in mt7620_gsw_init() 789 mt7620_gsw_setup_port(priv, 4, &priv->port_cfg[0]); in mt7620_gsw_init() 790 mt7620_gsw_setup_port(priv, 5, &priv->port_cfg[1]); in mt7620_gsw_init() 791 mt7620_gsw_setup_port(priv, 6, &priv->port_cfg[2]); in mt7620_gsw_init() 837 pdma_write(priv, TX_CTX_IDX0, priv->tx_cpu_owner_idx0); in mt7620_eth_fifo_init() [all …]
|
A D | ethoc.c | 300 ethoc_write_bd(priv, priv->num_tx + i, &bd); in ethoc_init_ring() 338 ethoc_write(priv, TX_BD_NUM, priv->num_tx); in ethoc_init_common() 399 u32 i = priv->cur_rx % priv->num_rx; in ethoc_rx_common() 457 u32 entry = priv->dty_tx % priv->num_tx; in ethoc_tx() 472 entry = priv->cur_tx % priv->num_tx; in ethoc_send_common() 521 u32 i = priv->cur_rx % priv->num_rx; in ethoc_free_pkt_common() 546 struct ethoc *priv = bus->priv; in ethoc_mdio_read() local 568 struct ethoc *priv = bus->priv; in ethoc_mdio_write() local 598 bus->priv = priv; in ethoc_mdio_init() 810 priv = malloc(sizeof(*priv)); in ethoc_initialize() [all …]
|
A D | eepro100.c | 323 struct eepro100_priv *priv = bus->priv; in eepro100_miiphy_read() local 343 struct eepro100_priv *priv = bus->priv; in eepro100_miiphy_write() local 499 mdiodev->priv = priv; in eepro100_initialize_mii() 586 OUTL(priv, phys_to_bus(priv->devno, (u32)&rx_ring[priv->rx_next]), in eepro100_init_common() 592 priv->tx_next = ((priv->tx_next + 1) % NUM_TX_DESC); in eepro100_init_common() 613 priv->tx_next = ((priv->tx_next + 1) % NUM_TX_DESC); in eepro100_init_common() 651 priv->tx_next = (priv->tx_next + 1) % NUM_TX_DESC; in eepro100_send_common() 687 priv->rx_stat = INW(priv, SCB_STATUS); in eepro100_recv_common() 733 priv->rx_next = (priv->rx_next + 1) % NUM_RX_DESC; in eepro100_free_pkt_common() 749 OUTL(priv, phys_to_bus(priv->devno, (u32)&rx_ring[priv->rx_next]), in eepro100_free_pkt_common() [all …]
|
/u-boot/drivers/spi/ |
A D | omap3_spi.c | 47 writel(val, &priv->regs->channel[priv->cs].chconf); in omap3_spi_write_chconf() 49 readl(&priv->regs->channel[priv->cs].chconf); in omap3_spi_write_chconf() 54 writel(enable, &priv->regs->channel[priv->cs].chctrl); in omap3_spi_set_enable() 56 readl(&priv->regs->channel[priv->cs].chctrl); in omap3_spi_set_enable() 65 chconf = readl(&priv->regs->channel[priv->cs].chconf); in omap3_spi_write() 83 readl(&priv->regs->channel[priv->cs].chstat)); in omap3_spi_write() 131 writel(0, &priv->regs->channel[priv->cs].tx); in omap3_spi_read() 140 readl(&priv->regs->channel[priv->cs].chstat)); in omap3_spi_read() 193 readl(&priv->regs->channel[priv->cs].chstat)); in omap3_spi_txrx() 212 readl(&priv->regs->channel[priv->cs].chstat)); in omap3_spi_txrx() [all …]
|
A D | designware_spi.c | 388 tx_left = (priv->tx_end - priv->tx) / (priv->bits_per_word >> 3); in tx_max() 399 rxtx_gap = ((priv->rx_end - priv->rx) - (priv->tx_end - priv->tx)) / in tx_max() 420 if (priv->tx_end - priv->len) { in dw_writer() 442 if (priv->rx_end - priv->len) { in dw_reader() 513 cr0 = priv->update_cr0(priv); in dw_spi_xfer() 518 priv->tx_end = priv->tx + priv->len; in dw_spi_xfer() 520 priv->rx_end = priv->rx + priv->len; in dw_spi_xfer() 584 cr0 = priv->update_cr0(priv); in dw_spi_exec_op() 610 priv->tx_end = priv->tx + op_len; in dw_spi_exec_op() 613 while (priv->tx != priv->tx_end) in dw_spi_exec_op() [all …]
|
A D | stm32_spi.c | 122 u32 offs = priv->cur_xferlen - priv->tx_len; in stm32_spi_write_txfifo() 155 u32 offs = priv->cur_xferlen - priv->rx_len; in stm32_spi_read_rxfifo() 385 priv->tx_len = priv->tx_buf ? bitlen / 8 : 0; in stm32_spi_xfer() 386 priv->rx_len = priv->rx_buf ? bitlen / 8 : 0; in stm32_spi_xfer() 394 if (priv->cur_xferlen != xferlen || priv->cur_mode != mode) { in stm32_spi_xfer() 411 priv->tx_len, priv->rx_len); in stm32_spi_xfer() 435 if (priv->rx_buf && priv->rx_len > 0) in stm32_spi_xfer() 445 if (priv->tx_buf && priv->tx_len > 0) in stm32_spi_xfer() 449 if (priv->rx_buf && priv->rx_len > 0) in stm32_spi_xfer() 453 if (priv->rx_buf && priv->rx_len > 0) in stm32_spi_xfer() [all …]
|
A D | pic32_spi.c | 114 tx_left = (priv->tx_end - priv->tx) / n_bytes; in pic32_tx_max() 115 tx_room = priv->fifo_n_word - pic32_spi_tx_fifo_level(priv); in pic32_tx_max() 117 rxtx_gap = (priv->rx_end - priv->rx) - (priv->tx_end - priv->tx); in pic32_tx_max() 125 u32 rx_left = (priv->rx_end - priv->rx) / n_bytes; in pic32_rx_max() 138 if (priv->rx_end - priv->len) \ 151 if (priv->tx_end - priv->len) \ 262 priv->tx_end = priv->tx + len; in pic32_spi_xfer() 263 priv->rx_end = priv->rx + len; in pic32_spi_xfer() 269 priv->tx_fifo(priv); in pic32_spi_xfer() 270 priv->rx_fifo(priv); in pic32_spi_xfer() [all …]
|
A D | zynq_qspi.c | 362 !priv->rx_buf) in zynq_qspi_fill_tx_fifo() 416 rxcount = priv->bytes_to_receive - priv->bytes_to_transfer; in zynq_qspi_irq_poll() 475 (u32)priv, (u32)priv, priv->len); in zynq_qspi_start_transfer() 477 priv->bytes_to_transfer = priv->len; in zynq_qspi_start_transfer() 478 priv->bytes_to_receive = priv->len; in zynq_qspi_start_transfer() 481 zynq_qspi_fill_tx_fifo(priv, priv->len); in zynq_qspi_start_transfer() 483 zynq_qspi_fill_tx_fifo(priv, priv->fifo_depth); in zynq_qspi_start_transfer() 492 return (priv->len) - (priv->bytes_to_transfer); in zynq_qspi_start_transfer() 507 if (!priv->tx_buf && !priv->rx_buf && priv->len) { in zynq_qspi_transfer() 513 if (priv->len) { in zynq_qspi_transfer() [all …]
|
A D | bcmstb_spi.c | 172 priv->tx_slot = 0; in bcmstb_spi_probe() 173 priv->rx_slot = 0; in bcmstb_spi_probe() 210 writel(priv->tx_slot - 1, &priv->regs->endqp); in bcmstb_spi_submit() 214 readl(&priv->regs->cdram[priv->tx_slot - 1]) & ~0x80); in bcmstb_spi_submit() 215 writel(readl(&priv->regs->cdram[priv->tx_slot - 1]) & ~0x80, in bcmstb_spi_submit() 216 &priv->regs->cdram[priv->tx_slot - 1]); in bcmstb_spi_submit() 220 if (priv->curr_cs != priv->default_cs) { in bcmstb_spi_submit() 223 writel((readl(priv->cs_reg) & ~0xff) | (1 << priv->default_cs), in bcmstb_spi_submit() 227 priv->curr_cs = priv->default_cs; in bcmstb_spi_submit() 323 memcpy(priv->saved_cmd, out_bytes, priv->saved_cmd_len); in bcmstb_spi_xfer() [all …]
|
/u-boot/arch/sandbox/cpu/ |
A D | eth-raw-os.c | 62 if (!if_indextoname(priv->host_ifindex, priv->host_ifname)) in sandbox_eth_raw_os_idx_to_name() 90 if (priv->sd < 0) { in _raw_packet_start() 97 priv->host_ifname, strlen(priv->host_ifname) + 1); in _raw_packet_start() 165 if (priv->sd < 0) { in _local_inet_start() 189 if (priv->local) in sandbox_eth_raw_os_start() 201 if (priv->sd < 0 || !priv->device) in sandbox_eth_raw_os_send() 217 if (priv->local && (priv->local_bind_sd == -1 || in sandbox_eth_raw_os_send() 266 if (priv->sd < 0 || !priv->device) in sandbox_eth_raw_os_recv() 285 free(priv->device); in sandbox_eth_raw_os_stop() 288 priv->sd = -1; in sandbox_eth_raw_os_stop() [all …]
|
/u-boot/drivers/video/meson/ |
A D | meson_vpu_init.c | 171 priv->io_base + in meson_viu_set_osd_matrix() 174 priv->io_base + in meson_viu_set_osd_matrix() 177 priv->io_base + in meson_viu_set_osd_matrix() 179 writel(m[17] & 0x1fff, priv->io_base + in meson_viu_set_osd_matrix() 192 priv->io_base + in meson_viu_set_osd_matrix() 195 priv->io_base + in meson_viu_set_osd_matrix() 301 priv->io_base + _REG(ctrl_port)); in meson_viu_set_osd_lut() 447 priv->io_base + _REG(VPP_MISC)); in meson_vpu_init() 451 priv->io_base + _REG(VPP_MISC)); in meson_vpu_init() 457 priv->io_base + _REG(VPP_MISC)); in meson_vpu_init() [all …]
|
/u-boot/drivers/video/exynos/ |
A D | exynos_fb.c | 213 (priv->vl_hspw + priv->vl_hfpd + in exynos_fimd_set_clock() 215 (priv->vl_vspw + priv->vl_vfpd + in exynos_fimd_set_clock() 216 priv->vl_vbpd + priv->vl_row); in exynos_fimd_set_clock() 219 priv->vl_width * priv->vl_height * in exynos_fimd_set_clock() 220 (priv->cs_setup + priv->wr_setup + in exynos_fimd_set_clock() 221 priv->wr_act + priv->wr_hold + 1); in exynos_fimd_set_clock() 224 (priv->vl_hspw + priv->vl_hfpd + in exynos_fimd_set_clock() 225 priv->vl_hbpd + priv->vl_col) * in exynos_fimd_set_clock() 226 (priv->vl_vspw + priv->vl_vfpd + in exynos_fimd_set_clock() 227 priv->vl_vbpd + priv->vl_row); in exynos_fimd_set_clock() [all …]
|
/u-boot/drivers/phy/ |
A D | meson-axg-mipi-dphy.c | 200 memcpy(&priv->config, config, sizeof(priv->config)); in phy_meson_axg_mipi_dphy_configure() 267 switch (priv->config.lanes) { in phy_meson_axg_mipi_dphy_power_on() 306 ret = generic_phy_init(&priv->analog); in phy_meson_axg_mipi_dphy_init() 310 ret = reset_assert(&priv->reset); in phy_meson_axg_mipi_dphy_init() 312 ret |= reset_deassert(&priv->reset); in phy_meson_axg_mipi_dphy_init() 325 ret = generic_phy_exit(&priv->analog); in phy_meson_axg_mipi_dphy_exit() 329 return reset_assert(&priv->reset); in phy_meson_axg_mipi_dphy_exit() 359 ret = reset_deassert(&priv->reset); in meson_axg_mipi_dphy_probe() 361 reset_release_all(&priv->reset, 1); in meson_axg_mipi_dphy_probe() 370 ret = clk_enable(&priv->clk); in meson_axg_mipi_dphy_probe() [all …]
|
/u-boot/drivers/video/ |
A D | pwm_backlight.c | 65 duty_cycle = priv->period_ns * (priv->cur_level - priv->min_level) / in set_pwm() 66 (priv->max_level - priv->min_level); in set_pwm() 67 ret = pwm_set_config(priv->pwm, priv->channel, priv->period_ns, in set_pwm() 72 ret = pwm_set_invert(priv->pwm, priv->channel, priv->polarity); in set_pwm() 86 if (priv->reg) { in enable_sequence() 122 ret = pwm_set_enable(priv->pwm, priv->channel, true); in pwm_backlight_enable() 153 level = priv->levels[percent * (priv->num_levels - 1) in pwm_backlight_set_brightness() 157 (priv->max_level - priv->min_level) * in pwm_backlight_set_brightness() 233 priv->default_level = priv->levels[index]; in pwm_backlight_of_to_plat() 234 priv->max_level = priv->levels[count - 1]; in pwm_backlight_of_to_plat() [all …]
|
A D | vidconsole-uclass.c | 85 if (priv->xcur_frac < priv->xstart_frac) { in vidconsole_back() 86 priv->xcur_frac = (priv->cols - 1) * in vidconsole_back() 88 priv->ycur -= priv->y_charsize; in vidconsole_back() 104 priv->xcur_frac = priv->xstart_frac; in vidconsole_newline() 105 priv->ycur += priv->y_charsize; in vidconsole_newline() 108 if ((priv->ycur + priv->y_charsize) / priv->y_charsize > priv->rows) { in vidconsole_newline() 113 priv->ycur -= rows * priv->y_charsize; in vidconsole_newline() 199 priv->ycur = row * priv->y_charsize; in set_cursor_position() 200 priv->xcur_frac = priv->xstart_frac + in set_cursor_position() 214 *row = priv->ycur / priv->y_charsize; in get_cursor_position() [all …]
|
/u-boot/drivers/usb/dwc3/ |
A D | dwc3-meson-g12a.c | 156 if (!priv->phys[i].dev) in dwc3_meson_g12a_usb2_init() 251 if (priv->usb3_ports) in dwc3_meson_g12a_usb_init() 263 if (!priv) in dwc3_meson_g12a_force_mode() 278 if (priv->vbus_supply) { in dwc3_meson_g12a_force_mode() 308 priv->usb3_ports++; in dwc3_meson_g12a_get_phys() 310 priv->usb2_ports++; in dwc3_meson_g12a_get_phys() 323 ret = reset_get_by_index(priv->dev, 0, &priv->reset); in dwc3_meson_g12a_reset_init() 342 ret = clk_get_by_index(priv->dev, 0, &priv->clk); in dwc3_meson_g12a_clk_init() 349 clk_free(&priv->clk); in dwc3_meson_g12a_clk_init() 362 priv->dev = dev; in dwc3_meson_g12a_probe() [all …]
|
A D | dwc3-meson-gxl.c | 159 if (!priv->phys[i].dev) in dwc3_meson_gxl_usb2_init() 192 dwc3_meson_gxl_usb2_set_mode(priv, priv->otg_phy_mode); in dwc3_meson_gxl_usb_init() 201 if (!priv) in dwc3_meson_gxl_force_mode() 219 if (priv->vbus_supply) { in dwc3_meson_gxl_force_mode() 250 priv->usb2_ports++; in dwc3_meson_gxl_get_phys() 262 ret = reset_get_by_index(priv->dev, 0, &priv->reset); in dwc3_meson_gxl_reset_init() 281 ret = clk_get_by_index(priv->dev, 0, &priv->clk); in dwc3_meson_gxl_clk_init() 288 clk_free(&priv->clk); in dwc3_meson_gxl_clk_init() 301 priv->dev = dev; in dwc3_meson_gxl_probe() 327 if (priv->vbus_supply) { in dwc3_meson_gxl_probe() [all …]
|
/u-boot/drivers/sound/ |
A D | max98090.c | 69 priv->rate = rate; in max98090_hw_params() 87 if (freq == priv->sysclk) in max98090_set_sysclk() 114 priv->sysclk = freq; in max98090_set_sysclk() 132 if (fmt == priv->fmt) in max98090_set_fmt() 135 priv->fmt = fmt; in max98090_set_fmt() 242 error = max98090_reset(priv); in max98090_device_init() 249 priv->sysclk = -1U; in max98090_device_init() 250 priv->rate = -1U; in max98090_device_init() 251 priv->fmt = -1U; in max98090_device_init() 346 priv->dev = dev; in max98090_probe() [all …]
|