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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-systemport-minor-io-macros-changes'

Florian Fainelli says:

====================
net: systemport: Minor IO macros changes

This patch series addresses the warning initially reported by Vladimir
here:

https://lore.kernel.org/all/20241014150139.927423-1-vladimir.oltean@nxp.com/

and follows on with proceeding with his suggestion the IO macros to the
header file.
====================

Link: https://patch.msgid.link/20241021174935.57658-1-florian.fainelli@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+23 -24
-24
drivers/net/ethernet/broadcom/bcmsysport.c
··· 27 27 28 28 #include "bcmsysport.h" 29 29 30 - /* I/O accessors register helpers */ 31 - #define BCM_SYSPORT_IO_MACRO(name, offset) \ 32 - static inline u32 name##_readl(struct bcm_sysport_priv *priv, u32 off) \ 33 - { \ 34 - u32 reg = readl_relaxed(priv->base + offset + off); \ 35 - return reg; \ 36 - } \ 37 - static inline void name##_writel(struct bcm_sysport_priv *priv, \ 38 - u32 val, u32 off) \ 39 - { \ 40 - writel_relaxed(val, priv->base + offset + off); \ 41 - } \ 42 - 43 - BCM_SYSPORT_IO_MACRO(intrl2_0, SYS_PORT_INTRL2_0_OFFSET); 44 - BCM_SYSPORT_IO_MACRO(intrl2_1, SYS_PORT_INTRL2_1_OFFSET); 45 - BCM_SYSPORT_IO_MACRO(umac, SYS_PORT_UMAC_OFFSET); 46 - BCM_SYSPORT_IO_MACRO(gib, SYS_PORT_GIB_OFFSET); 47 - BCM_SYSPORT_IO_MACRO(tdma, SYS_PORT_TDMA_OFFSET); 48 - BCM_SYSPORT_IO_MACRO(rxchk, SYS_PORT_RXCHK_OFFSET); 49 - BCM_SYSPORT_IO_MACRO(txchk, SYS_PORT_TXCHK_OFFSET); 50 - BCM_SYSPORT_IO_MACRO(rbuf, SYS_PORT_RBUF_OFFSET); 51 - BCM_SYSPORT_IO_MACRO(tbuf, SYS_PORT_TBUF_OFFSET); 52 - BCM_SYSPORT_IO_MACRO(topctrl, SYS_PORT_TOPCTRL_OFFSET); 53 - 54 30 /* On SYSTEMPORT Lite, any register after RDMA_STATUS has the exact 55 31 * same layout, except it has been moved by 4 bytes up, *sigh* 56 32 */
+23
drivers/net/ethernet/broadcom/bcmsysport.h
··· 773 773 struct bcm_sysport_tx_ring *ring_map[DSA_MAX_PORTS * 8]; 774 774 775 775 }; 776 + 777 + /* I/O accessors register helpers */ 778 + #define BCM_SYSPORT_IO_MACRO(name, offset) \ 779 + static inline u32 name##_readl(struct bcm_sysport_priv *priv, u32 off) \ 780 + { \ 781 + u32 reg = readl_relaxed(priv->base + (offset) + off); \ 782 + return reg; \ 783 + } \ 784 + static inline void name##_writel(struct bcm_sysport_priv *priv, \ 785 + u32 val, u32 off) \ 786 + { \ 787 + writel_relaxed(val, priv->base + (offset) + off); \ 788 + } \ 789 + 790 + BCM_SYSPORT_IO_MACRO(intrl2_0, SYS_PORT_INTRL2_0_OFFSET); 791 + BCM_SYSPORT_IO_MACRO(intrl2_1, SYS_PORT_INTRL2_1_OFFSET); 792 + BCM_SYSPORT_IO_MACRO(umac, SYS_PORT_UMAC_OFFSET); 793 + BCM_SYSPORT_IO_MACRO(gib, SYS_PORT_GIB_OFFSET); 794 + BCM_SYSPORT_IO_MACRO(tdma, SYS_PORT_TDMA_OFFSET); 795 + BCM_SYSPORT_IO_MACRO(rxchk, SYS_PORT_RXCHK_OFFSET); 796 + BCM_SYSPORT_IO_MACRO(rbuf, SYS_PORT_RBUF_OFFSET); 797 + BCM_SYSPORT_IO_MACRO(topctrl, SYS_PORT_TOPCTRL_OFFSET); 798 + 776 799 #endif /* __BCM_SYSPORT_H */