1. 23 5月, 2014 1 次提交
  2. 11 2月, 2014 1 次提交
    • P
      powerpc: Fix build failure in sysdev/mpic.c for MPIC_WEIRD=y · 0215b4aa
      Paul Gortmaker 提交于
      Commit 446f6d06 ("powerpc/mpic: Properly
      set default triggers") breaks the mpc7447_hpc_defconfig as follows:
      
        CC      arch/powerpc/sysdev/mpic.o
      arch/powerpc/sysdev/mpic.c: In function 'mpic_set_irq_type':
      arch/powerpc/sysdev/mpic.c:886:9: error: case label does not reduce to an integer constant
      arch/powerpc/sysdev/mpic.c:890:9: error: case label does not reduce to an integer constant
      arch/powerpc/sysdev/mpic.c:894:9: error: case label does not reduce to an integer constant
      arch/powerpc/sysdev/mpic.c:898:9: error: case label does not reduce to an integer constant
      
      Looking at the cpp output (gcc 4.7.3), I see:
      
         case mpic->hw_set[MPIC_IDX_VECPRI_SENSE_EDGE] |
              mpic->hw_set[MPIC_IDX_VECPRI_POLARITY_POSITIVE]:
      
      The pointer into an array appears because CONFIG_MPIC_WEIRD=y is set
      for this platform, thus enabling the following:
      
        -------------------
        #ifdef CONFIG_MPIC_WEIRD
        static u32 mpic_infos[][MPIC_IDX_END] = {
              [0] = { /* Original OpenPIC compatible MPIC */
      
        [...]
      
        #define MPIC_INFO(name) mpic->hw_set[MPIC_IDX_##name]
      
        #else /* CONFIG_MPIC_WEIRD */
      
        #define MPIC_INFO(name) MPIC_##name
      
        #endif /* CONFIG_MPIC_WEIRD */
        -------------------
      
      Here we convert the case section to if/else if, and also add
      the equivalent of a default case to warn about unknown types.
      Boot tested on sbc8548, build tested on all defconfigs.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0215b4aa
  3. 11 10月, 2013 1 次提交
  4. 10 10月, 2013 1 次提交
    • R
      powerpc: add explicit OF includes · 26a2056e
      Rob Herring 提交于
      When removing prom.h include by of.h, several OF headers will no longer
      be implicitly included. Add explicit includes of of_*.h as needed.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Acked-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: linuxppc-dev@lists.ozlabs.org
      26a2056e
  5. 02 7月, 2013 3 次提交
  6. 01 6月, 2013 1 次提交
  7. 14 5月, 2013 1 次提交
  8. 06 5月, 2013 1 次提交
    • B
      irqdomain: Allow quiet failure mode · 5fe0c1f2
      Benjamin Herrenschmidt 提交于
      Some interrupt controllers refuse to map interrupts marked as
      "protected" by firwmare. Since we try to map everyting in the
      device-tree on some platforms, we end up with a lot of nasty
      WARN's in the boot log for what is a normal situation on those
      machines.
      
      This defines a specific return code (-EPERM) from the host map()
      callback which cause irqdomain to fail silently.
      
      MPIC is updated to return this when hitting a protected source
      printing only a single line message for diagnostic purposes.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5fe0c1f2
  9. 16 2月, 2013 1 次提交
  10. 29 1月, 2013 1 次提交
  11. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  12. 13 9月, 2012 2 次提交
  13. 23 7月, 2012 1 次提交
  14. 10 7月, 2012 1 次提交
  15. 23 4月, 2012 2 次提交
  16. 27 2月, 2012 1 次提交
  17. 23 2月, 2012 5 次提交
    • K
      powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag · e55d7f73
      Kyle Moffett 提交于
      There are two separate flags controlling whether or not the MPIC is
      reset during initialization, which is completely unnecessary, and only
      one of them can be specified in the device tree.
      
      Also, most platforms in-tree right now do actually want to reset the
      MPIC during initialization anyways, which means lots of duplicate code
      passing the MPIC_WANTS_RESET flag.
      
      Fix all of the callers which currently do not pass the MPIC_WANTS_RESET
      flag to pass the MPIC_NO_RESET flag, then remove the MPIC_WANTS_RESET
      flag and make the code reset the MPIC by default.
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e55d7f73
    • K
      powerpc/mpic: Add "last-interrupt-source" property to override hardware · c1b8d45d
      Kyle Moffett 提交于
      The FreeScale PowerQUICC-III-compatible (mpc85xx/mpc86xx) MPICs do not
      correctly report the number of hardware interrupt sources, so software
      needs to override the detected value with "256".
      
      To avoid needing to write custom board-specific code to detect that
      scenario, allow it to be easily overridden in the device-tree.
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c1b8d45d
    • K
      powerpc/mpic: Remove MPIC_BROKEN_FRR_NIRQS and duplicate irq_count · 5019609f
      Kyle Moffett 提交于
      The mpic->irq_count variable is only used as a software error-checking
      limit to determine whether or not an IRQ number is valid.  In board code
      which does not manually specify an IRQ count to mpic_alloc(), i.e. 0, it
      is automatically detected from the number of ISUs and the ISU size.
      
      In practice, all hardware ends up with irq_count == num_sources, so all
      of the runtime checks on mpic->irq_count should just check the value of
      mpic->num_sources instead.
      
      When platform hardware does not correctly report the number of IRQs,
      which only happens on the MPC85xx/MPC86xx, the MPIC_BROKEN_FRR_NIRQS
      flag is used to override the detected value of num_sources with the
      manual irq_count parameter.  Since there's no need to manually specify
      the number of IRQs except in this case, the extra flag can be eliminated
      and the test changed to "irq_count != 0".
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5019609f
    • K
      fsl/mpic: Create and document the "single-cpu-affinity" device-tree flag · 9ca163c8
      Kyle Moffett 提交于
      The Freescale MPIC (and perhaps others in the future) is incapable of
      routing non-IPI interrupts to more than once CPU at a time.  Currently
      all of the Freescale boards msut pass the MPIC_SINGLE_DEST_CPU flag to
      mpic_alloc(), but that information should really be present in the
      device-tree.
      
      Older board code can't rely on the device-tree having the property set,
      but newer platforms won't need it manually specified in the code.
      
      [BenH: Remove unrelated changes, folded in a different patch]
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9ca163c8
    • K
      powerpc/mpic: Fix use of "flags" variable in mpic_alloc() · 3a7a7176
      Kyle Moffett 提交于
      The mpic_alloc() function takes a "flags" parameter and assigns it into
      the mpic->flags variable fairly early on, but several later pieces of
      code detect various device-tree properties and save them into the
      "mpic->flags" variable (EG: "big-endian" => MPIC_BIG_ENDIAN).
      
      Unfortunately, a number of codepaths (including several which test the
      flag MPIC_BIG_ENDIAN!) test "flags" instead of "mpic->flags", and get
      wrong answers as a result.
      
      Consolidate the device-tree flag tests early in mpic_alloc() and change
      all of the checks after "mpic->flags" is init'ed to use "mpic->flags".
      
      [BenH: Fixed up use of mpic->node before it's initialized]
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3a7a7176
  18. 16 2月, 2012 1 次提交
    • G
      irq_domain: Replace irq_alloc_host() with revmap-specific initializers · a8db8cf0
      Grant Likely 提交于
      Each revmap type has different arguments for setting up the revmap.
      This patch splits up the generator functions so that each revmap type
      can do its own setup and the user doesn't need to keep track of how
      each revmap type handles the arguments.
      
      This patch also adds a host_data argument to the generators.  There are
      cases where the host_data pointer will be needed before the function returns.
      ie. the legacy map calls the .map callback for each irq before returning.
      
      v2: - Add void *host_data argument to irq_domain_add_*() functions
          - fixed failure to compile
          - Moved IRQ_DOMAIN_MAP_* defines into irqdomain.c
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      Tested-by: NOlof Johansson <olof@lixom.net>
      a8db8cf0
  19. 15 2月, 2012 1 次提交
    • G
      irq_domain/powerpc: Use common irq_domain structure instead of irq_host · bae1d8f1
      Grant Likely 提交于
      This patch drops the powerpc-specific irq_host structures and uses the common
      irq_domain strucutres defined in linux/irqdomain.h.  It also fixes all
      the users to use the new structure names.
      
      Renaming irq_host to irq_domain has been discussed for a long time, and this
      patch is a step in the process of generalizing the powerpc virq code to be
      usable by all architecture.
      
      An astute reader will notice that this patch actually removes the irq_host
      structure instead of renaming it.  This is because the irq_domain structure
      already exists in include/linux/irqdomain.h and has the needed data members.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      Tested-by: NOlof Johansson <olof@lixom.net>
      bae1d8f1
  20. 07 12月, 2011 9 次提交
  21. 25 11月, 2011 1 次提交
  22. 08 11月, 2011 1 次提交
  23. 04 11月, 2011 1 次提交
  24. 20 9月, 2011 1 次提交
    • T
      powerpc/mpic: Add support for discontiguous cores · 14b92470
      Timur Tabi 提交于
      There is one place in the MPIC driver that assumes that the cores are numbered
      from 0 to n-1.  However, this is not true if the CPUs are not numbered
      sequentially.  This can happen on a eight-core SOC where cores two and three
      are removed in the device tree.  So instead of blindly looping, we iterate
      over the discovered CPUs and use the SMP ID as the index.
      
      This means that we no longer ask the MPIC how many CPUs there are, so
      we also delete mpic->num_cpus.
      
      We also catch if the number of CPUs in the SOC exceeds the number that the
      MPIC supports.  This should never happen, of course, but it's good to be
      sure.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      14b92470