aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2015-09-28 12:51:20 -0400
committerJoachim Eastwood <manabian@gmail.com>2015-09-29 16:19:02 -0400
commitf6d77beefd159f8c36b28c60d89e1557438a077e (patch)
treece9f4094f410d72c841fa00d4a884d6028ddbe2b
parentb794df56cbb46e031c29922acb24617b72f8f5a7 (diff)
memory: pl172: add ARM PrimeCell PL176 MPMC support
The change adds support of ARM PrimeCell PL176 MPMC. Static memory configuration of PL175 MPMC is very similar to one found on PL172 and PL175 controllers, so it is preferred to add its support into the existing driver. The difference is that PL176 supports up to 10 slave ports (but only 4 of them may be connected to static memory devices), AHB master bus width cab be 64-bit wide, also NAND devices can be interfaced. Similar to PL175 contoller, PL176 has no write buffer enable control in static memory configuration register, the rest of static memory configuration bits (with exception of NAND) is the same. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Joachim Eastwood <manabian@gmail.com>
-rw-r--r--drivers/memory/pl172.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/memory/pl172.c b/drivers/memory/pl172.c
index cb6ebb8e3a80..ff57195b4e37 100644
--- a/drivers/memory/pl172.c
+++ b/drivers/memory/pl172.c
@@ -192,6 +192,7 @@ static int pl172_parse_cs_config(struct amba_device *adev,
192 192
193static const char * const pl172_revisions[] = {"r1", "r2", "r2p3", "r2p4"}; 193static const char * const pl172_revisions[] = {"r1", "r2", "r2p3", "r2p4"};
194static const char * const pl175_revisions[] = {"r1"}; 194static const char * const pl175_revisions[] = {"r1"};
195static const char * const pl176_revisions[] = {"r0"};
195 196
196static int pl172_probe(struct amba_device *adev, const struct amba_id *id) 197static int pl172_probe(struct amba_device *adev, const struct amba_id *id)
197{ 198{
@@ -207,6 +208,9 @@ static int pl172_probe(struct amba_device *adev, const struct amba_id *id)
207 } else if (amba_part(adev) == 0x175) { 208 } else if (amba_part(adev) == 0x175) {
208 if (amba_rev(adev) < ARRAY_SIZE(pl175_revisions)) 209 if (amba_rev(adev) < ARRAY_SIZE(pl175_revisions))
209 rev = pl175_revisions[amba_rev(adev)]; 210 rev = pl175_revisions[amba_rev(adev)];
211 } else if (amba_part(adev) == 0x176) {
212 if (amba_rev(adev) < ARRAY_SIZE(pl176_revisions))
213 rev = pl176_revisions[amba_rev(adev)];
210 } 214 }
211 215
212 dev_info(dev, "ARM PL%x revision %s\n", amba_part(adev), rev); 216 dev_info(dev, "ARM PL%x revision %s\n", amba_part(adev), rev);
@@ -293,6 +297,11 @@ static const struct amba_id pl172_ids[] = {
293 .id = 0x07041175, 297 .id = 0x07041175,
294 .mask = 0x3f0fffff, 298 .mask = 0x3f0fffff,
295 }, 299 },
300 /* PrimeCell MPMC PL176 */
301 {
302 .id = 0x89041176,
303 .mask = 0xff0fffff,
304 },
296 { 0, 0 }, 305 { 0, 0 },
297}; 306};
298MODULE_DEVICE_TABLE(amba, pl172_ids); 307MODULE_DEVICE_TABLE(amba, pl172_ids);