[U-Boot] [PATCH 1/6] am33xx: Enable UART{1,2,4,5} clocks
Matt Porter
mporter at ti.com
Thu Sep 27 14:48:04 CEST 2012
On Wed, Sep 26, 2012 at 04:04:14PM -0400, Andrew Bradford wrote:
> If configured to use UART{1,2,4,5}, such as on the Beaglebone RS232
> cape, enable the required clocks for the UART in use.
>
> Signed-off-by: Andrew Bradford <andrew at bradfordembedded.com>
> ---
> arch/arm/cpu/armv7/am33xx/clock.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/cpu/armv7/am33xx/clock.c
> index 2b19506..4eb9226 100644
> --- a/arch/arm/cpu/armv7/am33xx/clock.c
> +++ b/arch/arm/cpu/armv7/am33xx/clock.c
> @@ -114,6 +114,34 @@ static void enable_per_clocks(void)
> while (readl(&cmwkup->wkup_uart0ctrl) != PRCM_MOD_EN)
> ;
>
> + /* UART1 */
> +#ifdef CONFIG_SERIAL2
> + writel(PRCM_MOD_EN, &cmper->uart1clkctrl);
> + while (readl(&cmper->uart1clkctrl) != PRCM_MOD_EN)
> + ;
> +#endif /* CONFIG_SERIAL2 */
> +
> + /* UART2 */
> +#ifdef CONFIG_SERIAL3
> + writel(PRCM_MOD_EN, &cmper->uart2clkctrl);
> + while (readl(&cmper->uart2clkctrl) != PRCM_MOD_EN)
> + ;
> +#endif /* CONFIG_SERIAL3 */
Profile 5 on the AM335x EVM supports UART3. I know we discussed on IRC
that BeagleBone doesn't have that uart pinned out, but I think since
this is generic code *and* it can be tested on the full EVM, you should
include support for it here.
> +
> + /* UART4 */
> +#ifdef CONFIG_SERIAL5
> + writel(PRCM_MOD_EN, &cmper->uart4clkctrl);
> + while (readl(&cmper->uart4clkctrl) != PRCM_MOD_EN)
> + ;
> +#endif /* CONFIG_SERIAL5 */
> +
> + /* UART5 */
> +#ifdef CONFIG_SERIAL6
> + writel(PRCM_MOD_EN, &cmper->uart5clkctrl);
> + while (readl(&cmper->uart5clkctrl) != PRCM_MOD_EN)
> + ;
> +#endif /* CONFIG_SERIAL6 */
> +
> /* MMC0*/
> writel(PRCM_MOD_EN, &cmper->mmc0clkctrl);
> while (readl(&cmper->mmc0clkctrl) != PRCM_MOD_EN)
> --
> 1.7.10
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
More information about the U-Boot
mailing list