[PATCH 2/2] [POWERPC] Use cpm2_clk_setup to configure SCC clocks for the MPC82xx ADS

Laurent Pinchart laurent.pinchart at technotrade.biz
Wed Jul 11 23:18:48 EST 2007


Signed-off-by: Laurent Pinchart <laurent.pinchart at 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



More information about the Linuxppc-embedded mailing list