Date: Tue, 20 May 2014 04:57:09 +0300 From: "Sulev-Madis Silber (ketas)" <madis555@hot.ee> To: "Sulev-Madis Silber (ketas)" <madis555@hot.ee> Cc: freebsd-arm <freebsd-arm@FreeBSD.org> Subject: Re: BBB MMC / SD detection instability with U-Boot 2014.04 (CPU 1GHz) Message-ID: <537AB675.1020006@hot.ee> In-Reply-To: <537AB550.2090401@hot.ee> References: <537A050E.3040804@hot.ee> <537AB550.2090401@hot.ee>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------050109040000040606020904 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2014-05-20 04:52, Sulev-Madis Silber (ketas) wrote: > On 2014-05-19 16:20, Sulev-Madis Silber (ketas) wrote: >> Hello. >> >> Although maybe I could write this as reply to some other message, I feel >> like it might deserve separate one. >> >> I use U-Boot 2014.04 which sets CPU frequency to 1GHz, which seems nice. >> Apart from inability to find eMMC in ubldr (SD card is always fine), now >> I get whole different issues here. With 2013.04, I get occasional eMMC >> failure I mentioned earlier. With 2014.04, it's very hard to get SD >> devices detected at all. And I get all sorts of weird errors (megabytes >> of boot logs from serial if anyone wishes to see). I'm aware how HW >> clock changes can affect things like this, but I'm not exactly sure >> where and what happens when this is done. If I boot with 2013.04, it's >> ok again, if I switch to 2014.04 again, it's ok again for a while. It >> really feels like it's overheating. After a while, it gets extremely >> hard to get thing booted up. Both devices sometimes detect and sometimes >> not. I get things like "no compatible cards found on bus" (mmc 0/1), or >> things like "card at relative address x lost". Tried adding delays like >> suggested earlier, but that doesn't help and now the issue seems >> different. I get no other issues. System is very stable once it's booted >> up. There are no hangs, panics... Everything works. I must mention that >> I always use latest CURRENT. I didn't find a way to make kernel reboot >> system when root mount fails, so I manually patched that option in. Last >> time I got 11 failures before it booted up with both SD and eMMC found >> (they don't fail same way every time, sometimes SD is missing, often >> eMMC is missing). >> >> What would somebody else think about such issues? I don't have >> experience in HW dev, I can only guess what goes wrong. And again, if it >> boots, it works. And no component on BBB gets too warm to hold finger >> there for long time, too (if that matters). I have 5V 2.5A PSU powering >> it (but the PMIC should fail if voltage drops too much, etc, I read the >> datasheet for that), I have few LEDs with resistors connected to GPIO >> pins, two ~30cm wires that sit on table for input testing (resistors >> there too, of course) and Nokia DKU-5 data cable for USB-TTL serial >> console. If the board gets any ground, it's via this cable. But I don't >> see how my HW config is related to this issue. And I don't change this >> when I try different U-Boot's?! I don't have USB devices connected to >> host port and nothing to other USB port too. I use old 64MB SD card to >> help with booting (because of ubldr issues), not sure that matters, though. >> >> Thanks. >> > > > Now I have patch too. I feel much better now. It seems to fix > everything. I'm sure that not all of those "delay"'s are needed. I got > tired of failures and just put one into each place that seemed to need > some waiting before continue. The side effect is that mmc detection > doesn't take several seconds now, it's near instant. It also feels like > device read speed is faster but I'm not entirely sure about that. So, > what happened here? Slower CPU acted as some kind of limiter by itself? > What's correct solution here? I'm only guessing but it at least works > now. I don't think I've lost devices after this change, both SD card and > eMMC device are always there. I should disable reboot on rootfs mount > fail to fully confirm it. However that BUSTEST_W still gives error. Now, > only ubldr-no-eMMC fix is needed. And / or U-Boot fix? > Early "Send"... patch: http://ketas.si.pri.ee/mmc-detection-hacks2.diff (and attached) --------------050109040000040606020904 Content-Type: text/plain; charset=ISO-8859-15; name="mmc-detection-hacks2.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="mmc-detection-hacks2.diff" SW5kZXg6IHN5cy9kZXYvbW1jL21tYy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9kZXYvbW1j L21tYy5jCShyZXZpc2lvbiAyNjY0NDIpCisrKyBzeXMvZGV2L21tYy9tbWMuYwkod29ya2lu ZyBjb3B5KQpAQCAtNDE0LDYgKzQxNCw3IEBACiAJaW50IGVycjsKIAogCWRvIHsKKwkJbW1j X21zX2RlbGF5KDEwKTsKIAkJbWVtc2V0KCZtcmVxLCAwLCBza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VdLCBidWZbNl0sIGJ1Zls3 XSk7CisKIAkJbW1jYnJfc2V0X2J1c193aWR0aChzYy0+ZGV2LCBidXNfd2lkdGhfMSk7CiAJ CW1tY2JyX3VwZGF0ZV9pb3Moc2MtPmRldik7Ci0KIAkJaWYgKGVyciA9PSBNTUNfRVJSX05P TkUgJiYgbWVtY21wKGJ1ZiwgcDhvaywgOCkgPT0gMCkKIAkJCXJldHVybiAoYnVzX3dpZHRo XzgpOwogCX0KQEAgLTEyNjQsNiArMTI4NCw3IEBACiAJaWYgKGJvb3R2ZXJib3NlIHx8IG1t Y19kZWJ1ZykKIAkJZGV2aWNlX3ByaW50ZihzYy0+ZGV2LCAiUHJvYmluZyBjYXJkc1xuIik7 CiAJd2hpbGUgKDEpIHsKKwkJbW1jX21zX2RlbGF5KDEwKTsKIAkJZXJyID0gbW1jX2FsbF9z ZW5kX2NpZChzYywgcmF3X2NpZCk7CiAJCWlmIChlcnIgPT0gTU1DX0VSUl9USU1FT1VUKQog CQkJYnJlYWs7CkBAIC0xNTg2LDcgKzE2MDcsOSBAQAogCQkgICAgKGVyciA/IDAgOiBNTUNf T0NSX0NDUykgfCBtbWNicl9nZXRfb2NyKGRldiksIE5VTEwpOwogCX0gZWxzZQogCQltbWNf c2VuZF9vcF9jb25kKHNjLCBtbWNicl9nZXRfb2NyKGRldiksIE5VTEwpOworCW1tY19tc19k ZWxheSgxMCk7CiAJbW1jX2Rpc2NvdmVyX2NhcmRzKHNjKTsKKwltbWNfbXNfZGVsYXkoMTAp OwogCW1tY19yZXNjYW5fY2FyZHMoc2MpOwogCiAJbW1jYnJfc2V0X2J1c19tb2RlKGRldiwg cHVzaHB1bGwpOwo= --------------050109040000040606020904--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?537AB675.1020006>