HS mode in RPi

Daisuke Aoyama aoyama at peach.ne.jp
Sun Jan 18 08:31:08 UTC 2015


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
 


More information about the freebsd-arm mailing list