diff options
author | Paul Walmsley <paul@pwsan.com> | 2013-02-10 13:22:23 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2013-02-10 13:22:23 -0500 |
commit | c02060d869247215c2ea15fd650c333d30f5b210 (patch) | |
tree | 67fc0df4ec9b8b9b2e174a5e4212b83bd8e56868 /arch/arm | |
parent | cf8ba17154b0977e9195b160aef6c934270a08c1 (diff) |
ARM: OMAP4+: AESS: enable internal auto-gating during initial setup
Enable the AESS auto-gating control bit during AESS hwmod setup. This
fixes the following boot warning on OMAP4:
omap_hwmod: aess: _wait_target_disable failed
Without this patch, the AESS IP block does not indicate to the PRCM
that it is idle after it is reset. This prevents some types of SoC
power management until something sets the auto-gating control bit.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Péter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_reset.c | 52 |
4 files changed, 60 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 947cafe65aef..d88788facf52 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -8,7 +8,7 @@ obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ | |||
8 | omap_device.o sram.o | 8 | omap_device.o sram.o |
9 | 9 | ||
10 | omap-2-3-common = irq.o | 10 | omap-2-3-common = irq.o |
11 | hwmod-common = omap_hwmod.o \ | 11 | hwmod-common = omap_hwmod.o omap_hwmod_reset.o \ |
12 | omap_hwmod_common_data.o | 12 | omap_hwmod_common_data.o |
13 | clock-common = clock.o clock_common_data.o \ | 13 | clock-common = clock.o clock_common_data.o \ |
14 | clkt_dpll.o clkt_clksel.o | 14 | clkt_dpll.o clkt_clksel.o |
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index 41066b4b7a7b..6ec73cbc30c4 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h | |||
@@ -673,6 +673,12 @@ extern void __init omap_hwmod_init(void); | |||
673 | const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh); | 673 | const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh); |
674 | 674 | ||
675 | /* | 675 | /* |
676 | * | ||
677 | */ | ||
678 | |||
679 | extern int omap_hwmod_aess_preprogram(struct omap_hwmod *oh); | ||
680 | |||
681 | /* | ||
676 | * Chip variant-specific hwmod init routines - XXX should be converted | 682 | * Chip variant-specific hwmod init routines - XXX should be converted |
677 | * to use initcalls once the initial boot ordering is straightened out | 683 | * to use initcalls once the initial boot ordering is straightened out |
678 | */ | 684 | */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 793f54ac7d14..c9c251e23147 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -322,6 +322,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = { | |||
322 | static struct omap_hwmod_class omap44xx_aess_hwmod_class = { | 322 | static struct omap_hwmod_class omap44xx_aess_hwmod_class = { |
323 | .name = "aess", | 323 | .name = "aess", |
324 | .sysc = &omap44xx_aess_sysc, | 324 | .sysc = &omap44xx_aess_sysc, |
325 | .enable_preprogram = omap_hwmod_aess_preprogram, | ||
325 | }; | 326 | }; |
326 | 327 | ||
327 | /* aess */ | 328 | /* aess */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod_reset.c b/arch/arm/mach-omap2/omap_hwmod_reset.c new file mode 100644 index 000000000000..bba43fa627d3 --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_reset.c | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * OMAP IP block custom reset and preprogramming stubs | ||
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
5 | * Paul Walmsley | ||
6 | * | ||
7 | * A small number of IP blocks need custom reset and preprogramming | ||
8 | * functions. The stubs in this file provide a standard way for the | ||
9 | * hwmod code to call these functions, which are to be located under | ||
10 | * drivers/. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License as | ||
14 | * published by the Free Software Foundation version 2. | ||
15 | * | ||
16 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
17 | * kind, whether express or implied; without even the implied warranty | ||
18 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
24 | * 02110-1301 USA | ||
25 | */ | ||
26 | #include <linux/kernel.h> | ||
27 | |||
28 | #include <sound/aess.h> | ||
29 | |||
30 | #include "omap_hwmod.h" | ||
31 | |||
32 | /** | ||
33 | * omap_hwmod_aess_preprogram - enable AESS internal autogating | ||
34 | * @oh: struct omap_hwmod * | ||
35 | * | ||
36 | * The AESS will not IdleAck to the PRCM until its internal autogating | ||
37 | * is enabled. Since internal autogating is disabled by default after | ||
38 | * AESS reset, we must enable autogating after the hwmod code resets | ||
39 | * the AESS. Returns 0. | ||
40 | */ | ||
41 | int omap_hwmod_aess_preprogram(struct omap_hwmod *oh) | ||
42 | { | ||
43 | void __iomem *va; | ||
44 | |||
45 | va = omap_hwmod_get_mpu_rt_va(oh); | ||
46 | if (!va) | ||
47 | return -EINVAL; | ||
48 | |||
49 | aess_enable_autogating(va); | ||
50 | |||
51 | return 0; | ||
52 | } | ||