linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Marek <jonathan@marek.ca>
To: linux-arm-msm@vger.kernel.org
Cc: robert.foss@linaro.org, andrey.konovalov@linaro.org,
	Todor Tomov <todor.too@gmail.com>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	linux-media@vger.kernel.org (open list:QUALCOMM CAMERA SUBSYSTEM
	DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 12/17] media: camss: vfe-170: clean up some dead code
Date: Tue, 11 May 2021 14:07:19 -0400	[thread overview]
Message-ID: <20210511180728.23781-13-jonathan@marek.ca> (raw)
In-Reply-To: <20210511180728.23781-1-jonathan@marek.ca>

vfe_isr_read()/vfe_isr_halt_ack()/vfe_reg_clr() are never called.

vfe_isr_sof() does nothing, remove it.

The only vfe_reg_set() usage can be easily replaced with a writel.

Fixes: 7319cdf189bb ("media: camss: Add support for VFE hardware version Titan 170")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
---
 .../media/platform/qcom/camss/camss-vfe-170.c | 53 +------------------
 1 file changed, 2 insertions(+), 51 deletions(-)

diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c
index 8594d275b41d..076ca082e107 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe-170.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c
@@ -188,20 +188,6 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev)
 	dev_err(dev, "VFE HW Version = %u.%u.%u\n", gen, rev, step);
 }
 
