Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147808
b: refs/heads/master
c: 7342281
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Mahoney authored and Al Viro committed Jun 12, 2009
1 parent 08cb5d1 commit e9e9baa
Show file tree
Hide file tree
Showing 32 changed files with 203 additions and 189 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 875287caa067492779670f5fb3b98ec8dcfe2cb0
refs/heads/master: 73422811d290c628b4ddbf6830e5cd6fa42e84f1
9 changes: 0 additions & 9 deletions trunk/arch/m68k/include/asm/m520xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,5 @@
#define MCFPIT_IMR MCFINTC_IMRL
#define MCFPIT_IMR_IBIT (1 << MCFINT_PIT1)

/*
* Reset Controll Unit.
*/
#define MCF_RCR 0xFC0A0000
#define MCF_RSR 0xFC0A0001

#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */

/****************************************************************************/
#endif /* m520xsim_h */
9 changes: 0 additions & 9 deletions trunk/arch/m68k/include/asm/m523xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,5 @@
#define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */
#define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */

/*
* Reset Controll Unit (relative to IPSBAR).
*/
#define MCF_RCR 0x110000
#define MCF_RSR 0x110001

#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */

/****************************************************************************/
#endif /* m523xsim_h */
9 changes: 0 additions & 9 deletions trunk/arch/m68k/include/asm/m527xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,5 @@
#define UART2_ENABLE_MASK 0x3f00
#endif

/*
* Reset Controll Unit (relative to IPSBAR).
*/
#define MCF_RCR 0x110000
#define MCF_RSR 0x110001

#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */

/****************************************************************************/
#endif /* m527xsim_h */
8 changes: 0 additions & 8 deletions trunk/arch/m68k/include/asm/m528xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@
#define MCF5282_INTC0_ICR17 (volatile u8 *) (MCF_IPSBAR + 0x0C51)


/*
* Reset Control Unit (relative to IPSBAR).
*/
#define MCF_RCR 0x110000
#define MCF_RSR 0x110001

#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */

/*********************************************************************
*
Expand Down
12 changes: 0 additions & 12 deletions trunk/arch/m68k/include/asm/m532xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,6 @@
#define ACR_CM_OFF_IMP (3<<5)
#define ACR_WPROTECT (1<<2)

/*********************************************************************
*
* Reset Controller Module
*
*********************************************************************/

#define MCF_RCR 0xFC0A0000
#define MCF_RSR 0xFC0A0001

#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */

/*********************************************************************
*
* Inter-IC (I2C) Module
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/m68k/include/asm/processor_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ struct thread_struct {
unsigned char fpstate[FPSTATESIZE]; /* floating point state */
};

#define INIT_THREAD { \
.ksp = sizeof(init_stack) + (unsigned long) init_stack, \
.sr = PS_S, \
.fs = __KERNEL_DS, \
#define INIT_THREAD { \
sizeof(init_stack) + (unsigned long) init_stack, 0, \
PS_S, __KERNEL_DS, \
{0, 0}, 0, {0,}, {0, 0, 0}, {0,}, \
}

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/m68k/include/asm/swab.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _M68K_SWAB_H
#define _M68K_SWAB_H

#include <linux/types.h>
#include <asm/types.h>
#include <linux/compiler.h>

#define __SWAB_64_THRU_32__
Expand Down
107 changes: 107 additions & 0 deletions trunk/arch/m68k/include/asm/system_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,113 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
#include <asm-generic/cmpxchg.h>
#endif

#if defined( CONFIG_M68328 ) || defined( CONFIG_M68EZ328 ) || \
defined (CONFIG_M68360) || defined( CONFIG_M68VZ328 )
#define HARD_RESET_NOW() ({ \
local_irq_disable(); \
asm(" \
moveal #0x10c00000, %a0; \
moveb #0, 0xFFFFF300; \
moveal 0(%a0), %sp; \
moveal 4(%a0), %a0; \
jmp (%a0); \
"); \
})
#endif

