Changeset 7431e867 in mainline


Ignore:
Timestamp:
2006-06-20T12:03:12Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
282f4724
Parents:
9334b93
Message:

read macio address from PCI OFW entry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/loader/ofw.c

    r9334b93 r7431e867  
    5151
    5252
     53typedef struct {
     54        unsigned int info;
     55        unsigned int addr_hi;
     56    unsigned int addr_lo;
     57} pci_addr_t;
     58
     59typedef struct {
     60        pci_addr_t addr;
     61    unsigned int size_hi;
     62    unsigned int size_lo;
     63} pci_reg_t;
     64
     65
    5366ofw_entry ofw;
    5467
     
    259272                return false;
    260273       
    261         // FIXME
    262         keyboard->addr = (void *) 0x80816000;
    263         keyboard->size = 7680;
     274        pci_reg_t macio;
     275        if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0)
     276                return false;
     277       
     278        keyboard->addr = (void *) macio.addr.addr_lo;
     279        keyboard->size = macio.size_lo;
    264280       
    265281        return true;
Note: See TracChangeset for help on using the changeset viewer.