From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] dm: at91: Add platform data for GPIO on at91sam9260-based boards
Date: Thu, 23 Oct 2014 08:58:09 +0200 [thread overview]
Message-ID: <5448A701.6020000@googlemail.com> (raw)
In-Reply-To: <1412619262-23903-5-git-send-email-sjg@chromium.org>
Hi Simon,
On 06.10.14 20:14, Simon Glass wrote:
> These boards all have the same GPIO arrangement, so add some common platform
> data that can be used by all boards. Remove the configs which are no longer
> required.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c | 14 ++++++++++++++
> arch/arm/include/asm/arch-at91/at91sam9260.h | 4 +++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
> index cae4abc..5edcfc2 100644
> --- a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
> +++ b/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
> @@ -7,6 +7,7 @@
> */
>
> #include <common.h>
> +#include <dm.h>
> #include <asm/io.h>
> #include <asm/arch/at91_common.h>
> #include <asm/arch/at91_pmc.h>
> @@ -207,3 +208,16 @@ void at91_mci_hw_init(void)
> #endif
> }
> #endif
> +
> +/* Platform data for the GPIOs */
> +static const struct at91_port_platdata at91sam9260_plat[] = {
> + { ATMEL_BASE_PIOA, "A" },
> + { ATMEL_BASE_PIOB, "B" },
> + { ATMEL_BASE_PIOC, "C" },
data sheet call the parts 'Px', sam9260 has PA0..PA31, PB0..PB31 and
PC0..PC31, shouldn't we use that name here too?
> +};
> +
> +U_BOOT_DEVICES(at91sam9260_gpios) = {
> + { "gpio_at91", &at91sam9260_plat[0] },
> + { "gpio_at91", &at91sam9260_plat[1] },
> + { "gpio_at91", &at91sam9260_plat[2] },
> +};
> diff --git a/arch/arm/include/asm/arch-at91/at91sam9260.h b/arch/arm/include/asm/arch-at91/at91sam9260.h
> index 2e902ee..4d46def 100644
> --- a/arch/arm/include/asm/arch-at91/at91sam9260.h
> +++ b/arch/arm/include/asm/arch-at91/at91sam9260.h
> @@ -136,9 +136,11 @@
> /*
> * Other misc defines
> */
> +#ifndef CONFIG_DM_GPIO
> #define ATMEL_PIO_PORTS 3 /* these SoCs have 3 PIO */
> -#define ATMEL_PMC_UHP AT91SAM926x_PMC_UHP
> #define ATMEL_BASE_PIO ATMEL_BASE_PIOA
> +#endif
> +#define ATMEL_PMC_UHP AT91SAM926x_PMC_UHP
>
> /*
> * SoC specific defines
>
Best regards
Andreas Bie?mann
next prev parent reply other threads:[~2014-10-23 6:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 18:14 [U-Boot] [PATCH 0/7] dm: Introduce driver model for Atmel at91 Simon Glass
2014-10-06 18:14 ` [U-Boot] [PATCH 1/7] dm: at91: Correct text base for snapper9260 Simon Glass
2014-10-23 5:07 ` Andreas Bießmann
2014-10-23 5:10 ` Andreas Bießmann
2014-10-23 5:12 ` Simon Glass
2014-10-23 5:21 ` Andreas Bießmann
2014-10-23 20:10 ` Simon Glass
2014-10-06 18:14 ` [U-Boot] [PATCH 2/7] dm: at91: Move snapper9260 to generic baord Simon Glass
2014-10-06 18:14 ` [U-Boot] [PATCH 3/7] dm: at91: Add driver model support for atmel GPIO driver Simon Glass
2014-10-23 6:52 ` Andreas Bießmann
2014-10-06 18:14 ` [U-Boot] [PATCH 4/7] dm: at91: Add platform data for GPIO on at91sam9260-based boards Simon Glass
2014-10-23 6:58 ` Andreas Bießmann [this message]
2014-10-06 18:14 ` [U-Boot] [PATCH 5/7] dm: at91: Refactor serial driver slightly for driver model Simon Glass
2014-10-23 19:40 ` Andreas Bießmann
2014-10-06 18:14 ` [U-Boot] [PATCH 6/7] dm: at91: Add driver model support for the serial driver Simon Glass
2014-10-23 20:04 ` Andreas Bießmann
2014-10-06 18:14 ` [U-Boot] [PATCH 7/7] dm: at91: Convert snapper9260 to use driver model Simon Glass
2014-10-23 20:09 ` Andreas Bießmann
2014-10-23 4:09 ` [U-Boot] [PATCH 0/7] dm: Introduce driver model for Atmel at91 Simon Glass
2014-10-23 20:09 ` Andreas Bießmann
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=5448A701.6020000@googlemail.com \
--to=andreas.devel@googlemail.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.