From: Wenyou Yang Date: Wed, 3 Feb 2016 02:20:45 +0000 (+0800) Subject: board: atmel: siemens: clean up PLLB code X-Git-Tag: v2016.03-rc3~82^2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=30f65c85decb7d6816ba358927ab86e05ccaea2e;p=oweals%2Fu-boot.git board: atmel: siemens: clean up PLLB code Due to introducing the new PLLB clock handle functions, use these functions to clean up the PLLB enable code. Signed-off-by: Wenyou Yang Reviewed-by: Andreas Bießmann Tested-by: Heiko Schocher --- diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c index e7ee65cd8d..47a60a72ac 100644 --- a/board/siemens/smartweb/smartweb.c +++ b/board/siemens/smartweb/smartweb.c @@ -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); diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index 9374064df5..b0385d8a6e 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -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);