setup_m32700ut.c 14 KB

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