All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
@ 2013-10-04 12:44 ` Markus Pargmann
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Pargmann @ 2013-10-04 12:44 UTC (permalink / raw)
  To: David S. Miller
  Cc: Florian Fainelli, Mugunthan V N, linux-arm-kernel, netdev,
	kernel, Markus Pargmann

The current implementation searches the whole DT for nodes named
"slave".

This patch changes it to search only child nodes for slaves.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/net/ethernet/ti/cpsw.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 79974e3..5df50a9 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1782,7 +1782,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	if (ret)
 		pr_warn("Doesn't have any child node\n");
 
-	for_each_node_by_name(slave_node, "slave") {
+	for_each_child_of_node(node, slave_node) {
 		struct cpsw_slave_data *slave_data = data->slave_data + i;
 		const void *mac_addr = NULL;
 		u32 phyid;
@@ -1791,6 +1791,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 		struct device_node *mdio_node;
 		struct platform_device *mdio;
 
+		/* This is no slave child node, continue */
+		if (strcmp(slave_node->name, "slave"))
+			continue;
+
 		parp = of_get_property(slave_node, "phy_id", &lenp);
 		if ((parp == NULL) || (lenp != (sizeof(void *) * 2))) {
 			pr_err("Missing slave[%d] phy_id property\n", i);
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
@ 2013-10-04 12:44 ` Markus Pargmann
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Pargmann @ 2013-10-04 12:44 UTC (permalink / raw)
  To: linux-arm-kernel

The current implementation searches the whole DT for nodes named
"slave".

This patch changes it to search only child nodes for slaves.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/net/ethernet/ti/cpsw.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 79974e3..5df50a9 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1782,7 +1782,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	if (ret)
 		pr_warn("Doesn't have any child node\n");
 
