提交 9b56beed 编写于 作者: L Laurentiu Tudor 提交者: David S. Miller

fsl/fman: don't touch liodn base regs reserved on non-PAMU SoCs

The liodn base registers are specific to PAMU based NXP systems and are
reserved on SMMU based ones. Don't access them unless PAMU is compiled in.
Signed-off-by: NLaurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: NMadalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fb8d1d7e
...@@ -634,6 +634,9 @@ static void set_port_liodn(struct fman *fman, u8 port_id, ...@@ -634,6 +634,9 @@ static void set_port_liodn(struct fman *fman, u8 port_id,
{ {
u32 tmp; u32 tmp;
iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]);
if (!IS_ENABLED(CONFIG_FSL_PAMU))
return;
/* set LIODN base for this port */ /* set LIODN base for this port */
tmp = ioread32be(&fman->dma_regs->fmdmplr[port_id / 2]); tmp = ioread32be(&fman->dma_regs->fmdmplr[port_id / 2]);
if (port_id % 2) { if (port_id % 2) {
...@@ -644,7 +647,6 @@ static void set_port_liodn(struct fman *fman, u8 port_id, ...@@ -644,7 +647,6 @@ static void set_port_liodn(struct fman *fman, u8 port_id,
tmp |= liodn_base << DMA_LIODN_SHIFT; tmp |= liodn_base << DMA_LIODN_SHIFT;
} }
iowrite32be(tmp, &fman->dma_regs->fmdmplr[port_id / 2]); iowrite32be(tmp, &fman->dma_regs->fmdmplr[port_id / 2]);
iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]);
} }
static void enable_rams_ecc(struct fman_fpm_regs __iomem *fpm_rg) static void enable_rams_ecc(struct fman_fpm_regs __iomem *fpm_rg)
...@@ -1942,6 +1944,8 @@ static int fman_init(struct fman *fman) ...@@ -1942,6 +1944,8 @@ static int fman_init(struct fman *fman)
fman->liodn_offset[i] = fman->liodn_offset[i] =
ioread32be(&fman->bmi_regs->fmbm_spliodn[i - 1]); ioread32be(&fman->bmi_regs->fmbm_spliodn[i - 1]);
if (!IS_ENABLED(CONFIG_FSL_PAMU))
continue;
liodn_base = ioread32be(&fman->dma_regs->fmdmplr[i / 2]); liodn_base = ioread32be(&fman->dma_regs->fmdmplr[i / 2]);
if (i % 2) { if (i % 2) {
/* FMDM_PLR LSB holds LIODN base for odd ports */ /* FMDM_PLR LSB holds LIODN base for odd ports */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册