From: Leblanc f. <fle...@us...> - 2002-03-07 09:15:19
|
Update of /cvsroot/linux-mips/linux/arch/mips/vr4111/casio In directory usw-pr-cvs1:/tmp/cvs-serv3157/arch/mips/vr4111/casio Modified Files: setup.c Log Message: Adds more VR stuff for Cassiopeia E15 Support. Index: setup.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/vr4111/casio/setup.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- setup.c 2 Jan 2002 19:12:17 -0000 1.2 +++ setup.c 7 Mar 2002 09:15:16 -0000 1.3 @@ -19,32 +19,45 @@ #include <linux/config.h> #include <linux/console.h> +#ifdef CONFIG_IDE #include <linux/ide.h> +#endif #include <linux/init.h> #include <linux/delay.h> #include <asm/time.h> #include <asm/reboot.h> #include <asm/vr41xx.h> #include <asm/io.h> +#ifdef CONFIG_PM_SUSPEND_WAKEUP +#include <asm/power.h> +#endif extern void vr41xx_restart(char *c); +extern void vr4111_standby(void); +extern void vr4111_suspend(void); extern void vr4111_hibernate(void); extern void vr4111_wait(void); extern void vr4111_time_init(void); extern void vr4111_timer_setup(void); extern void vr4111_init_serial(void); +extern void vr41xx_xblink_led(unsigned int times, unsigned int time_on, unsigned int time_off); #ifdef CONFIG_BLK_DEV_IDE extern struct ide_ops std_ide_ops; +//extern struct ide_ops vr41xx_ide_ops; #endif +struct semaphore vr41xx_dma_sem; + +#ifdef CONFIG_PCMCIA void __init put_cf_reg(unsigned char reg, unsigned char val) { /* PCMCIA controller (VG469) is mapped here */ outb(reg, 0x3e0); outb(val, 0x3e1); } +#endif void __init bus_error_init(void) { @@ -52,32 +65,46 @@ void __init casio_e15_setup(void) { - unsigned short val; - - mips_io_port_base = VR41XX_PORT_BASE; + + set_io_port_base(VR41XX_PORT_BASE); isa_slot_offset = VR41XX_ISAMEM_BASE; board_time_init = vr4111_time_init; board_timer_setup = vr4111_timer_setup; +#ifdef CONFIG_PM_SUSPEND_WAKEUP + _machine_restart = do_wakeup; +#else _machine_restart = vr41xx_restart; +#endif _machine_halt = vr4111_hibernate; - _machine_power_off = vr4111_hibernate; + _machine_power_off = vr4111_suspend; cpu_wait = vr4111_wait; - + #ifdef CONFIG_BLK_DEV_IDE ide_ops = &std_ide_ops; + //ide_ops = &vr41xx_ide_ops; #endif #ifdef CONFIG_FB conswitchp = &dummy_con; #endif +#ifdef CONFIG_PCMCIA /* Reset the PCMCIA and CF and power them off */ put_cf_reg(0x03, 0x20); /* Socket 0 */ put_cf_reg(0x43, 0x20); /* Socket 1 */ put_cf_reg(0x02, 0x00); /* Socket 0 */ put_cf_reg(0x42, 0x00); /* Socket 1 */ +#endif vr4111_init_serial(); + + // Insure that vr41xx_dma_sem is initialized as unlocked, even + // in the case of a failed hibernate/wakeup: + init_MUTEX(&vr41xx_dma_sem); + +#ifdef CONFIG_VR41XX_LED + vr41xx_xblink_led(4, 16, 4); +#endif } |