From: Reinhard Meyer Date: Tue, 10 Aug 2010 14:50:29 +0200 Subject: [U-Boot] [PATCH] Create a new driver for Atmel at91/avr MCI adapters that uses the u-boot mmc framework. In-Reply-To: <4C6128FF.4020105@emk-elektronik.de> References: <1272485453-5502-1-git-send-email-rob@emanuele.us> <4C6128FF.4020105@emk-elektronik.de> Message-ID: <4C614B15.6070008@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 Reinhard Meyer schrieb: > TOP9000> fatls mmc 0:1 > gen_atmel_mci: CMDR 0x00001050 (16) ARGR 0x00000000 (SR: 0x00000000) COMMAND Dbg > Msg > gen_atmel_mci: CMDR 0x00051051 (17) ARGR 0x00000000 (SR: 0x00000000) COMMAND Dbg > Msg > > *** system hangs here *** > > But, if preceeded by a mmc read command it works (except for some odd clock > related messages): Ok, the problem is that fatls does not call any init functions, its first call is a read... I added a check for initialized so read will fail if MCI has not been initialized. The command "mmcinfo" does the initialisation. TOP9000> fatls mmc 0:1 MCI not initialized! ** Can't read from device 0 ** ** Unable to use mmc 0:1 for fatls ** TOP9000> mmci mmc: setting clock 150000 Hz, block size 512 mmc: clock 150000 too low; setting CLKDIV to 255 mmc: setting clock 0 Hz, block size 512 mmc: clock 0 too low; setting CLKDIV to 255 mmc: setting clock 194000 Hz, block size 512 mmc: setting clock 194000 Hz, block size 512 mmc: setting clock 25000000 Hz, block size 512 Device: Atmel MCI Manufacturer ID: 89 OEM: 303 Name: NCard Tran Speed: 25000000 Rd Block Len: 512 SD version 2.0 High Capacity: No Capacity: 2006974464 Bus Width: 4-bit TOP9000> fatls mmc 0:1 windows/ programme/ 0 file(s), 2 dir(s) I'll rework this driver to use struct SoC access and present it as a patch soon. Reinhard