]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'omap3-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 15 Dec 2008 22:13:26 +0000 (22:13 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 15 Dec 2008 22:13:26 +0000 (22:13 +0000)
1  2 
arch/arm/include/asm/processor.h
arch/arm/mm/alignment.c
arch/arm/plat-omap/dma.c
drivers/ide/Kconfig
drivers/mtd/nand/pxa3xx_nand.c

index 2320508443a50ea79d512fa74f584b504174417d,6ff33790f47b16d91054c4907edb09616a21f5d8..1845892260e762fad61c6f093529bdd5ab7a920f
@@@ -23,7 -23,7 +23,7 @@@
  #include <asm/types.h>
  
  #ifdef __KERNEL__
- #define STACK_TOP     ((current->personality == PER_LINUX_32BIT) ? \
+ #define STACK_TOP     ((current->personality & ADDR_LIMIT_32BIT) ? \
                         TASK_SIZE : TASK_SIZE_26)
  #define STACK_TOP_MAX TASK_SIZE
  #endif
@@@ -64,7 -64,7 +64,7 @@@ struct thread_struct 
  ({                                                                    \
        unsigned long *stack = (unsigned long *)sp;                     \
        set_fs(USER_DS);                                                \
 -      memzero(regs->uregs, sizeof(regs->uregs));                      \
 +      memset(regs->uregs, 0, sizeof(regs->uregs));                    \
        if (current->personality & ADDR_LIMIT_32BIT)                    \
                regs->ARM_cpsr = USR_MODE;                              \
        else                                                            \
diff --combined arch/arm/mm/alignment.c
index c5a57fbf095d8ab1d11b8c54b60eb2f99ad50255,2d5884ce0435fb436a57bee6d314284b9101e87e..3a398befed41422cb7f130e5667cd632104235eb
@@@ -17,7 -17,6 +17,7 @@@
  #include <linux/string.h>
  #include <linux/proc_fs.h>
  #include <linux/init.h>
 +#include <linux/sched.h>
  #include <linux/uaccess.h>
  
  #include <asm/unaligned.h>
@@@ -71,6 -70,10 +71,10 @@@ static unsigned long ai_dword
  static unsigned long ai_multi;
  static int ai_usermode;
  
+ #define UM_WARN               (1 << 0)
+ #define UM_FIXUP      (1 << 1)
+ #define UM_SIGNAL     (1 << 2)
  #ifdef CONFIG_PROC_FS
  static const char *usermode_action[] = {
        "ignored",
@@@ -755,7 -758,7 +759,7 @@@ do_alignment(unsigned long addr, unsign
   user:
        ai_user += 1;
  
-       if (ai_usermode & 1)
+       if (ai_usermode & UM_WARN)
                printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx "
                       "Address=0x%08lx FSR 0x%03x\n", current->comm,
                        task_pid_nr(current), instrptr,
                        thumb_mode(regs) ? tinstr : instr,
                        addr, fsr);
  
-       if (ai_usermode & 2)
+       if (ai_usermode & UM_FIXUP)
                goto fixup;
  
-       if (ai_usermode & 4)
+       if (ai_usermode & UM_SIGNAL)
                force_sig(SIGBUS, current);
        else
                set_cr(cr_no_alignment);
@@@ -797,6 -800,22 +801,22 @@@ static int __init alignment_init(void
        res->write_proc = proc_alignment_write;
  #endif
  
+       /*
+        * ARMv6 and later CPUs can perform unaligned accesses for
+        * most single load and store instructions up to word size.
+        * LDM, STM, LDRD and STRD still need to be handled.
+        *
+        * Ignoring the alignment fault is not an option on these
+        * CPUs since we spin re-faulting the instruction without
+        * making any progress.
+        */
+       if (cpu_architecture() >= CPU_ARCH_ARMv6 && (cr_alignment & CR_U)) {
+               cr_alignment &= ~CR_A;
+               cr_no_alignment &= ~CR_A;
+               set_cr(cr_alignment);
+               ai_usermode = UM_FIXUP;
+       }
        hook_fault_code(1, do_alignment, SIGILL, "alignment exception");
        hook_fault_code(3, do_alignment, SIGILL, "alignment exception");
  
diff --combined arch/arm/plat-omap/dma.c
index 7686b9fa53f2745ed3df29d8e1acd91d6a9ba881,3df374055796621bd5b0e693913c7def0dbc2c1f..692d2b495af34260cdd57619240b9ab46ffdf8f9
@@@ -29,7 -29,7 +29,7 @@@
  
  #include <asm/system.h>
  #include <mach/hardware.h>
 -#include <asm/dma.h>
 +#include <mach/dma.h>
  
  #include <mach/tc.h>
  
@@@ -1848,9 -1848,22 +1848,22 @@@ static int omap2_dma_handle_ch(int ch
                printk(KERN_INFO
                       "DMA synchronization event drop occurred with device "
                       "%d\n", dma_chan[ch].dev_id);
-       if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ))
+       if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) {
                printk(KERN_INFO "DMA transaction error with device %d\n",
                       dma_chan[ch].dev_id);
+               if (cpu_class_is_omap2()) {
+                       /* Errata: sDMA Channel is not disabled
+                        * after a transaction error. So we explicitely
+                        * disable the channel
+                        */
+                       u32 ccr;
+                       ccr = dma_read(CCR(ch));
+                       ccr &= ~OMAP_DMA_CCR_EN;
+                       dma_write(ccr, CCR(ch));
+                       dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE;
+               }
+       }
        if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ))
                printk(KERN_INFO "DMA secure error with device %d\n",
                       dma_chan[ch].dev_id);
