diff --git a/projects/RPi/patches/linux/linux-01-RPi_support-f7bef2e.patch b/projects/RPi/patches/linux/linux-01-RPi_support-d404f17.patch similarity index 99% rename from projects/RPi/patches/linux/linux-01-RPi_support-f7bef2e.patch rename to projects/RPi/patches/linux/linux-01-RPi_support-d404f17.patch index d11a9965bc..611ca5ee13 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support-f7bef2e.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support-d404f17.patch @@ -1,4 +1,4 @@ -From ad0db0e90f50ac83b02e62c9ace019a0f98ce44f Mon Sep 17 00:00:00 2001 +From f2a0e9ea514bb20c79f9678f6849aecd8adc7043 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 Subject: [PATCH 001/114] Main bcm2708 linux port @@ -6510,7 +6510,7 @@ index 1f8fed9..f0ee034 100644 select CPU_ABRT_EV6 select CPU_CACHE_V6 diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S -index 45dc29f..c365a3e 100644 +index 32b3558..4712ccb 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S @@ -73,10 +73,19 @@ ENDPROC(cpu_v6_reset) @@ -8562,7 +8562,7 @@ index 362927c4..e23fffb 100644 1.8.5.5 -From 6a4b92da01a6986f4f413584430c9c666a26cc78 Mon Sep 17 00:00:00 2001 +From 8d8c0af2b43c0b0818e634673eee55c0897cc89b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 7 May 2013 22:20:24 +0100 Subject: [PATCH 002/114] Add quick config. @@ -8781,7 +8781,7 @@ index 0000000..e5efe75 1.8.5.5 -From 9c8b9033b0c5e2dd8ca9b38a1ea0659da330e78e Mon Sep 17 00:00:00 2001 +From db70a1fdce50c0957c303e33151d2f0436c9b4a4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 Subject: [PATCH 003/114] Add dwc_otg driver @@ -65856,7 +65856,7 @@ index 0000000..cdc9963 1.8.5.5 -From 77dadb820565427eb2f7ed36dd9fad629764ba20 Mon Sep 17 00:00:00 2001 +From 4b849c0d4013a8561f918e79f64aaadbd30e45da Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 Subject: [PATCH 004/114] bcm2708 watchdog driver @@ -66292,7 +66292,7 @@ index 0000000..2f19203 1.8.5.5 -From 004c3448a678c9e66f794372ff04324cb553044a Mon Sep 17 00:00:00 2001 +From 4fe339a280839f023b7f72020770c435e58c0cd7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 Subject: [PATCH 005/114] bcm2708 framebuffer driver @@ -69334,7 +69334,7 @@ index 3c14e43..7626beb 100644 1.8.5.5 -From 3b64636909d324d22167261eef8abe369964945b Mon Sep 17 00:00:00 2001 +From a58b4b4f0b4bd91b39dc02f3152aef84c7a4c82a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 Subject: [PATCH 006/114] bcm2708 vchiq driver @@ -81838,7 +81838,7 @@ index 0000000..b6bfa21 1.8.5.5 -From 7d7ca91c026f29d730fe915d5682d994b906d006 Mon Sep 17 00:00:00 2001 +From 17620b27115fe005b653620aab7ec3415a4da22f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 Subject: [PATCH 007/114] cma: Add vc_cma driver to enable use of CMA @@ -83131,7 +83131,7 @@ index 0000000..5325832 1.8.5.5 -From b450711b7109a35ffdb4d500286a71350876affd Mon Sep 17 00:00:00 2001 +From 8ada8642472402426d3ca8adf7df0ed228db21b3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 Subject: [PATCH 008/114] bcm2708: alsa sound driver @@ -85456,7 +85456,7 @@ index 0000000..af3e6eb 1.8.5.5 -From e9935576836463f3cd126f885e7b422a621bd12c Mon Sep 17 00:00:00 2001 +From efca2e15978a2d5fd87853a1990fc4ae8d614397 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 Subject: [PATCH 009/114] Allow mac address to be set in smsc95xx @@ -85467,7 +85467,7 @@ Signed-off-by: popcornmix 1 file changed, 56 insertions(+) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index 3f38ba8..60076fe 100644 +index 9375b8c..f024562 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -61,6 +61,7 @@ @@ -85553,7 +85553,7 @@ index 3f38ba8..60076fe 100644 1.8.5.5 -From 1a78d6b8a284e9783426ea47f376d7b9e3d6062b Mon Sep 17 00:00:00 2001 +From 7fa8e3f3cc902e9d26508e88b4a8332cb4e68691 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 May 2012 23:12:13 +0100 Subject: [PATCH 010/114] Fixes for sdhci-bcm2708 @@ -86808,7 +86808,7 @@ index e23fffb..b1b6537 100644 1.8.5.5 -From 2d4aa45aadcd4ccfb3851bde127d069ff5c818cf Mon Sep 17 00:00:00 2001 +From 8b6014492ae1ba89be37c882e4834130f9a2a7c4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Nov 2013 18:56:10 +0000 Subject: [PATCH 011/114] Add Chris Boot's i2c and spi drivers. @@ -88175,7 +88175,7 @@ index 0000000..180264a 1.8.5.5 -From 05c90e82a8030661c9a65f3fe599d080885ad4c4 Mon Sep 17 00:00:00 2001 +From 44fa86d19dfce204158bb17b18d9cbe89c386069 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 Subject: [PATCH 012/114] enabling the realtime clock 1-wire chip DS1307 and @@ -88241,7 +88241,7 @@ index 63b8273..2a36411 100644 1.8.5.5 -From e9cf5a49e985fc5349aaf9b63ca166892d810d39 Mon Sep 17 00:00:00 2001 +From 1d2dc959408773e9ea8a83557705feed704a5138 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:46:42 +0100 Subject: [PATCH 013/114] Add FIQ patch to dwc_otg driver. Enable with @@ -89404,7 +89404,7 @@ index e46d9bb..6b2c7d0 100644 1.8.5.5 -From 9a8f74d92f3d96f412e55c283c39f1ad01d04fea Mon Sep 17 00:00:00 2001 +From 8bd0cae670b92565acdf67c3aa313edb8f76fdce Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Sep 2012 15:17:53 +0100 Subject: [PATCH 016/114] Avoid dynamic memory allocation for channel lock in @@ -89514,7 +89514,7 @@ index b7b6b0c..76b5085 100644 1.8.5.5 -From afeae3ba4bee6d9efebc964ee1828d0b59b97f78 Mon Sep 17 00:00:00 2001 +From 4d4b88681d36f7af523f25d18fc490e37855b9e9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 Subject: [PATCH 017/114] Add cpufreq driver @@ -89819,17 +89819,17 @@ index 0000000..7bc55bd 1.8.5.5 -From e2055bb44f9b735e1bcbdc8b8a79227d0777bca7 Mon Sep 17 00:00:00 2001 +From 46bf013f5a0c9027bc28b208c127bb447dc2b1ff Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:58:47 +0100 Subject: [PATCH 018/114] config: add missing options from 3.6.y kernel --- - arch/arm/configs/bcmrpi_defconfig | 741 ++++++++++++++++++++++++++++++++------ - 1 file changed, 636 insertions(+), 105 deletions(-) + arch/arm/configs/bcmrpi_defconfig | 742 ++++++++++++++++++++++++++++++++------ + 1 file changed, 637 insertions(+), 105 deletions(-) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 31f5afaa..31adf3c 100644 +index 31f5afaa..88f930c 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -1,11 +1,17 @@ @@ -90193,7 +90193,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y CONFIG_BT_BNEP=m -@@ -89,35 +363,100 @@ CONFIG_BT_HCIVHCI=m +@@ -89,35 +363,101 @@ CONFIG_BT_HCIVHCI=m CONFIG_BT_MRVL=m CONFIG_BT_MRVL_SDIO=m CONFIG_BT_ATH3K=m @@ -90226,6 +90226,7 @@ index 31f5afaa..31adf3c 100644 +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m CONFIG_BLK_DEV_SR=m ++CONFIG_CHR_DEV_SG=m CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_SCSI_ISCSI_ATTRS=y @@ -90302,7 +90303,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_LIBERTAS_THINFIRM=m CONFIG_LIBERTAS_THINFIRM_USB=m CONFIG_AT76C50X_USB=m -@@ -125,14 +464,17 @@ CONFIG_USB_ZD1201=m +@@ -125,14 +465,17 @@ CONFIG_USB_ZD1201=m CONFIG_USB_NET_RNDIS_WLAN=m CONFIG_RTL8187=m CONFIG_MAC80211_HWSIM=m @@ -90322,7 +90323,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_LIBERTAS=m CONFIG_LIBERTAS_USB=m CONFIG_LIBERTAS_SDIO=m -@@ -143,56 +485,25 @@ CONFIG_RT2500USB=m +@@ -143,56 +486,25 @@ CONFIG_RT2500USB=m CONFIG_RT73USB=m CONFIG_RT2800USB=m CONFIG_RT2800USB_RT53XX=y @@ -90385,7 +90386,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_INPUT_ATI_REMOTE2=m CONFIG_INPUT_KEYSPAN_REMOTE=m CONFIG_INPUT_POWERMATE=m -@@ -207,26 +518,191 @@ CONFIG_SERIO_RAW=m +@@ -207,26 +519,191 @@ CONFIG_SERIO_RAW=m CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -90581,7 +90582,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y # CONFIG_LOGO_LINUX_MONO is not set -@@ -249,10 +725,10 @@ CONFIG_SND_BCM2835=m +@@ -249,10 +726,10 @@ CONFIG_SND_BCM2835=m CONFIG_SND_USB_AUDIO=m CONFIG_SND_USB_UA101=m CONFIG_SND_USB_CAIAQ=m @@ -90594,7 +90595,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_HID_A4TECH=m CONFIG_HID_ACRUX=m CONFIG_HID_APPLE=m -@@ -283,7 +759,6 @@ CONFIG_HID_ORTEK=m +@@ -283,7 +760,6 @@ CONFIG_HID_ORTEK=m CONFIG_HID_PANTHERLORD=m CONFIG_HID_PETALYNX=m CONFIG_HID_PICOLCD=m @@ -90602,7 +90603,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_HID_ROCCAT=m CONFIG_HID_SAMSUNG=m CONFIG_HID_SONY=m -@@ -292,15 +767,19 @@ CONFIG_HID_SUNPLUS=m +@@ -292,15 +768,19 @@ CONFIG_HID_SUNPLUS=m CONFIG_HID_GREENASIA=m CONFIG_HID_SMARTJOYPLUS=m CONFIG_HID_TOPSEED=m @@ -90622,7 +90623,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m CONFIG_USB_STORAGE_DATAFAB=m -@@ -315,8 +794,6 @@ CONFIG_USB_STORAGE_ONETOUCH=m +@@ -315,8 +795,6 @@ CONFIG_USB_STORAGE_ONETOUCH=m CONFIG_USB_STORAGE_KARMA=m CONFIG_USB_STORAGE_CYPRESS_ATACB=m CONFIG_USB_STORAGE_ENE_UB6250=m @@ -90631,7 +90632,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_USB_MDC800=m CONFIG_USB_MICROTEK=m CONFIG_USB_SERIAL=m -@@ -331,12 +808,12 @@ CONFIG_USB_SERIAL_CP210X=m +@@ -331,12 +809,12 @@ CONFIG_USB_SERIAL_CP210X=m CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m @@ -90645,7 +90646,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_USB_SERIAL_GARMIN=m CONFIG_USB_SERIAL_IPW=m CONFIG_USB_SERIAL_IUU=m -@@ -345,18 +822,16 @@ CONFIG_USB_SERIAL_KEYSPAN=m +@@ -345,18 +823,16 @@ CONFIG_USB_SERIAL_KEYSPAN=m CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m @@ -90665,7 +90666,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_SYMBOL=m CONFIG_USB_SERIAL_TI=m -@@ -365,9 +840,11 @@ CONFIG_USB_SERIAL_XIRCOM=m +@@ -365,9 +841,11 @@ CONFIG_USB_SERIAL_XIRCOM=m CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_SERIAL_OMNINET=m CONFIG_USB_SERIAL_OPTICON=m @@ -90679,7 +90680,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_USB_SERIAL_DEBUG=m CONFIG_USB_EMI62=m CONFIG_USB_EMI26=m -@@ -389,17 +866,71 @@ CONFIG_USB_TEST=m +@@ -389,17 +867,71 @@ CONFIG_USB_TEST=m CONFIG_USB_ISIGHTFW=m CONFIG_USB_YUREX=m CONFIG_MMC=y @@ -90756,7 +90757,7 @@ index 31f5afaa..31adf3c 100644 # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y -@@ -422,6 +953,8 @@ CONFIG_BTRFS_FS=m +@@ -422,6 +954,8 @@ CONFIG_BTRFS_FS=m CONFIG_BTRFS_FS_POSIX_ACL=y CONFIG_NILFS2_FS=m CONFIG_FANOTIFY=y @@ -90765,7 +90766,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m CONFIG_CUSE=m -@@ -437,28 +970,32 @@ CONFIG_MSDOS_FS=y +@@ -437,28 +971,32 @@ CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_FAT_DEFAULT_IOCHARSET="ascii" CONFIG_NTFS_FS=m @@ -90802,7 +90803,7 @@ index 31f5afaa..31adf3c 100644 CONFIG_NLS_DEFAULT="utf8" CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_737=m -@@ -497,39 +1034,33 @@ CONFIG_NLS_ISO8859_14=m +@@ -497,39 +1035,33 @@ CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m @@ -90858,7 +90859,7 @@ index 31f5afaa..31adf3c 100644 1.8.5.5 -From e1f95f8716c76f633320ff208df20eb2f0a51d5b Mon Sep 17 00:00:00 2001 +From 9db94dd39f5c207a67b3d327e7082d5f225885ff Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 8 Apr 2013 21:12:48 +0100 Subject: [PATCH 019/114] Add NAK holdoff scheme. Enabled by default, disable @@ -91071,7 +91072,7 @@ index a9dea55..ebee73a 100644 1.8.5.5 -From ab4f6ce99333b8a70098a50c4445be6bcfbd3426 Mon Sep 17 00:00:00 2001 +From 8354e68e0cc1d5bc2dea0badc7e84ddc863f2a83 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 Subject: [PATCH 020/114] Added hwmon/thermal driver for reporting core @@ -91622,7 +91623,7 @@ index 0000000..3f9a733 1.8.5.5 -From 5c780a22fff22628fbc9fdbb4ce6412c2a1b28aa Mon Sep 17 00:00:00 2001 +From 88c82c40b210426f1fea496ed7493c32a617b783 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Apr 2013 12:16:36 +0100 Subject: [PATCH 021/114] Enable multiple ALSA channels @@ -91700,7 +91701,7 @@ index 8b6ff52..b4d94bf 100644 1.8.5.5 -From 89cf8a221ec7a26e94638f1eee606bc49b51b44d Mon Sep 17 00:00:00 2001 +From f11e6d0620eb918df1783b02043807de456b0057 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Sun, 4 Nov 2012 15:55:01 +0000 Subject: [PATCH 022/114] Make sure we wait for the reset to finish @@ -91726,7 +91727,7 @@ index aff59df..1a23d4b 100644 1.8.5.5 -From f59d6db68ab5d1e6fc461e8aa57f9fd58910f935 Mon Sep 17 00:00:00 2001 +From 22f45c590d672a330100cb9a7866f8f32dcb8c9f Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 Subject: [PATCH 023/114] lirc: added support for RaspberryPi GPIO @@ -92470,7 +92471,7 @@ index 0000000..c76f696 1.8.5.5 -From 2a88e7ae3f965ee0bdd35ac20c168e9f562451f9 Mon Sep 17 00:00:00 2001 +From 5c4979b2f8564ba16e845cd165acf9dd733d9277 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Dec 2012 18:23:03 +0000 Subject: [PATCH 024/114] Default to dwc_otp.lpm_enable=0 @@ -92496,7 +92497,7 @@ index d58ebd7..c2bb596 100644 1.8.5.5 -From 1e8da824fe695474fb9775233e83886e1424f5b9 Mon Sep 17 00:00:00 2001 +From 01948adb4c3e773c977f74f97b090baa734bf5fd Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 9 Jan 2013 16:12:04 +0000 Subject: [PATCH 025/114] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent @@ -92536,7 +92537,7 @@ index ebee73a..b3efaf4 100644 1.8.5.5 -From 1113300f968a40d83ea49e9b0e0748632a6e7bef Mon Sep 17 00:00:00 2001 +From 5bda150bac73da6334f99b39e2eac7e4c7a49051 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:51:55 +0100 Subject: [PATCH 026/114] Add hwrng (hardware random number generator) driver @@ -92720,7 +92721,7 @@ index 0000000..1ffa7d7 1.8.5.5 -From a4e053e8ed17631dee1ef1664b63dac1a5d064dc Mon Sep 17 00:00:00 2001 +From 2a2d2de7676c507eddcb114a5d0363f53f55bced Mon Sep 17 00:00:00 2001 From: Technion Date: Mon, 11 Feb 2013 22:08:53 +1100 Subject: [PATCH 027/114] Changed wording on logging. Previously, we received @@ -92758,7 +92759,7 @@ index 897cea6..ea11f9c 100644 1.8.5.5 -From 130a66832fb4eb79ab404e0ad2c6ab5fe9321828 Mon Sep 17 00:00:00 2001 +From 36afab412c71e1e1c0ac8783aa12817c2ba0a6b9 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:36:47 +0000 Subject: [PATCH 028/114] dwc_otg: Fix unsafe access of QTD during URB enqueue @@ -92848,7 +92849,7 @@ index b3efaf4..1554be5 100644 1.8.5.5 -From 6eb6097cde38723ca6e0653be3a236912adc9881 Mon Sep 17 00:00:00 2001 +From 8f93708fc874e3dd8ba52011fa58f6c9f3955a12 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:38:40 +0000 Subject: [PATCH 029/114] dwc_otg: Fix incorrect URB allocation error handling @@ -92892,7 +92893,7 @@ index 35d03d1..6fe30e3 100644 1.8.5.5 -From ac044a2f29b90a2eb6a574401508df55d376fa37 Mon Sep 17 00:00:00 2001 +From 1fe2110899201cbe7ad312076ce85b4330abd248 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 24 Feb 2013 16:30:57 +0000 Subject: [PATCH 030/114] Add retry on error and tidy of temperature driver @@ -93022,7 +93023,7 @@ index 3f9a733..85fceb5 100644 1.8.5.5 -From 46622b2b93e5b0bac1cb65d7f6a02b12d921cd02 Mon Sep 17 00:00:00 2001 +From 9b64ecd7eaf2cf6eb18b6639c80163661a2ce61c Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 28 Feb 2013 16:52:51 +0000 Subject: [PATCH 031/114] dwc_otg: fix potential use-after-free case in @@ -93057,7 +93058,7 @@ index 1a23d4b..7af455d 100644 1.8.5.5 -From 3e70e3bcf51ab7f227da9e4bbc7248a94354f1ba Mon Sep 17 00:00:00 2001 +From 9c7c33226408c157cc2f9ea482c2e96a5d2fff32 Mon Sep 17 00:00:00 2001 From: P33M Date: Sun, 3 Mar 2013 14:45:53 +0000 Subject: [PATCH 032/114] dwc_otg: add handling of SPLIT transaction data @@ -93115,7 +93116,7 @@ index 7af455d..a27dacd 100644 1.8.5.5 -From ce82a3c93fc76c6008409aa6a56a2bdaf31114c5 Mon Sep 17 00:00:00 2001 +From fd07f8d65aecd03063272f4f737e0da08c3747c0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 21:14:28 +0100 Subject: [PATCH 033/114] Add bitbanging pullups, use them for w1-gpio @@ -93257,7 +93258,7 @@ index e10acc2..667fdd5 100644 1.8.5.5 -From e02a454756a3b859344aeb1eed9685c97f7fae04 Mon Sep 17 00:00:00 2001 +From cba0d44ee6f8be6a7c8ea930f61908679e289285 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 21 Mar 2013 19:36:17 +0000 Subject: [PATCH 034/114] dwc_otg: implement tasklet for returning URBs to @@ -93502,7 +93503,7 @@ index 2b4a14e..39787e3 100644 1.8.5.5 -From 8b7682b6c528cf5ea61673d01b7335e375788419 Mon Sep 17 00:00:00 2001 +From c62e45a234c8ce12e1130bdba365772c23ea8820 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Apr 2013 00:08:36 +0100 Subject: [PATCH 036/114] dwc_otg: fix NAK holdoff and allow on split @@ -93575,7 +93576,7 @@ index 533b17d..73f7643 100644 1.8.5.5 -From 58bc818b6557315c05e3feb6db3a15efebe29c59 Mon Sep 17 00:00:00 2001 +From 6a4b9abf66633ec5b295ee8177228308b80b7240 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 26 Apr 2013 10:08:31 -0700 Subject: [PATCH 037/114] Merge pull request #286 from @@ -94059,7 +94060,7 @@ index 080bd5c..36afee3 100755 1.8.5.5 -From 80e7b776b50485226263238c4db63414e2b5accb Mon Sep 17 00:00:00 2001 +From 5049cee1792779868d279d751c1f936393531eff Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 Subject: [PATCH 038/114] Speed up console framebuffer imageblit function @@ -94274,7 +94275,7 @@ index a2bb276..436494f 100644 1.8.5.5 -From e375d969abf4ee0bd92b32cfc7bddbb97cf96ad4 Mon Sep 17 00:00:00 2001 +From f491fb45743ba6a5932395f025ec69a333e8ce9b Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 Subject: [PATCH 039/114] fbdev: add FBIOCOPYAREA ioctl @@ -94373,7 +94374,7 @@ index fb795c3..fa72af0 100644 1.8.5.5 -From 9d8bdb8ef42112010afc14559bafca96b6463340 Mon Sep 17 00:00:00 2001 +From 9b62eed5c33d8a707abb6dd63b5a429e79e16e31 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 16:00:25 +0300 Subject: [PATCH 040/114] bcm2708_fb: DMA acceleration for fb_copyarea @@ -94838,7 +94839,7 @@ index 08d9238..5758146 100644 1.8.5.5 -From 05a5486a61a81836e11bb7a13d9f8aab1c3d70e0 Mon Sep 17 00:00:00 2001 +From 8b13e9dc9f4d6fbe8afb3b0bf20dea80d68495cc Mon Sep 17 00:00:00 2001 From: Mike Bradley Date: Mon, 17 Jun 2013 11:31:42 -0700 Subject: [PATCH 041/114] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock @@ -94928,7 +94929,7 @@ index 39787e3..5e6a26a 100644 1.8.5.5 -From 9415cdf36066c5178596f5a63efd59c7e298b608 Mon Sep 17 00:00:00 2001 +From bb8527606f1b794efcdf8fd1b7db255cb757947a Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Thu, 4 Apr 2013 11:05:21 +0100 Subject: [PATCH 042/114] USB fix using a FIQ to implement split transactions @@ -96334,7 +96335,7 @@ index 1b1f83c..c8590b5 100644 1.8.5.5 -From 976c8d0b09228a03c52e5de5d84a068c413538af Mon Sep 17 00:00:00 2001 +From 43d0aaed6082624c8a0657d78ae292a1975a8829 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 11:39:46 +0100 Subject: [PATCH 043/114] dwc_otg: fix device attributes and avoid kernel @@ -96406,7 +96407,7 @@ index fab2961..af1cd4d 100644 1.8.5.5 -From a3fa4e65844880b560d1c78dd9fb31370aeb81ba Mon Sep 17 00:00:00 2001 +From 5ffe5ea3e3b1f5740efd208b3418a00dd3ae1257 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 Jul 2013 23:55:52 +0100 Subject: [PATCH 044/114] dcw_otg: avoid logging function that can cause panics @@ -96434,7 +96435,7 @@ index af1cd4d..9da0c92 100644 1.8.5.5 -From c8c1da5eb997750b6ece0c40f9bf372ae7d0cacc Mon Sep 17 00:00:00 2001 +From aebf0acf1dbdc7b29c07328025903025a4669e60 Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 20:41:26 +0100 Subject: [PATCH 045/114] dwc_otg: mask correct interrupts after transaction @@ -96504,7 +96505,7 @@ index 8e5789f..fd73e41 100644 1.8.5.5 -From 88d3b4bae79d3481679e567ab63f313c5370dc31 Mon Sep 17 00:00:00 2001 +From f8591b17b2d983d5122ec9c1692469bb71067cd0 Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 21:48:41 +0100 Subject: [PATCH 046/114] dwc_otg: fiq: prevent FIQ thrash and incorrect state @@ -96564,7 +96565,7 @@ index fd73e41..2ec0565 100644 1.8.5.5 -From 8307590ca17ff85a73a71aa14162af02e3b412e4 Mon Sep 17 00:00:00 2001 +From e57be46122415f0fb94099e554701253892743c4 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Mon, 8 Jul 2013 04:12:19 +0100 Subject: [PATCH 047/114] Fix function tracing @@ -96632,7 +96633,7 @@ index 2ec0565..083b1c3 100644 1.8.5.5 -From dafb6fb888925b3564afe1d4c4904e65499e0a58 Mon Sep 17 00:00:00 2001 +From 48ad6141eff138bc2b68250841a5bdb783ce18bb Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 16:32:41 +0100 Subject: [PATCH 048/114] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue @@ -96722,7 +96723,7 @@ index d1c5c2b..315c803 100644 1.8.5.5 -From 294d9c329426749baa187b698125091e374d54d5 Mon Sep 17 00:00:00 2001 +From 156f15b30d73d7b0e260d0ee2c4f1e2be293feb6 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 17:07:26 +0100 Subject: [PATCH 049/114] dwc_otg: prevent OOPSes during device disconnects @@ -96866,7 +96867,7 @@ index 7b92025..db95851 100644 1.8.5.5 -From c7a8c9aa2155042f1a22beecff6c7e90e022491e Mon Sep 17 00:00:00 2001 +From c009d3d29ba3b11f74c8e95d53940637892910bb Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Jul 2013 14:08:26 +0100 Subject: [PATCH 050/114] dwc_otg: prevent BUG() in TT allocation if hub @@ -96959,7 +96960,7 @@ index 083b1c3..c76910d 100644 1.8.5.5 -From c6e32bfb635342cb0c1644da81b7de7460ada443 Mon Sep 17 00:00:00 2001 +From 0df6d4902fee429c340495cc44f969d14cb99b43 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 23 Jul 2013 14:15:32 +0100 Subject: [PATCH 051/114] dwc_otg: make channel halts with unknown state less @@ -97007,7 +97008,7 @@ index c76910d..5fd8613 100644 1.8.5.5 -From 8e827ab02f045f7b5c922f11b74d3ceb837cbb64 Mon Sep 17 00:00:00 2001 +From 17eb25af9598476708ca703b8feb310219b8e55d Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 30 Jul 2013 09:58:48 +0100 Subject: [PATCH 052/114] dwc_otg: fiq_split: use TTs with more granularity @@ -97130,7 +97131,7 @@ index 5fd8613..a959a49 100644 1.8.5.5 -From 2c6625e1f3c5cb4a4018c8685364d68afe4de22d Mon Sep 17 00:00:00 2001 +From 8073cd3e3d659da133d66854756a7826f51c4ec2 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 2 Aug 2013 10:04:18 +0100 Subject: [PATCH 053/114] dwc_otg: fix potential sleep while atomic during urb @@ -97162,7 +97163,7 @@ index 87e517d..88c0544 100644 1.8.5.5 -From bae72f04d7330138b1364e6fa249ee3de90d2566 Mon Sep 17 00:00:00 2001 +From 4d52bbd926b79a9407696dda3bb2e48e7f58da9a Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:42:12 +0100 Subject: [PATCH 054/114] dwc_otg: make fiq_split_enable imply fiq_fix_enable @@ -97194,7 +97195,7 @@ index 176dc14..f06c3d22 100644 1.8.5.5 -From 0ea6e42a5d83ea2acedee1f42fd6df9e6e52cccc Mon Sep 17 00:00:00 2001 +From 0b01c0be150dd98c6d65163935ec1fb99f50bec8 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:47:12 +0100 Subject: [PATCH 055/114] dwc_otg: prevent crashes on host port disconnects @@ -97355,7 +97356,7 @@ index 88c0544..ae4271a 100644 1.8.5.5 -From b869d5539dc2b99cf827ef5459bedda83e4ff17a Mon Sep 17 00:00:00 2001 +From 21f513d90c67908cc204cca43958a95589a030fe Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 13:17:58 +0100 Subject: [PATCH 056/114] dwc_otg: prevent leaking URBs during enqueue @@ -97394,7 +97395,7 @@ index ae4271a..ee8eec9 100644 1.8.5.5 -From 7395d0d23fc1ccb26c80a8e34542c957e94faa01 Mon Sep 17 00:00:00 2001 +From 1c7bbec8d7084269d691873953a91b6bdedef3a6 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Sep 2013 16:08:27 +0100 Subject: [PATCH 057/114] dwc_otg: Enable NAK holdoff for control split @@ -97430,7 +97431,7 @@ index 3a549a1..f8dc4be 100644 1.8.5.5 -From e20646daea154a4100e659a7bcae645f73421a86 Mon Sep 17 00:00:00 2001 +From 7d5bf1fa224eade004e234739a49ff6495612b63 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 20 Sep 2013 19:07:56 +0100 Subject: [PATCH 058/114] dwc_otg: Fix for occasional lockup on boot when doing @@ -97459,7 +97460,7 @@ index f8dc4be..64d33a5 100644 1.8.5.5 -From 0b780ab670818598ffe6b20069ef19e77da038c6 Mon Sep 17 00:00:00 2001 +From 66745cc720c6114d348ac144e5b8a753e85beea1 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 27 Sep 2013 14:42:24 +0100 Subject: [PATCH 059/114] dwc_otg: Don't issue traffic to LS devices in FS mode @@ -97504,7 +97505,7 @@ index 1904f6a..22300f0 100644 1.8.5.5 -From 3cfac16f37ff37e993fa66e1975d9a5bcfc75838 Mon Sep 17 00:00:00 2001 +From e1b15be6e0e4933f62f83dcad31b2a7e3b8d4154 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Wed, 6 Nov 2013 13:25:20 +0400 Subject: [PATCH 060/114] ARM: bcm2708: PL01X debug include was moved into @@ -97528,7 +97529,7 @@ index 2d0dc1c..b24304a 100644 1.8.5.5 -From 2ba7e8407436303acb8f12f6ebc0c5672cb1c379 Mon Sep 17 00:00:00 2001 +From 241f6e3beb6cf5f4bb31051f3905f974ba427ee7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 20 Nov 2013 11:22:05 +0000 Subject: [PATCH 062/114] sdhci: Only do one iteration of PIO reading loop @@ -97553,7 +97554,7 @@ index 0b44ccf..51bb441 100644 1.8.5.5 -From 9a7917ef735b353901daf88367d572225500400b Mon Sep 17 00:00:00 2001 +From 9164b34f6368def30484e2069842aa04ec219f81 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 2 Sep 2013 16:44:57 +0100 Subject: [PATCH 063/114] vchiq: create_pagelist copes with vmalloc memory @@ -97697,7 +97698,7 @@ index 2b5fa56..b3bdaa2 100644 1.8.5.5 -From 4a009b5a7854bc48923f9197f2f07eb7ea8eb6f1 Mon Sep 17 00:00:00 2001 +From b6dfde12be75ea2565897903e1d733772deec471 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 30 Sep 2013 17:04:55 +0100 Subject: [PATCH 064/114] vchiq: fix the shim message release @@ -97792,7 +97793,7 @@ index f752f8d..fe9bd80 100644 1.8.5.5 -From 52c1f81bbadac48b3af9c61c34035267ffd08719 Mon Sep 17 00:00:00 2001 +From 43fab48912d9ce1e70ab6a5d38589ce8a3a0c679 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 9 Nov 2013 22:37:21 +0000 Subject: [PATCH 065/114] vchiq: export additional symbols @@ -97826,7 +97827,7 @@ index fe9bd80..a0b069d 100644 1.8.5.5 -From fd85d8015f27b7b50225f7cca84ba13aca6e5935 Mon Sep 17 00:00:00 2001 +From 991010cd57737aab7be88a7e2e0e1e462549a6d9 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 Subject: [PATCH 066/114] bcm2835: add v4l2 camera device @@ -103817,7 +103818,7 @@ index 0000000..9d1d11e 1.8.5.5 -From 1cdf6e566889ff44db3f2e59c163483310409279 Mon Sep 17 00:00:00 2001 +From e2b1bed28b42534a0a63fee5cddd3656cd5f8a53 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 10:58:01 +0000 Subject: [PATCH 067/114] V4L2: Fix EV values. Add manual shutter speed control @@ -104013,7 +104014,7 @@ index c611b58..d8aace5 100644 1.8.5.5 -From b7b3c79cedb09b44ea6d4835cdf8730a474930a4 Mon Sep 17 00:00:00 2001 +From 54fb77edf4c32997e9d272ca15270615018bffcc Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:01:53 +0000 Subject: [PATCH 068/114] V4L2: Correct JPEG Q-factor range @@ -104054,7 +104055,7 @@ index 481d1f6..c2e4c64 100644 1.8.5.5 -From 6dc8f1fa93a6933042723025e16f39c6f2f1359b Mon Sep 17 00:00:00 2001 +From ead6868be29df505fad165c4f9fe43875b41002a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:05:24 +0000 Subject: [PATCH 069/114] V4L2: Fix issue of driver jamming if STREAMON failed. @@ -104093,7 +104094,7 @@ index 47fe45d..2743074 100644 1.8.5.5 -From 2079741c6f8cb95c7a982060e71732e65a830013 Mon Sep 17 00:00:00 2001 +From 315b9c2c7982bf7d358d90dd11028d460f778179 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 15:30:48 +0000 Subject: [PATCH 070/114] V4L2: Fix ISO controls. @@ -104149,7 +104150,7 @@ index c2e4c64..92863f7 100644 1.8.5.5 -From ddc7a29973a9725d6c687e33a2d83cad9dcb8aac Mon Sep 17 00:00:00 2001 +From 13d4f2f5e7e134e83d1ef24654f3f7f103d52740 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 16:40:24 +0000 Subject: [PATCH 071/114] V4L2: Add flicker avoidance controls @@ -104267,7 +104268,7 @@ index d8aace5..b3d2c39 100644 1.8.5.5 -From 572aa661a6b18a70ea3ac1c9fd8c58dc2a05020f Mon Sep 17 00:00:00 2001 +From 4e8b9b642185e6a0d7d9433747d7981dabfe3178 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Dec 2013 15:54:13 +0000 Subject: [PATCH 072/114] V4L2: Add support for frame rate control. @@ -104509,7 +104510,7 @@ index b3d2c39..0f2bd50 100644 1.8.5.5 -From c7d6634fd53f3bf505c15b9983c521fe459ea5e6 Mon Sep 17 00:00:00 2001 +From a8f7e71dcb638064d2cef64c041a1d08b2a0a80e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:30:09 +0000 Subject: [PATCH 073/114] V4L2: Improve G_FBUF handling so we pass conformance @@ -104552,7 +104553,7 @@ index 8c38d03..c8d8742 100644 1.8.5.5 -From b5eb0440b1a981c5524a49483a301d7852e0ca99 Mon Sep 17 00:00:00 2001 +From aa6e24da026e8a893d97f92edd6984150a2f91b4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:29:39 +0000 Subject: [PATCH 074/114] V4L2: Fix information advertised through g_vidfmt @@ -104595,7 +104596,7 @@ index c8d8742..4766a9c 100644 1.8.5.5 -From 5e2ad2212f19d6cc820b998174faf14575919554 Mon Sep 17 00:00:00 2001 +From 7ff03d741ab4213de715657ce07783aa43658444 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:03:54 +0000 Subject: [PATCH 075/114] V4L2: Add support for inline H264 headers @@ -104903,7 +104904,7 @@ index 0f2bd50..b08a4b0 100644 1.8.5.5 -From 634ec51b214f5b5d89bfb0a3bd248f35bba406fa Mon Sep 17 00:00:00 2001 +From eed88ac095979d78cea37bceaf9d782e2e9aeafe Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 19 Dec 2013 17:33:02 +0000 Subject: [PATCH 076/114] V4L2: Fix JPEG timestamp issue @@ -104944,7 +104945,7 @@ index 4766a9c..9fc90a2 100644 1.8.5.5 -From 1f553cbd7bfae30cde740dc6632a62f749af8b4d Mon Sep 17 00:00:00 2001 +From 4099108f920b15527d1381699b159a7c90cd1609 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:24:55 +0000 Subject: [PATCH 077/114] V4L2: Fix issue when switching down JPEG resolution. @@ -105109,7 +105110,7 @@ index 9fc90a2..4780107 100644 1.8.5.5 -From ee5121fea198e4d4f9a296c4c2a1330edf0c187d Mon Sep 17 00:00:00 2001 +From fe8eb1c79cefe6d84c2af8f0f511276343e9282b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 2 Dec 2013 16:57:44 +0000 Subject: [PATCH 078/114] config: Enable V4L / MMAL driver @@ -105119,10 +105120,10 @@ Subject: [PATCH 078/114] config: Enable V4L / MMAL driver 1 file changed, 3 insertions(+) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 31adf3c..c850de6 100644 +index 88f930c..7d9cbd5 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -685,6 +685,9 @@ CONFIG_DVB_B2C2_FLEXCOP_USB=m +@@ -686,6 +686,9 @@ CONFIG_DVB_B2C2_FLEXCOP_USB=m CONFIG_VIDEO_EM28XX=m CONFIG_VIDEO_EM28XX_ALSA=m CONFIG_VIDEO_EM28XX_DVB=m @@ -105136,7 +105137,7 @@ index 31adf3c..c850de6 100644 1.8.5.5 -From acf95602264483f3b7ce995e2691b336c4361866 Mon Sep 17 00:00:00 2001 +From 3bf853a0f2f2d98bb843cb9584135f56cd7e5fd2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 9 Jan 2014 16:05:20 +0000 Subject: [PATCH 079/114] gpio: support low and high level interrupts @@ -105257,7 +105258,7 @@ index d0339eb..bab8a49 100644 1.8.5.5 -From e2e92a0efbe1cf226f702730ca590c88bb132246 Mon Sep 17 00:00:00 2001 +From 3dd27edc8bcef7d769669d79a8b2cebaf7c75dcf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 Subject: [PATCH 080/114] config: Enable CONFIG_MEMCG, but leave it disabled @@ -105270,7 +105271,7 @@ Subject: [PATCH 080/114] config: Enable CONFIG_MEMCG, but leave it disabled 3 files changed, 29 insertions(+) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index c850de6..2d79fac 100644 +index 7d9cbd5..a6ef4ca 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -18,6 +18,7 @@ CONFIG_CGROUP_FREEZER=y @@ -105282,10 +105283,10 @@ index c850de6..2d79fac 100644 CONFIG_NAMESPACES=y CONFIG_SCHED_AUTOGROUP=y diff --git a/kernel/cgroup.c b/kernel/cgroup.c -index bc1dcab..10de35a 100644 +index 271acd8..8a48169 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5483,6 +5483,33 @@ static int __init cgroup_disable(char *str) +@@ -5485,6 +5485,33 @@ static int __init cgroup_disable(char *str) } __setup("cgroup_disable=", cgroup_disable); @@ -105335,7 +105336,7 @@ index 00fd7fd..f5fd4bd 100644 1.8.5.5 -From d146559df3f7a23befb638bbdfa211fc86603be9 Mon Sep 17 00:00:00 2001 +From 38a0dddfacbab3464157a580a76d0d1e6a3272c5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 27 Jan 2014 21:00:56 +0000 Subject: [PATCH 081/114] config: enable RT2800USB_RT3573 and RT2800USB_RT55XX @@ -105346,10 +105347,10 @@ Subject: [PATCH 081/114] config: enable RT2800USB_RT3573 and RT2800USB_RT55XX 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 2d79fac..271679d 100644 +index a6ef4ca..6c569a5 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -485,7 +485,9 @@ CONFIG_RT2X00=m +@@ -486,7 +486,9 @@ CONFIG_RT2X00=m CONFIG_RT2500USB=m CONFIG_RT73USB=m CONFIG_RT2800USB=m @@ -105363,7 +105364,7 @@ index 2d79fac..271679d 100644 1.8.5.5 -From 7b00ba735c36544b3e3161de977d7526ae8aeaac Mon Sep 17 00:00:00 2001 +From 0b09534694e0f1dcdf9874d140c5a682c917a792 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 29 Jan 2014 21:37:00 +0000 Subject: [PATCH 082/114] video: relax the dimensions check for rotated @@ -105401,7 +105402,7 @@ index 5758146..935288d 100644 1.8.5.5 -From 10831c8883e4ef150d191e98ceb6208c2d89d123 Mon Sep 17 00:00:00 2001 +From cc1bff08be05a1f4a6e22a51c1ef90b60451d72e Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 Subject: [PATCH 083/114] dmaengine: Add support for BCM2708 @@ -106044,7 +106045,7 @@ index 0000000..7d5ed19 1.8.5.5 -From 6016efc11abbe3748738960a37bc2945ca8b3fc4 Mon Sep 17 00:00:00 2001 +From 164493a0974f41c05dcfbd0bb257dad5d7374539 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:33:38 +0100 Subject: [PATCH 084/114] ASoC: Add support for BCM2708 @@ -107068,7 +107069,7 @@ index 0000000..ebaf3d6 1.8.5.5 -From b19ab4a9dd4fddcd7e7acf6c6ed39bb3640db512 Mon Sep 17 00:00:00 2001 +From 944cf661e178e6c8449f7c61473282bcec9bf517 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:37:51 +0100 Subject: [PATCH 085/114] BCM2708: Extend mach header @@ -107116,7 +107117,7 @@ index 992a630..2e7e1bb 100644 1.8.5.5 -From 3735ad0cbfe38267180ba8005dc893c53d7f4931 Mon Sep 17 00:00:00 2001 +From 0d4152f7a32bb98cc4c36af2e1ce39148b3a78d9 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 Subject: [PATCH 086/114] ASoC: Add support for PCM5102A codec @@ -107247,7 +107248,7 @@ index 0000000..126f1e9 1.8.5.5 -From 639a16c209864fa58cab4b85622eed8398efd7ff Mon Sep 17 00:00:00 2001 +From a95aaced18a1f845b99efea09259c03623c87aef Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:04:54 +0100 Subject: [PATCH 087/114] BCM2708: Add I2S support to board file @@ -107308,7 +107309,7 @@ index b4d94bf..d44d70e 100644 1.8.5.5 -From 0a986c0491e4dcae90fcb44b24081a9597d6e4a9 Mon Sep 17 00:00:00 2001 +From d07714f96dfae4ba4648038f1bd3b44e198ed686 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 Subject: [PATCH 088/114] ASoC: Add support for HifiBerry DAC @@ -107463,7 +107464,7 @@ index 0000000..4b70b45 1.8.5.5 -From 17302035e7305ff9d661941922a67744f64aff1d Mon Sep 17 00:00:00 2001 +From db543031adc4603503e9963fabf4e5c545c75afd Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 Subject: [PATCH 089/114] BCM2708: Add HifiBerry DAC to board file @@ -107517,7 +107518,7 @@ index d44d70e..cfb1634 100644 1.8.5.5 -From 7f64d5de7e0a2b79704f033bfe79b7b72279ed2a Mon Sep 17 00:00:00 2001 +From 47dde780658568d4def11f48639a89308c2a77e8 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 18:55:53 +0100 Subject: [PATCH 090/114] ASoC: BCM2708: Add 24 bit support @@ -107595,7 +107596,7 @@ index ebaf3d6..a179216 100644 1.8.5.5 -From 4926c6239315e8cbe8648f5e3d168451eb5acc9c Mon Sep 17 00:00:00 2001 +From 59491707cf09ba291b36ab66b973ffa1d9dacde7 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 2 Dec 2013 20:28:22 +0100 Subject: [PATCH 091/114] BCM2708: Add I2S and DMA support to default config @@ -107609,10 +107610,10 @@ Signed-off-by: Florian Meier 1 file changed, 11 insertions(+) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 271679d..9f5bbe0 100644 +index 6c569a5..a66aecf 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -733,6 +733,13 @@ CONFIG_SND_USB_UA101=m +@@ -734,6 +734,13 @@ CONFIG_SND_USB_UA101=m CONFIG_SND_USB_CAIAQ=m CONFIG_SND_USB_CAIAQ_INPUT=y CONFIG_SND_USB_6FIRE=m @@ -107626,7 +107627,7 @@ index 271679d..9f5bbe0 100644 CONFIG_SOUND_PRIME=m CONFIG_HIDRAW=y CONFIG_HID_A4TECH=m -@@ -920,6 +927,10 @@ CONFIG_RTC_DRV_RS5C348=m +@@ -921,6 +928,10 @@ CONFIG_RTC_DRV_RS5C348=m CONFIG_RTC_DRV_DS3234=m CONFIG_RTC_DRV_PCF2123=m CONFIG_RTC_DRV_RX4581=m @@ -107641,7 +107642,7 @@ index 271679d..9f5bbe0 100644 1.8.5.5 -From d08396304e6c58e560cb162512cdb3dab4cac3cd Mon Sep 17 00:00:00 2001 +From ce3af3bb46323c6b3c1ebab6d5f50f3d8f43d053 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 20:50:28 +0100 Subject: [PATCH 092/114] ASoC: BCM2708: Add support for RPi-DAC @@ -107663,10 +107664,10 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/codecs/pcm1794a.c diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 9f5bbe0..61395f4 100644 +index a66aecf..6a2c0f4 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -738,8 +738,10 @@ CONFIG_SND_SOC_DMAENGINE_PCM=y +@@ -739,8 +739,10 @@ CONFIG_SND_SOC_DMAENGINE_PCM=y CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y CONFIG_SND_BCM2708_SOC_I2S=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m @@ -107959,7 +107960,7 @@ index 0000000..b4eaa44 1.8.5.5 -From b4b54c3b368ba2915a032e81ea225ff75b444bdf Mon Sep 17 00:00:00 2001 +From 9745ebfda332291aad11b9494a25e40b2fee2699 Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Thu, 2 Jan 2014 23:34:21 +0000 Subject: [PATCH 093/114] Added support for Proto i2s DAC @@ -108147,7 +108148,7 @@ index 0000000..4dc8705 1.8.5.5 -From 29a864982a5ea553c883673b3c7ffaa5e4287ee4 Mon Sep 17 00:00:00 2001 +From e2e72afd5d229ce2bc7f5598de23a20759c70112 Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Fri, 3 Jan 2014 05:50:49 +0000 Subject: [PATCH 094/114] Add support for additional ASoC i2s drivers @@ -108701,7 +108702,7 @@ index 0000000..6115033 1.8.5.5 -From 4de76a7ee7072fe132c61d6e3c7b80e48e12ce1e Mon Sep 17 00:00:00 2001 +From ab2eecb5aa8db2f860d71dc4d7675417a54ba5c8 Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Fri, 3 Jan 2014 05:51:53 +0000 Subject: [PATCH 095/114] Add support for additional ASoC i2s drivers @@ -108986,7 +108987,7 @@ index 95a9d44..eb869fa 100644 1.8.5.5 -From f64dc83780e2e3d2ae38dd21849e43e7fe4f4479 Mon Sep 17 00:00:00 2001 +From d9f24a9008928be6e6277adfe440ca58b2da8463 Mon Sep 17 00:00:00 2001 From: Peter Budd Date: Sat, 4 Jan 2014 18:27:33 +0000 Subject: [PATCH 096/114] Remove compile warning @@ -109020,7 +109021,7 @@ index 5752af2..c1532d4 100644 1.8.5.5 -From cad1d26d4270cf4a572a523efdab792ce40f7909 Mon Sep 17 00:00:00 2001 +From 0a0f25aae5eed2689eecd8e9cc2abe5d31f28d33 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 Subject: [PATCH 097/114] ASoC: wm8804: Implement MCLK configuration options, @@ -109140,7 +109141,7 @@ index 8ec14f5..e72d4f4 100644 1.8.5.5 -From 4df4a3515b628fd019bad52af743a2c545187aa5 Mon Sep 17 00:00:00 2001 +From 11d23202659b47eb61a56534a4814e7fd43b0f10 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 Subject: [PATCH 098/114] ASoC: BCM:Add support for HiFiBerry Digi. Driver is @@ -109355,7 +109356,7 @@ index 0000000..e4f769d 1.8.5.5 -From 867f95ad6f7da7e3cf1a09bebd25e7aa8787948c Mon Sep 17 00:00:00 2001 +From 006ba8bfba4b598759c51f0b9777127ffd184677 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:26:08 +0100 Subject: [PATCH 099/114] BCM2708: Added support for HiFiBerry Digi board Board @@ -109408,7 +109409,7 @@ index dfc2a8c..1cba3d7 100644 1.8.5.5 -From 3527b52823ca6a45d6edab4e7509572ea48b776d Mon Sep 17 00:00:00 2001 +From 2a8ad2d1e8c2f0a652fa85a147a1ff82e9e2ce79 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:27:28 +0100 Subject: [PATCH 100/114] BCM2708: Added HiFiBerry Digi configuration option It @@ -109421,10 +109422,10 @@ Signed-off-by: Daniel Matuschek 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 61395f4..7b14c76 100644 +index 6a2c0f4..ca2a265 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -736,8 +736,10 @@ CONFIG_SND_USB_6FIRE=m +@@ -737,8 +737,10 @@ CONFIG_SND_USB_6FIRE=m CONFIG_SND_SOC=m CONFIG_SND_SOC_DMAENGINE_PCM=y CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y @@ -109439,7 +109440,7 @@ index 61395f4..7b14c76 100644 1.8.5.5 -From ae965332dea310f0f19438420f881b23c362408a Mon Sep 17 00:00:00 2001 +From ad94e8c0ecbe7b60de22f39f14b78151fa18385d Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 Subject: [PATCH 101/114] ASoC: wm8804: Set idle_bias_off to false Idle bias @@ -109467,7 +109468,7 @@ index 7ec8381..50d0f0c 100644 1.8.5.5 -From fae66368b1c930e57316e07c01e09be30b141c56 Mon Sep 17 00:00:00 2001 +From 8586c2721f918d35b7396bbc2e8dbf14ccf0e708 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Feb 2014 16:34:37 +0000 Subject: [PATCH 102/114] dma_engine: Replace DMA_SUCCESS with DMA_COMPLETE @@ -109493,7 +109494,7 @@ index 7d5ed19..b244293 100644 1.8.5.5 -From ad58b4aed5668a114ac7de233c9b6bb867d5f4c7 Mon Sep 17 00:00:00 2001 +From 83d3d648ddb081fae991684c718b1b05522b2f0f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Feb 2014 17:03:51 +0000 Subject: [PATCH 103/114] bcm2708: Allow disk activity led gpio to be specified @@ -109537,7 +109538,7 @@ index 1cba3d7..e9f0701 100644 1.8.5.5 -From 1592f70b6de225ace424a9c9d6a7ee681c9db857 Mon Sep 17 00:00:00 2001 +From fd80a536eea4acabd1f4aa237ac431baeb52289b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Feb 2014 19:12:47 +0000 Subject: [PATCH 104/114] bcm2708fb: Allow swapping of red/blue in 24/32 modes @@ -109614,7 +109615,7 @@ index 935288d..3f1bc8f 100644 1.8.5.5 -From 4a0bcd58e7ec9e85aacb98cd2c2bf3fd630893d3 Mon Sep 17 00:00:00 2001 +From 23aaeded978e47173d5775e2fbc4392eadd9b444 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 23 Dec 2013 15:42:21 +0000 Subject: [PATCH 105/114] V4L2: Enable MJPEG encoding @@ -109661,7 +109662,7 @@ index 856e80e..764bb12 100644 1.8.5.5 -From e770f02d700796ed4c28ecf1fcfb835923bf4f49 Mon Sep 17 00:00:00 2001 +From cc0b1f64459cf9f3eb86857b764bad3e50f05c7f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 2 Jan 2014 15:57:06 +0000 Subject: [PATCH 106/114] V4L2: Correct flag settings for compressed formats @@ -109760,7 +109761,7 @@ index 602b4a7..076f9a8 100644 1.8.5.5 -From f09751b92399dddb4dff33b63a2a85adb207b03a Mon Sep 17 00:00:00 2001 +From 2d744f02eb2fb306ba2df0ad352b0d37ab08fa09 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 11:18:20 +0000 Subject: [PATCH 107/114] V4L2: H264 profile & level ctrls, FPS control and @@ -110452,7 +110453,7 @@ index b08a4b0..ae8fef9 100644 1.8.5.5 -From 09983b61625b95dc0d5785c16fc225ffb767bf10 Mon Sep 17 00:00:00 2001 +From 1fca0e0e0abe5f1a55023ae853b6ee911468bd57 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 11:39:20 +0000 Subject: [PATCH 108/114] V4L2: Correct BGR24 to RGB24 in format table @@ -110481,7 +110482,7 @@ index 6d0d77a..8285e6a 100644 1.8.5.5 -From 4c5e7b967c2baf9bcbcf90d13867897066dfcb54 Mon Sep 17 00:00:00 2001 +From 0ca079da11af67d323412d464c841d42cda4887c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 15:35:41 +0000 Subject: [PATCH 109/114] V4L2: Add additional pixel formats. Correct @@ -110553,7 +110554,7 @@ index 8285e6a..3dea993 100644 1.8.5.5 -From 06317ad6fcda21a2b930e43e1c5536c3a508ade0 Mon Sep 17 00:00:00 2001 +From a35242f5aa1b18c4e059dbe235a4bb710fbd82e1 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 14 Feb 2014 17:08:18 +0000 Subject: [PATCH 110/114] V4L2: Drop logging msg from info to debug @@ -110580,7 +110581,7 @@ index a06fb44..82752e6 100644 1.8.5.5 -From 1e957b13953428105b4b96db6751f537ccc2a786 Mon Sep 17 00:00:00 2001 +From bd92c973f16735a63c89cb06d2b4cf5bb461768c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 14 Feb 2014 17:12:08 +0000 Subject: [PATCH 111/114] V4L2: Initial pass at scene modes. @@ -110948,7 +110949,7 @@ index 45cf790..b7a7e883 100644 1.8.5.5 -From 6a6b2b8d733a6359bbc2591e4b7377f333ddca82 Mon Sep 17 00:00:00 2001 +From da28f2fa9ad9bb3fb3507e1c497b1d091cc54426 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 21 Feb 2014 17:15:59 +0000 Subject: [PATCH 112/114] alsa: Make alsa work queue high priority. Fixes @@ -110975,53 +110976,45 @@ index 4013d83..ee09b13 100755 1.8.5.5 -From 2202a327a3baebe17cbf8d89f70e5877e94fa477 Mon Sep 17 00:00:00 2001 -From: P33M -Date: Tue, 18 Feb 2014 17:24:30 +0000 -Subject: [PATCH 113/114] dwc_otg: Rewrite driver to include FIQ_FSM +From a215860f6371d7577f5ff0381c1b18a52bd16ba7 Mon Sep 17 00:00:00 2001 +From: Dom Cobley +Date: Wed, 19 Mar 2014 16:14:53 +0000 +Subject: [PATCH 113/114] dwc_otg: fiq_fsm: Base commit for driver rewrite -This extensive rewrite changes the operational capabilities of the FIQ -to perform the entirety of a split transaction in FIQ context. +This commit removes the previous FIQ fixes entirely and adds fiq_fsm. -The advantages are numerous: -- Total CPU interrupt processing time is reduced by ~90% -- Interrupt latency no longer affects split transactions, except - in extreme cases -- NAK holdoff is now adjustable +This rewrite features much more complete support for split transactions +and takes into account several OTG hardware bugs. High-speed +isochronous transactions are also capable of being performed by fiq_fsm. -All driver options relating to the FIQ have been changed. -- dwc_otg.fiq_enable -- dwc_otg.fiq_fsm_enable -- dwc_otg.fiq_fsm_mask -- dwc_otg.nak_holdoff +All driver options have been removed and replaced with: + - dwc_otg.fiq_enable (bool) + - dwc_otg.fiq_fsm_enable (bool) + - dwc_otg.fiq_fsm_mask (bitmask) + - dwc_otg.nak_holdoff (unsigned int) -See the code for how to set the module options. - -Known bugs: -- Isochronous OUT transfers are subject to occasional data corruption. -- Unplugging the root port or booting with the root port disconnected - will result in the interrupt handling breaking and USB becoming - unresponsive -- Setting dwc_otg.fiq_enable=0 causes interrupt handling to break. +Defaults are specified such that fiq_fsm behaves similarly to the +previously implemented FIQ fixes. --- arch/arm/mach-bcm2708/bcm2708.c | 19 - drivers/usb/host/dwc_otg/Makefile | 3 +- - drivers/usb/host/dwc_otg/dwc_otg_cil.c | 1 - drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 47 +- drivers/usb/host/dwc_otg/dwc_otg_driver.c | 47 +- - drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 1222 ++++++++++++++++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 1217 ++++++++++++++++++++++++++ drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 349 ++++++++ drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S | 81 ++ - drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 770 +++++++++++++--- - drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 12 + - drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 977 ++++++++++---------- - drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 99 ++- + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 759 +++++++++++++--- + drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 11 + + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 979 ++++++++++----------- + drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 101 ++- drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 41 +- + drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c | 113 --- drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h | 48 - - 14 files changed, 2872 insertions(+), 844 deletions(-) + 14 files changed, 2865 insertions(+), 950 deletions(-) create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S + delete mode 100755 drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c delete mode 100755 drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c @@ -111075,18 +111068,6 @@ index 8d177b1..6f9d337 100644 ifneq ($(CFI),) dwc_otg-objs += dwc_otg_cfi.o endif -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.c b/drivers/usb/host/dwc_otg/dwc_otg_cil.c -index 6a32c5c..05aee8e 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_cil.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.c -@@ -2873,7 +2873,6 @@ void dwc_otg_hc_start_transfer(dwc_otg_core_if_t * core_if, dwc_hc_t * hc) - hcchar.b.chen = 1; - hcchar.b.chdis = 0; - DWC_WRITE_REG32(&hc_regs->hcchar, hcchar.d32); -- - hc->xfer_started = 1; - hc->requests++; - diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c index 2f8b3bd..065807f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -111311,10 +111292,10 @@ index f06c3d22..d5bd726 100644 * diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c new file mode 100644 -index 0000000..a193916 +index 0000000..e286d57 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c -@@ -0,0 +1,1222 @@ +@@ -0,0 +1,1217 @@ +/* + * dwc_otg_fiq_fsm.c - The finite state machine FIQ + * @@ -111372,16 +111353,13 @@ index 0000000..a193916 + +char buffer[1000*16]; +int wptr; -+void _fiq_print(enum fiq_debug_level dbg_lvl, volatile struct fiq_state *state, char *fmt, ...) ++void notrace _fiq_print(enum fiq_debug_level dbg_lvl, volatile struct fiq_state *state, char *fmt, ...) +{ -+ enum fiq_debug_level dbg_lvl_req = FIQDBG_INT; ++ enum fiq_debug_level dbg_lvl_req = FIQDBG_ERR; + va_list args; + char text[17]; + hfnum_data_t hfnum = { .d32 = FIQ_READ(state->dwc_regs_base + 0x408) }; -+ unsigned long flags; + -+ local_irq_save(flags); -+ local_fiq_disable(); + if((dbg_lvl & dbg_lvl_req) || dbg_lvl == FIQDBG_ERR) + { + snprintf(text, 9, " %4d:%1u ", hfnum.b.frnum/8, hfnum.b.frnum & 7); @@ -111392,7 +111370,6 @@ index 0000000..a193916 + memcpy(buffer + wptr, text, 16); + wptr = (wptr + 16) % sizeof(buffer); + } -+ local_irq_restore(flags); +} + +/** @@ -111759,6 +111736,7 @@ index 0000000..a193916 + * the core needs to be told to send the correct number. Caution: for IN transfers, + * this is always set to the maximum size of the endpoint. */ + xfer_len = st->hs_isoc_info.iso_desc[st->hs_isoc_info.index].length; ++ /* Integer divide in a FIQ: fun. FIXME: make this not suck */ + nrpackets = (xfer_len + st->hcchar_copy.b.mps - 1) / st->hcchar_copy.b.mps; + if (nrpackets == 0) + nrpackets = 1; @@ -111822,7 +111800,7 @@ index 0000000..a193916 +static int notrace noinline fiq_fsm_do_sof(struct fiq_state *state, int num_channels) +{ + hfnum_data_t hfnum = { .d32 = FIQ_READ(state->dwc_regs_base + HFNUM) }; -+ int n; ++ int n; + + for (n = 0; n < num_channels; n++) { + switch (state->channel[n].fsm) { @@ -111833,6 +111811,11 @@ index 0000000..a193916 + fiq_fsm_restart_channel(state, n, 0); + break; + ++ case FIQ_HS_ISOC_SLEEPING: ++ state->channel[n].fsm = FIQ_HS_ISOC_TURBO; ++ fiq_fsm_restart_channel(state, n, 0); ++ break; ++ + case FIQ_PER_SSPLIT_QUEUED: + if ((hfnum.b.frnum & 0x7) == 5) + break; @@ -111946,6 +111929,7 @@ index 0000000..a193916 + switch (st->fsm) { + + case FIQ_PASSTHROUGH: ++ case FIQ_DEQUEUE_ISSUED: + /* doesn't belong to us, kick it upstairs */ + break; + @@ -112207,15 +112191,6 @@ index 0000000..a193916 + BUG(); + } + break; -+ -+ case FIQ_PER_CSPLIT_NYET_FAFF: -+ /* This is in response to a host channel disable. -+ * Poke the channel again. */ -+ fiq_print(FIQDBG_INT, state, "FAFF: %01d ", n); -+ handled = 1; -+ restart = 1; -+ st->fsm = FIQ_PER_CSPLIT_POLL; -+ break; + + case FIQ_PER_CSPLIT_POLL: + hfnum.d32 = FIQ_READ(state->dwc_regs_base + HFNUM); @@ -112268,8 +112243,10 @@ index 0000000..a193916 + /* more transactions to come */ + handled = 1; + restart = 1; ++ fiq_print(FIQDBG_INT, state, "HSISO M "); + } else { + st->fsm = FIQ_HS_ISOC_DONE; ++ fiq_print(FIQDBG_INT, state, "HSISO F "); + } + break; + @@ -112331,8 +112308,6 @@ index 0000000..a193916 + break; + } + -+ -+ + if (handled) { + FIQ_WRITE(state->dwc_regs_base + HC_START + (HC_OFFSET * n) + HCINT, hcint.d32); + } else { @@ -112397,6 +112372,7 @@ index 0000000..a193916 + * certain stages of the periodic pipeline. It's death to mask this + * interrupt in that case. + */ ++ + if (!fiq_fsm_do_sof(state, num_channels)) { + /* Kick IRQ once. Queue advancement means that all pending transactions + * will get serviced when the IRQ finally executes. @@ -112505,7 +112481,7 @@ index 0000000..a193916 + gintsts_handled.d32 = 0; + + if (gintsts.b.sofintr) { -+ if (state->kick_np_queues && ++ if (!state->kick_np_queues && + dwc_frame_num_gt(state->next_sched_frame, hfnum.b.frnum)) { + /* SOF handled, no work to do, just ACK interrupt */ + gintsts_handled.b.sofintr = 1; @@ -112539,7 +112515,7 @@ index 0000000..a193916 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h new file mode 100644 -index 0000000..15e0a07 +index 0000000..716e921 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h @@ -0,0 +1,349 @@ @@ -112750,7 +112726,7 @@ index 0000000..15e0a07 + FIQ_HS_ISOC_SLEEPING = 24, + FIQ_HS_ISOC_DONE = 25, + FIQ_HS_ISOC_ABORTED = 26, -+ ++ FIQ_DEQUEUE_ISSUED = 30, + FIQ_TEST = 32, +}; + @@ -112894,7 +112870,7 @@ index 0000000..15e0a07 +#endif /* DWC_OTG_FIQ_FSM_H_ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S b/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S new file mode 100644 -index 0000000..974d054 +index 0000000..8cfe364 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S @@ -0,0 +1,81 @@ @@ -112980,7 +112956,7 @@ index 0000000..974d054 +END(_dwc_otg_fiq_stub) + diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 22300f0..d315919 100644 +index 22300f0..e67437c 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -45,9 +45,10 @@ @@ -113009,28 +112985,7 @@ index 22300f0..d315919 100644 dwc_otg_hcd_t *dwc_otg_hcd_alloc_hcd(void) { -@@ -80,8 +75,8 @@ void dwc_otg_hcd_connect_timeout(void *ptr) - __DWC_ERROR("Device Not Connected/Responding\n"); - } - --#if defined(DEBUG) --static void dump_channel_info(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) -+ -+void dump_channel_info(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - { - if (qh->channel != NULL) { - dwc_hc_t *hc = qh->channel; -@@ -136,9 +131,6 @@ static void dump_channel_info(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - } - } - } --#else --#define dump_channel_info(hcd, qh) --#endif /* DEBUG */ - - /** - * Work queue function for starting the HCD when A-Cable is connected. -@@ -295,7 +287,7 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) +@@ -295,7 +290,7 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) */ dwc_otg_hcd->flags.b.port_connect_status_change = 1; dwc_otg_hcd->flags.b.port_connect_status = 0; @@ -113039,7 +112994,7 @@ index 22300f0..d315919 100644 local_fiq_disable(); /* * Shutdown any transfers in process by clearing the Tx FIFO Empty -@@ -392,20 +384,20 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) +@@ -392,20 +387,15 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) channel->qh = NULL; } } @@ -113049,13 +113004,10 @@ index 22300f0..d315919 100644 dwc_otg_hcd->hub_port[i] = 0; } - haint_saved.d32 = 0; -+// haint_saved.d32 = 0; - for(i=0; i < MAX_EPS_CHANNELS; i++) { +- for(i=0; i < MAX_EPS_CHANNELS; i++) { - hcint_saved[i].d32 = 0; - hcintmsk_saved[i].d32 = 0; -+// hcint_saved[i].d32 = 0; -+// hcintmsk_saved[i].d32 = 0; - } +- } } } @@ -113065,24 +113017,7 @@ index 22300f0..d315919 100644 local_fiq_enable(); if (dwc_otg_hcd->fops->disconnect) { -@@ -526,6 +518,16 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, - } - } - -+ /* Some core configurations cannot support LS traffic on a FS root port */ -+ if ((hcd->fops->speed(hcd, dwc_otg_urb->priv) == USB_SPEED_LOW) && -+ (hcd->core_if->hwcfg2.b.fs_phy_type == 1) && -+ (hcd->core_if->hwcfg2.b.hs_phy_type == 1)) { -+ hprt0.d32 = DWC_READ_REG32(hcd->core_if->host_if->hprt0); -+ if (hprt0.b.prtspd == DWC_HPRT0_PRTSPD_FULL_SPEED) { -+ return -DWC_E_NO_DEVICE; -+ } -+ } -+ - qtd = dwc_otg_hcd_qtd_create(dwc_otg_urb, atomic_alloc); - if (qtd == NULL) { - DWC_ERROR("DWC OTG HCD URB Enqueue failed creating QTD\n"); -@@ -542,7 +544,7 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, +@@ -542,7 +532,7 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, } #endif intr_mask.d32 = DWC_READ_REG32(&hcd->core_if->core_global_regs->gintmsk); @@ -113091,7 +113026,23 @@ index 22300f0..d315919 100644 if((((dwc_otg_qh_t *)ep_handle)->ep_type == UE_BULK) && !(qtd->urb->flags & URB_GIVEBACK_ASAP)) /* Do not schedule SG transactions until qtd has URB_GIVEBACK_ASAP set */ needs_scheduling = 0; -@@ -623,7 +625,6 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, +@@ -613,6 +603,7 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, + if (urb_qtd->in_process && qh->channel) { + /* The QTD is in process (it has been assigned to a channel). */ + if (hcd->flags.b.port_connect_status) { ++ int n = qh->channel->hc_num; + /* + * If still connected (i.e. in host mode), halt the + * channel so it can be used for other transfers. If +@@ -620,10 +611,14 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, + * written to halt the channel since the core is in + * device mode. + */ ++ /* In FIQ FSM mode, we need to shut down carefully. ++ * The FIQ may attempt to restart a disabled channel */ ++ if (fiq_fsm_enable && (hcd->fiq_state->channel[n].fsm != FIQ_PASSTHROUGH)) { ++ hcd->fiq_state->channel[n].fsm = FIQ_DEQUEUE_ISSUED; ++ } dwc_otg_hc_halt(hcd->core_if, qh->channel, DWC_OTG_HC_XFER_URB_DEQUEUE); @@ -113099,7 +113050,7 @@ index 22300f0..d315919 100644 } } -@@ -759,7 +760,6 @@ static void completion_tasklet_func(void *ptr) +@@ -759,7 +754,6 @@ static void completion_tasklet_func(void *ptr) usb_hcd_giveback_urb(hcd->priv, urb, urb->status); @@ -113107,7 +113058,7 @@ index 22300f0..d315919 100644 DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); } -@@ -854,6 +854,34 @@ void dwc_otg_hcd_power_up(void *ptr) +@@ -854,6 +848,34 @@ void dwc_otg_hcd_power_up(void *ptr) cil_hcd_start(core_if); } @@ -113135,14 +113086,14 @@ index 22300f0..d315919 100644 + st->hs_isoc_info.index = 0; + st->hs_isoc_info.iso_desc = NULL; + st->hs_isoc_info.nrframes = 0; -+ ++ + DWC_MEMSET(&blob->channel[num].index[0], 0x6b, 1128); +} + /** * Frees secondary storage associated with the dwc_otg_hcd structure contained * in the struct usb_hcd field. -@@ -907,6 +935,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -907,6 +929,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) DWC_TIMER_FREE(dwc_otg_hcd->conn_timer); DWC_TASK_FREE(dwc_otg_hcd->reset_tasklet); DWC_TASK_FREE(dwc_otg_hcd->completion_tasklet); @@ -113150,16 +113101,7 @@ index 22300f0..d315919 100644 #ifdef DWC_DEV_SRPCAP if (dwc_otg_hcd->core_if->power_down == 2 && -@@ -916,7 +945,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) - #endif - DWC_FREE(dwc_otg_hcd); - } -- -+static void *fiq_stack; - int init_hcd_usecs(dwc_otg_hcd_t *_hcd); - - int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) -@@ -979,6 +1008,60 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) +@@ -979,6 +1002,59 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) channel); } @@ -113172,12 +113114,12 @@ index 22300f0..d315919 100644 + goto out; + } + DWC_MEMSET(hcd->fiq_state, 0, (sizeof(struct fiq_state) + (sizeof(struct fiq_channel_state) * num_channels))); -+ ++ + for (i = 0; i < num_channels; i++) { + hcd->fiq_state->channel[i].fsm = FIQ_PASSTHROUGH; + } + hcd->fiq_state->dummy_send = DWC_ALLOC_ATOMIC(16); -+ ++ + hcd->fiq_stack = DWC_ALLOC(sizeof(struct fiq_stack)); + if (!hcd->fiq_stack) { + retval = -DWC_E_NO_MEMORY; @@ -113187,22 +113129,21 @@ index 22300f0..d315919 100644 + } + hcd->fiq_stack->magic1 = 0xDEADBEEF; + hcd->fiq_stack->magic2 = 0xD00DFEED; -+ fiq_stack = hcd->fiq_stack; + hcd->fiq_state->gintmsk_saved.d32 = ~0; + hcd->fiq_state->haintmsk_saved.b2.chint = ~0; + + /* This bit is terrible and uses no API, but necessary. The FIQ has no concept of DMA pools + * (and if it did, would be a lot slower). This allocates a chunk of memory (~9kiB for 8 host channels) -+ * for use as transaction bounce buffers in a 2-D array. Our access into this chunk is done by some ++ * for use as transaction bounce buffers in a 2-D array. Our access into this chunk is done by some + * moderately readable array casts. + */ + hcd->fiq_dmab = DWC_DMA_ALLOC((sizeof(struct fiq_dma_channel) * num_channels), &hcd->fiq_state->dma_base); + DWC_WARN("FIQ DMA bounce buffers: virt = 0x%08x dma = 0x%08x len=%d", + (unsigned int)hcd->fiq_dmab, (unsigned int)hcd->fiq_state->dma_base, + sizeof(struct fiq_dma_channel) * num_channels); -+ ++ + DWC_MEMSET(hcd->fiq_dmab, 0x6b, 9024); -+ ++ + /* pointer for debug in fiq_print */ + hcd->fiq_state->fiq_dmab = hcd->fiq_dmab; + if (fiq_fsm_enable) { @@ -113212,7 +113153,7 @@ index 22300f0..d315919 100644 + } + DWC_PRINTF("FIQ FSM acceleration enabled for :\n%s%s%s", + (fiq_fsm_mask & 0x1) ? "Non-periodic Split Transactions\n" : "", -+ (fiq_fsm_mask & 0x2) ? "Periodic Split Transactions\n" : "", ++ (fiq_fsm_mask & 0x2) ? "Periodic Split Transactions\n" : "", + (fiq_fsm_mask & 0x4) ? "High-Speed Isochronous Endpoints\n" : ""); + } + } @@ -113220,16 +113161,7 @@ index 22300f0..d315919 100644 /* Initialize the Connection timeout timer. */ hcd->conn_timer = DWC_TIMER_ALLOC("Connection timer", dwc_otg_hcd_connect_timeout, 0); -@@ -1115,6 +1198,8 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - - /* Remove the host channel from the free list. */ - DWC_CIRCLEQ_REMOVE_INIT(&hcd->free_hc_list, hc, hc_list_entry); -+ -+ //DWC_WARN("Picked HC %d", hc->hc_num); - - qh->channel = hc; - -@@ -1176,7 +1261,8 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +@@ -1176,7 +1252,8 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) hc->do_split = 1; hc->xact_pos = qtd->isoc_split_pos; /* We don't need to do complete splits anymore */ @@ -113239,13 +113171,7 @@ index 22300f0..d315919 100644 hc->complete_split = qtd->complete_split = 0; else hc->complete_split = qtd->complete_split; -@@ -1322,67 +1408,467 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) - - if (hcd->core_if->dma_desc_enable) - hc->desc_list_addr = qh->desc_list_dma; -- -+ - dwc_otg_hc_init(hcd->core_if, hc); +@@ -1327,62 +1404,487 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) hc->qh = qh; } @@ -113256,19 +113182,7 @@ index 22300f0..d315919 100644 -** Return 0 - Port is already in use -*/ -int dwc_otg_hcd_allocate_port(dwc_otg_hcd_t * hcd, dwc_otg_qh_t *qh) --{ -- uint32_t hub_addr, port_addr; -- -- if(!fiq_split_enable) -- return 0; -- -- hcd->fops->hub_info(hcd, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->priv, &hub_addr, &port_addr); -- -- if(hcd->hub_port[hub_addr] & (1 << port_addr)) -- { -- fiq_print(FIQDBG_PORTHUB, "H%dP%d:S%02d", hub_addr, port_addr, qh->skip_count); - -- qh->skip_count++; ++ +/** + * fiq_fsm_transaction_suitable() - Test a QH for compatibility with the FIQ + * @qh: pointer to the endpoint's queue head @@ -113279,14 +113193,10 @@ index 22300f0..d315919 100644 + * + * Returns: 0 for unsuitable, 1 implies the FIQ can be enabled for this transaction. + */ - -- if(qh->skip_count > 40000) -- { -- printk_once(KERN_ERR "Error: Having to skip port allocation"); -- local_fiq_disable(); -- BUG(); ++ +int fiq_fsm_transaction_suitable(dwc_otg_qh_t *qh) -+{ + { +- uint32_t hub_addr, port_addr; + if (qh->do_split) { + switch (qh->ep_type) { + case UE_CONTROL: @@ -113327,14 +113237,14 @@ index 22300f0..d315919 100644 + return 0; + } + } -+ /* return 1; */ -+ /* HS isoc is NYI */ - return 0; - } ++ return 1; ++ } + } + return 0; +} -+ + +- if(!fiq_split_enable) +- return 0; +/** + * fiq_fsm_setup_periodic_dma() - Set up DMA bounce buffers + * @hcd: Pointer to the dwc_otg_hcd struct @@ -113343,7 +113253,7 @@ index 22300f0..d315919 100644 + * Periodic split transactions are transmitted modulo 188 bytes. + * This necessitates slicing data up into buckets for isochronous out + * and fixing up the DMA address for all IN transfers. -+ * ++ * + * Returns 1 if the DMA bounce buffers have been used, 0 if the default + * HC buffer has been used. + */ @@ -113355,32 +113265,42 @@ index 22300f0..d315919 100644 + dwc_hc_t *hc = qh->channel; + struct fiq_dma_blob *blob; + struct dwc_otg_hcd_iso_packet_desc *frame_desc; -+ -+ ++ ++ + for (i = 0; i < 6; i++) { + st->dma_info.slot_len[i] = 255; + } + st->dma_info.index = 0; + i = 0; + if (hc->ep_is_in) { -+ /* -+ * Set dma_regs to bounce buffer. FIQ will update the ++ /* ++ * Set dma_regs to bounce buffer. FIQ will update the + * state depending on transaction progress. + */ + blob = (struct fiq_dma_blob *) hcd->fiq_state->dma_base; -+ st->hcdma_copy.d32 = (uint32_t) &blob->channel[hc->hc_num].index[0].buf[0]; - return 1; ++ st->hcdma_copy.d32 = (uint32_t) &blob->channel[hc->hc_num].index[0].buf[0]; ++ return 1; + } else { + if (qh->ep_type == UE_ISOCHRONOUS) { -+ + +- hcd->fops->hub_info(hcd, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->priv, &hub_addr, &port_addr); + dwc_otg_qtd_t *qtd = DWC_CIRCLEQ_FIRST(&qh->qtd_list); -+ + +- if(hcd->hub_port[hub_addr] & (1 << port_addr)) +- { +- fiq_print(FIQDBG_PORTHUB, "H%dP%d:S%02d", hub_addr, port_addr, qh->skip_count); + frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index]; + frame_length = frame_desc->length; -+ + +- qh->skip_count++; + /* Virtual address for bounce buffers */ + blob = hcd->fiq_dmab; -+ + +- if(qh->skip_count > 40000) +- { +- printk_once(KERN_ERR "Error: Having to skip port allocation"); +- local_fiq_disable(); +- BUG(); + ptr = qtd->urb->buf + frame_desc->offset; + nrslots = (frame_length + 187) / 188; + last_size = frame_length % 188; @@ -113407,6 +113327,9 @@ index 22300f0..d315919 100644 + } while (i <= nrslots - 1); + st->nrpackets = i; + } ++ ptr = qtd->urb->buf + frame_desc->offset; ++ if(DWC_MEMCMP(&blob->channel[hc->hc_num].index[0].buf[0], ptr, frame_length)) ++ BUG(); + /* Point the HC at the DMA address of the bounce buffers */ + blob = (struct fiq_dma_blob *) hcd->fiq_state->dma_base; + /* Bugette: for some reason, memcpy corrupts the data in the bounce buffers. May be a @@ -113422,8 +113345,9 @@ index 22300f0..d315919 100644 + return 1; + } else { + /* For interrupt, single OUT packet required, goes in the SSPLIT from hc_buff. */ -+ return 0; -+ } + return 0; + } +- return 1; } - else - { @@ -113435,6 +113359,16 @@ index 22300f0..d315919 100644 -#endif +} + ++/* ++ * Pushing a periodic request into the queue near the EOF1 point ++ * in a microframe causes erroneous behaviour (frmovrun) interrupt. ++ * Usually, the request goes out on the bus causing a transfer but ++ * the core does not transfer the data to memory. ++ * This guard interval (in number of 60MHz clocks) is required which ++ * must cater for CPU latency between reading the value and enabling ++ * the channel. ++ */ ++#define PERIODIC_FRREM_BACKOFF 1000 + +int fiq_fsm_queue_isoc_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) +{ @@ -113445,31 +113379,34 @@ index 22300f0..d315919 100644 + struct fiq_channel_state *st = &hcd->fiq_state->channel[hc->hc_num]; + int xfer_len, nrpackets; + hcdma_data_t hcdma; -+ -+ if (st->fsm != FIQ_PASSTHROUGH) ++ hfnum_data_t hfnum; ++ ++ if (st->fsm != FIQ_PASSTHROUGH) return 0; -+ ++ + st->nr_errors = 0; -+ ++ + st->hcchar_copy.d32 = 0; + st->hcchar_copy.b.mps = hc->max_packet; + st->hcchar_copy.b.epdir = hc->ep_is_in; + st->hcchar_copy.b.devaddr = hc->dev_addr; + st->hcchar_copy.b.epnum = hc->ep_num; + st->hcchar_copy.b.eptype = hc->ep_type; -+ ++ + st->hcintmsk_copy.b.chhltd = 1; -+ ++ + frame = dwc_otg_hcd_get_frame_number(hcd); + st->hcchar_copy.b.oddfrm = (frame & 0x1) ? 0 : 1; -+ ++ + st->hcchar_copy.b.lspddev = 0; + /* Enable the channel later as a final register write. */ -+ ++ + st->hcsplt_copy.d32 = 0; -+ ++ + st->hs_isoc_info.iso_desc = (struct dwc_otg_hcd_iso_packet_desc *) &qtd->urb->iso_descs; ++ st->hs_isoc_info.nrframes = qtd->urb->packet_count; + /* grab the next DMA address offset from the array */ ++ st->hcdma_copy.d32 = qtd->urb->dma; + hcdma.d32 = st->hcdma_copy.d32 + st->hs_isoc_info.iso_desc[0].offset; + + /* We need to set multi_count. This is a bit tricky - has to be set per-transaction as @@ -113496,8 +113433,8 @@ index 22300f0..d315919 100644 + } + + } else { -+ switch (st->hcchar_copy.b.multicnt) { + st->hctsiz_copy.b.xfersize = nrpackets * st->hcchar_copy.b.mps; ++ switch (st->hcchar_copy.b.multicnt) { + case 1: + st->hctsiz_copy.b.pid = DWC_PID_DATA0; + break; @@ -113511,29 +113448,34 @@ index 22300f0..d315919 100644 } + + fiq_print(FIQDBG_INT, hcd->fiq_state, "FSMQ %01d ", hc->hc_num); -+ fiq_print(FIQDBG_INT, hcd->fiq_state, "MULT: %02d", st->hcchar_copy.b.multicnt); -+ fiq_print(FIQDBG_INT, hcd->fiq_state, "NPTK: %02d", st->hctsiz_copy.b.pktcnt); ++ fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hcchar_copy.d32); ++ fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hctsiz_copy.d32); ++ fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hcdma_copy.d32); ++ hfnum.d32 = DWC_READ_REG32(&hcd->core_if->host_if->host_global_regs->hfnum); + local_fiq_disable(); -+ st->fsm = FIQ_HS_ISOC_TURBO; + DWC_WRITE_REG32(&hc_regs->hctsiz, st->hctsiz_copy.d32); + DWC_WRITE_REG32(&hc_regs->hcsplt, st->hcsplt_copy.d32); + DWC_WRITE_REG32(&hc_regs->hcdma, st->hcdma_copy.d32); + DWC_WRITE_REG32(&hc_regs->hcchar, st->hcchar_copy.d32); + DWC_WRITE_REG32(&hc_regs->hcintmsk, st->hcintmsk_copy.d32); -+ st->hcchar_copy.b.chen = 1; -+ DWC_WRITE_REG32(&hc_regs->hcchar, st->hcchar_copy.d32); ++ if (hfnum.b.frrem < PERIODIC_FRREM_BACKOFF) { ++ /* Prevent queueing near EOF1. Bad things happen if a periodic ++ * split transaction is queued very close to EOF. ++ */ ++ st->fsm = FIQ_HS_ISOC_SLEEPING; ++ } else { ++ st->fsm = FIQ_HS_ISOC_TURBO; ++ st->hcchar_copy.b.chen = 1; ++ DWC_WRITE_REG32(&hc_regs->hcchar, st->hcchar_copy.d32); ++ } + mb(); ++ st->hcchar_copy.b.chen = 0; + local_fiq_enable(); + return 0; } -void dwc_otg_hcd_release_port(dwc_otg_hcd_t * hcd, dwc_otg_qh_t *qh) --{ -- uint32_t hub_addr, port_addr; - -- if(!fiq_split_enable) -- return; - -- hcd->fops->hub_info(hcd, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->priv, &hub_addr, &port_addr); ++ ++ +/** + * fiq_fsm_queue_split_transaction() - Set up a host channel and FIQ state + * @hcd: Pointer to the dwc_otg_hcd struct @@ -113547,7 +113489,8 @@ index 22300f0..d315919 100644 + * start is possible. If not, then the FIQ is left to start the transfer. + */ +int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) -+{ + { +- uint32_t hub_addr, port_addr; + int start_immediate = 1, i; + hfnum_data_t hfnum; + dwc_hc_t *hc = qh->channel; @@ -113555,11 +113498,13 @@ index 22300f0..d315919 100644 + /* Program HC registers, setup FIQ_state, examine FIQ if periodic, start transfer (not if uframe 5) */ + int hub_addr, port_addr, frame, uframe; + struct fiq_channel_state *st = &hcd->fiq_state->channel[hc->hc_num]; -+ -+ if (st->fsm != FIQ_PASSTHROUGH) + +- if(!fiq_split_enable) +- return; ++ if (st->fsm != FIQ_PASSTHROUGH) + return 0; + st->nr_errors = 0; -+ ++ + st->hcchar_copy.d32 = 0; + st->hcchar_copy.b.mps = hc->max_packet; + st->hcchar_copy.b.epdir = hc->ep_is_in; @@ -113578,7 +113523,7 @@ index 22300f0..d315919 100644 + } + st->hcchar_copy.b.lspddev = (hc->speed == DWC_OTG_EP_SPEED_LOW) ? 1 : 0; + /* Enable the channel later as a final register write. */ -+ ++ + st->hcsplt_copy.d32 = 0; + if(qh->do_split) { + hcd->fops->hub_info(hcd, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->priv, &hub_addr, &port_addr); @@ -113587,7 +113532,7 @@ index 22300f0..d315919 100644 + // XACTPOS is for isoc-out only but needs initialising anyway. + st->hcsplt_copy.b.xactpos = ISOC_XACTPOS_ALL; + if((qh->ep_type == DWC_OTG_EP_TYPE_ISOC) && (!qh->ep_is_in)) { -+ /* For packetsize 0 < L < 188, ISOC_XACTPOS_ALL. ++ /* For packetsize 0 < L < 188, ISOC_XACTPOS_ALL. + * for longer than this, ISOC_XACTPOS_BEGIN and the FIQ + * will update as necessary. + */ @@ -113601,26 +113546,27 @@ index 22300f0..d315919 100644 + st->port_addr = port_addr; + } +- hcd->fops->hub_info(hcd, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->priv, &hub_addr, &port_addr); ++ st->hctsiz_copy.d32 = 0; ++ st->hctsiz_copy.b.dopng = 0; ++ st->hctsiz_copy.b.pid = hc->data_pid_start; + - hcd->hub_port[hub_addr] &= ~(1 << port_addr); -#ifdef FIQ_DEBUG - hcd->hub_port_alloc[hub_addr * 16 + port_addr] = -1; -#endif - fiq_print(FIQDBG_PORTHUB, "H%dP%d:RO%d", hub_addr, port_addr, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->pipe_info.ep_num); -+ st->hctsiz_copy.d32 = 0; -+ st->hctsiz_copy.b.dopng = 0; -+ st->hctsiz_copy.b.pid = hc->data_pid_start; - + if (hc->ep_is_in || (hc->xfer_len > hc->max_packet)) { + hc->xfer_len = hc->max_packet; + } else if (!hc->ep_is_in && (hc->xfer_len > 188)) { + hc->xfer_len = 188; + } + st->hctsiz_copy.b.xfersize = hc->xfer_len; -+ -+ st->hctsiz_copy.b.pktcnt = 1; + ++ st->hctsiz_copy.b.pktcnt = 1; + + if (hc->ep_type & 0x1) { -+ /* ++ /* + * For potentially multi-packet transfers, must use the DMA bounce buffers. For IN transfers, + * the DMA address is the address of the first 188byte slot buffer in the bounce buffer array. + * For multi-packet OUT transfers, we need to copy the data into the bounce buffer array so the FIQ can punt @@ -113642,12 +113588,12 @@ index 22300f0..d315919 100644 + st->hcdma_copy.d32 = ((unsigned long) hc->xfer_buff & 0xFFFFFFFF); + } + } -+ /* The FIQ depends upon no other interrupts being enabled except channel halt. ++ /* The FIQ depends upon no other interrupts being enabled except channel halt. + * Fixup channel interrupt mask. */ + st->hcintmsk_copy.d32 = 0; + st->hcintmsk_copy.b.chhltd = 1; + st->hcintmsk_copy.b.ahberr = 1; -+ ++ + DWC_WRITE_REG32(&hc_regs->hcdma, st->hcdma_copy.d32); + DWC_WRITE_REG32(&hc_regs->hctsiz, st->hctsiz_copy.d32); + DWC_WRITE_REG32(&hc_regs->hcsplt, st->hcsplt_copy.d32); @@ -113656,12 +113602,12 @@ index 22300f0..d315919 100644 + + local_fiq_disable(); + mb(); -+ ++ + if (hc->ep_type & 0x1) { + hfnum.d32 = DWC_READ_REG32(&hcd->core_if->host_if->host_global_regs->hfnum); + frame = (hfnum.b.frnum & ~0x7) >> 3; + uframe = hfnum.b.frnum & 0x7; -+ if (hfnum.b.frrem < 1600) { ++ if (hfnum.b.frrem < PERIODIC_FRREM_BACKOFF) { + /* Prevent queueing near EOF1. Bad things happen if a periodic + * split transaction is queued very close to EOF. + */ @@ -113693,16 +113639,17 @@ index 22300f0..d315919 100644 + break; + default: + break; -+ } ++ } + if (!start_immediate) + break; + } + } + } + fiq_print(FIQDBG_INT, hcd->fiq_state, "FSMQ %01d %01d", hc->hc_num, start_immediate); -+ fiq_print(FIQDBG_INT, hcd->fiq_state, "H:%02dP:%02d", hub_addr, port_addr); -+ fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hctsiz_copy.d32); -+ fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hcdma_copy.d32); ++ fiq_print(FIQDBG_INT, hcd->fiq_state, "%08d", hfnum.b.frrem); ++ //fiq_print(FIQDBG_INT, hcd->fiq_state, "H:%02dP:%02d", hub_addr, port_addr); ++ //fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hctsiz_copy.d32); ++ //fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hcdma_copy.d32); + switch (hc->ep_type) { + case UE_CONTROL: + case UE_BULK: @@ -113710,7 +113657,7 @@ index 22300f0..d315919 100644 + break; + case UE_ISOCHRONOUS: + if (hc->ep_is_in) { -+ if (start_immediate) { ++ if (start_immediate) { + st->fsm = FIQ_PER_SSPLIT_STARTED; + } else { + st->fsm = FIQ_PER_SSPLIT_QUEUED; @@ -113729,7 +113676,7 @@ index 22300f0..d315919 100644 + } + break; + case UE_INTERRUPT: -+ if (start_immediate) { ++ if (start_immediate) { + st->fsm = FIQ_PER_SSPLIT_STARTED; + } else { + st->fsm = FIQ_PER_SSPLIT_QUEUED; @@ -113751,7 +113698,7 @@ index 22300f0..d315919 100644 } -@@ -1399,16 +1885,11 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1399,16 +1901,11 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) { dwc_list_link_t *qh_ptr; dwc_otg_qh_t *qh; @@ -113768,7 +113715,7 @@ index 22300f0..d315919 100644 #ifdef DEBUG_HOST_CHANNELS last_sel_trans_num_per_scheduled = 0; last_sel_trans_num_nonper_scheduled = 0; -@@ -1423,26 +1904,11 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1423,26 +1920,11 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) qh = DWC_LIST_ENTRY(qh_ptr, dwc_otg_qh_t, qh_list_entry); @@ -113795,7 +113742,7 @@ index 22300f0..d315919 100644 break; } hcd->available_host_channels--; -@@ -1478,30 +1944,28 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1478,27 +1960,24 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) !DWC_CIRCLEQ_EMPTY(&hcd->free_hc_list)) { qh = DWC_LIST_ENTRY(qh_ptr, dwc_otg_qh_t, qh_list_entry); @@ -113836,16 +113783,11 @@ index 22300f0..d315919 100644 } } -+ - if (microframe_schedule) { - DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); - if (hcd->available_host_channels < 1) { -@@ -1527,12 +1991,30 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) +@@ -1527,12 +2006,29 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) &qh->qh_list_entry); DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); - g_np_sent++; -+ if (!microframe_schedule) hcd->non_periodic_channels++; @@ -113873,7 +113815,7 @@ index 22300f0..d315919 100644 if(!DWC_LIST_EMPTY(&hcd->periodic_sched_assigned)) ret_val |= DWC_OTG_TRANSACTION_PERIODIC; -@@ -1629,7 +2111,7 @@ static void process_periodic_channels(dwc_otg_hcd_t * hcd) +@@ -1629,7 +2125,7 @@ static void process_periodic_channels(dwc_otg_hcd_t * hcd) hptxsts_data_t tx_status; dwc_list_link_t *qh_ptr; dwc_otg_qh_t *qh; @@ -113882,7 +113824,7 @@ index 22300f0..d315919 100644 int no_queue_space = 0; int no_fifo_space = 0; -@@ -1658,27 +2140,34 @@ static void process_periodic_channels(dwc_otg_hcd_t * hcd) +@@ -1658,27 +2154,34 @@ static void process_periodic_channels(dwc_otg_hcd_t * hcd) // Do not send a split start transaction any later than frame .6 // Note, we have to schedule a periodic in .5 to make it go in .6 @@ -113933,12 +113875,9 @@ index 22300f0..d315919 100644 } /* -@@ -1793,32 +2282,26 @@ static void process_non_periodic_channels(dwc_otg_hcd_t * hcd) - } - +@@ -1795,25 +2298,19 @@ static void process_non_periodic_channels(dwc_otg_hcd_t * hcd) qh = DWC_LIST_ENTRY(hcd->non_periodic_qh_ptr, dwc_otg_qh_t, -- qh_list_entry); -+ qh_list_entry); + qh_list_entry); - // Do not send a split start transaction any later than frame .5 - // non periodic transactions will start immediately in this uframe @@ -113973,51 +113912,20 @@ index 22300f0..d315919 100644 /* Advance to next QH, skipping start-of-list entry. */ hcd->non_periodic_qh_ptr = hcd->non_periodic_qh_ptr->next; if (hcd->non_periodic_qh_ptr == &hcd->non_periodic_sched_active) { - hcd->non_periodic_qh_ptr = -- hcd->non_periodic_qh_ptr->next; -+ hcd->non_periodic_qh_ptr->next; - } - - } while (hcd->non_periodic_qh_ptr != orig_qh_ptr); -@@ -1879,7 +2362,6 @@ void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, - if ((tr_type == DWC_OTG_TRANSACTION_PERIODIC || - tr_type == DWC_OTG_TRANSACTION_ALL) && - !DWC_LIST_EMPTY(&hcd->periodic_sched_assigned)) { -- - process_periodic_channels(hcd); - } - -@@ -3438,7 +3920,6 @@ uint8_t dwc_otg_hcd_get_ep_bandwidth(dwc_otg_hcd_t * hcd, void *ep_handle) - - void dwc_otg_hcd_dump_state(dwc_otg_hcd_t * hcd) - { --#ifdef DEBUG - int num_channels; - int i; - gnptxsts_data_t np_tx_status; -@@ -3556,7 +4037,6 @@ void dwc_otg_hcd_dump_state(dwc_otg_hcd_t * hcd) - DWC_PRINTF - ("************************************************************\n"); - DWC_PRINTF("\n"); --#endif - } - - #ifdef DEBUG diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index 0007fa1..f6ea848 100644 +index 0007fa1..da2986244 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -@@ -40,6 +40,9 @@ +@@ -40,6 +40,8 @@ #include "dwc_otg_core_if.h" #include "dwc_list.h" #include "dwc_otg_cil.h" +#include "dwc_otg_fiq_fsm.h" -+ + /** * @file -@@ -585,6 +588,12 @@ struct dwc_otg_hcd { +@@ -585,6 +587,12 @@ struct dwc_otg_hcd { /** Frame List DMA address */ dma_addr_t frame_list_dma; @@ -114030,7 +113938,7 @@ index 0007fa1..f6ea848 100644 #ifdef DEBUG uint32_t frrem_samples; uint64_t frrem_accum; -@@ -615,6 +624,9 @@ extern void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, +@@ -615,6 +623,9 @@ extern void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, int dwc_otg_hcd_allocate_port(dwc_otg_hcd_t * hcd, dwc_otg_qh_t *qh); void dwc_otg_hcd_release_port(dwc_otg_hcd_t * dwc_otg_hcd, dwc_otg_qh_t *qh); @@ -114041,7 +113949,7 @@ index 0007fa1..f6ea848 100644 /** @} */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 64d33a5..c8f2a88 100644 +index 64d33a5..e5a27f4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -34,7 +34,6 @@ @@ -114086,7 +113994,27 @@ index 64d33a5..c8f2a88 100644 #ifdef FIQ_DEBUG char buffer[1000*16]; int wptr; -@@ -101,395 +75,11 @@ void notrace _fiq_print(FIQDBG_T dbg_lvl, char *fmt, ...) +@@ -83,12 +57,10 @@ void notrace _fiq_print(FIQDBG_T dbg_lvl, char *fmt, ...) + va_list args; + char text[17]; + hfnum_data_t hfnum = { .d32 = FIQ_READ(dwc_regs_base + 0x408) }; +- unsigned long flags; + +- local_irq_save(flags); +- local_fiq_disable(); + if(dbg_lvl & dbg_lvl_req || dbg_lvl == FIQDBG_ERR) + { ++ local_fiq_disable(); + snprintf(text, 9, "%4d%d:%d ", hfnum.b.frnum/8, hfnum.b.frnum%8, 8 - hfnum.b.frrem/937); + va_start(args, fmt); + vsnprintf(text+8, 9, fmt, args); +@@ -96,410 +68,21 @@ void notrace _fiq_print(FIQDBG_T dbg_lvl, char *fmt, ...) + + memcpy(buffer + wptr, text, 16); + wptr = (wptr + 16) % sizeof(buffer); ++ local_fiq_enable(); + } +- local_irq_restore(flags); } #endif @@ -114195,11 +114123,11 @@ index 64d33a5..c8f2a88 100644 - return handled; -} - - int notrace port_id(hcsplt_data_t hcsplt) - { - return hcsplt.b.prtaddr + (hcsplt.b.hubaddr << 8); - } - +-int notrace port_id(hcsplt_data_t hcsplt) +-{ +- return hcsplt.b.prtaddr + (hcsplt.b.hubaddr << 8); +-} +- -int notrace fiq_hcintr_handle(int channel, hfnum_data_t hfnum) -{ - hcchar_data_t hcchar = { .d32 = FIQ_READ(dwc_regs_base + 0x500 + (channel * 0x20) + 0x0) }; @@ -114482,17 +114410,18 @@ index 64d33a5..c8f2a88 100644 /** This function handles interrupts for the HCD. */ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) { -@@ -500,7 +90,8 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) + int retval = 0; + static int last_time; +- + dwc_otg_core_if_t *core_if = dwc_otg_hcd->core_if; gintsts_data_t gintsts; gintmsk_data_t gintmsk; hfnum_data_t hfnum; -- + haintmsk_data_t haintmsk; -+ + #ifdef DEBUG dwc_otg_core_global_regs_t *global_regs = core_if->core_global_regs; - -@@ -517,14 +108,25 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -517,14 +100,25 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) /* Check if HOST Mode */ if (dwc_otg_is_host_mode(core_if)) { local_fiq_disable(); @@ -114502,12 +114431,12 @@ index 64d33a5..c8f2a88 100644 + /* Pull in from the FIQ's disabled mask */ + gintmsk.d32 = gintmsk.d32 | ~(dwc_otg_hcd->fiq_state->gintmsk_saved.d32); + dwc_otg_hcd->fiq_state->gintmsk_saved.d32 = ~0; -+ ++ + + if (fiq_fsm_enable && ( 0x0000FFFF & ~(dwc_otg_hcd->fiq_state->haintmsk_saved.b2.chint))) { + gintsts.b.hcintr = 1; + } -+ ++ + /* Danger will robinson: fake a SOF if necessary */ + if (fiq_fsm_enable && (dwc_otg_hcd->fiq_state->gintmsk_saved.b.sofintr == 1)) { + gintsts.b.sofintr = 1; @@ -114522,7 +114451,7 @@ index 64d33a5..c8f2a88 100644 #ifdef DEBUG // We should be OK doing this because the common interrupts should already have been serviced -@@ -544,12 +146,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -544,12 +138,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) gintsts.d32, core_if); #endif hfnum.d32 = DWC_READ_REG32(&dwc_otg_hcd->core_if->host_if->host_global_regs->hfnum); @@ -114536,7 +114465,7 @@ index 64d33a5..c8f2a88 100644 retval |= dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd); } -@@ -604,37 +201,42 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -604,37 +193,43 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) } exit_handler_routine: @@ -114544,7 +114473,7 @@ index 64d33a5..c8f2a88 100644 - if (fiq_fix_enable) - { + if (fiq_enable) { -+ gintmsk_data_t gintmsk_new; ++ gintmsk_data_t gintmsk_new; + haintmsk_data_t haintmsk_new; local_fiq_disable(); - // Make sure that we don't clear the interrupt if we've still got pending work to do @@ -114566,11 +114495,12 @@ index 64d33a5..c8f2a88 100644 + haintmsk_new.d32 = *(volatile uint32_t *)&dwc_otg_hcd->fiq_state->haintmsk_saved.d32; + else + haintmsk_new.d32 = 0x0000FFFF; -+ ++ + /* The FIQ could have sneaked another interrupt in. If so, don't clear MPHI */ + if ((gintmsk_new.d32 == ~0) && (haintmsk_new.d32 == 0x0000FFFF)) { + DWC_WRITE_REG32(dwc_otg_hcd->fiq_state->mphi_regs.intstat, (1<<16)); + if (dwc_otg_hcd->fiq_state->mphi_int_count >= 50) { ++ fiq_print(FIQDBG_INT, dwc_otg_hcd->fiq_state, "MPHI CLR"); + DWC_WRITE_REG32(dwc_otg_hcd->fiq_state->mphi_regs.ctrl, ((1<<31) + (1<<16))); + while (!(DWC_READ_REG32(dwc_otg_hcd->fiq_state->mphi_regs.ctrl) & (1 << 17))) + ; @@ -114604,7 +114534,7 @@ index 64d33a5..c8f2a88 100644 } } -@@ -686,6 +288,7 @@ static inline void track_missed_sofs(uint16_t curr_frame_number) +@@ -686,6 +281,7 @@ static inline void track_missed_sofs(uint16_t curr_frame_number) int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) { hfnum_data_t hfnum; @@ -114612,7 +114542,7 @@ index 64d33a5..c8f2a88 100644 dwc_list_link_t *qh_entry; dwc_otg_qh_t *qh; dwc_otg_transaction_type_e tr_type; -@@ -733,7 +336,7 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) +@@ -733,7 +329,7 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) } } @@ -114621,7 +114551,7 @@ index 64d33a5..c8f2a88 100644 tr_type = dwc_otg_hcd_select_transactions(hcd); if (tr_type != DWC_OTG_TRANSACTION_NONE) { -@@ -741,10 +344,11 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) +@@ -741,10 +337,11 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) did_something = 1; } @@ -114637,19 +114567,17 @@ index 64d33a5..c8f2a88 100644 return 1; } -@@ -1020,28 +624,40 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_otg_hcd_t * dwc_otg_hcd) +@@ -1020,19 +617,21 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_otg_hcd_t * dwc_otg_hcd) { int i; int retval = 0; - haint_data_t haint; + haint_data_t haint = { .d32 = 0 } ; -+// haintmsk_data_t haintmsk = { .d32 = 0 }; /* Clear appropriate bits in HCINTn to clear the interrupt bit in * GINTSTS */ -- + - haint.d32 = dwc_otg_read_host_all_channels_intr(dwc_otg_hcd->core_if); -+ + if (!fiq_fsm_enable) + haint.d32 = dwc_otg_read_host_all_channels_intr(dwc_otg_hcd->core_if); @@ -114661,31 +114589,12 @@ index 64d33a5..c8f2a88 100644 local_fiq_disable(); - haint.d32 = haint_saved.d32; - haint_saved.d32 = 0; -+ //fiq_print(FIQDBG_INT, dwc_otg_hcd->fiq_state, "IRQHAINT"); -+ //fiq_print(FIQDBG_INT, dwc_otg_hcd->fiq_state, "%08x", haint.d32); + haint.b2.chint |= ~(dwc_otg_hcd->fiq_state->haintmsk_saved.b2.chint); + dwc_otg_hcd->fiq_state->haintmsk_saved.b2.chint = ~0; -+ //fiq_print(FIQDBG_INT, dwc_otg_hcd->fiq_state, "%08x", haint.d32); local_fiq_enable(); } - for (i = 0; i < dwc_otg_hcd->core_if->core_params->host_channels; i++) { - if (haint.b2.chint & (1 << i)) { - retval |= dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd, i); -+// if (fiq_fsm_enable) { -+// haintmsk.d32 = DWC_READ_REG32(&dwc_otg_hcd->core_if->host_if->host_global_regs->haintmsk); -+// haintmsk.b2.chint |= (1 << i); -+// DWC_WRITE_REG32(&dwc_otg_hcd->core_if->host_if->host_global_regs->haintmsk, haintmsk.d32); -+// } - } - } -- -+ //fiq_print(FIQDBG_INT, dwc_otg_hcd->fiq_state, "HAINTOUT"); -+ - return retval; - } - -@@ -1076,9 +692,7 @@ static uint32_t get_actual_xfer_length(dwc_hc_t * hc, +@@ -1076,9 +675,7 @@ static uint32_t get_actual_xfer_length(dwc_hc_t * hc, *short_read = (hctsiz.b.xfersize != 0); } } else if (hc->qh->do_split) { @@ -114696,7 +114605,7 @@ index 64d33a5..c8f2a88 100644 length = qtd->ssplit_out_xfer_count; } else { length = hc->xfer_len; -@@ -1325,19 +939,17 @@ static void release_channel(dwc_otg_hcd_t * hcd, +@@ -1325,19 +922,17 @@ static void release_channel(dwc_otg_hcd_t * hcd, int free_qtd; dwc_irqflags_t flags; dwc_spinlock_t *channel_lock = hcd->channel_lock; @@ -114719,18 +114628,16 @@ index 64d33a5..c8f2a88 100644 } } } -@@ -1394,7 +1006,10 @@ static void release_channel(dwc_otg_hcd_t * hcd, +@@ -1394,6 +989,8 @@ static void release_channel(dwc_otg_hcd_t * hcd, * function clears the channel interrupt enables and conditions, so * there's no need to clear the Channel Halted interrupt separately. */ + if (fiq_fsm_enable && hcd->fiq_state->channel[hc->hc_num].fsm != FIQ_PASSTHROUGH) + dwc_otg_cleanup_fiq_channel(hcd, hc->hc_num); dwc_otg_hc_cleanup(hcd->core_if, hc); -+// DWC_WARN("Reinsert HC %d", hc->hc_num); DWC_CIRCLEQ_INSERT_TAIL(&hcd->free_hc_list, hc, hc_list_entry); - if (!microframe_schedule) { -@@ -1416,27 +1031,10 @@ static void release_channel(dwc_otg_hcd_t * hcd, +@@ -1416,27 +1013,10 @@ static void release_channel(dwc_otg_hcd_t * hcd, DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); hcd->available_host_channels++; @@ -114759,7 +114666,7 @@ index 64d33a5..c8f2a88 100644 /* Try to queue more transfers now that there's a free channel. */ tr_type = dwc_otg_hcd_select_transactions(hcd); if (tr_type != DWC_OTG_TRANSACTION_NONE) { -@@ -1858,7 +1456,7 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, +@@ -1858,7 +1438,7 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, switch(dwc_otg_hcd_get_pipe_type(&qtd->urb->pipe_info)) { case UE_BULK: case UE_CONTROL: @@ -114768,7 +114675,7 @@ index 64d33a5..c8f2a88 100644 hc->qh->nak_frame = dwc_otg_hcd_get_frame_number(hcd); } -@@ -2074,7 +1672,7 @@ static int32_t handle_hc_nyet_intr(dwc_otg_hcd_t * hcd, +@@ -2074,7 +1654,7 @@ static int32_t handle_hc_nyet_intr(dwc_otg_hcd_t * hcd, // With the FIQ running we only ever see the failed NYET if (dwc_full_frame_num(frnum) != dwc_full_frame_num(hc->qh->sched_frame) || @@ -114777,7 +114684,7 @@ index 64d33a5..c8f2a88 100644 /* * No longer in the same full speed frame. * Treat this as a transaction error. -@@ -2460,12 +2058,11 @@ static inline int halt_status_ok(dwc_otg_hcd_t * hcd, +@@ -2460,12 +2040,11 @@ static inline int halt_status_ok(dwc_otg_hcd_t * hcd, static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, dwc_hc_t * hc, dwc_otg_hc_regs_t * hc_regs, @@ -114793,7 +114700,7 @@ index 64d33a5..c8f2a88 100644 /* For core with OUT NAK enhancement, the flow for high- * speed CONTROL/BULK OUT is handled a little differently. */ -@@ -2495,11 +2092,9 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, +@@ -2495,11 +2074,9 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, } /* Read the HCINTn register to determine the cause for the halt. */ @@ -114808,7 +114715,7 @@ index 64d33a5..c8f2a88 100644 if (hcint.b.xfercomp) { /** @todo This is here because of a possible hardware bug. Spec -@@ -2624,15 +2219,13 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, +@@ -2624,15 +2201,13 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, static int32_t handle_hc_chhltd_intr(dwc_otg_hcd_t * hcd, dwc_hc_t * hc, dwc_otg_hc_regs_t * hc_regs, @@ -114826,7 +114733,7 @@ index 64d33a5..c8f2a88 100644 } else { #ifdef DEBUG if (!halt_status_ok(hcd, hc, hc_regs, qtd)) { -@@ -2645,11 +2238,351 @@ static int32_t handle_hc_chhltd_intr(dwc_otg_hcd_t * hcd, +@@ -2645,11 +2220,370 @@ static int32_t handle_hc_chhltd_intr(dwc_otg_hcd_t * hcd, return 1; } @@ -114840,13 +114747,13 @@ index 64d33a5..c8f2a88 100644 + * 1. Un-mangle the status as recorded in each iso_frame_desc status + * 2. Copy it from the dwc_otg_urb into the real URB + */ -+void dwc_otg_fiq_unmangle_isoc(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh, dwc_otg_qtd_t *qtd, uint32_t num) ++void dwc_otg_fiq_unmangle_isoc(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh, dwc_otg_qtd_t *qtd, uint32_t num) +{ + struct dwc_otg_hcd_urb *dwc_urb = qtd->urb; + int nr_frames = dwc_urb->packet_count; + int i; + hcint_data_t frame_hcint; -+ ++ + for (i = 0; i < nr_frames; i++) { + frame_hcint.d32 = dwc_urb->iso_descs[i].status; + if (frame_hcint.b.xfercomp) { @@ -114862,9 +114769,11 @@ index 64d33a5..c8f2a88 100644 + } else if (frame_hcint.b.xacterr) { + dwc_urb->iso_descs[i].status = -DWC_E_PROTOCOL; + dwc_urb->error_count++; ++ dwc_urb->iso_descs[i].actual_length = 0; + } else if (frame_hcint.b.bblerr) { + dwc_urb->iso_descs[i].status = -DWC_E_OVERFLOW; + dwc_urb->error_count++; ++ dwc_urb->iso_descs[i].actual_length = 0; + } else { + /* Something went wrong */ + dwc_urb->iso_descs[i].status = -1; @@ -114872,10 +114781,10 @@ index 64d33a5..c8f2a88 100644 + dwc_urb->error_count++; + } + } -+ i -= 1; -+ printk_ratelimited(KERN_INFO "%s: HS isochronous of %d/%d frames with %d errors complete\n", -+ __FUNCTION__, i, dwc_urb->packet_count, dwc_urb->error_count); ++ //printk_ratelimited(KERN_INFO "%s: HS isochronous of %d/%d frames with %d errors complete\n", ++ // __FUNCTION__, i, dwc_urb->packet_count, dwc_urb->error_count); + hcd->fops->complete(hcd, dwc_urb->priv, dwc_urb, 0); ++ release_channel(hcd, qh->channel, qtd, DWC_OTG_HC_XFER_URB_COMPLETE); +} + +/** @@ -114910,7 +114819,7 @@ index 64d33a5..c8f2a88 100644 + + for (i = 0; i < st->nrpackets; i++) { + len += st->dma_info.slot_len[i]; -+ dwc_memcpy(ptr, &blob->channel[num].index[i].buf[0], st->dma_info.slot_len[i]); ++ dwc_memcpy(ptr, &blob->channel[num].index[i].buf[0], st->dma_info.slot_len[i]); + ptr += st->dma_info.slot_len[i]; + } + return len; @@ -114942,12 +114851,21 @@ index 64d33a5..c8f2a88 100644 + int hostchannels = 0; + int ret = 0; + fiq_print(FIQDBG_INT, hcd->fiq_state, "OUT %01d %01d ", num , st->fsm); -+ ++ + hostchannels = hcd->available_host_channels; + switch (st->fsm) { + case FIQ_TEST: + break; -+ ++ ++ case FIQ_DEQUEUE_ISSUED: ++ /* hc_halt was called. QTD no longer exists. */ ++ /* TODO: for a nonperiodic split transaction, need to issue a ++ * CLEAR_TT_BUFFER hub command if we were in the start-split phase. ++ */ ++ release_channel(hcd, hc, NULL, hc->halt_status); ++ ret = 1; ++ break; ++ + case FIQ_NP_SPLIT_DONE: + /* Nonperiodic transaction complete. */ + if (!hc->ep_is_in) { @@ -114960,10 +114878,13 @@ index 64d33a5..c8f2a88 100644 + } + ret = 1; + break; -+ ++ + case FIQ_NP_SPLIT_HS_ABORTED: + /* A HS abort is a 3-strikes on the HS bus at any point in the transaction. -+ * Assume that the data did not make it (nonperiodic ensure reliable traffic) */ ++ * Normally a CLEAR_TT_BUFFER hub command would be required: we can't do that ++ * because there's no guarantee which order a non-periodic split happened in. ++ * We could end up clearing a perfectly good transaction out of the buffer. ++ */ + if (hcint.b.xacterr) { + qtd->error_count += st->nr_errors; + handle_hc_xacterr_intr(hcd, hc, hc_regs, qtd); @@ -114974,9 +114895,9 @@ index 64d33a5..c8f2a88 100644 + BUG(); + } + break; -+ ++ + case FIQ_NP_SPLIT_LS_ABORTED: -+ /* A few cases can cause this - either an unknown state on a SSPLIT or ++ /* A few cases can cause this - either an unknown state on a SSPLIT or + * STALL/data toggle error response on a CSPLIT */ + if (hcint.b.stall) { + handle_hc_stall_intr(hcd, hc, hc_regs, qtd); @@ -114989,7 +114910,7 @@ index 64d33a5..c8f2a88 100644 + BUG(); + } + break; -+ ++ + case FIQ_PER_SPLIT_DONE: + /* Isoc IN or Interrupt IN/OUT */ + @@ -115023,7 +114944,7 @@ index 64d33a5..c8f2a88 100644 + } + + } -+ ++ + } + + } else { @@ -115104,7 +115025,7 @@ index 64d33a5..c8f2a88 100644 + release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + } + break; -+ ++ + case FIQ_HS_ISOC_DONE: + /* The FIQ has performed a whole pile of isochronous transactions. + * The status is recorded as the interrupt state should the transaction @@ -115112,11 +115033,12 @@ index 64d33a5..c8f2a88 100644 + */ + dwc_otg_fiq_unmangle_isoc(hcd, qh, qtd, num); + break; -+ ++ + case FIQ_PER_SPLIT_LS_ABORTED: + if (hcint.b.xacterr) { + /* Hub has responded with an ERR packet. Device -+ * has been unplugged or the port has been disabled. */ ++ * has been unplugged or the port has been disabled. ++ * TODO: need to issue a reset to the hub port. */ + qtd->error_count += 3; + handle_hc_xacterr_intr(hcd, hc, hc_regs, qtd); + } else { @@ -115126,10 +115048,14 @@ index 64d33a5..c8f2a88 100644 + release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + } + break; -+ ++ + case FIQ_PER_SPLIT_HS_ABORTED: -+ local_fiq_disable(); -+ BUG(); ++ /* Either the SSPLIT phase suffered transaction errors or something ++ * unexpected happened. ++ */ ++ qtd->error_count += 3; ++ handle_hc_xacterr_intr(hcd, hc, hc_regs, qtd); ++ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + break; + + case FIQ_PER_SPLIT_TIMEOUT: @@ -115157,11 +115083,11 @@ index 64d33a5..c8f2a88 100644 + release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + } + break; -+ ++ + default: + local_fiq_disable(); + DWC_WARN("unexpected state received on hc=%d fsm=%d", hc->hc_num, st->fsm); -+ BUG(); ++ BUG(); + } + //if (hostchannels != hcd->available_host_channels) { + /* should have incremented by now! */ @@ -115179,19 +115105,7 @@ index 64d33a5..c8f2a88 100644 hcintmsk_data_t hcintmsk; dwc_hc_t *hc; dwc_otg_hc_regs_t *hc_regs; -@@ -2657,35 +2590,47 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) - - DWC_DEBUGPL(DBG_HCDV, "--Host Channel Interrupt--, Channel %d\n", num); - -+ -+ - hc = dwc_otg_hcd->hc_ptr_array[num]; - hc_regs = dwc_otg_hcd->core_if->host_if->hc_regs[num]; - if(hc->halt_status == DWC_OTG_HC_XFER_URB_DEQUEUE) { - /* We are responding to a channel disable. Driver - * state is cleared - our qtd has gone away. - */ -+ //DWC_WARN("DEQUEUE"); +@@ -2666,26 +2600,25 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) release_channel(dwc_otg_hcd, hc, NULL, hc->halt_status); return 1; } @@ -115201,12 +115115,11 @@ index 64d33a5..c8f2a88 100644 + * Execution path is fundamentally different for the channels after a FIQ has completed + * a split transaction. + */ -+ ++ + + if (fiq_fsm_enable) { + if (*(volatile uint32_t *)&dwc_otg_hcd->fiq_state->channel[num].fsm != FIQ_PASSTHROUGH) { + dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd, num); -+// DWC_WARN("fsm handler"); + return 1; + } + } @@ -115218,15 +115131,6 @@ index 64d33a5..c8f2a88 100644 - DWC_DEBUGPL(DBG_HCDV, - " hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x\n", - hcint.d32, hcintmsk.d32, (hcint.d32 & hcintmsk.d32)); -+/* if (hc->qh->do_split) { -+ DWC_WARN("hc=%d hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x", -+ num, hcint.d32, hcintmsk.d32, (hcint.d32 & hcintmsk.d32)); -+ } */ -+ -+// if (hc->qh->do_split) { -+// DWC_WARN("hc=%d ep_type=%d in=%d hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x", -+// num, hc->qh->ep_type, hc->qh->ep_is_in, hcint.d32, hcintmsk.d32, (hcint.d32 & hcintmsk.d32)); -+// } hcint.d32 = hcint.d32 & hcintmsk.d32; - - if(fiq_split_enable) @@ -115242,7 +115146,7 @@ index 64d33a5..c8f2a88 100644 if (!dwc_otg_hcd->core_if->dma_enable) { if (hcint.b.chhltd && hcint.d32 != 0x2) { hcint.b.chhltd = 0; -@@ -2703,7 +2648,7 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) +@@ -2703,7 +2636,7 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) hcint.b.nyet = 0; } if (hcint.b.chhltd) { @@ -115252,7 +115156,7 @@ index 64d33a5..c8f2a88 100644 if (hcint.b.ahberr) { retval |= handle_hc_ahberr_intr(dwc_otg_hcd, hc, hc_regs, qtd); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index ee8eec9..6bde559 100644 +index ee8eec9..5d45062 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -58,6 +58,7 @@ @@ -115282,7 +115186,15 @@ index ee8eec9..6bde559 100644 /** @name Linux HC Driver API Functions */ /** @{ */ -@@ -395,13 +397,9 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, +@@ -351,7 +353,6 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, + urb); + } + } +- + DWC_FREE(dwc_otg_urb); + if (!new_entry) { + DWC_ERROR("dwc_otg_hcd: complete: cannot allocate URB TQ entry\n"); +@@ -395,13 +396,9 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, static struct fiq_handler fh = { .name = "usb_fiq", }; @@ -115298,7 +115210,7 @@ index ee8eec9..6bde559 100644 /** * Initializes the HCD. This function allocates memory for and initializes the * static parts of the usb_hcd and dwc_otg_hcd structures. It also registers the -@@ -433,20 +431,6 @@ int hcd_init(dwc_bus_dev_t *_dev) +@@ -433,20 +430,6 @@ int hcd_init(dwc_bus_dev_t *_dev) pci_set_consistent_dma_mask(_dev, dmamask); #endif @@ -115319,21 +115231,21 @@ index ee8eec9..6bde559 100644 /* * Allocate memory for the base HCD plus the DWC OTG HCD. * Initialize the base HCD. -@@ -466,30 +450,7 @@ int hcd_init(dwc_bus_dev_t *_dev) +@@ -466,30 +449,7 @@ int hcd_init(dwc_bus_dev_t *_dev) hcd->regs = otg_dev->os_dep.base; - if (fiq_fix_enable) - { - volatile extern void *dwc_regs_base; -- + - //Set the mphi periph to the required registers - c_mphi_regs.base = otg_dev->os_dep.mphi_base; - c_mphi_regs.ctrl = otg_dev->os_dep.mphi_base + 0x4c; - c_mphi_regs.outdda = otg_dev->os_dep.mphi_base + 0x28; - c_mphi_regs.outddb = otg_dev->os_dep.mphi_base + 0x2c; - c_mphi_regs.intstat = otg_dev->os_dep.mphi_base + 0x50; - +- - dwc_regs_base = otg_dev->os_dep.base; - - //Enable mphi peripheral @@ -115350,7 +115262,7 @@ index ee8eec9..6bde559 100644 /* Initialize the DWC OTG HCD. */ dwc_otg_hcd = dwc_otg_hcd_alloc_hcd(); if (!dwc_otg_hcd) { -@@ -503,6 +464,54 @@ int hcd_init(dwc_bus_dev_t *_dev) +@@ -503,6 +463,55 @@ int hcd_init(dwc_bus_dev_t *_dev) goto error2; } @@ -115399,6 +115311,7 @@ index ee8eec9..6bde559 100644 +#endif + // Enable FIQ interrupt from USB peripheral + enable_fiq(INTERRUPT_VC_USB); ++ local_fiq_enable(); + } + + @@ -115515,6 +115428,125 @@ index db95851..4d5a24c 100644 } } retval = dwc_otg_hcd_qh_add(hcd, *qh); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c +deleted file mode 100755 +index 50b94a8..0000000 +--- a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c ++++ /dev/null +@@ -1,113 +0,0 @@ +-#include "dwc_otg_regs.h" +-#include "dwc_otg_dbg.h" +- +-void dwc_debug_print_core_int_reg(gintsts_data_t gintsts, const char* function_name) +-{ +- DWC_DEBUGPL(DBG_USER, "*** Debugging from within the %s function: ***\n" +- "curmode: %1i Modemismatch: %1i otgintr: %1i sofintr: %1i\n" +- "rxstsqlvl: %1i nptxfempty : %1i ginnakeff: %1i goutnakeff: %1i\n" +- "ulpickint: %1i i2cintr: %1i erlysuspend:%1i usbsuspend: %1i\n" +- "usbreset: %1i enumdone: %1i isooutdrop: %1i eopframe: %1i\n" +- "restoredone: %1i epmismatch: %1i inepint: %1i outepintr: %1i\n" +- "incomplisoin:%1i incomplisoout:%1i fetsusp: %1i resetdet: %1i\n" +- "portintr: %1i hcintr: %1i ptxfempty: %1i lpmtranrcvd:%1i\n" +- "conidstschng:%1i disconnect: %1i sessreqintr:%1i wkupintr: %1i\n", +- function_name, +- gintsts.b.curmode, +- gintsts.b.modemismatch, +- gintsts.b.otgintr, +- gintsts.b.sofintr, +- gintsts.b.rxstsqlvl, +- gintsts.b.nptxfempty, +- gintsts.b.ginnakeff, +- gintsts.b.goutnakeff, +- gintsts.b.ulpickint, +- gintsts.b.i2cintr, +- gintsts.b.erlysuspend, +- gintsts.b.usbsuspend, +- gintsts.b.usbreset, +- gintsts.b.enumdone, +- gintsts.b.isooutdrop, +- gintsts.b.eopframe, +- gintsts.b.restoredone, +- gintsts.b.epmismatch, +- gintsts.b.inepint, +- gintsts.b.outepintr, +- gintsts.b.incomplisoin, +- gintsts.b.incomplisoout, +- gintsts.b.fetsusp, +- gintsts.b.resetdet, +- gintsts.b.portintr, +- gintsts.b.hcintr, +- gintsts.b.ptxfempty, +- gintsts.b.lpmtranrcvd, +- gintsts.b.conidstschng, +- gintsts.b.disconnect, +- gintsts.b.sessreqintr, +- gintsts.b.wkupintr); +- return; +-} +- +-void dwc_debug_core_int_mask(gintmsk_data_t gintmsk, const char* function_name) +-{ +- DWC_DEBUGPL(DBG_USER, "Interrupt Mask status (called from %s) :\n" +- "modemismatch: %1i otgintr: %1i sofintr: %1i rxstsqlvl: %1i\n" +- "nptxfempty: %1i ginnakeff: %1i goutnakeff: %1i ulpickint: %1i\n" +- "i2cintr: %1i erlysuspend:%1i usbsuspend: %1i usbreset: %1i\n" +- "enumdone: %1i isooutdrop: %1i eopframe: %1i restoredone: %1i\n" +- "epmismatch: %1i inepintr: %1i outepintr: %1i incomplisoin:%1i\n" +- "incomplisoout:%1i fetsusp: %1i resetdet: %1i portintr: %1i\n" +- "hcintr: %1i ptxfempty: %1i lpmtranrcvd:%1i conidstschng:%1i\n" +- "disconnect: %1i sessreqintr:%1i wkupintr: %1i\n", +- function_name, +- gintmsk.b.modemismatch, +- gintmsk.b.otgintr, +- gintmsk.b.sofintr, +- gintmsk.b.rxstsqlvl, +- gintmsk.b.nptxfempty, +- gintmsk.b.ginnakeff, +- gintmsk.b.goutnakeff, +- gintmsk.b.ulpickint, +- gintmsk.b.i2cintr, +- gintmsk.b.erlysuspend, +- gintmsk.b.usbsuspend, +- gintmsk.b.usbreset, +- gintmsk.b.enumdone, +- gintmsk.b.isooutdrop, +- gintmsk.b.eopframe, +- gintmsk.b.restoredone, +- gintmsk.b.epmismatch, +- gintmsk.b.inepintr, +- gintmsk.b.outepintr, +- gintmsk.b.incomplisoin, +- gintmsk.b.incomplisoout, +- gintmsk.b.fetsusp, +- gintmsk.b.resetdet, +- gintmsk.b.portintr, +- gintmsk.b.hcintr, +- gintmsk.b.ptxfempty, +- gintmsk.b.lpmtranrcvd, +- gintmsk.b.conidstschng, +- gintmsk.b.disconnect, +- gintmsk.b.sessreqintr, +- gintmsk.b.wkupintr); +- return; +-} +- +-void dwc_debug_otg_int(gotgint_data_t gotgint, const char* function_name) +-{ +- DWC_DEBUGPL(DBG_USER, "otg int register (from %s function):\n" +- "sesenddet:%1i sesreqsucstschung:%2i hstnegsucstschng:%1i\n" +- "hstnegdet:%1i adevtoutchng: %2i debdone: %1i\n" +- "mvic: %1i\n", +- function_name, +- gotgint.b.sesenddet, +- gotgint.b.sesreqsucstschng, +- gotgint.b.hstnegsucstschng, +- gotgint.b.hstnegdet, +- gotgint.b.adevtoutchng, +- gotgint.b.debdone, +- gotgint.b.mvic); +- +- return; +-} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h deleted file mode 100755 index ca17379..0000000 @@ -115573,29 +115605,106 @@ index ca17379..0000000 1.8.5.5 -From f7bef2ee742f78f555a7a36d133c5b39eecff750 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 28 Feb 2014 15:26:33 +0000 -Subject: [PATCH 114/114] ASoc: Don't report S24_LE support, it produces white - noise with xbmc +From d404f17556fb8a5263021e21096ceea0eb62378a Mon Sep 17 00:00:00 2001 +From: Dom Cobley +Date: Wed, 19 Mar 2014 16:26:42 +0000 +Subject: [PATCH 114/114] Fix ARM architecture issue with local_irq_restore() +If local_fiq_enable() is called before a local_irq_restore(flags) where +the flags variable has the F bit set, the FIQ will be erroneously disabled. + +Fixup arch_local_irq_restore to avoid trampling the F bit in CPSR. + +Also fix some of the hacks previously implemented for previous dwc_otg +incarnations. --- - sound/soc/codecs/pcm5102a.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + arch/arm/include/asm/fiq.h | 1 - + arch/arm/include/asm/irqflags.h | 16 +++++++++++++--- + arch/arm/kernel/fiq.c | 1 - + arch/arm/kernel/fiqasm.S | 3 --- + drivers/usb/host/dwc_common_port/dwc_common_linux.c | 1 + + 5 files changed, 14 insertions(+), 8 deletions(-) -diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c -index 126f1e9..7812d34 100644 ---- a/sound/soc/codecs/pcm5102a.c -+++ b/sound/soc/codecs/pcm5102a.c -@@ -28,7 +28,7 @@ - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | -- SNDRV_PCM_FMTBIT_S24_LE | -+ // SNDRV_PCM_FMTBIT_S24_LE | : disable for now, it causes white noise with xbmc - SNDRV_PCM_FMTBIT_S32_LE - }, - }; +diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h +index f1a131b..d493d0b 100644 +--- a/arch/arm/include/asm/fiq.h ++++ b/arch/arm/include/asm/fiq.h +@@ -42,7 +42,6 @@ struct fiq_handler { + /* helpers defined in fiqasm.S: */ + extern void __set_fiq_regs(unsigned long const *regs); + extern void __get_fiq_regs(unsigned long *regs); +-extern void __FIQ_Branch(unsigned long *regs); + + static inline void set_fiq_regs(struct pt_regs const *regs) + { +diff --git a/arch/arm/include/asm/irqflags.h b/arch/arm/include/asm/irqflags.h +index 3b763d6..5770408 100644 +--- a/arch/arm/include/asm/irqflags.h ++++ b/arch/arm/include/asm/irqflags.h +@@ -145,12 +145,22 @@ static inline unsigned long arch_local_save_flags(void) + } + + /* +- * restore saved IRQ & FIQ state ++ * restore saved IRQ state + */ + static inline void arch_local_irq_restore(unsigned long flags) + { +- asm volatile( +- " msr " IRQMASK_REG_NAME_W ", %0 @ local_irq_restore" ++ unsigned long temp = 0; ++ flags &= ~(1 << 6); ++ asm volatile ( ++ " mrs %0, cpsr" ++ : "=r" (temp) ++ : ++ : "memory", "cc"); ++ /* Preserve FIQ bit */ ++ temp &= (1 << 6); ++ flags = flags | temp; ++ asm volatile ( ++ " msr cpsr_c, %0 @ local_irq_restore" + : + : "r" (flags) + : "memory", "cc"); +diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c +index aac11f8..918875d 100644 +--- a/arch/arm/kernel/fiq.c ++++ b/arch/arm/kernel/fiq.c +@@ -142,7 +142,6 @@ void disable_fiq(int fiq) + EXPORT_SYMBOL(set_fiq_handler); + EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */ + EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */ +-EXPORT_SYMBOL(__FIQ_Branch); /* defined in fiqasm.S */ + EXPORT_SYMBOL(claim_fiq); + EXPORT_SYMBOL(release_fiq); + EXPORT_SYMBOL(enable_fiq); +diff --git a/arch/arm/kernel/fiqasm.S b/arch/arm/kernel/fiqasm.S +index 93eddfe..5233d54 100644 +--- a/arch/arm/kernel/fiqasm.S ++++ b/arch/arm/kernel/fiqasm.S +@@ -25,9 +25,6 @@ + ENTRY(__set_fiq_regs) + mov r2, #PSR_I_BIT | PSR_F_BIT | FIQ_MODE + mrs r1, cpsr +-@@@@@@@@@@@@@@@ hack: enable the fiq here to keep usb driver happy +- and r1, #~PSR_F_BIT +-@@@@@@@@@@@@@@@ endhack: (need to find better place for this to happen) + msr cpsr_c, r2 @ select FIQ mode + mov r0, r0 @ avoid hazard prior to ARMv4 + ldmia r0!, {r8 - r12} +diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c +index 0812d3a..6d01261 100644 +--- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c ++++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c +@@ -585,6 +585,7 @@ void DWC_MODIFY_REG32(uint32_t volatile *reg, uint32_t clear_mask, uint32_t set_ + local_irq_save(flags); + local_fiq_disable(); + writel((readl(reg) & ~clear_mask) | set_mask, reg); ++ local_fiq_enable(); + local_irq_restore(flags); + } + -- 1.8.5.5