/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | stmmac_pci.c | 25 plat->has_gmac = 1; in common_default_data() 57 plat->bus_id = 1; in stmmac_default_data() 58 plat->phy_addr = 0; in stmmac_default_data() 77 plat->clk_csr = 5; in snps_gmac5_default_data() 81 plat->pmt = 1; in snps_gmac5_default_data() 113 plat->bus_id = 1; in snps_gmac5_default_data() 121 plat->axi = devm_kzalloc(&pdev->dev, sizeof(*plat->axi), GFP_KERNEL); in snps_gmac5_default_data() 122 if (!plat->axi) in snps_gmac5_default_data() 162 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); in stmmac_pci_probe() 163 if (!plat) in stmmac_pci_probe() [all …]
|
H A D | stmmac_platform.c | 409 if (!plat) in stmmac_probe_config_dt() 426 plat->mac_interface = rc < 0 ? plat->phy_interface : rc; in stmmac_probe_config_dt() 604 plat->clk_ptp_rate = clk_get_rate(plat->stmmac_clk); in stmmac_probe_config_dt() 608 plat->clk_ptp_rate = clk_get_rate(plat->clk_ptp_ref); in stmmac_probe_config_dt() 626 return plat; in stmmac_probe_config_dt() 659 return plat; in devm_stmmac_probe_config_dt() 666 return plat; in devm_stmmac_probe_config_dt() 761 ret = plat->init(pdev, plat->bsp_priv); in stmmac_pltfr_init() 777 plat->exit(pdev, plat->bsp_priv); in stmmac_pltfr_exit() 849 struct plat_stmmacenet_data *plat = priv->plat; in stmmac_pltfr_remove_no_dt() local [all …]
|
H A D | dwmac-intel.c | 497 plat->tx_fifo_size = plat->tx_queues_to_use * 4096; in intel_mgbe_common_data() 498 plat->rx_fifo_size = plat->rx_queues_to_use * 4096; in intel_mgbe_common_data() 517 plat->axi = devm_kzalloc(&pdev->dev, sizeof(*plat->axi), in intel_mgbe_common_data() 519 if (!plat->axi) in intel_mgbe_common_data() 530 plat->ptp_max_adj = plat->clk_ptp_rate; in intel_mgbe_common_data() 531 plat->eee_usecs_rate = plat->clk_ptp_rate; in intel_mgbe_common_data() 565 plat->vlan_fail_q = plat->rx_queues_to_use - 1; in intel_mgbe_common_data() 648 plat->bus_id = 1; in ehl_sgmii_data() 666 plat->bus_id = 1; in ehl_rgmii_data() 1039 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); in intel_eth_pci_probe() [all …]
|
H A D | dwmac-mediatek.c | 119 switch (plat->phy_mode) { in mt2712_set_interface() 230 if (plat->rmii_rxc) { in mt2712_set_delay() 387 if (plat->rmii_rxc) { in mt8195_set_delay() 467 err = of_get_phy_mode(plat->np, &plat->phy_mode); in mediatek_dwmac_config_dt() 493 plat->rmii_rxc = of_property_read_bool(plat->np, "mediatek,rmii-rxc"); in mediatek_dwmac_config_dt() 495 plat->mac_wol = of_property_read_bool(plat->np, "mediatek,mac-wol"); in mediatek_dwmac_config_dt() 505 plat->clks = devm_kcalloc(plat->dev, variant->num_clks, sizeof(*plat->clks), GFP_KERNEL); in mediatek_dwmac_clk_init() 506 if (!plat->clks) in mediatek_dwmac_clk_init() 512 ret = devm_clk_bulk_get(plat->dev, variant->num_clks, plat->clks); in mediatek_dwmac_clk_init() 523 plat->rmii_internal_clk = devm_clk_get(plat->dev, "rmii_internal"); in mediatek_dwmac_clk_init() [all …]
|
H A D | dwmac-loongson.c | 15 plat->has_gmac = 1; in loongson_default_data() 16 plat->force_sf_dma_mode = 1; in loongson_default_data() 25 plat->maxmtu = JUMBO_LEN; in loongson_default_data() 42 plat->phy_addr = -1; in loongson_default_data() 44 plat->dma_cfg->pbl = 32; in loongson_default_data() 65 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); in loongson_dwmac_probe() 66 if (!plat) in loongson_dwmac_probe() 76 if (plat->mdio_node) { in loongson_dwmac_probe() 81 plat->dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*plat->dma_cfg), GFP_KERNEL); in loongson_dwmac_probe() 82 if (!plat->dma_cfg) { in loongson_dwmac_probe() [all …]
|
/openbmc/u-boot/drivers/power/pmic/ |
H A D | i2c_pmic_emul.c | 33 if (plat->rw_idx + len > plat->buf_size) { in sandbox_i2c_pmic_read_data() 40 (unsigned int)chip & 0xff, plat->rw_reg, plat->rw_idx, len); in sandbox_i2c_pmic_read_data() 42 memcpy(buffer, plat->reg + plat->rw_idx, len); in sandbox_i2c_pmic_read_data() 59 plat->rw_idx = plat->rw_reg * plat->trans_len; in sandbox_i2c_pmic_write_data() 62 (unsigned int)chip & 0xff, plat->rw_reg, plat->rw_idx, len); in sandbox_i2c_pmic_write_data() 71 if (plat->rw_idx + len > plat->buf_size) { in sandbox_i2c_pmic_write_data() 76 memcpy(plat->reg + plat->rw_idx, buffer, len); in sandbox_i2c_pmic_write_data() 114 plat->buf_size = plat->reg_count * plat->trans_len; in sandbox_i2c_pmic_ofdata_to_platdata() 116 plat->reg = calloc(1, plat->buf_size); in sandbox_i2c_pmic_ofdata_to_platdata() 117 if (!plat->reg) { in sandbox_i2c_pmic_ofdata_to_platdata() [all …]
|
/openbmc/u-boot/drivers/clk/altera/ |
H A D | clk-arria10.c | 53 if (!plat->ctl_reg) { in socfpga_a10_clk_get_upstream() 58 reg = readl(plat->regs + plat->ctl_reg); in socfpga_a10_clk_get_upstream() 88 clrbits_le32(plat->regs + plat->gate_reg, BIT(plat->gate_bit)); in socfpga_a10_clk_endisable() 102 setbits_le32(plat->regs + plat->gate_reg, BIT(plat->gate_bit)); in socfpga_a10_clk_endisable() 131 reg = readl(plat->regs + plat->ctl_reg + 4); /* VCO1 */ in socfpga_a10_clk_get_rate() 139 reg = readl(plat->regs + plat->ctl_reg + 4); /* VCO1 */ in socfpga_a10_clk_get_rate() 147 rate /= plat->fix_div; in socfpga_a10_clk_get_rate() 149 if (plat->fix_div == 1 && plat->ctl_reg) { in socfpga_a10_clk_get_rate() 150 reg = readl(plat->regs + plat->ctl_reg); in socfpga_a10_clk_get_rate() 155 if (plat->div_reg) { in socfpga_a10_clk_get_rate() [all …]
|
/openbmc/u-boot/drivers/gpio/ |
H A D | dwapb_gpio.c | 48 clrbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); in dwapb_gpio_direction_input() 57 setbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); in dwapb_gpio_direction_output() 60 setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_direction_output() 62 clrbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_direction_output() 79 setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_set_value() 81 clrbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); in dwapb_gpio_set_value() 91 gpio = readl(plat->base + GPIO_SWPORT_DDR(plat->bank)); in dwapb_gpio_get_function() 139 if (!plat) { in gpio_dwapb_probe() 159 if (plat) in gpio_dwapb_bind() 174 plat = devm_kcalloc(dev, 1, sizeof(*plat), GFP_KERNEL); in gpio_dwapb_bind() [all …]
|
H A D | mt7621_gpio.c | 118 if (plat) { in gpio_mediatek_probe() 138 if (plat) in gpio_mediatek_bind() 147 struct mediatek_gpio_platdata *plat; in gpio_mediatek_bind() local 150 plat = calloc(1, sizeof(*plat)); in gpio_mediatek_bind() 151 if (!plat) in gpio_mediatek_bind() 153 plat->bank_name[0] = 'P'; in gpio_mediatek_bind() 154 plat->bank_name[1] = 'A' + bank; in gpio_mediatek_bind() 155 plat->bank_name[2] = '\0'; in gpio_mediatek_bind() 156 plat->gpio_count = MTK_BANK_WIDTH; in gpio_mediatek_bind() 157 plat->bank = bank; in gpio_mediatek_bind() [all …]
|
/openbmc/u-boot/drivers/rtc/ |
H A D | i2c_rtc_emul.c | 55 old_offset = plat->offset; in sandbox_i2c_rtc_set_offset() 58 plat->offset = offset; in sandbox_i2c_rtc_set_offset() 68 old_base_time = plat->base_time; in sandbox_i2c_rtc_get_set_base_time() 70 plat->base_time = base_time; in sandbox_i2c_rtc_get_set_base_time() 82 plat->offset = 0; in reset_time() 83 plat->use_system_time = true; in reset_time() 92 if (plat->use_system_time) { in sandbox_i2c_rtc_get() 96 now = plat->base_time; in sandbox_i2c_rtc_get() 110 if (plat->use_system_time) { in sandbox_i2c_rtc_set() 114 now = plat->base_time; in sandbox_i2c_rtc_set() [all …]
|
/openbmc/linux/drivers/media/platform/qcom/venus/ |
H A D | hfi_platform.c | 26 const struct hfi_platform *plat; in hfi_platform_get_codec_vpp_freq() local 29 plat = hfi_platform_get(version); in hfi_platform_get_codec_vpp_freq() 30 if (!plat) in hfi_platform_get_codec_vpp_freq() 33 if (plat->codec_vpp_freq) in hfi_platform_get_codec_vpp_freq() 42 const struct hfi_platform *plat; in hfi_platform_get_codec_vsp_freq() local 46 if (!plat) in hfi_platform_get_codec_vsp_freq() 49 if (plat->codec_vpp_freq) in hfi_platform_get_codec_vsp_freq() 62 if (!plat) in hfi_platform_get_codec_lp_freq() 65 if (plat->codec_lp_freq) in hfi_platform_get_codec_lp_freq() 77 if (!plat) in hfi_platform_get_codecs() [all …]
|
/openbmc/u-boot/drivers/serial/ |
H A D | serial_lpuart.c | 145 struct lpuart_fsl *base = plat->reg; in _lpuart_serial_setbrg() 411 if (plat->devtype == DEV_MX7ULP || plat->devtype == DEV_IMX8) { in _lpuart32_serial_init() 428 if (plat->devtype == DEV_MX7ULP || plat->devtype == DEV_IMX8) in lpuart_serial_setbrg() 446 return _lpuart_serial_getc(plat); in lpuart_serial_getc() 454 _lpuart32_serial_putc(plat, c); in lpuart_serial_putc() 456 _lpuart_serial_putc(plat, c); in lpuart_serial_putc() 502 plat->reg = (void *)addr; in lpuart_serial_ofdata_to_platdata() 506 plat->devtype = DEV_LS1021A; in lpuart_serial_ofdata_to_platdata() 508 plat->devtype = DEV_MX7ULP; in lpuart_serial_ofdata_to_platdata() 510 plat->devtype = DEV_VF610; in lpuart_serial_ofdata_to_platdata() [all …]
|
H A D | serial_rockchip.c | 17 struct ns16550_platdata plat; member 23 struct ns16550_platdata plat; member 30 struct rockchip_uart_platdata *plat = dev_get_platdata(dev); in rockchip_serial_probe() local 33 plat->plat.base = plat->dtplat.reg[0]; in rockchip_serial_probe() 34 plat->plat.reg_shift = plat->dtplat.reg_shift; in rockchip_serial_probe() 35 plat->plat.clock = plat->dtplat.clock_frequency; in rockchip_serial_probe() 36 plat->plat.fcr = UART_FCR_DEFVAL; in rockchip_serial_probe() 37 dev->platdata = &plat->plat; in rockchip_serial_probe()
|
H A D | serial_stm32.c | 45 _stm32_serial_setbrg(plat->base, plat->uart_info, in stm32_serial_setbrg() 46 plat->clock_rate, baudrate); in stm32_serial_setbrg() 54 bool stm32f4 = plat->uart_info->stm32f4; in stm32_serial_setconfig() 103 fdt_addr_t base = plat->base; in stm32_serial_getc() 139 return _stm32_serial_putc(plat->base, plat->uart_info, c); in stm32_serial_putc() 146 fdt_addr_t base = plat->base; in stm32_serial_pending() 198 if (plat->clock_rate < 0) { in stm32_serial_probe() 200 return plat->clock_rate; in stm32_serial_probe() 203 _stm32_serial_init(plat->base, plat->uart_info); in stm32_serial_probe() 219 plat->base = devfdt_get_addr(dev); in stm32_serial_ofdata_to_platdata() [all …]
|
/openbmc/u-boot/drivers/usb/host/ |
H A D | dwc3-sti-glue.c | 49 val = readl(plat->syscfg_base + plat->syscfg_offset); in sti_dwc3_glue_drd_init() 53 switch (plat->mode) { in sti_dwc3_glue_drd_init() 76 writel(val, plat->syscfg_base + plat->syscfg_offset); in sti_dwc3_glue_drd_init() 119 plat->glue_base = reg[0]; in sti_dwc3_glue_ofdata_to_platdata() 120 plat->syscfg_offset = reg[2]; in sti_dwc3_glue_ofdata_to_platdata() 173 plat->mode = usb_get_dr_mode(dwc3_node); in sti_dwc3_glue_bind() 174 if (plat->mode == USB_DR_MODE_UNKNOWN) in sti_dwc3_glue_bind() 176 plat->mode = USB_DR_MODE_HOST; in sti_dwc3_glue_bind() 199 ret = sti_dwc3_glue_drd_init(plat); in sti_dwc3_glue_probe() 203 sti_dwc3_glue_init(plat); in sti_dwc3_glue_probe() [all …]
|
/openbmc/linux/drivers/ata/ |
H A D | ahci_mtk.c | 54 return PTR_ERR(plat->axi_rst); in mtk_ahci_platform_resets() 58 return PTR_ERR(plat->sw_rst); in mtk_ahci_platform_resets() 62 return PTR_ERR(plat->reg_rst); in mtk_ahci_platform_resets() 64 err = reset_control_assert(plat->axi_rst); in mtk_ahci_platform_resets() 70 err = reset_control_assert(plat->sw_rst); in mtk_ahci_platform_resets() 113 if (IS_ERR(plat->mode)) { in mtk_ahci_parse_property() 115 return PTR_ERR(plat->mode); in mtk_ahci_parse_property() 128 struct mtk_ahci_plat *plat; in mtk_ahci_probe() local 132 plat = devm_kzalloc(dev, sizeof(*plat), GFP_KERNEL); in mtk_ahci_probe() 133 if (!plat) in mtk_ahci_probe() [all …]
|
/openbmc/u-boot/drivers/video/ |
H A D | sandbox_sdl.c | 24 struct sandbox_sdl_plat *plat = dev_get_platdata(dev); in sandbox_sdl_probe() local 28 ret = sandbox_sdl_init_display(plat->xres, plat->yres, plat->bpix); in sandbox_sdl_probe() 33 uc_priv->xsize = plat->xres; in sandbox_sdl_probe() 34 uc_priv->ysize = plat->yres; in sandbox_sdl_probe() 35 uc_priv->bpix = plat->bpix; in sandbox_sdl_probe() 36 uc_priv->rot = plat->rot; in sandbox_sdl_probe() 37 uc_priv->vidconsole_drv_name = plat->vidconsole_drv_name; in sandbox_sdl_probe() 38 uc_priv->font_size = plat->font_size; in sandbox_sdl_probe() 46 struct sandbox_sdl_plat *plat = dev_get_platdata(dev); in sandbox_sdl_bind() local 53 plat->bpix = VIDEO_BPP16; in sandbox_sdl_bind() [all …]
|
H A D | broadwell_igd.c | 377 if (plat->power_cycle_delay) { in igd_setup_panel() 385 if (plat->cpu_backlight) { in igd_setup_panel() 389 if (plat->pch_backlight) { in igd_setup_panel() 399 int cdclk = plat->cdclk; in igd_cdclk_init_haswell() 473 int cdclk = plat->cdclk; in igd_cdclk_init_broadwell() 571 mdelay(plat->pre_graphics_delay); in igd_pre_init() 711 plat->dp_hotplug, in broadwell_igd_ofdata_to_platdata() 712 ARRAY_SIZE(plat->dp_hotplug))) in broadwell_igd_ofdata_to_platdata() 733 debug("dp_hotplug %d %d %d\n", plat->dp_hotplug[0], plat->dp_hotplug[1], in broadwell_igd_ofdata_to_platdata() 734 plat->dp_hotplug[2]); in broadwell_igd_ofdata_to_platdata() [all …]
|
/openbmc/u-boot/drivers/spi/ |
H A D | cadence_qspi.c | 32 plat->tshsl_ns, plat->tsd2d_ns, in cadence_spi_write_speed() 33 plat->tchsh_ns, plat->tslch_ns); in cadence_spi_write_speed() 124 if (hz > plat->max_hz) in cadence_spi_set_speed() 125 hz = plat->max_hz; in cadence_spi_set_speed() 158 priv->regbase = plat->regbase; in cadence_spi_probe() 159 priv->ahbbase = plat->ahbbase; in cadence_spi_probe() 214 plat->is_decoded_cs); in cadence_spi_xfer() 254 (plat, data_bytes, din); in cadence_spi_xfer() 262 (plat, data_bytes, dout); in cadence_spi_xfer() 315 __func__, plat->regbase, plat->ahbbase, plat->max_hz, in cadence_spi_ofdata_to_platdata() [all …]
|
H A D | soft_spi.c | 43 dm_gpio_set_value(&plat->sclk, bit); in soft_spi_scl() 53 dm_gpio_set_value(&plat->mosi, bit); in soft_spi_sda() 63 dm_gpio_set_value(&plat->cs, 0); in soft_spi_cs_activate() 64 dm_gpio_set_value(&plat->sclk, 0); in soft_spi_cs_activate() 65 dm_gpio_set_value(&plat->cs, 1); in soft_spi_cs_activate() 75 dm_gpio_set_value(&plat->cs, 0); in soft_spi_cs_deactivate() 145 if ((plat->flags & SPI_MASTER_NO_TX) == 0) in soft_spi_xfer() 147 udelay(plat->spi_delay_us); in soft_spi_xfer() 156 udelay(plat->spi_delay_us); in soft_spi_xfer() 230 plat->flags |= SPI_MASTER_NO_TX; in soft_spi_probe() [all …]
|
H A D | cadence_qspi_apb.c | 384 reg = readl(plat->regbase + CQSPI_REG_SIZE); in cadence_qspi_apb_controller_init() 390 writel(reg, plat->regbase + CQSPI_REG_SIZE); in cadence_qspi_apb_controller_init() 393 writel(0, plat->regbase + CQSPI_REG_REMAP); in cadence_qspi_apb_controller_init() 396 writel(plat->fifo_depth / 2, plat->regbase + CQSPI_REG_SRAMPARTITION); in cadence_qspi_apb_controller_init() 556 writel(plat->trigger_address, in cadence_qspi_apb_indirect_read_setup() 639 ret = cadence_qspi_wait_for_data(plat); in cadence_qspi_apb_indirect_read_execute() 648 bytes_to_read *= plat->fifo_width; in cadence_qspi_apb_indirect_read_execute() 658 readsl(plat->ahbbase, rxbuf, in cadence_qspi_apb_indirect_read_execute() 700 writel(plat->trigger_address, in cadence_qspi_apb_indirect_write_setup() 721 unsigned int page_size = plat->page_size; in cadence_qspi_apb_indirect_write_execute() [all …]
|
/openbmc/u-boot/arch/x86/cpu/broadwell/ |
H A D | sata.c | 57 reg16 |= 0x8000 | plat->port_map; in broadwell_sata_init() 75 reg32 |= (plat->port_map ^ 0xf) << 24; in broadwell_sata_init() 76 reg32 |= (plat->devslp_mux & 1) << 15; in broadwell_sata_init() 90 writel(plat->port_map, abar + 0x0c); in broadwell_sata_init() 95 if (plat->devslp_disable) { in broadwell_sata_init() 120 if (plat->port0_gen3_tx) in broadwell_sata_init() 124 (plat->port0_gen3_tx & in broadwell_sata_init() 128 if (plat->port1_gen3_tx) in broadwell_sata_init() 132 (plat->port1_gen3_tx & in broadwell_sata_init() 137 if (plat->port0_gen3_dtle) { in broadwell_sata_init() [all …]
|
/openbmc/u-boot/drivers/misc/ |
H A D | spltest_sandbox.c | 17 printf("bool %d\n", plat->boolval); in sandbox_spl_probe() 19 printf("byte %02x\n", plat->byteval); in sandbox_spl_probe() 21 for (i = 0; i < sizeof(plat->bytearray); i++) in sandbox_spl_probe() 22 printf(" %02x", plat->bytearray[i]); in sandbox_spl_probe() 25 printf("int %d\n", plat->intval); in sandbox_spl_probe() 27 for (i = 0; i < ARRAY_SIZE(plat->intarray); i++) in sandbox_spl_probe() 28 printf(" %d", plat->intarray[i]); in sandbox_spl_probe() 32 for (i = 0; i < sizeof(plat->longbytearray); i++) in sandbox_spl_probe() 33 printf(" %02x", plat->longbytearray[i]); in sandbox_spl_probe() 36 printf("string %s\n", plat->stringval); in sandbox_spl_probe() [all …]
|
H A D | i2c_eeprom_emul.c | 37 plat->test_mode = mode; in sandbox_i2c_eeprom_set_test_mode() 44 plat->offset_len = offset_len; in sandbox_i2c_eeprom_set_offset_len() 56 struct sandbox_i2c_flash_plat_data *plat = in sandbox_i2c_eeprom_xfer() local 61 if (!plat->size) in sandbox_i2c_eeprom_xfer() 63 if (msg->addr + msg->len > plat->size) { in sandbox_i2c_eeprom_xfer() 79 } else if (len >= plat->offset_len) { in sandbox_i2c_eeprom_xfer() 83 for (i = 0; i < plat->offset_len; i++, len--) in sandbox_i2c_eeprom_xfer() 116 if (!plat->filename) { in sandbox_i2c_eeprom_ofdata_to_platdata() 121 plat->test_mode = SIE_TEST_MODE_NONE; in sandbox_i2c_eeprom_ofdata_to_platdata() 122 plat->offset_len = 1; in sandbox_i2c_eeprom_ofdata_to_platdata() [all …]
|
/openbmc/linux/drivers/media/platform/mediatek/mdp3/ |
H A D | mtk-img-ipi.h | 119 #define CFG_CHECK(plat, p_id) ((plat) == (p_id)) argument 121 #define _CFG_OFST(plat, cfg, ofst) ((void *)(&((cfg)->config_##plat) + (ofst))) argument 122 #define CFG_OFST(plat, cfg, ofst) \ argument 125 #define _CFG_ADDR(plat, cfg, mem) (&((cfg)->config_##plat.mem)) argument 126 #define CFG_ADDR(plat, cfg, mem) \ argument 129 #define _CFG_GET(plat, cfg, mem) ((cfg)->config_##plat.mem) argument 130 #define CFG_GET(plat, cfg, mem) \ argument 131 (IS_ERR_OR_NULL(cfg) ? 0 : _CFG_GET(plat, cfg, mem)) 133 #define _CFG_COMP(plat, comp, mem) ((comp)->comp_##plat.mem) argument 134 #define CFG_COMP(plat, comp, mem) \ argument [all …]
|