mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 1/2] ARM: pxa: add pxa3xx architecture
Date: Mon, 5 Jan 2015 14:12:45 +0100	[thread overview]
Message-ID: <20150105131245.GG4544@pengutronix.de> (raw)
In-Reply-To: <1420364466-22400-1-git-send-email-robert.jarzmik@free.fr>

On Sun, Jan 04, 2015 at 10:41:05AM +0100, Robert Jarzmik wrote:
> Add the pxa3xx architecture, for pxa300, pxa310 and pxa320 SoCs.
> This includes :
>  - the registers
>  - the cpu type
>  - the reset source handling
>  - a minimal set of clocks
>  - pin control definitions
>    In this last case, the big mfp-pxaxxx.h files were dropped, forcing
>    board developers to use MFP_LPM_* macros cunningly.
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> ---
>  arch/arm/cpu/Kconfig                         |   6 +
>  arch/arm/mach-pxa/Kconfig                    |  19 ++
>  arch/arm/mach-pxa/Makefile                   |   1 +
>  arch/arm/mach-pxa/common.c                   |  12 +-
>  arch/arm/mach-pxa/include/mach/clock.h       |   1 +
>  arch/arm/mach-pxa/include/mach/hardware.h    |  18 +-
>  arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h  |  25 ++
>  arch/arm/mach-pxa/include/mach/pxa-regs.h    |   4 +-
>  arch/arm/mach-pxa/include/mach/pxa3xx-regs.h | 224 ++++++++++++++++++
>  arch/arm/mach-pxa/include/plat/mfp.h         |   7 +-
>  arch/arm/mach-pxa/mfp.c                      | 338 +++++++++++++++++++++++++++
>  arch/arm/mach-pxa/reset_source.c             |  36 +++
>  arch/arm/mach-pxa/sleep.S                    |   9 +
>  arch/arm/mach-pxa/speed-pxa3xx.c             |  33 +++
>  14 files changed, 725 insertions(+), 8 deletions(-)
>  create mode 100644 arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h
>  create mode 100644 arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
>  create mode 100644 arch/arm/mach-pxa/mfp.c
>  create mode 100644 arch/arm/mach-pxa/speed-pxa3xx.c
> 
> -
> +	pxa_clear_reset_source();
> +#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?

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

> diff --git a/arch/arm/mach-pxa/reset_source.c b/arch/arm/mach-pxa/reset_source.c
> index a90584b..0730e02 100644
> --- a/arch/arm/mach-pxa/reset_source.c
> +++ b/arch/arm/mach-pxa/reset_source.c

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

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-01-05 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-04  9:41 Robert Jarzmik
2015-01-04  9:41 ` [PATCH v2 2/2] ARM: pxa: add the zylonite board Robert Jarzmik
2015-01-05 13:12 ` Sascha Hauer [this message]
2015-01-05 20:35   ` [PATCH v2 1/2] ARM: pxa: add pxa3xx architecture Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150105131245.GG4544@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox