netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] net: dsa: mv88e6xxx: isolate Global2 support
@ 2016-09-02 18:45 Vivien Didelot
  2016-09-02 18:45 ` [PATCH net-next v2 1/3] net: dsa: mv88e6xxx: fix module naming Vivien Didelot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Vivien Didelot @ 2016-09-02 18:45 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot

Registers of Marvell chips are organized in internal SMI devices.

One of them at address 0x1C is called Global2. It provides an extended
set of registers, used for interrupt control, EEPROM access, indirect
PHY access (to bypass the PHY Polling Unit) and cross-chip setup.

Most chips have it, but some others don't (older ones such as 6060).

Now that its related code is isolated in mv88e6xxx_g2_* functions, move
it to its own global2.c file, making most of its setup code static.

Then make its compilation optional, which allows to reduce the size of
the mv88e6xxx driver for devices such as home routers embedding Ethernet
chips without Global2 support.

It is present on most recent chips, thus enable its support by default.

Changes in v2: fail probe if GLOBAL2 is required but not enabled.

Vivien Didelot (3):
  net: dsa: mv88e6xxx: fix module naming
  net: dsa: mv88e6xxx: move Global2 code
  net: dsa: mv88e6xxx: make global2 code optional

 drivers/net/dsa/mv88e6xxx/Kconfig     |  11 +
 drivers/net/dsa/mv88e6xxx/Makefile    |   4 +-
 drivers/net/dsa/mv88e6xxx/chip.c      | 467 ++-------------------------------
 drivers/net/dsa/mv88e6xxx/global2.c   | 471 ++++++++++++++++++++++++++++++++++
 drivers/net/dsa/mv88e6xxx/global2.h   |  88 +++++++
 drivers/net/dsa/mv88e6xxx/mv88e6xxx.h |   6 +
 6 files changed, 596 insertions(+), 451 deletions(-)
 create mode 100644 drivers/net/dsa/mv88e6xxx/global2.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/global2.h

-- 
2.9.3

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

end of thread, other threads:[~2016-09-06 19:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02 18:45 [PATCH net-next v2 0/3] net: dsa: mv88e6xxx: isolate Global2 support Vivien Didelot
2016-09-02 18:45 ` [PATCH net-next v2 1/3] net: dsa: mv88e6xxx: fix module naming Vivien Didelot
2016-09-02 18:45 ` [PATCH net-next v2 2/3] net: dsa: mv88e6xxx: move Global2 code Vivien Didelot
2016-09-02 18:45 ` [PATCH net-next v2 3/3] net: dsa: mv88e6xxx: make global2 code optional Vivien Didelot
2016-09-06 19:58 ` [PATCH net-next v2 0/3] net: dsa: mv88e6xxx: isolate Global2 support David Miller

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).