Hi danwang:
thank you for your support.
I have read this ppt and modified code for test, but uart4 can't work still.
this is my step, can you help to double check?
I want to use uart4 for data transmit in kernel not for debug, So I think I only need to modify code in kernel, needn't modify uboot and MFT code.
ppt description for board-mx6q_arm2, but I use sabresd board, so I need to modify Board-mx6q_sabresd.c and releational file.
1,arch\arm\mach-mx6\serial.h
I check uart4 configration and only change UART4_UCR4_CTSTL from -1 to 16, other configration use default setting
/* UART 4 configuration */
#define UART4_UCR4_CTSTL 16// yuanmm change to 16 before is -1
#define UART4_DMA_ENABLE 0
#define UART4_DMA_RXBUFSIZE 512
#define UART4_UFCR_RXTL 16
#define UART4_UFCR_TXTL 16
2, arch\arm\mach-mx6\Board-mx6q_sabresd.h
add code as follow,as hareware design, We use pad csi0 data12 and data13,not PAD_KEY_COL0
// yuanmm add begin
MX6Q_PAD_CSI0_DAT12__UART4_TXD,
MX6Q_PAD_CSI0_DAT13__UART4_RXD,
// yuanmm add end
3, arch\arm\mach-mx6\Board-mx6q_sabresd.c
add code as follow:
static inline void mx6q_sabresd_init_uart(void)
{
imx6q_add_imx_uart(2, NULL);
imx6q_add_imx_uart(0, NULL);
// yuanmm add uart begin
imx6q_add_imx_uart(1, NULL);
imx6q_add_imx_uart(3, NULL);
imx6q_add_imx_uart(4, NULL);
// yuanmm add uart end
}
4,arch\arm\mach-mx6\Board-mx6q_sabresd.c
as ppt description, I should add code
early_console_setup(UART4_BASE_ADDR, uart_clk);
but I think this functiong is for console setting, so I didn't add this code for uart4
5, arch\arm\plat-mxc\include\mach\Uncompress.h
this fill already have follow code, so I didn't modify this code
case MACH_TYPE_MX6Q_SABRESD:
uart_base = MX6Q_UART1_BASE_ADDR;
break;