Skip to content

Commit fa32154

Browse files
Eric Millbrandtglikely
Eric Millbrandt
authored andcommitted
powerpc/5200: tighten up ac97 reset timing
Tighten up time timing around the gpio reset functionality. Add a 200ns delay before remuxing the pins back to ac97 to comply with the ac97 spec. Signed-off-by: Eric Millbrandt <[email protected]> Signed-off-by: Grant Likely <[email protected]>
1 parent 915b961 commit fa32154

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arch/powerpc/platforms/52xx/mpc52xx_common.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,16 @@ int mpc5200_psc_ac97_gpio_reset(int psc_number)
325325
clrbits32(&simple_gpio->simple_dvo, sync | out);
326326
clrbits8(&wkup_gpio->wkup_dvo, reset);
327327

328-
/* wait at lease 1 us */
329-
udelay(2);
328+
/* wait for 1 us */
329+
udelay(1);
330330

331331
/* Deassert reset */
332332
setbits8(&wkup_gpio->wkup_dvo, reset);
333333

334+
/* wait at least 200ns */
335+
/* 7 ~= (200ns * timebase) / ns2sec */
336+
__delay(7);
337+
334338
/* Restore pin-muxing */
335339
out_be32(&simple_gpio->port_config, mux);
336340

0 commit comments

Comments
 (0)