From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Sat, 19 Jul 2014 14:03:50 +0200 Subject: [U-Boot] socfpga: initialize MMC In-Reply-To: <20140717120120.125DC383374@gemini.denx.de> References: <20140716123422.GA8844@amd.pavel.ucw.cz> <20140716125238.CF3833804B5@gemini.denx.de> <20140716131330.A93E83804B5@gemini.denx.de> <1405594852.2088.8.camel@clsee-VirtualBox.altera.com> <20140717120120.125DC383374@gemini.denx.de> Message-ID: <20140719120350.GA1540@amd.pavel.ucw.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu 2014-07-17 14:01:20, Wolfgang Denk wrote: > Dear Chin Liang, > > In message <1405594852.2088.8.camel@clsee-VirtualBox.altera.com> you wrote: > > > > > > > + add_dwmci(host, host->bus_hz, host->bus_hz); > > > > > > > > Is there a free(host) anywhere? > > > > Actually the host will be referred throughout the code execution when > > SDMMC access is required. Hence, we can only call the free when exit > > which deems not needed then. > > I have to admit that I have hard times trying to understand the > concept of behind this code. > > 1) The new patches add altera_dwmmc_init() - but is this not > basically a verbatim copy of socfpga_dwmmc_init() which is > alreday in mainline? Hmm. altera_dwmmc_init(), already in the mainline but not referenced anywhere... which is why I failed to notice it. And most of your review comments apply even to that version. I'll see if that version works for me and will fix it up according to review. > 2) Is it really necessary to always and unconditionally initialyze > the MMC subsystem, even in nobody will ever use any MMC commands in > U-Boot? The rule is that we only initialize hardwar when we > actually use them inside of U-Boot, i. e. if any commands are > executed that access such hardware? > > [Ok, this seems to be a generic problem, not specific you your > patch set.] I seem to have great trouble getting even the most trivial patches to apply. I can do more extensive changes, but would like to get the simple things merged, first... Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html