#include <linux/msi.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
+#include <linux/io.h>
#include <linux/fsl/mc.h>
#include "../../include/dpaa2-io.h"
* Set the CENA regs to be the cache inhibited area of the portal to
* avoid coherency issues if a user migrates to another core.
*/
- desc.regs_cena = ioremap_wc(dpio_dev->regions[1].start,
- resource_size(&dpio_dev->regions[1]));
- desc.regs_cinh = ioremap(dpio_dev->regions[1].start,
- resource_size(&dpio_dev->regions[1]));
+ desc.regs_cena = devm_memremap(dev, dpio_dev->regions[1].start,
+ resource_size(&dpio_dev->regions[1]),
+ MEMREMAP_WC);
+ if (!desc.regs_cena) {
+ dev_err(dev, "devm_memremap failed\n");
+ goto err_allocate_irqs;
+ }
+
+ desc.regs_cinh = devm_ioremap(dev, dpio_dev->regions[1].start,
+ resource_size(&dpio_dev->regions[1]));
+ if (!desc.regs_cinh) {
+ dev_err(dev, "devm_ioremap failed\n");
+ goto err_allocate_irqs;
+ }
err = fsl_mc_allocate_irqs(dpio_dev);
if (err) {
/* qbman software portal descriptor structure */
struct qbman_swp_desc {
void *cena_bar; /* Cache-enabled portal base address */
- void *cinh_bar; /* Cache-inhibited portal base address */
+ void __iomem *cinh_bar; /* Cache-inhibited portal base address */
u32 qman_version;
};
/* portal data structure */
struct qbman_swp {
const struct qbman_swp_desc *desc;
- void __iomem *addr_cena;
+ void *addr_cena;
void __iomem *addr_cinh;
/* Management commands */