making a geode i2c slave driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jordan,

I'm having some difficulty getting the geode to generate an interrupt
for ACB events. I'm hoping that you can either spot some obvious mistake
that I'm making, or perhaps refer me to someone at AMD who can.

As you recall I'm using the SC1100 on a WRAP card. I'm using a version
of scx200_acb.c, modified as follows:

(a) I set ACB1/2 index 0x70 (Interrupt Number) to 5 (for IRQ 5):

        irq = 5;
        sio = 0x2e;
        val = 0x2f;

        // Set the IRQ on ACB0  (LDN 5)
        outb(0x07,sio); // LDN select register
        outb(0x05,val); // Choose LDN 5 ie ACCESS.bus 1
        outb(0x70,sio); // Select IRQ register
        outb(irq,val);  // Set IRQ

        // Set the IRQ on ACB1 (LDN 6)
        outb(0x07,sio); // LDN select register
        outb(0x06,val); // Choose LDN 6 ie ACCESS.bus 2
        outb(0x70,sio); // Select IRQ register
        outb(irq,val);  // Set IRQ

(b) I enable the device's slave address on each ACB:

        outb(0x80 | 1, ACBADDR);
 
(c) I enable interrupts on each ACB:

        outb(inb(ACBCTL1) | ACBCTL1_INTEN | ACBCTL1_NMINTE, ACBCTL1);

(d) I have an irq handler installed for IRQ 5, but that is not really
    important, because it isn't needed yet.

The problem is that I *never* see any interrupts generated by the ACB.
Here is what I see reported by the kernel:

8<----------------8<----------------8<----------------8<----------------
root at sprinkle:~/i2c# cat /proc/stat && cat /proc/interrupts 
cpu  3097 0 4466 16293239
cpu0 3097 0 4466 16293239
page 6618 18472
swap 0 0
intr 16372006 16300802 0 0 0 116 0 0 0 0 0 20905 0 0 0 50183 0
disk_io: (3,0):(5245,921,13236,4324,36944) 
ctxt 168525
btime 1146401337
processes 679
           CPU0       
  0:   16300803          XT-PIC  timer
  2:          0          XT-PIC  cascade
  4:        116          XT-PIC  serial
  5:          0          XT-PIC  scx200_acb
 10:      20907          XT-PIC  eth0
 14:      50183          XT-PIC  ide0
NMI:          0 
ERR:          0
8<----------------8<----------------8<----------------8<----------------

What am I missing here ?

I can get my Atmel chip to generate a packet as a master, and the geode
actually does ACK the address, so the geode is definitely behaving
correctly as a slave. Somehow the interrupt just never happens though.

Many thanks,
Thomas





[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux