From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Wed, 12 Nov 2014 18:42:27 +0100 Subject: [U-Boot] [PATCH 2/6] arm: socfpga: Add socfpga_spim_enable() to reset_manager.c In-Reply-To: <1415364634-8290-3-git-send-email-sr@denx.de> References: <1415364634-8290-1-git-send-email-sr@denx.de> <1415364634-8290-3-git-send-email-sr@denx.de> Message-ID: <20141112174227.GB30963@amd> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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