Document Microchip KSZ87xx family switches. These include
KSZ8765 - 5 port switch
KSZ8794 - 4 port switch
KSZ8795 - 5 port switch
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Rob Herring
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Cc
This series adds support for Microchip KSZ87xx switches, which are
slightly simpler compared to KSZ9xxx .
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Marek Vasut (1):
dt-bindings: net: dsa: ksz
From: Tristram Ha
Add DSA tag code for Microchip KSZ8795 switch. The switch is simpler
and the tag is only 1 byte, instead of 2 as is the case with KSZ9477.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc
From: Tristram Ha
Add Microchip KSZ8795 DSA driver.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
---
drivers/net/dsa/microchip/Kconfig | 18 +
drivers/net/dsa
On 7/25/19 4:03 PM, Andrew Lunn wrote:
> On Wed, Jul 24, 2019 at 03:40:48PM +0200, Marek Vasut wrote:
>> From: Tristram Ha
>> +static void ksz8795_phy_setup(struct ksz_device *dev, int port,
>> + struct phy_device *phy)
>> +{
>>
This series adds support for Microchip KSZ87xx switches, which are
slightly simpler compared to KSZ9xxx .
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Marek Vasut (1):
dt-bindings: net: dsa: ksz
Document Microchip KSZ87xx family switches. These include
KSZ8765 - 5 port switch
KSZ8794 - 4 port switch
KSZ8795 - 5 port switch
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Rob Herring
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Cc
From: Tristram Ha
Add DSA tag code for Microchip KSZ8795 switch. The switch is simpler
and the tag is only 1 byte, instead of 2 as is the case with KSZ9477.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc
From: Tristram Ha
Add Microchip KSZ8795 DSA driver.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
---
V2: - Use reverse xmas tree for variable declaration
- Use BIT
On 7/25/19 4:59 PM, Andrew Lunn wrote:
> On Thu, Jul 25, 2019 at 04:56:37PM +0200, Marek Vasut wrote:
>> On 7/25/19 4:03 PM, Andrew Lunn wrote:
>>> On Wed, Jul 24, 2019 at 03:40:48PM +0200, Marek Vasut wrote:
>>>> From: Tristram Ha
>>>> +static void ksz
This series adds support for Microchip KSZ87xx switches, which are
slightly simpler compared to KSZ9xxx .
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Marek Vasut (1):
dt-bindings: net: dsa: ksz
Document Microchip KSZ87xx family switches. These include
KSZ8765 - 5 port switch
KSZ8794 - 4 port switch
KSZ8795 - 5 port switch
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Rob Herring
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Cc
From: Tristram Ha
Add DSA tag code for Microchip KSZ8795 switch. The switch is simpler
and the tag is only 1 byte, instead of 2 as is the case with KSZ9477.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc
From: Tristram Ha
Add Microchip KSZ8795 DSA driver.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
---
V2: - Use reverse xmas tree for variable declaration
- Use BIT
From: Tristram Ha
Add DSA tag code for Microchip KSZ8795 switch. The switch is simpler
and the tag is only 1 byte, instead of 2 as is the case with KSZ9477.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc
This series adds support for Microchip KSZ87xx switches, which are
slightly simpler compared to KSZ9xxx .
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Marek Vasut (1):
dt-bindings: net: dsa: ksz
From: Tristram Ha
Add Microchip KSZ8795 DSA driver.
Signed-off-by: Tristram Ha
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
---
V2: - Use reverse xmas tree for variable declaration
- Use BIT
Document Microchip KSZ87xx family switches. These include
KSZ8765 - 5 port switch
KSZ8794 - 4 port switch
KSZ8795 - 5 port switch
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Rob Herring
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
Cc
This Kconfig option is unused, drop it.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
---
drivers/net/dsa/microchip/Kconfig | 1 -
net/dsa/Kconfig | 7 ---
2 files changed, 8
Merge the two headers into one, no functional change.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz8795.c | 1 -
drivers/net/dsa/microchip/ksz8795_spi.c | 1
ers cannot be swapped, as that would
trigger missing forward declaration errors, which would indicate the
way forward is to merge the two headers into one.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Vivien Didelot
Cc: Woojung Huh
--
On 1/11/21 3:47 PM, Andrew Lunn wrote:
On Mon, Jan 11, 2021 at 01:53:37PM +0100, Marek Vasut wrote:
Unless the internal PHY is connected and started, the phylib will not
poll the PHY for state and produce state updates. Connect the PHY and
start/stop it.
Hi Marek
Please continue the
On 1/11/21 3:43 PM, Heiner Kallweit wrote:
On 11.01.2021 15:10, Marek Vasut wrote:
On 1/11/21 2:50 PM, Heiner Kallweit wrote:
On 11.01.2021 14:38, Marek Vasut wrote:
On 1/11/21 2:26 PM, Heiner Kallweit wrote:
[...]
LGTM. When having a brief look at the driver I stumbled across two things
On 1/14/21 2:54 PM, Andrew Lunn wrote:
On Tue, Jan 12, 2021 at 11:28:00PM +0100, Marek Vasut wrote:
On 1/11/21 3:47 PM, Andrew Lunn wrote:
On Mon, Jan 11, 2021 at 01:53:37PM +0100, Marek Vasut wrote:
Unless the internal PHY is connected and started, the phylib will not
poll the PHY for state
ce to `__this_module'
Fix this by including the ks8851_common.c in both ks8851_spi.c and
ks8851_par.c. The DEBUG macro is defined in ks8851_common.c, so it
does not have to be defined again.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Jakub Kicinski
Cc: Lukas Wunner
On 1/15/21 4:00 PM, Andrew Lunn wrote:
On Fri, Jan 15, 2021 at 02:42:39PM +0100, Marek Vasut wrote:
When either the SPI or PAR variant is compiled as module AND the other
variant is compiled as built-in, the following build error occurs:
arm-linux-gnueabi-ld: drivers/net/ethernet/micrel
On 1/15/21 4:59 PM, Andrew Lunn wrote:
On Fri, Jan 15, 2021 at 04:05:57PM +0100, Marek Vasut wrote:
On 1/15/21 4:00 PM, Andrew Lunn wrote:
On Fri, Jan 15, 2021 at 02:42:39PM +0100, Marek Vasut wrote:
When either the SPI or PAR variant is compiled as module AND the other
variant is compiled as
On 1/15/21 4:31 PM, t...@redhat.com wrote:
From: Tom Rix
Defining DEBUG should only be done in development.
So remove DEBUG.
Signed-off-by: Tom Rix
Reviewed-by: Marek Vasut
Thanks
ce to `__this_module'
Fix this by passing THIS_MODULE as argument to ks8851_probe_common(),
ks8851_register_mdiobus(), and ultimately __mdiobus_register() in the
ks8851_common.c.
Fixes: ef3631220d2b ("net: ks8851: Register MDIO bus and the internal PHY")
Signed-off-by: Marek Vasut
On 1/15/21 10:36 PM, Arnd Bergmann wrote:
On Fri, Jan 15, 2021 at 6:24 PM Heiner Kallweit wrote:
On 15.01.2021 16:59, Andrew Lunn wrote:
On Fri, Jan 15, 2021 at 04:05:57PM +0100, Marek Vasut wrote:
On 1/15/21 4:00 PM, Andrew Lunn wrote:
On Fri, Jan 15, 2021 at 02:42:39PM +0100, Marek Vasut
On 1/16/21 6:04 PM, Arnd Bergmann wrote:
On Sat, Jan 16, 2021 at 5:48 PM Marek Vasut wrote:
When either the SPI or PAR variant is compiled as module AND the other
variant is compiled as built-in, the following build error occurs:
arm-linux-gnueabi-ld: drivers/net/ethernet/micrel
On 1/16/21 9:39 PM, Lukas Wunner wrote:
On Sat, Jan 16, 2021 at 08:26:22PM +0100, Arnd Bergmann wrote:
On Sat, Jan 16, 2021 at 6:56 PM Marek Vasut wrote:
On 1/16/21 6:04 PM, Arnd Bergmann wrote:
On Sat, Jan 16, 2021 at 5:48 PM Marek Vasut wrote:
I don't really like this version,
e2a984abd8 ("net: dsa: microchip: ksz8795: use phy_port_cnt where
possible")
Fixes: 241ed719bc98 ("net: dsa: microchip: ksz8795: use port_cnt instead of
TOTOAL_PORT_NUM")
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Michael Grzeschik
Cc: Jakub Kicinski
e2a984abd8 ("net: dsa: microchip: ksz8795: use phy_port_cnt where
possible")
Fixes: 241ed719bc98 ("net: dsa: microchip: ksz8795: use port_cnt instead of
TOTOAL_PORT_NUM")
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Michael Grzeschik
Cc: Jakub Kicinski
fits the constraint with a bit of extra
space.
Fixes: 5b797980908a ("net: dsa: microchip: Implement recommended reset timing")
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Jakub Kicinski
Cc: Michael Grzeschik
Cc: Paul Barker
---
drivers/net/dsa/microchip/ks
fits the constraint with a bit of extra
space.
Fixes: 5b797980908a ("net: dsa: microchip: Implement recommended reset timing")
Reviewed-by: Florian Fainelli
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Jakub Kicinski
Cc: Michael Grzeschik
Cc: Paul Barker
-
On 1/21/21 2:31 AM, Jakub Kicinski wrote:
On Wed, 20 Jan 2021 04:05:02 +0100 Marek Vasut wrote:
KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended
circuit for interfacing with CPU/FPGA reset consisting of 10k pullup
resistor and 10uF capacitor to ground. This circuit takes
: Marek Vasut
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Lukas Wunner
To: netdev@vger.kernel.org
---
drivers/net/ethernet/micrel/ks8851.h| 1 +
drivers/net/ethernet/micrel/ks8851_common.c | 69 -
2 files changed, 67 insertions(+), 3 deletions(-)
diff --git a/drivers/net
-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Lukas Wunner
To: netdev@vger.kernel.org
---
drivers/net/phy/micrel.c | 9 +
include/linux/micrel_phy.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index
On 12/30/20 4:43 PM, Andrew Lunn wrote:
On Wed, Dec 30, 2020 at 01:53:57PM +0100, Marek Vasut wrote:
The KS8851 has a reduced internal PHY, which is accessible through its
registers at offset 0xe4. The PHY is compatible with KS886x PHY present
in Micrel switches, except the PHY ID Low/High
On 12/30/20 5:00 PM, Andrew Lunn wrote:
+static int ks8851_mdio_read(struct mii_bus *bus, int phy_id, int reg)
+{
+ struct ks8851_net *ks = bus->priv;
+
+ if (phy_id != 0)
+ return 0x;
+
Please check for C45 and return -EOPNOTSUPP.
The ks8851_reg_read() does
On 1/3/21 5:55 PM, Andrew Lunn wrote:
On Sun, Jan 03, 2021 at 01:55:22PM +0100, Marek Vasut wrote:
On 12/30/20 4:43 PM, Andrew Lunn wrote:
On Wed, Dec 30, 2020 at 01:53:57PM +0100, Marek Vasut wrote:
The KS8851 has a reduced internal PHY, which is accessible through its
registers at offset
: Marek Vasut
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Lukas Wunner
To: netdev@vger.kernel.org
---
V2: - Cast the BIT(0) to u32 to avoid build warnings
- Swap PHY ID Hi/Lo registers for MDIO bus access
(retain old behavior for MII bus access)
- Return -EOPNOTSUPP on read from
The KS8851 has a reduced internal PHY, which is accessible through its
registers at offset 0xe4. The PHY is compatible with KS886x PHY present
in Micrel switches, including the PHY ID Low/High registers swap, which
is present both in the MAC and the switch.
Signed-off-by: Marek Vasut
Cc: Andrew
The KS8851 has a reduced internal PHY, which is accessible through its
registers at offset 0xe4. The PHY is compatible with KS886x PHY present
in Micrel switches, including the PHY ID Low/High registers swap, which
is present both in the MAC and the switch.
Marek Vasut (2):
net: phy: micrel
: Marek Vasut
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Lukas Wunner
---
V2: Merge the KSZ8851 and KS886X entries, as those PHYs cannot be discerned
V3: Add RB from Andrew
---
drivers/net/phy/micrel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/micrel.c b
: Andrew Lunn
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Lukas Wunner
---
V2: - Cast the BIT(0) to u32 to avoid build warnings
- Swap PHY ID Hi/Lo registers for MDIO bus access
(retain old behavior for MII bus access)
- Return -EOPNOTSUPP on read from
because old_state = PHY_HALTED and
phy_dev->state = PHY_HALTED.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: David S. Miller
Cc: Heiner Kallweit
---
drivers/net/phy/phy.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4
Add support for controlling regulator powering the magnetics. In case
the interface is down, it is possible to save considerable power by
turning the regulator supplying the magnetics off.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: David S. Miller
Cc: Heiner Kallweit
On 1/5/21 6:38 PM, Andrew Lunn wrote:
+static void smsc_link_change_notify(struct phy_device *phydev)
+{
+ struct smsc_phy_priv *priv = phydev->priv;
+
+ if (!priv->vddio)
+ return;
+
+ if (phydev->state == PHY_HALTED)
+ regulator_disable(priv->vddio)
On 1/5/21 8:03 PM, Andrew Lunn wrote:
On Tue, Jan 05, 2021 at 06:53:48PM +0100, Marek Vasut wrote:
On 1/5/21 6:38 PM, Andrew Lunn wrote:
+static void smsc_link_change_notify(struct phy_device *phydev)
+{
+ struct smsc_phy_priv *priv = phydev->priv;
+
+ if (!priv->
The PHYLIB must be selected to provide mdiobus_*() functions, and the
MICREL_PHY is necessary too, as that is the only possible PHY attached
to the KS8851 (it is the internal PHY).
Fixes: ef3631220d2b ("net: ks8851: Register MDIO bus and the internal PHY")
Signed-off-by: Marek Vasut
Unless the internal PHY is connected and started, the phylib will not
poll the PHY for state and produce state updates. Connect the PHY and
start/stop it.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Heiner Kallweit
Cc: Lukas Wunner
---
drivers/net/ethernet/micrel/ks8851.h| 2
On 1/11/21 2:26 PM, Heiner Kallweit wrote:
[...]
LGTM. When having a brief look at the driver I stumbled across two things:
1. Do MAC/PHY support any pause mode? Then a call to
phy_support_(a)sym_pause() would be missing.
https://ww1.microchip.com/downloads/en/DeviceDoc/KSZ8851-16MLL-Sing
On 1/11/21 2:50 PM, Heiner Kallweit wrote:
On 11.01.2021 14:38, Marek Vasut wrote:
On 1/11/21 2:26 PM, Heiner Kallweit wrote:
[...]
LGTM. When having a brief look at the driver I stumbled across two things:
1. Do MAC/PHY support any pause mode? Then a call to
phy_support_(a)sym_pause
th local buffer.
Signed-off-by: Marek Vasut
Cc: Angus Ainslie
Cc: David S. Miller
Cc: Jakub Kicinski
Cc: Kalle Valo
Cc: Lee Jones
Cc: Martin Kepplinger
Cc: Sebastian Krzyszkowiak
Cc: Siva Rebbagondla
Cc: linux-wirel...@vger.kernel.org
Cc: netdev@vger.kernel.org
---
drivers/net/wireless/rsi
The inner do { ... } while loop is completely useless, all it does
is iterate over a switch-case statement, one bit at a time. This
can easily be replaced by simple if (status & bit) { ... } tests
for each bit. No functional change.
Signed-off-by: Marek Vasut
Cc: Angus Ainslie
Cc: Dav
On 11/4/20 4:21 PM, Martin Kepplinger wrote:
On 03.11.20 19:09, Marek Vasut wrote:
The interrupt handling of the RS911x is particularly heavy. For each RX
packet, the card does three SDIO transactions, one to read interrupt
status register, one to RX buffer length, one to read the RX packet(s
anything else from claiming the SDIO bus first.
Fixes: 20db07332736 ("rsi: sdio suspend and resume support")
Signed-off-by: Marek Vasut
Cc: Amitkumar Karwar
Cc: Angus Ainslie
Cc: David S. Miller
Cc: Jakub Kicinski
Cc: Kalle Valo
Cc: Karun Eagalapati
Cc: Martin Kepplinger
Cc:
On 1/25/21 1:19 PM, Arnd Bergmann wrote:
From: Arnd Bergmann
An object file cannot be built for both loadable module and built-in
use at the same time:
arm-linux-gnueabi-ld: drivers/net/ethernet/micrel/ks8851_common.o: in function
`ks8851_probe_common':
ks8851_common.c:(.text+0xf80): undefine
On 12/23/20 3:13 AM, Sasha Levin wrote:
Hello Sasha,
From: Marek Vasut
[ Upstream commit 65277100caa2f2c62b6f3c4648b90d6f0435f3bc ]
In case RSI9116 SDIO WiFi operates in STA mode against Intel 9260 in AP mode,
the association fails. The former is using wpa_supplicant during association,
the
On 3/4/21 9:47 PM, Sasha Levin wrote:
On Tue, Mar 02, 2021 at 08:25:49PM +0100, Marek Vasut wrote:
On 12/23/20 3:13 AM, Sasha Levin wrote:
Hello Sasha,
From: Marek Vasut
[ Upstream commit 65277100caa2f2c62b6f3c4648b90d6f0435f3bc ]
In case RSI9116 SDIO WiFi operates in STA mode against
Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch
reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly
fine for the kernel to sleep for a bit in ksz_switch_register().
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Linus Walleij
Assign OF node to CPSW slave devices, otherwise it is not possible to
bind e.g. DSA switch to them. Without this patch, the DSA code tries
to find the ethernet device by OF match, but fails to do so because
the slave device has NULL OF node.
Signed-off-by: Marek Vasut
Cc: David S. Miller
Cc
On 6/23/19 5:09 PM, Andrew Lunn wrote:
> On Sun, Jun 23, 2019 at 02:10:36PM +0200, Marek Vasut wrote:
>> Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch
>> reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly
>> fine for the kern
Replace gpiod_set_value() with gpiod_set_value_cansleep(), as the switch
reset GPIO can be connected to e.g. I2C GPIO expander and it is perfectly
fine for the kernel to sleep for a bit in ksz_switch_register().
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Linus Walleij
Factor out the code which sends out the register read/write opcodes
to the switch, since the code differs in single bit between read and
write.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: New patch
V3: - Rebase on next/master
The regmap config tables are rather similar for various generations of
the KSZ8xxx/KSZ9xxx switches. Introduce a macro which allows generating
those tables without duplication. Note that $regalign parameter is not
used right now, but will be used in KSZ87xx series switches.
Signed-off-by: Marek
These functions and callbacks are never used, remove them.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: No change
V3: - Rebase on next/master
- Test on KSZ9477EVB
---
drivers/net/dsa/microchip/ksz9477_spi.c | 25
Since the driver now uses regmap , get rid of ad-hoc ksz_io_ops
abstraction, which no longer has any meaning. Moreover, since regmap
has it's own locking, get rid of the register access mutex.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojun
Regmap provides bit manipulation functions to set/clear bits, use those
insted of reimplementing them.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: New patch
V3: - Rebase on next/master
- Test on KSZ9477EVB
---
drivers/net/dsa
for no reason. Regmap covers
the whole thing now.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: - Squash with "net: dsa: microchip: Remove dev->txbuf"
- Use separate regmaps for 8/16/32bit registers
- Increase th
These functions are only used by the KSZ9477 code, move them from
the header into that code. Note that these functions will be soon
replaced by regmap equivalents.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: New patch
V3: - Rebase
This patchset converts KSZ9477 switch driver to regmap.
This was tested with extra patches on KSZ8795. This was also tested
on KSZ9477 on Microchip KSZ9477EVB board, which I now have.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
Marek
The functions in the header file are static, and the header file is
included from single C file, just inline the code into the C file.
The bonus is that it's easier to spot further content to clean up.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Wo
These functions and callbacks are never used, remove them.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: No change
V3: - Rebase on next/master
- Test on KSZ9477EVB
---
drivers/net/dsa/microchip/ksz9477_spi.c | 2 --
drivers/net
The indirect function call to dev->dev_ops->get_port_addr() is expensive
especially if called for every single register access, and only returns
the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly
instead.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainel
On 6/24/19 12:35 AM, Marek Vasut wrote:
> Add basic SPI regmap support into the driver.
>
> Previous patches unconver that ksz_spi_write() is always ever called
> with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN)
> check and we can also drop the allocation of
On 6/24/19 5:20 AM, Andrew Lunn wrote:
> On Mon, Jun 24, 2019 at 12:35:03AM +0200, Marek Vasut wrote:
>> The indirect function call to dev->dev_ops->get_port_addr() is expensive
>> especially if called for every single register access, and only returns
>> the value of
On 6/25/19 1:59 AM, Vladimir Oltean wrote:
> On Tue, 25 Jun 2019 at 01:17, Marek Vasut wrote:
>>
>> On 6/24/19 12:35 AM, Marek Vasut wrote:
>>> Add basic SPI regmap support into the driver.
>>>
>>> Previous patches unconver that ksz_spi_write() is alway
On 6/25/19 2:40 PM, Vladimir Oltean wrote:
> On Tue, 25 Jun 2019 at 15:06, Marek Vasut wrote:
>>
>> On 6/25/19 1:59 AM, Vladimir Oltean wrote:
>>> On Tue, 25 Jun 2019 at 01:17, Marek Vasut wrote:
>>>>
>>>> On 6/24/19 12:35 AM, Marek Vasut wrote:
&g
The regmap config tables are rather similar for various generations of
the KSZ8xxx/KSZ9xxx switches. Introduce a macro which allows generating
those tables without duplication. Note that $regalign parameter is not
used right now, but will be used in KSZ87xx series switches.
Signed-off-by: Marek
Regmap provides bit manipulation functions to set/clear bits, use those
insted of reimplementing them.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: New patch
V3: - Rebase on next/master
- Test on KSZ9477EVB
V4: No change
Factor out the code which sends out the register read/write opcodes
to the switch, since the code differs in single bit between read and
write.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
Reviewed-by: Andrew Lunn
---
V2: New patch
V3
Since the driver now uses regmap , get rid of ad-hoc ksz_io_ops
abstraction, which no longer has any meaning. Moreover, since regmap
has it's own locking, get rid of the register access mutex.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojun
These functions are only used by the KSZ9477 code, move them from
the header into that code. Note that these functions will be soon
replaced by regmap equivalents.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
Reviewed-by: Andrew Lunn
---
V2
This patchset converts KSZ9477 switch driver to regmap.
This was tested with extra patches on KSZ8795. This was also tested
on KSZ9477 on Microchip KSZ9477EVB board, which I now have.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
Marek
for no reason. Regmap covers
the whole thing now.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
V2: - Squash with "net: dsa: microchip: Remove dev->txbuf"
- Use separate regmaps for 8/16/32bit registers
- Increase th
These functions and callbacks are never used, remove them.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
Reviewed-by: Andrew Lunn
---
V2: No change
V3: - Rebase on next/master
- Test on KSZ9477EVB
V4: Add RB
---
drivers/net/dsa
The indirect function call to dev->dev_ops->get_port_addr() is expensive
especially if called for every single register access, and only returns
the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly
instead.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainel
The functions in the header file are static, and the header file is
included from single C file, just inline the code into the C file.
The bonus is that it's easier to spot further content to clean up.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Wo
These functions and callbacks are never used, remove them.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
Reviewed-by: Andrew Lunn
---
V2: No change
V3: - Rebase on next/master
- Test on KSZ9477EVB
V4: Add RB
---
drivers/net/dsa
Regmap provides polling function to poll for bits in a register,
use in instead of reimplementing it.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c| 14 +-
drivers/net/dsa/microchip
values than this one.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c | 26 --
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b
values than this one.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c | 32 +++--
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b
Regmap provides read-modify-write function to update bitfields in
registers. Replace ad-hoc read-modify-write with regmap_update_bits()
where applicable.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c
Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
Marek Vasut (5):
net: dsa: microchip: Replace ad-hoc polling with regmap
net: dsa: microchip: Replace ksz9477_wait_vlan_ctrl_ready polling with
regmap
net: dsa: microchip: Replace ksz9477_wait_alu_ready polling
values than this one.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c | 34 ++---
1 file changed, 12 insertions(+), 22 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b
On 6/28/19 5:31 PM, Vivien Didelot wrote:
> Hi Marek,
>
> On Thu, 27 Jun 2019 23:55:51 +0200, Marek Vasut wrote:
>> This patchset cleans up KSZ9477 switch driver by replacing various
>> ad-hoc polling implementations and register RMW with regmap functions.
>>
>>
Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special
BroadRReach 100BaseT1 PHYs used in automotive.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Guenter Roeck
Cc: Heiner Kallweit
Cc: Jean Delvare
Cc: linux-hw...@vger.kernel.org
---
V2: - Use
1 - 100 of 445 matches
Mail list logo