diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-19 20:13:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-19 20:13:56 -0400 |
commit | 8362fd64f07eaef7155c94fca8dee91c4f99a666 (patch) | |
tree | 2d16af7d7b8cbb5765727493f796d453580fc107 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 24e44913aa746098349370a0f279733c0cadcba7 (diff) | |
parent | 8c0993621c3e5fa52e5425ef2a0f67a0cde07092 (diff) |
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC-related driver updates from Olof Johansson:
"Various driver updates for platforms and a couple of the small driver
subsystems we merge through our tree:
- A driver for SCU (system control) on NXP i.MX8QXP
- Qualcomm Always-on Subsystem messaging driver (AOSS QMP)
- Qualcomm PM support for MSM8998
- Support for a newer version of DRAM PHY driver for Broadcom (DPFE)
- Reset controller support for Bitmain BM1880
- TI SCI (System Control Interface) support for CPU control on AM654
processors
- More TI sysc refactoring and rework"
* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (84 commits)
reset: remove redundant null check on pointer dev
soc: rockchip: work around clang warning
dt-bindings: reset: imx7: Fix the spelling of 'indices'
soc: imx: Add i.MX8MN SoC driver support
soc: aspeed: lpc-ctrl: Fix probe error handling
soc: qcom: geni: Add support for ACPI
firmware: ti_sci: Fix gcc unused-but-set-variable warning
firmware: ti_sci: Use the correct style for SPDX License Identifier
soc: imx8: Use existing of_root directly
soc: imx8: Fix potential kernel dump in error path
firmware/psci: psci_checker: Park kthreads before stopping them
memory: move jedec_ddr.h from include/memory to drivers/memory/
memory: move jedec_ddr_data.c from lib/ to drivers/memory/
MAINTAINERS: Remove myself as qcom maintainer
soc: aspeed: lpc-ctrl: make parameter optional
soc: qcom: apr: Don't use reg for domain id
soc: qcom: fix QCOM_AOSS_QMP dependency and build errors
memory: tegra: Fix -Wunused-const-variable
firmware: tegra: Early resume BPMP
soc/tegra: Select pinctrl for Tegra194
...
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index e0350476feaa..203664c40d3d 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -3442,6 +3442,7 @@ static int omap_hwmod_check_module(struct device *dev, | |||
3442 | * @dev: struct device | 3442 | * @dev: struct device |
3443 | * @oh: module | 3443 | * @oh: module |
3444 | * @sysc_fields: sysc register bits | 3444 | * @sysc_fields: sysc register bits |
3445 | * @clockdomain: clockdomain | ||
3445 | * @rev_offs: revision register offset | 3446 | * @rev_offs: revision register offset |
3446 | * @sysc_offs: sysconfig register offset | 3447 | * @sysc_offs: sysconfig register offset |
3447 | * @syss_offs: sysstatus register offset | 3448 | * @syss_offs: sysstatus register offset |
@@ -3453,6 +3454,7 @@ static int omap_hwmod_check_module(struct device *dev, | |||
3453 | static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh, | 3454 | static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh, |
3454 | const struct ti_sysc_module_data *data, | 3455 | const struct ti_sysc_module_data *data, |
3455 | struct sysc_regbits *sysc_fields, | 3456 | struct sysc_regbits *sysc_fields, |
3457 | struct clockdomain *clkdm, | ||
3456 | s32 rev_offs, s32 sysc_offs, | 3458 | s32 rev_offs, s32 sysc_offs, |
3457 | s32 syss_offs, u32 sysc_flags, | 3459 | s32 syss_offs, u32 sysc_flags, |
3458 | u32 idlemodes) | 3460 | u32 idlemodes) |
@@ -3460,8 +3462,6 @@ static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh, | |||
3460 | struct omap_hwmod_class_sysconfig *sysc; | 3462 | struct omap_hwmod_class_sysconfig *sysc; |
3461 | struct omap_hwmod_class *class = NULL; | 3463 | struct omap_hwmod_class *class = NULL; |
3462 | struct omap_hwmod_ocp_if *oi = NULL; | 3464 | struct omap_hwmod_ocp_if *oi = NULL; |
3463 | struct clockdomain *clkdm = NULL; | ||
3464 | struct clk *clk = NULL; | ||
3465 | void __iomem *regs = NULL; | 3465 | void __iomem *regs = NULL; |
3466 | unsigned long flags; | 3466 | unsigned long flags; |
3467 | 3467 | ||
@@ -3508,36 +3508,6 @@ static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh, | |||
3508 | oi->user = OCP_USER_MPU | OCP_USER_SDMA; | 3508 | oi->user = OCP_USER_MPU | OCP_USER_SDMA; |
3509 | } | 3509 | } |
3510 | 3510 | ||
3511 | if (!oh->_clk) { | ||
3512 | struct clk_hw_omap *hwclk; | ||
3513 | |||
3514 | clk = of_clk_get_by_name(dev->of_node, "fck"); | ||
3515 | if (!IS_ERR(clk)) | ||
3516 | clk_prepare(clk); | ||
3517 | else | ||
3518 | clk = NULL; | ||
3519 | |||
3520 | /* | ||
3521 | * Populate clockdomain based on dts clock. It is needed for | ||
3522 | * clkdm_deny_idle() and clkdm_allow_idle() until we have have | ||
3523 | * interconnect driver and reset driver capable of blocking | ||
3524 | * clockdomain idle during reset, enable and idle. | ||
3525 | */ | ||
3526 | if (clk) { | ||
3527 | hwclk = to_clk_hw_omap(__clk_get_hw(clk)); | ||
3528 | if (hwclk && hwclk->clkdm_name) | ||
3529 | clkdm = clkdm_lookup(hwclk->clkdm_name); | ||
3530 | } | ||
3531 | |||
3532 | /* | ||
3533 | * Note that we assume interconnect driver manages the clocks | ||
3534 | * and do not need to populate oh->_clk for dynamically | ||
3535 | * allocated modules. | ||
3536 | */ | ||
3537 | clk_unprepare(clk); | ||
3538 | clk_put(clk); | ||
3539 | } | ||
3540 | |||
3541 | spin_lock_irqsave(&oh->_lock, flags); | 3511 | spin_lock_irqsave(&oh->_lock, flags); |
3542 | if (regs) | 3512 | if (regs) |
3543 | oh->_mpu_rt_va = regs; | 3513 | oh->_mpu_rt_va = regs; |
@@ -3623,7 +3593,7 @@ int omap_hwmod_init_module(struct device *dev, | |||
3623 | u32 sysc_flags, idlemodes; | 3593 | u32 sysc_flags, idlemodes; |
3624 | int error; | 3594 | int error; |
3625 | 3595 | ||
3626 | if (!dev || !data) | 3596 | if (!dev || !data || !data->name || !cookie) |
3627 | return -EINVAL; | 3597 | return -EINVAL; |
3628 | 3598 | ||
3629 | oh = _lookup(data->name); | 3599 | oh = _lookup(data->name); |
@@ -3694,7 +3664,8 @@ int omap_hwmod_init_module(struct device *dev, | |||
3694 | return error; | 3664 | return error; |
3695 | 3665 | ||
3696 | return omap_hwmod_allocate_module(dev, oh, data, sysc_fields, | 3666 | return omap_hwmod_allocate_module(dev, oh, data, sysc_fields, |
3697 | rev_offs, sysc_offs, syss_offs, | 3667 | cookie->clkdm, rev_offs, |
3668 | sysc_offs, syss_offs, | ||
3698 | sysc_flags, idlemodes); | 3669 | sysc_flags, idlemodes); |
3699 | } | 3670 | } |
3700 | 3671 | ||