]> git.sur5r.net Git - u-boot/commitdiff
board: atmel: siemens: clean up PLLB code
authorWenyou Yang <wenyou.yang@atmel.com>
Wed, 3 Feb 2016 02:20:45 +0000 (10:20 +0800)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Thu, 18 Feb 2016 20:34:41 +0000 (21:34 +0100)
Due to introducing the new PLLB clock handle functions,
use these functions to clean up the PLLB enable code.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Tested-by: Heiko Schocher <hs@denx.de>
board/siemens/smartweb/smartweb.c
board/siemens/taurus/taurus.c

index e7ee65cd8d3845263a6dd2c025ebc5999bd68c84..47a60a72acaf77cbc36e60655a3d80918247f8c1 100644 (file)
@@ -115,12 +115,8 @@ static void smartweb_macb_hw_init(void)
 
 void at91_udp_hw_init(void)
 {
-       at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC;
-
        /* Enable PLLB */
-       writel(get_pllb_init(), &pmc->pllbr);
-       while ((readl(&pmc->sr) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB)
-               ;
+       at91_pllb_clk_enable(get_pllb_init());
 
        /* Enable UDPCK clock, MCK is enabled in at91_clock_init() */
        at91_periph_clk_enable(ATMEL_ID_UDP);
index 9374064df51216da8cafaa1efba35cbc7034b908..b0385d8a6e33ffdedbd4f350c29785c52a82dfec 100644 (file)
@@ -289,12 +289,8 @@ void spi_cs_deactivate(struct spi_slave *slave)
 
 void at91_udp_hw_init(void)
 {
-       at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC;
-
        /* Enable PLLB */
-       writel(get_pllb_init(), &pmc->pllbr);
-       while ((readl(&pmc->sr) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB)
-               ;
+       at91_pllb_clk_enable(get_pllb_init());
 
        /* Enable UDPCK clock, MCK is enabled in at91_clock_init() */
        at91_periph_clk_enable(ATMEL_ID_UDP);