Browse Source

r674@Knoppix: root | 2008-02-22 14:38:25 +0800

fix cs5536 lpc interrupt.


git-svn-id: file:///svn/pmon-all/pmon-all@201 214b0138-1524-0410-9122-e5cb4b5bc56c
master
cpu 17 years ago
parent
commit
03ea04c0e1
  1. 2
      Targets/Bonito2fdev/conf/Bonito.2fdev.via
  2. 10
      sys/dev/pci/cs5536.c
  3. 2
      zloader/Makefile.inc

2
Targets/Bonito2fdev/conf/Bonito.2fdev.via

@ -168,3 +168,5 @@ option FLOATINGPT
option PCI_IDSEL_VIA686B=17 option PCI_IDSEL_VIA686B=17
option WDC_NORESET option WDC_NORESET
select gzip select gzip
option INPUT_FROM_BOTH
option OUTPUT_TO_BOTH

10
sys/dev/pci/cs5536.c

@ -368,6 +368,7 @@ void cs5536_ohci_init(void)
void cs5536_i8259_init(void) void cs5536_i8259_init(void)
{ {
int hi,lo;
outb(CS5536_LEGACY_BASE_ADDR | 0x20, 0x11); /* Initialization sequence (8259A-1). */ outb(CS5536_LEGACY_BASE_ADDR | 0x20, 0x11); /* Initialization sequence (8259A-1). */
outb(CS5536_LEGACY_BASE_ADDR | 0xA0, 0x11); /* Initialization sequence (8259A-2). */ outb(CS5536_LEGACY_BASE_ADDR | 0xA0, 0x11); /* Initialization sequence (8259A-2). */
outb(CS5536_LEGACY_BASE_ADDR | 0x21, 0x0); /* Start of hardware INTs (0x20). */ outb(CS5536_LEGACY_BASE_ADDR | 0x21, 0x0); /* Start of hardware INTs (0x20). */
@ -381,6 +382,15 @@ void cs5536_i8259_init(void)
outb(CS5536_LEGACY_BASE_ADDR | 0x21, 0xFB); /* Mask all IRQs but IRQ2 is cascaded.*/ outb(CS5536_LEGACY_BASE_ADDR | 0x21, 0xFB); /* Mask all IRQs but IRQ2 is cascaded.*/
// outb(CS5536_LEGACY_BASE_ADDR | 0xA1, 0x00); /* Mask off all interrupts for now. */ // outb(CS5536_LEGACY_BASE_ADDR | 0xA1, 0x00); /* Mask off all interrupts for now. */
// outb(CS5536_LEGACY_BASE_ADDR | 0x21, 0x00); /* Mask all IRQs but IRQ2 is cascaded.*/ // outb(CS5536_LEGACY_BASE_ADDR | 0x21, 0x00); /* Mask all IRQs but IRQ2 is cascaded.*/
_rdmsr(DIVIL_MSR_REG(PIC_IRQM_LPC), &hi, &lo);
lo |= 0x1002;
_wrmsr(DIVIL_MSR_REG(PIC_IRQM_LPC), hi, lo);
_rdmsr(DIVIL_MSR_REG(PIC_IRQM_PRIM), &hi, &lo);
lo &=~(0x1002) ;
_wrmsr(DIVIL_MSR_REG(PIC_IRQM_PRIM), hi, lo);
_rdmsr(DIVIL_MSR_REG(LPC_SIRQ), &hi, &lo);
lo |=0xc0 ;
_wrmsr(DIVIL_MSR_REG(LPC_SIRQ), hi, lo);
return; return;
} }

2
zloader/Makefile.inc

@ -1,7 +1,7 @@
CC=mips-elf-gcc CC=mips-elf-gcc
GZROMSTARTADDR=0xffffffff81000000 GZROMSTARTADDR=0xffffffff81000000
ROMSTARTADDR=0xffffffff80010000 ROMSTARTADDR=0xffffffff80010000
RAMSTARTADDR=0xffffffff80200000 RAMSTARTADDR=0xffffffff88000000
export CC += ${MYCC} export CC += ${MYCC}
ifdef obj ifdef obj

Loading…
Cancel
Save