Date: Sun, 18 Jan 2015 17:31:04 +0900 From: "Daisuke Aoyama" <aoyama@peach.ne.jp> To: <freebsd-arm@freebsd.org> Subject: Re: HS mode in RPi Message-ID: <9C4B3BEE66EA4C1582F149682BBF729E@ad.peach.ne.jp> In-Reply-To: <AF35369EC7D84B59A5BBAADD77DC1687@ad.peach.ne.jp>
index | next in thread | previous in thread | raw e-mail
I forget mention. r276985 is complete wrong.
SDHCI_COMMAND_FLAGS is never stored in local variable.
So accessing it means "return uninitialized value".
> if (off == SDHCI_TRANSFER_MODE) {
> return (sc->cmd_and_mode >> 16);
> } else if (off == SDHCI_COMMAND_FLAGS) {
> return (sc->cmd_and_mode & 0x0000ffff);
> }
Also I fixed, the code may return unexpected value.
16bit width access should use even address.
>return ((val >> (off & 3)*8) & 0xffff);
For more, please see my patch.
http://www.peach.ne.jp/archives/rpi/patch/src-r277169-20150114.patch.gz
Regards,
--
Daisuke Aoyama
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9C4B3BEE66EA4C1582F149682BBF729E>
