]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/fm/fm.c
Merge git://git.denx.de/u-boot-fsl-qoriq
[u-boot] / drivers / net / fm / fm.c
index ce4a30731f984c0154d8573b272cd84240f694d3..89f0d6a14e3a9d7d2e0f56991b745bf04902713d 100644 (file)
@@ -368,8 +368,18 @@ int fm_init_common(int index, struct ccsr_fman *reg)
        void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
        int ret = 0;
 
+#ifdef CONFIG_DM_SPI_FLASH
+       struct udevice *new;
+
+       /* speed and mode will be read from DT */
+       ret = spi_flash_probe_bus_cs(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
+                                    0, 0, &new);
+
+       ucode_flash = dev_get_uclass_priv(new);
+#else
        ucode_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
                        CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
+#endif
        if (!ucode_flash)
                printf("SF: probe for ucode failed\n");
        else {