Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: move the Broadcom tag information in a separate header file

It is a bit strange to see something as specific as Broadcom SYSTEMPORT
bits in the main DSA include file. Move these away into a separate
header, and have the tagger and the SYSTEMPORT driver include them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
f46b9b8e c214cc3a

+19 -6
+1
MAINTAINERS
··· 3400 3400 S: Supported 3401 3401 F: Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml 3402 3402 F: drivers/net/dsa/b53/* 3403 + F: include/linux/dsa/brcm.h 3403 3404 F: include/linux/platform_data/b53.h 3404 3405 3405 3406 BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
+1
drivers/net/ethernet/broadcom/bcmsysport.c
··· 12 12 #include <linux/module.h> 13 13 #include <linux/kernel.h> 14 14 #include <linux/netdevice.h> 15 + #include <linux/dsa/brcm.h> 15 16 #include <linux/etherdevice.h> 16 17 #include <linux/platform_device.h> 17 18 #include <linux/of.h>
+16
include/linux/dsa/brcm.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only 2 + * Copyright (C) 2014 Broadcom Corporation 3 + */ 4 + 5 + /* Included by drivers/net/ethernet/broadcom/bcmsysport.c and 6 + * net/dsa/tag_brcm.c 7 + */ 8 + #ifndef _NET_DSA_BRCM_H 9 + #define _NET_DSA_BRCM_H 10 + 11 + /* Broadcom tag specific helpers to insert and extract queue/port number */ 12 + #define BRCM_TAG_SET_PORT_QUEUE(p, q) ((p) << 8 | q) 13 + #define BRCM_TAG_GET_PORT(v) ((v) >> 8) 14 + #define BRCM_TAG_GET_QUEUE(v) ((v) & 0xff) 15 + 16 + #endif
-6
include/net/dsa.h
··· 878 878 } 879 879 #endif 880 880 881 - /* Broadcom tag specific helpers to insert and extract queue/port number */ 882 - #define BRCM_TAG_SET_PORT_QUEUE(p, q) ((p) << 8 | q) 883 - #define BRCM_TAG_GET_PORT(v) ((v) >> 8) 884 - #define BRCM_TAG_GET_QUEUE(v) ((v) & 0xff) 885 - 886 - 887 881 netdev_tx_t dsa_enqueue_skb(struct sk_buff *skb, struct net_device *dev); 888 882 int dsa_port_get_phy_strings(struct dsa_port *dp, uint8_t *data); 889 883 int dsa_port_get_ethtool_phy_stats(struct dsa_port *dp, uint64_t *data);
+1
net/dsa/tag_brcm.c
··· 5 5 * Copyright (C) 2014 Broadcom Corporation 6 6 */ 7 7 8 + #include <linux/dsa/brcm.h> 8 9 #include <linux/etherdevice.h> 9 10 #include <linux/list.h> 10 11 #include <linux/slab.h>