Changeset 1787e527 in mainline for kernel/genarch/include/ofw/ebus.h


Ignore:
Timestamp:
2009-11-16T21:22:54Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ebdf94
Parents:
fcbd1be (diff), 9c70ed6 (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:

merged with head (unstable)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/ofw/ebus.h

    rfcbd1be r1787e527  
    11/*
    2  * Copyright (c) 2006 Josef Cejka
     2 * Copyright (c) 2006 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libcmips32     
    30  * @{
    31  */
    32 /** @file
    33  * @ingroup libcmips32eb       
    34  */
     29#ifndef KERN_EBUS_H_
     30#define KERN_EBUS_H_
    3531
    36 #ifndef LIBC_mips32_STACKARG_H_
    37 #define LIBC_mips32_STACKARG_H_
     32#include <genarch/ofw/ofw_tree.h>
     33#include <arch/types.h>
     34#include <ddi/irq.h>
     35#include <typedefs.h>
    3836
    39 /* dont allow to define it second time in stdarg.h */
    40 #define __VARARGS_DEFINED
     37typedef struct {
     38        uint32_t space;
     39        uint32_t addr;
     40        uint32_t size;
     41} __attribute__ ((packed)) ofw_ebus_reg_t;
    4142
    42 #include <sys/types.h>
     43typedef struct {
     44        uint32_t child_space;
     45        uint32_t child_base;
     46        uint32_t parent_space;
     47       
     48        /* Group phys.mid and phys.lo together */
     49        uint64_t parent_base;
     50        uint32_t size;
     51} __attribute__ ((packed)) ofw_ebus_range_t;
    4352
    44 /**
    45  * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not)
    46  * To satisfy this, paddings must be sometimes inserted.
    47  */
     53typedef struct {
     54        uint32_t space;
     55        uint32_t addr;
     56        uint32_t intr;
     57        uint32_t controller_handle;
     58        uint32_t controller_ino;
     59} __attribute__ ((packed)) ofw_ebus_intr_map_t;
    4860
    49 typedef uint8_t* va_list;
     61typedef struct {
     62        uint32_t space_mask;
     63        uint32_t addr_mask;
     64        uint32_t intr_mask;
     65} __attribute__ ((packed)) ofw_ebus_intr_mask_t;
    5066
    51 #define va_start(ap, lst) \
    52         ((ap) = (va_list)&(lst) + sizeof(lst))
    53 
    54 #define va_arg(ap, type)        \
    55         (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uint32_t)((ap) + 2*4 - 1) & (~3)) : ((uint32_t)((ap) + 2*8 -1) & (~7)) )))[-1])
    56 
    57 #define va_end(ap)
     67extern bool ofw_ebus_apply_ranges(ofw_tree_node_t *, ofw_ebus_reg_t *,
     68    uintptr_t *);
     69extern bool ofw_ebus_map_interrupt(ofw_tree_node_t *, ofw_ebus_reg_t *,
     70    uint32_t, int *, cir_t *, void **);
    5871
    5972#endif
    60 
    61 /** @}
    62  */
Note: See TracChangeset for help on using the changeset viewer.