Changeset b50b5af2 in mainline for boot/arch/ppc32/loader/ofwarch.c
- Timestamp:
- 2009-08-22T10:48:00Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04803bf
- Parents:
- 1ea99cc (diff), a71c158 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ppc32/loader/ofwarch.c
r1ea99cc rb50b5af2 31 31 #include <printf.h> 32 32 33 typedef int (* 33 typedef int (*ofw_entry_t)(ofw_args_t *args); 34 34 35 35 int ofw(ofw_args_t *args) … … 49 49 } 50 50 51 int ofw_macio(macio_t *macio)52 {53 char device_name[BUF_SIZE];54 55 if ((ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0)56 && (ofw_get_property(ofw_aliases, "mac-io", device_name, sizeof(device_name)) <= 0))57 return false;58 59 phandle device = ofw_find_device(device_name);60 if (device == -1)61 return false;62 63 pci_reg_t pci_reg;64 if (ofw_get_property(device, "assigned-addresses", &pci_reg, sizeof(pci_reg)) <= 0)65 return false;66 67 macio->addr = (void *) pci_reg.addr.addr_lo;68 macio->size = pci_reg.size_lo;69 70 return true;71 }72 73 51 int ofw_translate_failed(ofw_arg_t flag) 74 52 { 53 /* PearPC returns buggy flag */ 75 54 return 0; 76 55 }
Note:
See TracChangeset
for help on using the changeset viewer.