[
  [
    "linux-2.6.23/drivers/usb/host/hcd-stm.c.orig", 
    "linux-2.6.23/drivers/usb/host/hcd-stm.c", 
    [
      "--- linux-2.6.23/drivers/usb/host/hcd-stm.c.orig", 
      "+++ linux-2.6.23/drivers/usb/host/hcd-stm.c", 
      "@@ -26,6 +26,58 @@", 
      "#define dgb_print(fmt, args...)", 
      "#endif", 
      "", 
      "+#include <linux/notifier.h>", 
      "+#include \"ohci.h\"", 
      "+#ifdef CONFIG_CPU_SUBTYPE_STX7105", 
      "+#define SYSCONF_BASE\t\t(0xfe001000)", 
      "+#define SYSCONF_DEVICEID\t(0x000)", 
      "+#define UHOST2C_BASE\t\t(0xfe100000)", 
      "+#define AHB2STBUS_OHCI_BASE\t(0x000ffc00)", 
      "+#define AHB2STBUS_EHCI_BASE\t(0x000ffe00)", 
      "+#else", 
      "+#define SYSCONF_BASE\t\t(0x19001000)", 
      "+#define SYSCONF_DEVICEID\t(0x000)", 
      "+#define UHOST2C_BASE\t\t(0x19100000)", 
      "+#define AHB2STBUS_OHCI_BASE\t(0x000ffc00)", 
      "+#define AHB2STBUS_EHCI_BASE\t(0x000ffe00)", 
      "+#endif", 
      "+", 
      "+static int hcd_stm_machine_restart_notifier(struct notifier_block *nb, unsigned long val, void *v)", 
      "+{", 
      "+\t// Check if it is a 7109.", 
      "+\tunsigned long sysconf;", 
      "+\tint chip_7109;", 
      "+\tunsigned int *addr;", 
      "+\taddr = ioremap_nocache(SYSCONF_BASE, 0x100);", 
      "+\tsysconf = readl(addr + SYSCONF_DEVICEID);", 
      "+\tiounmap(addr);", 
      "+\tchip_7109 = (((sysconf >> 12) & 0x3ff) == 0x02c);", 
      "+\tif (chip_7109) {", 
      "+\t\tunsigned long reg;", 
      "+\t\taddr = ioremap_nocache(UHOST2C_BASE, 0x100000);", 
      "+\t\treg = readl(addr + AHB2STBUS_OHCI_BASE + 0x04);", 
      "+\t\treg &= OHCI_CTRL_RWC;", 
      "+\t\twritel(reg, addr + AHB2STBUS_OHCI_BASE + 0x04);", 
      "+\t\tiounmap(addr);", 
      "+", 
      "+\t\taddr = ioremap_nocache(UHOST2C_BASE, 0x100000);", 
      "+\t\twritel(0, addr + AHB2STBUS_EHCI_BASE + 0x18); // intr_enable", 
      "+\t\treg = readl(addr + AHB2STBUS_EHCI_BASE + 0x10); // command", 
      "+\t\treg &= ~(1<<0); // cmd_run", 
      "+\t\twritel(reg, addr + AHB2STBUS_EHCI_BASE + 0x10);", 
      "+\t\twritel(0, addr + AHB2STBUS_EHCI_BASE + 0x50); // configured_flag", 
      "+\t\tiounmap(addr);", 
      "+\t}", 
      "+\treturn NOTIFY_OK;", 
      "+}", 
      "+", 
      "+static struct notifier_block hcd_stm_notifier_block = {", 
      "+\thcd_stm_machine_restart_notifier, NULL, 0", 
      "+};", 
      "+", 
      "+extern int register_machine_restart_notifier(struct notifier_block * nb);", 
      "+extern int unregister_machine_restart_notifier(struct notifier_block * nb);", 
      "+", 
      "static int st_usb_boot(struct platform_device *pdev)", 
      "{", 
      "struct plat_usb_data *pl_data = pdev->dev.platform_data;", 
      "@@ -299,12 +351,17 @@", 
      "", 
      "static int __init st_usb_init(void)", 
      "{", 
      "-\treturn platform_driver_register(&st_usb_driver);", 
      "+\tint retval = platform_driver_register(&st_usb_driver);", 
      "+\tstatic int reg = 1;", 
      "+\tif (reg) register_machine_restart_notifier(&hcd_stm_notifier_block);", 
      "+\treg = 0;", 
      "+\treturn retval;", 
      "}", 
      "", 
      "static void __exit st_usb_exit(void)", 
      "{", 
      "platform_driver_unregister(&st_usb_driver);", 
      "+\tunregister_machine_restart_notifier(&hcd_stm_notifier_block);", 
      "}", 
      "", 
      "MODULE_LICENSE(\"GPL\");"
    ]
  ]
]