linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2] AT91: dt: at91sam9g45 family and board device tree files
Date: Tue, 18 Oct 2011 12:07:17 +0200	[thread overview]
Message-ID: <4E9D4FD5.8080802@atmel.com> (raw)
In-Reply-To: <4E8EF6F4.4030905@atmel.com>

On 10/07/2011 02:56 PM, Nicolas Ferre :
> On 10/05/2011 03:00 PM, Rob Herring :
>> Nicolas,
>>
>> On 10/03/2011 05:00 AM, Nicolas Ferre wrote:
>>> Create a new device tree source file for Atmel at91sam9g45 SoC family.
>>> The Evaluation Kit at91sam9m10g45ek includes it.
>>> This first basic support will be populated as drivers and boards will be
>>> converted to device tree.
>>> Contains serial, dma and interrupt controllers.
>>>
>>> The generic board file still takes advantage of platform data for early serial
>>> init. As we need a storage media and the NAND flash driver is not converted to
>>> DT yet, we keep old initialization for it.
>>>
>>> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>

[..]

>>> diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
>>> new file mode 100644
>>> index 0000000..7bcb9a9
>>> --- /dev/null
>>> +++ b/arch/arm/mach-at91/board-dt.c
>>> @@ -0,0 +1,122 @@
>>> +/*
>>> + *  Setup code for AT91SAM Evaluation Kits with Device Tree support
>>> + *
>>> + *  Covers: * AT91SAM9G45-EKES  board
>>> + *          * AT91SAM9M10-EKES  board
>>> + *          * AT91SAM9M10G45-EK board
>>> + *
>>> + *  Copyright (C) 2011 Atmel,
>>> + *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
>>> + *
>>> + * Licensed under GPLv2 or later.
>>> + */
>>> +
>>> +#include <linux/types.h>
>>> +#include <linux/init.h>
>>> +#include <linux/module.h>
>>> +#include <linux/irqdomain.h>
>>> +#include <linux/of_irq.h>
>>> +#include <linux/of_platform.h>
>>> +
>>> +#include <mach/hardware.h>
>>> +#include <mach/board.h>
>>> +#include <mach/gpio.h>
>>> +#include <mach/system_rev.h>
>>> +#include <mach/at91sam9_smc.h>
>>> +
>>> +#include <asm/setup.h>
>>> +#include <asm/irq.h>
>>> +#include <asm/mach/arch.h>
>>> +#include <asm/mach/map.h>
>>> +#include <asm/mach/irq.h>
>>> +
>>> +#include "sam9_smc.h"
>>> +#include "generic.h"

As found by Jean-Christophe, it seems that some clock lookup data are missing here. Something like:

+/*
+ * Lookup table for attaching a specific name and platform_data pointer to
+ * devices as they get created by of_platform_populate(). Ideally this table
+ * would not exist, but the current clock implementation depends on some devices
+ * having a specific name.
+ /
+static const struct of_dev_auxdata at91_auxdata_lookup[] __initconst = {
+ / at91sam9260/ at91sam9g20 /
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfffff200, "atmel_usart.0", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfffb0000, "atmel_usart.1", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfffb4000, "atmel_usart.2", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfffb8000, "atmel_usart.3", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfffd0000, "atmel_usart.4", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfffd4000, "atmel_usart.5", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfffd8000, "atmel_usart.6", NULL),
+ / at91sam9g45*/
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xffffee00, "atmel_usart.0", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfff8c000, "atmel_usart.1", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfff90000, "atmel_usart.2", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfff94000, "atmel_usart.3", NULL),
+ OF_DEV_AUXDATA("atmel,at91sam9260-usart", 0xfff98000, "atmel_usart.4", NULL),
+ { /* sentinel */ }
+};

With a change here:
  of_platform_populate(NULL, of_default_bus_match_table, at91_auxdata_lookup, NULL);

I know that it is a temporary usage of auxdata. Does it sound the right thing to do for the moment?

Best regards,
-- 
Nicolas Ferre

  reply	other threads:[~2011-10-18 10:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 10:00 [PATCH V2] AT91: dt: at91sam9g45 family and board device tree files Nicolas Ferre
2011-10-03  8:52 ` Russell King - ARM Linux
2011-10-05 13:00 ` Rob Herring
2011-10-07 12:56   ` Nicolas Ferre
2011-10-18 10:07     ` Nicolas Ferre [this message]
2011-10-18 20:44       ` Rob Herring
2011-10-19  8:03         ` Nicolas Ferre
2011-10-20  2:06           ` Rob Herring
2011-10-24 14:05             ` [PATCH V3 1/2] ARM: at91: " Nicolas Ferre
2011-10-24 14:05               ` [PATCH V3 2/2] ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support Nicolas Ferre
2011-10-24 14:09                 ` [PATCH V3 (bugfix to fold)] ARM: at91: usb_a9g20.dts: fix memory location Nicolas Ferre
2011-10-24 14:49                 ` [PATCH V3 2/2] ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support Rob Herring
2011-10-24 14:12               ` [PATCH V3 1/2] ARM: at91: dt: at91sam9g45 family and board device tree files Baruch Siach
2011-10-24 14:32                 ` Nicolas Ferre
2011-10-24 14:44               ` Rob Herring
2011-10-25 11:06                 ` Nicolas Ferre
2011-10-24 14:34       ` [PATCH V2] AT91: " Grant Likely
2011-10-24 14:42         ` Nicolas Ferre

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=4E9D4FD5.8080802@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.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).