/* * Blackfin CPLB initialization * * Copyright 2007-2009 Analog Devices Inc. * * Licensed under the GPL-2 or later. */ #include <linux/module.h> #include <asm/blackfin.h> #include <asm/cacheflush.h> #include <asm/cplb.h> #include <asm/cplbinit.h> #include <asm/mem_map.h> struct cplb_entry icplb_tbl[NR_CPUS][MAX_CPLBS] PDT_ATTR; struct cplb_entry dcplb_tbl[NR_CPUS][MAX_CPLBS] PDT_ATTR; int first_switched_icplb PDT_ATTR; int first_switched_dcplb PDT_ATTR; struct cplb_boundary dcplb_bounds[9] PDT_ATTR; struct cplb_boundary icplb_bounds[9] PDT_ATTR; int icplb_nr_bounds PDT_ATTR; int dcplb_nr_bounds PDT_ATTR;
void __init generate_cplb_tables_cpu(unsigned int cpu) { int i_d, i_i; unsigned long addr; unsigned long cplb_pageflags, cplb_pagesize; struct cplb_entry *d_tbl = dcplb_tbl[cpu]; struct cplb_entry *i_tbl = icplb_tbl[cpu]; printk(KERN_INFO "NOMPU: setting up cplb tables\n"); i_d = i_i = 0; #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO /* Set up the zero page. */ d_tbl[i_d].addr = 0; d_tbl[i_d++].data = SDRAM_OOPS | PAGE_SIZE_1KB; i_tbl[i_i].addr = 0; i_tbl[i_i++].data = SDRAM_OOPS | PAGE_SIZE_1KB; #endif /* Cover kernel memory with 4M pages. */ addr = 0; #ifdef PAGE_SIZE_16MB cplb_pageflags = PAGE_SIZE_16MB; cplb_pagesize = SIZE_16M; #else cplb_pageflags = PAGE_SIZE_4MB; cplb_pagesize = SIZE_4M; #endif for (; addr < memory_start; addr += cplb_pagesize) { d_tbl[i_d].addr = addr; d_tbl[i_d++].data = SDRAM_DGENERIC | cplb_pageflags; i_tbl[i_i].addr = addr; i_tbl[i_i++].data = SDRAM_IGENERIC | cplb_pageflags; } #ifdef CONFIG_ROMKERNEL /* Cover kernel XIP flash area */ #ifdef CONFIG_BF60x addr = CONFIG_ROM_BASE & ~(16 * 1024 * 1024 - 1); d_tbl[i_d].addr = addr; d_tbl[i_d++].data = SDRAM_DGENERIC | PAGE_SIZE_16MB; i_tbl[i_i].addr = addr; i_tbl[i_i++].data = SDRAM_IGENERIC | PAGE_SIZE_16MB; #else addr = CONFIG_ROM_BASE & ~(4 * 1024 * 1024 - 1); d_tbl[i_d].addr = addr; d_tbl[i_d++].data = SDRAM_DGENERIC | PAGE_SIZE_4MB; i_tbl[i_i].addr = addr; i_tbl[i_i++].data = SDRAM_IGENERIC | PAGE_SIZE_4MB; #endif #endif /* Cover L1 memory. One 4M area for code and data each is enough. */ if (cpu == 0) { if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { d_tbl[i_d].addr = L1_DATA_A_START; d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; } i_tbl[i_i].addr = L1_CODE_START; i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; } #ifdef CONFIG_SMP else { if (L1_DATA_A_LENGTH || L1_DATA_B_LENGTH) { d_tbl[i_d].addr = COREB_L1_DATA_A_START; d_tbl[i_d++].data = L1_DMEMORY | PAGE_SIZE_4MB; } i_tbl[i_i].addr = COREB_L1_CODE_START; i_tbl[i_i++].data = L1_IMEMORY | PAGE_SIZE_4MB; } #endif first_switched_dcplb = i_d; first_switched_icplb = i_i; BUG_ON(first_switched_dcplb > MAX_CPLBS); BUG_ON(first_switched_icplb > MAX_CPLBS); while (i_d < MAX_CPLBS) d_tbl[i_d++].data = 0; while (i_i < MAX_CPLBS) i_tbl[i_i++].data = 0; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Bernd Schmidt | 261 | 53.70% | 3 | 42.86% |
Graf Yang | 66 | 13.58% | 1 | 14.29% |
Bob Liu | 64 | 13.17% | 1 | 14.29% |
Barry Song | 63 | 12.96% | 1 | 14.29% |
Steven Miao | 32 | 6.58% | 1 | 14.29% |
Total | 486 | 100.00% | 7 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Bernd Schmidt | 462 | 84.62% | 3 | 33.33% |
Barry Song | 61 | 11.17% | 1 | 11.11% |
Mike Frysinger | 18 | 3.30% | 2 | 22.22% |
Bob Liu | 2 | 0.37% | 1 | 11.11% |
Sonic Zhang | 2 | 0.37% | 1 | 11.11% |
Graf Yang | 1 | 0.18% | 1 | 11.11% |
Total | 546 | 100.00% | 9 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Bernd Schmidt | 774 | 70.05% | 4 | 21.05% |
Barry Song | 124 | 11.22% | 2 | 10.53% |
Graf Yang | 76 | 6.88% | 3 | 15.79% |
Bob Liu | 66 | 5.97% | 2 | 10.53% |
Steven Miao | 32 | 2.90% | 1 | 5.26% |
Mike Frysinger | 27 | 2.44% | 4 | 21.05% |
Robin Getz | 4 | 0.36% | 2 | 10.53% |
Sonic Zhang | 2 | 0.18% | 1 | 5.26% |
Total | 1105 | 100.00% | 19 | 100.00% |