From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ARM: imx: add audio codec clk lookup for imx53-qsb
Date: Fri, 11 May 2012 14:42:46 +0800 [thread overview]
Message-ID: <1336718568-26810-4-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1336718568-26810-1-git-send-email-shawn.guo@linaro.org>
On imx53-qsb board, the clk ssi_ext.0 is used as the clock input
to audio codec sgtl5000.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-imx/imx53-dt.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/imx53-dt.c b/arch/arm/mach-imx/imx53-dt.c
index 574eca4..139ec4e 100644
--- a/arch/arm/mach-imx/imx53-dt.c
+++ b/arch/arm/mach-imx/imx53-dt.c
@@ -10,6 +10,9 @@
* http://www.gnu.org/copyleft/gpl.html
*/
+#include <linux/clk.h>
+#include <linux/clkdev.h>
+#include <linux/err.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
@@ -81,6 +84,19 @@ static const struct of_device_id imx53_iomuxc_of_match[] __initconst = {
{ /* sentinel */ }
};
+static void __init imx53_qsb_init(void)
+{
+ struct clk *clk;
+
+ clk = clk_get_sys("ssi_ext.0", NULL);
+ if (IS_ERR(clk)) {
+ pr_err("failed to get clk ssi_ext.0\n");
+ return;
+ }
+
+ clk_register_clkdev(clk, NULL, "0-000a");
+}
+
static void __init imx53_dt_init(void)
{
struct device_node *node;
@@ -99,6 +115,9 @@ static void __init imx53_dt_init(void)
of_node_put(node);
}
+ if (of_machine_is_compatible("fsl,imx53-qsb"))
+ imx53_qsb_init();
+
of_platform_populate(NULL, of_default_bus_match_table,
imx53_auxdata_lookup, NULL);
}
--
1.7.5.4
next prev parent reply other threads:[~2012-05-11 6:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 6:42 [PATCH 0/5] Enable audio support for imx51-babbage and imx53-qsb Shawn Guo
2012-05-11 6:42 ` [PATCH 1/5] ARM: imx: add more imx5 ssi clocks Shawn Guo
2012-05-11 7:42 ` Sascha Hauer
2012-05-11 9:13 ` Shawn Guo
2012-05-11 7:47 ` Sascha Hauer
2012-05-11 9:17 ` Shawn Guo
2012-05-11 6:42 ` [PATCH 2/5] ARM: imx: add audmux pad setting for imx51-babbage Shawn Guo
2012-05-11 6:42 ` Shawn Guo [this message]
2012-05-14 8:22 ` [PATCH 3/5] ARM: imx: add audio codec clk lookup for imx53-qsb Sascha Hauer
2012-05-14 8:50 ` Shawn Guo
2012-05-14 8:53 ` Sascha Hauer
2012-05-14 9:46 ` Shawn Guo
2012-05-11 6:42 ` [PATCH 4/5] ARM: dts: imx51-babbage: enable audio support Shawn Guo
2012-05-11 13:18 ` Fabio Estevam
2012-05-11 14:28 ` Shawn Guo
2012-05-11 6:42 ` [PATCH 5/5] ARM: dts: imx53-qsb: " Shawn Guo
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=1336718568-26810-4-git-send-email-shawn.guo@linaro.org \
--to=shawn.guo@linaro.org \
--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).