lowlevel_debug.S 585 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 <mach/sg-regs.h>
  11. #define UART_CLK 36864000
  12. #include <mach/debug-uart.S>
  13. ENTRY(setup_lowlevel_debug)
  14. ldr r0, =SG_IECTRL
  15. ldr r1, [r0]
  16. orr r1, r1, #1
  17. str r1, [r0]
  18. /* UART Port 0 */
  19. sg_set_pinsel 85, 1, 8, 4, r0, r1
  20. sg_set_pinsel 88, 1, 8, 4, r0, r1
  21. init_debug_uart r0, r1, r2
  22. mov pc, lr
  23. ENDPROC(setup_lowlevel_debug)