From ccfb1ab87c4d04ef5000c450294ddb4566a3691b Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 29 Dec 2016 17:31:07 +0000 Subject: [PATCH] [ar71xx] put in an implicit read-after-write to flush things out. Note: I may need to revisit this for mips74k. --- sys/mips/atheros/ar71xxreg.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/mips/atheros/ar71xxreg.h b/sys/mips/atheros/ar71xxreg.h index e1f533bc008..e42d6a5c4ab 100644 --- a/sys/mips/atheros/ar71xxreg.h +++ b/sys/mips/atheros/ar71xxreg.h @@ -527,7 +527,10 @@ typedef enum { *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) #define ATH_WRITE_REG(reg, val) \ - *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val) + do { \ + *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val); \ + (void) ATH_READ_REG(reg); \ + } while (0) static inline void ar71xx_ddr_flush(uint32_t reg)