aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-22 17:26:09 -0400
committerJason Cooper <jason@lakedaemon.net>2014-04-29 09:16:27 -0400
commit71e2e5d39770325c6acccedbe4629cad4336f6d4 (patch)
tree5ef7c24225995785dd64c111bf797787fc03b4f1 /drivers/memory
parent1cc9d48145b81e307fab94a5cf6ee66ec2f0de60 (diff)
memory: mvebu-devbus: use ARMADA_ prefix in defines
The mvebu-devbus driver currently only supports the Armada 370/XP family, but it can also cover the Orion5x family. However, the Orion5x family has a different organization of the register. Therefore, in preparation to the introduction of Orion5x support, we rename the Armada 370/XP specific definitions to have an ARMADA_ prefix. 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-6-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.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c
index b59a17fb7c3e..e66de7f3c33c 100644
--- a/drivers/memory/mvebu-devbus.c
+++ b/drivers/memory/mvebu-devbus.c
@@ -30,19 +30,19 @@
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31 31
32/* Register definitions */ 32/* Register definitions */
33#define DEV_WIDTH_BIT 30 33#define ARMADA_DEV_WIDTH_BIT 30
34#define BADR_SKEW_BIT 28 34#define ARMADA_BADR_SKEW_BIT 28
35#define RD_HOLD_BIT 23 35#define ARMADA_RD_HOLD_BIT 23
36#define ACC_NEXT_BIT 17 36#define ARMADA_ACC_NEXT_BIT 17
37#define RD_SETUP_BIT 12 37#define ARMADA_RD_SETUP_BIT 12
38#define ACC_FIRST_BIT 6 38#define ARMADA_ACC_FIRST_BIT 6
39 39
40#define SYNC_ENABLE_BIT 24 40#define ARMADA_SYNC_ENABLE_BIT 24
41#define WR_HIGH_BIT 16 41#define ARMADA_WR_HIGH_BIT 16
42#define WR_LOW_BIT 8 42#define ARMADA_WR_LOW_BIT 8
43 43
44#define READ_PARAM_OFFSET 0x0 44#define ARMADA_READ_PARAM_OFFSET 0x0
45#define WRITE_PARAM_OFFSET 0x4 45#define ARMADA_WRITE_PARAM_OFFSET 0x4
46 46
47struct devbus_read_params { 47struct devbus_read_params {
48 u32 bus_width; 48 u32 bus_width;
@@ -178,31 +178,31 @@ 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 << DEV_WIDTH_BIT | 181 value = r.bus_width << ARMADA_DEV_WIDTH_BIT |
182 r.badr_skew << BADR_SKEW_BIT | 182 r.badr_skew << ARMADA_BADR_SKEW_BIT |
183 r.rd_hold << RD_HOLD_BIT | 183 r.rd_hold << ARMADA_RD_HOLD_BIT |
184 r.acc_next << ACC_NEXT_BIT | 184 r.acc_next << ARMADA_ACC_NEXT_BIT |
185 r.rd_setup << RD_SETUP_BIT | 185 r.rd_setup << ARMADA_RD_SETUP_BIT |
186 r.acc_first << ACC_FIRST_BIT | 186 r.acc_first << ARMADA_ACC_FIRST_BIT |
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",
190 devbus->base + READ_PARAM_OFFSET, 190 devbus->base + ARMADA_READ_PARAM_OFFSET,
191 value); 191 value);
192 192
193 writel(value, devbus->base + 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 << SYNC_ENABLE_BIT | 196 value = w.sync_enable << ARMADA_SYNC_ENABLE_BIT |
197 w.wr_low << WR_LOW_BIT | 197 w.wr_low << ARMADA_WR_LOW_BIT |
198 w.wr_high << WR_HIGH_BIT | 198 w.wr_high << ARMADA_WR_HIGH_BIT |
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",
202 devbus->base + WRITE_PARAM_OFFSET, 202 devbus->base + ARMADA_WRITE_PARAM_OFFSET,
203 value); 203 value);
204 204
205 writel(value, devbus->base + WRITE_PARAM_OFFSET); 205 writel(value, devbus->base + ARMADA_WRITE_PARAM_OFFSET);
206 206
207 return 0; 207 return 0;
208} 208}