Changeset 1787e527 in mainline for kernel/genarch/include/ofw/pci.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/pci.h

    rfcbd1be r1787e527  
    11/*
    2  * Copyright (c) 2005 Jakub Jermar
     2 * Copyright (c) 2006 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup mips32 
    30  * @{
    31  */
    32 /** @file
    33  */
     29#ifndef KERN_PCI_H_
     30#define KERN_PCI_H_
    3431
    35 #ifndef KERN_mips32_ARG_H_
    36 #define KERN_mips32_ARG_H_
     32#include <genarch/ofw/ofw_tree.h>
     33#include <arch/types.h>
     34#include <ddi/irq.h>
     35#include <typedefs.h>
    3736
    38 #include <arch/types.h>
     37typedef struct {
     38        /* Needs to be masked to obtain pure space id */
     39        uint32_t space;
     40       
     41        /* Group phys.mid and phys.lo together */
     42        uint64_t addr;
     43        uint64_t size;
     44} __attribute__ ((packed)) ofw_pci_reg_t;
    3945
    40 /**
    41  * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not)
    42  * To satisfy this, paddings must be sometimes inserted.
    43  */
     46typedef struct {
     47        uint32_t space;
     48       
     49        /* Group phys.mid and phys.lo together */
     50        uint64_t child_base;
     51        uint64_t parent_base;
     52        uint64_t size;
     53} __attribute__ ((packed)) ofw_pci_range_t;
    4454
    45 typedef uintptr_t va_list;
     55extern bool ofw_pci_apply_ranges(ofw_tree_node_t *, ofw_pci_reg_t *,
     56    uintptr_t *);
    4657
    47 #define va_start(ap, lst) \
    48         ((ap) = (va_list)&(lst) + sizeof(lst))
     58extern bool ofw_pci_reg_absolutize(ofw_tree_node_t *, ofw_pci_reg_t *,
     59    ofw_pci_reg_t *);
    4960
    50 #define va_arg(ap, type)        \
    51         (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((uintptr_t)((ap) + 2*4 - 1) & (~3)) : ((uintptr_t)((ap) + 2*8 -1) & (~7)) )))[-1])
    52 
    53 #define va_copy(dst,src) ((dst)=(src))
    54 
    55 #define va_end(ap)
     61extern bool ofw_pci_map_interrupt(ofw_tree_node_t *, ofw_pci_reg_t *,
     62    int, int *, cir_t *, void **);
    5663
    5764#endif
    58 
    59 /** @}
    60  */
Note: See TracChangeset for help on using the changeset viewer.