[ar71xx] undo read-after-write to flush; some bus devices dislike this.

This broke the PCI fixup on at least the AR7240 + AR9280 reference design
board that I have.

Tested:

* Atheros AP93 reference design - AR7240 + AR9280
This commit is contained in:
adrian 2017-05-28 07:44:55 +00:00
parent 12ba2d58c3
commit ba2c317199

View File

@ -528,13 +528,14 @@ typedef enum {
#define AR71XX_SPI_RDS 0x0C
#define ATH_READ_REG(reg) \
*((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg)))
*((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg)))
/*
* Note: Don't put a flush read here; some users (eg the AR724x PCI fixup code)
* requires write-only space to certain registers. Doing the read afterwards
* causes things to break.
*/
#define ATH_WRITE_REG(reg, val) \
do { \
*((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val); \
(void) ATH_READ_REG(reg); \
} while (0)
*((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val)
static inline void
ar71xx_ddr_flush(uint32_t reg)