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

Changeset ea150dc6 in mainline


Ignore:
Timestamp:
2012-06-29T13:46:20Z (8 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
master
Children:
bd250b0f
Parents:
722912e
Message:

sb16: Add pio ranges to irq code.

Location:
uspace/drv/audio/sb16
Files:
3 edited

Legend:

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

    r722912e rea150dc6  
    116116        const size_t irq_cmd_count = sb16_irq_code_size();
    117117        irq_cmd_t irq_cmds[irq_cmd_count];
    118         sb16_irq_code((void*)sb_regs, dma8, dma16, irq_cmds);
    119         irq_code_t irq_code = { .cmdcount = irq_cmd_count, .cmds = irq_cmds };
     118        irq_pio_range_t irq_ranges[1];
     119        sb16_irq_code((void*)sb_regs, dma8, dma16, irq_cmds, irq_ranges);
     120
     121        irq_code_t irq_code = {
     122                .cmdcount = irq_cmd_count,
     123                .cmds = irq_cmds,
     124                .rangecount = 1,
     125                .ranges = irq_ranges
     126        };
    120127
    121128        ret = register_interrupt_handler(device, irq, irq_handler, &irq_code);
  • uspace/drv/audio/sb16/sb16.c

    r722912e rea150dc6  
    7474}
    7575/*----------------------------------------------------------------------------*/
    76 void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[])
     76void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[], irq_pio_range_t ranges[])
    7777{
    7878        assert(regs);
     
    8181        memcpy(cmds, irq_cmds, sizeof(irq_cmds));
    8282        cmds[0].addr = (void*)&registers->dsp_read_status;
     83        ranges[0].base = (uintptr_t)registers;
     84        ranges[0].size = sizeof(*registers);
    8385        if (dma16 > 4 && dma16 < 8) {
    8486                /* Valid dma16 */
  • uspace/drv/audio/sb16/sb16.h

    r722912e rea150dc6  
    5151
    5252size_t sb16_irq_code_size(void);
    53 void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[]);
     53void sb16_irq_code(void *regs, int dma8, int dma16, irq_cmd_t cmds[], irq_pio_range_t ranges[]);
    5454int sb16_init_sb16(sb16_t *sb, void *regs, size_t size,
    5555    ddf_dev_t *dev, int dma8, int dma16);
Note: See TracChangeset for help on using the changeset viewer.