Searched refs:orion_spi (Results 1 - 4 of 4) sorted by relevance
/linux-4.4.14/drivers/spi/ |
H A D | spi-orion.c | 26 #define DRIVER_NAME "orion_spi" 81 struct orion_spi { struct 88 static inline void __iomem *spi_reg(struct orion_spi *orion_spi, u32 reg) spi_reg() argument 90 return orion_spi->base + reg; spi_reg() 94 orion_spi_setbits(struct orion_spi *orion_spi, u32 reg, u32 mask) orion_spi_setbits() argument 96 void __iomem *reg_addr = spi_reg(orion_spi, reg); orion_spi_setbits() 105 orion_spi_clrbits(struct orion_spi *orion_spi, u32 reg, u32 mask) orion_spi_clrbits() argument 107 void __iomem *reg_addr = spi_reg(orion_spi, reg); orion_spi_clrbits() 121 struct orion_spi *orion_spi; orion_spi_baudrate_set() local 124 orion_spi = spi_master_get_devdata(spi->master); orion_spi_baudrate_set() 125 devdata = orion_spi->devdata; orion_spi_baudrate_set() 127 tclk_hz = clk_get_rate(orion_spi->clk); orion_spi_baudrate_set() 180 reg = readl(spi_reg(orion_spi, ORION_SPI_IF_CONFIG_REG)); orion_spi_baudrate_set() 182 writel(reg, spi_reg(orion_spi, ORION_SPI_IF_CONFIG_REG)); orion_spi_baudrate_set() 191 struct orion_spi *orion_spi; orion_spi_mode_set() local 193 orion_spi = spi_master_get_devdata(spi->master); orion_spi_mode_set() 195 reg = readl(spi_reg(orion_spi, ORION_SPI_IF_CONFIG_REG)); orion_spi_mode_set() 201 writel(reg, spi_reg(orion_spi, ORION_SPI_IF_CONFIG_REG)); orion_spi_mode_set() 208 struct orion_spi *orion_spi; orion_spi_50mhz_ac_timing_erratum() local 210 orion_spi = spi_master_get_devdata(spi->master); orion_spi_50mhz_ac_timing_erratum() 226 reg = readl(spi_reg(orion_spi, ORION_SPI_TIMING_PARAMS_REG)); orion_spi_50mhz_ac_timing_erratum() 229 if (clk_get_rate(orion_spi->clk) == 250000000 && orion_spi_50mhz_ac_timing_erratum() 236 writel(reg, spi_reg(orion_spi, ORION_SPI_TIMING_PARAMS_REG)); orion_spi_50mhz_ac_timing_erratum() 245 struct orion_spi *orion_spi; orion_spi_setup_transfer() local 250 orion_spi = spi_master_get_devdata(spi->master); orion_spi_setup_transfer() 260 if (orion_spi->devdata->is_errata_50mhz_ac) orion_spi_setup_transfer() 268 orion_spi_setbits(orion_spi, ORION_SPI_IF_CONFIG_REG, orion_spi_setup_transfer() 271 orion_spi_clrbits(orion_spi, ORION_SPI_IF_CONFIG_REG, orion_spi_setup_transfer() 279 struct orion_spi *orion_spi; orion_spi_set_cs() local 281 orion_spi = spi_master_get_devdata(spi->master); orion_spi_set_cs() 283 orion_spi_clrbits(orion_spi, ORION_SPI_IF_CTRL_REG, ORION_SPI_CS_MASK); orion_spi_set_cs() 284 orion_spi_setbits(orion_spi, ORION_SPI_IF_CTRL_REG, orion_spi_set_cs() 289 orion_spi_setbits(orion_spi, ORION_SPI_IF_CTRL_REG, 0x1); orion_spi_set_cs() 291 orion_spi_clrbits(orion_spi, ORION_SPI_IF_CTRL_REG, 0x1); orion_spi_set_cs() 294 static inline int orion_spi_wait_till_ready(struct orion_spi *orion_spi) orion_spi_wait_till_ready() argument 299 if (readl(spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG))) orion_spi_wait_till_ready() 313 struct orion_spi *orion_spi; orion_spi_write_read_8bit() local 315 orion_spi = spi_master_get_devdata(spi->master); orion_spi_write_read_8bit() 316 tx_reg = spi_reg(orion_spi, ORION_SPI_DATA_OUT_REG); orion_spi_write_read_8bit() 317 rx_reg = spi_reg(orion_spi, ORION_SPI_DATA_IN_REG); orion_spi_write_read_8bit() 318 int_reg = spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG); orion_spi_write_read_8bit() 328 if (orion_spi_wait_till_ready(orion_spi) < 0) { orion_spi_write_read_8bit() 344 struct orion_spi *orion_spi; orion_spi_write_read_16bit() local 346 orion_spi = spi_master_get_devdata(spi->master); orion_spi_write_read_16bit() 347 tx_reg = spi_reg(orion_spi, ORION_SPI_DATA_OUT_REG); orion_spi_write_read_16bit() 348 rx_reg = spi_reg(orion_spi, ORION_SPI_DATA_IN_REG); orion_spi_write_read_16bit() 349 int_reg = spi_reg(orion_spi, ORION_SPI_INT_CAUSE_REG); orion_spi_write_read_16bit() 359 if (orion_spi_wait_till_ready(orion_spi) < 0) { orion_spi_write_read_16bit() 424 static int orion_spi_reset(struct orion_spi *orion_spi) orion_spi_reset() argument 427 orion_spi_clrbits(orion_spi, ORION_SPI_IF_CTRL_REG, 0x1); orion_spi_reset() 503 struct orion_spi *spi; orion_spi_probe() 611 struct orion_spi *spi = spi_master_get_devdata(master); orion_spi_remove() 628 struct orion_spi *spi = spi_master_get_devdata(master); orion_spi_runtime_suspend() 637 struct orion_spi *spi = spi_master_get_devdata(master); orion_spi_runtime_resume()
|
/linux-4.4.14/arch/arm/mach-orion5x/ |
H A D | board-dt.c | 30 OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
|
/linux-4.4.14/arch/arm/plat-orion/ |
H A D | common.c | 40 orion_clkdev_add(NULL, "orion_spi.0", tclk); orion_clkdev_init() 41 orion_clkdev_add(NULL, "orion_spi.1", tclk); orion_clkdev_init() 562 static struct platform_device orion_spi = { variable in typeref:struct:platform_device 563 .name = "orion_spi", 570 .name = "orion_spi", 579 fill_resources(&orion_spi, &orion_spi_resources, orion_spi_init() 581 platform_device_register(&orion_spi); orion_spi_init()
|
/linux-4.4.14/arch/arm/mach-dove/ |
H A D | common.c | 112 orion_clkdev_add(NULL, "orion_spi.0", tclk); dove_clk_init() 113 orion_clkdev_add(NULL, "orion_spi.1", tclk); dove_clk_init()
|
Completed in 101 milliseconds