pxa2xx-lib: support building for several pxa's
A message that is not in the archive (sent off-list or not yet received): 1217441805.20421.4.camel@ubuntu
Hi,
2008/7/30 Russ Dill <[email protected]>:
Quoted 4 lines
Here's a version of the third patch in the series without all the #ifdef's. Just a quick question for Dmitry, why all the if (! cpu_is_pxa3xx())'s around the pxa_gpio_mode's? Also, there was a build error when just building the
sound/armpxa2xx-ac97.
Good!
AFAIR pxa_gpio_mode isn't valid for the the pxa3xx, so cpu_is_pxa3xx().
Quoted 12 lines
Support building pxa2xx-lib for several pxa chip versions by making code run-time selected, not only compile-time
Signed-off-by Russ Dill <[email protected]>--- include/asm-arm/arch-pxa/pxa-regs.h | 4 +- sound/arm/Kconfig | 2 +- sound/arm/pxa2xx-ac97-lib.c | 174 ++++++++++++++++------------------ sound/soc/pxa/pxa2xx-i2s.c | 16 ++- 4 files changed, 95 insertions(+), 101 deletions(-)
Signature · 2 lines
With best wishes Dmitry
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines
-----Original Message-----
From: Russ Dill [mailto:[email protected]]
Sent: Thursday, July 31, 2008 7:29 AM
To: Dmitry
Cc: [email protected]; [email protected]; Eric Miao
Subject: Re: [PATCH] pxa2xx-lib: support building for several pxa'sQuoted 8 lines · Dmitry
Hi,
2008/7/30 Russ Dill <[email protected]>:
Quoted 4 lines
Here's a version of the third patch in the series without all the #ifdef's. Just a quick question for Dmitry, why all the if (! cpu_is_pxa3xx())'s around the pxa_gpio_mode's? Also, there was a build error when just building the
sound/armpxa2xx-ac97.
Quoted 8 lines
Quoted 3 lines
Good!
AFAIR
pxa_gpio_modeisn't valid for the the pxa3xx, socpu_is_pxa3xx().I can't find any reason within the source that it wouldn't work. pxafb uses it, which is used by littleton and zylonite. I'm not sure when
pxa_gpio_modeshould be used vs the mfp pin config.
pxa_gpio_mode() is deprecated, please don't use that, even with pxa2xx platforms. The reason some legacy pxa_gpio_mode() is still there, e.g. pxafb, is that not all platforms have transitioned into use the new MFP API, til then, I'll schedule a cleanup to remove all those pxa_gpio_mode, so whenever possible, don't introduce any new pxa_gpio_mode().
P.S. the reason pxa_gpio_mode() doesn't cause any obvious consequence is that PXA3xx no longer has those GAFR registers, but that's really going to affect other registers, esp. the GPDR, which isn't correct.
Quoted 17 lines
Quoted 9 lines
Quoted 9 lines
Support building pxa2xx-lib for several pxa chip versions by making code run-time selected, not only compile-time
Signed-off-by Russ Dill <[email protected]>--- include/asm-arm/arch-pxa/pxa-regs.h | 4 +- sound/arm/Kconfig | 2 +- sound/arm/pxa2xx-ac97-lib.c | 174++++++++++++++++------------------
Quoted 7 lines
Quoted 3 lines
sound/soc/pxa/pxa2xx-i2s.c | 16 ++- 4 files changed, 95 insertions(+), 101 deletions(-)--
With best wishes
Dmitry
Quoted 5 lines · Dmitry
Quoted 3 lines
#ifdef's. Just a quick question for Dmitry, why all the if (! cpu_is_pxa3xx())'s around the pxa_gpio_mode's? Also, there was a build error when just building the
sound/armpxa2xx-ac97.AFAIR
pxa_gpio_modeisn't valid for the the pxa3xx, socpu_is_pxa3xx().
Not really. The thing is that historically drivers set the MFP mappings up themselves rather than letting the board code do it. Going forward that should be being done by the platform code but simply removing the configuration for PXA2xx would break existing users.
Aside from that the PXA3xx series provide multiple MFP options for the AC97 interface so we can't do an unconditional setup for them anyway - the configuration is always board specific.