diff options
author | Tony Lindgren <tony@atomide.com> | 2015-05-11 16:23:19 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2015-05-11 16:23:19 -0400 |
commit | e60a8fe1792dcd3aacda0959e0f4865bfefb7bb5 (patch) | |
tree | 834baff6e4f9ddd11ef3489dbbfa205ebb699347 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | b0897972edfa42b4af5c3189b2b7a7fac5867828 (diff) | |
parent | a5bf00cd735fbc293da8a9bada589c02861c8132 (diff) |
Merge tag 'for-v4.1-rc/omap-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v4.1/fixes
ARM: OMAP2+: first set of hwmod fixes for v4.1-rc
Fix a few AM43xx problems: add the VPFE hwmod data, which removes some
warnings; and fix the IP block hardreset implementation.
Basic build, boot, and PM test results are here:
http://www.pwsan.com/omap/testlogs/omap-hwmod-a-for-v4.1-rc/20150508130543/
Note that I do not have an AM43xx board in the testbed, and thus
cannot test on that platform.
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 68 |
1 files changed, 14 insertions, 54 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 355b08936871..752969ff9de0 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -171,6 +171,12 @@ | |||
171 | */ | 171 | */ |
172 | #define LINKS_PER_OCP_IF 2 | 172 | #define LINKS_PER_OCP_IF 2 |
173 | 173 | ||
174 | /* | ||
175 | * Address offset (in bytes) between the reset control and the reset | ||
176 | * status registers: 4 bytes on OMAP4 | ||
177 | */ | ||
178 | #define OMAP4_RST_CTRL_ST_OFFSET 4 | ||
179 | |||
174 | /** | 180 | /** |
175 | * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations | 181 | * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations |
176 | * @enable_module: function to enable a module (via MODULEMODE) | 182 | * @enable_module: function to enable a module (via MODULEMODE) |
@@ -3016,10 +3022,12 @@ static int _omap4_deassert_hardreset(struct omap_hwmod *oh, | |||
3016 | if (ohri->st_shift) | 3022 | if (ohri->st_shift) |
3017 | pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", | 3023 | pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", |
3018 | oh->name, ohri->name); | 3024 | oh->name, ohri->name); |
3019 | return omap_prm_deassert_hardreset(ohri->rst_shift, 0, | 3025 | return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->rst_shift, |
3020 | oh->clkdm->pwrdm.ptr->prcm_partition, | 3026 | oh->clkdm->pwrdm.ptr->prcm_partition, |
3021 | oh->clkdm->pwrdm.ptr->prcm_offs, | 3027 | oh->clkdm->pwrdm.ptr->prcm_offs, |
3022 | oh->prcm.omap4.rstctrl_offs, 0); | 3028 | oh->prcm.omap4.rstctrl_offs, |
3029 | oh->prcm.omap4.rstctrl_offs + | ||
3030 | OMAP4_RST_CTRL_ST_OFFSET); | ||
3023 | } | 3031 | } |
3024 | 3032 | ||
3025 | /** | 3033 | /** |
@@ -3048,27 +3056,6 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh, | |||
3048 | } | 3056 | } |
3049 | 3057 | ||
3050 | /** | 3058 | /** |
3051 | * _am33xx_assert_hardreset - call AM33XX PRM hardreset fn with hwmod args | ||
3052 | * @oh: struct omap_hwmod * to assert hardreset | ||
3053 | * @ohri: hardreset line data | ||
3054 | * | ||
3055 | * Call am33xx_prminst_assert_hardreset() with parameters extracted | ||
3056 | * from the hwmod @oh and the hardreset line data @ohri. Only | ||
3057 | * intended for use as an soc_ops function pointer. Passes along the | ||
3058 | * return value from am33xx_prminst_assert_hardreset(). XXX This | ||
3059 | * function is scheduled for removal when the PRM code is moved into | ||
3060 | * drivers/. | ||
3061 | */ | ||
3062 | static int _am33xx_assert_hardreset(struct omap_hwmod *oh, | ||
3063 | struct omap_hwmod_rst_info *ohri) | ||
3064 | |||
3065 | { | ||
3066 | return omap_prm_assert_hardreset(ohri->rst_shift, 0, | ||
3067 | oh->clkdm->pwrdm.ptr->prcm_offs, | ||
3068 | oh->prcm.omap4.rstctrl_offs); | ||
3069 | } | ||
3070 | |||
3071 | /** | ||
3072 | * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args | 3059 | * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args |
3073 | * @oh: struct omap_hwmod * to deassert hardreset | 3060 | * @oh: struct omap_hwmod * to deassert hardreset |
3074 | * @ohri: hardreset line data | 3061 | * @ohri: hardreset line data |
@@ -3083,32 +3070,13 @@ static int _am33xx_assert_hardreset(struct omap_hwmod *oh, | |||
3083 | static int _am33xx_deassert_hardreset(struct omap_hwmod *oh, | 3070 | static int _am33xx_deassert_hardreset(struct omap_hwmod *oh, |
3084 | struct omap_hwmod_rst_info *ohri) | 3071 | struct omap_hwmod_rst_info *ohri) |
3085 | { | 3072 | { |
3086 | return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift, 0, | 3073 | return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift, |
3074 | oh->clkdm->pwrdm.ptr->prcm_partition, | ||
3087 | oh->clkdm->pwrdm.ptr->prcm_offs, | 3075 | oh->clkdm->pwrdm.ptr->prcm_offs, |
3088 | oh->prcm.omap4.rstctrl_offs, | 3076 | oh->prcm.omap4.rstctrl_offs, |
3089 | oh->prcm.omap4.rstst_offs); | 3077 | oh->prcm.omap4.rstst_offs); |
3090 | } | 3078 | } |
3091 | 3079 | ||
3092 | /** | ||
3093 | * _am33xx_is_hardreset_asserted - call AM33XX PRM hardreset fn with hwmod args | ||
3094 | * @oh: struct omap_hwmod * to test hardreset | ||
3095 | * @ohri: hardreset line data | ||
3096 | * | ||
3097 | * Call am33xx_prminst_is_hardreset_asserted() with parameters | ||
3098 | * extracted from the hwmod @oh and the hardreset line data @ohri. | ||
3099 | * Only intended for use as an soc_ops function pointer. Passes along | ||
3100 | * the return value from am33xx_prminst_is_hardreset_asserted(). XXX | ||
3101 | * This function is scheduled for removal when the PRM code is moved | ||
3102 | * into drivers/. | ||
3103 | */ | ||
3104 | static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh, | ||
3105 | struct omap_hwmod_rst_info *ohri) | ||
3106 | { | ||
3107 | return omap_prm_is_hardreset_asserted(ohri->rst_shift, 0, | ||
3108 | oh->clkdm->pwrdm.ptr->prcm_offs, | ||
3109 | oh->prcm.omap4.rstctrl_offs); | ||
3110 | } | ||
3111 | |||
3112 | /* Public functions */ | 3080 | /* Public functions */ |
3113 | 3081 | ||
3114 | u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) | 3082 | u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) |
@@ -3908,21 +3876,13 @@ void __init omap_hwmod_init(void) | |||
3908 | soc_ops.init_clkdm = _init_clkdm; | 3876 | soc_ops.init_clkdm = _init_clkdm; |
3909 | soc_ops.update_context_lost = _omap4_update_context_lost; | 3877 | soc_ops.update_context_lost = _omap4_update_context_lost; |
3910 | soc_ops.get_context_lost = _omap4_get_context_lost; | 3878 | soc_ops.get_context_lost = _omap4_get_context_lost; |
3911 | } else if (soc_is_am43xx()) { | 3879 | } else if (cpu_is_ti816x() || soc_is_am33xx() || soc_is_am43xx()) { |
3912 | soc_ops.enable_module = _omap4_enable_module; | 3880 | soc_ops.enable_module = _omap4_enable_module; |
3913 | soc_ops.disable_module = _omap4_disable_module; | 3881 | soc_ops.disable_module = _omap4_disable_module; |
3914 | soc_ops.wait_target_ready = _omap4_wait_target_ready; | 3882 | soc_ops.wait_target_ready = _omap4_wait_target_ready; |
3915 | soc_ops.assert_hardreset = _omap4_assert_hardreset; | 3883 | soc_ops.assert_hardreset = _omap4_assert_hardreset; |
3916 | soc_ops.deassert_hardreset = _omap4_deassert_hardreset; | ||
3917 | soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; | ||
3918 | soc_ops.init_clkdm = _init_clkdm; | ||
3919 | } else if (cpu_is_ti816x() || soc_is_am33xx()) { | ||
3920 | soc_ops.enable_module = _omap4_enable_module; | ||
3921 | soc_ops.disable_module = _omap4_disable_module; | ||
3922 | soc_ops.wait_target_ready = _omap4_wait_target_ready; | ||
3923 | soc_ops.assert_hardreset = _am33xx_assert_hardreset; | ||
3924 | soc_ops.deassert_hardreset = _am33xx_deassert_hardreset; | 3884 | soc_ops.deassert_hardreset = _am33xx_deassert_hardreset; |
3925 | soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted; | 3885 | soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; |
3926 | soc_ops.init_clkdm = _init_clkdm; | 3886 | soc_ops.init_clkdm = _init_clkdm; |
3927 | } else { | 3887 | } else { |
3928 | WARN(1, "omap_hwmod: unknown SoC type\n"); | 3888 | WARN(1, "omap_hwmod: unknown SoC type\n"); |