public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 2/3] mmc: meson: add MMC driver for Meson GX (S905)
Date: Sun, 16 Apr 2017 12:08:44 +0200	[thread overview]
Message-ID: <77dce00a-f357-418b-963d-184fb9a462fe@suse.de> (raw)
In-Reply-To: <c673e2c0-8665-9edf-3620-3fb4d77a3b0f@gmx.de>



On 16.04.17 04:09, Heinrich Schuchardt wrote:
> On 04/15/2017 11:51 PM, Andreas F채rber wrote:
>> Am 15.04.2017 um 23:16 schrieb Andreas F채rber:
>>> Am 15.04.2017 um 23:04 schrieb Alexander Graf:
>>>>> Am 15.04.2017 um 22:34 schrieb Andreas F채rber <afaerber@suse.de>:
>>>>>> Am 15.04.2017 um 20:27 schrieb Alexander Graf:
>>>>>>> On 15.04.17 20:18, Heiner Kallweit wrote:
>>>>>>>> Am 15.04.2017 um 17:05 schrieb Andreas F채rber:
>>>>>>>> But for the Vega S95 Telos I needed to disable the first of three MMC
>>>>>>>> nodes (SDIO) - otherwise U-Boot would happily iterate over them for
>>>>>>>> distro boot with Heinrich's patch, but GRUB would come up with no disks,
>>>>>>>> so that booting failed. I'm not yet sure why, maybe it's a UEFI-side
>>>>>>>> problem in that it is the first MMC device that is absent rather than
>>>>>>>> the last one?
>>>>>>>>
>>>>>>> I don't own this device so I can just provide a guess.
>>>>>>> Based on DT the device ordering most likely is:
>>>>>>> mmc0: SDIO
>>>>>>> mmc1: SD
>>>>>>> mmc2: eMMC
>>>>> [...]
>>>>>> If grub comes up, distro boot has successfully found the target binary
>>>>>> and executed it. For some reason, grub can not find its boot origin though.
>>>>>>
>>>>>> Andreas, please add debug prints like the ones below and check that the
>>>>>> device names match:
>>>>>
>>>>> U-Boot 2017.05-rc1-00318-g082535f-dirty (Apr 15 2017 - 22:29:17 +0200)
>>>>> vega-s95
>>>>>
>>>>> DRAM:  2 GiB
>>>>> MMC:   mmc at 70000: 0, mmc at 72000: 1, mmc at 74000: 2
>>>>> Using default environment
>>>>>
>>>>> In:    serial at 4c0
>>>>> Out:   serial at 4c0
>>>>> Err:   serial at 4c0
>>>>> Net:   eth0: ethernet at c9410000
>>>>> Hit any key to stop autoboot:  0
>>>>> mmc_init: -95, time 1806
>>>>> MMC Device 0 not found
>>>>> no mmc device at slot 0
>>>>> switch to partitions #0, OK
>>>>> mmc1 is current device
>>>>> Scanning mmc 1:1...
>>>>> Setting boot device name to '//boot/dtb/amlogic/meson-gxbb-v'
>>>>> 20335 bytes read in 43 ms (460.9 KiB/s)
>>>>> Found EFI removable media binary efi/boot/bootaa64.efi
>>>>> Setting boot device name to '/efi/boot/bootaa64.efi'
>>>>> reading efi/boot/bootaa64.efi
>>>>> 129024 bytes read in 13 ms (9.5 MiB/s)
>>>>> ## Starting EFI application at 01080000 ...
>>>>> mmc_init: -95, time 1807
>>>>> Found 0 disks
>>>>
>>>> That looks like efi_disk didn't manage to enumerate any devices?
>>>
>>> Apparently. The last line comes from
>>> lib/efi_loader_efi_disk:efi_disk_register(), and CONFIG_BLK=y. As you
>>> can see, there is not a single "Scanning disk" line, so I guess we do
>>> not iterate over uclass devices properly?
>>>
>>> On the Odroid-C2 I get this:
>>>
>>> Scanning disk mmc at 72000.blk...
>>> Card did not respond to voltage select!
>>> mmc_init: -95, time 9
>>> Found 1 disks
>>>
>>> Therefore my guess that it matters at what point in time - before or
>>> after the disk we want - the error accessing an MMC device happens.
>>
>> For comparison, Vega S95 with first MMC node disabled in DT:
>>
>> Scanning disk mmc at 72000.blk...
>> Adding disk device 'mmc at 72000.blk'
>> ** First descriptor is NOT a primary desc on 1:1 **
>> Scanning disk mmc at 74000.blk...
>> Adding disk device 'mmc at 74000.blk'
>> Found 2 disks
>>
>> Regards,
>> Andreas
>>
> By adding sd_mmc_a to the odroid-c2.dts I was able to reproduce the
> problem on the Odroid C2.
>
> While booting from SD card via booti still worked
> bootefi would not find any block device:
>
> => bootefi hello
> ## Starting EFI application at 01000000 ...
> WARNING: Invalid device tree, expect boot to fail
> efi_add_memory_map: 0x7cf53000 0x1 2 yes
> uclass_find_device_by_seq: 0 -1
> uclass_find_device_by_seq: 0 0
>    - -1 -1
>    - -1 -1
>    - -1 -1
>    - not found
> set_state_simple op missing
> blk_get_device: if_type=6, devnum=0: mmc at 70000.blk, 6, 0
> mmc_init: -95, time 1807
> Found 0 disks
> efi_add_memory_map: 0x7cf52000 0x1 6 yes
> do_bootefi_exec:234 Jumping to 0x7cf53148
> EFI: Entry efi_cout_output_string(000000007ff94b38, 000000007cf53280)
> Hello, world!
> EFI: Entry efi_exit(000000007ffa4598, 0, 0, 0000000000000000)
> ## Application terminated, r = 0
>
> In the debug output you can see that after trying non-existant
> mmc at 70000.blk no further devices are scanned. mmc at 72000.blk which has
> the SD card is not enumerated.

