All of lore.kernel.org
 help / color / mirror / Atom feed
From: gerlando.falauto@keymile.com (Gerlando Falauto)
To: linux-arm-kernel@lists.infradead.org
Subject: DT version of kirkwood_ge0x_init()
Date: Tue, 04 Jun 2013 12:18:08 +0200	[thread overview]
Message-ID: <51ADBEE0.5040500@keymile.com> (raw)

Hi everyone,

I noticed how most of the DT-aware board-setup files only have a single
<board>_init() function, calling kirkwood_ge00_init() with a struct 
mv643xx_eth_platform_data as a single argument.

I was wondering -- is there a reason why we cannot remove all this 
board-specific code and move all this to the DT?

I noticed how NS2 can somehow trick this value depeding on the 
compatible string, so I assume it's not really *THAT* early, as the 
whole DT infrastructure is already available:

	if (of_machine_is_compatible("lacie,cloudbox") ||
	    of_machine_is_compatible("lacie,netspace_lite_v2") ||
	    of_machine_is_compatible("lacie,netspace_mini_v2"))
		ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
	kirkwood_ge00_init(&ns2_ge00_data);

I guess we could remove a lot of board-specific code if we could move 
this last bit of information to the DT.
Unless compatibility with existing DTs is an issue -- but what about new 
boards?

I would really love to have all our boards under a single 
CONFIG_<FAMILY>_DT and a single compatible string, with all the 
differences within the DTs itself -- no more #ifdef CONFIG_<BOARD>, no 
more of_machine_is_compatible("boardXXX").

Any feedback (swearwords included -- in case I'm talking non-sense) 
would be more than welcome.

Thank you!
Gerlando

WARNING: multiple messages have this Message-ID (diff)
From: Gerlando Falauto <gerlando.falauto@keymile.com>
To: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,
	"Longchamp, Valentin" <Valentin.Longchamp@keymile.com>,
	devicetree-discuss@lists.ozlabs.org, "Brunck,
	Holger" <Holger.Brunck@keymile.com>,
	Simon Guinot <simon@sequanux.org>
Subject: DT version of kirkwood_ge0x_init()
Date: Tue, 04 Jun 2013 12:18:08 +0200	[thread overview]
Message-ID: <51ADBEE0.5040500@keymile.com> (raw)

Hi everyone,

I noticed how most of the DT-aware board-setup files only have a single
<board>_init() function, calling kirkwood_ge00_init() with a struct 
mv643xx_eth_platform_data as a single argument.

I was wondering -- is there a reason why we cannot remove all this 
board-specific code and move all this to the DT?

I noticed how NS2 can somehow trick this value depeding on the 
compatible string, so I assume it's not really *THAT* early, as the 
whole DT infrastructure is already available:

	if (of_machine_is_compatible("lacie,cloudbox") ||
	    of_machine_is_compatible("lacie,netspace_lite_v2") ||
	    of_machine_is_compatible("lacie,netspace_mini_v2"))
		ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
	kirkwood_ge00_init(&ns2_ge00_data);

I guess we could remove a lot of board-specific code if we could move 
this last bit of information to the DT.
Unless compatibility with existing DTs is an issue -- but what about new 
boards?

I would really love to have all our boards under a single 
CONFIG_<FAMILY>_DT and a single compatible string, with all the 
differences within the DTs itself -- no more #ifdef CONFIG_<BOARD>, no 
more of_machine_is_compatible("boardXXX").

Any feedback (swearwords included -- in case I'm talking non-sense) 
would be more than welcome.

Thank you!
Gerlando

             reply	other threads:[~2013-06-04 10:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 10:18 Gerlando Falauto [this message]
2013-06-04 10:18 ` DT version of kirkwood_ge0x_init() Gerlando Falauto
2013-06-04 10:34 ` Sebastian Hesselbarth
2013-06-04 10:34   ` Sebastian Hesselbarth
2013-06-04 10:43   ` Jason Cooper
2013-06-04 10:43     ` Jason Cooper
2013-06-04 11:59     ` Simon Guinot
2013-06-04 11:59       ` Simon Guinot
2013-06-04 12:05       ` Jason Cooper
2013-06-04 12:05         ` Jason Cooper
2013-06-04 12:18         ` Simon Guinot
2013-06-04 12:18           ` Simon Guinot
2013-06-04 13:10         ` Jason Cooper
2013-06-04 13:10           ` Jason Cooper
2013-06-04 20:53   ` Gerlando Falauto
2013-06-04 20:53     ` Gerlando Falauto
2013-06-05  9:04     ` Sebastian Hesselbarth
2013-06-05  9:04       ` Sebastian Hesselbarth
2013-06-05  9:37       ` Gerlando Falauto
2013-06-05  9:37         ` Gerlando Falauto
2013-06-05  9:45         ` Gregory CLEMENT
2013-06-05  9:45           ` Gregory CLEMENT
2013-06-05  9:49         ` Sebastian Hesselbarth
2013-06-05  9:49           ` Sebastian Hesselbarth
2013-06-05  9:55           ` Gerlando Falauto
2013-06-05  9:55             ` Gerlando Falauto
2013-06-05 13:23       ` Jason Cooper
2013-06-05 13:23         ` Jason Cooper

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=51ADBEE0.5040500@keymile.com \
    --to=gerlando.falauto@keymile.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.