Rev 3770 | Rev 3862 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3770 | Rev 3817 | ||
|---|---|---|---|
| Line 38... | Line 38... | ||
| 38 | #include <arch/drivers/scr.h> |
38 | #include <arch/drivers/scr.h> |
| 39 | #include <arch/drivers/kbd.h> |
39 | #include <arch/drivers/kbd.h> |
| 40 | 40 | ||
| 41 | #include <arch/drivers/sgcn.h> |
41 | #include <arch/drivers/sgcn.h> |
| 42 | 42 | ||
| - | 43 | #if defined (SUN4U) |
|
| 43 | #ifdef CONFIG_Z8530 |
44 | #ifdef CONFIG_Z8530 |
| 44 | #include <genarch/kbd/z8530.h> |
45 | #include <genarch/kbd/z8530.h> |
| 45 | #endif |
46 | #endif |
| 46 | #ifdef CONFIG_NS16550 |
47 | #ifdef CONFIG_NS16550 |
| 47 | #include <genarch/kbd/ns16550.h> |
48 | #include <genarch/kbd/ns16550.h> |
| - | 49 | #endif |
|
| - | 50 | #elif defined (SUN4V) |
|
| - | 51 | #include <arch/drivers/niagara.h> |
|
| 48 | #endif |
52 | #endif |
| 49 | 53 | ||
| 50 | #include <console/chardev.h> |
54 | #include <console/chardev.h> |
| 51 | #include <console/console.h> |
55 | #include <console/console.h> |
| 52 | #include <arch/asm.h> |
56 | #include <arch/asm.h> |
| Line 59... | Line 63... | ||
| 59 | #include <func.h> |
63 | #include <func.h> |
| 60 | #include <print.h> |
64 | #include <print.h> |
| 61 | 65 | ||
| 62 | #define KEYBOARD_POLL_PAUSE 50000 /* 50ms */ |
66 | #define KEYBOARD_POLL_PAUSE 50000 /* 50ms */ |
| 63 | 67 | ||
| - | 68 | #if defined (SUN4U) |
|
| - | 69 | ||
| 64 | /** |
70 | /** |
| 65 | * Initialize kernel console to use framebuffer and keyboard directly. |
71 | * Initialize kernel console to use framebuffer and keyboard directly. |
| 66 | * Called on UltraSPARC machines with standard keyboard and framebuffer. |
72 | * Called on UltraSPARC machines with standard keyboard and framebuffer. |
| 67 | * |
73 | * |
| 68 | * @param aliases the "/aliases" OBP node |
74 | * @param aliases the "/aliases" OBP node |
| Line 102... | Line 108... | ||
| 102 | static void serengeti_init(void) |
108 | static void serengeti_init(void) |
| 103 | { |
109 | { |
| 104 | sgcn_init(); |
110 | sgcn_init(); |
| 105 | } |
111 | } |
| 106 | 112 | ||
| - | 113 | #endif |
|
| - | 114 | ||
| 107 | /** |
115 | /** |
| 108 | * Initialize input/output. Auto-detects the type of machine |
116 | * Initialize input/output. Auto-detects the type of machine |
| 109 | * and calls the appropriate I/O init routine. |
117 | * and calls the appropriate I/O init routine. |
| 110 | */ |
118 | */ |
| 111 | void standalone_sparc64_console_init(void) |
119 | void standalone_sparc64_console_init(void) |
| 112 | { |
120 | { |
| - | 121 | #if defined (SUN4U) |
|
| 113 | ofw_tree_node_t *aliases; |
122 | ofw_tree_node_t *aliases; |
| 114 | ofw_tree_property_t *prop; |
123 | ofw_tree_property_t *prop; |
| 115 | 124 | ||
| 116 | aliases = ofw_tree_lookup("/aliases"); |
125 | aliases = ofw_tree_lookup("/aliases"); |
| 117 | if (!aliases) |
126 | if (!aliases) |
| Line 123... | Line 132... | ||
| 123 | if ((!prop) || (!prop->value) || (strcmp(prop->value, "/sgcn") != 0)) { |
132 | if ((!prop) || (!prop->value) || (strcmp(prop->value, "/sgcn") != 0)) { |
| 124 | standard_console_init(aliases); |
133 | standard_console_init(aliases); |
| 125 | } else { |
134 | } else { |
| 126 | serengeti_init(); |
135 | serengeti_init(); |
| 127 | } |
136 | } |
| - | 137 | #elif defined (SUN4V) |
|
| - | 138 | niagara_init(); |
|
| - | 139 | #endif |
|
| 128 | } |
140 | } |
| 129 | 141 | ||
| 130 | 142 | ||
| 131 | /** Kernel thread for polling keyboard. |
143 | /** Kernel thread for polling keyboard. |
| 132 | * |
144 | * |
| Line 164... | Line 176... | ||
| 164 | #endif |
176 | #endif |
| 165 | #ifdef CONFIG_SGCN |
177 | #ifdef CONFIG_SGCN |
| 166 | if (kbd_type == KBD_SGCN) |
178 | if (kbd_type == KBD_SGCN) |
| 167 | sgcn_poll(); |
179 | sgcn_poll(); |
| 168 | #endif |
180 | #endif |
| - | 181 | #ifdef SUN4V |
|
| - | 182 | if (kbd_type == KBD_SUN4V) |
|
| - | 183 | niagara_poll(); |
|
| - | 184 | #endif |
|
| 169 | thread_usleep(KEYBOARD_POLL_PAUSE); |
185 | thread_usleep(KEYBOARD_POLL_PAUSE); |
| 170 | } |
186 | } |
| 171 | } |
187 | } |
| 172 | 188 | ||
| 173 | /** Acquire console back for kernel |
189 | /** Acquire console back for kernel |