blob: a568d2870d15c6cec6d758f550934be3c7b441af [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/***************************************************************************/
2
3/*
4 * linux/arch/m68knommu/platform/5307/config.c
5 *
6 * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com)
7 * Copyright (C) 2000, Lineo (www.lineo.com)
8 */
9
10/***************************************************************************/
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/kernel.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/param.h>
14#include <linux/init.h>
Greg Ungerer96db2712008-02-01 17:34:55 +100015#include <linux/io.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#include <asm/machdep.h>
17#include <asm/coldfire.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#include <asm/mcfsim.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#include <asm/mcfwdebug.h>
20
21/***************************************************************************/
22
Linus Torvalds1da177e2005-04-16 15:20:36 -070023/*
24 * Some platforms need software versions of the GPIO data registers.
25 */
26unsigned short ppdata;
27unsigned char ledbank = 0xff;
28
29/***************************************************************************/
30
Greg Ungerer96db2712008-02-01 17:34:55 +100031void __init config_BSP(char *commandp, int size)
Linus Torvalds1da177e2005-04-16 15:20:36 -070032{
Adrian Bunk3947fca2009-01-13 14:20:01 +100033#if defined(CONFIG_NETtel) || \
Greg Ungerercff28b52008-05-01 12:17:21 +100034 defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA)
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 /* Copy command line from FLASH to local buffer... */
36 memcpy(commandp, (char *) 0xf0004000, size);
37 commandp[size-1] = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#endif
39
Greg Ungerer35aefb22012-01-23 15:34:58 +100040 mach_sched_init = hw_timer_init;
Greg Ungerer39f0fb62009-05-22 13:33:35 +100041
42 /* Only support the external interrupts on their primary level */
43 mcf_mapirq2imr(25, MCFINTC_EINT1);
44 mcf_mapirq2imr(27, MCFINTC_EINT3);
45 mcf_mapirq2imr(29, MCFINTC_EINT5);
46 mcf_mapirq2imr(31, MCFINTC_EINT7);
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
Greg Ungerer96db2712008-02-01 17:34:55 +100048#ifdef CONFIG_BDM_DISABLE
Linus Torvalds1da177e2005-04-16 15:20:36 -070049 /*
50 * Disable the BDM clocking. This also turns off most of the rest of
51 * the BDM device. This is good for EMC reasons. This option is not
52 * incompatible with the memory protection option.
53 */
54 wdebug(MCFDEBUG_CSR, MCFDEBUG_CSR_PSTCLK);
55#endif
56}
57
58/***************************************************************************/