520-MIPS-ath79-enable-UART-function.patch 621 B

123456789101112131415161718
  1. --- a/arch/mips/ath79/dev-common.c
  2. +++ b/arch/mips/ath79/dev-common.c
  3. @@ -87,6 +87,15 @@ void __init ath79_register_uart(void)
  4. if (IS_ERR(clk))
  5. panic("unable to get UART clock, err=%ld", PTR_ERR(clk));
  6. + if (soc_is_ar71xx())
  7. + ath79_gpio_function_enable(AR71XX_GPIO_FUNC_UART_EN);
  8. + else if (soc_is_ar724x())
  9. + ath79_gpio_function_enable(AR724X_GPIO_FUNC_UART_EN);
  10. + else if (soc_is_ar913x())
  11. + ath79_gpio_function_enable(AR913X_GPIO_FUNC_UART_EN);
  12. + else if (soc_is_ar933x())
  13. + ath79_gpio_function_enable(AR933X_GPIO_FUNC_UART_EN);
  14. +
  15. if (soc_is_ar71xx() ||
  16. soc_is_ar724x() ||
  17. soc_is_ar913x() ||