brcm2708: switch to linux 4.4 and update patches
[openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0141-dwc_otg-Add-ARCH_BCM2835-support.patch
1 From 0766d30c4de9ca5c7e5f84328744ca39d243510d Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
3 Date: Fri, 24 Jul 2015 15:50:04 +0200
4 Subject: [PATCH 141/222] dwc_otg: Add ARCH_BCM2835 support
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
10 ---
11  drivers/usb/host/dwc_otg/dwc_otg_driver.c    | 1 +
12  drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c  | 1 -
13  drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 4 ++++
14  3 files changed, 5 insertions(+), 1 deletion(-)
15
16 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c
17 +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c
18 @@ -723,6 +723,7 @@ static int dwc_otg_driver_probe(
19  
20         memset(dwc_otg_device, 0, sizeof(*dwc_otg_device));
21         dwc_otg_device->os_dep.reg_offset = 0xFFFFFFFF;
22 +       dwc_otg_device->os_dep.platformdev = _dev;
23  
24         /*
25          * Map the DWC_otg Core memory into virtual address space.
26 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
27 +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
28 @@ -36,7 +36,6 @@
29  #include "dwc_otg_regs.h"
30  
31  #include <linux/jiffies.h>
32 -#include <mach/hardware.h>
33  #include <asm/fiq.h>
34  
35  
36 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
37 +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
38 @@ -445,7 +445,11 @@ static void hcd_init_fiq(void *cookie)
39                 DWC_WARN("MPHI periph has NOT been enabled");
40  #endif
41         // Enable FIQ interrupt from USB peripheral
42 +#ifdef CONFIG_ARCH_BCM2835
43 +       enable_fiq(platform_get_irq(otg_dev->os_dep.platformdev, 1));
44 +#else
45         enable_fiq(INTERRUPT_VC_USB);
46 +#endif
47         local_fiq_enable();
48  }
49