diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
commit | c324b44c34050cf2a9b58830e11c974806bd85d8 (patch) | |
tree | 3ac45a783221283925cd698334a8f5e7dd4c1df8 /arch/m68knommu/platform | |
parent | 2fcf522509cceea524b6e7ece8fd6759b682175a (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) | |
download | blackbird-op-linux-c324b44c34050cf2a9b58830e11c974806bd85d8.tar.gz blackbird-op-linux-c324b44c34050cf2a9b58830e11c974806bd85d8.zip |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/m68knommu/platform')
-rw-r--r-- | arch/m68knommu/platform/523x/config.c | 82 | ||||
-rw-r--r-- | arch/m68knommu/platform/5307/head.S | 15 | ||||
-rw-r--r-- | arch/m68knommu/platform/68328/entry.S | 4 | ||||
-rw-r--r-- | arch/m68knommu/platform/68360/entry.S | 2 |
4 files changed, 97 insertions, 6 deletions
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c new file mode 100644 index 000000000000..22767ce506e0 --- /dev/null +++ b/arch/m68knommu/platform/523x/config.c @@ -0,0 +1,82 @@ +/***************************************************************************/ + +/* + * linux/arch/m68knommu/platform/523x/config.c + * + * Sub-architcture dependant initialization code for the Freescale + * 523x CPUs. + * + * Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) + */ + +/***************************************************************************/ + +#include <linux/config.h> +#include <linux/kernel.h> +#include <linux/sched.h> +#include <linux/param.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <asm/dma.h> +#include <asm/traps.h> +#include <asm/machdep.h> +#include <asm/coldfire.h> +#include <asm/mcfsim.h> +#include <asm/mcfdma.h> + +/***************************************************************************/ + +void coldfire_pit_tick(void); +void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); +unsigned long coldfire_pit_offset(void); +void coldfire_trap_init(void); +void coldfire_reset(void); + +/***************************************************************************/ + +/* + * DMA channel base address table. + */ +unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { + MCF_MBAR + MCFDMA_BASE0, +}; + +unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; + +/***************************************************************************/ + +void mcf_disableall(void) +{ + *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; + *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL)) = 0xffffffff; +} + +/***************************************************************************/ + +void mcf_autovector(unsigned int vec) +{ + /* Everything is auto-vectored on the 5272 */ +} + +/***************************************************************************/ + +void config_BSP(char *commandp, int size) +{ + mcf_disableall(); + +#ifdef CONFIG_BOOTPARAM + strncpy(commandp, CONFIG_BOOTPARAM_STRING, size); + commandp[size-1] = 0; +#else + memset(commandp, 0, size); +#endif + + mach_sched_init = coldfire_pit_init; + mach_tick = coldfire_pit_tick; + mach_gettimeoffset = coldfire_pit_offset; + mach_trap_init = coldfire_trap_init; + mach_reset = coldfire_reset; +} + +/***************************************************************************/ diff --git a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S index c7d7a395c4cc..7f4ba837901f 100644 --- a/arch/m68knommu/platform/5307/head.S +++ b/arch/m68knommu/platform/5307/head.S @@ -39,14 +39,18 @@ * Memory size exceptions for special cases. Some boards may be set * for auto memory sizing, but we can't do it that way for some reason. * For example the 5206eLITE board has static RAM, and auto-detecting - * the SDRAM will do you no good at all. + * the SDRAM will do you no good at all. Same goes for the MOD5272. */ #ifdef CONFIG_RAMAUTO #if defined(CONFIG_M5206eLITE) -#define MEM_SIZE 0x00100000 /* 1MiB default memory */ +#define MEM_SIZE 0x00100000 /* 1MiB default memory */ +#endif +#if defined(CONFIG_MOD5272) +#define MEM_SIZE 0x00800000 /* 8MiB default memory */ #endif #endif /* CONFIG_RAMAUTO */ + /* * If we don't have a fixed memory size now, then lets build in code * to auto detect the DRAM size. Obviously this is the prefered @@ -100,11 +104,15 @@ /* * Most ColdFire boards have their DRAM starting at address 0. - * Notable exception is the 5206eLITE board. + * Notable exception is the 5206eLITE board, another is the MOD5272. */ #if defined(CONFIG_M5206eLITE) #define MEM_BASE 0x30000000 #endif +#if defined(CONFIG_MOD5272) +#define MEM_BASE 0x02000000 +#define VBR_BASE 0x20000000 /* vectors in SRAM */ +#endif #ifndef MEM_BASE #define MEM_BASE 0x00000000 /* memory base at address 0 */ @@ -188,6 +196,7 @@ _start: movel %a7,_rambase GET_MEM_SIZE /* macro code determines size */ + addl %a7,%d0 movel %d0,_ramend /* set end ram addr */ /* diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S index 0f5d1fe8eb5f..7d8990d784a2 100644 --- a/arch/m68knommu/platform/68328/entry.S +++ b/arch/m68knommu/platform/68328/entry.S @@ -79,7 +79,7 @@ ENTRY(system_call) movel %sp@(PT_ORIG_D0),%d0 movel %sp,%d1 /* get thread_info pointer */ - andl #0xffffe000,%d1 + andl #-THREAD_SIZE,%d1 movel %d1,%a2 btst #TIF_SYSCALL_TRACE,%a2@(TI_FLAGS) jne do_trace @@ -105,7 +105,7 @@ Luser_return: andw #ALLOWINT,%sr movel %sp,%d1 /* get thread_info pointer */ - andl #0xffffe000,%d1 + andl #-THREAD_SIZE,%d1 movel %d1,%a2 move %a2@(TI_FLAGS),%d1 /* thread_info->flags */ andl #_TIF_WORK_MASK,%d1 diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S index f7bc80a60e0f..8ff48adf24ab 100644 --- a/arch/m68knommu/platform/68360/entry.S +++ b/arch/m68knommu/platform/68360/entry.S @@ -96,7 +96,7 @@ Luser_return: andw #ALLOWINT,%sr movel %sp,%d1 /* get thread_info pointer */ - andl #0xffffe000,%d1 + andl #-THREAD_SIZE,%d1 movel %d1,%a2 move %a2@(TI_FLAGS),%d1 /* thread_info->flags */ andl #_TIF_WORK_MASK,%d1 |