Hello.
On 01/09/2017 07:06 PM, Alexandre Bailon wrote:
The current interrupt handler do some actions specifics to am335x.
These actions should be made by the platform interrupt handler.
Split out the interrupt handler in two:
one for the am335x platform and a generic one.
Signed-off-by: Alexandre Bailon <[email protected]>
---
drivers/dma/cppi41.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
index 25ee71d..42744ed 100644
--- a/drivers/dma/cppi41.c
+++ b/drivers/dma/cppi41.c
@@ -284,18 +284,11 @@ static u32 cppi41_pop_desc(struct cppi41_dd *cdd,
unsigned queue_num)
return desc;
}
-static irqreturn_t cppi41_irq(int irq, void *data)
+static irqreturn_t cppi41_irq(struct cppi41_dd *cdd)
{
- struct cppi41_dd *cdd = data;
struct cppi41_channel *c;
- u32 status;
int i;
- status = cppi_readl(cdd->usbss_mem + USBSS_IRQ_STATUS);
- if (!(status & USBSS_IRQ_PD_COMP))
- return IRQ_NONE;
- cppi_writel(status, cdd->usbss_mem + USBSS_IRQ_STATUS);
-
I fail to understand why non-CPPI 4.1 regs are used here (and that
positioning itself as an "abstract" CPPI 4.1 driver).
[...]
@@ -351,6 +344,19 @@ static irqreturn_t cppi41_irq(int irq, void *data)
return IRQ_HANDLED;
}
+static irqreturn_t am335x_cppi41_irq(int irq, void *data)
+{
+ struct cppi41_dd *cdd = data;
+ u32 status;
+
+ status = cppi_readl(cdd->usbss_mem + USBSS_IRQ_STATUS);
+ if (!(status & USBSS_IRQ_PD_COMP))
+ return IRQ_NONE;
+ cppi_writel(status, cdd->usbss_mem + USBSS_IRQ_STATUS);
+
+ return cppi41_irq(cdd);
+}
+
IMHO this stuff just needs to move to the MUSB glue.
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html