Home
last modified time | relevance | path

Searched refs:spibrg (Results 1 – 5 of 5) sorted by relevance

/openbmc/u-boot/drivers/spi/
H A Dfsl_espi.c70 unsigned long spibrg = 0; in spi_setup_slave() local
87 spibrg = sysinfo.freq_systembus / 2; in spi_setup_slave()
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()
104 spi_freq = spibrg / ((pm + 1) * 2 * 16); in spi_setup_slave()
106 spi_freq = spibrg / ((pm + 1) * 2); in spi_setup_slave()
/openbmc/linux/drivers/spi/
H A Dspi-fsl-espi.c107 u32 spibrg; /* SPIBRG input clock */ member
337 pm = DIV_ROUND_UP(espi->spibrg, hz * 4) - 1; in fsl_espi_setup_transfer()
341 pm = DIV_ROUND_UP(espi->spibrg, hz * 16 * 4) - 1; in fsl_espi_setup_transfer()
692 espi->spibrg = fsl_get_sys_freq(); in fsl_espi_probe()
693 if (espi->spibrg == -1) { in fsl_espi_probe()
699 host->min_speed_hz = DIV_ROUND_UP(espi->spibrg, 4 * 16 * 16); in fsl_espi_probe()
700 host->max_speed_hz = DIV_ROUND_UP(espi->spibrg, 4); in fsl_espi_probe()
H A Dspi-fsl-lib.h55 u32 spibrg; /* SPIBRG input clock */ member
H A Dspi-fsl-spi.c214 if ((mpc8xxx_spi->spibrg / hz) > 64) { in fsl_spi_setup_transfer()
216 pm = (mpc8xxx_spi->spibrg - 1) / (hz * 64) + 1; in fsl_spi_setup_transfer()
219 dev_name(&spi->dev), hz, mpc8xxx_spi->spibrg / 1024); in fsl_spi_setup_transfer()
223 pm = (mpc8xxx_spi->spibrg - 1) / (hz * 4) + 1; in fsl_spi_setup_transfer()
H A Dspi-fsl-lib.c101 mpc8xxx_spi->spibrg = pdata->sysclk; in mpc8xxx_spi_probe()