[U-Boot] [PATCH 2/6] ARM: at91: spl: Add mck function to lower rate while switching

Yang, Wenyou Wenyou.Yang at Microchip.com
Mon Jul 31 05:39:13 UTC 2017


Hi Simon,


On 2017/7/28 12:20, Simon Glass wrote:
> Hi Wenyou,
>
> On 20 July 2017 at 02:12, Wenyou Yang <wenyou.yang at microchip.com> wrote:
>> Refer to the commit 70f8c8316ad(PMC: add new mck function to lower
>> rate while switching) from AT91Bootstrap.
>>
>> While switching to a lower clock source, we must switch the clock
>> source first instead of last. Otherwise, we could end up with
>> too high frequency on internal bus and peripherals.
>> This happen on SAMA5D2 as we exit from ROM code @396MHz.
>>
>> Add a function pmc_mck_init_down() to allow this sequence.
>>
>> Signed-off-by: Wenyou Yang <wenyou.yang at microchip.com>
>> ---
>>
>>   arch/arm/mach-at91/armv7/clock.c              | 36 +++++++++++++++++++++++++++
>>   arch/arm/mach-at91/include/mach/at91_common.h |  1 +
>>   2 files changed, 37 insertions(+)
> Can this move into a clock driver instead?

This is used for SPL, due to the limitation of the size of SRAM, it is 
not easy to move to the clock driver.

>
> Regards,
> Simon

Best Regards,
Wenyou Yang


More information about the U-Boot mailing list