1. 14 Oct, 2010 11 commits
    • Timur Tabi's avatar
      powerpc/p1022: Add probing for individual DMA channels · f7a07fd9
      Timur Tabi authored
      Like the MPC8610 HPCD, the P1022DS ASoC DMA driver probes on individual DMA
      channel nodes, so the DMA controller nodes' compatible string must be
      listed in p1022_ds_ids[] to work.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      f7a07fd9
    • Matthew McClintock's avatar
      powerpc/fsl_soc: Search all global-utilities nodes for rstccr · 4ea7c88b
      Matthew McClintock authored
      The first global-utilities node might not contain the rstcr
      property, so we should search all the nodes
      Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
      Acked-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      4ea7c88b
    • Paul Gortmaker's avatar
      powerpc: Fix invalid page flags in create TLB CAM path for PTE_64BIT · 92437d41
      Paul Gortmaker authored
      There exists a four line chunk of code, which when configured for
      64 bit address space, can incorrectly set certain page flags during
      the TLB creation.  It turns out that this is code which isn't used,
      but might still serve a purpose.  Since it isn't obvious why it exists
      or why it causes problems, the below description covers both in detail.
      
      For powerpc bootstrap, the physical memory (at most 768M), is mapped
      into the kernel space via the following path:
      
      MMU_init()
          |
          + adjust_total_lowmem()
                  |
                  + map_mem_in_cams()
                          |
                          + settlbcam(i, virt, phys, cam_sz, PAGE_KERNEL_X, 0);
      
      On settlbcam(), the kernel will create TLB entries according to the flag,
      PAGE_KERNEL_X.
      
      settlbcam()
      {
              ...
              TLBCAM[index].MAS1 = MAS1_VALID
                              | MAS1_IPROT | MAS1_TSIZE(tsize) | MAS1_TID(pid);
                                      ^
      			These entries cannot be invalidated by the
      			kernel since MAS1_IPROT is set on TLB property.
              ...
              if (flags & _PAGE_USER) {
                 TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
                 TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
              }
      
      For classic BookE (flags & _PAGE_USER) is 'zero' so it's fine.
      But on boards like the the Freescale P4080, we want to support 36-bit
      physical address on it. So the following options may be set:
      
      CONFIG_FSL_BOOKE=y
      CONFIG_PTE_64BIT=y
      CONFIG_PHYS_64BIT=y
      
      As a result, boards like the P4080 will introduce PTE format as Book3E.
      As per the file: arch/powerpc/include/asm/pgtable-ppc32.h
      
        * #elif defined(CONFIG_FSL_BOOKE) && defined(CONFIG_PTE_64BIT)
        * #include <asm/pte-book3e.h>
      
      So PAGE_KERNEL_X is __pgprot(_PAGE_BASE | _PAGE_KERNEL_RWX) and the
      book3E version of _PAGE_KERNEL_RWX is defined with:
      
        (_PAGE_BAP_SW | _PAGE_BAP_SR | _PAGE_DIRTY | _PAGE_BAP_SX)
      
      Note the _PAGE_BAP_SR, which is also defined in the book3E _PAGE_USER:
      
        #define _PAGE_USER        (_PAGE_BAP_UR | _PAGE_BAP_SR) /* Can be read */
      
      So the possibility exists to wrongly assign the user MAS3_U<RWX> bits
      to kernel (PAGE_KERNEL_X) address space via the following code fragment:
      
              if (flags & _PAGE_USER) {
                 TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
                 TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
              }
      
      Here is a dump of the TLB info from Simics with the above code present:
      ------
      L2 TLB1
                                                  GT                   SSS UUU V I
       Row  Logical           Physical            SS TLPID  TID  WIMGE XWR XWR F P   V
      ----- ----------------- ------------------- -- ----- ----- ----- --- --- - -   -
        0   c0000000-cfffffff 000000000-00fffffff 00     0     0   M   XWR XWR 0 1   1
        1   d0000000-dfffffff 010000000-01fffffff 00     0     0   M   XWR XWR 0 1   1
        2   e0000000-efffffff 020000000-02fffffff 00     0     0   M   XWR XWR 0 1   1
      
      Actually this conditional code was used for two legacy functions:
      
        1: support KGDB to set break point.
           KGDB already dropped this; now uses its core write to set break point.
      
        2: io_block_mapping() to create TLB in segmentation size (not PAGE_SIZE)
           for device IO space.
           This use case is also removed from the latest PowerPC kernel.
      
      However, there may still be a use case for it in the future, like
      large user pages, so we can't remove it entirely.  As an alternative,
      we match on all bits of _PAGE_USER instead of just any bits, so the
      case where just _PAGE_BAP_SR is set can't sneak through.
      
      With this done, the TLB appears without U having XWR as below:
      
      -------
      L2 TLB1
                                                  GT                   SSS UUU V I
       Row  Logical           Physical            SS TLPID  TID  WIMGE XWR XWR F P   V
      ----- ----------------- ------------------- -- ----- ----- ----- --- --- - -   -
        0   c0000000-cfffffff 000000000-00fffffff 00     0     0   M   XWR     0 1   1
        1   d0000000-dfffffff 010000000-01fffffff 00     0     0   M   XWR     0 1   1
        2   e0000000-efffffff 020000000-02fffffff 00     0     0   M   XWR     0 1   1
      Signed-off-by: default avatarTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      92437d41
    • Ilya Yanok's avatar
      powerpc/mpc83xx: Support for MPC8308 P1M board · cd2bd44e
      Ilya Yanok authored
      This patch adds support for MPC8308 P1M board.
      Supported devices:
       DUART
       Dual Ethernet
       NOR flash
       Both I2C controllers
       USB in peripheral mode
       PCI Express
      Signed-off-by: default avatarIlya Yanok <yanok@emcraft.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      cd2bd44e
    • Matthew McClintock's avatar
      powerpc/85xx: flush dcache before resetting cores · 677de425
      Matthew McClintock authored
      When we do an mpic_reset_core we need to make sure the dcache is flushed.
      Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      677de425
    • Matthew McClintock's avatar
      powerpc/85xx: Minor fixups for kexec on 85xx · 5d692961
      Matthew McClintock authored
      Make kexec_down_cpus atmoic since it will be incremented by all cores as
      they are coming down.
      
      Remove duplicate calls to mpc85xx_smp_kexec_down, now it's called by the
      crash and normal kexec pathway only once.
      
      Increase the timeout to wait for other cores to shutdown.
      Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      5d692961
    • Matthew McClintock's avatar
      powerpc/85xx: Remove call to mpic_teardown_this_cpu in kexec · edb85800
      Matthew McClintock authored
      We no longer need to call this explicitly as a generic version is called
      by default.
      Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      edb85800
    • Matthew McClintock's avatar
      powerpc/kexec: make masking/disabling interrupts generic · c71635d2
      Matthew McClintock authored
      Right now just the kexec crash pathway turns turns off the interrupts.
      Pull that out and make a generic version for use elsewhere
      Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      c71635d2
    • Timur Tabi's avatar
      powerpc/watchdog: Allow the Book-E driver to be compiled as a module · fbdd7144
      Timur Tabi authored
      Register the __init and __exit functions in the PowerPC Book-E Watchdog
      driver as module entry/exit functions, and modify the Kconfig entry.
      
      Add a .release method for the PowerPC Book-E Watchdog driver, so that the
      watchdog is disabled when the driver is closed.
      
      Loosely based on original code from Jiang Yutang <b14898@freescale.com>.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      fbdd7144
    • Timur Tabi's avatar
      powerpc: export ppc_proc_freq and ppc_tb_freq as GPL symbols · 55ec2fca
      Timur Tabi authored
      Export the global variable 'ppc_tb_freq', so that modules (like the Book-E
      watchdog driver) can use it.  To maintain consistency, ppc_proc_freq is
      changed to a GPL-only export.  This is okay, because any module that needs
      this symbol should be an actual Linux driver, which must be GPL-licensed.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Acked-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      55ec2fca
    • Kumar Gala's avatar
      powerpc/fsl-pci: Fix MSI support on 83xx platforms · b8f44ec2
      Kumar Gala authored
      The following commit broke 83xx because it assumed the 83xx platforms
      exposed the "IMMR" address in BAR0 like the 85xx/86xx/QoriQ devices do:
      
      commit 3da34aae
      Author: Kumar Gala <galak@kernel.crashing.org>
      Date:   Tue May 12 15:51:56 2009 -0500
      
          powerpc/fsl: Support unique MSI addresses per PCIe Root Complex
      
      However that is not true, so we have to search through the inbound
      window settings on 83xx to find which one matches the IMMR address to
      determine its PCI address.
      Reported-by: default avatarIlya Yanok <yanok@emcraft.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      b8f44ec2
  2. 13 Oct, 2010 18 commits
  3. 08 Oct, 2010 1 commit
  4. 07 Oct, 2010 10 commits