Hi Jagan,

On 2015年12月06日 16:23, Jagan Teki wrote:
+#ifdef CONFIG_CFI_FLASH /* for driver model */
+static void cfi_flash_init_dm(void)
+{
+       struct udevice *dev;
+
+       cfi_flash_num_flash_banks = 0;
+       /*
+        * The uclass_first_device() will probe the first device and
+        * uclass_next_device() will probe the rest if they exist. So
+        * that cfi_flash_probe() will get called assigning the base
+        * addresses that are available.
+        */
+       for (uclass_first_device(UCLASS_MTD, &dev);
+            dev;
+            uclass_next_device(&dev)) {
+       }
+}

I think this is for probing MTD_UCLASS drivers is it? for my
understanding MTD should be generic to all the flash variants if so
this probing shouldn't be CFI specific or If MTD uclass is specific to
CFI this implementation is correct. Can you comment which one is true.

This probing is not specific to CFI flash. It will probe all flash variants of MTD uclass.

Best regards,
Thomas
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to