Skip to content
  1. Apr 07, 2018
    • Stephen Boyd's avatar
      Merge branch 'clk-davinci' into clk-next · b44c4ddf
      Stephen Boyd authored
      * clk-davinci:
        clk: davinci: add a reset lookup table for psc0
        reset: modify the way reset lookup works for board files
        reset: add support for non-DT systems
      b44c4ddf
    • Bartosz Golaszewski's avatar
      clk: davinci: add a reset lookup table for psc0 · 5ced1923
      Bartosz Golaszewski authored
      
      
      In order to be able to use the reset framework in legacy boot mode as
      well, add the reset lookup table to the psc driver for da850 variant.
      
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Reviewed-by: default avatarDavid Lechner <david@lechnology.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      5ced1923
    • Stephen Boyd's avatar
      Merge branch 'reset/lookup' of git://git.pengutronix.de/git/pza/linux into clk-davinci · ac8e5cc7
      Stephen Boyd authored
      We need this to be able to use the reset_controller_add_lookup() API.
      
      * 'reset/lookup' of git://git.pengutronix.de/git/pza/linux:
        reset: modify the way reset lookup works for board files
        reset: add support for non-DT systems
      ac8e5cc7
    • Stephen Boyd's avatar
      Merge branches 'clk-stratix10', 'clk-imx', 'clk-bcm', 'clk-cs2000' and 'clk-imx6sll' into clk-next · a339bdf6
      Stephen Boyd authored
      * clk-stratix10:
        clk: socfpga: stratix10: add clock driver for Stratix10 platform
        dt-bindings: documentation: add clock bindings information for Stratix10
      
      * clk-imx:
        clk: imx7d: Move clks_init_on before any clock operations
        clk: imx7d: Correct ahb clk parent select
        clk: imx7d: Correct dram pll type
        clk: imx7d: Add USB clock information
        clk: imx: pllv2: avoid using uninitialized values
        clk: imx6ull: Add epdc_podf instead of sim_podf
        clk: imx: imx7d: correct video pll clock tree
        clk: imx: imx7d: add the Keypad Port module clock
        clk: imx7d: add CAAM clock
        clk: imx: imx7d: add the snvs clock
        clk: imx: imx6sx: update cko mux options
      
      * clk-bcm:
        clk: bcm2835: De-assert/assert PLL reset signal when appropriate
      
      * clk-cs2000:
        clk: cs2000: set pm_ops in hibernate-compatible way
      
      * clk-imx6sll:
        clk: imx: add clock driver for imx6sll
        dt-bindings: imx: update clock doc for imx6sll
        clk: imx: add new gate/gate2 wrapper funtion
        clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux
      a339bdf6
    • Stephen Boyd's avatar
      Merge branches 'clk-davinci', 'clk-si544', 'clk-rockchip', 'clk-uniphier' and... · a83fdfae
      Stephen Boyd authored
      Merge branches 'clk-davinci', 'clk-si544', 'clk-rockchip', 'clk-uniphier' and 'clk-ti-flag-fix' into clk-next
      
      * clk-davinci:
        clk: davinci: Remove redundant dev_err calls
        clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks
        clk: davinci: New driver for TI DA8XX CFGCHIP clocks
        dt-bindings: clock: Add bindings for DA8XX CFGCHIP clocks
        clk: davinci: Add platform information for TI DM646x PSC
        clk: davinci: Add platform information for TI DM644x PSC
        clk: davinci: Add platform information for TI DM365 PSC
        clk: davinci: Add platform information for TI DM355 PSC
        clk: davinci: Add platform information for TI DA850 PSC
        clk: davinci: Add platform information for TI DA830 PSC
        clk: davinci: New driver for davinci PSC clocks
        dt-bindings: clock: New bindings for TI Davinci PSC
        clk: davinci: Add platform information for TI DM646x PLL
        clk: davinci: Add platform information for TI DM644x PLL
        clk: davinci: Add platform information for TI DM365 PLL
        clk: davinci: Add platform information for TI DM355 PLL
        clk: davinci: Add platform information for TI DA850 PLL
        clk: davinci: Add platform information for TI DA830 PLL
        clk: davinci: New driver for davinci PLL clocks
        dt-bindings: clock: Add new bindings for TI Davinci PLL clocks
      
      * clk-si544:
        clk: Add driver for the si544 clock generator chip
      
      * clk-rockchip:
        clk: rockchip: assign correct id for pclk_ddr and hclk_sd in rk3399
        clk: rockchip: Fix error return in phase clock registration
        clk: rockchip: Correct the behaviour of restoring cached phase
        clk: rockchip: Fix wrong parents for MMC phase clock for rk3328
        clk: rockchip: Fix wrong parent for SDMMC phase clock for rk3228
        clk: rockchip: Add 1.6GHz PLL rate for rk3399
        clk: rockchip: Restore the clock phase after the rate was changed
        clk: rockchip: Prevent calculating mmc phase if clock rate is zero
        clk: rockchip: Free the memory on the error path
        clk: rockchip: document hdmi_phy external input for rk3328
        clk: rockchip: add flags for rk3328 dclk_lcdc
        clk: rockchip: remove ignore_unused flag from rk3328 vio_h2p clocks
        clk: rockchip: protect all remaining rk3328 interconnect clocks
        clk: rockchip: export sclk_hdmi_sfc on rk3328
        clk: rockchip: remove HCLK_VIO from rk3328 dt header
        clk: rockchip: fix hclk_vio_niu on rk3328
      
      * clk-uniphier:
        clk: uniphier: add additional ethernet clock lines for Pro4
        clk: uniphier: add SATA clock control support
        clk: uniphier: add PCIe clock control support
        clk: uniphier: add ethernet clock control support for PXs3
        clk: uniphier: add Pro4/Pro5/PXs2 audio system clock
      
      * clk-ti-flag-fix:
        clk: ti: fix flag space conflict with clkctrl clocks
        clk: ti: clkctrl: add support for CLK_SET_RATE_PARENT flag
      a83fdfae
    • Stephen Boyd's avatar
      Merge branches 'clk-mediatek', 'clk-hisi', 'clk-allwinner', 'clk-ux500' and... · b0378192
      Stephen Boyd authored
      Merge branches 'clk-mediatek', 'clk-hisi', 'clk-allwinner', 'clk-ux500' and 'clk-renesas' into clk-next
      
      * clk-mediatek:
        clk: mediatek: add audsys support for MT2701
        clk: mediatek: add devm_of_platform_populate() for MT7622 audsys
        dt-bindings: clock: mediatek: add audsys support for MT2701
        dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device
        clk: mediatek: update missing clock data for MT7622 audsys
        clk: mediatek: fix PWM clock source by adding a fixed-factor clock
        dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4
      
      * clk-hisi:
        clk: hisilicon: fix potential NULL dereference in hisi_clk_alloc()
        clk: hisilicon: mark wdt_mux_p[] as const
        clk: hisilicon: Mark phase_ops static
        clk: hi3798cv200: add emmc sample and drive clock
        clk: hisilicon: add hisi phase clock support
        clk: hi3798cv200: add COMBPHY0 clock support
        clk: hi3798cv200: fix define indentation
        clk: hi3798cv200: add support for HISTB_USB2_OTG_UTMI_CLK
        clk: hi3798cv200: correct IR clock parent
        clk: hi3798cv200: fix unregister call sequence in error path
      
      * clk-allwinner:
        clk: sunxi-ng: add missing hdmi-slow clock for H6 CCU
        clk: sunxi-ng: add support for the Allwinner H6 CCU
        dt-bindings: add device tree binding for Allwinner H6 main CCU
        clk: sunxi-ng: Support fixed post-dividers on NKMP style clocks
        clk: sunxi-ng: h3: h5: export CLK_PLL_VIDEO
        clk: sunxi-ng: h3: h5: Allow some clocks to set parent rate
        clk: sunxi-ng: h3: h5: Add minimal rate for video PLL
        clk: sunxi-ng: Add check for minimal rate to NM PLLs
        clk: sunxi-ng: Use u64 for calculation of nkmp rate
        clk: sunxi-ng: Mask nkmp factors when setting register
        clk: sunxi-ng: remove select on obsolete SUNXI_CCU_X kconfig name
      
      * clk-ux500:
        clk: ux500: Drop AB8540/9540 support
      
      * clk-renesas: (27 commits)
        clk: renesas: cpg-mssr: Adjust r8a77980 ifdef
        clk: renesas: rcar-gen3: Always use readl()/writel()
        clk: renesas: sh73a0: Always use readl()/writel()
        clk: renesas: rza1: Always use readl()/writel()
        clk: renesas: rcar-gen2: Always use readl()/writel()
        clk: renesas: r8a7740: Always use readl()/writel()
        clk: renesas: r8a73a4: Always use readl()/writel()
        clk: renesas: mstp: Always use readl()/writel()
        clk: renesas: div6: Always use readl()/writel()
        clk: fix false-positive Wmaybe-uninitialized warning
        clk: renesas: r8a77965: Replace DU2 clock
        clk: renesas: cpg-mssr: Add support for R-Car M3-N
        clk: renesas: cpg-mssr: add R8A77980 support
        dt-bindings: clock: add R8A77980 CPG core clock definitions
        clk: renesas: r8a7792: Add rwdt clock
        clk: renesas: r8a7794: Add rwdt clock
        clk: renesas: r8a7791/r8a7793: Add rwdt clock
        clk: renesas: r8a7790: Add rwdt clock
        clk: renesas: r8a7745: Add rwdt clock
        clk: renesas: r8a7743: Add rwdt clock
        ...
      b0378192
    • Stephen Boyd's avatar
      Merge branches 'clk-mvebu', 'clk-phase', 'clk-nxp', 'clk-mtk2712' and... · fbc20b8c
      Stephen Boyd authored
      Merge branches 'clk-mvebu', 'clk-phase', 'clk-nxp', 'clk-mtk2712' and 'clk-qcom-rpmcc' into clk-next
      
      * clk-mvebu:
        clk: mvebu: armada-38x: add support for missing clocks
        clk: mvebu: cp110: Fix clock tree representation
      
      * clk-phase:
        clk: Don't show the incorrect clock phase
        clk: update cached phase to respect the fact when setting phase
      
      * clk-nxp:
        clk: lpc32xx: Set name of regmap_config
      
      * clk-mtk2712:
        clk: mediatek: update clock driver of MT2712
        dt-bindings: clock: add clocks for MT2712
      
      * clk-qcom-rpmcc:
        clk: qcom: rpmcc: Add support to XO buffered clocks
      fbc20b8c
    • Stephen Boyd's avatar
      Merge branches 'clk-spreadtrum', 'clk-stm32f', 'clk-stm32mp1', 'clk-hi655x'... · e8121d98
      Stephen Boyd authored
      Merge branches 'clk-spreadtrum', 'clk-stm32f', 'clk-stm32mp1', 'clk-hi655x' and 'clk-gpio' into clk-next
      
      * clk-spreadtrum:
        clk: sprd: add RTC gate for SC9860
        dt-bindings: clocks: add APB RTC gate for SC9860
      
      * clk-stm32f:
        clk: stm32: Add clk entry for SDMMC2 on stm32F769
        clk: stm32: Add DSI clock for STM32F469 Board
        clk: stm32: END_PRIMARY_CLK should be declare after CLK_SYSCLK
      
      * clk-stm32mp1:
        clk: stm32: add configuration flags for each of the stm32 drivers
        clk: stm32mp1: add Debug clocks
        clk: stm32mp1: add MCO clocks
        clk: stm32mp1: add RTC clock
        clk: stm32mp1: add Peripheral & Kernel Clocks
        clk: stm32mp1: add Kernel timers
        clk: stm32mp1: add Sub System clocks
        clk: stm32mp1: add Post-dividers for PLL
        clk: stm32mp1: add PLL clocks
        clk: stm32mp1: add Source Clocks for PLLs
        clk: stm32mp1: add MP1 gate for hse/hsi/csi oscillators
        clk: stm32mp1: Introduce STM32MP1 clock driver
        dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings
      
      * clk-hi655x:
        clk: enable hi655x common clk automatically
      
      * clk-gpio:
        clk: clk-gpio: Allow GPIO to sleep in set/get_parent
      e8121d98
    • Stephen Boyd's avatar
      Merge branches 'clk-versatile', 'clk-doc', 'clk-must-check', 'clk-qcom' and... · caa9f3b7
      Stephen Boyd authored
      Merge branches 'clk-versatile', 'clk-doc', 'clk-must-check', 'clk-qcom' and 'clk-debugfs' into clk-next
      
      * clk-versatile:
        clk: versatile: Remove WARNs in ->round_rate()
        clk: versatile: add min/max rate boundaries for vexpress osc clock
      
      * clk-doc:
        Documentation: clk: enable lock is not held for clk_is_enabled API
      
      * clk-must-check:
        clk: add more __must_check for bulk APIs
      
      * clk-qcom:
        clk: qcom: smd-rpm: Migrate to devm_of_clk_add_hw_provider()
        clk: qcom: gcc-msm8996: Mark aggre0 noc clks as critical
      
      * clk-debugfs:
        clk: Re-use DEFINE_SHOW_ATTRIBUTE() macro
      caa9f3b7
    • Stephen Boyd's avatar
      Merge branches 'clk-ti', 'clk-amlogic', 'clk-tegra' and 'clk-samsung' into clk-next · 15afa044
      Stephen Boyd authored
      * clk-ti:
        clk: keystone: sci-clk: add support for dynamically probing clocks
        clk: ti: add support for clock latching to mux clocks
        clk: ti: add support for clock latching to divider clocks
        clk: ti: add generic support for clock latching
        clk: ti: add support for register read-modify-write low-level operation
        dt-bindings: clock: ti: add latching support to mux and divider clocks
      
      * clk-amlogic: (50 commits)
        clk: meson: Drop unused local variable and add static
        clk: meson: clean-up clk81 clocks
        clk: meson: add fdiv clock gates
        clk: meson: add mpll pre-divider
        clk: meson: axg: add hifi pll clock
        clk: meson: axg: add hifi clock bindings
        clk: meson: add ROUND_CLOSEST to the pll driver
        clk: meson: add gp0 frac parameter for axg and gxl
        clk: meson: improve pll driver results with frac
        clk: meson: remove special gp0 lock loop
        clk: meson: poke pll CNTL last
        clk: meson: add fractional part of meson8b fixed_pll
        clk: meson: use hhi syscon if available
        clk: meson: remove obsolete cpu_clk
        clk: meson: rework meson8b cpu clock
        clk: meson: split divider and gate part of mpll
        clk: meson: migrate plls clocks to clk_regmap
        clk: meson: migrate the audio divider clock to clk_regmap
        clk: meson: migrate mplls clocks to clk_regmap
        clk: meson: add regmap helpers for parm
        ...
      
      * clk-tegra:
        clk: tegra: Fix pll_u rate configuration
        clk: tegra: Specify VDE clock rate
        clk: tegra20: Correct PLL_C_OUT1 setup
        clk: tegra: Mark HCLK, SCLK and EMC as critical
        clk: tegra: MBIST work around for Tegra210
        clk: tegra: add fence_delay for clock registers
        clk: tegra: Add la clock for Tegra210
      
      * clk-samsung: (22 commits)
        clk: samsung: Mark a few things static
        clk: samsung: Add fout=196608001 Hz EPLL rate entry for exynos4412
        clk: samsung: exynos5250: Add missing clocks for FIMC LITE SYSMMU devices
        clk: samsung: exynos5420: Add more entries to EPLL rate table
        clk: samsung: exynos5420: Add CLK_SET_RATE_PARENT flag to mout_mau_epll_clk
        clk: samsung: exynos5250: Move PD-dependent clocks to Exynos5 sub-CMU
        clk: samsung: exynos5420: Move PD-dependent clocks to Exynos5 sub-CMU
        clk: samsung: Add Exynos5 sub-CMU clock driver
        soc: samsung: pm_domains: Add blacklisting clock handling
        clk: samsung: Add compile time PLL rate validators
        clk: samsung: s3c2410: Fix PLL rates
        clk: samsung: exynos7: Fix PLL rates
        clk: samsung: exynos5433: Fix PLL rates
        clk: samsung: exynos5260: Fix PLL rates
        clk: samsung: exynos5250: Fix PLL rates
        clk: samsung: exynos3250: Fix PLL rates
        clk: exynos5433: Extend list of available AUD_PLL output frequencies
        clk: exynos5433: Add CLK_IGNORE_UNUSED flag to sclk_ioclk_i2s1_bclk
        clk: samsung: Add a git tree entry to MAINTAINERS
        clk: samsung: Remove redundant dev_err call in exynos_audss_clk_probe()
        ...
      15afa044
    • Bai Ping's avatar
      clk: imx: add clock driver for imx6sll · 4a5f720b
      Bai Ping authored
      
      
      Add clk driver support for imx6sll.
      
      Signed-off-by: default avatarBai Ping <ping.bai@nxp.com>
      Acked-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      4a5f720b
    • Bai Ping's avatar
      dt-bindings: imx: update clock doc for imx6sll · 0c123a4f
      Bai Ping authored
      
      
      Add clock binding doc update for imx6sll.
      
      Signed-off-by: default avatarBai Ping <ping.bai@nxp.com>
      Acked-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      0c123a4f
    • Bai Ping's avatar
      clk: imx: add new gate/gate2 wrapper funtion · 2b18cc1f
      Bai Ping authored
      
      
      Add new gate/gate2 wrapper function to register clocks with optional flags.
      
      Signed-off-by: default avatarBai Ping <ping.bai@nxp.com>
      Acked-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      2b18cc1f
    • Bai Ping's avatar
      clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux · 6f9575e5
      Bai Ping authored
      
      
      The busy divider and busy mux is actually used by the system critical clocks,
      so add 'CLK_IS_CRITICAL' to clocks registered with these two type.
      
      Signed-off-by: default avatarBai Ping <ping.bai@nxp.com>
      Acked-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      6f9575e5
    • Nikita Yushchenko's avatar
      clk: cs2000: set pm_ops in hibernate-compatible way · eade4ccd
      Nikita Yushchenko authored
      
      
      Use SET_LATE_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to
      .resume_early field.
      
      This fixes initialization of CS2000 in restore from hibernation in case
      of kernel used to load image did not initialize CS2000 while kernel
      being restored had CS2000 initialized.
      
      Signed-off-by: default avatarNikita Yushchenko <nikita.yoush@cogentembedded.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      eade4ccd
    • Boris Brezillon's avatar
      clk: bcm2835: De-assert/assert PLL reset signal when appropriate · 75387237
      Boris Brezillon authored
      In order to enable a PLL, not only the PLL has to be powered up and
      locked, but you also have to de-assert the reset signal. The last part
      was missing. Add it so PLLs that were not enabled by the FW/bootloader
      can be enabled from Linux.
      
      Fixes: 41691b88
      
       ("clk: bcm2835: Add support for programming the audio domain clocks")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      75387237
    • Dong Aisheng's avatar
      clk: imx7d: Move clks_init_on before any clock operations · 8d41e653
      Dong Aisheng authored
      
      
      For init on clocks we should move it at the first place in imx7d_clocks_init()
      before any clock operations, else the clock operation may fail in case the clock
      is still not on.
      
      Acked-by: default avatarRanjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
      Signed-off-by: default avatarDong Aisheng <b29396@freescale.com>
      Signed-off-by: default avatarIrina Tirdea <irina.tirdea@nxp.com>
      Signed-off-by: default avatarAbel Vesa <abel.vesa@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      8d41e653
    • Anson Huang's avatar
      clk: imx7d: Correct ahb clk parent select · a12ec8b6
      Anson Huang authored
      
      
      Design team change the ahb's clk parent options but
      did NOT update the DOC accordingly in time, so the
      AHB/IPG's clk rate in clk tree is incorrect, AHB is
      67.5MHz and IPG is 33.75MHz, but using scope to
      monitor them, they are actually 135MHz and 67.5MHz,
      update the clk parent option to make clk tree info
      correct.
      
      Signed-off-by: default avatarAnson Huang <b20788@freescale.com>
      Signed-off-by: default avatarIrina Tirdea <irina.tirdea@nxp.com>
      Signed-off-by: default avatarAbel Vesa <abel.vesa@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      a12ec8b6
    • Anson Huang's avatar
      clk: imx7d: Correct dram pll type · afe7c08a
      Anson Huang authored
      
      
      DRAM PLL is a audio/video type PLL, need to correct
      it to get correct ops of PLL.
      
      There is a test_div placed before DRAM PLL's gate, so
      add this test div clk.
      
      Signed-off-by: default avatarAnson Huang <b20788@freescale.com>
      Signed-off-by: default avatarIrina Tirdea <irina.tirdea@nxp.com>
      Signed-off-by: default avatarAbel Vesa <abel.vesa@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      afe7c08a
    • Peter Chen's avatar
      clk: imx7d: Add USB clock information · 5fcb4c76
      Peter Chen authored
      
      
      Add USB clock information, the pll_usb_main_clk is USB_PLL at CCM
      which is the output of USBOTG2 PHY.
      
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarIrina Tirdea <irina.tirdea@nxp.com>
      Signed-off-by: default avatarAbel Vesa <abel.vesa@nxp.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      5fcb4c76
    • Dinh Nguyen's avatar
      clk: socfpga: stratix10: add clock driver for Stratix10 platform · 07afb8db
      Dinh Nguyen authored
      
      
      Add a clock driver for the Stratix10 SoC. The driver is similar to the
      Cyclone5/Arria10 platforms, with the exception that this driver only uses
      one single clock binding.
      
      Signed-off-by: default avatarDinh Nguyen <dinguyen@kernel.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      07afb8db
    • Dinh Nguyen's avatar
      dt-bindings: documentation: add clock bindings information for Stratix10 · 89727949
      Dinh Nguyen authored
      
      
      Document that Stratix10 clock bindings, and add the clock header file. The
      clock header is an enumeration of all the different clocks on the Stratix10
      platform.
      
      Signed-off-by: default avatarDinh Nguyen <dinguyen@kernel.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      89727949
  2. Apr 06, 2018
  3. Mar 27, 2018
    • Bartosz Golaszewski's avatar
      reset: modify the way reset lookup works for board files · e2749bb9
      Bartosz Golaszewski authored
      
      
      Commit 7af1bb19f1d7 ("reset: add support for non-DT systems")
      introduced reset control lookup mechanism for boards that still use
      board files.
      
      The routine used to register lookup entries takes the corresponding
      reset_controlled_dev structure as argument.
      
      It's been determined however that for the first user of this new
      interface - davinci psc driver - it will be easier to register the
      lookup entries using the reset controller device name.
      
      This patch changes the way lookup entries are added.
      
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      [p.zabel@pengutronix.de: added missing ERR_PTR]
      Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      e2749bb9
    • Bartosz Golaszewski's avatar
      reset: add support for non-DT systems · 6691dffa
      Bartosz Golaszewski authored
      
      
      The reset framework only supports device-tree. There are some platforms
      however, which need to use it even in legacy, board-file based mode.
      
      An example of such architecture is the DaVinci family of SoCs which
      supports both device tree and legacy boot modes and we don't want to
      introduce any regressions.
      
      We're currently working on converting the platform from its hand-crafted
      clock API to using the common clock framework. Part of the overhaul will
      be representing the chip's power sleep controller's reset lines using
      the reset framework.
      
      This changeset extends the core reset code with a new reset lookup
      entry structure. It contains data allowing the reset core to associate
      reset lines with devices by comparing the dev_id and con_id strings.
      
      It also provides a function allowing drivers to register lookup entries
      with the framework.
      
      The new lookup function is only called as a fallback in case the
      of_node field is NULL and doesn't change anything for current users.
      
      Tested with a dummy reset driver with several lookup entries.
      
      An example lookup table registration from a driver can be found below:
      
      static struct reset_control_lookup foobar_reset_lookup[] = {
      	RESET_LOOKUP("foo.0", "foo", 15),
      	RESET_LOOKUP("bar.0", NULL,   5),
      };
      
      foobar_probe()
      {
      ...
      
              reset_controller_add_lookup(&rcdev, foobar_reset_lookup,
                                          ARRAY_SIZE(foobar_reset_lookup));
      
      ...
      }
      
      Cc: Sekhar Nori <nsekhar@ti.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: David Lechner <david@lechnology.com>
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      6691dffa
  4. Mar 24, 2018
  5. Mar 23, 2018