Update of /cvsroot/linux-mips/linux/arch/mips/au1000/pb1000
In directory usw-pr-cvs1:/tmp/cvs-serv14591/arch/mips/au1000/pb1000
Modified Files:
init.c setup.c
Log Message:
Added preliminary power management supuport:
* turn off the clocks to the uarts when not used
* turn off the clocks to the ethernets when not used
* adhoc /proc interface for putting the cpu to sleep and
dynamically scaling the cpu frequency.
* fixed a pci compile problem
Index: init.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/au1000/pb1000/init.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** init.c 2001/08/17 22:53:26 1.2
--- init.c 2001/08/28 07:23:54 1.3
***************
*** 43,50 ****
char **prom_argv, **prom_envp;
extern void __init prom_init_cmdline(void);
int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
{
- char *env;
unsigned char *memsize_str;
unsigned long memsize;
--- 43,50 ----
char **prom_argv, **prom_envp;
extern void __init prom_init_cmdline(void);
+ extern char *prom_getenv(char *envname);
int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
{
unsigned char *memsize_str;
unsigned long memsize;
Index: setup.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/au1000/pb1000/setup.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** setup.c 2001/08/25 02:19:27 1.5
--- setup.c 2001/08/28 07:23:54 1.6
***************
*** 60,84 ****
extern struct rtc_ops no_rtc_ops;
extern char * __init prom_getcmdline(void);
! extern void au1000_restart(void);
extern void au1000_halt(void);
extern void au1000_power_off(void);
- struct {
- struct resource ram;
- struct resource io;
- struct resource sram;
- struct resource flash;
- struct resource boot;
- struct resource pcmcia;
- struct resource lcd;
- } au1000_resources = {
- { "RAM", 0, 0x3FFFFFF, IORESOURCE_MEM },
- { "I/O", 0x10000000, 0x119FFFFF },
- { "SRAM", 0x1e000000, 0x1E03FFFF },
- { "System Flash", 0x1F800000, 0x1FBFFFFF },
- { "Boot ROM", 0x1FC00000, 0x1FFFFFFF },
- { "PCMCIA", 0x20000000, 0x27FFFFFF },
- { "LCD", 0x60000000, 0x603FFFFF },
- };
void au1000_wbflush(void)
--- 60,69 ----
extern struct rtc_ops no_rtc_ops;
extern char * __init prom_getcmdline(void);
! extern void au1000_restart(char *);
extern void au1000_halt(void);
extern void au1000_power_off(void);
+ extern struct resource ioport_resource;
+ extern struct resource iomem_resource;
void au1000_wbflush(void)
***************
*** 95,99 ****
#ifdef CONFIG_AU1000_SERIAL_CONSOLE
! if ((argptr = strstr(argptr, "console=ttyS0")) == NULL) {
argptr = prom_getcmdline();
strcat(argptr, " console=ttyS0,115200");
--- 80,84 ----
#ifdef CONFIG_AU1000_SERIAL_CONSOLE
! if ((argptr = strstr(argptr, "console=")) == NULL) {
argptr = prom_getcmdline();
strcat(argptr, " console=ttyS0,115200");
***************
*** 103,116 ****
rtc_ops = &no_rtc_ops;
__wbflush = au1000_wbflush;
! _machine_restart = au1000_restart;
! _machine_halt = au1000_halt;
! _machine_power_off = au1000_power_off;
/*
* IO/MEM resources.
*/
! mips_io_port_base = KSEG1;
! ioport_resource.start = au1000_resources.io.start;
! ioport_resource.end = au1000_resources.lcd.end;
#ifdef CONFIG_BLK_DEV_INITRD
--- 88,103 ----
rtc_ops = &no_rtc_ops;
__wbflush = au1000_wbflush;
! //_machine_restart = au1000_restart;
! //_machine_halt = au1000_halt;
! //_machine_power_off = au1000_power_off;
/*
* IO/MEM resources.
*/
! mips_io_port_base = 0;
! ioport_resource.start = 0;
! ioport_resource.end = 0xffffffff;
! iomem_resource.start = 0;
! ioport_resource.end = 0xffffffff;
#ifdef CONFIG_BLK_DEV_INITRD
***************
*** 143,150 ****
#endif
outl(usb_clocks, CLOCK_SOURCE_CNTRL);
udelay(1000);
- #ifdef CONFIG_USB_OHCI
// enable host controller and wait for reset done
outl(0x08, USB_HOST_CONFIG);
--- 130,138 ----
#endif
+ #ifdef CONFIG_USB_OHCI
+
outl(usb_clocks, CLOCK_SOURCE_CNTRL);
udelay(1000);
// enable host controller and wait for reset done
outl(0x08, USB_HOST_CONFIG);
***************
*** 217,223 ****
#endif
! outl(PC_CNTRL_E0 | PC_CNTRL_EN0 | PC_CNTRL_EN0, PC_COUNTER_CNTRL);
while (inl(PC_COUNTER_CNTRL) & PC_CNTRL_T0S);
! outl(0x8000-1, PC0_TRIM);
printk("Alchemy Semi PB1000 Board\n");
--- 205,221 ----
#endif
! #ifndef CONFIG_SERIAL_NONSTANDARD
! /* don't touch the default serial console */
! outl(0, UART0_ADDR + UART_CLK);
! #endif
! outl(0, UART1_ADDR + UART_CLK);
! outl(0, UART2_ADDR + UART_CLK);
! outl(0, UART3_ADDR + UART_CLK);
!
! while (inl(PC_COUNTER_CNTRL) & PC_CNTRL_E0S);
! outl(PC_CNTRL_E0 | PC_CNTRL_EN0, PC_COUNTER_CNTRL);
! au_sync();
while (inl(PC_COUNTER_CNTRL) & PC_CNTRL_T0S);
! outl(0, PC0_TRIM);
printk("Alchemy Semi PB1000 Board\n");
|