mirror of
https://github.com/drasko/codezero.git
synced 2026-01-16 04:43:16 +01:00
KMI patch for devel branch on bahadir's repo.
Important points: ---------------- 1. Works fine for pb926 + qemu. 2. Scan code logic for kryboard is not complete. We just have generic keys and shift working. 3. Mouse scancodes are collected but not decoded. 4. Right now we are doing enable_irq(), just before we go for waiting again for new irqs. This is not correct but we had latency issues. This needs to be fixed immediately. 5. Also it seems like the notify_clot count should be an atomic variable. Needs to be discussed.
This commit is contained in:
@@ -46,6 +46,8 @@
|
||||
*/
|
||||
#define CAP_DEVTYPE_TIMER 1
|
||||
#define CAP_DEVTYPE_UART 2
|
||||
#define CAP_DEVTYPE_KEYBOARD 3
|
||||
#define CAP_DEVTYPE_MOUSE 4
|
||||
#define CAP_DEVTYPE_OTHER 0xF
|
||||
#define CAP_DEVTYPE_MASK 0xFFFF
|
||||
#define CAP_DEVNUM_MASK 0xFFFF0000
|
||||
|
||||
@@ -47,6 +47,9 @@ struct irq_desc {
|
||||
/* Notification slot for this irq */
|
||||
int task_notify_slot;
|
||||
|
||||
/* If user will ack this irq */
|
||||
int user_ack;
|
||||
|
||||
/* Waitqueue head for this irq */
|
||||
struct waitqueue_head wqh_irq;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* an irq on any irq chip.
|
||||
*/
|
||||
#define VIC_CHIP_OFFSET 0
|
||||
#define SIC_CHIP_OFFSET 32
|
||||
#define SIC_CHIP_OFFSET 31
|
||||
|
||||
/* Maximum irqs on VIC and SIC */
|
||||
#define VIC_IRQS_MAX 32
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
/* Secondary Interrupt controller local IRQ numbers */
|
||||
#define SIC_IRQ_SWI 0
|
||||
#define SIC_IRQ_KEYBOARD 3
|
||||
#define SIC_IRQ_MOUSE 4
|
||||
#define SIC_IRQ_UART3 6
|
||||
|
||||
/* Global irq numbers, note these should reflect global device names */
|
||||
@@ -47,6 +49,7 @@
|
||||
|
||||
#define IRQ_SICSWI (SIC_IRQ_SWI + SIC_CHIP_OFFSET)
|
||||
#define IRQ_UART3 (SIC_IRQ_UART3 + SIC_CHIP_OFFSET)
|
||||
|
||||
#define IRQ_KEYBOARD0 (SIC_IRQ_KEYBOARD + SIC_CHIP_OFFSET)
|
||||
#define IRQ_MOUSE0 (SIC_IRQ_MOUSE + SIC_CHIP_OFFSET)
|
||||
|
||||
#endif /* __PLATFORM_IRQ_H__ */
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* as we use these names for device capability
|
||||
*/
|
||||
#define PLATFORM_SYSTEM_REGISTERS 0x10000000 /* System registers */
|
||||
#define PLATFORM_KEYBOARD0_BASE 0x10006000 /* Keyboard */
|
||||
#define PLATFORM_MOUSE0_BASE 0x10007000 /* Mouse */
|
||||
#define PLATFORM_SYSCTRL_BASE 0x101E0000 /* System controller */
|
||||
#define PLATFORM_WATCHDOG_BASE 0x101E1000 /* Watchdog */
|
||||
#define PLATFORM_TIMER0_BASE 0x101E2000 /* Timers 0 and 1 */
|
||||
@@ -44,7 +46,9 @@
|
||||
#define PLATFORM_SYSCTRL_VBASE (IO_AREA0_VADDR + (4 * DEVICE_PAGE))
|
||||
|
||||
/* Add userspace devices here as they become necessary for irqs */
|
||||
#define PLATFORM_TIMER1_VBASE (IO_AREA0_VADDR + (6 * DEVICE_PAGE))
|
||||
#define PLATFORM_TIMER1_VBASE (IO_AREA0_VADDR + (6 * DEVICE_PAGE))
|
||||
#define PLATFORM_KEYBOARD0_VBASE (IO_AREA0_VADDR + (7 * DEVICE_PAGE))
|
||||
#define PLATFORM_MOUSE0_VBASE (IO_AREA0_VADDR + (8 * DEVICE_PAGE))
|
||||
|
||||
/* The SP810 system controller offsets */
|
||||
#define SP810_BASE PLATFORM_SYSCTRL_VBASE
|
||||
@@ -55,6 +59,8 @@
|
||||
#define PLATFORM_UART2_SIZE 0x1000
|
||||
#define PLATFORM_UART3_SIZE 0x1000
|
||||
#define PLATFORM_TIMER1_SIZE 0x1000
|
||||
#define PLATFORM_KEYBOARD0_SIZE 0x1000
|
||||
#define PLATFORM_MOUSE0_SIZE 0x1000
|
||||
|
||||
#endif /* __PLATFORM_PB926_OFFSETS_H__ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user