* Re: [PATCH 2/2] ASoC: fix pxa-ssp compiling issue under mach-mmp
[not found] <1337669906-12745-1-git-send-email-zhouqiao@marvell.com>
@ 2012-05-22 7:05 ` Haojian Zhuang
2012-05-23 11:44 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Haojian Zhuang @ 2012-05-22 7:05 UTC (permalink / raw)
To: alsa-devel; +Cc: Grant Likely, Mark Brown, Eric Miao, Liam Girdwood, alsa-devel
On Tue, May 22, 2012 at 2:58 PM, Qiao Zhou <zhouqiao@marvell.com> wrote:
> pxa-ssp.c uses API like cpu_is_pxa3xx(), cpu_is_pxa2xx(), which is
> defined under arch-pxa architecture, so to compile it under mach-mmp
> just add CONFIG_ARCH_PXA macro to separate it.
>
> Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
> ---
> sound/soc/pxa/pxa-ssp.c | 25 ++++++++++++++++++-------
> 1 files changed, 18 insertions(+), 7 deletions(-)
>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Mark,
Do you mind that both of these two patches could apply into asoc git tree?
Regards
Haojian
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 2/2] ASoC: fix pxa-ssp compiling issue under mach-mmp
[not found] <1337669906-12745-1-git-send-email-zhouqiao@marvell.com>
2012-05-22 7:05 ` [PATCH 2/2] ASoC: fix pxa-ssp compiling issue under mach-mmp Haojian Zhuang
@ 2012-05-23 11:44 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-05-23 11:44 UTC (permalink / raw)
To: alsa-devel
Cc: Grant Likely, Eric Miao, Liam Girdwood, Haojian Zhuang,
alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 645 bytes --]
On Tue, May 22, 2012 at 02:58:26PM +0800, Qiao Zhou wrote:
> +#if defined(CONFIG_ARCH_PXA)
> if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) {
> sscr0 &= ~0x0000ff00;
> sscr0 |= ((div - 2)/2) << 8; /* 2..512 */
> } else {
> +#endif
> sscr0 &= ~0x000fff00;
> sscr0 |= (div - 1) << 8; /* 1..4096 */
> +#if defined(CONFIG_ARCH_PXA)
> }
> +#endif
This is pretty large and fiddly, especially code like the above. Would
it not be simpler to just define always false versions of these when on
MMP, either in this driver or in the arch headers (where it'd help other
drivers too)? Right now it doesn't make the code look nice.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread