Changeset 04803bf in mainline for boot/genarch/include/ofw.h


Ignore:
Timestamp:
2011-03-21T22:00:17Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
143932e3
Parents:
b50b5af2 (diff), 7308e84 (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 (needs fixes).

File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/genarch/include/ofw.h

    rb50b5af2 r04803bf  
    3030#define BOOT_OFW_H_
    3131
    32 #include <types.h>
     32#include <typedefs.h>
    3333#include <stdarg.h>
    3434
    35 #define BUF_SIZE  1024
     35#define MEMMAP_MAX_RECORDS  32
     36#define MAX_OFW_ARGS        12
    3637
    37 #define MEMMAP_MAX_RECORDS  32
     38#define OFW_TREE_PATH_MAX_LEN           256
     39#define OFW_TREE_PROPERTY_MAX_NAMELEN   32
     40#define OFW_TREE_PROPERTY_MAX_VALUELEN  64
    3841
    39 #define MAX_OFW_ARGS  12
    40 
    41 typedef unative_t ofw_arg_t;
    42 typedef unsigned int ihandle;
    43 typedef unsigned int phandle;
     42typedef sysarg_t ofw_arg_t;
     43typedef native_t ofw_ret_t;
     44typedef uint32_t ofw_prop_t;
     45typedef uint32_t ihandle;
     46typedef uint32_t phandle;
    4447
    4548/** OpenFirmware command structure
     
    5558typedef struct {
    5659        void *start;
    57         uint32_t size;
     60        size_t size;
    5861} memzone_t;
    5962
    6063typedef struct {
    61         uint32_t total;
    62         uint32_t count;
     64        uint64_t total;
     65        size_t cnt;
    6366        memzone_t zones[MEMMAP_MAX_RECORDS];
    6467} memmap_t;
     
    8386extern ihandle ofw_mmu;
    8487extern phandle ofw_memory;
    85 extern phandle ofw_aliases;
    8688
    8789extern void ofw_init(void);
    8890
    89 extern void ofw_write(const char *str, const int len);
     91extern void ofw_putchar(const char);
    9092
    91 extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen);
    92 extern int ofw_get_proplen(const phandle device, const char *name);
    93 extern int ofw_next_property(const phandle device, char *previous, char *buf);
     93extern ofw_arg_t ofw_get_property(const phandle, const char *, void *,
     94    const size_t);
     95extern ofw_arg_t ofw_get_proplen(const phandle, const char *);
     96extern ofw_arg_t ofw_next_property(const phandle, char *, char *);
    9497
    95 extern phandle ofw_get_child_node(const phandle node);
    96 extern phandle ofw_get_peer_node(const phandle node);
    97 extern phandle ofw_find_device(const char *name);
     98extern phandle ofw_get_child_node(const phandle);
     99extern phandle ofw_get_peer_node(const phandle);
     100extern phandle ofw_find_device(const char *);
    98101
    99 extern int ofw_package_to_path(const phandle device, char *buf, const int buflen);
     102extern ofw_arg_t ofw_package_to_path(const phandle, char *, const size_t);
    100103
    101 extern int ofw(ofw_args_t *arg);
    102 extern unsigned long ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...);
    103 extern unsigned int ofw_get_address_cells(const phandle device);
    104 extern unsigned int ofw_get_size_cells(const phandle device);
    105 extern void *ofw_translate(const void *virt);
    106 extern int ofw_translate_failed(ofw_arg_t flag);
    107 extern void *ofw_claim_virt(const void *virt, const unsigned int len);
    108 extern void *ofw_claim_phys(const void *virt, const unsigned int len);
    109 extern void *ofw_claim_phys_any(const unsigned int len, const unsigned int alignment);
    110 extern int ofw_map(const void *phys, const void *virt, const unsigned int size, const int mode);
    111 extern int ofw_memmap(memmap_t *map);
    112 extern int ofw_setup_palette(void);
     104extern ofw_arg_t ofw(ofw_args_t *);
     105extern ofw_arg_t ofw_call(const char *, const size_t, const size_t, ofw_arg_t *,
     106    ...);
     107
     108extern size_t ofw_get_address_cells(const phandle);
     109extern size_t ofw_get_size_cells(const phandle);
     110
     111extern void *ofw_translate(const void *);
     112
     113extern void ofw_claim_virt(const void *, const size_t);
     114extern void *ofw_claim_virt_any(const size_t, const size_t);
     115
     116extern void ofw_claim_phys(const void *, const size_t);
     117extern void *ofw_claim_phys_any(const size_t, const size_t);
     118
     119extern void ofw_map(const void *, const void *, const size_t,
     120    const ofw_arg_t);
     121
     122extern void ofw_alloc(const char *, void **, void **, const size_t, void *);
     123
     124extern void ofw_memmap(memmap_t *);
     125extern void ofw_setup_screens(void);
    113126extern void ofw_quiesce(void);
    114127
Note: See TracChangeset for help on using the changeset viewer.