Lines Matching refs:master
124 struct spi_master *master;
164 static inline void mcspi_write_reg(struct spi_master *master,
167 struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
172 static inline u32 mcspi_read_reg(struct spi_master *master, int idx)
174 struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
245 static void omap2_mcspi_set_master_mode(struct spi_master *master)
250 * to single-channel master mode
252 l = mcspi_read_reg(master, OMAP2_MCSPI_MODULCTRL);
256 mcspi_write_reg(master, OMAP2_MCSPI_MODULCTRL, l);
258 omap2_mcspi_ctx[master->bus_num - 1].modulctrl = l;
265 spi_cntrl = mcspi->master;
313 mcspi = spi_master_get_devdata(spi->master);
464 mcspi = spi_master_get_devdata(spi->master);
664 mcspi = spi_master_get_devdata(spi->master);
665 spi_cntrl = mcspi->master;
684 /* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS
730 mcspi = spi_master_get_devdata(spi->master);
745 mcspi = spi_master_get_devdata(spi->master);
756 struct spi_master *master = spi->master;
760 mcspi = spi_master_get_devdata(master);
798 mcspi = spi_master_get_devdata(spi->master);
811 &omap2_mcspi_ctx[mcspi->master->bus_num - 1].cs);
836 mcspi = spi_master_get_devdata(spi->master);
846 if (spi->chip_select < spi->master->num_chipselect) {
873 * channel" master mode. As a side effect, we need to manage the
1055 mcspi = spi_master_get_devdata(spi->master);
1067 struct spi_master *master = mcspi->master;
1073 mcspi_write_reg(master, OMAP2_MCSPI_SYSCONFIG,
1076 tmp = mcspi_read_reg(master, OMAP2_MCSPI_SYSSTATUS);
1082 mcspi_write_reg(master, OMAP2_MCSPI_SYSCONFIG, tmp);
1083 omap2_mcspi_ctx[master->bus_num - 1].sysconfig = tmp;
1086 mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE, tmp);
1087 omap2_mcspi_ctx[master->bus_num - 1].wakeupenable = tmp;
1089 omap2_mcspi_set_master_mode(master);
1143 struct spi_master *master;
1180 master = spi_alloc_master(&pdev->dev, sizeof *mcspi);
1181 if (master == NULL) {
1182 dev_dbg(&pdev->dev, "master allocation failed\n");
1187 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
1190 master->bus_num = pdev->id;
1192 master->setup = omap2_mcspi_setup;
1193 master->transfer = omap2_mcspi_transfer;
1194 master->cleanup = omap2_mcspi_cleanup;
1195 master->num_chipselect = num_chipselect;
1197 dev_set_drvdata(&pdev->dev, master);
1199 mcspi = spi_master_get_devdata(master);
1200 mcspi->master = master;
1225 INIT_LIST_HEAD(&omap2_mcspi_ctx[master->bus_num - 1].cs);
1240 mcspi->dma_channels = kcalloc(master->num_chipselect,
1257 status = spi_register_master(master);
1274 spi_master_put(master);
1280 struct spi_master *master;
1286 master = dev_get_drvdata(&pdev->dev);
1287 mcspi = spi_master_get_devdata(master);
1297 spi_unregister_master(master);