修改UBOOT和LINUX调试串口(TI达芬奇芯片--DM6467)

2019-07-27 17:18发布

1.1 概述TI针对DM6467提供的UBOOT和内核默认都是串口0作为调试串口输出的,但现在我需要使用DM6467的UART0的modem功能,所以修改代码,改变调试串口为串口2。需要修改的主要有几部分内容:1. UBL 代码(这部分代码在刚上电的时候,初始化CPU和拷贝UBOOT到DDR,打印信息只有很少,所以不做修改)。2. UBOOT代码。3. linux内核驱动。      使用的代码及版本请参考:http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.01_Beta_(r31)_Release_Notes
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
13条回答
白丁野老
2019-07-28 03:06
修改如下:
  1. 1 void NS16550_init (NS16550_t com_port, int baud_divisor)
  2. 2 {
  3. 3     com_port->ier = 0x00;
  4. 4 #if defined(CFG_DM6467_EVM)
  5. 5         com_port->mdr1 = 0x00;  /* select mode */
  6. 6 #endif
  7. 7 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
  8. 8     com_port->mdr1 = 0x7;    /* mode select reset TL16C750*/
  9. 9 #endif
  10. 10     com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
  11. 11     com_port->dll = 0;
  12. 12     com_port->dlm = 0;
  13. 13     com_port->lcr = UART_LCRVAL;
  14. 14     com_port->mcr = UART_MCRVAL;
  15. 15     com_port->fcr = UART_FCRVAL;
  16. 16     com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
  17. 17     com_port->dll = baud_divisor & 0xff;
  18. 18     com_port->dlm = (baud_divisor >> 8) & 0xff;
  19. 19     com_port->lcr = UART_LCRVAL;
  20. 20 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
  21. 21 #if defined(CONFIG_APTIX)
  22. 22     com_port->mdr1 = 3;    /* /13 mode so Aptix 6MHz can hit 115200 */
  23. 23 #else
  24. 24     com_port->mdr1 = 0;    /* /16 is proper to hit 115200 with 48MHz */
  25. 25 #endif
  26. 26 #endif /* CONFIG_OMAP */
  27. 27 }
复制代码

一周热门 更多>