Changeset d0cbfd3 in mainline for uspace/drv/intctl/obio/obio.c


Ignore:
Timestamp:
2017-11-01T20:34:04Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aad43a8
Parents:
aa537a5a
Message:

Use proper PIO and ioport64_t interfaces in obio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/intctl/obio/obio.c

    raa537a5a rd0cbfd3  
    9494                case IRC_ENABLE_INTERRUPT:
    9595                        inr = IPC_GET_ARG1(call);
    96                         ((volatile uint64_t *)(obio->regs))[OBIO_IMR(inr & INO_MASK)] |= (1UL << 31);
     96                        pio_set_64(&obio->regs[OBIO_IMR(inr & INO_MASK)],
     97                            1UL << 31, 0);
    9798                        async_answer_0(callid, EOK);
    9899                        break;
     
    103104                case IRC_CLEAR_INTERRUPT:
    104105                        inr = IPC_GET_ARG1(call);
    105                         ((volatile uint64_t *)(obio->regs))[OBIO_CIR(inr & INO_MASK)] = 0;
     106                        pio_write_64(&obio->regs[OBIO_CIR(inr & INO_MASK)], 0);
    106107                        async_answer_0(callid, EOK);
    107108                        break;
     
    122123
    123124        flags = AS_AREA_READ | AS_AREA_WRITE;
    124         obio->regs = (volatile uint64_t *)AS_AREA_ANY;
     125        obio->regs = (ioport64_t *)AS_AREA_ANY;
    125126        retval = physmem_map(res->base,
    126127            ALIGN_UP(OBIO_SIZE, PAGE_SIZE) >> PAGE_WIDTH, flags,
Note: See TracChangeset for help on using the changeset viewer.