diff --combined drivers/ide/Kconfig
index 57630402ea67875e85db242e7b856dfe47e68fb6,e6857e01d1bad372da0c62480753adbd1266d1f4..1a00bb7db87243fa123d96f5ce20334ccb12af3e
@@@ -669,10 -669,12 +669,12 @@@ config BLK_DEV_CELLE
  
  endif
  
+ # TODO: BLK_DEV_IDEDMA_PCI -> BLK_DEV_IDEDMA_SFF
  config BLK_DEV_IDE_PMAC
        tristate "PowerMac on-board IDE support"
        depends on PPC_PMAC && IDE=y
        select IDE_TIMINGS
+       select BLK_DEV_IDEDMA_PCI
        help
          This driver provides support for the on-board IDE controller on
          most of the recent Apple Power Macintoshes and PowerBooks.
@@@ -689,16 -691,6 +691,6 @@@ config BLK_DEV_IDE_PMAC_ATA100FIRS
          CD-ROM on hda. This option changes this to more natural hda for
          hard disk and hdc for CD-ROM.
  
- config BLK_DEV_IDEDMA_PMAC
-       bool "PowerMac IDE DMA support"
-       depends on BLK_DEV_IDE_PMAC
-       select BLK_DEV_IDEDMA_PCI
-       help
-         This option allows the driver for the on-board IDE controller on
-         Power Macintoshes and PowerBooks to use DMA (direct memory access)
-         to transfer data to and from memory.  Saying Y is safe and improves
-         performance.
  config BLK_DEV_IDE_AU1XXX
         bool "IDE for AMD Alchemy Au1200"
         depends on SOC_AU1200
@@@ -732,7 -724,7 +724,7 @@@ config BLK_DEV_IDE_TX493
  
  config IDE_ARM
        tristate "ARM IDE support"
 -      depends on ARM && (ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK)
 +      depends on ARM && (ARCH_RPC || ARCH_SHARK)
        default y
  
  config BLK_DEV_IDE_ICSIDE
@@@ -912,7 -904,7 +904,7 @@@ config BLK_DEV_UMC867
  endif
  
  config BLK_DEV_IDEDMA
-       def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
+       def_bool BLK_DEV_IDEDMA_SFF || \
                 BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
  
  endif # IDE
index ce5752ab579d53c59edf199c417eab91941b815e,15f0a26730aea38e4c65708aac43473a8da02122..fc41444956108fd007fa818b3f80e658a718d3a6
@@@ -20,8 -20,8 +20,8 @@@
  #include <linux/mtd/partitions.h>
  #include <linux/io.h>
  #include <linux/irq.h>
 -#include <asm/dma.h>
  
 +#include <mach/dma.h>
  #include <mach/pxa-regs.h>
  #include <mach/pxa3xx_nand.h>
  
@@@ -269,6 -269,7 +269,7 @@@ static struct pxa3xx_nand_timing stm2Gb
  
  static struct pxa3xx_nand_flash stm2GbX16 = {
        .timing = &stm2GbX16_timing,
+       .cmdset = &largepage_cmdset,
        .page_per_block = 64,
        .page_size = 2048,
        .flash_width = 16,
@@@ -1079,7 -1080,7 +1080,7 @@@ static int pxa3xx_nand_probe(struct pla
        this = &info->nand_chip;
        mtd->priv = info;
  
 -      info->clk = clk_get(&pdev->dev, "NANDCLK");
 +      info->clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(info->clk)) {
                dev_err(&pdev->dev, "failed to get nand clock\n");
                ret = PTR_ERR(info->clk);