Ignore:
Timestamp:
2012-03-27T17:38:56+02:00 (5 years ago)
Author:
hauke
Message:

brcm47xx: update usb driver to the version send for mainline kernel integartion

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/patches-3.2/180-USB-OHCI-Add-a-generic-platform-device-driver.patch

    r31088 r31089  
    1 From 2232a2ab6015496fecdfad68a9d6794312a9b2f2 Mon Sep 17 00:00:00 2001 
    2 From: Hauke Mehrtens <hauke@hauke-m.de> 
    3 Date: Sat, 26 Nov 2011 21:20:54 +0100 
    4 Subject: [PATCH 181/186] USB: OHCI: Add a generic platform device driver 
    5  
    6 This adds a generic driver for platform devices. It works like the PCI 
    7 driver and is based on it. This is for devices which do not have an own 
    8 bus but their OHCI controller works like a PCI controller. It will be 
    9 used for the Broadcom bcma and ssb USB OHCI controller. 
    10  
    11 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> 
    12 --- 
    13  drivers/usb/host/Kconfig         |   10 ++ 
    14  drivers/usb/host/ohci-hcd.c      |    5 + 
    15  drivers/usb/host/ohci-platform.c |  183 ++++++++++++++++++++++++++++++++++++++ 
    16  3 files changed, 198 insertions(+), 0 deletions(-) 
    17  create mode 100644 drivers/usb/host/ohci-platform.c 
    18  
    191--- a/drivers/usb/host/Kconfig 
    202+++ b/drivers/usb/host/Kconfig 
     
    246  
    257+config USB_OHCI_HCD_PLATFORM 
    26 +       bool "OHCI driver for a platform device" 
     8+       bool "Generic OHCI driver for a platform device" 
    279+       depends on USB_OHCI_HCD && EXPERIMENTAL 
    2810+       default n 
     
    5234--- /dev/null 
    5335+++ b/drivers/usb/host/ohci-platform.c 
    54 @@ -0,0 +1,183 @@ 
     36@@ -0,0 +1,194 @@ 
    5537+/* 
    5638+ * Generic platform ohci driver 
     
    6951+ */ 
    7052+#include <linux/platform_device.h> 
    71 +#include <linux/usb/hci_driver.h> 
     53+#include <linux/usb/ohci_pdriver.h> 
    7254+ 
    7355+static int ohci_platform_reset(struct usb_hcd *hcd) 
    7456+{ 
     57+       struct platform_device *pdev = to_platform_device(hcd->self.controller); 
     58+       struct usb_ohci_pdata *pdata = pdev->dev.platform_data; 
    7559+       struct ohci_hcd *ohci = hcd_to_ohci(hcd); 
    7660+       int err; 
     61+ 
     62+       if (pdata->big_endian_desc) 
     63+               ohci->flags |= OHCI_QUIRK_BE_DESC; 
     64+       if (pdata->big_endian_mmio) 
     65+               ohci->flags |= OHCI_QUIRK_BE_MMIO; 
     66+       if (pdata->no_big_frame_no) 
     67+               ohci->flags |= OHCI_QUIRK_FRAME_NO; 
    7768+ 
    7869+       ohci_hcd_init(ohci); 
     
    131122+       int irq; 
    132123+       int err = -ENOMEM; 
     124+ 
     125+       BUG_ON(!dev->dev.platform_data); 
    133126+ 
    134127+       if (usb_disabled()) 
     
    236229+       } 
    237230+}; 
     231--- /dev/null 
     232+++ b/include/linux/usb/ohci_pdriver.h 
     233@@ -0,0 +1,38 @@ 
     234+/* 
     235+ * Copyright (C) 2012 Hauke Mehrtens <hauke@hauke-m.de> 
     236+ * 
     237+ * This program is free software; you can redistribute it and/or modify it 
     238+ * under the terms of the GNU General Public License as published by the 
     239+ * Free Software Foundation; either version 2 of the License, or (at your 
     240+ * option) any later version. 
     241+ * 
     242+ * This program is distributed in the hope that it will be useful, but 
     243+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
     244+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License 
     245+ * for more details. 
     246+ * 
     247+ * You should have received a copy of the GNU General Public License 
     248+ * along with this program; if not, write to the Free Software Foundation, 
     249+ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
     250+ */ 
     251+ 
     252+#ifndef __USB_CORE_OHCI_PDRIVER_H 
     253+#define __USB_CORE_OHCI_PDRIVER_H 
     254+ 
     255+/** 
     256+ * struct usb_ohci_pdata - platform_data for generic ohci driver 
     257+ * 
     258+ * @big_endian_desc:   BE descriptors 
     259+ * @big_endian_mmio:   BE registers 
     260+ * @no_big_frame_no:   no big endian frame_no shift 
     261+ * 
     262+ * These are general configuration options for the OHCI controller. All of 
     263+ * these options are activating more or less workarounds for some hardware. 
     264+ */ 
     265+struct usb_ohci_pdata { 
     266+       unsigned        big_endian_desc:1; 
     267+       unsigned        big_endian_mmio:1; 
     268+       unsigned        no_big_frame_no:1; 
     269+}; 
     270+ 
     271+#endif /* __USB_CORE_OHCI_PDRIVER_H */ 
Note: See TracChangeset for help on using the changeset viewer.