To me that looks like something wrong with DM code, as there is no 
explicit abort condition in efi_disk_register() for the CONFIG_BLK case. 
Let's CC Simon and ask for help :).


Alex

  reply	other threads:[~2017-04-16 10:08 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170412182456epcas3p1e652ef3f772bf91ea3fbf7203fa00c71@epcas3p1.samsung.com>
2017-04-12 18:24 ` [U-Boot] [PATCH v7 0/3] mmc: meson: add MMC support for Meson GX (S905) Heiner Kallweit
2017-04-12 18:28   ` [U-Boot] [PATCH v7 1/3] arm: dts: update Meson GXBB / Odroid-C2 DT with recent Linux version Heiner Kallweit
2017-04-14  6:21     ` Jaehoon Chung
2017-04-12 18:30   ` [U-Boot] [PATCH v7 2/3] mmc: meson: add MMC driver for Meson GX (S905) Heiner Kallweit
2017-04-12 23:50     ` [U-Boot] [U-Boot, v7, " Vagrant Cascadian
2017-04-14  6:22     ` [U-Boot] [PATCH v7 " Jaehoon Chung
2017-04-15 15:05       ` Andreas Färber
2017-04-15 18:18         ` Heiner Kallweit
2017-04-15 18:27           ` Alexander Graf
2017-04-15 19:13             ` Heinrich Schuchardt
2017-04-15 20:21               ` Alexander Graf
2017-04-15 20:34             ` Andreas Färber
2017-04-15 20:52               ` Heinrich Schuchardt
2017-04-15 21:07                 ` Andreas Färber
2017-04-15 21:04               ` Alexander Graf
2017-04-15 21:16                 ` Andreas Färber
2017-04-15 21:51                   ` Andreas Färber
2017-04-16  2:09                     ` Heinrich Schuchardt
2017-04-16 10:08                       ` Alexander Graf [this message]
2017-04-16 19:34                         ` Simon Glass
2017-04-17 21:18                           ` Heinrich Schuchardt
2017-04-17 22:39                             ` Jaehoon Chung
2017-04-24  3:38                               ` Simon Glass
2017-04-24  5:18                                 ` Jaehoon Chung
2017-04-29  0:25                           ` Simon Glass
2017-04-18 18:44         ` [U-Boot] [PATCH 1/1] core/uclass: uclass_get_device_tail: always set devp Heinrich Schuchardt
2017-04-19  0:12           ` Simon Glass
2017-04-19  3:03             ` Andreas Färber
2017-04-19  3:37               ` Simon Glass
2017-04-19  4:48                 ` Heinrich Schuchardt
2017-04-19 11:26                 ` [U-Boot] [PATCH v2 1/1] core/uclass: iterate over all devices of a uclass Heinrich Schuchardt
2017-04-19 14:28                   ` Simon Glass
2017-04-19 14:43                     ` Andreas Färber
2017-04-19 15:14                       ` Simon Glass
2017-04-19 15:52                         ` Simon Glass
2017-04-19 16:37                           ` Andreas Färber
2017-04-19 16:56                             ` Simon Glass
2017-04-19 17:00                               ` Andreas Färber
2017-04-19 17:10                                 ` Simon Glass
2017-04-19 18:08                                   ` Heinrich Schuchardt
2017-04-19 21:29                                     ` Simon Glass
2017-04-19 15:55                     ` Heinrich Schuchardt
2017-04-19 16:02                       ` Simon Glass
2017-04-19 16:22                   ` Álvaro Fernández Rojas
2017-04-19 16:25                     ` Andreas Färber
2017-04-19 16:31                       ` Álvaro Fernández Rojas
2017-04-19 16:45                         ` Andreas Färber
2017-04-19 21:06                   ` Andreas Färber
2017-04-19 21:34                     ` Simon Glass
2017-04-22 23:58                       ` Simon Glass
2017-04-23 10:48                         ` Andreas Färber
2017-04-24  2:11                           ` Simon Glass
2017-04-23 10:55                       ` Andreas Färber
2017-04-24  2:12                         ` Simon Glass
2017-04-23  2:10                   ` Simon Glass
2017-04-23  3:44                     ` Heinrich Schuchardt
2017-04-12 18:32   ` [U-Boot] [PATCH v7 3/3] odroid-c2: enable new Meson GX MMC driver in board defconfig Heiner Kallweit
2017-04-14  6:22     ` Jaehoon Chung
2017-04-14  3:12   ` [U-Boot] [PATCH v7 0/3] mmc: meson: add MMC support for Meson GX (S905) Jaehoon Chung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77dce00a-f357-418b-963d-184fb9a462fe@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox