All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Green <andy.green@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	nicolas.pitre@linaro.org, s-jan@ti.com, patches@linaro.org,
	rostedt@goodmis.org
Subject: Re: [PATCH 2/3] OMAP2+ devices add mac address allocation register api
Date: Fri, 29 Jun 2012 22:03:29 +0800	[thread overview]
Message-ID: <4FEDB5B1.8000703@linaro.org> (raw)
In-Reply-To: <201206291345.49878.arnd@arndb.de>

On 06/29/12 21:45, the mail apparently from Arnd Bergmann included:
> On Friday 29 June 2012, Tony Lindgren wrote:
>> * Andy Green <andy.green@linaro.org> [120629 03:12]:
>>>> 2. Is this really how we want to pass the board generated mac addresses
>>>>     and other dynamically generated data to the drivers that are device
>>>>     tree based?
>>>
>>> The issue is that both these busses have an async probe, in the case
>>> of USB stack the maintainer was not interested last year in adding
>>> platform data.  Maybe it changed but that's my understanding.
>>
>> OK, I'd like to hear Arnds comments on the #2 above too as this is
>> a more generic issue.
>
> In case we have a device tree, we should just be using the USB binding
> to find the specific device node, and add the property there. Then
> the device driver can use of_get_mac_address() on the usb device itself.
>
> I'm not sure what it takes to add the link for the device node in the
> usb probing code, but my feeling is that it's not too hard.
>
> Right now, USB is probed entirely without DT, so the patch is about
> the best we can do.

Yes none of this was really hard the problem with more generic approach 
was getting comprehension and not auto-reject at the other subsystems. 
To be fair USB is USB and DT is Arm-specific issue.

>>>> 3. What about mac address in board-generic.c when booting panda with
>>>>     device tree?
>>>
>>> I don't mind adapting it for that case.
>>
>> Just to try to think about some alternatives, how about something like
>> this: This all could be a driver called soft-mac or something that does
>> what your patches are doing. Except then it would be completely generic
>> and would be able to take device names and mac addresses from platform
>> data or from devicetree.
>
> That driver would be completely generic to all platforms, but be
> very specific to finding the mac address of a device, as opposed to
> other properties.
>
> I suspect that if we do that, we will still need a way to bind a
> device_node to a usb device for the purpose of finding other
> properties, such as external regulators or clocks that are connected
> to a hardwired USB device.

There's no standardized exposure of logical regulators over USB afaik so 
you won't be able to 'find' them without a VID:PID -bound specific 
driver that already knew about them.

> Normally USB tends to just work because the device is expected to
> be hot-pluggable anyway. If the USB device is soldered to the
> board, the hardware designers can take some shortcuts

Tony's point about modularized host drivers coming in random order seems 
to be a fair one.  We don't build ehci modular so we don't care about it 
but from maintainer pov it's a legit issue.

-Andy

-- 
Andy Green | TI Landing Team Leader
Linaro.org │ Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106  - 
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: andy.green@linaro.org (Andy Green)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] OMAP2+ devices add mac address allocation register api
Date: Fri, 29 Jun 2012 22:03:29 +0800	[thread overview]
Message-ID: <4FEDB5B1.8000703@linaro.org> (raw)
In-Reply-To: <201206291345.49878.arnd@arndb.de>

On 06/29/12 21:45, the mail apparently from Arnd Bergmann included:
> On Friday 29 June 2012, Tony Lindgren wrote:
>> * Andy Green <andy.green@linaro.org> [120629 03:12]:
>>>> 2. Is this really how we want to pass the board generated mac addresses
>>>>     and other dynamically generated data to the drivers that are device
>>>>     tree based?
>>>
>>> The issue is that both these busses have an async probe, in the case
>>> of USB stack the maintainer was not interested last year in adding
>>> platform data.  Maybe it changed but that's my understanding.
>>
>> OK, I'd like to hear Arnds comments on the #2 above too as this is
>> a more generic issue.
>
> In case we have a device tree, we should just be using the USB binding
> to find the specific device node, and add the property there. Then
> the device driver can use of_get_mac_address() on the usb device itself.
>
> I'm not sure what it takes to add the link for the device node in the
> usb probing code, but my feeling is that it's not too hard.
>
> Right now, USB is probed entirely without DT, so the patch is about
> the best we can do.

Yes none of this was really hard the problem with more generic approach 
was getting comprehension and not auto-reject at the other subsystems. 
To be fair USB is USB and DT is Arm-specific issue.

