Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2009 18:10:01 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Krassimir Slavchev <krassi@bulinfo.net>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Mount root from SD card?
Message-ID:  <497748D9.2040607@FreeBSD.org>
In-Reply-To: <4977309F.2020402@bulinfo.net>
References:  <20090120.114051.-854291995.imp@bsdimp.com>	<4976215B.40302@FreeBSD.org>	<20090120.122312.1543793985.imp@bsdimp.com>	<20090120.123230.-272218744.imp@bsdimp.com>	<49762CEF.1000405@FreeBSD.org>	<49762EC9.1010006@FreeBSD.org> <4976E2C2.4090002@FreeBSD.org>	<4976E9DB.3000803@bulinfo.net> <4976EFED.4010706@FreeBSD.org>	<4976FB8C.5050209@bulinfo.net> <49771CA6.7080106@FreeBSD.org> <4977236E.2020409@bulinfo.net> <497726F5.5080000@bulinfo.net> <49772A2C.7090903@FreeBSD.org> <49772C8A.5020402@bulinfo.net> <49772EF1.1060207@FreeBSD.org> <4977309F.2020402@bulinfo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Krassimir Slavchev wrote:
> ...
> CMD: 7 ARG 0 len 0
> RES: 0

Before this point mmc_rescan_cards() have successfully selected all the
cards. Then at this point
	mmcbr_set_bus_mode(dev, pushpull);

        mmcbr_update_ios(dev);
were called. And after that same request inside mmc_calculate_clock()
has failed. That's strange.

> timing 1, rate 30000000, hsrate 50000000
> CMD: 7 ARG 10000 len 0
> RES: 2

Open drain bus mode control is not implemented by sdhci driver, so I
haven't looked at it close. Quick look around shows that push-pull mode
was set there even without that last call. May be I am wrong, but first
line looks useless. mmcbr_update_ios(dev) writes to the controller bus
control registers, may be it affects something, or bus require some time
to settle after it?

> CMD: 6 ARG 80fffff0 len 64
> RES: 0
> CMD: 7 ARG 0 len 0
> RES: 0
> mmc0: setting transfer rate to 30.000MHz
> mmcsd0: 1983MB <SD Memory Card> at mmc0 30MHz/1bit

Bus frequency changed here. SD specification allows frequencies up to
25MHz without high speed timings used, but cards like this one ofter
declare a bit higher frequencies in legacy mode. May be we should just
to try to limit it to some safe value? You may just try to set
max_dtr = 5000000;
in mmc_calculate_clock(), before "if (bootverbose) {".

> CMD: 7 ARG 10000 len 0
> RES: 2
> mmc0: setting bus width to 1 bits
> CMD: 37 ARG 10000 len 0
> RES: 0
> CMD: 6 ARG 0 len 0
> RES: 0
> CMD: 11 ARG 0 len 512
> RES: 0
> CMD: 11 ARG 0 len 512
> RES: 0
> CMD: 11 ARG 200 len 512
> RES: 0
> Trying to mount root from ufs:/dev/mmcsd0s1
> 
> Alexander Motin wrote:
>> Krassimir Slavchev wrote:
>>> Alexander Motin wrote:
>>>> Krassimir Slavchev wrote:
>>>>> Oops, sorry this output was without SD card inserted!
>>>>> I've changed the file.
>>>> That's some different debugging. I have meant that one, which happens
>>>> when boot_verbose="YES" added to loader.conf, or respective Fx button
>>>> pressed during boot on PC.
>>> Yes this is with kernel VERBOSE_SYSINIT option because I cannot set
>>> boot_verbose from arm boot loader.
>>> Verbose messages from which modules you want to see? I will set
>>> bootverbose manually.
>> mmc. And while being there, apply this one please.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?497748D9.2040607>