Re: _DSD standardization note (WAS: Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.)

2015-09-08 Thread David Daney
On 09/05/2015 01:00 PM, Jon Masters wrote: Following up on this thread after finally seeing it...figured I would send something just for the archive mainly (we discussed this in person recently at a few different events and I think are aligned already). On 08/07/2015 08:28 PM, Rafael J. Wysocki

_DSD standardization note (WAS: Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.)

2015-09-05 Thread Jon Masters
Following up on this thread after finally seeing it...figured I would send something just for the archive mainly (we discussed this in person recently at a few different events and I think are aligned already). On 08/07/2015 08:28 PM, Rafael J. Wysocki wrote: > Hi David, > > On Sat, Aug 8, 2015 a

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-08 Thread Arnd Bergmann
On Friday 07 August 2015 12:43:20 Robert Richter wrote: > > I would not pollute bgx_probe() with acpi and dt specifics, and instead > keep bgx_init_phy(). The typical design pattern for this is: > > static int bgx_init_phy(struct bgx *bgx) > { > #ifdef CONFIG_ACPI > if (!acpi_disabled) >

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Rafael J. Wysocki
Hi David, On Fri, Aug 7, 2015 at 8:14 PM, David Daney wrote: > On 08/07/2015 07:54 AM, Graeme Gregory wrote: >> >> On Thu, Aug 06, 2015 at 05:33:10PM -0700, David Daney wrote: >>> >>> From: David Daney >>> >>> Find out which PHYs belong to which BGX instance in the ACPI way. >>> >>> Set the MAC

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Rafael J. Wysocki
Hi David, On Sat, Aug 8, 2015 at 2:11 AM, David Daney wrote: > On 08/07/2015 05:05 PM, Rafael J. Wysocki wrote: [cut] >> >> It is actually useful to people as far as I can say. >> >> Also, if somebody is going to use properties with ACPI, why whould >> they use a different set of properties wit

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread David Daney
On 08/07/2015 05:05 PM, Rafael J. Wysocki wrote: Hi Mark, On Fri, Aug 7, 2015 at 7:51 PM, Mark Rutland wrote: [Correcting the devicetree list address, which I typo'd in my original reply] +static const char * const addr_propnames[] = { + "mac-address", + "local-mac-address", + "address",

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Rafael J. Wysocki
Hi Mark, On Fri, Aug 7, 2015 at 7:51 PM, Mark Rutland wrote: > [Correcting the devicetree list address, which I typo'd in my original > reply] > >> >> +static const char * const addr_propnames[] = { >> >> + "mac-address", >> >> + "local-mac-address", >> >> + "address", >> >> +}; >> > >> > If t

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread David Daney
On 08/07/2015 07:54 AM, Graeme Gregory wrote: On Thu, Aug 06, 2015 at 05:33:10PM -0700, David Daney wrote: From: David Daney Find out which PHYs belong to which BGX instance in the ACPI way. Set the MAC address of the device as provided by ACPI tables. This is similar to the implementation fo

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Mark Rutland
[Correcting the devicetree list address, which I typo'd in my original reply] [resending to _really_ correct the address, apologies for the spam] > >> +static const char * const addr_propnames[] = { > >> + "mac-address", > >> + "local-mac-address", > >> + "address", > >> +}; > > > > If these a

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Mark Rutland
[Correcting the devicetree list address, which I typo'd in my original reply] > >> +static const char * const addr_propnames[] = { > >> + "mac-address", > >> + "local-mac-address", > >> + "address", > >> +}; > > > > If these are going to be generally necessary, then we should get them > > adopt

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread David Daney
On 08/07/2015 07:01 AM, Mark Rutland wrote: On Fri, Aug 07, 2015 at 01:33:10AM +0100, David Daney wrote: From: David Daney Find out which PHYs belong to which BGX instance in the ACPI way. Set the MAC address of the device as provided by ACPI tables. This is similar to the implementation for

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread David Daney
On 08/07/2015 05:42 AM, Tomasz Nowicki wrote: On 07.08.2015 13:56, Robert Richter wrote: On 07.08.15 12:52:41, Tomasz Nowicki wrote: [...] I would not pollute bgx_probe() with acpi and dt specifics, and instead keep bgx_init_phy(). The typical design pattern for this is: static int bgx_init

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Graeme Gregory
On Thu, Aug 06, 2015 at 05:33:10PM -0700, David Daney wrote: > From: David Daney > > Find out which PHYs belong to which BGX instance in the ACPI way. > > Set the MAC address of the device as provided by ACPI tables. This is > similar to the implementation for devicetree in > of_get_mac_address(

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Mark Rutland
On Fri, Aug 07, 2015 at 01:33:10AM +0100, David Daney wrote: > From: David Daney > > Find out which PHYs belong to which BGX instance in the ACPI way. > > Set the MAC address of the device as provided by ACPI tables. This is > similar to the implementation for devicetree in > of_get_mac_address(

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Robert Richter
On 07.08.15 10:09:04, Tomasz Nowicki wrote: > On 07.08.2015 02:33, David Daney wrote: ... > >+#else > >+ > >+static int bgx_init_acpi_phy(struct bgx *bgx) > >+{ > >+return -ENODEV; > >+} > >+ > >+#endif /* CONFIG_ACPI */ > >+ > > #if IS_ENABLED(CONFIG_OF_MDIO) > > > > static int bgx_init_of

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Tomasz Nowicki
On 07.08.2015 13:56, Robert Richter wrote: On 07.08.15 12:52:41, Tomasz Nowicki wrote: On 07.08.2015 12:43, Robert Richter wrote: On 07.08.15 10:09:04, Tomasz Nowicki wrote: On 07.08.2015 02:33, David Daney wrote: ... +#else + +static int bgx_init_acpi_phy(struct bgx *bgx) +{ + retur

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Robert Richter
On 07.08.15 12:52:41, Tomasz Nowicki wrote: > On 07.08.2015 12:43, Robert Richter wrote: > >On 07.08.15 10:09:04, Tomasz Nowicki wrote: > >>On 07.08.2015 02:33, David Daney wrote: > > > >... > > > >>>+#else > >>>+ > >>>+static int bgx_init_acpi_phy(struct bgx *bgx) > >>>+{ > >>>+ return -ENODEV; >

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Tomasz Nowicki
On 07.08.2015 12:43, Robert Richter wrote: On 07.08.15 10:09:04, Tomasz Nowicki wrote: On 07.08.2015 02:33, David Daney wrote: ... +#else + +static int bgx_init_acpi_phy(struct bgx *bgx) +{ + return -ENODEV; +} + +#endif /* CONFIG_ACPI */ + #if IS_ENABLED(CONFIG_OF_MDIO) static in

Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-07 Thread Tomasz Nowicki
On 07.08.2015 02:33, David Daney wrote: From: David Daney Find out which PHYs belong to which BGX instance in the ACPI way. Set the MAC address of the device as provided by ACPI tables. This is similar to the implementation for devicetree in of_get_mac_address(). The table is searched for the

[PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.

2015-08-06 Thread David Daney
From: David Daney Find out which PHYs belong to which BGX instance in the ACPI way. Set the MAC address of the device as provided by ACPI tables. This is similar to the implementation for devicetree in of_get_mac_address(). The table is searched for the device property entries "mac-address", "lo