From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/5] ARM: mv78x00: Convert RD-78X00-mASA board to device tree
Date: Mon, 20 May 2013 12:00:08 +0200 [thread overview]
Message-ID: <5199F428.7000305@free-electrons.com> (raw)
In-Reply-To: <20130520095231.GE26249@lunn.ch>
On 05/20/2013 11:52 AM, Andrew Lunn wrote:
> On Sun, May 19, 2013 at 11:39:35PM +0200, Gregory CLEMENT wrote:
>> This commit converts the 'RD-78X00-mASA' board to the Device
>> Tree. Most of the devices are converted to the Device Tree, the only
>> devices which have not their Device Tree bindings are the Gigabit
>> Ethernet ones and remain instantiated in the old way.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>> arch/arm/mach-mv78xx0/board-dt.c | 3 +++
>> arch/arm/mach-mv78xx0/common.h | 7 +++++++
>> arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | 10 ++++++++++
>> 3 files changed, 20 insertions(+)
>>
>> diff --git a/arch/arm/mach-mv78xx0/board-dt.c b/arch/arm/mach-mv78xx0/board-dt.c
>> index 4995fee..5111cbd 100644
>> --- a/arch/arm/mach-mv78xx0/board-dt.c
>> +++ b/arch/arm/mach-mv78xx0/board-dt.c
>> @@ -26,6 +26,9 @@ static void __init mv78x00_dt_init(void)
>> */
>> mv78xx0_init();
>>
>> + if (of_machine_is_compatible("marvell,rd-78x00-masa"))
>> + rd78x00_masa_init_dt();
>> +
>> of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>> }
>>
>> diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-mv78xx0/common.h
>> index 5e9485b..6e9140d 100644
>> --- a/arch/arm/mach-mv78xx0/common.h
>> +++ b/arch/arm/mach-mv78xx0/common.h
>> @@ -17,6 +17,13 @@ struct mv_sata_platform_data;
>> /*
>> * Basic MV78xx0 init functions used early by machine-setup.
>> */
>> +#ifdef CONFIG_MACH_RD78X00_MASA
>> +void rd78x00_masa_init_dt(void);
>> +#else
>> +static inline void rd78x00_masa_init_dt(void) {};
>> +#endif
>> +
>> +
>> int mv78xx0_core_index(void);
>> void mv78xx0_map_io(void);
>> void mv78xx0_init(void);
>> diff --git a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
>> index d2d06f3..8d88657 100644
>> --- a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
>> +++ b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
>> @@ -64,6 +64,16 @@ static void __init rd78x00_masa_init(void)
>> }
>> }
>>
>> +void __init rd78x00_masa_init_dt(void)
>> +{
>> + /* Internal devices not ported to DT yet */
>> + mv78xx0_ge00_init(&rd78x00_masa_ge00_data);
>> + mv78xx0_ge10_init(&rd78x00_masa_ge10_data);
>> + mv78xx0_ge01_init(&rd78x00_masa_ge01_data);
>> + mv78xx0_ge11_init(&rd78x00_masa_ge11_data);
>> +
>> +}
>
> Hi Gregory
>
> First off, the indentation looks wrong. Might be a space/tab issue.
Thanks I will fix it
>
> I would also be tempted to place this code into board-dt.c and not
> touch or even compile rd78x00-masa-setup.c when using DT. If i
> remember correctly, Jason had a patch for Kirkwood which centralized
> all the ethernet setup code. You can maybe copy/paste that.
OK I will have a look on it.
>
>> +
>> static int __init rd78x00_pci_init(void)
>> {
>> /*
>> --
>> 1.8.1.2
>>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2013-05-20 10:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-19 21:39 [RFC PATCH 0/5] ARM: mv78x00: First step to convert mv78x00 to Device Tree Gregory CLEMENT
2013-05-19 21:39 ` [RFC PATCH 1/5] ARM: mv78x00: Add generic support for the Device Tree boards Gregory CLEMENT
2013-05-19 21:39 ` [RFC PATCH 2/5] ARM: mv78x00: Convert RD-78X00-mASA board to device tree Gregory CLEMENT
2013-05-20 9:52 ` Andrew Lunn
2013-05-20 10:00 ` Gregory CLEMENT [this message]
2013-05-20 19:18 ` Gregory CLEMENT
2013-05-19 21:39 ` [RFC PATCH 3/5] ARM: mv78x00: Add infrastructure to support boards converted to DT Gregory CLEMENT
2013-05-19 21:39 ` [RFC PATCH 4/5] ARM: mv78x00: Add the Device Tree support for MV78X00 family Gregory CLEMENT
2013-05-20 17:21 ` Jason Cooper
2013-05-20 17:23 ` Sebastian Hesselbarth
2013-05-20 17:28 ` Jason Cooper
2013-05-19 21:39 ` [RFC PATCH 5/5] ARM: mv78x00: Add Device Tree support for the RD-78X00-mASA board Gregory CLEMENT
2013-05-20 9:43 ` [RFC PATCH 0/5] ARM: mv78x00: First step to convert mv78x00 to Device Tree Andrew Lunn
2013-05-20 9:59 ` Gregory CLEMENT
2013-05-20 10:07 ` Andrew Lunn
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=5199F428.7000305@free-electrons.com \
--to=gregory.clement@free-electrons.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).