Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1702 | Rev 1734 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup ppc32 |
29 | /** @addtogroup ppc32 |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
Line 58... | Line 58... | ||
58 | #define TACK 0x10 |
58 | #define TACK 0x10 |
59 | #define TIP 0x20 |
59 | #define TIP 0x20 |
60 | 60 | ||
61 | 61 | ||
62 | static volatile __u8 *cuda = NULL; |
62 | static volatile __u8 *cuda = NULL; |
- | 63 | static iroutine vector; |
|
63 | 64 | ||
64 | 65 | ||
65 | static char lchars[0x80] = { |
66 | static char lchars[0x80] = { |
66 | 'a', |
67 | 'a', |
67 | 's', |
68 | 's', |
Line 257... | Line 258... | ||
257 | chardev_push_character(&kbrd, lchars[scancode & 0x7f]); |
258 | chardev_push_character(&kbrd, lchars[scancode & 0x7f]); |
258 | } |
259 | } |
259 | } |
260 | } |
260 | 261 | ||
261 | 262 | ||
- | 263 | /** Initialize keyboard and service interrupts using kernel routine */ |
|
- | 264 | void cuda_grab(void) |
|
- | 265 | { |
|
- | 266 | vector = int_register(CUDA_IRQ, "cuda", cuda_irq); |
|
- | 267 | } |
|
- | 268 | ||
- | 269 | ||
- | 270 | /** Resume the former interrupt vector */ |
|
- | 271 | void cuda_release(void) |
|
- | 272 | { |
|
- | 273 | if (vector) |
|
- | 274 | int_register(CUDA_IRQ, "user_interrupt", vector); |
|
- | 275 | } |
|
- | 276 | ||
- | 277 | ||
262 | void cuda_init(__address base, size_t size) |
278 | void cuda_init(__address base, size_t size) |
263 | { |
279 | { |
264 | cuda = (__u8 *) hw_map(base, size); |
280 | cuda = (__u8 *) hw_map(base, size); |
265 | 281 | ||
266 | int_register(CUDA_IRQ, "cuda", cuda_irq); |
282 | int_register(CUDA_IRQ, "cuda", cuda_irq); |
Line 305... | Line 321... | ||
305 | asm volatile ( |
321 | asm volatile ( |
306 | "b 0\n" |
322 | "b 0\n" |
307 | ); |
323 | ); |
308 | } |
324 | } |
309 | 325 | ||
310 | /** @} |
326 | /** @} |
311 | */ |
327 | */ |
312 | - |