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

Changeset d0cbfd3 in mainline


Ignore:
Timestamp:
2017-11-01T20:34:04Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
aad43a8
Parents:
aa537a5a
Message:

Use proper PIO and ioport64_t interfaces in obio

Location:
uspace/drv/intctl/obio
Files:
2 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,
  • uspace/drv/intctl/obio/obio.h

    raa537a5a rd0cbfd3  
    4747/** OBIO */
    4848typedef struct {
    49         volatile uint64_t *regs;
     49        ioport64_t *regs;
    5050        uintptr_t phys_base;
    5151        ddf_dev_t *dev;
Note: See TracChangeset for help on using the changeset viewer.