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