setup_m32700ut.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /*
  2. * linux/arch/m32r/kernel/setup_m32700ut.c
  3. *
  4. * Setup routines for Renesas M32700UT Board
  5. *
  6. * Copyright (c) 2002-2005 Hiroyuki Kondo, Hirokazu Takata,
  7. * Hitoshi Yamamoto, Takeo Takahashi
  8. *
  9. * This file is subject to the terms and conditions of the GNU General
  10. * Public License. See the file "COPYING" in the main directory of this
  11. * archive for more details.
  12. */
  13. #include <linux/config.h>
  14. #include <linux/irq.h>
  15. #include <linux/kernel.h>
  16. #include <linux/init.h>
  17. #include <linux/device.h>
  18. #include <asm/system.h>
  19. #include <asm/m32r.h>
  20. #include <asm/io.h>
  21. /*
  22. * M32700 Interrupt Control Unit (Level 1)
  23. */
  24. #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
  25. #ifndef CONFIG_SMP
  26. typedef struct {
  27. unsigned long icucr; /* ICU Control Register */
  28. } icu_data_t;
  29. static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
  30. #else
  31. icu_data_t icu_data[M32700UT_NUM_CPU_IRQ];
  32. #endif /* CONFIG_SMP */
  33. static void disable_m32700ut_irq(unsigned int irq)
  34. {
  35. unsigned long port, data;
  36. port = irq2port(irq);
  37. data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
  38. outl(data, port);
  39. }
  40. static void enable_m32700ut_irq(unsigned int irq)
  41. {
  42. unsigned long port, data;
  43. port = irq2port(irq);
  44. data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
  45. outl(data, port);
  46. }
  47. static void mask_and_ack_m32700ut(unsigned int irq)
  48. {
  49. disable_m32700ut_irq(irq);
  50. }
  51. static void end_m32700ut_irq(unsigned int irq)
  52. {
  53. enable_m32700ut_irq(irq);
  54. }
  55. static unsigned int startup_m32700ut_irq(unsigned int irq)
  56. {
  57. enable_m32700ut_irq(irq);
  58. return (0);
  59. }
  60. static void shutdown_m32700ut_irq(unsigned int irq)
  61. {
  62. unsigned long port;
  63. port = irq2port(irq);
  64. outl(M32R_ICUCR_ILEVEL7, port);
  65. }
  66. static struct hw_interrupt_type m32700ut_irq_type =
  67. {
  68. .typename = "M32700UT-IRQ",
  69. .startup = startup_m32700ut_irq,
  70. .shutdown = shutdown_m32700ut_irq,
  71. .enable = enable_m32700ut_irq,
  72. .disable = disable_m32700ut_irq,
  73. .ack = mask_and_ack_m32700ut,
  74. .end = end_m32700ut_irq
  75. };
  76. /*
  77. * Interrupt Control Unit of PLD on M32700UT (Level 2)
  78. */
  79. #define irq2pldirq(x) ((x) - M32700UT_PLD_IRQ_BASE)
  80. #define pldirq2port(x) (unsigned long)((int)PLD_ICUCR1 + \
  81. (((x) - 1) * sizeof(unsigned short)))
  82. typedef struct {
  83. unsigned short icucr; /* ICU Control Register */
  84. } pld_icu_data_t;
  85. static pld_icu_data_t pld_icu_data[M32700UT_NUM_PLD_IRQ];
  86. static void disable_m32700ut_pld_irq(unsigned int irq)
  87. {
  88. unsigned long port, data;
  89. unsigned int pldirq;
  90. pldirq = irq2pldirq(irq);
  91. // disable_m32700ut_irq(M32R_IRQ_INT1);
  92. port = pldirq2port(pldirq);
  93. data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
  94. outw(data, port);
  95. }
  96. static void enable_m32700ut_pld_irq(unsigned int irq)
  97. {
  98. unsigned long port, data;
  99. unsigned int pldirq;
  100. pldirq = irq2pldirq(irq);
  101. // enable_m32700ut_irq(M32R_IRQ_INT1);
  102. port = pldirq2port(pldirq);
  103. data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
  104. outw(data, port);
  105. }
  106. static void mask_and_ack_m32700ut_pld(unsigned int irq)
  107. {
  108. disable_m32700ut_pld_irq(irq);
  109. // mask_and_ack_m32700ut(M32R_IRQ_INT1);
  110. }
  111. static void end_m32700ut_pld_irq(unsigned int irq)
  112. {
  113. enable_m32700ut_pld_irq(irq);
  114. end_m32700ut_irq(M32R_IRQ_INT1);
  115. }
  116. static unsigned int startup_m32700ut_pld_irq(unsigned int irq)
  117. {
  118. enable_m32700ut_pld_irq(irq);
  119. return (0);
  120. }
  121. static void shutdown_m32700ut_pld_irq(unsigned int irq)
  122. {
  123. unsigned long port;
  124. unsigned int pldirq;
  125. pldirq = irq2pldirq(irq);
  126. // shutdown_m32700ut_irq(M32R_IRQ_INT1);
  127. port = pldirq2port(pldirq);
  128. outw(PLD_ICUCR_ILEVEL7, port);
  129. }
  130. static struct hw_interrupt_type m32700ut_pld_irq_type =
  131. {
  132. .typename = "M32700UT-PLD-IRQ",
  133. .startup = startup_m32700ut_pld_irq,
  134. .shutdown = shutdown_m32700ut_pld_irq,
  135. .enable = enable_m32700ut_pld_irq,
  136. .disable = disable_m32700ut_pld_irq,
  137. .ack = mask_and_ack_m32700ut_pld,
  138. .end = end_m32700ut_pld_irq
  139. };
  140. /*
  141. * Interrupt Control Unit of PLD on M32700UT-LAN (Level 2)
  142. */
  143. #define irq2lanpldirq(x) ((x) - M32700UT_LAN_PLD_IRQ_BASE)
  144. #define lanpldirq2port(x) (unsigned long)((int)M32700UT_LAN_ICUCR1 + \
  145. (((x) - 1) * sizeof(unsigned short)))
  146. static pld_icu_data_t lanpld_icu_data[M32700UT_NUM_LAN_PLD_IRQ];
  147. static void disable_m32700ut_lanpld_irq(unsigned int irq)
  148. {
  149. unsigned long port, data;
  150. unsigned int pldirq;
  151. pldirq = irq2lanpldirq(irq);
  152. port = lanpldirq2port(pldirq);
  153. data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
  154. outw(data, port);
  155. }
  156. static void enable_m32700ut_lanpld_irq(unsigned int irq)
  157. {
  158. unsigned long port, data;
  159. unsigned int pldirq;
  160. pldirq = irq2lanpldirq(irq);
  161. port = lanpldirq2port(pldirq);
  162. data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
  163. outw(data, port);
  164. }
  165. static void mask_and_ack_m32700ut_lanpld(unsigned int irq)
  166. {
  167. disable_m32700ut_lanpld_irq(irq);
  168. }
  169. static void end_m32700ut_lanpld_irq(unsigned int irq)
  170. {
  171. enable_m32700ut_lanpld_irq(irq);
  172. end_m32700ut_irq(M32R_IRQ_INT0);
  173. }
  174. static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq)
  175. {
  176. enable_m32700ut_lanpld_irq(irq);
  177. return (0);
  178. }
  179. static void shutdown_m32700ut_lanpld_irq(unsigned int irq)
  180. {
  181. unsigned long port;
  182. unsigned int pldirq;
  183. pldirq = irq2lanpldirq(irq);
  184. port = lanpldirq2port(pldirq);
  185. outw(PLD_ICUCR_ILEVEL7, port);
  186. }
  187. static struct hw_interrupt_type m32700ut_lanpld_irq_type =
  188. {
  189. .typename = "M32700UT-PLD-LAN-IRQ",
  190. .startup = startup_m32700ut_lanpld_irq,
  191. .shutdown = shutdown_m32700ut_lanpld_irq,
  192. .enable = enable_m32700ut_lanpld_irq,
  193. .disable = disable_m32700ut_lanpld_irq,
  194. .ack = mask_and_ack_m32700ut_lanpld,
  195. .end = end_m32700ut_lanpld_irq
  196. };
  197. /*
  198. * Interrupt Control Unit of PLD on M32700UT-LCD (Level 2)
  199. */
  200. #define irq2lcdpldirq(x) ((x) - M32700UT_LCD_PLD_IRQ_BASE)
  201. #define lcdpldirq2port(x) (unsigned long)((int)M32700UT_LCD_ICUCR1 + \
  202. (((x) - 1) * sizeof(unsigned short)))
  203. static pld_icu_data_t lcdpld_icu_data[M32700UT_NUM_LCD_PLD_IRQ];
  204. static void disable_m32700ut_lcdpld_irq(unsigned int irq)
  205. {
  206. unsigned long port, data;
  207. unsigned int pldirq;
  208. pldirq = irq2lcdpldirq(irq);
  209. port = lcdpldirq2port(pldirq);
  210. data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
  211. outw(data, port);
  212. }
  213. static void enable_m32700ut_lcdpld_irq(unsigned int irq)
  214. {
  215. unsigned long port, data;
  216. unsigned int pldirq;
  217. pldirq = irq2lcdpldirq(irq);
  218. port = lcdpldirq2port(pldirq);
  219. data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
  220. outw(data, port);
  221. }
  222. static void mask_and_ack_m32700ut_lcdpld(unsigned int irq)
  223. {
  224. disable_m32700ut_lcdpld_irq(irq);
  225. }
  226. static void end_m32700ut_lcdpld_irq(unsigned int irq)
  227. {
  228. enable_m32700ut_lcdpld_irq(irq);
  229. end_m32700ut_irq(M32R_IRQ_INT2);
  230. }
  231. static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq)
  232. {
  233. enable_m32700ut_lcdpld_irq(irq);
  234. return (0);
  235. }
  236. static void shutdown_m32700ut_lcdpld_irq(unsigned int irq)
  237. {
  238. unsigned long port;
  239. unsigned int pldirq;
  240. pldirq = irq2lcdpldirq(irq);
  241. port = lcdpldirq2port(pldirq);
  242. outw(PLD_ICUCR_ILEVEL7, port);
  243. }
  244. static struct hw_interrupt_type m32700ut_lcdpld_irq_type =
  245. {
  246. .typename = "M32700UT-PLD-LCD-IRQ",
  247. .startup = startup_m32700ut_lcdpld_irq,
  248. .shutdown = shutdown_m32700ut_lcdpld_irq,
  249. .enable = enable_m32700ut_lcdpld_irq,
  250. .disable = disable_m32700ut_lcdpld_irq,
  251. .ack = mask_and_ack_m32700ut_lcdpld,
  252. .end = end_m32700ut_lcdpld_irq
  253. };
  254. void __init init_IRQ(void)
  255. {
  256. #if defined(CONFIG_SMC91X)
  257. /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/
  258. irq_desc[M32700UT_LAN_IRQ_LAN].status = IRQ_DISABLED;
  259. irq_desc[M32700UT_LAN_IRQ_LAN].handler = &m32700ut_lanpld_irq_type;
  260. irq_desc[M32700UT_LAN_IRQ_LAN].action = 0;
  261. irq_desc[M32700UT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */
  262. lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
  263. disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN);
  264. #endif /* CONFIG_SMC91X */
  265. /* MFT2 : system timer */
  266. irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
  267. irq_desc[M32R_IRQ_MFT2].handler = &m32700ut_irq_type;
  268. irq_desc[M32R_IRQ_MFT2].action = 0;
  269. irq_desc[M32R_IRQ_MFT2].depth = 1;
  270. icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
  271. disable_m32700ut_irq(M32R_IRQ_MFT2);
  272. /* SIO0 : receive */
  273. irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
  274. irq_desc[M32R_IRQ_SIO0_R].handler = &m32700ut_irq_type;
  275. irq_desc[M32R_IRQ_SIO0_R].action = 0;
  276. irq_desc[M32R_IRQ_SIO0_R].depth = 1;
  277. icu_data[M32R_IRQ_SIO0_R].icucr = 0;
  278. disable_m32700ut_irq(M32R_IRQ_SIO0_R);
  279. /* SIO0 : send */
  280. irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
  281. irq_desc[M32R_IRQ_SIO0_S].handler = &m32700ut_irq_type;
  282. irq_desc[M32R_IRQ_SIO0_S].action = 0;
  283. irq_desc[M32R_IRQ_SIO0_S].depth = 1;
  284. icu_data[M32R_IRQ_SIO0_S].icucr = 0;
  285. disable_m32700ut_irq(M32R_IRQ_SIO0_S);
  286. /* SIO1 : receive */
  287. irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
  288. irq_desc[M32R_IRQ_SIO1_R].handler = &m32700ut_irq_type;
  289. irq_desc[M32R_IRQ_SIO1_R].action = 0;
  290. irq_desc[M32R_IRQ_SIO1_R].depth = 1;
  291. icu_data[M32R_IRQ_SIO1_R].icucr = 0;
  292. disable_m32700ut_irq(M32R_IRQ_SIO1_R);
  293. /* SIO1 : send */
  294. irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
  295. irq_desc[M32R_IRQ_SIO1_S].handler = &m32700ut_irq_type;
  296. irq_desc[M32R_IRQ_SIO1_S].action = 0;
  297. irq_desc[M32R_IRQ_SIO1_S].depth = 1;
  298. icu_data[M32R_IRQ_SIO1_S].icucr = 0;
  299. disable_m32700ut_irq(M32R_IRQ_SIO1_S);
  300. /* DMA1 : */
  301. irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED;
  302. irq_desc[M32R_IRQ_DMA1].handler = &m32700ut_irq_type;
  303. irq_desc[M32R_IRQ_DMA1].action = 0;
  304. irq_desc[M32R_IRQ_DMA1].depth = 1;
  305. icu_data[M32R_IRQ_DMA1].icucr = 0;
  306. disable_m32700ut_irq(M32R_IRQ_DMA1);
  307. #ifdef CONFIG_SERIAL_M32R_PLDSIO
  308. /* INT#1: SIO0 Receive on PLD */
  309. irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED;
  310. irq_desc[PLD_IRQ_SIO0_RCV].handler = &m32700ut_pld_irq_type;
  311. irq_desc[PLD_IRQ_SIO0_RCV].action = 0;
  312. irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */
  313. pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
  314. disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV);
  315. /* INT#1: SIO0 Send on PLD */
  316. irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED;
  317. irq_desc[PLD_IRQ_SIO0_SND].handler = &m32700ut_pld_irq_type;
  318. irq_desc[PLD_IRQ_SIO0_SND].action = 0;
  319. irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */
  320. pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
  321. disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND);
  322. #endif /* CONFIG_SERIAL_M32R_PLDSIO */
  323. /* INT#1: CFC IREQ on PLD */
  324. irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED;
  325. irq_desc[PLD_IRQ_CFIREQ].handler = &m32700ut_pld_irq_type;
  326. irq_desc[PLD_IRQ_CFIREQ].action = 0;
  327. irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */
  328. pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
  329. disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ);
  330. /* INT#1: CFC Insert on PLD */
  331. irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED;
  332. irq_desc[PLD_IRQ_CFC_INSERT].handler = &m32700ut_pld_irq_type;
  333. irq_desc[PLD_IRQ_CFC_INSERT].action = 0;
  334. irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */
  335. pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
  336. disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT);
  337. /* INT#1: CFC Eject on PLD */
  338. irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED;
  339. irq_desc[PLD_IRQ_CFC_EJECT].handler = &m32700ut_pld_irq_type;
  340. irq_desc[PLD_IRQ_CFC_EJECT].action = 0;
  341. irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */
  342. pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
  343. disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT);
  344. /*
  345. * INT0# is used for LAN, DIO
  346. * We enable it here.
  347. */
  348. icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
  349. enable_m32700ut_irq(M32R_IRQ_INT0);
  350. /*
  351. * INT1# is used for UART, MMC, CF Controller in FPGA.
  352. * We enable it here.
  353. */
  354. icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
  355. enable_m32700ut_irq(M32R_IRQ_INT1);
  356. #if defined(CONFIG_USB)
  357. outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
  358. irq_desc[M32700UT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED;
  359. irq_desc[M32700UT_LCD_IRQ_USB_INT1].handler = &m32700ut_lcdpld_irq_type;
  360. irq_desc[M32700UT_LCD_IRQ_USB_INT1].action = 0;
  361. irq_desc[M32700UT_LCD_IRQ_USB_INT1].depth = 1;
  362. lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
  363. disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1);
  364. #endif
  365. /*
  366. * INT2# is used for BAT, USB, AUDIO
  367. * We enable it here.
  368. */
  369. icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
  370. enable_m32700ut_irq(M32R_IRQ_INT2);
  371. #if defined(CONFIG_VIDEO_M32R_AR)
  372. /*
  373. * INT3# is used for AR
  374. */
  375. irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED;
  376. irq_desc[M32R_IRQ_INT3].handler = &m32700ut_irq_type;
  377. irq_desc[M32R_IRQ_INT3].action = 0;
  378. irq_desc[M32R_IRQ_INT3].depth = 1;
  379. icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
  380. disable_m32700ut_irq(M32R_IRQ_INT3);
  381. #endif /* CONFIG_VIDEO_M32R_AR */
  382. }
  383. #if defined(CONFIG_SMC91X)
  384. #define LAN_IOSTART 0x300
  385. #define LAN_IOEND 0x320
  386. static struct resource smc91x_resources[] = {
  387. [0] = {
  388. .start = (LAN_IOSTART),
  389. .end = (LAN_IOEND),
  390. .flags = IORESOURCE_MEM,
  391. },
  392. [1] = {
  393. .start = M32700UT_LAN_IRQ_LAN,
  394. .end = M32700UT_LAN_IRQ_LAN,
  395. .flags = IORESOURCE_IRQ,
  396. }
  397. };
  398. static struct platform_device smc91x_device = {
  399. .name = "smc91x",
  400. .id = 0,
  401. .num_resources = ARRAY_SIZE(smc91x_resources),
  402. .resource = smc91x_resources,
  403. };
  404. #endif
  405. #if defined(CONFIG_FB_S1D13XXX)
  406. #include <video/s1d13xxxfb.h>
  407. #include <asm/s1d13806.h>
  408. static struct s1d13xxxfb_pdata s1d13xxxfb_data = {
  409. .initregs = s1d13xxxfb_initregs,
  410. .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs),
  411. .platform_init_video = NULL,
  412. #ifdef CONFIG_PM
  413. .platform_suspend_video = NULL,
  414. .platform_resume_video = NULL,
  415. #endif
  416. };
  417. static struct resource s1d13xxxfb_resources[] = {
  418. [0] = {
  419. .start = 0x10600000UL,
  420. .end = 0x1073FFFFUL,
  421. .flags = IORESOURCE_MEM,
  422. },
  423. [1] = {
  424. .start = 0x10400000UL,
  425. .end = 0x104001FFUL,
  426. .flags = IORESOURCE_MEM,
  427. }
  428. };
  429. static struct platform_device s1d13xxxfb_device = {
  430. .name = S1D_DEVICENAME,
  431. .id = 0,
  432. .dev = {
  433. .platform_data = &s1d13xxxfb_data,
  434. },
  435. .num_resources = ARRAY_SIZE(s1d13xxxfb_resources),
  436. .resource = s1d13xxxfb_resources,
  437. };
  438. #endif
  439. static int __init platform_init(void)
  440. {
  441. #if defined(CONFIG_SMC91X)
  442. platform_device_register(&smc91x_device);
  443. #endif
  444. #if defined(CONFIG_FB_S1D13XXX)
  445. platform_device_register(&s1d13xxxfb_device);
  446. #endif
  447. return 0;
  448. }
  449. arch_initcall(platform_init);