lowlevel_debug.S 575 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * On-chip UART initializaion for low-level debugging
  3. *
  4. * Copyright (C) 2014 Panasonic Corporation
  5. * Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <linux/linkage.h>
  10. #include <asm/arch/sg-regs.h>
  11. #define UART_CLK 36864000
  12. #include <asm/arch/debug-uart.S>
  13. ENTRY(setup_lowlevel_debug)
  14. init_debug_uart r0, r1, r2
  15. /* UART Port 0 */
  16. set_pinsel 85, 1, r0, r1
  17. set_pinsel 88, 1, r0, r1
  18. ldr r0, =SG_IECTRL
  19. ldr r1, [r0]
  20. orr r1, r1, #1
  21. str r1, [r0]
  22. mov pc, lr
  23. ENDPROC(setup_lowlevel_debug)