BBB MMC / SD detection instability with U-Boot 2014.04 (CPU 1GHz)

SAITOU Toshihide toshi at ruby.ocn.ne.jp
Thu May 22 13:37:59 UTC 2014


In message: <537DF45D.8010304 at hot.ee>
            "Sulev-Madis Silber (ketas)" <madis555 at hot.ee> writes:
> On 2014-05-22 14:46, SAITOU Toshihide wrote:
>> In message: <CADH-AwGb36EUknNofdch1Q4Pn8GAN+Ep9SdiJ_f7Q2v9e4kW1g at mail.gmail.com>
>>             Winston Smith <smith.winston.101 at gmail.com> writes:
>>> On Wed, May 21, 2014 at 11:20 AM, SAITOU Toshihide <toshi at ruby.ocn.ne.jp> wrote:
>>>> If abort like
>>>>
>>>>   musbotg0: TI AM335X USBSS v0.0.13
>>>>   Fatal kernel mode data abort: 'External Non-Linefetch Abort (S)'
>>>>   trapframe: 0xc0a2eb60
>>>
>>> I see this with the 1Ghz uboot, it occurs about 50% of the time, see:
>>>
>>> http://comments.gmane.org/gmane.os.freebsd.devel.arm/8200
>> 
>> Although it is an ad hoc workaround but ``usb start'' at u-boot command
>> prompt (someone mentioned before) or add device_printf("!\n") before
>> ``rev = USBSS_READ4(sc, USBSS_REVREG);'' in the musbotg_attach of
>> am335x_usbss.c prevent this panic for me.
>> 
>> Anyway I understand my procedure is workaround, and is working by
>> chance or side effect, but eMMC boot and 1000 MHz operation is fun.
> 
> I wish I could get that working too... I tried to trace device detection
> path in loader but only found that the problem must be in uboot. Since
> loader is program that runs in uboot. At least now I know how that works
> a bit more. But actual issue remains unresolved. What's weird is how I
> actually boot from eMMC and it's present in uboot... Loader comes from
> eMMC and then loader suddenly has no devices inside it. The hell is that.


jFYI my boot log is here:

(note) 

1. ``Card did not respond to voltage select!'' is shortened to v.
2. SD card is detached and I don't change the
   CONFIG_EXTRA_ENV_SETTINGS of include/configs/am335x_evm.h, so
   u-boot try to boot from SD -> failed -> change mmcdev 1 -> run
   mmcboot (evaluate uEnv.txt) -> run nandboot (actually run mmcboot
   see my previous mail).
3. add some comment.


U-Boot SPL 2014.04 (May 22 2014 - 10:29:32)
reading args             <- file named args with white space.
reading u-boot.img       <- two same message. ?
reading u-boot.img


U-Boot 2014.04 (May 22 2014 - 10:29:32)