#ifdef CONFIG_COLDFIRE
#if defined(CONFIG_M5272) && defined(CONFIG_NETtel)
/*
* Need to account for broken early mask of 5272 silicon. So don't
* jump through the original start address. Jump strait into the
* known start of the FLASH code.
*/
#define HARD_RESET_NOW() ({ \
asm(" \
movew #0x2700, %sr; \
jmp 0xf0000400; \
"); \
})
#elif defined(CONFIG_NETtel) || \
defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA)
#define HARD_RESET_NOW() ({ \
asm(" \
movew #0x2700, %sr; \
moveal #0x10000044, %a0; \
movel #0xffffffff, (%a0); \
moveal #0x10000001, %a0; \
moveb #0x00, (%a0); \
moveal #0xf0000004, %a0; \
moveal (%a0), %a0; \
jmp (%a0); \
"); \
})
#elif defined(CONFIG_M5272)
/*
* Retrieve the boot address in flash using CSBR0 and CSOR0
* find the reset vector at flash_address + 4 (e.g. 0x400)
* remap it in the flash's current location (e.g. 0xf0000400)
* and jump there.
*/
#define HARD_RESET_NOW() ({ \
asm(" \
movew #0x2700, %%sr; \
move.l %0+0x40,%%d0; \
and.l %0+0x44,%%d0; \
andi.l #0xfffff000,%%d0; \
mov.l %%d0,%%a0; \
or.l 4(%%a0),%%d0; \
mov.l %%d0,%%a0; \
jmp (%%a0);" \
: /* No output */ \
: "o" (*(char *)MCF_MBAR) ); \
})
#elif defined(CONFIG_M528x)
/*
* The MCF528x has a bit (SOFTRST) in memory (Reset Control Register RCR),
* that when set, resets the MCF528x.
*/
#define HARD_RESET_NOW() \
({ \
unsigned char volatile *reset; \
asm("move.w #0x2700, %sr"); \
reset = ((volatile unsigned char *)(MCF_IPSBAR + 0x110000)); \
while(1) \
*reset |= (0x01 << 7);\
})
#elif defined(CONFIG_M523x)
#define HARD_RESET_NOW() ({ \
asm(" \
movew #0x2700, %sr; \
movel #0x01000000, %sp; \
moveal #0x40110000, %a0; \
moveb #0x80, (%a0); \
"); \
})
#elif defined(CONFIG_M520x)
/*
* The MCF5208 has a bit (SOFTRST) in memory (Reset Control Register
* RCR), that when set, resets the MCF5208.
*/
#define HARD_RESET_NOW() \
({ \
unsigned char volatile *reset; \
asm("move.w #0x2700, %sr"); \
reset = ((volatile unsigned char *)(MCF_IPSBAR + 0xA0000)); \
while(1) \
*reset |= 0x80; \
})
#else
#define HARD_RESET_NOW() ({ \
asm(" \
movew #0x2700, %sr; \
moveal #0x4, %a0; \
moveal (%a0), %a0; \
jmp (%a0); \
"); \
})
#endif
#endif
#define arch_align_stack(x) (x)


Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68knommu/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <linux/sys.h>
#include <linux/linkage.h>
#include <asm/thread_info.h>
#include <asm/errno.h>
#include <asm/setup.h>
#include <asm/segment.h>
Expand Down
16 changes: 9 additions & 7 deletions trunk/arch/m68knommu/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,15 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
#endif

pr_debug("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
"BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
(int) &_sdata, (int) &_edata,
(int) &_sbss, (int) &_ebss);
pr_debug("MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
(int) &_ebss, (int) memory_start,
(int) memory_start, (int) memory_end);
#ifdef DEBUG
printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
"BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
(int) &_sdata, (int) &_edata,
(int) &_sbss, (int) &_ebss);
printk(KERN_DEBUG "MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
(int) &_ebss, (int) memory_start,
(int) memory_start, (int) memory_end);
#endif

/* Keep a copy of command line */
*cmdline_p = &command_line[0];
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/m68knommu/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ void __init mem_init(void)
unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */
unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */

pr_debug("Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
#ifdef DEBUG
printk(KERN_DEBUG "Mem_init: start=%lx, end=%lx\n", start_mem, end_mem);
#endif

end_mem &= PAGE_MASK;
high_memory = (void *) end_mem;
Expand Down
18 changes: 6 additions & 12 deletions trunk/arch/m68knommu/platform/5206/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <asm/machdep.h>
#include <asm/coldfire.h>
Expand All @@ -20,6 +21,10 @@

/***************************************************************************/

void coldfire_reset(void);

/***************************************************************************/

static struct mcf_platform_uart m5206_uart_platform[] = {
{
.mapbase = MCF_MBAR + MCFUART_BASE1,
Expand Down Expand Up @@ -104,21 +109,10 @@ void mcf_settimericr(unsigned int timer, unsigned int level)

/***************************************************************************/

void m5206_cpu_reset(void)
{
local_irq_disable();
/* Set watchdog to soft reset, and enabled */
__raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR);
for (;;)
/* wait for watchdog to timeout */;
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
mach_reset = m5206_cpu_reset;
mach_reset = coldfire_reset;
}

/***************************************************************************/
Expand Down
18 changes: 6 additions & 12 deletions trunk/arch/m68knommu/platform/5206e/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <asm/machdep.h>
#include <asm/coldfire.h>
Expand All @@ -20,6 +21,10 @@

/***************************************************************************/

void coldfire_reset(void);

/***************************************************************************/

static struct mcf_platform_uart m5206e_uart_platform[] = {
{
.mapbase = MCF_MBAR + MCFUART_BASE1,
Expand Down Expand Up @@ -104,17 +109,6 @@ void mcf_settimericr(unsigned int timer, unsigned int level)

/***************************************************************************/

void m5206e_cpu_reset(void)
{
local_irq_disable();
/* Set watchdog to soft reset, and enabled */
__raw_writeb(0xc0, MCF_MBAR + MCFSIM_SYPCR);
for (;;)
/* wait for watchdog to timeout */;
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
mcf_setimr(MCFSIM_IMR_MASKALL);
Expand All @@ -125,7 +119,7 @@ void __init config_BSP(char *commandp, int size)
commandp[size-1] = 0;
#endif /* CONFIG_NETtel */

mach_reset = m5206e_cpu_reset;
mach_reset = coldfire_reset;
}

/***************************************************************************/
Expand Down
15 changes: 6 additions & 9 deletions trunk/arch/m68knommu/platform/520x/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <asm/machdep.h>
#include <asm/coldfire.h>
Expand All @@ -22,6 +23,10 @@

/***************************************************************************/

void coldfire_reset(void);

/***************************************************************************/

static struct mcf_platform_uart m520x_uart_platform[] = {
{
.mapbase = MCF_MBAR + MCFUART_BASE1,
Expand Down Expand Up @@ -164,17 +169,9 @@ void mcf_autovector(unsigned int vec)

/***************************************************************************/

static void m520x_cpu_reset(void)
{
local_irq_disable();
__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
mach_reset = m520x_cpu_reset;
mach_reset = coldfire_reset;
m520x_uarts_init();
m520x_fec_init();
}
Expand Down
Loading

0 comments on commit e9e9baa

Please sign in to comment.