I'm writing linux kernel module for uart control of i.mx6d, i'm taking as example the imx.c and mxc_uart_early.c sources in ./drivers/tty/serial.
/* Enable Early MXC UART Clock */
port->uartclk = 5600000;
for example in imx.c source main clock is got from:
clk_get(&pdev->udev, "uart"); ... sport->port.uartclk = clk_get_rate(sport->clk);
I'm trying to figure out how it works in order to configure divisors and so on, also if i check on mxc_uart_early code is as follows:
/* Enable Early MXC UART Clock */ clk_enable(device->clk); port->uartclk = 5600000;
I don't wanna use platform and uart struct but access directly registers, could you kindly suggest the steps to proceed or if there is some part to read to get it clear?