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 _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

