blob: 00eb3b82bd9520e5d78b7597bfe5bdd580b4b5ba [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Hirokazu Takata3264f972007-08-01 21:09:31 +09002 * linux/arch/m32r/platforms/opsput/setup.c
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
4 * Setup routines for Renesas OPSPUT Board
5 *
Hirokazu Takata316240f2005-07-07 17:59:32 -07006 * Copyright (c) 2002-2005
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * 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
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <linux/irq.h>
16#include <linux/kernel.h>
17#include <linux/init.h>
Russell Kingd052d1b2005-10-29 19:07:23 +010018#include <linux/platform_device.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
20#include <asm/system.h>
21#include <asm/m32r.h>
22#include <asm/io.h>
23
24/*
25 * OPSP Interrupt Control Unit (Level 1)
26 */
27#define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
28
Al Viroc51d9942005-08-23 22:47:22 +010029icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ];
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
31static void disable_opsput_irq(unsigned int irq)
32{
33 unsigned long port, data;
34
35 port = irq2port(irq);
36 data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
37 outl(data, port);
38}
39
40static void enable_opsput_irq(unsigned int irq)
41{
42 unsigned long port, data;
43
44 port = irq2port(irq);
45 data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
46 outl(data, port);
47}
48
Thomas Gleixner883c0cc2011-01-19 18:48:15 +010049static void mask_opsput(struct irq_data *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -070050{
Thomas Gleixner883c0cc2011-01-19 18:48:15 +010051 disable_opsput_irq(data->irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -070052}
53
Thomas Gleixner883c0cc2011-01-19 18:48:15 +010054static void unmask_opsput(struct irq_data *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -070055{
Thomas Gleixner883c0cc2011-01-19 18:48:15 +010056 enable_opsput_irq(data->irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -070057}
58
Thomas Gleixner883c0cc2011-01-19 18:48:15 +010059static void shutdown_opsput(struct irq_data *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -070060{
61 unsigned long port;
62
Thomas Gleixner883c0cc2011-01-19 18:48:15 +010063 port = irq2port(data->irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -070064 outl(M32R_ICUCR_ILEVEL7, port);
65}
66
Thomas Gleixner189e91f2009-06-16 15:33:26 -070067static struct irq_chip opsput_irq_type =
Linus Torvalds1da177e2005-04-16 15:20:36 -070068{
Thomas Gleixner883c0cc2011-01-19 18:48:15 +010069 .name = "OPSPUT-IRQ",
70 .irq_shutdown = shutdown_opsput,
71 .irq_mask = mask_opsput,
72 .irq_unmask = unmask_opsput,
Linus Torvalds1da177e2005-04-16 15:20:36 -070073};
74
75/*
76 * Interrupt Control Unit of PLD on OPSPUT (Level 2)
77 */
78#define irq2pldirq(x) ((x) - OPSPUT_PLD_IRQ_BASE)
79#define pldirq2port(x) (unsigned long)((int)PLD_ICUCR1 + \
80 (((x) - 1) * sizeof(unsigned short)))
81
82typedef struct {
83 unsigned short icucr; /* ICU Control Register */
84} pld_icu_data_t;
85
86static pld_icu_data_t pld_icu_data[OPSPUT_NUM_PLD_IRQ];
87
88static void disable_opsput_pld_irq(unsigned int irq)
89{
90 unsigned long port, data;
91 unsigned int pldirq;
92
93 pldirq = irq2pldirq(irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -070094 port = pldirq2port(pldirq);
95 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
96 outw(data, port);
97}
98
99static void enable_opsput_pld_irq(unsigned int irq)
100{
101 unsigned long port, data;
102 unsigned int pldirq;
103
104 pldirq = irq2pldirq(irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105 port = pldirq2port(pldirq);
106 data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
107 outw(data, port);
108}
109
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100110static void mask_opsput_pld(struct irq_data *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111{
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100112 disable_opsput_pld_irq(data->irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113}
114
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100115static void unmask_opsput_pld(struct irq_data *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116{
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100117 enable_opsput_pld_irq(data->irq);
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100118 enable_opsput_irq(M32R_IRQ_INT1);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119}
120
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100121static void shutdown_opsput_pld(struct irq_data *data)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122{
123 unsigned long port;
124 unsigned int pldirq;
125
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100126 pldirq = irq2pldirq(data->irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127 port = pldirq2port(pldirq);
128 outw(PLD_ICUCR_ILEVEL7, port);
129}
130
Thomas Gleixner189e91f2009-06-16 15:33:26 -0700131static struct irq_chip opsput_pld_irq_type =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132{
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100133 .name = "OPSPUT-PLD-IRQ",
134 .irq_shutdown = shutdown_opsput_pld,
135 .irq_mask = mask_opsput_pld,
136 .irq_unmask = unmask_opsput_pld,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137};
138
139/*
140 * Interrupt Control Unit of PLD on OPSPUT-LAN (Level 2)
141 */
142#define irq2lanpldirq(x) ((x) - OPSPUT_LAN_PLD_IRQ_BASE)
143#define lanpldirq2port(x) (unsigned long)((int)OPSPUT_LAN_ICUCR1 + \
144 (((x) - 1) * sizeof(unsigned short)))
145
146static pld_icu_data_t lanpld_icu_data[OPSPUT_NUM_LAN_PLD_IRQ];
147
148static void disable_opsput_lanpld_irq(unsigned int irq)
149{
150 unsigned long port, data;
151 unsigned int pldirq;
152
153 pldirq = irq2lanpldirq(irq);
154 port = lanpldirq2port(pldirq);
155 data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
156 outw(data, port);
157}
158
159static void enable_opsput_lanpld_irq(unsigned int irq)
160{
161 unsigned long port, data;
162 unsigned int pldirq;
163
164 pldirq = irq2lanpldirq(irq);
165 port = lanpldirq2port(pldirq);
166 data = lanpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
167 outw(data, port);
168}
169
170static void mask_and_ack_opsput_lanpld(unsigned int irq)
171{
172 disable_opsput_lanpld_irq(irq);
173}
174
175static void end_opsput_lanpld_irq(unsigned int irq)
176{
177 enable_opsput_lanpld_irq(irq);
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100178 enable_opsput_irq(M32R_IRQ_INT0);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700179}
180
181static unsigned int startup_opsput_lanpld_irq(unsigned int irq)
182{
183 enable_opsput_lanpld_irq(irq);
184 return (0);
185}
186
187static void shutdown_opsput_lanpld_irq(unsigned int irq)
188{
189 unsigned long port;
190 unsigned int pldirq;
191
192 pldirq = irq2lanpldirq(irq);
193 port = lanpldirq2port(pldirq);
194 outw(PLD_ICUCR_ILEVEL7, port);
195}
196
Thomas Gleixner189e91f2009-06-16 15:33:26 -0700197static struct irq_chip opsput_lanpld_irq_type =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198{
Thomas Gleixnerd1ea13c2010-09-23 18:40:07 +0200199 .name = "OPSPUT-PLD-LAN-IRQ",
Hirokazu Takatad93f7de2006-12-08 02:35:57 -0800200 .startup = startup_opsput_lanpld_irq,
201 .shutdown = shutdown_opsput_lanpld_irq,
202 .enable = enable_opsput_lanpld_irq,
203 .disable = disable_opsput_lanpld_irq,
204 .ack = mask_and_ack_opsput_lanpld,
205 .end = end_opsput_lanpld_irq
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206};
207
208/*
209 * Interrupt Control Unit of PLD on OPSPUT-LCD (Level 2)
210 */
211#define irq2lcdpldirq(x) ((x) - OPSPUT_LCD_PLD_IRQ_BASE)
212#define lcdpldirq2port(x) (unsigned long)((int)OPSPUT_LCD_ICUCR1 + \
213 (((x) - 1) * sizeof(unsigned short)))
214
215static pld_icu_data_t lcdpld_icu_data[OPSPUT_NUM_LCD_PLD_IRQ];
216
217static void disable_opsput_lcdpld_irq(unsigned int irq)
218{
219 unsigned long port, data;
220 unsigned int pldirq;
221
222 pldirq = irq2lcdpldirq(irq);
223 port = lcdpldirq2port(pldirq);
224 data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7;
225 outw(data, port);
226}
227
228static void enable_opsput_lcdpld_irq(unsigned int irq)
229{
230 unsigned long port, data;
231 unsigned int pldirq;
232
233 pldirq = irq2lcdpldirq(irq);
234 port = lcdpldirq2port(pldirq);
235 data = lcdpld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6;
236 outw(data, port);
237}
238
239static void mask_and_ack_opsput_lcdpld(unsigned int irq)
240{
241 disable_opsput_lcdpld_irq(irq);
242}
243
244static void end_opsput_lcdpld_irq(unsigned int irq)
245{
246 enable_opsput_lcdpld_irq(irq);
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100247 enable_opsput_irq(M32R_IRQ_INT2);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248}
249
250static unsigned int startup_opsput_lcdpld_irq(unsigned int irq)
251{
252 enable_opsput_lcdpld_irq(irq);
253 return (0);
254}
255
256static void shutdown_opsput_lcdpld_irq(unsigned int irq)
257{
258 unsigned long port;
259 unsigned int pldirq;
260
261 pldirq = irq2lcdpldirq(irq);
262 port = lcdpldirq2port(pldirq);
263 outw(PLD_ICUCR_ILEVEL7, port);
264}
265
Thomas Gleixner189e91f2009-06-16 15:33:26 -0700266static struct irq_chip opsput_lcdpld_irq_type =
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267{
268 "OPSPUT-PLD-LCD-IRQ",
269 startup_opsput_lcdpld_irq,
270 shutdown_opsput_lcdpld_irq,
271 enable_opsput_lcdpld_irq,
272 disable_opsput_lcdpld_irq,
273 mask_and_ack_opsput_lcdpld,
274 end_opsput_lcdpld_irq
275};
276
277void __init init_IRQ(void)
278{
279#if defined(CONFIG_SMC91X)
280 /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/
Thomas Gleixner863018a2010-09-22 19:13:16 +0200281 set_irq_chip(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282 lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */
283 disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN);
284#endif /* CONFIG_SMC91X */
285
286 /* MFT2 : system timer */
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100287 set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type,
288 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
290 disable_opsput_irq(M32R_IRQ_MFT2);
291
292 /* SIO0 : receive */
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100293 set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type,
294 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700295 icu_data[M32R_IRQ_SIO0_R].icucr = 0;
296 disable_opsput_irq(M32R_IRQ_SIO0_R);
297
298 /* SIO0 : send */
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100299 set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type,
300 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700301 icu_data[M32R_IRQ_SIO0_S].icucr = 0;
302 disable_opsput_irq(M32R_IRQ_SIO0_S);
303
304 /* SIO1 : receive */
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100305 set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type,
306 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700307 icu_data[M32R_IRQ_SIO1_R].icucr = 0;
308 disable_opsput_irq(M32R_IRQ_SIO1_R);
309
310 /* SIO1 : send */
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100311 set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type,
312 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700313 icu_data[M32R_IRQ_SIO1_S].icucr = 0;
314 disable_opsput_irq(M32R_IRQ_SIO1_S);
315
316 /* DMA1 : */
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100317 set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type,
318 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700319 icu_data[M32R_IRQ_DMA1].icucr = 0;
320 disable_opsput_irq(M32R_IRQ_DMA1);
321
322#ifdef CONFIG_SERIAL_M32R_PLDSIO
323 /* INT#1: SIO0 Receive on PLD */
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100324 set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type,
325 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700326 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
327 disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV);
328
329 /* INT#1: SIO0 Send on PLD */
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100330 set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type,
331 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700332 pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03;
333 disable_opsput_pld_irq(PLD_IRQ_SIO0_SND);
334#endif /* CONFIG_SERIAL_M32R_PLDSIO */
335
Linus Torvalds1da177e2005-04-16 15:20:36 -0700336 /* INT#1: CFC IREQ on PLD */
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100337 set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type,
338 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700339 pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */
340 disable_opsput_pld_irq(PLD_IRQ_CFIREQ);
341
342 /* INT#1: CFC Insert on PLD */
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100343 set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type,
344 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700345 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */
346 disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT);
347
348 /* INT#1: CFC Eject on PLD */
Thomas Gleixner22cbc932011-01-19 18:55:09 +0100349 set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type,
350 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351 pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */
352 disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700353
354 /*
355 * INT0# is used for LAN, DIO
356 * We enable it here.
357 */
358 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
359 enable_opsput_irq(M32R_IRQ_INT0);
360
361 /*
362 * INT1# is used for UART, MMC, CF Controller in FPGA.
363 * We enable it here.
364 */
365 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
366 enable_opsput_irq(M32R_IRQ_INT1);
367
368#if defined(CONFIG_USB)
369 outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */
370
Thomas Gleixner863018a2010-09-22 19:13:16 +0200371 set_irq_chip(OPSPUT_LCD_IRQ_USB_INT1, &opsput_lcdpld_irq_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700372 lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */
373 disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1);
374#endif
375 /*
376 * INT2# is used for BAT, USB, AUDIO
377 * We enable it here.
378 */
379 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01;
380 enable_opsput_irq(M32R_IRQ_INT2);
381
Hirokazu Takata316240f2005-07-07 17:59:32 -0700382#if defined(CONFIG_VIDEO_M32R_AR)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700383 /*
384 * INT3# is used for AR
385 */
Thomas Gleixner883c0cc2011-01-19 18:48:15 +0100386 set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type,
387 handle_level_irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700388 icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
389 disable_opsput_irq(M32R_IRQ_INT3);
Hirokazu Takata316240f2005-07-07 17:59:32 -0700390#endif /* CONFIG_VIDEO_M32R_AR */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700391}
392
Hirokazu Takata316240f2005-07-07 17:59:32 -0700393#if defined(CONFIG_SMC91X)
394
Linus Torvalds1da177e2005-04-16 15:20:36 -0700395#define LAN_IOSTART 0x300
396#define LAN_IOEND 0x320
397static struct resource smc91x_resources[] = {
398 [0] = {
399 .start = (LAN_IOSTART),
400 .end = (LAN_IOEND),
401 .flags = IORESOURCE_MEM,
402 },
403 [1] = {
404 .start = OPSPUT_LAN_IRQ_LAN,
405 .end = OPSPUT_LAN_IRQ_LAN,
406 .flags = IORESOURCE_IRQ,
407 }
408};
409
410static struct platform_device smc91x_device = {
411 .name = "smc91x",
412 .id = 0,
413 .num_resources = ARRAY_SIZE(smc91x_resources),
414 .resource = smc91x_resources,
415};
Hirokazu Takata316240f2005-07-07 17:59:32 -0700416#endif
417
418#if defined(CONFIG_FB_S1D13XXX)
419
420#include <video/s1d13xxxfb.h>
421#include <asm/s1d13806.h>
422
423static struct s1d13xxxfb_pdata s1d13xxxfb_data = {
424 .initregs = s1d13xxxfb_initregs,
425 .initregssize = ARRAY_SIZE(s1d13xxxfb_initregs),
426 .platform_init_video = NULL,
427#ifdef CONFIG_PM
428 .platform_suspend_video = NULL,
429 .platform_resume_video = NULL,
430#endif
431};
432
433static struct resource s1d13xxxfb_resources[] = {
434 [0] = {
435 .start = 0x10600000UL,
436 .end = 0x1073FFFFUL,
437 .flags = IORESOURCE_MEM,
438 },
439 [1] = {
440 .start = 0x10400000UL,
441 .end = 0x104001FFUL,
442 .flags = IORESOURCE_MEM,
443 }
444};
445
446static struct platform_device s1d13xxxfb_device = {
447 .name = S1D_DEVICENAME,
448 .id = 0,
449 .dev = {
450 .platform_data = &s1d13xxxfb_data,
451 },
452 .num_resources = ARRAY_SIZE(s1d13xxxfb_resources),
453 .resource = s1d13xxxfb_resources,
454};
455#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456
457static int __init platform_init(void)
458{
Hirokazu Takata316240f2005-07-07 17:59:32 -0700459#if defined(CONFIG_SMC91X)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700460 platform_device_register(&smc91x_device);
Hirokazu Takata316240f2005-07-07 17:59:32 -0700461#endif
462#if defined(CONFIG_FB_S1D13XXX)
463 platform_device_register(&s1d13xxxfb_device);
464#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700465 return 0;
466}
467arch_initcall(platform_init);