ColdFire: Modules header files cleanup
[oweals/u-boot.git] / cpu / mcf52x2 / cpu_init.c
1 /*
2  * (C) Copyright 2003
3  * Josef Baumgartner <josef.baumgartner@telex.de>
4  *
5  * MCF5282 additionals
6  * (C) Copyright 2005
7  * BuS Elektronik GmbH & Co. KG <esw@bus-elektronik.de>
8  *
9  * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
10  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
11  * Hayden Fraser (Hayden.Fraser@freescale.com)
12  *
13  * MCF5275 additions
14  * Copyright (C) 2008 Arthur Shipkowski (art@videon-central.com)
15  *
16  * See file CREDITS for list of people who contributed to this
17  * project.
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License as
21  * published by the Free Software Foundation; either version 2 of
22  * the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program; if not, write to the Free Software
31  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32  * MA 02111-1307 USA
33  */
34
35 #include <common.h>
36 #include <watchdog.h>
37 #include <asm/immap.h>
38
39 #ifndef CONFIG_M5272
40 /* Only 5272 Flexbus chipselect is different from the rest */
41 void init_fbcs(void)
42 {
43         volatile fbcs_t *fbcs = (fbcs_t *) (MMAP_FBCS);
44
45 #if (defined(CONFIG_SYS_CS0_BASE) && defined(CONFIG_SYS_CS0_MASK) \
46      && defined(CONFIG_SYS_CS0_CTRL))
47         fbcs->csar0 = CONFIG_SYS_CS0_BASE;
48         fbcs->cscr0 = CONFIG_SYS_CS0_CTRL;
49         fbcs->csmr0 = CONFIG_SYS_CS0_MASK;
50 #else
51 #warning "Chip Select 0 are not initialized/used"
52 #endif
53 #if (defined(CONFIG_SYS_CS1_BASE) && defined(CONFIG_SYS_CS1_MASK) \
54      && defined(CONFIG_SYS_CS1_CTRL))
55         fbcs->csar1 = CONFIG_SYS_CS1_BASE;
56         fbcs->cscr1 = CONFIG_SYS_CS1_CTRL;
57         fbcs->csmr1 = CONFIG_SYS_CS1_MASK;
58 #endif
59 #if (defined(CONFIG_SYS_CS2_BASE) && defined(CONFIG_SYS_CS2_MASK) \
60      && defined(CONFIG_SYS_CS2_CTRL))
61         fbcs->csar2 = CONFIG_SYS_CS2_BASE;
62         fbcs->cscr2 = CONFIG_SYS_CS2_CTRL;
63         fbcs->csmr2 = CONFIG_SYS_CS2_MASK;
64 #endif
65 #if (defined(CONFIG_SYS_CS3_BASE) && defined(CONFIG_SYS_CS3_MASK) \
66      && defined(CONFIG_SYS_CS3_CTRL))
67         fbcs->csar3 = CONFIG_SYS_CS3_BASE;
68         fbcs->cscr3 = CONFIG_SYS_CS3_CTRL;
69         fbcs->csmr3 = CONFIG_SYS_CS3_MASK;
70 #endif
71 #if (defined(CONFIG_SYS_CS4_BASE) && defined(CONFIG_SYS_CS4_MASK) \
72      && defined(CONFIG_SYS_CS4_CTRL))
73         fbcs->csar4 = CONFIG_SYS_CS4_BASE;
74         fbcs->cscr4 = CONFIG_SYS_CS4_CTRL;
75         fbcs->csmr4 = CONFIG_SYS_CS4_MASK;
76 #endif
77 #if (defined(CONFIG_SYS_CS5_BASE) && defined(CONFIG_SYS_CS5_MASK) \
78      && defined(CONFIG_SYS_CS5_CTRL))
79         fbcs->csar5 = CONFIG_SYS_CS5_BASE;
80         fbcs->cscr5 = CONFIG_SYS_CS5_CTRL;
81         fbcs->csmr5 = CONFIG_SYS_CS5_MASK;
82 #endif
83 #if (defined(CONFIG_SYS_CS6_BASE) && defined(CONFIG_SYS_CS6_MASK) \
84      && defined(CONFIG_SYS_CS6_CTRL))
85         fbcs->csar6 = CONFIG_SYS_CS6_BASE;
86         fbcs->cscr6 = CONFIG_SYS_CS6_CTRL;
87         fbcs->csmr6 = CONFIG_SYS_CS6_MASK;
88 #endif
89 #if (defined(CONFIG_SYS_CS7_BASE) && defined(CONFIG_SYS_CS7_MASK) \
90      && defined(CONFIG_SYS_CS7_CTRL))
91         fbcs->csar7 = CONFIG_SYS_CS7_BASE;
92         fbcs->cscr7 = CONFIG_SYS_CS7_CTRL;
93         fbcs->csmr7 = CONFIG_SYS_CS7_MASK;
94 #endif
95 }
96 #endif
97
98 #if defined(CONFIG_M5253)
99 /*
100  * Breath some life into the CPU...
101  *
102  * Set up the memory map,
103  * initialize a bunch of registers,
104  * initialize the UPM's
105  */
106 void cpu_init_f(void)
107 {
108         mbar_writeByte(MCFSIM_MPARK, 0x40);     /* 5249 Internal Core takes priority over DMA */
109         mbar_writeByte(MCFSIM_SYPCR, 0x00);
110         mbar_writeByte(MCFSIM_SWIVR, 0x0f);
111         mbar_writeByte(MCFSIM_SWSR, 0x00);
112         mbar_writeByte(MCFSIM_SWDICR, 0x00);
113         mbar_writeByte(MCFSIM_TIMER1ICR, 0x00);
114         mbar_writeByte(MCFSIM_TIMER2ICR, 0x88);
115         mbar_writeByte(MCFSIM_I2CICR, 0x00);
116         mbar_writeByte(MCFSIM_UART1ICR, 0x00);
117         mbar_writeByte(MCFSIM_UART2ICR, 0x00);
118         mbar_writeByte(MCFSIM_ICR6, 0x00);
119         mbar_writeByte(MCFSIM_ICR7, 0x00);
120         mbar_writeByte(MCFSIM_ICR8, 0x00);
121         mbar_writeByte(MCFSIM_ICR9, 0x00);
122         mbar_writeByte(MCFSIM_QSPIICR, 0x00);
123
124         mbar2_writeLong(MCFSIM_GPIO_INT_EN, 0x00000080);
125         mbar2_writeByte(MCFSIM_INTBASE, 0x40);  /* Base interrupts at 64 */
126         mbar2_writeByte(MCFSIM_SPURVEC, 0x00);
127
128         /*mbar2_writeLong(MCFSIM_IDECONFIG1, 0x00000020); *//* Enable a 1 cycle pre-drive cycle on CS1 */
129
130         /* FlexBus Chipselect */
131         init_fbcs();
132
133 #ifdef CONFIG_FSL_I2C
134         CONFIG_SYS_I2C_PINMUX_REG =
135             CONFIG_SYS_I2C_PINMUX_REG & CONFIG_SYS_I2C_PINMUX_CLR;
136         CONFIG_SYS_I2C_PINMUX_REG |= CONFIG_SYS_I2C_PINMUX_SET;
137 #ifdef CONFIG_SYS_I2C2_OFFSET
138         CONFIG_SYS_I2C2_PINMUX_REG &= CONFIG_SYS_I2C2_PINMUX_CLR;
139         CONFIG_SYS_I2C2_PINMUX_REG |= CONFIG_SYS_I2C2_PINMUX_SET;
140 #endif
141 #endif
142
143         /* enable instruction cache now */
144         icache_enable();
145 }
146
147 /*initialize higher level parts of CPU like timers */
148 int cpu_init_r(void)
149 {
150         return (0);
151 }
152
153 void uart_port_conf(void)
154 {
155         /* Setup Ports: */
156         switch (CONFIG_SYS_UART_PORT) {
157         case 0:
158                 break;
159         case 1:
160                 break;
161         case 2:
162                 break;
163         }
164 }
165 #endif                          /* #if defined(CONFIG_M5253) */
166
167 #if defined(CONFIG_M5271)
168 void cpu_init_f(void)
169 {
170 #ifndef CONFIG_WATCHDOG
171         /* Disable the watchdog if we aren't using it */
172         mbar_writeShort(MCF_WTM_WCR, 0);
173 #endif
174
175         /* FlexBus Chipselect */
176         init_fbcs();
177
178         /* Set clockspeed to 100MHz */
179         mbar_writeShort(MCF_FMPLL_SYNCR,
180                         MCF_FMPLL_SYNCR_MFD(0) | MCF_FMPLL_SYNCR_RFD(0));
181         while (!mbar_readByte(MCF_FMPLL_SYNSR) & MCF_FMPLL_SYNSR_LOCK) ;
182 }
183
184 /*
185  * initialize higher level parts of CPU like timers
186  */
187 int cpu_init_r(void)
188 {
189         return (0);
190 }
191
192 void uart_port_conf(void)
193 {
194         /* Setup Ports: */
195         switch (CONFIG_SYS_UART_PORT) {
196         case 0:
197                 mbar_writeShort(MCF_GPIO_PAR_UART, MCF_GPIO_PAR_UART_U0TXD |
198                                 MCF_GPIO_PAR_UART_U0RXD);
199                 break;
200         case 1:
201                 mbar_writeShort(MCF_GPIO_PAR_UART,
202                                 MCF_GPIO_PAR_UART_U1RXD_UART1 |
203                                 MCF_GPIO_PAR_UART_U1TXD_UART1);
204                 break;
205         case 2:
206                 mbar_writeShort(MCF_GPIO_PAR_UART, 0x3000);
207                 break;
208         }
209 }
210 #endif
211
212 #if defined(CONFIG_M5272)
213 /*
214  * Breath some life into the CPU...
215  *
216  * Set up the memory map,
217  * initialize a bunch of registers,
218  * initialize the UPM's
219  */
220 void cpu_init_f(void)
221 {
222         /* if we come from RAM we assume the CPU is
223          * already initialized.
224          */
225 #ifndef CONFIG_MONITOR_IS_IN_RAM
226         volatile sysctrl_t *sysctrl = (sysctrl_t *) (CONFIG_SYS_MBAR);
227         volatile gpio_t *gpio = (gpio_t *) (MMAP_GPIO);
228         volatile csctrl_t *csctrl = (csctrl_t *) (MMAP_FBCS);
229
230         sysctrl->sc_scr = CONFIG_SYS_SCR;
231         sysctrl->sc_spr = CONFIG_SYS_SPR;
232
233         /* Setup Ports: */
234         gpio->gpio_pacnt = CONFIG_SYS_PACNT;
235         gpio->gpio_paddr = CONFIG_SYS_PADDR;
236         gpio->gpio_padat = CONFIG_SYS_PADAT;
237         gpio->gpio_pbcnt = CONFIG_SYS_PBCNT;
238         gpio->gpio_pbddr = CONFIG_SYS_PBDDR;
239         gpio->gpio_pbdat = CONFIG_SYS_PBDAT;
240         gpio->gpio_pdcnt = CONFIG_SYS_PDCNT;
241
242         /* Memory Controller: */
243         csctrl->cs_br0 = CONFIG_SYS_BR0_PRELIM;
244         csctrl->cs_or0 = CONFIG_SYS_OR0_PRELIM;
245
246 #if (defined(CONFIG_SYS_OR1_PRELIM) && defined(CONFIG_SYS_BR1_PRELIM))
247         csctrl->cs_br1 = CONFIG_SYS_BR1_PRELIM;
248         csctrl->cs_or1 = CONFIG_SYS_OR1_PRELIM;
249 #endif
250
251 #if defined(CONFIG_SYS_OR2_PRELIM) && defined(CONFIG_SYS_BR2_PRELIM)
252         csctrl->cs_br2 = CONFIG_SYS_BR2_PRELIM;
253         csctrl->cs_or2 = CONFIG_SYS_OR2_PRELIM;
254 #endif
255
256 #if defined(CONFIG_SYS_OR3_PRELIM) && defined(CONFIG_SYS_BR3_PRELIM)
257         csctrl->cs_br3 = CONFIG_SYS_BR3_PRELIM;
258         csctrl->cs_or3 = CONFIG_SYS_OR3_PRELIM;
259 #endif
260
261 #if defined(CONFIG_SYS_OR4_PRELIM) && defined(CONFIG_SYS_BR4_PRELIM)
262         csctrl->cs_br4 = CONFIG_SYS_BR4_PRELIM;
263         csctrl->cs_or4 = CONFIG_SYS_OR4_PRELIM;
264 #endif
265
266 #if defined(CONFIG_SYS_OR5_PRELIM) && defined(CONFIG_SYS_BR5_PRELIM)
267         csctrl->cs_br5 = CONFIG_SYS_BR5_PRELIM;
268         csctrl->cs_or5 = CONFIG_SYS_OR5_PRELIM;
269 #endif
270
271 #if defined(CONFIG_SYS_OR6_PRELIM) && defined(CONFIG_SYS_BR6_PRELIM)
272         csctrl->cs_br6 = CONFIG_SYS_BR6_PRELIM;
273         csctrl->cs_or6 = CONFIG_SYS_OR6_PRELIM;
274 #endif
275
276 #if defined(CONFIG_SYS_OR7_PRELIM) && defined(CONFIG_SYS_BR7_PRELIM)
277         csctrl->cs_br7 = CONFIG_SYS_BR7_PRELIM;
278         csctrl->cs_or7 = CONFIG_SYS_OR7_PRELIM;
279 #endif
280
281 #endif                          /* #ifndef CONFIG_MONITOR_IS_IN_RAM */
282
283         /* enable instruction cache now */
284         icache_enable();
285
286 }
287
288 /*
289  * initialize higher level parts of CPU like timers
290  */
291 int cpu_init_r(void)
292 {
293         return (0);
294 }
295
296 void uart_port_conf(void)
297 {
298         volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO;
299
300         /* Setup Ports: */
301         switch (CONFIG_SYS_UART_PORT) {
302         case 0:
303                 gpio->gpio_pbcnt &= ~(GPIO_PBCNT_PB0MSK | GPIO_PBCNT_PB1MSK);
304                 gpio->gpio_pbcnt |= (GPIO_PBCNT_URT0_TXD | GPIO_PBCNT_URT0_RXD);
305                 break;
306         case 1:
307                 gpio->gpio_pdcnt &= ~(GPIO_PDCNT_PD1MSK | GPIO_PDCNT_PD4MSK);
308                 gpio->gpio_pdcnt |= (GPIO_PDCNT_URT1_RXD | GPIO_PDCNT_URT1_TXD);
309                 break;
310         }
311 }
312 #endif                          /* #if defined(CONFIG_M5272) */
313
314 #if defined(CONFIG_M5275)
315
316 /*
317  * Breathe some life into the CPU...
318  *
319  * Set up the memory map,
320  * initialize a bunch of registers,
321  * initialize the UPM's
322  */
323 void cpu_init_f(void)
324 {
325         /*
326          * if we come from RAM we assume the CPU is
327          * already initialized.
328          */
329
330 #ifndef CONFIG_MONITOR_IS_IN_RAM
331         volatile wdog_t *wdog_reg = (wdog_t *) (MMAP_WDOG);
332         volatile gpio_t *gpio_reg = (gpio_t *) (MMAP_GPIO);
333
334         /* Kill watchdog so we can initialize the PLL */
335         wdog_reg->wcr = 0;
336
337         /* FlexBus Chipselect */
338         init_fbcs();
339 #endif                          /* #ifndef CONFIG_MONITOR_IS_IN_RAM */
340
341 #ifdef CONFIG_FSL_I2C
342         CONFIG_SYS_I2C_PINMUX_REG &= CONFIG_SYS_I2C_PINMUX_CLR;
343         CONFIG_SYS_I2C_PINMUX_REG |= CONFIG_SYS_I2C_PINMUX_SET;
344 #endif
345
346         /* enable instruction cache now */
347         icache_enable();
348 }
349
350 /*
351  * initialize higher level parts of CPU like timers
352  */
353 int cpu_init_r(void)
354 {
355         return (0);
356 }
357
358 void uart_port_conf(void)
359 {
360         volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO;
361
362         /* Setup Ports: */
363         switch (CONFIG_SYS_UART_PORT) {
364         case 0:
365                 gpio->par_uart |= UART0_ENABLE_MASK;
366                 break;
367         case 1:
368                 gpio->par_uart |= UART1_ENABLE_MASK;
369                 break;
370         case 2:
371                 gpio->par_uart |= UART2_ENABLE_MASK;
372                 break;
373         }
374 }
375 #endif                          /* #if defined(CONFIG_M5275) */
376
377 #if defined(CONFIG_M5282)
378 /*
379  * Breath some life into the CPU...
380  *
381  * Set up the memory map,
382  * initialize a bunch of registers,
383  * initialize the UPM's
384  */
385 void cpu_init_f(void)
386 {
387 #ifndef CONFIG_WATCHDOG
388         /* disable watchdog if we aren't using it */
389         MCFWTM_WCR = 0;
390 #endif
391
392 #ifndef CONFIG_MONITOR_IS_IN_RAM
393         /* Set speed /PLL */
394         MCFCLOCK_SYNCR =
395             MCFCLOCK_SYNCR_MFD(CONFIG_SYS_MFD) |
396             MCFCLOCK_SYNCR_RFD(CONFIG_SYS_RFD);
397         while (!(MCFCLOCK_SYNSR & MCFCLOCK_SYNSR_LOCK)) ;
398
399         MCFGPIO_PBCDPAR = 0xc0;
400
401         /* Set up the GPIO ports */
402 #ifdef CONFIG_SYS_PEPAR
403         MCFGPIO_PEPAR = CONFIG_SYS_PEPAR;
404 #endif
405 #ifdef  CONFIG_SYS_PFPAR
406         MCFGPIO_PFPAR = CONFIG_SYS_PFPAR;
407 #endif
408 #ifdef CONFIG_SYS_PJPAR
409         MCFGPIO_PJPAR = CONFIG_SYS_PJPAR;
410 #endif
411 #ifdef CONFIG_SYS_PSDPAR
412         MCFGPIO_PSDPAR = CONFIG_SYS_PSDPAR;
413 #endif
414 #ifdef CONFIG_SYS_PASPAR
415         MCFGPIO_PASPAR = CONFIG_SYS_PASPAR;
416 #endif
417 #ifdef CONFIG_SYS_PEHLPAR
418         MCFGPIO_PEHLPAR = CONFIG_SYS_PEHLPAR;
419 #endif
420 #ifdef CONFIG_SYS_PQSPAR
421         MCFGPIO_PQSPAR = CONFIG_SYS_PQSPAR;
422 #endif
423 #ifdef CONFIG_SYS_PTCPAR
424         MCFGPIO_PTCPAR = CONFIG_SYS_PTCPAR;
425 #endif
426 #ifdef CONFIG_SYS_PTDPAR
427         MCFGPIO_PTDPAR = CONFIG_SYS_PTDPAR;
428 #endif
429 #ifdef CONFIG_SYS_PUAPAR
430         MCFGPIO_PUAPAR = CONFIG_SYS_PUAPAR;
431 #endif
432
433 #ifdef CONFIG_SYS_DDRUA
434         MCFGPIO_DDRUA = CONFIG_SYS_DDRUA;
435 #endif
436
437         /* FlexBus Chipselect */
438         init_fbcs();
439
440 #endif                          /* CONFIG_MONITOR_IS_IN_RAM */
441
442         /* defer enabling cache until boot (see do_go) */
443         /* icache_enable(); */
444 }
445
446 /*
447  * initialize higher level parts of CPU like timers
448  */
449 int cpu_init_r(void)
450 {
451         return (0);
452 }
453
454 void uart_port_conf(void)
455 {
456         /* Setup Ports: */
457         switch (CONFIG_SYS_UART_PORT) {
458         case 0:
459                 MCFGPIO_PUAPAR &= 0xFc;
460                 MCFGPIO_PUAPAR |= 0x03;
461                 break;
462         case 1:
463                 MCFGPIO_PUAPAR &= 0xF3;
464                 MCFGPIO_PUAPAR |= 0x0C;
465                 break;
466         case 2:
467                 MCFGPIO_PASPAR &= 0xFF0F;
468                 MCFGPIO_PASPAR |= 0x00A0;
469                 break;
470         }
471 }
472 #endif
473
474 #if defined(CONFIG_M5249)
475 /*
476  * Breath some life into the CPU...
477  *
478  * Set up the memory map,
479  * initialize a bunch of registers,
480  * initialize the UPM's
481  */
482 void cpu_init_f(void)
483 {
484         /*
485          *  NOTE: by setting the GPIO_FUNCTION registers, we ensure that the UART pins
486          *        (UART0: gpio 30,27, UART1: gpio 31, 28) will be used as UART pins
487          *        which is their primary function.
488          *        ~Jeremy
489          */
490         mbar2_writeLong(MCFSIM_GPIO_FUNC, CONFIG_SYS_GPIO_FUNC);
491         mbar2_writeLong(MCFSIM_GPIO1_FUNC, CONFIG_SYS_GPIO1_FUNC);
492         mbar2_writeLong(MCFSIM_GPIO_EN, CONFIG_SYS_GPIO_EN);
493         mbar2_writeLong(MCFSIM_GPIO1_EN, CONFIG_SYS_GPIO1_EN);
494         mbar2_writeLong(MCFSIM_GPIO_OUT, CONFIG_SYS_GPIO_OUT);
495         mbar2_writeLong(MCFSIM_GPIO1_OUT, CONFIG_SYS_GPIO1_OUT);
496
497         /*
498          *  dBug Compliance:
499          *    You can verify these values by using dBug's 'ird'
500          *    (Internal Register Display) command
501          *    ~Jeremy
502          *
503          */
504         mbar_writeByte(MCFSIM_MPARK, 0x30);     /* 5249 Internal Core takes priority over DMA */
505         mbar_writeByte(MCFSIM_SYPCR, 0x00);
506         mbar_writeByte(MCFSIM_SWIVR, 0x0f);
507         mbar_writeByte(MCFSIM_SWSR, 0x00);
508         mbar_writeLong(MCFSIM_IMR, 0xfffffbff);
509         mbar_writeByte(MCFSIM_SWDICR, 0x00);
510         mbar_writeByte(MCFSIM_TIMER1ICR, 0x00);
511         mbar_writeByte(MCFSIM_TIMER2ICR, 0x88);
512         mbar_writeByte(MCFSIM_I2CICR, 0x00);
513         mbar_writeByte(MCFSIM_UART1ICR, 0x00);
514         mbar_writeByte(MCFSIM_UART2ICR, 0x00);
515         mbar_writeByte(MCFSIM_ICR6, 0x00);
516         mbar_writeByte(MCFSIM_ICR7, 0x00);
517         mbar_writeByte(MCFSIM_ICR8, 0x00);
518         mbar_writeByte(MCFSIM_ICR9, 0x00);
519         mbar_writeByte(MCFSIM_QSPIICR, 0x00);
520
521         mbar2_writeLong(MCFSIM_GPIO_INT_EN, 0x00000080);
522         mbar2_writeByte(MCFSIM_INTBASE, 0x40);  /* Base interrupts at 64 */
523         mbar2_writeByte(MCFSIM_SPURVEC, 0x00);
524         mbar2_writeLong(MCFSIM_IDECONFIG1, 0x00000020); /* Enable a 1 cycle pre-drive cycle on CS1 */
525
526         /* Setup interrupt priorities for gpio7 */
527         /* mbar2_writeLong(MCFSIM_INTLEV5, 0x70000000); */
528
529         /* IDE Config registers */
530         mbar2_writeLong(MCFSIM_IDECONFIG1, 0x00000020);
531         mbar2_writeLong(MCFSIM_IDECONFIG2, 0x00000000);
532
533         /* FlexBus Chipselect */
534         init_fbcs();
535
536         /* enable instruction cache now */
537         icache_enable();
538 }
539
540 /*
541  * initialize higher level parts of CPU like timers
542  */
543 int cpu_init_r(void)
544 {
545         return (0);
546 }
547
548 void uart_port_conf(void)
549 {
550         /* Setup Ports: */
551         switch (CONFIG_SYS_UART_PORT) {
552         case 0:
553                 break;
554         case 1:
555                 break;
556         }
557 }
558 #endif                          /* #if defined(CONFIG_M5249) */