Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-28 Thread Guenter Roeck
On 10/26/2014 09:52 AM, Guenter Roeck wrote: On some chips it is possible to access the switch eeprom. Add infrastructure support for it. Signed-off-by: Guenter Roeck --- [ ... ] @@ -603,6 +604,9 @@ static int dsa_of_probe(struct platform_device *pdev) if (pd->nr_chips >

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-28 Thread Guenter Roeck
On 10/26/2014 09:52 AM, Guenter Roeck wrote: On some chips it is possible to access the switch eeprom. Add infrastructure support for it. Signed-off-by: Guenter Roeck li...@roeck-us.net --- [ ... ] @@ -603,6 +604,9 @@ static int dsa_of_probe(struct platform_device *pdev) if

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Guenter Roeck
On Mon, Oct 27, 2014 at 02:59:17PM +0100, Andrew Lunn wrote: > > So lets take a step back: For the Marvell chips, I have to provide both > > length > > and presence in devicetree or platform data. Presence seemed to be implied > > by > > length, so I used only a single property and variable to

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Andrew Lunn
> So lets take a step back: For the Marvell chips, I have to provide both length > and presence in devicetree or platform data. Presence seemed to be implied by > length, so I used only a single property and variable to indicate both. Hi Guenter What i was thinking, is that you don't need length

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Guenter Roeck
On 10/27/2014 01:50 AM, Richard Cochran wrote: On Sun, Oct 26, 2014 at 08:56:20PM -0700, Guenter Roeck wrote: Also, it seems that you request two separate properties, one for presence and another for length. Is that correct ? Again, I thought that would not provide any value since presence is

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Richard Cochran
On Sun, Oct 26, 2014 at 08:56:20PM -0700, Guenter Roeck wrote: > > Also, it seems that you request two separate properties, one for presence > and another for length. Is that correct ? Again, I thought that would not > provide any value since presence is indicated by length != 0 in the ethtool >

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Richard Cochran
On Sun, Oct 26, 2014 at 08:56:20PM -0700, Guenter Roeck wrote: Also, it seems that you request two separate properties, one for presence and another for length. Is that correct ? Again, I thought that would not provide any value since presence is indicated by length != 0 in the ethtool

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Guenter Roeck
On 10/27/2014 01:50 AM, Richard Cochran wrote: On Sun, Oct 26, 2014 at 08:56:20PM -0700, Guenter Roeck wrote: Also, it seems that you request two separate properties, one for presence and another for length. Is that correct ? Again, I thought that would not provide any value since presence is

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Andrew Lunn
So lets take a step back: For the Marvell chips, I have to provide both length and presence in devicetree or platform data. Presence seemed to be implied by length, so I used only a single property and variable to indicate both. Hi Guenter What i was thinking, is that you don't need length in

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-27 Thread Guenter Roeck
On Mon, Oct 27, 2014 at 02:59:17PM +0100, Andrew Lunn wrote: So lets take a step back: For the Marvell chips, I have to provide both length and presence in devicetree or platform data. Presence seemed to be implied by length, so I used only a single property and variable to indicate

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-26 Thread Guenter Roeck
On 10/26/2014 07:41 PM, Andrew Lunn wrote: On Sun, Oct 26, 2014 at 09:52:39AM -0700, Guenter Roeck wrote: On some chips it is possible to access the switch eeprom. Add infrastructure support for it. Signed-off-by: Guenter Roeck --- v2: - Add support for configuring switch EEPROM size through

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-26 Thread Andrew Lunn
On Sun, Oct 26, 2014 at 09:52:39AM -0700, Guenter Roeck wrote: > On some chips it is possible to access the switch eeprom. > Add infrastructure support for it. > > Signed-off-by: Guenter Roeck > --- > v2: > - Add support for configuring switch EEPROM size through platform data > or devicetree

[PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-26 Thread Guenter Roeck
On some chips it is possible to access the switch eeprom. Add infrastructure support for it. Signed-off-by: Guenter Roeck --- v2: - Add support for configuring switch EEPROM size through platform data or devicetree data - Do not compare new pointers against NULL - Check if get_eeprom pointer

[PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-26 Thread Guenter Roeck
On some chips it is possible to access the switch eeprom. Add infrastructure support for it. Signed-off-by: Guenter Roeck li...@roeck-us.net --- v2: - Add support for configuring switch EEPROM size through platform data or devicetree data - Do not compare new pointers against NULL - Check if

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-26 Thread Andrew Lunn
On Sun, Oct 26, 2014 at 09:52:39AM -0700, Guenter Roeck wrote: On some chips it is possible to access the switch eeprom. Add infrastructure support for it. Signed-off-by: Guenter Roeck li...@roeck-us.net --- v2: - Add support for configuring switch EEPROM size through platform data or

Re: [PATCH v2 09/15] net: dsa: Add support for switch EEPROM access

2014-10-26 Thread Guenter Roeck
On 10/26/2014 07:41 PM, Andrew Lunn wrote: On Sun, Oct 26, 2014 at 09:52:39AM -0700, Guenter Roeck wrote: On some chips it is possible to access the switch eeprom. Add infrastructure support for it. Signed-off-by: Guenter Roeck li...@roeck-us.net --- v2: - Add support for configuring switch