10.07.2015 Views

Intel 80310 I/O Processor Chipset AAU Coding Techniques

Intel 80310 I/O Processor Chipset AAU Coding Techniques

Intel 80310 I/O Processor Chipset AAU Coding Techniques

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Intel</strong> ® <strong>80310</strong> I/O <strong>Processor</strong> <strong>Chipset</strong> <strong>AAU</strong> <strong>Coding</strong> <strong>Techniques</strong><strong>AAU</strong> Source Code868 printk("<strong>Intel</strong> <strong>80310</strong> <strong>AAU</strong> Copyright(c) 2001 <strong>Intel</strong> Corporation\n");869 DPRINTK("Initializing...");870871 /* set the IRQ */872 aau_dev.irq = IRQ_IOP310_<strong>AAU</strong>;873874 err = request_irq(aau_dev.irq, aau_irq_handler, SA_INTERRUPT,875 NULL, (void *)&aau_dev);876 if(err < 0)877 {878 printk(KERN_ERR "unable to request IRQ %d for <strong>AAU</strong>: %d\n",879 aau_dev.irq, err);880 return err;881 }882883 /* init free stack */884 INIT_LIST_HEAD(&free_stack);885 /* init free stack spinlock */886 spin_lock_init(&free_lock);887888889 /* pre-alloc <strong>AAU</strong> descriptors */890 for(i = 0; i < MAX_<strong>AAU</strong>_DESC; i++)891 {892 desc = kmalloc((sizeof(sw_aau_t) + 0x20), GFP_KERNEL);893 memset(desc, 0, sizeof(sw_aau_t));894 sw_desc = (sw_aau_t *) (((u32) desc & 0xffffffe0) + 0x20);895 sw_desc->aau_phys = virt_to_phys((void *)sw_desc);896 /* we keep track of original address before alignment adjust */897 /* so we can free it later */898 sw_desc->desc_addr = (u32) desc;899900 spin_lock_irq(&free_lock);901 /* put the descriptors on the free stack */White Paper 59

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!