Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * arch/m68k/q40/config.c |
| 3 | * |
| 4 | * Copyright (C) 1999 Richard Zidlicky |
| 5 | * |
| 6 | * originally based on: |
| 7 | * |
| 8 | * linux/bvme/config.c |
| 9 | * |
| 10 | * This file is subject to the terms and conditions of the GNU General Public |
| 11 | * License. See the file README.legal in the main directory of this archive |
| 12 | * for more details. |
| 13 | */ |
| 14 | |
Arnd Bergmann | 084b360 | 2016-05-30 20:57:59 +0200 | [diff] [blame] | 15 | #include <linux/errno.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include <linux/types.h> |
| 17 | #include <linux/kernel.h> |
| 18 | #include <linux/mm.h> |
| 19 | #include <linux/tty.h> |
| 20 | #include <linux/console.h> |
| 21 | #include <linux/linkage.h> |
| 22 | #include <linux/init.h> |
| 23 | #include <linux/major.h> |
| 24 | #include <linux/serial_reg.h> |
| 25 | #include <linux/rtc.h> |
| 26 | #include <linux/vt_kern.h> |
Adrian Bunk | 5b1d5f9 | 2008-10-13 21:58:47 +0200 | [diff] [blame] | 27 | #include <linux/bcd.h> |
Dmitry Torokhov | 409e154 | 2012-01-22 23:27:54 -0800 | [diff] [blame] | 28 | #include <linux/platform_device.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
| 30 | #include <asm/io.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #include <asm/bootinfo.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | #include <asm/pgtable.h> |
| 33 | #include <asm/setup.h> |
| 34 | #include <asm/irq.h> |
| 35 | #include <asm/traps.h> |
| 36 | #include <asm/machdep.h> |
| 37 | #include <asm/q40_master.h> |
| 38 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 39 | extern void q40_init_IRQ(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | static void q40_get_model(char *model); |
David Howells | 40220c1 | 2006-10-09 12:19:47 +0100 | [diff] [blame] | 41 | extern void q40_sched_init(irq_handler_t handler); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | |
Adrian Bunk | 22deb52 | 2008-07-17 21:16:26 +0200 | [diff] [blame] | 43 | static int q40_hwclk(int, struct rtc_time *); |
| 44 | static unsigned int q40_get_ss(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | static int q40_get_rtc_pll(struct rtc_pll_info *pll); |
| 46 | static int q40_set_rtc_pll(struct rtc_pll_info *pll); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 48 | extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | static void q40_mem_console_write(struct console *co, const char *b, |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 51 | unsigned int count); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | |
| 53 | extern int ql_ticks; |
| 54 | |
| 55 | static struct console q40_console_driver = { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 56 | .name = "debug", |
Roman Zippel | d6713b4 | 2007-05-01 22:32:45 +0200 | [diff] [blame] | 57 | .write = q40_mem_console_write, |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 58 | .flags = CON_PRINTBUFFER, |
| 59 | .index = -1, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | }; |
| 61 | |
| 62 | |
| 63 | /* early debugging function:*/ |
| 64 | extern char *q40_mem_cptr; /*=(char *)0xff020000;*/ |
| 65 | static int _cpleft; |
| 66 | |
| 67 | static void q40_mem_console_write(struct console *co, const char *s, |
| 68 | unsigned int count) |
| 69 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 70 | const char *p = s; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 72 | if (count < _cpleft) { |
| 73 | while (count-- > 0) { |
| 74 | *q40_mem_cptr = *p++; |
| 75 | q40_mem_cptr += 4; |
| 76 | _cpleft--; |
| 77 | } |
| 78 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | } |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 80 | |
Roman Zippel | d6713b4 | 2007-05-01 22:32:45 +0200 | [diff] [blame] | 81 | static int __init q40_debug_setup(char *arg) |
| 82 | { |
| 83 | /* useful for early debugging stages - writes kernel messages into SRAM */ |
| 84 | if (MACH_IS_Q40 && !strncmp(arg, "mem", 3)) { |
Geert Uytterhoeven | 446926f | 2016-12-06 17:11:01 +0100 | [diff] [blame] | 85 | /*pr_info("using NVRAM debug, q40_mem_cptr=%p\n",q40_mem_cptr);*/ |
Roman Zippel | d6713b4 | 2007-05-01 22:32:45 +0200 | [diff] [blame] | 86 | _cpleft = 2000 - ((long)q40_mem_cptr-0xff020000) / 4; |
| 87 | register_console(&q40_console_driver); |
| 88 | } |
| 89 | return 0; |
| 90 | } |
| 91 | |
| 92 | early_param("debug", q40_debug_setup); |
| 93 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | #if 0 |
| 95 | void printq40(char *str) |
| 96 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 97 | int l = strlen(str); |
| 98 | char *p = q40_mem_cptr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 100 | while (l-- > 0 && _cpleft-- > 0) { |
| 101 | *p = *str++; |
| 102 | p += 4; |
| 103 | } |
| 104 | q40_mem_cptr = p; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | } |
| 106 | #endif |
| 107 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 108 | static int halted; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | |
| 110 | #ifdef CONFIG_HEARTBEAT |
| 111 | static void q40_heartbeat(int on) |
| 112 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 113 | if (halted) |
| 114 | return; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 116 | if (on) |
| 117 | Q40_LED_ON(); |
| 118 | else |
| 119 | Q40_LED_OFF(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | } |
| 121 | #endif |
| 122 | |
Adrian Bunk | 22deb52 | 2008-07-17 21:16:26 +0200 | [diff] [blame] | 123 | static void q40_reset(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | { |
Geert Uytterhoeven | 446926f | 2016-12-06 17:11:01 +0100 | [diff] [blame] | 125 | halted = 1; |
| 126 | pr_info("*******************************************\n" |
Frans Pop | b9b0d8b | 2010-02-06 18:47:11 +0100 | [diff] [blame] | 127 | "Called q40_reset : press the RESET button!!\n" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | "*******************************************\n"); |
| 129 | Q40_LED_ON(); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 130 | while (1) |
| 131 | ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | } |
Adrian Bunk | 22deb52 | 2008-07-17 21:16:26 +0200 | [diff] [blame] | 133 | |
| 134 | static void q40_halt(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | { |
Geert Uytterhoeven | 446926f | 2016-12-06 17:11:01 +0100 | [diff] [blame] | 136 | halted = 1; |
| 137 | pr_info("*******************\n" |
| 138 | " Called q40_halt\n" |
| 139 | "*******************\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | Q40_LED_ON(); |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 141 | while (1) |
| 142 | ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | } |
| 144 | |
| 145 | static void q40_get_model(char *model) |
| 146 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 147 | sprintf(model, "Q40"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | } |
| 149 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 150 | static unsigned int serports[] = |
| 151 | { |
| 152 | 0x3f8,0x2f8,0x3e8,0x2e8,0 |
| 153 | }; |
Adrian Bunk | 22deb52 | 2008-07-17 21:16:26 +0200 | [diff] [blame] | 154 | |
Geert Uytterhoeven | a4df02a | 2013-06-25 21:15:24 +0200 | [diff] [blame] | 155 | static void __init q40_disable_irqs(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 157 | unsigned i, j; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 158 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 159 | j = 0; |
| 160 | while ((i = serports[j++])) |
| 161 | outb(0, i + UART_IER); |
| 162 | master_outb(0, EXT_ENABLE_REG); |
| 163 | master_outb(0, KEY_IRQ_ENABLE_REG); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | void __init config_q40(void) |
| 167 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 168 | mach_sched_init = q40_sched_init; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 170 | mach_init_IRQ = q40_init_IRQ; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 171 | mach_hwclk = q40_hwclk; |
| 172 | mach_get_ss = q40_get_ss; |
| 173 | mach_get_rtc_pll = q40_get_rtc_pll; |
| 174 | mach_set_rtc_pll = q40_set_rtc_pll; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 176 | mach_reset = q40_reset; |
| 177 | mach_get_model = q40_get_model; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | |
Geert Uytterhoeven | a1a9e88 | 2016-09-05 13:18:15 +0200 | [diff] [blame] | 179 | #if IS_ENABLED(CONFIG_INPUT_M68K_BEEP) |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 180 | mach_beep = q40_mksound; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 181 | #endif |
| 182 | #ifdef CONFIG_HEARTBEAT |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 183 | mach_heartbeat = q40_heartbeat; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 184 | #endif |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 185 | mach_halt = q40_halt; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 186 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 187 | /* disable a few things that SMSQ might have left enabled */ |
| 188 | q40_disable_irqs(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 190 | /* no DMA at all, but ide-scsi requires it.. make sure |
| 191 | * all physical RAM fits into the boundary - otherwise |
| 192 | * allocator may play costly and useless tricks */ |
| 193 | mach_max_dma_address = 1024*1024*1024; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | |
Geert Uytterhoeven | a4df02a | 2013-06-25 21:15:24 +0200 | [diff] [blame] | 197 | int __init q40_parse_bootinfo(const struct bi_record *rec) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 199 | return 1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | } |
| 201 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | /* |
| 203 | * Looks like op is non-zero for setting the clock, and zero for |
| 204 | * reading the clock. |
| 205 | * |
| 206 | * struct hwclk_time { |
| 207 | * unsigned sec; 0..59 |
| 208 | * unsigned min; 0..59 |
| 209 | * unsigned hour; 0..23 |
| 210 | * unsigned day; 1..31 |
| 211 | * unsigned mon; 0..11 |
| 212 | * unsigned year; 00... |
| 213 | * int wday; 0..6, 0 is Sunday, -1 means unknown/don't set |
| 214 | * }; |
| 215 | */ |
| 216 | |
Adrian Bunk | 22deb52 | 2008-07-17 21:16:26 +0200 | [diff] [blame] | 217 | static int q40_hwclk(int op, struct rtc_time *t) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 218 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 219 | if (op) { |
| 220 | /* Write.... */ |
| 221 | Q40_RTC_CTRL |= Q40_RTC_WRITE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 222 | |
| 223 | Q40_RTC_SECS = bin2bcd(t->tm_sec); |
| 224 | Q40_RTC_MINS = bin2bcd(t->tm_min); |
| 225 | Q40_RTC_HOUR = bin2bcd(t->tm_hour); |
| 226 | Q40_RTC_DATE = bin2bcd(t->tm_mday); |
| 227 | Q40_RTC_MNTH = bin2bcd(t->tm_mon + 1); |
| 228 | Q40_RTC_YEAR = bin2bcd(t->tm_year%100); |
| 229 | if (t->tm_wday >= 0) |
| 230 | Q40_RTC_DOW = bin2bcd(t->tm_wday+1); |
| 231 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 232 | Q40_RTC_CTRL &= ~(Q40_RTC_WRITE); |
| 233 | } else { |
| 234 | /* Read.... */ |
| 235 | Q40_RTC_CTRL |= Q40_RTC_READ; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 237 | t->tm_year = bcd2bin (Q40_RTC_YEAR); |
| 238 | t->tm_mon = bcd2bin (Q40_RTC_MNTH)-1; |
| 239 | t->tm_mday = bcd2bin (Q40_RTC_DATE); |
| 240 | t->tm_hour = bcd2bin (Q40_RTC_HOUR); |
| 241 | t->tm_min = bcd2bin (Q40_RTC_MINS); |
| 242 | t->tm_sec = bcd2bin (Q40_RTC_SECS); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 244 | Q40_RTC_CTRL &= ~(Q40_RTC_READ); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 246 | if (t->tm_year < 70) |
| 247 | t->tm_year += 100; |
| 248 | t->tm_wday = bcd2bin(Q40_RTC_DOW)-1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 249 | } |
| 250 | |
| 251 | return 0; |
| 252 | } |
| 253 | |
Adrian Bunk | 22deb52 | 2008-07-17 21:16:26 +0200 | [diff] [blame] | 254 | static unsigned int q40_get_ss(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | { |
| 256 | return bcd2bin(Q40_RTC_SECS); |
| 257 | } |
| 258 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 259 | /* get and set PLL calibration of RTC clock */ |
| 260 | #define Q40_RTC_PLL_MASK ((1<<5)-1) |
| 261 | #define Q40_RTC_PLL_SIGN (1<<5) |
| 262 | |
| 263 | static int q40_get_rtc_pll(struct rtc_pll_info *pll) |
| 264 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 265 | int tmp = Q40_RTC_CTRL; |
| 266 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | pll->pll_value = tmp & Q40_RTC_PLL_MASK; |
| 268 | if (tmp & Q40_RTC_PLL_SIGN) |
| 269 | pll->pll_value = -pll->pll_value; |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 270 | pll->pll_max = 31; |
| 271 | pll->pll_min = -31; |
| 272 | pll->pll_posmult = 512; |
| 273 | pll->pll_negmult = 256; |
| 274 | pll->pll_clock = 125829120; |
| 275 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 276 | return 0; |
| 277 | } |
| 278 | |
| 279 | static int q40_set_rtc_pll(struct rtc_pll_info *pll) |
| 280 | { |
Roman Zippel | 6ff5801 | 2007-05-01 22:32:43 +0200 | [diff] [blame] | 281 | if (!pll->pll_ctrl) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 282 | /* the docs are a bit unclear so I am doublesetting */ |
| 283 | /* RTC_WRITE here ... */ |
| 284 | int tmp = (pll->pll_value & 31) | (pll->pll_value<0 ? 32 : 0) | |
| 285 | Q40_RTC_WRITE; |
| 286 | Q40_RTC_CTRL |= Q40_RTC_WRITE; |
| 287 | Q40_RTC_CTRL = tmp; |
| 288 | Q40_RTC_CTRL &= ~(Q40_RTC_WRITE); |
| 289 | return 0; |
| 290 | } else |
| 291 | return -EINVAL; |
| 292 | } |
Dmitry Torokhov | 409e154 | 2012-01-22 23:27:54 -0800 | [diff] [blame] | 293 | |
| 294 | static __init int q40_add_kbd_device(void) |
| 295 | { |
| 296 | struct platform_device *pdev; |
| 297 | |
Geert Uytterhoeven | 450aed7 | 2012-03-18 13:20:27 +0100 | [diff] [blame] | 298 | if (!MACH_IS_Q40) |
| 299 | return -ENODEV; |
| 300 | |
Dmitry Torokhov | 409e154 | 2012-01-22 23:27:54 -0800 | [diff] [blame] | 301 | pdev = platform_device_register_simple("q40kbd", -1, NULL, 0); |
Rusty Russell | 8c6ffba | 2013-07-15 11:20:32 +0930 | [diff] [blame] | 302 | return PTR_ERR_OR_ZERO(pdev); |
Dmitry Torokhov | 409e154 | 2012-01-22 23:27:54 -0800 | [diff] [blame] | 303 | } |
| 304 | arch_initcall(q40_add_kbd_device); |