LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] [POWERPC] Use cpm2_clk_setup to configure SCC clocks for the MPC82xx ADS
@ 2007-07-11 13:18 Laurent Pinchart
  0 siblings, 0 replies; only message in thread
From: Laurent Pinchart @ 2007-07-11 13:18 UTC (permalink / raw)
  To: linuxppc-embedded


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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-11 13:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 13:18 [PATCH 2/2] [POWERPC] Use cpm2_clk_setup to configure SCC clocks for the MPC82xx ADS Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox