blob: 1b820441419aacea972433f166dfeff8b6a9c5a1 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/***************************************************************************/
2
3/*
4 * linux/arch/m68knommu/platform/527x/config.c
5 *
6 * Sub-architcture dependant initialization code for the Freescale
7 * 5270/5271 CPUs.
8 *
9 * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com)
10 * Copyright (C) 2001-2004, 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);
Greg Ungerereaefd5f2007-02-07 12:03:19 +100030void coldfire_pit_init(irq_handler_t handler);
Linus Torvalds1da177e2005-04-16 15:20:36 -070031unsigned long coldfire_pit_offset(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070032void coldfire_reset(void);
33
34/***************************************************************************/
35
36/*
37 * DMA channel base address table.
38 */
39unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = {
40 MCF_MBAR + MCFDMA_BASE0,
41};
42
43unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
44
45/***************************************************************************/
46
47void mcf_disableall(void)
48{
49 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
50 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff;
51}
52
53/***************************************************************************/
54
55void mcf_autovector(unsigned int vec)
56{
57 /* Everything is auto-vectored on the 5272 */
58}
59
60/***************************************************************************/
61
62void config_BSP(char *commandp, int size)
63{
64 mcf_disableall();
Linus Torvalds1da177e2005-04-16 15:20:36 -070065 mach_sched_init = coldfire_pit_init;
66 mach_tick = coldfire_pit_tick;
67 mach_gettimeoffset = coldfire_pit_offset;
Linus Torvalds1da177e2005-04-16 15:20:36 -070068 mach_reset = coldfire_reset;
69}
70
71/***************************************************************************/