Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2745
Line 63... Line 63...
63
    }
63
    }
64
       
64
       
65
    ranges = prop->size / sizeof(ofw_pci_range_t);
65
    ranges = prop->size / sizeof(ofw_pci_range_t);
66
    range = prop->value;
66
    range = prop->value;
67
   
67
   
68
    int i;
68
    unsigned int i;
69
   
69
   
70
    for (i = 0; i < ranges; i++) {
70
    for (i = 0; i < ranges; i++) {
71
        if ((reg->space & PCI_SPACE_MASK) != (range[i].space & PCI_SPACE_MASK))
71
        if ((reg->space & PCI_SPACE_MASK) != (range[i].space & PCI_SPACE_MASK))
72
            continue;
72
            continue;
73
        if (overlaps(reg->addr, reg->size, range[i].child_base, range[i].size)) {
73
        if (overlaps(reg->addr, reg->size, range[i].child_base, range[i].size)) {
Line 98... Line 98...
98
        panic("Can't find \"assigned-addresses\" property.\n");
98
        panic("Can't find \"assigned-addresses\" property.\n");
99
   
99
   
100
    assigned_addresses = prop->size / sizeof(ofw_pci_reg_t);
100
    assigned_addresses = prop->size / sizeof(ofw_pci_reg_t);
101
    assigned_address = prop->value;
101
    assigned_address = prop->value;
102
   
102
   
103
    int i;
103
    unsigned int i;
104
   
104
   
105
    for (i = 0; i < assigned_addresses; i++) {
105
    for (i = 0; i < assigned_addresses; i++) {
106
        if ((assigned_address[i].space & PCI_REG_MASK) == (reg->space & PCI_REG_MASK)) {
106
        if ((assigned_address[i].space & PCI_REG_MASK) == (reg->space & PCI_REG_MASK)) {
107
            out->space = assigned_address[i].space;
107
            out->space = assigned_address[i].space;
108
            out->addr = reg->addr + assigned_address[i].addr;
108
            out->addr = reg->addr + assigned_address[i].addr;