diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-10-12 12:24:22 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-12 17:24:33 +0100 |
commit | f13a5e8a856cda0626da316d853a71952f14b1d7 (patch) | |
tree | cb441fbc4ed4f4dac1feaf071fee66084c01a0c8 /drivers/spi | |
parent | 682b5280bf00c0618606ecb26cf4a9342d5e282e (diff) |
spi/bcm63xx: move message control word description to register offsets
Make the message control word parameters part of the register offsets
array so we have them all in one struct.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-bcm63xx.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 461891fbc198..b3da04494fa9 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -329,7 +329,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) { struct resource *r; struct device *dev = &pdev->dev; - struct bcm63xx_spi_pdata *pdata = dev_get_platdata(&pdev->dev); int irq; struct spi_master *master; struct clk *clk; @@ -369,7 +368,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) bs->irq = irq; bs->clk = clk; - bs->fifo_size = pdata->fifo_size; + bs->fifo_size = bcm63xx_spireg(SPI_MSG_DATA_SIZE); ret = devm_request_irq(&pdev->dev, irq, bcm63xx_spi_interrupt, 0, pdev->name, master); @@ -384,8 +383,8 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) master->mode_bits = MODEBITS; master->bits_per_word_mask = SPI_BPW_MASK(8); master->auto_runtime_pm = true; - bs->msg_type_shift = pdata->msg_type_shift; - bs->msg_ctl_width = pdata->msg_ctl_width; + bs->msg_type_shift = bcm63xx_spireg(SPI_MSG_TYPE_SHIFT); + bs->msg_ctl_width = bcm63xx_spireg(SPI_MSG_CTL_WIDTH); bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA)); bs->rx_io = (const u8 *)(bs->regs + bcm63xx_spireg(SPI_RX_DATA)); |