2
0

omap_intc.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /*
  2. * TI OMAP interrupt controller emulation.
  3. *
  4. * Copyright (C) 2006-2008 Andrzej Zaborowski <balrog@zabor.org>
  5. * Copyright (C) 2007-2008 Nokia Corporation
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 or
  10. * (at your option) version 3 of the License.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "hw.h"
  21. #include "omap.h"
  22. #include "sysbus.h"
  23. /* Interrupt Handlers */
  24. struct omap_intr_handler_bank_s {
  25. uint32_t irqs;
  26. uint32_t inputs;
  27. uint32_t mask;
  28. uint32_t fiq;
  29. uint32_t sens_edge;
  30. uint32_t swi;
  31. unsigned char priority[32];
  32. };
  33. struct omap_intr_handler_s {
  34. SysBusDevice busdev;
  35. qemu_irq *pins;
  36. qemu_irq parent_intr[2];
  37. MemoryRegion mmio;
  38. void *iclk;
  39. void *fclk;
  40. unsigned char nbanks;
  41. int level_only;
  42. uint32_t size;
  43. uint8_t revision;
  44. /* state */
  45. uint32_t new_agr[2];
  46. int sir_intr[2];
  47. int autoidle;
  48. uint32_t mask;
  49. struct omap_intr_handler_bank_s bank[3];
  50. };
  51. static void omap_inth_sir_update(struct omap_intr_handler_s *s, int is_fiq)
  52. {
  53. int i, j, sir_intr, p_intr, p, f;
  54. uint32_t level;
  55. sir_intr = 0;
  56. p_intr = 255;
  57. /* Find the interrupt line with the highest dynamic priority.
  58. * Note: 0 denotes the hightest priority.
  59. * If all interrupts have the same priority, the default order is IRQ_N,
  60. * IRQ_N-1,...,IRQ_0. */
  61. for (j = 0; j < s->nbanks; ++j) {
  62. level = s->bank[j].irqs & ~s->bank[j].mask &
  63. (is_fiq ? s->bank[j].fiq : ~s->bank[j].fiq);
  64. for (f = ffs(level), i = f - 1, level >>= f - 1; f; i += f,
  65. level >>= f) {
  66. p = s->bank[j].priority[i];
  67. if (p <= p_intr) {
  68. p_intr = p;
  69. sir_intr = 32 * j + i;
  70. }
  71. f = ffs(level >> 1);
  72. }
  73. }
  74. s->sir_intr[is_fiq] = sir_intr;
  75. }
  76. static inline void omap_inth_update(struct omap_intr_handler_s *s, int is_fiq)
  77. {
  78. int i;
  79. uint32_t has_intr = 0;
  80. for (i = 0; i < s->nbanks; ++i)
  81. has_intr |= s->bank[i].irqs & ~s->bank[i].mask &
  82. (is_fiq ? s->bank[i].fiq : ~s->bank[i].fiq);
  83. if (s->new_agr[is_fiq] & has_intr & s->mask) {
  84. s->new_agr[is_fiq] = 0;
  85. omap_inth_sir_update(s, is_fiq);
  86. qemu_set_irq(s->parent_intr[is_fiq], 1);
  87. }
  88. }
  89. #define INT_FALLING_EDGE 0
  90. #define INT_LOW_LEVEL 1
  91. static void omap_set_intr(void *opaque, int irq, int req)
  92. {
  93. struct omap_intr_handler_s *ih = (struct omap_intr_handler_s *) opaque;
  94. uint32_t rise;
  95. struct omap_intr_handler_bank_s *bank = &ih->bank[irq >> 5];
  96. int n = irq & 31;
  97. if (req) {
  98. rise = ~bank->irqs & (1 << n);
  99. if (~bank->sens_edge & (1 << n))
  100. rise &= ~bank->inputs;
  101. bank->inputs |= (1 << n);
  102. if (rise) {
  103. bank->irqs |= rise;
  104. omap_inth_update(ih, 0);
  105. omap_inth_update(ih, 1);
  106. }
  107. } else {
  108. rise = bank->sens_edge & bank->irqs & (1 << n);
  109. bank->irqs &= ~rise;
  110. bank->inputs &= ~(1 << n);
  111. }
  112. }
  113. /* Simplified version with no edge detection */
  114. static void omap_set_intr_noedge(void *opaque, int irq, int req)
  115. {
  116. struct omap_intr_handler_s *ih = (struct omap_intr_handler_s *) opaque;
  117. uint32_t rise;
  118. struct omap_intr_handler_bank_s *bank = &ih->bank[irq >> 5];
  119. int n = irq & 31;
  120. if (req) {
  121. rise = ~bank->inputs & (1 << n);
  122. if (rise) {
  123. bank->irqs |= bank->inputs |= rise;
  124. omap_inth_update(ih, 0);
  125. omap_inth_update(ih, 1);
  126. }
  127. } else
  128. bank->irqs = (bank->inputs &= ~(1 << n)) | bank->swi;
  129. }
  130. static uint64_t omap_inth_read(void *opaque, target_phys_addr_t addr,
  131. unsigned size)
  132. {
  133. struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
  134. int i, offset = addr;
  135. int bank_no = offset >> 8;
  136. int line_no;
  137. struct omap_intr_handler_bank_s *bank = &s->bank[bank_no];
  138. offset &= 0xff;
  139. switch (offset) {
  140. case 0x00: /* ITR */
  141. return bank->irqs;
  142. case 0x04: /* MIR */
  143. return bank->mask;
  144. case 0x10: /* SIR_IRQ_CODE */
  145. case 0x14: /* SIR_FIQ_CODE */
  146. if (bank_no != 0)
  147. break;
  148. line_no = s->sir_intr[(offset - 0x10) >> 2];
  149. bank = &s->bank[line_no >> 5];
  150. i = line_no & 31;
  151. if (((bank->sens_edge >> i) & 1) == INT_FALLING_EDGE)
  152. bank->irqs &= ~(1 << i);
  153. return line_no;
  154. case 0x18: /* CONTROL_REG */
  155. if (bank_no != 0)
  156. break;
  157. return 0;
  158. case 0x1c: /* ILR0 */
  159. case 0x20: /* ILR1 */
  160. case 0x24: /* ILR2 */
  161. case 0x28: /* ILR3 */
  162. case 0x2c: /* ILR4 */
  163. case 0x30: /* ILR5 */
  164. case 0x34: /* ILR6 */
  165. case 0x38: /* ILR7 */
  166. case 0x3c: /* ILR8 */
  167. case 0x40: /* ILR9 */
  168. case 0x44: /* ILR10 */
  169. case 0x48: /* ILR11 */
  170. case 0x4c: /* ILR12 */
  171. case 0x50: /* ILR13 */
  172. case 0x54: /* ILR14 */
  173. case 0x58: /* ILR15 */
  174. case 0x5c: /* ILR16 */
  175. case 0x60: /* ILR17 */
  176. case 0x64: /* ILR18 */
  177. case 0x68: /* ILR19 */
  178. case 0x6c: /* ILR20 */
  179. case 0x70: /* ILR21 */
  180. case 0x74: /* ILR22 */
  181. case 0x78: /* ILR23 */
  182. case 0x7c: /* ILR24 */
  183. case 0x80: /* ILR25 */
  184. case 0x84: /* ILR26 */
  185. case 0x88: /* ILR27 */
  186. case 0x8c: /* ILR28 */
  187. case 0x90: /* ILR29 */
  188. case 0x94: /* ILR30 */
  189. case 0x98: /* ILR31 */
  190. i = (offset - 0x1c) >> 2;
  191. return (bank->priority[i] << 2) |
  192. (((bank->sens_edge >> i) & 1) << 1) |
  193. ((bank->fiq >> i) & 1);
  194. case 0x9c: /* ISR */
  195. return 0x00000000;
  196. }
  197. OMAP_BAD_REG(addr);
  198. return 0;
  199. }
  200. static void omap_inth_write(void *opaque, target_phys_addr_t addr,
  201. uint64_t value, unsigned size)
  202. {
  203. struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
  204. int i, offset = addr;
  205. int bank_no = offset >> 8;
  206. struct omap_intr_handler_bank_s *bank = &s->bank[bank_no];
  207. offset &= 0xff;
  208. switch (offset) {
  209. case 0x00: /* ITR */
  210. /* Important: ignore the clearing if the IRQ is level-triggered and
  211. the input bit is 1 */
  212. bank->irqs &= value | (bank->inputs & bank->sens_edge);
  213. return;
  214. case 0x04: /* MIR */
  215. bank->mask = value;
  216. omap_inth_update(s, 0);
  217. omap_inth_update(s, 1);
  218. return;
  219. case 0x10: /* SIR_IRQ_CODE */
  220. case 0x14: /* SIR_FIQ_CODE */
  221. OMAP_RO_REG(addr);
  222. break;
  223. case 0x18: /* CONTROL_REG */
  224. if (bank_no != 0)
  225. break;
  226. if (value & 2) {
  227. qemu_set_irq(s->parent_intr[1], 0);
  228. s->new_agr[1] = ~0;
  229. omap_inth_update(s, 1);
  230. }
  231. if (value & 1) {
  232. qemu_set_irq(s->parent_intr[0], 0);
  233. s->new_agr[0] = ~0;
  234. omap_inth_update(s, 0);
  235. }
  236. return;
  237. case 0x1c: /* ILR0 */
  238. case 0x20: /* ILR1 */
  239. case 0x24: /* ILR2 */
  240. case 0x28: /* ILR3 */
  241. case 0x2c: /* ILR4 */
  242. case 0x30: /* ILR5 */
  243. case 0x34: /* ILR6 */
  244. case 0x38: /* ILR7 */
  245. case 0x3c: /* ILR8 */
  246. case 0x40: /* ILR9 */
  247. case 0x44: /* ILR10 */
  248. case 0x48: /* ILR11 */
  249. case 0x4c: /* ILR12 */
  250. case 0x50: /* ILR13 */
  251. case 0x54: /* ILR14 */
  252. case 0x58: /* ILR15 */
  253. case 0x5c: /* ILR16 */
  254. case 0x60: /* ILR17 */
  255. case 0x64: /* ILR18 */
  256. case 0x68: /* ILR19 */
  257. case 0x6c: /* ILR20 */
  258. case 0x70: /* ILR21 */
  259. case 0x74: /* ILR22 */
  260. case 0x78: /* ILR23 */
  261. case 0x7c: /* ILR24 */
  262. case 0x80: /* ILR25 */
  263. case 0x84: /* ILR26 */
  264. case 0x88: /* ILR27 */
  265. case 0x8c: /* ILR28 */
  266. case 0x90: /* ILR29 */
  267. case 0x94: /* ILR30 */
  268. case 0x98: /* ILR31 */
  269. i = (offset - 0x1c) >> 2;
  270. bank->priority[i] = (value >> 2) & 0x1f;
  271. bank->sens_edge &= ~(1 << i);
  272. bank->sens_edge |= ((value >> 1) & 1) << i;
  273. bank->fiq &= ~(1 << i);
  274. bank->fiq |= (value & 1) << i;
  275. return;
  276. case 0x9c: /* ISR */
  277. for (i = 0; i < 32; i ++)
  278. if (value & (1 << i)) {
  279. omap_set_intr(s, 32 * bank_no + i, 1);
  280. return;
  281. }
  282. return;
  283. }
  284. OMAP_BAD_REG(addr);
  285. }
  286. static const MemoryRegionOps omap_inth_mem_ops = {
  287. .read = omap_inth_read,
  288. .write = omap_inth_write,
  289. .endianness = DEVICE_NATIVE_ENDIAN,
  290. .valid = {
  291. .min_access_size = 4,
  292. .max_access_size = 4,
  293. },
  294. };
  295. static void omap_inth_reset(DeviceState *dev)
  296. {
  297. struct omap_intr_handler_s *s = FROM_SYSBUS(struct omap_intr_handler_s,
  298. sysbus_from_qdev(dev));
  299. int i;
  300. for (i = 0; i < s->nbanks; ++i){
  301. s->bank[i].irqs = 0x00000000;
  302. s->bank[i].mask = 0xffffffff;
  303. s->bank[i].sens_edge = 0x00000000;
  304. s->bank[i].fiq = 0x00000000;
  305. s->bank[i].inputs = 0x00000000;
  306. s->bank[i].swi = 0x00000000;
  307. memset(s->bank[i].priority, 0, sizeof(s->bank[i].priority));
  308. if (s->level_only)
  309. s->bank[i].sens_edge = 0xffffffff;
  310. }
  311. s->new_agr[0] = ~0;
  312. s->new_agr[1] = ~0;
  313. s->sir_intr[0] = 0;
  314. s->sir_intr[1] = 0;
  315. s->autoidle = 0;
  316. s->mask = ~0;
  317. qemu_set_irq(s->parent_intr[0], 0);
  318. qemu_set_irq(s->parent_intr[1], 0);
  319. }
  320. static int omap_intc_init(SysBusDevice *dev)
  321. {
  322. struct omap_intr_handler_s *s;
  323. s = FROM_SYSBUS(struct omap_intr_handler_s, dev);
  324. if (!s->iclk) {
  325. hw_error("omap-intc: clk not connected\n");
  326. }
  327. s->nbanks = 1;
  328. sysbus_init_irq(dev, &s->parent_intr[0]);
  329. sysbus_init_irq(dev, &s->parent_intr[1]);
  330. qdev_init_gpio_in(&dev->qdev, omap_set_intr, s->nbanks * 32);
  331. memory_region_init_io(&s->mmio, &omap_inth_mem_ops, s,
  332. "omap-intc", s->size);
  333. sysbus_init_mmio_region(dev, &s->mmio);
  334. return 0;
  335. }
  336. static SysBusDeviceInfo omap_intc_info = {
  337. .init = omap_intc_init,
  338. .qdev.name = "omap-intc",
  339. .qdev.size = sizeof(struct omap_intr_handler_s),
  340. .qdev.reset = omap_inth_reset,
  341. .qdev.props = (Property[]) {
  342. DEFINE_PROP_UINT32("size", struct omap_intr_handler_s, size, 0x100),
  343. DEFINE_PROP_PTR("clk", struct omap_intr_handler_s, iclk),
  344. DEFINE_PROP_END_OF_LIST()
  345. }
  346. };
  347. static uint64_t omap2_inth_read(void *opaque, target_phys_addr_t addr,
  348. unsigned size)
  349. {
  350. struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
  351. int offset = addr;
  352. int bank_no, line_no;
  353. struct omap_intr_handler_bank_s *bank = NULL;
  354. if ((offset & 0xf80) == 0x80) {
  355. bank_no = (offset & 0x60) >> 5;
  356. if (bank_no < s->nbanks) {
  357. offset &= ~0x60;
  358. bank = &s->bank[bank_no];
  359. } else {
  360. OMAP_BAD_REG(addr);
  361. return 0;
  362. }
  363. }
  364. switch (offset) {
  365. case 0x00: /* INTC_REVISION */
  366. return s->revision;
  367. case 0x10: /* INTC_SYSCONFIG */
  368. return (s->autoidle >> 2) & 1;
  369. case 0x14: /* INTC_SYSSTATUS */
  370. return 1; /* RESETDONE */
  371. case 0x40: /* INTC_SIR_IRQ */
  372. return s->sir_intr[0];
  373. case 0x44: /* INTC_SIR_FIQ */
  374. return s->sir_intr[1];
  375. case 0x48: /* INTC_CONTROL */
  376. return (!s->mask) << 2; /* GLOBALMASK */
  377. case 0x4c: /* INTC_PROTECTION */
  378. return 0;
  379. case 0x50: /* INTC_IDLE */
  380. return s->autoidle & 3;
  381. /* Per-bank registers */
  382. case 0x80: /* INTC_ITR */
  383. return bank->inputs;
  384. case 0x84: /* INTC_MIR */
  385. return bank->mask;
  386. case 0x88: /* INTC_MIR_CLEAR */
  387. case 0x8c: /* INTC_MIR_SET */
  388. return 0;
  389. case 0x90: /* INTC_ISR_SET */
  390. return bank->swi;
  391. case 0x94: /* INTC_ISR_CLEAR */
  392. return 0;
  393. case 0x98: /* INTC_PENDING_IRQ */
  394. return bank->irqs & ~bank->mask & ~bank->fiq;
  395. case 0x9c: /* INTC_PENDING_FIQ */
  396. return bank->irqs & ~bank->mask & bank->fiq;
  397. /* Per-line registers */
  398. case 0x100 ... 0x300: /* INTC_ILR */
  399. bank_no = (offset - 0x100) >> 7;
  400. if (bank_no > s->nbanks)
  401. break;
  402. bank = &s->bank[bank_no];
  403. line_no = (offset & 0x7f) >> 2;
  404. return (bank->priority[line_no] << 2) |
  405. ((bank->fiq >> line_no) & 1);
  406. }
  407. OMAP_BAD_REG(addr);
  408. return 0;
  409. }
  410. static void omap2_inth_write(void *opaque, target_phys_addr_t addr,
  411. uint64_t value, unsigned size)
  412. {
  413. struct omap_intr_handler_s *s = (struct omap_intr_handler_s *) opaque;
  414. int offset = addr;
  415. int bank_no, line_no;
  416. struct omap_intr_handler_bank_s *bank = NULL;
  417. if ((offset & 0xf80) == 0x80) {
  418. bank_no = (offset & 0x60) >> 5;
  419. if (bank_no < s->nbanks) {
  420. offset &= ~0x60;
  421. bank = &s->bank[bank_no];
  422. } else {
  423. OMAP_BAD_REG(addr);
  424. return;
  425. }
  426. }
  427. switch (offset) {
  428. case 0x10: /* INTC_SYSCONFIG */
  429. s->autoidle &= 4;
  430. s->autoidle |= (value & 1) << 2;
  431. if (value & 2) /* SOFTRESET */
  432. omap_inth_reset(&s->busdev.qdev);
  433. return;
  434. case 0x48: /* INTC_CONTROL */
  435. s->mask = (value & 4) ? 0 : ~0; /* GLOBALMASK */
  436. if (value & 2) { /* NEWFIQAGR */
  437. qemu_set_irq(s->parent_intr[1], 0);
  438. s->new_agr[1] = ~0;
  439. omap_inth_update(s, 1);
  440. }
  441. if (value & 1) { /* NEWIRQAGR */
  442. qemu_set_irq(s->parent_intr[0], 0);
  443. s->new_agr[0] = ~0;
  444. omap_inth_update(s, 0);
  445. }
  446. return;
  447. case 0x4c: /* INTC_PROTECTION */
  448. /* TODO: Make a bitmap (or sizeof(char)map) of access privileges
  449. * for every register, see Chapter 3 and 4 for privileged mode. */
  450. if (value & 1)
  451. fprintf(stderr, "%s: protection mode enable attempt\n",
  452. __FUNCTION__);
  453. return;
  454. case 0x50: /* INTC_IDLE */
  455. s->autoidle &= ~3;
  456. s->autoidle |= value & 3;
  457. return;
  458. /* Per-bank registers */
  459. case 0x84: /* INTC_MIR */
  460. bank->mask = value;
  461. omap_inth_update(s, 0);
  462. omap_inth_update(s, 1);
  463. return;
  464. case 0x88: /* INTC_MIR_CLEAR */
  465. bank->mask &= ~value;
  466. omap_inth_update(s, 0);
  467. omap_inth_update(s, 1);
  468. return;
  469. case 0x8c: /* INTC_MIR_SET */
  470. bank->mask |= value;
  471. return;
  472. case 0x90: /* INTC_ISR_SET */
  473. bank->irqs |= bank->swi |= value;
  474. omap_inth_update(s, 0);
  475. omap_inth_update(s, 1);
  476. return;
  477. case 0x94: /* INTC_ISR_CLEAR */
  478. bank->swi &= ~value;
  479. bank->irqs = bank->swi & bank->inputs;
  480. return;
  481. /* Per-line registers */
  482. case 0x100 ... 0x300: /* INTC_ILR */
  483. bank_no = (offset - 0x100) >> 7;
  484. if (bank_no > s->nbanks)
  485. break;
  486. bank = &s->bank[bank_no];
  487. line_no = (offset & 0x7f) >> 2;
  488. bank->priority[line_no] = (value >> 2) & 0x3f;
  489. bank->fiq &= ~(1 << line_no);
  490. bank->fiq |= (value & 1) << line_no;
  491. return;
  492. case 0x00: /* INTC_REVISION */
  493. case 0x14: /* INTC_SYSSTATUS */
  494. case 0x40: /* INTC_SIR_IRQ */
  495. case 0x44: /* INTC_SIR_FIQ */
  496. case 0x80: /* INTC_ITR */
  497. case 0x98: /* INTC_PENDING_IRQ */
  498. case 0x9c: /* INTC_PENDING_FIQ */
  499. OMAP_RO_REG(addr);
  500. return;
  501. }
  502. OMAP_BAD_REG(addr);
  503. }
  504. static const MemoryRegionOps omap2_inth_mem_ops = {
  505. .read = omap2_inth_read,
  506. .write = omap2_inth_write,
  507. .endianness = DEVICE_NATIVE_ENDIAN,
  508. .valid = {
  509. .min_access_size = 4,
  510. .max_access_size = 4,
  511. },
  512. };
  513. static int omap2_intc_init(SysBusDevice *dev)
  514. {
  515. struct omap_intr_handler_s *s;
  516. s = FROM_SYSBUS(struct omap_intr_handler_s, dev);
  517. if (!s->iclk) {
  518. hw_error("omap2-intc: iclk not connected\n");
  519. }
  520. if (!s->fclk) {
  521. hw_error("omap2-intc: fclk not connected\n");
  522. }
  523. s->level_only = 1;
  524. s->nbanks = 3;
  525. sysbus_init_irq(dev, &s->parent_intr[0]);
  526. sysbus_init_irq(dev, &s->parent_intr[1]);
  527. qdev_init_gpio_in(&dev->qdev, omap_set_intr_noedge, s->nbanks * 32);
  528. memory_region_init_io(&s->mmio, &omap2_inth_mem_ops, s,
  529. "omap2-intc", 0x1000);
  530. sysbus_init_mmio_region(dev, &s->mmio);
  531. return 0;
  532. }
  533. static SysBusDeviceInfo omap2_intc_info = {
  534. .init = omap2_intc_init,
  535. .qdev.name = "omap2-intc",
  536. .qdev.size = sizeof(struct omap_intr_handler_s),
  537. .qdev.reset = omap_inth_reset,
  538. .qdev.props = (Property[]) {
  539. DEFINE_PROP_UINT8("revision", struct omap_intr_handler_s,
  540. revision, 0x21),
  541. DEFINE_PROP_PTR("iclk", struct omap_intr_handler_s, iclk),
  542. DEFINE_PROP_PTR("fclk", struct omap_intr_handler_s, fclk),
  543. DEFINE_PROP_END_OF_LIST()
  544. }
  545. };
  546. static void omap_intc_register_device(void)
  547. {
  548. sysbus_register_withprop(&omap_intc_info);
  549. sysbus_register_withprop(&omap2_intc_info);
  550. }
  551. device_init(omap_intc_register_device)