All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Ian Molton <ian.molton@codethink.co.uk>
Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch,
	netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	ben.dooks@codethink.co.uk, linuxppc-dev@lists.ozlabs.org,
	David Miller <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 0/7] mv643xx.c: Add basic device tree support.
Date: Fri, 10 Aug 2012 10:49:57 +0000	[thread overview]
Message-ID: <201208101049.57586.arnd@arndb.de> (raw)
In-Reply-To: <5023D577.8090001@codethink.co.uk>

On Thursday 09 August 2012, Ian Molton wrote:
> >  I think showing one
> > parent device with children at address 0, 1 and 2 is ok.
> Is it acceptable for the child devices to directly access the
> parents register space? because there would be no other
> way for that to work.

Yes, I see no problem with that. As long as all the drivers
agree on who can access what.

> >  The driver
> > already knows all those offsets and they are always the same
> > for all variants of mv643xx, right?
> Yes, but its not clean. And no amount of refactoring is
> really going to make a nice driver that also fits the ancient
> (and badly thought out) OF bindings.

In what way is it badly though out, or not clean? The use of
underscores in the properties, and the way that the sram
is configured is problematic, I agree. But The way that
the three ports are addressed and how the PHY is found
seems quite clever.

> If we have to break things, we can at least go for a nice
> clean design, surely?
> 
> The ports arent really child devices of the MAC. The MAC
> just has 3 ports.

I don't see the difference between those two things.

> Luckily, it looks like the existing users don't actually use
> the device tree to set up the driver at all, preferring to
> translate their D-T bindings to calls to
> platform_device_register() so all we'd need to do to
> support them is completely ignore them.
> 
> We're going to have to maintain a legacy
> platform_device -> DT bindings hack somewhere anyway,
> at least until the remaining other users of the driver
> convert to D-T.

I don't understand why you describe the method used in
powerpc as a hack. It was the normal way to introduce
DT support for platform devices back when it was implemented.
It also had the advantage of not requiring any modifications
to the generic driver, because it was shared between one
architecture using DT (powerpc) and one that didn't (ARM).

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/7] mv643xx.c: Add basic device tree support.
Date: Fri, 10 Aug 2012 10:49:57 +0000	[thread overview]
Message-ID: <201208101049.57586.arnd@arndb.de> (raw)
In-Reply-To: <5023D577.8090001@codethink.co.uk>

On Thursday 09 August 2012, Ian Molton wrote:
> >  I think showing one
> > parent device with children at address 0, 1 and 2 is ok.
> Is it acceptable for the child devices to directly access the
> parents register space? because there would be no other
> way for that to work.

Yes, I see no problem with that. As long as all the drivers
agree on who can access what.

> >  The driver
> > already knows all those offsets and they are always the same
> > for all variants of mv643xx, right?
> Yes, but its not clean. And no amount of refactoring is
> really going to make a nice driver that also fits the ancient
> (and badly thought out) OF bindings.

In what way is it badly though out, or not clean? The use of
underscores in the properties, and the way that the sram
is configured is problematic, I agree. But The way that
the three ports are addressed and how the PHY is found
seems quite clever.

> If we have to break things, we can at least go for a nice
> clean design, surely?
> 
> The ports arent really child devices of the MAC. The MAC
> just has 3 ports.

I don't see the difference between those two things.

> Luckily, it looks like the existing users don't actually use
> the device tree to set up the driver at all, preferring to
> translate their D-T bindings to calls to
> platform_device_register() so all we'd need to do to
> support them is completely ignore them.
> 
> We're going to have to maintain a legacy
> platform_device -> DT bindings hack somewhere anyway,
> at least until the remaining other users of the driver
> convert to D-T.

I don't understand why you describe the method used in
powerpc as a hack. It was the normal way to introduce
DT support for platform devices back when it was implemented.
It also had the advantage of not requiring any modifications
to the generic driver, because it was shared between one
architecture using DT (powerpc) and one that didn't (ARM).

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Ian Molton <ian.molton@codethink.co.uk>
Cc: linux-arm-kernel@lists.infradead.org,
	thomas.petazzoni@free-electrons.com, andrew@lunn.ch,
	netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	ben.dooks@codethink.co.uk, dale@farnsworth.org,
	linuxppc-dev@lists.ozlabs.org, David Miller <davem@davemloft.net>
Subject: Re: [PATCH v3 0/7] mv643xx.c: Add basic device tree support.
Date: Fri, 10 Aug 2012 10:49:57 +0000	[thread overview]
Message-ID: <201208101049.57586.arnd@arndb.de> (raw)
In-Reply-To: <5023D577.8090001@codethink.co.uk>

On Thursday 09 August 2012, Ian Molton wrote:
> >  I think showing one
> > parent device with children at address 0, 1 and 2 is ok.
> Is it acceptable for the child devices to directly access the
> parents register space? because there would be no other
> way for that to work.

Yes, I see no problem with that. As long as all the drivers
agree on who can access what.

> >  The driver
> > already knows all those offsets and they are always the same
> > for all variants of mv643xx, right?
> Yes, but its not clean. And no amount of refactoring is
> really going to make a nice driver that also fits the ancient
> (and badly thought out) OF bindings.

In what way is it badly though out, or not clean? The use of
underscores in the properties, and the way that the sram
is configured is problematic, I agree. But The way that
the three ports are addressed and how the PHY is found
seems quite clever.

> If we have to break things, we can at least go for a nice
> clean design, surely?
> 
> The ports arent really child devices of the MAC. The MAC
> just has 3 ports.

