]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/spi/spi-zynqmp-gqspi.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 39
[linux.git] / drivers / spi / spi-zynqmp-gqspi.c
index 9f83e1b17aa16b6aa934d24955e5da7773af10a7..07a83ca164c22b07923716b727979cf491aa4ba0 100644 (file)
@@ -1,19 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Xilinx Zynq UltraScale+ MPSoC Quad-SPI (QSPI) controller driver
  * (master mode only)
  *
  * Copyright (C) 2009 - 2015 Xilinx, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
  */
 
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
+#include <linux/firmware/xlnx-zynqmp.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/module.h>
 
 #define SPI_AUTOSUSPEND_TIMEOUT                3000
 enum mode_type {GQSPI_MODE_IO, GQSPI_MODE_DMA};
+static const struct zynqmp_eemi_ops *eemi_ops;
 
 /**
  * struct zynqmp_qspi - Defines qspi driver instance
@@ -1021,6 +1019,10 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
        struct resource *res;
        struct device *dev = &pdev->dev;
 
+       eemi_ops = zynqmp_pm_get_eemi_ops();
+       if (IS_ERR(eemi_ops))
+               return PTR_ERR(eemi_ops);
+
        master = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
        if (!master)
                return -ENOMEM;