public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: powerpc_flash_init(), wtf!?
Date: Thu, 3 May 2007 17:03:58 +1000	[thread overview]
Message-ID: <20070503070358.GA9430@localhost.localdomain> (raw)
In-Reply-To: <20070503103534.63ff67b6@localhost.localdomain>

On Thu, May 03, 2007 at 10:35:34AM +0400, Vitaly Bordug wrote:
> On Tue, 1 May 2007 15:18:04 +1000
> David Gibson wrote:
> 
> > powerpc_flash_init(), the only function in arch/powerpc/sysdev/rom.c,
> > goes through the device tree finding anything with device_type=="rom"
> > and creating of_platform devices for them, which will be picked up by
> > the physmap_of mtd driver.  This has two serious conceptual errors and
> > one bad implementation error which is quite an accomplishment for 15
> > lines of code.
> > 
> It should be rewritten then - the way it does init is obsoleted by
> the of_platform_bus_probe() now and is confusion-prone. Have to
> admit I missed this part while reviewing that rom of_device patch.

Well, I don't see that it needs rewriting as a unit at all.  The
correct place for probing is in the platform code, no extra rom.c
necessary.

> [snip]
> 
> > 
> > Unless someone who actually knows how this code was intended to be
> > used can suggest a more polite way of fixing it.
> > 
> I guess, the idea was for this stuff to be updated once one of the
> dts inside boot/ would have physmap nodes added. I have
> rom/physmap[dts] rehaul in my TODO list, but it has (so far at
> least) little chance to happen during this merge window. Yet, if
> someone has suggestions and/or some interest for this to be cured,
> it will gain priority. Otherwise, I'll replace actual erroneous code
> with kind of rant that it's up to BSP code to take care of
> of_devices to be registered, using of_platform_bus_probe() or other
> way.

I'm having some trouble parsing that paragraph.  At this stage I don't
see any reason to hold off on tearing out arch/powerpc/sysdev/rom.c,
any necessary changes to replace it will go in the platform code or
other places.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2007-05-03  7:03 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01  5:18 powerpc_flash_init(), wtf!? David Gibson
2007-05-03  6:35 ` Vitaly Bordug
2007-05-03  7:03   ` David Gibson [this message]
2007-05-03 12:02     ` Sergei Shtylyov
2007-05-03 12:22       ` David Gibson
2007-05-03 13:28         ` Sergei Shtylyov
2007-05-03 16:21           ` Segher Boessenkool
2007-05-03 16:59             ` Sergei Shtylyov
2007-05-03 17:25               ` Segher Boessenkool
2007-05-03 21:37             ` Benjamin Herrenschmidt
2007-05-03 23:49             ` David Gibson
2007-05-03 12:29       ` Benjamin Herrenschmidt
2007-05-04  0:30         ` Vitaly Bordug
2007-05-04  1:28           ` David Gibson
2007-05-03 11:47 ` Sergei Shtylyov
2007-05-03 12:30   ` David Gibson
2007-05-03 13:04     ` Sergei Shtylyov
2007-05-03 16:20       ` Segher Boessenkool
2007-05-03 17:17         ` Sergei Shtylyov
2007-05-03 17:35           ` Segher Boessenkool
2007-05-03 18:19             ` Sergei Shtylyov
2007-05-03 21:44               ` Benjamin Herrenschmidt
2007-05-03 17:53           ` Sergei Shtylyov
2007-05-03 18:07             ` Segher Boessenkool
2007-05-03 23:56               ` David Gibson
2007-05-04 12:14                 ` Segher Boessenkool
2007-05-05 17:36                 ` Sergei Shtylyov
2007-05-05 20:19                   ` Segher Boessenkool
  -- strict thread matches above, loose matches on Subject: below --
2007-05-23 21:57 Mark A. Greer
2007-05-24  0:56 ` David Gibson

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=20070503070358.GA9430@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=vitb@kernel.crashing.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