Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1557066
| From | Jaehoon Chung <jh80.chung@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 4/4] PCI: exynos: remove the duplicated codes |
| Date | 2017-01-12 03:20 +0100 |
| Message-ID | <sYD9D-6v1-9@gated-at.bofh.it> (permalink) |
| References | <sYD9D-6v1-3@gated-at.bofh.it> <sYD9D-6v1-11@gated-at.bofh.it> <sYD9D-6v1-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Removed the duplicated codes.
It can use the more simply than now.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Changelog on V2:
- None
drivers/pci/host/pci-exynos.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
index 6cbc1cc..a558fa1 100644
--- a/drivers/pci/host/pci-exynos.c
+++ b/drivers/pci/host/pci-exynos.c
@@ -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);
+ 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);
- }
+ 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);
+ 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);
- }
+ exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_ARMISC);
}
static void exynos_pcie_assert_core_reset(struct exynos_pcie *ep)
--
2.10.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 1/4] PCI: exynos: replace to one register accessor from each accessors Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-12 03:20 +0100 [PATCH V2 4/4] PCI: exynos: remove the duplicated codes Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-12 03:20 +0100 [PATCH V2 2/4] PCI: exynos: Remove the unnecessary variables Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-12 03:20 +0100 Re: [PATCH V2 1/4] PCI: exynos: replace to one register accessor from each accessors Bjorn Helgaas <helgaas@kernel.org> - 2017-01-12 19:00 +0100
csiph-web