Skip to content

Commit

Permalink
dwc_otg_fiq_fsm: ACK and EOI the fast interrupt
Browse files Browse the repository at this point in the history
Call into the GIC driver to ACK and EOI the FIQ interrupt, as is
required, common practice. It's not really clear why this was working
without this code in place.

Such code is not needed on RPi because they do not have GIC there;
the interrupt controller is different.
  • Loading branch information
dsd committed Nov 4, 2015
1 parent 56de55f commit 832df4a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/amlogic/usb/dwc_otg/310/dwc_otg_fiq_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
#include <mach/am_regs.h>
#include <asm/fiq.h>

extern unsigned long gic_ack_fiq(void);
extern void gic_eoi_fiq(unsigned long irqno);

char buffer[1000*16];
int wptr;
void notrace _fiq_print(enum fiq_debug_level dbg_lvl, volatile struct fiq_state *state, char *fmt, ...)
Expand Down Expand Up @@ -1132,7 +1135,7 @@ static int notrace noinline fiq_fsm_do_hcintr(struct fiq_state *state, int num_c
*
* Return: void
*/
void notrace dwc_otg_fiq_fsm(struct fiq_state *state, int num_channels)
void notrace __dwc_otg_fiq_fsm(struct fiq_state *state, int num_channels)
{
gintsts_data_t gintsts, gintsts_handled;
gintmsk_data_t gintmsk;
Expand Down Expand Up @@ -1237,6 +1240,14 @@ void notrace dwc_otg_fiq_fsm(struct fiq_state *state, int num_channels)
//mb();
}

/* FIQ C handler entry point */
void notrace dwc_otg_fiq_fsm(struct fiq_state *state, int num_channels)
{
unsigned long irqno = gic_ack_fiq();
__dwc_otg_fiq_fsm(state, num_channels);
gic_eoi_fiq(irqno);
}

/**
* dwc_otg_fiq_nop() - FIQ "lite"
* @state: pointer to state struct passed from the banked FIQ mode registers.
Expand Down Expand Up @@ -1323,7 +1334,7 @@ void fiq_isr_fake(unsigned int fiq)
state = dwc_otg_hcd->fiq_state;
if (fiq_fsm_enable) {
num_channels = dwc_otg_hcd->core_if->core_params->host_channels;
dwc_otg_fiq_fsm(state,num_channels);
__dwc_otg_fiq_fsm(state,num_channels);
} else {
dwc_otg_fiq_nop(state);
}
Expand Down

0 comments on commit 832df4a

Please sign in to comment.