Changeset b7b5f83 in mainline for arch/ppc64/loader/ofw.c


Ignore:
Timestamp:
2006-07-03T19:46:13Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b95b717
Parents:
d22645e
Message:

Cleanup OpenFirmware driver and prepare it for integration with sparc64 bootloader.
Start sparc64 boot loader (now inactive and unfunctional).

File:
1 edited

Legend:

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

    rd22645e rb7b5f83  
    3030#include <printf.h>
    3131
    32 void write(const char *str, const long len)
     32void write(const char *str, const int len)
    3333{
    3434        ofw_write(str, len);
    3535}
     36
     37int ofw_keyboard(keyboard_t *keyboard)
     38{
     39        char device_name[BUF_SIZE];
     40       
     41        if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0)
     42                return false;
     43                               
     44        phandle device = ofw_find_device(device_name);
     45        if (device == -1)
     46                return false;
     47                                                               
     48        pci_reg_t macio;
     49        if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0)
     50                return false;
     51        keyboard->addr = (void *) macio.addr.addr_lo;
     52        keyboard->size = macio.size_lo;
     53
     54        return true;
     55}
Note: See TracChangeset for help on using the changeset viewer.