Commit 186e74b9 authored by Li Yang's avatar Li Yang Committed by Kumar Gala

powerpc/fsl_rio: use LAW address from device tree

Instead of fixed address in old code.
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent fc274a15
...@@ -1076,8 +1076,9 @@ int fsl_rio_setup(struct of_device *dev) ...@@ -1076,8 +1076,9 @@ int fsl_rio_setup(struct of_device *dev)
INIT_LIST_HEAD(&port->dbells); INIT_LIST_HEAD(&port->dbells);
port->iores.start = law_start; port->iores.start = law_start;
port->iores.end = law_start + law_size; port->iores.end = law_start + law_size - 1;
port->iores.flags = IORESOURCE_MEM; port->iores.flags = IORESOURCE_MEM;
port->iores.name = "rio_io_win";
priv->bellirq = irq_of_parse_and_map(dev->node, 2); priv->bellirq = irq_of_parse_and_map(dev->node, 2);
priv->txirq = irq_of_parse_and_map(dev->node, 3); priv->txirq = irq_of_parse_and_map(dev->node, 3);
...@@ -1155,14 +1156,15 @@ int fsl_rio_setup(struct of_device *dev) ...@@ -1155,14 +1156,15 @@ int fsl_rio_setup(struct of_device *dev)
out_be32((priv->regs_win + RIO_ISR_AACR), RIO_ISR_AACR_AA); out_be32((priv->regs_win + RIO_ISR_AACR), RIO_ISR_AACR_AA);
/* Configure maintenance transaction window */ /* Configure maintenance transaction window */
out_be32(&priv->maint_atmu_regs->rowbar, 0x000c0000); out_be32(&priv->maint_atmu_regs->rowbar, law_start >> 12);
out_be32(&priv->maint_atmu_regs->rowar, 0x80077015); out_be32(&priv->maint_atmu_regs->rowar, 0x80077015); /* 4M */
priv->maint_win = ioremap(law_start, RIO_MAINT_WIN_SIZE); priv->maint_win = ioremap(law_start, RIO_MAINT_WIN_SIZE);
/* Configure outbound doorbell window */ /* Configure outbound doorbell window */
out_be32(&priv->dbell_atmu_regs->rowbar, 0x000c0400); out_be32(&priv->dbell_atmu_regs->rowbar,
out_be32(&priv->dbell_atmu_regs->rowar, 0x8004200b); (law_start + RIO_MAINT_WIN_SIZE) >> 12);
out_be32(&priv->dbell_atmu_regs->rowar, 0x8004200b); /* 4k */
fsl_rio_doorbell_init(port); fsl_rio_doorbell_init(port);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment