@@ -94,26 +94,6 @@ struct xilinx_spi {
9494 void (* write_fn )(u32 , void __iomem * );
9595};
9696
97- static void xspi_write32 (u32 val , void __iomem * addr )
98- {
99- iowrite32 (val , addr );
100- }
101-
102- static unsigned int xspi_read32 (void __iomem * addr )
103- {
104- return ioread32 (addr );
105- }
106-
107- static void xspi_write32_be (u32 val , void __iomem * addr )
108- {
109- iowrite32be (val , addr );
110- }
111-
112- static unsigned int xspi_read32_be (void __iomem * addr )
113- {
114- return ioread32be (addr );
115- }
116-
11797static void xilinx_spi_tx (struct xilinx_spi * xspi )
11898{
11999 if (!xspi -> tx_ptr ) {
@@ -398,15 +378,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
398378 * Setup little endian helper functions first and try to use them
399379 * and check if bit was correctly setup or not.
400380 */
401- xspi -> read_fn = xspi_read32 ;
402- xspi -> write_fn = xspi_write32 ;
381+ xspi -> read_fn = ioread32 ;
382+ xspi -> write_fn = iowrite32 ;
403383
404384 xspi -> write_fn (XSPI_CR_LOOP , xspi -> regs + XSPI_CR_OFFSET );
405385 tmp = xspi -> read_fn (xspi -> regs + XSPI_CR_OFFSET );
406386 tmp &= XSPI_CR_LOOP ;
407387 if (tmp != XSPI_CR_LOOP ) {
408- xspi -> read_fn = xspi_read32_be ;
409- xspi -> write_fn = xspi_write32_be ;
388+ xspi -> read_fn = ioread32be ;
389+ xspi -> write_fn = iowrite32be ;
410390 }
411391
412392 master -> bits_per_word_mask = SPI_BPW_MASK (bits_per_word );
0 commit comments