diff --git a/arch/arm/mach-ezx/apm.c b/arch/arm/mach-ezx/apm.c
index de7365f..3ab6872 100755
--- a/arch/arm/mach-ezx/apm.c
+++ b/arch/arm/mach-ezx/apm.c
@@ -278,7 +278,7 @@ static void check_wakeup(void)
unsigned long flags;
unsigned long source = PEDR & PEDR_bitmap;
- printk(KERN_INFO "wakeup: PKSR=0x%x, PEDR=0x%x\n", PKSR, PEDR);
+// printk(KERN_INFO "wakeup: PKSR=0x%x, PEDR=0x%x\n", PKSR, PEDR);
if (source == 0)
return;
@@ -337,23 +337,34 @@ static int pm_go_sleep(int arg)
return 0;
#endif
if ((can_sleep && (!ipc_is_active()) && (!periodic_wake)) || arg) {
+ printk(KERN_INFO "can sleep: ipc and periodic wake disabled\n");
local_irq_save(flags);
if (pm_send_all(PM_SUSPEND, (void *)3) == 0) {
+ printk(KERN_INFO "can sleep: send ok\n");
ezx_i2c_pm_suspend();
wmmx_ohci_suspend_call();
if (!irq_pending()) {
+ printk(KERN_INFO "can slee: no penging irq\n");
if(usb_host_suspended)
UP3OCR = 0x3;
pm_do_suspend(CPUMODE_SLEEP);
clear_dpcsr();
- }
- APM_DPRINTK("resume\n");
+ } else {
+ printk(KERN_INFO "cant sleep: irq pending\n");
+ }
+ // APM_DPRINTK("resume\n");
ezx_i2c_pm_resume();
pm_send_all(PM_RESUME, (void *)0);
check_wakeup();
- }
+ } else {
+ printk(KERN_INFO "cant sleep: send failed\n");
+ }
local_irq_restore(flags);
+ } else {
+ printk(KERN_INFO "cant sleep ipc: %d periodic wake:%d.\n", ipc_is_active(), periodic_wake);
}
+
+
return 0;
}
@@ -378,14 +389,14 @@ void pm_do_poweroff(void)
PWER &= ~0x8000ffff;
local_irq_save(flags);
- printk("Poweroff, Begin to wait BP_RDY signal.\n");
+// printk("Poweroff, Begin to wait BP_RDY signal.\n");
pm_send_all(PM_SUSPEND, (void *)3);
start = OSCR;
*(unsigned long *)(phys_to_virt(BPSIG_ADDR)) = NO_FLAG;
do {
if( !(GPLR(GPIO_BP_RDY) & GPIO_bit(GPIO_BP_RDY))){
- printk(KERN_DEBUG"got BP_RDY signal.\n");
+ // printk(KERN_DEBUG"got BP_RDY signal.\n");
GPDR(GPIO_WDI_AP) |= GPIO_bit(GPIO_WDI_AP);
GPCR(GPIO_WDI_AP) = GPIO_bit(GPIO_WDI_AP);
@@ -393,7 +404,7 @@ void pm_do_poweroff(void)
}
if ((OSCR - start) >= POWER_OFF_TIMEOUT) {
- printk(KERN_DEBUG "timeout when power down\n");
+ // printk(KERN_DEBUG "timeout when power down\n");
mdelay(1);
GPDR(GPIO_WDI_AP) |= GPIO_bit(GPIO_WDI_AP);
GPCR(GPIO_WDI_AP) = GPIO_bit(GPIO_WDI_AP);
@@ -499,15 +510,15 @@ static int do_ioctl(struct inode * inode, struct file *filp,
break;
case APM_IOC_SET_SPROF_WIN:
sleep_to = arg * HZ;
- APM_DPRINTK("do_ioctl: sleep timeout %ld\n", arg);
+// APM_DPRINTK("do_ioctl: sleep timeout %ld\n", arg);
break;
case APM_IOC_WAKEUP_ENABLE:
PWER |= arg;
- APM_DPRINTK("do_ioctl: enable wakeup source:PWER=0x%x\n", PWER);
+// APM_DPRINTK("do_ioctl: enable wakeup source:PWER=0x%x\n", PWER);
break;
case APM_IOC_WAKEUP_DISABLE:
PWER &= ~arg;
- APM_DPRINTK("do_ioctl: disable wakeup source:PWER=0x%x\n", PWER);
+// APM_DPRINTK("do_ioctl: disable wakeup source:PWER=0x%x\n", PWER);
break;
case APM_IOC_POWEROFF:
APM_DPRINTK("do_ioctl: do power off\n");
diff --git a/drivers/usb/ipcusb.c b/drivers/usb/ipcusb.c
index 47e29e6..8cf49e1 100755
--- a/drivers/usb/ipcusb.c
+++ b/drivers/usb/ipcusb.c
@@ -116,16 +116,16 @@ int in_bprdy_interrupt(void)
void set_in_bprdy_interrupt(void)
{
bprdy_interrupt_handling = 1;
-#ifdef BVD_DEBUG
- printk("bprdy handling set\n");
-#endif
+//#ifdef BVD_DEBUG
+// printk("bprdy handling set\n");
+//#endif
}
void clear_in_bprdy_interrupt(void)
{
bprdy_interrupt_handling = 0;
-#ifdef BVD_DEBUG
- printk("bprdy handling cleared\n");
-#endif
+//#ifdef BVD_DEBUG
+// printk("bprdy handling cleared\n");
+//#endif
}
static int ipc_traffic = 0;
@@ -149,18 +149,18 @@ MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_LICENSE("GPL");
-#ifdef BVD_DEBUG
-#define bvd_dbg(format, arg...) printk(__FILE__ ": " format "\n" , ## arg)
-#else
+//#ifdef BVD_DEBUG
+//#define bvd_dbg(format, arg...) printk(__FILE__ ": " format "\n" , ## arg)
+//#else
#define bvd_dbg(format, arg...) do {} while (0)
-#endif
+//#endif
-#define USB_RESUME_SUSPEND_DEBUG
-#ifdef USB_RESUME_SUSPEND_DEBUG
-#define resume_suspend_dbg(format, arg...) printk(__FILE__ ": " format "\n" , ## arg)
-#else
+//#define USB_RESUME_SUSPEND_DEBUG
+//#ifdef USB_RESUME_SUSPEND_DEBUG
+//#define resume_suspend_dbg(format, arg...) printk(__FILE__ ": " format "\n" , ## arg)
+//#else
#define resume_suspend_dbg(format, arg...) do {} while (0)
-#endif
+//#endif
/* USB device context */
typedef struct {
struct list_head list;
@@ -502,7 +502,7 @@ static void suspend_timeout(unsigned long data)
while(!(UHCRHPS3 & 0x4)) mdelay(1);
// ipc_traffic = 0;
host_port_suspended = 1;
- printk("ipc-suspend\n");
+ printk(KERN_INFO "ipc-suspend\n");
if(in_bprdy_interrupt())
clear_in_bprdy_interrupt();
}
@@ -624,7 +624,7 @@ static void ipcusb_xmit_data(void)
UHCRHPS3 = 0x8;
while(!(UHCRHPS3 & (1<<18))) mdelay(1);
UHCRHPS3 = 1<<18; // Write 1 to clear
- printk("\nipc-resume[0x%x]\n",UHCRHPS3);
+ printk(KERN_INFO "ipc-resume[0x%x]\n",UHCRHPS3);
//printk("ipcusb_xmit_data: Send RESUME signal! UHCRHPS3=0x%x\n", UHCRHPS3);
host_port_suspended = 0;
mdelay(3);
@@ -693,7 +693,7 @@ static void ipcusb_softint_send_readurb(void *private)
}
UHCRHPS3 = 1<<18; // Write 1 to clear
host_port_suspended = 0;
- printk("\nipc-resume[0x%x]\n", UHCRHPS3);
+ printk(KERN_INFO "ipc-resume[0x%x]\n", UHCRHPS3);
mdelay(3);
set_BLE();
}
@@ -790,7 +790,7 @@ static int usb_ipc_chars_in_buffer(struct tty_struct *tty)
void usb_send_readurb( void )
{
- printk("\nusb_send_readurb:UHCRHPS3[0x%x]\n", UHCRHPS3);
+// printk("\nusb_send_readurb:UHCRHPS3[0x%x]\n", UHCRHPS3);
queue_task(&bvd_ipc->tqueue_bp, &tq_immediate);
mark_bh(IMMEDIATE_BH);