1. 28 Oct, 2013 2 commits
    • Grant Likely's avatar
      arm/versatile: Fix versatile irq specifications. · 0976c946
      Grant Likely authored
      Two of the versatile irq definitions are incorrect, mostly because two
      devices have connections to more than one interrupt controller. Fix them
      by using the new interrupts-extended property to fan out without using
      an awful interrupt-map nexus node.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      0976c946
    • Grant Likely's avatar
      of/irq: create interrupts-extended property · 79d97015
      Grant Likely authored
      The standard interrupts property in device tree can only handle
      interrupts coming from a single interrupt parent. If a device is wired
      to multiple interrupt controllers, then it needs to be attached to a
      node with an interrupt-map property to demux the interrupt specifiers
      which is confusing. It would be a lot easier if there was a form of the
      interrupts property that allows for a separate interrupt phandle for
      each interrupt specifier.
      
      This patch does exactly that by creating a new interrupts-extended
      property which reuses the phandle+arguments pattern used by GPIOs and
      other core bindings.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Acked-by: default avatarKumar Gala <galak@codeaurora.org>
      [grant.likely: removed versatile platform hunks into separate patch]
      Cc: Rob Herring <rob.herring@calxeda.com>
      79d97015
  2. 24 Oct, 2013 10 commits
  3. 15 Oct, 2013 4 commits
    • Tomasz Figa's avatar
      of/irq: Pass trigger type in IRQ resource flags · 4a43d686
      Tomasz Figa authored
      Some drivers might rely on availability of trigger flags in IRQ
      resource, for example to configure the hardware for particular interrupt
      type. However current code creating IRQ resources from data in device
      tree does not configure trigger flags in resulting resources.
      
      This patch tries to solve the problem, based on the fact that
      irq_of_parse_and_map() configures the trigger based on DT interrupt
      specifier and IRQD_TRIGGER_* flags are consistent with IORESOURCE_IRQ_*,
      and we can get correct trigger flags by calling irqd_get_trigger_type()
      after mapping the interrupt.
      Signed-off-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
      [grant.likely: Merged the two assignments to r->flags]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      4a43d686
    • Grant Likely's avatar
      of: Fix dereferencing node name in debug output to be safe · 8804827b
      Grant Likely authored
      Several locations in the of_address and of_irq code dereference the
      full_name parameter from a device_node pointer without checking if the
      pointer is valid.  This patch switches to use of_node_full_name() which
      always checks the pointer.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      8804827b
    • Grant Likely's avatar
      of: Fix iteration bug over CPU reg properties · f3cea45a
      Grant Likely authored
      The size of each hwid in a cpu nodes 'reg' property is defined by the
      parents #address-cells property in the normal way. The cpu parsing code
      has a bug where it will overrun the end of the property if
      address-cells is greater than one. This commit fixes the problem by
      adjusting the array size by the number of address cells. It also makes
      sure address-cells isn't zero for that would cause an infinite loop.
      
      v2: bail if #address-cells is zero instead of forcing to
          OF_ROOT_NODE_ADDR_CELLS_DEFAULT. Forcing it will cause the reg
          property to be parsed incorrectly.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      f3cea45a
    • David Miller's avatar
      of: Make cpu node handling more portable. · d1cb9d1a
      David Miller authored
      Use for_each_node_by_type() to iterate all cpu nodes in the
      system.
      
      Provide and overridable function arch_find_n_match_cpu_physical_id,
      which sees if the given device node matches 'cpu' and if so sets
      '*thread' when non-NULL to the cpu thread number within the core.
      
      The default implementation behaves the same as the existing code.
      
      Add a sparc64 implementation.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Tested-by: default avatarSudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      d1cb9d1a
  4. 14 Oct, 2013 1 commit
    • Grant Likely's avatar
      of: fix unnecessary warning on missing /cpus node · 444c91e5
      Grant Likely authored
      Not all DT platforms have all the cpus collected under a /cpus node.
      That just happens to be a details of FDT, ePAPR and PowerPC platforms.
      Sparc does something different, but unfortunately the current code
      complains with a warning if /cpus isn't there. This became a problem
      with commit f86e4718, "driver/core cpu: initialize of_node in cpu's
      device structure", which caused the function to get called for all
      architectures.
      
      This commit is a temporary fix to fail silently if the cpus node isn't
      present. A proper fix will come later to allow arch code to provide a
      custom mechanism for decoding the CPU hwid if the 'reg' property isn't
      appropriate.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      444c91e5
  5. 13 Oct, 2013 17 commits
  6. 12 Oct, 2013 6 commits