Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 199112e4 in mainline


Ignore:
Timestamp:
2012-02-14T21:46:09Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
cfb79747
Parents:
472d813
Message:

Define a PIO range for the cuda driver.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/ppc32.c

    r472d813 r199112e4  
    232232                sysinfo_set_item_val("cuda.inr", NULL, IRQ_CUDA);
    233233                sysinfo_set_item_val("cuda.address.physical", NULL, pa);
    234                 sysinfo_set_item_val("cuda.address.kernel", NULL,
    235                     (uintptr_t) cuda);
    236234#endif
    237235        }
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    r472d813 r199112e4  
    104104enum {
    105105        ADB_MAX_ADDR    = 16
     106};
     107
     108static irq_pio_range_t cuda_ranges[] = {
     109        {
     110                .base = 0,
     111                .size = sizeof(cuda_t)
     112        }
    106113};
    107114
     
    130137
    131138static irq_code_t cuda_irq_code = {
     139        sizeof(cuda_ranges) / sizeof(irq_pio_range_t),
     140        cuda_ranges,
    132141        sizeof(cuda_cmds) / sizeof(irq_cmd_t),
    133142        cuda_cmds
     
    255264                return -1;
    256265       
    257         if (sysinfo_get_value("cuda.address.kernel", &(instance->cuda_kernel)) != EOK)
    258                 return -1;
    259        
    260266        void *vaddr;
    261267        if (pio_enable((void *) instance->cuda_physical, sizeof(cuda_t), &vaddr) != 0)
     
    274280        pio_write_8(&dev->ier, IER_CLR | ALL_INT);
    275281
    276         cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) instance->cuda_kernel)->ifr;
     282        cuda_irq_code.ranges[0].base = (uintptr_t) instance->cuda_physical;
     283        cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) instance->cuda_physical)->ifr;
    277284        async_set_interrupt_received(cuda_irq_handler);
    278285        irq_register(10, device_assign_devno(), 0, &cuda_irq_code);
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.h

    r472d813 r199112e4  
    111111        cuda_t *cuda;
    112112        uintptr_t cuda_physical;
    113         uintptr_t cuda_kernel;
    114113
    115114        uint8_t rcv_buf[CUDA_RCV_BUF_SIZE];
Note: See TracChangeset for help on using the changeset viewer.