[U-Boot] [PATCH 2/6] arm: socfpga: Add socfpga_spim_enable() to reset_manager.c

Stefan Roese
2014-11-16T10:47:31Z

On 12.11.2014 18:42, Pavel Machek wrote:
> On Fri 2014-11-07 13:50:30, Stefan Roese wrote:
>> This function will be needed by the upcoming Designware master SPI
>> driver. As the SPI master controller is held in reset by the current
>> Preloader implementation. So we need to release the reset for the
>> driver to communicate with the controller.
>>
>> This function is called from arch_early_init_r() if the SPI
>> driver is enabled.
>>
>> }
>> }
>> +
>> +/* SPI Master enable (its held in reset by the preloader) */
>> +void socfpga_spim_enable(void)
>> +{
>> + const void *reset = &reset_manager_base->per_mod_reset;
>> +
>> + clrbits_le32(reset, 1 << RSTMGR_PERMODRST_SPIM0_LSB);
>> + clrbits_le32(reset, 1 << RSTMGR_PERMODRST_SPIM1_LSB);
>
> Actually, you can do this with one clrbits, right?

Yes, will send a follow-up patch for this.

Thanks,
Stefan