public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] mmc: Read sd card detect properties from DT
Date: Sat, 22 Jun 2019 22:01:17 +0200	[thread overview]
Message-ID: <c7adb002-31cb-ca74-d10a-bf7153c341c7@gmail.com> (raw)
In-Reply-To: <1a4ca98c-a3cb-604b-9383-7d7571c6a843@techveda.org>

On 6/22/19 8:58 PM, Suniel Mahesh wrote:
> Hi Marek,

Hi,

> Looks like CD is working fine with TI AM3358X SOC based targets.

Yes, it does.

> Ran a quick test after looking at the discussion, posting the results which might be of some help.

I think you misunderstood my proposal.

mmc rescan ; mmc part ; <replace card> ; mmc rescan ; mmc part obviously
works, because of the second mmc rescan. Try without the second mmc
rescan, you'll get the old results.

My proposal was suggesting that we add the ability to poll CD into the
u-boot main loop and detect the card replacement in the background, thus
making "mmc rescan" basically a no-op. Then, if the user replaced the
card, the user won't have to worry about running "mmc rescan" or
forgetting to do so.

> In this test, mmc part is not printing the partition table of the previous card, instead it prints
> the partition table of the latest card which is inserted.
> 
> Hope the test is inline with the discussion. Please ignore if the results doesn't make any sense.
> 
> Tested on U-Boot v2019.07-rc1
> 
> 8GB card inserted
> 
> => mmc rescan
> => mmc part
> 
> Partition Map for MMC device 0  --   Partition Type: DOS
> 
> Part    Start Sector    Num Sectors     UUID            Type
>   1     2048            262144          7d8cd224-01     0b Boot
>   2     264192          15259648        7d8cd224-02     83
> 
> => mmc info
> Device: OMAP SD/MMC
> Manufacturer ID: 3
> OEM: 5344
> Name: SS08G 
> Bus Speed: 48000000
> Mode : SD High Speed (50MHz)
> Rd Block Len: 512
> SD version 3.0
> High Capacity: Yes
> Capacity: 7.4 GiB
> Bus Width: 4-bit
> Erase Group Size: 512 Bytes
> 
> 
> removed 8GB card and inserted 2GB card
> 
> => mmc rescan
> => mmc part
> 
> Partition Map for MMC device 0  --   Partition Type: DOS
> 
> Part    Start Sector    Num Sectors     UUID            Type
>   1     2048            262144          000c0116-01     0b Boot
>   2     264192          3647488         000c0116-02     83
> => mmc info  
> Device: OMAP SD/MMC
> Manufacturer ID: 1b
> OEM: 534d
> Name: 00000 
> Bus Speed: 48000000
> Mode : SD High Speed (50MHz)
> Rd Block Len: 512
> SD version 3.0
> High Capacity: No
> Capacity: 1.9 GiB
> Bus Width: 4-bit
> Erase Group Size: 512 Bytes
> 
> Thanks
> 
> Regards
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2019-06-22 20:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 12:47 [U-Boot] [PATCH v2 0/3] Add SDHCI card detection support Michal Simek
2019-06-19 12:47 ` [U-Boot] [PATCH v2 1/3] mmc: Read sd card detect properties from DT Michal Simek
2019-06-21  7:09   ` Peng Fan
2019-06-21 11:16     ` Marek Vasut
2019-06-22 18:58       ` Suniel Mahesh
2019-06-22 20:01         ` Marek Vasut [this message]
2019-06-21 11:36     ` Michal Simek
2019-06-19 12:47 ` [U-Boot] [PATCH v2 2/3] mmc: sdhci: Read cd-gpio from devicetree Michal Simek
2019-06-21  7:13   ` Peng Fan
2019-06-19 12:47 ` [U-Boot] [PATCH v2 3/3] mmc: sdhci: Implement SDHCI card detect Michal Simek

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=c7adb002-31cb-ca74-d10a-bf7153c341c7@gmail.com \
    --to=marek.vasut@gmail.com \
    --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