setup_opsput.c 14 KB

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