mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: s.hauer@pengutronix.de
Cc: Fabio Estevam <fabio.estevam@freescale.com>, barebox@lists.infradead.org
Subject: [PATCH] mx6-sabrelite: Setup CCM_CCOSR register
Date: Wed, 17 Apr 2013 15:35:43 -0300	[thread overview]
Message-ID: <1366223743-29178-1-git-send-email-festevam@gmail.com> (raw)

From: Fabio Estevam <fabio.estevam@freescale.com>

Setup CCM_CCOSR register to provide a CKO1 clock frequency of 16.5 MHz.

CKO1 drives sgtl5000 codec clock on mx6qsabrelite and doing this setup in the 
bootloader will allow us to remove a lot of code in arch/arm/mach-imx/mach-imx6q.c 
from the mainline kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 .../boards/freescale-mx6-sabrelite/flash_header.c  |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boards/freescale-mx6-sabrelite/flash_header.c b/arch/arm/boards/freescale-mx6-sabrelite/flash_header.c
index 61d482b..49326e0 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/flash_header.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/flash_header.c
@@ -152,6 +152,17 @@ struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = {
 	/* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
 	DCD(MX6_IOMUXC_BASE_ADDR + 0x018, 0x007f007f),
 	DCD(MX6_IOMUXC_BASE_ADDR + 0x01c, 0x007f007f),
+
+	/*
+	 * Setup CCM_CCOSR register as follows:
+	 *
+	 * cko1_en  = 1	   --> CKO1 enabled
+	 * cko1_div = 111  --> divide by 8
+	 * cko1_sel = 1011 --> ahb_clk_root
+	 *
+	 * This sets CKO1 at ahb_clk_root/8 = 132/8 = 16.5 MHz
+	 */
+	DCD(MX6_CCM_BASE_ADDR + 0x060, 0x000000fb),
 };
 
 #define APP_DEST	CONFIG_TEXT_BASE
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2013-04-17 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 18:35 Fabio Estevam [this message]
2013-04-18  9:12 ` Jean-Christophe PLAGNIOL-VILLARD

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=1366223743-29178-1-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=fabio.estevam@freescale.com \
    --cc=s.hauer@pengutronix.de \
    /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