Rev 1771 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1771 | Rev 1783 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | */ |
27 | */ |
28 | 28 | ||
29 | #include <ofw.h> |
29 | #include <ofw.h> |
30 | #include <printf.h> |
30 | #include <printf.h> |
31 | 31 | ||
- | 32 | typedef int (* ofw_entry_t)(ofw_args_t *args); |
|
- | 33 | ||
- | 34 | int ofw(ofw_args_t *args) |
|
- | 35 | { |
|
- | 36 | return ((ofw_entry_t) ofw_cif)(args); |
|
- | 37 | } |
|
- | 38 | ||
32 | void write(const char *str, const int len) |
39 | void write(const char *str, const int len) |
33 | { |
40 | { |
34 | ofw_write(str, len); |
41 | ofw_write(str, len); |
35 | } |
42 | } |
36 | 43 | ||
Line 46... | Line 53... | ||
46 | return false; |
53 | return false; |
47 | 54 | ||
48 | pci_reg_t macio; |
55 | pci_reg_t macio; |
49 | if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0) |
56 | if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0) |
50 | return false; |
57 | return false; |
51 | keyboard->addr = (void *) macio.addr.addr_lo; |
58 | keyboard->addr = macio.addr.addr_lo; |
52 | keyboard->size = macio.size_lo; |
59 | keyboard->size = macio.size_lo; |
53 | 60 | ||
54 | return true; |
61 | return true; |
55 | } |
62 | } |
- | 63 | ||
- | 64 | int ofw_translate_failed(ofw_arg_t flag) |
|
- | 65 | { |
|
- | 66 | return 0; |
|
- | 67 | } |