1. 24 1月, 2017 1 次提交
  2. 10 1月, 2017 1 次提交
  3. 09 1月, 2017 1 次提交
    • G
      of/irq: improve error report on irq discovery process failure · f1aa5484
      Guilherme G. Piccoli 提交于
      On PowerPC machines some PCI slots might not have level triggered
      interrupts capability (also know as level signaled interrupts),
      leading of_irq_parse_pci() to complain by presenting error messages
      on the kernel log - in this case, the properties "interrupt-map" and
      "interrupt-map-mask" are not present on device's node in the device
      tree.
      
      This patch introduces a different message for this specific case,
      and also reduces its level from error to warning. Besides, we warn
      (once) that possibly some PCI slots on the system have no level
      triggered interrupts available.
      We changed some error return codes too on function of_irq_parse_raw()
      in order other failure's cases can be presented in a more precise way.
      
      Before this patch, when an adapter was plugged in a slot without level
      interrupts capabilitiy on PowerPC, we saw a generic error message
      like this:
      
          [54.239] pci 002d:70:00.0: of_irq_parse_pci() failed with rc=-22
      
      Now, with this applied, we see the following specific message:
      
          [16.154] pci 0014:60:00.1: of_irq_parse_pci: no interrupt-map found,
          INTx interrupts not available
      
      Finally, we standardize the error path in of_irq_parse_raw() by always
      taking the fail path instead of returning directly from the loop.
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      f1aa5484
  4. 05 1月, 2017 2 次提交
  5. 13 12月, 2016 1 次提交
  6. 10 12月, 2016 3 次提交
  7. 30 11月, 2016 1 次提交
  8. 18 11月, 2016 3 次提交
  9. 15 11月, 2016 16 次提交
  10. 12 11月, 2016 1 次提交
    • H
      Revert "console: don't prefer first registered if DT specifies stdout-path" · c6c7d83b
      Hans de Goede 提交于
      This reverts commit 05fd007e ("console: don't prefer first
      registered if DT specifies stdout-path").
      
      The reverted commit changes existing behavior on which many ARM boards
      rely.  Many ARM small-board-computers, like e.g.  the Raspberry Pi have
      both a video output and a serial console.  Depending on whether the user
      is using the device as a more regular computer; or as a headless device
      we need to have the console on either one or the other.
      
      Many users rely on the kernel behavior of the console being present on
      both outputs, before the reverted commit the console setup with no
      console= kernel arguments on an ARM board which sets stdout-path in dt
      would look like this:
      
        [root@localhost ~]# cat /proc/consoles
        ttyS0                -W- (EC p a)    4:64
        tty0                 -WU (E  p  )    4:1
      
      Where as after the reverted commit, it looks like this:
      
        [root@localhost ~]# cat /proc/consoles
        ttyS0                -W- (EC p a)    4:64
      
      This commit reverts commit 05fd007e ("console: don't prefer first
      registered if DT specifies stdout-path") restoring the original
      behavior.
      
      Fixes: 05fd007e ("console: don't prefer first registered if DT specifies stdout-path")
      Link: http://lkml.kernel.org/r/20161104121135.4780-2-hdegoede@redhat.comSigned-off-by: NHans de Goede <hdegoede@redhat.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Thorsten Leemhuis <regressions@leemhuis.info>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c6c7d83b
  11. 11 11月, 2016 1 次提交
    • A
      of/overlay: add of overlay notifications · 39a842e2
      Alan Tull 提交于
      This patch add of overlay notifications.
      
      When DT overlays are being added, some drivers/subsystems
      need to see device tree overlays before the changes go into
      the live tree.
      
      This is distinct from reconfig notifiers that are
      post-apply or post-remove and which issue very granular
      notifications without providing access to the context
      of a whole overlay.
      
      The following 4 notificatons are issued:
        OF_OVERLAY_PRE_APPLY
        OF_OVERLAY_POST_APPLY
        OF_OVERLAY_PRE_REMOVE
        OF_OVERLAY_POST_REMOVE
      
      In the case of pre-apply notification, if the notifier
      returns error, the overlay will be rejected.
      
      This patch exports two functions for registering/unregistering
      notifications:
        of_overlay_notifier_register(struct notifier_block *nb)
        of_overlay_notifier_unregister(struct notifier_block *nb)
      
      The of_mutex is held during these notifications. The
      notification data includes pointers to the overlay target
      and the overlay:
      
      struct of_overlay_notify_data {
             struct device_node *overlay;
             struct device_node *target;
      };
      Signed-off-by: NAlan Tull <atull@opensource.altera.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Acked-by: NMoritz Fischer <moritz.fischer@ettus.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      39a842e2
  12. 19 10月, 2016 1 次提交
  13. 08 10月, 2016 1 次提交
    • P
      console: don't prefer first registered if DT specifies stdout-path · 05fd007e
      Paul Burton 提交于
      If a device tree specifies a preferred device for kernel console output
      via the stdout-path or linux,stdout-path chosen node properties or the
      stdout alias then the kernel ought to honor it & output the kernel
      console to that device.  As it stands, this isn't the case.  Whilst we
      parse the stdout-path properties & set an of_stdout variable from
      of_alias_scan(), and use that from of_console_check() to determine
      whether to add a console device as a preferred console whilst
      registering it, we also prefer the first registered console if no other
      has been selected at the time of its registration.
      
      This means that if a console other than the one the device tree selects
      via stdout-path is registered first, we will switch to using it & when
      the stdout-path console is later registered the call to
      add_preferred_console() via of_console_check() is too late to do
      anything useful.  In practice this seems to mean that we switch to the
      dummy console device fairly early & see no further console output:
      
          Console: colour dummy device 80x25
          console [tty0] enabled
          bootconsole [ns16550a0] disabled
      
      Fix this by not automatically preferring the first registered console if
      one is specified by the device tree.  This allows consoles to be
      registered but not enabled, and once the driver for the console selected
      by stdout-path calls of_console_check() the driver will be added to the
      list of preferred consoles before any other console has been enabled.
      When that console is then registered via register_console() it will be
      enabled as expected.
      
      Link: http://lkml.kernel.org/r/20160809151937.26118-1-paul.burton@imgtec.comSigned-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Ivan Delalande <colona@arista.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Jan Kara <jack@suse.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      05fd007e
  14. 06 10月, 2016 1 次提交
    • P
      of/platform: Probe "isa" busses by default · ecd76ede
      Paul Burton 提交于
      Since commit 44a7185c ("of/platform: Add common method to populate
      default bus") platforms calling of_platform_bus_probe from an initcall
      is either a rather unsafe race with of_platform_default_populate_init or
      a no-op. The MIPS Malta board needs to probe devices under an ISA bus,
      which we do support in the of_busses array but until now haven't
      included in of_default_bus_match_table.
      
      Add an "isa" entry to of_default_bus_match_table such that we can just
      accept use of of_platform_default_populate_init & remove the
      Malta-specific match table in a later patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14275/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ecd76ede
  15. 28 9月, 2016 1 次提交
  16. 23 9月, 2016 1 次提交
  17. 16 9月, 2016 1 次提交
  18. 15 9月, 2016 3 次提交
    • R
      of/platform: Initialise dev->fwnode appropriately · f94277af
      Robin Murphy 提交于
      Whilst we're some of the way towards a universal firmware property
      interface, drivers which deal with both OF and ACPI probing end up
      having to do things like this:
      
          dev->of_node ? &dev->of_node->fwnode : dev->fwnode
      
      This seems unnecessary, when the OF code could instead simply fill in
      the device's fwnode when binding the of_node, and let the drivers use
      dev->fwnode either way. Let's give it a go and see what falls out.
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      f94277af
    • R
      of: Add array read functions with min/max size limits · a67e9472
      Richard Fitzgerald 提交于
      Add a new set of array reading functions that take a minimum and
      maximum size limit and will fail if the property size is not within
      the size limits. This makes it more convenient for drivers that
      use variable-size DT arrays which must be bounded at both ends -
      data must be at least N entries but must not overflow the array
      it is being copied into. It is also more efficient than making this
      functionality out of existing public functions and avoids duplication.
      
      The existing array functions have been left in the API, since there
      are a very large number of clients of those functions and their
      existing functionality is still useful. This avoids turning a small
      API improvement into a major kernel rework.
      
      The old functions have been turned into mininmal static inlines calling
      the new functions. The old functions had no upper limit on the actual
      size of the dts entry, to preserve this functionality rather than keeping
      two near-identical implementations, if the new function is called with
      max=0 there is no limit on the size of the dts entry but only the min
      number of elements are read.
      Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      a67e9472
    • R
      of: Make of_find_property_value_of_size take a length range · 79ac5d31
      Richard Fitzgerald 提交于
      In preparation for adding variable-length array reads, change
      of_find_property_value_of_size so that it takes an optional
      maximum length. If the maximum is passed as 0, the behaviour is
      unchanged and it will return a property if it's >= the requested
      minimum length. If maximum is non-zero it will only return a
      property whose length is min <= l <= max.
      Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      79ac5d31