diff --git a/projects/RPi/patches/linux/linux-01-RPi_support-dbddcf7.patch b/projects/RPi/patches/linux/linux-01-RPi_support-c1d79be.patch similarity index 98% rename from projects/RPi/patches/linux/linux-01-RPi_support-dbddcf7.patch rename to projects/RPi/patches/linux/linux-01-RPi_support-c1d79be.patch index e49ddf2a65..1d3b03a32e 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support-dbddcf7.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support-c1d79be.patch @@ -1,7 +1,7 @@ -From eed8f04670917df6c455a4c1d2927acba4289f0d Mon Sep 17 00:00:00 2001 +From 1545b0a92a2795bcc37e1e235894df0227dde232 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 01/99] Main bcm2708 linux port +Subject: [PATCH 001/102] Main bcm2708 linux port Signed-off-by: popcornmix --- @@ -8526,7 +8526,7 @@ index 0a3ed01..6857875 100644 void (*hw_reset)(struct sdhci_host *host); void (*platform_suspend)(struct sdhci_host *host); void (*platform_resume)(struct sdhci_host *host); -@@ -403,6 +417,29 @@ extern void sdhci_send_command(struct sdhci_host *host, +@@ -403,6 +417,29 @@ extern int sdhci_resume_host(struct sdhci_host *host); extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); #endif @@ -8590,13 +8590,13 @@ index 362927c4..e23fffb 100644 unsigned int data_early:1; /* Data finished before cmd */ -- -1.8.5.5 +1.9.1 -From 7efa2f27f5f930c10bed164474c672c05b6bf04c Mon Sep 17 00:00:00 2001 +From ef8a33bbddb9a3639f5b4c7751211205d61662f7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 7 May 2013 22:20:24 +0100 -Subject: [PATCH 02/99] Add quick config. +Subject: [PATCH 002/102] Add quick config. This is designed for quick compiling when developing. No modules are needed and it includes all Pi specific drivers @@ -8809,13 +8809,13 @@ index 0000000..e5efe75 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -- -1.8.5.5 +1.9.1 -From a6b43555e61c258257494af635a054d96190ba24 Mon Sep 17 00:00:00 2001 +From 20ebb79da3d75e1d30949b1ed40e34d72679ed1c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 03/99] Add dwc_otg driver +Subject: [PATCH 003/102] Add dwc_otg driver Signed-off-by: popcornmix --- @@ -65884,13 +65884,13 @@ index 0000000..cdc9963 +test_main(); +0; -- -1.8.5.5 +1.9.1 -From 3046bec13238fe2eed0de383199b8be25f2b71a6 Mon Sep 17 00:00:00 2001 +From 468f7c38d390fcd26eafb297f2b5e51489b35e74 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 -Subject: [PATCH 04/99] bcm2708 watchdog driver +Subject: [PATCH 004/102] bcm2708 watchdog driver Signed-off-by: popcornmix --- @@ -66320,13 +66320,13 @@ index 0000000..2f19203 +MODULE_ALIAS_MISCDEV(TEMP_MINOR); +MODULE_LICENSE("GPL"); -- -1.8.5.5 +1.9.1 -From 38b9e8eb11a75a3953e6e1b6003258d439cd8d6b Mon Sep 17 00:00:00 2001 +From d9496744ed97df8ea2cde55041b00ff09bd4f891 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 -Subject: [PATCH 05/99] bcm2708 framebuffer driver +Subject: [PATCH 005/102] bcm2708 framebuffer driver Signed-off-by: popcornmix --- @@ -69370,13 +69370,13 @@ index 3c14e43..7626beb 100644 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -- -1.8.5.5 +1.9.1 -From 361c55ff6ff6accb1c7d5bb1c75f2ddd54ff4d54 Mon Sep 17 00:00:00 2001 +From 9a33fc2677bbb7de1cbf4a84c3e35c8c49c3c6d8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 06/99] bcm2708 vchiq driver +Subject: [PATCH 006/102] bcm2708 vchiq driver Signed-off-by: popcornmix @@ -81924,13 +81924,13 @@ index 0000000..b6bfa21 + return vchiq_build_time; +} -- -1.8.5.5 +1.9.1 -From 1e512eca45e669d13cf2ef06607701ab587a4966 Mon Sep 17 00:00:00 2001 +From 9ed912b98e8894892f83994a74af44c9b25a69e5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 07/99] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 007/102] cma: Add vc_cma driver to enable use of CMA Signed-off-by: popcornmix --- @@ -83218,13 +83218,13 @@ index 0000000..5325832 + +#endif /* VC_CMA_H */ -- -1.8.5.5 +1.9.1 -From 4a65459237ba2b8ce27f88619f4c8aef0e7b8346 Mon Sep 17 00:00:00 2001 +From d5d2c434d0929a31f41d9443b6894db8386cfcfd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 08/99] bcm2708: alsa sound driver +Subject: [PATCH 008/102] bcm2708: alsa sound driver Signed-off-by: popcornmix --- @@ -85585,13 +85585,13 @@ index 0000000..af3e6eb + +#endif // _VC_AUDIO_DEFS_H_ -- -1.8.5.5 +1.9.1 -From d90696c8b05f409f82c83d80d8f3e8d4bb3df986 Mon Sep 17 00:00:00 2001 +From 7dfaf328795f38f34ecdc05b1529944e40e8fbba Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 26 Apr 2013 10:08:31 -0700 -Subject: [PATCH 09/99] Merge pull request #286 from +Subject: [PATCH 009/102] Merge pull request #286 from martinezjavier/rpi-3.6.y-dev add mmap support and some cleanups to bcm2835 ALSA driver @@ -85674,7 +85674,7 @@ index b5435fb..7f6d75e 100755 alsa_stream->running = 1; alsa_stream->draining = 1; } else { -@@ -327,30 +365,9 @@ static int snd_bcm2835_pcm_trigger(struct snd_pcm_substream *substream, int cmd) +@@ -327,30 +365,9 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream) alsa_stream->pos); audio_info(" .. OUT\n"); @@ -85708,7 +85708,7 @@ index b5435fb..7f6d75e 100755 } static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream, -@@ -372,7 +389,7 @@ static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream, +@@ -372,7 +389,7 @@ static struct snd_pcm_ops snd_bcm2835_playback_ops = { .prepare = snd_bcm2835_pcm_prepare, .trigger = snd_bcm2835_pcm_trigger, .pointer = snd_bcm2835_pcm_pointer, @@ -85749,7 +85749,7 @@ index b9b4fe8..ee09b13 100755 struct mutex vchi_mutex; bcm2835_alsa_stream_t *alsa_stream; int32_t result; -@@ -70,27 +75,35 @@ +@@ -70,27 +75,35 @@ bool force_bulk = false; static int bcm2835_audio_stop_worker(bcm2835_alsa_stream_t * alsa_stream); static int bcm2835_audio_start_worker(bcm2835_alsa_stream_t * alsa_stream); @@ -86060,7 +86060,7 @@ index 080bd5c..36afee3 100755 #include /* -@@ -110,6 +111,7 @@ enum { +@@ -110,6 +111,7 @@ typedef struct bcm2835_chip { typedef struct bcm2835_alsa_stream { bcm2835_chip_t *chip; struct snd_pcm_substream *substream; @@ -86069,13 +86069,13 @@ index 080bd5c..36afee3 100755 struct semaphore buffers_update_sem; struct semaphore control_sem; -- -1.8.5.5 +1.9.1 -From ae76bc9c9aeac3e3c3b216478d28c41b93e907d6 Mon Sep 17 00:00:00 2001 +From 835287ecd55f3126980e2a1b94ab2c68348c9d9d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:51:55 +0100 -Subject: [PATCH 10/99] Add hwrng (hardware random number generator) driver +Subject: [PATCH 010/102] Add hwrng (hardware random number generator) driver --- arch/arm/mach-bcm2708/include/mach/platform.h | 1 + @@ -86253,13 +86253,13 @@ index 0000000..1ffa7d7 +MODULE_DESCRIPTION("BCM2708 H/W Random Number Generator (RNG) driver"); +MODULE_LICENSE("GPL and additional rights"); -- -1.8.5.5 +1.9.1 -From f18dd263ffb57929721c90d7069cc9cfe323995d Mon Sep 17 00:00:00 2001 +From 17914d6446c6238381fbea5ed22d4355a41da8dd Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 11/99] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 011/102] lirc: added support for RaspberryPi GPIO --- drivers/staging/media/lirc/Kconfig | 6 + @@ -86997,13 +86997,13 @@ index 0000000..8aee83f +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Enable debugging messages"); -- -1.8.5.5 +1.9.1 -From 48896e973101a3b12ed407bf024ac27872102f0f Mon Sep 17 00:00:00 2001 +From 4221cf38a14d04c891d00b86f0f1ca8bac368deb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 May 2012 23:12:13 +0100 -Subject: [PATCH 12/99] Fixes for sdhci-bcm2708 +Subject: [PATCH 012/102] Fixes for sdhci-bcm2708 possible fix for sdcard missing status. Thank naren @@ -87141,7 +87141,7 @@ index 692fdb1..ea11f9c 100644 #include #include -@@ -67,6 +69,15 @@ +@@ -67,6 +69,15 @@ static const unsigned int sd_au_size[] = { __res & __mask; \ }) @@ -87437,7 +87437,7 @@ index d8ef77c..3173c18 100644 /*****************************************************************************\ * * * DMA Operation * -@@ -695,11 +648,11 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) +@@ -695,11 +648,11 @@ void sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data) { struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); @@ -87451,7 +87451,7 @@ index d8ef77c..3173c18 100644 if (host_priv->dma_wanted) { if (NULL == data) { -@@ -720,13 +673,16 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) +@@ -720,13 +673,16 @@ sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data) cs = readl(host_priv->dma_chan_base + BCM2708_DMA_CS); if (!(BCM2708_DMA_ACTIVE & cs)) @@ -87469,7 +87469,7 @@ index d8ef77c..3173c18 100644 else printk(KERN_INFO "%s: resetting ongoing cmd %d" "DMA before %d/%d [%d]/[%d] complete\n", -@@ -779,7 +735,7 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) +@@ -779,7 +735,7 @@ sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data) #endif } @@ -87666,7 +87666,7 @@ index d8ef77c..3173c18 100644 } /***************************************************************************** \ -@@ -1190,11 +1136,7 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) +@@ -1190,11 +1136,7 @@ static struct sdhci_ops sdhci_bcm2708_ops = { #else #error The BCM2708 SDHCI driver needs CONFIG_MMC_SDHCI_IO_ACCESSORS to be set #endif @@ -87678,7 +87678,7 @@ index d8ef77c..3173c18 100644 #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA // Platform DMA operations -@@ -1203,9 +1145,6 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) +@@ -1203,9 +1145,6 @@ static struct sdhci_ops sdhci_bcm2708_ops = { .pdma_reset = sdhci_bcm2708_platdma_reset, #endif .extra_ints = sdhci_bcm2708_quirk_extra_ints, @@ -88238,7 +88238,7 @@ index 6857875..649f3cf 100644 unsigned int (*missing_status)(struct sdhci_host *host); void (*hw_reset)(struct sdhci_host *host); -@@ -445,4 +443,10 @@ extern void sdhci_send_command(struct sdhci_host *host, +@@ -445,4 +443,10 @@ extern int sdhci_runtime_suspend_host(struct sdhci_host *host); extern int sdhci_runtime_resume_host(struct sdhci_host *host); #endif @@ -88274,13 +88274,13 @@ index e23fffb..b1b6537 100644 const struct sdhci_ops *ops; /* Low level hw interface */ -- -1.8.5.5 +1.9.1 -From 47b6a43161c0643904dd248a8effd1ab3d7fa2f1 Mon Sep 17 00:00:00 2001 +From 6f145323a96ca00891d91e9102ed8bd2dc73a290 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 13/99] Add cpufreq driver +Subject: [PATCH 013/102] Add cpufreq driver --- arch/arm/Kconfig | 1 + @@ -88579,13 +88579,13 @@ index 0000000..7bc55bd +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -- -1.8.5.5 +1.9.1 -From 1b14fb19ec8a6aa3c8a07038ce1795a01cf414c3 Mon Sep 17 00:00:00 2001 +From ce0b9a8bf79cb54179c077705a779a61226a7839 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 14/99] Added hwmon/thermal driver for reporting core +Subject: [PATCH 014/102] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian --- @@ -88604,7 +88604,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index ac4c11d6..61457cc 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -483,6 +483,14 @@ struct platform_device bcm2708_powerman_device = { +@@ -483,6 +483,14 @@ static struct platform_device bcm2708_alsa_devices[] = { }, }; @@ -89107,13 +89107,13 @@ index 0000000..85fceb5 + +module_platform_driver(bcm2835_thermal_driver); -- -1.8.5.5 +1.9.1 -From 4a859e645805f0af66b5fe708e47a3f892e0acd1 Mon Sep 17 00:00:00 2001 +From 73b1d569e8d9407f7d94695d78e226d677c78155 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 15/99] Allow mac address to be set in smsc95xx +Subject: [PATCH 015/102] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -89132,7 +89132,7 @@ index 424db65e..fc1ef4e 100644 struct smsc95xx_priv { u32 mac_cr; -@@ -74,6 +75,10 @@ struct smsc95xx_priv { +@@ -74,6 +75,10 @@ static bool turbo_mode = true; module_param(turbo_mode, bool, 0644); MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); @@ -89204,13 +89204,13 @@ index 424db65e..fc1ef4e 100644 if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { -- -1.8.5.5 +1.9.1 -From 50738ad9a4bf7c1ab491ad12f3206a65bf574d52 Mon Sep 17 00:00:00 2001 +From 4c4e16520400fe0a120f3974402e31ab3c775170 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Nov 2013 18:56:10 +0000 -Subject: [PATCH 16/99] Add Chris Boot's i2c and spi drivers. +Subject: [PATCH 016/102] Add Chris Boot's i2c and spi drivers. --- arch/arm/configs/bcmrpi_cutdown_defconfig | 9 + @@ -89290,7 +89290,7 @@ index 61457cc..624415b 100644 #include #include -@@ -205,7 +206,6 @@ static void __init bcm2708_clocksource_init(void) +@@ -205,7 +206,6 @@ static struct clk osc_clk = { /* warning - the USB needs a clock > 34MHz */ @@ -89298,7 +89298,7 @@ index 61457cc..624415b 100644 static struct clk sdhost_clk = { #ifdef CONFIG_ARCH_BCM2708_CHIPIT .rate = 4000000, /* 4MHz */ -@@ -213,7 +213,6 @@ static void __init bcm2708_clocksource_init(void) +@@ -213,7 +213,6 @@ static struct clk sdhost_clk = { .rate = 250000000, /* 250MHz */ #endif }; @@ -89306,7 +89306,7 @@ index 61457cc..624415b 100644 static struct clk_lookup lookups[] = { { /* UART0 */ -@@ -223,6 +222,15 @@ static void __init bcm2708_clocksource_init(void) +@@ -223,6 +222,15 @@ static struct clk_lookup lookups[] = { { /* USB */ .dev_id = "bcm2708_usb", .clk = &osc_clk, @@ -89322,7 +89322,7 @@ index 61457cc..624415b 100644 } }; -@@ -483,6 +491,89 @@ struct platform_device bcm2708_powerman_device = { +@@ -483,6 +491,89 @@ static struct platform_device bcm2708_alsa_devices[] = { }, }; @@ -90572,13 +90572,13 @@ index 0000000..180264a +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -- -1.8.5.5 +1.9.1 -From a02114887a6713b9a2ab58241755f3e952108372 Mon Sep 17 00:00:00 2001 +From 8a0ec82c86316637b304c2daafe82596b5ceb32c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 17/99] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 017/102] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) 1-wire: Add support for configuring pin for w1-gpio kernel module @@ -90624,7 +90624,7 @@ index 624415b..d315c19 100644 static void __init bcm2708_init_led(void); -@@ -258,6 +263,19 @@ static void __init bcm2708_clocksource_init(void) +@@ -258,6 +263,19 @@ static struct platform_device bcm2708_dmaman_device = { .num_resources = ARRAY_SIZE(bcm2708_dmaman_resources), }; @@ -90655,7 +90655,7 @@ index 624415b..d315c19 100644 bcm_register_device(&bcm2708_systemtimer_device); bcm_register_device(&bcm2708_fb_device); bcm_register_device(&bcm2708_usb_device); -@@ -880,3 +902,4 @@ static void __init board_reserve(void) +@@ -880,3 +902,4 @@ module_param(uart_clock, uint, 0644); module_param(disk_led_gpio, uint, 0644); module_param(disk_led_active_low, uint, 0644); module_param(reboot_part, uint, 0644); @@ -90778,13 +90778,13 @@ index e10acc2..667fdd5 100644 } } -- -1.8.5.5 +1.9.1 -From 70f7054af0acc75fc6ab5f54e44c53aa8c44deb9 Mon Sep 17 00:00:00 2001 +From 2803be346e01f3a767be6cb37723a462354b968e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:46:42 +0100 -Subject: [PATCH 18/99] Add FIQ patch to dwc_otg driver. Enable with +Subject: [PATCH 018/102] Add FIQ patch to dwc_otg driver. Enable with dwc_otg.fiq_fix_enable=1. Should give about 10% more ARM performance. Thanks to Gordon and Costas @@ -90830,7 +90830,7 @@ diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h index d493d0b..f1a131b 100644 --- a/arch/arm/include/asm/fiq.h +++ b/arch/arm/include/asm/fiq.h -@@ -42,6 +42,7 @@ struct fiq_handler { +@@ -42,6 +42,7 @@ extern void disable_fiq(int fiq); /* helpers defined in fiqasm.S: */ extern void __set_fiq_regs(unsigned long const *regs); extern void __get_fiq_regs(unsigned long *regs); @@ -90919,7 +90919,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index d315c19..2b11e9d 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -317,12 +317,32 @@ static void __init bcm2708_clocksource_init(void) +@@ -317,12 +317,32 @@ static struct resource bcm2708_usb_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { @@ -91218,7 +91218,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_ot index ac2c846..97f150b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -64,6 +64,8 @@ +@@ -64,6 +64,8 @@ bool microframe_schedule=true; static const char dwc_driver_name[] = "dwc_otg"; @@ -91227,7 +91227,7 @@ index ac2c846..97f150b 100644 extern int pcd_init( #ifdef LM_INTERFACE struct lm_device *_dev -@@ -238,6 +240,10 @@ struct dwc_otg_driver_module_params { +@@ -238,6 +240,10 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { .adp_enable = -1, }; @@ -91285,7 +91285,7 @@ index ac2c846..97f150b 100644 error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1343,6 +1366,10 @@ static void __exit dwc_otg_driver_cleanup(void) +@@ -1343,6 +1366,10 @@ MODULE_PARM_DESC(otg_ver, "OTG revision supported 0=OTG 1.3 1=OTG 2.0"); module_param(microframe_schedule, bool, 0444); MODULE_PARM_DESC(microframe_schedule, "Enable the microframe scheduler"); @@ -91300,7 +91300,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/d index ab935c0..dd72d82 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -53,6 +53,8 @@ +@@ -53,6 +53,8 @@ static int last_sel_trans_num_avail_hc_at_start = 0; static int last_sel_trans_num_avail_hc_at_end = 0; #endif /* DEBUG_HOST_CHANNELS */ @@ -91343,7 +91343,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_ot index 4823167..fb57db0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h -@@ -113,6 +113,11 @@ struct dwc_otg_hcd_function_ops { +@@ -113,6 +113,11 @@ extern void dwc_otg_hcd_remove(dwc_otg_hcd_t * hcd); */ extern int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd); @@ -91371,7 +91371,7 @@ index b41e164..b7b6b0c 100644 extern bool microframe_schedule; -@@ -41,36 +46,105 @@ +@@ -41,36 +46,105 @@ extern bool microframe_schedule; * This file contains the implementation of the HCD Interrupt handlers. */ @@ -91632,7 +91632,7 @@ index e4787f5..2b4a14e 100644 /** @name Linux HC Driver API Functions */ /** @{ */ /* manage i/o requests, device state */ -@@ -366,6 +372,12 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, +@@ -366,6 +372,12 @@ static struct dwc_otg_hcd_function_ops hcd_fops = { .get_b_hnp_enable = _get_b_hnp_enable, }; @@ -91930,7 +91930,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_ot index e46d9bb..6b2c7d0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h -@@ -97,6 +97,9 @@ +@@ -97,6 +97,9 @@ typedef struct os_dependent { /** Register offset for Diagnostic API */ uint32_t reg_offset; @@ -91941,14 +91941,14 @@ index e46d9bb..6b2c7d0 100644 struct lm_device *lmdev; #elif defined(PCI_INTERFACE) -- -1.8.5.5 +1.9.1 -From 52c64dc4386c2596111d1ea7134a902a2546a181 Mon Sep 17 00:00:00 2001 +From 397e13a72f19688cb7475d00b5af704e54debcd8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Sep 2012 15:17:53 +0100 -Subject: [PATCH 21/99] Avoid dynamic memory allocation for channel lock in USB - driver. Thanks ddv2005. +Subject: [PATCH 021/102] Avoid dynamic memory allocation for channel lock in + USB driver. Thanks ddv2005. --- drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 6 +++--- @@ -92051,13 +92051,13 @@ index b7b6b0c..76b5085 100644 /** -- -1.8.5.5 +1.9.1 -From d75d35ad1b63a1191d567c43e2d33892826d56d4 Mon Sep 17 00:00:00 2001 +From c9a60c8edc70a3c88d91684ac970d9e3aa851a3b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:58:47 +0100 -Subject: [PATCH 22/99] config: add missing options from 3.6.y kernel +Subject: [PATCH 022/102] config: add missing options from 3.6.y kernel --- arch/arm/configs/bcmrpi_defconfig | 748 ++++++++++++++++++++++++++++++++------ @@ -93098,13 +93098,13 @@ index 31f5afaa..88692be 100644 # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=y -- -1.8.5.5 +1.9.1 -From b5d278cf417ac5de9f3bd7b0886cbf8f570e6d9f Mon Sep 17 00:00:00 2001 +From a8cd22cda81e8bd36919b08d444ef3978ce3eb93 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 8 Apr 2013 21:12:48 +0100 -Subject: [PATCH 23/99] Add NAK holdoff scheme. Enabled by default, disable +Subject: [PATCH 023/102] Add NAK holdoff scheme. Enabled by default, disable with dwc_otg.nak_holdoff_enable=0. Thanks gsh --- @@ -93119,7 +93119,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_ot index 97f150b..c2bb596 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -243,6 +243,9 @@ struct dwc_otg_driver_module_params { +@@ -243,6 +243,9 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { //Global variable to switch the fiq fix on or off (declared in bcm2708.c) extern bool fiq_fix_enable; @@ -93137,7 +93137,7 @@ index 97f150b..c2bb596 100644 error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1366,9 +1370,10 @@ static void __exit dwc_otg_driver_cleanup(void) +@@ -1366,9 +1370,10 @@ MODULE_PARM_DESC(otg_ver, "OTG revision supported 0=OTG 1.3 1=OTG 2.0"); module_param(microframe_schedule, bool, 0444); MODULE_PARM_DESC(microframe_schedule, "Enable the microframe scheduler"); @@ -93215,7 +93215,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/d index f8ca2a4..0827b19 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -@@ -321,6 +321,11 @@ static inline void dwc_otg_hcd_fill_pipe(struct dwc_otg_hcd_pipe_info *pipe, +@@ -321,6 +321,11 @@ typedef struct dwc_otg_qh { */ uint16_t sched_frame; @@ -93231,7 +93231,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_ index 76b5085..aff59df 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -56,7 +56,12 @@ +@@ -56,7 +56,12 @@ int fiq_done, int_done; int g_next_sched_frame, g_np_count, g_np_sent, g_work_expected; static int mphi_int_count = 0 ; @@ -93311,13 +93311,13 @@ index a9dea55..ebee73a 100644 if (!DWC_CIRCLEQ_EMPTY(&qh->qtd_list)) { /* Add back to inactive non-periodic schedule. */ -- -1.8.5.5 +1.9.1 -From 0716fec09f8c734a9dfda331c7f58bd21268190e Mon Sep 17 00:00:00 2001 +From ef40df5f9c9da19f4876d3cb845d144667c2bb95 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Sun, 4 Nov 2012 15:55:01 +0000 -Subject: [PATCH 24/99] Make sure we wait for the reset to finish +Subject: [PATCH 024/102] Make sure we wait for the reset to finish --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2 ++ @@ -93337,13 +93337,13 @@ index aff59df..1a23d4b 100644 mphi_int_count = 0; } -- -1.8.5.5 +1.9.1 -From d423f60ca746638683ed0e4d1908e0f9994085f8 Mon Sep 17 00:00:00 2001 +From 3ab8aae4f9b473c203d1a9fe7bacdb52146dc892 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 9 Jan 2013 16:12:04 +0000 -Subject: [PATCH 25/99] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent +Subject: [PATCH 025/102] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent kernel memory corruption, escalating to OOPS under high USB load. --- @@ -93377,13 +93377,13 @@ index ebee73a..b3efaf4 100644 DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags); -- -1.8.5.5 +1.9.1 -From 333a6d91d68e2b87cdafa70ebc52154baf6eb03e Mon Sep 17 00:00:00 2001 +From 57f2f1cddcb12dba3050e2adc82a254eba11adf3 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:36:47 +0000 -Subject: [PATCH 26/99] dwc_otg: Fix unsafe access of QTD during URB enqueue +Subject: [PATCH 026/102] dwc_otg: Fix unsafe access of QTD during URB enqueue In dwc_otg_hcd_urb_enqueue during qtd creation, it was possible that the transaction could complete almost immediately after the qtd was assigned @@ -93467,13 +93467,13 @@ index b3efaf4..1554be5 100644 } } -- -1.8.5.5 +1.9.1 -From 351e191855af8b456f1694936bdfc87e65fab322 Mon Sep 17 00:00:00 2001 +From 747e264b3778807b13a7acc4ee55daedf6392b48 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:38:40 +0000 -Subject: [PATCH 27/99] dwc_otg: Fix incorrect URB allocation error handling +Subject: [PATCH 027/102] dwc_otg: Fix incorrect URB allocation error handling If the memory allocation for a dwc_otg_urb failed, the kernel would OOPS because for some reason a member of the *unallocated* struct was set to @@ -93511,14 +93511,14 @@ index 35d03d1..6fe30e3 100644 } -- -1.8.5.5 +1.9.1 -From dbab3bc84284fa85a7cefac4f64361e9a6168e35 Mon Sep 17 00:00:00 2001 +From bf7febd57be51847fbac94f18e7ba77c63ab4b09 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 28 Feb 2013 16:52:51 +0000 -Subject: [PATCH 28/99] dwc_otg: fix potential use-after-free case in interrupt - handler +Subject: [PATCH 028/102] dwc_otg: fix potential use-after-free case in + interrupt handler If a transaction had previously aborted, certain interrupts are enabled to track error counts and reset where necessary. On IN @@ -93546,14 +93546,14 @@ index 1a23d4b..7af455d 100644 if (hcint.b.nyet) { retval |= handle_hc_nyet_intr(dwc_otg_hcd, hc, hc_regs, qtd); -- -1.8.5.5 +1.9.1 -From 24491a9720fd180f17ed03e0bde8b8fae813bc05 Mon Sep 17 00:00:00 2001 +From 9624cb723286ab366bb9eafb3957ed4340f3f9ef Mon Sep 17 00:00:00 2001 From: P33M Date: Sun, 3 Mar 2013 14:45:53 +0000 -Subject: [PATCH 29/99] dwc_otg: add handling of SPLIT transaction data toggle - errors +Subject: [PATCH 029/102] dwc_otg: add handling of SPLIT transaction data + toggle errors Previously a data toggle error on packets from a USB1.1 device behind a TT would result in the Pi locking up as the driver never handled @@ -93604,13 +93604,13 @@ index 7af455d..a27dacd 100644 if (hcint.b.nyet) { /* -- -1.8.5.5 +1.9.1 -From 6dcffadb2b56080b569c20528cb16d438ba57493 Mon Sep 17 00:00:00 2001 +From a74291b9ad8a7cd8ec0ed43ca76b0d63f0cd8188 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 21 Mar 2013 19:36:17 +0000 -Subject: [PATCH 30/99] dwc_otg: implement tasklet for returning URBs to +Subject: [PATCH 030/102] dwc_otg: implement tasklet for returning URBs to usbcore hcd layer The dwc_otg driver interrupt handler for transfer completion will spend @@ -93683,7 +93683,7 @@ diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_co index 9ffe929..09ed244 100644 --- a/drivers/usb/host/dwc_common_port/dwc_os.h +++ b/drivers/usb/host/dwc_common_port/dwc_os.h -@@ -981,6 +981,8 @@ extern void DWC_WORKQ_SCHEDULE_DELAYED(dwc_workq_t *workq, dwc_work_callback_t c +@@ -981,6 +981,8 @@ extern void DWC_TASK_FREE(dwc_tasklet_t *task); extern void DWC_TASK_SCHEDULE(dwc_tasklet_t *task); #define dwc_task_schedule DWC_TASK_SCHEDULE @@ -93769,7 +93769,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/d index 0827b19..0ba7558 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -@@ -374,6 +374,13 @@ static inline void dwc_otg_hcd_fill_pipe(struct dwc_otg_hcd_pipe_info *pipe, +@@ -374,6 +374,13 @@ typedef struct dwc_otg_qh { DWC_CIRCLEQ_HEAD(hc_list, dwc_hc); @@ -93849,13 +93849,13 @@ index 2b4a14e..39787e3 100644 } -- -1.8.5.5 +1.9.1 -From 4195309af633ae7db0cb2e789d89cacfbb4e57b0 Mon Sep 17 00:00:00 2001 +From 2f0d248c26e3fdd507da17a57a4017b7af7b2037 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Apr 2013 00:08:36 +0100 -Subject: [PATCH 32/99] dwc_otg: fix NAK holdoff and allow on split +Subject: [PATCH 032/102] dwc_otg: fix NAK holdoff and allow on split transactions only This corrects a bug where if a single active non-periodic endpoint @@ -93922,13 +93922,13 @@ index 533b17d..73f7643 100644 DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); if (hcd->available_host_channels < 1) { -- -1.8.5.5 +1.9.1 -From 59d748ec119f01d10e2a5c6c7ab1d9f8974e9394 Mon Sep 17 00:00:00 2001 +From 7cca46d2b090514d8854bb52eb90e4e39e37e4d7 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 33/99] Speed up console framebuffer imageblit function +Subject: [PATCH 033/102] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -94137,13 +94137,13 @@ index a2bb276..436494f 100644 start_index, pitch_index); } else -- -1.8.5.5 +1.9.1 -From f39e802bd68b2e12434eda71c0453cd998173187 Mon Sep 17 00:00:00 2001 +From a504248defaf69d87595a7ec4fe16f85474a879d Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 34/99] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 034/102] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -94161,7 +94161,7 @@ diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 7309ac7..46984cc 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c -@@ -1083,6 +1083,25 @@ static int fb_check_caps(struct fb_info *info, struct fb_var_screeninfo *var, +@@ -1083,6 +1083,25 @@ fb_blank(struct fb_info *info, int blank) } EXPORT_SYMBOL(fb_blank); @@ -94236,13 +94236,13 @@ index fb795c3..fa72af0 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -- -1.8.5.5 +1.9.1 -From 45c67ee11022c609f1c6c3fec98ca0c5719f658a Mon Sep 17 00:00:00 2001 +From a4ee4a045dc005170a6bb5702e6a016054bb72bd Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 16:00:25 +0300 -Subject: [PATCH 35/99] bcm2708_fb: DMA acceleration for fb_copyarea +Subject: [PATCH 035/102] bcm2708_fb: DMA acceleration for fb_copyarea Based on http://www.raspberrypi.org/phpBB3/viewtopic.php?p=62425#p62425 Also used Simon's dmaer_master module as a reference for tweaking DMA @@ -94342,7 +94342,7 @@ index 54cd760..798eb52 100644 #include #include -@@ -51,6 +54,10 @@ +@@ -51,6 +54,10 @@ static int fbheight = 480; /* module parameter */ static int fbdepth = 16; /* module parameter */ static int fbswap = 0; /* module parameter */ @@ -94697,14 +94697,14 @@ index 54cd760..798eb52 100644 return 0; -- -1.8.5.5 +1.9.1 -From bd56f4f39703a8f6f46d2f63ac23b486dacd10b4 Mon Sep 17 00:00:00 2001 +From 2720bb1490db12a312e0134957d4caf78086aa02 Mon Sep 17 00:00:00 2001 From: Mike Bradley Date: Mon, 17 Jun 2013 11:31:42 -0700 -Subject: [PATCH 36/99] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock held - in completion handler +Subject: [PATCH 036/102] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock + held in completion handler usb_hcd_unlink_urb_from_ep must be called with the HCD lock held. Calling it asynchronously in the tasklet was not safe (regression in @@ -94787,13 +94787,13 @@ index 39787e3..5e6a26a 100644 return 0; } -- -1.8.5.5 +1.9.1 -From a7f55afed48de1afa47097cf7d4dc314dea44946 Mon Sep 17 00:00:00 2001 +From c4956794b930c9f617fcd5b3ab2a1bac8d55a02d Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Thu, 4 Apr 2013 11:05:21 +0100 -Subject: [PATCH 37/99] USB fix using a FIQ to implement split transactions +Subject: [PATCH 037/102] USB fix using a FIQ to implement split transactions This commit adds a FIQ implementaion that schedules the split transactions using a FIQ so we don't get @@ -94924,7 +94924,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_ot index c2bb596..176dc14 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -242,7 +242,8 @@ struct dwc_otg_driver_module_params { +@@ -242,7 +242,8 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { //Global variable to switch the fiq fix on or off (declared in bcm2708.c) extern bool fiq_fix_enable; @@ -94942,7 +94942,7 @@ index c2bb596..176dc14 100644 error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1374,6 +1376,8 @@ static void __exit dwc_otg_driver_cleanup(void) +@@ -1374,6 +1376,8 @@ module_param(fiq_fix_enable, bool, 0444); MODULE_PARM_DESC(fiq_fix_enable, "Enable the fiq fix"); module_param(nak_holdoff_enable, bool, 0444); MODULE_PARM_DESC(nak_holdoff_enable, "Enable the NAK holdoff"); @@ -95181,7 +95181,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/d index 0ba7558..de1ccb1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -@@ -168,10 +168,10 @@ static inline void dwc_otg_hcd_fill_pipe(struct dwc_otg_hcd_pipe_info *pipe, +@@ -168,10 +168,10 @@ typedef enum dwc_otg_control_phase { /** Transaction types. */ typedef enum dwc_otg_transaction_type { @@ -95196,7 +95196,7 @@ index 0ba7558..de1ccb1 100644 } dwc_otg_transaction_type_e; struct dwc_otg_qh; -@@ -370,6 +370,8 @@ static inline void dwc_otg_hcd_fill_pipe(struct dwc_otg_hcd_pipe_info *pipe, +@@ -370,6 +370,8 @@ typedef struct dwc_otg_qh { uint16_t speed; uint16_t frame_usecs[8]; @@ -95246,7 +95246,7 @@ index a27dacd..8e5789f 100644 extern bool microframe_schedule; -@@ -52,21 +53,295 @@ +@@ -52,21 +53,295 @@ extern bool microframe_schedule; void * dummy_send; mphi_regs_t c_mphi_regs; @@ -96011,7 +96011,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc index 5e6a26a..d1c5c2b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -392,7 +392,11 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, +@@ -392,7 +392,11 @@ static struct dwc_otg_hcd_function_ops hcd_fops = { static struct fiq_handler fh = { .name = "usb_fiq", }; @@ -96147,7 +96147,7 @@ index 660d50f..ca17379 100755 typedef struct { volatile void* base; -@@ -18,7 +15,7 @@ +@@ -18,7 +15,7 @@ void dwc_debug_print_core_int_reg(gintsts_data_t gintsts, const char* function_n void dwc_debug_core_int_mask(gintsts_data_t gintmsk, const char* function_name); void dwc_debug_otg_int(gotgint_data_t gotgint, const char* function_name); @@ -96156,7 +96156,7 @@ index 660d50f..ca17379 100755 #ifdef DEBUG #define DWC_DBG_PRINT_CORE_INT(_arg_) dwc_debug_print_core_int_reg(_arg_,__func__) -@@ -30,7 +27,22 @@ +@@ -30,7 +27,22 @@ void dwc_debug_otg_int(gotgint_data_t gotgint, const char* function_name); #define DWC_DBG_PRINT_CORE_INT_MASK(_arg_) #define DWC_DBG_PRINT_OTG_INT(_arg_) @@ -96183,7 +96183,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_ index 1b1f83c..c8590b5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c -@@ -4276,7 +4276,7 @@ static int32_t dwc_otg_pcd_handle_out_ep_intr(dwc_otg_pcd_t * pcd) +@@ -4276,7 +4276,7 @@ do { \ && (pcd->ep0state == EP0_OUT_DATA_PHASE)) status.d32 = core_if->dev_if->out_desc_addr->status.d32; if (pcd->ep0state == EP0_OUT_STATUS_PHASE) @@ -96193,13 +96193,13 @@ index 1b1f83c..c8590b5 100644 if (status.b.sr) { -- -1.8.5.5 +1.9.1 -From b7fc5de2d54dae4b3889384e524f863ce7cb58d1 Mon Sep 17 00:00:00 2001 +From cedde0b542a9e7cb7533edfa3e25eaf7ff082cfa Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 11:39:46 +0100 -Subject: [PATCH 38/99] dwc_otg: fix device attributes and avoid kernel +Subject: [PATCH 038/102] dwc_otg: fix device attributes and avoid kernel warnings on boot --- @@ -96265,13 +96265,13 @@ index fab2961..af1cd4d 100644 #ifdef CONFIG_USB_DWC_OTG_LPM -- -1.8.5.5 +1.9.1 -From d58a8048d44a07bd96fc424494030f68fdb3424f Mon Sep 17 00:00:00 2001 +From e4876ca510316075698ab9551839e926ea6e2dcd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 Jul 2013 23:55:52 +0100 -Subject: [PATCH 39/99] dcw_otg: avoid logging function that can cause panics +Subject: [PATCH 039/102] dcw_otg: avoid logging function that can cause panics See: https://github.com/raspberrypi/firmware/issues/21 Thanks to cleverca22 for fix @@ -96293,13 +96293,13 @@ index af1cd4d..9da0c92 100644 return sprintf(buf, "SPRAM Dump\n"); } -- -1.8.5.5 +1.9.1 -From f0a3071aee6b34f28a0a9d80f17bf6954c53f6a9 Mon Sep 17 00:00:00 2001 +From 593f871d5c5764fb4e1d35bf8455d11316cb01df Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 20:41:26 +0100 -Subject: [PATCH 40/99] dwc_otg: mask correct interrupts after transaction +Subject: [PATCH 040/102] dwc_otg: mask correct interrupts after transaction error recovery The dwc_otg driver will unmask certain interrupts on a transaction @@ -96363,13 +96363,13 @@ index 8e5789f..fd73e41 100644 } -- -1.8.5.5 +1.9.1 -From c58f0588a7dc634988251890ca78338822608f09 Mon Sep 17 00:00:00 2001 +From 547e54f597c366ae0b8a7374e94ba4d3b9526fea Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 21:48:41 +0100 -Subject: [PATCH 41/99] dwc_otg: fiq: prevent FIQ thrash and incorrect state +Subject: [PATCH 041/102] dwc_otg: fiq: prevent FIQ thrash and incorrect state passing to IRQ In the case of a transaction to a device that had previously aborted @@ -96423,13 +96423,13 @@ index fd73e41..2ec0565 100644 // Clear the interrupt, this will also clear the HAINT bit FIQ_WRITE((dwc_regs_base + 0x500 + (channel * 0x20) + 0x8), hcint.d32); -- -1.8.5.5 +1.9.1 -From b1c52d48103059a6a4b93155d75a15cb36b6c42c Mon Sep 17 00:00:00 2001 +From abe6b04b3cd481fef48202fea3aac89f7a586bd1 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Mon, 8 Jul 2013 04:12:19 +0100 -Subject: [PATCH 42/99] Fix function tracing +Subject: [PATCH 042/102] Fix function tracing --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 12 ++++++------ @@ -96439,7 +96439,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_ index 2ec0565..083b1c3 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -77,7 +77,7 @@ +@@ -77,7 +77,7 @@ int queued_port[MAX_EPS_CHANNELS]; #ifdef FIQ_DEBUG char buffer[1000*16]; int wptr; @@ -96457,7 +96457,7 @@ index 2ec0565..083b1c3 100644 { hcchar_data_t hcchar = { .d32 = FIQ_READ(dwc_regs_base + 0x500 + (channel * 0x20) + 0x0) }; hcsplt_data_t hcsplt = { .d32 = FIQ_READ(dwc_regs_base + 0x500 + (channel * 0x20) + 0x4) }; -@@ -147,7 +147,7 @@ void fiq_queue_request(int channel, int odd_frame) +@@ -147,7 +147,7 @@ static int last_sof = -1; */ int diff; @@ -96481,7 +96481,7 @@ index 2ec0565..083b1c3 100644 { hcchar_data_t hcchar = { .d32 = FIQ_READ(dwc_regs_base + 0x500 + (channel * 0x20) + 0x0) }; hcsplt_data_t hcsplt = { .d32 = FIQ_READ(dwc_regs_base + 0x500 + (channel * 0x20) + 0x4) }; -@@ -361,7 +361,7 @@ int fiq_hcintr_handle(int channel, hfnum_data_t hfnum) +@@ -361,7 +361,7 @@ gintmsk_data_t gintmsk; gintsts_data_t triggered, handled, keep; hfnum_data_t hfnum; @@ -96491,13 +96491,13 @@ index 2ec0565..083b1c3 100644 /* entry takes care to store registers we will be treading on here */ -- -1.8.5.5 +1.9.1 -From 5e97aa39101eff9509e8357d4ed67139e0bc7939 Mon Sep 17 00:00:00 2001 +From a61fa157ae9e04c45d322dffe632eede1980d9c0 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 16:32:41 +0100 -Subject: [PATCH 43/99] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue +Subject: [PATCH 043/102] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue --- drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 53 ++++++++++++++-------------- @@ -96581,13 +96581,13 @@ index d1c5c2b..315c803 100644 } -- -1.8.5.5 +1.9.1 -From 63964d241251a31790aba16abd383882f6c2a2db Mon Sep 17 00:00:00 2001 +From 375321915dbf14d6148921d53696e557bf9285d9 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 17:07:26 +0100 -Subject: [PATCH 44/99] dwc_otg: prevent OOPSes during device disconnects +Subject: [PATCH 044/102] dwc_otg: prevent OOPSes during device disconnects The dwc_otg_urb_enqueue function is thread-unsafe. In particular the access of urb->hcpriv, usb_hcd_link_urb_to_ep, dwc_otg_urb->qtd and @@ -96725,14 +96725,14 @@ index 7b92025..db95851 100644 return retval; -- -1.8.5.5 +1.9.1 -From d4856e0a30f5a31f905ed5561e7f610b6cad3c6b Mon Sep 17 00:00:00 2001 +From 2765ae348e7dfa35a1391ab9de05fd8901b9d48b Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Jul 2013 14:08:26 +0100 -Subject: [PATCH 45/99] dwc_otg: prevent BUG() in TT allocation if hub address - is > 16 +Subject: [PATCH 045/102] dwc_otg: prevent BUG() in TT allocation if hub + address is > 16 A fixed-size array is used to track TT allocation. This was previously set to 16 which caused a crash because @@ -96818,13 +96818,13 @@ index 083b1c3..c76910d 100644 } -- -1.8.5.5 +1.9.1 -From 1c1e2b546778044e32a989ccb07f638ec5e8eadf Mon Sep 17 00:00:00 2001 +From 3361cdb6bf9169837b86c39a6b674af7179be204 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 23 Jul 2013 14:15:32 +0100 -Subject: [PATCH 46/99] dwc_otg: make channel halts with unknown state less +Subject: [PATCH 046/102] dwc_otg: make channel halts with unknown state less damaging If the IRQ received a channel halt interrupt through the FIQ @@ -96866,13 +96866,13 @@ index c76910d..5fd8613 100644 } -- -1.8.5.5 +1.9.1 -From 85b9d9d3593dbc845eeeeb5ecc90e64d457216d5 Mon Sep 17 00:00:00 2001 +From bed42c072cd48164bac7e4044e16d60714c4635f Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 30 Jul 2013 09:58:48 +0100 -Subject: [PATCH 47/99] dwc_otg: fiq_split: use TTs with more granularity +Subject: [PATCH 047/102] dwc_otg: fiq_split: use TTs with more granularity This fixes certain issues with split transaction scheduling. @@ -96989,13 +96989,13 @@ index 5fd8613..a959a49 100644 /* Try to queue more transfers now that there's a free channel. */ -- -1.8.5.5 +1.9.1 -From 1f2a0a8c019181b0d1c6068d0810c7a2f2982c35 Mon Sep 17 00:00:00 2001 +From 7108fd7b1305be27b6694f0e8355a98c37bfed6c Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 2 Aug 2013 10:04:18 +0100 -Subject: [PATCH 48/99] dwc_otg: fix potential sleep while atomic during urb +Subject: [PATCH 048/102] dwc_otg: fix potential sleep while atomic during urb enqueue Fixes a regression introduced with eb1b482a. Kmalloc called from @@ -97021,13 +97021,13 @@ index 87e517d..88c0544 100644 if (alloc_bandwidth) { allocate_bus_bandwidth(hcd, -- -1.8.5.5 +1.9.1 -From c73caf9c9004469745cc90fc639d0407f93ede4a Mon Sep 17 00:00:00 2001 +From a933fc76524ec758828297dc6781fae482ea56a7 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:42:12 +0100 -Subject: [PATCH 49/99] dwc_otg: make fiq_split_enable imply fiq_fix_enable +Subject: [PATCH 049/102] dwc_otg: make fiq_split_enable imply fiq_fix_enable Failing to set up the FIQ correctly would result in "IRQ 32: nobody cared" errors in dmesg. @@ -97053,13 +97053,13 @@ index 176dc14..f06c3d22 100644 DWC_DRIVER_VERSION, #ifdef LM_INTERFACE -- -1.8.5.5 +1.9.1 -From 112427bd8d221af2c710141f288c1de732027cae Mon Sep 17 00:00:00 2001 +From 01ec4d73bf2783487c7d4c8981aa0c5ab4c7f55e Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:47:12 +0100 -Subject: [PATCH 50/99] dwc_otg: prevent crashes on host port disconnects +Subject: [PATCH 050/102] dwc_otg: prevent crashes on host port disconnects Fix several issues resulting in crashes or inconsistent state if a Model A root port was disconnected. @@ -97087,7 +97087,7 @@ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/d index 489b765..1904f6a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -59,6 +59,11 @@ +@@ -59,6 +59,11 @@ static int last_sel_trans_num_avail_hc_at_end = 0; extern int g_next_sched_frame, g_np_count, g_np_sent; @@ -97214,13 +97214,13 @@ index 88c0544..ae4271a 100644 if (status) { DWC_PRINTF("Uknown urb status %d\n", status); -- -1.8.5.5 +1.9.1 -From e33517d8bd9cfb06814f672cbf0c986c057ef160 Mon Sep 17 00:00:00 2001 +From 47c478da902d5e9b9a92d5cdc7e04ce08ac61323 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 13:17:58 +0100 -Subject: [PATCH 51/99] dwc_otg: prevent leaking URBs during enqueue +Subject: [PATCH 051/102] dwc_otg: prevent leaking URBs during enqueue A dwc_otg_urb would get leaked if the HCD enqueue function failed for any reason. Free the URB at the appropriate points. @@ -97253,13 +97253,13 @@ index ae4271a..ee8eec9 100644 return retval; } -- -1.8.5.5 +1.9.1 -From e3129c44448e5b007a4a888c7f5c44b24a53a498 Mon Sep 17 00:00:00 2001 +From b4286846f0411fbd9331616e907c3709a0652ff0 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Sep 2013 16:08:27 +0100 -Subject: [PATCH 52/99] dwc_otg: Enable NAK holdoff for control split +Subject: [PATCH 052/102] dwc_otg: Enable NAK holdoff for control split transactions Certain low-speed devices take a very long time to complete a @@ -97289,14 +97289,14 @@ index 3a549a1..f8dc4be 100644 hc->qh->nak_frame = dwc_otg_hcd_get_frame_number(hcd); } -- -1.8.5.5 +1.9.1 -From 22679a405b4fed3f7bb1c3ab77eac98777b72d21 Mon Sep 17 00:00:00 2001 +From 2dc01b3c25a0eb28909b9eb1603db1e4a486629f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 20 Sep 2013 19:07:56 +0100 -Subject: [PATCH 53/99] dwc_otg: Fix for occasional lockup on boot when doing a - USB reset +Subject: [PATCH 053/102] dwc_otg: Fix for occasional lockup on boot when doing + a USB reset --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 4 ++-- @@ -97318,13 +97318,13 @@ index f8dc4be..64d33a5 100644 return 1; } -- -1.8.5.5 +1.9.1 -From c30038e0d03a58de9014899834565d7abdd21bc7 Mon Sep 17 00:00:00 2001 +From 9c3a2ec18830402f570cddce24c239cc5aca0e85 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 27 Sep 2013 14:42:24 +0100 -Subject: [PATCH 54/99] dwc_otg: Don't issue traffic to LS devices in FS mode +Subject: [PATCH 054/102] dwc_otg: Don't issue traffic to LS devices in FS mode Issuing low-speed packets when the root port is in full-speed mode causes the root port to stop responding. Explicitly fail when @@ -97363,13 +97363,13 @@ index 1904f6a..22300f0 100644 if (qtd == NULL) { DWC_ERROR("DWC OTG HCD URB Enqueue failed creating QTD\n"); -- -1.8.5.5 +1.9.1 -From bfb8817dcfaf51eb4c1ad66bc61a44011f2de160 Mon Sep 17 00:00:00 2001 +From 6b982b62c497b193eebf38719764bf67b92cf2c6 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 55/99] bcm2835: add v4l2 camera device +Subject: [PATCH 055/102] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -103354,13 +103354,13 @@ index 0000000..9d1d11e + +#endif /* MMAL_VCHIQ_H */ -- -1.8.5.5 +1.9.1 -From f4db14f09a0f18e1928e001d15eb464afb86d65a Mon Sep 17 00:00:00 2001 +From f8306e40240dda3884631577fbbd50fe8b85c399 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 10:58:01 +0000 -Subject: [PATCH 56/99] V4L2: Fix EV values. Add manual shutter speed control +Subject: [PATCH 056/102] V4L2: Fix EV values. Add manual shutter speed control V4L2 EV values should be in units of 1/1000. Corrected. Add support for V4L2_CID_EXPOSURE_ABSOLUTE which should @@ -103519,7 +103519,7 @@ index d1408e5..481d1f6 100644 } static int ctrl_set_metering_mode(struct bm2835_mmal_dev *dev, -@@ -578,10 +622,16 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -578,10 +622,16 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { }, */ { @@ -103550,13 +103550,13 @@ index c611b58..d8aace5 100644 enum mmal_parameter_camera_config_timestamp_mode { -- -1.8.5.5 +1.9.1 -From 66ec3c1715c848316f716c7f62f82b86e9d2a3a9 Mon Sep 17 00:00:00 2001 +From 1c6330f7acdcfaaf8899fd4ecf5e91a2062f3cb7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:01:53 +0000 -Subject: [PATCH 57/99] V4L2: Correct JPEG Q-factor range +Subject: [PATCH 057/102] V4L2: Correct JPEG Q-factor range Should be 1-100, not 0-100 @@ -103578,7 +103578,7 @@ index 481d1f6..c2e4c64 100644 struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) { -@@ -683,9 +683,9 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -683,9 +683,9 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { }, { V4L2_CID_JPEG_COMPRESSION_QUALITY, MMAL_CONTROL_TYPE_STD, @@ -103591,13 +103591,13 @@ index 481d1f6..c2e4c64 100644 }; -- -1.8.5.5 +1.9.1 -From 3cea6db49e58e3db348f668c52df0470d8e4bd1e Mon Sep 17 00:00:00 2001 +From ba874c1ba2a2bf1cb15bf3365df1a053b04fd4f4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:05:24 +0000 -Subject: [PATCH 58/99] V4L2: Fix issue of driver jamming if STREAMON failed. +Subject: [PATCH 058/102] V4L2: Fix issue of driver jamming if STREAMON failed. Fix issue where the driver was left in a partially enabled state if STREAMON failed, and would then reject many IOCTLs @@ -103630,13 +103630,13 @@ index 47fe45d..2743074 100644 } -- -1.8.5.5 +1.9.1 -From cd6acf6546bc8bc163e7d7a1b351d9766b5b28d5 Mon Sep 17 00:00:00 2001 +From 5a644c4286d3198b2cd3c72faa8fdebd0bbb58de Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 15:30:48 +0000 -Subject: [PATCH 59/99] V4L2: Fix ISO controls. +Subject: [PATCH 059/102] V4L2: Fix ISO controls. Driver was passing the index to the GPU, and not the desired ISO value. @@ -103676,7 +103676,7 @@ index c2e4c64..92863f7 100644 static int ctrl_set_value_ev(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) -@@ -601,7 +620,7 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -601,7 +620,7 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { { V4L2_CID_ISO_SENSITIVITY, MMAL_CONTROL_TYPE_INT_MENU, 0, ARRAY_SIZE(iso_qmenu) - 1, 0, 1, iso_qmenu, @@ -103686,13 +103686,13 @@ index c2e4c64..92863f7 100644 { V4L2_CID_IMAGE_STABILIZATION, MMAL_CONTROL_TYPE_STD, -- -1.8.5.5 +1.9.1 -From f24dcf1ecb8c1955f121e4a5e1f72011f9c99dcc Mon Sep 17 00:00:00 2001 +From 5736e899a758c0a89ebfcd7fb5986db1d6362cd7 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 16:40:24 +0000 -Subject: [PATCH 60/99] V4L2: Add flicker avoidance controls +Subject: [PATCH 060/102] V4L2: Add flicker avoidance controls Add support for V4L2_CID_POWER_LINE_FREQUENCY to set flicker avoidance frequencies. @@ -103721,7 +103721,7 @@ diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/ index 92863f7..7cc97c8 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -56,6 +56,13 @@ +@@ -56,6 +56,13 @@ static const s64 iso_qmenu[] = { 0, 100, 200, 400, 800, }; @@ -103771,7 +103771,7 @@ index 92863f7..7cc97c8 100644 static int ctrl_set_awb_mode(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) -@@ -706,6 +742,12 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -706,6 +742,12 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { 30, 1, NULL, MMAL_PARAMETER_JPEG_Q_FACTOR, &ctrl_set_image_encode_output }, @@ -103804,13 +103804,13 @@ index d8aace5..b3d2c39 100644 enum mmal_parameter_rate_control_mode { MMAL_VIDEO_RATECONTROL_DEFAULT, -- -1.8.5.5 +1.9.1 -From 3eaa5a99d484b34e0b732f3a9310ab36e32c77c2 Mon Sep 17 00:00:00 2001 +From 8a393204dc0225e2d1d24fe964472add730edba0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Dec 2013 15:54:13 +0000 -Subject: [PATCH 61/99] V4L2: Add support for frame rate control. +Subject: [PATCH 061/102] V4L2: Add support for frame rate control. Add support for frame rate (or time per frame as V4L2 inverts it) control via s_parm. @@ -103827,7 +103827,7 @@ diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/pla index 2743074..8c38d03 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -55,6 +55,15 @@ +@@ -55,6 +55,15 @@ MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2"); static struct bm2835_mmal_dev *gdev; /* global device data */ @@ -103947,7 +103947,7 @@ index 2743074..8c38d03 100644 static const struct v4l2_ioctl_ops camera0_ioctl_ops = { /* overlay */ .vidioc_enum_fmt_vid_overlay = vidioc_enum_fmt_vid_overlay, -@@ -1092,6 +1187,9 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, +@@ -1092,6 +1187,9 @@ static const struct v4l2_ioctl_ops camera0_ioctl_ops = { .vidioc_querybuf = vb2_ioctl_querybuf, .vidioc_qbuf = vb2_ioctl_qbuf, .vidioc_dqbuf = vb2_ioctl_dqbuf, @@ -104046,13 +104046,13 @@ index b3d2c39..0f2bd50 100644 MMAL_PARAM_TIMESTAMP_MODE_ZERO = 0, /* Always timestamp frames as 0 */ MMAL_PARAM_TIMESTAMP_MODE_RAW_STC, /* Use the raw STC value -- -1.8.5.5 +1.9.1 -From a7e0b024773713e40af1c11b6779f0dde0eeac12 Mon Sep 17 00:00:00 2001 +From b0298296948b7d8025e3e3a925bde8dcdc851faa Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:30:09 +0000 -Subject: [PATCH 62/99] V4L2: Improve G_FBUF handling so we pass conformance +Subject: [PATCH 062/102] V4L2: Improve G_FBUF handling so we pass conformance Return some sane numbers for get framebuffer so that we pass conformance. @@ -104089,13 +104089,13 @@ index 8c38d03..c8d8742 100644 return 0; } -- -1.8.5.5 +1.9.1 -From 733f611f4a8040b4dede7676339ff6cb59758a45 Mon Sep 17 00:00:00 2001 +From 12e121d074dcfbd41399e36a75a09f686524821e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:29:39 +0000 -Subject: [PATCH 63/99] V4L2: Fix information advertised through g_vidfmt +Subject: [PATCH 063/102] V4L2: Fix information advertised through g_vidfmt Width and height were being stored based on incorrect values. @@ -104132,13 +104132,13 @@ index c8d8742..4766a9c 100644 } -- -1.8.5.5 +1.9.1 -From 1ef32d6f55e5d53ab3e8ebf442ea43d176c34206 Mon Sep 17 00:00:00 2001 +From b98c512810f9c526fd698e21041d4f3bcd5c82dc Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:03:54 +0000 -Subject: [PATCH 64/99] V4L2: Add support for inline H264 headers +Subject: [PATCH 064/102] V4L2: Add support for inline H264 headers Add support for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER to control H264 inline headers. @@ -104219,7 +104219,7 @@ index e965ca3..cb062a9 100644 } static const struct v4l2_ctrl_ops bm2835_mmal_ctrl_ops = { -@@ -633,32 +654,44 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -633,32 +654,44 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { { V4L2_CID_SATURATION, MMAL_CONTROL_TYPE_STD, -100, 100, 0, 1, NULL, @@ -104270,7 +104270,7 @@ index e965ca3..cb062a9 100644 }, /* { 0, MMAL_CONTROL_TYPE_CLUSTER, 3, 1, 0, NULL, 0, NULL -@@ -666,7 +699,9 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -666,7 +699,9 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { */ { V4L2_CID_EXPOSURE_AUTO, MMAL_CONTROL_TYPE_STD_MENU, ~0x03, 3, V4L2_EXPOSURE_AUTO, 0, NULL, @@ -104281,7 +104281,7 @@ index e965ca3..cb062a9 100644 }, /* todo this needs mixing in with set exposure { -@@ -677,86 +712,120 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -677,86 +712,120 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { V4L2_CID_EXPOSURE_ABSOLUTE, MMAL_CONTROL_TYPE_STD, /* Units of 100usecs */ 1, 1*1000*10, 100*10, 1, NULL, @@ -104440,13 +104440,13 @@ index 0f2bd50..b08a4b0 100644 /** Valid mirror modes */ -- -1.8.5.5 +1.9.1 -From 0b2e0899df49b039e2ffe74e74dde071794f0a30 Mon Sep 17 00:00:00 2001 +From fbe274f829b21bf75bca5a55a937d28655d9dd99 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 19 Dec 2013 17:33:02 +0000 -Subject: [PATCH 65/99] V4L2: Fix JPEG timestamp issue +Subject: [PATCH 065/102] V4L2: Fix JPEG timestamp issue JPEG images were coming through from the GPU with timestamp of 0. Detect this and give current system time instead @@ -104481,13 +104481,13 @@ index 4766a9c..9fc90a2 100644 (int)dev->capture.kernel_start_ts. tv_sec, -- -1.8.5.5 +1.9.1 -From b46a6974a6ea0cc6173dd4104966e9168ecad874 Mon Sep 17 00:00:00 2001 +From d94ff8231fe23a21c9807793f8f2d4b8c0655c06 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:24:55 +0000 -Subject: [PATCH 66/99] V4L2: Fix issue when switching down JPEG resolution. +Subject: [PATCH 066/102] V4L2: Fix issue when switching down JPEG resolution. JPEG buffer size calculation is based on input resolution. Input resolution was being configured after output port @@ -104646,13 +104646,13 @@ index 9fc90a2..4780107 100644 } else { /* configure buffering */ -- -1.8.5.5 +1.9.1 -From 200aef7de99ef577f9d476b24a60a41a2d658828 Mon Sep 17 00:00:00 2001 +From 477f8bb734e2507211250148af70090ca27490df Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 23 Dec 2013 15:42:21 +0000 -Subject: [PATCH 67/99] V4L2: Enable MJPEG encoding +Subject: [PATCH 067/102] V4L2: Enable MJPEG encoding Requires GPU firmware update to support MJPEG encoder. @@ -104666,7 +104666,7 @@ diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/pla index 4780107..166039e 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -100,6 +100,13 @@ +@@ -100,6 +100,13 @@ static struct mmal_fmt formats[] = { .mmal = MMAL_ENCODING_H264, .depth = 8, .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, @@ -104693,13 +104693,13 @@ index 856e80e..764bb12 100644 #define MMAL_ENCODING_JPEG MMAL_FOURCC('J', 'P', 'E', 'G') #define MMAL_ENCODING_GIF MMAL_FOURCC('G', 'I', 'F', ' ') -- -1.8.5.5 +1.9.1 -From 05df2eb83152a9f7f57210f997286e0a5b09a7b6 Mon Sep 17 00:00:00 2001 +From d6f3c99ad3cc5d1a3f5a680167905ff3346b03c5 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 2 Jan 2014 15:57:06 +0000 -Subject: [PATCH 68/99] V4L2: Correct flag settings for compressed formats +Subject: [PATCH 068/102] V4L2: Correct flag settings for compressed formats Set flags field correctly on enum_fmt_vid_cap for compressed image formats. @@ -104714,7 +104714,7 @@ diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/pla index 166039e..7f99a14 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -69,6 +69,7 @@ +@@ -69,6 +69,7 @@ static struct mmal_fmt formats[] = { { .name = "4:2:0, packed YUV", .fourcc = V4L2_PIX_FMT_YUV420, @@ -104722,7 +104722,7 @@ index 166039e..7f99a14 100644 .mmal = MMAL_ENCODING_I420, .depth = 12, .mmal_component = MMAL_COMPONENT_CAMERA, -@@ -76,6 +77,7 @@ +@@ -76,6 +77,7 @@ static struct mmal_fmt formats[] = { { .name = "4:2:2, packed, YUYV", .fourcc = V4L2_PIX_FMT_YUYV, @@ -104730,7 +104730,7 @@ index 166039e..7f99a14 100644 .mmal = MMAL_ENCODING_YUYV, .depth = 16, .mmal_component = MMAL_COMPONENT_CAMERA, -@@ -83,6 +85,7 @@ +@@ -83,6 +85,7 @@ static struct mmal_fmt formats[] = { { .name = "RGB24 (BE)", .fourcc = V4L2_PIX_FMT_BGR24, @@ -104738,7 +104738,7 @@ index 166039e..7f99a14 100644 .mmal = MMAL_ENCODING_BGR24, .depth = 24, .mmal_component = MMAL_COMPONENT_CAMERA, -@@ -90,6 +93,7 @@ +@@ -90,6 +93,7 @@ static struct mmal_fmt formats[] = { { .name = "JPEG", .fourcc = V4L2_PIX_FMT_JPEG, @@ -104746,7 +104746,7 @@ index 166039e..7f99a14 100644 .mmal = MMAL_ENCODING_JPEG, .depth = 8, .mmal_component = MMAL_COMPONENT_IMAGE_ENCODE, -@@ -97,6 +101,7 @@ +@@ -97,6 +101,7 @@ static struct mmal_fmt formats[] = { { .name = "H264", .fourcc = V4L2_PIX_FMT_H264, @@ -104754,7 +104754,7 @@ index 166039e..7f99a14 100644 .mmal = MMAL_ENCODING_H264, .depth = 8, .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, -@@ -104,6 +109,7 @@ +@@ -104,6 +109,7 @@ static struct mmal_fmt formats[] = { { .name = "MJPEG", .fourcc = V4L2_PIX_FMT_MJPEG, @@ -104792,14 +104792,14 @@ index 602b4a7..076f9a8 100644 int depth; u32 mmal_component; /* MMAL component index to be used to encode */ -- -1.8.5.5 +1.9.1 -From 3c0b1fcf65ceea6294af1eba1068de830c196629 Mon Sep 17 00:00:00 2001 +From 140e5a5f3b8cad7d83d03acdbc7a88d1159d44fd Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 11:18:20 +0000 -Subject: [PATCH 69/99] V4L2: H264 profile & level ctrls, FPS control and auto - exp pri +Subject: [PATCH 069/102] V4L2: H264 profile & level ctrls, FPS control and + auto exp pri Several control handling updates. H264 profile and level controls. @@ -104828,7 +104828,7 @@ index 7f99a14..6d0d77a 100644 #define MAX_WIDTH 2592 #define MAX_HEIGHT 1944 #define MIN_BUFFER_SIZE (80*1024) -@@ -56,7 +57,7 @@ +@@ -56,7 +57,7 @@ MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2"); static struct bm2835_mmal_dev *gdev; /* global device data */ #define FPS_MIN 1 @@ -104963,7 +104963,7 @@ index 7f99a14..6d0d77a 100644 return 0; } -@@ -1236,6 +1254,7 @@ static int vidioc_s_parm(struct file *file, void *priv, +@@ -1236,6 +1254,7 @@ static const struct v4l2_ioctl_ops camera0_ioctl_ops = { .vidioc_querybuf = vb2_ioctl_querybuf, .vidioc_qbuf = vb2_ioctl_qbuf, .vidioc_dqbuf = vb2_ioctl_dqbuf, @@ -105084,7 +105084,7 @@ diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/ index cb062a9..45cf790 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -69,7 +69,6 @@ +@@ -69,7 +69,6 @@ static const s64 bitrate_mode_qmenu[] = { (s64)V4L2_MPEG_VIDEO_BITRATE_MODE_CBR, }; @@ -105250,7 +105250,7 @@ index cb062a9..45cf790 100644 if (mmal_ctrl->ignore_errors) ret = 0; return ret; -@@ -725,6 +843,14 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -725,6 +843,14 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { false }, { @@ -105265,7 +105265,7 @@ index cb062a9..45cf790 100644 V4L2_CID_EXPOSURE_METERING, MMAL_CONTROL_TYPE_STD_MENU, ~0x7, 2, V4L2_EXPOSURE_METERING_AVERAGE, 0, NULL, -@@ -814,6 +940,39 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -814,6 +940,39 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { &ctrl_set_video_encode_param_output, true /* Errors ignored as requires latest firmware to work */ }, @@ -105484,13 +105484,13 @@ index b08a4b0..ae8fef9 100644 enum mmal_parameter_video_type { -- -1.8.5.5 +1.9.1 -From 90de1796e8a3779fc00ee50e8b292e212c12d8d5 Mon Sep 17 00:00:00 2001 +From 5269afef55aea24da2540cd9263b1a440d7e93d0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 11:39:20 +0000 -Subject: [PATCH 70/99] V4L2: Correct BGR24 to RGB24 in format table +Subject: [PATCH 070/102] V4L2: Correct BGR24 to RGB24 in format table Signed-off-by: Dave Stevenson --- @@ -105501,7 +105501,7 @@ diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/pla index 6d0d77a..8285e6a 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -84,8 +84,8 @@ +@@ -84,8 +84,8 @@ static struct mmal_fmt formats[] = { .mmal_component = MMAL_COMPONENT_CAMERA, }, { @@ -105513,13 +105513,14 @@ index 6d0d77a..8285e6a 100644 .mmal = MMAL_ENCODING_BGR24, .depth = 24, -- -1.8.5.5 +1.9.1 -From 366ce2a3ef487101224d507fe0439e54018af5f9 Mon Sep 17 00:00:00 2001 +From f2541c477cd6704675f98f287d1af008d5574361 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 15:35:41 +0000 -Subject: [PATCH 71/99] V4L2: Add additional pixel formats. Correct colourspace +Subject: [PATCH 071/102] V4L2: Add additional pixel formats. Correct + colourspace Adds the other flavours of YUYV, and NV12. Corrects the overlay advertised colourspace. @@ -105533,7 +105534,7 @@ diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/pla index 8285e6a..3dea993 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -114,7 +114,39 @@ +@@ -114,7 +114,39 @@ static struct mmal_fmt formats[] = { .mmal = MMAL_ENCODING_MJPEG, .depth = 8, .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, @@ -105584,13 +105585,13 @@ index 8285e6a..3dea993 100644 return 0; } -- -1.8.5.5 +1.9.1 -From cd8f58dffc2d8efcfa9445e59899c82740f2280b Mon Sep 17 00:00:00 2001 +From bd7874a20606ab575effaa0ffb18bde1e00e6cce Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 14 Feb 2014 17:08:18 +0000 -Subject: [PATCH 72/99] V4L2: Drop logging msg from info to debug +Subject: [PATCH 072/102] V4L2: Drop logging msg from info to debug Signed-off-by: Dave Stevenson --- @@ -105611,13 +105612,13 @@ index a06fb44..82752e6 100644 release_msg: -- -1.8.5.5 +1.9.1 -From 709e0286bd1444fba0fecb2cddc1a86f379ef202 Mon Sep 17 00:00:00 2001 +From e42696899043573dba1e48665c8100f781f0773e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 14 Feb 2014 17:12:08 +0000 -Subject: [PATCH 73/99] V4L2: Initial pass at scene modes. +Subject: [PATCH 073/102] V4L2: Initial pass at scene modes. Only supports exposure mode and metering modes. @@ -105662,7 +105663,7 @@ diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/ index 45cf790..b7a7e883 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -145,6 +145,25 @@ struct v4l2_to_mmal_effects_setting { +@@ -145,6 +145,25 @@ static const struct v4l2_to_mmal_effects_setting 1, 1, 0, 0, 0, {0, 0, 0, 0, 0} } }; @@ -105912,7 +105913,7 @@ index 45cf790..b7a7e883 100644 static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) { struct bm2835_mmal_dev *dev = -@@ -973,6 +1103,15 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -973,6 +1103,15 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { &ctrl_set_video_encode_profile_level, false }, @@ -105979,13 +105980,13 @@ index 45cf790..b7a7e883 100644 case MMAL_CONTROL_TYPE_INT_MENU: dev->ctrls[c] = v4l2_ctrl_new_int_menu(hdl, -- -1.8.5.5 +1.9.1 -From fec046e0d40676e437fc43b08ff3ee80ba3e650b Mon Sep 17 00:00:00 2001 +From 1b20cdf4b10fc0a3c9c46e0269b730228ccb5a9e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 25 Mar 2014 11:48:01 +0000 -Subject: [PATCH 74/99] V4L2: Add manual white balance control. +Subject: [PATCH 074/102] V4L2: Add manual white balance control. Adds support for V4L2_CID_RED_BALANCE and V4L2_CID_BLUE_BALANCE. Only has an effect if @@ -106055,7 +106056,7 @@ index b7a7e883..9a40bd0 100644 static int ctrl_set_image_effect(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) -@@ -991,12 +1014,26 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +@@ -991,12 +1014,26 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { { V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE, MMAL_CONTROL_TYPE_STD_MENU, @@ -106110,13 +106111,13 @@ index ae8fef9..089f949 100644 enum mmal_parameter_rate_control_mode { MMAL_VIDEO_RATECONTROL_DEFAULT, -- -1.8.5.5 +1.9.1 -From b30dbb04d4ab3fcbb62535b6ce44c6e77f296788 Mon Sep 17 00:00:00 2001 +From c8349eac4cc3e3b87da19c319937d53e75799a1c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 2 Dec 2013 16:57:44 +0000 -Subject: [PATCH 75/99] config: Enable V4L / MMAL driver +Subject: [PATCH 075/102] config: Enable V4L / MMAL driver --- arch/arm/configs/bcmrpi_defconfig | 3 +++ @@ -106137,14 +106138,14 @@ index 88692be..75a262d 100644 CONFIG_USB_SI470X=m CONFIG_I2C_SI470X=m -- -1.8.5.5 +1.9.1 -From 01be7e4fc1410a3dc965d682c705f8365dc707e9 Mon Sep 17 00:00:00 2001 +From 48ef8a11b74760bc8faf4671dbfcca706d8966a5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 76/99] config: Enable CONFIG_MEMCG, but leave it disabled (due - to memory cost). Enable with cgroup_enable=memory. +Subject: [PATCH 076/102] config: Enable CONFIG_MEMCG, but leave it disabled + (due to memory cost). Enable with cgroup_enable=memory. --- arch/arm/configs/bcmrpi_defconfig | 1 + @@ -106215,13 +106216,13 @@ index 5b6b003..56de606 100644 #ifdef CONFIG_MEMCG_SWAP -- -1.8.5.5 +1.9.1 -From b5d9d7314ef0337c25180ee505753b46198f5244 Mon Sep 17 00:00:00 2001 +From ec3ea00d0ed730599b4c9971071d4634bf3761ed Mon Sep 17 00:00:00 2001 From: Julian Scheel Date: Wed, 19 Feb 2014 16:06:59 +0100 -Subject: [PATCH 77/99] snd-bcm2835: Add support for spdif/hdmi passthrough +Subject: [PATCH 077/102] snd-bcm2835: Add support for spdif/hdmi passthrough This adds a dedicated subdevice which can be used for passthrough of non-audio formats (ie encoded a52) through the hdmi audio link. In addition to this @@ -106246,7 +106247,7 @@ index 8c5334a..aad905f 100755 #include "bcm2835.h" -@@ -183,6 +184,122 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol, +@@ -183,6 +184,122 @@ static struct snd_kcontrol_new snd_bcm2835_ctl[] = { }, }; @@ -106394,7 +106395,7 @@ index 7f6d75e..fe27a8f 100755 #include "bcm2835.h" /* hardware definition */ -@@ -34,6 +36,23 @@ +@@ -34,6 +36,23 @@ static struct snd_pcm_hardware snd_bcm2835_playback_hw = { .periods_max = 128, }; @@ -106569,7 +106570,7 @@ index 7f6d75e..fe27a8f 100755 memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect)); alsa_stream->pcm_indirect.hw_buffer_size = -@@ -392,6 +450,18 @@ static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream, +@@ -392,6 +450,18 @@ static struct snd_pcm_ops snd_bcm2835_playback_ops = { .ack = snd_bcm2835_pcm_ack, }; @@ -106652,7 +106653,7 @@ diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h index 36afee3..8c2fe26 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h -@@ -97,6 +97,7 @@ enum { +@@ -97,6 +97,7 @@ typedef enum { typedef struct bcm2835_chip { struct snd_card *card; struct snd_pcm *pcm; @@ -106660,7 +106661,7 @@ index 36afee3..8c2fe26 100755 /* Bitmat for valid reg_base and irq numbers */ uint32_t avail_substreams; struct platform_device *pdev[MAX_SUBSTREAMS]; -@@ -106,6 +107,9 @@ enum { +@@ -106,6 +107,9 @@ typedef struct bcm2835_chip { int old_volume; /* stores the volume value whist muted */ int dest; int mute; @@ -106670,7 +106671,7 @@ index 36afee3..8c2fe26 100755 } bcm2835_chip_t; typedef struct bcm2835_alsa_stream { -@@ -123,6 +127,10 @@ enum { +@@ -123,6 +127,10 @@ typedef struct bcm2835_alsa_stream { int running; int draining; @@ -106681,7 +106682,7 @@ index 36afee3..8c2fe26 100755 unsigned int pos; unsigned int buffer_size; unsigned int period_size; -@@ -138,6 +146,7 @@ enum { +@@ -138,6 +146,7 @@ typedef struct bcm2835_alsa_stream { int snd_bcm2835_new_ctl(bcm2835_chip_t * chip); int snd_bcm2835_new_pcm(bcm2835_chip_t * chip); @@ -106690,13 +106691,13 @@ index 36afee3..8c2fe26 100755 int bcm2835_audio_open(bcm2835_alsa_stream_t * alsa_stream); int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream); -- -1.8.5.5 +1.9.1 -From adbf95dfbf47e2e320b1258306d61ae17524b1be Mon Sep 17 00:00:00 2001 +From fb4cc2c5b1196134e7f50694f0e12938b62a7b35 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 19 Mar 2014 12:58:23 +0000 -Subject: [PATCH 78/99] dwc_otg: fiq_fsm: Base commit for driver rewrite +Subject: [PATCH 078/102] dwc_otg: fiq_fsm: Base commit for driver rewrite This commit removes the previous FIQ fixes entirely and adds fiq_fsm. @@ -106738,7 +106739,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index 2b11e9d..91c008f 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -328,20 +328,6 @@ static void __init bcm2708_clocksource_init(void) +@@ -328,20 +328,6 @@ static struct resource bcm2708_usb_resources[] = { }, }; @@ -106910,7 +106911,7 @@ index f06c3d22..d5bd726 100644 #define DWC_DRIVER_VERSION "3.00a 10-AUG-2012" #define DWC_DRIVER_DESC "HS OTG USB Controller driver" -@@ -64,7 +65,6 @@ +@@ -64,7 +65,6 @@ bool microframe_schedule=true; static const char dwc_driver_name[] = "dwc_otg"; @@ -106918,7 +106919,7 @@ index f06c3d22..d5bd726 100644 extern int pcd_init( #ifdef LM_INTERFACE -@@ -240,13 +240,14 @@ struct dwc_otg_driver_module_params { +@@ -240,13 +240,14 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { .adp_enable = -1, }; @@ -106981,7 +106982,7 @@ index f06c3d22..d5bd726 100644 error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1378,12 +1378,19 @@ static void __exit dwc_otg_driver_cleanup(void) +@@ -1378,12 +1378,19 @@ MODULE_PARM_DESC(otg_ver, "OTG revision supported 0=OTG 1.3 1=OTG 2.0"); module_param(microframe_schedule, bool, 0444); MODULE_PARM_DESC(microframe_schedule, "Enable the microframe scheduler"); @@ -108689,7 +108690,7 @@ index 22300f0..e67437c 100644 //#define DEBUG_HOST_CHANNELS #ifdef DEBUG_HOST_CHANNELS -@@ -57,12 +58,6 @@ +@@ -57,12 +58,6 @@ static int last_sel_trans_num_avail_hc_at_start = 0; static int last_sel_trans_num_avail_hc_at_end = 0; #endif /* DEBUG_HOST_CHANNELS */ @@ -109677,7 +109678,7 @@ index 64d33a5..e5a27f4 100644 #include #include -@@ -47,33 +46,8 @@ +@@ -47,33 +46,8 @@ extern bool microframe_schedule; * This file contains the implementation of the HCD Interrupt handlers. */ @@ -110911,7 +110912,7 @@ index ee8eec9..5d45062 100644 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, +@@ -395,13 +396,9 @@ static struct dwc_otg_hcd_function_ops hcd_fops = { static struct fiq_handler fh = { .name = "usb_fiq", }; @@ -111319,13 +111320,13 @@ index ca17379..0000000 - -#endif -- -1.8.5.5 +1.9.1 -From fbc1db3f574eceffd75f1e46cbe620f0b423a02d Mon Sep 17 00:00:00 2001 +From ed8ce7c7f0cb7bf5c0a737617ef8eb897c5a3a1a Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 19 Mar 2014 15:13:53 +0000 -Subject: [PATCH 79/99] Fix ARM architecture issue with local_irq_restore() +Subject: [PATCH 079/102] 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. @@ -111346,7 +111347,7 @@ 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 { +@@ -42,7 +42,6 @@ extern void disable_fiq(int fiq); /* helpers defined in fiqasm.S: */ extern void __set_fiq_regs(unsigned long const *regs); extern void __get_fiq_regs(unsigned long *regs); @@ -111423,13 +111424,13 @@ index 0812d3a..6d01261 100644 } -- -1.8.5.5 +1.9.1 -From c733f3084b8c69e5dc5f09e338959e125b6db438 Mon Sep 17 00:00:00 2001 +From 86b33d1c18192d14ef1ef42a4e1be2a4bf53cd94 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 80/99] dmaengine: Add support for BCM2708 +Subject: [PATCH 080/102] dmaengine: Add support for BCM2708 Add support for DMA controller of BCM2708 as used in the Raspberry Pi. Currently it only supports cyclic DMA. @@ -112066,13 +112067,13 @@ index 0000000..b244293 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.5 +1.9.1 -From aa2e7c4643daf4bd5e8b5491906e6bf9640ad9ce Mon Sep 17 00:00:00 2001 +From 80f8cdcdd76cbebacab0adb6747cd9ce6fa32317 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:33:38 +0100 -Subject: [PATCH 81/99] ASoC: Add support for BCM2708 +Subject: [PATCH 081/102] ASoC: Add support for BCM2708 This driver adds support for digital audio (I2S) for the BCM2708 SoC that is used by the @@ -113067,13 +113068,13 @@ index 0000000..ebaf3d6 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.5 +1.9.1 -From ad419b8ec1740e861ed3ef407b73ba1d5f6ecfbf Mon Sep 17 00:00:00 2001 +From d7b26fbc297e8267d6583ab75ec15472bac7bf14 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:37:51 +0100 -Subject: [PATCH 82/99] BCM2708: Extend mach header +Subject: [PATCH 082/102] BCM2708: Extend mach header Extend the headers of the mach-bcm2708 in order to support I2S and DMA engine. @@ -113115,13 +113116,13 @@ index 992a630..2e7e1bb 100644 #define BSC0_BASE (BCM2708_PERI_BASE + 0x205000) /* BSC0 I2C/TWI */ #define UART1_BASE (BCM2708_PERI_BASE + 0x215000) /* Uart 1 */ -- -1.8.5.5 +1.9.1 -From dc793b88e6e5c02e8beb481f9d3e2bd6fc5fdcce Mon Sep 17 00:00:00 2001 +From c3d0dd119ae198f831236adc380b36b0f654310f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 83/99] ASoC: Add support for PCM5102A codec +Subject: [PATCH 083/102] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -113246,13 +113247,13 @@ index 0000000..126f1e9 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.5 +1.9.1 -From f68e4706c0e75d01adaab54805f3036b3611d1e9 Mon Sep 17 00:00:00 2001 +From 8cd41f5a4fe949b4acc68f60f30b441756b1729a Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:04:54 +0100 -Subject: [PATCH 84/99] BCM2708: Add I2S support to board file +Subject: [PATCH 084/102] BCM2708: Add I2S support to board file Adds the required initializations for I2S to the board file of mach-bcm2708. @@ -113266,7 +113267,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index 91c008f..6117a4b 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -606,6 +606,28 @@ struct platform_device bcm2708_powerman_device = { +@@ -606,6 +606,28 @@ static struct platform_device bcm2835_thermal_device = { .name = "bcm2835_thermal", }; @@ -113307,13 +113308,13 @@ index 91c008f..6117a4b 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -- -1.8.5.5 +1.9.1 -From 993c59574b9a17f08d52abfc8783b0011368f9b8 Mon Sep 17 00:00:00 2001 +From abd4044a970732d9ca0dd4f84a497d621a90e9a8 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 85/99] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 085/102] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -113462,13 +113463,13 @@ index 0000000..4b70b45 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -- -1.8.5.5 +1.9.1 -From 1df3a9bdd13d77e065a7bfc7bc3b144f8ff0f264 Mon Sep 17 00:00:00 2001 +From 4f1cfecafa122970008d526d54ea59ca8b7196e0 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 86/99] BCM2708: Add HifiBerry DAC to board file +Subject: [PATCH 086/102] BCM2708: Add HifiBerry DAC to board file This adds the initalization of the HifiBerry DAC to the mach-bcm2708 board file. @@ -113482,7 +113483,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index 6117a4b..5056993 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -628,6 +628,20 @@ struct platform_device bcm2708_powerman_device = { +@@ -628,6 +628,20 @@ static struct platform_device bcm2708_i2s_device = { }; #endif @@ -113516,13 +113517,13 @@ index 6117a4b..5056993 100644 struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); -- -1.8.5.5 +1.9.1 -From fc707e469b114d7118e6e7d68c80d8ab1fae2349 Mon Sep 17 00:00:00 2001 +From 4de26fed60e4826b601a037dc8ee6751e196f06c Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 18:55:53 +0100 -Subject: [PATCH 87/99] ASoC: BCM2708: Add 24 bit support +Subject: [PATCH 087/102] ASoC: BCM2708: Add 24 bit support This adds 24 bit support to the I2S driver of the BCM2708. Besides enabling the 24 bit flags, it includes two bug fixes: @@ -113563,7 +113564,7 @@ index ebaf3d6..a179216 100644 format |= BCM2708_I2S_CHWEX; format |= BCM2708_I2S_CHWID((data_length-8)&0xf); -@@ -714,6 +718,7 @@ static int bcm2708_i2s_dai_probe(struct snd_soc_dai *dai) +@@ -714,6 +718,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE @@ -113571,7 +113572,7 @@ index ebaf3d6..a179216 100644 | SNDRV_PCM_FMTBIT_S32_LE }, .capture = { -@@ -721,6 +726,7 @@ static int bcm2708_i2s_dai_probe(struct snd_soc_dai *dai) +@@ -721,6 +726,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE @@ -113594,13 +113595,13 @@ index ebaf3d6..a179216 100644 .period_bytes_min = 32, .period_bytes_max = 64 * PAGE_SIZE, -- -1.8.5.5 +1.9.1 -From 3f6defbf3bb80fd122390a84c85ec22d667e5ed9 Mon Sep 17 00:00:00 2001 +From 0ceb9be7d908a127bd2ce011eab03a5370675571 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 2 Dec 2013 20:28:22 +0100 -Subject: [PATCH 88/99] BCM2708: Add I2S and DMA support to default config +Subject: [PATCH 088/102] BCM2708: Add I2S and DMA support to default config This commit adds several modules that are needed for I2S support for the Raspberry Pi to the defconfig. @@ -113640,13 +113641,13 @@ index 1041f5e..0360c86 100644 CONFIG_UIO_PDRV_GENIRQ=m CONFIG_STAGING=y -- -1.8.5.5 +1.9.1 -From d741f8dc1b2a9360874d006ef2241a835a1ff3b0 Mon Sep 17 00:00:00 2001 +From e7ac6355b5e1eef98143db757b50f9155806b5cd Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 20:50:28 +0100 -Subject: [PATCH 89/99] ASoC: BCM2708: Add support for RPi-DAC +Subject: [PATCH 089/102] ASoC: BCM2708: Add support for RPi-DAC This adds a machine driver for the RPi-DAC. @@ -113683,7 +113684,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index 5056993..b6348c9 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -642,6 +642,20 @@ struct platform_device bcm2708_powerman_device = { +@@ -642,6 +642,20 @@ static struct platform_device snd_pcm5102a_codec_device = { }; #endif @@ -113957,16 +113958,16 @@ index 0000000..b4eaa44 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -- -1.8.5.5 +1.9.1 -From 846c793898454d0ca138ef430bbbce78ba3a8bea Mon Sep 17 00:00:00 2001 +From f000f7d766da2e01c4ba8b7e32fbfe9c43d6f8f4 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 90/99] ASoC: wm8804: Implement MCLK configuration options, add - 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for - most sample rates. At 192kHz only 128xfs is supported. The existing driver - selects 128xfs automatically for some lower samples rates. By using an +Subject: [PATCH 090/102] ASoC: wm8804: Implement MCLK configuration options, + add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs + for most sample rates. At 192kHz only 128xfs is supported. The existing + driver selects 128xfs automatically for some lower samples rates. By using an additional mclk_div divider, it is now possible to control the behaviour. This allows using 256xfs PLL frequency on all sample rates up to 96kHz. It should allow lower jitter and better signal quality. The behavior has to be @@ -114002,7 +114003,7 @@ index 9bc8206..c35b4f3 100644 blen = 0x2; break; default: -@@ -318,7 +320,7 @@ struct pll_div { +@@ -318,7 +320,7 @@ static struct { #define FIXED_PLL_SIZE ((1ULL << 22) * 10) static int pll_factors(struct pll_div *pll_div, unsigned int target, @@ -114053,7 +114054,7 @@ index 9bc8206..c35b4f3 100644 default: dev_err(dai->dev, "Unknown clock divider: %d\n", div_id); return -EINVAL; -@@ -641,7 +652,7 @@ static int wm8804_probe(struct snd_soc_codec *codec) +@@ -641,7 +652,7 @@ static const struct snd_soc_dai_ops wm8804_dai_ops = { }; #define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ @@ -114077,13 +114078,13 @@ index 8ec14f5..e72d4f4 100644 #endif /* _WM8804_H */ -- -1.8.5.5 +1.9.1 -From e7aa74134a9db80e57c35f7ce9613ebf405ae76e Mon Sep 17 00:00:00 2001 +From 0242a8bb8c5ca7fc30ae34f8b615869db51a86fc Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 91/99] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 091/102] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -114286,13 +114287,13 @@ index 0000000..e4f769d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -- -1.8.5.5 +1.9.1 -From 541fe8734b48bc92ec4d6f9b47047a09fd332419 Mon Sep 17 00:00:00 2001 +From e79e723d7c49b878f7156726c8cc72f605652f98 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:26:08 +0100 -Subject: [PATCH 92/99] BCM2708: Added support for HiFiBerry Digi board Board +Subject: [PATCH 092/102] BCM2708: Added support for HiFiBerry Digi board Board initalization by I2C Signed-off-by: Daniel Matuschek @@ -114304,7 +114305,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index b6348c9..b5a41c9 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -642,6 +642,21 @@ struct platform_device bcm2708_powerman_device = { +@@ -642,6 +642,21 @@ static struct platform_device snd_pcm5102a_codec_device = { }; #endif @@ -114339,13 +114340,13 @@ index b6348c9..b5a41c9 100644 bcm_register_device(&snd_rpi_dac_device); bcm_register_device(&snd_pcm1794a_codec_device); -- -1.8.5.5 +1.9.1 -From 347c1db0f704e29d6e826470e93bb01961245f1b Mon Sep 17 00:00:00 2001 +From 90be3bfbdc986a32acb5252e2e846fa456ac3b72 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:27:28 +0100 -Subject: [PATCH 93/99] BCM2708: Added HiFiBerry Digi configuration option It +Subject: [PATCH 093/102] BCM2708: Added HiFiBerry Digi configuration option It will be compiled as a module by default. This also includes the WM8804 driver. @@ -114370,14 +114371,14 @@ index 524ad3e..cefbb24 100644 CONFIG_SND_SOC_I2C_AND_SPI=m CONFIG_SND_SOC_PCM5102A=m -- -1.8.5.5 +1.9.1 -From 15fb9ee32a161f7a762b8a03c08c43fc9c053c3c Mon Sep 17 00:00:00 2001 +From b4cc4744beef9e12b7cef7c30653d4051aa072fe Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 94/99] ASoC: wm8804: Set idle_bias_off to false Idle bias has - been change to remove warning on driver startup +Subject: [PATCH 094/102] ASoC: wm8804: Set idle_bias_off to false Idle bias + has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek --- @@ -114388,7 +114389,7 @@ diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index c35b4f3..8915d08 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c -@@ -685,7 +685,7 @@ static int wm8804_probe(struct snd_soc_codec *codec) +@@ -685,7 +685,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8804 = { .suspend = wm8804_suspend, .resume = wm8804_resume, .set_bias_level = wm8804_set_bias_level, @@ -114398,13 +114399,13 @@ index c35b4f3..8915d08 100644 .controls = wm8804_snd_controls, .num_controls = ARRAY_SIZE(wm8804_snd_controls), -- -1.8.5.5 +1.9.1 -From 373d6a336f4ef61f9d30c43bfb3829edb0821519 Mon Sep 17 00:00:00 2001 +From 7d1ada5f1693fb21969a9263ad715cb68b327580 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 12 Mar 2014 11:46:34 +0000 -Subject: [PATCH 95/99] ASoc: Don't report S24_LE support, it produces white +Subject: [PATCH 095/102] ASoc: Don't report S24_LE support, it produces white noise with xbmc --- @@ -114416,7 +114417,7 @@ diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c index a179216..b25e158 100644 --- a/sound/soc/bcm/bcm2708-i2s.c +++ b/sound/soc/bcm/bcm2708-i2s.c -@@ -718,7 +718,7 @@ static int bcm2708_i2s_dai_probe(struct snd_soc_dai *dai) +@@ -718,7 +718,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE @@ -114429,7 +114430,7 @@ 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 @@ +@@ -28,7 +28,7 @@ static struct snd_soc_dai_driver pcm5102a_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE | @@ -114439,13 +114440,13 @@ index 126f1e9..7812d34 100644 }, }; -- -1.8.5.5 +1.9.1 -From 7aa79bd4be182c96a9a099e4d72c75d9664d99be Mon Sep 17 00:00:00 2001 +From eef7e81918c689771ba3c243ac009b7d99a5dce6 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 96/99] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 096/102] Add IQaudIO Sound Card support for Raspberry Pi --- arch/arm/configs/bcmrpi_defconfig | 1 + @@ -114478,7 +114479,7 @@ diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index b5a41c9..887f732 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -671,6 +671,22 @@ struct platform_device bcm2708_powerman_device = { +@@ -671,6 +671,22 @@ static struct platform_device snd_pcm1794a_codec_device = { }; #endif @@ -115534,13 +115535,13 @@ index 0000000..b2f518e + +#endif -- -1.8.5.5 +1.9.1 -From 05a105da2563512639f45dbd8aae4fa87ad5411b Mon Sep 17 00:00:00 2001 +From be7d3fe94e4240f6682fb2c0ebde4e3ae3bf79da Mon Sep 17 00:00:00 2001 From: Howard Mitchell Date: Fri, 28 Mar 2014 16:27:57 +0000 -Subject: [PATCH 97/99] Fix volsw_range functions so SOC_DOUBLE_R_RANGE_TLV +Subject: [PATCH 097/102] Fix volsw_range functions so SOC_DOUBLE_R_RANGE_TLV works. This is so that the correct rabge of values as specified @@ -115613,13 +115614,13 @@ index fe1df50..c3f41e7 100644 return 0; -- -1.8.5.5 +1.9.1 -From 0d94f1fd12135e5616135829b515ba1f5962740e Mon Sep 17 00:00:00 2001 +From 8f195e18e117e310f0c302bc7d19c23ebfaa69f9 Mon Sep 17 00:00:00 2001 From: Howard Mitchell Date: Fri, 28 Mar 2014 16:40:31 +0000 -Subject: [PATCH 98/99] Use a range macro for Playback Volume. +Subject: [PATCH 098/102] Use a range macro for Playback Volume. This allows limiting the output gain to avoid clipping in the DAC ouput stages. @@ -115631,7 +115632,7 @@ diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index 55b6200..2653311 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c -@@ -240,8 +240,8 @@ static const SOC_VALUE_ENUM_SINGLE_DECL(pcm512x_dsp_program, +@@ -240,8 +240,8 @@ static const struct soc_enum pcm512x_veds = pcm512x_ramp_step_text); static const struct snd_kcontrol_new pcm512x_controls[] = { @@ -115643,13 +115644,13 @@ index 55b6200..2653311 100644 PCM512x_RQMR_SHIFT, 1, 1), -- -1.8.5.5 +1.9.1 -From dbddcf763ee7cecef28a677494c4f2c21e1137b7 Mon Sep 17 00:00:00 2001 +From a4935eacbb57045b99ceaa322accf8bac7b410e8 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sun, 30 Mar 2014 13:52:33 +0100 -Subject: [PATCH 99/99] fix soc-core's inverse range and let IQaudIO DAC use +Subject: [PATCH 099/102] fix soc-core's inverse range and let IQaudIO DAC use this fixed SOC_DOUBLE_R_RANGE_TLV support --- @@ -115661,7 +115662,7 @@ diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index 2653311..b669e15 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c -@@ -239,9 +239,10 @@ static const SOC_VALUE_ENUM_SINGLE_DECL(pcm512x_dsp_program, +@@ -239,9 +239,10 @@ static const struct soc_enum pcm512x_veds = SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_2, PCM512x_VEDS_SHIFT, 4, pcm512x_ramp_step_text); @@ -115700,5 +115701,586 @@ index c3f41e7..a8a753f 100644 val = val << shift; -- -1.8.5.5 +1.9.1 + + +From 3ba9e28c7033a26cc00a860df9c751aa5ab68850 Mon Sep 17 00:00:00 2001 +From: P33M +Date: Tue, 15 Apr 2014 17:29:57 +0100 +Subject: [PATCH 100/102] fiq_fsm: Push error recovery into the FIQ when + fiq_fsm is used + +If the transfer associated with a QTD failed due to a bus error, the HCD +would retry the transfer up to 3 times (implementing the USB2.0 +three-strikes retry in software). + +Due to the masking mechanism used by fiq_fsm, it is only possible to pass +a single interrupt through to the HCD per-transfer. + +In this instance host channels would fall off the radar because the error +reset would function, but the subsequent channel halt would be lost. + +Push the error count reset into the FIQ handler. +--- + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 28 +++++++++++++++++++++++++++- + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 4 +++- + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 6 ++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 21 +++++++++++++++------ + 4 files changed, 51 insertions(+), 8 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c +index e286d57..c3d64cf 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c +@@ -612,6 +612,7 @@ static int notrace noinline fiq_fsm_do_hcintr(struct fiq_state *state, int num_c + { + hcint_data_t hcint; + hcintmsk_data_t hcintmsk; ++ hcint_data_t hcint_probe; + hcchar_data_t hcchar; + int handled = 0; + int restart = 0; +@@ -622,7 +623,8 @@ static int notrace noinline fiq_fsm_do_hcintr(struct fiq_state *state, int num_c + + hcint.d32 = FIQ_READ(state->dwc_regs_base + HC_START + (HC_OFFSET * n) + HCINT); + hcintmsk.d32 = FIQ_READ(state->dwc_regs_base + HC_START + (HC_OFFSET * n) + HCINTMSK); +- ++ hcint_probe.d32 = hcint.d32 & hcintmsk.d32; ++ + if (st->fsm != FIQ_PASSTHROUGH) { + fiq_print(FIQDBG_INT, state, "HC%01d ST%02d", n, st->fsm); + fiq_print(FIQDBG_INT, state, "%08x", hcint.d32); +@@ -635,6 +637,30 @@ static int notrace noinline fiq_fsm_do_hcintr(struct fiq_state *state, int num_c + /* doesn't belong to us, kick it upstairs */ + break; + ++ case FIQ_PASSTHROUGH_ERRORSTATE: ++ /* We are here to emulate the error recovery mechanism of the dwc HCD. ++ * Several interrupts are unmasked if a previous transaction failed - it's ++ * death for the FIQ to attempt to handle them as the channel isn't halted. ++ * Emulate what the HCD does in this situation: mask and continue. ++ * The FSM has no other state setup so this has to be handled out-of-band. ++ */ ++ fiq_print(FIQDBG_ERR, state, "ERRST %02d", n); ++ if (hcint_probe.b.nak || hcint_probe.b.ack || hcint_probe.b.datatglerr) { ++ fiq_print(FIQDBG_ERR, state, "RESET %02d", n); ++ st->nr_errors = 0; ++ hcintmsk.b.nak = 0; ++ hcintmsk.b.ack = 0; ++ hcintmsk.b.datatglerr = 0; ++ FIQ_WRITE(state->dwc_regs_base + HC_START + (HC_OFFSET * n) + HCINTMSK, hcintmsk.d32); ++ return 1; ++ } ++ if (hcint_probe.b.chhltd) { ++ fiq_print(FIQDBG_ERR, state, "CHHLT %02d", n); ++ fiq_print(FIQDBG_ERR, state, "%08x", hcint.d32); ++ return 0; ++ } ++ break; ++ + /* Non-periodic state groups */ + case FIQ_NP_SSPLIT_STARTED: + case FIQ_NP_SSPLIT_RETRY: +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h +index 716e921..bc808a0 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h ++++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h +@@ -155,7 +155,9 @@ extern ushort nak_holdoff; + enum fiq_fsm_state { + /* FIQ isn't enabled for this host channel */ + FIQ_PASSTHROUGH = 0, +- ++ /* For the first interrupt received for this channel, ++ * the FIQ has to ack any interrupts indicating success. */ ++ FIQ_PASSTHROUGH_ERRORSTATE = 31, + /* Nonperiodic state groups */ + FIQ_NP_SSPLIT_STARTED = 1, + FIQ_NP_SSPLIT_RETRY = 2, +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index e67437c..98f5e84 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +@@ -2073,6 +2073,12 @@ static int queue_transaction(dwc_otg_hcd_t * hcd, + hc->qh->ping_state = 0; + } + } else if (!hc->xfer_started) { ++ if (fiq_fsm_enable && hc->error_state) { ++ hcd->fiq_state->channel[hc->hc_num].nr_errors = ++ DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list)->error_count; ++ hcd->fiq_state->channel[hc->hc_num].fsm = ++ FIQ_PASSTHROUGH_ERRORSTATE; ++ } + dwc_otg_hc_start_transfer(hcd->core_if, hc); + hc->qh->ping_state = 0; + } +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 e5a27f4..3b8567e 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +@@ -2600,21 +2600,30 @@ 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; + } ++ qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); + + /* + * FSM mode: Check to see if this is a HC interrupt from a channel handled by the FIQ. + * 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); +- return 1; ++ switch (dwc_otg_hcd->fiq_state->channel[num].fsm) { ++ case FIQ_PASSTHROUGH: ++ break; ++ case FIQ_PASSTHROUGH_ERRORSTATE: ++ /* Hook into the error count */ ++ fiq_print(FIQDBG_ERR, dwc_otg_hcd->fiq_state, "HCDERR%02d", num); ++ if (dwc_otg_hcd->fiq_state->channel[num].nr_errors) { ++ qtd->error_count = 0; ++ fiq_print(FIQDBG_ERR, dwc_otg_hcd->fiq_state, "RESET "); ++ } ++ break; ++ default: ++ dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd, num); ++ return 1; + } + } +- qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); + + hcint.d32 = DWC_READ_REG32(&hc_regs->hcint); + hcintmsk.d32 = DWC_READ_REG32(&hc_regs->hcintmsk); +-- +1.9.1 + + +From bd0d15acb8de5709fd3b938711c7e2c1193cf19b Mon Sep 17 00:00:00 2001 +From: P33M +Date: Thu, 17 Apr 2014 13:19:11 +0100 +Subject: [PATCH 101/102] fiq_fsm: Implement timeout mechanism + +For full-speed endpoints with a large packet size, interrupt latency +runs the risk of the FIQ starting a transaction too late in a full-speed +frame. If the device is still transmitting data when EOF2 for the +downstream frame occurs, the hub will disable the port. This change is +not reflected in the hub status endpoint and the device becomes +unresponsive. + +Prevent high-bandwidth transactions from being started too late in a +frame. The mechanism is not guaranteed: a combination of bit stuffing +and hub latency may still result in a device overrunning. +--- + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 132 ++++++++++++++++++---------- + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 2 + + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 17 +++- + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 10 +-- + 4 files changed, 109 insertions(+), 52 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c +index c3d64cf..161edcf 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c +@@ -148,21 +148,20 @@ static inline int notrace fiq_get_xfer_len(struct fiq_state *st, int n) + static int notrace fiq_increment_dma_buf(struct fiq_state *st, int num_channels, int n) + { + hcdma_data_t hcdma; +- int i = st->channel[n].nrpackets; +- int len = 254; ++ int i = st->channel[n].dma_info.index; ++ int len; + struct fiq_dma_blob *blob = (struct fiq_dma_blob *) st->dma_base; + + len = fiq_get_xfer_len(st, n); + fiq_print(FIQDBG_INT, st, "LEN: %03d", len); + st->channel[n].dma_info.slot_len[i] = len; + i++; +- if (i > 5) ++ if (i > 6) + BUG(); + +- st->channel[n].nrpackets++; +- + hcdma.d32 = (dma_addr_t) &blob->channel[n].index[i].buf[0]; + FIQ_WRITE(st->dwc_regs_base + HC_DMA + (HC_OFFSET * n), hcdma.d32); ++ st->channel[n].dma_info.index = i; + return 0; + } + +@@ -313,6 +312,7 @@ int notrace noinline fiq_fsm_tt_in_use(struct fiq_state *st, int num_channels, i + * + * We also return whether this is the last CSPLIT to be queued, again based on + * heuristics. This is to allow a 1-uframe overlap of periodic split transactions. ++ * Note: requires at least 1 CSPLIT to have been performed prior to being called. + */ + + /* +@@ -335,7 +335,7 @@ static int notrace noinline fiq_fsm_more_csplits(struct fiq_state *state, int n, + int more_needed = 1; + struct fiq_channel_state *st = &state->channel[n]; + +- for (i = 0; i < st->nrpackets; i++) { ++ for (i = 0; i < st->dma_info.index; i++) { + total_len += st->dma_info.slot_len[i]; + } + +@@ -350,7 +350,7 @@ static int notrace noinline fiq_fsm_more_csplits(struct fiq_state *state, int n, + } else { + /* Isoc IN. This is a bit risky if we are the first transaction: + * we may have been held off slightly. */ +- if (i > 1 && st->dma_info.slot_len[st->nrpackets-1] <= DATA0_PID_HEURISTIC) { ++ if (i > 1 && st->dma_info.slot_len[st->dma_info.index-1] <= DATA0_PID_HEURISTIC) { + more_needed = 0; + } + /* If in the next uframe we will receive enough data to fill the endpoint, +@@ -362,12 +362,37 @@ static int notrace noinline fiq_fsm_more_csplits(struct fiq_state *state, int n, + + if (total_len >= st->hctsiz_copy.b.xfersize || + i == 6 || total_len == 0) ++ /* Note: due to bit stuffing it is possible to have > 6 CSPLITs for ++ * a single endpoint. Accepting more would completely break our scheduling mechanism though ++ * - in these extreme cases we will pass through a truncated packet. ++ */ + more_needed = 0; + + return more_needed; + } + + /** ++ * fiq_fsm_too_late() - Test transaction for lateness ++ * ++ * If a SSPLIT for a large IN transaction is issued too late in a frame, ++ * the hub will disable the port to the device and respond with ERR handshakes. ++ * The hub status endpoint will not reflect this change. ++ * Returns 1 if we will issue a SSPLIT that will result in a device babble. ++ */ ++int notrace fiq_fsm_too_late(struct fiq_state *st, int n) ++{ ++ int uframe; ++ hfnum_data_t hfnum = { .d32 = FIQ_READ(st->dwc_regs_base + HFNUM) }; ++ uframe = hfnum.b.frnum & 0x7; ++ if ((uframe < 6) && (st->channel[n].nrpackets + 1 + uframe > 7)) { ++ return 1; ++ } else { ++ return 0; ++ } ++} ++ ++ ++/** + * fiq_fsm_start_next_periodic() - A half-arsed attempt at a microframe pipeline + * + * Search pending transactions in the start-split pending state and queue them. +@@ -385,9 +410,13 @@ static void notrace noinline fiq_fsm_start_next_periodic(struct fiq_state *st, i + if (st->channel[n].fsm == FIQ_PER_SSPLIT_QUEUED) { + /* Check to see if any other transactions are using this TT */ + if(!fiq_fsm_tt_in_use(st, num_channels, n)) { +- st->channel[n].fsm = FIQ_PER_SSPLIT_STARTED; +- fiq_print(FIQDBG_INT, st, "NEXTPER "); +- fiq_fsm_restart_channel(st, n, 0); ++ if (!fiq_fsm_too_late(st, n)) { ++ st->channel[n].fsm = FIQ_PER_SSPLIT_STARTED; ++ fiq_print(FIQDBG_INT, st, "NEXTPER "); ++ fiq_fsm_restart_channel(st, n, 0); ++ } else { ++ st->channel[n].fsm = FIQ_PER_SPLIT_TIMEOUT; ++ } + break; + } + } +@@ -503,7 +532,30 @@ static int notrace noinline fiq_fsm_do_sof(struct fiq_state *state, int num_chan + { + hfnum_data_t hfnum = { .d32 = FIQ_READ(state->dwc_regs_base + HFNUM) }; + int n; +- ++ int kick_irq = 0; ++ ++ if ((hfnum.b.frnum & 0x7) == 1) { ++ /* We cannot issue csplits for transactions in the last frame past (n+1).1 ++ * Check to see if there are any transactions that are stale. ++ * Boot them out. ++ */ ++ for (n = 0; n < num_channels; n++) { ++ switch (state->channel[n].fsm) { ++ case FIQ_PER_CSPLIT_WAIT: ++ case FIQ_PER_CSPLIT_NYET1: ++ case FIQ_PER_CSPLIT_POLL: ++ case FIQ_PER_CSPLIT_LAST: ++ /* Check if we are no longer in the same full-speed frame. */ ++ if (((state->channel[n].expected_uframe & 0x3FFF) & ~0x7) < ++ (hfnum.b.frnum & ~0x7)) ++ state->channel[n].fsm = FIQ_PER_SPLIT_TIMEOUT; ++ break; ++ default: ++ break; ++ } ++ } ++ } ++ + for (n = 0; n < num_channels; n++) { + switch (state->channel[n].fsm) { + +@@ -521,10 +573,16 @@ static int notrace noinline fiq_fsm_do_sof(struct fiq_state *state, int num_chan + case FIQ_PER_SSPLIT_QUEUED: + if ((hfnum.b.frnum & 0x7) == 5) + break; +- if (!fiq_fsm_tt_in_use(state, num_channels, n)) { +- fiq_print(FIQDBG_INT, state, "SOF GO %01d", n); +- fiq_fsm_restart_channel(state, n, 0); +- state->channel[n].fsm = FIQ_PER_SSPLIT_STARTED; ++ if(!fiq_fsm_tt_in_use(state, num_channels, n)) { ++ if (!fiq_fsm_too_late(state, n)) { ++ fiq_print(FIQDBG_INT, st, "SOF GO %01d", n); ++ fiq_fsm_restart_channel(state, n, 0); ++ state->channel[n].fsm = FIQ_PER_SSPLIT_STARTED; ++ } else { ++ state->channel[n].fsm = FIQ_PER_SPLIT_TIMEOUT; ++ state->haintmsk_saved.b2.chint &= ~(1 << n); ++ kick_irq |= 1; ++ } + } + break; + +@@ -562,41 +620,27 @@ static int notrace noinline fiq_fsm_do_sof(struct fiq_state *state, int num_chan + + } + break; +- ++ ++ case FIQ_PER_SPLIT_TIMEOUT: ++ /* Ugly: we have to force a HCD interrupt. ++ * Poke the mask for the channel in question. ++ * We will take a fake SOF because of this, but ++ * that's OK. ++ */ ++ state->haintmsk_saved.b2.chint &= ~(1 << n); ++ kick_irq |= 1; ++ break; ++ + default: + break; + } + } + +- if ((hfnum.b.frnum & 0x7) == 1) { +- /* We cannot issue csplits for transactions in the last frame past (n+1).1 +- * Check to see if there are any transactions that are stale. +- * Boot them out. +- */ +- for (n = 0; n < num_channels; n++) { +- switch (state->channel[n].fsm) { +- case FIQ_PER_CSPLIT_WAIT: +- case FIQ_PER_CSPLIT_NYET1: +- case FIQ_PER_CSPLIT_POLL: +- case FIQ_PER_CSPLIT_LAST: +- /* Check if we are no longer in the same full-speed frame. */ +- if (((state->channel[n].expected_uframe & 0x3FFF) & ~0x7) < +- (hfnum.b.frnum & ~0x7)) +- state->channel[n].fsm = FIQ_PER_SPLIT_TIMEOUT; +- break; +- default: +- break; +- } +- } +- +- } ++ if (state->kick_np_queues || ++ dwc_frame_num_le(state->next_sched_frame, hfnum.b.frnum)) ++ kick_irq |= 1; + +- if (!state->kick_np_queues && +- dwc_frame_num_gt(state->next_sched_frame, hfnum.b.frnum)) { +- return 1; +- } else { +- return 0; +- } ++ return !kick_irq; + } + + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h +index bc808a0..7572958 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h ++++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h +@@ -342,6 +342,8 @@ struct fiq_state { + struct fiq_channel_state channel[0]; + }; + ++extern int fiq_fsm_too_late(struct fiq_state *st, int n); ++ + extern int fiq_fsm_tt_in_use(struct fiq_state *st, int num_channels, int n); + + extern void dwc_otg_fiq_fsm(struct fiq_state *state, int num_channels); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 98f5e84..042af09 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +@@ -1478,8 +1478,8 @@ int fiq_fsm_transaction_suitable(dwc_otg_qh_t *qh) + */ + int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, dwc_otg_qh_t *qh) + { +- int i = 0; +- uint32_t frame_length, nrslots, last_size; ++ int frame_length, i = 0; ++ uint32_t nrslots, last_size; + uint8_t *ptr = NULL; + dwc_hc_t *hc = qh->channel; + struct fiq_dma_blob *blob; +@@ -1498,6 +1498,15 @@ int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, + */ + 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]; ++ /* Calculate the max number of CSPLITS such that the FIQ can time out ++ * a transaction if it fails. ++ */ ++ frame_length = st->hcchar_copy.b.mps; ++ do { ++ i++; ++ frame_length -= 188; ++ } while (frame_length >= 0); ++ st->nrpackets = i; + return 1; + } else { + if (qh->ep_type == UE_ISOCHRONOUS) { +@@ -1804,7 +1813,9 @@ int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) + start_immediate = 0; + } else if (uframe == 5) { + start_immediate = 0; +- } else if (hc->ep_type == UE_ISOCHRONOUS) { ++ } else if (hc->ep_type == UE_ISOCHRONOUS && !hc->ep_is_in) { ++ start_immediate = 0; ++ } else if (hc->ep_is_in && fiq_fsm_too_late(hcd->fiq_state, hc->hc_num)) { + start_immediate = 0; + } else { + /* Search through all host channels to determine if a transaction +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 3b8567e..dda88a3 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +@@ -2300,7 +2300,7 @@ int dwc_otg_fiq_unsetup_per_dma(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh, dwc_otg_qt + ptr += qtd->urb->actual_length; + } + +- for (i = 0; i < st->nrpackets; i++) { ++ for (i = 0; i < st->dma_info.index; i++) { + len += 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]; +@@ -2488,9 +2488,9 @@ int32_t dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + + case FIQ_PER_SPLIT_NYET_ABORTED: + /* Doh. lost the data. */ +- printk_ratelimited(KERN_INFO "Transfer to device %d endpoint 0x%x failed " ++ printk_ratelimited(KERN_INFO "Transfer to device %d endpoint 0x%x frame %d failed " + "- FIQ reported NYET. Data may have been lost.\n", +- hc->dev_addr, hc->ep_num); ++ hc->dev_addr, hc->ep_num, dwc_otg_hcd_get_frame_number(hcd) >> 3); + if (hc->ep_type == UE_ISOCHRONOUS) { + struct dwc_otg_hcd_iso_packet_desc *frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index]; + /* Record errors, update qtd. */ +@@ -2543,9 +2543,9 @@ int32_t dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num) + + case FIQ_PER_SPLIT_TIMEOUT: + /* Couldn't complete in the nominated frame */ +- printk_ratelimited(KERN_INFO "Transfer to device %d endpoint 0x%x failed " ++ printk(KERN_INFO "Transfer to device %d endpoint 0x%x frame %d failed " + "- FIQ timed out. Data may have been lost.\n", +- hc->dev_addr, hc->ep_num); ++ hc->dev_addr, hc->ep_num, dwc_otg_hcd_get_frame_number(hcd) >> 3); + if (hc->ep_type == UE_ISOCHRONOUS) { + struct dwc_otg_hcd_iso_packet_desc *frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index]; + /* Record errors, update qtd. */ +-- +1.9.1 + + +From c1d79bef5163f17809ac82c10ab622ca3a82ff3b Mon Sep 17 00:00:00 2001 +From: P33M +Date: Thu, 17 Apr 2014 15:17:48 +0100 +Subject: [PATCH 102/102] fiq_fsm: fix bounce buffer utilisation for + Isochronous OUT + +Multi-packet isochronous OUT transactions were subject to a few bounday +bugs. Fix them. + +Audio playback is now much more robust: however, an issue stands with +devices that have adaptive sinks - ALSA plays samples too fast. +--- + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 29 +++++++++-------------------- + 1 file changed, 9 insertions(+), 20 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 042af09..e6b4a1e 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +@@ -1479,13 +1479,11 @@ int fiq_fsm_transaction_suitable(dwc_otg_qh_t *qh) + int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, dwc_otg_qh_t *qh) + { + int frame_length, i = 0; +- uint32_t nrslots, last_size; + uint8_t *ptr = NULL; + 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; + } +@@ -1520,9 +1518,6 @@ int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, + blob = hcd->fiq_dmab; + + ptr = qtd->urb->buf + frame_desc->offset; +- nrslots = (frame_length + 187) / 188; +- last_size = frame_length % 188; +- //printk(KERN_INFO "len = %d nrslots = %d last_size=%d\n", frame_length, nrslots, last_size); + if (frame_length == 0) { + /* + * for isochronous transactions, we must still transmit a packet +@@ -1532,31 +1527,25 @@ int fiq_fsm_setup_periodic_dma(dwc_otg_hcd_t *hcd, struct fiq_channel_state *st, + st->nrpackets = 1; + } else { + do { +- if (i < nrslots - 1) { ++ if (frame_length <= 188) { ++ dwc_memcpy(&blob->channel[hc->hc_num].index[i].buf[0], ptr, frame_length); ++ st->dma_info.slot_len[i] = frame_length; ++ ptr += frame_length; ++ } else { + dwc_memcpy(&blob->channel[hc->hc_num].index[i].buf[0], ptr, 188); + st->dma_info.slot_len[i] = 188; + ptr += 188; +- } else { +- dwc_memcpy(&blob->channel[hc->hc_num].index[i].buf[0], ptr, last_size); +- st->dma_info.slot_len[i] = last_size; +- ptr += last_size; + } + i++; +- } while (i <= nrslots - 1); ++ frame_length -= 188; ++ } while (frame_length > 0); + 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 +- * cache coherency issue */ +- //st->hcdma_copy.d32 = (uint32_t) &blob->channel[hc->hc_num].index[0].buf[0]; +- //ptr = qtd->urb->buf + frame_desc->offset; +- st->hcdma_copy.d32 = (uint32_t) qtd->urb->dma + frame_desc->offset; +- if (st->hcdma_copy.d32 & 0x3) +- BUG(); ++ st->hcdma_copy.d32 = (uint32_t) &blob->channel[hc->hc_num].index[0].buf[0]; ++ + /* fixup xfersize to the actual packet size */ + st->hctsiz_copy.b.pid = 0; + st->hctsiz_copy.b.xfersize = st->dma_info.slot_len[0]; +-- +1.9.1