Changeset 8049b79 in mainline for uspace/lib/c/generic/ddi.c


Ignore:
Timestamp:
2013-09-12T19:30:25Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7de1988c
Parents:
46eb2c4
Message:

Apply PIO window when parsing HW resources.

  • Each parsed IO and memory range will have both absolute and PIO window relative addresses computed.
  • Provide pio_enable_range() variant of pio_enable() working with addr_range_t.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ddi.c

    r46eb2c4 r8049b79  
    4242#include <ddi.h>
    4343#include <libarch/ddi.h>
     44#include <device/hw_res.h>
     45#include <device/hw_res_parsed.h>
     46#include <device/pio_window.h>
    4447#include <libc.h>
    4548#include <task.h>
     
    136139}
    137140
    138 /** Enable PIO for specified HW resource.
     141/** Enable PIO for specified address range.
     142 *
     143 * @param range I/O range to be enable.
     144 * @param virt  Virtual address for application's PIO operations.
     145 */
     146int pio_enable_range(addr_range_t *range, void **virt)
     147{
     148        return pio_enable(RNGABSPTR(*range), RNGSZ(*range), virt);
     149}
     150
     151/** Enable PIO for specified HW resource wrt. to the PIO window.
    139152 *
    140153 * @param win      PIO window. May be NULL if the resources are known to be
Note: See TracChangeset for help on using the changeset viewer.