blob: 18dad90461445b2298fbdda3c23328897515a8dc [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/***************************************************************************/
2
3/*
4 * linux/arch/m68knommu/platform/528x/config.c
5 *
6 * Sub-architcture dependant initialization code for the Motorola
7 * 5280 and 5282 CPUs.
8 *
9 * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com)
10 * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com)
11 */
12
13/***************************************************************************/
14
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/param.h>
18#include <linux/init.h>
19#include <linux/interrupt.h>
20#include <asm/dma.h>
21#include <asm/traps.h>
22#include <asm/machdep.h>
23#include <asm/coldfire.h>
24#include <asm/mcfsim.h>
25#include <asm/mcfdma.h>
26
27/***************************************************************************/
28
29void coldfire_pit_tick(void);
30void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
31unsigned long coldfire_pit_offset(void);
32void coldfire_trap_init(void);
33void coldfire_reset(void);
34
35/***************************************************************************/
36
37/*
38 * DMA channel base address table.
39 */
40unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = {
41 MCF_MBAR + MCFDMA_BASE0,
42};
43
44unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
45
46/***************************************************************************/
47
48void mcf_disableall(void)
49{
50 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
51 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff;
52}
53
54/***************************************************************************/
55
56void mcf_autovector(unsigned int vec)
57{
58 /* Everything is auto-vectored on the 5272 */
59}
60
61/***************************************************************************/
62
63void config_BSP(char *commandp, int size)
64{
65 mcf_disableall();
66
67#ifdef CONFIG_BOOTPARAM
68 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
69 commandp[size-1] = 0;
70#else
71 memset(commandp, 0, size);
72#endif
73
74 mach_sched_init = coldfire_pit_init;
75 mach_tick = coldfire_pit_tick;
76 mach_gettimeoffset = coldfire_pit_offset;
77 mach_trap_init = coldfire_trap_init;
78 mach_reset = coldfire_reset;
79}
80
81/***************************************************************************/