[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190821232724.1544-5-marek.behun@nic.cz>
Date: Thu, 22 Aug 2019 01:27:18 +0200
From: Marek Behún <marek.behun@....cz>
To: netdev@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Marek Behún <marek.behun@....cz>
Subject: [PATCH net-next 04/10] net: dsa: mv88e6xxx: prefix hidden register macro names with MV88E6XXX_
In order to be uniform with the rest of the driver, prepend hidden
register macro names with the MV88E6XXX_ prefix.
Signed-off-by: Marek Behún <marek.behun@....cz>
---
drivers/net/dsa/mv88e6xxx/hidden.c | 36 ++++++++++++++++--------------
drivers/net/dsa/mv88e6xxx/hidden.h | 16 ++++++-------
2 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/hidden.c b/drivers/net/dsa/mv88e6xxx/hidden.c
index 6ea47b03679f..efa93c776a30 100644
--- a/drivers/net/dsa/mv88e6xxx/hidden.c
+++ b/drivers/net/dsa/mv88e6xxx/hidden.c
@@ -22,25 +22,26 @@ int mv88e6390_hidden_write(struct mv88e6xxx_chip *chip, int port,
u16 ctrl;
int err;
- err = mv88e6xxx_port_write(chip, PORT_RESERVED_1A_DATA_PORT,
- PORT_RESERVED_1A, val);
+ err = mv88e6xxx_port_write(chip, MV88E6XXX_PORT_RESERVED_1A_DATA_PORT,
+ MV88E6XXX_PORT_RESERVED_1A, val);
if (err)
return err;
- ctrl = PORT_RESERVED_1A_BUSY | PORT_RESERVED_1A_WRITE |
- PORT_RESERVED_1A_BLOCK | port << PORT_RESERVED_1A_PORT_SHIFT |
- reg;
+ ctrl = MV88E6XXX_PORT_RESERVED_1A_BUSY |
+ MV88E6XXX_PORT_RESERVED_1A_WRITE |
+ MV88E6XXX_PORT_RESERVED_1A_BLOCK |
+ port << MV88E6XXX_PORT_RESERVED_1A_PORT_SHIFT | reg;
- return mv88e6xxx_port_write(chip, PORT_RESERVED_1A_CTRL_PORT,
- PORT_RESERVED_1A, ctrl);
+ return mv88e6xxx_port_write(chip, MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT,
+ MV88E6XXX_PORT_RESERVED_1A, ctrl);
}
int mv88e6390_hidden_wait(struct mv88e6xxx_chip *chip)
{
- int bit = __bf_shf(PORT_RESERVED_1A_BUSY);
+ int bit = __bf_shf(MV88E6XXX_PORT_RESERVED_1A_BUSY);
- return mv88e6xxx_wait_bit(chip, PORT_RESERVED_1A_CTRL_PORT,
- PORT_RESERVED_1A, bit, 0);
+ return mv88e6xxx_wait_bit(chip, MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT,
+ MV88E6XXX_PORT_RESERVED_1A, bit, 0);
}
int mv88e6390_hidden_read(struct mv88e6xxx_chip *chip, int port,
@@ -49,12 +50,13 @@ int mv88e6390_hidden_read(struct mv88e6xxx_chip *chip, int port,
u16 ctrl;
int err;
- ctrl = PORT_RESERVED_1A_BUSY | PORT_RESERVED_1A_READ |
- PORT_RESERVED_1A_BLOCK | port << PORT_RESERVED_1A_PORT_SHIFT |
- reg;
+ ctrl = MV88E6XXX_PORT_RESERVED_1A_BUSY |
+ MV88E6XXX_PORT_RESERVED_1A_READ |
+ MV88E6XXX_PORT_RESERVED_1A_BLOCK |
+ port << MV88E6XXX_PORT_RESERVED_1A_PORT_SHIFT | reg;
- err = mv88e6xxx_port_write(chip, PORT_RESERVED_1A_CTRL_PORT,
- PORT_RESERVED_1A, ctrl);
+ err = mv88e6xxx_port_write(chip, MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT,
+ MV88E6XXX_PORT_RESERVED_1A, ctrl);
if (err)
return err;
@@ -62,6 +64,6 @@ int mv88e6390_hidden_read(struct mv88e6xxx_chip *chip, int port,
if (err)
return err;
- return mv88e6xxx_port_read(chip, PORT_RESERVED_1A_DATA_PORT,
- PORT_RESERVED_1A, val);
+ return mv88e6xxx_port_read(chip, MV88E6XXX_PORT_RESERVED_1A_DATA_PORT,
+ MV88E6XXX_PORT_RESERVED_1A, val);
}
diff --git a/drivers/net/dsa/mv88e6xxx/hidden.h b/drivers/net/dsa/mv88e6xxx/hidden.h
index 5e2de0a7f22d..632abbe4e139 100644
--- a/drivers/net/dsa/mv88e6xxx/hidden.h
+++ b/drivers/net/dsa/mv88e6xxx/hidden.h
@@ -13,14 +13,14 @@
#include "chip.h"
/* Offset 0x1a: Magic undocumented errata register */
-#define PORT_RESERVED_1A 0x1a
-#define PORT_RESERVED_1A_BUSY BIT(15)
-#define PORT_RESERVED_1A_WRITE BIT(14)
-#define PORT_RESERVED_1A_READ 0
-#define PORT_RESERVED_1A_PORT_SHIFT 5
-#define PORT_RESERVED_1A_BLOCK (0xf << 10)
-#define PORT_RESERVED_1A_CTRL_PORT 4
-#define PORT_RESERVED_1A_DATA_PORT 5
+#define MV88E6XXX_PORT_RESERVED_1A 0x1a
+#define MV88E6XXX_PORT_RESERVED_1A_BUSY BIT(15)
+#define MV88E6XXX_PORT_RESERVED_1A_WRITE BIT(14)
+#define MV88E6XXX_PORT_RESERVED_1A_READ 0
+#define MV88E6XXX_PORT_RESERVED_1A_PORT_SHIFT 5
+#define MV88E6XXX_PORT_RESERVED_1A_BLOCK (0xf << 10)
+#define MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT 4
+#define MV88E6XXX_PORT_RESERVED_1A_DATA_PORT 5
int mv88e6390_hidden_write(struct mv88e6xxx_chip *chip, int port,
int reg, u16 val);
--
2.21.0
Powered by blists - more mailing lists