From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
To: Johan Hovold <jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Robert Nelson
<Robert.Nelson-9gsZL1vm+hpBDgjK7y7TUQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
dgilbert-qazKcTl6WRFWk0Htik3J/w@public.gmane.org
Subject: Re: [RFC 2/5] ARM: at91/dts: add general purpose backup register (GPBR) support
Date: Mon, 8 Apr 2013 09:35:39 +0200 [thread overview]
Message-ID: <20130408073539.GP20693@game.jcrosoft.org> (raw)
In-Reply-To: <1365347572-14972-2-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 17:12 Sun 07 Apr , Johan Hovold wrote:
> Add arch device-tree setup code and DT-nodes for the General Purpose
> Backup Registers (GPBR).
>
> Note that all AT91 SoCs but at91rm9200 have these backup-powered
> registers.
>
> Signed-off-by: Johan Hovold <jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> .../devicetree/bindings/arm/atmel-at91.txt | 4 ++++
> arch/arm/boot/dts/at91sam9260.dtsi | 5 +++++
> arch/arm/boot/dts/at91sam9263.dtsi | 5 +++++
> arch/arm/boot/dts/at91sam9g45.dtsi | 5 +++++
> arch/arm/boot/dts/at91sam9n12.dtsi | 5 +++++
> arch/arm/boot/dts/at91sam9x5.dtsi | 5 +++++
> arch/arm/mach-at91/setup.c | 21 +++++++++++++++++++++
> 7 files changed, 50 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt
> index 1196290..fe64d0a 100644
> --- a/Documentation/devicetree/bindings/arm/atmel-at91.txt
> +++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt
> @@ -1,6 +1,10 @@
> Atmel AT91 device tree bindings.
> ================================
>
> +General Purpose Backup Registers (GPBR) required properties:
> +- compatible: Should be "atmel,at91sam9260-gpbr"
> +- reg: Should contain register location and length
> +
> PIT Timer required properties:
> - compatible: Should be "atmel,at91sam9260-pit"
> - reg: Should contain registers location and length
> diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
> index cb7bcc5..48ef04d 100644
> --- a/arch/arm/boot/dts/at91sam9260.dtsi
> +++ b/arch/arm/boot/dts/at91sam9260.dtsi
> @@ -87,6 +87,11 @@
> interrupts = <1 4 7>;
> };
>
> + gpbr@fffffd50 {
> + compatible = "atmel,at91sam9260-gpbr";
> + reg = <0xfffffd50 0x10>;
> + };
> +
> tcb0: timer@fffa0000 {
> compatible = "atmel,at91rm9200-tcb";
> reg = <0xfffa0000 0x100>;
> diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
> index 271d4de..e9676ba 100644
> --- a/arch/arm/boot/dts/at91sam9263.dtsi
> +++ b/arch/arm/boot/dts/at91sam9263.dtsi
> @@ -75,6 +75,11 @@
> interrupts = <1 4 7>;
> };
>
> + gpbr@fffffd60 {
> + compatible = "atmel,at91sam9260-gpbr";
> + reg = <0xfffffd60 0x50>;
> + };
> +
> tcb0: timer@fff7c000 {
> compatible = "atmel,at91rm9200-tcb";
> reg = <0xfff7c000 0x100>;
> diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
> index 6b1d4ca..d5e37ce 100644
> --- a/arch/arm/boot/dts/at91sam9g45.dtsi
> +++ b/arch/arm/boot/dts/at91sam9g45.dtsi
> @@ -92,6 +92,11 @@
> reg = <0xfffffd10 0x10>;
> };
>
> + gpbr@fffffd60 {
> + compatible = "atmel,at91sam9260-gpbr";
> + reg = <0xfffffd60 0x10>;
> + };
> +
> tcb0: timer@fff7c000 {
> compatible = "atmel,at91rm9200-tcb";
> reg = <0xfff7c000 0x100>;
> diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
> index 4801717..ac122a6 100644
> --- a/arch/arm/boot/dts/at91sam9n12.dtsi
> +++ b/arch/arm/boot/dts/at91sam9n12.dtsi
> @@ -85,6 +85,11 @@
> reg = <0xfffffe10 0x10>;
> };
>
> + gpbr@fffffe60 {
> + compatible = "atmel,at91sam9260-gpbr";
> + reg = <0xfffffe60 0x10>;
> + };
> +
> mmc0: mmc@f0008000 {
> compatible = "atmel,hsmci";
> reg = <0xf0008000 0x600>;
> diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
> index c461e11..13d069e 100644
> --- a/arch/arm/boot/dts/at91sam9x5.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
> @@ -88,6 +88,11 @@
> interrupts = <1 4 7>;
> };
>
> + gpbr@fffffe60 {
> + compatible = "atmel,at91sam9260-gpbr";
> + reg = <0xfffffe60 0x10>;
> + };
> +
> tcb0: timer@f8008000 {
> compatible = "atmel,at91sam9x5-tcb";
> reg = <0xf8008000 0x100>;
> diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
> index b01f4aa..a525390 100644
> --- a/arch/arm/mach-at91/setup.c
> +++ b/arch/arm/mach-at91/setup.c
> @@ -374,6 +374,26 @@ static void at91_dt_ramc(void)
> of_node_put(np);
> }
>
> +static struct of_device_id gpbr_ids[] = {
> + { .compatible = "atmel,at91sam9260-gpbr", },
> + { /* sentinel */ }
> +};
> +
> +static void at91_dt_gpbr(void)
> +{
> + struct device_node *np;
> +
> + np = of_find_matching_node(NULL, gpbr_ids);
> + if (!np)
> + panic("AT91: failed to find compatible gpbr node in dtb\n");
> +
> + at91_gpbr_base = of_iomap(np, 0);
> + if (!at91_gpbr_base)
> + panic("AT91: Failed to map gpbr registers\n");
> +
> + of_node_put(np);
> +}
binding ok this NO
no global pointer unless no choice
we need a framework
Best Regards,
J.
> +
> static struct of_device_id shdwc_ids[] = {
> { .compatible = "atmel,at91sam9260-shdwc", },
> { .compatible = "atmel,at91sam9rl-shdwc", },
> @@ -468,6 +488,7 @@ void __init at91_dt_initialize(void)
> at91_dt_rstc();
> at91_dt_ramc();
> at91_dt_shdwc();
> + at91_dt_gpbr();
>
> /* Init clock subsystem */
> at91_dt_clock_init();
> --
> 1.8.1.5
>
next prev parent reply other threads:[~2013-04-08 7:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <515CF985.6050009@interlog.com>
[not found] ` <515CF985.6050009-qazKcTl6WRFWk0Htik3J/w@public.gmane.org>
2013-04-04 8:11 ` [PATCH] rtc: rtc-at91sam9.c add DT support Nicolas Ferre
2013-04-04 13:25 ` Douglas Gilbert
[not found] ` <515D7F56.90702-qazKcTl6WRFWk0Htik3J/w@public.gmane.org>
2013-04-04 14:08 ` Nicolas Ferre
2013-04-04 19:14 ` Douglas Gilbert
2013-04-07 15:09 ` Johan Hovold
[not found] ` <1365347572-14972-1-git-send-email-jhovold@gmail.com>
[not found] ` <1365347572-14972-1-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-08 7:33 ` [RFC 1/5] ARM: at91: add general purpose backup register (GPBR) support Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 8:46 ` Johan Hovold
2013-04-08 10:04 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 12:39 ` Johan Hovold
2013-04-11 14:53 ` Jean-Christophe PLAGNIOL-VILLARD
[not found] ` <1365347572-14972-2-git-send-email-jhovold@gmail.com>
[not found] ` <1365347572-14972-2-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-08 7:35 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
[not found] ` <1365347572-14972-4-git-send-email-jhovold@gmail.com>
[not found] ` <1365347572-14972-4-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-08 7:38 ` [RFC 4/5] RTC: rtc-at91sam9: add device-tree support Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 9:00 ` Johan Hovold
2013-04-08 9:57 ` Nicolas Ferre
[not found] ` <51629472.3070404-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-04-08 10:03 ` Jean-Christophe PLAGNIOL-VILLARD
[not found] ` <20130408100301.GS20693-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
2013-04-08 10:42 ` Nicolas Ferre
[not found] ` <51629EFE.9000508-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-04-08 11:02 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:48 ` Johan Hovold
2013-04-08 11:08 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:38 ` Johan Hovold
2013-04-08 11:11 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 12:57 ` Johan Hovold
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=20130408073539.GP20693@game.jcrosoft.org \
--to=plagnioj-sclmfoaustbwk0htik3j/w@public.gmane.org \
--cc=Robert.Nelson-9gsZL1vm+hpBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=dgilbert-qazKcTl6WRFWk0Htik3J/w@public.gmane.org \
--cc=jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).