]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Enable at91 systems to boot from high capacity SD cards.
authorian <ian@FreeBSD.org>
Sat, 26 Jul 2014 04:16:04 +0000 (04:16 +0000)
committerian <ian@FreeBSD.org>
Sat, 26 Jul 2014 04:16:04 +0000 (04:16 +0000)
commit6005c78d7e3d0a40a0d91078abec00b1d3adbfa2
tree0671acb3d9215594cd45171255392307d4ef0428
parentf85cf0d80f24c7f9952e48a0f0f30cb70071ec3c
Enable at91 systems to boot from high capacity SD cards.

This also fixes a few minor violations of the SD protocol, such as running
the bus at high speed during the card identification sequence.

The sdcard_init() routine now probes for SDHC cards so that later read
requests can make needed adjustments between block and byte offsets based
on card type.

There is a new MCI_readblocks() function that takes block number and block
count parameters instead of byte-offset values.  Using this routine, boot
loader code can load a kernel from any location on an SDHC or standard SD.

The old MCI_read() interface remains unchanged so that existing customized
boot loader code will still keep working without changes.  Using this
routine, boot loaders can load a kernel from anywhere in the first 4GB of
an SDHC card (or of course any location on a standard SD card).

A new sdcard_use4wire() routine allows boot loaders to request 4-bit
transfers; it should be called after sdcard_init().  The sdcard_init()
routine no longer assumes the hardware is 4-wire capable and by default
sets things up for 1-bit transfers.  (4-wire mode is unreliable on
at91rm9200, works on later SoCs.)

PR: 155894
Submitted by: me.  years ago.
sys/boot/arm/at91/libat91/mci_device.h
sys/boot/arm/at91/libat91/sd-card.c
sys/boot/arm/at91/libat91/sd-card.h