1. 19 11月, 2012 1 次提交
    • L
      ARM: kernel: add device tree init map function · a0ae0240
      Lorenzo Pieralisi 提交于
      When booting through a device tree, the kernel cpu logical id map can be
      initialized using device tree data passed by FW or through an embedded blob.
      
      This patch adds a function that parses device tree "cpu" nodes and
      retrieves the corresponding CPUs hardware identifiers (MPIDR).
      It sets the possible cpus and the cpu logical map values according to
      the number of CPUs defined in the device tree and respective properties.
      
      The device tree HW identifiers are considered valid if all CPU nodes contain
      a "reg" property, there are no duplicate "reg" entries and the DT defines a
      CPU node whose "reg" property matches the MPIDR[23:0] of the boot CPU.
      
      The primary CPU is assigned cpu logical number 0 to keep the current convention
      valid.
      
      Current bindings documentation is included in the patch:
      
      Documentation/devicetree/bindings/arm/cpus.txt
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      a0ae0240
  2. 24 3月, 2012 1 次提交
    • R
      ARM: get rid of asm/irq.h in asm/prom.h · 5936d116
      Russell King 提交于
      Avoid potential build problems caused by lacking mach/irqs.h includes
      on non-OF builds caused by an errant include in asm/prom.h.  asm/prom.h
      requires nothing from asm/irq.h, as Grant says:
      
      On Mon, Feb 06, 2012 at 05:56:23AM +0000, Grant Likely wrote:
      > On Sat, Feb 04, 2012 at 10:17:48PM +0000, Russell King wrote:
      > > Finally, do we need asm/irq.h in our asm/prom.h ?  That's causing
      > > fragility between DT and non-DT builds, because people are finding
      > > that their DT builds work without their mach/irqs.h includes but
      > > fail when built with non-DT.  The only thing which DT might need -
      > > at the most - is NR_IRQS, but I'd hope with things like irq domains
      > > it doesn't actually require it.
      >
      > I don't think so.  There may be a file or two that break because they're
      > not including everything they need, but I don't think anything in the
      > header requires it.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5936d116
  3. 05 1月, 2012 1 次提交
    • F
      ARM: prom.h: Fix build error by removing unneeded header file · c89810ac
      Fabio Estevam 提交于
      Fix the following build error:
      
        CC [M]  fs/udf/balloc.o
      In file included from /home/fabio/next/linux-next/arch/arm/include/asm/prom.h:16,
                       from include/linux/of.h:140,
                       from include/asm-generic/gpio.h:7,
                       from arch/arm/plat-mxc/include/mach/irqs.h:14,
                       from /home/fabio/next/linux-next/arch/arm/include/asm/irq.h:4,
                       from /home/fabio/next/linux-next/arch/arm/include/asm/hardirq.h:6,
                       from include/linux/hardirq.h:7,
                       from include/linux/highmem.h:8,
                       from include/linux/pagemap.h:10,
                       from include/linux/buffer_head.h:13,
                       from fs/udf/udfdecl.h:11,
                       from fs/udf/balloc.c:22:
      /home/fabio/next/linux-next/arch/arm/include/asm/setup.h:146: error: redefinition of 'struct tag'
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      [grant.likely: fix build failure on drivers/of/fdt.c]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      c89810ac
  4. 28 7月, 2011 1 次提交
    • G
      irq: add irq_domain translation infrastructure · 08a543ad
      Grant Likely 提交于
      This patch adds irq_domain infrastructure for translating from
      hardware irq numbers to linux irqs.  This is particularly important
      for architectures adding device tree support because the current
      implementation (excluding PowerPC and SPARC) cannot handle
      translation for more than a single interrupt controller.  irq_domain
      supports device tree translation for any number of interrupt
      controllers.
      
      This patch converts x86, Microblaze, ARM and MIPS to use irq_domain
      for device tree irq translation.  x86 is untested beyond compiling it,
      irq_domain is enabled for MIPS and Microblaze, but the old behaviour is
      preserved until the core code is modified to actually register an
      irq_domain yet.  On ARM it works and is required for much of the new
      ARM device tree board support.
      
      PowerPC has /not/ been converted to use this new infrastructure.  It
      is still missing some features before it can replace the virq
      infrastructure already in powerpc (see documentation on
      irq_domain_map/unmap for details).  Followup patches will add the
      missing pieces and migrate PowerPC to use irq_domain.
      
      SPARC has its own method of managing interrupts from the device tree
      and is unaffected by this change.
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      08a543ad
  5. 23 5月, 2011 1 次提交
    • G
      arm/dt: probe for platforms via the device tree · 93c02ab4
      Grant Likely 提交于
      If a dtb is passed to the kernel then the kernel needs to iterate
      through compiled-in mdescs looking for one that matches and move the
      dtb data to a safe location before it gets accidentally overwritten by
      the kernel.
      
      This patch creates a new function, setup_machine_fdt() which is
      analogous to the setup_machine_atags() created in the previous patch.
      It does all the early setup needed to use a device tree machine
      description.
      
      v5: - Print warning with neither dtb nor atags are passed to the kernel
          - Fix bug in setting of __machine_arch_type to the selected machine,
            not just the last machine in the list.
      Reported-by: NTixy <tixy@yxit.co.uk>
          - Copy command line directly into boot_command_line instead of cmd_line
      v4: - Dump some output when a matching machine_desc cannot be found
      v3: - Added processing of reserved list.
          - Backed out the v2 change that copied instead of reserved the
            dtb.  dtb is reserved again and the real problem was fixed by
            using alloc_bootmem_align() for early allocation of RAM for
            unflattening the tree.
          - Moved cmd_line and initrd changes to earlier patch to make series
            bisectable.
      v2: Changed to save the dtb by copying into an allocated buffer.
          - Since the dtb will very likely be passed in the first 16k of ram
            where the interrupt vectors live, memblock_reserve() is
            insufficient to protect the dtb data.
      
      [based on work originally written by Jeremy Kerr <jeremy.kerr@canonical.com>]
      Tested-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      93c02ab4
  6. 11 5月, 2011 1 次提交