Subversion Repositories HelenOS

Rev

Rev 3403 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3403 Rev 4341
Line 46... Line 46...
46
            ofw_write("\r", 1);
46
            ofw_write("\r", 1);
47
        ofw_write(&str[i], 1);
47
        ofw_write(&str[i], 1);
48
    }
48
    }
49
}
49
}
50
 
50
 
51
int ofw_keyboard(keyboard_t *keyboard)
51
int ofw_macio(macio_t *macio)
52
{
52
{
53
    char device_name[BUF_SIZE];
53
    char device_name[BUF_SIZE];
54
   
54
   
55
    if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0)
55
    if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0)
56
        return false;
56
        return false;
57
               
57
   
58
    phandle device = ofw_find_device(device_name);
58
    phandle device = ofw_find_device(device_name);
59
    if (device == -1)
59
    if (device == -1)
60
        return false;
60
        return false;
61
                               
61
   
62
    pci_reg_t macio;
62
    pci_reg_t pci_reg;
63
    if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0)
63
    if (ofw_get_property(device, "assigned-addresses", &pci_reg, sizeof(pci_reg)) <= 0)
64
        return false;
64
        return false;
-
 
65
   
65
    keyboard->addr = (void *) macio.addr.addr_lo;
66
    macio->addr = (void *) pci_reg.addr.addr_lo;
66
    keyboard->size = macio.size_lo;
67
    macio->size = pci_reg.size_lo;
67
 
68
 
68
    return true;
69
    return true;
69
}
70
}
70
 
71
 
71
int ofw_translate_failed(ofw_arg_t flag)
72
int ofw_translate_failed(ofw_arg_t flag)