rockchip.S 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Early serial output macro for Rockchip 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_RK29_UART0)
  13. #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20060000
  14. #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed60000
  15. #elif defined(CONFIG_DEBUG_RK29_UART1)
  16. #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000
  17. #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000
  18. #elif defined(CONFIG_DEBUG_RK29_UART2)
  19. #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000
  20. #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000
  21. #elif defined(CONFIG_DEBUG_RK3X_UART0)
  22. #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10124000
  23. #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb24000
  24. #elif defined(CONFIG_DEBUG_RK3X_UART1)
  25. #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x10126000
  26. #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfeb26000
  27. #elif defined(CONFIG_DEBUG_RK3X_UART2)
  28. #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20064000
  29. #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed64000
  30. #elif defined(CONFIG_DEBUG_RK3X_UART3)
  31. #define ROCKCHIP_UART_DEBUG_PHYS_BASE 0x20068000
  32. #define ROCKCHIP_UART_DEBUG_VIRT_BASE 0xfed68000
  33. #endif
  34. .macro addruart, rp, rv, tmp
  35. ldr \rp, =ROCKCHIP_UART_DEBUG_PHYS_BASE
  36. ldr \rv, =ROCKCHIP_UART_DEBUG_VIRT_BASE
  37. .endm
  38. #define UART_SHIFT 2
  39. #include <asm/hardware/debug-8250.S>