1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 17:22:22 +02:00

arm: pxa: Drop pxa_wait_ticks()

This function has a similar name to the common wait_ticks(). It is only
used in one place and seems small enough to drop.

Inline it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass
2019-11-14 12:57:28 -07:00
committed by Tom Rini
parent 036a017f79
commit e3107d159c

View File

@@ -39,13 +39,6 @@ int cleanup_before_linux(void)
return 0; return 0;
} }
void pxa_wait_ticks(int ticks)
{
writel(0, OSCR);
while (readl(OSCR) < ticks)
asm volatile("" : : : "memory");
}
inline void writelrb(uint32_t val, uint32_t addr) inline void writelrb(uint32_t val, uint32_t addr)
{ {
writel(val, addr); writel(val, addr);
@@ -136,8 +129,11 @@ void pxa2xx_dram_init(void)
writelrb(CONFIG_SYS_MDCNFG_VAL & writelrb(CONFIG_SYS_MDCNFG_VAL &
~(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3), MDCNFG); ~(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3), MDCNFG);
/* Wait for the clock to the SDRAMs to stabilize, 100..200 usec. */ /* Wait for the clock to the SDRAMs to stabilize, 100..200 usec. */
pxa_wait_ticks(0x300); writel(0, OSCR);
while (readl(OSCR) < 0x300)
asm volatile("" : : : "memory");
/* /*
* 8) Trigger a number (usually 8) refresh cycles by attempting * 8) Trigger a number (usually 8) refresh cycles by attempting