Skip to content
Snippets Groups Projects
Select Git revision
4 results

cmd_mmc.c

Blame
  • Forked from Reform / reform-boundary-uboot
    Source project has a limited visibility.
    • Stephen Warren's avatar
      a5710920
      cmd_mmc: make mmc dev always re-probe the HW · a5710920
      Stephen Warren authored
      
      Currently, U-Boot behaves as follows:
      
      - Begin with no SD card inserted in "mmc 1"
      - Execute: mmc dev 1
      - This fails, since there is no card
      - User plugs in an SD card
      - Execute: mmc dev 1
      - This still fails, since the HW isn't reprobed.
      
      With this change, U-Boot behaves as follows:
      
      - Begin with no SD card inserted in "mmc 1"
      - Execute: mmc dev 1
      - This fails, since there is no card
      - User plugs in an SD card
      - Execute: mmc dev 1
      - The newly present SD card is detected
      
      I know that "mmc rescan" will force the HW to be reprobed, but I feel it
      makes more sense if "mmc dev" always reprobes the HW after selecting the
      current MMC device. This allows scripts to just execute "mmc dev", and
      not have to also execute "mmc rescan" to check for media presense.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
      a5710920
      History
      cmd_mmc: make mmc dev always re-probe the HW
      Stephen Warren authored
      
      Currently, U-Boot behaves as follows:
      
      - Begin with no SD card inserted in "mmc 1"
      - Execute: mmc dev 1
      - This fails, since there is no card
      - User plugs in an SD card
      - Execute: mmc dev 1
      - This still fails, since the HW isn't reprobed.
      
      With this change, U-Boot behaves as follows:
      
      - Begin with no SD card inserted in "mmc 1"
      - Execute: mmc dev 1
      - This fails, since there is no card
      - User plugs in an SD card
      - Execute: mmc dev 1
      - The newly present SD card is detected
      
      I know that "mmc rescan" will force the HW to be reprobed, but I feel it
      makes more sense if "mmc dev" always reprobes the HW after selecting the
      current MMC device. This allows scripts to just execute "mmc dev", and
      not have to also execute "mmc rescan" to check for media presense.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>