[U-Boot] [PATCH 3/6] S5PC100: serial driver for SMDKC100 support
Wolfgang Denk
wd at denx.de
Sun Jul 19 21:59:37 CEST 2009
Dear HeungJun Kim,
In message <350d1ec30906250109s34355cbex5a2e59e181a5d93a at mail.gmail.com> you wrote:
> This patch is the serial driver for S5PC100 & SMDKC100.
>
> Signed-off-by: HeungJun, Kim <riverful.kim at samsung.com>
I think this patch should be merged with the patch(es) that add the
rest of the code.
> diff --git a/drivers/serial/serial_s5pc100.c b/drivers/serial/serial_s5pc100.c
> new file mode 100644
> index 0000000..9394e77
> --- /dev/null
> +++ b/drivers/serial/serial_s5pc100.c
...
> +void serial_setbrg(void)
> +{
> + DECLARE_GLOBAL_DATA_PTR;
> + s5pc1xx_uart_t *const uart = s5pc1xx_get_base_uart(UART_NR);
> + u32 pclk = get_PCLK();
> + u32 baudrate = gd->baudrate;
> + int i;
> +
> + i = (pclk / baudrate) % 16;
> +
> + uart->UBRDIV = pclk / baudrate / 16 - 1;
> + uart->UDIVSLOT = udivslot[i];
Please use I/O accessors instead of register writes. [Here and
everywhere.]
> + for (i = 0; i < 100; i++);
> + barrier();
What's this? This should not be needed.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Unix is supported by IBM, like a hanging man is supported by rope.
- Don Libes & Sandy Ressler: _Life With Unix_
More information about the U-Boot
mailing list