aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mm
diff options
context:
space:
mode:
authorRobin Getz <robin.getz@analog.com>2009-08-27 10:39:31 -0400
committerMike Frysinger <vapier@gentoo.org>2009-09-16 22:10:38 -0400
commit774b80229fcb9df22aadec8fc5b143a842135535 (patch)
treebf0615234a851a1840c9d2865198bcbba900ae81 /arch/blackfin/mm
parentba877d4491a06ae69d53981bc242ef97a8157026 (diff)
Blackfin: fix typo in isram_write()
The DTEST write bit is 2, not 1. Improve comments in the related macro while we're here. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mm')
-rw-r--r--arch/blackfin/mm/isram-driver.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c
index 02eaaa641d49..beb1a608824c 100644
--- a/arch/blackfin/mm/isram-driver.c
+++ b/arch/blackfin/mm/isram-driver.c
@@ -53,10 +53,12 @@ static DEFINE_SPINLOCK(dtest_lock);
53#define IADDR2DTEST(x) \ 53#define IADDR2DTEST(x) \
54 ({ unsigned long __addr = (unsigned long)(x); \ 54 ({ unsigned long __addr = (unsigned long)(x); \
55 (__addr & 0x47F8) | /* address bits 14 & 10:3 */ \ 55 (__addr & 0x47F8) | /* address bits 14 & 10:3 */ \
56 (__addr & 0x8000) << 23 | /* Bank A/B */ \
56 (__addr & 0x0800) << 15 | /* address bit 11 */ \ 57 (__addr & 0x0800) << 15 | /* address bit 11 */ \
57 (__addr & 0x3000) << 4 | /* address bits 13:12 */ \ 58 (__addr & 0x3000) << 4 | /* address bits 13:12 */ \
58 (__addr & 0x8000) << 8 | /* address bit 15 */ \ 59 (__addr & 0x8000) << 8 | /* address bit 15 */ \
59 (0x1000004); /* isram access */ \ 60 (0x1000000) | /* instruction access = 1 */ \
61 (0x4); /* data array = 1 */ \
60 }) 62 })
61 63
62/* Takes a pointer, and returns the offset (in bits) which things should be shifted */ 64/* Takes a pointer, and returns the offset (in bits) which things should be shifted */
@@ -73,7 +75,7 @@ static void isram_write(const void *addr, uint64_t data)
73 if (addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH)) 75 if (addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH))
74 return; 76 return;
75 77
76 cmd = IADDR2DTEST(addr) | 1; /* write */ 78 cmd = IADDR2DTEST(addr) | 2; /* write */
77 79
78 /* 80 /*
79 * Writes to DTEST_DATA[0:1] need to be atomic with write to DTEST_COMMAND 81 * Writes to DTEST_DATA[0:1] need to be atomic with write to DTEST_COMMAND