Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/sb16.c

    r7de1988c r365f259  
    7777}
    7878
    79 void sb16_irq_code(addr_range_t *regs, int dma8, int dma16, irq_cmd_t cmds[],
    80     irq_pio_range_t ranges[])
     79void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[], irq_pio_range_t ranges[])
    8180{
    8281        assert(regs);
    8382        assert(dma8 > 0 && dma8 < 4);
    84 
    85         sb16_regs_t *registers = RNGABSPTR(*regs);
     83        sb16_regs_t *registers = regs;
    8684        memcpy(cmds, irq_cmds, sizeof(irq_cmds));
    87         cmds[0].addr = (void *) &registers->dsp_read_status;
    88         ranges[0].base = (uintptr_t) registers;
     85        cmds[0].addr = (void*)&registers->dsp_read_status;
     86        ranges[0].base = (uintptr_t)registers;
    8987        ranges[0].size = sizeof(*registers);
    9088        if (dma16 > 4 && dma16 < 8) {
    9189                /* Valid dma16 */
    92                 cmds[1].addr = (void *) &registers->dma16_ack;
     90                cmds[1].addr = (void*)&registers->dma16_ack;
    9391        } else {
    9492                cmds[1].cmd = CMD_ACCEPT;
     
    9694}
    9795
    98 int sb16_init_sb16(sb16_t *sb, addr_range_t *regs, ddf_dev_t *dev, int dma8,
    99     int dma16)
     96int sb16_init_sb16(sb16_t *sb, void *regs, size_t size,
     97    ddf_dev_t *dev, int dma8, int dma16)
    10098{
    10199        assert(sb);
    102 
    103100        /* Setup registers */
    104         int ret = pio_enable_range(regs, (void **) &sb->regs);
     101        int ret = pio_enable(regs, size, (void**)&sb->regs);
    105102        if (ret != EOK)
    106103                return ret;
    107         ddf_log_note("PIO registers at %p accessible.", sb->regs);
     104        ddf_log_debug("PIO registers at %p accessible.", sb->regs);
    108105
    109106        /* Initialize DSP */
     
    190187}
    191188
    192 int sb16_init_mpu(sb16_t *sb, addr_range_t *regs)
     189int sb16_init_mpu(sb16_t *sb, void *regs, size_t size)
    193190{
    194191        sb->mpu_regs = NULL;
Note: See TracChangeset for help on using the changeset viewer.