~ubuntu-branches/ubuntu/wily/slof/wily

« back to all changes in this revision

Viewing changes to clients/net-snk/include/of.h

  • Committer: Package Import Robot
  • Author(s): Aurelien Jarno
  • Date: 2012-09-16 23:05:23 UTC
  • Revision ID: package-import@ubuntu.com-20120916230523-r2ynulqmp2tyu2e5
Tags: upstream-20120217+dfsg
ImportĀ upstreamĀ versionĀ 20120217+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 * Copyright (c) 2004, 2008 IBM Corporation
 
3
 * All rights reserved.
 
4
 * This program and the accompanying materials
 
5
 * are made available under the terms of the BSD License
 
6
 * which accompanies this distribution, and is available at
 
7
 * http://www.opensource.org/licenses/bsd-license.php
 
8
 *
 
9
 * Contributors:
 
10
 *     IBM Corporation - initial implementation
 
11
 *****************************************************************************/
 
12
 
 
13
#ifndef OF_H
 
14
#define OF_H
 
15
 
 
16
#include <stdint.h>
 
17
 
 
18
#define p32 int
 
19
#define p32cast (int) (unsigned long) (void*)
 
20
 
 
21
#define phandle_t p32
 
22
#define ihandle_t p32
 
23
 
 
24
typedef struct 
 
25
{
 
26
    unsigned int serv;
 
27
    int nargs;
 
28
    int nrets;
 
29
    unsigned int args[16];
 
30
} of_arg_t;
 
31
 
 
32
 
 
33
phandle_t of_finddevice (const char *);
 
34
phandle_t of_peer (phandle_t);
 
35
phandle_t of_child (phandle_t);
 
36
phandle_t of_parent (phandle_t);
 
37
int of_getprop (phandle_t, const char *, void *, int);
 
38
void * of_call_method_3 (const char *, ihandle_t, int);
 
39
int of_test(const char *name);
 
40
int of_interpret_1(void *s, void *ret);
 
41
 
 
42
ihandle_t of_open (const char *);
 
43
void of_close(ihandle_t);
 
44
int of_read (ihandle_t , void*, int);
 
45
int of_write (ihandle_t, void*, int);
 
46
int of_seek (ihandle_t, int, int);
 
47
 
 
48
void * of_claim(void *, unsigned int , unsigned int );
 
49
void of_release(void *, unsigned int );
 
50
 
 
51
int of_yield(void);
 
52
void * of_set_callback(void *);
 
53
 
 
54
unsigned int romfs_lookup(const char *, void **);
 
55
int vpd_read(unsigned int , unsigned int , char *);
 
56
int vpd_write(unsigned int , unsigned int , char *);
 
57
int write_mm_log(char *, unsigned int , unsigned short );
 
58
 
 
59
void get_mac(char *mac);
 
60
uint64_t get_puid(phandle_t node);
 
61
void translate_address_dev(uint64_t *, phandle_t);
 
62
void translate_address(unsigned long *addr);
 
63
 
 
64
#endif