From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Gregory CLEMENT <gregory.clement@free-electrons.com>,
Jean-Jacques Hiblot <jjhiblot@traphandler.com>,
<b.brezillon@overkiz.com>
Cc: <plagnioj@jcrosoft.com>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 1/8] at91: dt: Adds support for the bus matrix declaration in the DT
Date: Wed, 12 Feb 2014 11:54:15 +0100 [thread overview]
Message-ID: <52FB52D7.4000906@atmel.com> (raw)
In-Reply-To: <52FB50BB.5070603@free-electrons.com>
On 12/02/2014 11:45, Gregory CLEMENT :
> Hi Jean-Jacques,
>
> Thanks for this new series, I have one little comment:
>
> On 12/02/2014 11:06, Jean-Jacques Hiblot wrote:
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
>> ---
>> arch/arm/mach-at91/setup.c | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
>> index f7ca97b..b8d0b66 100644
>> --- a/arch/arm/mach-at91/setup.c
>> +++ b/arch/arm/mach-at91/setup.c
>> @@ -487,6 +487,28 @@ end:
>> of_node_put(np);
>> }
>>
>> +static struct of_device_id matrix_ids[] = {
>> + { .compatible = "atmel,at91sam9261-bus-matrix", },
>> + { /*sentinel*/ }
I think that we can introduce this compatible string with sam9260
product: "atmel,at91sam9260-bus-matrix".
In addition, can you add this new binding in the documentation file:
Documentation/devicetree/bindings/arm/atmel-at91.txt
(in another patch with the "dt: bindings: " subject prefix + add the DT
mailing-list: devicetree@vger.kernel.org).
>> +};
>> +
>> +static void at91_dt_matrix(void)
>> +{
>> + struct device_node *np;
>> +
>> + np = of_find_matching_node(NULL, matrix_ids);
>> + if (!np) {
>> + pr_debug("AT91: unable to find compatible bus matrix controller node in dtb\n");
>
> I think that a panic here should be more consistent with the next check.
> Indeed if it fails here then at91_matrix_base will be uninitialized too,
> and it will make the kernel crash when at91_matrix_base will be accessed.
Yes.
> Thanks,
>
> Gregory
>
>
>> + return;
>> + }
>> +
>> + at91_matrix_base = of_iomap(np, 0);
>> + if (!at91_matrix_base)
>> + panic("Impossible to ioremap at91_matrix_base\n");
>> +
>> + of_node_put(np);
>> +}
>> +
>> void __init at91rm9200_dt_initialize(void)
>> {
>> at91_dt_ramc();
>> @@ -506,6 +528,7 @@ void __init at91_dt_initialize(void)
>> at91_dt_rstc();
>> at91_dt_ramc();
>> at91_dt_shdwc();
>> + at91_dt_matrix();
>>
>> /* Init clock subsystem */
>> at91_dt_clock_init();
>>
>
>
--
Nicolas Ferre
next prev parent reply other threads:[~2014-02-12 10:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 10:06 [PATCH v4 0/8] Device Tree support for the at91sam9261ek Jean-Jacques Hiblot
2014-02-12 10:06 ` [PATCH v4 1/8] at91: dt: Adds support for the bus matrix declaration in the DT Jean-Jacques Hiblot
2014-02-12 10:45 ` Gregory CLEMENT
2014-02-12 10:54 ` Nicolas Ferre [this message]
2014-02-12 10:06 ` [PATCH v4 2/8] at91: pinctrl: don't request GPIOs used for interrupts but lock them as IRQ Jean-Jacques Hiblot
2014-02-12 17:47 ` Nicolas Ferre
2014-02-24 13:25 ` Linus Walleij
2014-02-25 9:35 ` Jean-Jacques Hiblot
2014-02-25 9:47 ` Jean-Jacques Hiblot
2014-02-12 10:06 ` [PATCH v4 3/8] at91: dt: Add at91sam9261 dt SoC support Jean-Jacques Hiblot
2014-02-12 17:28 ` Alexandre Belloni
2014-02-12 19:47 ` Jean-Jacques Hiblot
2014-02-13 8:10 ` Nicolas Ferre
2014-02-13 8:54 ` Alexandre Belloni
2014-02-12 21:04 ` Alexandre Belloni
2014-02-13 6:11 ` Jean-Jacques Hiblot
2014-02-12 10:06 ` [PATCH v4 4/8] at91: dt: defconfig: Added the sam9261 to the list of DT-enabled SOCs Jean-Jacques Hiblot
2014-02-12 10:06 ` [PATCH v4 5/8] at91: dt: sam9261: Device Tree support for the at91sam9261ek Jean-Jacques Hiblot
2014-02-12 10:06 ` [PATCH v4 6/8] at91: updated the at91_dt_defconfig with support for the ADS7846 Jean-Jacques Hiblot
2014-02-12 10:06 ` [PATCH v4 7/8] ARM: at91: prepare common clk transition for sam9261 SoC Jean-Jacques Hiblot
2014-02-12 10:06 ` [PATCH v4 8/8] ARM: at91: move sam9261 SoC to common clk Jean-Jacques Hiblot
2014-02-12 11:14 ` [PATCH v4 0/8] Device Tree support for the at91sam9261ek Gregory CLEMENT
2014-02-12 12:34 ` Thomas Petazzoni
2014-02-12 12:36 ` Jean-Jacques Hiblot
2014-02-12 12:44 ` Thomas Petazzoni
2014-02-12 13:01 ` Jean-Jacques Hiblot
2014-02-12 12:35 ` Jean-Jacques Hiblot
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=52FB52D7.4000906@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=b.brezillon@overkiz.com \
--cc=gregory.clement@free-electrons.com \
--cc=jjhiblot@traphandler.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
/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).