I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC  <- cable is detached.
cpsw, usb_ether
Hit any key to stop autoboot:  0 
vmmc0(part 0) is current device     <- u-boot.img step in at ``v''.
vmmc1(part 0) is current device     <- u-boot.img step in at ``v''.
SD/MMC found on device 1
reading uEnv.txt
462 bytes read in 4 ms (112.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
reading ubldr
249175 bytes read in 30 ms (7.9 MiB/s)
## Starting application at 0x88000054 ...
Consoles: U-Boot console  
Compatible U-Boot API signature found @9f638510

FreeBSD/armv6 U-Boot loader, Revision 1.2
(toshi at fbsd, Wed May 21 23:33:26 JST 2014)

DRAM: 512MB
vvvvvvvvvvvvNumber of U-Boot devices: 3  <- detect SD, eMMC, net. thanks crochet for patches!
U-Boot env: loaderdev='disk'
Found U-Boot device: disk
  Probing all disk devices...
  Checking unit=0 slice=<auto> partition=<auto>...vvdisk0: device open failed with error=2, handle=1

  Checking unit=1 slice=<auto> partition=<auto>...vv.vvvv.vvvv.vvvv.vvvv good.
.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvvLoading /boot/defaults/loader.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vvv.vvvv.vvvv.vvvv.vvvv.vvvvsyms=[0x4+0x85f40.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv+0x4+0x50dd5.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv]
.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv/boot/kernel/geom_label.ko text=0x5054 data=0x85c+0x30 syms=[0x4+0x1020+0x4+0xfe2.vvvv]

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...               
.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvvUsing DTB compiled into kernel.
.vvvv.vvvv.vvvv.vvvv.vvvv.vvvv.vvvvKernel entry at 0x80200100...
Kernel args: (null)
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #41 r265876:266494M: Thu May 22 08:18:49 JST 2014
    toshi at fbsd:/usr/obj/arm.armv6/usr/src/sys/BEAGLEBONE arm
FreeBSD clang version 3.4 (tags/RELEASE_34/final 197956) 20140216
WARNING: WITNESS option enabled, expect reduced performance.
CPU: Cortex A8-r3 rev 2 (Cortex-A core)
 Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
 WB disabled EABT branch prediction enabled
LoUU:2 LoC:2 LoUIS:1 
Cache level 1: 
 32KB/64B 4-way data cache WT WB Read-Alloc
 32KB/64B 4-way instruction cache Read-Alloc
Cache level 2: 
 256KB/64B 8-way unified cache WT WB Read-Alloc Write-Alloc
real memory  = 536870912 (512 MB)
avail memory = 514043904 (490 MB)
Texas Instruments AM3358 Processor, Revision ES1.1
random device not loaded; using insecure entropy
random: <Software, Yarrow> initialized
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
aintc0: <TI AINTC Interrupt Controller> mem 0x48200000-0x48200fff on simplebus0
aintc0: Revision 5.0
ti_scm0: <TI Control Module> mem 0x44e10000-0x44e11fff on simplebus0
am335x_prcm0: <AM335x Power and Clock Management> mem 0x44e00000-0x44e012ff on simplebus0
am335x_prcm0: Clocks: System 24.0 MHz, CPU 1000 MHz
am335x_dmtimer0: <AM335x DMTimer> mem 0x44e05000-0x44e05fff,0x44e31000-0x44e31fff,0x48040000-0x48040fff,0x48042000-0x48042fff,0x48044000-0x48044fff,0x48046000-0x48046fff,0x48048000-0x48048fff,0x4804a000-0x4804afff irq 66,67,68,69,92,93,94,95 on simplebus0
Timecounter "AM335x Timecounter" frequency 24000000 Hz quality 1000
Event timer "AM335x Eventtimer" frequency 24000000 Hz quality 1000
ti_adc0: <TI ADC controller> mem 0x44e0d000-0x44e0efff irq 16 on simplebus0
ti_adc0: scheme: 0x1 func: 0x730 rtl: 0 rev: 0.1 custom rev: 0
gpio0: <TI General Purpose I/O (GPIO)> mem 0x44e07000-0x44e07fff,0x4804c000-0x4804cfff,0x481ac000-0x481acfff,0x481ae000-0x481aefff irq 96,97,98,99,32,33,62,63 on simplebus0
gpioc0: <GPIO controller> on gpio0
gpiobus0: <OFW GPIO bus> on gpio0
gpioled0: <GPIO led> at pin(s) 53 on gpiobus0
gpioled1: <GPIO led> at pin(s) 54 on gpiobus0
gpioled2: <GPIO led> at pin(s) 55 on gpiobus0
gpioled3: <GPIO led> at pin(s) 56 on gpiobus0
uart0: <TI UART (16550 compatible)> mem 0x44e09000-0x44e09fff irq 72 on simplebus0
uart0: console (115384,n,8,1)
ti_edma30: <TI EDMA Controller> mem 0x49000000-0x490fffff,0x49800000-0x498fffff,0x49900000-0x499fffff,0x49a00000-0x49afffff irq 12,13,14 on simplebus0
ti_edma30: EDMA revision 40014c00
sdhci_ti0: <TI MMCHS (SDHCI 2.0)> mem 0x48060000-0x48060fff irq 64 on simplebus0
sdhci_ti1: <TI MMCHS (SDHCI 2.0)> mem 0x481d8000-0x481d8fff irq 28 on simplebus0
mmc0: <MMC/SD bus> on sdhci_ti1
cpsw0: <3-port Switch Ethernet Subsystem> mem 0x4a100000-0x4a103fff irq 40,41,42,43 on simplebus0
cpsw0: CPSW SS Version 1.12 (0)
cpsw0: Initial queue size TX=128 RX=384
cpsw0: Ethernet address: c8:a0:30:af:a7:34
miibus0: <MII bus> on cpsw0
smscphy0: <SMC LAN8710A 10/100 interface> PHY 0 on miibus0
smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
iichb0: <TI I2C Controller> mem 0x44e0b000-0x44e0bfff irq 70 on simplebus0
iichb0: I2C revision 4.0
iicbus0: <OFW I2C bus> on iichb0
iic0: <I2C generic I/O> on iicbus0
am335x_pmic0: <TI TPS65217 Power Management IC> at addr 0x24 on iicbus0
iichb1: <TI I2C Controller> mem 0x4802a000-0x4802afff irq 71 on simplebus0
iichb1: I2C revision 4.0
iicbus1: <OFW I2C bus> on iichb1
iic1: <I2C generic I/O> on iicbus1
iichb2: <TI I2C Controller> mem 0x4819c000-0x4819cfff irq 30 on simplebus0
iichb2: I2C revision 4.0
iicbus2: <OFW I2C bus> on iichb2
iic2: <I2C generic I/O> on iicbus2
am335x_pwm0: <AM335x PWM> mem 0x48300000-0x483000ff,0x48300100-0x4830017f,0x48300180-0x483001ff,0x48300200-0x4830025f irq 86,58 on simplebus0
am335x_pwm1: <AM335x PWM> mem 0x48302000-0x483020ff,0x48302100-0x4830217f,0x48302180-0x483021ff,0x48302200-0x4830225f irq 87,59 on simplebus0
am335x_pwm2: <AM335x PWM> mem 0x48304000-0x483040ff,0x48304100-0x4830417f,0x48304180-0x483041ff,0x48304200-0x4830425f irq 88,60 on simplebus0
musbotg0: <TI AM33xx integrated USB OTG controller> mem 0x47400000-0x47400fff,0x47401000-0x474012ff,0x47401300-0x474013ff,0x47401400-0x474017ff,0x47401800-0x47401aff,0x47401b00-0x47401bff,0x47401c00-0x47401fff irq 17,18,19 on simplebus0
musbotg0: !
musbotg0: TI AM335X USBSS v0.0.13
usbus0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
usbus0 on musbotg0
usbus1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
usbus1 on musbotg0
ti_pruss0: <TI Programmable Realtime Unit Subsystem> mem 0x4a300000-0x4a37ffff irq 20,21,22,23,24,25,26,27 on simplebus0
ti_pruss0: AM33xx PRU-ICSS
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
ugen1.1: <Mentor Graphics> at usbus1
uhub0: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.1: <Mentor Graphics> at usbus0
uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
uhub1: 1 port with 1 removable, self powered
uhub0: 1 port with 1 removable, self powered
mmcsd0: 2GB <MMC MMC02G 3.10 SN 404245756 MFG 12/2012 by 254 0x004e> at mmc0 48.0MHz/8bit/65535-block
am335x_pmic0: TPS65217C ver 1.2 powered by AC
random: unblocking device.
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/ufs/eMMCroot [rw,noatime]...
warning: no time-of-day clock registered, system time will not be set accurately
Setting hostuuid: b3a77c95-daaa-11e3-89de-c8a030afa734.
Setting hostid: 0x5391a30f.
No suitable dump device was found.
Entropy harvesting: interrupts ethernet point_to_point swi.
Starting file system checks:
/dev/ufs/eMMCroot: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ufs/eMMCroot: clean, 352959 free (2127 frags, 43854 blocks, 0.5% fragmentation)
Mounting local file systems:.
Writing entropy file:.
Setting hostname: beaglebone.
cpsw0: link state changed to DOWN
Starting Network: lo0 cpsw0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
	ether c8:a0:30:af:a7:34
	media: Ethernet autoselect (none)
	status: no carrier
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Starting devd.
Starting pflogd: 
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Waiting 30s for the default route interface: .....(no carrier)
Creating and/or trimming log files.
Starting syslogd.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
Starting casperd.
Clearing /tmp (X related).
Updating motd:.
Mounting late file systems:.
Performing sanity check on sshd configuration.
Starting sshd.
Starting cron.
Starting background file system checks in 60 seconds.

Thu May 22 00:09:34 UTC 2014

FreeBSD/arm (beaglebone) (ttyu0)

login: 

-- 
SAITOU Toshihide


More information about the freebsd-arm mailing list