View Single Post
Old 02-03-2007, 08:31 PM   #5
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Code:
*** USBTG_EBOOK4_20060801/usbtarget/dbmx1/dbmx1_usbtg.c   Fri May 12 23:48:50 2006
--- USBTG_EBOOK4_20061205/usbtarget/dbmx1/dbmx1_usbtg.c       Tue Dec  5 20:18:28 2006
***************
*** 3029,3035 ****
--- 3029,3038 ----
    switch (rqst) {
  
    case PM_RESUME:  /* USB ON */
+       //printk("PM RESUME\n");
+       /* PRS-500 device is not require this 2006.11.01
      if (dev->pm_status != USBTG_PM_ON) {
+       dev->pm_status = USBTG_PM_ON;
        if (usbtg_init_device() < 0) {
          ERROR("error - failed to initialize device!");
          return -1;
***************
*** 3044,3054 ****
        dev->pm_status = USBTG_PM_ON;
        INFO(1, "[PM] On");
      }
!     dragonball_gpio_set_bit(PORT_A, 20, 1); // test
      //printk("usb resume!\n");
      break;
  
    case PM_SUSPEND:
      usbtg_stop_monitor_vbus();
      if (dev->pm_status == USBTG_PM_ON) {
        usbtg_shutdown_device();
--- 3047,3063 ----
        dev->pm_status = USBTG_PM_ON;
        INFO(1, "[PM] On");
      }
!       */
!     //dragonball_gpio_set_bit(PORT_A, 20, 1); // test -> comment out 061101
      //printk("usb resume!\n");
      break;
  
    case PM_SUSPEND:
+       //printk("PM SUSPEND\n");
+       if( IS_VBUS_ACTIVE(dev->is_vbus) ) {
+         //printk("PM SUSPEND with vbus active!!\n");
+         return -1; // add 2006.12.05
+       }
      usbtg_stop_monitor_vbus();
      if (dev->pm_status == USBTG_PM_ON) {
        usbtg_shutdown_device();
***************
*** 3078,3084 ****
        break;
      }
      usbtg_suspend();
!     dragonball_gpio_set_bit(PORT_A, 20, 0); // test
      break;
  
  #ifdef CONFIG_SNSC
--- 3087,3093 ----
        break;
      }
      usbtg_suspend();
!     //dragonball_gpio_set_bit(PORT_A, 20, 0); // test -> comment out 061101
      break;
  
  #ifdef CONFIG_SNSC
THe USBTG code is the target driver that handles the USB port when the Portable Reader is communicating with a PC. The change is to optimize out code that isn't needed on the PRS (but was possibly needed on the LIbrie.)

Hopefully the proprietary software got some modifications as well.

I certainly appreciate Sony releasing the GPL source in *advance* of the firmware release, rather than months/years/never like some firms.
scotty1024 is offline   Reply With Quote