diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 21:47:53 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 21:47:53 +0200 |
commit | 8e95a53ba4b060e2d0d46575059ae96ea91a80fd (patch) | |
tree | c5e2cacf18475cb3f3b8fdfaa6223d24c37849e1 /arch/blackfin/mm | |
parent | Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming (diff) | |
parent | blackfin: fix build after add bf60x mach/pm.h (diff) | |
download | linux-8e95a53ba4b060e2d0d46575059ae96ea91a80fd.tar.xz linux-8e95a53ba4b060e2d0d46575059ae96ea91a80fd.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin
Pull blackfin changes from Bob Liu:
"The biggest change was added an new processor(bf60x series).
Bf60x series processor of blackfin can up to 1GHz with Hardware
Support for HD Video Analytics, it use the same blackfin ISA but with
some changes on system buses, interrupt controller and peripheral
devices.
Added dir arch/blackfin/mach-bf609/ and did some changes to the
framework made linux working fine on the reference board bf609-ezkit
now."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin: (41 commits)
blackfin: fix build after add bf60x mach/pm.h
blackfin: twi: include linux/i2c.h
blackfin: bf60x: add head file for crc controller
blackfin: bf60x: twi: work around temporary anomaly 0501001
blackfin: twi: Move TWI MMR access macro to twi head file
blackfin: twi: Move TWI peripheral pin request array to platform data
blackfin: bf60x: anomaly: Add a temporary anomaly 0501001
blackfin: bf60x: Rename the DDR controller macro
blackfin: mach-bf609: pm: cleanup bfin_deepsleep
blackfin: bf60x: cleanup get clock code
blackfin: bf60x: pm: Add a debug option to calculate kernel wakeup time.
blackfin: bf60x: add wakeup source select
blackfin: bf60x: make clock changeable in kernel menuconfig
blackfin:mach-bf609: fix norflash for bf609-ezkit
blackfin: mach-bf609: add can_wakeup to ethernet device
blackfin: remove redundant CONFIG_BF60x macro
blackfin: rotary: Add pm_wakeup flag to platform data structure.
bfin_gpio: fix bf548-ezkit kernel fail to boot
bfin_dma: fix initcall return error in proc_dma_init()
Blackfin: delete fork func
...
Diffstat (limited to 'arch/blackfin/mm')
-rw-r--r-- | arch/blackfin/mm/init.c | 14 | ||||
-rw-r--r-- | arch/blackfin/mm/sram-alloc.c | 36 |
2 files changed, 42 insertions, 8 deletions
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index 78daae084915..9cb85537bd2b 100644 --- a/arch/blackfin/mm/init.c +++ b/arch/blackfin/mm/init.c @@ -48,7 +48,7 @@ void __init paging_init(void) unsigned long zones_size[MAX_NR_ZONES] = { [0] = 0, - [ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT, + [ZONE_DMA] = (end_mem - CONFIG_PHY_RAM_BASE_ADDRESS) >> PAGE_SHIFT, [ZONE_NORMAL] = 0, #ifdef CONFIG_HIGHMEM [ZONE_HIGHMEM] = 0, @@ -60,7 +60,8 @@ void __init paging_init(void) pr_debug("free_area_init -> start_mem is %#lx virtual_end is %#lx\n", PAGE_ALIGN(memory_start), end_mem); - free_area_init(zones_size); + free_area_init_node(0, zones_size, + CONFIG_PHY_RAM_BASE_ADDRESS >> PAGE_SHIFT, NULL); } asmlinkage void __init init_pda(void) @@ -75,9 +76,6 @@ asmlinkage void __init init_pda(void) valid pointers to it. */ memset(&cpu_pda[cpu], 0, sizeof(cpu_pda[cpu])); - cpu_pda[0].next = &cpu_pda[1]; - cpu_pda[1].next = &cpu_pda[0]; - #ifdef CONFIG_EXCEPTION_L1_SCRATCH cpu_pda[cpu].ex_stack = (unsigned long *)(L1_SCRATCH_START + \ L1_SCRATCH_LENGTH); @@ -109,10 +107,10 @@ void __init mem_init(void) totalram_pages = free_all_bootmem(); reservedpages = 0; - for (tmp = 0; tmp < max_mapnr; tmp++) + for (tmp = ARCH_PFN_OFFSET; tmp < max_mapnr; tmp++) if (PageReserved(pfn_to_page(tmp))) reservedpages++; - freepages = max_mapnr - reservedpages; + freepages = max_mapnr - ARCH_PFN_OFFSET - reservedpages; /* do not count in kernel image between _rambase and _ramstart */ reservedpages -= (_ramstart - _rambase) >> PAGE_SHIFT; @@ -127,7 +125,7 @@ void __init mem_init(void) printk(KERN_INFO "Memory available: %luk/%luk RAM, " "(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n", - (unsigned long) freepages << (PAGE_SHIFT-10), _ramend >> 10, + (unsigned long) freepages << (PAGE_SHIFT-10), (_ramend - CONFIG_PHY_RAM_BASE_ADDRESS) >> 10, initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10))); } diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c index 29d98faa1efd..342e378da1ec 100644 --- a/arch/blackfin/mm/sram-alloc.c +++ b/arch/blackfin/mm/sram-alloc.c @@ -186,9 +186,45 @@ static void __init l1_inst_sram_init(void) #endif } +#ifdef __ADSPBF60x__ +static irqreturn_t l2_ecc_err(int irq, void *dev_id) +{ + int status; + + printk(KERN_ERR "L2 ecc error happend\n"); + status = bfin_read32(L2CTL0_STAT); + if (status & 0x1) + printk(KERN_ERR "Core channel error type:0x%x, addr:0x%x\n", + bfin_read32(L2CTL0_ET0), bfin_read32(L2CTL0_EADDR0)); + if (status & 0x2) + printk(KERN_ERR "System channel error type:0x%x, addr:0x%x\n", + bfin_read32(L2CTL0_ET1), bfin_read32(L2CTL0_EADDR1)); + + status = status >> 8; + if (status) + printk(KERN_ERR "L2 Bank%d error, addr:0x%x\n", + status, bfin_read32(L2CTL0_ERRADDR0 + status)); + + panic("L2 Ecc error"); + return IRQ_HANDLED; +} +#endif + static void __init l2_sram_init(void) { #if L2_LENGTH != 0 + +#ifdef __ADSPBF60x__ + int ret; + + ret = request_irq(IRQ_L2CTL0_ECC_ERR, l2_ecc_err, 0, "l2-ecc-err", + NULL); + if (unlikely(ret < 0)) { + printk(KERN_INFO "Fail to request l2 ecc error interrupt"); + return; + } +#endif + free_l2_sram_head.next = kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); if (!free_l2_sram_head.next) { |