Home
last modified time | relevance | path

Searched refs:max_hz (Results 1 – 25 of 34) sorted by relevance

12

/openbmc/u-boot/drivers/spi/
H A Dmxc_spi.c50 unsigned int max_hz; member
97 unsigned int max_hz = mxcs->max_hz; in spi_cfg_mxc() local
102 div = DIV_ROUND_UP(clk_src, max_hz); in spi_cfg_mxc()
106 max_hz, div, clk_src / (4 << div)); in spi_cfg_mxc()
137 unsigned int max_hz = mxcs->max_hz; in spi_cfg_mxc() local
150 if (clk_src > max_hz) { in spi_cfg_mxc()
151 pre_div = (clk_src - 1) / max_hz; in spi_cfg_mxc()
158 max_hz); in spi_cfg_mxc()
435 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
443 if (max_hz == 0) { in spi_setup_slave()
[all …]
H A Dspi-uclass.c55 speed = slave->max_hz; in dm_spi_claim_bus()
56 if (spi->max_hz) { in dm_spi_claim_bus()
58 speed = min(speed, (int)spi->max_hz); in dm_spi_claim_bus()
60 speed = spi->max_hz; in dm_spi_claim_bus()
158 spi->max_hz = dev_read_u32_default(bus, "spi-max-frequency", 0); in spi_post_probe()
196 slave->max_hz = plat->max_hz; in spi_child_pre_probe()
336 plat->max_hz = speed; in spi_get_bus_and_cs()
340 plat->max_hz = SPI_DEFAULT_SPEED_HZ; in spi_get_bus_and_cs()
362 speed = plat->max_hz; in spi_get_bus_and_cs()
415 plat->max_hz = dev_read_u32_default(dev, "spi-max-frequency", in spi_slave_ofdata_to_platdata()
H A Dstm32_qspi.c163 u32 max_hz; member
169 u32 max_hz; member
438 plat->max_hz = dev_read_u32_default(bus, "spi-max-frequency", in stm32_qspi_ofdata_to_platdata()
448 plat->max_hz in stm32_qspi_ofdata_to_platdata()
465 dm_spi_bus->max_hz = plat->max_hz; in stm32_qspi_probe()
469 priv->max_hz = plat->max_hz; in stm32_qspi_probe()
572 if (speed > plat->max_hz) in stm32_qspi_set_speed()
573 speed = plat->max_hz; in stm32_qspi_set_speed()
H A Ddavinci_spi.c392 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
421 ds->freq = max_hz; in spi_setup_slave()
464 static int davinci_spi_set_speed(struct udevice *bus, uint max_hz) in davinci_spi_set_speed() argument
468 debug("%s speed %u\n", __func__, max_hz); in davinci_spi_set_speed()
469 if (max_hz > CONFIG_SYS_SPI_CLK / 2) in davinci_spi_set_speed()
472 ds->freq = max_hz; in davinci_spi_set_speed()
H A Dti_qspi.c105 uint max_hz;
370 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
396 ti_spi_set_speed(priv, max_hz); in spi_setup_slave()
476 static int ti_qspi_set_speed(struct udevice *bus, uint max_hz) in ti_qspi_set_speed() argument
480 ti_spi_set_speed(priv, max_hz); in ti_qspi_set_speed()
604 priv->max_hz = fdtdec_get_int(blob, node, "spi-max-frequency", -1); in ti_qspi_ofdata_to_platdata()
605 if (priv->max_hz < 0) { in ti_qspi_ofdata_to_platdata()
612 (int)priv->base, priv->max_hz); in ti_qspi_ofdata_to_platdata()
H A Dspi-sunxi.c125 u32 max_hz; member
412 if (speed > plat->max_hz) in sun4i_spi_set_speed()
413 speed = plat->max_hz; in sun4i_spi_set_speed()
509 priv->freq = plat->max_hz; in sun4i_spi_probe()
521 plat->max_hz = fdtdec_get_int(gd->fdt_blob, node, in sun4i_spi_ofdata_to_platdata()
525 if (plat->max_hz > SUN4I_SPI_MAX_RATE) in sun4i_spi_ofdata_to_platdata()
526 plat->max_hz = SUN4I_SPI_MAX_RATE; in sun4i_spi_ofdata_to_platdata()
H A Dfsl_espi.c66 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
89 if ((spibrg / max_hz) > 32) { in spi_setup_slave()
91 pm = spibrg / (max_hz * 16 * 2); in spi_setup_slave()
95 "is used.\n", max_hz, spibrg / (32 * 16)); in spi_setup_slave()
98 pm = spibrg / (max_hz * 2); in spi_setup_slave()
H A Dcadence_qspi.c124 if (hz > plat->max_hz) in cadence_spi_set_speed()
125 hz = plat->max_hz; in cadence_spi_set_speed()
303 plat->max_hz = fdtdec_get_uint(blob, subnode, "spi-max-frequency", in cadence_spi_ofdata_to_platdata()
315 __func__, plat->regbase, plat->ahbbase, plat->max_hz, in cadence_spi_ofdata_to_platdata()
H A Domap3_spi.c493 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
539 if (max_hz > OMAP3_MCSPI_MAX_FREQ) { in spi_setup_slave()
541 max_hz); in spi_setup_slave()
558 priv->freq = max_hz; in spi_setup_slave()
586 priv->freq = slave_plat->max_hz; in omap3_spi_claim_bus()
H A Datmel_spi.c38 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
72 scbr = (get_spi_clk_rate(bus) + max_hz - 1) / max_hz; in spi_setup_slave()
H A Datcspi200_spi.c287 static int atcspi200_spi_set_speed(struct udevice *bus, uint max_hz) in atcspi200_spi_set_speed() argument
291 debug("%s speed %u\n", __func__, max_hz); in atcspi200_spi_set_speed()
293 ns->freq = max_hz; in atcspi200_spi_set_speed()
H A Dfsl_dspi.c402 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
467 fsl_dspi_cfg_speed(&dspi->priv, max_hz); in spi_setup_slave()
531 slave_plat->cs, slave_plat->max_hz, slave_plat->mode); in fsl_dspi_child_pre_probe()
561 dm_spi_bus->max_hz = plat->speed_hz; in fsl_dspi_probe()
H A Dmxs_spi.c52 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
68 mxs_slave->max_khz = max_hz / 1000; in spi_setup_slave()
H A Dcf_spi.c296 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
307 cfslave->baudrate = max_hz; in spi_setup_slave()
H A Dcadence_qspi.h17 unsigned int max_hz; member
H A Dkirkwood_spi.c106 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
127 data = ((CONFIG_SYS_TCLK / 2) / max_hz) + 0x10; in spi_setup_slave()
H A Dsoft_spi_legacy.c40 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
H A Dlpc32xx_ssp.c52 struct spi_slave *spi_setup_slave(uint bus, uint cs, uint max_hz, uint mode) in spi_setup_slave() argument
/openbmc/u-boot/drivers/mtd/spi/
H A Dsf-uclass.c55 unsigned int max_hz, unsigned int spi_mode) in spi_flash_probe() argument
59 if (spi_flash_probe_bus_cs(bus, cs, max_hz, spi_mode, &dev)) in spi_flash_probe()
71 unsigned int max_hz, unsigned int spi_mode, in spi_flash_probe_bus_cs() argument
87 ret = spi_get_bus_and_cs(busnum, cs, max_hz, spi_mode, in spi_flash_probe_bus_cs()
H A Dsf_probe.c58 unsigned int max_hz, unsigned int spi_mode) in spi_flash_probe() argument
63 bus = spi_setup_slave(busnum, cs, max_hz, spi_mode); in spi_flash_probe()
/openbmc/u-boot/include/
H A Dspi.h42 uint max_hz; member
61 uint max_hz; member
100 uint max_hz; member
178 unsigned int max_hz, unsigned int mode);
H A Dspi_flash.h110 unsigned int max_hz, unsigned int spi_mode,
115 unsigned int max_hz, unsigned int spi_mode);
159 unsigned int max_hz, unsigned int spi_mode);
H A Dvideo.h257 unsigned int max_hz, unsigned int spi_mode);
261 unsigned int max_hz, unsigned int spi_mode);
/openbmc/u-boot/drivers/video/
H A Dlg4573.c191 unsigned int max_hz, unsigned int spi_mode) in lg4573_spi_startup() argument
196 spi = spi_setup_slave(bus, cs, max_hz, spi_mode); in lg4573_spi_startup()
/openbmc/linux/drivers/spi/
H A Dspi-orion.c76 unsigned long max_hz; member
588 .max_hz = 50000000,
594 .max_hz = 50000000,
608 .max_hz = 50000000,
721 host->max_speed_hz = min(devdata->max_hz, in orion_spi_probe()
727 host->max_speed_hz = devdata->max_hz; in orion_spi_probe()

12