Rev 1881 | Rev 1895 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1881 | Rev 1893 | ||
|---|---|---|---|
| Line 107... | Line 107... | ||
| 107 | rets[i - 1] = args.args[i + nargs]; |
107 | rets[i - 1] = args.args[i + nargs]; |
| 108 | 108 | ||
| 109 | return args.args[nargs]; |
109 | return args.args[nargs]; |
| 110 | } |
110 | } |
| 111 | 111 | ||
| 112 | - | ||
| 113 | phandle ofw_find_device(const char *name) |
112 | phandle ofw_find_device(const char *name) |
| 114 | { |
113 | { |
| 115 | return ofw_call("finddevice", 1, 1, NULL, name); |
114 | return ofw_call("finddevice", 1, 1, NULL, name); |
| 116 | } |
115 | } |
| 117 | 116 | ||
| 118 | - | ||
| 119 | int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen) |
117 | int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen) |
| 120 | { |
118 | { |
| 121 | return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen); |
119 | return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen); |
| 122 | } |
120 | } |
| 123 | 121 | ||
| - | 122 | int ofw_get_proplen(const phandle device, const char *name) |
|
| - | 123 | { |
|
| - | 124 | return ofw_call("getproplen", 2, 1, NULL, device, name); |
|
| - | 125 | } |
|
| - | 126 | ||
| - | 127 | int ofw_next_property(const phandle device, char *previous, char *buf) |
|
| - | 128 | { |
|
| - | 129 | return ofw_call("nextprop", 3, 1, NULL, device, previous, buf); |
|
| - | 130 | } |
|
| 124 | 131 | ||
| 125 | unsigned int ofw_get_address_cells(const phandle device) |
132 | unsigned int ofw_get_address_cells(const phandle device) |
| 126 | { |
133 | { |
| 127 | unsigned int ret = 1; |
134 | unsigned int ret = 1; |
| 128 | 135 | ||