Changes in uspace/drv/audio/sb16/sb16.c [7de1988c:365f259] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/sb16.c
r7de1988c r365f259 77 77 } 78 78 79 void sb16_irq_code(addr_range_t *regs, int dma8, int dma16, irq_cmd_t cmds[], 80 irq_pio_range_t ranges[]) 79 void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[], irq_pio_range_t ranges[]) 81 80 { 82 81 assert(regs); 83 82 assert(dma8 > 0 && dma8 < 4); 84 85 sb16_regs_t *registers = RNGABSPTR(*regs); 83 sb16_regs_t *registers = regs; 86 84 memcpy(cmds, irq_cmds, sizeof(irq_cmds)); 87 cmds[0].addr = (void *)®isters->dsp_read_status;88 ranges[0].base = (uintptr_t) 85 cmds[0].addr = (void*)®isters->dsp_read_status; 86 ranges[0].base = (uintptr_t)registers; 89 87 ranges[0].size = sizeof(*registers); 90 88 if (dma16 > 4 && dma16 < 8) { 91 89 /* Valid dma16 */ 92 cmds[1].addr = (void *)®isters->dma16_ack;90 cmds[1].addr = (void*)®isters->dma16_ack; 93 91 } else { 94 92 cmds[1].cmd = CMD_ACCEPT; … … 96 94 } 97 95 98 int sb16_init_sb16(sb16_t *sb, addr_range_t *regs, ddf_dev_t *dev, int dma8,99 int dma16)96 int sb16_init_sb16(sb16_t *sb, void *regs, size_t size, 97 ddf_dev_t *dev, int dma8, int dma16) 100 98 { 101 99 assert(sb); 102 103 100 /* Setup registers */ 104 int ret = pio_enable _range(regs, (void **)&sb->regs);101 int ret = pio_enable(regs, size, (void**)&sb->regs); 105 102 if (ret != EOK) 106 103 return ret; 107 ddf_log_ note("PIO registers at %p accessible.", sb->regs);104 ddf_log_debug("PIO registers at %p accessible.", sb->regs); 108 105 109 106 /* Initialize DSP */ … … 190 187 } 191 188 192 int sb16_init_mpu(sb16_t *sb, addr_range_t *regs)189 int sb16_init_mpu(sb16_t *sb, void *regs, size_t size) 193 190 { 194 191 sb->mpu_regs = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.