[U-Boot] [PATCH 2/6] arm: socfpga: Add socfpga_spim_enable() to reset_manager.c
Pavel Machek
pavel at denx.de
Wed Nov 12 18:42:27 CET 2014
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?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
More information about the U-Boot
mailing list