Commit 92004a06 authored by Jaehoon Chung's avatar Jaehoon Chung Committed by Bjorn Helgaas

PCI: exynos: Remove duplicated code

Remove duplicated register reads and writes.
Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarPankaj Dubey <pankaj.dubey@samsung.com>
Acked-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
parent 2681c0e7
......@@ -116,30 +116,24 @@ static void exynos_pcie_sideband_dbi_w_mode(struct exynos_pcie *ep, bool on)
{
u32 val;
if (on) {
val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_AWMISC);
if (on)
val |= PCIE_ELBI_SLV_DBI_ENABLE;
exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_AWMISC);
} else {
val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_AWMISC);
else
val &= ~PCIE_ELBI_SLV_DBI_ENABLE;
exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_AWMISC);
}
}
static void exynos_pcie_sideband_dbi_r_mode(struct exynos_pcie *ep, bool on)
{
u32 val;
if (on) {
val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_ARMISC);
if (on)
val |= PCIE_ELBI_SLV_DBI_ENABLE;
exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_ARMISC);
} else {
val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_ARMISC);
else
val &= ~PCIE_ELBI_SLV_DBI_ENABLE;
exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_ARMISC);
}
}
static void exynos_pcie_assert_core_reset(struct exynos_pcie *ep)
......
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