>>>> 3. What about mac address in board-generic.c when booting panda with
>>>>     device tree?
>>>
>>> I don't mind adapting it for that case.
>>
>> Just to try to think about some alternatives, how about something like
>> this: This all could be a driver called soft-mac or something that does
>> what your patches are doing. Except then it would be completely generic
>> and would be able to take device names and mac addresses from platform
>> data or from devicetree.
>
> That driver would be completely generic to all platforms, but be
> very specific to finding the mac address of a device, as opposed to
> other properties.
>
> I suspect that if we do that, we will still need a way to bind a
> device_node to a usb device for the purpose of finding other
> properties, such as external regulators or clocks that are connected
> to a hardwired USB device.

There's no standardized exposure of logical regulators over USB afaik so 
you won't be able to 'find' them without a VID:PID -bound specific 
driver that already knew about them.

> Normally USB tends to just work because the device is expected to
> be hot-pluggable anyway. If the USB device is soldered to the
> board, the hardware designers can take some shortcuts

Tony's point about modularized host drivers coming in random order seems 
to be a fair one.  We don't build ehci modular so we don't care about it 
but from maintainer pov it's a legit issue.

-Andy

-- 
Andy Green | TI Landing Team Leader
Linaro.org ? Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106  - 
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog

  parent reply	other threads:[~2012-06-29 14:03 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-29  5:55 [PATCH 0/3] Add ability to set defaultless network device MAC addresses to deterministic computed locally administered values Andy Green
2012-06-29  5:55 ` Andy Green
2012-06-29  5:55 ` [PATCH 1/3] OMAP2+: add cpu id register to MAC address helper Andy Green
2012-06-29  5:55   ` Andy Green
2012-06-29  9:05   ` Tony Lindgren
2012-06-29  9:05     ` Tony Lindgren
2012-06-29  9:13     ` Andy Green
2012-06-29  9:13       ` Andy Green
2012-06-29  5:55 ` [PATCH 2/3] OMAP2+ devices add mac address allocation register api Andy Green
2012-06-29  5:55   ` Andy Green
2012-06-29  8:51   ` Arnd Bergmann
2012-06-29  8:51     ` Arnd Bergmann
2012-06-29  9:03     ` Andy Green
2012-06-29  9:03       ` Andy Green
2012-06-29  9:40   ` Tony Lindgren
2012-06-29  9:40     ` Tony Lindgren
2012-06-29 10:07     ` Andy Green
2012-06-29 10:07       ` Andy Green
2012-06-29 12:03       ` Tony Lindgren
2012-06-29 12:03         ` Tony Lindgren
2012-06-29 13:45         ` Arnd Bergmann
2012-06-29 13:45           ` Arnd Bergmann
2012-06-29 13:55           ` Tony Lindgren
2012-06-29 13:55             ` Tony Lindgren
2012-06-29 13:59             ` Andy Green
2012-06-29 13:59               ` Andy Green
2012-06-29 14:33             ` Arnd Bergmann
2012-06-29 14:33               ` Arnd Bergmann
2012-06-29 14:52               ` Tony Lindgren
2012-06-29 14:52                 ` Tony Lindgren
2012-06-29 15:05                 ` Arnd Bergmann
2012-06-29 15:05                   ` Arnd Bergmann
2012-07-01  8:58                   ` Tony Lindgren
2012-07-01  8:58                     ` Tony Lindgren
2012-07-02  7:15                     ` Arnd Bergmann
2012-07-02  7:15                       ` Arnd Bergmann
2012-07-02 10:51                       ` Tony Lindgren
2012-07-02 10:51                         ` Tony Lindgren
2012-06-29 14:03           ` Andy Green [this message]
2012-06-29 14:03             ` Andy Green
2012-06-29 14:38             ` Arnd Bergmann
2012-06-29 14:38               ` Arnd Bergmann
2012-06-29  5:55 ` [PATCH 3/3] OMAP4 PANDA register ethernet and wlan for automatic mac allocation Andy Green
2012-06-29  5:55   ` Andy Green
2012-06-29 11:55   ` Tony Lindgren
2012-06-29 11:55     ` Tony Lindgren
2012-06-29  8:50 ` [PATCH 0/3] Add ability to set defaultless network device MAC addresses to deterministic computed locally administered values Arnd Bergmann
2012-06-29  8:50   ` 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=4FEDB5B1.8000703@linaro.org \
    --to=andy.green@linaro.org \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=patches@linaro.org \
    --cc=rostedt@goodmis.org \
    --cc=s-jan@ti.com \
    --cc=tony@atomide.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.