modified interrupt structure
This commit is contained in:
1100
pci/ehci-hcd.c
1100
pci/ehci-hcd.c
File diff suppressed because it is too large
Load Diff
@@ -187,19 +187,19 @@ init_vec_loop:
|
|||||||
|
|
||||||
#ifdef MACHINE_FIREBEE
|
#ifdef MACHINE_FIREBEE
|
||||||
// ACP interrupts 1-7 (user-defined, generated by FPGA on the FireBee, M5484LITE has irq7 and irq5 for PCI)
|
// ACP interrupts 1-7 (user-defined, generated by FPGA on the FireBee, M5484LITE has irq7 and irq5 for PCI)
|
||||||
lea irq1(pc),a1
|
lea mfp_irq1(pc),a1
|
||||||
move.l a1,0x104(a0)
|
move.l a1,0x104(a0)
|
||||||
lea irq2(pc),a1
|
lea mfp_irq2(pc),a1
|
||||||
move.l a1,0x108(a0)
|
move.l a1,0x108(a0)
|
||||||
lea irq3(pc),a1
|
lea mfp_irq3(pc),a1
|
||||||
move.l a1,0x10c(a0)
|
move.l a1,0x10c(a0)
|
||||||
lea irq4(pc),a1
|
lea mfp_irq4(pc),a1
|
||||||
move.l a1,0x110(a0)
|
move.l a1,0x110(a0)
|
||||||
lea irq5(pc),a1
|
lea mfp_irq5(pc),a1
|
||||||
move.l a1,0x114(a0)
|
move.l a1,0x114(a0)
|
||||||
lea irq6(pc),a1
|
lea mfp_irq6(pc),a1
|
||||||
move.l a1,0x118(a0)
|
move.l a1,0x118(a0)
|
||||||
lea irq7(pc),a1
|
lea mfp_irq7(pc),a1
|
||||||
move.l a1,0x11c(a0)
|
move.l a1,0x11c(a0)
|
||||||
|
|
||||||
|
|
||||||
@@ -381,18 +381,38 @@ flpoow:
|
|||||||
#endif /* _NOT_USED */
|
#endif /* _NOT_USED */
|
||||||
|
|
||||||
irq1:
|
irq1:
|
||||||
irq 0x64,1,0x02
|
irq 0x64,1,0x02 // IRQ1
|
||||||
|
|
||||||
irq2: // hbl
|
irq2:
|
||||||
// move.b #3,2(sp)
|
irq 0x68,2,0x04 // IRQ2
|
||||||
// rte
|
|
||||||
irq 0x68,2,0x04
|
|
||||||
|
|
||||||
irq3:
|
irq3:
|
||||||
irq 0x6c,3,0x08
|
irq 0x6c,3,0x08 // IRQ3
|
||||||
|
|
||||||
|
irq4:
|
||||||
|
irq 0x70,4,0x10 // IRQ4
|
||||||
|
|
||||||
|
irq5:
|
||||||
|
irq 0x74,5,0x20 // IRQ5
|
||||||
|
|
||||||
|
irq6:
|
||||||
|
irq 0x78,6,0x40 // IRQ6
|
||||||
|
|
||||||
|
irq7:
|
||||||
|
irq 0x7c,7,0x80 // IRQ7
|
||||||
|
|
||||||
|
mfp_irq1:
|
||||||
|
irq 0x104,1,0x02 // IRQ1
|
||||||
|
|
||||||
|
mfp_irq2:
|
||||||
|
irq 0x108,2,0x04 // IRQ2
|
||||||
|
|
||||||
|
mfp_irq3:
|
||||||
|
irq 0x10c,3,0x08 // IRQ3
|
||||||
|
|
||||||
|
mfp_irq4:
|
||||||
|
irq 0x110,4,0x10 // IRQ4
|
||||||
|
|
||||||
irq4: // vbl
|
|
||||||
irq 0x70,4,0x10
|
|
||||||
|
|
||||||
#if MACHINE_M5484LITE_notyet // handlers for M5484LITE
|
#if MACHINE_M5484LITE_notyet // handlers for M5484LITE
|
||||||
|
|
||||||
@@ -413,10 +433,10 @@ irq5text:
|
|||||||
.ascii "IRQ5!"
|
.ascii "IRQ5!"
|
||||||
.dc.b 13,10,0
|
.dc.b 13,10,0
|
||||||
|
|
||||||
irq6:
|
mfp_irq6:
|
||||||
irq 0x74,5,0x20
|
irq 0x74,5,0x20
|
||||||
|
|
||||||
irq7: // irq7 is tied to PCI INTA# and PCI INTB# on the M5484LITE
|
mfp_irq7: // irq7 is tied to PCI INTA# and PCI INTB# on the M5484LITE
|
||||||
|
|
||||||
move.w #0x2700,sr // disable interrupts
|
move.w #0x2700,sr // disable interrupts
|
||||||
|
|
||||||
@@ -437,8 +457,7 @@ irq7text:
|
|||||||
.text
|
.text
|
||||||
|
|
||||||
#elif MACHINE_FIREBEE /* these handlers are only meaningful for the Firebee */
|
#elif MACHINE_FIREBEE /* these handlers are only meaningful for the Firebee */
|
||||||
|
mfp_irq5: move.w #0x2700,sr // disable interrupts
|
||||||
irq5: move.w #0x2700,sr // disable interrupts
|
|
||||||
subq.l #4,sp // extra space
|
subq.l #4,sp // extra space
|
||||||
|
|
||||||
link a6,#-4 * 4 // save gcc scratch registers
|
link a6,#-4 * 4 // save gcc scratch registers
|
||||||
@@ -464,8 +483,8 @@ irq5_forward: move.l 0x74,a0 // fetch OS irq5 vector
|
|||||||
move.w #0x2500,sr // set interrupt level
|
move.w #0x2500,sr // set interrupt level
|
||||||
rts // jump through vector
|
rts // jump through vector
|
||||||
|
|
||||||
|
#ifdef _NOT_USED_
|
||||||
irq6: move.w #0x2700,sr // disable interrupt
|
mfp_irq6: move.w #0x2700,sr // disable interrupt
|
||||||
subq.l #4,sp // extra space
|
subq.l #4,sp // extra space
|
||||||
link a6,#-4 * 4 // save gcc scratch registers
|
link a6,#-4 * 4 // save gcc scratch registers
|
||||||
movem.l d0-d1/a0-a1,(sp)
|
movem.l d0-d1/a0-a1,(sp)
|
||||||
@@ -480,13 +499,13 @@ irq6: move.w #0x2700,sr // disable interrupt
|
|||||||
|
|
||||||
movem.l (sp),d0-d1/a0-a1 // restore registers
|
movem.l (sp),d0-d1/a0-a1 // restore registers
|
||||||
unlk a6
|
unlk a6
|
||||||
addq.l #4,sp // extra word not needed in this case
|
addq.l #4,sp // "extra space" not needed in this case
|
||||||
rte
|
rte
|
||||||
|
|
||||||
irq6_forward:
|
mfp_irq6_forward:
|
||||||
move.l 0xf0020000,a0 // fetch "autovector"
|
move.l 0xf0020000,a0 // fetch FPGA "autovector"
|
||||||
add.l _rt_vbr,a0 // add runtime VBR
|
add.l _rt_vbr,a0 // add runtime VBR
|
||||||
move.l (a0),4(a6) // fetch handler address and put it on stack
|
move.l (a0),4(a6) // fetch handler address and put it on "extra space"
|
||||||
|
|
||||||
movem.l (sp),d0-d1/a0-a1
|
movem.l (sp),d0-d1/a0-a1
|
||||||
unlk a6
|
unlk a6
|
||||||
@@ -494,7 +513,11 @@ irq6_forward:
|
|||||||
|
|
||||||
rts // jump through vector
|
rts // jump through vector
|
||||||
|
|
||||||
#ifdef _NOT_USED_
|
#else /* _NOT_USED_ */
|
||||||
|
|
||||||
|
// this is the old code from Fredi
|
||||||
|
|
||||||
|
mfp_irq6:
|
||||||
// MFP interrupt from FPGA
|
// MFP interrupt from FPGA
|
||||||
move.w #0x2700,sr // disable interrupt
|
move.w #0x2700,sr // disable interrupt
|
||||||
subq.l #8,sp
|
subq.l #8,sp
|
||||||
@@ -503,30 +526,30 @@ irq6_forward:
|
|||||||
lea MCF_EPORT_EPFR,a5 // clear int6 from edge port
|
lea MCF_EPORT_EPFR,a5 // clear int6 from edge port
|
||||||
bset #6,(a5)
|
bset #6,(a5)
|
||||||
|
|
||||||
irq6_non_sca:
|
mfp_irq6_non_sca:
|
||||||
// test auf acsi dma -----------------------------------------------------------------
|
// test auf acsi dma -----------------------------------------------------------------
|
||||||
lea 0xfffffa0b,a5
|
lea 0xfffffa0b,a5
|
||||||
bset #7,-4(a5) // int ena
|
bset #7,-4(a5) // int ena
|
||||||
btst.b #7,(a5) // acsi dma int?
|
btst.b #7,(a5) // acsi dma int?
|
||||||
beq non_acsi_dma
|
beq mfp_non_acsi_dma
|
||||||
bsr acsi_dma
|
bsr acsi_dma
|
||||||
non_acsi_dma:
|
mfp_non_acsi_dma:
|
||||||
// ----------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------
|
||||||
tst.b (a5)
|
tst.b (a5)
|
||||||
bne irq6_1
|
bne mfp_irq6_1
|
||||||
tst.b 2(a5)
|
tst.b 2(a5)
|
||||||
bne irq6_1
|
bne mfp_irq6_1
|
||||||
movem.l (sp),d0/a5
|
movem.l (sp),d0/a5
|
||||||
addq.l #8,sp
|
addq.l #8,sp
|
||||||
rte
|
rte
|
||||||
irq6_1:
|
mfp_irq6_1:
|
||||||
lea MCF_GPIO_PODR_FEC1L,a5
|
lea MCF_GPIO_PODR_FEC1L,a5
|
||||||
bclr.b #4,(a5) // led on
|
bclr.b #4,(a5) // led on
|
||||||
lea blinker,a5
|
lea blinker,a5
|
||||||
addq.l #1,(a5) // +1
|
addq.l #1,(a5) // +1
|
||||||
move.l (a5),d0
|
move.l (a5),d0
|
||||||
and.l #0x80,d0
|
and.l #0x80,d0
|
||||||
bne irq6_2
|
bne mfp_irq6_2
|
||||||
lea MCF_GPIO_PODR_FEC1L,a5
|
lea MCF_GPIO_PODR_FEC1L,a5
|
||||||
bset.b #4,(a5) // led off
|
bset.b #4,(a5) // led off
|
||||||
|
|
||||||
@@ -545,7 +568,7 @@ irq6_1:
|
|||||||
* 9: HSYNC
|
* 9: HSYNC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
irq6_2:
|
mfp_irq6_2:
|
||||||
move.l 0xF0020000,a5 // vector holen
|
move.l 0xF0020000,a5 // vector holen
|
||||||
add.l _rt_vbr,a5 // basis
|
add.l _rt_vbr,a5 // basis
|
||||||
move.l (a5),d0 // vector holen
|
move.l (a5),d0 // vector holen
|
||||||
@@ -624,7 +647,7 @@ acsi_dma_end:
|
|||||||
/*
|
/*
|
||||||
* irq 7 = pseudo bus error
|
* irq 7 = pseudo bus error
|
||||||
*/
|
*/
|
||||||
irq7:
|
mfp_irq7:
|
||||||
lea -12(sp),sp
|
lea -12(sp),sp
|
||||||
movem.l d0/a0,(sp)
|
movem.l d0/a0,(sp)
|
||||||
|
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ bool irq6_handler(uint32_t sf1, uint32_t sf2)
|
|||||||
{
|
{
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
//err("IRQ6!\r\n");
|
err("IRQ6!\r\n");
|
||||||
MCF_EPORT_EPFR |= (1 << 6); /* clear int6 from edge port */
|
MCF_EPORT_EPFR |= (1 << 6); /* clear int6 from edge port */
|
||||||
|
|
||||||
if (FALCON_MFP_IPRA || FALCON_MFP_IPRB)
|
if (FALCON_MFP_IPRA || FALCON_MFP_IPRB)
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ int usb_init(int32_t handle, const struct pci_device_id *ent)
|
|||||||
|
|
||||||
case PCI_CLASS_SERIAL_USB_OHCI:
|
case PCI_CLASS_SERIAL_USB_OHCI:
|
||||||
dbg("initialize ohci host controller interface\r\n");
|
dbg("initialize ohci host controller interface\r\n");
|
||||||
res = ohci_usb_lowlevel_init(handle, ent, (void *) &priv);
|
//res = ohci_usb_lowlevel_init(handle, ent, (void *) &priv);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCI_CLASS_SERIAL_USB_EHCI:
|
case PCI_CLASS_SERIAL_USB_EHCI:
|
||||||
|
|||||||
Reference in New Issue
Block a user