On Wed, Jun 9, 2010 at 9:39 AM, Eric Millbrandt <emillbra...@dekaresearch.com> wrote: > The implementation of the ac97 "cold" reset is flawed. If the sync and > output lines are high when reset is asserted the attached ac97 device > may go into test mode. Avoid this by reconfiguring the psc to gpio mode > and generating the reset manually.
Hi Eric, Thanks for the patch. Given a) that this is essentially a silicon bug, b) that AC97 only works on PSCs 1 & 2 which cannot be relocated to different pins, c) that I really want to avoid giving drivers access to port_config even through an API, and d) All mpc5200 AC97 systems will probably have the same issue, I think this is something that shouldn't require a change to the device tree, and can probably be contained within arch/powerpc/platforms/52xx. Overall, I have no problem with the function of the change, but I'd like to see these two changes: - Add a helper function ot arch/powerpc/platforms/52xx to perform an AC97 reset using GPIOs (select GPIO in port_config, toggle reset, select PSC in port_config). Something like mpc5200_psc_ac97_gpio_reset(int psc_number). Just move the GPIO bits. The PSC mode setting can be left in the driver. - Go ahead and hardcode the GPIO numbers into the platform code. It is definitely a hardware bug workaround, and it isn't something that would normally be described in the device tree (though you probably need to make the gpio_lock spinlock non-static to maintain mutual exclusion). g. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev