[PATCH v2 1/2] ARM: pxa: add pxa3xx architecture

Robert Jarzmik robert.jarzmik at free.fr
Mon Jan 5 12:35:55 PST 2015


Sascha Hauer <s.hauer at pengutronix.de> writes:

> On Sun, Jan 04, 2015 at 10:41:05AM +0100, Robert Jarzmik wrote:
>> +#ifdef CONFIG_ARCH_PXA2XX
>>  	pxa_suspend(PWRMODE_DEEPSLEEP);
>> +#endif
>> +#ifdef CONFIG_ARCH_PXA3XX
>> +	pxa3xx_suspend(PXA3xx_PM_S3D4C4);
>> +#endif
>
> 	if (cpu_is_*())
>
> instead of ifdefs?
That was my first try, but compilation did fail. Yet your other suggestion
(separate by SoC type) could take care of it.

>
>>  	unreachable();
>>  }
>> diff --git a/arch/arm/mach-pxa/mfp.c b/arch/arm/mach-pxa/mfp.c
>
> Better mfp-pxa3xx.c analog to mfp-pxa2xx.c?
Definitely, for v2.

> Instead of separating the source files by functionality you could
> separate them by SoC type. This would reduce the need for ifdefs.
Yes, good idea.

I'll create pxa3xx.c and pxa2xx.c, and stuff them with poweroff(),
reset_source(), etc ..., each with its own variant.

Cheers.

-- 
Robert



More information about the barebox mailing list