Changeset fc46884 in mainline
- Timestamp:
- 2006-10-16T21:34:33Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d95f1e24
- Parents:
- 5f9b4d9a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/kbd/z8530.c
r5f9b4d9a rfc46884 63 63 static irq_t z8530_irq; /**< z8530's IRQ. */ 64 64 65 static ipc_notif_cfg_t saved_notif_cfg; 66 65 67 static void z8530_suspend(chardev_t *); 66 68 static void z8530_resume(chardev_t *); … … 75 77 void z8530_grab(void) 76 78 { 79 (void) z8530_read_a(&z8530, RR8); 80 81 /* 82 * Clear any pending TX interrupts or we never manage 83 * to set FHC UART interrupt state to idle. 84 */ 85 z8530_write_a(&z8530, WR0, WR0_TX_IP_RST); 86 87 z8530_write_a(&z8530, WR1, WR1_IARCSC); /* interrupt on all characters */ 88 89 /* 8 bits per character and enable receiver */ 90 z8530_write_a(&z8530, WR3, WR3_RX8BITSCH | WR3_RX_ENABLE); 91 92 z8530_write_a(&z8530, WR9, WR9_MIE); /* Master Interrupt Enable. */ 93 94 if (z8530_irq.notif_cfg.answerbox) { 95 saved_notif_cfg = z8530_irq.notif_cfg; 96 z8530_irq.notif_cfg.answerbox = NULL; 97 z8530_irq.notif_cfg.code = NULL; 98 z8530_irq.notif_cfg.method = 0; 99 z8530_irq.notif_cfg.counter = 0; 100 } 77 101 } 78 102 … … 80 104 void z8530_release(void) 81 105 { 106 if (saved_notif_cfg.answerbox) 107 z8530_irq.notif_cfg = saved_notif_cfg; 82 108 } 83 109 … … 103 129 sysinfo_set_item_val("kbd.address.virtual", NULL, vaddr); 104 130 105 (void) z8530_read_a(&z8530, RR8); 106 107 /* 108 * Clear any pending TX interrupts or we never manage 109 * to set FHC UART interrupt state to idle. 110 */ 111 z8530_write_a(&z8530, WR0, WR0_TX_IP_RST); 112 113 z8530_write_a(&z8530, WR1, WR1_IARCSC); /* interrupt on all characters */ 114 115 /* 8 bits per character and enable receiver */ 116 z8530_write_a(&z8530, WR3, WR3_RX8BITSCH | WR3_RX_ENABLE); 117 118 z8530_write_a(&z8530, WR9, WR9_MIE); /* Master Interrupt Enable. */ 131 z8530_grab(); 119 132 } 120 133
Note:
See TracChangeset
for help on using the changeset viewer.