From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Thu, 06 Jan 2011 05:06:59 +0100 Subject: [U-Boot] MMC initialisation In-Reply-To: <4D253B1E.4070707@emk-elektronik.de> References: <71bcaff3.12cca.12d594a2e05.Coremail.henrybenyu@163.com> <4D253B1E.4070707@emk-elektronik.de> Message-ID: <4D253FE3.8060708@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Arghhh.... Didn't see the original message was not sent to the list... So my reply was neither... On 06.01.2011 04:46, Reinhard Meyer wrote: > Dear ????, Please, dear Henry, ALL u-boot related questions MUST go to the mailing list, too. >> I will porting U-Boot mmc part to my own board, still use U-Boot as bootloader. >> First, I should research the source code of mmc part in U-Boot. >> I found top9000eval_xe board support mmc, and SoC same with mine, (arm926ejs) >> Mr. Reinhard Meyer is enthusiastic working here, Thanks a lot! >> Let me describe mmc driver init process: (version: u-boot.2010.12) >> 1. arch/arm/lib/board.c -> board_init_r() -> mmc_initialize(bd); >> 2. drivers/mmc/mmc.c -> int mmc_initialize(bd_t *bis) >> 3. board/emk/top9000/top9000.c -> int board_mmc_init(bd_t *bd) >> -> return atmel_mci_init((void *)AT91_BASE_MCI); >> 4. drivers/mmc/gen_atmel_mci.c -> int atmel_mci_init(void *regs) > ... >> mmc->init = mci_init; >> // mmc->init(mmc); // How it Implementation >> /* need to be able to pass these in on a board by board basis */ > ... > > I am not sure what your question/problem is here. > > If you wonder how and when mmc->init() is called, it is only called when the > command "mmcinfo" is given. > > This is sure not perfect, and discussions have been around about this. > "common/cmd_mmc.c" would need some rework there... > > However discussions are left open on how exactly changes should be done. > > Best Regards, > Reinhard