Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2009 11:50:31 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        mav@FreeBSD.org
Cc:        freebsd-arm@FreeBSD.org
Subject:   Re: Mount root from SD card?
Message-ID:  <20090120.115031.2008400028.imp@bsdimp.com>
In-Reply-To: <4976135A.3070109@FreeBSD.org>
References:  <1232450582.00063538.1232438401@10.7.7.3> <49760E8E.1000609@FreeBSD.org> <4976135A.3070109@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <4976135A.3070109@FreeBSD.org>
            Alexander Motin <mav@FreeBSD.org> writes:
: Alexander Motin wrote:
: > Krassimir Slavchev wrote:
: >> -----BEGIN PGP SIGNED MESSAGE-----
: >> Hash: SHA1
: >>
: >> M. Warner Losh wrote:
: >> ...
: >>> mmcsd0: 1983MB <SD Memory Card> at mmc0 30MHz/1bit
: >>> Trying to mount root from ufs:/dev/mmcsd0s1
: >>>
: >>> Manual root filesystem specification:
: >>>   <fstype>:<device>  Mount <device> using filesystem <fstype>
: >>>                        eg. ufs:/dev/da0a
: >>>   ?                  List valid disk boot devices
: >>>   <empty line>       Abort manual input
: >>>
: >>> mountroot> ?
: >>>
: >>> List of GEOM managed disk devices:
: >>>   mmcsd0
: >>>
: >>>> Looks like that should be working.
: >>>> mav@ has done a lot of hacking on the mmc code...
: >>>> Do you have 1 wire or 4 wires for your mmc bus on your board?
: >>
: >> On the board all 4 bus wires are connected (MCD A0-A3) but I've never
: >> seen working 4-bit mode on AT91RM9200 (See PR128987 too).
: > 
: > I have just committed MMCBR_IVAR_CAPS implementation into CURRENT. 
: > Without having it implemented, results can be unpredictable. For 
: > example, mmc layer could enable high-speed timings to reach 30MHz, but 
: > this mode is not implemented for this controller. Booting with verbose 
: > messages enabled could give a bit more information.
: > 
: > What's about 4-bit mode, I see some sc->wire4 variable checked by the 
: > driver, which is never initialized. I don't very understand how this 
: > thing expected to work.
: 
: As I can see from specification, if sc->wire4 is set to 0 by default, 
: bus will not ever switched into 4bit mode. Try to just comment out " && 
: sc->wire4" part of at91_mci.c. If this variable expected to report real 
: bus width, then it probably should be done in different way, by 
: reporting correct host capabilities.

sc is initialized to 0 by the bus layer, so I don't think this will
have an effect.  You are correct that this should be generic in the
board-level specific meta-data for each at91 board.  That stuff just
isn't there yet.

The problem is, I think, that something broke in the series of commits
and now reads don't work at all anymore.  After the first couple in
the series, I didn't test the follow on commits due to time.

Warner

: > PS: For MMC cards bus width testing routine implemented. May be we could 
: > do something alike for SD cards. It is not part of SD specification, but 
: > may be we could just issue some other command, transferring data, to 
: > check effective bus width.
: 
: -- 
: Alexander Motin
: 
: 



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