Subversion Repositories HelenOS

Rev

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

Rev 3577 Rev 3646
Line 101... Line 101...
101
    devno_t devno = device_assign_devno();
101
    devno_t devno = device_assign_devno();
102
   
102
   
103
    switch (kbd_type) {
103
    switch (kbd_type) {
104
    case KBD_Z8530:
104
    case KBD_Z8530:
105
        size = ((ofw_fhc_reg_t *) prop->value)->size;
105
        size = ((ofw_fhc_reg_t *) prop->value)->size;
-
 
106
        if (!ofw_fhc_apply_ranges(node->parent,
106
        if (!ofw_fhc_apply_ranges(node->parent, ((ofw_fhc_reg_t *) prop->value) , &pa)) {
107
            ((ofw_fhc_reg_t *) prop->value), &pa)) {
107
            printf("Failed to determine keyboard address.\n");
108
            printf("Failed to determine keyboard address.\n");
108
            return;
109
            return;
109
        }
110
        }
-
 
111
        if (!ofw_fhc_map_interrupt(node->parent,
110
        if (!ofw_fhc_map_interrupt(node->parent, ((ofw_fhc_reg_t *) prop->value), interrupts, &inr)) {
112
            ((ofw_fhc_reg_t *) prop->value), interrupts, &inr)) {
111
            printf("Failed to determine keyboard interrupt.\n");
113
            printf("Failed to determine keyboard interrupt.\n");
112
            return;
114
            return;
113
        }
115
        }
114
        break;
116
        break;
115
       
117
       
116
    case KBD_NS16550:
118
    case KBD_NS16550:
117
        size = ((ofw_ebus_reg_t *) prop->value)->size;
119
        size = ((ofw_ebus_reg_t *) prop->value)->size;
-
 
120
        if (!ofw_ebus_apply_ranges(node->parent,
118
        if (!ofw_ebus_apply_ranges(node->parent, ((ofw_ebus_reg_t *) prop->value) , &pa)) {
121
            ((ofw_ebus_reg_t *) prop->value), &pa)) {
119
            printf("Failed to determine keyboard address.\n");
122
            printf("Failed to determine keyboard address.\n");
120
            return;
123
            return;
121
        }
124
        }
-
 
125
        if (!ofw_ebus_map_interrupt(node->parent,
122
        if (!ofw_ebus_map_interrupt(node->parent, ((ofw_ebus_reg_t *) prop->value), interrupts, &inr)) {
126
            ((ofw_ebus_reg_t *) prop->value), interrupts, &inr)) {
123
            printf("Failed to determine keyboard interrupt.\n");
127
            printf("Failed to determine keyboard interrupt.\n");
124
            return;
128
            return;
125
        };
129
        };
126
        break;
130
        break;
127
 
131
 
Line 149... Line 153...
149
    case KBD_NS16550:
153
    case KBD_NS16550:
150
        ns16550_init(devno, inr, (ioport_t)vaddr);
154
        ns16550_init(devno, inr, (ioport_t)vaddr);
151
        break;
155
        break;
152
#endif
156
#endif
153
    default:
157
    default:
154
        printf("Kernel is not compiled with the necessary keyboard driver this machine requires.\n");
158
        printf("Kernel is not compiled with the necessary keyboard "
-
 
159
            "driver this machine requires.\n");
155
    }
160
    }
156
}
161
}
157
 
162
 
158
/** @}
163
/** @}
159
 */
164
 */