1. 24 7月, 2014 3 次提交
    • G
      of: Move dynamic node fixups out of powerpc and into common code · a25095d4
      Grant Likely 提交于
      PowerPC does an odd thing with dynamic nodes. It uses a notifier to
      catch new node additions and set some of the values like name and type.
      This makes no sense since that same code can be put directly into
      of_attach_node(). Besides, all dynamic node users need this, not just
      powerpc. Fix this problem by moving the logic out of arch/powerpc and
      into drivers/of/dynamic.c.
      
      It is also important to remove this notifier because we want to move the
      firing of notifiers from before the tree is modified to after so that
      the receiver gets a consistent view of the tree, but that is
      incompatible with notifiers that modify the node.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Nathan Fontenot <nfont@austin.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      a25095d4
    • G
      of: Make sure attached nodes don't carry along extra children · 6162dbe4
      Grant Likely 提交于
      The child pointer does not get cleared when attaching new nodes which
      could cause the tree to be inconsistent. Clear the child pointer in
      __of_attach_node() to be absolutely sure that the structure remains in a
      consistent layout.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      6162dbe4
    • G
      of: Make devicetree sysfs update functions consistent. · 8a2b22a2
      Grant Likely 提交于
      All of the DT modification functions are split into two parts, the first
      part manipulates the DT data structure, and the second part updates
      sysfs, but the code isn't very consistent about how the second half is
      called. They don't all enforce the same rules about when it is valid to
      update sysfs, and there isn't any clarity on locking.
      
      The transactional DT modification feature that is coming also needs
      access to these functions so that it can perform all the structure
      changes together, and then all the sysfs updates as a second stage
      instead of doing each one at a time.
      
      Fix up the second have by creating a separate __of_*_sysfs() function
      for each of the helpers. The new functions have consistent naming (ie.
      of_node_add() becomes __of_attach_node_sysfs()) and all of them now
      defer if of_init hasn't been called yet.
      
      Callers of the new functions must hold the of_mutex to ensure there are
      no race conditions with of_init(). The mutex ensures that there will
      only ever be one writer to the tree at any given time. There can still
      be any number of readers and the raw_spin_lock is still used to make
      sure access to the data structure is still consistent.
      
      Finally, put the function prototypes into of_private.h so they are
      accessible to the transaction code.
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [grant.likely: Changed suffix from _post to _sysfs to match existing code]
      [grant.likely: Reorganized to eliminate trivial wrappers]
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      8a2b22a2
  2. 16 7月, 2014 2 次提交
    • P
      of: Create unlocked versions of node and property add/remove functions · d8c50088
      Pantelis Antoniou 提交于
      The DT overlay code will need to manipulate nodes and properties while
      already holding the devicetree lock, or on nodes that are not yet
      attached to the tree, but the current helper functions don't allow that.
      Extract the core behaviour from the accessors and create the following
      unlocked variants.
      
      The unlocked variants require either the lock to already be held or for
      the nodes to be detached from the tree. Changes to live nodes will not
      get updated in sysfs, so the caller must arrange for housekeeping to
      take place after dropping the lock.
      
      The new functions are: __of_add_property(), __of_remove_property(),
      __of_update_property(), __of_attach_node() and __of_detach_node().
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [Remove unnecessary diff hunks and rewrite commit text]
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      d8c50088
    • P
      OF: Utility helper functions for dynamic nodes · 69843396
      Pantelis Antoniou 提交于
      Introduce helper functions for working with the live DT tree,
      all of them related to dynamically adding/removing nodes and
      properties.
      
      __of_prop_dup() copies a property dynamically
      __of_node_alloc() creates an empty node
      
      Bug fix about prop->len == 0 by Ionut Nicu <ioan.nicu.ext@nsn.com>
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [glikely: Added unittest for of_copy_property and dropped fine-grained allocations]
      [glikely: removed name, type and phandle arguments from __of_node_alloc]
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      69843396
  3. 07 7月, 2014 6 次提交
    • G
      of: Move CONFIG_OF_DYNAMIC code into a separate file · 6afc0dc3
      Grant Likely 提交于
      Split the dynamic device tree code into a separate file to make it
      really clear what features CONFIF_OF_DYNAMIC add to the kernel. Without
      CONFIG_OF_DYNAMIC only properties can be changed, and notifiers do not
      get sent. Enabling it turns on reference counting, notifiers and the
      ability to add and remove nodes.
      
      v2: Moved of_node_release() into dynamic.c
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      6afc0dc3
    • P
      of: rename of_aliases_mutex to just of_mutex · c05aba2b
      Pantelis Antoniou 提交于
      We're overloading usage of of_aliases_mutex for sysfs changes,
      so rename to something that is more generic.
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      c05aba2b
    • G
      of/platform: Fix of_platform_device_destroy iteration of devices · 75f353b6
      Grant Likely 提交于
      of_platform_destroy does not work properly, since the tree
      population test was iterating on all devices having as its parent
      the given platform device.
      
      The check was intended to check whether any other platform or amba
      devices created by of_platform_populate were still populated, but
      instead checked for every kind of device. This is wrong, since platform
      devices typically create a subsystem regular device and set themselves
      as parents.
      
      Instead, go ahead and call the unregister functions for any devices
      created with of_platform_populate. The driver core will take care of
      unbinding drivers, and drivers are responsible for getting rid of any
      child devices that weren't created by of_platform_populate.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      75f353b6
    • L
      Linux 3.16-rc4 · cd3de83f
      Linus Torvalds 提交于
      cd3de83f
    • L
      Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux · 100193f5
      Linus Torvalds 提交于
      Pull devicetree bugfix from Grant Likely:
       "Important bug fix for parsing 64-bit addresses on 32-bit platforms.
        Without this patch the kernel will try to use memory ranges that
        cannot be reached"
      
      * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
        of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch
      100193f5
    • L
      Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 8addf0c7
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "This is a set of 13 fixes, a MAINTAINERS update and a sparse update.
        The fixes are mostly correct value initialisations, avoiding NULL
        derefs and some uninitialised pointer avoidance.
      
        All the patches have been incubated in -next for a few days.  The
        final patch (use the scsi data buffer length to extract transfer size)
        has been rebased to add a cc to stable, but only the commit message
        has changed"
      
      * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] use the scsi data buffer length to extract transfer size
        virtio-scsi: fix various bad behavior on aborted requests
        virtio-scsi: avoid cancelling uninitialized work items
        ibmvscsi: Add memory barriers for send / receive
        ibmvscsi: Abort init sequence during error recovery
        qla2xxx: Fix sparse warning in qla_target.c.
        bnx2fc: Improve stats update mechanism
        bnx2fc: do not scan uninitialized lists in case of error.
        fc: ensure scan_work isn't active when freeing fc_rport
        pm8001: Fix potential null pointer dereference and memory leak.
        MAINTAINERS: Update LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) maintainers Email IDs
        be2iscsi: remove potential junk pointer free
        be2iscsi: add an missing goto in error path
        scsi_error: set DID_TIME_OUT correctly
        scsi_error: fix invalid setting of host byte
      8addf0c7
  4. 06 7月, 2014 8 次提交
  5. 05 7月, 2014 6 次提交
    • S
      MAINTAINERS: Add few more Keystone drivers · bc6aa566
      Santosh Shilimkar 提交于
      Update MAINTAINERS file for recently added reset controller, AEMIF
      and clocksource driver for Keystone SOCs.
      
      The EMIF memory controller driver is also added along with AEMIF.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Kevin Hilman <khilman@linaro.org>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      bc6aa566
    • S
      MAINTAINERS: merge MXS entry into IMX one · ce515a6b
      Shawn Guo 提交于
      The mach-mxs platform is actually co-maintained by myself and
      pengutronix folks.  Also it's hosted in the same kernel tree as IMX.
      So let's merge the entry into IMX one.
      Signed-off-by: NShawn Guo <shawn.guo@freescale.com>
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      ce515a6b
    • O
      Merge tag 'mvebu-fixes-3.16-2' of git://git.infradead.org/linux-mvebu into fixes · 25d11631
      Olof Johansson 提交于
      mvebu fixes for v3.16 (round #2)
      
       - mvebu
          - Fix PCIe deadlock now that SMP is enabled
          - Fix cpuidle for big-endian systems
      
      * tag 'mvebu-fixes-3.16-2' of git://git.infradead.org/linux-mvebu:
        ARM: mvebu: fix cpuidle implementation to work on big-endian systems
        ARM: mvebu: update L2/PCIe deadlock workaround after L2CC cleanup
        ARM: mvebu: move Armada 375 external abort logic as a quirk
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      25d11631
    • M
      ARM: sunxi: Reintroduce the restart code for A10/A20 SoCs · d767af5e
      Maxime Ripard 提交于
      This partly reverts commits 55360050 (ARM: sunxi: Remove reset code from
      the platform) and 5e669ec5 (ARM: sunxi: Remove init_machine callback) for
      the sun4i, sun5i and sun7i families.
      
      This is needed because the watchdog counterpart of these commits was dropped,
      and didn't make it into 3.16. In order to still be able to reboot the board, we
      need to reintroduce that code. Of course, the long term view is still to get
      rid of that code in mach-sunxi.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      d767af5e
    • O
      Merge tag 'omap-for-v3.16/fixes-against-rc1' of... · 5acd78c5
      Olof Johansson 提交于
      Merge tag 'omap-for-v3.16/fixes-against-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Merge OMAP fixes from Tony Lindgren:
      
      Fixes for omaps for issues discovered during the merge window and
      enabling of a few features that had to wait for the driver
      dependencies to clear.
      
      The fixes included are:
      
      - Fix am43xx hard reset flags
      - Fix SoC detection for DRA722
      - Fix CPU OPP table for omap5
      - Fix legacy mux parser bug if requested muxname is a prefix of
        multiple mux entries
      - Fix qspi interrupt binding that relies on the irq crossbar
        that has not yet been enabled
      - Add missing phy_sel for am43x-epos-evm
      - Drop unused gic_init_irq() that is no longer needed
      
      And the enabling of features that had driver dependencies are:
      
      - Change dra7 to use Audio Tracking Logic clock instead of a fixed
        clock now that the clock driver for it has been merged
      
      - Enable off idle configuration for selected omaps as all the kernel
        dependencies for device tree based booting are finally merged as
        this is needed to get the automated PM tests working finally with
        device tree based booting
      
      - Add hwmod entry for ocp2scp3 for omap5 to get sata working as
        all the driver dependencies are now in the kernel and this patch
        fell through the cracks during the merge window
      
      * tag 'omap-for-v3.16/fixes-against-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: dra7-evm: remove interrupt binding
        ARM: OMAP2+: Fix parser-bug in platform muxing code
        ARM: DTS: dra7/dra7xx-clocks: ATL related changes
        ARM: OMAP2+: drop unused function
        ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm
        ARM: dts: omap5: Update CPU OPP table as per final production Manual
        ARM: DRA722: add detection of SoC information
        ARM: dts: Enable twl4030 off-idle configuration for selected omaps
        ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
        ARM: OMAP2+: hwmod: Change hardreset soc_ops for AM43XX
      5acd78c5
    • L
      Merge tag 'md/3.16-fixes' of git://neil.brown.name/md · 77c4cf17
      Linus Torvalds 提交于
      Pull md bugfixes from Neil Brown:
       "Two minor bugfixes for md in 3.16"
      
      * tag 'md/3.16-fixes' of git://neil.brown.name/md:
        md: flush writes before starting a recovery.
        md: make sure GET_ARRAY_INFO ioctl reports correct "clean" status
      77c4cf17
  6. 04 7月, 2014 15 次提交