1. 13 1月, 2014 6 次提交
    • G
      powerpc/mpc512x: improve DIU related clock setup · ba218127
      Gerhard Sittig 提交于
      adapt the DIU clock initialization to the COMMON_CLK approach:
      device tree based clock lookup, prepare and unprepare for clocks,
      work with frequencies not dividers, call the appropriate clk_*()
      routines and don't access CCM registers
      
      the "best clock" determination now completely relies on the
      platform's clock driver to pick a frequency close to what the
      caller requests, and merely checks whether the desired frequency
      was met (fits the tolerance of the monitor)
      
      this approach shall succeed upon first try in the usual case,
      will test a few less desirable yet acceptable frequencies in
      edge cases, and will fallback to "best effort" if none of the
      previously tried frequencies pass the test
      
      provide a fallback clock lookup approach in case the OF based clock
      lookup for the DIU fails, this allows for successful operation in
      the presence of an outdated device tree which lacks clock specs
      
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      ba218127
    • G
      clk: mpc5xxx: switch to COMMON_CLK, retire PPC_CLOCK · 7d71d5b2
      Gerhard Sittig 提交于
      the setup before the change was
      - arch/powerpc/Kconfig had the PPC_CLOCK option, off by default
      - depending on the PPC_CLOCK option the arch/powerpc/kernel/clock.c file
        was built, which implements the clk.h API but always returns -ENOSYS
        unless a platform registers specific callbacks
      - the MPC52xx platform selected PPC_CLOCK but did not register any
        callbacks, thus all clk.h API calls keep resulting in -ENOSYS errors
        (which is OK, all peripheral drivers deal with the situation)
      - the MPC512x platform selected PPC_CLOCK and registered specific
        callbacks implemented in arch/powerpc/platforms/512x/clock.c, thus
        provided real support for the clock API
      - no other powerpc platform did select PPC_CLOCK
      
      the situation after the change is
      - the MPC512x platform implements the COMMON_CLK interface, and thus the
        PPC_CLOCK approach in arch/powerpc/platforms/512x/clock.c has become
        obsolete
      - the MPC52xx platform still lacks genuine support for the clk.h API
        while this is not a change against the previous situation (the error
        code returned from COMMON_CLK stubs differs but every call still
        results in an error)
      - with all references gone, the arch/powerpc/kernel/clock.c wrapper and
        the PPC_CLOCK option have become obsolete, as did the clk_interface.h
        header file
      
      the switch from PPC_CLOCK to COMMON_CLK is done for all platforms within
      the same commit such that multiplatform kernels (the combination of 512x
      and 52xx within one executable) keep working
      
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      7d71d5b2
    • G
      dts: mpc512x: add clock specs for client lookups · 124fe7c5
      Gerhard Sittig 提交于
      this addresses the client side of device tree based clock lookups
      
      add clock specifiers to the mbx, nfc, mscan, sdhc, i2c, axe, diu, viu,
      mdio, fec, usb, pata, psc, psc fifo, and pci nodes in the shared
      mpc5121.dtsi include
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: devicetree@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Reviewed-by: NMike Turquette <mturquette@linaro.org>
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      124fe7c5
    • G
      clk: mpc512x: add backwards compat to the CCF code · 01f25c37
      Gerhard Sittig 提交于
      extend the recently added COMMON_CLK platform support for MPC512x such
      that it works with incomplete device tree data which lacks clock specs
      
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      [agust@denx.de: moved node macro definitions out of the function body]
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      01f25c37
    • G
      clk: mpc512x: introduce COMMON_CLK for MPC512x (disabled) · 6d8cdb68
      Gerhard Sittig 提交于
      this change implements a clock driver for the MPC512x PowerPC platform
      which follows the COMMON_CLK approach and uses common clock drivers
      shared with other platforms
      
      this driver implements the publicly announced set of clocks (those
      listed in the dt-bindings header file), as well as generates additional
      'struct clk' items where the SoC hardware cannot easily get mapped to
      the common primitives (shared code) of the clock API, or requires
      "intermediate clock nodes" to represent clocks that have both gates and
      dividers
      
      the previous PPC_CLOCK implementation is kept in place and remains
      active for the moment, the newly introduced CCF clock driver will
      receive additional support for backwards compatibility in a subsequent
      patch before it gets enabled and will replace the PPC_CLOCK approach
      
      some of the clock items get pre-enabled in the clock driver to not have
      them automatically disabled by the underlying clock subsystem because of
      their being unused -- this approach is desirable because
      - some of the clocks are useful to have for diagnostics and information
        despite their not getting claimed by any drivers (CPU, internal and
        external RAM, internal busses, boot media)
      - some of the clocks aren't claimed by their peripheral drivers yet,
        either because of missing driver support or because device tree specs
        aren't available yet (but the workarounds will get removed as the
        drivers get adjusted and the device tree provides the clock specs)
      
      clkdev registration provides "alias names" for few clock items
      - to not break those peripheral drivers which encode their component
        index into the name that is used for clock lookup (UART, SPI, USB)
      - to not break those drivers which use names for the clock lookup which
        were encoded in the previous PPC_CLOCK implementation (NFC, VIU, CAN)
      this workaround will get removed as these drivers get adjusted after
      device tree based clock lookup has become available
      
      the COMMON_CLK implementation copes with device trees which lack an
      oscillator node (backwards compat), the REF clock is then derived from
      the IPS bus frequency and multiplier values fetched from hardware
      
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      6d8cdb68
    • G
      dts: mpc512x: add clock related device tree specs · f87ccd2e
      Gerhard Sittig 提交于
      this addresses the clock driver aka provider's side of clocks
      - introduce a 'clocks' subtree with an 'osc' node for the crystal
        or oscillator SoC input (fixed frequency)
      - the 'clock@f00' clock-control-module node references the 'osc' for
        its input, and is another provider for all the clocks which the
        CCM component manages
      - prepare for future references to clocks from peripheral nodes
        by means of the <&clks ID> syntax and symbolic ID names which a
        header file provides
      - provide default values with 33MHz oscillator frequency in the
        common include (the 66MHz IPS bus already was there), and add
        override values for the ifm AC14xx board which deviates from
        the reference design (25MHz xtal, 80MHz IPS bus)
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: devicetree@vger.kernel.org
      Reviewed-by: NMike Turquette <mturquette@linaro.org>
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      f87ccd2e
  2. 30 12月, 2013 13 次提交
  3. 21 12月, 2013 1 次提交
  4. 19 12月, 2013 1 次提交
    • G
      powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node (5125) · bbca4d39
      Gerhard Sittig 提交于
      the 'soc' node in the MPC5125 "tower" board .dts has an '#interrupt-cells'
      property although this node is not an interrupt controller
      
      remove this erroneously placed property because starting with v3.13-rc1
      lookup and resolution of 'interrupts' specs for peripherals gets misled
      (tries to use the 'soc' as the interrupt parent which fails), emits
      'no irq domain found' WARN() messages and breaks the boot process
      
      [ best viewed with 'git diff -U5' to have DT node names in the context ]
      
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: devicetree@vger.kernel.org
      Signed-off-by: NGerhard Sittig <gsi@denx.de>
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      bbca4d39
  5. 13 12月, 2013 10 次提交
  6. 10 12月, 2013 7 次提交
  7. 09 12月, 2013 2 次提交