rockchip: Tidy up board include-file ordering
[oweals/u-boot.git] / arch / arm / mach-at91 / arm920t / at91rm9200_devices.c
index fc54327c0d326df99cc277b2fffdf3cba4aeed42..c849885bc2bb2a8706fef1c32d3cf4362da1bd0a 100644 (file)
@@ -1,20 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * [partely copied from arch/arm/cpu/arm926ejs/at91/arm9260_devices.c]
  *
  * (C) Copyright 2011
- * Andreas Bießmann <andreas.devel@googlemail.com>
+ * Andreas Bießmann <andreas@biessmann.org>
  *
  * (C) Copyright 2007-2008
  * Stelian Pop <stelian@popies.net>
  * Lead Tech Design <www.leadtechdesign.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
-#include <asm/arch/at91_pmc.h>
+#include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 
 /*
 
 void at91_serial0_hw_init(void)
 {
-       at91_pmc_t      *pmc    = (at91_pmc_t *)ATMEL_BASE_PMC;
-
        at91_set_a_periph(AT91_PIO_PORTA, 17, 1);               /* TXD0 */
        at91_set_a_periph(AT91_PIO_PORTA, 18, PUP);             /* RXD0 */
-       writel(1 << ATMEL_ID_USART0, &pmc->pcer);
+       at91_periph_clk_enable(ATMEL_ID_USART0);
 }
 
 void at91_serial1_hw_init(void)
 {
-       at91_pmc_t      *pmc    = (at91_pmc_t *)ATMEL_BASE_PMC;
-
        at91_set_a_periph(AT91_PIO_PORTB, 20, PUP);             /* RXD1 */
        at91_set_a_periph(AT91_PIO_PORTB, 21, 1);               /* TXD1 */
-       writel(1 << ATMEL_ID_USART1, &pmc->pcer);
+       at91_periph_clk_enable(ATMEL_ID_USART1);
 }
 
 void at91_serial2_hw_init(void)
 {
-       at91_pmc_t      *pmc    = (at91_pmc_t *)ATMEL_BASE_PMC;
-
        at91_set_a_periph(AT91_PIO_PORTA, 22, PUP);             /* RXD2 */
        at91_set_a_periph(AT91_PIO_PORTA, 23, 1);               /* TXD2 */
-       writel(1 << ATMEL_ID_USART2, &pmc->pcer);
+       at91_periph_clk_enable(ATMEL_ID_USART2);
 }
 
 void at91_seriald_hw_init(void)