Rev 1893 | Rev 1899 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1893 | Rev 1895 | ||
---|---|---|---|
Line 112... | Line 112... | ||
112 | phandle ofw_find_device(const char *name) |
112 | phandle ofw_find_device(const char *name) |
113 | { |
113 | { |
114 | return ofw_call("finddevice", 1, 1, NULL, name); |
114 | return ofw_call("finddevice", 1, 1, NULL, name); |
115 | } |
115 | } |
116 | 116 | ||
117 | 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, void *buf, const int buflen) |
118 | { |
118 | { |
119 | return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen); |
119 | return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen); |
120 | } |
120 | } |
121 | 121 | ||
122 | int ofw_get_proplen(const phandle device, const char *name) |
122 | int ofw_get_proplen(const phandle device, const char *name) |
Line 127... | Line 127... | ||
127 | int ofw_next_property(const phandle device, char *previous, char *buf) |
127 | int ofw_next_property(const phandle device, char *previous, char *buf) |
128 | { |
128 | { |
129 | return ofw_call("nextprop", 3, 1, NULL, device, previous, buf); |
129 | return ofw_call("nextprop", 3, 1, NULL, device, previous, buf); |
130 | } |
130 | } |
131 | 131 | ||
- | 132 | int ofw_package_to_path(const phandle device, char *buf, const int buflen) |
|
- | 133 | { |
|
- | 134 | return ofw_call("package-to-path", 3, 1, NULL, device, buf, buflen); |
|
- | 135 | } |
|
- | 136 | ||
132 | unsigned int ofw_get_address_cells(const phandle device) |
137 | unsigned int ofw_get_address_cells(const phandle device) |
133 | { |
138 | { |
134 | unsigned int ret = 1; |
139 | unsigned int ret = 1; |
135 | 140 | ||
136 | if (ofw_get_property(device, "#address-cells", &ret, sizeof(ret)) <= 0) |
141 | if (ofw_get_property(device, "#address-cells", &ret, sizeof(ret)) <= 0) |