Lines Matching refs:spifi
32 struct gxp_spi *spifi; member
50 static void gxp_spi_set_mode(struct gxp_spi *spifi, int mode) in gxp_spi_set_mode() argument
53 void __iomem *reg_base = spifi->reg_base; in gxp_spi_set_mode()
70 struct gxp_spi *spifi = chip->spifi; in gxp_spi_read_reg() local
71 void __iomem *reg_base = spifi->reg_base; in gxp_spi_read_reg()
97 dev_warn(spifi->dev, "read reg busy time out\n"); in gxp_spi_read_reg()
101 memcpy_fromio(op->data.buf.in, spifi->dat_base, op->data.nbytes); in gxp_spi_read_reg()
108 struct gxp_spi *spifi = chip->spifi; in gxp_spi_write_reg() local
109 void __iomem *reg_base = spifi->reg_base; in gxp_spi_write_reg()
123 memcpy_toio(spifi->dat_base, op->data.buf.in, op->data.nbytes); in gxp_spi_write_reg()
137 dev_warn(spifi->dev, "write reg busy time out\n"); in gxp_spi_write_reg()
144 struct gxp_spi *spifi = chip->spifi; in gxp_spi_read() local
150 memcpy_fromio(op->data.buf.in, spifi->dir_base + offset, op->data.nbytes); in gxp_spi_read()
157 struct gxp_spi *spifi = chip->spifi; in gxp_spi_write() local
158 void __iomem *reg_base = spifi->reg_base; in gxp_spi_write()
181 memcpy_toio(spifi->dat_base, op->data.buf.in, write_len); in gxp_spi_write()
193 dev_warn(spifi->dev, "write busy time out\n"); in gxp_spi_write()
202 struct gxp_spi *spifi = spi_controller_get_devdata(mem->spi->controller); in do_gxp_exec_mem_op() local
203 struct gxp_spi_chip *chip = &spifi->chips[spi_get_chipselect(mem->spi, 0)]; in do_gxp_exec_mem_op()
238 struct gxp_spi *spifi = spi_controller_get_devdata(spi->controller); in gxp_spi_setup() local
240 struct gxp_spi_chip *chip = &spifi->chips[cs]; in gxp_spi_setup()
242 chip->spifi = spifi; in gxp_spi_setup()
245 gxp_spi_set_mode(spifi, MANUAL_MODE); in gxp_spi_setup()
255 struct gxp_spi *spifi; in gxp_spifi_probe() local
260 ctlr = devm_spi_alloc_host(dev, sizeof(*spifi)); in gxp_spifi_probe()
264 spifi = spi_controller_get_devdata(ctlr); in gxp_spifi_probe()
266 platform_set_drvdata(pdev, spifi); in gxp_spifi_probe()
267 spifi->data = data; in gxp_spifi_probe()
268 spifi->dev = dev; in gxp_spifi_probe()
270 spifi->reg_base = devm_platform_ioremap_resource(pdev, 0); in gxp_spifi_probe()
271 if (IS_ERR(spifi->reg_base)) in gxp_spifi_probe()
272 return PTR_ERR(spifi->reg_base); in gxp_spifi_probe()
274 spifi->dat_base = devm_platform_ioremap_resource(pdev, 1); in gxp_spifi_probe()
275 if (IS_ERR(spifi->dat_base)) in gxp_spifi_probe()
276 return PTR_ERR(spifi->dat_base); in gxp_spifi_probe()
278 spifi->dir_base = devm_platform_ioremap_resource(pdev, 2); in gxp_spifi_probe()
279 if (IS_ERR(spifi->dir_base)) in gxp_spifi_probe()
280 return PTR_ERR(spifi->dir_base); in gxp_spifi_probe()