I don't see the difference between those two things.

> Luckily, it looks like the existing users don't actually use
> the device tree to set up the driver at all, preferring to
> translate their D-T bindings to calls to
> platform_device_register() so all we'd need to do to
> support them is completely ignore them.
> 
> We're going to have to maintain a legacy
> platform_device -> DT bindings hack somewhere anyway,
> at least until the remaining other users of the driver
> convert to D-T.

I don't understand why you describe the method used in
powerpc as a hack. It was the normal way to introduce
DT support for platform devices back when it was implemented.
It also had the advantage of not requiring any modifications
to the generic driver, because it was shared between one
architecture using DT (powerpc) and one that didn't (ARM).

	Arnd

  reply	other threads:[~2012-08-10 10:49 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 14:34 [PATCH v3 0/7] mv643xx.c: Add basic device tree support Ian Molton
2012-08-07 14:34 ` Ian Molton
2012-08-07 14:34 ` [PATCH v3 1/7] Initial csb1724 board support (FDT) Ian Molton
2012-08-07 14:34   ` Ian Molton
2012-08-07 14:34 ` [PATCH v3 2/7] mv643xx.c: Remove magic numbers Ian Molton
2012-08-07 14:34   ` Ian Molton
2012-08-07 14:34 ` [PATCH v3 3/7] mv643xx.c: Add basic device tree support Ian Molton
2012-08-07 14:34   ` Ian Molton
2012-08-07 14:56   ` Arnd Bergmann
2012-08-07 14:56     ` Arnd Bergmann
2012-08-07 15:56     ` Ian Molton
2012-08-07 15:56       ` Ian Molton
2012-08-07 20:25       ` Arnd Bergmann
2012-08-07 20:25         ` Arnd Bergmann
2012-08-07 20:25         ` Arnd Bergmann
2012-08-07 14:34 ` [PATCH v3 4/7] kirkwood: Add fixups for DT based mv643xx ethernet Ian Molton
2012-08-07 14:34   ` Ian Molton
2012-08-07 14:34 ` [PATCH v3 5/7] csb1724: Enable device tree based mv643xx ethernet support Ian Molton
2012-08-07 14:34   ` Ian Molton
2012-08-07 14:34 ` [PATCH v3 6/7] DT: Convert all kirkwood boards with mv643xx that use DT Ian Molton
2012-08-07 14:34   ` Ian Molton
2012-08-07 14:34 ` [PATCH v3 7/7] NET: mv643xx: remove device name macro Ian Molton
2012-08-07 14:34   ` Ian Molton
2012-08-07 23:29 ` [PATCH v3 0/7] mv643xx.c: Add basic device tree support David Miller
2012-08-07 23:29   ` David Miller
2012-08-08  0:31   ` Matt Sealey
2012-08-08  0:31     ` Matt Sealey
2012-08-08  8:16   ` Arnd Bergmann
2012-08-08  8:16     ` Arnd Bergmann
2012-08-08  8:59     ` David Miller
2012-08-08  8:59       ` David Miller
2012-08-08  9:40     ` Ian Molton
2012-08-08  9:40       ` Ian Molton
2012-08-08  9:42       ` Ian Molton
2012-08-08  9:42         ` Ian Molton
2012-08-08 11:51       ` Ian Molton
2012-08-08 11:51         ` Ian Molton
2012-08-08 12:39         ` Arnd Bergmann
2012-08-08 12:39           ` Arnd Bergmann
2012-08-08 13:19           ` Ian Molton
2012-08-08 13:19             ` Ian Molton
2012-08-09 10:59             ` Ian Molton
2012-08-09 10:59               ` Ian Molton
2012-08-09 10:59               ` Ian Molton
2012-08-09 11:43               ` Arnd Bergmann
2012-08-09 11:43                 ` Arnd Bergmann
2012-08-09 11:43                 ` Arnd Bergmann
2012-08-09 15:21                 ` Ian Molton
2012-08-09 15:21                   ` Ian Molton
2012-08-09 15:21                   ` Ian Molton
2012-08-10 10:49                   ` Arnd Bergmann [this message]
2012-08-10 10:49                     ` Arnd Bergmann
2012-08-10 10:49                     ` Arnd Bergmann
2012-08-13 10:00                     ` Ian Molton
2012-08-13 10:00                       ` Ian Molton
2012-08-13 10:00                       ` Ian Molton
2012-08-16 16:30                       ` Ian Molton
2012-08-16 16:30                         ` Ian Molton
2012-08-16 16:30                         ` Ian Molton
2012-09-10 14:22                         ` Arnd Bergmann
2012-09-10 14:22                           ` Arnd Bergmann
2012-09-10 14:22                           ` Arnd Bergmann
2012-09-11  6:03                           ` Benjamin Herrenschmidt
2012-09-11  6:03                             ` Benjamin Herrenschmidt
2012-09-11  6:03                             ` Benjamin Herrenschmidt
2012-10-21  1:52                             ` Jason Cooper
2012-10-21  1:52                               ` Jason Cooper
2012-10-21  1:52                               ` Jason Cooper
2012-08-17 12:13                       ` Arnd Bergmann
2012-08-17 12:13                         ` Arnd Bergmann
2012-08-17 12:13                         ` Arnd Bergmann

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=201208101049.57586.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=andrew@lunn.ch \
    --cc=ben.dooks@codethink.co.uk \
    --cc=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=ian.molton@codethink.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /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.