From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Yanok Date: Tue, 13 Dec 2011 23:18:11 +0400 Subject: [U-Boot] [PATCH 13/13] mcx: support for HTKW mcx board In-Reply-To: References: <1322498261-20645-1-git-send-email-yanok@emcraft.com> <1322498261-20645-14-git-send-email-yanok@emcraft.com> <4ED5E798.2020806@compulab.co.il> <4EE62037.6000801@emcraft.com> Message-ID: <4EE7A4F3.3080301@emcraft.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tom, On 12.12.2011 20:22, Tom Rini wrote: >>>> +#if defined(CONFIG_GENERIC_MMC) && defined(CONFIG_OMAP_HSMMC) && \ >>>> + !defined(CONFIG_SPL_BUILD) >>>> +int board_mmc_init(bd_t *bis) >>>> +{ >>>> + omap_mmc_init(0); >>>> + return 0; >>> >>> return omap_mmc_init(0); >>> >>> I would also define this function ("weak") in some common place, >>> so we will not need to copy/paste it all over the boards, but >>> of course, it is not a blocker and I don't request this from you. >>> Only if you want to... :-) >> >> Well, we can use cpu_mmc_init() for this. But what slot(s) should we >> initialized in this common function? First? All? > > The problem we have here is that board_mmc_init and cpu_mmc_init are > already both weak and you can't replace one weak function with another > weak function (or if you can, you need to play linker games). I had > given this a quick stab but not reported back since I hadn't finished > the rest of the related task (SPL and MMC support for am335x). I don't really understand the issue. We don't even have to play with the weak functions, generic MMC code already does this. We can just provide the cpu_mmc_init function for OMAPs (which we don't have at the moment). The only problem I can see is how to tell this cpu_mmc_init function which slots to initialize. Probably we could use some configuration defines for this. Regards, Ilya.