All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Add support for the MV88e6097
@ 2016-11-23 17:55 Stefan Eichenberger
  2016-11-23 17:55 ` [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch Stefan Eichenberger
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stefan Eichenberger @ 2016-11-23 17:55 UTC (permalink / raw)
  To: andrew, vivien.didelot, davem; +Cc: netdev, Stefan Eichenberger

This patchset will add support for the MV88E6097 DSA switch and enable
EDSA on MV88E6097 family devices.

Stefan Eichenberger (2):
  net: dsa: mv88e6xxx: add MV88E6097 switch
  net: dsa: mv88e6xxx: enable EDSA on mv88e6097

 drivers/net/dsa/mv88e6xxx/chip.c      | 26 ++++++++++++++++++++++++++
 drivers/net/dsa/mv88e6xxx/mv88e6xxx.h |  5 ++++-
 2 files changed, 30 insertions(+), 1 deletion(-)

-- 
2.9.3

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

* [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch
  2016-11-23 17:55 [PATCH net-next 0/2] Add support for the MV88e6097 Stefan Eichenberger
@ 2016-11-23 17:55 ` Stefan Eichenberger
  2016-11-23 18:10   ` Andrew Lunn
  2016-11-23 17:55 ` [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097 Stefan Eichenberger
  2016-11-23 18:09 ` [PATCH net-next 0/2] Add support for the MV88e6097 Vivien Didelot
  2 siblings, 1 reply; 8+ messages in thread
From: Stefan Eichenberger @ 2016-11-23 17:55 UTC (permalink / raw)
  To: andrew, vivien.didelot, davem; +Cc: netdev, Stefan Eichenberger

Add support for the MV88E6097 switch. The change was tested on an Armada
based platform with a MV88E6097 switch.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@netmodule.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c      | 26 ++++++++++++++++++++++++++
 drivers/net/dsa/mv88e6xxx/mv88e6xxx.h |  2 ++
 2 files changed, 28 insertions(+)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index bada646..b14b3d5 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3209,6 +3209,19 @@ static const struct mv88e6xxx_ops mv88e6095_ops = {
 	.stats_get_stats = mv88e6095_stats_get_stats,
 };
 
+static const struct mv88e6xxx_ops mv88e6097_ops = {
+	.set_switch_mac = mv88e6xxx_g2_set_switch_mac,
+	.phy_read = mv88e6xxx_g2_smi_phy_read,
+	.phy_write = mv88e6xxx_g2_smi_phy_write,
+	.port_set_link = mv88e6xxx_port_set_link,
+	.port_set_duplex = mv88e6xxx_port_set_duplex,
+	.port_set_speed = mv88e6185_port_set_speed,
+	.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
+	.stats_get_sset_count = mv88e6095_stats_get_sset_count,
+	.stats_get_strings = mv88e6095_stats_get_strings,
+	.stats_get_stats = mv88e6095_stats_get_stats,
+};
+
 static const struct mv88e6xxx_ops mv88e6123_ops = {
 	/* MV88E6XXX_FAMILY_6165 */
 	.set_switch_mac = mv88e6xxx_g2_set_switch_mac,
@@ -3580,6 +3593,19 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
 		.ops = &mv88e6095_ops,
 	},
 
+	[MV88E6097] = {
+		.prod_num = PORT_SWITCH_ID_PROD_NUM_6097,
+		.family = MV88E6XXX_FAMILY_6097,
+		.name = "Marvell 88E6097/88E6097F",
+		.num_databases = 4096,
+		.num_ports = 11,
+		.port_base_addr = 0x10,
+		.global1_addr = 0x1b,
+		.age_time_coeff = 15000,
+		.flags = MV88E6XXX_FLAGS_FAMILY_6097,
+		.ops = &mv88e6097_ops,
+	},
+
 	[MV88E6123] = {
 		.prod_num = PORT_SWITCH_ID_PROD_NUM_6123,
 		.family = MV88E6XXX_FAMILY_6165,
diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
index 9298faa..ab52c37 100644
--- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
@@ -81,6 +81,7 @@
 #define PORT_SWITCH_ID		0x03
 #define PORT_SWITCH_ID_PROD_NUM_6085	0x04a
 #define PORT_SWITCH_ID_PROD_NUM_6095	0x095
+#define PORT_SWITCH_ID_PROD_NUM_6097	0x099
 #define PORT_SWITCH_ID_PROD_NUM_6131	0x106
 #define PORT_SWITCH_ID_PROD_NUM_6320	0x115
 #define PORT_SWITCH_ID_PROD_NUM_6123	0x121
@@ -378,6 +379,7 @@
 enum mv88e6xxx_model {
 	MV88E6085,
 	MV88E6095,
+	MV88E6097,
 	MV88E6123,
 	MV88E6131,
 	MV88E6161,
-- 
2.9.3

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

* [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097
  2016-11-23 17:55 [PATCH net-next 0/2] Add support for the MV88e6097 Stefan Eichenberger
  2016-11-23 17:55 ` [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch Stefan Eichenberger
@ 2016-11-23 17:55 ` Stefan Eichenberger
  2016-11-23 18:10   ` Andrew Lunn
  2016-11-23 18:21   ` Vivien Didelot
  2016-11-23 18:09 ` [PATCH net-next 0/2] Add support for the MV88e6097 Vivien Didelot
  2 siblings, 2 replies; 8+ messages in thread
From: Stefan Eichenberger @ 2016-11-23 17:55 UTC (permalink / raw)
  To: andrew, vivien.didelot, davem; +Cc: netdev, Stefan Eichenberger

EDSA is currently disabled on mv88e6097 devices, this commit enables it.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@netmodule.com>
---
 drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
index ab52c37..a2ff1fc 100644
--- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
@@ -543,7 +543,8 @@ enum mv88e6xxx_cap {
 	 MV88E6XXX_FLAGS_MULTI_CHIP)
 
 #define MV88E6XXX_FLAGS_FAMILY_6097	\
-	(MV88E6XXX_FLAG_G1_ATU_FID |	\
+	(MV88E6XXX_FLAG_EDSA |		\
+	 MV88E6XXX_FLAG_G1_ATU_FID |	\
 	 MV88E6XXX_FLAG_G1_VTU_FID |	\
 	 MV88E6XXX_FLAG_GLOBAL2 |	\
 	 MV88E6XXX_FLAG_G2_MGMT_EN_2X |	\
-- 
2.9.3

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

* Re: [PATCH net-next 0/2] Add support for the MV88e6097
  2016-11-23 17:55 [PATCH net-next 0/2] Add support for the MV88e6097 Stefan Eichenberger
  2016-11-23 17:55 ` [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch Stefan Eichenberger
  2016-11-23 17:55 ` [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097 Stefan Eichenberger
@ 2016-11-23 18:09 ` Vivien Didelot
  2 siblings, 0 replies; 8+ messages in thread
From: Vivien Didelot @ 2016-11-23 18:09 UTC (permalink / raw)
  To: Stefan Eichenberger, andrew, davem; +Cc: netdev, Stefan Eichenberger

Hi Stefan,

Stefan Eichenberger <eichest@gmail.com> writes:

> This patchset will add support for the MV88E6097 DSA switch and enable
> EDSA on MV88E6097 family devices.
>
> Stefan Eichenberger (2):
>   net: dsa: mv88e6xxx: add MV88E6097 switch
>   net: dsa: mv88e6xxx: enable EDSA on mv88e6097
>
>  drivers/net/dsa/mv88e6xxx/chip.c      | 26 ++++++++++++++++++++++++++
>  drivers/net/dsa/mv88e6xxx/mv88e6xxx.h |  5 ++++-
>  2 files changed, 30 insertions(+), 1 deletion(-)

Ideally I'd put 2/2 first, because right after 1/2 your switch won't
work as expected.

Thanks,

        Vivien

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

* Re: [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch
  2016-11-23 17:55 ` [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch Stefan Eichenberger
@ 2016-11-23 18:10   ` Andrew Lunn
  2016-11-23 20:41     ` Stefan Eichenberger
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2016-11-23 18:10 UTC (permalink / raw)
  To: Stefan Eichenberger; +Cc: vivien.didelot, davem, netdev, Stefan Eichenberger

> +	[MV88E6097] = {
> +		.prod_num = PORT_SWITCH_ID_PROD_NUM_6097,
> +		.family = MV88E6XXX_FAMILY_6097,
> +		.name = "Marvell 88E6097/88E6097F",
> +		.num_databases = 4096,
> +		.num_ports = 11,
> +		.port_base_addr = 0x10,
> +		.global1_addr = 0x1b,
> +		.age_time_coeff = 15000,
> +		.flags = MV88E6XXX_FLAGS_FAMILY_6097,
> +		.ops = &mv88e6097_ops,

Upps. Sorry, i missed something when you rebased onto net-next. You
are missing .g1_irqs = . It is probably 9. You can check the
datasheet, global 1, register 0. If bit 8 is AVBInt, you need 9. If
bit 8 is reserved, then 8.

    Andrew

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

* Re: [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097
  2016-11-23 17:55 ` [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097 Stefan Eichenberger
@ 2016-11-23 18:10   ` Andrew Lunn
  2016-11-23 18:21   ` Vivien Didelot
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2016-11-23 18:10 UTC (permalink / raw)
  To: Stefan Eichenberger; +Cc: vivien.didelot, davem, netdev, Stefan Eichenberger

On Wed, Nov 23, 2016 at 06:55:46PM +0100, Stefan Eichenberger wrote:
> EDSA is currently disabled on mv88e6097 devices, this commit enables it.
> 
> Signed-off-by: Stefan Eichenberger <stefan.eichenberger@netmodule.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097
  2016-11-23 17:55 ` [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097 Stefan Eichenberger
  2016-11-23 18:10   ` Andrew Lunn
@ 2016-11-23 18:21   ` Vivien Didelot
  1 sibling, 0 replies; 8+ messages in thread
From: Vivien Didelot @ 2016-11-23 18:21 UTC (permalink / raw)
  To: Stefan Eichenberger, andrew, davem; +Cc: netdev, Stefan Eichenberger

Hi Stefan,

Stefan Eichenberger <eichest@gmail.com> writes:

> EDSA is currently disabled on mv88e6097 devices, this commit enables it.
>
> Signed-off-by: Stefan Eichenberger <stefan.eichenberger@netmodule.com>

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

(you can include our Reviewed-by tags directly in the commit message of
this patch for v3, right under your Signed-off-by tag.)

Thanks,

        Vivien

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

* Re: [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch
  2016-11-23 18:10   ` Andrew Lunn
@ 2016-11-23 20:41     ` Stefan Eichenberger
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Eichenberger @ 2016-11-23 20:41 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Stefan Eichenberger, vivien.didelot, davem, netdev

On Wed, Nov 23, 2016 at 07:10:16PM +0100, Andrew Lunn wrote:
> > +	[MV88E6097] = {
> > +		.prod_num = PORT_SWITCH_ID_PROD_NUM_6097,
> > +		.family = MV88E6XXX_FAMILY_6097,
> > +		.name = "Marvell 88E6097/88E6097F",
> > +		.num_databases = 4096,
> > +		.num_ports = 11,
> > +		.port_base_addr = 0x10,
> > +		.global1_addr = 0x1b,
> > +		.age_time_coeff = 15000,
> > +		.flags = MV88E6XXX_FLAGS_FAMILY_6097,
> > +		.ops = &mv88e6097_ops,
> 
> Upps. Sorry, i missed something when you rebased onto net-next. You
> are missing .g1_irqs = . It is probably 9. You can check the
> datasheet, global 1, register 0. If bit 8 is AVBInt, you need 9. If
> bit 8 is reserved, then 8.

No problem, bit 8-10 are reserved. So I put 8 in then.

Regards,
Stefan

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

end of thread, other threads:[~2016-11-23 20:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23 17:55 [PATCH net-next 0/2] Add support for the MV88e6097 Stefan Eichenberger
2016-11-23 17:55 ` [PATCH 1/2] net: dsa: mv88e6xxx: add MV88E6097 switch Stefan Eichenberger
2016-11-23 18:10   ` Andrew Lunn
2016-11-23 20:41     ` Stefan Eichenberger
2016-11-23 17:55 ` [PATCH 2/2] net: dsa: mv88e6xxx: enable EDSA on mv88e6097 Stefan Eichenberger
2016-11-23 18:10   ` Andrew Lunn
2016-11-23 18:21   ` Vivien Didelot
2016-11-23 18:09 ` [PATCH net-next 0/2] Add support for the MV88e6097 Vivien Didelot

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.