sunxi.S 785 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Early serial output macro for Allwinner A1X SoCs
  3. *
  4. * Copyright (C) 2012 Maxime Ripard
  5. *
  6. * Maxime Ripard <maxime.ripard@free-electrons.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #if defined(CONFIG_DEBUG_SUNXI_UART0)
  13. #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28000
  14. #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28000
  15. #elif defined(CONFIG_DEBUG_SUNXI_UART1)
  16. #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400
  17. #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400
  18. #endif
  19. .macro addruart, rp, rv, tmp
  20. ldr \rp, =SUNXI_UART_DEBUG_PHYS_BASE
  21. ldr \rv, =SUNXI_UART_DEBUG_VIRT_BASE
  22. .endm
  23. #define UART_SHIFT 2
  24. #include <asm/hardware/debug-8250.S>