# Base git commit: daf9fe2ee9a203c4fc555cfe5c5f3d9f660e743c # (Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6) # # Author: Russell King (Fri Feb 12 14:32:01 GMT 2010) # Committer: Russell King (Sun Mar 14 19:42:44 GMT 2010) # # Video: ARM CLCD: Better fix for swapped IENB and CNTL registers # # On PL111, as found on Realview and other platforms, these registers are # always arranged as CNTL then IENB. On PL110, these registers are IENB # then CNTL, except on Versatile platforms. # # Re-arrange the handling of these register swaps so that PL111 always # gets it right without resorting to ifdefs, leaving the only case needing # special handling being PL110 on Versatile. # # Fill out amba/clcd.h with the PL110/PL111 register definition # differences in case someone tries to use the PL110 specific definitions # on PL111. # # Signed-off-by: Russell King # # drivers/video/amba-clcd.c | 31 ++++++++++++++++++++++++------- # include/linux/amba/clcd.h | 33 +++++++++++++++++---------------- # 2 files changed, 41 insertions(+), 23 deletions(-) # # Author: Russell King (Fri Feb 12 14:36:24 GMT 2010) # Committer: Russell King (Sun Mar 14 19:42:35 GMT 2010) # # ARM: Add L2 cache handling to smp boot support # # The page table and secondary data which we're asking the secondary CPU # to make use of has to hit RAM to ensure that the secondary CPU can see # it since it may not be taking part in coherency or cache searches at # this point. # # Acked-by: Santosh Shilimkar # Signed-off-by: Russell King # # arch/arm/kernel/smp.c | 4 +++- # 1 files changed, 3 insertions(+), 1 deletions(-) # # Author: Will Deacon (Fri Feb 26 09:46:15 GMT 2010) # Committer: Russell King (Sat Mar 13 10:50:29 GMT 2010) # # ARM: 5960/1: ARM: perf-events: fix v7 event selection mask # # The event selection mask for ARMv7 cores [ARMV7_EVTSEL_MASK] # is incorrectly set to 0x7f. This means that the top bit of an # event ID is ignored, so counting branch misses (id=0x10) and # ISBs (id=0x90) give the same results. # # This patch sets the event selection mask to the correct value # of 0xff. # # Signed-off-by: Jean Pihet # Signed-off-by: Will Deacon # Signed-off-by: Russell King # # arch/arm/kernel/perf_event.c | 2 +- # 1 files changed, 1 insertions(+), 1 deletions(-) # # Author: Will Deacon (Thu Feb 25 14:04:14 GMT 2010) # Committer: Russell King (Sat Mar 13 10:50:28 GMT 2010) # # ARM: 5959/1: ARM: perf-events: request PMU interrupts with IRQF_NOBALANCING # # If IRQ balancing is used on a multicore ARM system, PMU interrupt # lines may be relocated onto CPUs other than the one causing the # counter overflow. This can result in misattribution of events to # the wrong core and, in the case that the CPU handling the interrupt # has not experience counter overflow, the interrupt can be disabled # because the handler returns IRQ_NONE. # # This patch adds the IRQF_NOBALANCING flag to the request_irq call # in perf_events.c. # # Acked-by: Jamie Iles # Signed-off-by: Will Deacon # Signed-off-by: Russell King # # arch/arm/kernel/perf_event.c | 3 ++- # 1 files changed, 2 insertions(+), 1 deletions(-) # # Author: Greg Ungerer (Fri Mar 12 05:19:25 GMT 2010) # Committer: Russell King (Sat Mar 13 10:48:22 GMT 2010) # # ARM: 5988/1: pgprot_dmacoherent() for non-mmu builds # # Commit 26a26d329688ab018e068b412b03d43d7c299f0a ("dma-mapping: switch # ARMv7 DMA mappings to retain 'memory' attribute") added a new macro, # pgprot_dmacoherent(), to correctly map DMA memory. The non-mmu pgtable # support code also needs to implement this macro, otherwise when # compiling you get: # # CC arch/arm/mm/dma-mapping.o # arch/arm/mm/dma-mapping.c: In function 'dma_alloc_coherent': # arch/arm/mm/dma-mapping.c:320: error: implicit declaration of function 'pgprot_dmacoherent' # arch/arm/mm/dma-mapping.c:320: error: 'pgprot_kernel' undeclared (first use in this function) # arch/arm/mm/dma-mapping.c:320: error: (Each undeclared identifier is reported only once # arch/arm/mm/dma-mapping.c:320: error: for each function it appears in.) # # Signed-off-by: Greg Ungerer # Signed-off-by: Russell King # # arch/arm/include/asm/pgtable-nommu.h | 1 + # 1 files changed, 1 insertions(+), 0 deletions(-) # # Author: Mikael Pettersson (Thu Mar 11 11:28:31 GMT 2010) # Committer: Russell King (Sat Mar 13 10:48:22 GMT 2010) # # ARM: 5987/1: fix warning in kernel/elfcore.c from ARM's elf.h # # 2.6.34-rc1 added kernel/elfcore.c which includes . # On ARM, this results in: # # In file included from include/linux/elf.h:7, # from kernel/elfcore.c:1: # /tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: 'struct task_struct' declared inside parameter list # /tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: its scope is only this definition or declaration, which is probably not what you want # # Including seems a bit heavyweight, so this patch just # adds a tentative declaration of struct task_struct in . # # Signed-off-by: Mikael Pettersson # Signed-off-by: Russell King # # arch/arm/include/asm/elf.h | 1 + # 1 files changed, 1 insertions(+), 0 deletions(-) # # Author: Rob Alley (Thu Mar 11 01:15:04 GMT 2010) # Committer: Russell King (Sat Mar 13 10:48:21 GMT 2010) # # ARM: 5986/1: at91sam9g20-ek: Correct braces in I2C registration code # # The change introduced in patch 5596/1 used incorrect bracing which # resulted in the AT24 EEPROM no longer being registered. This patch # corrects the bracing and allows both the WM8731 audio device and AT24 # EEPROM device to be registered. # # Signed-off-by: Rob Alley # Signed-off-by: Russell King # # arch/arm/mach-at91/board-sam9g20ek.c | 10 ++++++---- # 1 files changed, 6 insertions(+), 4 deletions(-) # # Author: Mark Brown (Wed Mar 10 18:10:28 GMT 2010) # Committer: Russell King (Sat Mar 13 10:48:21 GMT 2010) # # ARM: 5985/2: ARM: Fix Samsung build after "ARM: Eliminate decompressor -Dstatic= PIC hack" # # Commit 5de813b6 (ARM: Eliminate decompressor -Dstatic= PIC hack) among # other things changed the declared type of the error() function to an # extern, conflicting with the forward declartion in the Samsung # plat/uncompress.h which appears to have been relying on the static # being defined away, causing build failures since error() ends up with # a GOT relocation but the linker script discards all GOT relocated # data and functions: # # arch/arm/boot/compressed/decompress.o: In function `gunzip': # /home/broonie/git/linux-2.6/arch/arm/boot/compressed/../../../../lib/decompress_ # +inflate.c:68: undefined reference to `error' # # and so on. Fix this by moving the declaration into uncompress/misc.c # where it is shared with the rest of the code, correcting the definition # as we go. # # Signed-off-by: Mark Brown # Signed-off-by: Russell King # # arch/arm/boot/compressed/misc.c | 1 + # arch/arm/plat-samsung/include/plat/uncompress.h | 2 -- # 2 files changed, 1 insertions(+), 2 deletions(-) # diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index d32bc71..d2b2ef4 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -33,6 +33,7 @@ unsigned int __machine_arch_type; #else static void putstr(const char *ptr); +extern void error(char *x); #include diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index a399bb5..bff0564 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h @@ -98,6 +98,7 @@ extern int elf_check_arch(const struct elf32_hdr *); extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int); #define elf_read_implies_exec(ex,stk) arm_elf_read_implies_exec(&(ex), stk) +struct task_struct; int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); #define ELF_CORE_COPY_TASK_REGS dump_task_regs diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h index 013cfcd..ffc0e85 100644 --- a/arch/arm/include/asm/pgtable-nommu.h +++ b/arch/arm/include/asm/pgtable-nommu.h @@ -67,6 +67,7 @@ static inline int pte_file(pte_t pte) { return 0; } */ #define pgprot_noncached(prot) __pgprot(0) #define pgprot_writecombine(prot) __pgprot(0) +#define pgprot_dmacoherent(prot) __pgprot(0) /* diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index c54ceb3..c45a155 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -332,7 +332,8 @@ armpmu_reserve_hardware(void) for (i = 0; i < pmu_irqs->num_irqs; ++i) { err = request_irq(pmu_irqs->irqs[i], armpmu->handle_irq, - IRQF_DISABLED, "armpmu", NULL); + IRQF_DISABLED | IRQF_NOBALANCING, + "armpmu", NULL); if (err) { pr_warning("unable to request IRQ%d for ARM " "perf counters\n", pmu_irqs->irqs[i]); @@ -1624,7 +1625,7 @@ enum armv7_counters { /* * EVTSEL: Event selection reg */ -#define ARMV7_EVTSEL_MASK 0x7f /* Mask for writable bits */ +#define ARMV7_EVTSEL_MASK 0xff /* Mask for writable bits */ /* * SELECT: Counter selection reg diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 57162af..577543f 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -99,6 +99,7 @@ int __cpuinit __cpu_up(unsigned int cpu) *pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) | PMD_TYPE_SECT | PMD_SECT_AP_WRITE); flush_pmd_entry(pmd); + outer_clean_range(__pa(pmd), __pa(pmd + 1)); /* * We need to tell the secondary core where to find @@ -106,7 +107,8 @@ int __cpuinit __cpu_up(unsigned int cpu) */ secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; secondary_data.pgdir = virt_to_phys(pgd); - wmb(); + __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); + outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); /* * Now bring the CPU into our world. diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 29cf831..c11fd47 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c @@ -271,10 +271,12 @@ static void __init ek_add_device_buttons(void) {} static struct i2c_board_info __initdata ek_i2c_devices[] = { - { - I2C_BOARD_INFO("24c512", 0x50), - I2C_BOARD_INFO("wm8731", 0x1b), - }, + { + I2C_BOARD_INFO("24c512", 0x50) + }, + { + I2C_BOARD_INFO("wm8731", 0x1b) + }, }; diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h index e87ce8f..7d6ed72 100644 --- a/arch/arm/plat-samsung/include/plat/uncompress.h +++ b/arch/arm/plat-samsung/include/plat/uncompress.h @@ -140,8 +140,6 @@ static void arch_decomp_error(const char *x) #define arch_error arch_decomp_error #endif -static void error(char *err); - #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO static inline void arch_enable_uart_fifo(void) { diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index a21efcd..afe21e6 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -65,16 +65,16 @@ static void clcdfb_disable(struct clcd_fb *fb) if (fb->board->disable) fb->board->disable(fb); - val = readl(fb->regs + CLCD_CNTL); + val = readl(fb->regs + fb->off_cntl); if (val & CNTL_LCDPWR) { val &= ~CNTL_LCDPWR; - writel(val, fb->regs + CLCD_CNTL); + writel(val, fb->regs + fb->off_cntl); clcdfb_sleep(20); } if (val & CNTL_LCDEN) { val &= ~CNTL_LCDEN; - writel(val, fb->regs + CLCD_CNTL); + writel(val, fb->regs + fb->off_cntl); } /* @@ -94,7 +94,7 @@ static void clcdfb_enable(struct clcd_fb *fb, u32 cntl) * Bring up by first enabling.. */ cntl |= CNTL_LCDEN; - writel(cntl, fb->regs + CLCD_CNTL); + writel(cntl, fb->regs + fb->off_cntl); clcdfb_sleep(20); @@ -102,7 +102,7 @@ static void clcdfb_enable(struct clcd_fb *fb, u32 cntl) * and now apply power. */ cntl |= CNTL_LCDPWR; - writel(cntl, fb->regs + CLCD_CNTL); + writel(cntl, fb->regs + fb->off_cntl); /* * finally, enable the interface. @@ -233,7 +233,7 @@ static int clcdfb_set_par(struct fb_info *info) readl(fb->regs + CLCD_TIM0), readl(fb->regs + CLCD_TIM1), readl(fb->regs + CLCD_TIM2), readl(fb->regs + CLCD_TIM3), readl(fb->regs + CLCD_UBAS), readl(fb->regs + CLCD_LBAS), - readl(fb->regs + CLCD_IENB), readl(fb->regs + CLCD_CNTL)); + readl(fb->regs + fb->off_ienb), readl(fb->regs + fb->off_cntl)); #endif return 0; @@ -345,6 +345,23 @@ static int clcdfb_register(struct clcd_fb *fb) { int ret; + /* + * ARM PL111 always has IENB at 0x1c; it's only PL110 + * which is reversed on some platforms. + */ + if (amba_manf(fb->dev) == 0x41 && amba_part(fb->dev) == 0x111) { + fb->off_ienb = CLCD_PL111_IENB; + fb->off_cntl = CLCD_PL111_CNTL; + } else { +#ifdef CONFIG_ARCH_VERSATILE + fb->off_ienb = CLCD_PL111_IENB; + fb->off_cntl = CLCD_PL111_CNTL; +#else + fb->off_ienb = CLCD_PL110_IENB; + fb->off_cntl = CLCD_PL110_CNTL; +#endif + } + fb->clk = clk_get(&fb->dev->dev, NULL); if (IS_ERR(fb->clk)) { ret = PTR_ERR(fb->clk); @@ -416,7 +433,7 @@ static int clcdfb_register(struct clcd_fb *fb) /* * Ensure interrupts are disabled. */ - writel(0, fb->regs + CLCD_IENB); + writel(0, fb->regs + fb->off_ienb); fb_set_var(&fb->fb, &fb->fb.var); diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 29c0448..ca16c38 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h @@ -21,22 +21,21 @@ #define CLCD_UBAS 0x00000010 #define CLCD_LBAS 0x00000014 -#if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) -#define CLCD_IENB 0x00000018 -#define CLCD_CNTL 0x0000001c -#else -/* - * Someone rearranged these two registers on the Versatile - * platform... - */ -#define CLCD_IENB 0x0000001c -#define CLCD_CNTL 0x00000018 -#endif - -#define CLCD_STAT 0x00000020 -#define CLCD_INTR 0x00000024 -#define CLCD_UCUR 0x00000028 -#define CLCD_LCUR 0x0000002C +#define CLCD_PL110_IENB 0x00000018 +#define CLCD_PL110_CNTL 0x0000001c +#define CLCD_PL110_STAT 0x00000020 +#define CLCD_PL110_INTR 0x00000024 +#define CLCD_PL110_UCUR 0x00000028 +#define CLCD_PL110_LCUR 0x0000002C + +#define CLCD_PL111_CNTL 0x00000018 +#define CLCD_PL111_IENB 0x0000001c +#define CLCD_PL111_RIS 0x00000020 +#define CLCD_PL111_MIS 0x00000024 +#define CLCD_PL111_ICR 0x00000028 +#define CLCD_PL111_UCUR 0x0000002c +#define CLCD_PL111_LCUR 0x00000030 + #define CLCD_PALL 0x00000200 #define CLCD_PALETTE 0x00000200 @@ -147,6 +146,8 @@ struct clcd_fb { struct clcd_board *board; void *board_data; void __iomem *regs; + u16 off_ienb; + u16 off_cntl; u32 clcd_cntl; u32 cmap[16]; };