> +     u32 reg;
> +     u32 pclk_ratio = get_PCLK() / gd->baudrate;
> +     int i;
> +
IMHO it's still obscur
> +     /* PCLK / (16 * baudrate) - 1 */
> +     reg = pclk_ratio / 16 - 1;
> +     /* i = pclk_ratio % 16 */
> +     i = pclk_ratio - (reg + 1) * 16;
> +
> +     uart->UBRDIV = reg;
> +     uart->UDIVSLOT = udivslot[i];
> +
> +     for (i = 0; i < 100; i++)
> +             barrier();
> +}

Best Regards,
J.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to