On 01/10/2017 01:21 PM, Andrew Lunn wrote:
>> Last time we discussed this, I had a super complex dsa2_platform_data
>> that allowed you to do exactly the same thing we currently do with
>> Device Tree, except that this was with platform_data. It took a lot of
>> effort to get there, but I essential
> Last time we discussed this, I had a super complex dsa2_platform_data
> that allowed you to do exactly the same thing we currently do with
> Device Tree, except that this was with platform_data. It took a lot of
> effort to get there, but I essentially had the ZII vf160 board example
> re-impleme
On 01/10/2017 12:41 PM, Andrew Lunn wrote:
>> @@ -452,11 +455,14 @@ static int dsa_cpu_parse(struct dsa_port *port, u32
>> index,
>> struct net_device *ethernet_dev;
>> struct device_node *ethernet;
>>
>> -ethernet = of_parse_phandle(port->dn, "ethernet", 0);
>> -if (!ethernet)
> @@ -452,11 +455,14 @@ static int dsa_cpu_parse(struct dsa_port *port, u32
> index,
> struct net_device *ethernet_dev;
> struct device_node *ethernet;
>
> - ethernet = of_parse_phandle(port->dn, "ethernet", 0);
> - if (!ethernet)
> - return -EINVAL;
> + if (p
Allow drivers to use the new DSA API with platform data. Most of the
code in net/dsa/dsa2.c does not rely so much on device_nodes and can get
the same information from platform_data instead.
Signed-off-by: Florian Fainelli
---
include/net/dsa.h | 1 +
net/dsa/dsa2.c| 96