diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-04-22 17:26:10 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-04-29 09:16:45 -0400 |
commit | 8a33692ee8f10f1ceb38001101a4f55de921d726 (patch) | |
tree | 108237eaee2ae7e5077e14ffebb31a8909968d53 /drivers/memory | |
parent | 71e2e5d39770325c6acccedbe4629cad4336f6d4 (diff) |
memory: mvebu-devbus: use _SHIFT suffixes instead of _BIT
As noted by Sebastian Hesselbarth, the definitions in mvebu-devbus.c
are not bit definition, but rather shift values, so a _SHIFT prefix
would make more sense. This commit therefore replaces the *_BIT
definitions by *_SHIFT definitions.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Link: https://lkml.kernel.org/r/1398202002-28530-7-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/mvebu-devbus.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c index e66de7f3c33c..0f196b36cc3e 100644 --- a/drivers/memory/mvebu-devbus.c +++ b/drivers/memory/mvebu-devbus.c | |||
@@ -30,16 +30,16 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | 31 | ||
32 | /* Register definitions */ | 32 | /* Register definitions */ |
33 | #define ARMADA_DEV_WIDTH_BIT 30 | 33 | #define ARMADA_DEV_WIDTH_SHIFT 30 |
34 | #define ARMADA_BADR_SKEW_BIT 28 | 34 | #define ARMADA_BADR_SKEW_SHIFT 28 |
35 | #define ARMADA_RD_HOLD_BIT 23 | 35 | #define ARMADA_RD_HOLD_SHIFT 23 |
36 | #define ARMADA_ACC_NEXT_BIT 17 | 36 | #define ARMADA_ACC_NEXT_SHIFT 17 |
37 | #define ARMADA_RD_SETUP_BIT 12 | 37 | #define ARMADA_RD_SETUP_SHIFT 12 |
38 | #define ARMADA_ACC_FIRST_BIT 6 | 38 | #define ARMADA_ACC_FIRST_SHIFT 6 |
39 | 39 | ||
40 | #define ARMADA_SYNC_ENABLE_BIT 24 | 40 | #define ARMADA_SYNC_ENABLE_SHIFT 24 |
41 | #define ARMADA_WR_HIGH_BIT 16 | 41 | #define ARMADA_WR_HIGH_SHIFT 16 |
42 | #define ARMADA_WR_LOW_BIT 8 | 42 | #define ARMADA_WR_LOW_SHIFT 8 |
43 | 43 | ||
44 | #define ARMADA_READ_PARAM_OFFSET 0x0 | 44 | #define ARMADA_READ_PARAM_OFFSET 0x0 |
45 | #define ARMADA_WRITE_PARAM_OFFSET 0x4 | 45 | #define ARMADA_WRITE_PARAM_OFFSET 0x4 |
@@ -178,12 +178,12 @@ static int devbus_set_timing_params(struct devbus *devbus, | |||
178 | return err; | 178 | return err; |
179 | 179 | ||
180 | /* Set read timings */ | 180 | /* Set read timings */ |
181 | value = r.bus_width << ARMADA_DEV_WIDTH_BIT | | 181 | value = r.bus_width << ARMADA_DEV_WIDTH_SHIFT | |
182 | r.badr_skew << ARMADA_BADR_SKEW_BIT | | 182 | r.badr_skew << ARMADA_BADR_SKEW_SHIFT | |
183 | r.rd_hold << ARMADA_RD_HOLD_BIT | | 183 | r.rd_hold << ARMADA_RD_HOLD_SHIFT | |
184 | r.acc_next << ARMADA_ACC_NEXT_BIT | | 184 | r.acc_next << ARMADA_ACC_NEXT_SHIFT | |
185 | r.rd_setup << ARMADA_RD_SETUP_BIT | | 185 | r.rd_setup << ARMADA_RD_SETUP_SHIFT | |
186 | r.acc_first << ARMADA_ACC_FIRST_BIT | | 186 | r.acc_first << ARMADA_ACC_FIRST_SHIFT | |
187 | r.turn_off; | 187 | r.turn_off; |
188 | 188 | ||
189 | dev_dbg(devbus->dev, "read parameters register 0x%p = 0x%x\n", | 189 | dev_dbg(devbus->dev, "read parameters register 0x%p = 0x%x\n", |
@@ -193,9 +193,9 @@ static int devbus_set_timing_params(struct devbus *devbus, | |||
193 | writel(value, devbus->base + ARMADA_READ_PARAM_OFFSET); | 193 | writel(value, devbus->base + ARMADA_READ_PARAM_OFFSET); |
194 | 194 | ||
195 | /* Set write timings */ | 195 | /* Set write timings */ |
196 | value = w.sync_enable << ARMADA_SYNC_ENABLE_BIT | | 196 | value = w.sync_enable << ARMADA_SYNC_ENABLE_SHIFT | |
197 | w.wr_low << ARMADA_WR_LOW_BIT | | 197 | w.wr_low << ARMADA_WR_LOW_SHIFT | |
198 | w.wr_high << ARMADA_WR_HIGH_BIT | | 198 | w.wr_high << ARMADA_WR_HIGH_SHIFT | |
199 | w.ale_wr; | 199 | w.ale_wr; |
200 | 200 | ||
201 | dev_dbg(devbus->dev, "write parameters register: 0x%p = 0x%x\n", | 201 | dev_dbg(devbus->dev, "write parameters register: 0x%p = 0x%x\n", |