Rev 4156 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4156 | Rev 4296 | ||
---|---|---|---|
Line 84... | Line 84... | ||
84 | name = ofw_tree_node_name(node); |
84 | name = ofw_tree_node_name(node); |
85 | 85 | ||
86 | /* |
86 | /* |
87 | * Determine keyboard serial controller type. |
87 | * Determine keyboard serial controller type. |
88 | */ |
88 | */ |
89 | if (strcmp(name, "zs") == 0) |
89 | if (str_cmp(name, "zs") == 0) |
90 | kbd_type = KBD_Z8530; |
90 | kbd_type = KBD_Z8530; |
91 | else if (strcmp(name, "su") == 0) |
91 | else if (str_cmp(name, "su") == 0) |
92 | kbd_type = KBD_NS16550; |
92 | kbd_type = KBD_NS16550; |
93 | 93 | ||
94 | if (kbd_type == KBD_UNKNOWN) { |
94 | if (kbd_type == KBD_UNKNOWN) { |
95 | printf("Unknown keyboard device.\n"); |
95 | printf("Unknown keyboard device.\n"); |
96 | return; |
96 | return; |
Line 160... | Line 160... | ||
160 | offset = pa - aligned_addr; |
160 | offset = pa - aligned_addr; |
161 | 161 | ||
162 | switch (kbd_type) { |
162 | switch (kbd_type) { |
163 | #ifdef CONFIG_Z8530 |
163 | #ifdef CONFIG_Z8530 |
164 | case KBD_Z8530: |
164 | case KBD_Z8530: |
165 | z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) + |
165 | z8530 = (z8530_t *) |
166 | offset; |
166 | (hw_map(aligned_addr, offset + size) + offset); |
167 | 167 | ||
168 | indev_t *kbrdin_z8530 = z8530_init(z8530, inr, cir, cir_arg); |
168 | indev_t *kbrdin_z8530 = z8530_init(z8530, inr, cir, cir_arg); |
169 | if (kbrdin_z8530) |
169 | if (kbrdin_z8530) |
170 | kbrd_init(kbrdin_z8530); |
170 | kbrd_init(kbrdin_z8530); |
171 | 171 | ||
Line 181... | Line 181... | ||
181 | sysinfo_set_item_val("kbd.address.physical", NULL, pa); |
181 | sysinfo_set_item_val("kbd.address.physical", NULL, pa); |
182 | break; |
182 | break; |
183 | #endif |
183 | #endif |
184 | #ifdef CONFIG_NS16550 |
184 | #ifdef CONFIG_NS16550 |
185 | case KBD_NS16550: |
185 | case KBD_NS16550: |
186 | ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) + |
186 | ns16550 = (ns16550_t *) |
187 | offset; |
187 | (hw_map(aligned_addr, offset + size) + offset); |
188 | 188 | ||
189 | indev_t *kbrdin_ns16550 = ns16550_init(ns16550, inr, cir, cir_arg); |
189 | indev_t *kbrdin_ns16550 = ns16550_init(ns16550, inr, cir, cir_arg); |
190 | if (kbrdin_ns16550) |
190 | if (kbrdin_ns16550) |
191 | kbrd_init(kbrdin_ns16550); |
191 | kbrd_init(kbrdin_ns16550); |
192 | 192 |