public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: viresh.kumar@st•com (Viresh Kumar)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: SPEAr600: Add device-tree support to SPEAr600 boards
Date: Tue, 27 Mar 2012 16:57:40 +0530	[thread overview]
Message-ID: <4F71A42C.3090108@st.com> (raw)
In-Reply-To: <201203271115.07805.arnd@arndb.de>

On 3/27/2012 4:45 PM, Arnd Bergmann wrote:
> On Tuesday 27 March 2012, Viresh Kumar wrote:
> The normal way is to turn around the logic so you don't have to include this test
> at all. Just have one soc-specific init_machine and map_io function, that calls
> both soc-specific and shared soc functions, e.g.

But with that, i need multiple DT_MACHINE_START(). Isn't it?
Is this advisable?

> The other option would be to try to move stuff to a later point, e.g. don't
> initialize the clocks until the basic device tree is set up.
> of_machine_is_compatible() should work at init_early() time, but not at
> map_io() time. Other platforms set up the clocks at init_early() time.
> The spear3xx_dt_init function should be called from init_machine(), which
> happens much later, so I'm pretty sure you can use of_machine_is_compatible()
> if you can't just avoid it.

DT should be up but, nodes would be up only once we call
of_platform_populate() from this init routine. And i had following code in
my patch:

static void __init spear3xx_dt_init(void)
{
...
	if (of_machine_is_compatible("st,spear300"))
		of_platform_populate(NULL, of_default_bus_match_table,
				spear300_auxdata_lookup, NULL);
	else if (of_machine_is_compatible("st,spear310"))
		of_platform_populate(NULL, of_default_bus_match_table,
				spear310_auxdata_lookup, NULL);
	else if (of_machine_is_compatible("st,spear320"))
		of_platform_populate(NULL, of_default_bus_match_table,
				spear320_auxdata_lookup, NULL);

...
}

And so these checks are not working here. :(

> In case of the clocks, I think you could already merge all the clk_lookup
> arrays into one, which would result in a larger kernel image but should
> do no harm otherwise.

Actually we can't do it. :(
If i boot 300 then i will also get clocks of 310 and 320 in my clock list.
And once i go through this clock list to create clock tree (parent-child
relationship), i will try to access hardware registers of 310 & 320,
which are just not valid for 300. Kernel Crash!!

-- 
viresh

  reply	other threads:[~2012-03-27 11:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 14:47 [PATCH] ARM: SPEAr600: Add device-tree support to SPEAr600 boards Stefan Roese
2012-03-13 16:44 ` Arnd Bergmann
2012-03-14  7:08   ` Viresh Kumar
2012-03-14  9:58     ` Arnd Bergmann
2012-03-14 10:02       ` Viresh Kumar
2012-03-14  7:40   ` Stefan Roese
2012-03-14  9:48     ` Arnd Bergmann
2012-03-14 10:36       ` Stefan Roese
2012-03-14 13:27         ` Arnd Bergmann
2012-03-14 13:43           ` Stefan Roese
2012-03-14 14:09             ` Arnd Bergmann
2012-03-14 13:44           ` Rob Herring
2012-03-14  7:05 ` Viresh Kumar
2012-03-14  7:20   ` Stefan Roese
2012-03-15  8:48   ` Stefan Roese
2012-03-15  9:00     ` Viresh Kumar
2012-03-15 10:38       ` Stefan Roese
2012-03-15 10:40         ` Viresh Kumar
2012-03-15 13:39         ` Arnd Bergmann
2012-03-21 11:32           ` Viresh Kumar
2012-03-21 12:36             ` Arnd Bergmann
2012-03-21 13:28               ` viresh kumar
2012-03-21 14:04                 ` Arnd Bergmann
2012-03-21 14:18                   ` viresh kumar
2012-03-21 14:42                     ` Arnd Bergmann
2012-03-21 18:26                   ` Arnd Bergmann
2012-03-22  0:45                     ` viresh kumar
2012-03-22  8:10                       ` Arnd Bergmann
     [not found]               ` <CAOh2x=k6ZfamB8DnPgVPjxZ7E1gTuHOQYg6s1Nd1ybA+TSquWA@mail.gmail.com>
2012-03-22 14:20                 ` Arnd Bergmann
2012-03-27 10:27                   ` Viresh Kumar
2012-03-27 11:15                     ` Arnd Bergmann
2012-03-27 11:27                       ` Viresh Kumar [this message]
2012-03-27 11:45                         ` Viresh Kumar
2012-03-27 11:59                         ` Arnd Bergmann
     [not found]                           ` <CAOh2x==7gNt2Jb3-EHz9-R1pTy6zL93FmUmTBMdpYUnW3F=9Uw@mail.gmail.com>
2012-03-27 13:59                             ` Arnd Bergmann
2012-03-28  5:03                               ` Viresh Kumar
2012-03-28  8:13                                 ` Arnd Bergmann
2012-03-14  8:48 ` Jean-Christophe PLAGNIOL-VILLARD

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=4F71A42C.3090108@st.com \
    --to=viresh.kumar@st$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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