-static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits)
-{
-	u32 bits = readl_relaxed(vfe->base + reg);
-
-	writel_relaxed(bits & ~clr_bits, vfe->base + reg);
-}
-
-static inline void vfe_reg_set(struct vfe_device *vfe, u32 reg, u32 set_bits)
-{
-	u32 bits = readl_relaxed(vfe->base + reg);
-
-	writel_relaxed(bits | set_bits, vfe->base + reg);
-}
-
 static void vfe_global_reset(struct vfe_device *vfe)
 {
 	u32 reset_bits = GLOBAL_RESET_CMD_CORE		|
@@ -305,32 +291,14 @@ static inline void vfe_reg_update_clear(struct vfe_device *vfe,
 
 static void vfe_enable_irq_common(struct vfe_device *vfe)
 {
-	vfe_reg_set(vfe, VFE_IRQ_MASK_0, ~0u);
-	vfe_reg_set(vfe, VFE_IRQ_MASK_1, ~0u);
+	writel_relaxed(~0u, vfe->base + VFE_IRQ_MASK_0);
+	writel_relaxed(~0u, vfe->base + VFE_IRQ_MASK_1);
 
 	writel_relaxed(~0u, vfe->base + VFE_BUS_IRQ_MASK(0));
 	writel_relaxed(~0u, vfe->base + VFE_BUS_IRQ_MASK(1));
 	writel_relaxed(~0u, vfe->base + VFE_BUS_IRQ_MASK(2));
 }
 
-static void vfe_isr_halt_ack(struct vfe_device *vfe)
-{
-	complete(&vfe->halt_complete);
-}
-
-static void vfe_isr_read(struct vfe_device *vfe, u32 *status0, u32 *status1)
-{
-	*status0 = readl_relaxed(vfe->base + VFE_IRQ_STATUS_0);
-	*status1 = readl_relaxed(vfe->base + VFE_IRQ_STATUS_1);
-
-	writel_relaxed(*status0, vfe->base + VFE_IRQ_CLEAR_0);
-	writel_relaxed(*status1, vfe->base + VFE_IRQ_CLEAR_1);
-
-	/* Enforce ordering between IRQ Clear and Global IRQ Clear */
-	wmb();
-	writel_relaxed(CMD_GLOBAL_CLEAR, vfe->base + VFE_IRQ_CMD);
-}
-
 static void vfe_violation_read(struct vfe_device *vfe)
 {
 	u32 violation = readl_relaxed(vfe->base + VFE_VIOLATION_STATUS);
@@ -375,10 +343,6 @@ static irqreturn_t vfe_isr(int irq, void *dev)
 		if (status0 & STATUS_0_RDI_REG_UPDATE(i))
 			vfe->isr_ops.reg_update(vfe, i);
 
-	for (i = VFE_LINE_RDI0; i <= VFE_LINE_RDI2; i++)
-		if (status0 & STATUS_1_RDI_SOF(i))
-			vfe->isr_ops.sof(vfe, i);
-
 	for (i = 0; i < MSM_VFE_COMPOSITE_IRQ_NUM; i++)
 		if (vfe_bus_status[0] & STATUS0_COMP_BUF_DONE(i))
 			vfe->isr_ops.comp_done(vfe, i);
@@ -607,16 +571,6 @@ static int vfe_disable(struct vfe_line *line)
 	return 0;
 }
 
-/*
- * vfe_isr_sof - Process start of frame interrupt
- * @vfe: VFE Device
- * @line_id: VFE line
- */
-static void vfe_isr_sof(struct vfe_device *vfe, enum vfe_line_id line_id)
-{
-	/* nop */
-}
-
 /*
  * vfe_isr_reg_update - Process reg update interrupt
  * @vfe: VFE Device
@@ -749,9 +703,7 @@ static int vfe_queue_buffer(struct camss_video *vid,
 
 static const struct vfe_isr_ops vfe_isr_ops_170 = {
 	.reset_ack = vfe_isr_reset_ack,
-	.halt_ack = vfe_isr_halt_ack,
 	.reg_update = vfe_isr_reg_update,
-	.sof = vfe_isr_sof,
 	.comp_done = vfe_isr_comp_done,
 	.wm_done = vfe_isr_wm_done,
 };
@@ -772,7 +724,6 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe)
 const struct vfe_hw_ops vfe_ops_170 = {
 	.global_reset = vfe_global_reset,
 	.hw_version_read = vfe_hw_version_read,
-	.isr_read = vfe_isr_read,
 	.isr = vfe_isr,
 	.pm_domain_off = vfe_pm_domain_off,
 	.pm_domain_on = vfe_pm_domain_on,
-- 
2.26.1


  parent reply	other threads:[~2021-05-11 18:08 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 18:07 [PATCH 00/17] CAMSS: SM8250 support (and some fixes) Jonathan Marek
2021-05-11 18:07 ` [PATCH 01/17] media: camss: csiphy-3ph: don't print HW version as an error Jonathan Marek
2021-05-19 10:16   ` Robert Foss
2021-05-11 18:07 ` [PATCH 02/17] media: camss: csiphy-3ph: disable interrupts Jonathan Marek
2021-05-19 15:52   ` Robert Foss
2021-05-11 18:07 ` [PATCH 03/17] media: camss: csiphy-3ph: add support for SM8250 CSI DPHY Jonathan Marek
2021-05-19 16:26   ` Robert Foss
2021-05-25 17:19   ` Andrey Konovalov
2021-05-25 17:35     ` Andrey Konovalov
2021-05-11 18:07 ` [PATCH 04/17] media: camss: csid-170: fix non-10bit formats Jonathan Marek
2021-05-20 10:31   ` Robert Foss
2021-05-25 18:15   ` Andrey Konovalov
2021-05-25 18:38     ` Jonathan Marek
2021-05-26 13:59       ` Andrey Konovalov
2021-05-11 18:07 ` [PATCH 05/17] media: camss: csid-170: don't enable unused irqs Jonathan Marek
2021-05-20 10:39   ` Robert Foss
2021-05-11 18:07 ` [PATCH 06/17] media: camss: csid-170: remove stray comment Jonathan Marek
2021-05-20 10:57   ` Robert Foss
2021-05-11 18:07 ` [PATCH 07/17] media: camss: csid-170: support more than one lite vfe Jonathan Marek
2021-05-20 11:54   ` Robert Foss
2021-05-11 18:07 ` [PATCH 08/17] media: camss: csid-170: set the right HALF_CMD when disabled Jonathan Marek
2021-05-20 11:10   ` Robert Foss
2021-05-11 18:07 ` [PATCH 09/17] media: camss: csid: allow csid to work without a regulator Jonathan Marek
2021-05-20 12:14   ` Robert Foss
2021-05-11 18:07 ` [PATCH 10/17] media: camss: remove vdda-csiN from sdm845 resources Jonathan Marek
2021-05-31 11:02   ` Robert Foss
2021-05-11 18:07 ` [PATCH 11/17] media: camss: fix VFE irq name Jonathan Marek
2021-05-31 11:03   ` Robert Foss
2021-05-11 18:07 ` Jonathan Marek [this message]
2021-05-31 11:11   ` [PATCH 12/17] media: camss: vfe-170: clean up some dead code Robert Foss
2021-05-11 18:07 ` [PATCH 13/17] media: camss: vfe-170: fix "VFE halt timeout" error Jonathan Marek
2021-05-31 11:13   ` Robert Foss
2021-05-11 18:07 ` [PATCH 14/17] media: camss: Add initial support for VFE hardware version Titan 480 Jonathan Marek
2021-05-31 12:13   ` Robert Foss
2021-06-08 23:08     ` Jonathan Marek
2021-06-09 15:06       ` Robert Foss
2021-05-11 18:07 ` [PATCH 15/17] media: camss: add support for V4L2_PIX_FMT_GREY for sdm845 HW Jonathan Marek
2021-05-31 12:14   ` Robert Foss
2021-05-11 18:07 ` [PATCH 16/17] media: camss: add support for SM8250 camss Jonathan Marek
2021-05-31 16:07   ` Robert Foss
2021-05-11 18:07 ` [PATCH 17/17] media: dt-bindings: media: camss: Add qcom,sm8250-camss binding Jonathan Marek
2021-05-12 18:35   ` Rob Herring

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=20210511180728.23781-13-jonathan@marek.ca \
    --to=jonathan@marek.ca \
    --cc=agross@kernel.org \
    --cc=andrey.konovalov@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robert.foss@linaro.org \
    --cc=todor.too@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).