From: Mark Jackson <mpfj-list@mimc.co.uk>
To: Mugunthan V N <mugunthanvnm@ti.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 3/3] driver: net: ethernet: cpsw: dual emac interface implementation
Date: Sun, 14 Apr 2013 20:20:15 +0100 [thread overview]
Message-ID: <516B016F.3020308@mimc.co.uk> (raw)
In-Reply-To: <1360612340-9266-4-git-send-email-mugunthanvnm@ti.com>
On 11/02/13 19:52, Mugunthan V N wrote:
> The CPSW switch can act as Dual EMAC by segregating the switch ports
> using VLAN and port VLAN as per the TRM description in
> 14.3.2.10.2 Dual Mac Mode
>
> Following CPSW components will be common for both the interfaces.
> * Interrupt source is common for both eth interfaces
> * Interrupt pacing is common for both interfaces
> * Hardware statistics is common for all the ports
> * CPDMA is common for both eth interface
> * CPTS is common for both the interface and it should not be enabled on
> both the interface as timestamping information doesn't contain port
> information.
>
> Constrains
> * Reserved VID of One port should not be used in other interface which will
> enable switching functionality
> * Same VID must not be used in both the interface which will enable switching
> functionality
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
> Documentation/devicetree/bindings/net/cpsw.txt | 2 +
> drivers/net/ethernet/ti/cpsw.c | 335 ++++++++++++++++++++----
> include/linux/platform_data/cpsw.h | 3 +
> 3 files changed, 288 insertions(+), 52 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
> index 6ddd028..ecfdf75 100644
> --- a/Documentation/devicetree/bindings/net/cpsw.txt
> +++ b/Documentation/devicetree/bindings/net/cpsw.txt
> @@ -24,6 +24,8 @@ Required properties:
> Optional properties:
> - ti,hwmods : Must be "cpgmac0"
> - no_bd_ram : Must be 0 or 1
> +- dual_emac : Specifies Switch to act as Dual EMAC
> +- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
>
> Note: "ti,hwmods" field is used to fetch the base address and irq
> resources from TI, omap hwmod data base during device registration.
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 4b964bb..4ceed6e 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
<snip>
> @@ -1237,6 +1372,18 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
> if (mac_addr)
> memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN);
>
> + if (data->dual_emac) {
> + if (of_property_read_u32(node, "dual_emac_res_vlan",
> + &prop)) {
Shouldn't this be:-
if (of_property_read_u32(slave_node, "dual_emac_res_vlan",
^^^^^^^^^^
... so we pick each VLAN id from the individual slaves ?
Regards
Mark J.
next prev parent reply other threads:[~2013-04-14 19:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 19:52 [PATCH 0/3] Dual EMAC mode implementation of CPSW Mugunthan V N
2013-02-11 19:52 ` [PATCH 1/3] driver: net: ethernet: davinci_cpdma: add support for directed packet and source port detection Mugunthan V N
2013-02-11 19:52 ` [PATCH 2/3] driver: net: ethernet: cpsw: make cpts as pointer Mugunthan V N
2013-02-11 19:52 ` [PATCH 3/3] driver: net: ethernet: cpsw: dual emac interface implementation Mugunthan V N
[not found] ` <1360612340-9266-4-git-send-email-mugunthanvnm-l0cyMroinI0@public.gmane.org>
2013-02-18 13:36 ` Peter Korsgaard
[not found] ` <87mwv1kaln.fsf-D6SC8u56vOOJDPpyT6T3/w@public.gmane.org>
2013-02-18 15:10 ` Mugunthan V N
2013-04-14 19:20 ` Mark Jackson [this message]
2013-04-15 17:04 ` Mugunthan V N
2013-02-12 21:15 ` [PATCH 0/3] Dual EMAC mode implementation of CPSW David Miller
2013-04-12 9:14 ` Mark Jackson
2013-04-14 19:16 ` Mark Jackson
2013-04-15 17:07 ` Mugunthan V N
2013-04-15 17:28 ` Mark Jackson
2013-04-15 17:34 ` Mugunthan V N
2013-04-15 18:00 ` Mark Jackson
2013-04-16 11:09 ` Mark Jackson
2013-04-18 16:01 ` Mark Jackson
2013-04-22 14:07 ` Mark Jackson
2013-04-22 17:01 ` Mugunthan V N
2013-04-23 5:11 ` Mark Jackson
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=516B016F.3020308@mimc.co.uk \
--to=mpfj-list@mimc.co.uk \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).