-	for_each_node_by_name(slave_node, "slave") {
+	for_each_child_of_node(node, slave_node) {
 		struct cpsw_slave_data *slave_data = data->slave_data + i;
 		const void *mac_addr = NULL;
 		u32 phyid;
@@ -1791,6 +1791,10 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 		struct device_node *mdio_node;
 		struct platform_device *mdio;
 
+		/* This is no slave child node, continue */
+		if (strcmp(slave_node->name, "slave"))
+			continue;
+
 		parp = of_get_property(slave_node, "phy_id", &lenp);
 		if ((parp == NULL) || (lenp != (sizeof(void *) * 2))) {
 			pr_err("Missing slave[%d] phy_id property\n", i);
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
  2013-10-04 12:44 ` Markus Pargmann
@ 2013-10-04 12:44   ` Markus Pargmann
  -1 siblings, 0 replies; 16+ messages in thread
From: Markus Pargmann @ 2013-10-04 12:44 UTC (permalink / raw)
  To: David S. Miller
  Cc: Florian Fainelli, Mugunthan V N, linux-arm-kernel, netdev,
	kernel, Markus Pargmann

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/net/ethernet/ti/cpsw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 5df50a9..804846e 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1771,8 +1771,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	}
 	data->mac_control = prop;
 
-	if (!of_property_read_u32(node, "dual_emac", &prop))
-		data->dual_emac = prop;
+	if (of_property_read_bool(node, "dual_emac"))
+		data->dual_emac = 1;
 
 	/*
 	 * Populate all the child nodes here...
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
@ 2013-10-04 12:44   ` Markus Pargmann
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Pargmann @ 2013-10-04 12:44 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/net/ethernet/ti/cpsw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 5df50a9..804846e 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1771,8 +1771,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 	}
 	data->mac_control = prop;
 
-	if (!of_property_read_u32(node, "dual_emac", &prop))
-		data->dual_emac = prop;
+	if (of_property_read_bool(node, "dual_emac"))
+		data->dual_emac = 1;
 
 	/*
 	 * Populate all the child nodes here...
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
  2013-10-04 12:44 ` Markus Pargmann
@ 2013-10-04 13:27   ` Mugunthan V N
  -1 siblings, 0 replies; 16+ messages in thread
From: Mugunthan V N @ 2013-10-04 13:27 UTC (permalink / raw)
  To: Markus Pargmann, David S. Miller
  Cc: kernel, netdev, Florian Fainelli, linux-arm-kernel

On Friday 04 October 2013 07:44 AM, Markus Pargmann wrote:
> The current implementation searches the whole DT for nodes named
> "slave".
>
> This patch changes it to search only child nodes for slaves.
>
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
@ 2013-10-04 13:27   ` Mugunthan V N
  0 siblings, 0 replies; 16+ messages in thread
From: Mugunthan V N @ 2013-10-04 13:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 04 October 2013 07:44 AM, Markus Pargmann wrote:
> The current implementation searches the whole DT for nodes named
> "slave".
>
> This patch changes it to search only child nodes for slaves.
>
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
  2013-10-04 12:44   ` Markus Pargmann
@ 2013-10-04 13:28     ` Mugunthan V N
  -1 siblings, 0 replies; 16+ messages in thread
From: Mugunthan V N @ 2013-10-04 13:28 UTC (permalink / raw)
  To: Markus Pargmann, David S. Miller
  Cc: Florian Fainelli, linux-arm-kernel, netdev, kernel

On Friday 04 October 2013 07:44 AM, Markus Pargmann wrote:
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
@ 2013-10-04 13:28     ` Mugunthan V N
  0 siblings, 0 replies; 16+ messages in thread
From: Mugunthan V N @ 2013-10-04 13:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 04 October 2013 07:44 AM, Markus Pargmann wrote:
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
  2013-10-04 12:44 ` Markus Pargmann
@ 2013-10-04 15:24   ` Peter Korsgaard
  -1 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-10-04 15:24 UTC (permalink / raw)
  To: Markus Pargmann
  Cc: David S. Miller, Mugunthan V N, netdev, kernel, Florian Fainelli,
	linux-arm-kernel

>>>>> "Markus" == Markus Pargmann <mpa@pengutronix.de> writes:

 Markus> The current implementation searches the whole DT for nodes named
 Markus> "slave".

 Markus> This patch changes it to search only child nodes for slaves.

 Markus> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
@ 2013-10-04 15:24   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-10-04 15:24 UTC (permalink / raw)
  To: linux-arm-kernel

>>>>> "Markus" == Markus Pargmann <mpa@pengutronix.de> writes:

 Markus> The current implementation searches the whole DT for nodes named
 Markus> "slave".

 Markus> This patch changes it to search only child nodes for slaves.

 Markus> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
  2013-10-04 12:44   ` Markus Pargmann
@ 2013-10-04 15:24     ` Peter Korsgaard
  -1 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-10-04 15:24 UTC (permalink / raw)
  To: Markus Pargmann
  Cc: David S. Miller, Mugunthan V N, netdev, kernel, Florian Fainelli,
	linux-arm-kernel

>>>>> "Markus" == Markus Pargmann <mpa@pengutronix.de> writes:

 Markus> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
@ 2013-10-04 15:24     ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-10-04 15:24 UTC (permalink / raw)
  To: linux-arm-kernel

>>>>> "Markus" == Markus Pargmann <mpa@pengutronix.de> writes:

 Markus> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
  2013-10-04 12:44 ` Markus Pargmann
@ 2013-10-07 19:19   ` David Miller
  -1 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2013-10-07 19:19 UTC (permalink / raw)
  To: mpa; +Cc: florian, mugunthanvnm, linux-arm-kernel, netdev, kernel

From: Markus Pargmann <mpa@pengutronix.de>
Date: Fri,  4 Oct 2013 14:44:39 +0200

> The current implementation searches the whole DT for nodes named
> "slave".
> 
> This patch changes it to search only child nodes for slaves.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Applied.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes
@ 2013-10-07 19:19   ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2013-10-07 19:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Pargmann <mpa@pengutronix.de>
Date: Fri,  4 Oct 2013 14:44:39 +0200

> The current implementation searches the whole DT for nodes named
> "slave".
> 
> This patch changes it to search only child nodes for slaves.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Applied.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
  2013-10-04 12:44   ` Markus Pargmann
@ 2013-10-07 19:19     ` David Miller
  -1 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2013-10-07 19:19 UTC (permalink / raw)
  To: mpa; +Cc: florian, mugunthanvnm, linux-arm-kernel, netdev, kernel

From: Markus Pargmann <mpa@pengutronix.de>
Date: Fri,  4 Oct 2013 14:44:40 +0200

> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Applied.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac
@ 2013-10-07 19:19     ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2013-10-07 19:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Pargmann <mpa@pengutronix.de>
Date: Fri,  4 Oct 2013 14:44:40 +0200

> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Applied.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-10-07 19:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04 12:44 [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes Markus Pargmann
2013-10-04 12:44 ` Markus Pargmann
2013-10-04 12:44 ` [PATCH 2/2] net/ethernet: cpsw: DT read bool dual_emac Markus Pargmann
2013-10-04 12:44   ` Markus Pargmann
2013-10-04 13:28   ` Mugunthan V N
2013-10-04 13:28     ` Mugunthan V N
2013-10-04 15:24   ` Peter Korsgaard
2013-10-04 15:24     ` Peter Korsgaard
2013-10-07 19:19   ` David Miller
2013-10-07 19:19     ` David Miller
2013-10-04 13:27 ` [PATCH 1/2] net: ethernet: cpsw: Search childs for slave nodes Mugunthan V N
2013-10-04 13:27   ` Mugunthan V N
2013-10-04 15:24 ` Peter Korsgaard
2013-10-04 15:24   ` Peter Korsgaard
2013-10-07 19:19 ` David Miller
2013-10-07 19:19   ` David Miller

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.