diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-10 10:21:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-10 10:21:16 -0400 |
commit | f5b8fcb48b9eb1a02f6a3a679da913f6c467527c (patch) | |
tree | 4e67c46f5ebc0acf8c29ce01c711b84352a617f3 /arch/blackfin/kernel | |
parent | a1f0bcccffe508b36f8eb0bd39771d4bedc683a8 (diff) | |
parent | 5ae89ee043ce96e3790e6c75f3807c8e37d98634 (diff) |
Merge tag 'for-linus' of git://github.com/realmz/blackfin-linux
Pull blackfin updates from Steven Miao.
* tag 'for-linus' of git://github.com/realmz/blackfin-linux:
bfin cache: dcplb map: add 16M dcplb map for BF60x
blackfin: smp: fix smp build after drop asm/system.h
blackfin: fix bootup core clock and system clock display
Platform Nand: Set the GPIO for NAND read as input
blackfin: rename vmImage to uImage after we move to buildroot
blackfin: twi: Remove bogus #endif
bf609: rsi: Add bf609 rsi MMR macro and board platform data.
blackfin: dmc: Improve DDR2 write through in DMC effict controller.
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/cplb-nompu/cplbinit.c | 16 | ||||
-rw-r--r-- | arch/blackfin/kernel/cplb-nompu/cplbmgr.c | 27 | ||||
-rw-r--r-- | arch/blackfin/kernel/cplbinfo.c | 9 | ||||
-rw-r--r-- | arch/blackfin/kernel/setup.c | 2 |
4 files changed, 44 insertions, 10 deletions
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index 34e96ce02aa9..b49a53b583d5 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c | |||
@@ -30,6 +30,7 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) | |||
30 | { | 30 | { |
31 | int i_d, i_i; | 31 | int i_d, i_i; |
32 | unsigned long addr; | 32 | unsigned long addr; |
33 | unsigned long cplb_pageflags, cplb_pagesize; | ||
33 | 34 | ||
34 | struct cplb_entry *d_tbl = dcplb_tbl[cpu]; | 35 | struct cplb_entry *d_tbl = dcplb_tbl[cpu]; |
35 | struct cplb_entry *i_tbl = icplb_tbl[cpu]; | 36 | struct cplb_entry *i_tbl = icplb_tbl[cpu]; |
@@ -49,11 +50,20 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) | |||
49 | /* Cover kernel memory with 4M pages. */ | 50 | /* Cover kernel memory with 4M pages. */ |
50 | addr = 0; | 51 | addr = 0; |
51 | 52 | ||
52 | for (; addr < memory_start; addr += 4 * 1024 * 1024) { | 53 | #ifdef PAGE_SIZE_16MB |
54 | cplb_pageflags = PAGE_SIZE_16MB; | ||
55 | cplb_pagesize = SIZE_16M; | ||
56 | #else | ||
57 | cplb_pageflags = PAGE_SIZE_4MB; | ||
58 | cplb_pagesize = SIZE_4M; | ||
59 | #endif | ||
60 | |||
61 | |||
62 | for (; addr < memory_start; addr += cplb_pagesize) { | ||
53 | d_tbl[i_d].addr = addr; | 63 | d_tbl[i_d].addr = addr; |
54 | d_tbl[i_d++].data = SDRAM_DGENERIC | PAGE_SIZE_4MB; | 64 | d_tbl[i_d++].data = SDRAM_DGENERIC | cplb_pageflags; |
55 | i_tbl[i_i].addr = addr; | 65 | i_tbl[i_i].addr = addr; |
56 | i_tbl[i_i++].data = SDRAM_IGENERIC | PAGE_SIZE_4MB; | 66 | i_tbl[i_i++].data = SDRAM_IGENERIC | cplb_pageflags; |
57 | } | 67 | } |
58 | 68 | ||
59 | #ifdef CONFIG_ROMKERNEL | 69 | #ifdef CONFIG_ROMKERNEL |
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbmgr.c b/arch/blackfin/kernel/cplb-nompu/cplbmgr.c index e854f9066cbd..79cc0f6dcdd5 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbmgr.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbmgr.c | |||
@@ -145,7 +145,7 @@ MGR_ATTR static int dcplb_miss(int cpu) | |||
145 | unsigned long addr = bfin_read_DCPLB_FAULT_ADDR(); | 145 | unsigned long addr = bfin_read_DCPLB_FAULT_ADDR(); |
146 | int status = bfin_read_DCPLB_STATUS(); | 146 | int status = bfin_read_DCPLB_STATUS(); |
147 | int idx; | 147 | int idx; |
148 | unsigned long d_data, base, addr1, eaddr; | 148 | unsigned long d_data, base, addr1, eaddr, cplb_pagesize, cplb_pageflags; |
149 | 149 | ||
150 | nr_dcplb_miss[cpu]++; | 150 | nr_dcplb_miss[cpu]++; |
151 | if (unlikely(status & FAULT_USERSUPV)) | 151 | if (unlikely(status & FAULT_USERSUPV)) |
@@ -167,18 +167,37 @@ MGR_ATTR static int dcplb_miss(int cpu) | |||
167 | if (unlikely(d_data == 0)) | 167 | if (unlikely(d_data == 0)) |
168 | return CPLB_NO_ADDR_MATCH; | 168 | return CPLB_NO_ADDR_MATCH; |
169 | 169 | ||
170 | addr1 = addr & ~(SIZE_4M - 1); | ||
171 | addr &= ~(SIZE_1M - 1); | 170 | addr &= ~(SIZE_1M - 1); |
172 | d_data |= PAGE_SIZE_1MB; | 171 | d_data |= PAGE_SIZE_1MB; |
173 | if (addr1 >= base && (addr1 + SIZE_4M) <= eaddr) { | 172 | |
173 | /* BF60x support large than 4M CPLB page size */ | ||
174 | #ifdef PAGE_SIZE_16MB | ||
175 | cplb_pageflags = PAGE_SIZE_16MB; | ||
176 | cplb_pagesize = SIZE_16M; | ||
177 | #else | ||
178 | cplb_pageflags = PAGE_SIZE_4MB; | ||
179 | cplb_pagesize = SIZE_4M; | ||
180 | #endif | ||
181 | |||
182 | find_pagesize: | ||
183 | addr1 = addr & ~(cplb_pagesize - 1); | ||
184 | if (addr1 >= base && (addr1 + cplb_pagesize) <= eaddr) { | ||
174 | /* | 185 | /* |
175 | * This works because | 186 | * This works because |
176 | * (PAGE_SIZE_4MB & PAGE_SIZE_1MB) == PAGE_SIZE_1MB. | 187 | * (PAGE_SIZE_4MB & PAGE_SIZE_1MB) == PAGE_SIZE_1MB. |
177 | */ | 188 | */ |
178 | d_data |= PAGE_SIZE_4MB; | 189 | d_data |= cplb_pageflags; |
179 | addr = addr1; | 190 | addr = addr1; |
191 | goto found_pagesize; | ||
192 | } else { | ||
193 | if (cplb_pagesize > SIZE_4M) { | ||
194 | cplb_pageflags = PAGE_SIZE_4MB; | ||
195 | cplb_pagesize = SIZE_4M; | ||
196 | goto find_pagesize; | ||
197 | } | ||
180 | } | 198 | } |
181 | 199 | ||
200 | found_pagesize: | ||
182 | #ifdef CONFIG_BF60x | 201 | #ifdef CONFIG_BF60x |
183 | if ((addr >= ASYNC_BANK0_BASE) | 202 | if ((addr >= ASYNC_BANK0_BASE) |
184 | && (addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE)) | 203 | && (addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE)) |
diff --git a/arch/blackfin/kernel/cplbinfo.c b/arch/blackfin/kernel/cplbinfo.c index 404045dcc5e4..5b80d59e66e5 100644 --- a/arch/blackfin/kernel/cplbinfo.c +++ b/arch/blackfin/kernel/cplbinfo.c | |||
@@ -17,8 +17,13 @@ | |||
17 | #include <asm/cplbinit.h> | 17 | #include <asm/cplbinit.h> |
18 | #include <asm/blackfin.h> | 18 | #include <asm/blackfin.h> |
19 | 19 | ||
20 | static char const page_strtbl[][3] = { "1K", "4K", "1M", "4M" }; | 20 | static char const page_strtbl[][4] = { |
21 | #define page(flags) (((flags) & 0x30000) >> 16) | 21 | "1K", "4K", "1M", "4M", |
22 | #ifdef CONFIG_BF60x | ||
23 | "16K", "64K", "16M", "64M", | ||
24 | #endif | ||
25 | }; | ||
26 | #define page(flags) (((flags) & 0x70000) >> 16) | ||
22 | #define strpage(flags) page_strtbl[page(flags)] | 27 | #define strpage(flags) page_strtbl[page(flags)] |
23 | 28 | ||
24 | struct cplbinfo_data { | 29 | struct cplbinfo_data { |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index fb96e607adcf..107b306b06f1 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -1314,7 +1314,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1314 | seq_printf(m, "(Compiled for Rev %d)", bfin_compiled_revid()); | 1314 | seq_printf(m, "(Compiled for Rev %d)", bfin_compiled_revid()); |
1315 | } | 1315 | } |
1316 | 1316 | ||
1317 | seq_printf(m, "\ncpu MHz\t\t: %lu.%03lu/%lu.%03lu\n", | 1317 | seq_printf(m, "\ncpu MHz\t\t: %lu.%06lu/%lu.%06lu\n", |
1318 | cclk/1000000, cclk%1000000, | 1318 | cclk/1000000, cclk%1000000, |
1319 | sclk/1000000, sclk%1000000); | 1319 | sclk/1000000, sclk%1000000); |
1320 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | 1320 | seq_printf(m, "bogomips\t: %lu.%02lu\n" |