Ignore:
Timestamp:
2013-12-25T22:54:29Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b51cf2c
Parents:
f7a33de (diff), ac36aed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/infrastructure/rootpc/rootpc.c

    rf7a33de r0c2d9bb  
    5151#include <ops/hw_res.h>
    5252#include <device/hw_res.h>
     53#include <ops/pio_window.h>
     54#include <device/pio_window.h>
    5355
    5456#define NAME "rootpc"
     
    5658typedef struct rootpc_fun {
    5759        hw_resource_list_t hw_resources;
     60        pio_window_t pio_window;
    5861} rootpc_fun_t;
    5962
     
    7881                        .address = 0xCF8,
    7982                        .size = 4,
     83                        .relative = false,
    8084                        .endianness = LITTLE_ENDIAN
    8185                }
     
    8690                        .address = 0xCFC,
    8791                        .size = 4,
     92                        .relative = false,
    8893                        .endianness = LITTLE_ENDIAN
    8994                }
     
    9398static rootpc_fun_t pci_data = {
    9499        .hw_resources = {
    95                 sizeof(pci_conf_regs)/sizeof(pci_conf_regs[0]),
     100                sizeof(pci_conf_regs) / sizeof(pci_conf_regs[0]),
    96101                pci_conf_regs
     102        },
     103        .pio_window = {
     104                .mem = {
     105                        .base = UINT32_C(0),
     106                        .size = UINT32_C(0xffffffff) /* practical maximum */
     107                },
     108                .io = {
     109                        .base = UINT32_C(0),
     110                        .size = UINT32_C(0x10000)
     111                }
    97112        }
    98113};
     
    117132       
    118133        return false;
     134}
     135
     136static pio_window_t *rootpc_get_pio_window(ddf_fun_t *fnode)
     137{
     138        rootpc_fun_t *fun = rootpc_fun(fnode);
     139       
     140        assert(fun != NULL);
     141        return &fun->pio_window;
    119142}
    120143
     
    122145        .get_resource_list = &rootpc_get_resources,
    123146        .enable_interrupt = &rootpc_enable_interrupt,
     147};
     148
     149static pio_window_ops_t fun_pio_window_ops = {
     150        .get_pio_window = &rootpc_get_pio_window
    124151};
    125152
     
    197224        ddf_log_init(NAME);
    198225        rootpc_fun_ops.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops;
     226        rootpc_fun_ops.interfaces[PIO_WINDOW_DEV_IFACE] = &fun_pio_window_ops;
    199227}
    200228
Note: See TracChangeset for help on using the changeset viewer.