From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, vivien.didelot@savoirfairelinux.com,
andrew@lunn.ch, Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next 1/7] net: dsa: bcm_sf2: Make SF2_IO64_MACRO() utilize 32-bit macro
Date: Fri, 20 Jan 2017 12:36:28 -0800 [thread overview]
Message-ID: <20170120203634.2773-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170120203634.2773-1-f.fainelli@gmail.com>
There is no point inlining the 32-bit direct register read/write part,
just infer it from the existing macro. This will make it easier to
centralize the address rewriting that we are going to introduce later
on.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/bcm_sf2.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h
index 44692673e1d5..4531c2333e86 100644
--- a/drivers/net/dsa/bcm_sf2.h
+++ b/drivers/net/dsa/bcm_sf2.h
@@ -125,7 +125,7 @@ static inline u64 name##_readq(struct bcm_sf2_priv *priv, u32 off) \
{ \
u32 indir, dir; \
spin_lock(&priv->indir_lock); \
- dir = __raw_readl(priv->name + off); \
+ dir = name##_readl(priv, off); \
indir = reg_readl(priv, REG_DIR_DATA_READ); \
spin_unlock(&priv->indir_lock); \
return (u64)indir << 32 | dir; \
@@ -135,7 +135,7 @@ static inline void name##_writeq(struct bcm_sf2_priv *priv, u64 val, \
{ \
spin_lock(&priv->indir_lock); \
reg_writel(priv, upper_32_bits(val), REG_DIR_DATA_WRITE); \
- __raw_writel(lower_32_bits(val), priv->name + off); \
+ name##_writel(priv, lower_32_bits(val), off); \
spin_unlock(&priv->indir_lock); \
}
--
2.9.3
next prev parent reply other threads:[~2017-01-20 20:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 20:36 [PATCH net-next 0/7] net: dsa: bcm_sf2: Add support for BCM7278 Florian Fainelli
2017-01-20 20:36 ` Florian Fainelli [this message]
2017-01-20 20:36 ` [PATCH net-next 2/7] net: dsa: bcm_sf2: Prepare for different register layouts Florian Fainelli
2017-01-20 20:36 ` [PATCH net-next 3/7] net: dsa: bcm_sf2: Add support for BCM7278 integrated switch Florian Fainelli
2017-01-20 20:36 ` [PATCH net-next 4/7] net: dsa: bcm_sf2: Move code enabling Broadcom tags Florian Fainelli
2017-01-20 20:36 ` [PATCH net-next 5/7] net: dsa: bcm_sf2: Allow non-IMP ports to have Broadcom tags enabled Florian Fainelli
2017-01-20 20:36 ` [PATCH net-next 6/7] net: phy: bcm7xxx: Add entry for BCM7278 Florian Fainelli
2017-01-20 20:36 ` [PATCH net-next 7/7] net: phy: bcm7xxx: Implement EGPHY workaround for 7278 Florian Fainelli
2017-01-22 21:59 ` [PATCH net-next 0/7] net: dsa: bcm_sf2: Add support for BCM7278 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170120203634.2773-2-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).