From: Jaehoon Chung <jh80.chung@samsung.com>
To: linux-pci@vger.kernel.org
Cc: helgaas@google.com, krzk@kernel.org,
linux-kernel@vger.kernel.org, jingoohan1@gmail.com,
javier@osg.samsung.com, kgene@kernel.org,
linux-samsung-soc@vger.kernel.org,
Jaehoon Chung <jh80.chung@samsung.com>
Subject: [PATCH 4/4] PCI: exynos: remove the duplicated codes
Date: Mon, 19 Dec 2016 17:16:14 +0900 [thread overview]
Message-ID: <20161219081614.5403-5-jh80.chung@samsung.com> (raw)
In-Reply-To: <20161219081614.5403-1-jh80.chung@samsung.com>
Removed the duplicated codes.
It can use the more simply than now.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
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 d705bfe..33562cf 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
next prev parent reply other threads:[~2016-12-19 8:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 8:16 [PATCH 0/4] PCI: exynos: cleans the minor things Jaehoon Chung
2016-12-19 8:16 ` [PATCH 1/4] PCI: exynos: replace to one register accessor from each accessors Jaehoon Chung
2017-01-11 18:50 ` Bjorn Helgaas
2017-01-12 1:13 ` Jaehoon Chung
2016-12-19 8:16 ` [PATCH 2/4] PCI: exynos: Remove the unnecessary variables Jaehoon Chung
2016-12-19 8:16 ` [PATCH 3/4] PCI: exynos: Use the bitops API to operate the bit shifting Jaehoon Chung
2016-12-19 8:16 ` Jaehoon Chung [this message]
2016-12-20 17:35 ` [PATCH 0/4] PCI: exynos: cleans the minor things Bartlomiej Zolnierkiewicz
2016-12-26 13:52 ` Jingoo Han
2016-12-26 13:52 ` Jingoo Han
2016-12-19 8:17 Jaehoon Chung
2016-12-19 8:17 ` [PATCH 4/4] PCI: exynos: remove the duplicated codes Jaehoon Chung
2016-12-24 11:02 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161219081614.5403-5-jh80.chung@samsung.com \
--to=jh80.chung@samsung.com \
--cc=helgaas@google.com \
--cc=javier@osg.samsung.com \
--cc=jingoohan1@gmail.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.