]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/net/fm/fm.c
Merge git://git.denx.de/u-boot-fsl-qoriq
[people/ms/u-boot.git] / drivers / net / fm / fm.c
index 00cdfd47b864213c7a2960d567cce59d648ed98d..89f0d6a14e3a9d7d2e0f56991b745bf04902713d 100644 (file)
@@ -7,7 +7,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <asm/io.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 
 #include "fm.h"
 #include <fsl_qe.h>            /* For struct qe_firmware */
@@ -336,9 +336,6 @@ static int fm_init_bmi(int fm_idx, struct fm_bmi_common *bmi)
 
 static void fm_init_qmi(struct fm_qmi_common *qmi)
 {
-       /* disable enqueue and dequeue of QMI */
-       clrbits_be32(&qmi->fmqm_gc, FMQM_GC_ENQ_EN | FMQM_GC_DEQ_EN);
-
        /* disable all error interrupts */
        out_be32(&qmi->fmqm_eien, FMQM_EIEN_DISABLE_ALL);
        /* clear all error events */
@@ -371,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 {