[xtensa-cvscommit] linux/arch/xtensa/platform-iss setup.c,1.1.1.1,1.2
Brought to you by:
zankel
|
From: <joe...@us...> - 2002-10-18 21:57:31
|
Update of /cvsroot/xtensa/linux/arch/xtensa/platform-iss
In directory usw-pr-cvs1:/tmp/cvs-serv1903/arch/xtensa/platform-iss
Modified Files:
setup.c
Log Message:
Fix three reset functions: machine_restart(), machine_halt(), and machine_power_off(). They no longer call xt_panic() to hang the system, but try to do something meaningful in the context of Xtensa and the XT2000 or ISS platforms, as appropriate.
Index: setup.c
===================================================================
RCS file: /cvsroot/xtensa/linux/arch/xtensa/platform-iss/setup.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** setup.c 28 Aug 2002 16:10:14 -0000 1.1.1.1
--- setup.c 18 Oct 2002 21:57:27 -0000 1.2
***************
*** 5,9 ****
* Platform specific initialization.
*
! * Author: Chris Zankel <za...@te...>
*
* Copyright 2001 Tensilica Inc.
--- 5,10 ----
* Platform specific initialization.
*
! * Authors: Chris Zankel <za...@te...>
! * Joe Taylor <jo...@te...>
*
* Copyright 2001 Tensilica Inc.
***************
*** 38,41 ****
--- 39,47 ----
extern void rs_init(void);
extern void xtensa_console_init(void);
+ extern void reset_mmu(void);
+ extern void (*mach_restart)(char *);
+ extern void (*mach_halt)(void);
+ extern void (*mach_power_off)(void);
+
void __init platform_init(bp_tag_t* bootparam)
***************
*** 45,53 ****
}
- void __init iss_setup(char **p_cmdline)
- {
- rs_init();
- }
-
int iss_get_cpuinfo(char *buffer)
{
--- 51,54 ----
***************
*** 55,59 ****
len = sprintf(buffer, "vendor\t\t: Tensilica\n");
! len += sprintf(buffer+len, "platform\t\t: XT2000\n");
len += sprintf(buffer+len, "memory type\t: SDRAM\n");
--- 56,60 ----
len = sprintf(buffer, "vendor\t\t: Tensilica\n");
! len += sprintf(buffer+len, "platform\t\t: ISS\n");
len += sprintf(buffer+len, "memory type\t: SDRAM\n");
***************
*** 62,73 ****
! void iss_restart(char *cmd)
{
! while(1);
}
! void iss_power_off(void)
{
! while(1);
}
--- 63,109 ----
! static void iss_halt(void)
{
! printk (" ** Called iss_halt(), looping forever! **\n");
! cli();
! while (1);
}
! static void iss_power_off(void)
{
! printk (" ** Called iss_power_off(), looping forever! **\n");
! cli();
! while (1);
! }
! static void iss_restart(char *cmd)
! {
! /* Flush and reset the mmu, simulate a processor reset, and
! * jump to the reset vector. */
!
! reset_mmu();
! __asm__ __volatile__ ("movi a2, 15\n\t"
! "wsr a2, " XTSTR(ICOUNTLEVEL) "\n\t"
! "movi a2, 0\n\t"
! "wsr a2, " XTSTR(ICOUNT) "\n\t"
! "wsr a2, " XTSTR(IBREAKENABLE) "\n\t"
! "wsr a2, " XTSTR(LCOUNT) "\n\t"
! "movi a2, 0x1f\n\t"
! "wsr a2, " XTSTR(PS) "\n\t"
! "isync\n\t"
! "jx %0\n\t"
! :
! : "a" (XCHAL_RESET_VECTOR_VADDR)
! : "a2"
! );
!
! /* control never gets here */
}
+ void __init iss_setup(char **p_cmdline)
+ {
+ rs_init();
+
+ mach_restart = iss_restart;
+ mach_halt = iss_halt;
+ mach_power_off = iss_power_off;
+ }
|