Add a DDR flush function, inspired by both Linux and if_arge.c.

This commit is contained in:
Adrian Chadd 2010-08-18 09:11:45 +00:00
parent 3692b33ce3
commit 5429211e0a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211449

View File

@ -491,5 +491,15 @@ ar71xx_ahb_freq(void)
return (freq);
}
static inline void
ar71xx_ddr_flush(uint32_t reg)
{
ATH_WRITE_REG(reg, 1);
while ((ATH_READ_REG(reg) & 0x1))
;
ATH_WRITE_REG(reg, 1);
while ((ATH_READ_REG(reg) & 0x1))
;
}
#endif /* _AR71XX_REG_H_ */