Skip to contentSkip to conversation

pxa2xx-lib: support building for several pxa's

PATCH Dmitry 3 participants 3 messages Jul 30, 2008 – Jul 31, 2008 2 messages not in the archive

lore
Share & tools
lore

Dmitry

author
#1 lore raw
In reply to a message not in the archive

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/arm pxa2xx-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

---
 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
#3 lore raw
In reply to a message not in the archive
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's

Quoted 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/arm pxa2xx-ac97.

Quoted 8 lines
Quoted 3 lines

Good!

AFAIR pxa_gpio_mode isn't valid for the the pxa3xx, so cpu_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_mode should 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

---
 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

#4 lore raw
In reply to 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/arm pxa2xx-ac97.

AFAIR pxa_gpio_mode isn't valid for the the pxa3xx, so cpu_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.