-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oleksij Rempel says: ==================== microchip: add support for ksz88x3 driver family changes v8: - add Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> - fix build issue on "net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct" changes v7: - Reverse christmas tree fixes - remove IS_88X3 and use chip_id instead - drop own tag and use DSA_TAG_PROTO_KSZ9893 instead changes v6: - take over this patch set - rebase against latest netdev-next and fix regressions - disable VLAN support for KSZ8863. KSZ8863's VLAN is not compatible to the KSZ8795's. So disable it for now and mainline it separately. This series adds support for the ksz88x3 driver family to the dsa based ksz drivers. The driver is making use of the already available ksz8795 driver and moves it to an generic driver for the ksz8 based chips which have similar functions but an totaly different register layout. The mainlining discussion history of this branch: v1: https://lore.kernel.org/netdev/20191107110030.25199-1-m.grzeschik@pengutronix.de/ v2: https://lore.kernel.org/netdev/20191218200831.13796-1-m.grzeschik@pengutronix.de/ v3: https://lore.kernel.org/netdev/20200508154343.6074-1-m.grzeschik@pengutronix.de/ v4: https://lore.kernel.org/netdev/20200803054442.20089-1-m.grzeschik@pengutronix.de/ v5: https://lore.kernel.org/netdev/20201207125627.30843-1-m.grzeschik@pengutronix.de/ ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
13 changed files
with
983 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* | ||
* Microchip KSZ8XXX series register access | ||
* | ||
* Copyright (C) 2020 Pengutronix, Michael Grzeschik <kernel@pengutronix.de> | ||
*/ | ||
|
||
#ifndef __KSZ8XXX_H | ||
#define __KSZ8XXX_H | ||
#include <linux/kernel.h> | ||
|
||
enum ksz_regs { | ||
REG_IND_CTRL_0, | ||
REG_IND_DATA_8, | ||
REG_IND_DATA_CHECK, | ||
REG_IND_DATA_HI, | ||
REG_IND_DATA_LO, | ||
REG_IND_MIB_CHECK, | ||
P_FORCE_CTRL, | ||
P_LINK_STATUS, | ||
P_LOCAL_CTRL, | ||
P_NEG_RESTART_CTRL, | ||
P_REMOTE_STATUS, | ||
P_SPEED_STATUS, | ||
S_TAIL_TAG_CTRL, | ||
}; | ||
|
||
enum ksz_masks { | ||
PORT_802_1P_REMAPPING, | ||
SW_TAIL_TAG_ENABLE, | ||
MIB_COUNTER_OVERFLOW, | ||
MIB_COUNTER_VALID, | ||
VLAN_TABLE_FID, | ||
VLAN_TABLE_MEMBERSHIP, | ||
VLAN_TABLE_VALID, | ||
STATIC_MAC_TABLE_VALID, | ||
STATIC_MAC_TABLE_USE_FID, | ||
STATIC_MAC_TABLE_FID, | ||
STATIC_MAC_TABLE_OVERRIDE, | ||
STATIC_MAC_TABLE_FWD_PORTS, | ||
DYNAMIC_MAC_TABLE_ENTRIES_H, | ||
DYNAMIC_MAC_TABLE_MAC_EMPTY, | ||
DYNAMIC_MAC_TABLE_NOT_READY, | ||
DYNAMIC_MAC_TABLE_ENTRIES, | ||
DYNAMIC_MAC_TABLE_FID, | ||
DYNAMIC_MAC_TABLE_SRC_PORT, | ||
DYNAMIC_MAC_TABLE_TIMESTAMP, | ||
}; | ||
|
||
enum ksz_shifts { | ||
VLAN_TABLE_MEMBERSHIP_S, | ||
VLAN_TABLE, | ||
STATIC_MAC_FWD_PORTS, | ||
STATIC_MAC_FID, | ||
DYNAMIC_MAC_ENTRIES_H, | ||
DYNAMIC_MAC_ENTRIES, | ||
DYNAMIC_MAC_FID, | ||
DYNAMIC_MAC_TIMESTAMP, | ||
DYNAMIC_MAC_SRC_PORT, | ||
}; | ||
|
||
struct ksz8 { | ||
const u8 *regs; | ||
const u32 *masks; | ||
const u8 *shifts; | ||
void *priv; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.