From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: mx3: Setup AIPS registers
Date: Wed, 29 Feb 2012 09:45:01 +0100 [thread overview]
Message-ID: <20120229084501.GW3852@pengutronix.de> (raw)
In-Reply-To: <1330431826-29217-1-git-send-email-fabio.estevam@freescale.com>
On Tue, Feb 28, 2012 at 09:23:46AM -0300, Fabio Estevam wrote:
> It was observed on a mx31pdk board that audio playback only worked when the bootloader was Redboot, and
> did not work when U-boot was used.
>
> Comparing the sources of these bootloaders showed that the AIPS registers were not setup in U-boot.
>
> Instead of relying on the bootloader to setup the AIPS registers, do it in the kernel so that audio
> playback can work independantly of the bootloader being used.
>
> Copied the AIPS settings from Redboot to the kernel.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - Make sure post_cpu_init() only runs on mx31
> - Place imx_set_aips() in a common location so that other SoCs can use it.
> - Improve comments about OPACRx
>
> arch/arm/mach-imx/cpu-imx31.c | 11 +++++++++++
> arch/arm/plat-mxc/cpu.c | 24 ++++++++++++++++++++++++
> arch/arm/plat-mxc/include/mach/common.h | 1 +
> 3 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c
> index 3f2345f..8841039 100644
> --- a/arch/arm/mach-imx/cpu-imx31.c
> +++ b/arch/arm/mach-imx/cpu-imx31.c
> @@ -60,3 +60,14 @@ int mx31_revision(void)
> return mx31_cpu_rev;
> }
> EXPORT_SYMBOL(mx31_revision);
> +
> +static int __init post_cpu_init(void)
> +{
> + if (cpu_is_mx31()) {
> + imx_set_aips(MX31_IO_ADDRESS(MX31_AIPS1_BASE_ADDR));
> + imx_set_aips(MX31_IO_ADDRESS(MX31_AIPS2_BASE_ADDR));
> + }
> +
> + return 0;
> +}
> +postcore_initcall(post_cpu_init);
I think we should add this to imx31_soc_init() instead of adding an
initcall for it in which we have to check for the cpu type. Sorry for
not mentioning it in v1.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2012-02-29 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 12:23 [PATCH v2] ARM: mx3: Setup AIPS registers Fabio Estevam
2012-02-29 8:45 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120229084501.GW3852@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).