LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@technotrade.biz>
To: linuxppc-embedded@ozlabs.org
Subject: [PATCH 2/2] [POWERPC] Use cpm2_clk_setup to configure SCC clocks for the MPC82xx ADS
Date: Wed, 11 Jul 2007 15:18:48 +0200	[thread overview]
Message-ID: <200707111518.48394.laurent.pinchart@technotrade.biz> (raw)


Signed-off-by: Laurent Pinchart <laurent.pinchart@technotrade.biz>
---
 arch/powerpc/platforms/82xx/mpc82xx_ads.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c 
b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 47cb09f..c8a29b9 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -234,12 +234,8 @@ static void init_scc1_uart_ioports(struct 
fs_uart_platform_info *data)
 	clrbits32(&immap->im_ioport.iop_pdird, 0x00000001);
 	setbits32(&immap->im_ioport.iop_pdird, 0x00000002);
 
-	clrbits32(&immap->im_cpmux.cmx_scr, (0x00000007 << (4 - data->clk_tx)));
-	clrbits32(&immap->im_cpmux.cmx_scr, (0x00000038 << (4 - data->clk_rx)));
-	setbits32(&immap->im_cpmux.cmx_scr,
-		  ((data->clk_tx - 1) << (4 - data->clk_tx)));
-	setbits32(&immap->im_cpmux.cmx_scr,
-		  ((data->clk_rx - 1) << (4 - data->clk_rx)));
+	cpm2_clk_setup(CPM_CLK_SCC1, data->clk_rx, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_SCC1, data->clk_tx, CPM_CLK_TX);
 
 	iounmap(immap);
 }
@@ -253,12 +249,8 @@ static void init_scc4_uart_ioports(struct 
fs_uart_platform_info *data)
 	clrbits32(&immap->im_ioport.iop_pdird, 0x00000200);
 	setbits32(&immap->im_ioport.iop_pdird, 0x00000400);
 
-	clrbits32(&immap->im_cpmux.cmx_scr, (0x00000007 << (4 - data->clk_tx)));
-	clrbits32(&immap->im_cpmux.cmx_scr, (0x00000038 << (4 - data->clk_rx)));
-	setbits32(&immap->im_cpmux.cmx_scr,
-		  ((data->clk_tx - 1) << (4 - data->clk_tx)));
-	setbits32(&immap->im_cpmux.cmx_scr,
-		  ((data->clk_rx - 1) << (4 - data->clk_rx)));
+	cpm2_clk_setup(CPM_CLK_SCC4, data->clk_rx, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_SCC4, data->clk_tx, CPM_CLK_TX);
 
 	iounmap(immap);
 }
-- 
1.5.0

                 reply	other threads:[~2007-07-11 13:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200707111518.48394.laurent.pinchart@technotrade.biz \
    --to=laurent.pinchart@technotrade.biz \
    --cc=linuxppc-embedded@ozlabs.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