diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index fce60a62ce..46da9939fa 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,7 @@ -From 3cc8c1beb520133149f9cb5d394cbc1c8bbb01b0 Mon Sep 17 00:00:00 2001 +From 32fbd277d5d5047ce40d88c511a1b1437e27cdd9 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/251] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/398] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -16,7 +16,7 @@ Signed-off-by: Steve Glendinning diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c old mode 100644 new mode 100755 -index 66b3ab9..b544181 +index 66b3ab9f614eb07edb05757ee333e998f7841f7d..b544181956c1f2dc3ea7473cdf412bf26095028e --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1785,7 +1785,6 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) @@ -36,17 +36,17 @@ index 66b3ab9..b544181 usbnet_skb_return(dev, ax_skb); } -From d41a067375e9d557ee14ad6ecefbc559b724087c Mon Sep 17 00:00:00 2001 +From 755d2a3e036c87d61d9eec3439cbece8c1276f4f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Apr 2015 16:58:45 +0100 -Subject: [PATCH 002/251] smsc95xx: Disable turbo mode by default +Subject: [PATCH 002/398] smsc95xx: Disable turbo mode by default --- drivers/net/usb/smsc95xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index b544181..9c0da18 100755 +index b544181956c1f2dc3ea7473cdf412bf26095028e..9c0da18957430ff7ddd4aeb030a8139e7085cb9e 100755 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -70,7 +70,7 @@ struct smsc95xx_priv { @@ -59,10 +59,10 @@ index b544181..9c0da18 100755 MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); -From 52a67e5a346e7dfcd6af9115800108d6c9fca84e Mon Sep 17 00:00:00 2001 +From 2c76614449f79b488e6ae9a5d3939618c04c2950 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 003/251] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 003/398] vmstat: Workaround for issue where dirty page count goes negative See: @@ -73,7 +73,7 @@ http://www.spinics.net/lists/linux-mm/msg72236.html 1 file changed, 4 insertions(+) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h -index 3e5d907..2539068 100644 +index 3e5d9075960f6c756ead3c60013f84f873206932..253906809c84085487caf2fb99f0cb151f108ff6 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -219,7 +219,11 @@ static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) @@ -89,10 +89,10 @@ index 3e5d907..2539068 100644 static inline void __inc_zone_page_state(struct page *page, -From 5956e14120ab88b53fe2f68f7de6c197eae4a811 Mon Sep 17 00:00:00 2001 +From 1f3629562a7377004c4ffb1ff080b4a9bbf75e71 Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 004/251] BCM2835_DT: Fix I2S register map +Subject: [PATCH 004/398] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -101,7 +101,7 @@ Subject: [PATCH 004/251] BCM2835_DT: Fix I2S register map 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt -index 1396078..2db8294 100644 +index 1396078d15ac625e737487bb242f79b330796951..2db8294474db47d8c199796d4d50a3a0a8a3cac5 100644 --- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt +++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt @@ -48,8 +48,8 @@ Example: @@ -116,7 +116,7 @@ index 1396078..2db8294 100644 dmas = <&dma 2>, <&dma 3>; diff --git a/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt -index 65783de..a89fe42 100644 +index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554427118a2 100644 --- a/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt +++ b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt @@ -16,8 +16,8 @@ Example: @@ -131,7 +131,7 @@ index 65783de..a89fe42 100644 dmas = <&dma 2>, <&dma 3>; diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi -index aef64de..864a3ef 100644 +index aef64de77495b4be5867dc6ee0fcc9892bdcea7e..864a3effc758aee575013169af129687ad37bef7 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -120,8 +120,8 @@ @@ -146,10 +146,10 @@ index aef64de..864a3ef 100644 dmas = <&dma 2>, <&dma 3>; -From bd8d0148b99e3281aaa294257961377c93a9381d Mon Sep 17 00:00:00 2001 +From 764a8ffa182a56e7be1da720057e09f3ea2f6c6e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/251] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/398] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -164,7 +164,7 @@ though, so trap them early. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index f687082..4cd8ebe 100644 +index f68708281fcf4a821071f6d84246e34b016db4c5..4cd8ebe07274554395e4de4a9d83a3b525d4b366 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -170,9 +170,10 @@ __exception_irq_entry bcm2836_arm_irqchip_handle_irq(struct pt_regs *regs) @@ -180,10 +180,10 @@ index f687082..4cd8ebe 100644 handle_IRQ(irq_linear_revmap(intc.domain, hwirq), regs); -From 2311742728ef10f5d7ed17debc4065e90cb25c7e Mon Sep 17 00:00:00 2001 +From d6a763397a23b1e1c663bc8b82f62579adeb2265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 006/251] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 006/398] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -201,7 +201,7 @@ Acked-by: Stephen Warren 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig -index 8c53c55..c943747 100644 +index 8c53c55be1feb318e84e2c2aba475b42646527c2..c943747b7c1138b342207cacd9fddd7e403f649b 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -128,6 +128,7 @@ config ARCH_BCM2835 @@ -213,7 +213,7 @@ index 8c53c55..c943747 100644 select PINCTRL_BCM2835 help diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c -index bf9cc5f..3f601f9 100644 +index bf9cc5f2e839e845fe1ce65caa672b6212d3ffbc..3f601f98aa884b941fbb84edb349f6c469b940b1 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -55,7 +55,7 @@ @@ -312,10 +312,10 @@ index bf9cc5f..3f601f9 100644 } -From 60f12c460c71c04609a23be23df6eb986481c365 Mon Sep 17 00:00:00 2001 +From c490d2838992e95190e08e962ad848478ceb98f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 007/251] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 007/398] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -326,7 +326,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c -index 3f601f9..20deb28 100644 +index 3f601f98aa884b941fbb84edb349f6c469b940b1..20deb282286834b1f234a65e614b8584688a25d7 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -50,6 +50,8 @@ @@ -411,17 +411,17 @@ index 3f601f9..20deb28 100644 for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 8de2ecc5c42ae0a909fbc23da58ef2fa552d4c5b Mon Sep 17 00:00:00 2001 +From 9b6fd10c34f19d7095f69ffbc3e4d2d6fc5e8de3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 008/251] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 008/398] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c -index 3912646..b51a59c 100644 +index 39126460c1f59097ad164bfee65579e8ce54085a..b51a59c30931a4e096aef7b1c12736ac14df22ce 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -509,6 +509,8 @@ static void __init serial8250_isa_init_ports(void) @@ -434,10 +434,10 @@ index 3912646..b51a59c 100644 for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; -From 2567dee80cdc0654788137d07308fa428d3dc8fb Mon Sep 17 00:00:00 2001 +From f728a7e668aeaccf0808e245868bb358d6820b65 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 009/251] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 009/398] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -446,7 +446,7 @@ Signed-off-by: Noralf Tronnes 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 17dd8fe..613be28 100644 +index 17dd8fe12b54ab6b44c31fcd3c3c917beda9691d..613be2827c2b104f6d29da910f1bf452563fc007 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -373,7 +373,7 @@ static struct gpio_chip bcm2835_gpio_chip = { @@ -459,10 +459,10 @@ index 17dd8fe..613be28 100644 .can_sleep = false, }; -From f23532983c575cac8b55c4bceb1e45a1439f7e0e Mon Sep 17 00:00:00 2001 +From 31827d79eb26067668fcb00cfd018a68f7f4add9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 010/251] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 010/398] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -483,7 +483,7 @@ the pins are often used for I2S instead. 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 613be28..a06cf9e 100644 +index 613be2827c2b104f6d29da910f1bf452563fc007..a06cf9e5f38d23b43da0914b98d6ffb4a7216c00 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -47,6 +47,7 @@ @@ -608,10 +608,10 @@ index 613be28..a06cf9e 100644 }, }; -From fe30b946aef6315884bd029f889f6eb3692705e5 Mon Sep 17 00:00:00 2001 +From 20e20f5f7ccbeada3387f59f887694c2955401b6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 011/251] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 011/398] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -625,7 +625,7 @@ interface, is unlikely to be a problem. 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index a06cf9e..32f779e 100644 +index a06cf9e5f38d23b43da0914b98d6ffb4a7216c00..32f779eeafcba4b29390572e5393b2f4058e0d13 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -1029,6 +1029,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) @@ -638,10 +638,10 @@ index a06cf9e..32f779e 100644 pc->irq_data[i].irqgroup = i; -From cc544ca7cb8b033c7bf3d884277f32887a1417a7 Mon Sep 17 00:00:00 2001 +From 1686ef5059e87ba4c83d48cd496695b30201751b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 012/251] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 012/398] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -658,7 +658,7 @@ Signed-off-by: Phil Elwell 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index cf04960..a2b1f45 100644 +index cf04960cc3e6ca1f5a87ad24f3d88cdbcfaa8a36..a2b1f45c43cea72833660702971a525575851e16 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -688,6 +688,8 @@ static int bcm2835_spi_setup(struct spi_device *spi) @@ -722,10 +722,10 @@ index cf04960..a2b1f45 100644 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 8cf07dd13a251b72f28805060d58b942b582feef Mon Sep 17 00:00:00 2001 +From da3aabaf8eb4de9ed3bc74bc30450f9b78d5e1a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 013/251] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 013/398] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -750,7 +750,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 0f7b9ea..1e6f1cf 100644 +index 0f7b9eac3d15d23dc7faa78699e119c7faad547c..1e6f1cf95bf37c6ab984d6c5dfbd3537e25c17b8 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -17,12 +17,16 @@ @@ -783,10 +783,10 @@ index 0f7b9ea..1e6f1cf 100644 static const char * const bcm2835_compat[] = { -From 902ceaaea891e7883c141d45e52dde7d859e2324 Mon Sep 17 00:00:00 2001 +From 8bbff36e2a0565b1557aa5154f2c98b8ac3320df Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 16:44:05 +0200 -Subject: [PATCH 014/251] bcm2835-i2s: get base address for DMA from devicetree +Subject: [PATCH 014/398] bcm2835-i2s: get base address for DMA from devicetree Code copied from spi-bcm2835. Get physical address from devicetree instead of using hardcoded constant. @@ -797,7 +797,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 8c435be..0bc4f47 100644 +index 8c435beb263dfc02df2ee714b1abf43a6cbe6bad..0bc4f47695ce0130ca65547ca2cf3f369102b0e3 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -38,6 +38,7 @@ @@ -851,10 +851,10 @@ index 8c435be..0bc4f47 100644 /* Set the bus width */ dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = -From c89c8dc0cde738e6d2a5d07dbfd2aaa72f4a07d0 Mon Sep 17 00:00:00 2001 +From 2d8b5ad42c914b6f89a4fcbfe2efd511948962ad Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:21:16 +0200 -Subject: [PATCH 015/251] bcm2835-i2s: add 24bit support, update bclk_ratio to +Subject: [PATCH 015/398] bcm2835-i2s: add 24bit support, update bclk_ratio to more correct values Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -886,7 +886,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0bc4f47..cf60390 100644 +index 0bc4f47695ce0130ca65547ca2cf3f369102b0e3..cf60390fa174d965378ede80b81e69baa54266de 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -340,11 +340,15 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, @@ -933,10 +933,10 @@ index 0bc4f47..cf60390 100644 }, .ops = &bcm2835_i2s_dai_ops, -From da23963f1f4c8999ec76bb99234aec3864b0e56f Mon Sep 17 00:00:00 2001 +From 21bf597a7864303e1796788ec6609972cf300e03 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:25:51 +0200 -Subject: [PATCH 016/251] bcm2835-i2s: setup clock only if CPU is clock master +Subject: [PATCH 016/398] bcm2835-i2s: setup clock only if CPU is clock master Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -952,7 +952,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index cf60390..4ac4e92 100644 +index cf60390fa174d965378ede80b81e69baa54266de..4ac4e929e8fb9a6d34535e54550f724bffb092b5 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -411,15 +411,25 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, @@ -991,10 +991,10 @@ index cf60390..4ac4e92 100644 /* Setup the frame format */ format = BCM2835_I2S_CHEN; -From 611d61511eefc080a178187b36c9d86aec9bb8b0 Mon Sep 17 00:00:00 2001 +From 2b4e5a6e9d089cf458ec6fa053afc44c69e89014 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:49:51 +0200 -Subject: [PATCH 017/251] bcm2835-i2s: Eliminate debugfs directory error +Subject: [PATCH 017/398] bcm2835-i2s: Eliminate debugfs directory error Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1010,7 +1010,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 2 insertions(+) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 4ac4e92..aab3df9 100644 +index 4ac4e929e8fb9a6d34535e54550f724bffb092b5..aab3df97d209269b6c64d9e199296464aea903bb 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -782,6 +782,7 @@ static const struct regmap_config bcm2835_regmap_config[] = { @@ -1030,10 +1030,10 @@ index 4ac4e92..aab3df9 100644 }; -From bb6885bf7549495ca00d9a839954dcd35c4b9e61 Mon Sep 17 00:00:00 2001 +From dc4f3ebf7ed390889e24212b3abcd5ca95a0961a Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:35:20 +0200 -Subject: [PATCH 018/251] bcm2835-i2s: Register PCM device +Subject: [PATCH 018/398] bcm2835-i2s: Register PCM device Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1055,7 +1055,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index aab3df9..0e5c787 100644 +index aab3df97d209269b6c64d9e199296464aea903bb..0e5c7876c8edf310ba175604b18e25d8acf8fdbb 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -799,6 +799,25 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { @@ -1096,10 +1096,10 @@ index aab3df9..0e5c787 100644 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); return ret; -From 7eced106f678f81b479e3f4fcc0de5b0c8e1dbd9 Mon Sep 17 00:00:00 2001 +From 99541365fe9f07ad114784763b5bc3fee81189c0 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:55:21 +0200 -Subject: [PATCH 019/251] bcm2835-i2s: Enable MMAP support via a DT property +Subject: [PATCH 019/398] bcm2835-i2s: Enable MMAP support via a DT property Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1118,7 +1118,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0e5c787..04c1d13 100644 +index 0e5c7876c8edf310ba175604b18e25d8acf8fdbb..04c1d1310d34527e9d57148a4b70ca73cf99e3a8 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -799,7 +799,7 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { @@ -1143,10 +1143,10 @@ index 0e5c787..04c1d13 100644 for (i = 0; i <= 1; i++) { void __iomem *base; -From 6de25eb4521167e2d9d5a9c777333cec1542192f Mon Sep 17 00:00:00 2001 +From 725ec95e16bda21c122f97d9371f9d22510dfad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 9 Apr 2015 12:34:11 +0200 -Subject: [PATCH 020/251] dmaengine: bcm2835: Add slave dma support +Subject: [PATCH 020/398] dmaengine: bcm2835: Add slave dma support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1163,7 +1163,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 192 insertions(+), 14 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 996c4b0..b278c66 100644 +index 996c4b00d323ed5c2dd6455f80eb36ed8e9a8b23..b278c663e3b31a7c906dd32d53db5e670f6bbc10 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -1,11 +1,10 @@ @@ -1466,10 +1466,10 @@ index 996c4b0..b278c66 100644 +MODULE_AUTHOR("Gellert Weisz "); MODULE_LICENSE("GPL v2"); -From 6090e63c27886fcd841ba451d8646c093a179b8d Mon Sep 17 00:00:00 2001 +From 0e08822b156b5b289c865c0b46316b73782d8d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 15:58:59 +0200 -Subject: [PATCH 021/251] dmaengine: bcm2835: set residue_granularity field +Subject: [PATCH 021/398] dmaengine: bcm2835: set residue_granularity field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1486,7 +1486,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 1 insertion(+) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index b278c66..696fb30 100644 +index b278c663e3b31a7c906dd32d53db5e670f6bbc10..696fb30b4f5a01cda9b98038b8e548368cea05f4 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -802,6 +802,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev) @@ -1498,10 +1498,10 @@ index b278c66..696fb30 100644 INIT_LIST_HEAD(&od->ddev.channels); spin_lock_init(&od->lock); -From ea0d9861bde9e049f8d5e43ae89dcf7844cb5e8d Mon Sep 17 00:00:00 2001 +From 0b6e03af9b92d380d18be88d3a7f0cd98adfe232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 022/251] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 022/398] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1519,7 +1519,7 @@ Signed-off-by: Noralf Trønnes 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index e6cd1a3..060306e 100644 +index e6cd1a32025a916cec7d219d4693c7c71e4c09a9..060306e6b4cbba1b8849d1212ebe2ad63aa493f7 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -108,7 +108,7 @@ config COH901318 @@ -1532,7 +1532,7 @@ index e6cd1a3..060306e 100644 select DMA_VIRTUAL_CHANNELS diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 696fb30..5db0a95 100644 +index 696fb30b4f5a01cda9b98038b8e548368cea05f4..5db0a95985b20a2086c65762ea8f125511f67471 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -36,6 +36,7 @@ @@ -1601,10 +1601,10 @@ index 696fb30..5db0a95 100644 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 8947371bab57f6f0adb8c9519ceeba017fa5fc6a Mon Sep 17 00:00:00 2001 +From 039a71eb9467f89bee3ec6c8593e4264ba0fa292 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sat, 10 Oct 2015 12:29:18 +0200 -Subject: [PATCH 023/251] bcm2835-dma: Fix dreq not set for slave transfers +Subject: [PATCH 023/398] bcm2835-dma: Fix dreq not set for slave transfers Set dreq to slave_id if it is not set like in bcm2708-dmaengine. --- @@ -1612,7 +1612,7 @@ Set dreq to slave_id if it is not set like in bcm2708-dmaengine. 1 file changed, 2 insertions(+) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 5db0a95..fe1fd60 100644 +index 5db0a95985b20a2086c65762ea8f125511f67471..fe1fd609ce5d94b1ccf7ec09895556108395a6b1 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -657,6 +657,8 @@ static int bcm2835_dma_slave_config(struct dma_chan *chan, @@ -1625,10 +1625,10 @@ index 5db0a95..fe1fd60 100644 return 0; } -From 22399cbc5ece0905650012b73e51a366d1c754e6 Mon Sep 17 00:00:00 2001 +From c7a79fc7cc5699799c60d9df929f025feb8b9c1b Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 12:28:30 +0200 -Subject: [PATCH 024/251] bcm2835-dma: Limit cyclic transfers on lite channels +Subject: [PATCH 024/398] bcm2835-dma: Limit cyclic transfers on lite channels to 32k Transfers larger than 32k cause repeated clicking with I2S soundcards. @@ -1639,7 +1639,7 @@ did as an intermediate fix. 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index fe1fd60..0adc347 100644 +index fe1fd609ce5d94b1ccf7ec09895556108395a6b1..0adc347fe5de46196aee65e86e9a4e3dcc7349f0 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -144,6 +144,12 @@ struct bcm2835_desc { @@ -1665,10 +1665,10 @@ index fe1fd60..0adc347 100644 max_size = MAX_NORMAL_TRANSFER; period_len = min(period_len, max_size); -From 1e8033be36dd0c3b000c014245cc45f94118faa0 Mon Sep 17 00:00:00 2001 +From 34d88c613d4377d3cd7dc341573998f40ed816c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:50:02 +0200 -Subject: [PATCH 025/251] bcm2835: Add support for uart1 +Subject: [PATCH 025/398] bcm2835: Add support for uart1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1682,7 +1682,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 25 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 1e6f1cf..ea36eec 100644 +index 1e6f1cf95bf37c6ab984d6c5dfbd3537e25c17b8..ea36eeca903872ff8258a6081ab7b34fd32b3334 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -22,6 +22,29 @@ @@ -1725,10 +1725,10 @@ index 1e6f1cf..ea36eec 100644 static const char * const bcm2835_compat[] = { -From d97842cc1aac3d0ff132500fad402068743d08df Mon Sep 17 00:00:00 2001 +From b6a810edef23f932b2a75ac8ea3c58283a807984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:21:20 +0200 -Subject: [PATCH 026/251] firmware: bcm2835: Add missing property tags +Subject: [PATCH 026/398] firmware: bcm2835: Add missing property tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1739,7 +1739,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 8 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index c07d74a..525816d 100644 +index c07d74aa39bfa82b5c1da19bb01294ee48310ea4..525816d7547e4aa1703d5b4283f5f39dbf92f7d7 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -63,6 +63,7 @@ enum rpi_firmware_property_tag { @@ -1790,10 +1790,10 @@ index c07d74a..525816d 100644 RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, -From f01f5606b8fe5e7ea7d70f4f2e0e7435040cabaa Mon Sep 17 00:00:00 2001 +From c0e63fc9b4a1ee32d99592e357b40b9f21880057 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 027/251] Main bcm2708/bcm2709 linux port +Subject: [PATCH 027/398] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1866,7 +1866,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 arch/arm/mach-bcm2709/vc_mem.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 34e1569..8f06ea8 100644 +index 34e1569a11ee322a0a020bdfe0c9b801b6b58c12..8f06ea82ddf1be7c77f6eacacc5a77dd4608af97 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -317,6 +317,52 @@ choice @@ -1933,7 +1933,7 @@ index 34e1569..8f06ea8 100644 source "arch/arm/mach-alpine/Kconfig" diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug -index ddbb361..340b759 100644 +index ddbb361267d879c3c2947c9b094d7be784e2f1c2..340b75907723c87a9792f9f43e7fa4b77b9b73af 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1240,6 +1240,14 @@ choice @@ -1952,7 +1952,7 @@ index ddbb361..340b759 100644 config DEBUG_EXYNOS_UART diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index 2c2b28e..a2e7cf7 100644 +index 2c2b28ee48119771dfa92f353124795d456d770a..a2e7cf71e771e3703d484f78aaad90072d6c8181 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -154,6 +154,8 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 @@ -1965,7 +1965,7 @@ index 2c2b28e..a2e7cf7 100644 machine-$(CONFIG_ARCH_AT91) += at91 machine-$(CONFIG_ARCH_AXXIA) += axxia diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S -index 04286fd..ed82628 100644 +index 04286fd9e09ce7a27259c4d375a05a965e3be0ea..ed826280e744828ebb1c5ae6b7a62d70f28c1429 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -700,6 +700,14 @@ ARM_BE8(rev16 ip, ip) @@ -1984,7 +1984,7 @@ index 04286fd..ed82628 100644 ENDPROC(__fixup_a_pv_table) diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c -index 4adfb46..69aad0e 100644 +index 4adfb46e3ee93276ea506b723eb11e33c57459f4..69aad0ebc902b82a83afd24938cafdfe1686136d 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -91,6 +91,16 @@ void arch_cpu_idle_exit(void) @@ -2006,7 +2006,7 @@ index 4adfb46..69aad0e 100644 unsigned long flags; diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig new file mode 100644 -index 0000000..6eabe84 +index 0000000000000000000000000000000000000000..6eabe844767f7fa9bdc09a897bab83e5149fc0dd --- /dev/null +++ b/arch/arm/mach-bcm2708/Kconfig @@ -0,0 +1,23 @@ @@ -2035,7 +2035,7 @@ index 0000000..6eabe84 +endmenu diff --git a/arch/arm/mach-bcm2708/Makefile b/arch/arm/mach-bcm2708/Makefile new file mode 100644 -index 0000000..3da1a1b +index 0000000000000000000000000000000000000000..3da1a1b4ea1fb04ae0b535b2915ea9f386f5701c --- /dev/null +++ b/arch/arm/mach-bcm2708/Makefile @@ -0,0 +1,5 @@ @@ -2046,7 +2046,7 @@ index 0000000..3da1a1b +obj-$(CONFIG_MACH_BCM2708) += bcm2708.o diff --git a/arch/arm/mach-bcm2708/Makefile.boot b/arch/arm/mach-bcm2708/Makefile.boot new file mode 100644 -index 0000000..67039c3 +index 0000000000000000000000000000000000000000..67039c3e0c48fa6b94f1147b3316f74afcecba9e --- /dev/null +++ b/arch/arm/mach-bcm2708/Makefile.boot @@ -0,0 +1,3 @@ @@ -2055,7 +2055,7 @@ index 0000000..67039c3 +initrd_phys-y := 0x00800000 diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c new file mode 100644 -index 0000000..280628b +index 0000000000000000000000000000000000000000..280628ba8907d2a4323fc86dfc6db7fc684aeabc --- /dev/null +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -0,0 +1,231 @@ @@ -2292,7 +2292,7 @@ index 0000000..280628b +module_param(reboot_part, uint, 0644); diff --git a/arch/arm/mach-bcm2708/include/mach/debug-macro.S b/arch/arm/mach-bcm2708/include/mach/debug-macro.S new file mode 100644 -index 0000000..b24304a +index 0000000000000000000000000000000000000000..b24304a6755e965b8a28eb048b7f4e2d868820f9 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/debug-macro.S @@ -0,0 +1,22 @@ @@ -2320,7 +2320,7 @@ index 0000000..b24304a +#include diff --git a/arch/arm/mach-bcm2708/include/mach/io.h b/arch/arm/mach-bcm2708/include/mach/io.h new file mode 100644 -index 0000000..e6eb84d +index 0000000000000000000000000000000000000000..e6eb84d71006db417dbd0afc4d08d3b19b09a619 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/io.h @@ -0,0 +1,27 @@ @@ -2353,7 +2353,7 @@ index 0000000..e6eb84d +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/memory.h b/arch/arm/mach-bcm2708/include/mach/memory.h new file mode 100644 -index 0000000..7548a52 +index 0000000000000000000000000000000000000000..7548a52dcf84affa4d1b0667e5e2f89f591891b8 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/memory.h @@ -0,0 +1,57 @@ @@ -2416,7 +2416,7 @@ index 0000000..7548a52 +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h new file mode 100644 -index 0000000..4fb43cf +index 0000000000000000000000000000000000000000..4fb43cf391e50e702d0a0588ceff397c79c501d7 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -0,0 +1,112 @@ @@ -2534,7 +2534,7 @@ index 0000000..4fb43cf +/* END */ diff --git a/arch/arm/mach-bcm2708/include/mach/system.h b/arch/arm/mach-bcm2708/include/mach/system.h new file mode 100644 -index 0000000..c9a9c9a +index 0000000000000000000000000000000000000000..c9a9c9a881102c5354971d15203a746906761a70 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/system.h @@ -0,0 +1,37 @@ @@ -2577,7 +2577,7 @@ index 0000000..c9a9c9a +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/uncompress.h b/arch/arm/mach-bcm2708/include/mach/uncompress.h new file mode 100644 -index 0000000..de7504b +index 0000000000000000000000000000000000000000..de7504bfc20ba24be8707861b8389783860adb77 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/uncompress.h @@ -0,0 +1,84 @@ @@ -2667,7 +2667,7 @@ index 0000000..de7504b +#define arch_decomp_wdog() diff --git a/arch/arm/mach-bcm2708/include/mach/vmalloc.h b/arch/arm/mach-bcm2708/include/mach/vmalloc.h new file mode 100644 -index 0000000..502c617 +index 0000000000000000000000000000000000000000..502c6178101be60b10c9eb31afec938b5534c33f --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vmalloc.h @@ -0,0 +1,20 @@ @@ -2693,7 +2693,7 @@ index 0000000..502c617 +#define VMALLOC_END (0xe8000000) diff --git a/arch/arm/mach-bcm2709/Kconfig b/arch/arm/mach-bcm2709/Kconfig new file mode 100644 -index 0000000..643b4b9 +index 0000000000000000000000000000000000000000..643b4b984512a5f2ae33cee9beffa70a53e005ff --- /dev/null +++ b/arch/arm/mach-bcm2709/Kconfig @@ -0,0 +1,16 @@ @@ -2715,7 +2715,7 @@ index 0000000..643b4b9 +endmenu diff --git a/arch/arm/mach-bcm2709/Makefile b/arch/arm/mach-bcm2709/Makefile new file mode 100644 -index 0000000..26cd67d +index 0000000000000000000000000000000000000000..26cd67d3dc343dbd250fa97855a82c28bbd95af0 --- /dev/null +++ b/arch/arm/mach-bcm2709/Makefile @@ -0,0 +1,5 @@ @@ -2726,7 +2726,7 @@ index 0000000..26cd67d +obj-$(CONFIG_MACH_BCM2709) += bcm2709.o diff --git a/arch/arm/mach-bcm2709/Makefile.boot b/arch/arm/mach-bcm2709/Makefile.boot new file mode 100644 -index 0000000..67039c3 +index 0000000000000000000000000000000000000000..67039c3e0c48fa6b94f1147b3316f74afcecba9e --- /dev/null +++ b/arch/arm/mach-bcm2709/Makefile.boot @@ -0,0 +1,3 @@ @@ -2735,7 +2735,7 @@ index 0000000..67039c3 +initrd_phys-y := 0x00800000 diff --git a/arch/arm/mach-bcm2709/bcm2709.c b/arch/arm/mach-bcm2709/bcm2709.c new file mode 100644 -index 0000000..90773a3 +index 0000000000000000000000000000000000000000..90773a30b87abbfda1615326c6faf59b9db6d68e --- /dev/null +++ b/arch/arm/mach-bcm2709/bcm2709.c @@ -0,0 +1,380 @@ @@ -3121,7 +3121,7 @@ index 0000000..90773a3 +module_param(reboot_part, uint, 0644); diff --git a/arch/arm/mach-bcm2709/include/mach/debug-macro.S b/arch/arm/mach-bcm2709/include/mach/debug-macro.S new file mode 100644 -index 0000000..b24304a +index 0000000000000000000000000000000000000000..b24304a6755e965b8a28eb048b7f4e2d868820f9 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/debug-macro.S @@ -0,0 +1,22 @@ @@ -3149,7 +3149,7 @@ index 0000000..b24304a +#include diff --git a/arch/arm/mach-bcm2709/include/mach/entry-macro.S b/arch/arm/mach-bcm2709/include/mach/entry-macro.S new file mode 100644 -index 0000000..d08591b +index 0000000000000000000000000000000000000000..d08591b63c1a1710c40350d343d3eddc97ae74c1 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/entry-macro.S @@ -0,0 +1,123 @@ @@ -3278,7 +3278,7 @@ index 0000000..d08591b + .endm diff --git a/arch/arm/mach-bcm2709/include/mach/io.h b/arch/arm/mach-bcm2709/include/mach/io.h new file mode 100644 -index 0000000..e6eb84d +index 0000000000000000000000000000000000000000..e6eb84d71006db417dbd0afc4d08d3b19b09a619 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/io.h @@ -0,0 +1,27 @@ @@ -3311,7 +3311,7 @@ index 0000000..e6eb84d +#endif diff --git a/arch/arm/mach-bcm2709/include/mach/memory.h b/arch/arm/mach-bcm2709/include/mach/memory.h new file mode 100644 -index 0000000..7548a52 +index 0000000000000000000000000000000000000000..7548a52dcf84affa4d1b0667e5e2f89f591891b8 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/memory.h @@ -0,0 +1,57 @@ @@ -3374,7 +3374,7 @@ index 0000000..7548a52 +#endif diff --git a/arch/arm/mach-bcm2709/include/mach/platform.h b/arch/arm/mach-bcm2709/include/mach/platform.h new file mode 100644 -index 0000000..311b9f2 +index 0000000000000000000000000000000000000000..311b9f26fab7dd770bdcd684c7691442b0872d55 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/platform.h @@ -0,0 +1,188 @@ @@ -3568,7 +3568,7 @@ index 0000000..311b9f2 +/* END */ diff --git a/arch/arm/mach-bcm2709/include/mach/system.h b/arch/arm/mach-bcm2709/include/mach/system.h new file mode 100644 -index 0000000..c9a9c9a +index 0000000000000000000000000000000000000000..c9a9c9a881102c5354971d15203a746906761a70 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/system.h @@ -0,0 +1,37 @@ @@ -3611,7 +3611,7 @@ index 0000000..c9a9c9a +#endif diff --git a/arch/arm/mach-bcm2709/include/mach/uncompress.h b/arch/arm/mach-bcm2709/include/mach/uncompress.h new file mode 100644 -index 0000000..de7504b +index 0000000000000000000000000000000000000000..de7504bfc20ba24be8707861b8389783860adb77 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/uncompress.h @@ -0,0 +1,84 @@ @@ -3701,7 +3701,7 @@ index 0000000..de7504b +#define arch_decomp_wdog() diff --git a/arch/arm/mach-bcm2709/include/mach/vc_mem.h b/arch/arm/mach-bcm2709/include/mach/vc_mem.h new file mode 100644 -index 0000000..4a4a338 +index 0000000000000000000000000000000000000000..4a4a33845cbc02f0e0d5368fed3609f6ba9ff92b --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/vc_mem.h @@ -0,0 +1,35 @@ @@ -3742,7 +3742,7 @@ index 0000000..4a4a338 +#endif /* VC_MEM_H */ diff --git a/arch/arm/mach-bcm2709/include/mach/vmalloc.h b/arch/arm/mach-bcm2709/include/mach/vmalloc.h new file mode 100644 -index 0000000..6aa6826 +index 0000000000000000000000000000000000000000..6aa68260dd866c83527dffece8de483913231fb3 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/vmalloc.h @@ -0,0 +1,20 @@ @@ -3768,7 +3768,7 @@ index 0000000..6aa6826 +#define VMALLOC_END (0xff000000) diff --git a/arch/arm/mach-bcm2709/vc_mem.c b/arch/arm/mach-bcm2709/vc_mem.c new file mode 100644 -index 0000000..d2adfd1 +index 0000000000000000000000000000000000000000..d2adfd1db2421984ea8ab8fb809d1adb0765714e --- /dev/null +++ b/arch/arm/mach-bcm2709/vc_mem.c @@ -0,0 +1,431 @@ @@ -4204,7 +4204,7 @@ index 0000000..d2adfd1 +module_param(mem_size, uint, 0644); +module_param(mem_base, uint, 0644); diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig -index 4121886..253bed8 100644 +index 41218867a9a604286b83a14bc83fa7908f115dcc..253bed8f001e9c73234662255bde4be0ebc23f7c 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -358,7 +358,7 @@ config CPU_PJ4B @@ -4217,7 +4217,7 @@ index 4121886..253bed8 100644 select CPU_ABRT_EV6 select CPU_CACHE_V6 diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S -index 06d890a..30d96e8 100644 +index 06d890a2342b1600e2eae6e350994ad59f5c3a08..30d96e81c0e052c725bdb00bb3df56194023ab9f 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S @@ -73,10 +73,19 @@ ENDPROC(cpu_v6_reset) @@ -4244,7 +4244,7 @@ index 06d890a..30d96e8 100644 ENTRY(cpu_v6_dcache_clean_area) diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S -index 8e1ea43..be40ccb 100644 +index 8e1ea433c3f1e321d7ed4e91fe582a5be4eb85be..be40ccbf57f6f47418855af08c42531dc17ee7ca 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -480,6 +480,7 @@ __errata_finish: @@ -4256,7 +4256,7 @@ index 8e1ea43..be40ccb 100644 .align 2 diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types -index 2ed1b8a..b52d949 100644 +index 2ed1b8a922ed02b9e3545991873af77b4c1bf871..b52d949ee91d96eb7672fbbb4969bfa1e7afc376 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types @@ -522,6 +522,8 @@ torbreck MACH_TORBRECK TORBRECK 3090 @@ -4269,7 +4269,7 @@ index 2ed1b8a..b52d949 100644 ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile -index 56bd16e..c2ac46d 100644 +index 56bd16e77ae37147da0fa4e977adffcb9bc1a4c6..c2ac46d6b465ce639e17592da552758795cd3481 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -19,7 +19,7 @@ obj-$(CONFIG_CLKSRC_NOMADIK_MTU) += nomadik-mtu.o @@ -4282,7 +4282,7 @@ index 56bd16e..c2ac46d 100644 obj-$(CONFIG_ARCH_ATLAS7) += timer-atlas7.o obj-$(CONFIG_ARCH_MOXART) += moxart_timer.o diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile -index 177f78f..6a9e2d0 100644 +index 177f78f6e6d6313fd9fd16595fe36089296ce25f..6a9e2d087600cb3947194b6606d03a2dc18c0e0d 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -2,6 +2,9 @@ obj-$(CONFIG_IRQCHIP) += irqchip.o @@ -4296,7 +4296,7 @@ index 177f78f..6a9e2d0 100644 obj-$(CONFIG_ARCH_HIP04) += irq-hip04.o obj-$(CONFIG_ARCH_MMP) += irq-mmp.o diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h -index 8673ffe..ad22ebb 100644 +index 8673ffe3d86ef83fc657cde31a43058b94840f61..ad22ebbef8f9d8f4879cc32b33eff0b6d37db7ea 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -289,6 +289,7 @@ struct mmc_host { @@ -4308,10 +4308,10 @@ index 8673ffe..ad22ebb 100644 mmc_pm_flag_t pm_caps; /* supported pm features */ -From cc5bcfaa350113324f7433660c9a3dfc0229bcdd Mon Sep 17 00:00:00 2001 +From b8c9f480117ebd0c35b87e85f15ac375729323e5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 11 Nov 2015 21:01:15 +0000 -Subject: [PATCH 028/251] squash: include ARCH_BCM2708 / ARCH_BCM2709 +Subject: [PATCH 028/398] squash: include ARCH_BCM2708 / ARCH_BCM2709 --- drivers/char/hw_random/Kconfig | 2 +- @@ -4325,7 +4325,7 @@ Subject: [PATCH 028/251] squash: include ARCH_BCM2708 / ARCH_BCM2709 8 files changed, 23 insertions(+), 8 deletions(-) diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig -index dbf2271..e11e3f2 100644 +index dbf22719462f9481006b5c874ca99200342b4bee..e11e3f2aa8f8385bcf07aa2d0f4b6418b2755727 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -90,7 +90,7 @@ config HW_RANDOM_BCM63XX @@ -4338,7 +4338,7 @@ index dbf2271..e11e3f2 100644 ---help--- This driver provides kernel-side support for the Random Number diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig -index 546d05f..5a045c9 100644 +index 546d05f4358a7c452ee80366b3ae782e685fd7ef..5a045c912a9f47238cccf13e27f35dc14cd272bc 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -65,7 +65,7 @@ config ALTERA_MBOX @@ -4351,7 +4351,7 @@ index 546d05f..5a045c9 100644 An implementation of the BCM2385 Mailbox. It is used to invoke the services of the Videocore. Say Y here if you want to use the diff --git a/drivers/mailbox/bcm2835-mailbox.c b/drivers/mailbox/bcm2835-mailbox.c -index cfb4b44..d9c6c21 100644 +index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f27006f4edd15 100644 --- a/drivers/mailbox/bcm2835-mailbox.c +++ b/drivers/mailbox/bcm2835-mailbox.c @@ -51,12 +51,15 @@ @@ -4400,7 +4400,7 @@ index cfb4b44..d9c6c21 100644 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile -index 738cb49..4fd086f 100644 +index 738cb4929a49428890f543df5eab92976d40dbe7..4fd086f78b00241778beb89b01fdea1a4fe39285 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o @@ -4412,7 +4412,7 @@ index 738cb49..4fd086f 100644 obj-$(CONFIG_ARCH_BERLIN) += berlin/ obj-y += freescale/ diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig -index 2f4641a..d5c1a5d 100644 +index 2f4641a0e88bc3da19e28c3a8e3f432c14f504a9..d5c1a5d12a60099d1c011f2a780ad34200b4bfc8 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -85,7 +85,7 @@ config PWM_BCM_KONA @@ -4425,7 +4425,7 @@ index 2f4641a..d5c1a5d 100644 PWM framework driver for BCM2835 controller (Raspberry Pi) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index 8b9c2a3..e842e86 100644 +index 8b9c2a38d1ccd8ae00d9f2642026438d349c8be1..e842e8613b144f16916b1fce53cba1b538b8628d 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -78,7 +78,7 @@ config SPI_ATMEL @@ -4438,7 +4438,7 @@ index 8b9c2a3..e842e86 100644 help This selects a driver for the Broadcom BCM2835 SPI master. diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig -index 1c427be..3c03d17 100644 +index 1c427beffadd97b3e95522fc9236193006d58fcc..3c03d17bc5cbca981799dee8e8bb04bf46cd1591 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -1282,7 +1282,7 @@ config BCM63XX_WDT @@ -4451,7 +4451,7 @@ index 1c427be..3c03d17 100644 help Watchdog driver for the built in watchdog hardware in Broadcom diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 6a834e1..c5070ae 100644 +index 6a834e109f1de47e533d17e87cdc73d8ee86fc4d..c5070aec5996aafb2d9daaf75163e16a29bc6892 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -1,6 +1,6 @@ @@ -4463,10 +4463,10 @@ index 6a834e1..c5070ae 100644 select REGMAP_MMIO help -From d23b18d79e915fa0a5820230ee7a35d682e7af42 Mon Sep 17 00:00:00 2001 +From e3bbd1a761820916adae6a156661312e1b78b9bb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 029/251] Add dwc_otg driver +Subject: [PATCH 029/398] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -5064,7 +5064,7 @@ dwc_otg: Remove duplicate gadget probe/unregister function create mode 100644 drivers/usb/host/dwc_otg/test/test_sysfs.pl diff --git a/arch/arm/include/asm/irqflags.h b/arch/arm/include/asm/irqflags.h -index e6b70d9..a48ccf7 100644 +index e6b70d9d084ea5d369c237f9a3f81c92e331a429..a48ccf7c73d873eb236b61e25a9e1cbde93b60e7 100644 --- a/arch/arm/include/asm/irqflags.h +++ b/arch/arm/include/asm/irqflags.h @@ -162,13 +162,23 @@ static inline unsigned long arch_local_save_flags(void) @@ -5095,7 +5095,7 @@ index e6b70d9..a48ccf7 100644 : "r" (flags) : "memory", "cc"); diff --git a/arch/arm/kernel/fiqasm.S b/arch/arm/kernel/fiqasm.S -index 8dd26e1..eef4847 100644 +index 8dd26e1a9bd69051a1548d99c157cad2e65ba81b..eef484756af2179be8acd76b9ddbd3e983605990 100644 --- a/arch/arm/kernel/fiqasm.S +++ b/arch/arm/kernel/fiqasm.S @@ -47,3 +47,7 @@ ENTRY(__get_fiq_regs) @@ -5107,7 +5107,7 @@ index 8dd26e1..eef4847 100644 + mov pc, r8 +ENDPROC(__FIQ_Branch) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile -index d5c57f1..0e15a22 100644 +index d5c57f1e98fddfffb39c948159558ca4ea09b0f3..0e15a229384919db16372bd10e1fc98189933c96 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -7,6 +7,7 @@ @@ -5119,7 +5119,7 @@ index d5c57f1..0e15a22 100644 obj-$(CONFIG_USB_DWC2) += dwc2/ obj-$(CONFIG_USB_ISP1760) += isp1760/ diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c -index 358ca8d..abaac7c 100644 +index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c0e1683f7 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c @@ -152,6 +152,7 @@ int usb_choose_configuration(struct usb_device *udev) @@ -5131,7 +5131,7 @@ index 358ca8d..abaac7c 100644 return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 2a27488..ae4dca1 100644 +index 84df093639acb18c37e7b8b45bb878d0aca2bf5a..116a774ab9c6d4315cfa9368afa62c4709ce6251 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4973,7 +4973,7 @@ static void port_event(struct usb_hub *hub, int port1) @@ -5144,7 +5144,7 @@ index 2a27488..ae4dca1 100644 USB_PORT_FEAT_C_OVER_CURRENT); msleep(100); /* Cool down */ diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 8e641b5..de3ed7d 100644 +index 8e641b5893edb7a6195c34e43248540fbff39aa6..de3ed7d5d3dd3e9b2d20025e0c35a728248f4026 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1909,6 +1909,85 @@ free_interfaces: @@ -5234,7 +5234,7 @@ index 8e641b5..de3ed7d 100644 /* Now that the interfaces are installed, re-enable LPM. */ usb_unlocked_enable_lpm(dev); diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h -index a95b0c9..17b605f 100644 +index a95b0c989c216eca774abd0709451096fda19792..17b605f5e1a3219b2c878e2aeeb45cec8e56ff3a 100644 --- a/drivers/usb/core/otg_whitelist.h +++ b/drivers/usb/core/otg_whitelist.h @@ -19,33 +19,82 @@ @@ -5392,7 +5392,7 @@ index a95b0c9..17b605f 100644 diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c new file mode 100644 -index 0000000..a896d73 +index 0000000000000000000000000000000000000000..a896d73f7a9336f5a34015c44ea5a6b04ce34f10 --- /dev/null +++ b/drivers/usb/gadget/file_storage.c @@ -0,0 +1,3676 @@ @@ -9073,7 +9073,7 @@ index 0000000..a896d73 +} +module_exit(fsg_cleanup); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 3bb0887..0905a86 100644 +index 3bb08870148f467de4869c133fa6adfef4602116..0905a86821fae896a3782e952f5ee1a5ee2cf4be 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -735,6 +735,19 @@ config USB_HWA_HCD @@ -9097,7 +9097,7 @@ index 3bb0887..0905a86 100644 tristate "i.MX21 HCD support" depends on ARM && ARCH_MXC diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile -index e7558ab..0bb50e6 100644 +index e7558abc994d76be29a347ed6904bca36d3765de..0bb50e6db87ec709648c9a8fb212a22a258799b3 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -69,6 +69,8 @@ obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o @@ -9111,7 +9111,7 @@ index e7558ab..0bb50e6 100644 obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o diff --git a/drivers/usb/host/dwc_common_port/Makefile b/drivers/usb/host/dwc_common_port/Makefile new file mode 100644 -index 0000000..f10d466 +index 0000000000000000000000000000000000000000..f10d466d1aea8696fb394aebebb9945e6b79a991 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile @@ -0,0 +1,58 @@ @@ -9175,7 +9175,7 @@ index 0000000..f10d466 + rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/ diff --git a/drivers/usb/host/dwc_common_port/Makefile.fbsd b/drivers/usb/host/dwc_common_port/Makefile.fbsd new file mode 100644 -index 0000000..45db991 +index 0000000000000000000000000000000000000000..45db9915b9d31f39dd9aaf97772b3c31234c4ce6 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile.fbsd @@ -0,0 +1,17 @@ @@ -9198,7 +9198,7 @@ index 0000000..45db991 +.include diff --git a/drivers/usb/host/dwc_common_port/Makefile.linux b/drivers/usb/host/dwc_common_port/Makefile.linux new file mode 100644 -index 0000000..0cef7b4 +index 0000000000000000000000000000000000000000..0cef7b461bd5084f261b28ebd05d62418956956e --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile.linux @@ -0,0 +1,49 @@ @@ -9253,7 +9253,7 @@ index 0000000..0cef7b4 + rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/ diff --git a/drivers/usb/host/dwc_common_port/changes.txt b/drivers/usb/host/dwc_common_port/changes.txt new file mode 100644 -index 0000000..f6839f9 +index 0000000000000000000000000000000000000000..f6839f92c2760d8dc29e514a1f6833d356cfd217 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/changes.txt @@ -0,0 +1,174 @@ @@ -9433,7 +9433,7 @@ index 0000000..f6839f9 +library code directly into a driver module, instead of as a standalone module. diff --git a/drivers/usb/host/dwc_common_port/doc/doxygen.cfg b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg new file mode 100644 -index 0000000..89aa887 +index 0000000000000000000000000000000000000000..89aa887af29dfc3a71580acec4f10dc7cf00185d --- /dev/null +++ b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg @@ -0,0 +1,270 @@ @@ -9709,7 +9709,7 @@ index 0000000..89aa887 +SEARCHENGINE = NO diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.c b/drivers/usb/host/dwc_common_port/dwc_cc.c new file mode 100644 -index 0000000..5ec2ae2 +index 0000000000000000000000000000000000000000..5ec2ae28698c15d1c441d3104706b04e9f1dde27 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.c @@ -0,0 +1,532 @@ @@ -10247,7 +10247,7 @@ index 0000000..5ec2ae2 +#endif /* DWC_CCLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.h b/drivers/usb/host/dwc_common_port/dwc_cc.h new file mode 100644 -index 0000000..f86e6f2 +index 0000000000000000000000000000000000000000..f86e6f21792b9961bda7d569f4d35f7076947546 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.h @@ -0,0 +1,224 @@ @@ -10477,7 +10477,7 @@ index 0000000..f86e6f2 +#endif /* _DWC_CC_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c new file mode 100644 -index 0000000..6dd04b5 +index 0000000000000000000000000000000000000000..6dd04b58f8f6c6d5ddad3b0b0148ff5dd936ac28 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c @@ -0,0 +1,1308 @@ @@ -11791,7 +11791,7 @@ index 0000000..6dd04b5 +} diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c new file mode 100644 -index 0000000..4664684 +index 0000000000000000000000000000000000000000..46646841dda96fb2bed01152de552ccac5f0e5e4 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c @@ -0,0 +1,1433 @@ @@ -13230,7 +13230,7 @@ index 0000000..4664684 +#endif /* DWC_LIBMODULE */ diff --git a/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c new file mode 100644 -index 0000000..49b07e1 +index 0000000000000000000000000000000000000000..49b07e1722645105e0433dceaec91add3412523f --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c @@ -0,0 +1,1275 @@ @@ -14511,7 +14511,7 @@ index 0000000..49b07e1 +} diff --git a/drivers/usb/host/dwc_common_port/dwc_crypto.c b/drivers/usb/host/dwc_common_port/dwc_crypto.c new file mode 100644 -index 0000000..3b03532 +index 0000000000000000000000000000000000000000..3b0353296148f6297b5bdc2f45e9fe92a17c680d --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_crypto.c @@ -0,0 +1,308 @@ @@ -14825,7 +14825,7 @@ index 0000000..3b03532 +#endif /* DWC_CRYPTOLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_crypto.h b/drivers/usb/host/dwc_common_port/dwc_crypto.h new file mode 100644 -index 0000000..26fcddc +index 0000000000000000000000000000000000000000..26fcddcfe9ba4b83c921cd2ef8498021176a287f --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_crypto.h @@ -0,0 +1,111 @@ @@ -14942,7 +14942,7 @@ index 0000000..26fcddc +#endif /* _DWC_CRYPTO_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_dh.c b/drivers/usb/host/dwc_common_port/dwc_dh.c new file mode 100644 -index 0000000..2b429a3 +index 0000000000000000000000000000000000000000..2b429a32aaf0903c2b73e9aa30ef78ba280393ee --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_dh.c @@ -0,0 +1,291 @@ @@ -15239,7 +15239,7 @@ index 0000000..2b429a3 +#endif /* DWC_CRYPTOLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_dh.h b/drivers/usb/host/dwc_common_port/dwc_dh.h new file mode 100644 -index 0000000..25c1cc0 +index 0000000000000000000000000000000000000000..25c1cc0d588a44b7c3594c21031e32daca2d38cc --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_dh.h @@ -0,0 +1,106 @@ @@ -15351,7 +15351,7 @@ index 0000000..25c1cc0 +#endif /* _DWC_DH_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_list.h b/drivers/usb/host/dwc_common_port/dwc_list.h new file mode 100644 -index 0000000..4ce560d +index 0000000000000000000000000000000000000000..4ce560df0cae63c7adea9af95daf4e087870346d --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_list.h @@ -0,0 +1,594 @@ @@ -15951,7 +15951,7 @@ index 0000000..4ce560d +#endif /* _DWC_LIST_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_mem.c b/drivers/usb/host/dwc_common_port/dwc_mem.c new file mode 100644 -index 0000000..ad645ff +index 0000000000000000000000000000000000000000..ad645ff1ba7e06c852440396767e69279b3b31db --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_mem.c @@ -0,0 +1,245 @@ @@ -16202,7 +16202,7 @@ index 0000000..ad645ff +#endif /* DWC_DEBUG_MEMORY */ diff --git a/drivers/usb/host/dwc_common_port/dwc_modpow.c b/drivers/usb/host/dwc_common_port/dwc_modpow.c new file mode 100644 -index 0000000..2004538 +index 0000000000000000000000000000000000000000..20045381208a31d5dfb420318b0a4fbb1eca51a1 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_modpow.c @@ -0,0 +1,636 @@ @@ -16844,7 +16844,7 @@ index 0000000..2004538 +#endif /*DWC_CRYPTOLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_modpow.h b/drivers/usb/host/dwc_common_port/dwc_modpow.h new file mode 100644 -index 0000000..64f00c2 +index 0000000000000000000000000000000000000000..64f00c276e71bf2e1d58bc9e02ff64c13489dbd4 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_modpow.h @@ -0,0 +1,34 @@ @@ -16884,7 +16884,7 @@ index 0000000..64f00c2 +#endif /* _LINUX_BIGNUM_H */ diff --git a/drivers/usb/host/dwc_common_port/dwc_notifier.c b/drivers/usb/host/dwc_common_port/dwc_notifier.c new file mode 100644 -index 0000000..8b3772a +index 0000000000000000000000000000000000000000..8b3772afe11d1d81bdb7cabe335f0f3bc834fb7a --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_notifier.c @@ -0,0 +1,319 @@ @@ -17209,7 +17209,7 @@ index 0000000..8b3772a +#endif /* DWC_NOTIFYLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_notifier.h b/drivers/usb/host/dwc_common_port/dwc_notifier.h new file mode 100644 -index 0000000..4a8cdfe +index 0000000000000000000000000000000000000000..4a8cdfe565b1fcefb400706dc7bc13cf69a9d3b2 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_notifier.h @@ -0,0 +1,122 @@ @@ -17337,7 +17337,7 @@ index 0000000..4a8cdfe +#endif /* __DWC_NOTIFIER_H__ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_common_port/dwc_os.h new file mode 100644 -index 0000000..a2bbe23 +index 0000000000000000000000000000000000000000..a2bbe232ffc3b58001d026864c3019792cdf5efa --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_os.h @@ -0,0 +1,1276 @@ @@ -18619,7 +18619,7 @@ index 0000000..a2bbe23 +#endif /* _DWC_OS_H_ */ diff --git a/drivers/usb/host/dwc_common_port/usb.h b/drivers/usb/host/dwc_common_port/usb.h new file mode 100644 -index 0000000..27bda82 +index 0000000000000000000000000000000000000000..27bda82dac2eb27923120c43aac3610974610221 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/usb.h @@ -0,0 +1,946 @@ @@ -19571,7 +19571,7 @@ index 0000000..27bda82 +#endif /* _USB_H_ */ diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile new file mode 100644 -index 0000000..e7bdd12 +index 0000000000000000000000000000000000000000..e7bdd12015fee1727a7956ae3e3b2786e88892c1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/Makefile @@ -0,0 +1,82 @@ @@ -19659,7 +19659,7 @@ index 0000000..e7bdd12 +endif diff --git a/drivers/usb/host/dwc_otg/doc/doxygen.cfg b/drivers/usb/host/dwc_otg/doc/doxygen.cfg new file mode 100644 -index 0000000..712b057 +index 0000000000000000000000000000000000000000..712b057ef7c293e8ddfa95d89e2471fb96a38006 --- /dev/null +++ b/drivers/usb/host/dwc_otg/doc/doxygen.cfg @@ -0,0 +1,224 @@ @@ -19889,7 +19889,7 @@ index 0000000..712b057 +SEARCHENGINE = NO diff --git a/drivers/usb/host/dwc_otg/dummy_audio.c b/drivers/usb/host/dwc_otg/dummy_audio.c new file mode 100644 -index 0000000..225decf +index 0000000000000000000000000000000000000000..225decf765ce825b896ba98771ccb19c20d99404 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dummy_audio.c @@ -0,0 +1,1575 @@ @@ -21470,7 +21470,7 @@ index 0000000..225decf +module_exit (cleanup); diff --git a/drivers/usb/host/dwc_otg/dwc_cfi_common.h b/drivers/usb/host/dwc_otg/dwc_cfi_common.h new file mode 100644 -index 0000000..7770e20 +index 0000000000000000000000000000000000000000..7770e201ad3bd877f1bb613284091301d084ade9 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_cfi_common.h @@ -0,0 +1,142 @@ @@ -21618,7 +21618,7 @@ index 0000000..7770e20 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.c b/drivers/usb/host/dwc_otg/dwc_otg_adp.c new file mode 100644 -index 0000000..ce0618d +index 0000000000000000000000000000000000000000..ce0618dd3f4a6b2b2e7e65ba75f1214faca7c6f0 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.c @@ -0,0 +1,854 @@ @@ -22478,7 +22478,7 @@ index 0000000..ce0618d +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.h b/drivers/usb/host/dwc_otg/dwc_otg_adp.h new file mode 100644 -index 0000000..4110b25 +index 0000000000000000000000000000000000000000..4110b25d2002ed64a760cf41bbf81c903b5bc572 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.h @@ -0,0 +1,80 @@ @@ -22564,7 +22564,7 @@ index 0000000..4110b25 +#endif //__DWC_OTG_ADP_H__ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c new file mode 100644 -index 0000000..9da0c92 +index 0000000000000000000000000000000000000000..9da0c92aaeca2fc393016442cc6578cb4a52c978 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c @@ -0,0 +1,1210 @@ @@ -23780,7 +23780,7 @@ index 0000000..9da0c92 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.h b/drivers/usb/host/dwc_otg/dwc_otg_attr.h new file mode 100644 -index 0000000..e10b67f +index 0000000000000000000000000000000000000000..e10b67f97c522094b553b7675741ba1b3cae293d --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.h @@ -0,0 +1,89 @@ @@ -23875,7 +23875,7 @@ index 0000000..e10b67f +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.c b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c new file mode 100644 -index 0000000..bbb3d32 +index 0000000000000000000000000000000000000000..bbb3d32093d029e93f903bd76f45a3f715e55afd --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c @@ -0,0 +1,1876 @@ @@ -25757,7 +25757,7 @@ index 0000000..bbb3d32 +#endif //DWC_UTE_CFI diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.h b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h new file mode 100644 -index 0000000..55fd337 +index 0000000000000000000000000000000000000000..55fd337a283c39512eb1409dfc1183c56dfd7680 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h @@ -0,0 +1,320 @@ @@ -26083,7 +26083,7 @@ index 0000000..55fd337 +#endif /* (__DWC_OTG_CFI_H__) */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.c b/drivers/usb/host/dwc_otg/dwc_otg_cil.c new file mode 100644 -index 0000000..beaa8b3 +index 0000000000000000000000000000000000000000..beaa8b3effbf0124be28db3e5f8c707330bd5402 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.c @@ -0,0 +1,7141 @@ @@ -33230,7 +33230,7 @@ index 0000000..beaa8b3 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.h b/drivers/usb/host/dwc_otg/dwc_otg_cil.h new file mode 100644 -index 0000000..79dbf83 +index 0000000000000000000000000000000000000000..79dbf8374f023e262e3bfb755ff0f67604a456cb --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.h @@ -0,0 +1,1464 @@ @@ -34700,7 +34700,7 @@ index 0000000..79dbf83 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c new file mode 100644 -index 0000000..96c76e3 +index 0000000000000000000000000000000000000000..96c76e38cd372b8ca8c375ae8d8653f32a3faf80 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -0,0 +1,1594 @@ @@ -36300,7 +36300,7 @@ index 0000000..96c76e3 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_core_if.h b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h new file mode 100644 -index 0000000..4138fd1 +index 0000000000000000000000000000000000000000..4138fd173337dd566d402d5b924d4dc121e32428 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h @@ -0,0 +1,705 @@ @@ -37011,7 +37011,7 @@ index 0000000..4138fd1 +#endif /* __DWC_CORE_IF_H__ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h new file mode 100644 -index 0000000..ccc24e0 +index 0000000000000000000000000000000000000000..ccc24e010e449cbda488050d901e9a3995236e33 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h @@ -0,0 +1,117 @@ @@ -37134,7 +37134,7 @@ index 0000000..ccc24e0 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c new file mode 100644 -index 0000000..95edadf +index 0000000000000000000000000000000000000000..95edadf088cf2aa5826d411c04ea85f3651ebc48 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -0,0 +1,1757 @@ @@ -38897,7 +38897,7 @@ index 0000000..95edadf +*/ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.h b/drivers/usb/host/dwc_otg/dwc_otg_driver.h new file mode 100644 -index 0000000..6a8be63 +index 0000000000000000000000000000000000000000..6a8be63a0ab20f4e1c56251b85648aa2a1d66383 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.h @@ -0,0 +1,86 @@ @@ -38989,7 +38989,7 @@ index 0000000..6a8be63 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c new file mode 100644 -index 0000000..85d82f3 +index 0000000000000000000000000000000000000000..85d82f31cb49631f03b23631882d2b6c063b33db --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c @@ -0,0 +1,1355 @@ @@ -40350,7 +40350,7 @@ index 0000000..85d82f3 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h new file mode 100644 -index 0000000..f9fddfb +index 0000000000000000000000000000000000000000..f9fddfbcffb37f32c808fd78f222b676378398b1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h @@ -0,0 +1,370 @@ @@ -40726,7 +40726,7 @@ index 0000000..f9fddfb +#endif /* DWC_OTG_FIQ_FSM_H_ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S b/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S new file mode 100644 -index 0000000..ffa8d21 +index 0000000000000000000000000000000000000000..ffa8d21bc61e893fee86ba04955587e7661d3ff2 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S @@ -0,0 +1,80 @@ @@ -40812,7 +40812,7 @@ index 0000000..ffa8d21 +END(_dwc_otg_fiq_stub) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c new file mode 100644 -index 0000000..135b611 +index 0000000000000000000000000000000000000000..135b611abe08e141c937612ab7baada6b13113fc --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -0,0 +1,4257 @@ @@ -45075,7 +45075,7 @@ index 0000000..135b611 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h new file mode 100644 -index 0000000..43dbed9 +index 0000000000000000000000000000000000000000..43dbed9fddbf5491bab33cc6e551b99ca8dce7dc --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -0,0 +1,862 @@ @@ -45943,7 +45943,7 @@ index 0000000..43dbed9 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c new file mode 100644 -index 0000000..ee920c4 +index 0000000000000000000000000000000000000000..ee920c4d8f4a2980e4406cb878b81d809fec4e70 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c @@ -0,0 +1,1132 @@ @@ -47081,7 +47081,7 @@ index 0000000..ee920c4 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h new file mode 100644 -index 0000000..fb57db0 +index 0000000000000000000000000000000000000000..fb57db09378f4ab95d57cb58aa570a915ccb61c3 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h @@ -0,0 +1,417 @@ @@ -47504,7 +47504,7 @@ index 0000000..fb57db0 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c new file mode 100644 -index 0000000..8db3dfc +index 0000000000000000000000000000000000000000..8db3dfcba4ffb9cf267ed1fe6b809142792f7384 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -0,0 +1,2714 @@ @@ -50224,7 +50224,7 @@ index 0000000..8db3dfc +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c new file mode 100644 -index 0000000..2ceed42 +index 0000000000000000000000000000000000000000..2ceed4212980f04ad082e78851c6a7e83aee1443 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -0,0 +1,1005 @@ @@ -51235,7 +51235,7 @@ index 0000000..2ceed42 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c new file mode 100644 -index 0000000..acd0dd7 +index 0000000000000000000000000000000000000000..acd0dd7906cccd0658baacf4e2622c447a52a049 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -0,0 +1,957 @@ @@ -52198,7 +52198,7 @@ index 0000000..acd0dd7 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h new file mode 100644 -index 0000000..6b2c7d0 +index 0000000000000000000000000000000000000000..6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h @@ -0,0 +1,188 @@ @@ -52392,7 +52392,7 @@ index 0000000..6b2c7d0 +#endif /* _DWC_OS_DEP_H_ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c new file mode 100644 -index 0000000..ae0c72d +index 0000000000000000000000000000000000000000..ae0c72d02d007d5e7ce0f2dfb79b35d3d7ef86b8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c @@ -0,0 +1,2712 @@ @@ -55110,7 +55110,7 @@ index 0000000..ae0c72d +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.h b/drivers/usb/host/dwc_otg/dwc_otg_pcd.h new file mode 100644 -index 0000000..8ef7ba6 +index 0000000000000000000000000000000000000000..8ef7ba648ad92b9b7e141f22db2a0c2837ddcfa8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.h @@ -0,0 +1,266 @@ @@ -55382,7 +55382,7 @@ index 0000000..8ef7ba6 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h new file mode 100644 -index 0000000..c8d2e0e +index 0000000000000000000000000000000000000000..c8d2e0e0c99486558a4964a8c82de80c64b496b4 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h @@ -0,0 +1,360 @@ @@ -55748,7 +55748,7 @@ index 0000000..c8d2e0e +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c new file mode 100644 -index 0000000..c8590b5 +index 0000000000000000000000000000000000000000..c8590b527110753b8064d35fab4c34226d094f84 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -0,0 +1,5147 @@ @@ -60901,7 +60901,7 @@ index 0000000..c8590b5 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c new file mode 100644 -index 0000000..0eb0f35 +index 0000000000000000000000000000000000000000..0eb0f3572d1230fdd23966c47ba9370d22bb8cb5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c @@ -0,0 +1,1280 @@ @@ -62187,7 +62187,7 @@ index 0000000..0eb0f35 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_regs.h b/drivers/usb/host/dwc_otg/dwc_otg_regs.h new file mode 100644 -index 0000000..8e0e7b5 +index 0000000000000000000000000000000000000000..8e0e7b569f1ac00fdbf3cdd2e22102cf195c74b7 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_regs.h @@ -0,0 +1,2550 @@ @@ -64743,7 +64743,7 @@ index 0000000..8e0e7b5 +#endif diff --git a/drivers/usb/host/dwc_otg/test/Makefile b/drivers/usb/host/dwc_otg/test/Makefile new file mode 100644 -index 0000000..fc45375 +index 0000000000000000000000000000000000000000..fc453759dea3e88b8f79a1a151bbcaab7e242899 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/Makefile @@ -0,0 +1,16 @@ @@ -64765,7 +64765,7 @@ index 0000000..fc45375 + done diff --git a/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm new file mode 100644 -index 0000000..85e55fd +index 0000000000000000000000000000000000000000..85e55fd6ddbc78051d65a11125d4265aea6c24e3 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm @@ -0,0 +1,337 @@ @@ -65108,7 +65108,7 @@ index 0000000..85e55fd +1; diff --git a/drivers/usb/host/dwc_otg/test/test_mod_param.pl b/drivers/usb/host/dwc_otg/test/test_mod_param.pl new file mode 100644 -index 0000000..dc3820d +index 0000000000000000000000000000000000000000..dc3820df577bae2c51bc2b1cef57ac9c4fdfc6e5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_mod_param.pl @@ -0,0 +1,133 @@ @@ -65247,7 +65247,7 @@ index 0000000..dc3820d +0; diff --git a/drivers/usb/host/dwc_otg/test/test_sysfs.pl b/drivers/usb/host/dwc_otg/test/test_sysfs.pl new file mode 100644 -index 0000000..cdc9963 +index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c578d7130a --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_sysfs.pl @@ -0,0 +1,193 @@ @@ -65445,10 +65445,10 @@ index 0000000..cdc9963 +test_main(); +0; -From 09d89e5bb8c9adc39556accbf5bb118e1609fb80 Mon Sep 17 00:00:00 2001 +From 0fe7969383547f9439d89e1455b9a113f32e2812 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 030/251] bcm2708 framebuffer driver +Subject: [PATCH 030/398] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -65530,7 +65530,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/video/fbdev/bcm2708_fb.c diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig -index e6d16d6..0f33a78 100644 +index f07a0974fda287c2feae4296ef3fc4672fb64f43..8da620f0b20ce4f1badcba83efdc2d2e5274c135 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -224,6 +224,20 @@ config FB_TILEBLITTING @@ -65555,7 +65555,7 @@ index e6d16d6..0f33a78 100644 tristate "Aeroflex Gaisler framebuffer support" depends on FB && SPARC diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile -index 50ed1b4..9b086ac 100644 +index 50ed1b4fc2bf33b3d82b10d211616765839bc818..9b086ac5fd5bb1a44460b91a2cf421e67958b6fc 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_FB_MACMODES) += macmodes.o @@ -65568,7 +65568,7 @@ index 50ed1b4..9b086ac 100644 obj-$(CONFIG_FB_CLPS711X) += clps711x-fb.o diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c new file mode 100644 -index 0000000..a20539a +index 0000000000000000000000000000000000000000..a20539a96b21228b52f4b74d7259d732baa28cc6 --- /dev/null +++ b/drivers/video/fbdev/bcm2708_fb.c @@ -0,0 +1,847 @@ @@ -66420,7 +66420,7 @@ index 0000000..a20539a +MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); +MODULE_PARM_DESC(fbswap, "Swap order of red and blue in 24 and 32 bit modes"); diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm -index 3c14e43..7626beb 100644 +index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f66ae85d0 100644 --- a/drivers/video/logo/logo_linux_clut224.ppm +++ b/drivers/video/logo/logo_linux_clut224.ppm @@ -1,1604 +1,883 @@ @@ -68910,10 +68910,10 @@ 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 -From 185a83f51686987a770243702f0c54304c60cca2 Mon Sep 17 00:00:00 2001 +From caa680c40f80f47e8f881d9df0569113caab9b36 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 031/251] dmaengine: Add support for BCM2708 +Subject: [PATCH 031/398] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69070,7 +69070,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/platform_data/dma-bcm2708.h diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 060306e..33e36b9 100644 +index 060306e6b4cbba1b8849d1212ebe2ad63aa493f7..33e36b90cfeddc4e58e233c6e655a20102a7da45 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -470,6 +470,10 @@ config TIMB_DMA @@ -69085,7 +69085,7 @@ index 060306e..33e36b9 100644 tristate "AM33xx CPPI41 DMA support" depends on ARCH_OMAP diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile -index ef9c099..e0cf5e6 100644 +index ef9c099bd2b6c4e2d09c1a14dfb6563118745c17..e0cf5e617792608cb792e2f82674d993a55802f1 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_AT_HDMAC) += at_hdmac.o @@ -69098,7 +69098,7 @@ index ef9c099..e0cf5e6 100644 obj-$(CONFIG_DMA_JZ4780) += dma-jz4780.o diff --git a/drivers/dma/bcm2708-dmaengine.c b/drivers/dma/bcm2708-dmaengine.c new file mode 100644 -index 0000000..56f18dc +index 0000000000000000000000000000000000000000..56f18dc4aa5627625e9620daa9d6482e0098af7e --- /dev/null +++ b/drivers/dma/bcm2708-dmaengine.c @@ -0,0 +1,281 @@ @@ -69385,7 +69385,7 @@ index 0000000..56f18dc +MODULE_LICENSE("GPL"); diff --git a/include/linux/platform_data/dma-bcm2708.h b/include/linux/platform_data/dma-bcm2708.h new file mode 100644 -index 0000000..99cc7fd +index 0000000000000000000000000000000000000000..99cc7fdbf543207208bf3638a0d4dbb6ec4ea8c2 --- /dev/null +++ b/include/linux/platform_data/dma-bcm2708.h @@ -0,0 +1,143 @@ @@ -69533,10 +69533,10 @@ index 0000000..99cc7fd + +#endif /* _PLAT_BCM2708_DMA_H */ -From dd0f809dccd2522c01727b2822f484ce8e9ce23a Mon Sep 17 00:00:00 2001 +From 340567cb867f641420fa841e773bf1325be5021f Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 032/251] MMC: added alternative MMC driver +Subject: [PATCH 032/398] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69611,7 +69611,7 @@ bcm2835-mmc: Don't overwrite MMC capabilities from DT create mode 100644 drivers/mmc/host/bcm2835-mmc.c diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.c -index fad660b..87ae2e9 100644 +index fad660b95809224e3a06abde0709be3d50acf307..87ae2e9beb8dfb329520b63f6d8f5a05d7d5ac36 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.c @@ -53,6 +53,7 @@ static const struct mmc_fixup mmc_fixup_methods[] = { @@ -69634,7 +69634,7 @@ index fad660b..87ae2e9 100644 } EXPORT_SYMBOL(mmc_fixup_device); diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 1dee533..9b72d2c 100644 +index 1dee533634c986d71176917f4d510a4c7214bf5a..9b72d2c2c57ebb526cd86e492e12643c1e21b5a3 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -4,6 +4,35 @@ @@ -69674,7 +69674,7 @@ index 1dee533..9b72d2c 100644 tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index 3595f83..6cf6457 100644 +index 3595f83e89dd2caf9d56cdf6ceb875ef85ece719..6cf64571597f9428299b14b639b42432e4782ff4 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -69687,7 +69687,7 @@ index 3595f83..6cf6457 100644 obj-$(CONFIG_MMC_MTK) += mtk-sd.o diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c new file mode 100644 -index 0000000..43aed6e +index 0000000000000000000000000000000000000000..43aed6eadd573aec3ac3c8ee0f418a8dbd6376ed --- /dev/null +++ b/drivers/mmc/host/bcm2835-mmc.c @@ -0,0 +1,1542 @@ @@ -71234,10 +71234,10 @@ index 0000000..43aed6e +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From e15ccca87e0a679797cbcaf24bbf2304b1e8eba3 Mon Sep 17 00:00:00 2001 +From 79972f2d8478813857b662b10478a05f933315d1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 033/251] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 033/398] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -71318,7 +71318,7 @@ is on. create mode 100644 drivers/mmc/host/bcm2835-sdhost.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 9b72d2c..d509d10 100644 +index 9b72d2c2c57ebb526cd86e492e12643c1e21b5a3..d509d10cd919d4ba941ec0cb12a3a17bb0b9b818 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -33,6 +33,16 @@ config MMC_BCM2835_PIO_DMA_BARRIER @@ -71339,7 +71339,7 @@ index 9b72d2c..d509d10 100644 tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index 6cf6457..df27ae9 100644 +index 6cf64571597f9428299b14b639b42432e4782ff4..df27ae938c9a5c5f923fa2ddb7c0ff24d5244ddb 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -71352,7 +71352,7 @@ index 6cf6457..df27ae9 100644 obj-$(CONFIG_MMC_AU1X) += au1xmmc.o diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c new file mode 100644 -index 0000000..da08998 +index 0000000000000000000000000000000000000000..da089985f94beebae4a25878cd88a871e08527fa --- /dev/null +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -0,0 +1,1907 @@ @@ -73264,10 +73264,10 @@ index 0000000..da08998 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From a5a139f18bcc782f2cc3a1de66c936ce2dbb6ffb Mon Sep 17 00:00:00 2001 +From dba4ead3642c6d0813d702bab93968dd69b9a284 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 034/251] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 034/398] cma: Add vc_cma driver to enable use of CMA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -73299,7 +73299,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vc_cma.h diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index a043107..2ba2d82 100644 +index a043107da2af775d567126174107c23ff89a5afb..2ba2d82de41ebdc9ed1c3630fb733076dd9bfe03 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -4,6 +4,8 @@ @@ -73312,7 +73312,7 @@ index a043107..2ba2d82 100644 config DEVMEM diff --git a/drivers/char/Makefile b/drivers/char/Makefile -index d8a7579..9d8662e 100644 +index d8a7579300d2df1112446c3a69a29713fd2af163..9d8662e2ccc637cabb56e31c936ca23bcc15e120 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -60,3 +60,4 @@ js-rtc-y = rtc.o @@ -73322,7 +73322,7 @@ index d8a7579..9d8662e 100644 +obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/ diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig new file mode 100644 -index 0000000..2d8bd6e +index 0000000000000000000000000000000000000000..2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0 --- /dev/null +++ b/drivers/char/broadcom/Kconfig @@ -0,0 +1,15 @@ @@ -73343,14 +73343,14 @@ index 0000000..2d8bd6e + Helper for videocore CMA access. diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile new file mode 100644 -index 0000000..13c5bca +index 0000000000000000000000000000000000000000..13c5bca291ccc0df090c4e61169ace8f18ba60fe --- /dev/null +++ b/drivers/char/broadcom/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_BCM_VC_CMA) += vc_cma/ diff --git a/drivers/char/broadcom/vc_cma/Makefile b/drivers/char/broadcom/vc_cma/Makefile new file mode 100644 -index 0000000..6a94de4 +index 0000000000000000000000000000000000000000..6a94de4a7576f7c608f5bd01eb9f21a1a852120f --- /dev/null +++ b/drivers/char/broadcom/vc_cma/Makefile @@ -0,0 +1,14 @@ @@ -73370,7 +73370,7 @@ index 0000000..6a94de4 +vc-cma-objs := vc_cma.o diff --git a/drivers/char/broadcom/vc_cma/vc_cma.c b/drivers/char/broadcom/vc_cma/vc_cma.c new file mode 100644 -index 0000000..85f6e9d +index 0000000000000000000000000000000000000000..85f6e9da9e5baa0abfba618a171881c078f38496 --- /dev/null +++ b/drivers/char/broadcom/vc_cma/vc_cma.c @@ -0,0 +1,1193 @@ @@ -74569,7 +74569,7 @@ index 0000000..85f6e9d +MODULE_AUTHOR("Broadcom Corporation"); diff --git a/include/linux/broadcom/vc_cma.h b/include/linux/broadcom/vc_cma.h new file mode 100644 -index 0000000..be2819d +index 0000000000000000000000000000000000000000..be2819d5d41f9d5ed65daf8eedb94c9e9a4c2f1a --- /dev/null +++ b/include/linux/broadcom/vc_cma.h @@ -0,0 +1,36 @@ @@ -74610,10 +74610,10 @@ index 0000000..be2819d + +#endif /* VC_CMA_H */ -From 79708ff24769bfa53cc800dd05f951340829cc5d Mon Sep 17 00:00:00 2001 +From 612dc56e2c5d0cda830817390d463ce164f464f8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 035/251] bcm2708: alsa sound driver +Subject: [PATCH 035/398] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -74668,7 +74668,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 sound/arm/vc_vchi_audioserv_defs.h diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig -index e040621..7746e5d 100644 +index e0406211716b003daae37efbc8cdfd73213b31f3..7746e5d28d49f2ea9161546b35ae278a718101b5 100644 --- a/sound/arm/Kconfig +++ b/sound/arm/Kconfig @@ -40,5 +40,13 @@ config SND_PXA2XX_AC97 @@ -74686,7 +74686,7 @@ index e040621..7746e5d 100644 endif # SND_ARM diff --git a/sound/arm/Makefile b/sound/arm/Makefile -index 8c0c851..6796d7f 100644 +index 8c0c851d464109819beb296c2624bbec7af131e9..6796d7f5c7803ccfdaadbe56b2520c5454678686 100644 --- a/sound/arm/Makefile +++ b/sound/arm/Makefile @@ -14,3 +14,8 @@ snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97) += pxa2xx-ac97-lib.o @@ -74700,7 +74700,7 @@ index 8c0c851..6796d7f 100644 +ccflags-y += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c new file mode 100755 -index 0000000..aad905f +index 0000000000000000000000000000000000000000..aad905f1fe12d9f6c5f72e4ec0134be420f2580c --- /dev/null +++ b/sound/arm/bcm2835-ctl.c @@ -0,0 +1,323 @@ @@ -75029,7 +75029,7 @@ index 0000000..aad905f +} diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c new file mode 100755 -index 0000000..8c86375 +index 0000000000000000000000000000000000000000..8c863758ff030f84889be7a01333e63bf05b909a --- /dev/null +++ b/sound/arm/bcm2835-pcm.c @@ -0,0 +1,557 @@ @@ -75592,7 +75592,7 @@ index 0000000..8c86375 +} diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c new file mode 100755 -index 0000000..3de3094 +index 0000000000000000000000000000000000000000..3de30945d8155b90d244734881a7caa81930fa7c --- /dev/null +++ b/sound/arm/bcm2835-vchiq.c @@ -0,0 +1,902 @@ @@ -76500,7 +76500,7 @@ index 0000000..3de3094 +MODULE_PARM_DESC(force_bulk, "Force use of vchiq bulk for audio"); diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c new file mode 100644 -index 0000000..6b545e7 +index 0000000000000000000000000000000000000000..6b545e786c5618955b74feff2af52abdefff2e3e --- /dev/null +++ b/sound/arm/bcm2835.c @@ -0,0 +1,511 @@ @@ -77017,7 +77017,7 @@ index 0000000..6b545e7 +MODULE_ALIAS("platform:bcm2835_alsa"); diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h new file mode 100755 -index 0000000..0f71c5d +index 0000000000000000000000000000000000000000..0f71c5def314a63252fa4fe18ae2ba5a339f2cfb --- /dev/null +++ b/sound/arm/bcm2835.h @@ -0,0 +1,167 @@ @@ -77190,7 +77190,7 @@ index 0000000..0f71c5d +#endif /* __SOUND_ARM_BCM2835_H */ diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h new file mode 100644 -index 0000000..af3e6eb +index 0000000000000000000000000000000000000000..af3e6eb690113fc32ce9e06bd2f0f294da7a7f00 --- /dev/null +++ b/sound/arm/vc_vchi_audioserv_defs.h @@ -0,0 +1,116 @@ @@ -77311,10 +77311,10 @@ index 0000000..af3e6eb + +#endif // _VC_AUDIO_DEFS_H_ -From 522686ae5036c50971853fee0fdb371ed8309222 Mon Sep 17 00:00:00 2001 +From 18c12602f6f7554e6c9e7d22f5b470070a1449f3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 036/251] bcm2708 vchiq driver +Subject: [PATCH 036/398] bcm2708 vchiq driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77558,7 +77558,7 @@ vchiq: hack: Add include depecated dma include file create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h -index 4fb43cf..e98ec5a 100644 +index 4fb43cf391e50e702d0a0588ceff397c79c501d7..e98ec5acc70ba9eb2bc7ff560ed3c92e21518b73 100644 --- a/arch/arm/mach-bcm2708/include/mach/platform.h +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -78,6 +78,8 @@ @@ -77571,7 +77571,7 @@ index 4fb43cf..e98ec5a 100644 /* * Watchdog diff --git a/arch/arm/mach-bcm2709/include/mach/platform.h b/arch/arm/mach-bcm2709/include/mach/platform.h -index 311b9f2..9a638f5 100644 +index 311b9f26fab7dd770bdcd684c7691442b0872d55..9a638f528fcebc9206419a2cc68f3c9856dda3c3 100644 --- a/arch/arm/mach-bcm2709/include/mach/platform.h +++ b/arch/arm/mach-bcm2709/include/mach/platform.h @@ -78,6 +78,8 @@ @@ -77584,7 +77584,7 @@ index 311b9f2..9a638f5 100644 /* * Watchdog diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index 22892c7..b859ce0 100644 +index 4bf7d50b1bc7cc8ccb55171d9ca76ac3bd6fe114..339f75b98129bf10752bf9f4666f2883c4f09414 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -533,6 +533,7 @@ source "drivers/misc/lis3lv02d/Kconfig" @@ -77596,7 +77596,7 @@ index 22892c7..b859ce0 100644 source "drivers/misc/genwqe/Kconfig" source "drivers/misc/echo/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile -index 537d7f3..ac24d77 100644 +index 537d7f3b78da9a35afcf4fe41053bbcbef1dd1f2..ac24d7735306954abd9f9327e7a56ed334afc591 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -51,6 +51,7 @@ obj-$(CONFIG_INTEL_MEI) += mei/ @@ -77609,7 +77609,7 @@ index 537d7f3..ac24d77 100644 obj-$(CONFIG_ECHO) += echo/ diff --git a/drivers/misc/vc04_services/Kconfig b/drivers/misc/vc04_services/Kconfig new file mode 100644 -index 0000000..db8e1be +index 0000000000000000000000000000000000000000..db8e1beb89f9f8c48ea5964016c8285ea82497d8 --- /dev/null +++ b/drivers/misc/vc04_services/Kconfig @@ -0,0 +1,9 @@ @@ -77624,7 +77624,7 @@ index 0000000..db8e1be + are included in the build, N otherwise. diff --git a/drivers/misc/vc04_services/Makefile b/drivers/misc/vc04_services/Makefile new file mode 100644 -index 0000000..8d038fe +index 0000000000000000000000000000000000000000..8d038feb42105cb2cad688690086ba69379b12e1 --- /dev/null +++ b/drivers/misc/vc04_services/Makefile @@ -0,0 +1,14 @@ @@ -77644,7 +77644,7 @@ index 0000000..8d038fe + diff --git a/drivers/misc/vc04_services/interface/vchi/connections/connection.h b/drivers/misc/vc04_services/interface/vchi/connections/connection.h new file mode 100644 -index 0000000..fef6ac3 +index 0000000000000000000000000000000000000000..fef6ac34c6d2c04dfdba66f33850e72c24c613c2 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/connections/connection.h @@ -0,0 +1,328 @@ @@ -77978,7 +77978,7 @@ index 0000000..fef6ac3 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h b/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h new file mode 100644 -index 0000000..8b3f767 +index 0000000000000000000000000000000000000000..8b3f76735bd45ab09a12dc6e17e335241fd11755 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h @@ -0,0 +1,204 @@ @@ -78188,7 +78188,7 @@ index 0000000..8b3f767 +/****************************** End of file ***********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi.h b/drivers/misc/vc04_services/interface/vchi/vchi.h new file mode 100644 -index 0000000..1b17e98 +index 0000000000000000000000000000000000000000..1b17e98f737979eef19906609bc19ecd19455618 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi.h @@ -0,0 +1,378 @@ @@ -78572,7 +78572,7 @@ index 0000000..1b17e98 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h new file mode 100644 -index 0000000..26bc2d3 +index 0000000000000000000000000000000000000000..26bc2d38d725e3c4c24a4cb894da11e65d01625a --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h @@ -0,0 +1,224 @@ @@ -78802,7 +78802,7 @@ index 0000000..26bc2d3 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h new file mode 100644 -index 0000000..35dcba4 +index 0000000000000000000000000000000000000000..35dcba4837d492307f3b273acaefa752cdbd6478 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h @@ -0,0 +1,71 @@ @@ -78879,7 +78879,7 @@ index 0000000..35dcba4 +#endif /*VCHI_CFG_INTERNAL_H_*/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_common.h b/drivers/misc/vc04_services/interface/vchi/vchi_common.h new file mode 100644 -index 0000000..d535a72 +index 0000000000000000000000000000000000000000..d535a72970d3f1ee63d2038550db8f4e43589c72 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_common.h @@ -0,0 +1,175 @@ @@ -79060,7 +79060,7 @@ index 0000000..d535a72 +#endif // VCHI_COMMON_H_ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_mh.h b/drivers/misc/vc04_services/interface/vchi/vchi_mh.h new file mode 100644 -index 0000000..198bd07 +index 0000000000000000000000000000000000000000..198bd076b6668d729e0b6619a1f38eb927a2398b --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_mh.h @@ -0,0 +1,42 @@ @@ -79108,7 +79108,7 @@ index 0000000..198bd07 +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h new file mode 100644 -index 0000000..ad398ba +index 0000000000000000000000000000000000000000..ad398bae6ee4c3d64fc1a37808398397a9a0fefe --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h @@ -0,0 +1,40 @@ @@ -79154,7 +79154,7 @@ index 0000000..ad398ba +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h new file mode 100644 -index 0000000..7ea5c64 +index 0000000000000000000000000000000000000000..7ea5c64d5343d43786903161518ef1ce0287e27d --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h @@ -0,0 +1,42 @@ @@ -79202,7 +79202,7 @@ index 0000000..7ea5c64 +#endif /* VCHIQ_2835_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c new file mode 100644 -index 0000000..c29040f +index 0000000000000000000000000000000000000000..c29040fdf9a7757b7c0d428616e244a6e4d5f697 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -0,0 +1,586 @@ @@ -79794,7 +79794,7 @@ index 0000000..c29040f +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c new file mode 100644 -index 0000000..e11c0e0 +index 0000000000000000000000000000000000000000..e11c0e07471bc7ebba04e48d3efc746236ec2f4e --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -0,0 +1,2903 @@ @@ -82703,7 +82703,7 @@ index 0000000..e11c0e0 +MODULE_AUTHOR("Broadcom Corporation"); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h new file mode 100644 -index 0000000..9740e1a +index 0000000000000000000000000000000000000000..9740e1afbc9dc6223f2fea5106916062a3e783ce --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -0,0 +1,220 @@ @@ -82929,7 +82929,7 @@ index 0000000..9740e1a +#endif /* VCHIQ_ARM_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h new file mode 100644 -index 0000000..df64581 +index 0000000000000000000000000000000000000000..df645813bdaeb2cd6296154af434ebc1b0c5939a --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h @@ -0,0 +1,37 @@ @@ -82972,7 +82972,7 @@ index 0000000..df64581 +const char *vchiq_get_build_date(void); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h new file mode 100644 -index 0000000..d2797db +index 0000000000000000000000000000000000000000..d2797db702f9fd2e35beb3dd2d5ac9323ccedfc6 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h @@ -0,0 +1,69 @@ @@ -83047,7 +83047,7 @@ index 0000000..d2797db +#endif /* VCHIQ_CFG_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c new file mode 100644 -index 0000000..5efc62f +index 0000000000000000000000000000000000000000..5efc62ffb2f5e441cb307d0a575565338b407249 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -0,0 +1,120 @@ @@ -83173,7 +83173,7 @@ index 0000000..5efc62f +EXPORT_SYMBOL(vchiq_add_connected_callback); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h new file mode 100644 -index 0000000..863b3e3 +index 0000000000000000000000000000000000000000..863b3e335c1aa4bbe7f8652e0e6c3713ea1aed45 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h @@ -0,0 +1,50 @@ @@ -83229,7 +83229,7 @@ index 0000000..863b3e3 +#endif /* VCHIQ_CONNECTED_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c new file mode 100644 -index 0000000..2c98da4 +index 0000000000000000000000000000000000000000..2c98da4307dff994a00dc246574ef0aaee05d5da --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -0,0 +1,3934 @@ @@ -87169,7 +87169,7 @@ index 0000000..2c98da4 +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h new file mode 100644 -index 0000000..9be484c +index 0000000000000000000000000000000000000000..9be484c776d044a51bb3904c6a1e2cd11a852e35 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -0,0 +1,712 @@ @@ -87887,7 +87887,7 @@ index 0000000..9be484c +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c new file mode 100644 -index 0000000..7e03213 +index 0000000000000000000000000000000000000000..7e032130d967a69384926ddbe614e9af4be8f22e --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c @@ -0,0 +1,383 @@ @@ -88276,7 +88276,7 @@ index 0000000..7e03213 +#endif /* CONFIG_DEBUG_FS */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h new file mode 100644 -index 0000000..4d6a378 +index 0000000000000000000000000000000000000000..4d6a3788e9c508c9eb1379980c4f3a67791e428e --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h @@ -0,0 +1,52 @@ @@ -88334,7 +88334,7 @@ index 0000000..4d6a378 +#endif /* VCHIQ_DEBUGFS_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion new file mode 100644 -index 0000000..9f5b634 +index 0000000000000000000000000000000000000000..9f5b6344b9b77f72ebd4ff6621c90fd0ac47efb1 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion @@ -0,0 +1,87 @@ @@ -88427,7 +88427,7 @@ index 0000000..9f5b634 +EOF diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h new file mode 100644 -index 0000000..8067bbe +index 0000000000000000000000000000000000000000..8067bbe7ce8d70c41b2e6e0466d20a4612e39d93 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h @@ -0,0 +1,189 @@ @@ -88622,7 +88622,7 @@ index 0000000..8067bbe +#endif /* VCHIQ_IF_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h new file mode 100644 -index 0000000..6137ae9 +index 0000000000000000000000000000000000000000..6137ae9de1c19cb0ffc486dc60505061a10aea6c --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h @@ -0,0 +1,131 @@ @@ -88759,7 +88759,7 @@ index 0000000..6137ae9 +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c new file mode 100644 -index 0000000..25e7011 +index 0000000000000000000000000000000000000000..25e7011edc5094372919d7e3be482f3bbd7b6155 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c @@ -0,0 +1,458 @@ @@ -89223,7 +89223,7 @@ index 0000000..25e7011 +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h new file mode 100644 -index 0000000..335446e +index 0000000000000000000000000000000000000000..335446e05476c3dbb905a69e45b37a2702566bf6 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h @@ -0,0 +1,69 @@ @@ -89298,7 +89298,7 @@ index 0000000..335446e +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h new file mode 100644 -index 0000000..d02e776 +index 0000000000000000000000000000000000000000..d02e7764bd0d8721453d2e0a4900c26c12634c8b --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h @@ -0,0 +1,71 @@ @@ -89375,7 +89375,7 @@ index 0000000..d02e776 +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h new file mode 100644 -index 0000000..54a3ece +index 0000000000000000000000000000000000000000..54a3ecec69ef6702c382a7af339d21b87ec8a346 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h @@ -0,0 +1,58 @@ @@ -89439,7 +89439,7 @@ index 0000000..54a3ece +#endif /* VCHIQ_PAGELIST_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c new file mode 100644 -index 0000000..8072ff6 +index 0000000000000000000000000000000000000000..8072ff613636121d50293693d0bd2aaf0b6e07b5 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -0,0 +1,860 @@ @@ -90305,7 +90305,7 @@ index 0000000..8072ff6 +EXPORT_SYMBOL(vchi_service_release); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c new file mode 100644 -index 0000000..384acb8 +index 0000000000000000000000000000000000000000..384acb8d2eae12eca8aa955c274467f120e8824f --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c @@ -0,0 +1,156 @@ @@ -90467,7 +90467,7 @@ index 0000000..384acb8 +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h new file mode 100644 -index 0000000..4055d4b +index 0000000000000000000000000000000000000000..4055d4bf9f740ab9f10a7e44673b9795681981f7 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h @@ -0,0 +1,82 @@ @@ -90555,7 +90555,7 @@ index 0000000..4055d4b +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c new file mode 100644 -index 0000000..b6bfa21 +index 0000000000000000000000000000000000000000..b6bfa21155e431e93bfb2c149d32437184c2b6e3 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c @@ -0,0 +1,59 @@ @@ -90619,10 +90619,10 @@ index 0000000..b6bfa21 + return vchiq_build_time; +} -From a4ad9bf42376a39e5314f41ecd1ea8fbafb4ca46 Mon Sep 17 00:00:00 2001 +From bbf75cf8590d40fcaefe5ba87750f58af07e0cb2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 16:07:06 +0100 -Subject: [PATCH 037/251] vc_mem: Add vc_mem driver +Subject: [PATCH 037/398] vc_mem: Add vc_mem driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -90649,7 +90649,7 @@ Signed-off-by: Noralf Trønnes diff --git a/arch/arm/mach-bcm2709/include/mach/vc_mem.h b/arch/arm/mach-bcm2709/include/mach/vc_mem.h deleted file mode 100644 -index 4a4a338..0000000 +index 4a4a33845cbc02f0e0d5368fed3609f6ba9ff92b..0000000000000000000000000000000000000000 --- a/arch/arm/mach-bcm2709/include/mach/vc_mem.h +++ /dev/null @@ -1,35 +0,0 @@ @@ -90690,7 +90690,7 @@ index 4a4a338..0000000 -#endif /* VC_MEM_H */ diff --git a/arch/arm/mach-bcm2709/vc_mem.c b/arch/arm/mach-bcm2709/vc_mem.c deleted file mode 100644 -index d2adfd1..0000000 +index d2adfd1db2421984ea8ab8fb809d1adb0765714e..0000000000000000000000000000000000000000 --- a/arch/arm/mach-bcm2709/vc_mem.c +++ /dev/null @@ -1,431 +0,0 @@ @@ -91126,7 +91126,7 @@ index d2adfd1..0000000 -module_param(mem_size, uint, 0644); -module_param(mem_base, uint, 0644); diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 2d8bd6e..7037928 100644 +index 2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0..70379287f6261fd833202ac47de1bcca8b84959a 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -7,9 +7,19 @@ menuconfig BRCM_CHAR_DRIVERS @@ -91151,7 +91151,7 @@ index 2d8bd6e..7037928 100644 + +endif diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index 13c5bca..fce918c 100644 +index 13c5bca291ccc0df090c4e61169ace8f18ba60fe..fce918c369f7a9430136fea3ab098350339f1b01 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1 +1,2 @@ @@ -91159,7 +91159,7 @@ index 13c5bca..fce918c 100644 +obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o diff --git a/drivers/char/broadcom/vc_mem.c b/drivers/char/broadcom/vc_mem.c new file mode 100644 -index 0000000..be64f23 +index 0000000000000000000000000000000000000000..be64f238ee0cc1e57f9401b0ee16c23e9fa238cc --- /dev/null +++ b/drivers/char/broadcom/vc_mem.c @@ -0,0 +1,422 @@ @@ -91587,7 +91587,7 @@ index 0000000..be64f23 +module_param(mem_base, uint, 0644); diff --git a/include/linux/broadcom/vc_mem.h b/include/linux/broadcom/vc_mem.h new file mode 100644 -index 0000000..20a4753 +index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35a58411b4 --- /dev/null +++ b/include/linux/broadcom/vc_mem.h @@ -0,0 +1,35 @@ @@ -91627,10 +91627,10 @@ index 0000000..20a4753 + +#endif /* _VC_MEM_H */ -From c18ab896c13c1824cdc4c8c544f2576e778d4595 Mon Sep 17 00:00:00 2001 +From 4521923bc57b81154f2186ec5249d601415cd0cf Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 038/251] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/398] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -91690,7 +91690,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vmcs_sm_ioctl.h diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 7037928..75fa1cb 100644 +index 70379287f6261fd833202ac47de1bcca8b84959a..75fa1cba764084160f7cb77e56058f25b5e9f0ce 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -23,3 +23,12 @@ config BCM2708_VCMEM @@ -91707,7 +91707,7 @@ index 7037928..75fa1cb 100644 + Support for the VC shared memory on the Broadcom reference + design. Uses the VCHIQ stack. diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index fce918c..de8feb9 100644 +index fce918c369f7a9430136fea3ab098350339f1b01..de8feb98c63ff1e6437d80a6db85a8d30f433705 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1,2 +1,3 @@ @@ -91716,7 +91716,7 @@ index fce918c..de8feb9 100644 +obj-$(CONFIG_BCM_VC_SM) += vc_sm/ diff --git a/drivers/char/broadcom/vc_sm/Makefile b/drivers/char/broadcom/vc_sm/Makefile new file mode 100644 -index 0000000..68fa2aa +index 0000000000000000000000000000000000000000..68fa2aa7f725d3587c47c22489efc3418e48dce8 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/Makefile @@ -0,0 +1,20 @@ @@ -91742,7 +91742,7 @@ index 0000000..68fa2aa + vc_vchi_sm.o diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h new file mode 100644 -index 0000000..c4d5ff7 +index 0000000000000000000000000000000000000000..c4d5ff718a5ba9071ef87fa4c6cf632486c4d36f --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h @@ -0,0 +1,181 @@ @@ -91929,7 +91929,7 @@ index 0000000..c4d5ff7 +#endif /* __VC_SM_DEFS_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h new file mode 100644 -index 0000000..965f9a2 +index 0000000000000000000000000000000000000000..965f9a209a025202fea8065d3947c36f4fa43d0a --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h @@ -0,0 +1,55 @@ @@ -91990,7 +91990,7 @@ index 0000000..965f9a2 +#endif /* __VC_SM_KNL_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c new file mode 100644 -index 0000000..7c6ba1a +index 0000000000000000000000000000000000000000..7c6ba1a244a8aff8132e0177e02b2b2a6cd364e0 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c @@ -0,0 +1,492 @@ @@ -92488,7 +92488,7 @@ index 0000000..7c6ba1a +} diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h new file mode 100644 -index 0000000..5e279f5 +index 0000000000000000000000000000000000000000..5e279f5a95fac7227cea15941bf0570ddc2b0886 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h @@ -0,0 +1,82 @@ @@ -92576,7 +92576,7 @@ index 0000000..5e279f5 +#endif /* __VC_VCHI_SM_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c new file mode 100644 -index 0000000..5d16e35 +index 0000000000000000000000000000000000000000..5d16e356bbdd275856d43f75d00ef6c086dbb09e --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c @@ -0,0 +1,3211 @@ @@ -95793,7 +95793,7 @@ index 0000000..5d16e35 +MODULE_LICENSE("GPL v2"); diff --git a/include/linux/broadcom/vmcs_sm_ioctl.h b/include/linux/broadcom/vmcs_sm_ioctl.h new file mode 100644 -index 0000000..334f36d +index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f38cf76564 --- /dev/null +++ b/include/linux/broadcom/vmcs_sm_ioctl.h @@ -0,0 +1,248 @@ @@ -96046,10 +96046,10 @@ index 0000000..334f36d + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From d778ec78cbc50597690495a4767dad44d9329547 Mon Sep 17 00:00:00 2001 +From 930053c4bb99207bb32254a38cd796c0a2aca0dd Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 039/251] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/398] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -96066,7 +96066,7 @@ See: https://github.com/raspberrypi/linux/issues/1154 create mode 100644 drivers/char/broadcom/bcm2835-gpiomem.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 75fa1cb..b75c9b2 100644 +index 75fa1cba764084160f7cb77e56058f25b5e9f0ce..b75c9b2639fb0e63dd2623ddc1dcaac5759c132b 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -32,3 +32,12 @@ config BCM_VC_SM @@ -96083,7 +96083,7 @@ index 75fa1cb..b75c9b2 100644 + register page to the user's pointer. + diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index de8feb9..1eb06e9 100644 +index de8feb98c63ff1e6437d80a6db85a8d30f433705..1eb06e9788663c3e75d201a559db55556cecfe2b 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1,3 +1,6 @@ @@ -96095,7 +96095,7 @@ index de8feb9..1eb06e9 100644 + diff --git a/drivers/char/broadcom/bcm2835-gpiomem.c b/drivers/char/broadcom/bcm2835-gpiomem.c new file mode 100644 -index 0000000..911f5b7 +index 0000000000000000000000000000000000000000..911f5b7393ed48ceed8751f06967ae6463453f9c --- /dev/null +++ b/drivers/char/broadcom/bcm2835-gpiomem.c @@ -0,0 +1,260 @@ @@ -96360,10 +96360,10 @@ index 0000000..911f5b7 +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 684fa35717d47554b4e019f45e513b58823b50dc Mon Sep 17 00:00:00 2001 +From 24a48c21ffc517ff14af16b6b8ee34c7fb78393c Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 040/251] Add SMI driver +Subject: [PATCH 040/398] Add SMI driver Signed-off-by: Luke Wren --- @@ -96385,7 +96385,7 @@ Signed-off-by: Luke Wren diff --git a/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt new file mode 100644 -index 0000000..68cc8eb +index 0000000000000000000000000000000000000000..68cc8ebc3392d45cbccac0dc0354514076d43398 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt @@ -0,0 +1,17 @@ @@ -96408,7 +96408,7 @@ index 0000000..68cc8eb + diff --git a/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt new file mode 100644 -index 0000000..b76dc69 +index 0000000000000000000000000000000000000000..b76dc694f1ac0b8044000ae54d312c803b1ef6f7 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt @@ -0,0 +1,48 @@ @@ -96461,7 +96461,7 @@ index 0000000..b76dc69 +}; + diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index b75c9b2..2292ed2 100644 +index b75c9b2639fb0e63dd2623ddc1dcaac5759c132b..2292ed2ac9f457a7d491110e673666136faa5a5e 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -41,3 +41,11 @@ config BCM2835_DEVGPIOMEM @@ -96477,7 +96477,7 @@ index b75c9b2..2292ed2 100644 + Broadcom's Secondary Memory interface. The low-level functionality is provided + by the SMI driver itself. diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index 1eb06e9..667d33e 100644 +index 1eb06e9788663c3e75d201a559db55556cecfe2b..667d33ef38f3512b52818537c11d369798b6f1c0 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -3,4 +3,4 @@ obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o @@ -96488,7 +96488,7 @@ index 1eb06e9..667d33e 100644 +obj-$(CONFIG_BCM2835_SMI_DEV) += bcm2835_smi_dev.o diff --git a/drivers/char/broadcom/bcm2835_smi_dev.c b/drivers/char/broadcom/bcm2835_smi_dev.c new file mode 100644 -index 0000000..d6efd92 +index 0000000000000000000000000000000000000000..d6efd92fdfe46df5cfe219d2123e0dff23dc5ab7 --- /dev/null +++ b/drivers/char/broadcom/bcm2835_smi_dev.c @@ -0,0 +1,402 @@ @@ -96895,7 +96895,7 @@ index 0000000..d6efd92 + "Character device driver for BCM2835's secondary memory interface"); +MODULE_AUTHOR("Luke Wren "); diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index b859ce0..b978ba9 100644 +index 339f75b98129bf10752bf9f4666f2883c4f09414..e7c274d8a9354a0e17edd141efd7a0a629a2627e 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -10,6 +10,14 @@ config SENSORS_LIS3LV02D @@ -96914,7 +96914,7 @@ index b859ce0..b978ba9 100644 tristate "Analog Devices Digital Potentiometers" depends on (I2C || SPI) && SYSFS diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile -index ac24d77..1acff5b 100644 +index ac24d7735306954abd9f9327e7a56ed334afc591..1acff5beaeda4f7da492e34376503bafcb1bcc13 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_AD525X_DPOT_SPI) += ad525x_dpot-spi.o @@ -96927,7 +96927,7 @@ index ac24d77..1acff5b 100644 obj-$(CONFIG_BMP085_SPI) += bmp085-spi.o diff --git a/drivers/misc/bcm2835_smi.c b/drivers/misc/bcm2835_smi.c new file mode 100644 -index 0000000..63a4ea0 +index 0000000000000000000000000000000000000000..63a4ea08b9930a3a31a985f0a1d969b488ed49ec --- /dev/null +++ b/drivers/misc/bcm2835_smi.c @@ -0,0 +1,985 @@ @@ -97918,7 +97918,7 @@ index 0000000..63a4ea0 +MODULE_AUTHOR("Luke Wren "); diff --git a/include/linux/broadcom/bcm2835_smi.h b/include/linux/broadcom/bcm2835_smi.h new file mode 100644 -index 0000000..ee3a75e +index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10fd8543a3 --- /dev/null +++ b/include/linux/broadcom/bcm2835_smi.h @@ -0,0 +1,391 @@ @@ -98314,10 +98314,10 @@ index 0000000..ee3a75e + +#endif /* BCM2835_SMI_H */ -From d6893b8f68df96a0dd728a1ea8518af748d3de55 Mon Sep 17 00:00:00 2001 +From 8d8b653aadb22cfb362afe0f8db547e859d11f54 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 041/251] Add SMI NAND driver +Subject: [PATCH 041/398] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -98331,7 +98331,7 @@ Signed-off-by: Luke Wren diff --git a/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt b/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt new file mode 100644 -index 0000000..159544d +index 0000000000000000000000000000000000000000..159544d6579070d376d146bd24a86653e7245707 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt @@ -0,0 +1,42 @@ @@ -98379,7 +98379,7 @@ index 0000000..159544d +}; \ No newline at end of file diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig -index 2896640..56ff00b 100644 +index 289664089cf32ce9770baefba951e089f0681a11..56ff00b69b848ccb8008db08560b36b04170182b 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -41,6 +41,13 @@ config MTD_SM_COMMON @@ -98397,7 +98397,7 @@ index 2896640..56ff00b 100644 tristate diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile -index 2c7f014..30e22f0 100644 +index 2c7f014b349e56c50b6fd2cf109bd5ed0f9f7eb7..30e22f0cff78bb8a3df7ef52b148af314e75d9a2 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_MTD_NAND_DENALI) += denali.o @@ -98410,7 +98410,7 @@ index 2c7f014..30e22f0 100644 obj-$(CONFIG_MTD_NAND_DAVINCI) += davinci_nand.o diff --git a/drivers/mtd/nand/bcm2835_smi_nand.c b/drivers/mtd/nand/bcm2835_smi_nand.c new file mode 100644 -index 0000000..b747326 +index 0000000000000000000000000000000000000000..b7473263afceadd8d5debefd11a8de1d4fa067fb --- /dev/null +++ b/drivers/mtd/nand/bcm2835_smi_nand.c @@ -0,0 +1,268 @@ @@ -98683,10 +98683,10 @@ index 0000000..b747326 + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 90d547aa8fc1259726f56f404af4ecf9dff6ba0e Mon Sep 17 00:00:00 2001 +From 6f81a327ee297185753af41cb99fa6d13a61fb77 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 042/251] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 042/398] lirc: added support for RaspberryPi GPIO lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: https://github.com/raspberrypi/linux/issues/525 @@ -98741,7 +98741,7 @@ lirc-rpi: Also support pinctrl-bcm2835 in non-DT mode create mode 100644 include/linux/platform_data/bcm2708.h diff --git a/drivers/staging/media/lirc/Kconfig b/drivers/staging/media/lirc/Kconfig -index 6879c46..77c69f2 100644 +index 6879c4651b46c8b48460626cb346b8ee23fa6587..77c69f2d4158be625a5956095b988cd3774dbfae 100644 --- a/drivers/staging/media/lirc/Kconfig +++ b/drivers/staging/media/lirc/Kconfig @@ -32,6 +32,12 @@ config LIRC_PARALLEL @@ -98758,7 +98758,7 @@ index 6879c46..77c69f2 100644 tristate "Sasem USB IR Remote" depends on LIRC && USB diff --git a/drivers/staging/media/lirc/Makefile b/drivers/staging/media/lirc/Makefile -index 5430adf..9e53cd0 100644 +index 5430adf0475ded5abe2ef4b4cf4e7f2c08297894..9e53cd0caf58ba28a939b780c876d4017a23ac2b 100644 --- a/drivers/staging/media/lirc/Makefile +++ b/drivers/staging/media/lirc/Makefile @@ -6,6 +6,7 @@ @@ -98771,7 +98771,7 @@ index 5430adf..9e53cd0 100644 obj-$(CONFIG_LIRC_SIR) += lirc_sir.o diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c new file mode 100644 -index 0000000..cd09c99 +index 0000000000000000000000000000000000000000..cd09c9996b12c62f9f831261379b84f8389129ff --- /dev/null +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -0,0 +1,730 @@ @@ -99507,7 +99507,7 @@ index 0000000..cd09c99 +MODULE_PARM_DESC(debug, "Enable debugging messages"); diff --git a/include/linux/platform_data/bcm2708.h b/include/linux/platform_data/bcm2708.h new file mode 100644 -index 0000000..fb69624 +index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b172de57ec --- /dev/null +++ b/include/linux/platform_data/bcm2708.h @@ -0,0 +1,23 @@ @@ -99535,10 +99535,10 @@ index 0000000..fb69624 + +#endif -From c220c109c1a18cf786523a205b85a4ebca638624 Mon Sep 17 00:00:00 2001 +From 2ae836c205e6946ae0e246d5c58a7d5e93eae21e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 043/251] Add cpufreq driver +Subject: [PATCH 043/398] Add cpufreq driver Signed-off-by: popcornmix --- @@ -99549,7 +99549,7 @@ Signed-off-by: popcornmix create mode 100644 drivers/cpufreq/bcm2835-cpufreq.c diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm -index b1f8a73..930b3ef 100644 +index b1f8a73e5a943e8fc692dfcba7f28d1e08dba4f2..930b3ef3ff3832a03f4120c2037d364e8e1596ce 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -217,6 +217,15 @@ config ARM_SPEAR_CPUFREQ @@ -99569,7 +99569,7 @@ index b1f8a73..930b3ef 100644 bool "Tegra20 CPUFreq support" depends on ARCH_TEGRA diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile -index c0af1a1..f6a753a 100644 +index c0af1a1281c89134269445f9330d4d449c37135e..f6a753aa00798ec17545a628d4a2d49027076980 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -73,6 +73,7 @@ obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o @@ -99582,7 +99582,7 @@ index c0af1a1..f6a753a 100644 obj-$(CONFIG_ARM_VEXPRESS_SPC_CPUFREQ) += vexpress-spc-cpufreq.o diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c new file mode 100644 -index 0000000..3eb9e93 +index 0000000000000000000000000000000000000000..3eb9e9326231b08e6ee95ad486485245c71cf868 --- /dev/null +++ b/drivers/cpufreq/bcm2835-cpufreq.c @@ -0,0 +1,213 @@ @@ -99800,10 +99800,10 @@ index 0000000..3eb9e93 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 1184f7bb9072fe8b453e3c9a71938a16943a708f Mon Sep 17 00:00:00 2001 +From 9205067ba334d6aae73793cbbb700b2542fba29b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 044/251] Added hwmon/thermal driver for reporting core +Subject: [PATCH 044/398] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -99824,7 +99824,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/thermal/bcm2835-thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig -index 8cc4ac6..b273311 100644 +index 8cc4ac64a91c36347b9307addb88ae99d545d2b7..b273311e0bb91ef5c59812d15f03496e1039457e 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -285,6 +285,13 @@ config INTEL_POWERCLAMP @@ -99842,7 +99842,7 @@ index 8cc4ac6..b273311 100644 tristate "X86 package temperature thermal driver" depends on X86_THERMAL_VECTOR diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile -index cfae6a6..b0e336f 100644 +index cfae6a654793bbc0ad28bf96ea5784aa8330f6d7..b0e336f4ee9883f8f6cd74a415f44563d16d11cc 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -38,6 +38,7 @@ obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o @@ -99855,7 +99855,7 @@ index cfae6a6..b0e336f 100644 obj-$(CONFIG_INTEL_SOC_DTS_THERMAL) += intel_soc_dts_thermal.o diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c new file mode 100644 -index 0000000..08d8dc7 +index 0000000000000000000000000000000000000000..08d8dc7c5d005384660f90bc9cb541b83c032411 --- /dev/null +++ b/drivers/thermal/bcm2835-thermal.c @@ -0,0 +1,141 @@ @@ -100001,10 +100001,10 @@ index 0000000..08d8dc7 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 418bd7563b83b568046489b0f4b8c67391d31445 Mon Sep 17 00:00:00 2001 +From 3724e82cdfe9073f3ba8c37ea3f98c80840e9a49 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 045/251] Add Chris Boot's i2c driver +Subject: [PATCH 045/398] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100093,7 +100093,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/i2c/busses/i2c-bcm2708.c diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index 7b0aa82..effadb0 100644 +index 7b0aa82ea38b2e7521650e6c9a1cab5b25ac8ee4..effadb087fc1178bc32e0b1aa0c404b4253a99bd 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -8,6 +8,25 @@ menu "I2C Hardware Bus support" @@ -100132,7 +100132,7 @@ index 7b0aa82..effadb0 100644 If you say yes to this option, support will be included for the BCM2835 I2C controller. diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index 37f2819..e309579 100644 +index 37f2819b4560b0e0947b74c214f5c5a0952bc0ae..e309579e691599031f25bd9b9b36430753f004a7 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -2,6 +2,8 @@ @@ -100146,7 +100146,7 @@ index 37f2819..e309579 100644 diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c new file mode 100644 -index 0000000..85f411c +index 0000000000000000000000000000000000000000..85f411cccf61f42d8fdf5a867b3b1f27d6821d2d --- /dev/null +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -0,0 +1,493 @@ @@ -100644,10 +100644,10 @@ index 0000000..85f411c +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 3c15dbca1ea1cf9b6843cb55e2fd01d4701ef874 Mon Sep 17 00:00:00 2001 +From dd464faa0a05fa82235f66540a00af8d140a622a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 046/251] char: broadcom: Add vcio module +Subject: [PATCH 046/398] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100664,7 +100664,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/char/broadcom/vcio.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 2292ed2..5489f19 100644 +index 2292ed2ac9f457a7d491110e673666136faa5a5e..5489f19f05c620a30541e1a222d77b6ee4356d97 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -22,6 +22,12 @@ config BCM2708_VCMEM @@ -100681,7 +100681,7 @@ index 2292ed2..5489f19 100644 config BCM_VC_SM diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index 667d33e..14775c9 100644 +index 667d33ef38f3512b52818537c11d369798b6f1c0..14775c9b20b4b6a58f681f3687614676b5e2a871 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1,5 +1,6 @@ @@ -100693,7 +100693,7 @@ index 667d33e..14775c9 100644 obj-$(CONFIG_BCM2835_DEVGPIOMEM)+= bcm2835-gpiomem.o diff --git a/drivers/char/broadcom/vcio.c b/drivers/char/broadcom/vcio.c new file mode 100644 -index 0000000..c19bc20 +index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a140fe5aba0 --- /dev/null +++ b/drivers/char/broadcom/vcio.c @@ -0,0 +1,175 @@ @@ -100873,10 +100873,10 @@ index 0000000..c19bc20 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 8481c7c7094e5395ab47c8ecc6c7c12d654baf5a Mon Sep 17 00:00:00 2001 +From 7fc66d82bf96fd466ef2b80e585e1ae83172f72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 047/251] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 047/398] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100892,7 +100892,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c -index dd506cd..b980d53 100644 +index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..b980d531b35b9981a88356ef1c8a7b868a85f2b5 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -28,6 +28,8 @@ struct rpi_firmware { @@ -100982,10 +100982,10 @@ index dd506cd..b980d53 100644 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 7e74c5de1a6c613a28ee5a5cc871661ceadd0fcd Mon Sep 17 00:00:00 2001 +From 11cf04e2b2d79bbbffd87952da499a7e5da6ea66 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 048/251] bcm2835: add v4l2 camera device +Subject: [PATCH 048/398] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -101299,7 +101299,7 @@ squash: Fixup bcm2835-camera for changes in kernel 4.4 api diff --git a/Documentation/video4linux/bcm2835-v4l2.txt b/Documentation/video4linux/bcm2835-v4l2.txt new file mode 100644 -index 0000000..c585a8f +index 0000000000000000000000000000000000000000..c585a8fadf91c5a04453e442fc29ed893c65bf99 --- /dev/null +++ b/Documentation/video4linux/bcm2835-v4l2.txt @@ -0,0 +1,60 @@ @@ -101364,7 +101364,7 @@ index 0000000..c585a8f + +$ v4l2-ctl --list-formats diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig -index ccbc974..63c9715 100644 +index ccbc9742cb7aeca46b22edb65eaaae69ce00aa17..63c97152af3c9484b16882ad56c1703fc8975ee6 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -11,6 +11,8 @@ menuconfig V4L_PLATFORM_DRIVERS @@ -101377,7 +101377,7 @@ index ccbc974..63c9715 100644 config VIDEO_VIA_CAMERA diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile -index efa0295..8c0b3b5 100644 +index efa0295af87bfe089acb526329b1601e95756c89..8c0b3b55ae9871c54ef9b498d5ab34403f5ca69f 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -2,6 +2,8 @@ @@ -101391,7 +101391,7 @@ index efa0295..8c0b3b5 100644 diff --git a/drivers/media/platform/bcm2835/Kconfig b/drivers/media/platform/bcm2835/Kconfig new file mode 100644 -index 0000000..99a5cbc +index 0000000000000000000000000000000000000000..99a5cbccf0f3fa66ad5190ec0942b0c232c3e824 --- /dev/null +++ b/drivers/media/platform/bcm2835/Kconfig @@ -0,0 +1,25 @@ @@ -101422,7 +101422,7 @@ index 0000000..99a5cbc +endif # VIDEO_BM2835 diff --git a/drivers/media/platform/bcm2835/Makefile b/drivers/media/platform/bcm2835/Makefile new file mode 100644 -index 0000000..f17c79c +index 0000000000000000000000000000000000000000..f17c79c33e4a07a2294907d3c748b4d62fc55e21 --- /dev/null +++ b/drivers/media/platform/bcm2835/Makefile @@ -0,0 +1,5 @@ @@ -101433,7 +101433,7 @@ index 0000000..f17c79c +ccflags-$(CONFIG_VIDEO_BCM2835) += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c new file mode 100644 -index 0000000..e83334c +index 0000000000000000000000000000000000000000..e83334c01e63da951d60c964418ef105f8755932 --- /dev/null +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -0,0 +1,1844 @@ @@ -103283,7 +103283,7 @@ index 0000000..e83334c +module_exit(bm2835_mmal_exit); diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h new file mode 100644 -index 0000000..7fe9f65 +index 0000000000000000000000000000000000000000..7fe9f658a927042b95eaba63aaa49daed2a8f2b8 --- /dev/null +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -0,0 +1,126 @@ @@ -103415,7 +103415,7 @@ index 0000000..7fe9f65 +} diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c new file mode 100644 -index 0000000..f9f903f +index 0000000000000000000000000000000000000000..f9f903f9574d576dde069e56f618f235f99194c7 --- /dev/null +++ b/drivers/media/platform/bcm2835/controls.c @@ -0,0 +1,1324 @@ @@ -104745,7 +104745,7 @@ index 0000000..f9f903f +} diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h new file mode 100644 -index 0000000..840fd13 +index 0000000000000000000000000000000000000000..840fd139e03315b5d9ac2d5742ab589bc6b17ade --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-common.h @@ -0,0 +1,53 @@ @@ -104804,7 +104804,7 @@ index 0000000..840fd13 +}; diff --git a/drivers/media/platform/bcm2835/mmal-encodings.h b/drivers/media/platform/bcm2835/mmal-encodings.h new file mode 100644 -index 0000000..024d620 +index 0000000000000000000000000000000000000000..024d620dc1dfda006a9d36dffeeec691faf24ac5 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-encodings.h @@ -0,0 +1,127 @@ @@ -104937,7 +104937,7 @@ index 0000000..024d620 +#endif /* MMAL_ENCODINGS_H */ diff --git a/drivers/media/platform/bcm2835/mmal-msg-common.h b/drivers/media/platform/bcm2835/mmal-msg-common.h new file mode 100644 -index 0000000..66e8a6e +index 0000000000000000000000000000000000000000..66e8a6edf628565aeb487662b0b503c0c562ac8a --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-common.h @@ -0,0 +1,50 @@ @@ -104993,7 +104993,7 @@ index 0000000..66e8a6e +#endif /* MMAL_MSG_COMMON_H */ diff --git a/drivers/media/platform/bcm2835/mmal-msg-format.h b/drivers/media/platform/bcm2835/mmal-msg-format.h new file mode 100644 -index 0000000..123d86e +index 0000000000000000000000000000000000000000..123d86ef582b0d059d1d5d14ba9add56b7365419 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-format.h @@ -0,0 +1,81 @@ @@ -105080,7 +105080,7 @@ index 0000000..123d86e +#endif /* MMAL_MSG_FORMAT_H */ diff --git a/drivers/media/platform/bcm2835/mmal-msg-port.h b/drivers/media/platform/bcm2835/mmal-msg-port.h new file mode 100644 -index 0000000..a55c1ea +index 0000000000000000000000000000000000000000..a55c1ea2eceb190689910a6a84370f126b1e9cbb --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-port.h @@ -0,0 +1,107 @@ @@ -105193,7 +105193,7 @@ index 0000000..a55c1ea +}; diff --git a/drivers/media/platform/bcm2835/mmal-msg.h b/drivers/media/platform/bcm2835/mmal-msg.h new file mode 100644 -index 0000000..67b1076 +index 0000000000000000000000000000000000000000..67b1076015a54646eb0a3b956afdc97e75d2a39c --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg.h @@ -0,0 +1,404 @@ @@ -105603,7 +105603,7 @@ index 0000000..67b1076 +}; diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h new file mode 100644 -index 0000000..aa0fd18 +index 0000000000000000000000000000000000000000..aa0fd180271b1b58e96e027df951fcbc7f610eb8 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -0,0 +1,656 @@ @@ -106265,7 +106265,7 @@ index 0000000..aa0fd18 +}; diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c new file mode 100644 -index 0000000..7813225 +index 0000000000000000000000000000000000000000..781322542d5a8295f3d7d5a3eaaf0cac29930c30 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-vchiq.c @@ -0,0 +1,1916 @@ @@ -108187,7 +108187,7 @@ index 0000000..7813225 +} diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.h b/drivers/media/platform/bcm2835/mmal-vchiq.h new file mode 100644 -index 0000000..9d1d11e +index 0000000000000000000000000000000000000000..9d1d11e4a53e510c04a416d92d195a7df15012d5 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-vchiq.h @@ -0,0 +1,178 @@ @@ -108370,10 +108370,10 @@ index 0000000..9d1d11e + +#endif /* MMAL_VCHIQ_H */ -From 2a1cb83a705ce839581fbabeb9a8db3dad478ccf Mon Sep 17 00:00:00 2001 +From 1d1f4890731c035b778fb636ad9dd0c76ef82453 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 049/251] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 049/398] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -108415,7 +108415,7 @@ See: https://github.com/raspberrypi/linux/issues/1157 diff --git a/scripts/knlinfo b/scripts/knlinfo new file mode 100755 -index 0000000..a0e8663 +index 0000000000000000000000000000000000000000..a0e8663ae86b97ecded54bd469ac4ffe84eb2684 --- /dev/null +++ b/scripts/knlinfo @@ -0,0 +1,168 @@ @@ -108589,7 +108589,7 @@ index 0000000..a0e8663 +} diff --git a/scripts/mkknlimg b/scripts/mkknlimg new file mode 100755 -index 0000000..3998d43 +index 0000000000000000000000000000000000000000..3998d43b694ff06fd9562b89f5a7be26b4cb6e15 --- /dev/null +++ b/scripts/mkknlimg @@ -0,0 +1,244 @@ @@ -108838,17 +108838,17 @@ index 0000000..3998d43 + return (($val eq 'y') || ($val eq '1')); +} -From 3c9e2867950ad9a36623e07c2d1641445bab50dd Mon Sep 17 00:00:00 2001 +From b7502bfb13562d930b16690f4b9942a3d9fd0191 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 5 Dec 2014 17:26:26 +0000 -Subject: [PATCH 050/251] fdt: Add support for the CONFIG_CMDLINE_EXTEND option +Subject: [PATCH 050/398] fdt: Add support for the CONFIG_CMDLINE_EXTEND option --- drivers/of/fdt.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c -index 655f79d..fdc4501 100644 +index 655f79db7899ffd0628714d51203847630a8075c..fdc45015b8d3a4ddc99edbc976e904742b3b85bd 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -954,19 +954,38 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, @@ -108896,10 +108896,10 @@ index 655f79d..fdc4501 100644 pr_debug("Command line is: %s\n", (char*)data); -From 336ecbfbddc122378578b727f46bfe71858aaa05 Mon Sep 17 00:00:00 2001 +From f69405c92a4084903e65551475b0c3a404d28fc9 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 051/251] BCM2708: Add core Device Tree support +Subject: [PATCH 051/398] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -109077,7 +109077,7 @@ BCM270X_DT: Use clk_core for I2C interfaces create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 30bbc37..d583e67 100644 +index 30bbc3746130a56e54fa665a763894fe4ec02e6a..d583e67d065a7d841e4606a4b99d94f252969a5c 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1,5 +1,25 @@ @@ -109129,7 +109129,7 @@ index 30bbc37..d583e67 100644 +endif diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts new file mode 100644 -index 0000000..2e4df17 +index 0000000000000000000000000000000000000000..2e4df17ea71ab73b20314ed8ffc4396378195240 --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -0,0 +1,145 @@ @@ -109280,7 +109280,7 @@ index 0000000..2e4df17 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts new file mode 100644 -index 0000000..0445b46 +index 0000000000000000000000000000000000000000..0445b46367689877f62d0bd6c36aed7cdd93383e --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -0,0 +1,135 @@ @@ -109421,7 +109421,7 @@ index 0000000..0445b46 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts new file mode 100755 -index 0000000..87c1a54 +index 0000000000000000000000000000000000000000..87c1a54ed569df899e6340f4e26e0c885ef7df0a --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -0,0 +1,102 @@ @@ -109529,7 +109529,7 @@ index 0000000..87c1a54 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi new file mode 100644 -index 0000000..3c8bdde +index 0000000000000000000000000000000000000000..3c8bdde83189a5d4089d509e59a4fd9668e5c746 --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi @@ -0,0 +1,40 @@ @@ -109575,7 +109575,7 @@ index 0000000..3c8bdde +}; diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi new file mode 100644 -index 0000000..f5a44cd +index 0000000000000000000000000000000000000000..f5a44cd4fef0ee221ed6ae1c43ca81dabffa110d --- /dev/null +++ b/arch/arm/boot/dts/bcm2708.dtsi @@ -0,0 +1,40 @@ @@ -109621,7 +109621,7 @@ index 0000000..f5a44cd +}; diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi new file mode 100644 -index 0000000..75fb4ce +index 0000000000000000000000000000000000000000..75fb4ce688a6f1774163628f9d2f706bc4d06767 --- /dev/null +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -0,0 +1,347 @@ @@ -109974,7 +109974,7 @@ index 0000000..75fb4ce +}; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts new file mode 100644 -index 0000000..5206ba2 +index 0000000000000000000000000000000000000000..5206ba204d97c3e904ff482bb04b169f434827ca --- /dev/null +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -0,0 +1,145 @@ @@ -110125,7 +110125,7 @@ index 0000000..5206ba2 +}; diff --git a/arch/arm/boot/dts/bcm2709.dtsi b/arch/arm/boot/dts/bcm2709.dtsi new file mode 100644 -index 0000000..a8cfd7c +index 0000000000000000000000000000000000000000..a8cfd7c4df5bcf7692d13882833c97852649932d --- /dev/null +++ b/arch/arm/boot/dts/bcm2709.dtsi @@ -0,0 +1,102 @@ @@ -110233,7 +110233,7 @@ index 0000000..a8cfd7c +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm.dts b/arch/arm/boot/dts/bcm2835-rpi-cm.dts new file mode 100644 -index 0000000..c6e6860 +index 0000000000000000000000000000000000000000..c6e6860a6d4356a613f4f7ab41c6befc76740a15 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-cm.dts @@ -0,0 +1,93 @@ @@ -110332,7 +110332,7 @@ index 0000000..c6e6860 +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2835-rpi-cm.dtsi new file mode 100644 -index 0000000..9c4000f +index 0000000000000000000000000000000000000000..9c4000fc686a9882b9ddde24fdcf937d52b0f86f --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-cm.dtsi @@ -0,0 +1,30 @@ @@ -110368,7 +110368,7 @@ index 0000000..9c4000f +}; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile new file mode 100644 -index 0000000..d8c2771 +index 0000000000000000000000000000000000000000..d8c2771cfd22aa73100220a6ba3cb8833b19004f --- /dev/null +++ b/arch/arm/boot/dts/overlays/Makefile @@ -0,0 +1,69 @@ @@ -110443,7 +110443,7 @@ index 0000000..d8c2771 +endif diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000..268d400 +index 0000000000000000000000000000000000000000..268d400a3500e6a257cca90ba54d97bebdf797fe --- /dev/null +++ b/arch/arm/boot/dts/overlays/README @@ -0,0 +1,648 @@ @@ -111097,7 +111097,7 @@ index 0000000..268d400 +http://www.raspberrypi.org/documentation/configuration/device-tree.md diff --git a/arch/arm/boot/dts/overlays/ads7846-overlay.dts b/arch/arm/boot/dts/overlays/ads7846-overlay.dts new file mode 100644 -index 0000000..6a92cd1 +index 0000000000000000000000000000000000000000..6a92cd1a9ffc370f386612843fc9a0236ddb48ee --- /dev/null +++ b/arch/arm/boot/dts/overlays/ads7846-overlay.dts @@ -0,0 +1,83 @@ @@ -111186,7 +111186,7 @@ index 0000000..6a92cd1 +}; diff --git a/arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts new file mode 100644 -index 0000000..782b171 +index 0000000000000000000000000000000000000000..782b1715467e943c18fe936cc76448f3db960fbc --- /dev/null +++ b/arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts @@ -0,0 +1,23 @@ @@ -111215,7 +111215,7 @@ index 0000000..782b171 +}; diff --git a/arch/arm/boot/dts/overlays/dht11-overlay.dts b/arch/arm/boot/dts/overlays/dht11-overlay.dts new file mode 100644 -index 0000000..9bf67fd +index 0000000000000000000000000000000000000000..9bf67fd57bada3c3e06c09744fb184767bab5d14 --- /dev/null +++ b/arch/arm/boot/dts/overlays/dht11-overlay.dts @@ -0,0 +1,39 @@ @@ -111260,7 +111260,7 @@ index 0000000..9bf67fd +}; diff --git a/arch/arm/boot/dts/overlays/enc28j60-overlay.dts b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts new file mode 100644 -index 0000000..8fae869 +index 0000000000000000000000000000000000000000..8fae869511ca53a533c7bffa9a59a4437e6501e3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts @@ -0,0 +1,50 @@ @@ -111316,7 +111316,7 @@ index 0000000..8fae869 +}; diff --git a/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts b/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts new file mode 100644 -index 0000000..ff8cb36 +index 0000000000000000000000000000000000000000..ff8cb36d94d4940d5151ace24afc4ad1a9aa9fb6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts @@ -0,0 +1,34 @@ @@ -111356,7 +111356,7 @@ index 0000000..ff8cb36 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts new file mode 100644 -index 0000000..2c81448 +index 0000000000000000000000000000000000000000..2c81448c969e93b6511fa9382b5d8ae16edfffce --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts @@ -0,0 +1,39 @@ @@ -111401,7 +111401,7 @@ index 0000000..2c81448 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts new file mode 100644 -index 0000000..5e7633a +index 0000000000000000000000000000000000000000..5e7633ae85cd32cf074380579e9f67a220bb0320 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -111441,7 +111441,7 @@ index 0000000..5e7633a +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts new file mode 100644 -index 0000000..deb9c62 +index 0000000000000000000000000000000000000000..deb9c625fe861cc3425f975ce71821326e3f64b3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -0,0 +1,39 @@ @@ -111486,7 +111486,7 @@ index 0000000..deb9c62 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts new file mode 100644 -index 0000000..d0e0d8a +index 0000000000000000000000000000000000000000..d0e0d8aa63a9be729e8c0f3b8814f15e92da2e61 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts @@ -0,0 +1,39 @@ @@ -111531,7 +111531,7 @@ index 0000000..d0e0d8a +}; diff --git a/arch/arm/boot/dts/overlays/hy28a-overlay.dts b/arch/arm/boot/dts/overlays/hy28a-overlay.dts new file mode 100644 -index 0000000..3cd3083 +index 0000000000000000000000000000000000000000..3cd3083f178b4a39dfb7c2742d15da7822701e1f --- /dev/null +++ b/arch/arm/boot/dts/overlays/hy28a-overlay.dts @@ -0,0 +1,87 @@ @@ -111624,7 +111624,7 @@ index 0000000..3cd3083 +}; diff --git a/arch/arm/boot/dts/overlays/hy28b-overlay.dts b/arch/arm/boot/dts/overlays/hy28b-overlay.dts new file mode 100644 -index 0000000..f774c4a +index 0000000000000000000000000000000000000000..f774c4ab1770529cac96b5e85a183ebe04359fbd --- /dev/null +++ b/arch/arm/boot/dts/overlays/hy28b-overlay.dts @@ -0,0 +1,142 @@ @@ -111772,7 +111772,7 @@ index 0000000..f774c4a +}; diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts new file mode 100644 -index 0000000..fed4bd8 +index 0000000000000000000000000000000000000000..fed4bd867620e0c0958b92b7c7729591d3ea12ec --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts @@ -0,0 +1,55 @@ @@ -111833,7 +111833,7 @@ index 0000000..fed4bd8 +}; diff --git a/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts new file mode 100644 -index 0000000..a11160a +index 0000000000000000000000000000000000000000..a11160afa4bfb2aeda5937b3b1138bb1f9b9b0f8 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts @@ -0,0 +1,13 @@ @@ -111852,7 +111852,7 @@ index 0000000..a11160a +}; diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts new file mode 100644 -index 0000000..ea8173e +index 0000000000000000000000000000000000000000..ea8173e529117dc17295efeb89f47e78147ed178 --- /dev/null +++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts @@ -0,0 +1,39 @@ @@ -111897,7 +111897,7 @@ index 0000000..ea8173e +}; diff --git a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts new file mode 100644 -index 0000000..735d8ab +index 0000000000000000000000000000000000000000..735d8abfccb2e60be7a87ce5832440f9d38333b7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts @@ -0,0 +1,39 @@ @@ -111942,7 +111942,7 @@ index 0000000..735d8ab +}; diff --git a/arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts b/arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts new file mode 100644 -index 0000000..7d5d82b +index 0000000000000000000000000000000000000000..7d5d82bdf4c41cfbafada51a6d23cbd57822828f --- /dev/null +++ b/arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts @@ -0,0 +1,57 @@ @@ -112005,7 +112005,7 @@ index 0000000..7d5d82b +}; diff --git a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts new file mode 100755 -index 0000000..398d59c +index 0000000000000000000000000000000000000000..398d59cf1184aaf735d01c2f74cecdeee5fa58c9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts @@ -0,0 +1,69 @@ @@ -112080,7 +112080,7 @@ index 0000000..398d59c +}; diff --git a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts new file mode 100644 -index 0000000..6bef9ae +index 0000000000000000000000000000000000000000..6bef9ae5c52c76c1daede15f67404cb66c7fd6da --- /dev/null +++ b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts @@ -0,0 +1,69 @@ @@ -112155,7 +112155,7 @@ index 0000000..6bef9ae +}; diff --git a/arch/arm/boot/dts/overlays/mmc-overlay.dts b/arch/arm/boot/dts/overlays/mmc-overlay.dts new file mode 100644 -index 0000000..00a22be +index 0000000000000000000000000000000000000000..00a22be8d63c7ecc19d3eff8ba9d073765c4fb8a --- /dev/null +++ b/arch/arm/boot/dts/overlays/mmc-overlay.dts @@ -0,0 +1,39 @@ @@ -112200,7 +112200,7 @@ index 0000000..00a22be +}; diff --git a/arch/arm/boot/dts/overlays/mz61581-overlay.dts b/arch/arm/boot/dts/overlays/mz61581-overlay.dts new file mode 100644 -index 0000000..9242a6e +index 0000000000000000000000000000000000000000..9242a6e9a48c4f95dccc60c3d39550cae1363459 --- /dev/null +++ b/arch/arm/boot/dts/overlays/mz61581-overlay.dts @@ -0,0 +1,111 @@ @@ -112317,7 +112317,7 @@ index 0000000..9242a6e +}; diff --git a/arch/arm/boot/dts/overlays/piscreen-overlay.dts b/arch/arm/boot/dts/overlays/piscreen-overlay.dts new file mode 100644 -index 0000000..ba4ad33 +index 0000000000000000000000000000000000000000..ba4ad33fe00163e5515d23afa3dd77ff448e3c8e --- /dev/null +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts @@ -0,0 +1,96 @@ @@ -112419,7 +112419,7 @@ index 0000000..ba4ad33 +}; diff --git a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts new file mode 100644 -index 0000000..d506eae +index 0000000000000000000000000000000000000000..d506eae7d141410f74a6c1339d811493b73d64ed --- /dev/null +++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts @@ -0,0 +1,115 @@ @@ -112540,7 +112540,7 @@ index 0000000..d506eae +}; diff --git a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts new file mode 100644 -index 0000000..40bf0e1 +index 0000000000000000000000000000000000000000..40bf0e11015f5abebd0d4139276da888d728d569 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts @@ -0,0 +1,34 @@ @@ -112580,7 +112580,7 @@ index 0000000..40bf0e1 +}; diff --git a/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts new file mode 100644 -index 0000000..957e1a4 +index 0000000000000000000000000000000000000000..957e1a4ec34724c7852086a5c44f493d9b75bfa6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts @@ -0,0 +1,46 @@ @@ -112632,7 +112632,7 @@ index 0000000..957e1a4 +}; diff --git a/arch/arm/boot/dts/overlays/pwm-overlay.dts b/arch/arm/boot/dts/overlays/pwm-overlay.dts new file mode 100644 -index 0000000..ddd67ff +index 0000000000000000000000000000000000000000..ddd67ffcd8bb34b05ec61481a162a37d64b30680 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pwm-overlay.dts @@ -0,0 +1,42 @@ @@ -112680,7 +112680,7 @@ index 0000000..ddd67ff +}; diff --git a/arch/arm/boot/dts/overlays/raspidac3-overlay.dts b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts new file mode 100644 -index 0000000..1bd8054 +index 0000000000000000000000000000000000000000..1bd80542e3e5e6b1cd5c5255db2642549a6e92c5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts @@ -0,0 +1,45 @@ @@ -112731,7 +112731,7 @@ index 0000000..1bd8054 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts new file mode 100644 -index 0000000..7fc6ac9 +index 0000000000000000000000000000000000000000..7fc6ac996f934a87bfc17089212252e95a7e24e4 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -112771,7 +112771,7 @@ index 0000000..7fc6ac9 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts new file mode 100644 -index 0000000..a8fa974 +index 0000000000000000000000000000000000000000..a8fa9745251216186c987fa8bae17b96d12c90bf --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts @@ -0,0 +1,82 @@ @@ -112859,7 +112859,7 @@ index 0000000..a8fa974 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts new file mode 100644 -index 0000000..2e53a17 +index 0000000000000000000000000000000000000000..2e53a17491706bdb6245426b548a54960a40966f --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts @@ -0,0 +1,17 @@ @@ -112882,7 +112882,7 @@ index 0000000..2e53a17 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts new file mode 100644 -index 0000000..2029930 +index 0000000000000000000000000000000000000000..20299305328541631a0810d97e0fbe2e39df1d4e --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts @@ -0,0 +1,39 @@ @@ -112927,7 +112927,7 @@ index 0000000..2029930 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts b/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts new file mode 100644 -index 0000000..2715324 +index 0000000000000000000000000000000000000000..27153240e1be595ae07c7ec74db1615532904140 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts @@ -0,0 +1,47 @@ @@ -112980,7 +112980,7 @@ index 0000000..2715324 +}; diff --git a/arch/arm/boot/dts/overlays/sdhost-overlay.dts b/arch/arm/boot/dts/overlays/sdhost-overlay.dts new file mode 100644 -index 0000000..85f0725 +index 0000000000000000000000000000000000000000..85f0725e1ed9e1ec6d41b1956b43528a2d92aa63 --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts @@ -0,0 +1,29 @@ @@ -113015,7 +113015,7 @@ index 0000000..85f0725 +}; diff --git a/arch/arm/boot/dts/overlays/sdio-overlay.dts b/arch/arm/boot/dts/overlays/sdio-overlay.dts new file mode 100644 -index 0000000..afc8742 +index 0000000000000000000000000000000000000000..afc874269ac592d2df67abbc1d9c0d4f973e6baf --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts @@ -0,0 +1,32 @@ @@ -113053,7 +113053,7 @@ index 0000000..afc8742 +}; diff --git a/arch/arm/boot/dts/overlays/smi-dev-overlay.dts b/arch/arm/boot/dts/overlays/smi-dev-overlay.dts new file mode 100644 -index 0000000..b610d82 +index 0000000000000000000000000000000000000000..b610d828360810e80133850adf7b459c66b3ed5d --- /dev/null +++ b/arch/arm/boot/dts/overlays/smi-dev-overlay.dts @@ -0,0 +1,18 @@ @@ -113077,7 +113077,7 @@ index 0000000..b610d82 +}; diff --git a/arch/arm/boot/dts/overlays/smi-nand-overlay.dts b/arch/arm/boot/dts/overlays/smi-nand-overlay.dts new file mode 100644 -index 0000000..13ce0b7 +index 0000000000000000000000000000000000000000..13ce0b7cfb242df1019f91ed2fc03f514927c3e7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/smi-nand-overlay.dts @@ -0,0 +1,69 @@ @@ -113152,7 +113152,7 @@ index 0000000..13ce0b7 +}; diff --git a/arch/arm/boot/dts/overlays/smi-overlay.dts b/arch/arm/boot/dts/overlays/smi-overlay.dts new file mode 100644 -index 0000000..095f52c +index 0000000000000000000000000000000000000000..095f52c355fd6382233d8a471c3590a4275d6c75 --- /dev/null +++ b/arch/arm/boot/dts/overlays/smi-overlay.dts @@ -0,0 +1,37 @@ @@ -113195,7 +113195,7 @@ index 0000000..095f52c +}; diff --git a/arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts b/arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts new file mode 100644 -index 0000000..9648063 +index 0000000000000000000000000000000000000000..9648063d5963f2f6ec8f31038f3af5820a8135a6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts @@ -0,0 +1,31 @@ @@ -113232,7 +113232,7 @@ index 0000000..9648063 +}; diff --git a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts new file mode 100644 -index 0000000..f7102c8 +index 0000000000000000000000000000000000000000..f7102c878b13340a1b142f563462fb7027922159 --- /dev/null +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts @@ -0,0 +1,216 @@ @@ -113454,7 +113454,7 @@ index 0000000..f7102c8 +}; diff --git a/arch/arm/boot/dts/overlays/uart1-overlay.dts b/arch/arm/boot/dts/overlays/uart1-overlay.dts new file mode 100644 -index 0000000..fa73e1f +index 0000000000000000000000000000000000000000..fa73e1feaeb1bf53a6755e81a998e71cd8c7eda9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/uart1-overlay.dts @@ -0,0 +1,38 @@ @@ -113498,7 +113498,7 @@ index 0000000..fa73e1f +}; diff --git a/arch/arm/boot/dts/overlays/vga666-overlay.dts b/arch/arm/boot/dts/overlays/vga666-overlay.dts new file mode 100644 -index 0000000..7fcab96 +index 0000000000000000000000000000000000000000..7fcab963eb4aed4b9edea94c9e60deb7650e0eb5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vga666-overlay.dts @@ -0,0 +1,30 @@ @@ -113534,7 +113534,7 @@ index 0000000..7fcab96 +}; diff --git a/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts b/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts new file mode 100644 -index 0000000..29a3b48 +index 0000000000000000000000000000000000000000..29a3b48d19ab36b814c09e4cc4eef6d9e2022da1 --- /dev/null +++ b/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts @@ -0,0 +1,39 @@ @@ -113579,7 +113579,7 @@ index 0000000..29a3b48 +}; diff --git a/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts b/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts new file mode 100644 -index 0000000..66a98f6 +index 0000000000000000000000000000000000000000..66a98f6c9601f51483f27803995bec772bb3350e --- /dev/null +++ b/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts @@ -0,0 +1,41 @@ @@ -113625,10 +113625,10 @@ index 0000000..66a98f6 + }; +}; -From 83d747d78be86190ad18c8c49e0d5518ac6bf83b Mon Sep 17 00:00:00 2001 +From 5b1291d73f0444fb8b7a047cbecb5e44b0380541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:47:07 +0200 -Subject: [PATCH 052/251] bcm2835: Match with BCM2708 Device Trees +Subject: [PATCH 052/398] bcm2835: Match with BCM2708 Device Trees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -113641,7 +113641,7 @@ Signed-off-by: Noralf Trønnes 3 files changed, 237 insertions(+), 205 deletions(-) diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts -index 668442b..17e2443 100644 +index 668442b1bda581a49c9f757d0eb2d7019aff1971..17e24434b201d6389e71508e9d9e6d45dfdb4ed0 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts @@ -1,30 +1,128 @@ @@ -113791,7 +113791,7 @@ index 668442b..17e2443 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts -index ff6b2d1..221d252 100644 +index ff6b2d1c6c9077823ca3351b200c46cbf8b83a94..221d2524798d16a3975924c3b814ec8119f744f3 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts @@ -1,17 +1,118 @@ @@ -113921,7 +113921,7 @@ index ff6b2d1..221d252 100644 + }; }; diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi -index 864a3ef..3256bff 100644 +index 864a3effc758aee575013169af129687ad37bef7..3256bff273466aac3b3f4e2014d7bbbfa485a331 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -1,206 +1,39 @@ @@ -114146,10 +114146,10 @@ index 864a3ef..3256bff 100644 + status = "okay"; +}; -From 1b4ab4d431eed3ced1dfdcb4ac14ce3937b74244 Mon Sep 17 00:00:00 2001 +From 7752ebb6aa77af25d8dcb4d5d58b9fc774dbf70d Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 053/251] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 053/398] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -114164,7 +114164,7 @@ Signed-off-by: Siarhei Siamashka 2 files changed, 35 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c -index 0705d88..771992a 100644 +index 0705d8883edecc785a72f4ef256b9894e4d0e950..771992af4fa33092813a9fa5e093f85342425b16 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1084,6 +1084,25 @@ fb_blank(struct fb_info *info, int blank) @@ -114226,7 +114226,7 @@ index 0705d88..771992a 100644 case FBIOBLANK: ret = do_fb_ioctl(info, cmd, arg); diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h -index fb795c3..fa72af0 100644 +index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..fa72af0c981710fe80bacf4cf6612f6da19046ee 100644 --- a/include/uapi/linux/fb.h +++ b/include/uapi/linux/fb.h @@ -34,6 +34,11 @@ @@ -114242,10 +114242,10 @@ index fb795c3..fa72af0 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -From 25f558f2cb3b7c357c2b3fff66afca442b8462f9 Mon Sep 17 00:00:00 2001 +From a034fbf868452410c0050fac52b460c02cbbfa18 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 054/251] Speed up console framebuffer imageblit function +Subject: [PATCH 054/398] 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 @@ -114277,7 +114277,7 @@ Signed-off-by: Harm Hanemaaijer 1 file changed, 147 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/core/cfbimgblt.c b/drivers/video/fbdev/core/cfbimgblt.c -index a2bb276..436494f 100644 +index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466fafb10feb95 100644 --- a/drivers/video/fbdev/core/cfbimgblt.c +++ b/drivers/video/fbdev/core/cfbimgblt.c @@ -28,6 +28,11 @@ @@ -114454,10 +114454,10 @@ index a2bb276..436494f 100644 start_index, pitch_index); } else -From 0490dab9480fa92983af098b472d6a6e6e573e29 Mon Sep 17 00:00:00 2001 +From 7c64817900ca6af87ab25f4d4213cb95dbf2fe3b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 055/251] Allow mac address to be set in smsc95xx +Subject: [PATCH 055/398] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -114465,7 +114465,7 @@ Signed-off-by: popcornmix 1 file changed, 56 insertions(+) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index 9c0da18..3244a90 100755 +index 9c0da18957430ff7ddd4aeb030a8139e7085cb9e..3244a908a00147cb028b5632073b4e8f74e4d509 100755 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -59,6 +59,7 @@ @@ -114548,10 +114548,10 @@ index 9c0da18..3244a90 100755 if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { -From 5f3d302d1cd2e2684c1a4a21953c4677809a2f87 Mon Sep 17 00:00:00 2001 +From a85df68a4548c8a28f3e3906ca58988edf27a066 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 056/251] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 056/398] 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 @@ -114579,7 +114579,7 @@ w1-gpio: Sort out the pullup/parasitic power tangle 5 files changed, 99 insertions(+), 9 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c -index a373ae6..080e597 100644 +index a373ae69d9f6ef8a5925dbd5004cd5e9b8fc5c05..080e5976e2a6b75965ed753ddf29648cb0b2f000 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -23,6 +23,19 @@ @@ -114717,7 +114717,7 @@ index a373ae6..080e597 100644 } diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h -index 56a49ba..881d728 100644 +index 56a49ba41d83c0945203827946ba35dcb79897b0..881d72879b27fed8697ded8962e2f7c16796837d 100644 --- a/drivers/w1/w1.h +++ b/drivers/w1/w1.h @@ -171,6 +171,12 @@ struct w1_bus_master @@ -114734,7 +114734,7 @@ index 56a49ba..881d728 100644 u8, w1_slave_found_callback); }; diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c -index 20f766a..c4fbdb1 100644 +index 20f766afa4c7d7b8116565687541f84184fe61f4..c4fbdb1f25e961f9f7bacbac7b52a6d74cabaf12 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c @@ -122,6 +122,20 @@ int w1_add_master_device(struct w1_bus_master *master) @@ -114759,7 +114759,7 @@ index 20f766a..c4fbdb1 100644 mutex_lock(&w1_mlock); /* Search for the first available id (starting at 1). */ diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c -index 2820924..fd0550f 100644 +index 282092421cc9ee29d541e8722139387d0060c7db..fd0550f263f789b94038fd2fb2931022333029c2 100644 --- a/drivers/w1/w1_io.c +++ b/drivers/w1/w1_io.c @@ -134,10 +134,22 @@ static void w1_pre_write(struct w1_master *dev) @@ -114789,7 +114789,7 @@ index 2820924..fd0550f 100644 } } diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h -index d58594a..feae942 100644 +index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af803fb2ce 100644 --- a/include/linux/w1-gpio.h +++ b/include/linux/w1-gpio.h @@ -18,6 +18,7 @@ @@ -114801,10 +114801,10 @@ index d58594a..feae942 100644 unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From bc26cb5ca41caddb82d291450e32b27e56d9b87f Mon Sep 17 00:00:00 2001 +From f19e6cb5a85b97bdd18b4a9a2e226640502f83f0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 057/251] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 057/398] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -114812,10 +114812,10 @@ Subject: [PATCH 057/251] config: Enable CONFIG_MEMCG, but leave it disabled 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c -index dc94f8b..3dda8a8 100644 +index 1c9d701f7a72916155759c56561b084f0fc4900d..35264cdb91b683e122daee3fcf0a43999069133f 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5302,7 +5302,7 @@ int __init cgroup_init_early(void) +@@ -5306,7 +5306,7 @@ int __init cgroup_init_early(void) return 0; } @@ -114824,7 +114824,7 @@ index dc94f8b..3dda8a8 100644 /** * cgroup_init - cgroup initialization -@@ -5798,6 +5798,27 @@ static int __init cgroup_disable(char *str) +@@ -5802,6 +5802,27 @@ static int __init cgroup_disable(char *str) } __setup("cgroup_disable=", cgroup_disable); @@ -114853,10 +114853,10 @@ index dc94f8b..3dda8a8 100644 * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest -From 22689d60a6ca6191119ef7ab70c5b23991a41e16 Mon Sep 17 00:00:00 2001 +From 558545d1dea9c623a5e2f29a6a4525e9c7a245be Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 058/251] ASoC: Add support for PCM5102A codec +Subject: [PATCH 058/398] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -114870,7 +114870,7 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/codecs/pcm5102a.c diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index cfdafc4..bd38590 100644 +index cfdafc4c11ea9a64c465eef6d9ac4ed3520c159a..bd38590be90a0edc0896e2adf6ff8e692d33d045 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -89,6 +89,7 @@ config SND_SOC_ALL_CODECS @@ -114893,7 +114893,7 @@ index cfdafc4..bd38590 100644 tristate "Realtek ALC5631/RT5631 CODEC" depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index f632fc4..7ba76ba 100644 +index f632fc42f59f08d9d6c72f6aac045d9fe28176a1..7ba76ba20681cc4704c93d424a15ef3a8a2c6315 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -85,6 +85,7 @@ snd-soc-rl6231-objs := rl6231.o @@ -114914,7 +114914,7 @@ index f632fc4..7ba76ba 100644 obj-$(CONFIG_SND_SOC_RT5645) += snd-soc-rt5645.o diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c new file mode 100644 -index 0000000..7c6598e +index 0000000000000000000000000000000000000000..7c6598e717c523bc2e717861492a622ce66486c7 --- /dev/null +++ b/sound/soc/codecs/pcm5102a.c @@ -0,0 +1,70 @@ @@ -114989,10 +114989,10 @@ index 0000000..7c6598e +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 26aeeecaac62fdee4bff333a743680693009f15a Mon Sep 17 00:00:00 2001 +From c8987b368437bae8a416b932978c555e268796b0 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 059/251] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 059/398] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -115007,7 +115007,7 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/bcm/hifiberry_dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index c5070ae..ce81f14 100644 +index c5070aec5996aafb2d9daaf75163e16a29bc6892..ce81f14a88d08c90fb565cf3d60321a9b9a1fcee 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -7,3 +7,10 @@ config SND_BCM2835_SOC_I2S @@ -115022,7 +115022,7 @@ index c5070ae..ce81f14 100644 + help + Say Y or M if you want to add support for HifiBerry DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index bc816b7..b877d38 100644 +index bc816b71e5a40958953bf7bf7e7bd08342e87738..b877d386363d935deefda3664089a4ae5b33b889 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -3,3 +3,7 @@ snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o @@ -115035,7 +115035,7 @@ index bc816b7..b877d38 100644 +obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o diff --git a/sound/soc/bcm/hifiberry_dac.c b/sound/soc/bcm/hifiberry_dac.c new file mode 100644 -index 0000000..3ab0f47 +index 0000000000000000000000000000000000000000..3ab0f4705a9ffc4caa5e6a9788300a34505795ed --- /dev/null +++ b/sound/soc/bcm/hifiberry_dac.c @@ -0,0 +1,122 @@ @@ -115162,10 +115162,10 @@ index 0000000..3ab0f47 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 5bf2d31cda2340e5d7d73c35ea876225d2f8e9a1 Mon Sep 17 00:00:00 2001 +From 4ee630a46d47eeae6f261d9ca44bcd338b4d7014 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 060/251] ASoC: Add support for Rpi-DAC +Subject: [PATCH 060/398] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -115179,7 +115179,7 @@ Subject: [PATCH 060/251] ASoC: Add support for Rpi-DAC create mode 100644 sound/soc/codecs/pcm1794a.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index ce81f14..900de22 100644 +index ce81f14a88d08c90fb565cf3d60321a9b9a1fcee..900de22369a66758bbe49861238b647bd2ca037e 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -14,3 +14,10 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -115194,7 +115194,7 @@ index ce81f14..900de22 100644 + help + Say Y or M if you want to add support for RPi-DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index b877d38..99c96b4 100644 +index b877d386363d935deefda3664089a4ae5b33b889..99c96b4c41e46c17c38c8691e7a8a33b1bc7b3bb 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -5,5 +5,7 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -115207,7 +115207,7 @@ index b877d38..99c96b4 100644 +obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o diff --git a/sound/soc/bcm/rpi-dac.c b/sound/soc/bcm/rpi-dac.c new file mode 100644 -index 0000000..d5fac1b +index 0000000000000000000000000000000000000000..d5fac1b21d50c323afe27c1d1e0283d82b81507f --- /dev/null +++ b/sound/soc/bcm/rpi-dac.c @@ -0,0 +1,118 @@ @@ -115330,7 +115330,7 @@ index 0000000..d5fac1b +MODULE_DESCRIPTION("ASoC Driver for RPi-DAC"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index bd38590..b63f2fb 100644 +index bd38590be90a0edc0896e2adf6ff8e692d33d045..b63f2fb8c713855de0069385f11acab5b4a39e52 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -90,6 +90,7 @@ config SND_SOC_ALL_CODECS @@ -115357,7 +115357,7 @@ index bd38590..b63f2fb 100644 tristate depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 7ba76ba..2147436 100644 +index 7ba76ba20681cc4704c93d424a15ef3a8a2c6315..21474368551f34247cc476a6077325637b51ccc7 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -85,6 +85,7 @@ snd-soc-rl6231-objs := rl6231.o @@ -115378,7 +115378,7 @@ index 7ba76ba..2147436 100644 obj-$(CONFIG_SND_SOC_RT5640) += snd-soc-rt5640.o diff --git a/sound/soc/codecs/pcm1794a.c b/sound/soc/codecs/pcm1794a.c new file mode 100644 -index 0000000..afe1b41 +index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd843e17f4 --- /dev/null +++ b/sound/soc/codecs/pcm1794a.c @@ -0,0 +1,69 @@ @@ -115452,10 +115452,10 @@ index 0000000..afe1b41 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 2b8d51c50a053f52a94bf0965ad472d7e411a737 Mon Sep 17 00:00:00 2001 +From e1d5e4fb7d82da8346e8ed2fb6200d6a8be0794c Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 061/251] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 061/398] 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 @@ -115474,7 +115474,7 @@ Signed-off-by: Daniel Matuschek 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c -index 8d91470..5795fb1 100644 +index 8d914702cae4a3fe2c0ca0599cd1ec79f7322c83..5795fb11a2c2a4963c6df7d991bd37f54d0e02ba 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -304,6 +304,7 @@ static int wm8804_hw_params(struct snd_pcm_substream *substream, @@ -115495,10 +115495,10 @@ index 8d91470..5795fb1 100644 #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ -From ef7ccc94b42ad0827735d8fadac43b23548a0b35 Mon Sep 17 00:00:00 2001 +From 8cb9f1a31df75ddb5e97830b63047193d05aefbb Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 062/251] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 062/398] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -115524,7 +115524,7 @@ adds the sample rate bits in the SPDIF status block. create mode 100644 sound/soc/bcm/hifiberry_digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 900de22..a34aff2 100644 +index 900de22369a66758bbe49861238b647bd2ca037e..a34aff27bb3010f58773edb942adccc193ea0d26 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -15,6 +15,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -115542,7 +115542,7 @@ index 900de22..a34aff2 100644 tristate "Support for RPi-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 99c96b4..4d53c58 100644 +index 99c96b4c41e46c17c38c8691e7a8a33b1bc7b3bb..4d53c58dc6ba41116d1fa210b6ba08ee75526dd2 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -5,7 +5,9 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -115557,7 +115557,7 @@ index 99c96b4..4d53c58 100644 obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o diff --git a/sound/soc/bcm/hifiberry_digi.c b/sound/soc/bcm/hifiberry_digi.c new file mode 100644 -index 0000000..80732b8 +index 0000000000000000000000000000000000000000..80732b8ac1809d9921450e0789b1022d4dd0c7fd --- /dev/null +++ b/sound/soc/bcm/hifiberry_digi.c @@ -0,0 +1,223 @@ @@ -115785,10 +115785,10 @@ index 0000000..80732b8 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 9871f390c47d90a75d21d20be88e88aa49536fd5 Mon Sep 17 00:00:00 2001 +From 9dbb5d7cf07441514eaadd993347594ab12c46fd Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 063/251] ASoC: wm8804: Set idle_bias_off to false Idle bias +Subject: [PATCH 063/398] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -115797,7 +115797,7 @@ Signed-off-by: Daniel Matuschek 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c -index 5795fb1..c846716 100644 +index 5795fb11a2c2a4963c6df7d991bd37f54d0e02ba..c846716b4ed1027ade5512e8be90801dc0fa1c7b 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -544,7 +544,7 @@ static struct snd_soc_dai_driver wm8804_dai = { @@ -115810,10 +115810,10 @@ index 5795fb1..c846716 100644 .dapm_widgets = wm8804_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), -From bad079610353ec3b8632ca9109da462435b41ba3 Mon Sep 17 00:00:00 2001 +From 1c16db7477b84a42212379ddc88e2c0a5f5c5169 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 064/251] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 064/398] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -115829,7 +115829,7 @@ limit of 0dB for this control. create mode 100644 sound/soc/bcm/iqaudio-dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index a34aff2..38dcdd9 100644 +index a34aff27bb3010f58773edb942adccc193ea0d26..38dcdd975b406b9308e151f5d3a80dbca5163be5 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -28,3 +28,10 @@ config SND_BCM2708_SOC_RPI_DAC @@ -115844,7 +115844,7 @@ index a34aff2..38dcdd9 100644 + help + Say Y or M if you want to add support for IQaudIO-DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 4d53c58..08e4dc5 100644 +index 4d53c58dc6ba41116d1fa210b6ba08ee75526dd2..08e4dc55757855fedec6845b82fc5f9f91f1584b 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -7,7 +7,9 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -115859,7 +115859,7 @@ index 4d53c58..08e4dc5 100644 +obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c new file mode 100644 -index 0000000..37038d4 +index 0000000000000000000000000000000000000000..37038d48bd6ef47eb8733a9045621eae03983d60 --- /dev/null +++ b/sound/soc/bcm/iqaudio-dac.c @@ -0,0 +1,132 @@ @@ -115996,10 +115996,10 @@ index 0000000..37038d4 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From a5a08b66a1ac4a02bc9aaac168e363dd45f28087 Mon Sep 17 00:00:00 2001 +From 0eb38084f99d9d3c4cfcaaf7bc1773f82ba79d86 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 065/251] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 065/398] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -116007,7 +116007,7 @@ Reduces overhead when using X 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c -index 5dd426f..9ae0cd5 100644 +index 0df32fe0e3459a0db81661a9241bdd3f12d801d2..1d60eb589eb45520762abfd9563f617595376d8a 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -49,7 +49,7 @@ @@ -116019,7 +116019,7 @@ index 5dd426f..9ae0cd5 100644 module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); -@@ -1091,8 +1091,12 @@ static int usbhid_start(struct hid_device *hid) +@@ -1083,8 +1083,12 @@ static int usbhid_start(struct hid_device *hid) } /* Change the polling interval of mice. */ @@ -116035,10 +116035,10 @@ index 5dd426f..9ae0cd5 100644 ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 6181933c3fb422cf92cf1f2720064e48d1f93955 Mon Sep 17 00:00:00 2001 +From a4216f7b930ac8651b2969758f29ecb6e1142a12 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 066/251] Added support for HiFiBerry DAC+ +Subject: [PATCH 066/398] Added support for HiFiBerry DAC+ The driver is based on the HiFiBerry DAC driver. However HiFiBerry DAC+ uses a different codec chip (PCM5122), therefore a new driver is necessary. @@ -116050,7 +116050,7 @@ a different codec chip (PCM5122), therefore a new driver is necessary. create mode 100644 sound/soc/bcm/hifiberry_dacplus.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 38dcdd9..8c338b5 100644 +index 38dcdd975b406b9308e151f5d3a80dbca5163be5..8c338b5803042ad3834ee46a8dc93f53c53953f6 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -15,6 +15,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -116068,7 +116068,7 @@ index 38dcdd9..8c338b5 100644 tristate "Support for HifiBerry Digi" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 08e4dc5..a29538e 100644 +index 08e4dc55757855fedec6845b82fc5f9f91f1584b..a29538e56b62ef6e7098b81b81e1389a22beeafa 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -5,11 +5,13 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -116087,7 +116087,7 @@ index 08e4dc5..a29538e 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c new file mode 100644 -index 0000000..11e4f39 +index 0000000000000000000000000000000000000000..11e4f3918bfc6329074d81d12892b9ae6262a726 --- /dev/null +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -0,0 +1,141 @@ @@ -116233,10 +116233,10 @@ index 0000000..11e4f39 +MODULE_DESCRIPTION("ASoC Driver for HiFiBerry DAC+"); +MODULE_LICENSE("GPL v2"); -From 2804c1880d7b34b85e35eaa503fee6d648c243de Mon Sep 17 00:00:00 2001 +From 34be63e1fcfcd7e9c79353ff870757706f1af068 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 067/251] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 067/398] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the drivers for the Raspberry Pi I2S subsystem. @@ -116265,7 +116265,7 @@ Some code to load the driver based on device-tree-overlays was missing. This is create mode 100644 sound/soc/codecs/tas5713.h diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8c338b5..7677c89 100644 +index 8c338b5803042ad3834ee46a8dc93f53c53953f6..7677c898773e6dd87c3ef385e380aa42c85e66d8 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -29,6 +29,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI @@ -116283,7 +116283,7 @@ index 8c338b5..7677c89 100644 tristate "Support for RPi-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a29538e..30db495 100644 +index a29538e56b62ef6e7098b81b81e1389a22beeafa..30db4951129c2d853c5cf631f4cd1263926692d0 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -7,11 +7,13 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -116302,7 +116302,7 @@ index a29538e..30db495 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c new file mode 100644 -index 0000000..5903915 +index 0000000000000000000000000000000000000000..590391597bc602528ad52a41086d260427a806f9 --- /dev/null +++ b/sound/soc/bcm/hifiberry_amp.c @@ -0,0 +1,127 @@ @@ -116434,7 +116434,7 @@ index 0000000..5903915 +MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index b63f2fb..fe32cca 100644 +index b63f2fb8c713855de0069385f11acab5b4a39e52..fe32ccaaaebe9ca0076124bbc221f4751b65c824 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -117,6 +117,7 @@ config SND_SOC_ALL_CODECS @@ -116456,7 +116456,7 @@ index b63f2fb..fe32cca 100644 tristate diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 2147436..dbb213d 100644 +index 21474368551f34247cc476a6077325637b51ccc7..dbb213da41a16e5e40cabec24327a9e530ade293 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -118,6 +118,7 @@ snd-soc-sti-sas-objs := sti-sas.o @@ -116477,7 +116477,7 @@ index 2147436..dbb213d 100644 obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c new file mode 100644 -index 0000000..9b27138 +index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1eae5867411 --- /dev/null +++ b/sound/soc/codecs/tas5713.c @@ -0,0 +1,369 @@ @@ -116852,7 +116852,7 @@ index 0000000..9b27138 +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/tas5713.h b/sound/soc/codecs/tas5713.h new file mode 100644 -index 0000000..8f019e0 +index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8f612a342 --- /dev/null +++ b/sound/soc/codecs/tas5713.h @@ -0,0 +1,210 @@ @@ -117067,10 +117067,10 @@ index 0000000..8f019e0 + +#endif /* _TAS5713_H */ -From cb468b5a1270e4819be26c8cacfd0cb6c70be776 Mon Sep 17 00:00:00 2001 +From 29e302c1d42fa36c2d723c5bfb36cc11ecf2df4c Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 068/251] Update ds1307 driver for device-tree support +Subject: [PATCH 068/398] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -117078,7 +117078,7 @@ Signed-off-by: Ryan Coe 1 file changed, 8 insertions(+) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c -index aa705bb..1cb13fe 100644 +index aa705bb4748c08ac302d45775ef698cf26c69d5b..1cb13feea21f0403c0600f73898a10911ee59d14 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -1207,6 +1207,14 @@ static int ds1307_remove(struct i2c_client *client) @@ -117097,10 +117097,10 @@ index aa705bb..1cb13fe 100644 .driver = { .name = "rtc-ds1307", -From e545dfb5383a8d5d775818282c7f95ae7a2e1f72 Mon Sep 17 00:00:00 2001 +From 5980b4c44a3c7c5f360640c5d9466acee13c4974 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 069/251] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 069/398] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -117130,7 +117130,7 @@ See: https://github.com/raspberrypi/linux/issues/1064 create mode 100644 drivers/leds/trigger/ledtrig-input.c diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c -index 5db4515..685a8b5 100644 +index 5db4515a4fd7aaf292958a5a7fa982bcccceb999..685a8b586b690cc89bf8bbebbe6b6df0f9f33824 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -42,6 +42,13 @@ static void gpio_led_work(struct work_struct *work) @@ -117180,7 +117180,7 @@ index 5db4515..685a8b5 100644 state = !!gpiod_get_value_cansleep(led_dat->gpiod); else diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig -index 5bda6a9..eb98cca 100644 +index 5bda6a9b56bbd90b4a3749f87bc0c6fda8dd5034..eb98cca4c239e5bb5c4abf7c731021ae56f3e91d 100644 --- a/drivers/leds/trigger/Kconfig +++ b/drivers/leds/trigger/Kconfig @@ -108,4 +108,11 @@ config LEDS_TRIGGER_CAMERA @@ -117196,7 +117196,7 @@ index 5bda6a9..eb98cca 100644 + endif # LEDS_TRIGGERS diff --git a/drivers/leds/trigger/Makefile b/drivers/leds/trigger/Makefile -index 1abf48d..c03afdc 100644 +index 1abf48dacf7ebfcfb8208f7ae7bdf29d7c11ba32..c03afdc34404a406a658326bcf28a2f22b4f4122 100644 --- a/drivers/leds/trigger/Makefile +++ b/drivers/leds/trigger/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_LEDS_TRIGGER_CPU) += ledtrig-cpu.o @@ -117206,7 +117206,7 @@ index 1abf48d..c03afdc 100644 +obj-$(CONFIG_LEDS_TRIGGER_INPUT) += ledtrig-input.o diff --git a/drivers/leds/trigger/ledtrig-input.c b/drivers/leds/trigger/ledtrig-input.c new file mode 100644 -index 0000000..07d1219 +index 0000000000000000000000000000000000000000..07d12197e340e003c13003d08f53c9e7af676720 --- /dev/null +++ b/drivers/leds/trigger/ledtrig-input.c @@ -0,0 +1,54 @@ @@ -117265,7 +117265,7 @@ index 0000000..07d1219 +MODULE_DESCRIPTION("Set LED GPIO to Input \"trigger\""); +MODULE_LICENSE("GPL"); diff --git a/include/linux/leds.h b/include/linux/leds.h -index fa359c7..4b25a1a 100644 +index fa359c79c825e666789ec1ce65392b6ff184d93c..4b25a1a8c13d8a64a9f9ffee75329bf60a733384 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -48,6 +48,9 @@ struct led_classdev { @@ -117279,10 +117279,10 @@ index fa359c7..4b25a1a 100644 /* Set LED brightness level */ /* Must not sleep, use a workqueue if needed */ -From f6d9d6ba910f1604a3d488091f052a57f14cd998 Mon Sep 17 00:00:00 2001 +From c6955290a95a991b6c5ae230e9ed7f0a38f20120 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 27 Feb 2015 15:10:24 +0000 -Subject: [PATCH 070/251] enc28j60: Add device tree compatible string and an +Subject: [PATCH 070/398] enc28j60: Add device tree compatible string and an overlay --- @@ -117290,7 +117290,7 @@ Subject: [PATCH 070/251] enc28j60: Add device tree compatible string and an 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c -index 86ea17e..a1b20c1 100644 +index 86ea17e7ba7bff17f40755663e1b10b7d7b4cbcc..a1b20c146eb8f3d9af757b79c19be96ed43adfba 100644 --- a/drivers/net/ethernet/microchip/enc28j60.c +++ b/drivers/net/ethernet/microchip/enc28j60.c @@ -1630,9 +1630,16 @@ static int enc28j60_remove(struct spi_device *spi) @@ -117311,10 +117311,10 @@ index 86ea17e..a1b20c1 100644 .probe = enc28j60_probe, .remove = enc28j60_remove, -From 68eb237af6a1c15b68fb1eff1596d152f06eeaa5 Mon Sep 17 00:00:00 2001 +From b136cb290d96dc232879a4b68fe0a9ca8c1eba18 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 071/251] Add driver for rpi-proto +Subject: [PATCH 071/398] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -117334,7 +117334,7 @@ Signed-off-by: Waldemar Brodkorb create mode 100644 sound/soc/bcm/rpi-proto.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 7677c89..8669a9a 100644 +index 7677c898773e6dd87c3ef385e380aa42c85e66d8..8669a9ac9734c465c7dc3f40c864f71b68a6de75 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -43,6 +43,13 @@ config SND_BCM2708_SOC_RPI_DAC @@ -117352,7 +117352,7 @@ index 7677c89..8669a9a 100644 tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 30db495..4f5ab1f 100644 +index 30db4951129c2d853c5cf631f4cd1263926692d0..4f5ab1fa4414e64a164eaa4575ffaa06d1cbf332 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -9,6 +9,7 @@ snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o @@ -117371,7 +117371,7 @@ index 30db495..4f5ab1f 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/rpi-proto.c b/sound/soc/bcm/rpi-proto.c new file mode 100644 -index 0000000..c6e45a0 +index 0000000000000000000000000000000000000000..c6e45a03f4c36dab7930fdfc1c8b36c38bd41fb8 --- /dev/null +++ b/sound/soc/bcm/rpi-proto.c @@ -0,0 +1,153 @@ @@ -117529,10 +117529,10 @@ index 0000000..c6e45a0 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From d76384c130898ee68885a8cddfbe4686ad41aa0f Mon Sep 17 00:00:00 2001 +From eb38e3719a0cecee40304c043ccaa3585830dec5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 072/251] config: Add default configs +Subject: [PATCH 072/398] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1254 +++++++++++++++++++++++++++++++++++ @@ -117543,7 +117543,7 @@ Subject: [PATCH 072/251] config: Add default configs diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig new file mode 100644 -index 0000000..16062bf +index 0000000000000000000000000000000000000000..16062bf9ef94dba59e63928d4f4c77e2cfab6e69 --- /dev/null +++ b/arch/arm/configs/bcm2709_defconfig @@ -0,0 +1,1254 @@ @@ -118803,7 +118803,7 @@ index 0000000..16062bf +CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig new file mode 100644 -index 0000000..1d1b799 +index 0000000000000000000000000000000000000000..1d1b7997ba53542b6ebba750c1243a5870f38478 --- /dev/null +++ b/arch/arm/configs/bcmrpi_defconfig @@ -0,0 +1,1265 @@ @@ -120073,10 +120073,10 @@ index 0000000..1d1b799 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 704b0ef1532a29776c5a9df0fe8d93eabdff6f4d Mon Sep 17 00:00:00 2001 +From 7ebc6fee2aec0ea73018812f47afa111c2efddd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 29 Apr 2015 17:24:02 +0200 -Subject: [PATCH 073/251] bcm2835: bcm2835_defconfig +Subject: [PATCH 073/398] bcm2835: bcm2835_defconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -120218,7 +120218,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 1140 insertions(+), 26 deletions(-) diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig -index 31cb073..fdb2e2a 100644 +index 31cb07388885fa22e57798980576ff65cf94fec3..fdb2e2a8d7602d5b1103c8ec26445b55ad393125 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig @@ -1,105 +1,1103 @@ @@ -121502,10 +121502,10 @@ index 31cb073..fdb2e2a 100644 # CONFIG_XZ_DEC_ARM is not set # CONFIG_XZ_DEC_ARMTHUMB is not set -From e3d855ae8766391b2c35d6c61b852e79ca9f9047 Mon Sep 17 00:00:00 2001 +From 80e052626836428b53596160eb261493a65556ee Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 074/251] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 074/398] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -121518,7 +121518,7 @@ rpi-ft5406: Use firmware API create mode 100644 drivers/input/touchscreen/rpi-ft5406.c diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig -index ae33da7..5935716 100644 +index ae33da7ab51ff7f5f84464366be1c4b9f8030527..59357160753f5423a03fc22e9083453c3acb3945 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -608,6 +608,13 @@ config TOUCHSCREEN_EDT_FT5X06 @@ -121536,7 +121536,7 @@ index ae33da7..5935716 100644 tristate "Renesas MIGO-R touchscreen" depends on SH_MIGOR && I2C diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile -index cbaa6ab..13ab8c0 100644 +index cbaa6abb08dae6c58ea1125b0fc0baa335dbc444..13ab8c05fc0bcef6b81938f8de9eca432d695b02 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_TOUCHSCREEN_DA9034) += da9034-ts.o @@ -121549,7 +121549,7 @@ index cbaa6ab..13ab8c0 100644 obj-$(CONFIG_TOUCHSCREEN_EETI) += eeti_ts.o diff --git a/drivers/input/touchscreen/rpi-ft5406.c b/drivers/input/touchscreen/rpi-ft5406.c new file mode 100644 -index 0000000..b27dbee +index 0000000000000000000000000000000000000000..b27dbee8f56773dbd2a5503dc864747d0bebdddc --- /dev/null +++ b/drivers/input/touchscreen/rpi-ft5406.c @@ -0,0 +1,246 @@ @@ -121800,10 +121800,10 @@ index 0000000..b27dbee +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); -From 7298b88fd999f55dc6dde8cb6288562f68b05e56 Mon Sep 17 00:00:00 2001 +From c91d49206485c437b4e2a7fa01256d047919f9ee Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Oct 2014 11:47:53 +0100 -Subject: [PATCH 075/251] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 075/398] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -121835,7 +121835,7 @@ See: https://github.com/raspberrypi/linux/issues/1082 create mode 100644 arch/arm/lib/memset_rpi.S diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h -index cf4f3aa..9fe7780 100644 +index cf4f3aad0fc1c2154c6cf3839ff21bb1c46d6499..9fe7780002ce1847b9009ff9b741b56f34e19256 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h @@ -24,6 +24,11 @@ extern void * memchr(const void *, int, __kernel_size_t); @@ -121851,7 +121851,7 @@ index cf4f3aa..9fe7780 100644 #define memset(p,v,n) \ diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h -index 35c9db8..52d3401 100644 +index 35c9db857ebe9c7d53715ec42518a6e9fbe1dc6e..52d3401ae932b565f732294e5ef2f7a4c184f0ed 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -493,6 +493,9 @@ do { \ @@ -121865,7 +121865,7 @@ index 35c9db8..52d3401 100644 __copy_from_user(void *to, const void __user *from, unsigned long n) { diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile -index d8a7807..9c7dc5b 100644 +index d8a780799506b59bc2edd3f6a513021bcb45ebc0..9c7dc5bc616311a5181a11c479da7cee64208f58 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -6,9 +6,8 @@ @@ -121899,7 +121899,7 @@ index d8a7807..9c7dc5b 100644 diff --git a/arch/arm/lib/arm-mem.h b/arch/arm/lib/arm-mem.h new file mode 100644 -index 0000000..5d4bda1 +index 0000000000000000000000000000000000000000..5d4bda19ad207c65e7b7c6d6d733087faa96a8cc --- /dev/null +++ b/arch/arm/lib/arm-mem.h @@ -0,0 +1,159 @@ @@ -122063,7 +122063,7 @@ index 0000000..5d4bda1 +92: +.endm diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S -index 1512beb..3da60dd 100644 +index 1512bebfbf1b18ad317648891385a24e93d1f35f..3da60dd2caab0968e2156cf8705ebbe5f2551a8b 100644 --- a/arch/arm/lib/copy_from_user.S +++ b/arch/arm/lib/copy_from_user.S @@ -89,11 +89,13 @@ @@ -122083,7 +122083,7 @@ index 1512beb..3da60dd 100644 .align 0 diff --git a/arch/arm/lib/exports_rpi.c b/arch/arm/lib/exports_rpi.c new file mode 100644 -index 0000000..1f82604 +index 0000000000000000000000000000000000000000..1f826047db754ffde0077ac291b9605e201abd07 --- /dev/null +++ b/arch/arm/lib/exports_rpi.c @@ -0,0 +1,37 @@ @@ -122126,7 +122126,7 @@ index 0000000..1f82604 +EXPORT_SYMBOL(memcmp); diff --git a/arch/arm/lib/memcmp_rpi.S b/arch/arm/lib/memcmp_rpi.S new file mode 100644 -index 0000000..bf6e4ed +index 0000000000000000000000000000000000000000..bf6e4edfc9d3b9882b72edada681b79ce37850df --- /dev/null +++ b/arch/arm/lib/memcmp_rpi.S @@ -0,0 +1,285 @@ @@ -122417,7 +122417,7 @@ index 0000000..bf6e4ed +ENDPROC(memcmp) diff --git a/arch/arm/lib/memcpy_rpi.S b/arch/arm/lib/memcpy_rpi.S new file mode 100644 -index 0000000..30f8a90 +index 0000000000000000000000000000000000000000..30f8a9089a835ff265ce5aaf98f066258608eb92 --- /dev/null +++ b/arch/arm/lib/memcpy_rpi.S @@ -0,0 +1,61 @@ @@ -122484,7 +122484,7 @@ index 0000000..30f8a90 +ENDPROC(mmiocpy) diff --git a/arch/arm/lib/memcpymove.h b/arch/arm/lib/memcpymove.h new file mode 100644 -index 0000000..d8be584 +index 0000000000000000000000000000000000000000..d8be5849c8609f4ead85527ec527184614a77371 --- /dev/null +++ b/arch/arm/lib/memcpymove.h @@ -0,0 +1,506 @@ @@ -122996,7 +122996,7 @@ index 0000000..d8be584 +.endm diff --git a/arch/arm/lib/memmove_rpi.S b/arch/arm/lib/memmove_rpi.S new file mode 100644 -index 0000000..8b0760c +index 0000000000000000000000000000000000000000..8b0760c0904c51ef205e56d238b5df8a5226d7cf --- /dev/null +++ b/arch/arm/lib/memmove_rpi.S @@ -0,0 +1,61 @@ @@ -123063,7 +123063,7 @@ index 0000000..8b0760c +ENDPROC(memmove) diff --git a/arch/arm/lib/memset_rpi.S b/arch/arm/lib/memset_rpi.S new file mode 100644 -index 0000000..7067415 +index 0000000000000000000000000000000000000000..70674158d76cd38d8d70c987aa54a6b477e4fa91 --- /dev/null +++ b/arch/arm/lib/memset_rpi.S @@ -0,0 +1,123 @@ @@ -123191,7 +123191,7 @@ index 0000000..7067415 +ENDPROC(memset) +ENDPROC(mmioset) diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c -index 588bbc2..c29df92 100644 +index 588bbc288396ae52fe0d801bc537906b3e5dbfce..c29df924b50c2e7b071257aa2d842169252d9bd9 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c @@ -22,6 +22,14 @@ @@ -123342,10 +123342,10 @@ index 588bbc2..c29df92 100644 static unsigned long noinline __clear_user_memset(void __user *addr, unsigned long n) -From e8f27792e51eda819e6918697a67dc85a2d2fc13 Mon Sep 17 00:00:00 2001 +From 7d8058fd705acc31a50c81cb86d33dbafeab9ead Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 076/251] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 076/398] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -123363,7 +123363,7 @@ of the trigger signal may be preferable. 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c -index be3d81f..a030ae9 100644 +index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e821869eedd320 100644 --- a/drivers/power/reset/gpio-poweroff.c +++ b/drivers/power/reset/gpio-poweroff.c @@ -49,9 +49,11 @@ static int gpio_poweroff_probe(struct platform_device *pdev) @@ -123380,10 +123380,10 @@ index be3d81f..a030ae9 100644 "%s: pm_power_off function already registered", __func__); -From e1cb11c1118f942ad55724ec8036065cbba41a62 Mon Sep 17 00:00:00 2001 +From 18115d7af2425a21897b39343652c9b629ea6019 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 077/251] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 077/398] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -123392,7 +123392,7 @@ See: https://github.com/raspberrypi/linux/issues/1054 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c -index d0e7dfc..57b0760 100644 +index d0e7dfc647cf21a729696cbe499f7fc6dbf53b02..57b0760cf0027c36aff6568a547e1aed9a1e68d5 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -695,6 +695,7 @@ static struct class *spidev_class; @@ -123404,10 +123404,10 @@ index d0e7dfc..57b0760 100644 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From e74c88c3ce4685417d4a3aee8ce6cd22092c5315 Mon Sep 17 00:00:00 2001 +From 0ab435dcd27c18ad290be39bb63d57a24ee7c119 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 17:00:18 +0100 -Subject: [PATCH 078/251] scripts/dtc: Add overlay support +Subject: [PATCH 078/398] scripts/dtc: Add overlay support --- scripts/dtc/checks.c | 119 ++- @@ -123423,7 +123423,7 @@ Subject: [PATCH 078/251] scripts/dtc: Add overlay support 10 files changed, 1685 insertions(+), 1145 deletions(-) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index e81a8c7..efd1bc6 100644 +index e81a8c74b8d2802003c14584b8326bb5bfb174be..efd1bc6457747bd665f707523bf745e9ebe94def 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -458,21 +458,91 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -123578,7 +123578,7 @@ index e81a8c7..efd1bc6 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index 0ee1caf..dd44ba2 100644 +index 0ee1caf03dd057bee8c212002568941f0658edd7..dd44ba2aa11d019c7b71cede4f0806dd53c7b0db 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); @@ -123594,7 +123594,7 @@ index 0ee1caf..dd44ba2 100644 DPRINT("Keyword: /memreserve/\n"); BEGIN_DEFAULT(); diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped -index 11cd78e..1518525 100644 +index 11cd78e723050e56d00709ef63164bd83cccff9e..15185255fafdbebf805ad2bb2c63f0fdef4c8776 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ @@ -124488,7 +124488,7 @@ index 11cd78e..1518525 100644 diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped -index 116458c..2c1784e 100644 +index 116458c8dfc4cbd728db8fc348bb254a9bae7208..2c1784e3b4e1c56a3eeeb9c00d1bcb4a187f2fb5 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -1,19 +1,19 @@ @@ -127299,7 +127299,7 @@ index 116458c..2c1784e 100644 } + diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped -index 30867c6..0b22bbb 100644 +index 30867c688300e38333877360e3b05475d5b4a2a3..0b22bbb974795a98eafd8f22425039713d3994b7 100644 --- a/scripts/dtc/dtc-parser.tab.h_shipped +++ b/scripts/dtc/dtc-parser.tab.h_shipped @@ -1,19 +1,19 @@ @@ -127462,7 +127462,7 @@ index 30867c6..0b22bbb 100644 -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y -index 5a897e3..56b9c15 100644 +index 5a897e36562d67107dba44fa91274253b34152dc..56b9c152b11edf404834e2aa9c7637205d4d1c38 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -19,6 +19,7 @@ @@ -127521,7 +127521,7 @@ index 5a897e3..56b9c15 100644 ; diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c -index 8c4add6..0cbb14c 100644 +index 8c4add69a76578839de910292b165b4504f47cf2..0cbb14c96a012a6975f6f4f697398e9ad9aedce1 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -29,6 +29,7 @@ int reservenum; /* Number of memory reservation slots */ @@ -127569,7 +127569,7 @@ index 8c4add6..0cbb14c 100644 usage(NULL); default: diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h -index 56212c8..fe45748 100644 +index 56212c8df660396b1d9bf6752e1121990e0789ab..fe4574855e41f8313a5f4e15b468816a07a5d84b 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h @@ -54,6 +54,7 @@ extern int reservenum; /* Number of memory reservation slots */ @@ -127639,7 +127639,7 @@ index 56212c8..fe45748 100644 void delete_labels(struct label **labels); diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c -index bd99fa2..f439b40 100644 +index bd99fa2d33b85e873bd00178d6390d70f4afaa0d..f439b405848bdf314077e77808d4ba04663515ad 100644 --- a/scripts/dtc/flattree.c +++ b/scripts/dtc/flattree.c @@ -262,6 +262,12 @@ static void flatten_tree(struct node *tree, struct emitter *emit, @@ -127805,17 +127805,17 @@ index bd99fa2..f439b40 100644 } diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h -index 5b8c7d5..86b7338 100644 +index 5b8c7d53d608bdbb60776c97732e44cb310cc4c1..86b7338ad78fd60a0d5e5b4a44bce194ee07cc48 100644 --- a/scripts/dtc/version_gen.h +++ b/scripts/dtc/version_gen.h @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" -From 682bf3cce9aab7644697e66b2a3e3e9ae5ccdf1c Mon Sep 17 00:00:00 2001 +From 99acfdaf21130f5abbb6f35b20a34f4ec0326b63 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 079/251] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 079/398] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -127839,7 +127839,7 @@ Subject: [PATCH 079/251] mfd: Add Raspberry Pi Sense HAT core driver create mode 100644 include/linux/mfd/rpisense/joystick.h diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig -index 4215b53..4364d7c 100644 +index 4215b5382092c15d693e62de6e029626e9fa551d..4364d7c85543b4537c839df95cf5b524948a06c2 100644 --- a/drivers/input/joystick/Kconfig +++ b/drivers/input/joystick/Kconfig @@ -330,4 +330,12 @@ config JOYSTICK_MAPLE @@ -127856,7 +127856,7 @@ index 4215b53..4364d7c 100644 + endif diff --git a/drivers/input/joystick/Makefile b/drivers/input/joystick/Makefile -index 92dc0de..1758160 100644 +index 92dc0de9dfeda43171a901f96c40bebe0e7a5ae2..1758160374938dd150b8a380797b6decc00a64aa 100644 --- a/drivers/input/joystick/Makefile +++ b/drivers/input/joystick/Makefile @@ -32,4 +32,5 @@ obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o @@ -127867,7 +127867,7 @@ index 92dc0de..1758160 100644 diff --git a/drivers/input/joystick/rpisense-js.c b/drivers/input/joystick/rpisense-js.c new file mode 100644 -index 0000000..6a41676 +index 0000000000000000000000000000000000000000..6a416769065d2198344792eb02d8e38da1d03fd4 --- /dev/null +++ b/drivers/input/joystick/rpisense-js.c @@ -0,0 +1,153 @@ @@ -128025,7 +128025,7 @@ index 0000000..6a41676 +MODULE_AUTHOR("Serge Schneider "); +MODULE_LICENSE("GPL"); diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig -index 4d92df6..c5730dc 100644 +index 4d92df6ef9fe92ac69c6f26e99e33f83e7e2ac71..c5730dc627440f87f424a6c47a4bf0a7a3bf1f9d 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -10,6 +10,14 @@ config MFD_CORE @@ -128044,7 +128044,7 @@ index 4d92df6..c5730dc 100644 tristate "AMD CS5535 and CS5536 southbridge core functions" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile -index a8b76b8..e6339d2 100644 +index a8b76b81b467987383c7a857f2dc5f0620a5b4dc..e6339d283525b49ca6bddbcc4d7ba59a044d3926 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -194,3 +194,5 @@ intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o @@ -128055,7 +128055,7 @@ index a8b76b8..e6339d2 100644 +obj-$(CONFIG_MFD_RPISENSE_CORE) += rpisense-core.o diff --git a/drivers/mfd/rpisense-core.c b/drivers/mfd/rpisense-core.c new file mode 100644 -index 0000000..eea9312 +index 0000000000000000000000000000000000000000..eea9312dc96a496ce846b0c5a83e6e4f3be5ee1e --- /dev/null +++ b/drivers/mfd/rpisense-core.c @@ -0,0 +1,157 @@ @@ -128217,10 +128217,10 @@ index 0000000..eea9312 +MODULE_LICENSE("GPL"); + diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig -index 0f33a78..4caa417 100644 +index 8da620f0b20ce4f1badcba83efdc2d2e5274c135..6fbf6986e104571a9ab275a68001d4906d80af45 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig -@@ -2506,3 +2506,16 @@ config FB_SM712 +@@ -2505,3 +2505,16 @@ config FB_SM712 This driver is also available as a module. The module will be called sm712fb. If you want to compile it as a module, say M here and read . @@ -128238,7 +128238,7 @@ index 0f33a78..4caa417 100644 + help + This is the framebuffer driver for the Raspberry Pi Sense HAT diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile -index 9b086ac..7101277 100644 +index 9b086ac5fd5bb1a44460b91a2cf421e67958b6fc..7101277a0704df847796525f1b9e4a8a37d2d6a6 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -150,6 +150,7 @@ obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o @@ -128251,7 +128251,7 @@ index 9b086ac..7101277 100644 obj-$(CONFIG_FB_VIRTUAL) += vfb.o diff --git a/drivers/video/fbdev/rpisense-fb.c b/drivers/video/fbdev/rpisense-fb.c new file mode 100644 -index 0000000..26432a5 +index 0000000000000000000000000000000000000000..26432a5a0b4b4a5198768eceb1e34da99fe1efb2 --- /dev/null +++ b/drivers/video/fbdev/rpisense-fb.c @@ -0,0 +1,293 @@ @@ -128550,7 +128550,7 @@ index 0000000..26432a5 + diff --git a/include/linux/mfd/rpisense/core.h b/include/linux/mfd/rpisense/core.h new file mode 100644 -index 0000000..4856aa3 +index 0000000000000000000000000000000000000000..4856aa3c8b0661647ec1b5466d3a8743c02b1ddb --- /dev/null +++ b/include/linux/mfd/rpisense/core.h @@ -0,0 +1,47 @@ @@ -128603,7 +128603,7 @@ index 0000000..4856aa3 +#endif diff --git a/include/linux/mfd/rpisense/framebuffer.h b/include/linux/mfd/rpisense/framebuffer.h new file mode 100644 -index 0000000..2ba95d7 +index 0000000000000000000000000000000000000000..2ba95d7eebaf9ccce910b43835286df94cb7d075 --- /dev/null +++ b/include/linux/mfd/rpisense/framebuffer.h @@ -0,0 +1,32 @@ @@ -128641,7 +128641,7 @@ index 0000000..2ba95d7 +#endif diff --git a/include/linux/mfd/rpisense/joystick.h b/include/linux/mfd/rpisense/joystick.h new file mode 100644 -index 0000000..56196dc +index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c9c9cff39 --- /dev/null +++ b/include/linux/mfd/rpisense/joystick.h @@ -0,0 +1,35 @@ @@ -128681,10 +128681,10 @@ index 0000000..56196dc + +#endif -From 28fda0b00b2fe4e5a5151024124e57a3821c1ec4 Mon Sep 17 00:00:00 2001 +From 12b86e42a9d0ea0501508c8e0317c92263c0952f Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 080/251] RaspiDAC3 support +Subject: [PATCH 080/398] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -128702,7 +128702,7 @@ Signed-off-by: Matthias Reichl create mode 100644 sound/soc/bcm/raspidac3.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8669a9a..1a3f826 100644 +index 8669a9ac9734c465c7dc3f40c864f71b68a6de75..1a3f8264403d64690fef60d41df38d21d3eb6030 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -56,3 +56,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC @@ -128718,7 +128718,7 @@ index 8669a9a..1a3f826 100644 + help + Say Y or M if you want to add support for RaspiDAC Rev.3x. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 4f5ab1f..b21e11e 100644 +index 4f5ab1fa4414e64a164eaa4575ffaa06d1cbf332..b21e11ee36e17a29bfae9c4eda78f73ca9c23d48 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -11,6 +11,7 @@ snd-soc-hifiberry-amp-objs := hifiberry_amp.o @@ -128736,7 +128736,7 @@ index 4f5ab1f..b21e11e 100644 +obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o diff --git a/sound/soc/bcm/raspidac3.c b/sound/soc/bcm/raspidac3.c new file mode 100644 -index 0000000..3cabf5b +index 0000000000000000000000000000000000000000..3cabf5b42f50c708443c44fec30e0b8701cc7196 --- /dev/null +++ b/sound/soc/bcm/raspidac3.c @@ -0,0 +1,191 @@ @@ -128932,10 +128932,10 @@ index 0000000..3cabf5b +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 852162b9ea81d2a87bd17ad36b1e347dd02039e2 Mon Sep 17 00:00:00 2001 +From f820357b8325fdfc8a2b670752da5f7565cb9f78 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:02:34 +0100 -Subject: [PATCH 081/251] tpa6130a2: Add headphone switch control +Subject: [PATCH 081/398] tpa6130a2: Add headphone switch control Signed-off-by: Jan Grulich --- @@ -128943,7 +128943,7 @@ Signed-off-by: Jan Grulich 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c -index 11d85c5..3caaa17 100644 +index 11d85c5c787addb8d8add7fc2b52ab91cc49b63d..3caaa17e28e91e995d6781ca7f88b747da542e9b 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -4,6 +4,7 @@ @@ -129026,17 +129026,17 @@ index 11d85c5..3caaa17 100644 /* -From a75c4939c66e03c683d86b01d793d28c074818eb Mon Sep 17 00:00:00 2001 +From a69891f08f15f21a2d2c16cf80cbe8c2ff191a91 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Sep 2015 23:38:59 +0100 -Subject: [PATCH 082/251] irq-bcm2835: Fix building with 2708 +Subject: [PATCH 082/398] irq-bcm2835: Fix building with 2708 --- drivers/irqchip/irq-bcm2835.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c -index 20deb28..c02bf8a 100644 +index 20deb282286834b1f234a65e614b8584688a25d7..c02bf8a9f9970401dc98c4f656c20c35d8070123 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -82,6 +82,7 @@ @@ -129057,10 +129057,10 @@ index 20deb28..c02bf8a 100644 } init_FIQ(FIQ_START); -From ef612ffab83e04751eca4f4d4a5017fecaab9cae Mon Sep 17 00:00:00 2001 +From 4c55aeef8eafa8be7e31181a26ddaf086c08632c Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 083/251] rpi_display: add backlight driver and overlay +Subject: [PATCH 083/398] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -129082,7 +129082,7 @@ Signed-off-by: Gordon Hollingworth create mode 100644 drivers/video/backlight/rpi_backlight.c diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index d8c2771..fb7ac49 100644 +index d8c2771cfd22aa73100220a6ba3cb8833b19004f..fb7ac496e7a179daf720bdeba503e33381c96191 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -38,6 +38,7 @@ dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb @@ -129094,7 +129094,7 @@ index d8c2771..fb7ac49 100644 dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 268d400..d7f2979 100644 +index 268d400a3500e6a257cca90ba54d97bebdf797fe..d7f2979dfe1cb516a70d0cc0a68301976ef86f74 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -462,6 +462,12 @@ Load: dtoverlay=raspidac3 @@ -129112,7 +129112,7 @@ index 268d400..d7f2979 100644 Load: dtoverlay=rpi-dac diff --git a/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts b/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts new file mode 100644 -index 0000000..c021d02 +index 0000000000000000000000000000000000000000..c021d02bb75ff5ceb5c5066d00e4bca942554032 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts @@ -0,0 +1,21 @@ @@ -129138,7 +129138,7 @@ index 0000000..c021d02 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 16062bf..13999af 100644 +index 16062bf9ef94dba59e63928d4f4c77e2cfab6e69..13999af72f2a90c4485eacc8bf0af74f3c6af1d5 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -808,6 +808,7 @@ CONFIG_FB_UDL=m @@ -129150,7 +129150,7 @@ index 16062bf..13999af 100644 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 1d1b799..146add9 100644 +index 1d1b7997ba53542b6ebba750c1243a5870f38478..146add9db493d15005ece554cc0694d8b815dda4 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -801,6 +801,7 @@ CONFIG_FB_UDL=m @@ -129162,7 +129162,7 @@ index 1d1b799..146add9 100644 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig -index 5ffa4b4..c3023ab 100644 +index 5ffa4b4e26c0e874d3f63068456b3d72d8b4beb5..c3023ab052b477dde522a262a360ec312e94de22 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -265,6 +265,12 @@ config BACKLIGHT_PWM @@ -129179,7 +129179,7 @@ index 5ffa4b4..c3023ab 100644 tristate "Backlight Driver for DA9030/DA9034 using WLED" depends on PMIC_DA903X diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile -index 16ec534..00eff87 100644 +index 16ec534cff3044209adbae3495c19d97fee3ef73..00eff87fb3391300e78f055fa05d3b9647fa053d 100644 --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile @@ -50,6 +50,7 @@ obj-$(CONFIG_BACKLIGHT_PANDORA) += pandora_bl.o @@ -129192,7 +129192,7 @@ index 16ec534..00eff87 100644 obj-$(CONFIG_BACKLIGHT_TOSA) += tosa_bl.o diff --git a/drivers/video/backlight/rpi_backlight.c b/drivers/video/backlight/rpi_backlight.c new file mode 100644 -index 0000000..14a0d9b +index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd509fcbaad --- /dev/null +++ b/drivers/video/backlight/rpi_backlight.c @@ -0,0 +1,119 @@ @@ -129316,7 +129316,7 @@ index 0000000..14a0d9b +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 525816d..b011489 100644 +index 525816d7547e4aa1703d5b4283f5f39dbf92f7d7..b011489eebc0180fce28eea86bd637853c0d05de 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -112,6 +112,7 @@ enum rpi_firmware_property_tag { @@ -129328,17 +129328,17 @@ index 525816d..b011489 100644 RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 9e683aed13baf656729ca37b7efb70d595781f85 Mon Sep 17 00:00:00 2001 +From 488717703ff08168d900b443ce1e18adf5216fbe Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 16 Nov 2015 14:05:35 +0000 -Subject: [PATCH 084/251] bcm2835-dma: Fix up convert to DMA pool +Subject: [PATCH 084/398] bcm2835-dma: Fix up convert to DMA pool --- drivers/dma/bcm2835-dma.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 0adc347..985019b 100644 +index 0adc347fe5de46196aee65e86e9a4e3dcc7349f0..985019b72456f65ddbb54c3bfa49e18dffe4285c 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -488,6 +488,17 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( @@ -129416,10 +129416,10 @@ index 0adc347..985019b 100644 /* Next block is empty. */ control_block->next = 0; -From 17d171c260c02491c27b1d89e84c09053f825ac2 Mon Sep 17 00:00:00 2001 +From 4076b2d4454f2767b8d52bb26ab2d2468e36ad55 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 Nov 2015 11:38:59 +0000 -Subject: [PATCH 085/251] scripts: Multi-platform support for mkknlimg and +Subject: [PATCH 085/398] scripts: Multi-platform support for mkknlimg and knlinfo The firmware uses tags in the kernel trailer to choose which dtb file @@ -129437,7 +129437,7 @@ builds. 2 files changed, 80 insertions(+), 58 deletions(-) diff --git a/scripts/knlinfo b/scripts/knlinfo -index a0e8663..b9ef124 100755 +index a0e8663ae86b97ecded54bd469ac4ffe84eb2684..b9ef124fa033fddc8847cf1586a6108f4e5eda04 100755 --- a/scripts/knlinfo +++ b/scripts/knlinfo @@ -18,6 +18,8 @@ my %atom_formats = @@ -129450,7 +129450,7 @@ index a0e8663..b9ef124 100755 ); diff --git a/scripts/mkknlimg b/scripts/mkknlimg -index 3998d43..005f404 100755 +index 3998d43b694ff06fd9562b89f5a7be26b4cb6e15..005f404f572029822bb5bea32774a7c26d7141e5 100755 --- a/scripts/mkknlimg +++ b/scripts/mkknlimg @@ -13,12 +13,20 @@ use strict; @@ -129668,10 +129668,10 @@ index 3998d43..005f404 100755 - return (($val eq 'y') || ($val eq '1')); -} -From 3daa279385ccf4297bb8beb5b1f770ea535e7245 Mon Sep 17 00:00:00 2001 +From ca59628f8b7f04ce3fb4f80cd119afc9ad865fa4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 2 Mar 2015 13:01:12 -0800 -Subject: [PATCH 086/251] drm/vc4: Add suport for 3D rendering using the V3D +Subject: [PATCH 086/398] drm/vc4: Add suport for 3D rendering using the V3D engine. This is a squash of the out-of-tree development series. Since that @@ -129716,7 +129716,7 @@ Signed-off-by: Eric Anholt create mode 100644 include/uapi/drm/vc4_drm.h diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile -index 32b4f9c..4c6a99f 100644 +index 32b4f9cd8f5267b1176f1221f6324df60d0a5951..4c6a99f0398c03ce5d83dea1ec3f7906a817bf89 100644 --- a/drivers/gpu/drm/vc4/Makefile +++ b/drivers/gpu/drm/vc4/Makefile @@ -8,10 +8,19 @@ vc4-y := \ @@ -129741,7 +129741,7 @@ index 32b4f9c..4c6a99f 100644 + +CFLAGS_vc4_trace_points.o := -I$(src) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index ab9f510..bfa605f 100644 +index ab9f5108ae1ab1650af40fd9395cde751a3b25a4..bfa605f68e9459585de68d872a0fe5596b6819cc 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -15,16 +15,174 @@ @@ -130244,7 +130244,7 @@ index ab9f510..bfa605f 100644 +} +#endif diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c -index 265064c..3be2720 100644 +index 265064c62d493b54023947d49597852a16328a5f..3be272047820ac8f809839f252a1f8bdba2ac97c 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -35,6 +35,7 @@ @@ -130363,7 +130363,7 @@ index 265064c..3be2720 100644 .cursor_set = NULL, /* handled by drm_mode_cursor_universal */ .cursor_move = NULL, /* handled by drm_mode_cursor_universal */ diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c -index 4297b0a..d76ad10 100644 +index 4297b0a5b74e1be08a0933a89660958b2e61b824..d76ad10b07fda3bb674f45c2151e621c60633364 100644 --- a/drivers/gpu/drm/vc4/vc4_debugfs.c +++ b/drivers/gpu/drm/vc4/vc4_debugfs.c @@ -16,11 +16,14 @@ @@ -130382,7 +130382,7 @@ index 4297b0a..d76ad10 100644 #define VC4_DEBUGFS_ENTRIES ARRAY_SIZE(vc4_debugfs_list) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index d5db9e0..3baf1fc 100644 +index d5db9e0f3b736ee1acc07888f59c4650aaa84287..3baf1fcb8e875064c009d2120203e42fa624db9b 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -14,8 +14,10 @@ @@ -130529,7 +130529,7 @@ index d5db9e0..3baf1fc 100644 static int vc4_platform_drm_probe(struct platform_device *pdev) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index fd8319f..8cc89d1 100644 +index fd8319fa682ecc64bd10cff71c0a5fbf1247c213..8cc89d125bbf5ed90875dc7c94aee171571f4830 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -15,8 +15,85 @@ struct vc4_dev { @@ -130906,7 +130906,7 @@ index fd8319f..8cc89d1 100644 + uint32_t width, uint32_t height, uint8_t cpp); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c new file mode 100644 -index 0000000..361390b +index 0000000000000000000000000000000000000000..361390b5febd6f97e69b395f6d3c5e3f60a122fe --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -0,0 +1,686 @@ @@ -131598,7 +131598,7 @@ index 0000000..361390b +} diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c new file mode 100644 -index 0000000..f29b796 +index 0000000000000000000000000000000000000000..f29b7961695ce3f6a09c249a63e8cd25f35a91a7 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -0,0 +1,211 @@ @@ -131814,7 +131814,7 @@ index 0000000..f29b796 + spin_unlock_irqrestore(&vc4->job_lock, irqflags); +} diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c -index 2e5597d..c83287a 100644 +index 2e5597d10cc629e08ccde726a64d6e36da69a48f..c83287af8c897d36b65c045c7663121901d43592 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -15,6 +15,7 @@ @@ -131998,7 +131998,7 @@ index 2e5597d..c83287a 100644 drm_mode_config_reset(dev); diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h new file mode 100644 -index 0000000..9757bc8 +index 0000000000000000000000000000000000000000..9757bc8d3c0d274b7c878cc0bb65cb81b7fdc9fa --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -0,0 +1,384 @@ @@ -132387,7 +132387,7 @@ index 0000000..9757bc8 + +#endif /* VC4_PACKET_H */ diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c -index 887f3ca..65e5455 100644 +index 887f3caad0be6b6fd115b4e9430abfd3aeadd53f..65e545555c21f9fb709d4542f7e89274fdc63eca 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -29,6 +29,14 @@ struct vc4_plane_state { @@ -132460,7 +132460,7 @@ index 887f3ca..65e5455 100644 .cleanup_fb = NULL, diff --git a/drivers/gpu/drm/vc4/vc4_qpu_defines.h b/drivers/gpu/drm/vc4/vc4_qpu_defines.h new file mode 100644 -index 0000000..e47c994 +index 0000000000000000000000000000000000000000..e47c994d36bf81ef350041ce0aad9f68a82417f4 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_qpu_defines.h @@ -0,0 +1,268 @@ @@ -132734,7 +132734,7 @@ index 0000000..e47c994 +#endif /* VC4_QPU_DEFINES_H */ diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c new file mode 100644 -index 0000000..0ffac8d +index 0000000000000000000000000000000000000000..0ffac8df92cd3ee5be1de1368a5964ae62560741 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -0,0 +1,448 @@ @@ -133188,7 +133188,7 @@ index 0000000..0ffac8d +} diff --git a/drivers/gpu/drm/vc4/vc4_trace.h b/drivers/gpu/drm/vc4/vc4_trace.h new file mode 100644 -index 0000000..ad7b1ea +index 0000000000000000000000000000000000000000..ad7b1ea720c288eb587d16e5f8e10eace5de93f3 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_trace.h @@ -0,0 +1,63 @@ @@ -133257,7 +133257,7 @@ index 0000000..ad7b1ea +#include diff --git a/drivers/gpu/drm/vc4/vc4_trace_points.c b/drivers/gpu/drm/vc4/vc4_trace_points.c new file mode 100644 -index 0000000..e6278f2 +index 0000000000000000000000000000000000000000..e6278f25716b72121560595fc5df976bc4870b4f --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_trace_points.c @@ -0,0 +1,14 @@ @@ -133277,7 +133277,7 @@ index 0000000..e6278f2 +#endif diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c new file mode 100644 -index 0000000..b9cb7cf +index 0000000000000000000000000000000000000000..b9cb7cf40082c625cefd3b7048b1bace95489869 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -0,0 +1,268 @@ @@ -133551,7 +133551,7 @@ index 0000000..b9cb7cf +}; diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c new file mode 100644 -index 0000000..ff3b62f +index 0000000000000000000000000000000000000000..ff3b62fbc920b05745d35f1b69c4a1b6ad5f83ba --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -0,0 +1,958 @@ @@ -134515,7 +134515,7 @@ index 0000000..ff3b62f +} diff --git a/drivers/gpu/drm/vc4/vc4_validate_shaders.c b/drivers/gpu/drm/vc4/vc4_validate_shaders.c new file mode 100644 -index 0000000..0aab9d7 +index 0000000000000000000000000000000000000000..0aab9d72bec4744028c124d8d578fe8712010dc7 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c @@ -0,0 +1,521 @@ @@ -135042,7 +135042,7 @@ index 0000000..0aab9d7 +} diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h new file mode 100644 -index 0000000..499daae +index 0000000000000000000000000000000000000000..499daae549a559e85fec9ed4216460a2cb7872c9 --- /dev/null +++ b/include/uapi/drm/vc4_drm.h @@ -0,0 +1,229 @@ @@ -135276,10 +135276,10 @@ index 0000000..499daae + +#endif /* _UAPI_VC4_DRM_H_ */ -From 666602424fba993b28229ce2133ff8d2a16b248e Mon Sep 17 00:00:00 2001 +From b33b506d4d789214569241f6bc54934a5ecfede3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Oct 2015 11:32:14 -0700 -Subject: [PATCH 087/251] drm/vc4: Force HDMI to connected. +Subject: [PATCH 087/398] drm/vc4: Force HDMI to connected. For some reason on the downstream tree, the HPD GPIO isn't working. @@ -135289,7 +135289,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c -index da9a36d..d15c529 100644 +index da9a36d6e1d18164282222cb8530348bfba8da37..d15c529bee2123eb740247bdfbc67eb4b0311f2b 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -164,6 +164,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) @@ -135302,10 +135302,10 @@ index da9a36d..d15c529 100644 if (gpio_get_value(vc4->hdmi->hpd_gpio)) return connector_status_connected; -From 83244506ffc629eb672d74f1e075d25188b4d081 Mon Sep 17 00:00:00 2001 +From 2184193072955bbc39806612500d67aebd05c6a8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:23:18 -0700 -Subject: [PATCH 088/251] drm/vc4: bo cache locking fixes. +Subject: [PATCH 088/398] drm/vc4: bo cache locking fixes. Signed-off-by: Eric Anholt --- @@ -135314,7 +135314,7 @@ Signed-off-by: Eric Anholt 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index bfa605f..af0fde6 100644 +index bfa605f68e9459585de68d872a0fe5596b6819cc..af0fde6ea8cd594f90b55eb13f1183d06797f957 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -112,14 +112,14 @@ void vc4_bo_cache_purge(struct drm_device *dev) @@ -135441,7 +135441,7 @@ index bfa605f..af0fde6 100644 seq_printf(m, "num bos allocated: %d\n", stats.num_allocated); seq_printf(m, "size bos allocated: %dkb\n", stats.size_allocated / 1024); diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 8cc89d1..c079b82 100644 +index 8cc89d125bbf5ed90875dc7c94aee171571f4830..c079b8253c653f776654c02072221b6a67c1b274 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -49,7 +49,7 @@ struct vc4_dev { @@ -135454,10 +135454,10 @@ index 8cc89d1..c079b82 100644 /* Sequence number for the last job queued in job_list. * Starts at 0 (no jobs emitted). -From 149b9d3feccb3fcc379d91cacc35fa8e6ce59dd1 Mon Sep 17 00:00:00 2001 +From 00ce428786e4dac155c5414303d23ec6e0818b20 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:29:41 -0700 -Subject: [PATCH 089/251] drm/vc4: bo cache locking cleanup. +Subject: [PATCH 089/398] drm/vc4: bo cache locking cleanup. Signed-off-by: Eric Anholt --- @@ -135465,7 +135465,7 @@ Signed-off-by: Eric Anholt 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index af0fde6..acd360c 100644 +index af0fde6ea8cd594f90b55eb13f1183d06797f957..acd360c89e14740c7a32889e58575dd138edf654 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -215,7 +215,6 @@ vc4_bo_cache_free_old(struct drm_device *dev) @@ -135549,10 +135549,10 @@ index af0fde6..acd360c 100644 static void vc4_bo_cache_time_timer(unsigned long data) -From 7a42f6a5addb1961f016f14ef9010bdc19565a77 Mon Sep 17 00:00:00 2001 +From 3c69ea7fcc18ecae1f640de1a0cfd808d277d52b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:32:24 -0700 -Subject: [PATCH 090/251] drm/vc4: Use job_lock to protect seqno_cb_list. +Subject: [PATCH 090/398] drm/vc4: Use job_lock to protect seqno_cb_list. We're (mostly) not supposed to be using struct_mutex in drivers these days. @@ -135563,7 +135563,7 @@ Signed-off-by: Eric Anholt 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 361390b..b1853b2 100644 +index 361390b5febd6f97e69b395f6d3c5e3f60a122fe..b1853b217a919fbed64aa8680f7974c36f58d3a3 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -474,7 +474,6 @@ vc4_job_handle_completed(struct vc4_dev *vc4) @@ -135606,10 +135606,10 @@ index 361390b..b1853b2 100644 return ret; } -From bf31c306877aef83b109356b8471a69590d0a915 Mon Sep 17 00:00:00 2001 +From a6acf91fd2518806ed87e75a2188b37451b19f76 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 091/251] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 091/398] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135625,7 +135625,7 @@ Signed-off-by: Eric Anholt 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index b1853b2..32f375a 100644 +index b1853b217a919fbed64aa8680f7974c36f58d3a3..32f375ad7b7211e1fcd226f50af4e755b89b2fb9 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -244,13 +244,15 @@ static void @@ -135672,10 +135672,10 @@ index b1853b2..32f375a 100644 } -From 90604ba9389fd34efcd5c4266fd9d4604f1543e4 Mon Sep 17 00:00:00 2001 +From d8389dbf870e5dd81ff1043f329df1a6baaf80e3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 092/251] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 092/398] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135692,7 +135692,7 @@ Signed-off-by: Eric Anholt 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 32f375a..55551ea 100644 +index 32f375ad7b7211e1fcd226f50af4e755b89b2fb9..55551ea7467941ae057a10c094f79e16125877b8 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -439,10 +439,12 @@ fail: @@ -135749,10 +135749,10 @@ index 32f375a..55551ea 100644 return ret; } -From dcdfacf7cbb2ad8feb6c11326919b7482b2ac3cd Mon Sep 17 00:00:00 2001 +From 91141c5d2fba78ccc9ae78e23d7bd6e31be03b6a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 20 Oct 2015 13:59:15 +0100 -Subject: [PATCH 093/251] drm/vc4: Add support for more display plane formats. +Subject: [PATCH 093/398] drm/vc4: Add support for more display plane formats. Signed-off-by: Eric Anholt --- @@ -135760,7 +135760,7 @@ Signed-off-by: Eric Anholt 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c -index 65e5455..0f85eb5 100644 +index 65e545555c21f9fb709d4542f7e89274fdc63eca..0f85eb5b9f3d49fb24f3981eafca964af552db79 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -59,6 +59,22 @@ static const struct hvs_format { @@ -135787,10 +135787,10 @@ index 65e5455..0f85eb5 100644 static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) -From 4f981196d46dcd9576c87c957b15acc0a68dcca8 Mon Sep 17 00:00:00 2001 +From 9eaae76052f3a9c81a97bbf3a5565002426ce43f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:31:56 +0100 -Subject: [PATCH 094/251] drm/vc4: No need to stop the stopped threads. +Subject: [PATCH 094/398] drm/vc4: No need to stop the stopped threads. This was leftover debug code from the hackdriver. We never submit unless the thread is already idle. @@ -135801,7 +135801,7 @@ Signed-off-by: Eric Anholt 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 55551ea..eeb0925 100644 +index 55551ea7467941ae057a10c094f79e16125877b8..eeb092570ca5cd489e5646334fa10f89063bc5ab 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -104,10 +104,6 @@ submit_cl(struct drm_device *dev, uint32_t thread, uint32_t start, uint32_t end) @@ -135816,10 +135816,10 @@ index 55551ea..eeb0925 100644 barrier(); -From adb820489d061187ae01daa98ab1a404dbe5cd86 Mon Sep 17 00:00:00 2001 +From d41506b3daf5d060c33d87e9fde96f6abafdfb68 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:33:43 +0100 -Subject: [PATCH 095/251] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA +Subject: [PATCH 095/398] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA setup. The writel() that these expand to already does barriers. @@ -135830,7 +135830,7 @@ Signed-off-by: Eric Anholt 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index eeb0925..0cea723 100644 +index eeb092570ca5cd489e5646334fa10f89063bc5ab..0cea723721635ece743729cf5abc9d82d71d7aa6 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -104,14 +104,11 @@ submit_cl(struct drm_device *dev, uint32_t thread, uint32_t start, uint32_t end) @@ -135852,10 +135852,10 @@ index eeb0925..0cea723 100644 int -From 90058bcf1d4a588a3ddba5e78e1f998a33d2d5b1 Mon Sep 17 00:00:00 2001 +From 7d80add214fc35cf8216fb946d291a8bd10345f1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 14:57:22 +0100 -Subject: [PATCH 096/251] drm/vc4: Fix a typo in a V3D debug register. +Subject: [PATCH 096/398] drm/vc4: Fix a typo in a V3D debug register. Signed-off-by: Eric Anholt --- @@ -135864,7 +135864,7 @@ Signed-off-by: Eric Anholt 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h -index 9e4e904..4e52a0a 100644 +index 9e4e904c668e8398c16368b888704ee7ec2dba93..4e52a0a885515252befc2fdf7abf99b707ae4bef 100644 --- a/drivers/gpu/drm/vc4/vc4_regs.h +++ b/drivers/gpu/drm/vc4/vc4_regs.h @@ -154,7 +154,7 @@ @@ -135877,7 +135877,7 @@ index 9e4e904..4e52a0a 100644 #define V3D_FDBGB 0x00f08 #define V3D_FDBGR 0x00f0c diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index b9cb7cf..cf35f58 100644 +index b9cb7cf40082c625cefd3b7048b1bace95489869..cf35f587656dd76b15cc7a6a1992473fd31877cd 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -99,7 +99,7 @@ static const struct { @@ -135890,10 +135890,10 @@ index b9cb7cf..cf35f58 100644 REGDEF(V3D_FDBGB), REGDEF(V3D_FDBGR), -From fa03eea2a7fd499bd9254430e4396cf91aa96d39 Mon Sep 17 00:00:00 2001 +From a0dfbf05c6a77450ac1f6ad54c908ff9bb662ea7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 2 Nov 2015 17:07:33 +0000 -Subject: [PATCH 097/251] drm/vc4: Enable VC4 modules, and increase CMA size +Subject: [PATCH 097/398] drm/vc4: Enable VC4 modules, and increase CMA size with overlay If using the overlay, be careful not to boot to GUI or run startx, @@ -135907,7 +135907,7 @@ or the Pi will almost hang, reporting stalls in kernel threads. create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d7f2979..1fa98ce 100644 +index d7f2979dfe1cb516a70d0cc0a68301976ef86f74..1fa98ce6940862678c09c8d90945c886fe3b3fc2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -601,6 +601,14 @@ Params: txd1_pin GPIO pin for TXD1 (14, 32 or 40 - default 14) @@ -135927,7 +135927,7 @@ index d7f2979..1fa98ce 100644 This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts new file mode 100644 -index 0000000..cf5d5c9 +index 0000000000000000000000000000000000000000..cf5d5c9b502499d119ef604aa754eed7e17b1c01 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts @@ -0,0 +1,95 @@ @@ -136027,7 +136027,7 @@ index 0000000..cf5d5c9 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 13999af..4e474c7 100644 +index 13999af72f2a90c4485eacc8bf0af74f3c6af1d5..4e474c770b0025fe57f9cd0cd88f788526f835bb 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -802,6 +802,8 @@ CONFIG_VIDEO_TW9903=m @@ -136040,7 +136040,7 @@ index 13999af..4e474c7 100644 CONFIG_FB_BCM2708=y CONFIG_FB_UDL=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 146add9..d6aa058 100644 +index 146add9db493d15005ece554cc0694d8b815dda4..d6aa058157fb47390c30fe2d92fb746d7de228e9 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -795,6 +795,8 @@ CONFIG_VIDEO_TW9903=m @@ -136053,10 +136053,10 @@ index 146add9..d6aa058 100644 CONFIG_FB_BCM2708=y CONFIG_FB_UDL=m -From de2afd5a8db4a62e65057ace15fe15b498074dff Mon Sep 17 00:00:00 2001 +From 10ff359708188f2146c6f8323b99a7af01a703d7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 18:29:58 +0000 -Subject: [PATCH 098/251] squash: fixups +Subject: [PATCH 098/398] squash: fixups --- drivers/gpu/drm/vc4/Kconfig | 2 +- @@ -136065,7 +136065,7 @@ Subject: [PATCH 098/251] squash: fixups 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig -index 2d7d115..71f019f 100644 +index 2d7d115ddf3fae6558ab42d80255917c5eabad1a..71f019f603da21f66453518a02c224e2ed722ed7 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -1,6 +1,6 @@ @@ -136077,7 +136077,7 @@ index 2d7d115..71f019f 100644 select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 3baf1fc..e2a2be2 100644 +index 3baf1fcb8e875064c009d2120203e42fa624db9b..e2a2be2901777e87d3c6fc5c0d360be09639c4bb 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -127,7 +127,7 @@ static struct drm_driver vc4_drm_driver = { @@ -136090,7 +136090,7 @@ index 3baf1fc..e2a2be2 100644 .name = DRIVER_NAME, .desc = DRIVER_DESC, diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c -index c83287a..2082713 100644 +index c83287af8c897d36b65c045c7663121901d43592..208271363eb33e1b1e85a63b76f1a43bfef20e0a 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -45,7 +45,7 @@ vc4_atomic_complete_commit(struct vc4_commit *c) @@ -136103,10 +136103,10 @@ index c83287a..2082713 100644 drm_atomic_helper_commit_modeset_enables(dev, state); -From 454534cc445c73a8d95814b1bf8e2ef67f3c4f41 Mon Sep 17 00:00:00 2001 +From 3bf474e9ac7f8fa99770ae68950acba4e7b3cc88 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 20:26:03 +0000 -Subject: [PATCH 099/251] squash: add missing vc4-kms-v3d-overlay.dtb to +Subject: [PATCH 099/398] squash: add missing vc4-kms-v3d-overlay.dtb to makefile --- @@ -136114,7 +136114,7 @@ Subject: [PATCH 099/251] squash: add missing vc4-kms-v3d-overlay.dtb to 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index fb7ac49..fc09bfb 100644 +index fb7ac496e7a179daf720bdeba503e33381c96191..fc09bfbcaf615e830267fd24def970f0f8792041 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -52,6 +52,7 @@ dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb @@ -136126,10 +136126,10 @@ index fb7ac49..fc09bfb 100644 dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb -From 971c63d209cdcdeec8eba9211e9f75add0c6b10b Mon Sep 17 00:00:00 2001 +From 24b66c3910512f81e9ad0566dad0942075cc1dcb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 12 Oct 2015 11:23:34 -0700 -Subject: [PATCH 100/251] clk: bcm2835: Also build the driver for downstream +Subject: [PATCH 100/398] clk: bcm2835: Also build the driver for downstream kernels. Signed-off-by: Eric Anholt @@ -136138,7 +136138,7 @@ Signed-off-by: Eric Anholt 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index 3fc9506..a1b4cbc 100644 +index 3fc95060d875e8607696c61bece2020613f4fdb1..a1b4cbcae647e7c3a2cc6d3a7e7e1505d50e24d4 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o @@ -136151,10 +136151,10 @@ index 3fc9506..a1b4cbc 100644 obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o -From 64297bcfecf13b8fa1939fc725b772875157b0a4 Mon Sep 17 00:00:00 2001 +From 7d8073299ca19b2b800606db047cda167909769f Mon Sep 17 00:00:00 2001 From: Holger Steinhaus Date: Sat, 14 Nov 2015 18:37:43 +0100 -Subject: [PATCH 101/251] dts: Added overlay for gpio_ir_recv driver +Subject: [PATCH 101/398] dts: Added overlay for gpio_ir_recv driver --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136164,7 +136164,7 @@ Subject: [PATCH 101/251] dts: Added overlay for gpio_ir_recv driver create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index fc09bfb..ebc3354 100644 +index fc09bfbcaf615e830267fd24def970f0f8792041..ebc3354397abda14414ebccbdd0a2648fd6088f1 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -16,6 +16,7 @@ dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb @@ -136176,7 +136176,7 @@ index fc09bfb..ebc3354 100644 dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 1fa98ce..b4578cc 100644 +index 1fa98ce6940862678c09c8d90945c886fe3b3fc2..b4578cc7401ecca397293b8126c066d85b6e1dbb 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -196,6 +196,22 @@ Params: int_pin GPIO used for INT (default 25) @@ -136213,7 +136213,7 @@ index 1fa98ce..b4578cc 100644 gpio_in_pin GPIO for input (default "18") diff --git a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts new file mode 100644 -index 0000000..a2d6bc7 +index 0000000000000000000000000000000000000000..a2d6bc79f4cd2604e6c65c000668cbb228327fe6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts @@ -0,0 +1,45 @@ @@ -136263,10 +136263,10 @@ index 0000000..a2d6bc7 + }; +}; -From 1cb2b31fb379d569dd28ef81a69b04e748aa0a7e Mon Sep 17 00:00:00 2001 +From 8583e7672a1b5e309fc6c2580b7db601879bee5c Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Sun, 1 Nov 2015 22:27:56 +0000 -Subject: [PATCH 102/251] Build i2c_gpio module and add a device tree overlay +Subject: [PATCH 102/398] Build i2c_gpio module and add a device tree overlay to configure it. --- @@ -136279,7 +136279,7 @@ Subject: [PATCH 102/251] Build i2c_gpio module and add a device tree overlay create mode 100644 arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index ebc3354..e15d55c 100644 +index ebc3354397abda14414ebccbdd0a2648fd6088f1..e15d55c9ea18c53097a7e2b8593bf9a21965e7a8 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -25,6 +25,7 @@ dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb @@ -136291,7 +136291,7 @@ index ebc3354..e15d55c 100644 dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index b4578cc..9362443 100644 +index b4578cc7401ecca397293b8126c066d85b6e1dbb..936244334ae7a51a597d861557aa8c83d7229bf4 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -287,9 +287,20 @@ Params: speed Display SPI bus speed @@ -136318,7 +136318,7 @@ index b4578cc..9362443 100644 ds3231 Select the DS3231 device diff --git a/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts new file mode 100644 -index 0000000..2a2dc98 +index 0000000000000000000000000000000000000000..2a2dc986770cfb036492ba8de19cbaff521c5fd5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts @@ -0,0 +1,28 @@ @@ -136351,7 +136351,7 @@ index 0000000..2a2dc98 +}; + diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 4e474c7..fc35254 100644 +index 4e474c770b0025fe57f9cd0cd88f788526f835bb..fc3525411dd631e6f0032315314444644a3f6706 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -595,6 +595,7 @@ CONFIG_RAW_DRIVER=y @@ -136363,7 +136363,7 @@ index 4e474c7..fc35254 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_SPIDEV=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index d6aa058..51dc019 100644 +index d6aa058157fb47390c30fe2d92fb746d7de228e9..51dc0197b7e47dc9cdeb09cafe830ec84abf67e6 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -588,6 +588,7 @@ CONFIG_RAW_DRIVER=y @@ -136375,10 +136375,10 @@ index d6aa058..51dc019 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_SPIDEV=y -From d8810f6aa46773aab926661593de341c6bd77cae Mon Sep 17 00:00:00 2001 +From 6a9d20c03d69763ba5d30b02301798952640232e Mon Sep 17 00:00:00 2001 From: mwilliams03 Date: Sun, 18 Oct 2015 17:07:24 -0700 -Subject: [PATCH 103/251] New overlay for PiScreen2r +Subject: [PATCH 103/398] New overlay for PiScreen2r --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136388,7 +136388,7 @@ Subject: [PATCH 103/251] New overlay for PiScreen2r create mode 100644 arch/arm/boot/dts/overlays/piscreen2r-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index e15d55c..8595b14 100644 +index e15d55c9ea18c53097a7e2b8593bf9a21965e7a8..8595b1481c62dcd63a31702c02a8a247bbc06005 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -35,6 +35,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb @@ -136400,7 +136400,7 @@ index e15d55c..8595b14 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 9362443..0a21248 100644 +index 936244334ae7a51a597d861557aa8c83d7229bf4..0a212482ab59f34b2aedbb1843562ebfd3ee5f8f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -425,6 +425,20 @@ Params: speed Display SPI bus speed @@ -136426,7 +136426,7 @@ index 9362443..0a21248 100644 Load: dtoverlay=pitft28-resistive,= diff --git a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts new file mode 100644 -index 0000000..7c018e0 +index 0000000000000000000000000000000000000000..7c018e081acbb2a7c157e3305a955be165ff6105 --- /dev/null +++ b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts @@ -0,0 +1,100 @@ @@ -136531,10 +136531,10 @@ index 0000000..7c018e0 +}; + -From f2812d3b0fa2cda5f79e89235222c787bce2adac Mon Sep 17 00:00:00 2001 +From e147318d2f8e89f494562163ce902bf6d9aabb9c Mon Sep 17 00:00:00 2001 From: Ondrej Wisniewski Date: Fri, 6 Nov 2015 15:01:28 +0100 -Subject: [PATCH 104/251] dts: Added overlay for Adafruit PiTFT 2.8" capacitive +Subject: [PATCH 104/398] dts: Added overlay for Adafruit PiTFT 2.8" capacitive touch screen --- @@ -136545,7 +136545,7 @@ Subject: [PATCH 104/251] dts: Added overlay for Adafruit PiTFT 2.8" capacitive create mode 100644 arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 8595b14..7d747bc 100644 +index 8595b1481c62dcd63a31702c02a8a247bbc06005..7d747bcd7031f2430cde860e3b24e4f90ef5f72e 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -36,6 +36,7 @@ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb @@ -136557,7 +136557,7 @@ index 8595b14..7d747bc 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 0a21248..422a0d4 100644 +index 0a212482ab59f34b2aedbb1843562ebfd3ee5f8f..422a0d4462fd1bb18379486e78d8b9fb3e59cfd3 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -439,6 +439,28 @@ Params: speed Display SPI bus speed @@ -136591,7 +136591,7 @@ index 0a21248..422a0d4 100644 Load: dtoverlay=pitft28-resistive,= diff --git a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts new file mode 100644 -index 0000000..48920e9 +index 0000000000000000000000000000000000000000..48920e92365661cbb956911b8af1d6992ea801db --- /dev/null +++ b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts @@ -0,0 +1,88 @@ @@ -136684,10 +136684,10 @@ index 0000000..48920e9 + }; +}; -From bc31b90ccadb0bfeaefbe40b460be9e7fa20b7f2 Mon Sep 17 00:00:00 2001 +From a217bf740d76672654801071579c42435122b522 Mon Sep 17 00:00:00 2001 From: Stuart MacLean Date: Fri, 2 Oct 2015 15:12:59 +0100 -Subject: [PATCH 105/251] Add support for the HiFiBerry DAC+ Pro. +Subject: [PATCH 105/398] Add support for the HiFiBerry DAC+ Pro. The HiFiBerry DAC+ and DAC+ Pro products both use the existing bcm sound driver with the DAC+ Pro having a special clock device driver representing the two high precision oscillators. @@ -136702,7 +136702,7 @@ An addition bug fix is included for the PCM512x codec where by the physical size create mode 100644 drivers/clk/clk-hifiberry-dacpro.c diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts -index deb9c62..f923a48 100644 +index deb9c625fe861cc3425f975ce71821326e3f64b3..f923a48628d7472f635d25f25bd3c9badc530c9e 100644 --- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -6,6 +6,16 @@ @@ -136748,7 +136748,7 @@ index deb9c62..f923a48 100644 }; }; diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile -index 820714c..94ccf03 100644 +index 820714c72d368e29fe211d1699c9a68202c98359..94ccf03850b78320d37809c366aefbf90348ba13 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o @@ -136761,7 +136761,7 @@ index 820714c..94ccf03 100644 obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o diff --git a/drivers/clk/clk-hifiberry-dacpro.c b/drivers/clk/clk-hifiberry-dacpro.c new file mode 100644 -index 0000000..3e35d45 +index 0000000000000000000000000000000000000000..3e35d455f4559bc0100a1e268eeb200f7c10df7e --- /dev/null +++ b/drivers/clk/clk-hifiberry-dacpro.c @@ -0,0 +1,160 @@ @@ -136926,7 +136926,7 @@ index 0000000..3e35d45 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:clk-hifiberry-dacpro"); diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c -index 11e4f39..a6b651c 100644 +index 11e4f3918bfc6329074d81d12892b9ae6262a726..a6b651cb608a5d133456cf493d187951eb47a61d 100644 --- a/sound/soc/bcm/hifiberry_dacplus.c +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -1,8 +1,8 @@ @@ -137221,7 +137221,7 @@ index 11e4f39..a6b651c 100644 ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c -index 047c489..090fe0e 100644 +index 047c48953a20cd4075000ac294a17fe59baedcde..090fe0ee08e8765f9edbb62777413bb69f87d693 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -854,7 +854,8 @@ static int pcm512x_set_dividers(struct snd_soc_dai *dai, @@ -137235,10 +137235,10 @@ index 047c489..090fe0e 100644 dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 0ef9ae2d5aba6fea2fe0520a24296a8fa4b858e5 Mon Sep 17 00:00:00 2001 +From d7d3a3ee1e570c8d8a8b3fc67cb3682e099a8711 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2015 10:47:45 +0100 -Subject: [PATCH 106/251] BCM270X_DT: Add at86rf233 overlay +Subject: [PATCH 106/398] BCM270X_DT: Add at86rf233 overlay Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0. @@ -137251,7 +137251,7 @@ See: https://github.com/raspberrypi/linux/issues/1151 create mode 100644 arch/arm/boot/dts/overlays/at86rf233-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 7d747bc..be9dead 100644 +index 7d747bcd7031f2430cde860e3b24e4f90ef5f72e..be9dead2107a49d3ca7191a62c7fcea17cb45a1c 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) @@ -137263,7 +137263,7 @@ index 7d747bc..be9dead 100644 dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 422a0d4..d0ef256 100644 +index 422a0d4462fd1bb18379486e78d8b9fb3e59cfd3..d0ef256ab1b4b345b672ec320bf778227c115ed3 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -69,13 +69,14 @@ DT parameters: @@ -137314,7 +137314,7 @@ index 422a0d4..d0ef256 100644 sensors from Bosch Sensortec diff --git a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts new file mode 100644 -index 0000000..0460269 +index 0000000000000000000000000000000000000000..0460269cd6d1c0f42f1e5122ae247ff142235958 --- /dev/null +++ b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts @@ -0,0 +1,54 @@ @@ -137373,10 +137373,10 @@ index 0000000..0460269 + }; +}; -From 45d717abcc94edabe07e5909f1d984a392198921 Mon Sep 17 00:00:00 2001 +From 424995f35309f858502bd0c0ef901693d4137716 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 107/251] mm: Remove the PFN busy warning +Subject: [PATCH 107/398] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -137388,7 +137388,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index c69531a..dc484d3 100644 +index 99c1738684ece6af231473d5f3d29e19b3220f70..7d24010c6d5e7475d977f331c12db7b046b5c2d8 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6780,8 +6780,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, @@ -137401,10 +137401,10 @@ index c69531a..dc484d3 100644 goto done; } -From 11a46a37a0da7f87fc9e278178f294047110f6ab Mon Sep 17 00:00:00 2001 +From 8c8012ef4651ec2660c6faaa08e44cdaebe87c4f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Nov 2014 12:06:38 -0800 -Subject: [PATCH 108/251] drm: Put an optional field in the driver struct for +Subject: [PATCH 108/398] drm: Put an optional field in the driver struct for GEM obj struct size. This allows a driver to derive from the CMA object without copying all @@ -137417,7 +137417,7 @@ Signed-off-by: Eric Anholt 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c -index e109b49..1c25500 100644 +index e109b49cd25d59cd7e4c10a08425d39f14c90a7c..1c25500d37d1500101379480fd6b5d21f62925e8 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -58,8 +58,11 @@ __drm_gem_cma_create(struct drm_device *drm, size_t size) @@ -137434,7 +137434,7 @@ index e109b49..1c25500 100644 return ERR_PTR(-ENOMEM); diff --git a/include/drm/drmP.h b/include/drm/drmP.h -index 0a271ca..54f5469 100644 +index 0a271ca1f7c7ec12199b4c9781bb5aa5ded75dae..54f54691699766dfbc83f1c702f1a2b17ef2b3e9 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -639,6 +639,7 @@ struct drm_driver { @@ -137446,10 +137446,10 @@ index 0a271ca..54f5469 100644 int num_ioctls; const struct file_operations *fops; -From b28efa9d1051537449004db1bfaf083429144d1b Mon Sep 17 00:00:00 2001 +From 92bf2e15398f4b3246b5857d36d000f83da6c88f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 30 Oct 2015 10:09:02 -0700 -Subject: [PATCH 109/251] drm/vc4: Add an interface for capturing the GPU state +Subject: [PATCH 109/398] drm/vc4: Add an interface for capturing the GPU state after a hang. This can be parsed with vc4-gpu-tools tools for trying to figure out @@ -137465,7 +137465,7 @@ Signed-off-by: Eric Anholt 5 files changed, 237 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index acd360c..58dcbae 100644 +index acd360c89e14740c7a32889e58575dd138edf654..58dcbaef741f7804dea834e704a440201ff0c79d 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -415,8 +415,8 @@ int vc4_mmap(struct file *filp, struct vm_area_struct *vma) @@ -137480,7 +137480,7 @@ index acd360c..58dcbae 100644 } diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index e2a2be2..e8192b4 100644 +index e2a2be2901777e87d3c6fc5c0d360be09639c4bb..e8192b435a16e2e3918ed78763fdb45c849e4697 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -81,6 +81,7 @@ static const struct drm_ioctl_desc vc4_drm_ioctls[] = { @@ -137492,7 +137492,7 @@ index e2a2be2..e8192b4 100644 static struct drm_driver vc4_drm_driver = { diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index c079b82..24845c1 100644 +index c079b8253c653f776654c02072221b6a67c1b274..24845c1174d6fbdde825851b027d437d3874ff51 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -20,6 +20,8 @@ struct vc4_dev { @@ -137514,7 +137514,7 @@ index c079b82..24845c1 100644 int vc4_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); void *vc4_prime_vmap(struct drm_gem_object *obj); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 0cea723..d90c664 100644 +index 0cea723721635ece743729cf5abc9d82d71d7aa6..d90c664db1c14ddab1831f3a2985f5c756e4014b 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -40,6 +40,186 @@ vc4_queue_hangcheck(struct drm_device *dev) @@ -137722,7 +137722,7 @@ index 0cea723..d90c664 100644 + vc4_free_hang_state(dev, vc4->hang_state); } diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 499daae..4a8d19f 100644 +index 499daae549a559e85fec9ed4216460a2cb7872c9..4a8d19f864bed0b2836bf450d936fda3ebc40116 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -32,6 +32,7 @@ @@ -137790,10 +137790,10 @@ index 499daae..4a8d19f 100644 + #endif /* _UAPI_VC4_DRM_H_ */ -From 341ad4b0afa7154311296be071b39f42f18fe228 Mon Sep 17 00:00:00 2001 +From 3142a9a02eb95941210757e76f44b3f35c957a15 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 4 Dec 2015 11:35:34 -0800 -Subject: [PATCH 110/251] drm/vc4: Update a bunch of code to match upstream +Subject: [PATCH 110/398] drm/vc4: Update a bunch of code to match upstream submission. This gets almost everything matching, except for the MSAA support and @@ -137819,7 +137819,7 @@ Signed-off-by: Eric Anholt 15 files changed, 598 insertions(+), 536 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c -index 1c25500..0f7b00b 100644 +index 1c25500d37d1500101379480fd6b5d21f62925e8..0f7b00ba57daab4b2d4ddb26f165027ef14a9ee3 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -58,15 +58,14 @@ __drm_gem_cma_create(struct drm_device *drm, size_t size) @@ -137845,7 +137845,7 @@ index 1c25500..0f7b00b 100644 ret = drm_gem_object_init(drm, gem_obj, size); if (ret) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index 58dcbae..6247ff8 100644 +index 58dcbaef741f7804dea834e704a440201ff0c79d..6247ff88e6156fc98fb97b8bbcc9ac377a1f8707 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -12,6 +12,10 @@ @@ -138289,7 +138289,7 @@ index 58dcbae..6247ff8 100644 -} -#endif diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c -index 3be2720..3c67914 100644 +index 3be272047820ac8f809839f252a1f8bdba2ac97c..3c6791467e835032e167fc25c4ecb4cef9bd98c4 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -501,6 +501,7 @@ vc4_async_page_flip_complete(struct vc4_seqno_cb *cb) @@ -138314,7 +138314,7 @@ index 3be2720..3c67914 100644 if (flags & DRM_MODE_PAGE_FLIP_ASYNC) return vc4_async_page_flip(crtc, fb, event, flags); diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index e8192b4..22061ae 100644 +index e8192b435a16e2e3918ed78763fdb45c849e4697..22061aedef515b08cc5230272464f7a309a27e9d 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -81,7 +81,8 @@ static const struct drm_ioctl_desc vc4_drm_ioctls[] = { @@ -138345,7 +138345,7 @@ index e8192b4..22061ae 100644 .desc = DRIVER_DESC, .date = DRIVER_DATE, diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 24845c1..53dfa8d 100644 +index 24845c1174d6fbdde825851b027d437d3874ff51..53dfa8df292a6d061a3bd8cb57bd06a0ab6ca579 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -72,6 +72,9 @@ struct vc4_dev { @@ -138409,7 +138409,7 @@ index 24845c1..53dfa8d 100644 +struct vc4_validated_shader_info * +vc4_validate_shader(struct drm_gem_cma_object *shader_obj); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index d90c664..fb0b92d 100644 +index d90c664db1c14ddab1831f3a2985f5c756e4014b..fb0b92d941df73af9d8a9b6138bc815581019426 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -53,9 +53,8 @@ vc4_free_hang_state(struct drm_device *dev, struct vc4_hang_state *state) @@ -138511,7 +138511,7 @@ index d90c664..fb0b92d 100644 INIT_WORK(&vc4->job_done_work, vc4_job_done_work); } diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c -index f29b796..b68060e 100644 +index f29b7961695ce3f6a09c249a63e8cd25f35a91a7..b68060e758dbd26e1dccd17beeba4c09bbb1441e 100644 --- a/drivers/gpu/drm/vc4/vc4_irq.c +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -56,7 +56,7 @@ vc4_overflow_mem_work(struct work_struct *work) @@ -138535,7 +138535,7 @@ index f29b796..b68060e 100644 V3D_WRITE(V3D_BPOA, bo->base.paddr); diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c -index 2082713..f95f2df 100644 +index 208271363eb33e1b1e85a63b76f1a43bfef20e0a..f95f2df5f8d1a52031a35dd26b03331c513fe13e 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -132,6 +132,7 @@ static int vc4_atomic_commit(struct drm_device *dev, @@ -138547,7 +138547,7 @@ index 2082713..f95f2df 100644 } } diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index 9757bc8..cee38aa 100644 +index 9757bc8d3c0d274b7c878cc0bb65cb81b7fdc9fa..cee38aad33bd8984290d9eae2bda60db4f61ab5f 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -27,60 +27,60 @@ @@ -138836,7 +138836,7 @@ index 9757bc8..cee38aa 100644 #define VC4_TEX_P0_OFFSET_MASK VC4_MASK(31, 12) diff --git a/drivers/gpu/drm/vc4/vc4_qpu_defines.h b/drivers/gpu/drm/vc4/vc4_qpu_defines.h -index e47c994..d5c2f3c 100644 +index e47c994d36bf81ef350041ce0aad9f68a82417f4..d5c2f3c85ebbf6b1ae7ca731d12d604ca24b176e 100644 --- a/drivers/gpu/drm/vc4/vc4_qpu_defines.h +++ b/drivers/gpu/drm/vc4/vc4_qpu_defines.h @@ -25,194 +25,190 @@ @@ -139187,7 +139187,7 @@ index e47c994..d5c2f3c 100644 #define QPU_SIG_SHIFT 60 #define QPU_SIG_MASK QPU_MASK(63, 60) diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 0ffac8d..3516354 100644 +index 0ffac8df92cd3ee5be1de1368a5964ae62560741..3516354ffdbc8a4b5f0162f140ee21849328d9d3 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -63,7 +63,6 @@ static inline void rcl_u32(struct vc4_rcl_setup *setup, u32 val) @@ -139216,7 +139216,7 @@ index 0ffac8d..3516354 100644 } } diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index cf35f58..29a222f 100644 +index cf35f587656dd76b15cc7a6a1992473fd31877cd..29a222fc4a6213ae783cb7c2c170838186568ac2 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -125,7 +125,7 @@ int vc4_v3d_debugfs_regs(struct seq_file *m, void *unused) @@ -139254,7 +139254,7 @@ index cf35f58..29a222f 100644 struct drm_device *drm = dev_get_drvdata(master); struct vc4_dev *vc4 = to_vc4_dev(drm); diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index ff3b62f..e44e355 100644 +index ff3b62fbc920b05745d35f1b69c4a1b6ad5f83ba..e44e355393229f7ac4fd0bb2c434695a22080be5 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -48,7 +48,6 @@ @@ -139534,7 +139534,7 @@ index ff3b62f..e44e355 100644 return -EINVAL; } diff --git a/drivers/gpu/drm/vc4/vc4_validate_shaders.c b/drivers/gpu/drm/vc4/vc4_validate_shaders.c -index 0aab9d7..f67124b 100644 +index 0aab9d72bec4744028c124d8d578fe8712010dc7..f67124b4c5348706136e4c0f9fe06ea10b77b230 100644 --- a/drivers/gpu/drm/vc4/vc4_validate_shaders.c +++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c @@ -24,24 +24,16 @@ @@ -139687,7 +139687,7 @@ index 0aab9d7..f67124b 100644 goto fail; } diff --git a/include/drm/drmP.h b/include/drm/drmP.h -index 54f5469..987c25a 100644 +index 54f54691699766dfbc83f1c702f1a2b17ef2b3e9..987c25ac08e0d5454dd4cd03f81c285a351df428 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -585,6 +585,13 @@ struct drm_driver { @@ -139713,10 +139713,10 @@ index 54f5469..987c25a 100644 int num_ioctls; const struct file_operations *fops; -From 527fa9469f0876bade592e985a6c973ca8c84839 Mon Sep 17 00:00:00 2001 +From 9a91bd66857e5957924b3769abf7075f31ab67b6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 11 Dec 2015 19:45:03 -0800 -Subject: [PATCH 111/251] drm: Use the driver's gem_object_free function from +Subject: [PATCH 111/398] drm: Use the driver's gem_object_free function from CMA helpers. VC4 wraps the CMA objects in its own structures, so it needs to do its @@ -139731,7 +139731,7 @@ Signed-off-by: Eric Anholt 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c -index c19a625..c1a37d3 100644 +index c19a62561183537046dc896254d09d4ac3a70b1e..c1a37d334477ed4044bea3196aed10b6d07ed1fb 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -266,7 +266,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper, @@ -139755,7 +139755,7 @@ index c19a625..c1a37d3 100644 } diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c -index 0f7b00b..e5df53b 100644 +index 0f7b00ba57daab4b2d4ddb26f165027ef14a9ee3..e5df53b6e229ff0348541eeaa921acc6cf4700ef 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -121,7 +121,7 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, @@ -139777,10 +139777,10 @@ index 0f7b00b..e5df53b 100644 return ERR_PTR(ret); } -From d5d7b446f3dc3c30886937f4750b96d5c40a0904 Mon Sep 17 00:00:00 2001 +From 84d9a4171198c1eb667016b8babdbf0b2273bd0e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 17 Jul 2015 13:15:50 -0700 -Subject: [PATCH 112/251] drm/vc4: Add support for MSAA rendering. +Subject: [PATCH 112/398] drm/vc4: Add support for MSAA rendering. For MSAA, you set a bit in the binner that halves the size of tiles in each direction, so you can pack 4 samples per pixel in the tile @@ -139799,7 +139799,7 @@ Signed-off-by: Eric Anholt 4 files changed, 258 insertions(+), 55 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index cee38aa..0f31cc0 100644 +index cee38aad33bd8984290d9eae2bda60db4f61ab5f..0f31cc06500f1b5308892bb11a727efa6f56dcff 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -123,6 +123,11 @@ enum vc4_packet { @@ -139840,7 +139840,7 @@ index cee38aa..0f31cc0 100644 /** @{ * diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 3516354..8f2ec57 100644 +index 3516354ffdbc8a4b5f0162f140ee21849328d9d3..8f2ec57fbfb32cc7db1a805d594f4e0e9cbd1c7d 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -37,9 +37,11 @@ @@ -140255,7 +140255,7 @@ index 3516354..8f2ec57 100644 return -EINVAL; } diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index e44e355..2f22f19 100644 +index e44e355393229f7ac4fd0bb2c434695a22080be5..2f22f19687032b494c447be9707cfec10b848f3e 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -400,9 +400,8 @@ validate_tile_binning_config(VALIDATE_ARGS) @@ -140271,7 +140271,7 @@ index e44e355..2f22f19 100644 } diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 4a8d19f..49cd992 100644 +index 4a8d19f864bed0b2836bf450d936fda3ebc40116..49cd9928a65cd97e60760f52cd0e1c9c49116068 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -46,10 +46,13 @@ struct drm_vc4_submit_rcl_surface { @@ -140304,10 +140304,10 @@ index 4a8d19f..49cd992 100644 uint32_t clear_z; uint8_t clear_s; -From 8c5854914cb7ffd1d418a4013b2089eec87600d2 Mon Sep 17 00:00:00 2001 +From ca18e496f817f7d578274711ec2e3abf1941eaff Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 8 Dec 2015 14:00:43 -0800 -Subject: [PATCH 113/251] drm/vc4: A few more non-functional changes to sync to +Subject: [PATCH 113/398] drm/vc4: A few more non-functional changes to sync to upstream. At this point all that's left is the force-enable of HDMI connector, @@ -140321,7 +140321,7 @@ Signed-off-by: Eric Anholt 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index 29a222f..4d103f7 100644 +index 29a222fc4a6213ae783cb7c2c170838186568ac2..4d103f7ff8c9113329aa4738bd67baa4ad14250d 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -109,7 +109,7 @@ static const struct { @@ -140334,7 +140334,7 @@ index 29a222f..4d103f7 100644 struct vc4_dev *vc4 = to_vc4_dev(dev); int i; diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 49cd992..eeb37e3 100644 +index 49cd9928a65cd97e60760f52cd0e1c9c49116068..eeb37e394f1347ef0c87ec2305604a0510d4dd37 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -24,7 +24,7 @@ @@ -140651,10 +140651,10 @@ index 49cd992..eeb37e3 100644 #endif /* _UAPI_VC4_DRM_H_ */ -From 96201e14bde5eadd0a63d291930c6931206dd945 Mon Sep 17 00:00:00 2001 +From 913cbb34a3c960fea40cb5b530bb60680a375f1f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 23:46:32 +0000 -Subject: [PATCH 114/251] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what +Subject: [PATCH 114/398] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what landed upstream. Signed-off-by: Eric Anholt @@ -140663,7 +140663,7 @@ Signed-off-by: Eric Anholt 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts -index cf5d5c9..da37483 100644 +index cf5d5c9b502499d119ef604aa754eed7e17b1c01..da37483b955e8abfc5d5ce0905ed81d928474084 100644 --- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts @@ -68,7 +68,7 @@ @@ -140676,10 +140676,10 @@ index cf5d5c9..da37483 100644 <&cprman BCM2835_CLOCK_HSM>; clock-names = "pixel", "hdmi"; -From c23f3c3bbf31b734f44040207eda9db1fdb3d565 Mon Sep 17 00:00:00 2001 +From d5de27ef3a6f9dfe63745a3aaae6af6a845ea5ce Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 7 Dec 2015 12:35:01 -0800 -Subject: [PATCH 115/251] drm/vc4: Synchronize validation code for v2 +Subject: [PATCH 115/398] drm/vc4: Synchronize validation code for v2 submission upstream. Signed-off-by: Eric Anholt @@ -140691,7 +140691,7 @@ Signed-off-by: Eric Anholt 4 files changed, 135 insertions(+), 196 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 53dfa8d..ed93fa7 100644 +index 53dfa8df292a6d061a3bd8cb57bd06a0ab6ca579..ed93fa78a32df3c1c98b5c48fa193934de77dda5 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -189,17 +189,6 @@ to_vc4_encoder(struct drm_encoder *encoder) @@ -140761,7 +140761,7 @@ index 53dfa8d..ed93fa7 100644 int vc4_get_rcl(struct drm_device *dev, struct vc4_exec_info *exec); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index fb0b92d..39f29e7 100644 +index fb0b92d941df73af9d8a9b6138bc815581019426..39f29e7593342d9555dd51cbc2790a56abe06179 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -169,8 +169,8 @@ vc4_save_hang_state(struct drm_device *dev) @@ -140821,7 +140821,7 @@ index fb0b92d..39f29e7 100644 } diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 8f2ec57..8a2a312 100644 +index 8f2ec57fbfb32cc7db1a805d594f4e0e9cbd1c7d..8a2a312e2c1bb618ea414ed3f0dd87e82ed7e09a 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -436,7 +436,8 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec, @@ -140845,7 +140845,7 @@ index 8f2ec57..8a2a312 100644 if (tiling > VC4_TILING_FORMAT_LT) { diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index 2f22f19..0fb5b99 100644 +index 2f22f19687032b494c447be9707cfec10b848f3e..0fb5b994b9ddb1e6fde3d8e99d727d3e7afc4d22 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -94,42 +94,42 @@ size_is_lt(uint32_t width, uint32_t height, int cpp) @@ -141296,10 +141296,10 @@ index 2f22f19..0fb5b99 100644 return ret; } -From 677855b754d34a5fc02b572d3605e0a6ff754843 Mon Sep 17 00:00:00 2001 +From fcd597cecf8812eb54290d6ce097ced5ac3354e5 Mon Sep 17 00:00:00 2001 From: janluca Date: Sun, 27 Dec 2015 14:34:04 +0100 -Subject: [PATCH 116/251] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is +Subject: [PATCH 116/398] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is not set If CONFIG_MMC_BCM2835 was not set the compiling of the kernel failed @@ -141312,7 +141312,7 @@ commit 64d395457f793250d2e582eeb38cc3403b1db98c 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.c -index 87ae2e9..b79fe14 100644 +index 87ae2e9beb8dfb329520b63f6d8f5a05d7d5ac36..b79fe14c18f1fe521fadf8adfc136de62140c8b9 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.c @@ -53,7 +53,9 @@ static const struct mmc_fixup mmc_fixup_methods[] = { @@ -141336,10 +141336,10 @@ index 87ae2e9..b79fe14 100644 } EXPORT_SYMBOL(mmc_fixup_device); -From 6c2f1c57e559b53e84735f0a38ad50e8177b3f4d Mon Sep 17 00:00:00 2001 +From 7d216c02516536699082a61430a8539659a86abc Mon Sep 17 00:00:00 2001 From: Devon Fyson Date: Wed, 30 Dec 2015 16:40:47 -0500 -Subject: [PATCH 117/251] Extend clock timeout, fix modprobe baudrate +Subject: [PATCH 117/398] Extend clock timeout, fix modprobe baudrate parameter. Set the BSC_CLKT clock streching timeout to 35ms as per SMBus specs.\n- Increase priority of baudrate parameter passed to modprobe (in /etc/modprobe.d/*.conf or command line). Currently custom baudrates don't work because they are overridden by clock-frequency in the platform_device passed to the function. @@ -141348,7 +141348,7 @@ Set the BSC_CLKT clock streching timeout to 35ms as per SMBus specs.\n- Increase 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c -index 85f411c..b152639 100644 +index 85f411cccf61f42d8fdf5a867b3b1f27d6821d2d..b1526396bc83552e76c0ce7c96033d3833f218ec 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -71,7 +71,8 @@ @@ -141447,10 +141447,10 @@ index 85f411c..b152639 100644 dev_info(&pdev->dev, "BSC%d Controller at 0x%08lx (irq %d) (baudrate %d)\n", pdev->id, (unsigned long)regs->start, irq, baudrate); -From 138eda1c8216d04356fa821fe6500771bf14fb10 Mon Sep 17 00:00:00 2001 +From 194fffbee4b522a84d8eea0d6623dc7935bf1278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 31 Dec 2015 16:44:58 +0100 -Subject: [PATCH 118/251] bcm270x_dt: Add dwc2 and dwc-otg overlays +Subject: [PATCH 118/398] bcm270x_dt: Add dwc2 and dwc-otg overlays --- arch/arm/boot/dts/overlays/Makefile | 2 ++ @@ -141462,7 +141462,7 @@ Subject: [PATCH 118/251] bcm270x_dt: Add dwc2 and dwc-otg overlays create mode 100644 arch/arm/boot/dts/overlays/dwc2-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index be9dead..aaa8976 100644 +index be9dead2107a49d3ca7191a62c7fcea17cb45a1c..aaa897652f1a31eefacb98f2ac81d32040b8b78c 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -15,6 +15,8 @@ endif @@ -141475,7 +141475,7 @@ index be9dead..aaa8976 100644 dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d0ef256..4d3f974 100644 +index d0ef256ab1b4b345b672ec320bf778227c115ed3..4d3f974c89871f994362ee91ceeb033db8bbd3fd 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -198,6 +198,27 @@ Params: gpiopin GPIO connected to the sensor's DATA output. @@ -141508,7 +141508,7 @@ index d0ef256..4d3f974 100644 diff --git a/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts new file mode 100644 -index 0000000..fc48bd1 +index 0000000000000000000000000000000000000000..fc48bd1eac605115c3b89fddfe39f5ea6181459f --- /dev/null +++ b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts @@ -0,0 +1,20 @@ @@ -141534,7 +141534,7 @@ index 0000000..fc48bd1 +}; diff --git a/arch/arm/boot/dts/overlays/dwc2-overlay.dts b/arch/arm/boot/dts/overlays/dwc2-overlay.dts new file mode 100644 -index 0000000..90c9811 +index 0000000000000000000000000000000000000000..90c981143fc7a55ae1cc6462c959e21d8cb7365e --- /dev/null +++ b/arch/arm/boot/dts/overlays/dwc2-overlay.dts @@ -0,0 +1,29 @@ @@ -141568,10 +141568,10 @@ index 0000000..90c9811 + }; +}; -From 534a6b55b445527c1a8aef9f0328987cb2c1c1d4 Mon Sep 17 00:00:00 2001 +From 72c7207c7d07e102d1b57be7e8db460e0dcb4051 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Jan 2016 14:42:17 +0000 -Subject: [PATCH 119/251] BCM270X_DT: Add the sdtweak overlay, for tuning +Subject: [PATCH 119/398] BCM270X_DT: Add the sdtweak overlay, for tuning sdhost The sdhost overlay declares the sdhost interface and allows parameters @@ -141586,7 +141586,7 @@ sdtweak overlay that does just that. create mode 100644 arch/arm/boot/dts/overlays/sdtweak-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index aaa8976..4d9d640 100644 +index aaa897652f1a31eefacb98f2ac81d32040b8b78c..4d9d64059660c65c4f52be42f9bef53801505f58 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -53,6 +53,7 @@ dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb @@ -141598,7 +141598,7 @@ index aaa8976..4d9d640 100644 dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4d3f974..1c6b000 100644 +index 4d3f974c89871f994362ee91ceeb033db8bbd3fd..1c6b000de10720eed719340d39ddfabdc17ca903 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -635,6 +635,20 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141624,7 +141624,7 @@ index 4d3f974..1c6b000 100644 Load: dtoverlay=smi diff --git a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts new file mode 100644 -index 0000000..74c168d +index 0000000000000000000000000000000000000000..74c168d7d64cac6bc3fe72ef89e7f4b2ab0717ea --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts @@ -0,0 +1,21 @@ @@ -141650,10 +141650,10 @@ index 0000000..74c168d + }; +}; -From baed92c64a0b70434069ec7f8cb906e33f7d50b4 Mon Sep 17 00:00:00 2001 +From 7b6408f394619f8172a36606cb97f030afa9d2e0 Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:54:21 +0000 -Subject: [PATCH 120/251] bcm2835-mmc: Don't override bus width capabilities +Subject: [PATCH 120/398] bcm2835-mmc: Don't override bus width capabilities from devicetree Take out the force setting of the MMC_CAP_4_BIT_DATA host capability @@ -141664,7 +141664,7 @@ preserved. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c -index 43aed6e..104f93e 100644 +index 43aed6eadd573aec3ac3c8ee0f418a8dbd6376ed..104f93ecd51d963ac92fcfcf04b1f15225468d8d 100644 --- a/drivers/mmc/host/bcm2835-mmc.c +++ b/drivers/mmc/host/bcm2835-mmc.c @@ -1305,7 +1305,7 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host) @@ -141677,10 +141677,10 @@ index 43aed6e..104f93e 100644 mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD; -From 2a12d02d01ad199df7c17296243ddef8a9ca6c33 Mon Sep 17 00:00:00 2001 +From 909302c184042a4c5df3783343babad493c2c9ed Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:55:54 +0000 -Subject: [PATCH 121/251] SDIO-overlay: add bus_width parameter +Subject: [PATCH 121/398] SDIO-overlay: add bus_width parameter Allow setting of the SDIO bus width capability of the bcm2835-mmc host. This is helpful when only a 1 bit wide bus is connected @@ -141692,7 +141692,7 @@ mode. 2 files changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 1c6b000..34a1b7f 100644 +index 1c6b000de10720eed719340d39ddfabdc17ca903..34a1b7f1632dcdc74b3b0c06eefed71da7521ba8 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -634,6 +634,8 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141705,7 +141705,7 @@ index 1c6b000..34a1b7f 100644 Name: sdtweak Info: Tunes the bcm2835-sdhost SD/MMC driver diff --git a/arch/arm/boot/dts/overlays/sdio-overlay.dts b/arch/arm/boot/dts/overlays/sdio-overlay.dts -index afc8742..7935e7a 100644 +index afc874269ac592d2df67abbc1d9c0d4f973e6baf..7935e7af882d09ca0a59a82b5712f03cc957e158 100644 --- a/arch/arm/boot/dts/overlays/sdio-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts @@ -11,6 +11,7 @@ @@ -141724,10 +141724,10 @@ index afc8742..7935e7a 100644 }; }; -From 1589aee29dc9d1fafe145b75a018771ed993e869 Mon Sep 17 00:00:00 2001 +From 4f782d250103d4fd0b7f55052be0e19f28434a7b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:41:45 +0100 -Subject: [PATCH 122/251] bcm2835: extend allowed range of channels and +Subject: [PATCH 122/398] bcm2835: extend allowed range of channels and samplerates Allow everything the videocore accepts. @@ -141736,7 +141736,7 @@ Allow everything the videocore accepts. 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 8c86375..31e3131 100755 +index 8c863758ff030f84889be7a01333e63bf05b909a..31e3131472340bd09673d153f3008fbcd8732282 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -26,9 +26,9 @@ static struct snd_pcm_hardware snd_bcm2835_playback_hw = { @@ -141764,10 +141764,10 @@ index 8c86375..31e3131 100755 .period_bytes_min = 1 * 1024, .period_bytes_max = 128 * 1024, -From 768a8ae2b4eebe250c3872901caae49ecf92b483 Mon Sep 17 00:00:00 2001 +From f0d10e66ad6a413aa6282aa61804cb1129557355 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:18 +0100 -Subject: [PATCH 123/251] bcm2835: restrict channels*rate to 8*960000 +Subject: [PATCH 123/398] bcm2835: restrict channels*rate to 8*960000 This is required at least for SPDIF. If the bitrate goes above, videocore will either resample the audio or corrupt it due to @@ -141781,7 +141781,7 @@ Some code is based on ac97_pcm.c. 1 file changed, 41 insertions(+) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 31e3131..b17ed32 100755 +index 31e3131472340bd09673d153f3008fbcd8732282..b17ed320d69acf354b8ebd24934b8e10f0f0b204 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -19,6 +19,9 @@ @@ -141847,10 +141847,10 @@ index 31e3131..b17ed32 100755 chip->opened |= (1 << idx); -From 19d09a4d7b66ffed44ec5b9da81304f3a11f4586 Mon Sep 17 00:00:00 2001 +From bd4a8ca7d1ee11ed66c72726d2ead6a648a1538d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:48 +0100 -Subject: [PATCH 124/251] rpi: update vc_vchi_audioserv_defs.h +Subject: [PATCH 124/398] rpi: update vc_vchi_audioserv_defs.h Add audioserv 3 extensions. The changes were taken from the paste linked here: @@ -141861,7 +141861,7 @@ https://github.com/raspberrypi/linux/pull/1166#issuecomment-151917067 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h -index af3e6eb..5f4409f 100644 +index af3e6eb690113fc32ce9e06bd2f0f294da7a7f00..5f4409fc821cee48abf3b4c581c09072d55dd56a 100644 --- a/sound/arm/vc_vchi_audioserv_defs.h +++ b/sound/arm/vc_vchi_audioserv_defs.h @@ -16,7 +16,7 @@ @@ -141916,10 +141916,10 @@ index af3e6eb..5f4409f 100644 +#endif // _VC_AUDIO_DEFS_H_ \ No newline at end of file -From c507443d3266d9f0cbdc1832089ad90b8943f48b Mon Sep 17 00:00:00 2001 +From 717077903c48b517ed82340885de6f2db57b3e6b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:12 +0100 -Subject: [PATCH 125/251] bcm2835: implement channel map API +Subject: [PATCH 125/398] bcm2835: implement channel map API Report all layouts supported by the HDMI protocol to userspace. Make the videocore set the correct layout according to the @@ -141941,7 +141941,7 @@ speakers, while RR is never heard. 4 files changed, 311 insertions(+), 4 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index aad905f..92d3f76 100755 +index aad905f1fe12d9f6c5f72e4ec0134be420f2580c..92d3f7672046a89aeb5f777b039d5963b6f59e42 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -300,6 +300,281 @@ static struct snd_kcontrol_new snd_bcm2835_spdif[] = { @@ -142235,7 +142235,7 @@ index aad905f..92d3f76 100755 err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_bcm2835_spdif[idx], chip)); diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index b17ed32..1067460 100755 +index b17ed320d69acf354b8ebd24934b8e10f0f0b204..1067460809044c5cbc260a5b9051d37cfaa15028 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -231,6 +231,9 @@ static int snd_bcm2835_playback_open_generic( @@ -142289,7 +142289,7 @@ index b17ed32..1067460 100755 /* in preparation of the stream, set the controls (volume level) of the stream */ diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 3de3094..8ecd2d7 100755 +index 3de30945d8155b90d244734881a7caa81930fa7c..8ecd2d735fbf94b9018c89c705a68750aad5bf97 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -570,6 +570,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -142324,7 +142324,7 @@ index 3de3094..8ecd2d7 100755 /* Create the message available completion */ init_completion(&instance->msg_avail_comp); diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h -index 0f71c5d..997fb69 100755 +index 0f71c5def314a63252fa4fe18ae2ba5a339f2cfb..997fb69da951c7ceb732f4897b7450ecfc37d168 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h @@ -107,6 +107,8 @@ typedef struct bcm2835_chip { @@ -142346,10 +142346,10 @@ index 0f71c5d..997fb69 100755 int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream); int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, -From 9e7ef4d08f6e2dbcdca8f7f2833f2eb38bee78e1 Mon Sep 17 00:00:00 2001 +From fbf91bf6a921381314854a705dbcaddbcab677b0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:35 +0100 -Subject: [PATCH 126/251] bcm2835: access controls under the audio mutex +Subject: [PATCH 126/398] bcm2835: access controls under the audio mutex I don't think the ALSA framework provides any kind of automatic synchronization within the control callbacks. We most likely need @@ -142362,7 +142362,7 @@ probably always be called under our own audio lock. 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index 92d3f76..5b8e6bd 100755 +index 92d3f7672046a89aeb5f777b039d5963b6f59e42..5b8e6bd2b89abf8135933a4028e23e25e5f2eef5 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -94,6 +94,9 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol, @@ -142566,7 +142566,7 @@ index 92d3f76..5b8e6bd 100755 static int snd_bcm2835_add_chmap_ctl(bcm2835_chip_t * chip) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 1067460..48da3bb 100755 +index 1067460809044c5cbc260a5b9051d37cfaa15028..48da3bbd7395e2d3611990b7c5f31db9157b2afc 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -379,6 +379,9 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) @@ -142588,10 +142588,10 @@ index 1067460..48da3bb 100755 return 0; } -From 04d7228226398968e0fc67ec3722760f729dbfc9 Mon Sep 17 00:00:00 2001 +From f5f53e6fba5b5c752810ed3a1cb212cf55c136a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:03 +0100 -Subject: [PATCH 127/251] bcm2835: always use 2/4/8 channels for multichannel +Subject: [PATCH 127/398] bcm2835: always use 2/4/8 channels for multichannel layouts Pad the unused channels with NA. This means userspace needs to write @@ -142604,7 +142604,7 @@ Works around noise at the following channel counts: 3, 5, 6, 7 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index 5b8e6bd..dec052b 100755 +index 5b8e6bd2b89abf8135933a4028e23e25e5f2eef5..dec052b9c0a5a3f69f90878cde814cb9adc27848 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -349,6 +349,7 @@ struct cea_channel_speaker_allocation { @@ -142730,10 +142730,10 @@ index 5b8e6bd..dec052b 100755 }; -From 7a65c83035dbea9a9ac43867cc82167d64e5c233 Mon Sep 17 00:00:00 2001 +From 1bcf84d0dcf0a5b0d2facbe9362657886246e88c Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:24 +0100 -Subject: [PATCH 128/251] bcm2835: only allow stereo if analogue jack is +Subject: [PATCH 128/398] bcm2835: only allow stereo if analogue jack is selected Sending more than 2 channels to videocore while outputting to analogue @@ -142755,7 +142755,7 @@ also doesn't seem worth the trouble. 1 file changed, 12 insertions(+) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index dec052b..e930718 100755 +index dec052b9c0a5a3f69f90878cde814cb9adc27848..e9307186b082fc292af79f48ca71e3cd6ce8c99c 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -423,9 +423,16 @@ static struct cea_channel_speaker_allocation channel_allocations[] = { @@ -142795,10 +142795,10 @@ index dec052b..e930718 100755 for (x = 0; x < substream->runtime->channels; x++) { int sp = ucontrol->value.integer.value[x]; -From 1009b70932a4980e21de9429c596dbdccac1ecdb Mon Sep 17 00:00:00 2001 +From 53bbe925e9218b12a14d0ce36752d41e100476a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:47 +0100 -Subject: [PATCH 129/251] bcm2835: interpolate audio delay +Subject: [PATCH 129/398] bcm2835: interpolate audio delay It appears the GPU only sends us a message all 10ms to update the playback progress. Other than this, the playback position @@ -142827,7 +142827,7 @@ harder due to locking and synchronization requirements. 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 48da3bb..f3a4c6d 100755 +index 48da3bbd7395e2d3611990b7c5f31db9157b2afc..f3a4c6da6a1e1f1cc937022557fccaebf4c87669 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -25,7 +25,7 @@ @@ -142878,7 +142878,7 @@ index 48da3bb..f3a4c6d 100755 return snd_pcm_indirect_playback_pointer(substream, &alsa_stream->pcm_indirect, diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h -index 997fb69..20ef108 100755 +index 997fb69da951c7ceb732f4897b7450ecfc37d168..20ef108cb693575f0a1b5d5703a1fe4968277975 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h @@ -137,6 +137,7 @@ typedef struct bcm2835_alsa_stream { @@ -142890,10 +142890,10 @@ index 997fb69..20ef108 100755 uint32_t enable_fifo_irq; irq_handler_t fifo_irq_handler; -From fb73e06c694d16d8be119e08e71bf5601f386352 Mon Sep 17 00:00:00 2001 +From d6ceb13cadff8352d5704196ae1026d328562098 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 17:16:38 +0000 -Subject: [PATCH 130/251] bcm2835-sdhost: Add workaround for odd behaviour on +Subject: [PATCH 130/398] bcm2835-sdhost: Add workaround for odd behaviour on some cards For reasons not understood, the sdhost driver fails when reading @@ -142907,7 +142907,7 @@ that problem which ensures those sectors are always read singly. 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index da08998..309633c 100644 +index da089985f94beebae4a25878cd88a871e08527fa..309633cedd616b03800d279d2daeea61642cd244 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -173,6 +173,9 @@ struct bcm2835_host { @@ -143030,10 +143030,10 @@ index da08998..309633c 100644 } -From 6671675d3a1a7df0f838121c8166b57f0fd6f0c3 Mon Sep 17 00:00:00 2001 +From 9ad9df7b3b83b0b6f8c9730820a5913d30c22046 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Jan 2016 16:03:24 +0000 -Subject: [PATCH 131/251] bcm2835-sdhost: Add debug_flags dtparam +Subject: [PATCH 131/398] bcm2835-sdhost: Add debug_flags dtparam Bit zero disables the single-read-sectors map: @@ -143052,7 +143052,7 @@ Also revert the timeout change, just in case. 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/overlays/sdhost-overlay.dts b/arch/arm/boot/dts/overlays/sdhost-overlay.dts -index 85f0725..dbe6574 100644 +index 85f0725e1ed9e1ec6d41b1956b43528a2d92aa63..dbe6574fbd2b89efc0fbee87eb7bedce4f462069 100644 --- a/arch/arm/boot/dts/overlays/sdhost-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts @@ -16,6 +16,7 @@ @@ -143071,7 +143071,7 @@ index 85f0725..dbe6574 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts -index 74c168d..b0b208c 100644 +index 74c168d7d64cac6bc3fe72ef89e7f4b2ab0717ea..b0b208c2261ef53b8a30f0ecc176cead69a5b1c7 100644 --- a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts @@ -9,6 +9,7 @@ @@ -143090,7 +143090,7 @@ index 74c168d..b0b208c 100644 }; }; diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 309633c..ef9b1e6 100644 +index 309633cedd616b03800d279d2daeea61642cd244..ef9b1e6f710a2dade4b7f6f4564702f97af42ef0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -174,6 +174,8 @@ struct bcm2835_host { @@ -143157,10 +143157,10 @@ index 309633c..ef9b1e6 100644 if (node) { host->dma_chan_tx = -From 559103cc40fb480a58ff12002ac79dc204c5c19d Mon Sep 17 00:00:00 2001 +From 753d08b6f578b097a2ca4d94a8b39ee4345e77ab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 25 Jan 2016 09:12:06 +0000 -Subject: [PATCH 132/251] BCM270X_DT: Add sdio_overclock parameter to sdio +Subject: [PATCH 132/398] BCM270X_DT: Add sdio_overclock parameter to sdio overlay The sdio_overclock parameter is like the overclock_50 parameter, i.e. @@ -143183,7 +143183,7 @@ Examples: 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 34a1b7f..709d3e4 100644 +index 34a1b7f1632dcdc74b3b0c06eefed71da7521ba8..709d3e4967922152248e57472870648eb4a749c4 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -53,8 +53,8 @@ have its contents deleted (or commented out). @@ -143212,7 +143212,7 @@ index 34a1b7f..709d3e4 100644 pio_limit Number of blocks above which to use DMA diff --git a/arch/arm/boot/dts/overlays/sdio-overlay.dts b/arch/arm/boot/dts/overlays/sdio-overlay.dts -index 7935e7a..398bd81 100644 +index 7935e7af882d09ca0a59a82b5712f03cc957e158..398bd812c716c9e472fbac5aba4fe882114c65d1 100644 --- a/arch/arm/boot/dts/overlays/sdio-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts @@ -12,6 +12,7 @@ @@ -143231,10 +143231,10 @@ index 7935e7a..398bd81 100644 }; }; -From 73ad066f76a5c18c621dbc86b02ff90d3adc814a Mon Sep 17 00:00:00 2001 +From 7f6f1a121b8973951a29ff205aed548c86a1d337 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 21 Jan 2016 18:10:16 +0100 -Subject: [PATCH 133/251] rtc: ds1307: add support for the DT property +Subject: [PATCH 133/398] rtc: ds1307: add support for the DT property 'wakeup-source' For RTC chips with no IRQ directly connected to the SoC, the RTC chip @@ -143264,7 +143264,7 @@ Signed-off-by: Alexandre Belloni 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c -index 1cb13fe..28ca4bf 100644 +index 1cb13feea21f0403c0600f73898a10911ee59d14..28ca4bfaa8db0094e63acf6c9c2dbfc96abd445c 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -860,6 +860,7 @@ static int ds1307_probe(struct i2c_client *client, @@ -143328,10 +143328,10 @@ index 1cb13fe..28ca4bf 100644 err = devm_request_threaded_irq(&client->dev, client->irq, NULL, irq_handler, -From 4f6fbb96cdcdc9e66c0521d1b0a46ca0b1d2c47d Mon Sep 17 00:00:00 2001 +From ebf1de45d015134bf56cfb56da3592973fa0cf64 Mon Sep 17 00:00:00 2001 From: vitalogy Date: Tue, 19 Jan 2016 07:02:02 +0100 -Subject: [PATCH 134/251] dt-overlay: add wittypi-overlay.dts +Subject: [PATCH 134/398] dt-overlay: add wittypi-overlay.dts --- arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 ++++++++++++++++++++++++++ @@ -143340,7 +143340,7 @@ Subject: [PATCH 134/251] dt-overlay: add wittypi-overlay.dts diff --git a/arch/arm/boot/dts/overlays/wittypi-overlay.dts b/arch/arm/boot/dts/overlays/wittypi-overlay.dts new file mode 100644 -index 0000000..be5987d +index 0000000000000000000000000000000000000000..be5987db5d27560da9b5eadacd92457dada7092c --- /dev/null +++ b/arch/arm/boot/dts/overlays/wittypi-overlay.dts @@ -0,0 +1,44 @@ @@ -143389,10 +143389,10 @@ index 0000000..be5987d + +}; -From ed208e16047972bbaf88000ab35b61fa82293247 Mon Sep 17 00:00:00 2001 +From 40a7723d64eb9ba932d1c38e7686c634417a3122 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 16:28:05 +0000 -Subject: [PATCH 135/251] FIXUP i2c_bcm2708: Don't change module baudrate +Subject: [PATCH 135/398] FIXUP i2c_bcm2708: Don't change module baudrate parameter Overwriting the baudrate module parameter creates an apparent @@ -143406,7 +143406,7 @@ Also fix whitespace errors. 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c -index b152639..c9b8e5c 100644 +index b1526396bc83552e76c0ce7c96033d3833f218ec..c9b8e5cb1702e4b20e45214d81a7a40ac709220f 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -71,7 +71,6 @@ @@ -143491,10 +143491,10 @@ index b152639..c9b8e5c 100644 return 0; -From 1172f40b76155e169d23802f5bfd81555571cb7e Mon Sep 17 00:00:00 2001 +From 2a93ad780c76576630b78bf371a934c8c89d42c8 Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 14:14:44 +0000 -Subject: [PATCH 136/251] Allow up to 24dB digital gain to be applied when +Subject: [PATCH 136/398] Allow up to 24dB digital gain to be applied when using IQAudIO DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143507,7 +143507,7 @@ and if specified will allow the full 24dB gain. 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 709d3e4..3c8436e 100644 +index 709d3e4967922152248e57472870648eb4a749c4..3c8436e60743f419ce3e43b07408a02645b8e116 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -362,8 +362,21 @@ Params: @@ -143535,7 +143535,7 @@ index 709d3e4..3c8436e 100644 Name: lirc-rpi diff --git a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts -index 735d8ab..e0aaf8f 100644 +index 735d8abfccb2e60be7a87ce5832440f9d38333b7..e0aaf8f03349bb5e7685cc9b65e7ac5820b71c5a 100644 --- a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts @@ -7,7 +7,7 @@ @@ -143557,7 +143557,7 @@ index 735d8ab..e0aaf8f 100644 + }; }; diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c -index 37038d4..124d7a9 100644 +index 37038d48bd6ef47eb8733a9045621eae03983d60..124d7a91976fb7b28de652c0df40c4319257fab2 100644 --- a/sound/soc/bcm/iqaudio-dac.c +++ b/sound/soc/bcm/iqaudio-dac.c @@ -23,14 +23,19 @@ @@ -143597,10 +143597,10 @@ index 37038d4..124d7a9 100644 ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); -From d87eb9396da3d0cf59346531fb93cfaa452760d8 Mon Sep 17 00:00:00 2001 +From d63511193f20430245e6b4f5e89333d83d3240c6 Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 20:04:00 +0000 -Subject: [PATCH 137/251] Limit PCM512x "Digital" gain to 0dB by default with +Subject: [PATCH 137/398] Limit PCM512x "Digital" gain to 0dB by default with HiFiBerry DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143613,7 +143613,7 @@ and if specified will allow the full 24dB gain. 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 3c8436e..296184f 100644 +index 3c8436e60743f419ce3e43b07408a02645b8e116..296184fe050ee70ba35025443b6f92732e3c5a5f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -273,8 +273,21 @@ Params: @@ -143641,7 +143641,7 @@ index 3c8436e..296184f 100644 Name: hifiberry-digi diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts -index f923a48..42a0194 100644 +index f923a48628d7472f635d25f25bd3c9badc530c9e..42a0194e97c067840fa0c578857818a883fb2327 100644 --- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -17,7 +17,7 @@ @@ -143663,7 +143663,7 @@ index f923a48..42a0194 100644 + }; }; diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c -index a6b651c..153dbcd 100644 +index a6b651cb608a5d133456cf493d187951eb47a61d..153dbcd957df12fd215712f2e74d7deba6f7e997 100644 --- a/sound/soc/bcm/hifiberry_dacplus.c +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -48,6 +48,7 @@ struct pcm512x_priv { @@ -143702,17 +143702,17 @@ index a6b651c..153dbcd 100644 ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); -From f279fd3295cc2407f05e56fafb77edc800148547 Mon Sep 17 00:00:00 2001 +From b6ad0477737edf1483f9fa5858406b9d1799d031 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 Feb 2016 09:46:33 +0000 -Subject: [PATCH 138/251] BCM270X_DT: Adjust overlay README formatting +Subject: [PATCH 138/398] BCM270X_DT: Adjust overlay README formatting --- arch/arm/boot/dts/overlays/README | 414 +++++++++++++++++++------------------- 1 file changed, 207 insertions(+), 207 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 296184f..f987565 100644 +index 296184fe050ee70ba35025443b6f92732e3c5a5f..f9875655c4a2e8bfe648208a719df6fa832ecef5 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -83,58 +83,58 @@ Name: @@ -144434,10 +144434,10 @@ index 296184f..f987565 100644 Troubleshooting -From 414077cd3a0694b0a49a8e1bc92b574290aa8fcf Mon Sep 17 00:00:00 2001 +From 2e6be519a55561dda5b78848709ec39222119971 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Feb 2016 16:51:01 +0000 -Subject: [PATCH 139/251] bcm2835-sdhost: Major revision +Subject: [PATCH 139/398] bcm2835-sdhost: Major revision This is a significant revision of the bcm2835-sdhost driver. It improves on the original in a number of ways: @@ -144455,7 +144455,7 @@ Signed-off-by: Phil Elwell 1 file changed, 686 insertions(+), 598 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index ef9b1e6..262180b 100644 +index ef9b1e6f710a2dade4b7f6f4564702f97af42ef0..262180bbd40e5a026676f15fca206e01918a7caa 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -2,7 +2,7 @@ @@ -146506,10 +146506,10 @@ index ef9b1e6..262180b 100644 .probe = bcm2835_sdhost_probe, .remove = bcm2835_sdhost_remove, -From 28749d393c5f8b68c20ab5827c0e519eb96c89fe Mon Sep 17 00:00:00 2001 +From 1d5b152308a645c20c91300d6f86b05258d7393f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 12 Feb 2016 15:38:00 +0000 -Subject: [PATCH 140/251] BCM270X_DT: Add dtparams for the SD interface +Subject: [PATCH 140/398] BCM270X_DT: Add dtparams for the SD interface Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit and sd_debug. @@ -146527,7 +146527,7 @@ and sd_debug. 10 files changed, 58 insertions(+), 23 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -index 2e4df17..d2d6fa0 100644 +index 2e4df17ea71ab73b20314ed8ffc4396378195240..d2d6fa0fa6b384a4cbc296ad37813f36f744b69c 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -141,5 +141,9 @@ @@ -146541,7 +146541,7 @@ index 2e4df17..d2d6fa0 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts -index 0445b46..d033ee4 100644 +index 0445b46367689877f62d0bd6c36aed7cdd93383e..d033ee4cab87c1cbdeb9a4c136c7233eff68f3c7 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -131,5 +131,9 @@ @@ -146555,7 +146555,7 @@ index 0445b46..d033ee4 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 87c1a54..8bcafb4 100755 +index 87c1a54ed569df899e6340f4e26e0c885ef7df0a..8bcafb41c39595a47b7d932871cb6463f137241d 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -97,6 +97,5 @@ @@ -146566,7 +146566,7 @@ index 87c1a54..8bcafb4 100755 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi -index 3c8bdde..e09e499 100644 +index 3c8bdde83189a5d4089d509e59a4fd9668e5c746..e09e4993e8f06df83b72b1342d2d21de7fbc542a 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi @@ -7,6 +7,13 @@ @@ -146603,7 +146603,7 @@ index 3c8bdde..e09e499 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 75fb4ce..18d3c45 100644 +index 75fb4ce688a6f1774163628f9d2f706bc4d06767..18d3c4516ff0b78f7c612d92620e6326dd7f5a17 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -135,6 +135,7 @@ @@ -146623,7 +146623,7 @@ index 75fb4ce..18d3c45 100644 }; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 5206ba2..aca253f 100644 +index 5206ba204d97c3e904ff482bb04b169f434827ca..aca253ff9b7b21f628e4294fd3e7d8de061e26fb 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -141,5 +141,9 @@ @@ -146637,7 +146637,7 @@ index 5206ba2..aca253f 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index f987565..0a2df01 100644 +index f9875655c4a2e8bfe648208a719df6fa832ecef5..0a2df0195378feb884142361ac28ae1911879c82 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -112,6 +112,16 @@ Params: @@ -146666,7 +146666,7 @@ index f987565..0a2df01 100644 Name: mz61581 diff --git a/arch/arm/boot/dts/overlays/mmc-overlay.dts b/arch/arm/boot/dts/overlays/mmc-overlay.dts -index 00a22be..d32b02c 100644 +index 00a22be8d63c7ecc19d3eff8ba9d073765c4fb8a..d32b02ca01ced5ab3de00d66d5412c8fda4bc510 100644 --- a/arch/arm/boot/dts/overlays/mmc-overlay.dts +++ b/arch/arm/boot/dts/overlays/mmc-overlay.dts @@ -34,6 +34,5 @@ @@ -146677,7 +146677,7 @@ index 00a22be..d32b02c 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/sdhost-overlay.dts b/arch/arm/boot/dts/overlays/sdhost-overlay.dts -index dbe6574..a431177 100644 +index dbe6574fbd2b89efc0fbee87eb7bedce4f462069..a431177a1c9d320d5432ea448ad4d0f696c34525 100644 --- a/arch/arm/boot/dts/overlays/sdhost-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts @@ -1,19 +1,14 @@ @@ -146727,7 +146727,7 @@ index dbe6574..a431177 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts -index b0b208c..e4a4677 100644 +index b0b208c2261ef53b8a30f0ecc176cead69a5b1c7..e4a4677f6b20da6b51751e9675c1c276ca4d2051 100644 --- a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts @@ -1,23 +1,23 @@ @@ -146762,10 +146762,10 @@ index b0b208c..e4a4677 100644 }; }; -From bad7a004e1e990eefa9f402684b19021baa81812 Mon Sep 17 00:00:00 2001 +From e838f32445da76d18655f87b3f0c39c8712b31cc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Feb 2016 14:50:25 +0000 -Subject: [PATCH 141/251] dcw_otg: trim xfer length when buffer larger than +Subject: [PATCH 141/398] dcw_otg: trim xfer length when buffer larger than allocated size is received --- @@ -146773,7 +146773,7 @@ Subject: [PATCH 141/251] dcw_otg: trim xfer length when buffer larger than 1 file changed, 11 insertions(+) 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 8db3dfc..d672a76 100644 +index 8db3dfcba4ffb9cf267ed1fe6b809142792f7384..d672a76dd2a0a885783321c366f1fdc71b9b132f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -737,6 +737,11 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, @@ -146802,10 +146802,10 @@ index 8db3dfc..d672a76 100644 if (hc->align_buff && bytes_transferred && hc->ep_is_in) { dwc_memcpy(urb->buf + urb->actual_length, hc->qh->dw_align_buf, -From 3f19b475b6394511ee22af77c8287ea1c1b8295a Mon Sep 17 00:00:00 2001 +From 2922f7c70cf972afc37a0493121b5fbabc08e1f2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 15 Feb 2016 10:00:27 +0000 -Subject: [PATCH 142/251] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping +Subject: [PATCH 142/398] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping Allocation problems have been seen in a wireless driver, and this is the only change which might have been responsible. @@ -146814,7 +146814,7 @@ this is the only change which might have been responsible. 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 262180b..d66385c 100644 +index 262180bbd40e5a026676f15fca206e01918a7caa..d66385c788e97a4d2704d8b5636ca172e7d81639 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -874,15 +874,14 @@ static void bcm2835_sdhost_prepare_data(struct bcm2835_host *host, struct mmc_co @@ -146837,10 +146837,10 @@ index 262180b..d66385c 100644 host->blocks = data->blocks; } -From 962dfa8efd816762704046d501b703eb153fca3f Mon Sep 17 00:00:00 2001 +From c537d4ecb50eee5ec692ed851fbfedd7b82eaf34 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Tue, 16 Feb 2016 10:03:42 +0000 -Subject: [PATCH 143/251] Updated smsc95xx driver to check for a valid MAC +Subject: [PATCH 143/398] Updated smsc95xx driver to check for a valid MAC address in eeprom before using smsc95xx.macaddr parameter passed on command line. @@ -146852,7 +146852,7 @@ meaning they don't end up with the same MAC address as the built-in RPi adaptor. 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index 3244a90..7483222 100755 +index 3244a908a00147cb028b5632073b4e8f74e4d509..7483222f330ad77fe8656e2046205daa87a3255e 100755 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -817,10 +817,6 @@ static int smsc95xx_is_macaddr_param(struct usbnet *dev, u8 *dev_mac) @@ -146880,17 +146880,17 @@ index 3244a90..7483222 100755 netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); } -From 0139c7899ec18de29f16b6dad11ea5cddd06ae62 Mon Sep 17 00:00:00 2001 +From 812f9c59b1d8ec57378fb58437b5f9a8a6a19b85 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Feb 2016 19:02:31 +0000 -Subject: [PATCH 144/251] dcw_otg: Make trimming messages less noisy +Subject: [PATCH 144/398] dcw_otg: Make trimming messages less noisy --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 d672a76..e6b38ac 100644 +index d672a76dd2a0a885783321c366f1fdc71b9b132f..e6b38ac330b72152204c2a6879c20f0ce02ac2e5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -738,7 +738,8 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, @@ -146914,10 +146914,10 @@ index d672a76..e6b38ac 100644 } -From e41f1f667f3d2f4e6e22dc585a6d4dabbc5aafd7 Mon Sep 17 00:00:00 2001 +From 5f7d35464bfb4bc8cf59c28218a678dd82eab736 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 Feb 2016 15:28:14 +0000 -Subject: [PATCH 145/251] BCM270X_DT: at86rf233 overlay - drop to 3MHz +Subject: [PATCH 145/398] BCM270X_DT: at86rf233 overlay - drop to 3MHz The consensus is that 6MHz is too fast, but that 3MHz is OK. @@ -146929,7 +146929,7 @@ See: https://github.com/raspberrypi/linux/issues/1294 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 0a2df01..4de0b6f 100644 +index 0a2df0195378feb884142361ac28ae1911879c82..4de0b6fbcb504b2213836bb95cae910c6d6ee05f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -188,7 +188,7 @@ Load: dtoverlay=at86rf233,= @@ -146942,7 +146942,7 @@ index 0a2df01..4de0b6f 100644 arrays (0=+0pF, 15=+4.5pF, default 15) diff --git a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts -index 0460269..eab4052 100644 +index 0460269cd6d1c0f42f1e5122ae247ff142235958..eab40523b78f20676f267bf5e81bff69b07becb3 100644 --- a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts +++ b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts @@ -25,7 +25,7 @@ @@ -146955,17 +146955,17 @@ index 0460269..eab4052 100644 }; }; -From 61f20e3098ef685f6a14238c58b7158e637652bc Mon Sep 17 00:00:00 2001 +From fe1e133a0c70bebc09bb81a2a8e714e320d3f0db Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 19 Feb 2016 12:04:48 +0000 -Subject: [PATCH 146/251] bcm2835-sdhost: Downgrade log message status +Subject: [PATCH 146/398] bcm2835-sdhost: Downgrade log message status --- drivers/mmc/host/bcm2835-sdhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index d66385c..4f6cab5 100644 +index d66385c788e97a4d2704d8b5636ca172e7d81639..4f6cab52a60f5a0426076ffdb9e6098c2be8aa1d 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -232,8 +232,8 @@ static void log_init(u32 bus_to_phys) @@ -146980,10 +146980,10 @@ index d66385c..4f6cab5 100644 if (!timer_base) pr_err("sdhost: failed to remap timer\n"); -From 8d7f055a36864ccb388a526cca31a4e416125ac6 Mon Sep 17 00:00:00 2001 +From ddbb6514e092603a8923606b6534011a363004dd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 Jan 2016 16:48:27 +0000 -Subject: [PATCH 147/251] config: Enable HCI over UARTs +Subject: [PATCH 147/398] config: Enable HCI over UARTs --- arch/arm/configs/bcm2709_defconfig | 3 +++ @@ -146991,7 +146991,7 @@ Subject: [PATCH 147/251] config: Enable HCI over UARTs 2 files changed, 5 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index fc35254..48ecb2e 100644 +index fc3525411dd631e6f0032315314444644a3f6706..48ecb2e7672f86c6104537b689c0baa75030b26c 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -376,6 +376,9 @@ CONFIG_BT_BNEP_PROTO_FILTER=y @@ -147005,7 +147005,7 @@ index fc35254..48ecb2e 100644 CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 51dc019..4368f0d 100644 +index 51dc0197b7e47dc9cdeb09cafe830ec84abf67e6..4368f0d33b30f8a5e58070e852491faeed786b69 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -370,6 +370,8 @@ CONFIG_BT_HIDP=m @@ -147018,10 +147018,10 @@ index 51dc019..4368f0d 100644 CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m -From 4e80e74fc12bf2b3f75908afce3fe399323ccb90 Mon Sep 17 00:00:00 2001 +From f4d7e9dd665e9afd09be6c8c49856e046b45243a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 148/251] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 148/398] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -147030,7 +147030,7 @@ other with conf_req and conf_rsp messages, in a demented game of tag. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c -index abee221..2825833 100644 +index abee2216fdeb263bb6cc1d1052a070825f5926cd..2825833b952567bfdf6568b62a87afa5bebd1e1b 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c @@ -314,7 +314,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu) @@ -147044,10 +147044,10 @@ index abee221..2825833 100644 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 7); -From 7ea16aeff2daf97ada8b68b9acad503f5a922c61 Mon Sep 17 00:00:00 2001 +From bd4aa588916168c0f480694c4abc31f5754ee53b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 149/251] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 149/398] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -147059,7 +147059,7 @@ use the same logic. 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 899a771..68b3353 100644 +index 899a77187bdead871b2e1f22ed4f320486e5288b..68b3353c5c035203fe3ad03c80eeb303a0cbc322 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2313,7 +2313,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, @@ -147076,10 +147076,10 @@ index 899a771..68b3353 100644 uap->old_cr = 0; uap->port.dev = dev; -From cce16b3c1c46f74a3178029ac894c89aea751af4 Mon Sep 17 00:00:00 2001 +From 712724340039373dc6a2b09bbfc645ee82bb5e82 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:57 -0800 -Subject: [PATCH 150/251] clk: bcm2835: Add bindings for the auxiliary +Subject: [PATCH 150/398] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates. These will be used for enabling UART1, SPI1, and SPI2. @@ -147096,7 +147096,7 @@ Signed-off-by: Michael Turquette diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt new file mode 100644 -index 0000000..7a837d2 +index 0000000000000000000000000000000000000000..7a837d2182acf74e0104b4da227cc2a4715d7504 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt @@ -0,0 +1,31 @@ @@ -147133,7 +147133,7 @@ index 0000000..7a837d2 + }; diff --git a/include/dt-bindings/clock/bcm2835-aux.h b/include/dt-bindings/clock/bcm2835-aux.h new file mode 100644 -index 0000000..d91156e +index 0000000000000000000000000000000000000000..d91156e2658dabeaaa8624921c322646d3d18dda --- /dev/null +++ b/include/dt-bindings/clock/bcm2835-aux.h @@ -0,0 +1,17 @@ @@ -147155,10 +147155,10 @@ index 0000000..d91156e +#define BCM2835_AUX_CLOCK_SPI2 2 +#define BCM2835_AUX_CLOCK_COUNT 3 -From 16aac0eab690fbafcf6cb70a19ceffd848cc8ee8 Mon Sep 17 00:00:00 2001 +From d6d12e2533078f3ce2c55a451044c7598e33c786 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:58 -0800 -Subject: [PATCH 151/251] clk: bcm2835: Add a driver for the auxiliary +Subject: [PATCH 151/398] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. There are a pair of SPI masters and a mini UART that were last minute @@ -147176,7 +147176,7 @@ updated Makefile to preserve the rasoberry pi architectures create mode 100644 drivers/clk/bcm/clk-bcm2835-aux.c diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index a1b4cbc..84070d5 100644 +index a1b4cbcae647e7c3a2cc6d3a7e7e1505d50e24d4..84070d51da8b11342cbbe6dd685692831a8f26eb 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -147189,7 +147189,7 @@ index a1b4cbc..84070d5 100644 obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o diff --git a/drivers/clk/bcm/clk-bcm2835-aux.c b/drivers/clk/bcm/clk-bcm2835-aux.c new file mode 100644 -index 0000000..e4f89e2 +index 0000000000000000000000000000000000000000..e4f89e28b5ecf5a88bbbdc50111904beb470b2a6 --- /dev/null +++ b/drivers/clk/bcm/clk-bcm2835-aux.c @@ -0,0 +1,85 @@ @@ -147279,10 +147279,10 @@ index 0000000..e4f89e2 +MODULE_DESCRIPTION("BCM2835 auxiliary peripheral clock driver"); +MODULE_LICENSE("GPL v2"); -From c7b36d3709441f04c40763f17c82e6734cc14fc1 Mon Sep 17 00:00:00 2001 +From 9bef661118767a1f0997456da62acde9e915c5bf Mon Sep 17 00:00:00 2001 From: Fraser Date: Tue, 23 Feb 2016 10:04:37 +1100 -Subject: [PATCH 152/251] Aux SPI 1&2 implementation +Subject: [PATCH 152/398] Aux SPI 1&2 implementation Adds aux spi 1 & 2 devices to compatible raspberry PIs. * Minor config of the driver build environment to ensure they get built @@ -147315,7 +147315,7 @@ users a degree of control over how they are setup. create mode 100644 arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 18d3c45..4f65203 100644 +index 18d3c4516ff0b78f7c612d92620e6326dd7f5a17..4f65203b784c0a5ad411adf4530ff5c71e916feb 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -1,3 +1,4 @@ @@ -147385,7 +147385,7 @@ index 18d3c45..4f65203 100644 mmc: mmc@7e300000 { compatible = "brcm,bcm2835-mmc"; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 4d9d640..a787d66 100644 +index 4d9d64059660c65c4f52be42f9bef53801505f58..a787d6634f0eabb15ee9a6f173a2e20ff1db02bf 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -57,6 +57,12 @@ dtb-$(RPI_DT_OVERLAYS) += sdtweak-overlay.dtb @@ -147402,7 +147402,7 @@ index 4d9d640..a787d66 100644 dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += uart1-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4de0b6f..cf5f5be 100644 +index 4de0b6fbcb504b2213836bb95cae910c6d6ee05f..cf5f5bee0d3312754be7fb71418bf9183994a2c5 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -713,6 +713,105 @@ Load: dtoverlay=spi-gpio35-39 @@ -147513,7 +147513,7 @@ index 4de0b6f..cf5f5be 100644 Options: Touch, RTC, keypad diff --git a/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts new file mode 100644 -index 0000000..71c2439 +index 0000000000000000000000000000000000000000..71c243947004fa887998065df9c259b50edfa428 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts @@ -0,0 +1,57 @@ @@ -147576,7 +147576,7 @@ index 0000000..71c2439 +}; diff --git a/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts new file mode 100644 -index 0000000..2ae0885 +index 0000000000000000000000000000000000000000..2ae0885cf1e7fb7420f65e538310ab1addafbece --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts @@ -0,0 +1,69 @@ @@ -147651,7 +147651,7 @@ index 0000000..2ae0885 +}; diff --git a/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts new file mode 100644 -index 0000000..8f79044 +index 0000000000000000000000000000000000000000..8f79044cd8f47ea055394822cc380497c985c7e5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts @@ -0,0 +1,81 @@ @@ -147738,7 +147738,7 @@ index 0000000..8f79044 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts new file mode 100644 -index 0000000..6f57bc7 +index 0000000000000000000000000000000000000000..6f57bc710fe123028a5a216063733f0cea9bbd54 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts @@ -0,0 +1,57 @@ @@ -147801,7 +147801,7 @@ index 0000000..6f57bc7 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts new file mode 100644 -index 0000000..d090631 +index 0000000000000000000000000000000000000000..d090631d36821b0c89833b9f217216f0b134a8f3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts @@ -0,0 +1,69 @@ @@ -147876,7 +147876,7 @@ index 0000000..d090631 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts new file mode 100644 -index 0000000..e258672 +index 0000000000000000000000000000000000000000..e2586728c311829462f6a4b3b348e35603f033ce --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts @@ -0,0 +1,81 @@ @@ -147962,7 +147962,7 @@ index 0000000..e258672 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 48ecb2e..76b3a88 100644 +index 48ecb2e7672f86c6104537b689c0baa75030b26c..76b3a88d9d61bf7a713ae69567ffa5375c6969ce 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -601,6 +601,7 @@ CONFIG_I2C_BCM2708=m @@ -147974,7 +147974,7 @@ index 48ecb2e..76b3a88 100644 CONFIG_PPS=m CONFIG_PPS_CLIENT_LDISC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 4368f0d..1ca1695 100644 +index 4368f0d33b30f8a5e58070e852491faeed786b69..1ca1695f699c9311d14fe09a555736b1898717ee 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -593,6 +593,7 @@ CONFIG_I2C_BCM2708=m @@ -147986,7 +147986,7 @@ index 4368f0d..1ca1695 100644 CONFIG_PPS=m CONFIG_PPS_CLIENT_LDISC=m diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index 84070d5..d60fd3f 100644 +index 84070d51da8b11342cbbe6dd685692831a8f26eb..d60fd3f220a0eac7ca9613d91767b9d4a7285a53 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -147999,7 +147999,7 @@ index 84070d5..d60fd3f 100644 obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index e842e86..c9d1558 100644 +index e842e8613b144f16916b1fce53cba1b538b8628d..c9d1558eddcc68128e02c3a493f9f95c00c4cc37 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -90,7 +90,7 @@ config SPI_BCM2835 @@ -148012,10 +148012,10 @@ index e842e86..c9d1558 100644 help This selects a driver for the Broadcom BCM2835 SPI aux master. -From 9c53b072c7283c02625434a42fbc2aaa3b2b4bbc Mon Sep 17 00:00:00 2001 +From 122c9e6cc7f3e4a0820d841da1460d3d679739aa Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 23 Feb 2016 17:28:23 +0100 -Subject: [PATCH 153/251] ASoC: bcm: add missing .owner fields in sound card +Subject: [PATCH 153/398] ASoC: bcm: add missing .owner fields in sound card drivers If snd_soc_card.owner is not set the kernel won't do usage refcounting @@ -148041,7 +148041,7 @@ Signed-off-by: Matthias Reichl 8 files changed, 8 insertions(+) diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c -index 5903915..0bb12e4 100644 +index 590391597bc602528ad52a41086d260427a806f9..0bb12e4761ce60d3364c66b2bd0f8f7dbdcecfb1 100644 --- a/sound/soc/bcm/hifiberry_amp.c +++ b/sound/soc/bcm/hifiberry_amp.c @@ -61,6 +61,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = { @@ -148053,7 +148053,7 @@ index 5903915..0bb12e4 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai), }; diff --git a/sound/soc/bcm/hifiberry_dac.c b/sound/soc/bcm/hifiberry_dac.c -index 3ab0f47..29ecc08 100644 +index 3ab0f4705a9ffc4caa5e6a9788300a34505795ed..29ecc08a227cdd4b3c6141935d0c5d21c2c6b4d8 100644 --- a/sound/soc/bcm/hifiberry_dac.c +++ b/sound/soc/bcm/hifiberry_dac.c @@ -63,6 +63,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_dac_dai[] = { @@ -148065,7 +148065,7 @@ index 3ab0f47..29ecc08 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_dac_dai), }; diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c -index 153dbcd..03d8d2a 100644 +index 153dbcd957df12fd215712f2e74d7deba6f7e997..03d8d2a289b368e5e720ff8e18d3a74a3d788d29 100644 --- a/sound/soc/bcm/hifiberry_dacplus.c +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -287,6 +287,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_dacplus_dai[] = { @@ -148077,7 +148077,7 @@ index 153dbcd..03d8d2a 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_dacplus_dai), }; diff --git a/sound/soc/bcm/hifiberry_digi.c b/sound/soc/bcm/hifiberry_digi.c -index 80732b8..9840e15 100644 +index 80732b8ac1809d9921450e0789b1022d4dd0c7fd..9840e15d3e2be6396bc3ce6e74749408cc28c333 100644 --- a/sound/soc/bcm/hifiberry_digi.c +++ b/sound/soc/bcm/hifiberry_digi.c @@ -164,6 +164,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_digi_dai[] = { @@ -148089,7 +148089,7 @@ index 80732b8..9840e15 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_digi_dai), }; diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c -index 124d7a9..a5eaa9e 100644 +index 124d7a91976fb7b28de652c0df40c4319257fab2..a5eaa9ee0994f3a8e89179bf51328a3f92cef316 100644 --- a/sound/soc/bcm/iqaudio-dac.c +++ b/sound/soc/bcm/iqaudio-dac.c @@ -77,6 +77,7 @@ static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { @@ -148101,7 +148101,7 @@ index 124d7a9..a5eaa9e 100644 .num_links = ARRAY_SIZE(snd_rpi_iqaudio_dac_dai), }; diff --git a/sound/soc/bcm/raspidac3.c b/sound/soc/bcm/raspidac3.c -index 3cabf5b..e7422e2 100644 +index 3cabf5b42f50c708443c44fec30e0b8701cc7196..e7422e2dd3d70622a48ab3b2e192986931235764 100644 --- a/sound/soc/bcm/raspidac3.c +++ b/sound/soc/bcm/raspidac3.c @@ -128,6 +128,7 @@ static struct snd_soc_dai_link snd_rpi_raspidac3_dai[] = { @@ -148113,7 +148113,7 @@ index 3cabf5b..e7422e2 100644 .num_links = ARRAY_SIZE(snd_rpi_raspidac3_dai), }; diff --git a/sound/soc/bcm/rpi-dac.c b/sound/soc/bcm/rpi-dac.c -index d5fac1b..59dc89e 100644 +index d5fac1b21d50c323afe27c1d1e0283d82b81507f..59dc89ecabc082c0a1ed8adacdc4f0f1337a1c73 100644 --- a/sound/soc/bcm/rpi-dac.c +++ b/sound/soc/bcm/rpi-dac.c @@ -60,6 +60,7 @@ static struct snd_soc_dai_link snd_rpi_rpi_dac_dai[] = { @@ -148125,7 +148125,7 @@ index d5fac1b..59dc89e 100644 .num_links = ARRAY_SIZE(snd_rpi_rpi_dac_dai), }; diff --git a/sound/soc/bcm/rpi-proto.c b/sound/soc/bcm/rpi-proto.c -index c6e45a0..9db678e 100644 +index c6e45a03f4c36dab7930fdfc1c8b36c38bd41fb8..9db678e885efd63d84d60a098a84ed6772b19a2d 100644 --- a/sound/soc/bcm/rpi-proto.c +++ b/sound/soc/bcm/rpi-proto.c @@ -91,6 +91,7 @@ static struct snd_soc_dai_link snd_rpi_proto_dai[] = { @@ -148137,10 +148137,10 @@ index c6e45a0..9db678e 100644 .num_links = ARRAY_SIZE(snd_rpi_proto_dai), }; -From 797d7607625bed287bdadcee2471a247ced1ded5 Mon Sep 17 00:00:00 2001 +From 2541ed2537e93a858b2092310041c490f9d7b927 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 20 Jan 2016 17:50:09 +0000 -Subject: [PATCH 154/251] smsx95xx: Add option to disable the crimes against +Subject: [PATCH 154/398] smsx95xx: Add option to disable the crimes against truesize fix It may improve iperf numbers on Pi 1, but may generate dmesg warnings and possibly cause network issues @@ -148153,7 +148153,7 @@ See issue 1248. diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c old mode 100755 new mode 100644 -index 7483222..a61bd08 +index 7483222f330ad77fe8656e2046205daa87a3255e..a61bd08d81a0dc6a18f3989b87f57101e78aa4ac --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -75,6 +75,10 @@ static bool turbo_mode = false; @@ -148186,10 +148186,10 @@ index 7483222..a61bd08 usbnet_skb_return(dev, ax_skb); } -From 93c08f5b50bbb8181c4d34bb40fc57e4e3142f8f Mon Sep 17 00:00:00 2001 +From 87c0d251c33ca5f55b7806c45d756f8cd6ab3ad4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 155/251] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 155/398] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -148203,7 +148203,7 @@ request that the VPU toggles LEDs. create mode 100644 drivers/gpio/gpio-bcm-virt.c diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 76b3a88..6d6b519 100644 +index 76b3a88d9d61bf7a713ae69567ffa5375c6969ce..6d6b5196de44a9d306e5adfbc47d46a4a9cfb2e6 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -607,6 +607,7 @@ CONFIG_PPS=m @@ -148215,7 +148215,7 @@ index 76b3a88..6d6b519 100644 CONFIG_GPIO_STMPE=y CONFIG_W1=m diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index b18bea0..a1f4cce 100644 +index b18bea08ff253398db70846445dca4ee3ea0eafc..a1f4ccee349ff4799a6872a8b3e293d4afceac7b 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -132,6 +132,12 @@ config GPIO_BCM_KONA @@ -148232,7 +148232,7 @@ index b18bea0..a1f4cce 100644 tristate "BRCMSTB GPIO support" default y if ARCH_BRCMSTB diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile -index 986dbd8..b2ccc9f 100644 +index 986dbd838ceaceb03c42ffc15a704bf5f180b09d..b2ccc9fd7011d14b7f7a10ad1e4910f540867085 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o @@ -148245,7 +148245,7 @@ index 986dbd8..b2ccc9f 100644 obj-$(CONFIG_GPIO_CLPS711X) += gpio-clps711x.o diff --git a/drivers/gpio/gpio-bcm-virt.c b/drivers/gpio/gpio-bcm-virt.c new file mode 100644 -index 0000000..53edcb4 +index 0000000000000000000000000000000000000000..53edcb47a04ea69fc3dc8e2e11a755d9830b75b0 --- /dev/null +++ b/drivers/gpio/gpio-bcm-virt.c @@ -0,0 +1,180 @@ @@ -148430,7 +148430,7 @@ index 0000000..53edcb4 +MODULE_DESCRIPTION("brcmvirt GPIO driver"); +MODULE_ALIAS("platform:brcmvirt-gpio"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index b011489..c844968 100644 +index b011489eebc0180fce28eea86bd637853c0d05de..c844968bf0d2f551587d2879195bb70c8e7f1333 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -93,6 +93,7 @@ enum rpi_firmware_property_tag { @@ -148442,10 +148442,10 @@ index b011489..c844968 100644 RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003, RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004, -From 686310b3289232a8ae9d21061318e2ee3ca65c3d Mon Sep 17 00:00:00 2001 +From 75e02ab8cd21a770b43c02b60ccbe5593693e58a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Jan 2016 17:57:49 +0000 -Subject: [PATCH 156/251] BCM270X_DT: Add Pi3 support +Subject: [PATCH 156/398] BCM270X_DT: Add Pi3 support --- arch/arm/boot/dts/Makefile | 1 + @@ -148456,7 +148456,7 @@ Subject: [PATCH 156/251] BCM270X_DT: Add Pi3 support create mode 100644 arch/arm/boot/dts/bcm2710.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index d583e67..fdc450f 100644 +index d583e67d065a7d841e4606a4b99d94f252969a5c..fdc450f4c9d9623ac4723d39df9419eb80a420db 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b-plus.dtb @@ -148469,7 +148469,7 @@ index d583e67..fdc450f 100644 ifeq ($(CONFIG_ARCH_BCM2708),y) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts new file mode 100644 -index 0000000..cc06089 +index 0000000000000000000000000000000000000000..cc060898f428d9cb4f98f8e35345a3323130a098 --- /dev/null +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -0,0 +1,192 @@ @@ -148667,7 +148667,7 @@ index 0000000..cc06089 +}; diff --git a/arch/arm/boot/dts/bcm2710.dtsi b/arch/arm/boot/dts/bcm2710.dtsi new file mode 100644 -index 0000000..1a48686 +index 0000000000000000000000000000000000000000..1a48686a15d44dc6fbdddc569d564779f76ae5d1 --- /dev/null +++ b/arch/arm/boot/dts/bcm2710.dtsi @@ -0,0 +1,102 @@ @@ -148774,10 +148774,10 @@ index 0000000..1a48686 + interrupts = <8>; +}; -From 5704ec08a597c580de377bb0fca760fa30b927b0 Mon Sep 17 00:00:00 2001 +From 839356fda81c8aa74879d175851b4a3206fff510 Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Mon, 8 Feb 2016 23:49:41 +0000 -Subject: [PATCH 157/251] DT: Add overlays to configure I2C pins +Subject: [PATCH 157/398] DT: Add overlays to configure I2C pins Lifted from https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=120938&p=825883 @@ -148794,7 +148794,7 @@ allocations for i2c-0 and i2c-1 to be changed. create mode 100644 arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index a787d66..f2bc3ce 100644 +index a787d6634f0eabb15ee9a6f173a2e20ff1db02bf..f2bc3cee6613bdea7ec6476a467f2f2c31b0220d 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -29,6 +29,8 @@ dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb @@ -148807,7 +148807,7 @@ index a787d66..f2bc3ce 100644 dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index cf5f5be..7d7bbb8 100644 +index cf5f5bee0d3312754be7fb71418bf9183994a2c5..7d7bbb889d15bb9cc10e3089a2d40f2b6ae6c3b2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -371,6 +371,22 @@ Params: ds1307 Select the DS1307 device @@ -148835,7 +148835,7 @@ index cf5f5be..7d7bbb8 100644 Load: dtoverlay=i2s-mmap diff --git a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts new file mode 100644 -index 0000000..5c0e55b +index 0000000000000000000000000000000000000000..5c0e55b73531925f91a1cc3867ddf00ebb782db3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts @@ -0,0 +1,36 @@ @@ -148877,7 +148877,7 @@ index 0000000..5c0e55b +}; diff --git a/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts new file mode 100644 -index 0000000..e303b9c +index 0000000000000000000000000000000000000000..e303b9c61c82a28eab7b48f6b085661574d5a849 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts @@ -0,0 +1,37 @@ @@ -148919,10 +148919,10 @@ index 0000000..e303b9c + }; +}; -From c0d707957191b16ee951b09e3b2d28e5a5cda0f3 Mon Sep 17 00:00:00 2001 +From 3eee68a509484ab18f18e307fa5de8288cd0c610 Mon Sep 17 00:00:00 2001 From: Dhiraj Goel Date: Thu, 3 Mar 2016 21:10:50 -0800 -Subject: [PATCH 158/251] bcm2835-camera: fix a bug in computation of frame +Subject: [PATCH 158/398] bcm2835-camera: fix a bug in computation of frame timestamp Fixes #1318 @@ -148931,7 +148931,7 @@ Fixes #1318 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c -index e83334c..98a892e 100644 +index e83334c01e63da951d60c964418ef105f8755932..98a892e5140ac0e9e4631965b43bcdae5e8f587b 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -360,8 +360,7 @@ static void buffer_cb(struct vchiq_mmal_instance *instance, @@ -148945,10 +148945,10 @@ index e83334c..98a892e 100644 dev->capture.kernel_start_ts.tv_usec + rem; -From e16268752be460f8d65e4d613c690508ce985f3f Mon Sep 17 00:00:00 2001 +From 82c01a55e7a26f8e7f46031dad2dcd3c2c45ee06 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 2 Mar 2016 10:59:05 +0000 -Subject: [PATCH 159/251] BCM270X_DT: Add pi3-disable-bt overlay +Subject: [PATCH 159/398] BCM270X_DT: Add pi3-disable-bt overlay Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. To disable the systemd service that initialises the modem so it doesn't use the UART: @@ -148964,7 +148964,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index f2bc3ce..2c2b2fa 100644 +index f2bc3cee6613bdea7ec6476a467f2f2c31b0220d..2c2b2fa868ee4d82053fb180b1514a9b960c9855 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -39,6 +39,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb @@ -148976,7 +148976,7 @@ index f2bc3ce..2c2b2fa 100644 dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 7d7bbb8..4f0be23 100644 +index 7d7bbb889d15bb9cc10e3089a2d40f2b6ae6c3b2..4f0be234af6bf7faa8d4b3196571dc3ea912e614 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -496,6 +496,14 @@ Params: speed Display SPI bus speed @@ -148996,7 +148996,7 @@ index 7d7bbb8..4f0be23 100644 Load: dtoverlay=piscreen,= diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts new file mode 100644 -index 0000000..05403e2 +index 0000000000000000000000000000000000000000..05403e2a98a5146c6e4d0d2c7ff2ee0241153273 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts @@ -0,0 +1,48 @@ @@ -149049,10 +149049,10 @@ index 0000000..05403e2 + }; +}; -From 59b04f45fe08783a5564c784869cfc93cd40c109 Mon Sep 17 00:00:00 2001 +From 15016b290e0723aa73aeb9cc2cf8b6cebbf403c5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 09:53:03 +0000 -Subject: [PATCH 160/251] BCM270X_DT: Add pi3-miniuart-bt DT overlay +Subject: [PATCH 160/398] BCM270X_DT: Add pi3-miniuart-bt DT overlay Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum @@ -149074,7 +149074,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 2c2b2fa..687cc7c 100644 +index 2c2b2fa868ee4d82053fb180b1514a9b960c9855..687cc7c0d4f1506ee1be8a67df76c9eef080a65b 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -40,6 +40,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb @@ -149086,7 +149086,7 @@ index 2c2b2fa..687cc7c 100644 dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4f0be23..6a7aa31 100644 +index 4f0be234af6bf7faa8d4b3196571dc3ea912e614..6a7aa31ec363250c333b0659cecb6c4960c6e16a 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -504,6 +504,16 @@ Load: dtoverlay=pi3-disable-bt @@ -149108,7 +149108,7 @@ index 4f0be23..6a7aa31 100644 Load: dtoverlay=piscreen,= diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts new file mode 100644 -index 0000000..ae1292a +index 0000000000000000000000000000000000000000..ae1292aed606dd9bab09f66bfd894019fd5d8a0e --- /dev/null +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -0,0 +1,61 @@ @@ -149174,10 +149174,10 @@ index 0000000..ae1292a + }; +}; -From 7c539311298d0f848ba5e300d251572d4f02a891 Mon Sep 17 00:00:00 2001 +From 13ede9a4b841b2f5338c78eaac93a85d01a675aa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 13:38:39 +0000 -Subject: [PATCH 161/251] Pi3 DT: Add dtparams for the SD interface +Subject: [PATCH 161/398] Pi3 DT: Add dtparams for the SD interface Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit and sd_debug. These were missed out of the initial Pi3 DTB. @@ -149188,7 +149188,7 @@ Signed-off-by: Phil Elwell 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index cc06089..36972d8 100644 +index cc060898f428d9cb4f98f8e35345a3323130a098..36972d8e413f39de89f94025541bcfcf14128097 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -188,5 +188,9 @@ @@ -149202,10 +149202,10 @@ index cc06089..36972d8 100644 }; }; -From a852495aa0826899b7cf9b7c341ef4c5baea1073 Mon Sep 17 00:00:00 2001 +From 380df2ff740d14960518a610dc6763b4acbb4d0e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 15:05:11 +0000 -Subject: [PATCH 162/251] vchiq_arm: Tweak the logging output +Subject: [PATCH 162/398] vchiq_arm: Tweak the logging output Signed-off-by: Phil Elwell --- @@ -149213,7 +149213,7 @@ Signed-off-by: Phil Elwell 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c -index 2c98da4..160db24 100644 +index 2c98da4307dff994a00dc246574ef0aaee05d5da..160db24aeea33a8296923501009c1f02bc41e599 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -891,16 +891,14 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, @@ -149280,10 +149280,10 @@ index 2c98da4..160db24 100644 switch (type) { -From e7f05008cced2d27c9b221614ca469dd48f5bc81 Mon Sep 17 00:00:00 2001 +From 97c7535c4648dbf8974a48063f87d0c17bae2c2c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 16:46:39 +0000 -Subject: [PATCH 163/251] bcm2835-sdhost: Only claim one DMA channel +Subject: [PATCH 163/398] bcm2835-sdhost: Only claim one DMA channel With both MMC controllers enabled there are few DMA channels left. The bcm2835-sdhost driver only uses DMA in one direction at a time, so it @@ -149298,7 +149298,7 @@ Signed-off-by: Phil Elwell 2 files changed, 50 insertions(+), 25 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 4f65203..4f833a9 100644 +index 4f65203b784c0a5ad411adf4530ff5c71e916feb..4f833a93b22fab64a23356ce1e29d0ed4fb91d29 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -136,9 +136,8 @@ @@ -149314,7 +149314,7 @@ index 4f65203..4f833a9 100644 brcm,pio-limit = <1>; status = "disabled"; diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 4f6cab5..4cc4272 100644 +index 4f6cab52a60f5a0426076ffdb9e6098c2be8aa1d..4cc4272c869d85305233ce5399367ab5ac8acfd0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -185,9 +185,10 @@ struct bcm2835_host { @@ -149445,10 +149445,10 @@ index 4f6cab5..4cc4272 100644 } } -From afe2e242d78005f19d1611ad15124ce576225778 Mon Sep 17 00:00:00 2001 +From 299b36098eea09b4e07f9dc63c21f1415116395b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Mar 2016 09:49:16 +0000 -Subject: [PATCH 164/251] bcm2835-mmc: Only claim one DMA channel +Subject: [PATCH 164/398] bcm2835-mmc: Only claim one DMA channel With both MMC controllers enabled there are few DMA channels left. The bcm2835-mmc driver only uses DMA in one direction at a time, so it @@ -149463,7 +149463,7 @@ Signed-off-by: Phil Elwell 2 files changed, 51 insertions(+), 23 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 4f833a9..e0be77a 100644 +index 4f833a93b22fab64a23356ce1e29d0ed4fb91d29..e0be77a00a6c5339e5c4c26e672ddbd57f9d9c76 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -232,9 +232,8 @@ @@ -149479,7 +149479,7 @@ index 4f833a9..e0be77a 100644 status = "disabled"; }; diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c -index 104f93e..ceb3793 100644 +index 104f93ecd51d963ac92fcfcf04b1f15225468d8d..ceb37930e167f47c9c848e8de757ad098eec9a19 100644 --- a/drivers/mmc/host/bcm2835-mmc.c +++ b/drivers/mmc/host/bcm2835-mmc.c @@ -108,8 +108,9 @@ struct bcm2835_host { @@ -149620,17 +149620,17 @@ index 104f93e..ceb3793 100644 #endif clk = devm_clk_get(dev, NULL); -From ba461323859e90843ed2a65dd223a60244782814 Mon Sep 17 00:00:00 2001 +From dd1768db125e2d28b7498a26aae749e2cbec2d48 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 Mar 2016 17:08:39 +0000 -Subject: [PATCH 165/251] config: rebuild with savedefconfig +Subject: [PATCH 165/398] config: rebuild with savedefconfig --- arch/arm/configs/bcm2709_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 6d6b519..116002b 100644 +index 6d6b5196de44a9d306e5adfbc47d46a4a9cfb2e6..116002ba56bfdebc8174d7949e945909b6b47280 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -593,7 +593,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y @@ -149651,10 +149651,10 @@ index 6d6b519..116002b 100644 CONFIG_MCP320X=m CONFIG_DHT11=m -From 226c823c6dde5546476a22be8d681712924ad6ef Mon Sep 17 00:00:00 2001 +From b476721c33983c416dbfb3d67d932e2b4524b475 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 Mar 2016 17:06:33 +0000 -Subject: [PATCH 166/251] config: Add module for mcp3422 ADC +Subject: [PATCH 166/398] config: Add module for mcp3422 ADC --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -149662,7 +149662,7 @@ Subject: [PATCH 166/251] config: Add module for mcp3422 ADC 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 116002b..7793baf 100644 +index 116002ba56bfdebc8174d7949e945909b6b47280..7793bafc6b9ffd96f9676f8bd9e44e4c96e8cbfc 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -1114,6 +1114,7 @@ CONFIG_IIO_BUFFER=y @@ -149674,7 +149674,7 @@ index 116002b..7793baf 100644 CONFIG_PWM_BCM2835=m CONFIG_RASPBERRYPI_FIRMWARE=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 1ca1695..f09be87 100644 +index 1ca1695f699c9311d14fe09a555736b1898717ee..f09be8737e6cf697ebf3dd3ee171993ee0127033 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -1121,6 +1121,7 @@ CONFIG_IIO_BUFFER=y @@ -149686,10 +149686,10 @@ index 1ca1695..f09be87 100644 CONFIG_PWM_BCM2835=m CONFIG_RASPBERRYPI_FIRMWARE=y -From f27ae7ba1432ab3604faaf8ca79ed31a5edc8d42 Mon Sep 17 00:00:00 2001 +From 9f18d07576437ddb30d4bb88515cf9f82a2e7bf0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Mar 2016 16:18:57 +0000 -Subject: [PATCH 167/251] Pi3 DT: Add pull-ups on the UART RX lines +Subject: [PATCH 167/398] Pi3 DT: Add pull-ups on the UART RX lines Signed-off-by: Phil Elwell --- @@ -149698,7 +149698,7 @@ Signed-off-by: Phil Elwell 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 36972d8..5a0c45a 100644 +index 36972d8e413f39de89f94025541bcfcf14128097..5a0c45ae55e3480975157b6b3d7cf5e3adfd642b 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -53,13 +53,13 @@ @@ -149718,7 +149718,7 @@ index 36972d8..5a0c45a 100644 }; diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index ae1292a..0b8f0ca 100644 +index ae1292aed606dd9bab09f66bfd894019fd5d8a0e..0b8f0ca74e8fd5a70520e468a754ead8767e23ff 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -46,7 +46,7 @@ @@ -149731,10 +149731,10 @@ index ae1292a..0b8f0ca 100644 }; }; -From e5b66ba646a96ad37ea4c7cc240c34e9d77f0eea Mon Sep 17 00:00:00 2001 +From 417808afe360f6a129432c9024080f466715aebf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 17:25:59 +0000 -Subject: [PATCH 168/251] brcmfmac: Disable power management +Subject: [PATCH 168/398] brcmfmac: Disable power management Disable wireless power saving in the brcmfmac WLAN driver. This is a temporary measure until the connectivity loss resulting from power @@ -149746,7 +149746,7 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -index deb5f78..90f65d9 100644 +index deb5f78dcacc0d9ef188360d300a7b4f1bcfba19..90f65d9b3d73e58c3ba68b097cf828652d308245 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c @@ -2567,6 +2567,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, @@ -149759,10 +149759,10 @@ index deb5f78..90f65d9 100644 if (!check_vif_up(ifp->vif)) { -From 6be841fb1dc54f49488ac814034726a0eecb26c7 Mon Sep 17 00:00:00 2001 +From 963fbad639f61648124d80262f2bae15b2c814a9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 21:28:52 +0000 -Subject: [PATCH 169/251] BCM270X_DT: rpi-display overlay - add swapxy param +Subject: [PATCH 169/398] BCM270X_DT: rpi-display overlay - add swapxy param Signed-off-by: Phil Elwell --- @@ -149771,7 +149771,7 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 6a7aa31..6fa5b80 100644 +index 6a7aa31ec363250c333b0659cecb6c4960c6e16a..6fa5b80419a16da426ade774fab812ad9ab4a158 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -644,14 +644,11 @@ Name: rpi-display @@ -149791,7 +149791,7 @@ index 6a7aa31..6fa5b80 100644 Name: rpi-ft5406 diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts -index a8fa974..ccb296e 100644 +index a8fa9745251216186c987fa8bae17b96d12c90bf..ccb296e023fa7f7c87660ffc1b460acf55f8adff 100644 --- a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts @@ -78,5 +78,6 @@ @@ -149802,10 +149802,10 @@ index a8fa974..ccb296e 100644 }; }; -From 0775a4eb95034a3460293cbd08bc7c6ebbe47a0f Mon Sep 17 00:00:00 2001 +From ca0051d9acdc787cab8de7240cf864bd05779ce4 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Fri, 11 Mar 2016 11:44:35 +0000 -Subject: [PATCH 170/251] Remove I2S config from bt_pins. +Subject: [PATCH 170/398] Remove I2S config from bt_pins. Remove I2S config from bt_pins. Causes issues with clock alignment when I2S is used by an external DAC via GPIO header. @@ -149815,7 +149815,7 @@ used by an external DAC via GPIO header. 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 5a0c45a..2cb7d43 100644 +index 5a0c45ae55e3480975157b6b3d7cf5e3adfd642b..2cb7d43110230cf119105f749d811463a2cc4041 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -45,9 +45,9 @@ @@ -149832,7 +149832,7 @@ index 5a0c45a..2cb7d43 100644 uart0_pins: uart0_pins { diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index 0b8f0ca..f07afcb 100644 +index 0b8f0ca74e8fd5a70520e468a754ead8767e23ff..f07afcb225200a651a362653d0e0522392e6ab40 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -29,7 +29,7 @@ @@ -149845,10 +149845,10 @@ index 0b8f0ca..f07afcb 100644 }; }; -From c80d4e337d289f911bc3d9c972cbcc85c0bf758c Mon Sep 17 00:00:00 2001 +From 2dea58e6028e5a08fa0119836cd3232f7fd41a60 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:44:59 +0100 -Subject: [PATCH 171/251] Revert "scripts/dtc: Add overlay support" +Subject: [PATCH 171/398] Revert "scripts/dtc: Add overlay support" This reverts commit fa6d1755c2fdd9451077d8248e3804f0619f19b9. --- @@ -149865,7 +149865,7 @@ This reverts commit fa6d1755c2fdd9451077d8248e3804f0619f19b9. 10 files changed, 1145 insertions(+), 1685 deletions(-) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index efd1bc6..e81a8c7 100644 +index efd1bc6457747bd665f707523bf745e9ebe94def..e81a8c74b8d2802003c14584b8326bb5bfb174be 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -458,91 +458,21 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -150020,7 +150020,7 @@ index efd1bc6..e81a8c7 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index dd44ba2..0ee1caf 100644 +index dd44ba2aa11d019c7b71cede4f0806dd53c7b0db..0ee1caf03dd057bee8c212002568941f0658edd7 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,11 +113,6 @@ static void lexical_error(const char *fmt, ...); @@ -150036,7 +150036,7 @@ index dd44ba2..0ee1caf 100644 DPRINT("Keyword: /memreserve/\n"); BEGIN_DEFAULT(); diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped -index 1518525..11cd78e 100644 +index 15185255fafdbebf805ad2bb2c63f0fdef4c8776..11cd78e723050e56d00709ef63164bd83cccff9e 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ @@ -150930,7 +150930,7 @@ index 1518525..11cd78e 100644 diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped -index 2c1784e..116458c 100644 +index 2c1784e3b4e1c56a3eeeb9c00d1bcb4a187f2fb5..116458c8dfc4cbd728db8fc348bb254a9bae7208 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -1,19 +1,19 @@ @@ -153740,7 +153740,7 @@ index 2c1784e..116458c 100644 } - diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped -index 0b22bbb..30867c6 100644 +index 0b22bbb974795a98eafd8f22425039713d3994b7..30867c688300e38333877360e3b05475d5b4a2a3 100644 --- a/scripts/dtc/dtc-parser.tab.h_shipped +++ b/scripts/dtc/dtc-parser.tab.h_shipped @@ -1,19 +1,19 @@ @@ -153903,7 +153903,7 @@ index 0b22bbb..30867c6 100644 +#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y -index 56b9c15..5a897e3 100644 +index 56b9c152b11edf404834e2aa9c7637205d4d1c38..5a897e36562d67107dba44fa91274253b34152dc 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -19,7 +19,6 @@ @@ -153962,7 +153962,7 @@ index 56b9c15..5a897e3 100644 ; diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c -index 0cbb14c..8c4add6 100644 +index 0cbb14c96a012a6975f6f4f697398e9ad9aedce1..8c4add69a76578839de910292b165b4504f47cf2 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -29,7 +29,6 @@ int reservenum; /* Number of memory reservation slots */ @@ -154010,7 +154010,7 @@ index 0cbb14c..8c4add6 100644 usage(NULL); default: diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h -index fe45748..56212c8 100644 +index fe4574855e41f8313a5f4e15b468816a07a5d84b..56212c8df660396b1d9bf6752e1121990e0789ab 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h @@ -54,7 +54,6 @@ extern int reservenum; /* Number of memory reservation slots */ @@ -154080,7 +154080,7 @@ index fe45748..56212c8 100644 void delete_labels(struct label **labels); diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c -index f439b40..bd99fa2 100644 +index f439b405848bdf314077e77808d4ba04663515ad..bd99fa2d33b85e873bd00178d6390d70f4afaa0d 100644 --- a/scripts/dtc/flattree.c +++ b/scripts/dtc/flattree.c @@ -262,12 +262,6 @@ static void flatten_tree(struct node *tree, struct emitter *emit, @@ -154246,17 +154246,17 @@ index f439b40..bd99fa2 100644 } diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h -index 86b7338..5b8c7d5 100644 +index 86b7338ad78fd60a0d5e5b4a44bce194ee07cc48..5b8c7d53d608bdbb60776c97732e44cb310cc4c1 100644 --- a/scripts/dtc/version_gen.h +++ b/scripts/dtc/version_gen.h @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" +#define DTC_VERSION "DTC 1.4.1-g9d3649bd" -From 4db35c3559c7b70c617593f51cdde1e6a9f75376 Mon Sep 17 00:00:00 2001 +From f4777105ead3f6f99117bbe2d981bd22ecef3236 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:49:15 +0100 -Subject: [PATCH 172/251] scripts/dtc: Update to upstream version 1.4.1 +Subject: [PATCH 172/398] scripts/dtc: Update to upstream version 1.4.1 Includes the new localfixups format. @@ -154275,7 +154275,7 @@ Signed-off-by: Phil Elwell 10 files changed, 1021 insertions(+), 622 deletions(-) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index e81a8c7..540a3ea 100644 +index e81a8c74b8d2802003c14584b8326bb5bfb174be..540a3ea1f073d385c629b25dfcbe5f7e67c3d8a5 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -458,6 +458,8 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -154415,7 +154415,7 @@ index e81a8c7..540a3ea 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index 0ee1caf..dd44ba2 100644 +index 0ee1caf03dd057bee8c212002568941f0658edd7..dd44ba2aa11d019c7b71cede4f0806dd53c7b0db 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); @@ -154431,7 +154431,7 @@ index 0ee1caf..dd44ba2 100644 DPRINT("Keyword: /memreserve/\n"); BEGIN_DEFAULT(); diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped -index 11cd78e..1518525 100644 +index 11cd78e723050e56d00709ef63164bd83cccff9e..15185255fafdbebf805ad2bb2c63f0fdef4c8776 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ @@ -155325,7 +155325,7 @@ index 11cd78e..1518525 100644 diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped -index 116458c..844c462 100644 +index 116458c8dfc4cbd728db8fc348bb254a9bae7208..844c4628962d0e3e2860edf1315bec4e21b7a810 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -65,6 +65,7 @@ @@ -156533,7 +156533,7 @@ index 116458c..844c462 100644 void yyerror(char const *s) diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped -index 30867c6..276d078 100644 +index 30867c688300e38333877360e3b05475d5b4a2a3..276d0788f8581bf1970ec8ef9c29b1981b4fe252 100644 --- a/scripts/dtc/dtc-parser.tab.h_shipped +++ b/scripts/dtc/dtc-parser.tab.h_shipped @@ -46,26 +46,27 @@ extern int yydebug; @@ -156605,7 +156605,7 @@ index 30867c6..276d078 100644 # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y -index 5a897e3..d23927d 100644 +index 5a897e36562d67107dba44fa91274253b34152dc..d23927d9921558c14e983d2851e6c0cfcce74c17 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -19,6 +19,7 @@ @@ -156663,7 +156663,7 @@ index 5a897e3..d23927d 100644 ; diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c -index 8c4add6..91e91e7 100644 +index 8c4add69a76578839de910292b165b4504f47cf2..91e91e79e95090f8cfe986eb742c8beeec0ffd49 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -29,6 +29,7 @@ int reservenum; /* Number of memory reservation slots */ @@ -156711,7 +156711,7 @@ index 8c4add6..91e91e7 100644 usage(NULL); default: diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h -index 56212c8..f163b22 100644 +index 56212c8df660396b1d9bf6752e1121990e0789ab..f163b22b14b806b637c9fe996efd02762d182e1d 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h @@ -54,6 +54,7 @@ extern int reservenum; /* Number of memory reservation slots */ @@ -156783,7 +156783,7 @@ index 56212c8..f163b22 100644 void delete_labels(struct label **labels); diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c -index bd99fa2..2385137 100644 +index bd99fa2d33b85e873bd00178d6390d70f4afaa0d..238513780a5ba08c70d3995f45c35817fbabeb45 100644 --- a/scripts/dtc/flattree.c +++ b/scripts/dtc/flattree.c @@ -255,6 +255,204 @@ static int stringtable_insert(struct data *d, const char *str) @@ -157003,17 +157003,17 @@ index bd99fa2..2385137 100644 } diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h -index 5b8c7d5..2595dfd 100644 +index 5b8c7d53d608bdbb60776c97732e44cb310cc4c1..2595dfda020fd9e03f0beff5006f229d5e393151 100644 --- a/scripts/dtc/version_gen.h +++ b/scripts/dtc/version_gen.h @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +#define DTC_VERSION "DTC 1.4.1-g25efc119" -From 04317cda235aa8627422fd132fe4bbb19036f4a5 Mon Sep 17 00:00:00 2001 +From 6fd1390b344a222b8aa165cb48a37aa419fe5735 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 22 Oct 2015 23:30:04 +0300 -Subject: [PATCH 173/251] configfs: implement binary attributes +Subject: [PATCH 173/398] configfs: implement binary attributes ConfigFS lacked binary attributes up until now. This patch introduces support for binary attributes in a somewhat similar @@ -157045,7 +157045,7 @@ Signed-off-by: Christoph Hellwig 6 files changed, 374 insertions(+), 22 deletions(-) diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt -index af68efd..e5fe521 100644 +index af68efdbbfaddb0827b29f1fc4fb4b0eacc43b3a..e5fe521eea1d3b568404831efbbfc15bb935430c 100644 --- a/Documentation/filesystems/configfs/configfs.txt +++ b/Documentation/filesystems/configfs/configfs.txt @@ -51,15 +51,27 @@ configfs tree is always there, whether mounted on /config or not. @@ -157127,7 +157127,7 @@ index af68efd..e5fe521 100644 A config_item cannot live in a vacuum. The only way one can be created diff --git a/fs/configfs/configfs_internal.h b/fs/configfs/configfs_internal.h -index b65d1ef..ccc31fa 100644 +index b65d1ef532d52d692cc7ebbdc3c7350d1dd9d735..ccc31fa6f1a7e13cbcb6f9b0af501fbe52bd971f 100644 --- a/fs/configfs/configfs_internal.h +++ b/fs/configfs/configfs_internal.h @@ -53,13 +53,14 @@ struct configfs_dirent { @@ -157179,7 +157179,7 @@ index b65d1ef..ccc31fa 100644 { struct config_item * item = NULL; diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c -index a7a1b21..7ae97e8 100644 +index a7a1b218f308af56ac3094fa5f2ddb6b2749dd4a..7ae97e83f12154a52b90642d2a7b557e956c86e1 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -255,6 +255,12 @@ static void configfs_init_file(struct inode * inode) @@ -157229,7 +157229,7 @@ index a7a1b21..7ae97e8 100644 if (error) detach_attrs(item); diff --git a/fs/configfs/file.c b/fs/configfs/file.c -index d39099e..3687187 100644 +index d39099ea7df76d723e4501c316eb43352b11e69c..3687187c8ea59e8a6a2795c8e36fa95e897955a7 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -28,6 +28,7 @@ @@ -157574,7 +157574,7 @@ index d39099e..3687187 100644 + return error; +} diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c -index eae8757..0cc810e 100644 +index eae87575e681bbbed9db2ca48eb91cffa7ed8e88..0cc810e9dccc15fb764d53a4cb26604b3d16672f 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -218,7 +218,7 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd) @@ -157587,7 +157587,7 @@ index eae8757..0cc810e 100644 return attr->ca_name; } diff --git a/include/linux/configfs.h b/include/linux/configfs.h -index 758a029..f7300d0 100644 +index 758a029011b11a3d1d2c1acfe9fa171e82a55343..f7300d023dbee10be54beed582718066a162c368 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h @@ -51,6 +51,7 @@ struct module; @@ -157662,10 +157662,10 @@ index 758a029..f7300d0 100644 * If allow_link() exists, the item can symlink(2) out to other * items. If the item is a group, it may support mkdir(2). -From 15c5929aef0ebd49a3afc31a307b0fa3e24a2923 Mon Sep 17 00:00:00 2001 +From b8269e48edf57070ab03a1549b6d460bd660e9dd Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 174/251] OF: DT-Overlay configfs interface +Subject: [PATCH 174/398] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -157699,7 +157699,7 @@ Signed-off-by: Phil Elwell diff --git a/Documentation/devicetree/configfs-overlays.txt b/Documentation/devicetree/configfs-overlays.txt new file mode 100644 -index 0000000..5fa43e0 +index 0000000000000000000000000000000000000000..5fa43e0643072c7963daddc18cec7772910378ad --- /dev/null +++ b/Documentation/devicetree/configfs-overlays.txt @@ -0,0 +1,31 @@ @@ -157735,7 +157735,7 @@ index 0000000..5fa43e0 +intended to be used by hardware managers in the kernel, while the copy interface +make sense for developers (since it avoids problems with namespaces). diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig -index e2a4841..7e5e6c4 100644 +index e2a48415d9691059f1beb2afee7f134019d65ecf..7e5e6c4e77e070692cab0ed2e4b827c08c0a1c29 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -112,4 +112,11 @@ config OF_OVERLAY @@ -157751,7 +157751,7 @@ index e2a4841..7e5e6c4 100644 + endif # OF diff --git a/drivers/of/Makefile b/drivers/of/Makefile -index 156c072..46c8f57 100644 +index 156c072b31177eab081de4e54ab28b7815e32c95..46c8f5754ed84410d7dea83bfedcbdebf3f85453 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -1,4 +1,5 @@ @@ -157762,7 +157762,7 @@ index 156c072..46c8f57 100644 obj-$(CONFIG_OF_EARLY_FLATTREE) += fdt_address.o diff --git a/drivers/of/configfs.c b/drivers/of/configfs.c new file mode 100644 -index 0000000..7b66deb +index 0000000000000000000000000000000000000000..7b66deb9b2c46d23063c4fe4aab534b6a8cdf932 --- /dev/null +++ b/drivers/of/configfs.c @@ -0,0 +1,314 @@ @@ -158081,10 +158081,10 @@ index 0000000..7b66deb +} +late_initcall(of_cfs_init); -From ee377daa5f1e9811fa04bbf254f4930ed5c7c9c5 Mon Sep 17 00:00:00 2001 +From 94677a94525dab68ac86c59c5badf18ba12b9796 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 175/251] Protect __release_resource against resources without +Subject: [PATCH 175/398] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -158095,7 +158095,7 @@ Signed-off-by: Phil Elwell 1 file changed, 6 insertions(+) diff --git a/kernel/resource.c b/kernel/resource.c -index 249b1eb..eb973a5 100644 +index 249b1eb1e6e1381c6963296db8c408f99a01b3b5..eb973a53d6f7bb9ad8293e1ca9aad950892cb4c1 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -237,6 +237,12 @@ static int __release_resource(struct resource *old) @@ -158112,10 +158112,10 @@ index 249b1eb..eb973a5 100644 for (;;) { tmp = *p; -From fa4cb194572f56c3ab11913af77d31084b8f40e5 Mon Sep 17 00:00:00 2001 +From 9090e667162645c5f19a1cc641bff0456480962d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 20:00:21 +0000 -Subject: [PATCH 176/251] BCM270X_DT: Add a .dtbo target, use for overlays +Subject: [PATCH 176/398] BCM270X_DT: Add a .dtbo target, use for overlays Change the filenames and extensions to keep the pre-DDT style of overlay (-overlay.dtb) distinct from new ones that use a @@ -158133,7 +158133,7 @@ Signed-off-by: Phil Elwell 3 files changed, 76 insertions(+), 71 deletions(-) diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore -index 3c79f85..eaaeb17 100644 +index 3c79f85975aaa26c7c2e353fefc54d71d89bc5bf..eaaeb17e5986e5f7178b2851169444ac7e45be8d 100644 --- a/arch/arm/boot/.gitignore +++ b/arch/arm/boot/.gitignore @@ -3,4 +3,4 @@ zImage @@ -158143,7 +158143,7 @@ index 3c79f85..eaaeb17 100644 -*.dtb +*.dtb* diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 687cc7c..d81fa09 100644 +index 687cc7c0d4f1506ee1be8a67df76c9eef080a65b..d81fa0910f0efe00692d2db5bd7e8940dce904ec 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -12,78 +12,73 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) @@ -158291,7 +158291,7 @@ index 687cc7c..d81fa09 100644 +always := $(dtbo-y) +clean-files := *.dtbo diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib -index 79e8661..7209d62 100644 +index 79e86613712f22308b8ad4c3442403e09770f2ed..7209d622eb16b113511bb7d8bd7a1b01e088f113 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -292,6 +292,16 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ @@ -158312,10 +158312,10 @@ index 79e8661..7209d62 100644 # Bzip2 -From 3c760a6a8f336bfb891214091b71bc3408c93b6f Mon Sep 17 00:00:00 2001 +From 1fa9dc8766b0b3d3899dc1577e9c8a08800214de Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 May 2015 11:18:58 +0100 -Subject: [PATCH 177/251] scripts/knlinfo: Decode DDTK atom +Subject: [PATCH 177/398] scripts/knlinfo: Decode DDTK atom Show the DDTK atom as being a boolean. @@ -158325,7 +158325,7 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/knlinfo b/scripts/knlinfo -index b9ef124..263ec93 100755 +index b9ef124fa033fddc8847cf1586a6108f4e5eda04..263ec937eaa70b4fd00bff18599db7f22671753c 100755 --- a/scripts/knlinfo +++ b/scripts/knlinfo @@ -16,6 +16,7 @@ my $trailer_magic = 'RPTL'; @@ -158346,10 +158346,10 @@ index b9ef124..263ec93 100755 sub format_int -From 2db1009fef8b23bac3b3ae61dd1382bffb0827b1 Mon Sep 17 00:00:00 2001 +From da3cb41f068a1de1f23bc3281d7a26dc08c61b2a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 May 2015 11:48:59 +0100 -Subject: [PATCH 178/251] Enable Dynamic Device Tree for bcmrpi_defconfig and +Subject: [PATCH 178/398] Enable Dynamic Device Tree for bcmrpi_defconfig and bcm2709_defconfig Signed-off-by: Phil Elwell @@ -158359,7 +158359,7 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 7793baf..0fff5a3 100644 +index 7793bafc6b9ffd96f9676f8bd9e44e4c96e8cbfc..0fff5a3f29e3127e8f1edc3477722af2bd05eac4 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -403,6 +403,7 @@ CONFIG_MTD=m @@ -158379,7 +158379,7 @@ index 7793baf..0fff5a3 100644 CONFIG_HFS_FS=m CONFIG_HFSPLUS_FS=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index f09be87..2db41e6 100644 +index f09be8737e6cf697ebf3dd3ee171993ee0127033..2db41e640c52078765504505d01fc1ccd7fce692 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -396,6 +396,7 @@ CONFIG_MTD=m @@ -158391,10 +158391,10 @@ index f09be87..2db41e6 100644 CONFIG_ZRAM_LZ4_COMPRESS=y CONFIG_BLK_DEV_LOOP=y -From efe315038fd3581998bf6c93f432ac6cf85bb53f Mon Sep 17 00:00:00 2001 +From 1dfd87bedaf339cfba5f5d284de974f8e606df5c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 13 Mar 2016 16:14:44 +0000 -Subject: [PATCH 179/251] SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig +Subject: [PATCH 179/398] SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig Signed-off-by: Phil Elwell --- @@ -158402,7 +158402,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 2db41e6..74149cf 100644 +index 2db41e640c52078765504505d01fc1ccd7fce692..74149cfc43e32b6f7b8cbbeae726347469b5fb12 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -396,7 +396,7 @@ CONFIG_MTD=m @@ -158423,10 +158423,10 @@ index 2db41e6..74149cf 100644 CONFIG_HFS_FS=m CONFIG_HFSPLUS_FS=m -From 558d3a84b6363b021f77f138615cbf7b72c6f38c Mon Sep 17 00:00:00 2001 +From 1aaf6e52bf05c33bcf7e01a2c964854c3107128f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 14 Mar 2016 16:56:54 +0000 -Subject: [PATCH 180/251] dts, kbuild: dtbs_install installs .dtbo files too +Subject: [PATCH 180/398] dts, kbuild: dtbs_install installs .dtbo files too Signed-off-by: Phil Elwell --- @@ -158434,7 +158434,7 @@ Signed-off-by: Phil Elwell 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst -index 1c15717..43647b3 100644 +index 1c15717e0d5686972c1130fb718d0bc445c08dad..43647b3edd713cf1612c8f1ba56e4874ed033ceb 100644 --- a/scripts/Makefile.dtbinst +++ b/scripts/Makefile.dtbinst @@ -29,6 +29,7 @@ ifeq ("$(dtbinst-root)", "$(obj)") @@ -158468,10 +158468,10 @@ index 1c15717..43647b3 100644 .PHONY: $(PHONY) -From 3df4e691dcda317e661b026201c28db902be6830 Mon Sep 17 00:00:00 2001 +From ea2af8d393ceba096b8023ca8a06fc0a8218d35d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 14:10:29 +0000 -Subject: [PATCH 181/251] bcm2835-sdhost: Workaround for "slow" sectors +Subject: [PATCH 181/398] bcm2835-sdhost: Workaround for "slow" sectors Some cards have been seen to cause timeouts after certain sectors are read. This workaround enforces a minimum delay between the stop after @@ -158486,7 +158486,7 @@ Signed-off-by: Phil Elwell 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 4cc4272..f43aae0 100644 +index 4cc4272c869d85305233ce5399367ab5ac8acfd0..f43aae07bb9260a94542a9653a95afacb38cc263 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -202,9 +202,12 @@ struct bcm2835_host { @@ -158589,10 +158589,10 @@ index 4cc4272..f43aae0 100644 } } else { -From 16f0b8c220be3459c873578037994693c7e025d1 Mon Sep 17 00:00:00 2001 +From 75c3733ef2587cba36f4e3b08c3070b2e70a8907 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 15:49:16 +0000 -Subject: [PATCH 182/251] BCM270X_DT: Add labels to spidev nodes +Subject: [PATCH 182/398] BCM270X_DT: Add labels to spidev nodes Signed-off-by: Phil Elwell --- @@ -158604,7 +158604,7 @@ Signed-off-by: Phil Elwell 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -index d2d6fa0..00ea1b2 100644 +index d2d6fa0fa6b384a4cbc296ad37813f36f744b69c..00ea1b2edc600101f7257f537bb869f5476a14bd 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -59,7 +59,7 @@ @@ -158626,7 +158626,7 @@ index d2d6fa0..00ea1b2 100644 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts -index d033ee4..2f8a718 100644 +index d033ee4cab87c1cbdeb9a4c136c7233eff68f3c7..2f8a718c940fc43036e06620a95470b6f3b0aadf 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -59,7 +59,7 @@ @@ -158648,7 +158648,7 @@ index d033ee4..2f8a718 100644 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 8bcafb4..954896e 100755 +index 8bcafb41c39595a47b7d932871cb6463f137241d..954896e9b8f4df45c66ffdc3d1b601647cf5afca 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -42,7 +42,7 @@ @@ -158670,7 +158670,7 @@ index 8bcafb4..954896e 100755 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index aca253f..66523d6 100644 +index aca253ff9b7b21f628e4294fd3e7d8de061e26fb..66523d6f48ed1247219883f0096b1d5c19bd5023 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -59,7 +59,7 @@ @@ -158692,7 +158692,7 @@ index aca253f..66523d6 100644 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 2cb7d43..1ce4ea2 100644 +index 2cb7d43110230cf119105f749d811463a2cc4041..1ce4ea2a0871842bc8f83f0be9077761b127fe55 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -110,7 +110,7 @@ @@ -158714,10 +158714,10 @@ index 2cb7d43..1ce4ea2 100644 reg = <1>; /* CE1 */ #address-cells = <1>; -From 320ed2194edfdcd5fcc93772a353b7480fd4aa5a Mon Sep 17 00:00:00 2001 +From 5dd6507c86d9190d04f7ab794debbf3351c25fb2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 16:27:26 +0000 -Subject: [PATCH 183/251] BCM270X_DT: Use spidev labels in overlays +Subject: [PATCH 183/398] BCM270X_DT: Use spidev labels in overlays --- arch/arm/boot/dts/overlays/ads7846-overlay.dts | 22 ++++++++++------- @@ -158737,7 +158737,7 @@ Subject: [PATCH 183/251] BCM270X_DT: Use spidev labels in overlays 14 files changed, 174 insertions(+), 103 deletions(-) diff --git a/arch/arm/boot/dts/overlays/ads7846-overlay.dts b/arch/arm/boot/dts/overlays/ads7846-overlay.dts -index 6a92cd1..edf2dc9 100644 +index 6a92cd1a9ffc370f386612843fc9a0236ddb48ee..edf2dc9d5d5f6830508edabf2d04c42d27ba9b41 100644 --- a/arch/arm/boot/dts/overlays/ads7846-overlay.dts +++ b/arch/arm/boot/dts/overlays/ads7846-overlay.dts @@ -13,18 +13,24 @@ @@ -158782,7 +158782,7 @@ index 6a92cd1..edf2dc9 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts -index eab4052..880c753 100644 +index eab40523b78f20676f267bf5e81bff69b07becb3..880c7539d496fb10672ee573f7c51b8a213cecf7 100644 --- a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts +++ b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts @@ -14,10 +14,6 @@ @@ -158811,7 +158811,7 @@ index eab4052..880c753 100644 __overlay__ { lowpan0_pins: lowpan0_pins { diff --git a/arch/arm/boot/dts/overlays/enc28j60-overlay.dts b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts -index 8fae869..db8a8fe 100644 +index 8fae869511ca53a533c7bffa9a59a4437e6501e3..db8a8feed94c010e368065fdd88b028622303b6f 100644 --- a/arch/arm/boot/dts/overlays/enc28j60-overlay.dts +++ b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts @@ -14,10 +14,6 @@ @@ -158840,7 +158840,7 @@ index 8fae869..db8a8fe 100644 __overlay__ { eth1_pins: eth1_pins { diff --git a/arch/arm/boot/dts/overlays/hy28a-overlay.dts b/arch/arm/boot/dts/overlays/hy28a-overlay.dts -index 3cd3083..ac0f3c2 100644 +index 3cd3083f178b4a39dfb7c2742d15da7822701e1f..ac0f3c28ea855a620dc6a3385d9d15009f26358d 100644 --- a/arch/arm/boot/dts/overlays/hy28a-overlay.dts +++ b/arch/arm/boot/dts/overlays/hy28a-overlay.dts @@ -13,18 +13,24 @@ @@ -158885,7 +158885,7 @@ index 3cd3083..ac0f3c2 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/hy28b-overlay.dts b/arch/arm/boot/dts/overlays/hy28b-overlay.dts -index f774c4a..8018aeb 100644 +index f774c4ab1770529cac96b5e85a183ebe04359fbd..8018aebde8e557f45ffd63eb86f6c7a1048fe3cb 100644 --- a/arch/arm/boot/dts/overlays/hy28b-overlay.dts +++ b/arch/arm/boot/dts/overlays/hy28b-overlay.dts @@ -13,18 +13,24 @@ @@ -158930,7 +158930,7 @@ index f774c4a..8018aeb 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts -index 398d59c..c96cdae 100755 +index 398d59cf1184aaf735d01c2f74cecdeee5fa58c9..c96cdae27fb15055c4a6ec55d1ee45644768c392 100755 --- a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts +++ b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts @@ -12,14 +12,18 @@ @@ -158975,7 +158975,7 @@ index 398d59c..c96cdae 100755 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts -index 6bef9ae..67bd0d9 100644 +index 6bef9ae5c52c76c1daede15f67404cb66c7fd6da..67bd0d9bdaa2ff767d284010a69ecfe3f2aa1fd1 100644 --- a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts +++ b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts @@ -12,14 +12,18 @@ @@ -159020,7 +159020,7 @@ index 6bef9ae..67bd0d9 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/mz61581-overlay.dts b/arch/arm/boot/dts/overlays/mz61581-overlay.dts -index 9242a6e..2c29aae 100644 +index 9242a6e9a48c4f95dccc60c3d39550cae1363459..2c29aaed44c5959d7f0df2a3baf2af052b24b6b4 100644 --- a/arch/arm/boot/dts/overlays/mz61581-overlay.dts +++ b/arch/arm/boot/dts/overlays/mz61581-overlay.dts @@ -13,18 +13,24 @@ @@ -159065,7 +159065,7 @@ index 9242a6e..2c29aae 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/piscreen-overlay.dts b/arch/arm/boot/dts/overlays/piscreen-overlay.dts -index ba4ad33..40a1f29 100644 +index ba4ad33fe00163e5515d23afa3dd77ff448e3c8e..40a1f295346e39130a9d5a97844163c434b19e82 100644 --- a/arch/arm/boot/dts/overlays/piscreen-overlay.dts +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts @@ -13,18 +13,24 @@ @@ -159110,7 +159110,7 @@ index ba4ad33..40a1f29 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts -index 7c018e0..9c0bed8 100644 +index 7c018e081acbb2a7c157e3305a955be165ff6105..9c0bed893057b9129c8f16b0b695b85b1f634597 100644 --- a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts +++ b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts @@ -13,18 +13,24 @@ @@ -159155,7 +159155,7 @@ index 7c018e0..9c0bed8 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts -index 48920e9..5c07526 100644 +index 48920e92365661cbb956911b8af1d6992ea801db..5c0752655c70692e1c63f2f662e5b541c4be3617 100644 --- a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts +++ b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts @@ -13,14 +13,17 @@ @@ -159200,7 +159200,7 @@ index 48920e9..5c07526 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts -index d506eae..ed2afc2 100644 +index d506eae7d141410f74a6c1339d811493b73d64ed..ed2afc2f7fd6528f4e6d75bb2d534307ed020720 100644 --- a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts +++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts @@ -13,18 +13,24 @@ @@ -159254,7 +159254,7 @@ index d506eae..ed2afc2 100644 __overlay__ { backlight { diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts -index ccb296e..d7e72ee 100644 +index ccb296e023fa7f7c87660ffc1b460acf55f8adff..d7e72eef594e08b309ffbaa04f43c68909c08f36 100644 --- a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts @@ -13,18 +13,24 @@ @@ -159299,7 +159299,7 @@ index ccb296e..d7e72ee 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts -index f7102c8..33c0651 100644 +index f7102c878b13340a1b142f563462fb7027922159..33c0651eac9b8b664a3001cb3ffff1acd184c96d 100644 --- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts @@ -30,18 +30,24 @@ @@ -159371,10 +159371,10 @@ index f7102c8..33c0651 100644 __overlay__ { keypad: keypad { -From 19da6ff34954c7a0c2aecef0451463522ea24ca1 Mon Sep 17 00:00:00 2001 +From b020007c02f0ea368524920b018d49f96b92da69 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 16:41:37 +0000 -Subject: [PATCH 184/251] BCM270X_DT: Build and document the wittypi overlay +Subject: [PATCH 184/398] BCM270X_DT: Build and document the wittypi overlay Signed-off-by: Phil Elwell --- @@ -159384,7 +159384,7 @@ Signed-off-by: Phil Elwell 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index d81fa09..4f3ca9c 100644 +index d81fa0910f0efe00692d2db5bd7e8940dce904ec..4f3ca9c6419983553d613c90c98425788eecb4b5 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -74,6 +74,7 @@ dtbo-$(RPI_DT_OVERLAYS) += vc4-kms-v3d.dtbo @@ -159396,7 +159396,7 @@ index d81fa09..4f3ca9c 100644 targets += dtbs dtbs_install targets += $(dtbo-y) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 6fa5b80..d939739 100644 +index 6fa5b80419a16da426ade774fab812ad9ab4a158..d9397391a7e14432bc37c26b13daa86d5c7436b5 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -920,6 +920,14 @@ Params: gpiopin GPIO for I/O (default "4") @@ -159415,7 +159415,7 @@ index 6fa5b80..d939739 100644 =============== diff --git a/arch/arm/boot/dts/overlays/wittypi-overlay.dts b/arch/arm/boot/dts/overlays/wittypi-overlay.dts -index be5987d..8498134 100644 +index be5987db5d27560da9b5eadacd92457dada7092c..8498134fdbb3912e9ce18282b53084d871a82370 100644 --- a/arch/arm/boot/dts/overlays/wittypi-overlay.dts +++ b/arch/arm/boot/dts/overlays/wittypi-overlay.dts @@ -37,7 +37,7 @@ @@ -159428,10 +159428,10 @@ index be5987d..8498134 100644 }; -From e45f33c187edcda0e4affe6930068deadebf8b6c Mon Sep 17 00:00:00 2001 +From a33647c8ed2e36a80a9811a7f670a808bfbce01e Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 15 Mar 2016 21:13:39 +0100 -Subject: [PATCH 185/251] scripts/dtc: Fix UMR causing corrupt dtbo overlay +Subject: [PATCH 185/398] scripts/dtc: Fix UMR causing corrupt dtbo overlay files struct fixup_entry is allocated from the heap but it's member @@ -159446,7 +159446,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 1 insertion(+) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index 540a3ea..2b3b3a7 100644 +index 540a3ea1f073d385c629b25dfcbe5f7e67c3d8a5..2b3b3a7aa70261a8206ba102bccea20d96c7fbfb 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -523,6 +523,7 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -159458,10 +159458,10 @@ index 540a3ea..2b3b3a7 100644 /* append it to the local fixups */ fep = &dt->local_fixups; -From e45af7e57db63c4bd5d0ad7fe400cfdd36df42d4 Mon Sep 17 00:00:00 2001 +From a5606457daa7f443db415d043cd03dba416cd49b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 16 Mar 2016 08:35:06 +0000 -Subject: [PATCH 186/251] BCM270X_DT: Add dtparam for uart1 +Subject: [PATCH 186/398] BCM270X_DT: Add dtparam for uart1 Signed-off-by: Phil Elwell --- @@ -159474,7 +159474,7 @@ Signed-off-by: Phil Elwell 6 files changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -index 00ea1b2..0e9a22d 100644 +index 00ea1b2edc600101f7257f537bb869f5476a14bd..0e9a22d147dd1ace4a7075c431ca13812716a00a 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -120,6 +120,7 @@ @@ -159486,7 +159486,7 @@ index 00ea1b2..0e9a22d 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts -index 2f8a718..a60342c 100644 +index 2f8a718c940fc43036e06620a95470b6f3b0aadf..a60342c3127cda9b426ec70e08007954af7d05d5 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -114,6 +114,7 @@ @@ -159498,7 +159498,7 @@ index 2f8a718..a60342c 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 954896e..cd0e1ac 100755 +index 954896e9b8f4df45c66ffdc3d1b601647cf5afca..cd0e1acc22f8ded801f29d331570828e5582247b 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -89,6 +89,7 @@ @@ -159510,7 +159510,7 @@ index 954896e..cd0e1ac 100755 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 66523d6..9176d57 100644 +index 66523d6f48ed1247219883f0096b1d5c19bd5023..9176d57fe40eaac7b123e8d0249fe93e5b73f755 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -120,6 +120,7 @@ @@ -159522,7 +159522,7 @@ index 66523d6..9176d57 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 1ce4ea2..d2d39c6 100644 +index 1ce4ea2a0871842bc8f83f0be9077761b127fe55..d2d39c68bd5ddadf8077670e84868abd4a3d82f8 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -171,6 +171,7 @@ @@ -159534,7 +159534,7 @@ index 1ce4ea2..d2d39c6 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d939739..4ce7921 100644 +index d9397391a7e14432bc37c26b13daa86d5c7436b5..4ce792171a3154f48f599621bcb0a154a95d5787 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -124,6 +124,9 @@ Params: @@ -159548,17 +159548,17 @@ index d939739..4ce7921 100644 (default "off") -From 3f7271f5e6747663f2db11f01721ee60961e0178 Mon Sep 17 00:00:00 2001 +From bbd0852e62c0f7173e9e5f159167b8ffa8730597 Mon Sep 17 00:00:00 2001 From: Przemek Rudy Date: Fri, 11 Mar 2016 22:41:26 +0100 -Subject: [PATCH 187/251] dwc-overlay: Use label so overrides can apply. +Subject: [PATCH 187/398] dwc-overlay: Use label so overrides can apply. --- arch/arm/boot/dts/overlays/dwc2-overlay.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/overlays/dwc2-overlay.dts b/arch/arm/boot/dts/overlays/dwc2-overlay.dts -index 90c9811..527abc9 100644 +index 90c981143fc7a55ae1cc6462c959e21d8cb7365e..527abc9f0ddf71f4dc7d58336d87684c931cc2f3 100644 --- a/arch/arm/boot/dts/overlays/dwc2-overlay.dts +++ b/arch/arm/boot/dts/overlays/dwc2-overlay.dts @@ -8,7 +8,7 @@ @@ -159585,10 +159585,10 @@ index 90c9811..527abc9 100644 }; }; -From 5b7b03b9220d45e9fa99c2f9c73a08792cc4684b Mon Sep 17 00:00:00 2001 +From 9eeb0ac836f72258cd23796591d4b2294f772a5e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 22 Jan 2016 13:06:39 -0800 -Subject: [PATCH 188/251] drm/vc4: Add a debugfs node for tracking execution +Subject: [PATCH 188/398] drm/vc4: Add a debugfs node for tracking execution state. Signed-off-by: Eric Anholt @@ -159599,7 +159599,7 @@ Signed-off-by: Eric Anholt 3 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c -index d76ad10..a99aa86 100644 +index d76ad10b07fda3bb674f45c2151e621c60633364..a99aa8676af774977778edfa2604b6b9df31a4dc 100644 --- a/drivers/gpu/drm/vc4/vc4_debugfs.c +++ b/drivers/gpu/drm/vc4/vc4_debugfs.c @@ -17,6 +17,7 @@ @@ -159611,7 +159611,7 @@ index d76ad10..a99aa86 100644 {"hvs_regs", vc4_hvs_debugfs_regs, 0}, {"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0}, diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index ed93fa7..aa0d00e 100644 +index ed93fa78a32df3c1c98b5c48fa193934de77dda5..aa0d00e6f6c8147eabbe165f0dbdd5e854086bd4 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -403,6 +403,7 @@ void vc4_job_handle_completed(struct vc4_dev *vc4); @@ -159623,7 +159623,7 @@ index ed93fa7..aa0d00e 100644 /* vc4_hdmi.c */ extern struct platform_driver vc4_hdmi_driver; diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 39f29e7..1243f4e 100644 +index 39f29e7593342d9555dd51cbc2790a56abe06179..1243f4ecee6ea5e13b23b969655f8dcd68fa54c1 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -31,6 +31,20 @@ @@ -159648,10 +159648,10 @@ index 39f29e7..1243f4e 100644 vc4_queue_hangcheck(struct drm_device *dev) { -From 04fb589070fd36693251a40ceb61743bb3a0c2c6 Mon Sep 17 00:00:00 2001 +From 0c1d2c74514556abb88e3a9b1c746f9857a78b0f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:03:33 -0800 -Subject: [PATCH 189/251] drm/vc4: Include vc4_drm.h in uapi in downstream +Subject: [PATCH 189/398] drm/vc4: Include vc4_drm.h in uapi in downstream build. Signed-off-by: Eric Anholt @@ -159660,7 +159660,7 @@ Signed-off-by: Eric Anholt 1 file changed, 1 insertion(+) diff --git a/include/uapi/drm/Kbuild b/include/uapi/drm/Kbuild -index 38d4370..23381b5 100644 +index 38d437096c358c884a403e4f3f5be5fb86f21d3b..23381b5f571cf34fd2485f0bea87549cd7a90233 100644 --- a/include/uapi/drm/Kbuild +++ b/include/uapi/drm/Kbuild @@ -14,6 +14,7 @@ header-y += radeon_drm.h @@ -159672,10 +159672,10 @@ index 38d4370..23381b5 100644 header-y += vmwgfx_drm.h header-y += msm_drm.h -From 3472309b991f5f8c75a655d2f077a1eb632af3cf Mon Sep 17 00:00:00 2001 +From 5123e18dca1985a89ee52b87c6df822f8d326494 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:05:00 -0800 -Subject: [PATCH 190/251] drm/vc4: Validate that WAIT_BO padding is cleared. +Subject: [PATCH 190/398] drm/vc4: Validate that WAIT_BO padding is cleared. This is ABI future-proofing if we ever want to extend the pad to mean something. @@ -159686,7 +159686,7 @@ Signed-off-by: Eric Anholt 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 1243f4e..849d374 100644 +index 1243f4ecee6ea5e13b23b969655f8dcd68fa54c1..849d3749268767942c0e7ad69d00cd7a6a307ad6 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -761,6 +761,9 @@ vc4_wait_bo_ioctl(struct drm_device *dev, void *data, @@ -159700,10 +159700,10 @@ index 1243f4e..849d374 100644 if (!gem_obj) { DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); -From fc63883845d0d69d746b00a54d8cf2aaf2db30a5 Mon Sep 17 00:00:00 2001 +From c7bf07a6bcf451b2924c3f549675aa78d94f888a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:52:41 -0800 -Subject: [PATCH 191/251] drm/vc4: Fix the clear color for the first tile +Subject: [PATCH 191/398] drm/vc4: Fix the clear color for the first tile rendered. Apparently in hardware (as opposed to simulation), the clear colors @@ -159716,7 +159716,7 @@ Signed-off-by: Eric Anholt 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 8a2a312..dea97f4 100644 +index 8a2a312e2c1bb618ea414ed3f0dd87e82ed7e09a..dea97f45e5aff4fa3a06f41980b169953f75f4f6 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -321,15 +321,6 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec, @@ -159752,10 +159752,10 @@ index 8a2a312..dea97f4 100644 for (x = min_x_tile; x <= max_x_tile; x++) { bool first = (x == min_x_tile && y == min_y_tile); -From 6128659e9deeb8f7b15a0e8bb9e4e974afe39064 Mon Sep 17 00:00:00 2001 +From b0cc8c2da19226a31dad9028cd00ee86ca5a50b4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 14:13:12 -0800 -Subject: [PATCH 192/251] drm/vc4: Return an ERR_PTR from BO creation instead +Subject: [PATCH 192/398] drm/vc4: Return an ERR_PTR from BO creation instead of NULL. Fixes igt vc4_create_bo/create-bo-0 by returning -EINVAL from the @@ -159771,7 +159771,7 @@ Signed-off-by: Eric Anholt 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index 6247ff8..8477579 100644 +index 6247ff88e6156fc98fb97b8bbcc9ac377a1f8707..847757914c4eb792512e8019222b04d83876600d 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -213,10 +213,10 @@ struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size, @@ -159841,7 +159841,7 @@ index 6247ff8..8477579 100644 ret = copy_from_user(bo->base.vaddr, (void __user *)(uintptr_t)args->data, diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 849d374..f8c003a 100644 +index 849d3749268767942c0e7ad69d00cd7a6a307ad6..f8c003aee6e8ba379e0696f9cba80cdfa7357294 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -593,9 +593,9 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) @@ -159857,7 +159857,7 @@ index 849d374..f8c003a 100644 } exec->exec_bo = &bo->base; diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c -index b68060e..78a2135 100644 +index b68060e758dbd26e1dccd17beeba4c09bbb1441e..78a21357fb2de9fe88d50a26f20f0634d97dbd88 100644 --- a/drivers/gpu/drm/vc4/vc4_irq.c +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -57,7 +57,7 @@ vc4_overflow_mem_work(struct work_struct *work) @@ -159870,7 +159870,7 @@ index b68060e..78a2135 100644 return; } diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index dea97f4..0f12418 100644 +index dea97f45e5aff4fa3a06f41980b169953f75f4f6..0f12418725e552f7378dada1d5af1244f52599ad 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -316,8 +316,8 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec, @@ -159885,7 +159885,7 @@ index dea97f4..0f12418 100644 &exec->unref_list); diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index 0fb5b99..8396960 100644 +index 0fb5b994b9ddb1e6fde3d8e99d727d3e7afc4d22..839696007e97528070a8c2c3676d4f30f3dd6d80 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -401,8 +401,8 @@ validate_tile_binning_config(VALIDATE_ARGS) @@ -159900,10 +159900,10 @@ index 0fb5b99..8396960 100644 /* tile alloc address. */ -From e62f39b87fb3577d0c154ee50459a8d0b83865ca Mon Sep 17 00:00:00 2001 +From f903d674e01e462876bb1fa12d6554e4103cabdf Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 14:32:41 -0800 -Subject: [PATCH 193/251] drm/vc4: Fix -ERESTARTSYS error return from BO waits. +Subject: [PATCH 193/398] drm/vc4: Fix -ERESTARTSYS error return from BO waits. This caused the wait ioctls to claim that waiting had completed when we actually got interrupted by a signal before it was done. Fixes @@ -159916,7 +159916,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index f8c003a..dc3044d 100644 +index f8c003aee6e8ba379e0696f9cba80cdfa7357294..dc3044d8d71f7e5be2243ffdcf5d32740dbd1111 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -352,12 +352,10 @@ vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, uint64_t timeout_ns, @@ -159935,10 +159935,10 @@ index f8c003a..dc3044d 100644 static void -From 7942d03413ee330d2fb041dc62dabc8ce738cc0c Mon Sep 17 00:00:00 2001 +From 2d635ab8e6b5bcd93c79ce7d2c33773516af334b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 14:33:50 -0800 -Subject: [PATCH 194/251] drm/vc4: Drop error message on seqno wait timeouts. +Subject: [PATCH 194/398] drm/vc4: Drop error message on seqno wait timeouts. These ioctls end up getting exposed to userspace, and having normal user requests print DRM errors is obviously wrong. The message was @@ -159951,7 +159951,7 @@ Signed-off-by: Eric Anholt 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index dc3044d..a6fa63f 100644 +index dc3044d8d71f7e5be2243ffdcf5d32740dbd1111..a6fa63f0e8a1825de063960fad40af230e77afaa 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -352,9 +352,6 @@ vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, uint64_t timeout_ns, @@ -159965,10 +159965,10 @@ index dc3044d..a6fa63f 100644 } -From 9ceac017a764704d9919a494590e8fea0e458adc Mon Sep 17 00:00:00 2001 +From a8ad198cac25a5790dd2a0447938134fbaf6d7e0 Mon Sep 17 00:00:00 2001 From: campag Date: Wed, 24 Feb 2016 16:45:42 +0000 -Subject: [PATCH 195/251] BCM270X_DT: Add 1-bit SDIO using minimal pins... +Subject: [PATCH 195/398] BCM270X_DT: Add 1-bit SDIO using minimal pins... ... for that mode: GPIOs 22-25. --- @@ -159978,7 +159978,7 @@ Subject: [PATCH 195/251] BCM270X_DT: Add 1-bit SDIO using minimal pins... create mode 100644 arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4ce7921..7118510 100644 +index 4ce792171a3154f48f599621bcb0a154a95d5787..711851072615f7ba690e73d97c1f4ab6dcb304a8 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -709,6 +709,27 @@ Params: overclock_50 SD Clock (in MHz) to use when the MMC framework @@ -160011,7 +160011,7 @@ index 4ce7921..7118510 100644 Load: dtoverlay=sdtweak,= diff --git a/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts new file mode 100644 -index 0000000..46d4538 +index 0000000000000000000000000000000000000000..46d453859b31f5c700a8a2e39a2c209330bc108f --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts @@ -0,0 +1,36 @@ @@ -160052,10 +160052,10 @@ index 0000000..46d4538 + }; +}; -From 6dd9dc84456f9341739f6c6d2c7d5b1f08d5c8fe Mon Sep 17 00:00:00 2001 +From 11f11b3aa22fb9dc5811ef0c5aacc12168959b0b Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 196/251] brcm: adds support for BCM43341 wifi +Subject: [PATCH 196/398] brcm: adds support for BCM43341 wifi --- drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 5 +++++ @@ -160063,7 +160063,7 @@ Subject: [PATCH 196/251] brcm: adds support for BCM43341 wifi 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -index 7e74ac3..818f756 100644 +index 7e74ac3ad81519491ac01460cd3b578e6fb3cc80..818f7562f6b42d6eb7c1c454179a0722bc6ab5a0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c @@ -613,6 +613,8 @@ static const struct sdiod_drive_str sdiod_drvstr_tab2_3v3[] = { @@ -160093,7 +160093,7 @@ index 7e74ac3..818f756 100644 { BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, BRCMF_FIRMWARE_NVRAM(BCM43362) }, { BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4339) }, diff --git a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h -index aa06ea2..f3ae83d 100644 +index aa06ea231db32eadae6bbe7c89fcb2825fabb228..f3ae83d648c7d5682afa0487e2c33ff0ff23b11d 100644 --- a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h @@ -34,6 +34,7 @@ @@ -160105,10 +160105,10 @@ index aa06ea2..f3ae83d 100644 #define BRCM_CC_4335_CHIP_ID 0x4335 #define BRCM_CC_4339_CHIP_ID 0x4339 -From 0702cbfdf586a8c1b67d28cdfc84a0623c8b12f1 Mon Sep 17 00:00:00 2001 +From afec54ef1194ca1e54790330004c9748f9f52d1c Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Fri, 29 Jan 2016 12:00:37 +0100 -Subject: [PATCH 197/251] Add overlay and enable support for QCA7000 board +Subject: [PATCH 197/398] Add overlay and enable support for QCA7000 board This adds a device tree overlay for the QCA7000 which can be used when attaching an I2SE's PLC Stamp micro EVK to the Raspberry Pi. @@ -160131,7 +160131,7 @@ Signed-off-by: Michael Heimpold create mode 100644 arch/arm/boot/dts/overlays/qca7000-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 4f3ca9c..f4ae95a 100644 +index 4f3ca9c6419983553d613c90c98425788eecb4b5..f4ae95a171c259f8a8ee700f5524f20b766de70d 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -48,6 +48,7 @@ dtbo-$(RPI_DT_OVERLAYS) += pitft28-resistive.dtbo @@ -160143,7 +160143,7 @@ index 4f3ca9c..f4ae95a 100644 dtbo-$(RPI_DT_OVERLAYS) += rpi-backlight.dtbo dtbo-$(RPI_DT_OVERLAYS) += rpi-dac.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 7118510..2a354b3 100644 +index 711851072615f7ba690e73d97c1f4ab6dcb304a8..2a354b3713105963d5a00e1131a5bef8f3c85d69 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -625,6 +625,14 @@ Params: pin Output pin (default 18) - see table @@ -160163,7 +160163,7 @@ index 7118510..2a354b3 100644 Load: dtoverlay=raspidac3 diff --git a/arch/arm/boot/dts/overlays/qca7000-overlay.dts b/arch/arm/boot/dts/overlays/qca7000-overlay.dts new file mode 100644 -index 0000000..b4e6013 +index 0000000000000000000000000000000000000000..b4e601396c4955b9e5de3a639d9afd74d051e3fd --- /dev/null +++ b/arch/arm/boot/dts/overlays/qca7000-overlay.dts @@ -0,0 +1,52 @@ @@ -160220,7 +160220,7 @@ index 0000000..b4e6013 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 0fff5a3..b63632d 100644 +index 0fff5a3f29e3127e8f1edc3477722af2bd05eac4..b63632d685ddc790eab57b9e449806c3a8d64a9e 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -446,6 +446,7 @@ CONFIG_NETCONSOLE=m @@ -160232,7 +160232,7 @@ index 0fff5a3..b63632d 100644 CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 74149cf..e720c74 100644 +index 74149cfc43e32b6f7b8cbbeae726347469b5fb12..e720c74562ccabe41676b7ddd6aa8447c9505938 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -439,6 +439,7 @@ CONFIG_NETCONSOLE=m @@ -160244,10 +160244,10 @@ index 74149cf..e720c74 100644 CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m -From 5fbc1847fdefcf563be0c51ffc07de6666036ba6 Mon Sep 17 00:00:00 2001 +From 88eae7509291a65bc66c8e673d6c2ab5ea9ca742 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 13:28:24 +0000 -Subject: [PATCH 198/251] serial: Take care starting a hung-up tty's port +Subject: [PATCH 198/398] serial: Take care starting a hung-up tty's port tty_port_hangup sets a port's tty field to NULL (holding the port lock), but uart_tx_stopped, called from __uart_start (with the port lock), @@ -160262,7 +160262,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h -index 297d4fa..00ce6c6 100644 +index 297d4fa1cfe513d85340ae43c1217d47e9c7e881..00ce6c6970aa92e95507f0778ecbd602c13df88b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -397,7 +397,7 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port); @@ -160275,10 +160275,10 @@ index 297d4fa..00ce6c6 100644 return 0; } -From b8127d80609179210ae5ceea4929391991dbce9a Mon Sep 17 00:00:00 2001 +From c4bfac235fc44b4520449a0e980d454e66b8267e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Mar 2016 10:16:16 +0000 -Subject: [PATCH 199/251] pi3-miniuart-bt-overlay: Correct and clarify info +Subject: [PATCH 199/398] pi3-miniuart-bt-overlay: Correct and clarify info Signed-off-by: Phil Elwell --- @@ -160287,7 +160287,7 @@ Signed-off-by: Phil Elwell 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 2a354b3..b674394 100644 +index 2a354b3713105963d5a00e1131a5bef8f3c85d69..b6743947874849953a5c5877b1b4c7d60afbbd10 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -511,8 +511,10 @@ Name: pi3-miniuart-bt @@ -160304,7 +160304,7 @@ index 2a354b3..b674394 100644 Params: diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index f07afcb..38ed33b 100644 +index f07afcb225200a651a362653d0e0522392e6ab40..38ed33ba1f8dca4df27d5c74ffe7bd4d6b7a3982 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -5,8 +5,10 @@ @@ -160321,10 +160321,10 @@ index f07afcb..38ed33b 100644 If cmdline.txt uses the alias serial0 to refer to the user-accessable port then the firmware will replace with the appropriate port whether or not -From ee65eba2fa76dc0ca35f2c74ec655f89d9d33b13 Mon Sep 17 00:00:00 2001 +From 4fbdbd8620437e1f977ed227485bdf64694b343c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Mar 2016 10:41:56 +0000 -Subject: [PATCH 200/251] pwm overlays: Params must have in-overlay targets +Subject: [PATCH 200/398] pwm overlays: Params must have in-overlay targets --- arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts | 9 ++++++++- @@ -160332,7 +160332,7 @@ Subject: [PATCH 200/251] pwm overlays: Params must have in-overlay targets 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts -index 957e1a4..18e4e4f 100644 +index 957e1a4ec34724c7852086a5c44f493d9b75bfa6..18e4e4fa9465c87eb96c8d712a9967c4805c7176 100644 --- a/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts +++ b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts @@ -36,11 +36,18 @@ N.B.: @@ -160356,7 +160356,7 @@ index 957e1a4..18e4e4f 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/pwm-overlay.dts b/arch/arm/boot/dts/overlays/pwm-overlay.dts -index ddd67ff..bf030a6 100644 +index ddd67ffcd8bb34b05ec61481a162a37d64b30680..bf030a6d1545448faf5e7992a0dc5c505522433e 100644 --- a/arch/arm/boot/dts/overlays/pwm-overlay.dts +++ b/arch/arm/boot/dts/overlays/pwm-overlay.dts @@ -34,9 +34,16 @@ N.B.: @@ -160378,10 +160378,10 @@ index ddd67ff..bf030a6 100644 }; }; -From 62279457d4e5c3a132a0c8fe60c0d9c51c3edd9d Mon Sep 17 00:00:00 2001 +From 6aa1245fd75b702650e229995f900e4e4579cbf5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 18 Mar 2016 13:06:29 +0000 -Subject: [PATCH 201/251] BCM270X_DT: Switch Compute Module to MMC +Subject: [PATCH 201/398] BCM270X_DT: Switch Compute Module to MMC Signed-off-by: Phil Elwell --- @@ -160389,7 +160389,7 @@ Signed-off-by: Phil Elwell 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi -index e09e499..90e330d 100644 +index e09e4993e8f06df83b72b1342d2d21de7fbc542a..90e330d1978da8624c042d52a38aa5d6d95d2377 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi @@ -8,9 +8,9 @@ @@ -160434,10 +160434,10 @@ index e09e499..90e330d 100644 }; }; -From 82ecf79397939c59b5b50cd683b823e1233568f7 Mon Sep 17 00:00:00 2001 +From 04bcbabe7c66c5bd736b15770c15b2180a40597a Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 18 Mar 2016 17:38:37 +0000 -Subject: [PATCH 202/251] dwc_otg: Don't free qh align buffers in atomic +Subject: [PATCH 202/398] dwc_otg: Don't free qh align buffers in atomic context --- @@ -160445,7 +160445,7 @@ Subject: [PATCH 202/251] dwc_otg: Don't free qh align buffers in atomic 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index acd0dd7..3b2a607 100644 +index acd0dd7906cccd0658baacf4e2622c447a52a049..3b2a60763b92fb2e9261a8ade3d4b33e3896cd62 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -56,6 +56,9 @@ void dwc_otg_hcd_qh_free(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) @@ -160481,10 +160481,10 @@ index acd0dd7..3b2a607 100644 } -From 6e02745d8e2fc480d3442e6adaf4547e100611b5 Mon Sep 17 00:00:00 2001 +From fecfa94b98661c0404ab2670ac180a846740b034 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 21 Mar 2016 15:38:38 +0000 -Subject: [PATCH 203/251] dwc_otg: Enable the hack for Split Interrupt +Subject: [PATCH 203/398] dwc_otg: Enable the hack for Split Interrupt transactions by default dwc_otg.fiq_fsm_mask=0xF has long been a suggestion for users with audio stutters or other USB bandwidth issues. @@ -160499,7 +160499,7 @@ Signed-off-by: popcornmix 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index 95edadf..cb060a7 100644 +index 95edadf088cf2aa5826d411c04ea85f3651ebc48..cb060a7179a3eec791506ed2779b553cad9841b0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -247,7 +247,7 @@ bool fiq_fsm_enable = true; @@ -160512,10 +160512,10 @@ index 95edadf..cb060a7 100644 /** * This function shows the Driver Version. -From 6a2fc8f71762aab14aee7311f8b7cd94aa316773 Mon Sep 17 00:00:00 2001 +From fb7a514ccaf4b5a41483d70c81390958a8036bc3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 19 Mar 2016 16:51:37 +0000 -Subject: [PATCH 204/251] BCM270X_DT: Remove explicit claiming of UART pins +Subject: [PATCH 204/398] BCM270X_DT: Remove explicit claiming of UART pins It is convenient to be able to map a different function to the UART pins (e.g. DPI for vga666) without having to disable the UART first. @@ -160528,7 +160528,7 @@ Signed-off-by: Phil Elwell 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index d2d39c6..adba682 100644 +index d2d39c68bd5ddadf8077670e84868abd4a3d82f8..adba6824ebb46e481b492ce59d3bfc34b6669c7f 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -57,9 +57,9 @@ @@ -160545,7 +160545,7 @@ index d2d39c6..adba682 100644 }; diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts -index 05403e2..68f6069 100644 +index 05403e2a98a5146c6e4d0d2c7ff2ee0241153273..68f6069dd24cbf6a2ed11365ac0717e36879abe3 100644 --- a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts @@ -28,13 +28,11 @@ @@ -160567,7 +160567,7 @@ index 05403e2..68f6069 100644 }; diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index 38ed33b..17d04cf 100644 +index 38ed33ba1f8dca4df27d5c74ffe7bd4d6b7a3982..17d04cf87195a6ff192e1ddbe4f92b1afa9e5ddb 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -37,23 +37,24 @@ @@ -160608,10 +160608,10 @@ index 38ed33b..17d04cf 100644 __overlay__ { serial0 = "/soc/uart@7e201000"; -From 403390e94d98b9f7b6f41397b04b2f29900cdcb0 Mon Sep 17 00:00:00 2001 +From 6cc73c1e07cde068463381b7111874182169f16f Mon Sep 17 00:00:00 2001 From: Rodrigo Freire Date: Tue, 22 Mar 2016 12:40:33 -0300 -Subject: [PATCH 205/251] lirc_rpi: Lower IR reception error to debug +Subject: [PATCH 205/398] lirc_rpi: Lower IR reception error to debug Lowers a IR reception error condition message to KERNEL_DEBUG --- @@ -160619,7 +160619,7 @@ Lowers a IR reception error condition message to KERNEL_DEBUG 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c -index cd09c99..0624439 100644 +index cd09c9996b12c62f9f831261379b84f8389129ff..06244398e42b9a1501a48fb4693218e017e5a651 100644 --- a/drivers/staging/media/lirc/lirc_rpi.c +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -271,7 +271,7 @@ static irqreturn_t irq_handler(int i, void *blah, struct pt_regs *regs) @@ -160632,10 +160632,10 @@ index cd09c99..0624439 100644 signal, sense, tv.tv_sec, lasttv.tv_sec, tv.tv_usec, lasttv.tv_usec); -From 0fb8769fe60a8bba6f871ff6d91a04fb7950b67d Mon Sep 17 00:00:00 2001 +From 2ee87f3fd2b54f73d4f5c1150aedab069decc4f5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 14:16:25 +0000 -Subject: [PATCH 206/251] vchiq_arm: Access the dequeue_pending flag locked +Subject: [PATCH 206/398] vchiq_arm: Access the dequeue_pending flag locked Reading through this code looking for another problem (now found in userland) the use of dequeue_pending outside a lock didn't seem safe. @@ -160646,7 +160646,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c -index e11c0e0..71883e5 100644 +index e11c0e07471bc7ebba04e48d3efc746236ec2f4e..71883e55fd0cc81e3f7a724dcf499bfe6ddcc761 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -279,6 +279,7 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header, @@ -160693,10 +160693,10 @@ index e11c0e0..71883e5 100644 return add_completion(instance, reason, header, user_service, -From 797c1c2110ba155df9fbdb44a7c052f7beeb0a50 Mon Sep 17 00:00:00 2001 +From b49b8e5afca0b7468d46ee6f5d3698b61e8661dc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 15:57:14 +0000 -Subject: [PATCH 207/251] BCM270X_DT: Add pi3-act-led overlay +Subject: [PATCH 207/398] BCM270X_DT: Add pi3-act-led overlay Signed-off-by: Phil Elwell --- @@ -160707,7 +160707,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index f4ae95a..4c3db73 100644 +index f4ae95a171c259f8a8ee700f5524f20b766de70d..4c3db7347f94552bed44f866eab2502180f31b54 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -39,6 +39,7 @@ dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo @@ -160719,7 +160719,7 @@ index f4ae95a..4c3db73 100644 dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index b674394..9b49868 100644 +index b6743947874849953a5c5877b1b4c7d60afbbd10..9b498689badb0165bbcabdeca8822a18700c1aef 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -136,12 +136,14 @@ Params: @@ -160763,7 +160763,7 @@ index b674394..9b49868 100644 N.B. To disable the systemd service that initialises the modem so it diff --git a/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts b/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts new file mode 100644 -index 0000000..14a59dc +index 0000000000000000000000000000000000000000..14a59dcf13ca64eb0bdbd34d70690a11abe83cfa --- /dev/null +++ b/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts @@ -0,0 +1,27 @@ @@ -160795,10 +160795,10 @@ index 0000000..14a59dc + }; +}; -From 6de376456d86ba0211a2e8c10cf50fda9f3b6e20 Mon Sep 17 00:00:00 2001 +From 58b7519b0b9d6d9ee3d5b3b5044aa2d81a74400d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 20:53:47 +0000 -Subject: [PATCH 208/251] vchiq_arm: Service callbacks must not fail +Subject: [PATCH 208/398] vchiq_arm: Service callbacks must not fail Service callbacks are not allowed to return an error. The internal callback that delivers events and messages to user tasks does not enqueue them if @@ -160811,7 +160811,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 71883e5..a5cc385 100644 +index 71883e55fd0cc81e3f7a724dcf499bfe6ddcc761..a5cc385cc25ada02fc45af5d5ca68cd6d2687850 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -224,7 +224,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -160824,10 +160824,10 @@ index 71883e5..a5cc385 100644 DEBUG_TRACE(SERVICE_CALLBACK_LINE); } -From 4793b34f7a3f71b1acfcd769b8d25fdcbb01b2cd Mon Sep 17 00:00:00 2001 +From fb495c03344b61a7ad3f4d99aefd0495049bf6db Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Thu, 17 Mar 2016 18:16:16 +0000 -Subject: [PATCH 209/251] Add configs and overlay for PCA9548 I2C mux +Subject: [PATCH 209/398] Add configs and overlay for PCA9548 I2C mux Adds kernel configs for I2C muxes and a dt overlay for PCA9548 that adds the 8 muxed I2C buses and mux device. @@ -160841,7 +160841,7 @@ that adds the 8 muxed I2C buses and mux device. create mode 100644 arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 4c3db73..7c4fc30 100644 +index 4c3db7347f94552bed44f866eab2502180f31b54..7c4fc306116299df98e3006bafdaf3e096802b69 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -29,6 +29,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo @@ -160853,7 +160853,7 @@ index 4c3db73..7c4fc30 100644 dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 9b49868..a9b1ff5 100644 +index 9b498689badb0165bbcabdeca8822a18700c1aef..a9b1ff52fc3f213e68afc3d07a737af1e7352a40 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -360,6 +360,12 @@ Params: i2c_gpio_sda GPIO used for I2C data (default "23") @@ -160871,7 +160871,7 @@ index 9b49868..a9b1ff5 100644 Load: dtoverlay=i2c-rtc,= diff --git a/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts new file mode 100644 -index 0000000..1729fd6 +index 0000000000000000000000000000000000000000..1729fd6f3c29b3c85996274ad92006453c6e4ce9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts @@ -0,0 +1,67 @@ @@ -160943,7 +160943,7 @@ index 0000000..1729fd6 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index b63632d..2c8e4b7 100644 +index b63632d685ddc790eab57b9e449806c3a8d64a9e..2c8e4b742e744965ad638e0a123d749a4ea8be16 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -600,6 +600,8 @@ CONFIG_I2C=y @@ -160956,7 +160956,7 @@ index b63632d..2c8e4b7 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index e720c74..f6e2d84 100644 +index e720c74562ccabe41676b7ddd6aa8447c9505938..f6e2d84c4200078ab49c0224c5b1f90a0a13b285 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -593,6 +593,8 @@ CONFIG_I2C=y @@ -160969,10 +160969,10 @@ index e720c74..f6e2d84 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From 77700bbcd5dc6285892ea67acba46e45c3341b66 Mon Sep 17 00:00:00 2001 +From 431e0bc06eee9bcc68647b789e638eb1e2909b61 Mon Sep 17 00:00:00 2001 From: Nicolas Boullis Date: Wed, 23 Mar 2016 23:40:15 +0100 -Subject: [PATCH 210/251] BCM270X_DT: Add DS1339 to i2c-rtc overlay +Subject: [PATCH 210/398] BCM270X_DT: Add DS1339 to i2c-rtc overlay --- arch/arm/boot/dts/overlays/README | 4 ++++ @@ -160980,7 +160980,7 @@ Subject: [PATCH 210/251] BCM270X_DT: Add DS1339 to i2c-rtc overlay 2 files changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index a9b1ff5..e88e7c8 100644 +index a9b1ff52fc3f213e68afc3d07a737af1e7352a40..e88e7c8c56f69c8926db6354afdea5176a6b7856 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -371,6 +371,8 @@ Info: Adds support for a number of I2C Real Time Clock devices @@ -161002,7 +161002,7 @@ index a9b1ff5..e88e7c8 100644 Name: i2c0-bcm2708 Info: Enable the i2c_bcm2708 driver for the i2c0 bus diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -index fed4bd8..eecec16 100644 +index fed4bd867620e0c0958b92b7c7729591d3ea12ec..eecec16461c696d3c6885bc7b346b2f5f1f58670 100644 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts @@ -17,6 +17,12 @@ @@ -161032,10 +161032,10 @@ index fed4bd8..eecec16 100644 }; }; -From c17b3228544635d56826292c0989d2e944917148 Mon Sep 17 00:00:00 2001 +From 49dd6979754dda01fd6d9a030bb72770132e7ea9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 29 Mar 2016 15:32:30 +0100 -Subject: [PATCH 211/251] copy_from_user: CPU_SW_DOMAIN_PAN compatibility +Subject: [PATCH 211/398] copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. @@ -161048,7 +161048,7 @@ Signed-off-by: Phil Elwell 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c -index c29df92..6681df5 100644 +index c29df924b50c2e7b071257aa2d842169252d9bd9..6681df593cc3f8d8fe3fd814962b2e67f9755cbc 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c @@ -186,6 +186,7 @@ out: @@ -161088,10 +161088,10 @@ index c29df92..6681df5 100644 static unsigned long noinline -From 6abb732a5e79d2ab8384b6b70fd17e5347f59d0e Mon Sep 17 00:00:00 2001 +From b255bbdc1208af444a49f19575a2dee9a2822e00 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 16:33:09 +0100 -Subject: [PATCH 212/251] bcm2835-sdhost: Adjust to core clock changes +Subject: [PATCH 212/398] bcm2835-sdhost: Adjust to core clock changes The SDHOST block uses the core clock, so previously it has been necessary to prevent the core clock from changing in order to maintain @@ -161112,7 +161112,7 @@ Signed-off-by: Phil Elwell 2 files changed, 119 insertions(+), 22 deletions(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index d509d10..98a7fa5 100644 +index d509d10cd919d4ba941ec0cb12a3a17bb0b9b818..98a7fa537bba72814dd84e8a8330d260a8a266ff 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -36,6 +36,7 @@ config MMC_BCM2835_PIO_DMA_BARRIER @@ -161124,7 +161124,7 @@ index d509d10..98a7fa5 100644 This selects the SDHost controller on BCM2835/6. diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index f43aae0..1deecef 100644 +index f43aae07bb9260a94542a9653a95afacb38cc263..1deecef36ccea805440c84542642de03fa87c0a0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -50,6 +50,10 @@ @@ -161432,10 +161432,10 @@ index f43aae0..1deecef 100644 bcm2835_sdhost_set_power(host, false); -From 788985576c5b7f413466d4ea5e1b9c471ff2b7fc Mon Sep 17 00:00:00 2001 +From 932b9bbd724124ebc8c5bc5ebf81f4f6df1f85d2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 17:07:15 +0100 -Subject: [PATCH 213/251] BCM270X_DT: Document hazards of sdhost overlay +Subject: [PATCH 213/398] BCM270X_DT: Document hazards of sdhost overlay Signed-off-by: Phil Elwell --- @@ -161443,7 +161443,7 @@ Signed-off-by: Phil Elwell 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index e88e7c8..337be4a 100644 +index e88e7c8c56f69c8926db6354afdea5176a6b7856..337be4a7076ed74c506605771c3e020c902e4166 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -712,7 +712,11 @@ Params: @@ -161469,10 +161469,10 @@ index e88e7c8..337be4a 100644 Params: overclock_50 Clock (in MHz) to use when the MMC framework requests 50MHz -From 58fb42a1ecf4bec15d3236183955f4b54f199e75 Mon Sep 17 00:00:00 2001 +From 75590c5e572edb6aac3d31a8ce93f57b34823df3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 17:23:15 +0100 -Subject: [PATCH 214/251] cpufreq: Temporarily ignore io_is_busy=1 +Subject: [PATCH 214/398] cpufreq: Temporarily ignore io_is_busy=1 To speed testing of the new sdhost driver that adapts to changes in core_freq, hack the on-demand governor to treat io_is_busy=1 as @@ -161485,7 +161485,7 @@ Signed-off-by: Phil Elwell 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c -index 03ac6ce..99a9610 100644 +index 03ac6ce540424a189e2946a1dd98d2046cbc3622..99a9610d467e4f5ff128f96780677d57997280ce 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -307,7 +307,12 @@ static ssize_t store_io_is_busy(struct dbs_data *dbs_data, const char *buf, @@ -161503,10 +161503,10 @@ index 03ac6ce..99a9610 100644 /* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu(j) { -From 8bf41d1b2f41d6af2c196497168d3cc8f97a0071 Mon Sep 17 00:00:00 2001 +From d9d886c8f45caa239ca4aed77d18c69149b88340 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 20:18:38 +0100 -Subject: [PATCH 215/251] Revert "cpufreq: Temporarily ignore io_is_busy=1" +Subject: [PATCH 215/398] Revert "cpufreq: Temporarily ignore io_is_busy=1" This reverts commit 2af1218a8a0220fec526f64d03977b8451afb4c8. --- @@ -161514,7 +161514,7 @@ This reverts commit 2af1218a8a0220fec526f64d03977b8451afb4c8. 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c -index 99a9610..03ac6ce 100644 +index 99a9610d467e4f5ff128f96780677d57997280ce..03ac6ce540424a189e2946a1dd98d2046cbc3622 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -307,12 +307,7 @@ static ssize_t store_io_is_busy(struct dbs_data *dbs_data, const char *buf, @@ -161532,10 +161532,10 @@ index 99a9610..03ac6ce 100644 /* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu(j) { -From f9634b17e0d05988abbe329efd4b9eee59aadb0c Mon Sep 17 00:00:00 2001 +From 71bfe9deb6e69465029c89c799050e3f26b9b172 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 7 Jan 2016 15:50:22 +0100 -Subject: [PATCH 216/251] net, sched: add skb_at_tc_ingress helper +Subject: [PATCH 216/398] net, sched: add skb_at_tc_ingress helper Add a skb_at_tc_ingress() as this will be needed elsewhere as well and can hide the ugly ifdef. @@ -161549,10 +161549,10 @@ Signed-off-by: David S. Miller 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h -index b2a8e63..636a362 100644 +index 86df0835f6b58517c671e200779d9045200cb5d3..e5bba897d20649223bf393b94a66677177e0f554 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -407,6 +407,15 @@ bool tcf_destroy(struct tcf_proto *tp, bool force); +@@ -408,6 +408,15 @@ bool tcf_destroy(struct tcf_proto *tp, bool force); void tcf_destroy_chain(struct tcf_proto __rcu **fl); int skb_do_redirect(struct sk_buff *); @@ -161569,7 +161569,7 @@ index b2a8e63..636a362 100644 static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) { diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c -index 5faaa54..b3c8bb4 100644 +index 5faaa5425f7b72293fdd80e1b27405fcf479e207..b3c8bb4aeef5ce82d0675769dd61d8152fd16c5e 100644 --- a/net/sched/cls_bpf.c +++ b/net/sched/cls_bpf.c @@ -79,12 +79,8 @@ static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp, @@ -161587,88 +161587,10 @@ index 5faaa54..b3c8bb4 100644 if (unlikely(!skb_mac_header_was_set(skb))) -From de42773e4545e48e35472cdf01f1bcb7af1f27cf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Linus=20L=C3=BCssing?= -Date: Wed, 24 Feb 2016 04:21:42 +0100 -Subject: [PATCH 217/251] net: fix bridge multicast packet checksum validation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We need to update the skb->csum after pulling the skb, otherwise -an unnecessary checksum (re)computation can ocure for IGMP/MLD packets -in the bridge code. Additionally this fixes the following splats for -network devices / bridge ports with support for and enabled RX checksum -offloading: - -[...] -[ 43.986968] eth0: hw csum failure -[ 43.990344] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.0 #2 -[ 43.996193] Hardware name: BCM2709 -[ 43.999647] [<800204e0>] (unwind_backtrace) from [<8001cf14>] (show_stack+0x10/0x14) -[ 44.007432] [<8001cf14>] (show_stack) from [<801ab614>] (dump_stack+0x80/0x90) -[ 44.014695] [<801ab614>] (dump_stack) from [<802e4548>] (__skb_checksum_complete+0x6c/0xac) -[ 44.023090] [<802e4548>] (__skb_checksum_complete) from [<803a055c>] (ipv6_mc_validate_checksum+0x104/0x178) -[ 44.032959] [<803a055c>] (ipv6_mc_validate_checksum) from [<802e111c>] (skb_checksum_trimmed+0x130/0x188) -[ 44.042565] [<802e111c>] (skb_checksum_trimmed) from [<803a06e8>] (ipv6_mc_check_mld+0x118/0x338) -[ 44.051501] [<803a06e8>] (ipv6_mc_check_mld) from [<803b2c98>] (br_multicast_rcv+0x5dc/0xd00) -[ 44.060077] [<803b2c98>] (br_multicast_rcv) from [<803aa510>] (br_handle_frame_finish+0xac/0x51c) -[...] - -Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code") -Reported-by: Álvaro Fernández Rojas -Signed-off-by: Linus Lüssing -Signed-off-by: David S. Miller ---- - net/core/skbuff.c | 22 ++++++++++++++++++++-- - 1 file changed, 20 insertions(+), 2 deletions(-) - -diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 5bf88f5..8616d11 100644 ---- a/net/core/skbuff.c -+++ b/net/core/skbuff.c -@@ -2948,6 +2948,24 @@ int skb_append_pagefrags(struct sk_buff *skb, struct page *page, - EXPORT_SYMBOL_GPL(skb_append_pagefrags); - - /** -+ * skb_push_rcsum - push skb and update receive checksum -+ * @skb: buffer to update -+ * @len: length of data pulled -+ * -+ * This function performs an skb_push on the packet and updates -+ * the CHECKSUM_COMPLETE checksum. It should be used on -+ * receive path processing instead of skb_push unless you know -+ * that the checksum difference is zero (e.g., a valid IP header) -+ * or you are setting ip_summed to CHECKSUM_NONE. -+ */ -+static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len) -+{ -+ skb_push(skb, len); -+ skb_postpush_rcsum(skb, skb->data, len); -+ return skb->data; -+} -+ -+/** - * skb_pull_rcsum - pull skb and update receive checksum - * @skb: buffer to update - * @len: length of data pulled -@@ -4084,9 +4102,9 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb, - if (!pskb_may_pull(skb_chk, offset)) - goto err; - -- __skb_pull(skb_chk, offset); -+ skb_pull_rcsum(skb_chk, offset); - ret = skb_chkf(skb_chk); -- __skb_push(skb_chk, offset); -+ skb_push_rcsum(skb_chk, offset); - - if (ret) - goto err; - -From 2c0f60ed53c5a180397b2b740bbf796e09471012 Mon Sep 17 00:00:00 2001 +From e95b72cdb5a4576d8f675a870c4739ff9866203c Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 7 Jan 2016 15:50:23 +0100 -Subject: [PATCH 218/251] bpf: add skb_postpush_rcsum and fix dev_forward_skb +Subject: [PATCH 217/398] bpf: add skb_postpush_rcsum and fix dev_forward_skb occasions Add a small helper skb_postpush_rcsum() and fix up redirect locations @@ -161717,43 +161639,14 @@ Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller --- - include/linux/skbuff.h | 17 +++++++++++++++++ - net/core/filter.c | 17 +++++++++++++---- - 2 files changed, 30 insertions(+), 4 deletions(-) + net/core/filter.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 75f136a..d84c593 100644 ---- a/include/linux/skbuff.h -+++ b/include/linux/skbuff.h -@@ -2724,6 +2724,23 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb, - - unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); - -+static inline void skb_postpush_rcsum(struct sk_buff *skb, -+ const void *start, unsigned int len) -+{ -+ /* For performing the reverse operation to skb_postpull_rcsum(), -+ * we can instead of ... -+ * -+ * skb->csum = csum_add(skb->csum, csum_partial(start, len, 0)); -+ * -+ * ... just use this equivalent version here to save a few -+ * instructions. Feeding csum of 0 in csum_partial() and later -+ * on adding skb->csum is equivalent to feed skb->csum in the -+ * first place. -+ */ -+ if (skb->ip_summed == CHECKSUM_COMPLETE) -+ skb->csum = csum_partial(start, len, skb->csum); -+} -+ - /** - * pskb_trim_rcsum - trim received skb and update checksum - * @skb: buffer to trim diff --git a/net/core/filter.c b/net/core/filter.c -index 37157c4..6e337ea 100644 +index f393a22b9d5049b3161812105474bd93d72db965..b683e60cfb4c90d11e4fb5f03b5f845da8febf57 100644 --- a/net/core/filter.c +++ b/net/core/filter.c -@@ -1288,8 +1288,9 @@ static u64 bpf_skb_store_bytes(u64 r1, u64 r2, u64 r3, u64 r4, u64 flags) +@@ -1293,8 +1293,9 @@ static u64 bpf_skb_store_bytes(u64 r1, u64 r2, u64 r3, u64 r4, u64 flags) /* skb_store_bits cannot return -EFAULT here */ skb_store_bits(skb, offset, ptr, len); @@ -161765,7 +161658,7 @@ index 37157c4..6e337ea 100644 return 0; } -@@ -1415,8 +1416,12 @@ static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5) +@@ -1420,8 +1421,12 @@ static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5) if (unlikely(!skb2)) return -ENOMEM; @@ -161779,7 +161672,7 @@ index 37157c4..6e337ea 100644 skb2->dev = dev; skb_sender_cpu_clear(skb2); -@@ -1459,8 +1464,12 @@ int skb_do_redirect(struct sk_buff *skb) +@@ -1464,8 +1469,12 @@ int skb_do_redirect(struct sk_buff *skb) return -EINVAL; } @@ -161794,10 +161687,10 @@ index 37157c4..6e337ea 100644 skb->dev = dev; skb_sender_cpu_clear(skb); -From 67ba5d253f79ddbf1c28d7e3cb48efd0b845f87c Mon Sep 17 00:00:00 2001 +From f6fc8a87fe2c4a3ea3be092ec2668d8b5b1c6de5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 31 Mar 2016 15:44:53 +0100 -Subject: [PATCH 219/251] bcm2835-sdhost: Precalc divisors and overclocks +Subject: [PATCH 218/398] bcm2835-sdhost: Precalc divisors and overclocks Recalculating the clock divisors when the core clock changes is wasteful and makes it harder to manage the overclock settings. Instead, @@ -161809,7 +161702,7 @@ Signed-off-by: Phil Elwell 1 file changed, 88 insertions(+), 64 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 1deecef..cc18ec8 100644 +index 1deecef36ccea805440c84542642de03fa87c0a0..cc18ec890d1578def372af6558e01a2a982520d0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -154,12 +154,15 @@ struct bcm2835_host { @@ -162068,10 +161961,10 @@ index 1deecef..cc18ec8 100644 pr_debug("bcm2835_sdhost_probe -> OK\n"); -From 7a21e0c9d567d27b000ef8350ee503776720852d Mon Sep 17 00:00:00 2001 +From b41a8737be0f1fbdbc5a1bb5a32c826ec3c83624 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Apr 2016 12:35:32 +0100 -Subject: [PATCH 220/251] Revert "bcm2835-sdhost: Precalc divisors and +Subject: [PATCH 219/398] Revert "bcm2835-sdhost: Precalc divisors and overclocks" This reverts commit 20260462773366a5734e5268dae0a4c179a21a2d. @@ -162080,7 +161973,7 @@ This reverts commit 20260462773366a5734e5268dae0a4c179a21a2d. 1 file changed, 64 insertions(+), 88 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index cc18ec8..1deecef 100644 +index cc18ec890d1578def372af6558e01a2a982520d0..1deecef36ccea805440c84542642de03fa87c0a0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -154,15 +154,12 @@ struct bcm2835_host { @@ -162339,10 +162232,10 @@ index cc18ec8..1deecef 100644 pr_debug("bcm2835_sdhost_probe -> OK\n"); -From a44f96721ff123198ef527c1471425cc5e2ee1b1 Mon Sep 17 00:00:00 2001 +From 8e1e2e73fb217c2d9f5ed3310ccc2bb7de315906 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Apr 2016 12:35:51 +0100 -Subject: [PATCH 221/251] Revert "bcm2835-sdhost: Adjust to core clock changes" +Subject: [PATCH 220/398] Revert "bcm2835-sdhost: Adjust to core clock changes" This reverts commit 4b89d07fd299a0f4e25321920cb74416ba2e638e. --- @@ -162351,7 +162244,7 @@ This reverts commit 4b89d07fd299a0f4e25321920cb74416ba2e638e. 2 files changed, 22 insertions(+), 119 deletions(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 98a7fa5..d509d10 100644 +index 98a7fa537bba72814dd84e8a8330d260a8a266ff..d509d10cd919d4ba941ec0cb12a3a17bb0b9b818 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -36,7 +36,6 @@ config MMC_BCM2835_PIO_DMA_BARRIER @@ -162363,7 +162256,7 @@ index 98a7fa5..d509d10 100644 This selects the SDHost controller on BCM2835/6. diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 1deecef..f43aae0 100644 +index 1deecef36ccea805440c84542642de03fa87c0a0..f43aae07bb9260a94542a9653a95afacb38cc263 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -50,10 +50,6 @@ @@ -162671,10 +162564,10 @@ index 1deecef..f43aae0 100644 bcm2835_sdhost_set_power(host, false); -From 99a50a0418f27f7b894ee9668b2ed02b435c9113 Mon Sep 17 00:00:00 2001 +From f99e0a13c2a85f19cd6ecbeb758af61a1db4fe2d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Apr 2016 16:03:18 +0100 -Subject: [PATCH 222/251] bcm2835-sdhost: Firmware manages the clock divisor +Subject: [PATCH 221/398] bcm2835-sdhost: Firmware manages the clock divisor The bcm2835-sdhost driver hands control of the CDIV clock divisor register to matching firmware, allowing it to adjust to a changing @@ -162693,7 +162586,7 @@ Signed-off-by: Phil Elwell 2 files changed, 74 insertions(+), 47 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index f43aae0..54087b2 100644 +index f43aae07bb9260a94542a9653a95afacb38cc263..54087b2e22d4c543adb08dbf24e4b3199b9b5893 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -50,6 +50,7 @@ @@ -162888,7 +162781,7 @@ index f43aae0..54087b2 100644 if (ret) goto err; diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index c844968..e312e9c 100644 +index c844968bf0d2f551587d2879195bb70c8e7f1333..e312e9cf31c4b149bfcbee525807cc45476aefc9 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -79,6 +79,7 @@ enum rpi_firmware_property_tag { @@ -162900,10 +162793,10 @@ index c844968..e312e9c 100644 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 3a3bd335bf71e17af13de24423c806f9a26480b7 Mon Sep 17 00:00:00 2001 +From ebf1d1767050c8df9a4e86970dff876998e491b1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Apr 2016 19:52:27 +0100 -Subject: [PATCH 223/251] Revert "Revert "cpufreq: Temporarily ignore +Subject: [PATCH 222/398] Revert "Revert "cpufreq: Temporarily ignore io_is_busy=1"" This reverts commit c353af0f83220068c10f6593b1767576b9b6cc18. @@ -162912,7 +162805,7 @@ This reverts commit c353af0f83220068c10f6593b1767576b9b6cc18. 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c -index 03ac6ce..99a9610 100644 +index 03ac6ce540424a189e2946a1dd98d2046cbc3622..99a9610d467e4f5ff128f96780677d57997280ce 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -307,7 +307,12 @@ static ssize_t store_io_is_busy(struct dbs_data *dbs_data, const char *buf, @@ -162930,10 +162823,10 @@ index 03ac6ce..99a9610 100644 /* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu(j) { -From 82caca6544d42613722befb52dd121bd9c7d8159 Mon Sep 17 00:00:00 2001 +From 2c3e1576729d26acbda6992321ea336da20af815 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 31 Mar 2016 16:49:52 +0100 -Subject: [PATCH 224/251] config: Enabled IPV6_SUBTREES +Subject: [PATCH 223/398] config: Enabled IPV6_SUBTREES --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -162941,7 +162834,7 @@ Subject: [PATCH 224/251] config: Enabled IPV6_SUBTREES 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 2c8e4b7..d509168 100644 +index 2c8e4b742e744965ad638e0a123d749a4ea8be16..d5091681e1c357f0acabaa957bbc86a00b9b7661 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -106,6 +106,7 @@ CONFIG_INET6_ESP=m @@ -162953,7 +162846,7 @@ index 2c8e4b7..d509168 100644 CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y CONFIG_IPV6_PIMSM_V2=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index f6e2d84..060ec5f 100644 +index f6e2d84c4200078ab49c0224c5b1f90a0a13b285..060ec5ff8b558f007cc93deb8595e0aee233f2b8 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -73,6 +73,7 @@ CONFIG_INET=y @@ -162965,10 +162858,10 @@ index f6e2d84..060ec5f 100644 CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_PNP=y -From 67cf7c950c17a731c934a3b30b474cb8886744c5 Mon Sep 17 00:00:00 2001 +From 1f9dd507c2df4e1c8e8b402d92751912427925f2 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 225/251] add smsc95xx packetsize module_param +Subject: [PATCH 224/398] add smsc95xx packetsize module_param Signed-off-by: Sam Nazarko --- @@ -162976,7 +162869,7 @@ Signed-off-by: Sam Nazarko 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index a61bd08..3c23b11 100644 +index a61bd08d81a0dc6a18f3989b87f57101e78aa4ac..3c23b11c606d6deb7cfabe4d28992475417da303 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -83,6 +83,10 @@ static char *macaddr = ":"; @@ -163010,10 +162903,10 @@ index a61bd08..3c23b11 100644 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From fd1df6d4b4d6ebf352da378dcca5965297b242ec Mon Sep 17 00:00:00 2001 +From 1cb970e3ccc6ce1de9e5f28bc35ab9bb41dc2622 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 226/251] reboot: Use power off rather than busy spinning when +Subject: [PATCH 225/398] reboot: Use power off rather than busy spinning when halt is requested --- @@ -163021,7 +162914,7 @@ Subject: [PATCH 226/251] reboot: Use power off rather than busy spinning when 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c -index 3826935..2cd6af2 100644 +index 38269358fd252c6bb93fd58a0478319c436cdfd3..2cd6af2d3b49024d8fab2d59384c566bba7e415b 100644 --- a/arch/arm/kernel/reboot.c +++ b/arch/arm/kernel/reboot.c @@ -102,11 +102,7 @@ void machine_shutdown(void) @@ -163038,10 +162931,10 @@ index 3826935..2cd6af2 100644 /* -From d1766b543e9362da3ed16d5b03828a67214e7476 Mon Sep 17 00:00:00 2001 +From dcdb7c061bafa6c920787f80f6f702e4b5d91747 Mon Sep 17 00:00:00 2001 From: HiassofT Date: Wed, 6 Apr 2016 21:45:01 +0200 -Subject: [PATCH 227/251] Revert "bcm2835-dma: Fix dreq not set for slave +Subject: [PATCH 226/398] Revert "bcm2835-dma: Fix dreq not set for slave transfers" This reverts commit 8ad957e866a1fe1450f663f2b00a57d7de44904c. @@ -163060,7 +162953,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 2 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 985019b..d26b6bd 100644 +index 985019b72456f65ddbb54c3bfa49e18dffe4285c..d26b6bdbcf1ab33ab92937b889a37e505c925311 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -679,8 +679,6 @@ static int bcm2835_dma_slave_config(struct dma_chan *chan, @@ -163073,10 +162966,10 @@ index 985019b..d26b6bd 100644 return 0; } -From 68172482aa367aa118a7a46537206c817669b10c Mon Sep 17 00:00:00 2001 +From d16571cb5439fc70257b7968c966c94550db3cfa Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Fri, 1 Apr 2016 15:28:46 +0100 -Subject: [PATCH 228/251] RPi config: Add CONFIG_PWM_PCA9685 for NXP PCA9685 +Subject: [PATCH 227/398] RPi config: Add CONFIG_PWM_PCA9685 for NXP PCA9685 driver over I2C Includes DT overlay to configure it. @@ -163092,7 +162985,7 @@ Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> create mode 100644 arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 7c4fc30..239c6a1 100644 +index 7c4fc306116299df98e3006bafdaf3e096802b69..239c6a12d85a334ab8f0d592a7a8d42152a65dd2 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -30,6 +30,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo @@ -163104,7 +162997,7 @@ index 7c4fc30..239c6a1 100644 dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 337be4a..9df71a4 100644 +index 337be4a7076ed74c506605771c3e020c902e4166..9df71a4afa0f78ec1249a739ff2926e315f80189 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -366,6 +366,12 @@ Load: dtoverlay=i2c-mux-pca9548a,= @@ -163122,7 +163015,7 @@ index 337be4a..9df71a4 100644 Load: dtoverlay=i2c-rtc,= diff --git a/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts b/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts new file mode 100644 -index 0000000..d1ffd23 +index 0000000000000000000000000000000000000000..d1ffd2326669e46ad68939f94713cc992dee57e0 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts @@ -0,0 +1,26 @@ @@ -163153,7 +163046,7 @@ index 0000000..d1ffd23 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index d509168..299d7be 100644 +index d5091681e1c357f0acabaa957bbc86a00b9b7661..299d7be8060173c06cc5f01aaf80f5ea62f5ce11 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -1122,6 +1122,7 @@ CONFIG_MCP320X=m @@ -163165,7 +163058,7 @@ index d509168..299d7be 100644 CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 060ec5f..acda16b 100644 +index 060ec5ff8b558f007cc93deb8595e0aee233f2b8..acda16b3a7e65d9577daa6e0657c286cc16138cc 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -1129,6 +1129,7 @@ CONFIG_MCP320X=m @@ -163177,10 +163070,10 @@ index 060ec5f..acda16b 100644 CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y -From 3d3c095375d6ac4508dc49a80d615b1fd56eb12a Mon Sep 17 00:00:00 2001 +From b208581faca58d0d7cadfd97662dcc9cdd99c565 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 8 Apr 2016 17:43:27 +0100 -Subject: [PATCH 229/251] BCM270X_DT: Don't generate "linux,phandle" props +Subject: [PATCH 228/398] BCM270X_DT: Don't generate "linux,phandle" props The EPAPR standard says to use "phandle" properties to store phandles, rather than the deprecated "linux,phandle" version. By default, dtc @@ -163194,7 +163087,7 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index fdc450f..49badba 100644 +index fdc450f4c9d9623ac4723d39df9419eb80a420db..49badbac2b303e31fff103ddf43c63e7a261b049 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -813,5 +813,5 @@ clean-files := *.dtb @@ -163205,7 +163098,7 @@ index fdc450f..49badba 100644 + DTC_FLAGS ?= -@ -H epapr endif diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib -index 7209d62..3079c4f 100644 +index 7209d622eb16b113511bb7d8bd7a1b01e088f113..3079c4fd3580f7484cabb302007ec44934951480 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -294,7 +294,7 @@ $(obj)/%.dtb: $(src)/%.dts FORCE @@ -163218,10 +163111,10 @@ index 7209d62..3079c4f 100644 -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -From 5cec9f4a5fb37bc1041c351ab309001c4f9f9d1d Mon Sep 17 00:00:00 2001 +From d130bd30736a1796752d115a3cbc79e3a2485699 Mon Sep 17 00:00:00 2001 From: 6by9 <6by9@users.noreply.github.com> Date: Fri, 8 Apr 2016 18:15:43 +0100 -Subject: [PATCH 230/251] V4L2 driver updates (#1393) +Subject: [PATCH 229/398] V4L2 driver updates (#1393) * BCM2835-V4L2: Correct ISO control and add V4L2_CID_ISO_SENSITIVITY_AUTO @@ -163279,7 +163172,7 @@ Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> 4 files changed, 320 insertions(+), 135 deletions(-) diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c -index 98a892e..0e6c9b4 100644 +index 98a892e5140ac0e9e4631965b43bcdae5e8f587b..0e6c9b4f125ccdf052f5566992a4c2a09f8f5471 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -45,6 +45,8 @@ @@ -163785,7 +163678,7 @@ index 98a892e..0e6c9b4 100644 module_init(bm2835_mmal_init); diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h -index 7fe9f65..202906b 100644 +index 7fe9f658a927042b95eaba63aaa49daed2a8f2b8..202906b9e8e6ec5a9cb4e953cac85f505d7dabd3 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -15,7 +15,7 @@ @@ -163833,7 +163726,7 @@ index 7fe9f65..202906b 100644 + (win_fmt)->bitmap); \ +} diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c -index f9f903f..fe61330 100644 +index f9f903f9574d576dde069e56f618f235f99194c7..fe61330ba2a64f850ff3e4930ff813f648889804 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c @@ -49,10 +49,13 @@ static const s64 ev_bias_qmenu[] = { @@ -163903,7 +163796,7 @@ index f9f903f..fe61330 100644 }, { diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h -index aa0fd18..f6abb5c 100644 +index aa0fd180271b1b58e96e027df951fcbc7f610eb8..f6abb5cfa49d58277fddfb40b7ad329518bd397f 100644 --- a/drivers/media/platform/bcm2835/mmal-parameters.h +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -654,3 +654,36 @@ struct mmal_parameter_imagefx_parameters { @@ -163944,10 +163837,10 @@ index aa0fd18..f6abb5c 100644 + flashes[MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES]; +}; -From 4366809281c7cf500e97f9a113cb1234d273aed3 Mon Sep 17 00:00:00 2001 +From ca330a52ca9aca9fb42825c3079d49666df68bf2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 Apr 2016 12:50:58 +0100 -Subject: [PATCH 231/251] bcm2835-sdhost: Reset the clock in task context +Subject: [PATCH 230/398] bcm2835-sdhost: Reset the clock in task context Since reprogramming the clock can now involve a round-trip to the firmware it must not be done at atomic context, and a tasklet @@ -163959,7 +163852,7 @@ Signed-off-by: Phil Elwell 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 54087b2..a57faed 100644 +index 54087b2e22d4c543adb08dbf24e4b3199b9b5893..a57faedd8ba71a38d057664f3b7e599026d43785 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -185,6 +185,7 @@ struct bcm2835_host { @@ -164054,10 +163947,10 @@ index 54087b2..a57faed 100644 host->pio_limit = 1; host->max_delay = 1; /* Warn if over 1ms */ -From 37e270746e49ee6bf0e7a8404503e67364519ce2 Mon Sep 17 00:00:00 2001 +From a0b80147f624f751f3b11850b662b884339bbfad Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 7 Apr 2016 12:44:24 +0100 -Subject: [PATCH 232/251] config: Enable CONFIG_IPV6_ROUTER_PREF for networks +Subject: [PATCH 231/398] config: Enable CONFIG_IPV6_ROUTER_PREF for networks with multiple routers --- @@ -164066,7 +163959,7 @@ Subject: [PATCH 232/251] config: Enable CONFIG_IPV6_ROUTER_PREF for networks 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 299d7be..7bfc073 100644 +index 299d7be8060173c06cc5f01aaf80f5ea62f5ce11..7bfc073222b859260c8befed51a01ae60468a606 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -101,6 +101,7 @@ CONFIG_INET_XFRM_MODE_TUNNEL=m @@ -164078,7 +163971,7 @@ index 299d7be..7bfc073 100644 CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index acda16b..59026b3 100644 +index acda16b3a7e65d9577daa6e0657c286cc16138cc..59026b368223e93478204a4459d19253a22c78d5 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -95,6 +95,7 @@ CONFIG_INET_XFRM_MODE_TUNNEL=m @@ -164090,10 +163983,10 @@ index acda16b..59026b3 100644 CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m -From aa9f1aedb9a495b6688cc30a17a0b01c3ab03f8c Mon Sep 17 00:00:00 2001 +From 1752d3172827a4e590076f9ddc405e0ee19c2d7b Mon Sep 17 00:00:00 2001 From: jochenberger Date: Thu, 7 Apr 2016 21:38:46 +0200 -Subject: [PATCH 233/251] Enable hid-betopff module +Subject: [PATCH 232/398] Enable hid-betopff module Add force feedback support for Betop based devices https://github.com/raspberrypi/linux/blob/rpi-4.1.y/drivers/hid/hid-betopff.c @@ -164103,7 +163996,7 @@ https://github.com/raspberrypi/linux/blob/rpi-4.1.y/drivers/hid/hid-betopff.c 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 7bfc073..31e3ac5 100644 +index 7bfc073222b859260c8befed51a01ae60468a606..31e3ac5b8680f12b2e8a236718239f61ce3b137e 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -867,6 +867,7 @@ CONFIG_HID_A4TECH=m @@ -164115,7 +164008,7 @@ index 7bfc073..31e3ac5 100644 CONFIG_HID_CHICONY=m CONFIG_HID_CYPRESS=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 59026b3..ac9287f 100644 +index 59026b368223e93478204a4459d19253a22c78d5..ac9287f9673254494fb8d751346563daee23af77 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -859,6 +859,7 @@ CONFIG_HID_A4TECH=m @@ -164127,10 +164020,10 @@ index 59026b3..ac9287f 100644 CONFIG_HID_CHICONY=m CONFIG_HID_CYPRESS=m -From 51edceabf0a57229b0ccb3742640aefe4fcb161d Mon Sep 17 00:00:00 2001 +From 3f1c02cf5867fc6ca99ccdf2d0bb12ba637e4350 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 12 Apr 2016 12:45:16 +0100 -Subject: [PATCH 234/251] config: Make IPV6 a module and regenerate with +Subject: [PATCH 233/398] config: Make IPV6 a module and regenerate with defconfig --- @@ -164139,7 +164032,7 @@ Subject: [PATCH 234/251] config: Make IPV6 a module and regenerate with 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 31e3ac5..5a8ab1e 100644 +index 31e3ac5b8680f12b2e8a236718239f61ce3b137e..5a8ab1e8fe39daf100a8b9d25269cb45bf22df78 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -101,6 +101,7 @@ CONFIG_INET_XFRM_MODE_TUNNEL=m @@ -164163,7 +164056,7 @@ index 31e3ac5..5a8ab1e 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index ac9287f..852751e 100644 +index ac9287f9673254494fb8d751346563daee23af77..852751ed9a165d7a1a12c8c26c1bcf94f06430ae 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -73,7 +73,6 @@ CONFIG_INET=y @@ -164202,10 +164095,10 @@ index ac9287f..852751e 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From 037a9e0fd0cb7eeb947bb4dbff674833419dd7f7 Mon Sep 17 00:00:00 2001 +From c78f26209947db049f7cce43e38ec2b459755041 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 5 Apr 2016 13:01:54 +0100 -Subject: [PATCH 235/251] BCM270X_DT: Add dpi24 overlay +Subject: [PATCH 234/398] BCM270X_DT: Add dpi24 overlay Signed-off-by: Phil Elwell --- @@ -164216,7 +164109,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/dpi24-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 239c6a1..688ba0b 100644 +index 239c6a12d85a334ab8f0d592a7a8d42152a65dd2..688ba0bfec5777558b99fe6416dcc7a09b805981 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -15,6 +15,7 @@ endif @@ -164228,7 +164121,7 @@ index 239c6a1..688ba0b 100644 dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 9df71a4..1438908 100644 +index 9df71a4afa0f78ec1249a739ff2926e315f80189..1438908dfde5487ecacc25b5918861a589f9faa1 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -213,6 +213,14 @@ Params: gpiopin GPIO connected to the sensor's DATA output. @@ -164248,7 +164141,7 @@ index 9df71a4..1438908 100644 is the default on all except the Pi Zero which defaults to dwc2. diff --git a/arch/arm/boot/dts/overlays/dpi24-overlay.dts b/arch/arm/boot/dts/overlays/dpi24-overlay.dts new file mode 100644 -index 0000000..e4dbe40 +index 0000000000000000000000000000000000000000..e4dbe40218a008ef4028c1214740c3d6bc574724 --- /dev/null +++ b/arch/arm/boot/dts/overlays/dpi24-overlay.dts @@ -0,0 +1,31 @@ @@ -164284,183 +164177,10 @@ index 0000000..e4dbe40 + }; +}; -From 8e95bfba2bfc4186ee007176c9d2f7c42c369312 Mon Sep 17 00:00:00 2001 -From: DigitalDreamtime -Date: Thu, 14 Apr 2016 00:57:33 +0100 -Subject: [PATCH 236/251] Modify IQAudIO DAC+ ASoC driver to set card/dai - config from dt - -Add the ability to set the card name, dai name and dai stream name, from -dt config. - -Signed-off-by: DigitalDreamtime ---- - sound/soc/bcm/iqaudio-dac.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c -index a5eaa9e..b6b6dcf 100644 ---- a/sound/soc/bcm/iqaudio-dac.c -+++ b/sound/soc/bcm/iqaudio-dac.c -@@ -61,8 +61,6 @@ static struct snd_soc_ops snd_rpi_iqaudio_dac_ops = { - - static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { - { -- .name = "IQaudIO DAC", -- .stream_name = "IQaudIO DAC HiFi", - .cpu_dai_name = "bcm2708-i2s.0", - .codec_dai_name = "pcm512x-hifi", - .platform_name = "bcm2708-i2s.0", -@@ -76,7 +74,6 @@ static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { - - /* audio machine driver */ - static struct snd_soc_card snd_rpi_iqaudio_dac = { -- .name = "IQaudIODAC", - .owner = THIS_MODULE, - .dai_link = snd_rpi_iqaudio_dac_dai, - .num_links = ARRAY_SIZE(snd_rpi_iqaudio_dac_dai), -@@ -90,6 +87,7 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) - - if (pdev->dev.of_node) { - struct device_node *i2s_node; -+ struct snd_soc_card *card = &snd_rpi_iqaudio_dac; - struct snd_soc_dai_link *dai = &snd_rpi_iqaudio_dac_dai[0]; - i2s_node = of_parse_phandle(pdev->dev.of_node, - "i2s-controller", 0); -@@ -103,6 +101,15 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) - - digital_gain_0db_limit = !of_property_read_bool(pdev->dev.of_node, - "iqaudio,24db_digital_gain"); -+ if (of_property_read_string(pdev->dev.of_node, "card_name", -+ &card->name)) -+ card->name = "IQaudIODAC"; -+ if (of_property_read_string(pdev->dev.of_node, "dai_name", -+ &dai->name)) -+ dai->name = "IQaudIO DAC"; -+ if (of_property_read_string(pdev->dev.of_node, "dai_stream_name", -+ &dai->stream_name)) -+ dai->stream_name = "IQaudIO DAC HiFi"; - } - - ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); - -From 7ea9f79b042605984245d4a0387f0e667fdc947c Mon Sep 17 00:00:00 2001 -From: DigitalDreamtime -Date: Thu, 14 Apr 2016 01:00:58 +0100 -Subject: [PATCH 237/251] Add support for the Digital Dreamtime Akkordion music - player. - -Support the Digital Dreamtime Akkordion using the OEM IQAudIO DAC+ or -DACZero modules. Set ALSA card name, ("Akkordion"), from dt config. - -Signed-off-by: DigitalDreamtime ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 20 ++++++++++ - .../dts/overlays/akkordion-iqdacplus-overlay.dts | 46 ++++++++++++++++++++++ - 3 files changed, 67 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 688ba0b..6bd6048 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) - endif - - dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo -+dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo - dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo - dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo - dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 1438908..5d0887f 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -186,6 +186,26 @@ Params: cs SPI bus Chip Select (default 1) - www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt - - -+Name: akkordion-iqdacplus -+Info: Configures the Digital Dreamtime Akkordion Music Player (based on the -+ OEM IQAudIO DAC+ or DAC Zero module). -+Load: dtoverlay=akkordion-iqdacplus,= -+Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec -+ Digital volume control. Enable with -+ dtoverlay=akkordion-iqdacplus,24db_digital_gain -+ (The default behaviour is that the Digital -+ volume control is limited to a maximum of -+ 0dB. ie. it can attenuate but not provide -+ gain. For most users, this will be desired -+ as it will prevent clipping. By appending -+ the 24db_digital_gain parameter, the Digital -+ volume control will allow up to 24dB of -+ gain. If this parameter is enabled, it is the -+ responsibility of the user to ensure that -+ the Digital volume control is set to a value -+ that does not result in clipping/distortion!) -+ -+ - Name: at86rf233 - Info: Configures the Atmel AT86RF233 802.15.4 low-power WPAN transceiver, - connected to spi0.0 -diff --git a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts -new file mode 100644 -index 0000000..47c7664 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts -@@ -0,0 +1,46 @@ -+// Definitions for Digital Dreamtime Akkordion using IQaudIO DAC+ or DACZero -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&sound>; -+ frag0: __overlay__ { -+ compatible = "iqaudio,iqaudio-dac"; -+ card_name = "Akkordion"; -+ dai_name = "IQaudIO DAC"; -+ dai_stream_name = "IQaudIO DAC HiFi"; -+ i2s-controller = <&i2s>; -+ status = "okay"; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&i2s>; -+ __overlay__ { -+ status = "okay"; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&i2c1>; -+ __overlay__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ pcm5122@4c { -+ #sound-dai-cells = <0>; -+ compatible = "ti,pcm5122"; -+ reg = <0x4c>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; -+ }; -+}; - -From 2544f9707d98c5d4251e0d6792a5a40016adedcb Mon Sep 17 00:00:00 2001 +From 8cba741c4cb8f624c1af599ff8a0ecb41f76800c Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 238/251] Add Support for BoomBerry Audio boards +Subject: [PATCH 235/398] Add Support for BoomBerry Audio boards --- arch/arm/boot/dts/overlays/Makefile | 2 + @@ -164480,11 +164200,11 @@ Subject: [PATCH 238/251] Add Support for BoomBerry Audio boards create mode 100644 sound/soc/bcm/boomberry-digi.c diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 6bd6048..4842dc1 100644 +index 688ba0bfec5777558b99fe6416dcc7a09b805981..04a9fce6889dbfecaf9471d96e0c695bc8b774d7 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -16,6 +16,8 @@ dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo - dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo +@@ -15,6 +15,8 @@ endif + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo +dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo @@ -164493,10 +164213,10 @@ index 6bd6048..4842dc1 100644 dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 5d0887f..eb5fc04 100644 +index 1438908dfde5487ecacc25b5918861a589f9faa1..2b6fb4f94fe54d0de499bfd93857e1cbd06b0a10 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README -@@ -225,6 +225,32 @@ Load: dtoverlay=bmp085_i2c-sensor +@@ -205,6 +205,32 @@ Load: dtoverlay=bmp085_i2c-sensor Params: @@ -164531,7 +164251,7 @@ index 5d0887f..eb5fc04 100644 Also sometimes found with the part number(s) AM230x. diff --git a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts new file mode 100644 -index 0000000..0f7c9b0 +index 0000000000000000000000000000000000000000..0f7c9b0bfdb7d1527cb474137c9a8e65b92cff4e --- /dev/null +++ b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts @@ -0,0 +1,43 @@ @@ -164580,7 +164300,7 @@ index 0000000..0f7c9b0 +}; diff --git a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts new file mode 100644 -index 0000000..a86e1d0 +index 0000000000000000000000000000000000000000..a86e1d0750d70854fbd1c1ca7574d1b262ea3aa7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts @@ -0,0 +1,39 @@ @@ -164624,7 +164344,7 @@ index 0000000..a86e1d0 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 5a8ab1e..84ec380 100644 +index 5a8ab1e8fe39daf100a8b9d25269cb45bf22df78..84ec3807f16496c74a0d5483da7703f21dd5bcb7 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -853,6 +853,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m @@ -164637,7 +164357,7 @@ index 5a8ab1e..84ec380 100644 CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 852751e..603ba04 100644 +index 852751ed9a165d7a1a12c8c26c1bcf94f06430ae..603ba0493321e494ca2a127657cee3f85a0bb04d 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -845,6 +845,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m @@ -164650,7 +164370,7 @@ index 852751e..603ba04 100644 CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 1a3f826..3383381 100644 +index 1a3f8264403d64690fef60d41df38d21d3eb6030..3383381122d9c9f77b98a1d83d4e9bd3df16b82f 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -50,6 +50,20 @@ config SND_BCM2708_SOC_RPI_PROTO @@ -164675,7 +164395,7 @@ index 1a3f826..3383381 100644 tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index b21e11e..b04b0d2 100644 +index b21e11ee36e17a29bfae9c4eda78f73ca9c23d48..b04b0d2ea8d31d6d528d08ff8df11b80182676ef 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -8,6 +8,8 @@ snd-soc-hifiberry-dac-objs := hifiberry_dac.o @@ -164698,7 +164418,7 @@ index b21e11e..b04b0d2 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/boomberry-dac.c b/sound/soc/bcm/boomberry-dac.c new file mode 100644 -index 0000000..08845ad +index 0000000000000000000000000000000000000000..08845ad14dc1c330626491762502036dd4cf0de9 --- /dev/null +++ b/sound/soc/bcm/boomberry-dac.c @@ -0,0 +1,163 @@ @@ -164867,7 +164587,7 @@ index 0000000..08845ad +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/bcm/boomberry-digi.c b/sound/soc/bcm/boomberry-digi.c new file mode 100644 -index 0000000..3d5b5ff +index 0000000000000000000000000000000000000000..3d5b5ff26f9b10648d308d489693407e6e7e7ac7 --- /dev/null +++ b/sound/soc/bcm/boomberry-digi.c @@ -0,0 +1,215 @@ @@ -165087,10 +164807,10 @@ index 0000000..3d5b5ff +MODULE_DESCRIPTION("ASoC Driver for BoomBerry PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From e3ea2e74ce1c734d3bbfd1270e8934cb3de80431 Mon Sep 17 00:00:00 2001 +From d9e9e97eb465977da36ed86f9672025a785e4f41 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Fri, 8 Apr 2016 00:06:00 +0100 -Subject: [PATCH 239/251] Add support for mcp7940x family of RTC +Subject: [PATCH 236/398] Add support for mcp7940x family of RTC --- arch/arm/boot/dts/overlays/README | 2 ++ @@ -165098,10 +164818,10 @@ Subject: [PATCH 239/251] Add support for mcp7940x family of RTC 2 files changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index eb5fc04..6a62e6f 100644 +index 2b6fb4f94fe54d0de499bfd93857e1cbd06b0a10..ea6b816057a05281380a0532fa1f574af35a7a6c 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README -@@ -435,6 +435,8 @@ Params: ds1307 Select the DS1307 device +@@ -415,6 +415,8 @@ Params: ds1307 Select the DS1307 device ds3231 Select the DS3231 device @@ -165111,7 +164831,7 @@ index eb5fc04..6a62e6f 100644 pcf2127 Select the PCF2127 device diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -index eecec16..4065647 100644 +index eecec16461c696d3c6885bc7b346b2f5f1f58670..40656474dfc16505433221a745c1d129c2737399 100644 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts @@ -23,6 +23,11 @@ @@ -165135,10 +164855,183 @@ index eecec16..4065647 100644 pcf2127 = <&pcf2127>,"status"; pcf8523 = <&pcf8523>,"status"; -From a10d74e309c02ad451678e59c320d62208944605 Mon Sep 17 00:00:00 2001 +From deba9c0271aeb002cf081496ea6affc1e3fc4bff Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Thu, 14 Apr 2016 00:57:33 +0100 +Subject: [PATCH 237/398] Modify IQAudIO DAC+ ASoC driver to set card/dai + config from dt + +Add the ability to set the card name, dai name and dai stream name, from +dt config. + +Signed-off-by: DigitalDreamtime +--- + sound/soc/bcm/iqaudio-dac.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c +index a5eaa9ee0994f3a8e89179bf51328a3f92cef316..b6b6dcf6e5a420d2c39d220b91928cd8ca832de7 100644 +--- a/sound/soc/bcm/iqaudio-dac.c ++++ b/sound/soc/bcm/iqaudio-dac.c +@@ -61,8 +61,6 @@ static struct snd_soc_ops snd_rpi_iqaudio_dac_ops = { + + static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { + { +- .name = "IQaudIO DAC", +- .stream_name = "IQaudIO DAC HiFi", + .cpu_dai_name = "bcm2708-i2s.0", + .codec_dai_name = "pcm512x-hifi", + .platform_name = "bcm2708-i2s.0", +@@ -76,7 +74,6 @@ static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { + + /* audio machine driver */ + static struct snd_soc_card snd_rpi_iqaudio_dac = { +- .name = "IQaudIODAC", + .owner = THIS_MODULE, + .dai_link = snd_rpi_iqaudio_dac_dai, + .num_links = ARRAY_SIZE(snd_rpi_iqaudio_dac_dai), +@@ -90,6 +87,7 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) + + if (pdev->dev.of_node) { + struct device_node *i2s_node; ++ struct snd_soc_card *card = &snd_rpi_iqaudio_dac; + struct snd_soc_dai_link *dai = &snd_rpi_iqaudio_dac_dai[0]; + i2s_node = of_parse_phandle(pdev->dev.of_node, + "i2s-controller", 0); +@@ -103,6 +101,15 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) + + digital_gain_0db_limit = !of_property_read_bool(pdev->dev.of_node, + "iqaudio,24db_digital_gain"); ++ if (of_property_read_string(pdev->dev.of_node, "card_name", ++ &card->name)) ++ card->name = "IQaudIODAC"; ++ if (of_property_read_string(pdev->dev.of_node, "dai_name", ++ &dai->name)) ++ dai->name = "IQaudIO DAC"; ++ if (of_property_read_string(pdev->dev.of_node, "dai_stream_name", ++ &dai->stream_name)) ++ dai->stream_name = "IQaudIO DAC HiFi"; + } + + ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); + +From b37dc31bb7feee22248f89ff3648c8373c4a698a Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Thu, 14 Apr 2016 01:00:58 +0100 +Subject: [PATCH 238/398] Add support for the Digital Dreamtime Akkordion music + player. + +Support the Digital Dreamtime Akkordion using the OEM IQAudIO DAC+ or +DACZero modules. Set ALSA card name, ("Akkordion"), from dt config. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 20 ++++++++++ + .../dts/overlays/akkordion-iqdacplus-overlay.dts | 46 ++++++++++++++++++++++ + 3 files changed, 67 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 04a9fce6889dbfecaf9471d96e0c695bc8b774d7..4842dc1d5c68fa61505fd16dab9709a10ee417eb 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + endif + + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo + dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index ea6b816057a05281380a0532fa1f574af35a7a6c..6a62e6fdb073aa8daf86828b4b308d1ca6259b3f 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -186,6 +186,26 @@ Params: cs SPI bus Chip Select (default 1) + www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt + + ++Name: akkordion-iqdacplus ++Info: Configures the Digital Dreamtime Akkordion Music Player (based on the ++ OEM IQAudIO DAC+ or DAC Zero module). ++Load: dtoverlay=akkordion-iqdacplus,= ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ dtoverlay=akkordion-iqdacplus,24db_digital_gain ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24db_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) ++ ++ + Name: at86rf233 + Info: Configures the Atmel AT86RF233 802.15.4 low-power WPAN transceiver, + connected to spi0.0 +diff --git a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..47c7664f7f058436b41a89ded35a1d0197b0f187 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +@@ -0,0 +1,46 @@ ++// Definitions for Digital Dreamtime Akkordion using IQaudIO DAC+ or DACZero ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&sound>; ++ frag0: __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ card_name = "Akkordion"; ++ dai_name = "IQaudIO DAC"; ++ dai_stream_name = "IQaudIO DAC HiFi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4c { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4c>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; ++ }; ++}; + +From baab978348c571c6111981464540e64a50f75cdd Mon Sep 17 00:00:00 2001 From: Jeremy McDermond Date: Thu, 14 Apr 2016 09:39:20 -0700 -Subject: [PATCH 240/251] bcm2709_defconfig: Fix typo on BoomBerry +Subject: [PATCH 239/398] bcm2709_defconfig: Fix typo on BoomBerry configuration directive The BoomBerry configuration directive in bcm2709_defconfig has a typo. @@ -165147,7 +165040,7 @@ The BoomBerry configuration directive in bcm2709_defconfig has a typo. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 84ec380..7353332 100644 +index 84ec3807f16496c74a0d5483da7703f21dd5bcb7..73533320f3b14bbe2ebe571b800a5c0df57a96a9 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -854,7 +854,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m @@ -165160,10 +165053,10 @@ index 84ec380..7353332 100644 CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m -From eb62c144a47bbc7d0015d65629fad05884aa654b Mon Sep 17 00:00:00 2001 +From d1da21d6464c5ae52c7e1bea7406aba0e3784bfc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 Apr 2016 10:48:39 +0100 -Subject: [PATCH 241/251] boomberry-dac: Adjust for ALSA API change +Subject: [PATCH 240/398] boomberry-dac: Adjust for ALSA API change As of 4.4, snd_soc_limit_volume now takes a struct snd_soc_card * rather than a struct snd_soc_codec *. @@ -165174,7 +165067,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/bcm/boomberry-dac.c b/sound/soc/bcm/boomberry-dac.c -index 08845ad..8d39de2 100644 +index 08845ad14dc1c330626491762502036dd4cf0de9..8d39de24289d875cebd5455f28aafe3e24132ab5 100644 --- a/sound/soc/bcm/boomberry-dac.c +++ b/sound/soc/bcm/boomberry-dac.c @@ -40,9 +40,8 @@ static int snd_rpi_boomberry_dac_init(struct snd_soc_pcm_runtime *rtd) @@ -165189,10 +165082,10 @@ index 08845ad..8d39de2 100644 dev_warn(card->dev, "Failed to set volume limit: %d\n", ret); } -From d113d5842f6896cdcdd7c7c2e5733fe0ed0a5b06 Mon Sep 17 00:00:00 2001 +From ecdf2daf80788264187639a67469a967e8f22c62 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 17 Apr 2016 04:44:47 -0700 -Subject: [PATCH 242/251] vmcs: Remove unused sm_cache_map_vector definition +Subject: [PATCH 241/398] vmcs: Remove unused sm_cache_map_vector definition (#1411) The code using it also ifdef'ed with 0, anyyd gcc 6 @@ -165208,7 +165101,7 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+) diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 5d16e35..1db6716 100644 +index 5d16e356bbdd275856d43f75d00ef6c086dbb09e..1db6716c2c0c8b2013203391501f92d09db258af 100644 --- a/drivers/char/broadcom/vc_sm/vmcs_sm.c +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c @@ -197,12 +197,14 @@ struct SM_STATE_T { @@ -165227,10 +165120,10 @@ index 5d16e35..1db6716 100644 /* ---- Private Function Prototypes -------------------------------------- */ -From 8842f5b24445286359d13b8f85230384a361f26b Mon Sep 17 00:00:00 2001 +From 88d26a9b92815b37d8992e8ca3b768794fe7e0a7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 18 Apr 2016 11:56:53 +0100 -Subject: [PATCH 243/251] scripts/mkknlimg: Append a trailer for all input +Subject: [PATCH 242/398] scripts/mkknlimg: Append a trailer for all input Now that the firmware assumes an unsigned kernel is DT-capable, it is helpful to be able to mark a kernel as being non-DT-capable. @@ -165241,7 +165134,7 @@ Signed-off-by: Phil Elwell 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/mkknlimg b/scripts/mkknlimg -index 005f404..78c5845 100755 +index 005f404f572029822bb5bea32774a7c26d7141e5..78c5845d2f01deb04b477327d83fa60624f87f98 100755 --- a/scripts/mkknlimg +++ b/scripts/mkknlimg @@ -98,7 +98,7 @@ my $append_trailer; @@ -165293,41 +165186,17 @@ index 005f404..78c5845 100755 push @atoms, [ '283X', pack('V', $is_283x) ]; push @atoms, [ '283x', pack('V', $is_283x && !$is_270x) ]; -From 4713de1914febfd095de6c68d7152c10ba60a475 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 19 Apr 2016 13:55:29 +0100 -Subject: [PATCH 244/251] scripts/dtc: Only emit local fixups for overlays - -Signed-off-by: Phil Elwell ---- - scripts/dtc/checks.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index 2b3b3a7..fedfa79 100644 ---- a/scripts/dtc/checks.c -+++ b/scripts/dtc/checks.c -@@ -514,7 +514,7 @@ static void fixup_phandle_references(struct check *c, struct node *dt, - } - - /* if it's a local reference, we need to record it */ -- if (symbol_fixup_support) { -+ if (symbol_fixup_support && dt->is_plugin) { - - /* allocate a new local fixup entry */ - fe = xmalloc(sizeof(*fe)); - -From 8f691a8d8e5dd4a0e48f3fcc766936215a0efb27 Mon Sep 17 00:00:00 2001 +From 68c20102fa4aa0b58a8ac492976e9d24a2b0f222 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 19 Apr 2016 12:57:52 +0100 -Subject: [PATCH 245/251] bcm2835_thermal: Don't report unsupported trip type +Subject: [PATCH 243/398] bcm2835_thermal: Don't report unsupported trip type --- drivers/thermal/bcm2835-thermal.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c -index 08d8dc7..c63fb9f 100644 +index 08d8dc7c5d005384660f90bc9cb541b83c032411..c63fb9f9d143e19612a18fe530c7b2b3518a22a4 100644 --- a/drivers/thermal/bcm2835-thermal.c +++ b/drivers/thermal/bcm2835-thermal.c @@ -49,38 +49,8 @@ static int bcm2835_thermal_get_temp(struct thermal_zone_device *tz, @@ -165389,10 +165258,34 @@ index 08d8dc7..c63fb9f 100644 if (IS_ERR(tz)) { dev_err(&pdev->dev, "Failed to register the thermal device\n"); -From f92bda16cd790cb612920ed266d19c6ae2620c22 Mon Sep 17 00:00:00 2001 +From ab0b99ca61dfb9be9a1b9c666df5415dca8d65f4 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 19 Apr 2016 13:55:29 +0100 +Subject: [PATCH 244/398] scripts/dtc: Only emit local fixups for overlays + +Signed-off-by: Phil Elwell +--- + scripts/dtc/checks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c +index 2b3b3a7aa70261a8206ba102bccea20d96c7fbfb..fedfa793b05779097f2b78d00aac0eebff4a4d0d 100644 +--- a/scripts/dtc/checks.c ++++ b/scripts/dtc/checks.c +@@ -514,7 +514,7 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + } + + /* if it's a local reference, we need to record it */ +- if (symbol_fixup_support) { ++ if (symbol_fixup_support && dt->is_plugin) { + + /* allocate a new local fixup entry */ + fe = xmalloc(sizeof(*fe)); + +From e717e1265b2577b13e5b77d98fb931e3043db6a9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 19 Apr 2016 16:08:35 +0200 -Subject: [PATCH 246/251] bcm2835: do not require substream for accessing chmap +Subject: [PATCH 245/398] bcm2835: do not require substream for accessing chmap ctl Fixes alsasctl store/restore operation. @@ -165401,7 +165294,7 @@ Fixes alsasctl store/restore operation. 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index e930718..8b855f9 100755 +index e9307186b082fc292af79f48ca71e3cd6ce8c99c..8b855f9ded88e0d297fd770edffa9835fa9e6b00 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -489,8 +489,6 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, @@ -165443,10 +165336,10 @@ index e930718..8b855f9 100755 } -From 2c9ca7ae6ac79df824b94224936d378d725b7bb7 Mon Sep 17 00:00:00 2001 +From 16c2a012bdf41eb88c8e32fa2003544f6e2f02aa Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 19 Apr 2016 16:29:41 +0200 -Subject: [PATCH 247/251] bcm2835: add fallback channel layouts if channel map +Subject: [PATCH 246/398] bcm2835: add fallback channel layouts if channel map API is not used Should be more useful than just forcing stereo. @@ -165465,7 +165358,7 @@ at a later point. 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 8ecd2d7..9371073 100755 +index 8ecd2d735fbf94b9018c89c705a68750aad5bf97..93710735d5d3e2930ec9cac0fe596c3f08602d64 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -598,7 +598,16 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -165487,17 +165380,17 @@ index 8ecd2d7..9371073 100755 alsa_stream->chip->map_channels[i] = i; } -From a9670f6cc4cd89aa953d6240b037ebfa161e552b Mon Sep 17 00:00:00 2001 +From b5f917cd568807dba4e4bf92fa9a678fd970efd7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 19 Apr 2016 16:38:03 +0200 -Subject: [PATCH 248/251] bcm2835: log which channel map is set +Subject: [PATCH 247/398] bcm2835: log which channel map is set --- sound/arm/bcm2835-vchiq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 9371073..876986d 100755 +index 93710735d5d3e2930ec9cac0fe596c3f08602d64..876986dc2733085769e77a3858134d8409b7eabc 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -596,8 +596,11 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -165522,10 +165415,10 @@ index 9371073..876986d 100755 m.u.config.channels = channels; m.u.config.samplerate = samplerate; -From 9135f5620348b62310684d40896ae21d993a563d Mon Sep 17 00:00:00 2001 +From 44f453360ee571cc2189c3a3d4b4966837a557de Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 13:49:32 +0100 -Subject: [PATCH 249/251] vchiq_arm: Add completion records under the mutex +Subject: [PATCH 248/398] vchiq_arm: Add completion records under the mutex An issue was observed when flushing openmax components which generate a large number of messages returning @@ -165544,7 +165437,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c -index a5cc385..4886236 100644 +index a5cc385cc25ada02fc45af5d5ca68cd6d2687850..48862365fb2cc5573793cd37599993654972fb86 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -210,6 +210,8 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -165588,10 +165481,10 @@ index a5cc385..4886236 100644 return VCHIQ_SUCCESS; -From 14ba3016c66394dca226fc4fd66b2fd2e677497c Mon Sep 17 00:00:00 2001 +From cbd619421691a04c39ecafaaaa8a7ec5de58eade Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 16:07:15 +0100 -Subject: [PATCH 250/251] config: Add DRM_UDL module +Subject: [PATCH 249/398] config: Add DRM_UDL module See: https://github.com/raspberrypi/linux/issues/1422 @@ -165602,7 +165495,7 @@ Signed-off-by: Phil Elwell 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 7353332..7788ecb 100644 +index 73533320f3b14bbe2ebe571b800a5c0df57a96a9..7788ecb4b42dcf0c296fe3a6cc84acf297638fcc 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -814,6 +814,7 @@ CONFIG_VIDEO_TW9906=m @@ -165627,7 +165520,7 @@ index 7353332..7788ecb 100644 CONFIG_SND_BCM2708_SOC_RASPIDAC3=m CONFIG_SND_SOC_ADAU1701=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 603ba04..5b8b19a 100644 +index 603ba0493321e494ca2a127657cee3f85a0bb04d..5b8b19a09dd05ee19199764b8169b5dce83f158d 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -806,6 +806,7 @@ CONFIG_VIDEO_TW9906=m @@ -165652,10 +165545,10 @@ index 603ba04..5b8b19a 100644 CONFIG_SND_BCM2708_SOC_RASPIDAC3=m CONFIG_SND_SOC_ADAU1701=m -From a114d1bd49a30b9b3aa31d4b18069986e0335e12 Mon Sep 17 00:00:00 2001 +From ccc74d920e2e7a2edf247b8c6b18852c233a1cc2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 15:44:14 +0100 -Subject: [PATCH 251/251] bcm2835-i2s: Reduce the TX DREQ threshold +Subject: [PATCH 250/398] bcm2835-i2s: Reduce the TX DREQ threshold TX FIFO overrun is thought to be the cause of channel swapping, so reducing the DREQ threshold seems reasonable and appears to be @@ -165669,7 +165562,7 @@ Signed-off-by: Phil Elwell 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 04c1d13..aedb01f 100644 +index 04c1d1310d34527e9d57148a4b70ca73cf99e3a8..aedb01fe87112cb5c56027ed0a7eac9d5991765b 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -555,15 +555,22 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, @@ -165702,3 +165595,17281 @@ index 04c1d13..aedb01f 100644 /* Clear FIFOs */ bcm2835_i2s_clear_fifos(dev, true, true); + +From 22014c375350e4baefe2b636aa1e8b501d417d03 Mon Sep 17 00:00:00 2001 +From: Vladimir Zapolskiy +Date: Sun, 6 Mar 2016 03:21:35 +0200 +Subject: [PATCH 251/398] clk: bcm2835: fix check of error code returned by + devm_ioremap_resource() + +The change fixes potential oops while accessing iomem on invalid +address, if devm_ioremap_resource() fails due to some reason. + +The devm_ioremap_resource() function returns ERR_PTR() and never +returns NULL, which makes useless a following check for NULL. + +Signed-off-by: Vladimir Zapolskiy +Fixes: 5e63dcc74b30 ("clk: bcm2835: Add a driver for the auxiliary peripheral clock gates") +Reviewed-by: Eric Anholt +Signed-off-by: Stephen Boyd +--- + drivers/clk/bcm/clk-bcm2835-aux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835-aux.c b/drivers/clk/bcm/clk-bcm2835-aux.c +index e4f89e28b5ecf5a88bbbdc50111904beb470b2a6..3a177ade6e6cc71d84337504df37543227bcb74f 100644 +--- a/drivers/clk/bcm/clk-bcm2835-aux.c ++++ b/drivers/clk/bcm/clk-bcm2835-aux.c +@@ -38,8 +38,8 @@ static int bcm2835_aux_clk_probe(struct platform_device *pdev) + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + reg = devm_ioremap_resource(dev, res); +- if (!reg) +- return -ENODEV; ++ if (IS_ERR(reg)) ++ return PTR_ERR(reg); + + onecell = devm_kmalloc(dev, sizeof(*onecell), GFP_KERNEL); + if (!onecell) + +From 1877431a2ff57c3fc174cb58d8f6618ba7a41c61 Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Sun, 6 Dec 2015 17:22:46 +0100 +Subject: [PATCH 252/398] clk: bcm2835: add a round up ability to the clock + divisor + +Make bcm2835_clock_choose_div to optionally round up the chosen MASH divisor +so that the resulting average rate will not be higher than the requested one. + +Signed-off-by: Remi Pommarel +Reviewed-by: Eric Anholt +Signed-off-by: Michael Turquette +(cherry picked from commit 9c95b32ca09364e4687b72c4e17b78dc1c420026) +--- + drivers/clk/bcm/clk-bcm2835.c | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 6029313aa99586b3088de8ca82e66dd0e0752b70..1d0594f9b24ea8249511560fb55e06aaca1e4132 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1164,22 +1164,24 @@ static int bcm2835_clock_is_on(struct clk_hw *hw) + + static u32 bcm2835_clock_choose_div(struct clk_hw *hw, + unsigned long rate, +- unsigned long parent_rate) ++ unsigned long parent_rate, ++ bool round_up) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + const struct bcm2835_clock_data *data = clock->data; +- u32 unused_frac_mask = GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0); ++ u32 unused_frac_mask = ++ GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1; + u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS; ++ u64 rem; + u32 div; + +- do_div(temp, rate); ++ rem = do_div(temp, rate); + div = temp; + +- /* Round and mask off the unused bits */ +- if (unused_frac_mask != 0) { +- div += unused_frac_mask >> 1; +- div &= ~unused_frac_mask; +- } ++ /* Round up and mask off the unused bits */ ++ if (round_up && ((div & unused_frac_mask) != 0 || rem != 0)) ++ div += unused_frac_mask + 1; ++ div &= ~unused_frac_mask; + + /* clamp to min divider of 1 */ + div = max_t(u32, div, 1 << CM_DIV_FRAC_BITS); +@@ -1219,7 +1221,7 @@ static long bcm2835_clock_round_rate(struct clk_hw *hw, + unsigned long *parent_rate) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); +- u32 div = bcm2835_clock_choose_div(hw, rate, *parent_rate); ++ u32 div = bcm2835_clock_choose_div(hw, rate, *parent_rate, false); + + return bcm2835_clock_rate_from_divisor(clock, *parent_rate, div); + } +@@ -1288,7 +1290,7 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct bcm2835_cprman *cprman = clock->cprman; + const struct bcm2835_clock_data *data = clock->data; +- u32 div = bcm2835_clock_choose_div(hw, rate, parent_rate); ++ u32 div = bcm2835_clock_choose_div(hw, rate, parent_rate, false); + + cprman_write(cprman, data->div_reg, div); + + +From 4a9baf3f4ece64f41c123cd599e9c1abbf9be83a Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Sun, 6 Dec 2015 17:22:47 +0100 +Subject: [PATCH 253/398] clk: bcm2835: Support for clock parent selection + +Some bcm2835 clocks used by hardware (like "PWM" or "H264") can have multiple +parent clocks. These clocks divide the rate of a parent which can be selected by +setting the proper bits in the clock control register. + +Previously all these parents where handled by a mux clock. But a mux clock +cannot be used because updating clock control register to select parent needs a +password to be xor'd with the parent index. + +This patch get rid of mux clock and make these clocks handle their own parent, +allowing them to select the one to use. + +Signed-off-by: Remi Pommarel +Reviewed-by: Eric Anholt +Signed-off-by: Michael Turquette +(cherry picked from commit 6d18b8adbe679b5947aa822b676efff230acc5f6) +--- + drivers/clk/bcm/clk-bcm2835.c | 122 ++++++++++++++++++++++++++---------------- + 1 file changed, 77 insertions(+), 45 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 1d0594f9b24ea8249511560fb55e06aaca1e4132..529e94a59e6d34df2778b3adcfef76026db3bb8a 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1216,16 +1216,6 @@ static long bcm2835_clock_rate_from_divisor(struct bcm2835_clock *clock, + return temp; + } + +-static long bcm2835_clock_round_rate(struct clk_hw *hw, +- unsigned long rate, +- unsigned long *parent_rate) +-{ +- struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); +- u32 div = bcm2835_clock_choose_div(hw, rate, *parent_rate, false); +- +- return bcm2835_clock_rate_from_divisor(clock, *parent_rate, div); +-} +- + static unsigned long bcm2835_clock_get_rate(struct clk_hw *hw, + unsigned long parent_rate) + { +@@ -1297,13 +1287,75 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + return 0; + } + ++static int bcm2835_clock_determine_rate(struct clk_hw *hw, ++ struct clk_rate_request *req) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct clk_hw *parent, *best_parent = NULL; ++ unsigned long rate, best_rate = 0; ++ unsigned long prate, best_prate = 0; ++ size_t i; ++ u32 div; ++ ++ /* ++ * Select parent clock that results in the closest but lower rate ++ */ ++ for (i = 0; i < clk_hw_get_num_parents(hw); ++i) { ++ parent = clk_hw_get_parent_by_index(hw, i); ++ if (!parent) ++ continue; ++ prate = clk_hw_get_rate(parent); ++ div = bcm2835_clock_choose_div(hw, req->rate, prate, true); ++ rate = bcm2835_clock_rate_from_divisor(clock, prate, div); ++ if (rate > best_rate && rate <= req->rate) { ++ best_parent = parent; ++ best_prate = prate; ++ best_rate = rate; ++ } ++ } ++ ++ if (!best_parent) ++ return -EINVAL; ++ ++ req->best_parent_hw = best_parent; ++ req->best_parent_rate = best_prate; ++ ++ req->rate = best_rate; ++ ++ return 0; ++} ++ ++static int bcm2835_clock_set_parent(struct clk_hw *hw, u8 index) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct bcm2835_cprman *cprman = clock->cprman; ++ const struct bcm2835_clock_data *data = clock->data; ++ u8 src = (index << CM_SRC_SHIFT) & CM_SRC_MASK; ++ ++ cprman_write(cprman, data->ctl_reg, src); ++ return 0; ++} ++ ++static u8 bcm2835_clock_get_parent(struct clk_hw *hw) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct bcm2835_cprman *cprman = clock->cprman; ++ const struct bcm2835_clock_data *data = clock->data; ++ u32 src = cprman_read(cprman, data->ctl_reg); ++ ++ return (src & CM_SRC_MASK) >> CM_SRC_SHIFT; ++} ++ ++ + static const struct clk_ops bcm2835_clock_clk_ops = { + .is_prepared = bcm2835_clock_is_on, + .prepare = bcm2835_clock_on, + .unprepare = bcm2835_clock_off, + .recalc_rate = bcm2835_clock_get_rate, + .set_rate = bcm2835_clock_set_rate, +- .round_rate = bcm2835_clock_round_rate, ++ .determine_rate = bcm2835_clock_determine_rate, ++ .set_parent = bcm2835_clock_set_parent, ++ .get_parent = bcm2835_clock_get_parent, + }; + + static int bcm2835_vpu_clock_is_on(struct clk_hw *hw) +@@ -1319,7 +1371,9 @@ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { + .is_prepared = bcm2835_vpu_clock_is_on, + .recalc_rate = bcm2835_clock_get_rate, + .set_rate = bcm2835_clock_set_rate, +- .round_rate = bcm2835_clock_round_rate, ++ .determine_rate = bcm2835_clock_determine_rate, ++ .set_parent = bcm2835_clock_set_parent, ++ .get_parent = bcm2835_clock_get_parent, + }; + + static struct clk *bcm2835_register_pll(struct bcm2835_cprman *cprman, +@@ -1413,45 +1467,23 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + { + struct bcm2835_clock *clock; + struct clk_init_data init; +- const char *parent; ++ const char *parents[1 << CM_SRC_BITS]; ++ size_t i; + + /* +- * Most of the clock generators have a mux field, so we +- * instantiate a generic mux as our parent to handle it. ++ * Replace our "xosc" references with the oscillator's ++ * actual name. + */ +- if (data->num_mux_parents) { +- const char *parents[1 << CM_SRC_BITS]; +- int i; +- +- parent = devm_kasprintf(cprman->dev, GFP_KERNEL, +- "mux_%s", data->name); +- if (!parent) +- return NULL; +- +- /* +- * Replace our "xosc" references with the oscillator's +- * actual name. +- */ +- for (i = 0; i < data->num_mux_parents; i++) { +- if (strcmp(data->parents[i], "xosc") == 0) +- parents[i] = cprman->osc_name; +- else +- parents[i] = data->parents[i]; +- } +- +- clk_register_mux(cprman->dev, parent, +- parents, data->num_mux_parents, +- CLK_SET_RATE_PARENT, +- cprman->regs + data->ctl_reg, +- CM_SRC_SHIFT, CM_SRC_BITS, +- 0, &cprman->regs_lock); +- } else { +- parent = data->parents[0]; ++ for (i = 0; i < data->num_mux_parents; i++) { ++ if (strcmp(data->parents[i], "xosc") == 0) ++ parents[i] = cprman->osc_name; ++ else ++ parents[i] = data->parents[i]; + } + + memset(&init, 0, sizeof(init)); +- init.parent_names = &parent; +- init.num_parents = 1; ++ init.parent_names = parents; ++ init.num_parents = data->num_mux_parents; + init.name = data->name; + init.flags = CLK_IGNORE_UNUSED; + + +From 8d183fbe1acc384ae75cacaed472fea0f532590e Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Sun, 6 Dec 2015 17:22:48 +0100 +Subject: [PATCH 254/398] clk: bcm2835: Add PWM clock support + +Register the pwm clock for bcm2835. + +Signed-off-by: Remi Pommarel +Reviewed-by: Eric Anholt +Signed-off-by: Michael Turquette +(cherry picked from commit cfbab8fbab9c330aca963095a439c451ac97c0dd) +--- + drivers/clk/bcm/clk-bcm2835.c | 13 +++++++++++++ + include/dt-bindings/clock/bcm2835.h | 3 ++- + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 529e94a59e6d34df2778b3adcfef76026db3bb8a..670ae1837b72c850cf2fcca75f52e67f8f2c0834 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -807,6 +807,16 @@ static const struct bcm2835_clock_data bcm2835_clock_emmc_data = { + .frac_bits = 8, + }; + ++static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { ++ .name = "pwm", ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), ++ .parents = bcm2835_clock_per_parents, ++ .ctl_reg = CM_PWMCTL, ++ .div_reg = CM_PWMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++}; ++ + struct bcm2835_pll { + struct clk_hw hw; + struct bcm2835_cprman *cprman; +@@ -1601,6 +1611,9 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + cprman->regs + CM_PERIICTL, CM_GATE_BIT, + 0, &cprman->regs_lock); + ++ clks[BCM2835_CLOCK_PWM] = ++ bcm2835_register_clock(cprman, &bcm2835_clock_pwm_data); ++ + return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, + &cprman->onecell); + } +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index d323efac7edf0610fa54d882db26608227bce477..61f1d20c2a6735f2b90c69bcbc68b8a759e3981a 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -43,5 +43,6 @@ + #define BCM2835_CLOCK_TSENS 27 + #define BCM2835_CLOCK_EMMC 28 + #define BCM2835_CLOCK_PERI_IMAGE 29 ++#define BCM2835_CLOCK_PWM 30 + +-#define BCM2835_CLOCK_COUNT 30 ++#define BCM2835_CLOCK_COUNT 31 + +From ee174c95abc84c434a976b2bcc31c3434ae7d85b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 22 Dec 2015 20:13:08 +0000 +Subject: [PATCH 255/398] clk: bcm2835: added missing clock register + definitions + +Added missing CTRL and DIV clock register definitions for: +PCM, SLIM, TCNT, TEC, TD0, TD1 + +Register information taken from: +https://rawgit.com/msperl/rpi-registers/master/rpi-registers.html#CM +which extracted the information from the header files shared by +Broadcom/rpi foundation in this file: +http://www.broadcom.com/docs/support/videocore/Brcm_Android_ICS_Graphics_Stack.tar.gz + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Stephen Boyd +(cherry picked from commit 2103a2156119b30f5924af2a1094227954be4617) +--- + drivers/clk/bcm/clk-bcm2835.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 670ae1837b72c850cf2fcca75f52e67f8f2c0834..282ce03e7d4b52a20546506b95ff536cdf0b0097 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -88,10 +88,23 @@ + #define CM_HSMDIV 0x08c + #define CM_OTPCTL 0x090 + #define CM_OTPDIV 0x094 ++#define CM_PCMCTL 0x098 ++#define CM_PCMDIV 0x09c + #define CM_PWMCTL 0x0a0 + #define CM_PWMDIV 0x0a4 ++#define CM_SLIMCTL 0x0a8 ++#define CM_SLIMDIV 0x0ac + #define CM_SMICTL 0x0b0 + #define CM_SMIDIV 0x0b4 ++/* no definition for 0x0b8 and 0x0bc */ ++#define CM_TCNTCTL 0x0c0 ++#define CM_TCNTDIV 0x0c4 ++#define CM_TECCTL 0x0c8 ++#define CM_TECDIV 0x0cc ++#define CM_TD0CTL 0x0d0 ++#define CM_TD0DIV 0x0d4 ++#define CM_TD1CTL 0x0d8 ++#define CM_TD1DIV 0x0dc + #define CM_TSENSCTL 0x0e0 + #define CM_TSENSDIV 0x0e4 + #define CM_TIMERCTL 0x0e8 + +From f28a592bd09d389ca8638766b317264e0f82e69b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 11:39:21 +0000 +Subject: [PATCH 256/398] clk: bcm2835: correctly enable fractional clock + support + +The current driver calculates the clock divider with +fractional support enabled. + +But it does not enable fractional support in the +control register itself resulting in an integer only divider, +but in clk_set_rate responds back the fractionally divided +clock frequency. + +This patch enables fractional support in the control register +whenever there is a fractional bit set in the requested clock divider. + +Mash clock limits are are also handled for the PWM clock +applying the correct divider limits (2 and max_int) applicable to +basic fractional divider support (mash order of 1). + +It also adds locking to protect the read/modify/write cycle of +the register modification. + +Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the +audio domain clocks") + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 959ca92a3235fc4b17c1e18483fc390b3d612254) +--- + drivers/clk/bcm/clk-bcm2835.c | 45 +++++++++++++++++++++++++++++++++++++------ + 1 file changed, 39 insertions(+), 6 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 282ce03e7d4b52a20546506b95ff536cdf0b0097..2093e7e4aed63b79edac74d5dcceec402ed9f442 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -51,6 +51,7 @@ + #define CM_GNRICCTL 0x000 + #define CM_GNRICDIV 0x004 + # define CM_DIV_FRAC_BITS 12 ++# define CM_DIV_FRAC_MASK GENMASK(CM_DIV_FRAC_BITS - 1, 0) + + #define CM_VPUCTL 0x008 + #define CM_VPUDIV 0x00c +@@ -128,6 +129,7 @@ + # define CM_GATE BIT(CM_GATE_BIT) + # define CM_BUSY BIT(7) + # define CM_BUSYD BIT(8) ++# define CM_FRAC BIT(9) + # define CM_SRC_SHIFT 0 + # define CM_SRC_BITS 4 + # define CM_SRC_MASK 0xf +@@ -647,6 +649,7 @@ struct bcm2835_clock_data { + u32 frac_bits; + + bool is_vpu_clock; ++ bool is_mash_clock; + }; + + static const char *const bcm2835_clock_per_parents[] = { +@@ -828,6 +831,7 @@ static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { + .div_reg = CM_PWMDIV, + .int_bits = 12, + .frac_bits = 12, ++ .is_mash_clock = true, + }; + + struct bcm2835_pll { +@@ -1196,7 +1200,7 @@ static u32 bcm2835_clock_choose_div(struct clk_hw *hw, + GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1; + u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS; + u64 rem; +- u32 div; ++ u32 div, mindiv, maxdiv; + + rem = do_div(temp, rate); + div = temp; +@@ -1206,11 +1210,23 @@ static u32 bcm2835_clock_choose_div(struct clk_hw *hw, + div += unused_frac_mask + 1; + div &= ~unused_frac_mask; + +- /* clamp to min divider of 1 */ +- div = max_t(u32, div, 1 << CM_DIV_FRAC_BITS); +- /* clamp to the highest possible fractional divider */ +- div = min_t(u32, div, GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1, +- CM_DIV_FRAC_BITS - data->frac_bits)); ++ /* different clamping limits apply for a mash clock */ ++ if (data->is_mash_clock) { ++ /* clamp to min divider of 2 */ ++ mindiv = 2 << CM_DIV_FRAC_BITS; ++ /* clamp to the highest possible integer divider */ ++ maxdiv = (BIT(data->int_bits) - 1) << CM_DIV_FRAC_BITS; ++ } else { ++ /* clamp to min divider of 1 */ ++ mindiv = 1 << CM_DIV_FRAC_BITS; ++ /* clamp to the highest possible fractional divider */ ++ maxdiv = GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1, ++ CM_DIV_FRAC_BITS - data->frac_bits); ++ } ++ ++ /* apply the clamping limits */ ++ div = max_t(u32, div, mindiv); ++ div = min_t(u32, div, maxdiv); + + return div; + } +@@ -1304,9 +1320,26 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + struct bcm2835_cprman *cprman = clock->cprman; + const struct bcm2835_clock_data *data = clock->data; + u32 div = bcm2835_clock_choose_div(hw, rate, parent_rate, false); ++ u32 ctl; ++ ++ spin_lock(&cprman->regs_lock); ++ ++ /* ++ * Setting up frac support ++ * ++ * In principle it is recommended to stop/start the clock first, ++ * but as we set CLK_SET_RATE_GATE during registration of the ++ * clock this requirement should be take care of by the ++ * clk-framework. ++ */ ++ ctl = cprman_read(cprman, data->ctl_reg) & ~CM_FRAC; ++ ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0; ++ cprman_write(cprman, data->ctl_reg, ctl); + + cprman_write(cprman, data->div_reg, div); + ++ spin_unlock(&cprman->regs_lock); ++ + return 0; + } + + +From 29b78f5b5d5ed10a89cde1d66e7f7f6dc3ef260c Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 11:39:22 +0000 +Subject: [PATCH 257/398] clk: bcm2835: clean up coding style issues + +Fix all the checkpatch complaints for clk-bcm2835.c + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +(cherry picked from commit 6e1e60dacee7b32aef1468ea461b02e4c7a90a45) +--- + drivers/clk/bcm/clk-bcm2835.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 2093e7e4aed63b79edac74d5dcceec402ed9f442..f76adaa9c0e38183285202d373b8af1f04095b2b 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -12,9 +12,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + /** +@@ -299,7 +296,7 @@ + struct bcm2835_cprman { + struct device *dev; + void __iomem *regs; +- spinlock_t regs_lock; ++ spinlock_t regs_lock; /* spinlock for all clocks */ + const char *osc_name; + + struct clk_onecell_data onecell; +@@ -1344,7 +1341,7 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + } + + static int bcm2835_clock_determine_rate(struct clk_hw *hw, +- struct clk_rate_request *req) ++ struct clk_rate_request *req) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct clk_hw *parent, *best_parent = NULL; +@@ -1402,7 +1399,6 @@ static u8 bcm2835_clock_get_parent(struct clk_hw *hw) + return (src & CM_SRC_MASK) >> CM_SRC_SHIFT; + } + +- + static const struct clk_ops bcm2835_clock_clk_ops = { + .is_prepared = bcm2835_clock_is_on, + .prepare = bcm2835_clock_on, + +From bc93d6079cb8e699ef504792ba924046d7bd6b92 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 14:20:15 +0000 +Subject: [PATCH 258/398] clk: bcm2835: expose raw clock-registers via debugfs + +For debugging purposes under some circumstance +it helps to be able to see the actual clock registers. + +E.g: when looking at the clock divider it is helpful to +see what the actual clock divider is. + +This patch exposes all the clock registers specific to each +clock/pll/pll-divider via debugfs. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Acked-by: Eric Anholt +(cherry picked from commit 96bf9c69d5729781018a00f08e2ae395ec3346b4) +--- + drivers/clk/bcm/clk-bcm2835.c | 101 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 101 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index f76adaa9c0e38183285202d373b8af1f04095b2b..4ea2617e602c81d57cacb48dc685928e24f26218 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -313,6 +314,27 @@ static inline u32 cprman_read(struct bcm2835_cprman *cprman, u32 reg) + return readl(cprman->regs + reg); + } + ++static int bcm2835_debugfs_regset(struct bcm2835_cprman *cprman, u32 base, ++ struct debugfs_reg32 *regs, size_t nregs, ++ struct dentry *dentry) ++{ ++ struct dentry *regdump; ++ struct debugfs_regset32 *regset; ++ ++ regset = devm_kzalloc(cprman->dev, sizeof(*regset), GFP_KERNEL); ++ if (!regset) ++ return -ENOMEM; ++ ++ regset->regs = regs; ++ regset->nregs = nregs; ++ regset->base = cprman->regs + base; ++ ++ regdump = debugfs_create_regset32("regdump", S_IRUGO, dentry, ++ regset); ++ ++ return regdump ? 0 : -ENOMEM; ++} ++ + /* + * These are fixed clocks. They're probably not all root clocks and it may + * be possible to turn them on and off but until this is mapped out better +@@ -1044,6 +1066,36 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw, + return 0; + } + ++static int bcm2835_pll_debug_init(struct clk_hw *hw, ++ struct dentry *dentry) ++{ ++ struct bcm2835_pll *pll = container_of(hw, struct bcm2835_pll, hw); ++ struct bcm2835_cprman *cprman = pll->cprman; ++ const struct bcm2835_pll_data *data = pll->data; ++ struct debugfs_reg32 *regs; ++ ++ regs = devm_kzalloc(cprman->dev, 7 * sizeof(*regs), GFP_KERNEL); ++ if (!regs) ++ return -ENOMEM; ++ ++ regs[0].name = "cm_ctrl"; ++ regs[0].offset = data->cm_ctrl_reg; ++ regs[1].name = "a2w_ctrl"; ++ regs[1].offset = data->a2w_ctrl_reg; ++ regs[2].name = "frac"; ++ regs[2].offset = data->frac_reg; ++ regs[3].name = "ana0"; ++ regs[3].offset = data->ana_reg_base + 0 * 4; ++ regs[4].name = "ana1"; ++ regs[4].offset = data->ana_reg_base + 1 * 4; ++ regs[5].name = "ana2"; ++ regs[5].offset = data->ana_reg_base + 2 * 4; ++ regs[6].name = "ana3"; ++ regs[6].offset = data->ana_reg_base + 3 * 4; ++ ++ return bcm2835_debugfs_regset(cprman, 0, regs, 7, dentry); ++} ++ + static const struct clk_ops bcm2835_pll_clk_ops = { + .is_prepared = bcm2835_pll_is_on, + .prepare = bcm2835_pll_on, +@@ -1051,6 +1103,7 @@ static const struct clk_ops bcm2835_pll_clk_ops = { + .recalc_rate = bcm2835_pll_get_rate, + .set_rate = bcm2835_pll_set_rate, + .round_rate = bcm2835_pll_round_rate, ++ .debug_init = bcm2835_pll_debug_init, + }; + + struct bcm2835_pll_divider { +@@ -1151,6 +1204,26 @@ static int bcm2835_pll_divider_set_rate(struct clk_hw *hw, + return 0; + } + ++static int bcm2835_pll_divider_debug_init(struct clk_hw *hw, ++ struct dentry *dentry) ++{ ++ struct bcm2835_pll_divider *divider = bcm2835_pll_divider_from_hw(hw); ++ struct bcm2835_cprman *cprman = divider->cprman; ++ const struct bcm2835_pll_divider_data *data = divider->data; ++ struct debugfs_reg32 *regs; ++ ++ regs = devm_kzalloc(cprman->dev, 7 * sizeof(*regs), GFP_KERNEL); ++ if (!regs) ++ return -ENOMEM; ++ ++ regs[0].name = "cm"; ++ regs[0].offset = data->cm_reg; ++ regs[1].name = "a2w"; ++ regs[1].offset = data->a2w_reg; ++ ++ return bcm2835_debugfs_regset(cprman, 0, regs, 2, dentry); ++} ++ + static const struct clk_ops bcm2835_pll_divider_clk_ops = { + .is_prepared = bcm2835_pll_divider_is_on, + .prepare = bcm2835_pll_divider_on, +@@ -1158,6 +1231,7 @@ static const struct clk_ops bcm2835_pll_divider_clk_ops = { + .recalc_rate = bcm2835_pll_divider_get_rate, + .set_rate = bcm2835_pll_divider_set_rate, + .round_rate = bcm2835_pll_divider_round_rate, ++ .debug_init = bcm2835_pll_divider_debug_init, + }; + + /* +@@ -1399,6 +1473,31 @@ static u8 bcm2835_clock_get_parent(struct clk_hw *hw) + return (src & CM_SRC_MASK) >> CM_SRC_SHIFT; + } + ++static struct debugfs_reg32 bcm2835_debugfs_clock_reg32[] = { ++ { ++ .name = "ctl", ++ .offset = 0, ++ }, ++ { ++ .name = "div", ++ .offset = 4, ++ }, ++}; ++ ++static int bcm2835_clock_debug_init(struct clk_hw *hw, ++ struct dentry *dentry) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct bcm2835_cprman *cprman = clock->cprman; ++ const struct bcm2835_clock_data *data = clock->data; ++ ++ return bcm2835_debugfs_regset( ++ cprman, data->ctl_reg, ++ bcm2835_debugfs_clock_reg32, ++ ARRAY_SIZE(bcm2835_debugfs_clock_reg32), ++ dentry); ++} ++ + static const struct clk_ops bcm2835_clock_clk_ops = { + .is_prepared = bcm2835_clock_is_on, + .prepare = bcm2835_clock_on, +@@ -1408,6 +1507,7 @@ static const struct clk_ops bcm2835_clock_clk_ops = { + .determine_rate = bcm2835_clock_determine_rate, + .set_parent = bcm2835_clock_set_parent, + .get_parent = bcm2835_clock_get_parent, ++ .debug_init = bcm2835_clock_debug_init, + }; + + static int bcm2835_vpu_clock_is_on(struct clk_hw *hw) +@@ -1426,6 +1526,7 @@ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { + .determine_rate = bcm2835_clock_determine_rate, + .set_parent = bcm2835_clock_set_parent, + .get_parent = bcm2835_clock_get_parent, ++ .debug_init = bcm2835_clock_debug_init, + }; + + static struct clk *bcm2835_register_pll(struct bcm2835_cprman *cprman, + +From d84d3c429a0c0aba749ef9f3f3444b091b2ce9d4 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 12:51:41 +0000 +Subject: [PATCH 259/398] clk: bcm2835: remove use of BCM2835_CLOCK_COUNT in + driver + +As the use of BCM2835_CLOCK_COUNT in +include/dt-bindings/clock/bcm2835.h is frowned upon as +it needs to get modified every time a new clock gets introduced +this patch changes the clk-bcm2835 driver to use a different +scheme for registration of clocks and pll, so that there +is no more need for BCM2835_CLOCK_COUNT to be defined. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 56eb3a2ed9726961e1bcfa69d4a3f86d68f0eb52) +--- + drivers/clk/bcm/clk-bcm2835.c | 167 ++++++++++++++++++++---------------- + include/dt-bindings/clock/bcm2835.h | 2 - + 2 files changed, 94 insertions(+), 75 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 4ea2617e602c81d57cacb48dc685928e24f26218..a1eff0543363e792042ebacfdc53bd9be2ada41a 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -301,7 +301,7 @@ struct bcm2835_cprman { + const char *osc_name; + + struct clk_onecell_data onecell; +- struct clk *clks[BCM2835_CLOCK_COUNT]; ++ struct clk *clks[]; + }; + + static inline void cprman_write(struct bcm2835_cprman *cprman, u32 reg, u32 val) +@@ -853,6 +853,25 @@ static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { + .is_mash_clock = true, + }; + ++struct bcm2835_gate_data { ++ const char *name; ++ const char *parent; ++ ++ u32 ctl_reg; ++}; ++ ++/* ++ * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if ++ * you have the debug bit set in the power manager, which we ++ * don't bother exposing) are individual gates off of the ++ * non-stop vpu clock. ++ */ ++static const struct bcm2835_gate_data bcm2835_clock_peri_image_data = { ++ .name = "peri_image", ++ .parent = "vpu", ++ .ctl_reg = CM_PERIICTL, ++}; ++ + struct bcm2835_pll { + struct clk_hw hw; + struct bcm2835_cprman *cprman; +@@ -1658,14 +1677,81 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + return devm_clk_register(cprman->dev, &clock->hw); + } + ++static struct clk *bcm2835_register_gate(struct bcm2835_cprman *cprman, ++ const struct bcm2835_gate_data *data) ++{ ++ return clk_register_gate(cprman->dev, data->name, data->parent, ++ CLK_IGNORE_UNUSED | CLK_SET_RATE_GATE, ++ cprman->regs + data->ctl_reg, ++ CM_GATE_BIT, 0, &cprman->regs_lock); ++} ++ ++typedef struct clk *(*bcm2835_clk_register)(struct bcm2835_cprman *cprman, ++ const void *data); ++struct bcm2835_clk_desc { ++ bcm2835_clk_register clk_register; ++ const void *data; ++}; ++ ++#define _REGISTER(f, d) { .clk_register = (bcm2835_clk_register)f, \ ++ .data = d } ++#define REGISTER_PLL(d) _REGISTER(&bcm2835_register_pll, d) ++#define REGISTER_PLL_DIV(d) _REGISTER(&bcm2835_register_pll_divider, d) ++#define REGISTER_CLK(d) _REGISTER(&bcm2835_register_clock, d) ++#define REGISTER_GATE(d) _REGISTER(&bcm2835_register_gate, d) ++ ++static const struct bcm2835_clk_desc clk_desc_array[] = { ++ /* register PLL */ ++ [BCM2835_PLLA] = REGISTER_PLL(&bcm2835_plla_data), ++ [BCM2835_PLLB] = REGISTER_PLL(&bcm2835_pllb_data), ++ [BCM2835_PLLC] = REGISTER_PLL(&bcm2835_pllc_data), ++ [BCM2835_PLLD] = REGISTER_PLL(&bcm2835_plld_data), ++ [BCM2835_PLLH] = REGISTER_PLL(&bcm2835_pllh_data), ++ /* the PLL dividers */ ++ [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV(&bcm2835_plla_core_data), ++ [BCM2835_PLLA_PER] = REGISTER_PLL_DIV(&bcm2835_plla_per_data), ++ [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV(&bcm2835_pllc_core0_data), ++ [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV(&bcm2835_pllc_core1_data), ++ [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV(&bcm2835_pllc_core2_data), ++ [BCM2835_PLLC_PER] = REGISTER_PLL_DIV(&bcm2835_pllc_per_data), ++ [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV(&bcm2835_plld_core_data), ++ [BCM2835_PLLD_PER] = REGISTER_PLL_DIV(&bcm2835_plld_per_data), ++ [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV(&bcm2835_pllh_rcal_data), ++ [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV(&bcm2835_pllh_aux_data), ++ [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV(&bcm2835_pllh_pix_data), ++ /* the clocks */ ++ [BCM2835_CLOCK_TIMER] = REGISTER_CLK(&bcm2835_clock_timer_data), ++ [BCM2835_CLOCK_OTP] = REGISTER_CLK(&bcm2835_clock_otp_data), ++ [BCM2835_CLOCK_TSENS] = REGISTER_CLK(&bcm2835_clock_tsens_data), ++ [BCM2835_CLOCK_VPU] = REGISTER_CLK(&bcm2835_clock_vpu_data), ++ [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), ++ [BCM2835_CLOCK_ISP] = REGISTER_CLK(&bcm2835_clock_isp_data), ++ [BCM2835_CLOCK_H264] = REGISTER_CLK(&bcm2835_clock_h264_data), ++ [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), ++ [BCM2835_CLOCK_SDRAM] = REGISTER_CLK(&bcm2835_clock_sdram_data), ++ [BCM2835_CLOCK_UART] = REGISTER_CLK(&bcm2835_clock_uart_data), ++ [BCM2835_CLOCK_VEC] = REGISTER_CLK(&bcm2835_clock_vec_data), ++ [BCM2835_CLOCK_HSM] = REGISTER_CLK(&bcm2835_clock_hsm_data), ++ [BCM2835_CLOCK_EMMC] = REGISTER_CLK(&bcm2835_clock_emmc_data), ++ [BCM2835_CLOCK_PWM] = REGISTER_CLK(&bcm2835_clock_pwm_data), ++ /* the gates */ ++ [BCM2835_CLOCK_PERI_IMAGE] = REGISTER_GATE( ++ &bcm2835_clock_peri_image_data), ++}; ++ + static int bcm2835_clk_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; + struct clk **clks; + struct bcm2835_cprman *cprman; + struct resource *res; ++ const struct bcm2835_clk_desc *desc; ++ const size_t asize = ARRAY_SIZE(clk_desc_array); ++ size_t i; + +- cprman = devm_kzalloc(dev, sizeof(*cprman), GFP_KERNEL); ++ cprman = devm_kzalloc(dev, ++ sizeof(*cprman) + asize * sizeof(*clks), ++ GFP_KERNEL); + if (!cprman) + return -ENOMEM; + +@@ -1682,80 +1768,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + + platform_set_drvdata(pdev, cprman); + +- cprman->onecell.clk_num = BCM2835_CLOCK_COUNT; ++ cprman->onecell.clk_num = asize; + cprman->onecell.clks = cprman->clks; + clks = cprman->clks; + +- clks[BCM2835_PLLA] = bcm2835_register_pll(cprman, &bcm2835_plla_data); +- clks[BCM2835_PLLB] = bcm2835_register_pll(cprman, &bcm2835_pllb_data); +- clks[BCM2835_PLLC] = bcm2835_register_pll(cprman, &bcm2835_pllc_data); +- clks[BCM2835_PLLD] = bcm2835_register_pll(cprman, &bcm2835_plld_data); +- clks[BCM2835_PLLH] = bcm2835_register_pll(cprman, &bcm2835_pllh_data); +- +- clks[BCM2835_PLLA_CORE] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plla_core_data); +- clks[BCM2835_PLLA_PER] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plla_per_data); +- clks[BCM2835_PLLC_CORE0] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_core0_data); +- clks[BCM2835_PLLC_CORE1] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_core1_data); +- clks[BCM2835_PLLC_CORE2] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_core2_data); +- clks[BCM2835_PLLC_PER] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_per_data); +- clks[BCM2835_PLLD_CORE] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plld_core_data); +- clks[BCM2835_PLLD_PER] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plld_per_data); +- clks[BCM2835_PLLH_RCAL] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllh_rcal_data); +- clks[BCM2835_PLLH_AUX] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllh_aux_data); +- clks[BCM2835_PLLH_PIX] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllh_pix_data); +- +- clks[BCM2835_CLOCK_TIMER] = +- bcm2835_register_clock(cprman, &bcm2835_clock_timer_data); +- clks[BCM2835_CLOCK_OTP] = +- bcm2835_register_clock(cprman, &bcm2835_clock_otp_data); +- clks[BCM2835_CLOCK_TSENS] = +- bcm2835_register_clock(cprman, &bcm2835_clock_tsens_data); +- clks[BCM2835_CLOCK_VPU] = +- bcm2835_register_clock(cprman, &bcm2835_clock_vpu_data); +- clks[BCM2835_CLOCK_V3D] = +- bcm2835_register_clock(cprman, &bcm2835_clock_v3d_data); +- clks[BCM2835_CLOCK_ISP] = +- bcm2835_register_clock(cprman, &bcm2835_clock_isp_data); +- clks[BCM2835_CLOCK_H264] = +- bcm2835_register_clock(cprman, &bcm2835_clock_h264_data); +- clks[BCM2835_CLOCK_V3D] = +- bcm2835_register_clock(cprman, &bcm2835_clock_v3d_data); +- clks[BCM2835_CLOCK_SDRAM] = +- bcm2835_register_clock(cprman, &bcm2835_clock_sdram_data); +- clks[BCM2835_CLOCK_UART] = +- bcm2835_register_clock(cprman, &bcm2835_clock_uart_data); +- clks[BCM2835_CLOCK_VEC] = +- bcm2835_register_clock(cprman, &bcm2835_clock_vec_data); +- clks[BCM2835_CLOCK_HSM] = +- bcm2835_register_clock(cprman, &bcm2835_clock_hsm_data); +- clks[BCM2835_CLOCK_EMMC] = +- bcm2835_register_clock(cprman, &bcm2835_clock_emmc_data); +- +- /* +- * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if +- * you have the debug bit set in the power manager, which we +- * don't bother exposing) are individual gates off of the +- * non-stop vpu clock. +- */ +- clks[BCM2835_CLOCK_PERI_IMAGE] = +- clk_register_gate(dev, "peri_image", "vpu", +- CLK_IGNORE_UNUSED | CLK_SET_RATE_GATE, +- cprman->regs + CM_PERIICTL, CM_GATE_BIT, +- 0, &cprman->regs_lock); +- +- clks[BCM2835_CLOCK_PWM] = +- bcm2835_register_clock(cprman, &bcm2835_clock_pwm_data); ++ for (i = 0; i < asize; i++) { ++ desc = &clk_desc_array[i]; ++ if (desc->clk_register && desc->data) ++ clks[i] = desc->clk_register(cprman, desc->data); ++ } + + return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, + &cprman->onecell); +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index 61f1d20c2a6735f2b90c69bcbc68b8a759e3981a..87235ac76ef102c749e3912b43bce5fc47b24f91 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -44,5 +44,3 @@ + #define BCM2835_CLOCK_EMMC 28 + #define BCM2835_CLOCK_PERI_IMAGE 29 + #define BCM2835_CLOCK_PWM 30 +- +-#define BCM2835_CLOCK_COUNT 31 + +From 42ab3c62e347846044a590a8aa3ec740d1127cf3 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 12:51:42 +0000 +Subject: [PATCH 260/398] clk: bcm2835: reorganize bcm2835_clock_array + assignment + +Reorganize bcm2835_clock_array so that there is no more +need for separate bcm2835_*_data structures to be defined. +Instead the required structures are generated inline via +helper macros. + +To allow this to also work for pll alone it was required that +the parent_pll was changed from a pointer to bcm2835_pll_data +to the name of the pll instead. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 3b15afefbef9b5952e3d68ad73d93f981b9faca8) +--- + drivers/clk/bcm/clk-bcm2835.c | 852 +++++++++++++++++++----------------------- + 1 file changed, 393 insertions(+), 459 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index a1eff0543363e792042ebacfdc53bd9be2ada41a..a85030e21e017a1a437971ea0b478c134607b237 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -418,115 +418,10 @@ static const struct bcm2835_pll_ana_bits bcm2835_ana_pllh = { + .fb_prediv_mask = BIT(11), + }; + +-/* +- * PLLA is the auxiliary PLL, used to drive the CCP2 (Compact Camera +- * Port 2) transmitter clock. +- * +- * It is in the PX LDO power domain, which is on when the AUDIO domain +- * is on. +- */ +-static const struct bcm2835_pll_data bcm2835_plla_data = { +- .name = "plla", +- .cm_ctrl_reg = CM_PLLA, +- .a2w_ctrl_reg = A2W_PLLA_CTRL, +- .frac_reg = A2W_PLLA_FRAC, +- .ana_reg_base = A2W_PLLA_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLA_ENABLE, +- .lock_mask = CM_LOCK_FLOCKA, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 2400000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* PLLB is used for the ARM's clock. */ +-static const struct bcm2835_pll_data bcm2835_pllb_data = { +- .name = "pllb", +- .cm_ctrl_reg = CM_PLLB, +- .a2w_ctrl_reg = A2W_PLLB_CTRL, +- .frac_reg = A2W_PLLB_FRAC, +- .ana_reg_base = A2W_PLLB_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLB_ENABLE, +- .lock_mask = CM_LOCK_FLOCKB, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 3000000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* +- * PLLC is the core PLL, used to drive the core VPU clock. +- * +- * It is in the PX LDO power domain, which is on when the AUDIO domain +- * is on. +-*/ +-static const struct bcm2835_pll_data bcm2835_pllc_data = { +- .name = "pllc", +- .cm_ctrl_reg = CM_PLLC, +- .a2w_ctrl_reg = A2W_PLLC_CTRL, +- .frac_reg = A2W_PLLC_FRAC, +- .ana_reg_base = A2W_PLLC_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, +- .lock_mask = CM_LOCK_FLOCKC, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 3000000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* +- * PLLD is the display PLL, used to drive DSI display panels. +- * +- * It is in the PX LDO power domain, which is on when the AUDIO domain +- * is on. +- */ +-static const struct bcm2835_pll_data bcm2835_plld_data = { +- .name = "plld", +- .cm_ctrl_reg = CM_PLLD, +- .a2w_ctrl_reg = A2W_PLLD_CTRL, +- .frac_reg = A2W_PLLD_FRAC, +- .ana_reg_base = A2W_PLLD_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_DDR_ENABLE, +- .lock_mask = CM_LOCK_FLOCKD, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 2400000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* +- * PLLH is used to supply the pixel clock or the AUX clock for the TV +- * encoder. +- * +- * It is in the HDMI power domain. +- */ +-static const struct bcm2835_pll_data bcm2835_pllh_data = { +- "pllh", +- .cm_ctrl_reg = CM_PLLH, +- .a2w_ctrl_reg = A2W_PLLH_CTRL, +- .frac_reg = A2W_PLLH_FRAC, +- .ana_reg_base = A2W_PLLH_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, +- .lock_mask = CM_LOCK_FLOCKH, +- +- .ana = &bcm2835_ana_pllh, +- +- .min_rate = 600000000u, +- .max_rate = 3000000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- + struct bcm2835_pll_divider_data { + const char *name; +- const struct bcm2835_pll_data *source_pll; ++ const char *source_pll; ++ + u32 cm_reg; + u32 a2w_reg; + +@@ -535,124 +430,6 @@ struct bcm2835_pll_divider_data { + u32 fixed_divider; + }; + +-static const struct bcm2835_pll_divider_data bcm2835_plla_core_data = { +- .name = "plla_core", +- .source_pll = &bcm2835_plla_data, +- .cm_reg = CM_PLLA, +- .a2w_reg = A2W_PLLA_CORE, +- .load_mask = CM_PLLA_LOADCORE, +- .hold_mask = CM_PLLA_HOLDCORE, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_plla_per_data = { +- .name = "plla_per", +- .source_pll = &bcm2835_plla_data, +- .cm_reg = CM_PLLA, +- .a2w_reg = A2W_PLLA_PER, +- .load_mask = CM_PLLA_LOADPER, +- .hold_mask = CM_PLLA_HOLDPER, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllb_arm_data = { +- .name = "pllb_arm", +- .source_pll = &bcm2835_pllb_data, +- .cm_reg = CM_PLLB, +- .a2w_reg = A2W_PLLB_ARM, +- .load_mask = CM_PLLB_LOADARM, +- .hold_mask = CM_PLLB_HOLDARM, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_core0_data = { +- .name = "pllc_core0", +- .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, +- .a2w_reg = A2W_PLLC_CORE0, +- .load_mask = CM_PLLC_LOADCORE0, +- .hold_mask = CM_PLLC_HOLDCORE0, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_core1_data = { +- .name = "pllc_core1", .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, A2W_PLLC_CORE1, +- .load_mask = CM_PLLC_LOADCORE1, +- .hold_mask = CM_PLLC_HOLDCORE1, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_core2_data = { +- .name = "pllc_core2", +- .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, +- .a2w_reg = A2W_PLLC_CORE2, +- .load_mask = CM_PLLC_LOADCORE2, +- .hold_mask = CM_PLLC_HOLDCORE2, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_per_data = { +- .name = "pllc_per", +- .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, +- .a2w_reg = A2W_PLLC_PER, +- .load_mask = CM_PLLC_LOADPER, +- .hold_mask = CM_PLLC_HOLDPER, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_plld_core_data = { +- .name = "plld_core", +- .source_pll = &bcm2835_plld_data, +- .cm_reg = CM_PLLD, +- .a2w_reg = A2W_PLLD_CORE, +- .load_mask = CM_PLLD_LOADCORE, +- .hold_mask = CM_PLLD_HOLDCORE, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_plld_per_data = { +- .name = "plld_per", +- .source_pll = &bcm2835_plld_data, +- .cm_reg = CM_PLLD, +- .a2w_reg = A2W_PLLD_PER, +- .load_mask = CM_PLLD_LOADPER, +- .hold_mask = CM_PLLD_HOLDPER, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllh_rcal_data = { +- .name = "pllh_rcal", +- .source_pll = &bcm2835_pllh_data, +- .cm_reg = CM_PLLH, +- .a2w_reg = A2W_PLLH_RCAL, +- .load_mask = CM_PLLH_LOADRCAL, +- .hold_mask = 0, +- .fixed_divider = 10, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllh_aux_data = { +- .name = "pllh_aux", +- .source_pll = &bcm2835_pllh_data, +- .cm_reg = CM_PLLH, +- .a2w_reg = A2W_PLLH_AUX, +- .load_mask = CM_PLLH_LOADAUX, +- .hold_mask = 0, +- .fixed_divider = 10, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllh_pix_data = { +- .name = "pllh_pix", +- .source_pll = &bcm2835_pllh_data, +- .cm_reg = CM_PLLH, +- .a2w_reg = A2W_PLLH_PIX, +- .load_mask = CM_PLLH_LOADPIX, +- .hold_mask = 0, +- .fixed_divider = 10, +-}; +- + struct bcm2835_clock_data { + const char *name; + +@@ -671,188 +448,6 @@ struct bcm2835_clock_data { + bool is_mash_clock; + }; + +-static const char *const bcm2835_clock_per_parents[] = { +- "gnd", +- "xosc", +- "testdebug0", +- "testdebug1", +- "plla_per", +- "pllc_per", +- "plld_per", +- "pllh_aux", +-}; +- +-static const char *const bcm2835_clock_vpu_parents[] = { +- "gnd", +- "xosc", +- "testdebug0", +- "testdebug1", +- "plla_core", +- "pllc_core0", +- "plld_core", +- "pllh_aux", +- "pllc_core1", +- "pllc_core2", +-}; +- +-static const char *const bcm2835_clock_osc_parents[] = { +- "gnd", +- "xosc", +- "testdebug0", +- "testdebug1" +-}; +- +-/* +- * Used for a 1Mhz clock for the system clocksource, and also used by +- * the watchdog timer and the camera pulse generator. +- */ +-static const struct bcm2835_clock_data bcm2835_clock_timer_data = { +- .name = "timer", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), +- .parents = bcm2835_clock_osc_parents, +- .ctl_reg = CM_TIMERCTL, +- .div_reg = CM_TIMERDIV, +- .int_bits = 6, +- .frac_bits = 12, +-}; +- +-/* One Time Programmable Memory clock. Maximum 10Mhz. */ +-static const struct bcm2835_clock_data bcm2835_clock_otp_data = { +- .name = "otp", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), +- .parents = bcm2835_clock_osc_parents, +- .ctl_reg = CM_OTPCTL, +- .div_reg = CM_OTPDIV, +- .int_bits = 4, +- .frac_bits = 0, +-}; +- +-/* +- * VPU clock. This doesn't have an enable bit, since it drives the +- * bus for everything else, and is special so it doesn't need to be +- * gated for rate changes. It is also known as "clk_audio" in various +- * hardware documentation. +- */ +-static const struct bcm2835_clock_data bcm2835_clock_vpu_data = { +- .name = "vpu", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_VPUCTL, +- .div_reg = CM_VPUDIV, +- .int_bits = 12, +- .frac_bits = 8, +- .is_vpu_clock = true, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_v3d_data = { +- .name = "v3d", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_V3DCTL, +- .div_reg = CM_V3DDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_isp_data = { +- .name = "isp", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_ISPCTL, +- .div_reg = CM_ISPDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_h264_data = { +- .name = "h264", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_H264CTL, +- .div_reg = CM_H264DIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-/* TV encoder clock. Only operating frequency is 108Mhz. */ +-static const struct bcm2835_clock_data bcm2835_clock_vec_data = { +- .name = "vec", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_VECCTL, +- .div_reg = CM_VECDIV, +- .int_bits = 4, +- .frac_bits = 0, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_uart_data = { +- .name = "uart", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_UARTCTL, +- .div_reg = CM_UARTDIV, +- .int_bits = 10, +- .frac_bits = 12, +-}; +- +-/* HDMI state machine */ +-static const struct bcm2835_clock_data bcm2835_clock_hsm_data = { +- .name = "hsm", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_HSMCTL, +- .div_reg = CM_HSMDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-/* +- * Secondary SDRAM clock. Used for low-voltage modes when the PLL in +- * the SDRAM controller can't be used. +- */ +-static const struct bcm2835_clock_data bcm2835_clock_sdram_data = { +- .name = "sdram", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_SDCCTL, +- .div_reg = CM_SDCDIV, +- .int_bits = 6, +- .frac_bits = 0, +-}; +- +-/* Clock for the temperature sensor. Generally run at 2Mhz, max 5Mhz. */ +-static const struct bcm2835_clock_data bcm2835_clock_tsens_data = { +- .name = "tsens", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), +- .parents = bcm2835_clock_osc_parents, +- .ctl_reg = CM_TSENSCTL, +- .div_reg = CM_TSENSDIV, +- .int_bits = 5, +- .frac_bits = 0, +-}; +- +-/* Arasan EMMC clock */ +-static const struct bcm2835_clock_data bcm2835_clock_emmc_data = { +- .name = "emmc", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_EMMCCTL, +- .div_reg = CM_EMMCDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { +- .name = "pwm", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_PWMCTL, +- .div_reg = CM_PWMDIV, +- .int_bits = 12, +- .frac_bits = 12, +- .is_mash_clock = true, +-}; +- + struct bcm2835_gate_data { + const char *name; + const char *parent; +@@ -860,18 +455,6 @@ struct bcm2835_gate_data { + u32 ctl_reg; + }; + +-/* +- * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if +- * you have the debug bit set in the power manager, which we +- * don't bother exposing) are individual gates off of the +- * non-stop vpu clock. +- */ +-static const struct bcm2835_gate_data bcm2835_clock_peri_image_data = { +- .name = "peri_image", +- .parent = "vpu", +- .ctl_reg = CM_PERIICTL, +-}; +- + struct bcm2835_pll { + struct clk_hw hw; + struct bcm2835_cprman *cprman; +@@ -1594,7 +1177,7 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, + + memset(&init, 0, sizeof(init)); + +- init.parent_names = &data->source_pll->name; ++ init.parent_names = &data->source_pll; + init.num_parents = 1; + init.name = divider_name; + init.ops = &bcm2835_pll_divider_clk_ops; +@@ -1693,50 +1276,401 @@ struct bcm2835_clk_desc { + const void *data; + }; + +-#define _REGISTER(f, d) { .clk_register = (bcm2835_clk_register)f, \ +- .data = d } +-#define REGISTER_PLL(d) _REGISTER(&bcm2835_register_pll, d) +-#define REGISTER_PLL_DIV(d) _REGISTER(&bcm2835_register_pll_divider, d) +-#define REGISTER_CLK(d) _REGISTER(&bcm2835_register_clock, d) +-#define REGISTER_GATE(d) _REGISTER(&bcm2835_register_gate, d) ++/* assignment helper macros for different clock types */ ++#define _REGISTER(f, ...) { .clk_register = (bcm2835_clk_register)f, \ ++ .data = __VA_ARGS__ } ++#define REGISTER_PLL(...) _REGISTER(&bcm2835_register_pll, \ ++ &(struct bcm2835_pll_data) \ ++ {__VA_ARGS__}) ++#define REGISTER_PLL_DIV(...) _REGISTER(&bcm2835_register_pll_divider, \ ++ &(struct bcm2835_pll_divider_data) \ ++ {__VA_ARGS__}) ++#define REGISTER_CLK(...) _REGISTER(&bcm2835_register_clock, \ ++ &(struct bcm2835_clock_data) \ ++ {__VA_ARGS__}) ++#define REGISTER_GATE(...) _REGISTER(&bcm2835_register_gate, \ ++ &(struct bcm2835_gate_data) \ ++ {__VA_ARGS__}) ++ ++/* parent mux arrays plus helper macros */ ++ ++/* main oscillator parent mux */ ++static const char *const bcm2835_clock_osc_parents[] = { ++ "gnd", ++ "xosc", ++ "testdebug0", ++ "testdebug1" ++}; ++ ++#define REGISTER_OSC_CLK(...) REGISTER_CLK( \ ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), \ ++ .parents = bcm2835_clock_osc_parents, \ ++ __VA_ARGS__) ++ ++/* main peripherial parent mux */ ++static const char *const bcm2835_clock_per_parents[] = { ++ "gnd", ++ "xosc", ++ "testdebug0", ++ "testdebug1", ++ "plla_per", ++ "pllc_per", ++ "plld_per", ++ "pllh_aux", ++}; ++ ++#define REGISTER_PER_CLK(...) REGISTER_CLK( \ ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \ ++ .parents = bcm2835_clock_per_parents, \ ++ __VA_ARGS__) + ++/* main vpu parent mux */ ++static const char *const bcm2835_clock_vpu_parents[] = { ++ "gnd", ++ "xosc", ++ "testdebug0", ++ "testdebug1", ++ "plla_core", ++ "pllc_core0", ++ "plld_core", ++ "pllh_aux", ++ "pllc_core1", ++ "pllc_core2", ++}; ++ ++#define REGISTER_VPU_CLK(...) REGISTER_CLK( \ ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), \ ++ .parents = bcm2835_clock_vpu_parents, \ ++ __VA_ARGS__) ++ ++/* ++ * the real definition of all the pll, pll_dividers and clocks ++ * these make use of the above REGISTER_* macros ++ */ + static const struct bcm2835_clk_desc clk_desc_array[] = { +- /* register PLL */ +- [BCM2835_PLLA] = REGISTER_PLL(&bcm2835_plla_data), +- [BCM2835_PLLB] = REGISTER_PLL(&bcm2835_pllb_data), +- [BCM2835_PLLC] = REGISTER_PLL(&bcm2835_pllc_data), +- [BCM2835_PLLD] = REGISTER_PLL(&bcm2835_plld_data), +- [BCM2835_PLLH] = REGISTER_PLL(&bcm2835_pllh_data), +- /* the PLL dividers */ +- [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV(&bcm2835_plla_core_data), +- [BCM2835_PLLA_PER] = REGISTER_PLL_DIV(&bcm2835_plla_per_data), +- [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV(&bcm2835_pllc_core0_data), +- [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV(&bcm2835_pllc_core1_data), +- [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV(&bcm2835_pllc_core2_data), +- [BCM2835_PLLC_PER] = REGISTER_PLL_DIV(&bcm2835_pllc_per_data), +- [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV(&bcm2835_plld_core_data), +- [BCM2835_PLLD_PER] = REGISTER_PLL_DIV(&bcm2835_plld_per_data), +- [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV(&bcm2835_pllh_rcal_data), +- [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV(&bcm2835_pllh_aux_data), +- [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV(&bcm2835_pllh_pix_data), ++ /* the PLL + PLL dividers */ ++ ++ /* ++ * PLLA is the auxiliary PLL, used to drive the CCP2 ++ * (Compact Camera Port 2) transmitter clock. ++ * ++ * It is in the PX LDO power domain, which is on when the ++ * AUDIO domain is on. ++ */ ++ [BCM2835_PLLA] = REGISTER_PLL( ++ .name = "plla", ++ .cm_ctrl_reg = CM_PLLA, ++ .a2w_ctrl_reg = A2W_PLLA_CTRL, ++ .frac_reg = A2W_PLLA_FRAC, ++ .ana_reg_base = A2W_PLLA_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLA_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKA, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 2400000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV( ++ .name = "plla_core", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_CORE, ++ .load_mask = CM_PLLA_LOADCORE, ++ .hold_mask = CM_PLLA_HOLDCORE, ++ .fixed_divider = 1), ++ [BCM2835_PLLA_PER] = REGISTER_PLL_DIV( ++ .name = "plla_per", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_PER, ++ .load_mask = CM_PLLA_LOADPER, ++ .hold_mask = CM_PLLA_HOLDPER, ++ .fixed_divider = 1), ++ ++ /* PLLB is used for the ARM's clock. */ ++ [BCM2835_PLLB] = REGISTER_PLL( ++ .name = "pllb", ++ .cm_ctrl_reg = CM_PLLB, ++ .a2w_ctrl_reg = A2W_PLLB_CTRL, ++ .frac_reg = A2W_PLLB_FRAC, ++ .ana_reg_base = A2W_PLLB_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLB_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKB, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 3000000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLB_ARM] = REGISTER_PLL_DIV( ++ .name = "pllb_arm", ++ .source_pll = "pllb", ++ .cm_reg = CM_PLLB, ++ .a2w_reg = A2W_PLLB_ARM, ++ .load_mask = CM_PLLB_LOADARM, ++ .hold_mask = CM_PLLB_HOLDARM, ++ .fixed_divider = 1), ++ ++ /* ++ * PLLC is the core PLL, used to drive the core VPU clock. ++ * ++ * It is in the PX LDO power domain, which is on when the ++ * AUDIO domain is on. ++ */ ++ [BCM2835_PLLC] = REGISTER_PLL( ++ .name = "pllc", ++ .cm_ctrl_reg = CM_PLLC, ++ .a2w_ctrl_reg = A2W_PLLC_CTRL, ++ .frac_reg = A2W_PLLC_FRAC, ++ .ana_reg_base = A2W_PLLC_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKC, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 3000000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV( ++ .name = "pllc_core0", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_CORE0, ++ .load_mask = CM_PLLC_LOADCORE0, ++ .hold_mask = CM_PLLC_HOLDCORE0, ++ .fixed_divider = 1), ++ [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV( ++ .name = "pllc_core1", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_CORE1, ++ .load_mask = CM_PLLC_LOADCORE1, ++ .hold_mask = CM_PLLC_HOLDCORE1, ++ .fixed_divider = 1), ++ [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV( ++ .name = "pllc_core2", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_CORE2, ++ .load_mask = CM_PLLC_LOADCORE2, ++ .hold_mask = CM_PLLC_HOLDCORE2, ++ .fixed_divider = 1), ++ [BCM2835_PLLC_PER] = REGISTER_PLL_DIV( ++ .name = "pllc_per", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_PER, ++ .load_mask = CM_PLLC_LOADPER, ++ .hold_mask = CM_PLLC_HOLDPER, ++ .fixed_divider = 1), ++ ++ /* ++ * PLLD is the display PLL, used to drive DSI display panels. ++ * ++ * It is in the PX LDO power domain, which is on when the ++ * AUDIO domain is on. ++ */ ++ [BCM2835_PLLD] = REGISTER_PLL( ++ .name = "plld", ++ .cm_ctrl_reg = CM_PLLD, ++ .a2w_ctrl_reg = A2W_PLLD_CTRL, ++ .frac_reg = A2W_PLLD_FRAC, ++ .ana_reg_base = A2W_PLLD_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_DDR_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKD, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 2400000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV( ++ .name = "plld_core", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_CORE, ++ .load_mask = CM_PLLD_LOADCORE, ++ .hold_mask = CM_PLLD_HOLDCORE, ++ .fixed_divider = 1), ++ [BCM2835_PLLD_PER] = REGISTER_PLL_DIV( ++ .name = "plld_per", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_PER, ++ .load_mask = CM_PLLD_LOADPER, ++ .hold_mask = CM_PLLD_HOLDPER, ++ .fixed_divider = 1), ++ ++ /* ++ * PLLH is used to supply the pixel clock or the AUX clock for the ++ * TV encoder. ++ * ++ * It is in the HDMI power domain. ++ */ ++ [BCM2835_PLLH] = REGISTER_PLL( ++ "pllh", ++ .cm_ctrl_reg = CM_PLLH, ++ .a2w_ctrl_reg = A2W_PLLH_CTRL, ++ .frac_reg = A2W_PLLH_FRAC, ++ .ana_reg_base = A2W_PLLH_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKH, ++ ++ .ana = &bcm2835_ana_pllh, ++ ++ .min_rate = 600000000u, ++ .max_rate = 3000000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV( ++ .name = "pllh_rcal", ++ .source_pll = "pllh", ++ .cm_reg = CM_PLLH, ++ .a2w_reg = A2W_PLLH_RCAL, ++ .load_mask = CM_PLLH_LOADRCAL, ++ .hold_mask = 0, ++ .fixed_divider = 10), ++ [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV( ++ .name = "pllh_aux", ++ .source_pll = "pllh", ++ .cm_reg = CM_PLLH, ++ .a2w_reg = A2W_PLLH_AUX, ++ .load_mask = CM_PLLH_LOADAUX, ++ .hold_mask = 0, ++ .fixed_divider = 10), ++ [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV( ++ .name = "pllh_pix", ++ .source_pll = "pllh", ++ .cm_reg = CM_PLLH, ++ .a2w_reg = A2W_PLLH_PIX, ++ .load_mask = CM_PLLH_LOADPIX, ++ .hold_mask = 0, ++ .fixed_divider = 10), ++ + /* the clocks */ +- [BCM2835_CLOCK_TIMER] = REGISTER_CLK(&bcm2835_clock_timer_data), +- [BCM2835_CLOCK_OTP] = REGISTER_CLK(&bcm2835_clock_otp_data), +- [BCM2835_CLOCK_TSENS] = REGISTER_CLK(&bcm2835_clock_tsens_data), +- [BCM2835_CLOCK_VPU] = REGISTER_CLK(&bcm2835_clock_vpu_data), +- [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), +- [BCM2835_CLOCK_ISP] = REGISTER_CLK(&bcm2835_clock_isp_data), +- [BCM2835_CLOCK_H264] = REGISTER_CLK(&bcm2835_clock_h264_data), +- [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), +- [BCM2835_CLOCK_SDRAM] = REGISTER_CLK(&bcm2835_clock_sdram_data), +- [BCM2835_CLOCK_UART] = REGISTER_CLK(&bcm2835_clock_uart_data), +- [BCM2835_CLOCK_VEC] = REGISTER_CLK(&bcm2835_clock_vec_data), +- [BCM2835_CLOCK_HSM] = REGISTER_CLK(&bcm2835_clock_hsm_data), +- [BCM2835_CLOCK_EMMC] = REGISTER_CLK(&bcm2835_clock_emmc_data), +- [BCM2835_CLOCK_PWM] = REGISTER_CLK(&bcm2835_clock_pwm_data), ++ ++ /* clocks with oscillator parent mux */ ++ ++ /* One Time Programmable Memory clock. Maximum 10Mhz. */ ++ [BCM2835_CLOCK_OTP] = REGISTER_OSC_CLK( ++ .name = "otp", ++ .ctl_reg = CM_OTPCTL, ++ .div_reg = CM_OTPDIV, ++ .int_bits = 4, ++ .frac_bits = 0), ++ /* ++ * Used for a 1Mhz clock for the system clocksource, and also used ++ * bythe watchdog timer and the camera pulse generator. ++ */ ++ [BCM2835_CLOCK_TIMER] = REGISTER_OSC_CLK( ++ .name = "timer", ++ .ctl_reg = CM_TIMERCTL, ++ .div_reg = CM_TIMERDIV, ++ .int_bits = 6, ++ .frac_bits = 12), ++ /* ++ * Clock for the temperature sensor. ++ * Generally run at 2Mhz, max 5Mhz. ++ */ ++ [BCM2835_CLOCK_TSENS] = REGISTER_OSC_CLK( ++ .name = "tsens", ++ .ctl_reg = CM_TSENSCTL, ++ .div_reg = CM_TSENSDIV, ++ .int_bits = 5, ++ .frac_bits = 0), ++ ++ /* clocks with vpu parent mux */ ++ [BCM2835_CLOCK_H264] = REGISTER_VPU_CLK( ++ .name = "h264", ++ .ctl_reg = CM_H264CTL, ++ .div_reg = CM_H264DIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_ISP] = REGISTER_VPU_CLK( ++ .name = "isp", ++ .ctl_reg = CM_ISPCTL, ++ .div_reg = CM_ISPDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ /* ++ * Secondary SDRAM clock. Used for low-voltage modes when the PLL ++ * in the SDRAM controller can't be used. ++ */ ++ [BCM2835_CLOCK_SDRAM] = REGISTER_VPU_CLK( ++ .name = "sdram", ++ .ctl_reg = CM_SDCCTL, ++ .div_reg = CM_SDCDIV, ++ .int_bits = 6, ++ .frac_bits = 0), ++ [BCM2835_CLOCK_V3D] = REGISTER_VPU_CLK( ++ .name = "v3d", ++ .ctl_reg = CM_V3DCTL, ++ .div_reg = CM_V3DDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ /* ++ * VPU clock. This doesn't have an enable bit, since it drives ++ * the bus for everything else, and is special so it doesn't need ++ * to be gated for rate changes. It is also known as "clk_audio" ++ * in various hardware documentation. ++ */ ++ [BCM2835_CLOCK_VPU] = REGISTER_VPU_CLK( ++ .name = "vpu", ++ .ctl_reg = CM_VPUCTL, ++ .div_reg = CM_VPUDIV, ++ .int_bits = 12, ++ .frac_bits = 8, ++ .is_vpu_clock = true), ++ ++ /* clocks with per parent mux */ ++ ++ /* Arasan EMMC clock */ ++ [BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK( ++ .name = "emmc", ++ .ctl_reg = CM_EMMCCTL, ++ .div_reg = CM_EMMCDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ /* HDMI state machine */ ++ [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( ++ .name = "hsm", ++ .ctl_reg = CM_HSMCTL, ++ .div_reg = CM_HSMDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( ++ .name = "pwm", ++ .ctl_reg = CM_PWMCTL, ++ .div_reg = CM_PWMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_UART] = REGISTER_PER_CLK( ++ .name = "uart", ++ .ctl_reg = CM_UARTCTL, ++ .div_reg = CM_UARTDIV, ++ .int_bits = 10, ++ .frac_bits = 12), ++ /* TV encoder clock. Only operating frequency is 108Mhz. */ ++ [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK( ++ .name = "vec", ++ .ctl_reg = CM_VECCTL, ++ .div_reg = CM_VECDIV, ++ .int_bits = 4, ++ .frac_bits = 0), ++ + /* the gates */ ++ ++ /* ++ * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if ++ * you have the debug bit set in the power manager, which we ++ * don't bother exposing) are individual gates off of the ++ * non-stop vpu clock. ++ */ + [BCM2835_CLOCK_PERI_IMAGE] = REGISTER_GATE( +- &bcm2835_clock_peri_image_data), ++ .name = "peri_image", ++ .parent = "vpu", ++ .ctl_reg = CM_PERIICTL), + }; + + static int bcm2835_clk_probe(struct platform_device *pdev) + +From 3abdf05dbf0714896e55bc301929475e775c5cdc Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 12:51:43 +0000 +Subject: [PATCH 261/398] clk: bcm2835: enable management of PCM clock + +Enable the PCM clock in the SOC, which is used by the +bcm2835-i2s driver. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 33b689600f43094a9316a1b582f2286d17bc737b) +--- + drivers/clk/bcm/clk-bcm2835.c | 7 +++++++ + include/dt-bindings/clock/bcm2835.h | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index a85030e21e017a1a437971ea0b478c134607b237..7803921276efaff0ef6155d1d7922c60a3f4f9cb 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1638,6 +1638,13 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_HSMDIV, + .int_bits = 4, + .frac_bits = 8), ++ [BCM2835_CLOCK_PCM] = REGISTER_PER_CLK( ++ .name = "pcm", ++ .ctl_reg = CM_PCMCTL, ++ .div_reg = CM_PCMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), + [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( + .name = "pwm", + .ctl_reg = CM_PWMCTL, +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index 87235ac76ef102c749e3912b43bce5fc47b24f91..9a7b4a5cd6e635ce37c10afba4c26c8ca3d7cf35 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -44,3 +44,4 @@ + #define BCM2835_CLOCK_EMMC 28 + #define BCM2835_CLOCK_PERI_IMAGE 29 + #define BCM2835_CLOCK_PWM 30 ++#define BCM2835_CLOCK_PCM 31 + +From cd5d9b76272bb2146a3c69426e5490c48374743b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 15:43:56 +0000 +Subject: [PATCH 262/398] clk: bcm2835: add missing PLL clock dividers + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 728436956aa172b24a3212295f8b53feb6479f32) +--- + drivers/clk/bcm/clk-bcm2835.c | 32 ++++++++++++++++++++++++++++++++ + include/dt-bindings/clock/bcm2835.h | 5 +++++ + 2 files changed, 37 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 7803921276efaff0ef6155d1d7922c60a3f4f9cb..2fe20f7f44f7f3627c5255c334aae17cfe702032 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1387,6 +1387,22 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .load_mask = CM_PLLA_LOADPER, + .hold_mask = CM_PLLA_HOLDPER, + .fixed_divider = 1), ++ [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( ++ .name = "plla_dsi0", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_DSI0, ++ .load_mask = CM_PLLA_LOADDSI0, ++ .hold_mask = CM_PLLA_HOLDDSI0, ++ .fixed_divider = 1), ++ [BCM2835_PLLA_CCP2] = REGISTER_PLL_DIV( ++ .name = "plla_ccp2", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_CCP2, ++ .load_mask = CM_PLLA_LOADCCP2, ++ .hold_mask = CM_PLLA_HOLDCCP2, ++ .fixed_divider = 1), + + /* PLLB is used for the ARM's clock. */ + [BCM2835_PLLB] = REGISTER_PLL( +@@ -1501,6 +1517,22 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .load_mask = CM_PLLD_LOADPER, + .hold_mask = CM_PLLD_HOLDPER, + .fixed_divider = 1), ++ [BCM2835_PLLD_DSI0] = REGISTER_PLL_DIV( ++ .name = "plld_dsi0", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_DSI0, ++ .load_mask = CM_PLLD_LOADDSI0, ++ .hold_mask = CM_PLLD_HOLDDSI0, ++ .fixed_divider = 1), ++ [BCM2835_PLLD_DSI1] = REGISTER_PLL_DIV( ++ .name = "plld_dsi1", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_DSI1, ++ .load_mask = CM_PLLD_LOADDSI1, ++ .hold_mask = CM_PLLD_HOLDDSI1, ++ .fixed_divider = 1), + + /* + * PLLH is used to supply the pixel clock or the AUX clock for the +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index 9a7b4a5cd6e635ce37c10afba4c26c8ca3d7cf35..a001e38651347d30fb1fd4faae103fee1693d37f 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -45,3 +45,8 @@ + #define BCM2835_CLOCK_PERI_IMAGE 29 + #define BCM2835_CLOCK_PWM 30 + #define BCM2835_CLOCK_PCM 31 ++ ++#define BCM2835_PLLA_DSI0 32 ++#define BCM2835_PLLA_CCP2 33 ++#define BCM2835_PLLD_DSI0 34 ++#define BCM2835_PLLD_DSI1 35 + +From 2efc1b65905d7574d3faa78a13b3355f8fe0ac06 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 15:43:57 +0000 +Subject: [PATCH 263/398] clk: bcm2835: add missing osc and per clocks + +Add AVE0, DFT, GP0, GP1, GP2, SLIM, SMI, TEC, DPI, CAM0, CAM1, DSI0E, +and DSI1E. PULSE is not added because it has an extra divider. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit d3d6f15fd376e3dbba851724057b112558c70b79) +--- + drivers/clk/bcm/clk-bcm2835.c | 90 +++++++++++++++++++++++++++++++++++++ + include/dt-bindings/clock/bcm2835.h | 14 ++++++ + 2 files changed, 104 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 2fe20f7f44f7f3627c5255c334aae17cfe702032..35f8de736cee3aa8b05c60bf4debd4c1da11fb5a 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -117,6 +117,8 @@ + #define CM_SDCCTL 0x1a8 + #define CM_SDCDIV 0x1ac + #define CM_ARMCTL 0x1b0 ++#define CM_AVEOCTL 0x1b8 ++#define CM_AVEODIV 0x1bc + #define CM_EMMCCTL 0x1c0 + #define CM_EMMCDIV 0x1c4 + +@@ -1610,6 +1612,12 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_TSENSDIV, + .int_bits = 5, + .frac_bits = 0), ++ [BCM2835_CLOCK_TEC] = REGISTER_OSC_CLK( ++ .name = "tec", ++ .ctl_reg = CM_TECCTL, ++ .div_reg = CM_TECDIV, ++ .int_bits = 6, ++ .frac_bits = 0), + + /* clocks with vpu parent mux */ + [BCM2835_CLOCK_H264] = REGISTER_VPU_CLK( +@@ -1624,6 +1632,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_ISPDIV, + .int_bits = 4, + .frac_bits = 8), ++ + /* + * Secondary SDRAM clock. Used for low-voltage modes when the PLL + * in the SDRAM controller can't be used. +@@ -1655,6 +1664,36 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .is_vpu_clock = true), + + /* clocks with per parent mux */ ++ [BCM2835_CLOCK_AVEO] = REGISTER_PER_CLK( ++ .name = "aveo", ++ .ctl_reg = CM_AVEOCTL, ++ .div_reg = CM_AVEODIV, ++ .int_bits = 4, ++ .frac_bits = 0), ++ [BCM2835_CLOCK_CAM0] = REGISTER_PER_CLK( ++ .name = "cam0", ++ .ctl_reg = CM_CAM0CTL, ++ .div_reg = CM_CAM0DIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_CAM1] = REGISTER_PER_CLK( ++ .name = "cam1", ++ .ctl_reg = CM_CAM1CTL, ++ .div_reg = CM_CAM1DIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_DFT] = REGISTER_PER_CLK( ++ .name = "dft", ++ .ctl_reg = CM_DFTCTL, ++ .div_reg = CM_DFTDIV, ++ .int_bits = 5, ++ .frac_bits = 0), ++ [BCM2835_CLOCK_DPI] = REGISTER_PER_CLK( ++ .name = "dpi", ++ .ctl_reg = CM_DPICTL, ++ .div_reg = CM_DPIDIV, ++ .int_bits = 4, ++ .frac_bits = 8), + + /* Arasan EMMC clock */ + [BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK( +@@ -1663,6 +1702,29 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_EMMCDIV, + .int_bits = 4, + .frac_bits = 8), ++ ++ /* General purpose (GPIO) clocks */ ++ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( ++ .name = "gp0", ++ .ctl_reg = CM_GP0CTL, ++ .div_reg = CM_GP0DIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_GP1] = REGISTER_PER_CLK( ++ .name = "gp1", ++ .ctl_reg = CM_GP1CTL, ++ .div_reg = CM_GP1DIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( ++ .name = "gp2", ++ .ctl_reg = CM_GP2CTL, ++ .div_reg = CM_GP2DIV, ++ .int_bits = 12, ++ .frac_bits = 12), ++ + /* HDMI state machine */ + [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( + .name = "hsm", +@@ -1684,12 +1746,26 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .int_bits = 12, + .frac_bits = 12, + .is_mash_clock = true), ++ [BCM2835_CLOCK_SLIM] = REGISTER_PER_CLK( ++ .name = "slim", ++ .ctl_reg = CM_SLIMCTL, ++ .div_reg = CM_SLIMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_SMI] = REGISTER_PER_CLK( ++ .name = "smi", ++ .ctl_reg = CM_SMICTL, ++ .div_reg = CM_SMIDIV, ++ .int_bits = 4, ++ .frac_bits = 8), + [BCM2835_CLOCK_UART] = REGISTER_PER_CLK( + .name = "uart", + .ctl_reg = CM_UARTCTL, + .div_reg = CM_UARTDIV, + .int_bits = 10, + .frac_bits = 12), ++ + /* TV encoder clock. Only operating frequency is 108Mhz. */ + [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK( + .name = "vec", +@@ -1698,6 +1774,20 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .int_bits = 4, + .frac_bits = 0), + ++ /* dsi clocks */ ++ [BCM2835_CLOCK_DSI0E] = REGISTER_PER_CLK( ++ .name = "dsi0e", ++ .ctl_reg = CM_DSI0ECTL, ++ .div_reg = CM_DSI0EDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_DSI1E] = REGISTER_PER_CLK( ++ .name = "dsi1e", ++ .ctl_reg = CM_DSI1ECTL, ++ .div_reg = CM_DSI1EDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ + /* the gates */ + + /* +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index a001e38651347d30fb1fd4faae103fee1693d37f..360e00cefd35679b49890234b5c369fb52b89e20 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -50,3 +50,17 @@ + #define BCM2835_PLLA_CCP2 33 + #define BCM2835_PLLD_DSI0 34 + #define BCM2835_PLLD_DSI1 35 ++ ++#define BCM2835_CLOCK_AVEO 36 ++#define BCM2835_CLOCK_DFT 37 ++#define BCM2835_CLOCK_GP0 38 ++#define BCM2835_CLOCK_GP1 39 ++#define BCM2835_CLOCK_GP2 40 ++#define BCM2835_CLOCK_SLIM 41 ++#define BCM2835_CLOCK_SMI 42 ++#define BCM2835_CLOCK_TEC 43 ++#define BCM2835_CLOCK_DPI 44 ++#define BCM2835_CLOCK_CAM0 45 ++#define BCM2835_CLOCK_CAM1 46 ++#define BCM2835_CLOCK_DSI0E 47 ++#define BCM2835_CLOCK_DSI1E 48 + +From 9044ec7f587636af7760deb893e9235051379ef8 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 1 Dec 2015 16:49:12 -0800 +Subject: [PATCH 264/398] ARM: bcm2835: Define two new packets from the latest + firmware. + +These packets give us direct access to the firmware's power management +code, as opposed to GET/SET_POWER_STATE packets that only had a couple +of domains implemented. + +Signed-off-by: Eric Anholt +Reviewed-by: Kevin Hilman +(cherry picked from commit 60d56333e869be6ad6926cdba3ba974512b2183b) +--- + include/soc/bcm2835/raspberrypi-firmware.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h +index e312e9cf31c4b149bfcbee525807cc45476aefc9..227a107214a02deadcca3db202da265eba1fdd21 100644 +--- a/include/soc/bcm2835/raspberrypi-firmware.h ++++ b/include/soc/bcm2835/raspberrypi-firmware.h +@@ -74,11 +74,13 @@ enum rpi_firmware_property_tag { + RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014, + RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020, + RPI_FIRMWARE_GET_CUSTOMER_OTP = 0x00030021, ++ RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030, + RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001, + RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002, + RPI_FIRMWARE_SET_VOLTAGE = 0x00038003, + RPI_FIRMWARE_SET_TURBO = 0x00038009, + RPI_FIRMWARE_SET_CUSTOMER_OTP = 0x00038021, ++ RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030, + RPI_FIRMWARE_SET_SDHOST_CLOCK = 0x00038042, + + /* Dispmanx TAGS */ + +From 2fd68664c99dbb24f8df5f65943ed3ae5873a20c Mon Sep 17 00:00:00 2001 +From: Alexander Aring +Date: Wed, 16 Dec 2015 16:26:47 -0800 +Subject: [PATCH 265/398] ARM: bcm2835: add rpi power domain driver + +This patch adds support for several power domains on Raspberry Pi, +including USB (so it can be enabled even if the bootloader didn't do +it), and graphics. + +This patch is the combined work of Eric Anholt (who wrote USB support +inside of the Raspberry Pi firmware driver, and wrote the non-USB +domain support) and Alexander Aring (who separated the original USB +work out from the firmware driver). + +Signed-off-by: Alexander Aring +Signed-off-by: Eric Anholt +Reviewed-by: Ulf Hansson +Reviewed-by: Kevin Hilman +(cherry picked from commit a09cd356586d33f64cbe64ee4f5c1a7c4a6abee5) +--- + drivers/soc/Kconfig | 1 + + drivers/soc/Makefile | 1 + + drivers/soc/bcm/Kconfig | 9 + + drivers/soc/bcm/Makefile | 1 + + drivers/soc/bcm/raspberrypi-power.c | 247 ++++++++++++++++++++++++++ + include/dt-bindings/power/raspberrypi-power.h | 41 +++++ + 6 files changed, 300 insertions(+) + create mode 100644 drivers/soc/bcm/Kconfig + create mode 100644 drivers/soc/bcm/Makefile + create mode 100644 drivers/soc/bcm/raspberrypi-power.c + create mode 100644 include/dt-bindings/power/raspberrypi-power.h + +diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig +index 4e853ed2c82b937ebd8fb6cf4c22288a122fca3a..844142620031ff73e42e6df53d4c0d9e282e16fb 100644 +--- a/drivers/soc/Kconfig ++++ b/drivers/soc/Kconfig +@@ -1,5 +1,6 @@ + menu "SOC (System On Chip) specific Drivers" + ++source "drivers/soc/bcm/Kconfig" + source "drivers/soc/brcmstb/Kconfig" + source "drivers/soc/mediatek/Kconfig" + source "drivers/soc/qcom/Kconfig" +diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile +index f2ba2e932ae10c5d2cda1de269b826b9875a4a5c..f3f955cdb04bbfc39ab324269c933ef370126683 100644 +--- a/drivers/soc/Makefile ++++ b/drivers/soc/Makefile +@@ -2,6 +2,7 @@ + # Makefile for the Linux Kernel SOC specific device drivers. + # + ++obj-y += bcm/ + obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/ + obj-$(CONFIG_MACH_DOVE) += dove/ + obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ +diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig +new file mode 100644 +index 0000000000000000000000000000000000000000..5ba1827fe36ff975b6ad37cd93afca97f86e9d53 +--- /dev/null ++++ b/drivers/soc/bcm/Kconfig +@@ -0,0 +1,9 @@ ++config RASPBERRYPI_POWER ++ bool "Raspberry Pi power domain driver" ++ depends on ARCH_BCM2835 || COMPILE_TEST ++ depends on RASPBERRYPI_FIRMWARE ++ select PM_GENERIC_DOMAINS if PM ++ select PM_GENERIC_DOMAINS_OF if PM ++ help ++ This enables support for the RPi power domains which can be enabled ++ or disabled via the RPi firmware. +diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile +new file mode 100644 +index 0000000000000000000000000000000000000000..63aa3eb23087b65c9779a1b3db22390a541ee49a +--- /dev/null ++++ b/drivers/soc/bcm/Makefile +@@ -0,0 +1 @@ ++obj-$(CONFIG_RASPBERRYPI_POWER) += raspberrypi-power.o +diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/soc/bcm/raspberrypi-power.c +new file mode 100644 +index 0000000000000000000000000000000000000000..fe96a8b956fbd54424bea059af5b0be1240c91b3 +--- /dev/null ++++ b/drivers/soc/bcm/raspberrypi-power.c +@@ -0,0 +1,247 @@ ++/* (C) 2015 Pengutronix, Alexander Aring ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Authors: ++ * Alexander Aring ++ * Eric Anholt ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* ++ * Firmware indices for the old power domains interface. Only a few ++ * of them were actually implemented. ++ */ ++#define RPI_OLD_POWER_DOMAIN_USB 3 ++#define RPI_OLD_POWER_DOMAIN_V3D 10 ++ ++struct rpi_power_domain { ++ u32 domain; ++ bool enabled; ++ bool old_interface; ++ struct generic_pm_domain base; ++ struct rpi_firmware *fw; ++}; ++ ++struct rpi_power_domains { ++ bool has_new_interface; ++ struct genpd_onecell_data xlate; ++ struct rpi_firmware *fw; ++ struct rpi_power_domain domains[RPI_POWER_DOMAIN_COUNT]; ++}; ++ ++/* ++ * Packet definition used by RPI_FIRMWARE_SET_POWER_STATE and ++ * RPI_FIRMWARE_SET_DOMAIN_STATE ++ */ ++struct rpi_power_domain_packet { ++ u32 domain; ++ u32 on; ++} __packet; ++ ++/* ++ * Asks the firmware to enable or disable power on a specific power ++ * domain. ++ */ ++static int rpi_firmware_set_power(struct rpi_power_domain *rpi_domain, bool on) ++{ ++ struct rpi_power_domain_packet packet; ++ ++ packet.domain = rpi_domain->domain; ++ packet.on = on; ++ return rpi_firmware_property(rpi_domain->fw, ++ rpi_domain->old_interface ? ++ RPI_FIRMWARE_SET_POWER_STATE : ++ RPI_FIRMWARE_SET_DOMAIN_STATE, ++ &packet, sizeof(packet)); ++} ++ ++static int rpi_domain_off(struct generic_pm_domain *domain) ++{ ++ struct rpi_power_domain *rpi_domain = ++ container_of(domain, struct rpi_power_domain, base); ++ ++ return rpi_firmware_set_power(rpi_domain, false); ++} ++ ++static int rpi_domain_on(struct generic_pm_domain *domain) ++{ ++ struct rpi_power_domain *rpi_domain = ++ container_of(domain, struct rpi_power_domain, base); ++ ++ return rpi_firmware_set_power(rpi_domain, true); ++} ++ ++static void rpi_common_init_power_domain(struct rpi_power_domains *rpi_domains, ++ int xlate_index, const char *name) ++{ ++ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; ++ ++ dom->fw = rpi_domains->fw; ++ ++ dom->base.name = name; ++ dom->base.power_on = rpi_domain_on; ++ dom->base.power_off = rpi_domain_off; ++ ++ /* ++ * Treat all power domains as off at boot. ++ * ++ * The firmware itself may be keeping some domains on, but ++ * from Linux's perspective all we control is the refcounts ++ * that we give to the firmware, and we can't ask the firmware ++ * to turn off something that we haven't ourselves turned on. ++ */ ++ pm_genpd_init(&dom->base, NULL, true); ++ ++ rpi_domains->xlate.domains[xlate_index] = &dom->base; ++} ++ ++static void rpi_init_power_domain(struct rpi_power_domains *rpi_domains, ++ int xlate_index, const char *name) ++{ ++ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; ++ ++ if (!rpi_domains->has_new_interface) ++ return; ++ ++ /* The DT binding index is the firmware's domain index minus one. */ ++ dom->domain = xlate_index + 1; ++ ++ rpi_common_init_power_domain(rpi_domains, xlate_index, name); ++} ++ ++static void rpi_init_old_power_domain(struct rpi_power_domains *rpi_domains, ++ int xlate_index, int domain, ++ const char *name) ++{ ++ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; ++ ++ dom->old_interface = true; ++ dom->domain = domain; ++ ++ rpi_common_init_power_domain(rpi_domains, xlate_index, name); ++} ++ ++/* ++ * Detects whether the firmware supports the new power domains interface. ++ * ++ * The firmware doesn't actually return an error on an unknown tag, ++ * and just skips over it, so we do the detection by putting an ++ * unexpected value in the return field and checking if it was ++ * unchanged. ++ */ ++static bool ++rpi_has_new_domain_support(struct rpi_power_domains *rpi_domains) ++{ ++ struct rpi_power_domain_packet packet; ++ int ret; ++ ++ packet.domain = RPI_POWER_DOMAIN_ARM; ++ packet.on = ~0; ++ ++ ret = rpi_firmware_property(rpi_domains->fw, ++ RPI_FIRMWARE_GET_DOMAIN_STATE, ++ &packet, sizeof(packet)); ++ ++ return ret == 0 && packet.on != ~0; ++} ++ ++static int rpi_power_probe(struct platform_device *pdev) ++{ ++ struct device_node *fw_np; ++ struct device *dev = &pdev->dev; ++ struct rpi_power_domains *rpi_domains; ++ ++ rpi_domains = devm_kzalloc(dev, sizeof(*rpi_domains), GFP_KERNEL); ++ if (!rpi_domains) ++ return -ENOMEM; ++ ++ rpi_domains->xlate.domains = ++ devm_kzalloc(dev, sizeof(*rpi_domains->xlate.domains) * ++ RPI_POWER_DOMAIN_COUNT, GFP_KERNEL); ++ if (!rpi_domains->xlate.domains) ++ return -ENOMEM; ++ ++ rpi_domains->xlate.num_domains = RPI_POWER_DOMAIN_COUNT; ++ ++ fw_np = of_parse_phandle(pdev->dev.of_node, "firmware", 0); ++ if (!fw_np) { ++ dev_err(&pdev->dev, "no firmware node\n"); ++ return -ENODEV; ++ } ++ ++ rpi_domains->fw = rpi_firmware_get(fw_np); ++ of_node_put(fw_np); ++ if (!rpi_domains->fw) ++ return -EPROBE_DEFER; ++ ++ rpi_domains->has_new_interface = ++ rpi_has_new_domain_support(rpi_domains); ++ ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C0, "I2C0"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C1, "I2C1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C2, "I2C2"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VIDEO_SCALER, ++ "VIDEO_SCALER"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VPU1, "VPU1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_HDMI, "HDMI"); ++ ++ /* ++ * Use the old firmware interface for USB power, so that we ++ * can turn it on even if the firmware hasn't been updated. ++ */ ++ rpi_init_old_power_domain(rpi_domains, RPI_POWER_DOMAIN_USB, ++ RPI_OLD_POWER_DOMAIN_USB, "USB"); ++ ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VEC, "VEC"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_JPEG, "JPEG"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_H264, "H264"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_V3D, "V3D"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ISP, "ISP"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM0, "UNICAM0"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM1, "UNICAM1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2RX, "CCP2RX"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CSI2, "CSI2"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CPI, "CPI"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI0, "DSI0"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI1, "DSI1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_TRANSPOSER, ++ "TRANSPOSER"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2TX, "CCP2TX"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CDP, "CDP"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ARM, "ARM"); ++ ++ of_genpd_add_provider_onecell(dev->of_node, &rpi_domains->xlate); ++ ++ platform_set_drvdata(pdev, rpi_domains); ++ ++ return 0; ++} ++ ++static const struct of_device_id rpi_power_of_match[] = { ++ { .compatible = "raspberrypi,bcm2835-power", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, rpi_power_of_match); ++ ++static struct platform_driver rpi_power_driver = { ++ .driver = { ++ .name = "raspberrypi-power", ++ .of_match_table = rpi_power_of_match, ++ }, ++ .probe = rpi_power_probe, ++}; ++builtin_platform_driver(rpi_power_driver); ++ ++MODULE_AUTHOR("Alexander Aring "); ++MODULE_AUTHOR("Eric Anholt "); ++MODULE_DESCRIPTION("Raspberry Pi power domain driver"); ++MODULE_LICENSE("GPL v2"); +diff --git a/include/dt-bindings/power/raspberrypi-power.h b/include/dt-bindings/power/raspberrypi-power.h +new file mode 100644 +index 0000000000000000000000000000000000000000..b3ff8e09a78f41ae29cf4a27bc956fac64f20dfb +--- /dev/null ++++ b/include/dt-bindings/power/raspberrypi-power.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright © 2015 Broadcom ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H ++#define _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H ++ ++/* These power domain indices are the firmware interface's indices ++ * minus one. ++ */ ++#define RPI_POWER_DOMAIN_I2C0 0 ++#define RPI_POWER_DOMAIN_I2C1 1 ++#define RPI_POWER_DOMAIN_I2C2 2 ++#define RPI_POWER_DOMAIN_VIDEO_SCALER 3 ++#define RPI_POWER_DOMAIN_VPU1 4 ++#define RPI_POWER_DOMAIN_HDMI 5 ++#define RPI_POWER_DOMAIN_USB 6 ++#define RPI_POWER_DOMAIN_VEC 7 ++#define RPI_POWER_DOMAIN_JPEG 8 ++#define RPI_POWER_DOMAIN_H264 9 ++#define RPI_POWER_DOMAIN_V3D 10 ++#define RPI_POWER_DOMAIN_ISP 11 ++#define RPI_POWER_DOMAIN_UNICAM0 12 ++#define RPI_POWER_DOMAIN_UNICAM1 13 ++#define RPI_POWER_DOMAIN_CCP2RX 14 ++#define RPI_POWER_DOMAIN_CSI2 15 ++#define RPI_POWER_DOMAIN_CPI 16 ++#define RPI_POWER_DOMAIN_DSI0 17 ++#define RPI_POWER_DOMAIN_DSI1 18 ++#define RPI_POWER_DOMAIN_TRANSPOSER 19 ++#define RPI_POWER_DOMAIN_CCP2TX 20 ++#define RPI_POWER_DOMAIN_CDP 21 ++#define RPI_POWER_DOMAIN_ARM 22 ++ ++#define RPI_POWER_DOMAIN_COUNT 23 ++ ++#endif /* _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H */ + +From 2f8eb81bc97bca5bb82d1101c9a1baa1d144d4cb Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Thu, 31 Dec 2015 23:39:14 +0100 +Subject: [PATCH 266/398] ARM: bcm2835: clarify RASPBERRYPI_FIRMWARE dependency + +The firmware driver can be a loadable module, but the power domain +can only be built-in, so we get a build error in an allmodconfig +kernel: + +:(.text+0x17e59c): undefined reference to `rpi_firmware_property' +:(.text+0x17e51c): undefined reference to `rpi_firmware_get' +:(.text+0x17e244): undefined reference to `rpi_firmware_property' + +This changes the dependency to only allow the power domain code +to be enabled when the firmware driver is built-in. Other users +of the firmware driver may still be loadable modules and not +everyone needs the power domains, so we don't change the firmware +code. + +Signed-off-by: Arnd Bergmann +(cherry picked from commit 22a5b1ddd83b991b96cb635898e011cce48bf6f8) +--- + drivers/soc/bcm/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig +index 5ba1827fe36ff975b6ad37cd93afca97f86e9d53..3066edea184d765a670ded0cead470597654abc1 100644 +--- a/drivers/soc/bcm/Kconfig ++++ b/drivers/soc/bcm/Kconfig +@@ -1,7 +1,7 @@ + config RASPBERRYPI_POWER + bool "Raspberry Pi power domain driver" + depends on ARCH_BCM2835 || COMPILE_TEST +- depends on RASPBERRYPI_FIRMWARE ++ depends on RASPBERRYPI_FIRMWARE=y + select PM_GENERIC_DOMAINS if PM + select PM_GENERIC_DOMAINS_OF if PM + help + +From f18576d163b7925daf04d21c4a22a0f97d399ade Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 15:55:02 -0700 +Subject: [PATCH 267/398] ARM: bcm2708: Enable building power domain driver. + +Signed-off-by: Eric Anholt +--- + drivers/soc/bcm/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig +index 3066edea184d765a670ded0cead470597654abc1..e23518142ceac6651641cc30c327d60dded319d5 100644 +--- a/drivers/soc/bcm/Kconfig ++++ b/drivers/soc/bcm/Kconfig +@@ -1,6 +1,6 @@ + config RASPBERRYPI_POWER + bool "Raspberry Pi power domain driver" +- depends on ARCH_BCM2835 || COMPILE_TEST ++ depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709 || COMPILE_TEST + depends on RASPBERRYPI_FIRMWARE=y + select PM_GENERIC_DOMAINS if PM + select PM_GENERIC_DOMAINS_OF if PM + +From abed02997d54c35d0eed3700c2d703e3e2b39036 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 14:23:30 -0700 +Subject: [PATCH 268/398] bcm2708: Add RASPBERRYPI_POWER to the defconfigs. + +This will be used by the GPU driver for powering on HDMI at boot time +and for 3D hang reset. + +Signed-off-by: Eric Anholt +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + arch/arm/configs/bcmrpi_defconfig | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 7788ecb4b42dcf0c296fe3a6cc84acf297638fcc..54c8f4ed3c41e67d46c509aab8fce3d390b1e369 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -71,6 +71,7 @@ CONFIG_NEON=y + CONFIG_KERNEL_MODE_NEON=y + CONFIG_BINFMT_MISC=m + # CONFIG_SUSPEND is not set ++CONFIG_PM=y + CONFIG_NET=y + CONFIG_PACKET=y + CONFIG_UNIX=y +@@ -1117,6 +1118,7 @@ CONFIG_FB_TFT_FBTFT_DEVICE=m + CONFIG_MAILBOX=y + CONFIG_BCM2835_MBOX=y + # CONFIG_IOMMU_SUPPORT is not set ++CONFIG_RASPBERRYPI_POWER=y + CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 5b8b19a09dd05ee19199764b8169b5dce83f158d..13471cc1c4433669c716a820a054bec99fd13aa6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -64,6 +64,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y + CONFIG_VFP=y + CONFIG_BINFMT_MISC=m + # CONFIG_SUSPEND is not set ++CONFIG_PM=y + CONFIG_NET=y + CONFIG_PACKET=y + CONFIG_UNIX=y +@@ -1124,6 +1125,7 @@ CONFIG_FB_TFT_FBTFT_DEVICE=m + CONFIG_MAILBOX=y + CONFIG_BCM2835_MBOX=y + # CONFIG_IOMMU_SUPPORT is not set ++CONFIG_RASPBERRYPI_POWER=y + CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m + +From 59b557ba7b218b7d9fa804d70235bbf77e5a438c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 14:36:31 -0700 +Subject: [PATCH 269/398] bcm2708: Add the power domain driver to the device + tree. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index e0be77a00a6c5339e5c4c26e672ddbd57f9d9c76..7ff7a886ca551c74102e1027e228bc47c6ecb749 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -285,6 +285,12 @@ + mboxes = <&mailbox>; + }; + ++ power: power { ++ compatible = "raspberrypi,bcm2835-power"; ++ firmware = <&firmware>; ++ #power-domain-cells = <1>; ++ }; ++ + leds: leds { + compatible = "gpio-leds"; + }; + +From 6e23231d420afcaccc560f1d96b3f55b74a3d085 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 14:40:08 -0700 +Subject: [PATCH 270/398] bcm2708: Reference the HDMI power domain for the HDMI + driver. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index da37483b955e8abfc5d5ce0905ed81d928474084..af540a346426974386031e6c076c7c45531435d2 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -6,6 +6,7 @@ + /plugin/; + + #include "dt-bindings/clock/bcm2835.h" ++#include "dt-bindings/power/raspberrypi-power.h" + #include "dt-bindings/gpio/gpio.h" + + / { +@@ -72,6 +73,7 @@ + clocks = <&cprman BCM2835_PLLH_PIX>, + <&cprman BCM2835_CLOCK_HSM>; + clock-names = "pixel", "hdmi"; ++ power-domains = <&power RPI_POWER_DOMAIN_HDMI>; + }; + + v3d@7ec00000 { + +From f9f5132adc16869a8cb44987e5a8c682670c5c8b Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 17 Dec 2015 15:36:28 +0300 +Subject: [PATCH 271/398] drm/vc4: copy_to_user() returns the number of bytes + remaining + +The copy_to/from_user() functions return the number of bytes remaining +to be copied. We want to return error codes here. + +Also it's a bad idea to print an error message if a copy from user fails +because users can use that to spam /var/log/messages which is annoying +so I removed those. + +Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.') +Signed-off-by: Dan Carpenter +Reviewed-by: Eric Anholt +(cherry picked from commit 65c4777de54a39b2722a4b1ff3306d044014d511) +--- + drivers/gpu/drm/vc4/vc4_gem.c | 37 ++++++++++++++++++------------------- + 1 file changed, 18 insertions(+), 19 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index a6fa63f0e8a1825de063960fad40af230e77afaa..55d452af63192c89f6bba1f6dc44559c4592d249 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -85,7 +85,7 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, + struct vc4_dev *vc4 = to_vc4_dev(dev); + unsigned long irqflags; + u32 i; +- int ret; ++ int ret = 0; + + spin_lock_irqsave(&vc4->job_lock, irqflags); + kernel_state = vc4->hang_state; +@@ -133,9 +133,11 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, + bo_state[i].size = vc4_bo->base.base.size; + } + +- ret = copy_to_user((void __user *)(uintptr_t)get_state->bo, +- bo_state, +- state->bo_count * sizeof(*bo_state)); ++ if (copy_to_user((void __user *)(uintptr_t)get_state->bo, ++ bo_state, ++ state->bo_count * sizeof(*bo_state))) ++ ret = -EFAULT; ++ + kfree(bo_state); + + err_free: +@@ -563,27 +565,24 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) + exec->shader_state = temp + exec_size; + exec->shader_state_size = args->shader_rec_count; + +- ret = copy_from_user(bin, +- (void __user *)(uintptr_t)args->bin_cl, +- args->bin_cl_size); +- if (ret) { +- DRM_ERROR("Failed to copy in bin cl\n"); ++ if (copy_from_user(bin, ++ (void __user *)(uintptr_t)args->bin_cl, ++ args->bin_cl_size)) { ++ ret = -EFAULT; + goto fail; + } + +- ret = copy_from_user(exec->shader_rec_u, +- (void __user *)(uintptr_t)args->shader_rec, +- args->shader_rec_size); +- if (ret) { +- DRM_ERROR("Failed to copy in shader recs\n"); ++ if (copy_from_user(exec->shader_rec_u, ++ (void __user *)(uintptr_t)args->shader_rec, ++ args->shader_rec_size)) { ++ ret = -EFAULT; + goto fail; + } + +- ret = copy_from_user(exec->uniforms_u, +- (void __user *)(uintptr_t)args->uniforms, +- args->uniforms_size); +- if (ret) { +- DRM_ERROR("Failed to copy in uniforms cl\n"); ++ if (copy_from_user(exec->uniforms_u, ++ (void __user *)(uintptr_t)args->uniforms, ++ args->uniforms_size)) { ++ ret = -EFAULT; + goto fail; + } + + +From b87d626757de6c89bc3fbd134c1942d0f9ec1a33 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 17 Dec 2015 15:39:08 +0300 +Subject: [PATCH 272/398] drm/vc4: allocate enough memory in + vc4_save_hang_state() + +"state" is smaller than "kernel_state" so we end up corrupting memory. + +Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.') +Signed-off-by: Dan Carpenter +Reviewed-by: Eric Anholt +(cherry picked from commit 7e5082fbc00cc157e57a70cdb6b9bbb21289afb1) +--- + drivers/gpu/drm/vc4/vc4_gem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index 55d452af63192c89f6bba1f6dc44559c4592d249..456333f5dc785bcd607ac9803df25e9ff582d51c 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -159,7 +159,7 @@ vc4_save_hang_state(struct drm_device *dev) + unsigned long irqflags; + unsigned int i, unref_list_count; + +- kernel_state = kcalloc(1, sizeof(*state), GFP_KERNEL); ++ kernel_state = kcalloc(1, sizeof(*kernel_state), GFP_KERNEL); + if (!kernel_state) + return; + + +From ca7699321b219f40f9cf516c931bef7532fee397 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Mon, 18 Jan 2016 09:10:42 +1000 +Subject: [PATCH 273/398] drm/vc4: fix warning in validate printf. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This just fixes a warning on 64-bit builds: + + drivers/gpu/drm/vc4/vc4_validate.c: In function ‘validate_gl_shader_rec’: + drivers/gpu/drm/vc4/vc4_validate.c:864:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] + +Reported-by: Linus Torvalds +Signed-off-by: Dave Airlie +Signed-off-by: Linus Torvalds +(cherry picked from commit c671e1e30259da587d7a0162895200601979ee65) +--- + drivers/gpu/drm/vc4/vc4_validate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c +index 839696007e97528070a8c2c3676d4f30f3dd6d80..24c2c746e8f397aafd0285323508bd2ee351d3a2 100644 +--- a/drivers/gpu/drm/vc4/vc4_validate.c ++++ b/drivers/gpu/drm/vc4/vc4_validate.c +@@ -861,7 +861,7 @@ validate_gl_shader_rec(struct drm_device *dev, + + if (vbo->base.size < offset || + vbo->base.size - offset < attr_size) { +- DRM_ERROR("BO offset overflow (%d + %d > %d)\n", ++ DRM_ERROR("BO offset overflow (%d + %d > %zu)\n", + offset, attr_size, vbo->base.size); + return -EINVAL; + } + +From 80312788ab2d1f6da314fea4f1a0657109464920 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:14:09 -0800 +Subject: [PATCH 274/398] drm/vc4: Improve comments on vc4_plane_state members. + +Signed-off-by: Eric Anholt +(cherry picked from commit f427fb16cf756548c39256b569cf083f39bcc4e9) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 0f85eb5b9f3d49fb24f3981eafca964af552db79..43f461680d573868f2491f5258514bf293e81b0f 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -26,16 +26,19 @@ + + struct vc4_plane_state { + struct drm_plane_state base; ++ /* System memory copy of the display list for this element, computed ++ * at atomic_check time. ++ */ + u32 *dlist; +- u32 dlist_size; /* Number of dwords in allocated for the display list */ ++ u32 dlist_size; /* Number of dwords allocated for the display list */ + u32 dlist_count; /* Number of used dwords in the display list. */ + + /* Offset in the dlist to pointer word 0. */ + u32 pw0_offset; + + /* Offset where the plane's dlist was last stored in the +- hardware at vc4_crtc_atomic_flush() time. +- */ ++ * hardware at vc4_crtc_atomic_flush() time. ++ */ + u32 *hw_dlist; + }; + + +From 55a3d6ee8302dad3fbe903dad94fdd3bca5ec366 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:14:57 -0800 +Subject: [PATCH 275/398] drm/vc4: Add missing __iomem annotation to hw_dlist. + +This is the pointer to the HVS device's memory where we stored the +contents of *dlist. + +Signed-off-by: Eric Anholt +(cherry picked from commit 17eac75111ebda33e13d8d8d98aaedfc1a9c2abf) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 43f461680d573868f2491f5258514bf293e81b0f..b5b760a9f4f1cc08c0d798e1aafe7540eb922842 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -39,7 +39,7 @@ struct vc4_plane_state { + /* Offset where the plane's dlist was last stored in the + * hardware at vc4_crtc_atomic_flush() time. + */ +- u32 *hw_dlist; ++ u32 __iomem *hw_dlist; + }; + + static inline struct vc4_plane_state * + +From 788b4c9002ec3ae305e89c1bb2647807809e1d8c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:34:44 -0800 +Subject: [PATCH 276/398] drm/vc4: Move the plane clipping/scaling setup to a + separate function. + +As we add actual scaling, this is going to get way more complicated. + +Signed-off-by: Eric Anholt +(cherry picked from commit 5c6799942003df91801b1d2277bba34d71f99603) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 78 +++++++++++++++++++++++++++-------------- + 1 file changed, 52 insertions(+), 26 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index b5b760a9f4f1cc08c0d798e1aafe7540eb922842..6edd87323f4ed52daa015239af2ae97e2443917a 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -40,6 +40,14 @@ struct vc4_plane_state { + * hardware at vc4_crtc_atomic_flush() time. + */ + u32 __iomem *hw_dlist; ++ ++ /* Clipped coordinates of the plane on the display. */ ++ int crtc_x, crtc_y, crtc_w, crtc_h; ++ ++ /* Offset to start scanning out from the start of the plane's ++ * BO. ++ */ ++ u32 offset; + }; + + static inline struct vc4_plane_state * +@@ -167,22 +175,17 @@ static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) + vc4_state->dlist[vc4_state->dlist_count++] = val; + } + +-/* Writes out a full display list for an active plane to the plane's +- * private dlist state. +- */ +-static int vc4_plane_mode_set(struct drm_plane *plane, +- struct drm_plane_state *state) ++static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + { + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; +- struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); +- u32 ctl0_offset = vc4_state->dlist_count; +- const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); +- uint32_t offset = fb->offsets[0]; +- int crtc_x = state->crtc_x; +- int crtc_y = state->crtc_y; +- int crtc_w = state->crtc_w; +- int crtc_h = state->crtc_h; ++ ++ vc4_state->offset = fb->offsets[0]; ++ ++ vc4_state->crtc_x = state->crtc_x; ++ vc4_state->crtc_y = state->crtc_y; ++ vc4_state->crtc_w = state->crtc_w; ++ vc4_state->crtc_h = state->crtc_h; + + if (state->crtc_w << 16 != state->src_w || + state->crtc_h << 16 != state->src_h) { +@@ -194,18 +197,41 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + return -EINVAL; + } + +- if (crtc_x < 0) { +- offset += drm_format_plane_cpp(fb->pixel_format, 0) * -crtc_x; +- crtc_w += crtc_x; +- crtc_x = 0; ++ if (vc4_state->crtc_x < 0) { ++ vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, ++ 0) * ++ -vc4_state->crtc_x); ++ vc4_state->crtc_w += vc4_state->crtc_x; ++ vc4_state->crtc_x = 0; + } + +- if (crtc_y < 0) { +- offset += fb->pitches[0] * -crtc_y; +- crtc_h += crtc_y; +- crtc_y = 0; ++ if (vc4_state->crtc_y < 0) { ++ vc4_state->offset += fb->pitches[0] * -vc4_state->crtc_y; ++ vc4_state->crtc_h += vc4_state->crtc_y; ++ vc4_state->crtc_y = 0; + } + ++ return 0; ++} ++ ++ ++/* Writes out a full display list for an active plane to the plane's ++ * private dlist state. ++ */ ++static int vc4_plane_mode_set(struct drm_plane *plane, ++ struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ struct drm_framebuffer *fb = state->fb; ++ struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); ++ u32 ctl0_offset = vc4_state->dlist_count; ++ const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); ++ int ret; ++ ++ ret = vc4_plane_setup_clipping_and_scaling(state); ++ if (ret) ++ return ret; ++ + vc4_dlist_write(vc4_state, + SCALER_CTL0_VALID | + (format->pixel_order << SCALER_CTL0_ORDER_SHIFT) | +@@ -215,8 +241,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + /* Position Word 0: Image Positions and Alpha Value */ + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(0xff, SCALER_POS0_FIXED_ALPHA) | +- VC4_SET_FIELD(crtc_x, SCALER_POS0_START_X) | +- VC4_SET_FIELD(crtc_y, SCALER_POS0_START_Y)); ++ VC4_SET_FIELD(vc4_state->crtc_x, SCALER_POS0_START_X) | ++ VC4_SET_FIELD(vc4_state->crtc_y, SCALER_POS0_START_Y)); + + /* Position Word 1: Scaled Image Dimensions. + * Skipped due to SCALER_CTL0_UNITY scaling. +@@ -228,8 +254,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_POS2_ALPHA_MODE_PIPELINE : + SCALER_POS2_ALPHA_MODE_FIXED, + SCALER_POS2_ALPHA_MODE) | +- VC4_SET_FIELD(crtc_w, SCALER_POS2_WIDTH) | +- VC4_SET_FIELD(crtc_h, SCALER_POS2_HEIGHT)); ++ VC4_SET_FIELD(vc4_state->crtc_w, SCALER_POS2_WIDTH) | ++ VC4_SET_FIELD(vc4_state->crtc_h, SCALER_POS2_HEIGHT)); + + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); +@@ -237,7 +263,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + vc4_state->pw0_offset = vc4_state->dlist_count; + + /* Pointer Word 0: RGB / Y Pointer */ +- vc4_dlist_write(vc4_state, bo->paddr + offset); ++ vc4_dlist_write(vc4_state, bo->paddr + vc4_state->offset); + + /* Pointer Context Word 0: Written by the HVS */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +From f159dc31c12195297c64e2e4f11040d7f56d5fd4 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 30 Dec 2015 11:50:22 -0800 +Subject: [PATCH 277/398] drm/vc4: Add a proper short-circut path for legacy + cursor updates. + +Previously, on every modeset we would allocate new display list +memory, recompute changed planes, write all of them to the new memory, +and pointed scanout at the new list (which will latch approximately at +the next line of scanout). We let +drm_atomic_helper_wait_for_vblanks() decide whether we needed to wait +for a vblank after a modeset before cleaning up the old state and +letting the next modeset proceed, and on legacy cursor updates we +wouldn't wait. If you moved the cursor fast enough, we could +potentially wrap around the display list memory area and overwrite the +existing display list while it was still being scanned out, resulting +in the HVS scanning out garbage or just halting. + +Instead of making cursor updates wait for scanout to move to the new +display list area (which introduces significant cursor lag in X), we +just rewrite our current display list. + +Signed-off-by: Eric Anholt +(cherry picked from commit 6674a904d68041d982ffb284d2827410765a097a) +--- + drivers/gpu/drm/vc4/vc4_kms.c | 9 ++++ + drivers/gpu/drm/vc4/vc4_plane.c | 94 ++++++++++++++++++++++++++++++++++++++--- + 2 files changed, 96 insertions(+), 7 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index f95f2df5f8d1a52031a35dd26b03331c513fe13e..4718ae5176cc6813a033d12783c30af726d95756 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -49,6 +49,15 @@ vc4_atomic_complete_commit(struct vc4_commit *c) + + drm_atomic_helper_commit_modeset_enables(dev, state); + ++ /* Make sure that drm_atomic_helper_wait_for_vblanks() ++ * actually waits for vblank. If we're doing a full atomic ++ * modeset (as opposed to a vc4_update_plane() short circuit), ++ * then we need to wait for scanout to be done with our ++ * display lists before we free it and potentially reallocate ++ * and overwrite the dlist memory with a new modeset. ++ */ ++ state->legacy_cursor_update = false; ++ + drm_atomic_helper_wait_for_vblanks(dev, state); + + drm_atomic_helper_cleanup_planes(dev, state); +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 6edd87323f4ed52daa015239af2ae97e2443917a..dad66017ebb4668546d8fe5cd2d93aaf52c30666 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -33,8 +33,12 @@ struct vc4_plane_state { + u32 dlist_size; /* Number of dwords allocated for the display list */ + u32 dlist_count; /* Number of used dwords in the display list. */ + +- /* Offset in the dlist to pointer word 0. */ +- u32 pw0_offset; ++ /* Offset in the dlist to various words, for pageflip or ++ * cursor updates. ++ */ ++ u32 pos0_offset; ++ u32 pos2_offset; ++ u32 ptr0_offset; + + /* Offset where the plane's dlist was last stored in the + * hardware at vc4_crtc_atomic_flush() time. +@@ -239,6 +243,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_CTL0_UNITY); + + /* Position Word 0: Image Positions and Alpha Value */ ++ vc4_state->pos0_offset = vc4_state->dlist_count; + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(0xff, SCALER_POS0_FIXED_ALPHA) | + VC4_SET_FIELD(vc4_state->crtc_x, SCALER_POS0_START_X) | +@@ -249,6 +254,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + */ + + /* Position Word 2: Source Image Size, Alpha Mode */ ++ vc4_state->pos2_offset = vc4_state->dlist_count; + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(format->has_alpha ? + SCALER_POS2_ALPHA_MODE_PIPELINE : +@@ -260,9 +266,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +- vc4_state->pw0_offset = vc4_state->dlist_count; +- + /* Pointer Word 0: RGB / Y Pointer */ ++ vc4_state->ptr0_offset = vc4_state->dlist_count; + vc4_dlist_write(vc4_state, bo->paddr + vc4_state->offset); + + /* Pointer Context Word 0: Written by the HVS */ +@@ -348,13 +353,13 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb) + * scanout will start from this address as soon as the FIFO + * needs to refill with pixels. + */ +- writel(addr, &vc4_state->hw_dlist[vc4_state->pw0_offset]); ++ writel(addr, &vc4_state->hw_dlist[vc4_state->ptr0_offset]); + + /* Also update the CPU-side dlist copy, so that any later + * atomic updates that don't do a new modeset on our plane + * also use our updated address. + */ +- vc4_state->dlist[vc4_state->pw0_offset] = addr; ++ vc4_state->dlist[vc4_state->ptr0_offset] = addr; + } + + static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = { +@@ -370,8 +375,83 @@ static void vc4_plane_destroy(struct drm_plane *plane) + drm_plane_cleanup(plane); + } + ++/* Implements immediate (non-vblank-synced) updates of the cursor ++ * position, or falls back to the atomic helper otherwise. ++ */ ++static int ++vc4_update_plane(struct drm_plane *plane, ++ struct drm_crtc *crtc, ++ struct drm_framebuffer *fb, ++ int crtc_x, int crtc_y, ++ unsigned int crtc_w, unsigned int crtc_h, ++ uint32_t src_x, uint32_t src_y, ++ uint32_t src_w, uint32_t src_h) ++{ ++ struct drm_plane_state *plane_state; ++ struct vc4_plane_state *vc4_state; ++ ++ if (plane != crtc->cursor) ++ goto out; ++ ++ plane_state = plane->state; ++ vc4_state = to_vc4_plane_state(plane_state); ++ ++ if (!plane_state) ++ goto out; ++ ++ /* If we're changing the cursor contents, do that in the ++ * normal vblank-synced atomic path. ++ */ ++ if (fb != plane_state->fb) ++ goto out; ++ ++ /* No configuring new scaling in the fast path. */ ++ if (crtc_w != plane_state->crtc_w || ++ crtc_h != plane_state->crtc_h || ++ src_w != plane_state->src_w || ++ src_h != plane_state->src_h) { ++ goto out; ++ } ++ ++ /* Set the cursor's position on the screen. This is the ++ * expected change from the drm_mode_cursor_universal() ++ * helper. ++ */ ++ plane_state->crtc_x = crtc_x; ++ plane_state->crtc_y = crtc_y; ++ ++ /* Allow changing the start position within the cursor BO, if ++ * that matters. ++ */ ++ plane_state->src_x = src_x; ++ plane_state->src_y = src_y; ++ ++ /* Update the display list based on the new crtc_x/y. */ ++ vc4_plane_atomic_check(plane, plane_state); ++ ++ /* Note that we can't just call vc4_plane_write_dlist() ++ * because that would smash the context data that the HVS is ++ * currently using. ++ */ ++ writel(vc4_state->dlist[vc4_state->pos0_offset], ++ &vc4_state->hw_dlist[vc4_state->pos0_offset]); ++ writel(vc4_state->dlist[vc4_state->pos2_offset], ++ &vc4_state->hw_dlist[vc4_state->pos2_offset]); ++ writel(vc4_state->dlist[vc4_state->ptr0_offset], ++ &vc4_state->hw_dlist[vc4_state->ptr0_offset]); ++ ++ return 0; ++ ++out: ++ return drm_atomic_helper_update_plane(plane, crtc, fb, ++ crtc_x, crtc_y, ++ crtc_w, crtc_h, ++ src_x, src_y, ++ src_w, src_h); ++} ++ + static const struct drm_plane_funcs vc4_plane_funcs = { +- .update_plane = drm_atomic_helper_update_plane, ++ .update_plane = vc4_update_plane, + .disable_plane = drm_atomic_helper_disable_plane, + .destroy = vc4_plane_destroy, + .set_property = NULL, + +From d063af0f7115d13a2aef83663c03ac496d1535ed Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 13:25:41 -0800 +Subject: [PATCH 278/398] drm/vc4: Make the CRTCs cooperate on allocating + display lists. + +So far, we've only ever lit up one CRTC, so this has been fine. To +extend to more displays or more planes, we need to make sure we don't +run our display lists into each other. + +Signed-off-by: Eric Anholt +(cherry picked from commit d8dbf44f13b91185c618219d912b246817a8d132) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 115 +++++++++++++++++++++++------------------ + drivers/gpu/drm/vc4/vc4_drv.h | 8 ++- + drivers/gpu/drm/vc4/vc4_hvs.c | 13 +++++ + 3 files changed, 84 insertions(+), 52 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 3c6791467e835032e167fc25c4ecb4cef9bd98c4..2735d44fc92f7907545c3bc9574486d60a3ab050 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -49,22 +49,27 @@ struct vc4_crtc { + /* Which HVS channel we're using for our CRTC. */ + int channel; + +- /* Pointer to the actual hardware display list memory for the +- * crtc. +- */ +- u32 __iomem *dlist; +- +- u32 dlist_size; /* in dwords */ +- + struct drm_pending_vblank_event *event; + }; + ++struct vc4_crtc_state { ++ struct drm_crtc_state base; ++ /* Dlist area for this CRTC configuration. */ ++ struct drm_mm_node mm; ++}; ++ + static inline struct vc4_crtc * + to_vc4_crtc(struct drm_crtc *crtc) + { + return (struct vc4_crtc *)crtc; + } + ++static inline struct vc4_crtc_state * ++to_vc4_crtc_state(struct drm_crtc_state *crtc_state) ++{ ++ return (struct vc4_crtc_state *)crtc_state; ++} ++ + struct vc4_crtc_data { + /* Which channel of the HVS this pixelvalve sources from. */ + int hvs_channel; +@@ -319,11 +324,13 @@ static void vc4_crtc_enable(struct drm_crtc *crtc) + static int vc4_crtc_atomic_check(struct drm_crtc *crtc, + struct drm_crtc_state *state) + { ++ struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state); + struct drm_device *dev = crtc->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + struct drm_plane *plane; +- struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ unsigned long flags; + u32 dlist_count = 0; ++ int ret; + + /* The pixelvalve can only feed one encoder (and encoders are + * 1:1 with connectors.) +@@ -346,18 +353,12 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc, + + dlist_count++; /* Account for SCALER_CTL0_END. */ + +- if (!vc4_crtc->dlist || dlist_count > vc4_crtc->dlist_size) { +- vc4_crtc->dlist = ((u32 __iomem *)vc4->hvs->dlist + +- HVS_BOOTLOADER_DLIST_END); +- vc4_crtc->dlist_size = ((SCALER_DLIST_SIZE >> 2) - +- HVS_BOOTLOADER_DLIST_END); +- +- if (dlist_count > vc4_crtc->dlist_size) { +- DRM_DEBUG_KMS("dlist too large for CRTC (%d > %d).\n", +- dlist_count, vc4_crtc->dlist_size); +- return -EINVAL; +- } +- } ++ spin_lock_irqsave(&vc4->hvs->mm_lock, flags); ++ ret = drm_mm_insert_node(&vc4->hvs->dlist_mm, &vc4_state->mm, ++ dlist_count, 1, 0); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, flags); ++ if (ret) ++ return ret; + + return 0; + } +@@ -368,47 +369,29 @@ static void vc4_crtc_atomic_flush(struct drm_crtc *crtc, + struct drm_device *dev = crtc->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); + struct drm_plane *plane; + bool debug_dump_regs = false; +- u32 __iomem *dlist_next = vc4_crtc->dlist; ++ u32 __iomem *dlist_start = vc4->hvs->dlist + vc4_state->mm.start; ++ u32 __iomem *dlist_next = dlist_start; + + if (debug_dump_regs) { + DRM_INFO("CRTC %d HVS before:\n", drm_crtc_index(crtc)); + vc4_hvs_dump_state(dev); + } + +- /* Copy all the active planes' dlist contents to the hardware dlist. +- * +- * XXX: If the new display list was large enough that it +- * overlapped a currently-read display list, we need to do +- * something like disable scanout before putting in the new +- * list. For now, we're safe because we only have the two +- * planes. +- */ ++ /* Copy all the active planes' dlist contents to the hardware dlist. */ + drm_atomic_crtc_for_each_plane(plane, crtc) { + dlist_next += vc4_plane_write_dlist(plane, dlist_next); + } + +- if (dlist_next == vc4_crtc->dlist) { +- /* If no planes were enabled, use the SCALER_CTL0_END +- * at the start of the display list memory (in the +- * bootloader section). We'll rewrite that +- * SCALER_CTL0_END, just in case, though. +- */ +- writel(SCALER_CTL0_END, vc4->hvs->dlist); +- HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), 0); +- } else { +- writel(SCALER_CTL0_END, dlist_next); +- dlist_next++; +- +- HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), +- (u32 __iomem *)vc4_crtc->dlist - +- (u32 __iomem *)vc4->hvs->dlist); +- +- /* Make the next display list start after ours. */ +- vc4_crtc->dlist_size -= (dlist_next - vc4_crtc->dlist); +- vc4_crtc->dlist = dlist_next; +- } ++ writel(SCALER_CTL0_END, dlist_next); ++ dlist_next++; ++ ++ WARN_ON_ONCE(dlist_next - dlist_start != vc4_state->mm.size); ++ ++ HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), ++ vc4_state->mm.start); + + if (debug_dump_regs) { + DRM_INFO("CRTC %d HVS after:\n", drm_crtc_index(crtc)); +@@ -573,6 +556,36 @@ static int vc4_page_flip(struct drm_crtc *crtc, + return drm_atomic_helper_page_flip(crtc, fb, event, flags); + } + ++static struct drm_crtc_state *vc4_crtc_duplicate_state(struct drm_crtc *crtc) ++{ ++ struct vc4_crtc_state *vc4_state; ++ ++ vc4_state = kzalloc(sizeof(*vc4_state), GFP_KERNEL); ++ if (!vc4_state) ++ return NULL; ++ ++ __drm_atomic_helper_crtc_duplicate_state(crtc, &vc4_state->base); ++ return &vc4_state->base; ++} ++ ++static void vc4_crtc_destroy_state(struct drm_crtc *crtc, ++ struct drm_crtc_state *state) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(crtc->dev); ++ struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state); ++ ++ if (vc4_state->mm.allocated) { ++ unsigned long flags; ++ ++ spin_lock_irqsave(&vc4->hvs->mm_lock, flags); ++ drm_mm_remove_node(&vc4_state->mm); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, flags); ++ ++ } ++ ++ __drm_atomic_helper_crtc_destroy_state(crtc, state); ++} ++ + static const struct drm_crtc_funcs vc4_crtc_funcs = { + .set_config = drm_atomic_helper_set_config, + .destroy = vc4_crtc_destroy, +@@ -581,8 +594,8 @@ static const struct drm_crtc_funcs vc4_crtc_funcs = { + .cursor_set = NULL, /* handled by drm_mode_cursor_universal */ + .cursor_move = NULL, /* handled by drm_mode_cursor_universal */ + .reset = drm_atomic_helper_crtc_reset, +- .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, +- .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, ++ .atomic_duplicate_state = vc4_crtc_duplicate_state, ++ .atomic_destroy_state = vc4_crtc_destroy_state, + }; + + static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index aa0d00e6f6c8147eabbe165f0dbdd5e854086bd4..52b747854994fc3fd0ebf1933daea0d9947a61ed 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -150,7 +150,13 @@ struct vc4_v3d { + struct vc4_hvs { + struct platform_device *pdev; + void __iomem *regs; +- void __iomem *dlist; ++ u32 __iomem *dlist; ++ ++ /* Memory manager for CRTCs to allocate space in the display ++ * list. Units are dwords. ++ */ ++ struct drm_mm dlist_mm; ++ spinlock_t mm_lock; + }; + + struct vc4_plane { +diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c +index 8098c5b21ba447c43a16c7a62b9a4de0590abe1f..9e435545b3b65c5148c36c04babacd263e29d381 100644 +--- a/drivers/gpu/drm/vc4/vc4_hvs.c ++++ b/drivers/gpu/drm/vc4/vc4_hvs.c +@@ -119,6 +119,17 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) + + hvs->dlist = hvs->regs + SCALER_DLIST_START; + ++ spin_lock_init(&hvs->mm_lock); ++ ++ /* Set up the HVS display list memory manager. We never ++ * overwrite the setup from the bootloader (just 128b out of ++ * our 16K), since we don't want to scramble the screen when ++ * transitioning from the firmware's boot setup to runtime. ++ */ ++ drm_mm_init(&hvs->dlist_mm, ++ HVS_BOOTLOADER_DLIST_END, ++ (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END); ++ + vc4->hvs = hvs; + return 0; + } +@@ -129,6 +140,8 @@ static void vc4_hvs_unbind(struct device *dev, struct device *master, + struct drm_device *drm = dev_get_drvdata(master); + struct vc4_dev *vc4 = drm->dev_private; + ++ drm_mm_takedown(&vc4->hvs->dlist_mm); ++ + vc4->hvs = NULL; + } + + +From 2b1868f853b3dd83af22ed6efbb724de5b7d07c8 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 20 Oct 2015 14:18:56 +0100 +Subject: [PATCH 279/398] drm/vc4: Add more display planes to each CRTC. + +Previously we only did the primary and cursor plane, but overlay +planes are useful and just require this setup to add, since all planes +go into the HVS display list in the same way. + +Signed-off-by: Eric Anholt +(cherry picked from commit fc2d6f1eabee9d971453da2a27a72471c2a347dd) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 56 ++++++++++++++++++++++++++++++------------ + 1 file changed, 40 insertions(+), 16 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 2735d44fc92f7907545c3bc9574486d60a3ab050..dad6a8ba380965599f5259291a9aae22b4d705f5 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -677,9 +677,9 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + struct vc4_dev *vc4 = to_vc4_dev(drm); + struct vc4_crtc *vc4_crtc; + struct drm_crtc *crtc; +- struct drm_plane *primary_plane, *cursor_plane; ++ struct drm_plane *primary_plane, *cursor_plane, *destroy_plane, *temp; + const struct of_device_id *match; +- int ret; ++ int ret, i; + + vc4_crtc = devm_kzalloc(dev, sizeof(*vc4_crtc), GFP_KERNEL); + if (!vc4_crtc) +@@ -708,27 +708,49 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + goto err; + } + +- cursor_plane = vc4_plane_init(drm, DRM_PLANE_TYPE_CURSOR); +- if (IS_ERR(cursor_plane)) { +- dev_err(dev, "failed to construct cursor plane\n"); +- ret = PTR_ERR(cursor_plane); +- goto err_primary; +- } +- +- drm_crtc_init_with_planes(drm, crtc, primary_plane, cursor_plane, ++ drm_crtc_init_with_planes(drm, crtc, primary_plane, NULL, + &vc4_crtc_funcs); + drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs); + primary_plane->crtc = crtc; +- cursor_plane->crtc = crtc; + vc4->crtc[drm_crtc_index(crtc)] = vc4_crtc; + vc4_crtc->channel = vc4_crtc->data->hvs_channel; + ++ /* Set up some arbitrary number of planes. We're not limited ++ * by a set number of physical registers, just the space in ++ * the HVS (16k) and how small an plane can be (28 bytes). ++ * However, each plane we set up takes up some memory, and ++ * increases the cost of looping over planes, which atomic ++ * modesetting does quite a bit. As a result, we pick a ++ * modest number of planes to expose, that should hopefully ++ * still cover any sane usecase. ++ */ ++ for (i = 0; i < 8; i++) { ++ struct drm_plane *plane = ++ vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY); ++ ++ if (IS_ERR(plane)) ++ continue; ++ ++ plane->possible_crtcs = 1 << drm_crtc_index(crtc); ++ } ++ ++ /* Set up the legacy cursor after overlay initialization, ++ * since we overlay planes on the CRTC in the order they were ++ * initialized. ++ */ ++ cursor_plane = vc4_plane_init(drm, DRM_PLANE_TYPE_CURSOR); ++ if (!IS_ERR(cursor_plane)) { ++ cursor_plane->possible_crtcs = 1 << drm_crtc_index(crtc); ++ cursor_plane->crtc = crtc; ++ crtc->cursor = cursor_plane; ++ } ++ + CRTC_WRITE(PV_INTEN, 0); + CRTC_WRITE(PV_INTSTAT, PV_INT_VFP_START); + ret = devm_request_irq(dev, platform_get_irq(pdev, 0), + vc4_crtc_irq_handler, 0, "vc4 crtc", vc4_crtc); + if (ret) +- goto err_cursor; ++ goto err_destroy_planes; + + vc4_set_crtc_possible_masks(drm, crtc); + +@@ -736,10 +758,12 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + + return 0; + +-err_cursor: +- cursor_plane->funcs->destroy(cursor_plane); +-err_primary: +- primary_plane->funcs->destroy(primary_plane); ++err_destroy_planes: ++ list_for_each_entry_safe(destroy_plane, temp, ++ &drm->mode_config.plane_list, head) { ++ if (destroy_plane->possible_crtcs == 1 << drm_crtc_index(crtc)) ++ destroy_plane->funcs->destroy(destroy_plane); ++ } + err: + return ret; + } + +From ff5084d6b39a8b80b98bc5efd33b759ec7b157d7 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:45:25 -0800 +Subject: [PATCH 280/398] drm/vc4: Fix which value is being used for source + image size. + +This doesn't matter yet since we only allow 1:1 scaling, but the +comment clearly says we should be using the source size. + +Signed-off-by: Eric Anholt +(cherry picked from commit f863e356013d628fa65b1cd89aa298eed26fc936) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index dad66017ebb4668546d8fe5cd2d93aaf52c30666..50a51dc5d68d66e0278994a5a6409ded316f96cc 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -47,6 +47,8 @@ struct vc4_plane_state { + + /* Clipped coordinates of the plane on the display. */ + int crtc_x, crtc_y, crtc_w, crtc_h; ++ /* Clipped size of the area scanned from in the FB. */ ++ u32 src_w, src_h; + + /* Offset to start scanning out from the start of the plane's + * BO. +@@ -186,11 +188,6 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + + vc4_state->offset = fb->offsets[0]; + +- vc4_state->crtc_x = state->crtc_x; +- vc4_state->crtc_y = state->crtc_y; +- vc4_state->crtc_w = state->crtc_w; +- vc4_state->crtc_h = state->crtc_h; +- + if (state->crtc_w << 16 != state->src_w || + state->crtc_h << 16 != state->src_h) { + /* We don't support scaling yet, which involves +@@ -201,17 +198,25 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + return -EINVAL; + } + ++ vc4_state->src_w = state->src_w >> 16; ++ vc4_state->src_h = state->src_h >> 16; ++ ++ vc4_state->crtc_x = state->crtc_x; ++ vc4_state->crtc_y = state->crtc_y; ++ vc4_state->crtc_w = state->crtc_w; ++ vc4_state->crtc_h = state->crtc_h; ++ + if (vc4_state->crtc_x < 0) { + vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, + 0) * + -vc4_state->crtc_x); +- vc4_state->crtc_w += vc4_state->crtc_x; ++ vc4_state->src_w += vc4_state->crtc_x; + vc4_state->crtc_x = 0; + } + + if (vc4_state->crtc_y < 0) { + vc4_state->offset += fb->pitches[0] * -vc4_state->crtc_y; +- vc4_state->crtc_h += vc4_state->crtc_y; ++ vc4_state->src_h += vc4_state->crtc_y; + vc4_state->crtc_y = 0; + } + +@@ -260,8 +265,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_POS2_ALPHA_MODE_PIPELINE : + SCALER_POS2_ALPHA_MODE_FIXED, + SCALER_POS2_ALPHA_MODE) | +- VC4_SET_FIELD(vc4_state->crtc_w, SCALER_POS2_WIDTH) | +- VC4_SET_FIELD(vc4_state->crtc_h, SCALER_POS2_HEIGHT)); ++ VC4_SET_FIELD(vc4_state->src_w, SCALER_POS2_WIDTH) | ++ VC4_SET_FIELD(vc4_state->src_h, SCALER_POS2_HEIGHT)); + + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +From 280653e31394154803ca5d9cc79f190eb0db4150 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 20 Oct 2015 16:06:57 +0100 +Subject: [PATCH 281/398] drm/vc4: Add support for scaling of display planes. + +This implements a simple policy for choosing scaling modes +(trapezoidal for decimation, PPF for magnification), and a single PPF +filter (Mitchell/Netravali's recommendation). + +Signed-off-by: Eric Anholt +(cherry picked from commit 21af94cf1a4c2d3450ab7fead58e6e2291ab92a9) +--- + drivers/gpu/drm/vc4/vc4_drv.h | 4 + + drivers/gpu/drm/vc4/vc4_hvs.c | 84 +++++++++++++ + drivers/gpu/drm/vc4/vc4_plane.c | 253 +++++++++++++++++++++++++++++++++++++--- + drivers/gpu/drm/vc4/vc4_regs.h | 46 ++++++++ + 4 files changed, 374 insertions(+), 13 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 52b747854994fc3fd0ebf1933daea0d9947a61ed..49665d20239399b44e588419a9eee653d80c1b04 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -156,7 +156,11 @@ struct vc4_hvs { + * list. Units are dwords. + */ + struct drm_mm dlist_mm; ++ /* Memory manager for the LBM memory used by HVS scaling. */ ++ struct drm_mm lbm_mm; + spinlock_t mm_lock; ++ ++ struct drm_mm_node mitchell_netravali_filter; + }; + + struct vc4_plane { +diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c +index 9e435545b3b65c5148c36c04babacd263e29d381..6fbab1c82cb1089bde0834f3e0bf1fdf99f54221 100644 +--- a/drivers/gpu/drm/vc4/vc4_hvs.c ++++ b/drivers/gpu/drm/vc4/vc4_hvs.c +@@ -100,12 +100,76 @@ int vc4_hvs_debugfs_regs(struct seq_file *m, void *unused) + } + #endif + ++/* The filter kernel is composed of dwords each containing 3 9-bit ++ * signed integers packed next to each other. ++ */ ++#define VC4_INT_TO_COEFF(coeff) (coeff & 0x1ff) ++#define VC4_PPF_FILTER_WORD(c0, c1, c2) \ ++ ((((c0) & 0x1ff) << 0) | \ ++ (((c1) & 0x1ff) << 9) | \ ++ (((c2) & 0x1ff) << 18)) ++ ++/* The whole filter kernel is arranged as the coefficients 0-16 going ++ * up, then a pad, then 17-31 going down and reversed within the ++ * dwords. This means that a linear phase kernel (where it's ++ * symmetrical at the boundary between 15 and 16) has the last 5 ++ * dwords matching the first 5, but reversed. ++ */ ++#define VC4_LINEAR_PHASE_KERNEL(c0, c1, c2, c3, c4, c5, c6, c7, c8, \ ++ c9, c10, c11, c12, c13, c14, c15) \ ++ {VC4_PPF_FILTER_WORD(c0, c1, c2), \ ++ VC4_PPF_FILTER_WORD(c3, c4, c5), \ ++ VC4_PPF_FILTER_WORD(c6, c7, c8), \ ++ VC4_PPF_FILTER_WORD(c9, c10, c11), \ ++ VC4_PPF_FILTER_WORD(c12, c13, c14), \ ++ VC4_PPF_FILTER_WORD(c15, c15, 0)} ++ ++#define VC4_LINEAR_PHASE_KERNEL_DWORDS 6 ++#define VC4_KERNEL_DWORDS (VC4_LINEAR_PHASE_KERNEL_DWORDS * 2 - 1) ++ ++/* Recommended B=1/3, C=1/3 filter choice from Mitchell/Netravali. ++ * http://www.cs.utexas.edu/~fussell/courses/cs384g/lectures/mitchell/Mitchell.pdf ++ */ ++static const u32 mitchell_netravali_1_3_1_3_kernel[] = ++ VC4_LINEAR_PHASE_KERNEL(0, -2, -6, -8, -10, -8, -3, 2, 18, ++ 50, 82, 119, 155, 187, 213, 227); ++ ++static int vc4_hvs_upload_linear_kernel(struct vc4_hvs *hvs, ++ struct drm_mm_node *space, ++ const u32 *kernel) ++{ ++ int ret, i; ++ u32 __iomem *dst_kernel; ++ ++ ret = drm_mm_insert_node(&hvs->dlist_mm, space, VC4_KERNEL_DWORDS, 1, ++ 0); ++ if (ret) { ++ DRM_ERROR("Failed to allocate space for filter kernel: %d\n", ++ ret); ++ return ret; ++ } ++ ++ dst_kernel = hvs->dlist + space->start; ++ ++ for (i = 0; i < VC4_KERNEL_DWORDS; i++) { ++ if (i < VC4_LINEAR_PHASE_KERNEL_DWORDS) ++ writel(kernel[i], &dst_kernel[i]); ++ else { ++ writel(kernel[VC4_KERNEL_DWORDS - i - 1], ++ &dst_kernel[i]); ++ } ++ } ++ ++ return 0; ++} ++ + static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) + { + struct platform_device *pdev = to_platform_device(dev); + struct drm_device *drm = dev_get_drvdata(master); + struct vc4_dev *vc4 = drm->dev_private; + struct vc4_hvs *hvs = NULL; ++ int ret; + + hvs = devm_kzalloc(&pdev->dev, sizeof(*hvs), GFP_KERNEL); + if (!hvs) +@@ -130,6 +194,22 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) + HVS_BOOTLOADER_DLIST_END, + (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END); + ++ /* Set up the HVS LBM memory manager. We could have some more ++ * complicated data structure that allowed reuse of LBM areas ++ * between planes when they don't overlap on the screen, but ++ * for now we just allocate globally. ++ */ ++ drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024); ++ ++ /* Upload filter kernels. We only have the one for now, so we ++ * keep it around for the lifetime of the driver. ++ */ ++ ret = vc4_hvs_upload_linear_kernel(hvs, ++ &hvs->mitchell_netravali_filter, ++ mitchell_netravali_1_3_1_3_kernel); ++ if (ret) ++ return ret; ++ + vc4->hvs = hvs; + return 0; + } +@@ -140,7 +220,11 @@ static void vc4_hvs_unbind(struct device *dev, struct device *master, + struct drm_device *drm = dev_get_drvdata(master); + struct vc4_dev *vc4 = drm->dev_private; + ++ if (vc4->hvs->mitchell_netravali_filter.allocated) ++ drm_mm_remove_node(&vc4->hvs->mitchell_netravali_filter); ++ + drm_mm_takedown(&vc4->hvs->dlist_mm); ++ drm_mm_takedown(&vc4->hvs->lbm_mm); + + vc4->hvs = NULL; + } +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 50a51dc5d68d66e0278994a5a6409ded316f96cc..6b8903879d72e10352b203d904bc0a329161410e 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -24,6 +24,12 @@ + #include "drm_fb_cma_helper.h" + #include "drm_plane_helper.h" + ++enum vc4_scaling_mode { ++ VC4_SCALING_NONE, ++ VC4_SCALING_TPZ, ++ VC4_SCALING_PPF, ++}; ++ + struct vc4_plane_state { + struct drm_plane_state base; + /* System memory copy of the display list for this element, computed +@@ -47,13 +53,19 @@ struct vc4_plane_state { + + /* Clipped coordinates of the plane on the display. */ + int crtc_x, crtc_y, crtc_w, crtc_h; +- /* Clipped size of the area scanned from in the FB. */ +- u32 src_w, src_h; ++ /* Clipped area being scanned from in the FB. */ ++ u32 src_x, src_y, src_w, src_h; ++ ++ enum vc4_scaling_mode x_scaling, y_scaling; ++ bool is_unity; + + /* Offset to start scanning out from the start of the plane's + * BO. + */ + u32 offset; ++ ++ /* Our allocation in LBM for temporary storage during scaling. */ ++ struct drm_mm_node lbm; + }; + + static inline struct vc4_plane_state * +@@ -106,6 +118,16 @@ static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) + return NULL; + } + ++static enum vc4_scaling_mode vc4_get_scaling_mode(u32 src, u32 dst) ++{ ++ if (dst > src) ++ return VC4_SCALING_PPF; ++ else if (dst < src) ++ return VC4_SCALING_TPZ; ++ else ++ return VC4_SCALING_NONE; ++} ++ + static bool plane_enabled(struct drm_plane_state *state) + { + return state->fb && state->crtc; +@@ -122,6 +144,8 @@ static struct drm_plane_state *vc4_plane_duplicate_state(struct drm_plane *plane + if (!vc4_state) + return NULL; + ++ memset(&vc4_state->lbm, 0, sizeof(vc4_state->lbm)); ++ + __drm_atomic_helper_plane_duplicate_state(plane, &vc4_state->base); + + if (vc4_state->dlist) { +@@ -141,8 +165,17 @@ static struct drm_plane_state *vc4_plane_duplicate_state(struct drm_plane *plane + static void vc4_plane_destroy_state(struct drm_plane *plane, + struct drm_plane_state *state) + { ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + ++ if (vc4_state->lbm.allocated) { ++ unsigned long irqflags; ++ ++ spin_lock_irqsave(&vc4->hvs->mm_lock, irqflags); ++ drm_mm_remove_node(&vc4_state->lbm); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, irqflags); ++ } ++ + kfree(vc4_state->dlist); + __drm_atomic_helper_plane_destroy_state(plane, &vc4_state->base); + kfree(state); +@@ -181,23 +214,60 @@ static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) + vc4_state->dlist[vc4_state->dlist_count++] = val; + } + ++/* Returns the scl0/scl1 field based on whether the dimensions need to ++ * be up/down/non-scaled. ++ * ++ * This is a replication of a table from the spec. ++ */ ++static u32 vc4_get_scl_field(struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ ++ switch (vc4_state->x_scaling << 2 | vc4_state->y_scaling) { ++ case VC4_SCALING_PPF << 2 | VC4_SCALING_PPF: ++ return SCALER_CTL0_SCL_H_PPF_V_PPF; ++ case VC4_SCALING_TPZ << 2 | VC4_SCALING_PPF: ++ return SCALER_CTL0_SCL_H_TPZ_V_PPF; ++ case VC4_SCALING_PPF << 2 | VC4_SCALING_TPZ: ++ return SCALER_CTL0_SCL_H_PPF_V_TPZ; ++ case VC4_SCALING_TPZ << 2 | VC4_SCALING_TPZ: ++ return SCALER_CTL0_SCL_H_TPZ_V_TPZ; ++ case VC4_SCALING_PPF << 2 | VC4_SCALING_NONE: ++ return SCALER_CTL0_SCL_H_PPF_V_NONE; ++ case VC4_SCALING_NONE << 2 | VC4_SCALING_PPF: ++ return SCALER_CTL0_SCL_H_NONE_V_PPF; ++ case VC4_SCALING_NONE << 2 | VC4_SCALING_TPZ: ++ return SCALER_CTL0_SCL_H_NONE_V_TPZ; ++ case VC4_SCALING_TPZ << 2 | VC4_SCALING_NONE: ++ return SCALER_CTL0_SCL_H_TPZ_V_NONE; ++ default: ++ case VC4_SCALING_NONE << 2 | VC4_SCALING_NONE: ++ /* The unity case is independently handled by ++ * SCALER_CTL0_UNITY. ++ */ ++ return 0; ++ } ++} ++ + static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + { ++ struct drm_plane *plane = state->plane; + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; ++ u32 subpixel_src_mask = (1 << 16) - 1; + + vc4_state->offset = fb->offsets[0]; + +- if (state->crtc_w << 16 != state->src_w || +- state->crtc_h << 16 != state->src_h) { +- /* We don't support scaling yet, which involves +- * allocating the LBM memory for scaling temporary +- * storage, and putting filter kernels in the HVS +- * context. +- */ ++ /* We don't support subpixel source positioning for scaling. */ ++ if ((state->src_x & subpixel_src_mask) || ++ (state->src_y & subpixel_src_mask) || ++ (state->src_w & subpixel_src_mask) || ++ (state->src_h & subpixel_src_mask)) { + return -EINVAL; + } + ++ vc4_state->src_x = state->src_x >> 16; ++ vc4_state->src_y = state->src_y >> 16; + vc4_state->src_w = state->src_w >> 16; + vc4_state->src_h = state->src_h >> 16; + +@@ -206,6 +276,23 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + vc4_state->crtc_w = state->crtc_w; + vc4_state->crtc_h = state->crtc_h; + ++ vc4_state->x_scaling = vc4_get_scaling_mode(vc4_state->src_w, ++ vc4_state->crtc_w); ++ vc4_state->y_scaling = vc4_get_scaling_mode(vc4_state->src_h, ++ vc4_state->crtc_h); ++ vc4_state->is_unity = (vc4_state->x_scaling == VC4_SCALING_NONE && ++ vc4_state->y_scaling == VC4_SCALING_NONE); ++ ++ /* No configuring scaling on the cursor plane, since it gets ++ non-vblank-synced updates, and scaling requires requires ++ LBM changes which have to be vblank-synced. ++ */ ++ if (plane->type == DRM_PLANE_TYPE_CURSOR && !vc4_state->is_unity) ++ return -EINVAL; ++ ++ /* Clamp the on-screen start x/y to 0. The hardware doesn't ++ * support negative y, and negative x wastes bandwidth. ++ */ + if (vc4_state->crtc_x < 0) { + vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, + 0) * +@@ -223,6 +310,87 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + return 0; + } + ++static void vc4_write_tpz(struct vc4_plane_state *vc4_state, u32 src, u32 dst) ++{ ++ u32 scale, recip; ++ ++ scale = (1 << 16) * src / dst; ++ ++ /* The specs note that while the reciprocal would be defined ++ * as (1<<32)/scale, ~0 is close enough. ++ */ ++ recip = ~0 / scale; ++ ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(scale, SCALER_TPZ0_SCALE) | ++ VC4_SET_FIELD(0, SCALER_TPZ0_IPHASE)); ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(recip, SCALER_TPZ1_RECIP)); ++} ++ ++static void vc4_write_ppf(struct vc4_plane_state *vc4_state, u32 src, u32 dst) ++{ ++ u32 scale = (1 << 16) * src / dst; ++ ++ vc4_dlist_write(vc4_state, ++ SCALER_PPF_AGC | ++ VC4_SET_FIELD(scale, SCALER_PPF_SCALE) | ++ VC4_SET_FIELD(0, SCALER_PPF_IPHASE)); ++} ++ ++static u32 vc4_lbm_size(struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ /* This is the worst case number. One of the two sizes will ++ * be used depending on the scaling configuration. ++ */ ++ u32 pix_per_line = max(vc4_state->src_w, (u32)vc4_state->crtc_w); ++ u32 lbm; ++ ++ if (vc4_state->is_unity) ++ return 0; ++ else if (vc4_state->y_scaling == VC4_SCALING_TPZ) ++ lbm = pix_per_line * 8; ++ else { ++ /* In special cases, this multiplier might be 12. */ ++ lbm = pix_per_line * 16; ++ } ++ ++ lbm = roundup(lbm, 32); ++ ++ return lbm; ++} ++ ++static void vc4_write_scaling_parameters(struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ ++ /* Ch0 H-PPF Word 0: Scaling Parameters */ ++ if (vc4_state->x_scaling == VC4_SCALING_PPF) { ++ vc4_write_ppf(vc4_state, ++ vc4_state->src_w, vc4_state->crtc_w); ++ } ++ ++ /* Ch0 V-PPF Words 0-1: Scaling Parameters, Context */ ++ if (vc4_state->y_scaling == VC4_SCALING_PPF) { ++ vc4_write_ppf(vc4_state, ++ vc4_state->src_h, vc4_state->crtc_h); ++ vc4_dlist_write(vc4_state, 0xc0c0c0c0); ++ } ++ ++ /* Ch0 H-TPZ Words 0-1: Scaling Parameters, Recip */ ++ if (vc4_state->x_scaling == VC4_SCALING_TPZ) { ++ vc4_write_tpz(vc4_state, ++ vc4_state->src_w, vc4_state->crtc_w); ++ } ++ ++ /* Ch0 V-TPZ Words 0-2: Scaling Parameters, Recip, Context */ ++ if (vc4_state->y_scaling == VC4_SCALING_TPZ) { ++ vc4_write_tpz(vc4_state, ++ vc4_state->src_h, vc4_state->crtc_h); ++ vc4_dlist_write(vc4_state, 0xc0c0c0c0); ++ } ++} + + /* Writes out a full display list for an active plane to the plane's + * private dlist state. +@@ -230,22 +398,50 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + static int vc4_plane_mode_set(struct drm_plane *plane, + struct drm_plane_state *state) + { ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; + struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); + u32 ctl0_offset = vc4_state->dlist_count; + const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); ++ u32 scl; ++ u32 lbm_size; ++ unsigned long irqflags; + int ret; + + ret = vc4_plane_setup_clipping_and_scaling(state); + if (ret) + return ret; + ++ /* Allocate the LBM memory that the HVS will use for temporary ++ * storage due to our scaling/format conversion. ++ */ ++ lbm_size = vc4_lbm_size(state); ++ if (lbm_size) { ++ if (!vc4_state->lbm.allocated) { ++ spin_lock_irqsave(&vc4->hvs->mm_lock, irqflags); ++ ret = drm_mm_insert_node(&vc4->hvs->lbm_mm, ++ &vc4_state->lbm, ++ lbm_size, 32, 0); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, irqflags); ++ } else { ++ WARN_ON_ONCE(lbm_size != vc4_state->lbm.size); ++ } ++ } ++ ++ if (ret) ++ return ret; ++ ++ scl = vc4_get_scl_field(state); ++ ++ /* Control word */ + vc4_dlist_write(vc4_state, + SCALER_CTL0_VALID | + (format->pixel_order << SCALER_CTL0_ORDER_SHIFT) | + (format->hvs << SCALER_CTL0_PIXEL_FORMAT_SHIFT) | +- SCALER_CTL0_UNITY); ++ (vc4_state->is_unity ? SCALER_CTL0_UNITY : 0) | ++ VC4_SET_FIELD(scl, SCALER_CTL0_SCL0) | ++ VC4_SET_FIELD(scl, SCALER_CTL0_SCL1)); + + /* Position Word 0: Image Positions and Alpha Value */ + vc4_state->pos0_offset = vc4_state->dlist_count; +@@ -254,9 +450,14 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + VC4_SET_FIELD(vc4_state->crtc_x, SCALER_POS0_START_X) | + VC4_SET_FIELD(vc4_state->crtc_y, SCALER_POS0_START_Y)); + +- /* Position Word 1: Scaled Image Dimensions. +- * Skipped due to SCALER_CTL0_UNITY scaling. +- */ ++ /* Position Word 1: Scaled Image Dimensions. */ ++ if (!vc4_state->is_unity) { ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(vc4_state->crtc_w, ++ SCALER_POS1_SCL_WIDTH) | ++ VC4_SET_FIELD(vc4_state->crtc_h, ++ SCALER_POS1_SCL_HEIGHT)); ++ } + + /* Position Word 2: Source Image Size, Alpha Mode */ + vc4_state->pos2_offset = vc4_state->dlist_count; +@@ -282,6 +483,32 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(fb->pitches[0], SCALER_SRC_PITCH)); + ++ if (!vc4_state->is_unity) { ++ /* LBM Base Address. */ ++ if (vc4_state->y_scaling != VC4_SCALING_NONE) ++ vc4_dlist_write(vc4_state, vc4_state->lbm.start); ++ ++ vc4_write_scaling_parameters(state); ++ ++ /* If any PPF setup was done, then all the kernel ++ * pointers get uploaded. ++ */ ++ if (vc4_state->x_scaling == VC4_SCALING_PPF || ++ vc4_state->y_scaling == VC4_SCALING_PPF) { ++ u32 kernel = VC4_SET_FIELD(vc4->hvs->mitchell_netravali_filter.start, ++ SCALER_PPF_KERNEL_OFFSET); ++ ++ /* HPPF plane 0 */ ++ vc4_dlist_write(vc4_state, kernel); ++ /* VPPF plane 0 */ ++ vc4_dlist_write(vc4_state, kernel); ++ /* HPPF plane 1 */ ++ vc4_dlist_write(vc4_state, kernel); ++ /* VPPF plane 1 */ ++ vc4_dlist_write(vc4_state, kernel); ++ } ++ } ++ + vc4_state->dlist[ctl0_offset] |= + VC4_SET_FIELD(vc4_state->dlist_count, SCALER_CTL0_SIZE); + +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 4e52a0a885515252befc2fdf7abf99b707ae4bef..037c7fe671878e833f6843512d30147204948342 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -536,6 +536,21 @@ enum hvs_pixel_format { + #define SCALER_CTL0_ORDER_MASK VC4_MASK(14, 13) + #define SCALER_CTL0_ORDER_SHIFT 13 + ++#define SCALER_CTL0_SCL1_MASK VC4_MASK(10, 8) ++#define SCALER_CTL0_SCL1_SHIFT 8 ++ ++#define SCALER_CTL0_SCL0_MASK VC4_MASK(7, 5) ++#define SCALER_CTL0_SCL0_SHIFT 5 ++ ++#define SCALER_CTL0_SCL_H_PPF_V_PPF 0 ++#define SCALER_CTL0_SCL_H_TPZ_V_PPF 1 ++#define SCALER_CTL0_SCL_H_PPF_V_TPZ 2 ++#define SCALER_CTL0_SCL_H_TPZ_V_TPZ 3 ++#define SCALER_CTL0_SCL_H_PPF_V_NONE 4 ++#define SCALER_CTL0_SCL_H_NONE_V_PPF 5 ++#define SCALER_CTL0_SCL_H_NONE_V_TPZ 6 ++#define SCALER_CTL0_SCL_H_TPZ_V_NONE 7 ++ + /* Set to indicate no scaling. */ + #define SCALER_CTL0_UNITY BIT(4) + +@@ -551,6 +566,12 @@ enum hvs_pixel_format { + #define SCALER_POS0_START_X_MASK VC4_MASK(11, 0) + #define SCALER_POS0_START_X_SHIFT 0 + ++#define SCALER_POS1_SCL_HEIGHT_MASK VC4_MASK(27, 16) ++#define SCALER_POS1_SCL_HEIGHT_SHIFT 16 ++ ++#define SCALER_POS1_SCL_WIDTH_MASK VC4_MASK(11, 0) ++#define SCALER_POS1_SCL_WIDTH_SHIFT 0 ++ + #define SCALER_POS2_ALPHA_MODE_MASK VC4_MASK(31, 30) + #define SCALER_POS2_ALPHA_MODE_SHIFT 30 + #define SCALER_POS2_ALPHA_MODE_PIPELINE 0 +@@ -564,6 +585,31 @@ enum hvs_pixel_format { + #define SCALER_POS2_WIDTH_MASK VC4_MASK(11, 0) + #define SCALER_POS2_WIDTH_SHIFT 0 + ++#define SCALER_TPZ0_VERT_RECALC BIT(31) ++#define SCALER_TPZ0_SCALE_MASK VC4_MASK(28, 8) ++#define SCALER_TPZ0_SCALE_SHIFT 8 ++#define SCALER_TPZ0_IPHASE_MASK VC4_MASK(7, 0) ++#define SCALER_TPZ0_IPHASE_SHIFT 0 ++#define SCALER_TPZ1_RECIP_MASK VC4_MASK(15, 0) ++#define SCALER_TPZ1_RECIP_SHIFT 0 ++ ++/* Skips interpolating coefficients to 64 phases, so just 8 are used. ++ * Required for nearest neighbor. ++ */ ++#define SCALER_PPF_NOINTERP BIT(31) ++/* Replaes the highest valued coefficient with one that makes all 4 ++ * sum to unity. ++ */ ++#define SCALER_PPF_AGC BIT(30) ++#define SCALER_PPF_SCALE_MASK VC4_MASK(24, 8) ++#define SCALER_PPF_SCALE_SHIFT 8 ++#define SCALER_PPF_IPHASE_MASK VC4_MASK(6, 0) ++#define SCALER_PPF_IPHASE_SHIFT 0 ++ ++#define SCALER_PPF_KERNEL_OFFSET_MASK VC4_MASK(13, 0) ++#define SCALER_PPF_KERNEL_OFFSET_SHIFT 0 ++#define SCALER_PPF_KERNEL_UNCACHED BIT(31) ++ + #define SCALER_SRC_PITCH_MASK VC4_MASK(15, 0) + #define SCALER_SRC_PITCH_SHIFT 0 + + +From 71915513512e74556d092bcda332ffdff9cea846 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 30 Dec 2015 12:25:44 -0800 +Subject: [PATCH 282/398] drm/vc4: Add support for YUV planes. + +This supports 420 and 422 subsampling with 2 or 3 planes, tested with +modetest. It doesn't set up chroma subsampling position (which it +appears KMS doesn't deal with yet). + +The LBM memory is overallocated in many cases, but apparently the docs +aren't quite correct and I'll probably need to look at the hardware +source to really figure it out. + +Signed-off-by: Eric Anholt +(cherry picked from commit fc04023fafecf19ebd09278d8d67dc5ed1f68b46) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 256 +++++++++++++++++++++++++++++++--------- + drivers/gpu/drm/vc4/vc4_regs.h | 56 ++++++++- + 2 files changed, 253 insertions(+), 59 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 6b8903879d72e10352b203d904bc0a329161410e..90f6f992abb1cf848b1a3e6582b62f9938dd2e06 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -54,15 +54,19 @@ struct vc4_plane_state { + /* Clipped coordinates of the plane on the display. */ + int crtc_x, crtc_y, crtc_w, crtc_h; + /* Clipped area being scanned from in the FB. */ +- u32 src_x, src_y, src_w, src_h; ++ u32 src_x, src_y; + +- enum vc4_scaling_mode x_scaling, y_scaling; ++ u32 src_w[2], src_h[2]; ++ ++ /* Scaling selection for the RGB/Y plane and the Cb/Cr planes. */ ++ enum vc4_scaling_mode x_scaling[2], y_scaling[2]; + bool is_unity; ++ bool is_yuv; + + /* Offset to start scanning out from the start of the plane's + * BO. + */ +- u32 offset; ++ u32 offsets[3]; + + /* Our allocation in LBM for temporary storage during scaling. */ + struct drm_mm_node lbm; +@@ -79,6 +83,7 @@ static const struct hvs_format { + u32 hvs; /* HVS_FORMAT_* */ + u32 pixel_order; + bool has_alpha; ++ bool flip_cbcr; + } hvs_formats[] = { + { + .drm = DRM_FORMAT_XRGB8888, .hvs = HVS_PIXEL_FORMAT_RGBA8888, +@@ -104,6 +109,32 @@ static const struct hvs_format { + .drm = DRM_FORMAT_XRGB1555, .hvs = HVS_PIXEL_FORMAT_RGBA5551, + .pixel_order = HVS_PIXEL_ORDER_ABGR, .has_alpha = false, + }, ++ { ++ .drm = DRM_FORMAT_YUV422, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_3PLANE, ++ }, ++ { ++ .drm = DRM_FORMAT_YVU422, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_3PLANE, ++ .flip_cbcr = true, ++ }, ++ { ++ .drm = DRM_FORMAT_YUV420, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE, ++ }, ++ { ++ .drm = DRM_FORMAT_YVU420, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE, ++ .flip_cbcr = true, ++ }, ++ { ++ .drm = DRM_FORMAT_NV12, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV420_2PLANE, ++ }, ++ { ++ .drm = DRM_FORMAT_NV16, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_2PLANE, ++ }, + }; + + static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) +@@ -219,11 +250,11 @@ static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) + * + * This is a replication of a table from the spec. + */ +-static u32 vc4_get_scl_field(struct drm_plane_state *state) ++static u32 vc4_get_scl_field(struct drm_plane_state *state, int plane) + { + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + +- switch (vc4_state->x_scaling << 2 | vc4_state->y_scaling) { ++ switch (vc4_state->x_scaling[plane] << 2 | vc4_state->y_scaling[plane]) { + case VC4_SCALING_PPF << 2 | VC4_SCALING_PPF: + return SCALER_CTL0_SCL_H_PPF_V_PPF; + case VC4_SCALING_TPZ << 2 | VC4_SCALING_PPF: +@@ -254,9 +285,16 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + struct drm_plane *plane = state->plane; + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; ++ struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); + u32 subpixel_src_mask = (1 << 16) - 1; ++ u32 format = fb->pixel_format; ++ int num_planes = drm_format_num_planes(format); ++ u32 h_subsample = 1; ++ u32 v_subsample = 1; ++ int i; + +- vc4_state->offset = fb->offsets[0]; ++ for (i = 0; i < num_planes; i++) ++ vc4_state->offsets[i] = bo->paddr + fb->offsets[i]; + + /* We don't support subpixel source positioning for scaling. */ + if ((state->src_x & subpixel_src_mask) || +@@ -268,20 +306,48 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + + vc4_state->src_x = state->src_x >> 16; + vc4_state->src_y = state->src_y >> 16; +- vc4_state->src_w = state->src_w >> 16; +- vc4_state->src_h = state->src_h >> 16; ++ vc4_state->src_w[0] = state->src_w >> 16; ++ vc4_state->src_h[0] = state->src_h >> 16; + + vc4_state->crtc_x = state->crtc_x; + vc4_state->crtc_y = state->crtc_y; + vc4_state->crtc_w = state->crtc_w; + vc4_state->crtc_h = state->crtc_h; + +- vc4_state->x_scaling = vc4_get_scaling_mode(vc4_state->src_w, +- vc4_state->crtc_w); +- vc4_state->y_scaling = vc4_get_scaling_mode(vc4_state->src_h, +- vc4_state->crtc_h); +- vc4_state->is_unity = (vc4_state->x_scaling == VC4_SCALING_NONE && +- vc4_state->y_scaling == VC4_SCALING_NONE); ++ vc4_state->x_scaling[0] = vc4_get_scaling_mode(vc4_state->src_w[0], ++ vc4_state->crtc_w); ++ vc4_state->y_scaling[0] = vc4_get_scaling_mode(vc4_state->src_h[0], ++ vc4_state->crtc_h); ++ ++ if (num_planes > 1) { ++ vc4_state->is_yuv = true; ++ ++ h_subsample = drm_format_horz_chroma_subsampling(format); ++ v_subsample = drm_format_vert_chroma_subsampling(format); ++ vc4_state->src_w[1] = vc4_state->src_w[0] / h_subsample; ++ vc4_state->src_h[1] = vc4_state->src_h[0] / v_subsample; ++ ++ vc4_state->x_scaling[1] = ++ vc4_get_scaling_mode(vc4_state->src_w[1], ++ vc4_state->crtc_w); ++ vc4_state->y_scaling[1] = ++ vc4_get_scaling_mode(vc4_state->src_h[1], ++ vc4_state->crtc_h); ++ ++ /* YUV conversion requires that scaling be enabled, ++ * even on a plane that's otherwise 1:1. Choose TPZ ++ * for simplicity. ++ */ ++ if (vc4_state->x_scaling[0] == VC4_SCALING_NONE) ++ vc4_state->x_scaling[0] = VC4_SCALING_TPZ; ++ if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) ++ vc4_state->y_scaling[0] = VC4_SCALING_TPZ; ++ } ++ ++ vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE && ++ vc4_state->y_scaling[0] == VC4_SCALING_NONE && ++ vc4_state->x_scaling[1] == VC4_SCALING_NONE && ++ vc4_state->y_scaling[1] == VC4_SCALING_NONE); + + /* No configuring scaling on the cursor plane, since it gets + non-vblank-synced updates, and scaling requires requires +@@ -294,16 +360,27 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + * support negative y, and negative x wastes bandwidth. + */ + if (vc4_state->crtc_x < 0) { +- vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, +- 0) * +- -vc4_state->crtc_x); +- vc4_state->src_w += vc4_state->crtc_x; ++ for (i = 0; i < num_planes; i++) { ++ u32 cpp = drm_format_plane_cpp(fb->pixel_format, i); ++ u32 subs = ((i == 0) ? 1 : h_subsample); ++ ++ vc4_state->offsets[i] += (cpp * ++ (-vc4_state->crtc_x) / subs); ++ } ++ vc4_state->src_w[0] += vc4_state->crtc_x; ++ vc4_state->src_w[1] += vc4_state->crtc_x / h_subsample; + vc4_state->crtc_x = 0; + } + + if (vc4_state->crtc_y < 0) { +- vc4_state->offset += fb->pitches[0] * -vc4_state->crtc_y; +- vc4_state->src_h += vc4_state->crtc_y; ++ for (i = 0; i < num_planes; i++) { ++ u32 subs = ((i == 0) ? 1 : v_subsample); ++ ++ vc4_state->offsets[i] += (fb->pitches[i] * ++ (-vc4_state->crtc_y) / subs); ++ } ++ vc4_state->src_h[0] += vc4_state->crtc_y; ++ vc4_state->src_h[1] += vc4_state->crtc_y / v_subsample; + vc4_state->crtc_y = 0; + } + +@@ -344,15 +421,23 @@ static u32 vc4_lbm_size(struct drm_plane_state *state) + /* This is the worst case number. One of the two sizes will + * be used depending on the scaling configuration. + */ +- u32 pix_per_line = max(vc4_state->src_w, (u32)vc4_state->crtc_w); ++ u32 pix_per_line = max(vc4_state->src_w[0], (u32)vc4_state->crtc_w); + u32 lbm; + +- if (vc4_state->is_unity) +- return 0; +- else if (vc4_state->y_scaling == VC4_SCALING_TPZ) +- lbm = pix_per_line * 8; +- else { +- /* In special cases, this multiplier might be 12. */ ++ if (!vc4_state->is_yuv) { ++ if (vc4_state->is_unity) ++ return 0; ++ else if (vc4_state->y_scaling[0] == VC4_SCALING_TPZ) ++ lbm = pix_per_line * 8; ++ else { ++ /* In special cases, this multiplier might be 12. */ ++ lbm = pix_per_line * 16; ++ } ++ } else { ++ /* There are cases for this going down to a multiplier ++ * of 2, but according to the firmware source, the ++ * table in the docs is somewhat wrong. ++ */ + lbm = pix_per_line * 16; + } + +@@ -361,33 +446,34 @@ static u32 vc4_lbm_size(struct drm_plane_state *state) + return lbm; + } + +-static void vc4_write_scaling_parameters(struct drm_plane_state *state) ++static void vc4_write_scaling_parameters(struct drm_plane_state *state, ++ int channel) + { + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + + /* Ch0 H-PPF Word 0: Scaling Parameters */ +- if (vc4_state->x_scaling == VC4_SCALING_PPF) { ++ if (vc4_state->x_scaling[channel] == VC4_SCALING_PPF) { + vc4_write_ppf(vc4_state, +- vc4_state->src_w, vc4_state->crtc_w); ++ vc4_state->src_w[channel], vc4_state->crtc_w); + } + + /* Ch0 V-PPF Words 0-1: Scaling Parameters, Context */ +- if (vc4_state->y_scaling == VC4_SCALING_PPF) { ++ if (vc4_state->y_scaling[channel] == VC4_SCALING_PPF) { + vc4_write_ppf(vc4_state, +- vc4_state->src_h, vc4_state->crtc_h); ++ vc4_state->src_h[channel], vc4_state->crtc_h); + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + } + + /* Ch0 H-TPZ Words 0-1: Scaling Parameters, Recip */ +- if (vc4_state->x_scaling == VC4_SCALING_TPZ) { ++ if (vc4_state->x_scaling[channel] == VC4_SCALING_TPZ) { + vc4_write_tpz(vc4_state, +- vc4_state->src_w, vc4_state->crtc_w); ++ vc4_state->src_w[channel], vc4_state->crtc_w); + } + + /* Ch0 V-TPZ Words 0-2: Scaling Parameters, Recip, Context */ +- if (vc4_state->y_scaling == VC4_SCALING_TPZ) { ++ if (vc4_state->y_scaling[channel] == VC4_SCALING_TPZ) { + vc4_write_tpz(vc4_state, +- vc4_state->src_h, vc4_state->crtc_h); ++ vc4_state->src_h[channel], vc4_state->crtc_h); + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + } + } +@@ -401,13 +487,13 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + struct vc4_dev *vc4 = to_vc4_dev(plane->dev); + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; +- struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); + u32 ctl0_offset = vc4_state->dlist_count; + const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); +- u32 scl; ++ int num_planes = drm_format_num_planes(format->drm); ++ u32 scl0, scl1; + u32 lbm_size; + unsigned long irqflags; +- int ret; ++ int ret, i; + + ret = vc4_plane_setup_clipping_and_scaling(state); + if (ret) +@@ -432,7 +518,19 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + if (ret) + return ret; + +- scl = vc4_get_scl_field(state); ++ /* SCL1 is used for Cb/Cr scaling of planar formats. For RGB ++ * and 4:4:4, scl1 should be set to scl0 so both channels of ++ * the scaler do the same thing. For YUV, the Y plane needs ++ * to be put in channel 1 and Cb/Cr in channel 0, so we swap ++ * the scl fields here. ++ */ ++ if (num_planes == 1) { ++ scl0 = vc4_get_scl_field(state, 1); ++ scl1 = scl0; ++ } else { ++ scl0 = vc4_get_scl_field(state, 1); ++ scl1 = vc4_get_scl_field(state, 0); ++ } + + /* Control word */ + vc4_dlist_write(vc4_state, +@@ -440,8 +538,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + (format->pixel_order << SCALER_CTL0_ORDER_SHIFT) | + (format->hvs << SCALER_CTL0_PIXEL_FORMAT_SHIFT) | + (vc4_state->is_unity ? SCALER_CTL0_UNITY : 0) | +- VC4_SET_FIELD(scl, SCALER_CTL0_SCL0) | +- VC4_SET_FIELD(scl, SCALER_CTL0_SCL1)); ++ VC4_SET_FIELD(scl0, SCALER_CTL0_SCL0) | ++ VC4_SET_FIELD(scl1, SCALER_CTL0_SCL1)); + + /* Position Word 0: Image Positions and Alpha Value */ + vc4_state->pos0_offset = vc4_state->dlist_count; +@@ -466,35 +564,68 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_POS2_ALPHA_MODE_PIPELINE : + SCALER_POS2_ALPHA_MODE_FIXED, + SCALER_POS2_ALPHA_MODE) | +- VC4_SET_FIELD(vc4_state->src_w, SCALER_POS2_WIDTH) | +- VC4_SET_FIELD(vc4_state->src_h, SCALER_POS2_HEIGHT)); ++ VC4_SET_FIELD(vc4_state->src_w[0], SCALER_POS2_WIDTH) | ++ VC4_SET_FIELD(vc4_state->src_h[0], SCALER_POS2_HEIGHT)); + + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +- /* Pointer Word 0: RGB / Y Pointer */ ++ ++ /* Pointer Word 0/1/2: RGB / Y / Cb / Cr Pointers ++ * ++ * The pointers may be any byte address. ++ */ + vc4_state->ptr0_offset = vc4_state->dlist_count; +- vc4_dlist_write(vc4_state, bo->paddr + vc4_state->offset); ++ if (!format->flip_cbcr) { ++ for (i = 0; i < num_planes; i++) ++ vc4_dlist_write(vc4_state, vc4_state->offsets[i]); ++ } else { ++ WARN_ON_ONCE(num_planes != 3); ++ vc4_dlist_write(vc4_state, vc4_state->offsets[0]); ++ vc4_dlist_write(vc4_state, vc4_state->offsets[2]); ++ vc4_dlist_write(vc4_state, vc4_state->offsets[1]); ++ } + +- /* Pointer Context Word 0: Written by the HVS */ +- vc4_dlist_write(vc4_state, 0xc0c0c0c0); ++ /* Pointer Context Word 0/1/2: Written by the HVS */ ++ for (i = 0; i < num_planes; i++) ++ vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +- /* Pitch word 0: Pointer 0 Pitch */ +- vc4_dlist_write(vc4_state, +- VC4_SET_FIELD(fb->pitches[0], SCALER_SRC_PITCH)); ++ /* Pitch word 0/1/2 */ ++ for (i = 0; i < num_planes; i++) { ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(fb->pitches[i], SCALER_SRC_PITCH)); ++ } ++ ++ /* Colorspace conversion words */ ++ if (vc4_state->is_yuv) { ++ vc4_dlist_write(vc4_state, SCALER_CSC0_ITR_R_601_5); ++ vc4_dlist_write(vc4_state, SCALER_CSC1_ITR_R_601_5); ++ vc4_dlist_write(vc4_state, SCALER_CSC2_ITR_R_601_5); ++ } + + if (!vc4_state->is_unity) { + /* LBM Base Address. */ +- if (vc4_state->y_scaling != VC4_SCALING_NONE) ++ if (vc4_state->y_scaling[0] != VC4_SCALING_NONE || ++ vc4_state->y_scaling[1] != VC4_SCALING_NONE) { + vc4_dlist_write(vc4_state, vc4_state->lbm.start); ++ } + +- vc4_write_scaling_parameters(state); ++ if (num_planes > 1) { ++ /* Emit Cb/Cr as channel 0 and Y as channel ++ * 1. This matches how we set up scl0/scl1 ++ * above. ++ */ ++ vc4_write_scaling_parameters(state, 1); ++ } ++ vc4_write_scaling_parameters(state, 0); + + /* If any PPF setup was done, then all the kernel + * pointers get uploaded. + */ +- if (vc4_state->x_scaling == VC4_SCALING_PPF || +- vc4_state->y_scaling == VC4_SCALING_PPF) { ++ if (vc4_state->x_scaling[0] == VC4_SCALING_PPF || ++ vc4_state->y_scaling[0] == VC4_SCALING_PPF || ++ vc4_state->x_scaling[1] == VC4_SCALING_PPF || ++ vc4_state->y_scaling[1] == VC4_SCALING_PPF) { + u32 kernel = VC4_SET_FIELD(vc4->hvs->mitchell_netravali_filter.start, + SCALER_PPF_KERNEL_OFFSET); + +@@ -698,6 +829,7 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev, + struct drm_plane *plane = NULL; + struct vc4_plane *vc4_plane; + u32 formats[ARRAY_SIZE(hvs_formats)]; ++ u32 num_formats = 0; + int ret = 0; + unsigned i; + +@@ -708,12 +840,20 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev, + goto fail; + } + +- for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) +- formats[i] = hvs_formats[i].drm; ++ for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) { ++ /* Don't allow YUV in cursor planes, since that means ++ * tuning on the scaler, which we don't allow for the ++ * cursor. ++ */ ++ if (type != DRM_PLANE_TYPE_CURSOR || ++ hvs_formats[i].hvs < HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE) { ++ formats[num_formats++] = hvs_formats[i].drm; ++ } ++ } + plane = &vc4_plane->base; + ret = drm_universal_plane_init(dev, plane, 0xff, + &vc4_plane_funcs, +- formats, ARRAY_SIZE(formats), ++ formats, num_formats, + type); + + drm_plane_helper_add(plane, &vc4_plane_helper_funcs); +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 037c7fe671878e833f6843512d30147204948342..25df20ef939c55c273c31fa73bb3f146f4f51c55 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -503,7 +503,12 @@ enum hvs_pixel_format { + HVS_PIXEL_FORMAT_RGB888 = 5, + HVS_PIXEL_FORMAT_RGBA6666 = 6, + /* 32bpp */ +- HVS_PIXEL_FORMAT_RGBA8888 = 7 ++ HVS_PIXEL_FORMAT_RGBA8888 = 7, ++ ++ HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE = 8, ++ HVS_PIXEL_FORMAT_YCBCR_YUV420_2PLANE = 9, ++ HVS_PIXEL_FORMAT_YCBCR_YUV422_3PLANE = 10, ++ HVS_PIXEL_FORMAT_YCBCR_YUV422_2PLANE = 11, + }; + + /* Note: the LSB is the rightmost character shown. Only valid for +@@ -585,6 +590,55 @@ enum hvs_pixel_format { + #define SCALER_POS2_WIDTH_MASK VC4_MASK(11, 0) + #define SCALER_POS2_WIDTH_SHIFT 0 + ++/* Color Space Conversion words. Some values are S2.8 signed ++ * integers, except that the 2 integer bits map as {0x0: 0, 0x1: 1, ++ * 0x2: 2, 0x3: -1} ++ */ ++/* bottom 8 bits of S2.8 contribution of Cr to Blue */ ++#define SCALER_CSC0_COEF_CR_BLU_MASK VC4_MASK(31, 24) ++#define SCALER_CSC0_COEF_CR_BLU_SHIFT 24 ++/* Signed offset to apply to Y before CSC. (Y' = Y + YY_OFS) */ ++#define SCALER_CSC0_COEF_YY_OFS_MASK VC4_MASK(23, 16) ++#define SCALER_CSC0_COEF_YY_OFS_SHIFT 16 ++/* Signed offset to apply to CB before CSC (Cb' = Cb - 128 + CB_OFS). */ ++#define SCALER_CSC0_COEF_CB_OFS_MASK VC4_MASK(15, 8) ++#define SCALER_CSC0_COEF_CB_OFS_SHIFT 8 ++/* Signed offset to apply to CB before CSC (Cr' = Cr - 128 + CR_OFS). */ ++#define SCALER_CSC0_COEF_CR_OFS_MASK VC4_MASK(7, 0) ++#define SCALER_CSC0_COEF_CR_OFS_SHIFT 0 ++#define SCALER_CSC0_ITR_R_601_5 0x00f00000 ++#define SCALER_CSC0_ITR_R_709_3 0x00f00000 ++#define SCALER_CSC0_JPEG_JFIF 0x00000000 ++ ++/* S2.8 contribution of Cb to Green */ ++#define SCALER_CSC1_COEF_CB_GRN_MASK VC4_MASK(31, 22) ++#define SCALER_CSC1_COEF_CB_GRN_SHIFT 22 ++/* S2.8 contribution of Cr to Green */ ++#define SCALER_CSC1_COEF_CR_GRN_MASK VC4_MASK(21, 12) ++#define SCALER_CSC1_COEF_CR_GRN_SHIFT 12 ++/* S2.8 contribution of Y to all of RGB */ ++#define SCALER_CSC1_COEF_YY_ALL_MASK VC4_MASK(11, 2) ++#define SCALER_CSC1_COEF_YY_ALL_SHIFT 2 ++/* top 2 bits of S2.8 contribution of Cr to Blue */ ++#define SCALER_CSC1_COEF_CR_BLU_MASK VC4_MASK(1, 0) ++#define SCALER_CSC1_COEF_CR_BLU_SHIFT 0 ++#define SCALER_CSC1_ITR_R_601_5 0xe73304a8 ++#define SCALER_CSC1_ITR_R_709_3 0xf2b784a8 ++#define SCALER_CSC1_JPEG_JFIF 0xea34a400 ++ ++/* S2.8 contribution of Cb to Red */ ++#define SCALER_CSC2_COEF_CB_RED_MASK VC4_MASK(29, 20) ++#define SCALER_CSC2_COEF_CB_RED_SHIFT 20 ++/* S2.8 contribution of Cr to Red */ ++#define SCALER_CSC2_COEF_CR_RED_MASK VC4_MASK(19, 10) ++#define SCALER_CSC2_COEF_CR_RED_SHIFT 10 ++/* S2.8 contribution of Cb to Blue */ ++#define SCALER_CSC2_COEF_CB_BLU_MASK VC4_MASK(19, 10) ++#define SCALER_CSC2_COEF_CB_BLU_SHIFT 10 ++#define SCALER_CSC2_ITR_R_601_5 0x00066204 ++#define SCALER_CSC2_ITR_R_709_3 0x00072a1c ++#define SCALER_CSC2_JPEG_JFIF 0x000599c5 ++ + #define SCALER_TPZ0_VERT_RECALC BIT(31) + #define SCALER_TPZ0_SCALE_MASK VC4_MASK(28, 8) + #define SCALER_TPZ0_SCALE_SHIFT 8 + +From 5af277106a55ca8ed5b7c36ea0de5107a9a47917 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 8 Feb 2016 11:19:14 -0800 +Subject: [PATCH 283/398] drm/vc4: Fix spurious GPU resets due to BO reuse. + +We were tracking the "where are the head pointers pointing" globally, +so if another job reused the same BOs and execution was at the same +point as last time we checked, we'd stop and trigger a reset even +though the GPU had made progress. + +Signed-off-by: Eric Anholt +(cherry picked from commit c4ce60dc30912df09b2438f1e5594eae1ef64d1e) +--- + drivers/gpu/drm/vc4/vc4_drv.h | 6 +++++- + drivers/gpu/drm/vc4/vc4_gem.c | 19 ++++++++++++++----- + 2 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 49665d20239399b44e588419a9eee653d80c1b04..2f4c2b70870aae2334713056a0241fd390a429fe 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -93,7 +93,6 @@ struct vc4_dev { + struct work_struct overflow_mem_work; + + struct { +- uint32_t last_ct0ca, last_ct1ca; + struct timer_list timer; + struct work_struct reset_work; + } hangcheck; +@@ -203,6 +202,11 @@ struct vc4_exec_info { + /* Sequence number for this bin/render job. */ + uint64_t seqno; + ++ /* Last current addresses the hardware was processing when the ++ * hangcheck timer checked on us. ++ */ ++ uint32_t last_ct0ca, last_ct1ca; ++ + /* Kernel-space copy of the ioctl arguments */ + struct drm_vc4_submit_cl *args; + +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index 456333f5dc785bcd607ac9803df25e9ff582d51c..29f7e3060374efc97783dde8fd1506ff62e0076d 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -271,10 +271,17 @@ vc4_hangcheck_elapsed(unsigned long data) + struct drm_device *dev = (struct drm_device *)data; + struct vc4_dev *vc4 = to_vc4_dev(dev); + uint32_t ct0ca, ct1ca; ++ unsigned long irqflags; ++ struct vc4_exec_info *exec; ++ ++ spin_lock_irqsave(&vc4->job_lock, irqflags); ++ exec = vc4_first_job(vc4); + + /* If idle, we can stop watching for hangs. */ +- if (list_empty(&vc4->job_list)) ++ if (!exec) { ++ spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; ++ } + + ct0ca = V3D_READ(V3D_CTNCA(0)); + ct1ca = V3D_READ(V3D_CTNCA(1)); +@@ -282,14 +289,16 @@ vc4_hangcheck_elapsed(unsigned long data) + /* If we've made any progress in execution, rearm the timer + * and wait. + */ +- if (ct0ca != vc4->hangcheck.last_ct0ca || +- ct1ca != vc4->hangcheck.last_ct1ca) { +- vc4->hangcheck.last_ct0ca = ct0ca; +- vc4->hangcheck.last_ct1ca = ct1ca; ++ if (ct0ca != exec->last_ct0ca || ct1ca != exec->last_ct1ca) { ++ exec->last_ct0ca = ct0ca; ++ exec->last_ct1ca = ct1ca; ++ spin_unlock_irqrestore(&vc4->job_lock, irqflags); + vc4_queue_hangcheck(dev); + return; + } + ++ spin_unlock_irqrestore(&vc4->job_lock, irqflags); ++ + /* We've gone too long with no progress, reset. This has to + * be done from a work struct, since resetting can sleep and + * this timer hook isn't allowed to. + +From 62c7f8489b6d5397462d4cba9e16372c5cc65d9c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 5 Feb 2016 15:06:15 -0800 +Subject: [PATCH 284/398] drm/vc4: Fix a framebuffer reference leak on async + flip interrupt. + +We'd need X to queue up an async pageflip while another is +outstanding, and then take a SIGIO. I think X actually avoids sending +out the next pageflip while one's already queued, but I'm not sure. + +Signed-off-by: Eric Anholt +(cherry picked from commit 48627eb8dc55c60d35794105f6f79fb627347dbd) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index dad6a8ba380965599f5259291a9aae22b4d705f5..c65d1f0f4fd5f381c5a4b266f1f70c9e78c8b4c2 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -527,6 +527,7 @@ static int vc4_async_page_flip(struct drm_crtc *crtc, + /* Make sure all other async modesetes have landed. */ + ret = down_interruptible(&vc4->async_modeset); + if (ret) { ++ drm_framebuffer_unreference(fb); + kfree(flip_state); + return ret; + } + +From 0c3fe6cc54fe7f7a498a1116b1a7eb51cf7c25a6 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 12 Feb 2016 14:15:14 -0800 +Subject: [PATCH 285/398] drm/vc4: Bring HDMI up from power off if necessary. + +If the firmware hadn't brought up HDMI for us, we need to do its +power-on reset sequence (reset HD and and clear its STANDBY bits, +reset HDMI, and leave the PHY disabled). + +Signed-off-by: Eric Anholt +(cherry picked from commit 851479ad5927b7b1aa141ca9dedb897a7bce2b1d) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 29 ++++++++++++++++++++++++++++- + drivers/gpu/drm/vc4/vc4_regs.h | 2 ++ + 2 files changed, 30 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index d15c529bee2123eb740247bdfbc67eb4b0311f2b..c6fbee654117905de8dcf628bcb833f5237c53c0 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -497,6 +497,16 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) + goto err_put_i2c; + } + ++ /* This is the rate that is set by the firmware. The number ++ * needs to be a bit higher than the pixel clock rate ++ * (generally 148.5Mhz). ++ */ ++ ret = clk_set_rate(hdmi->hsm_clock, 163682864); ++ if (ret) { ++ DRM_ERROR("Failed to set HSM clock rate: %d\n", ret); ++ goto err_unprepare_pix; ++ } ++ + ret = clk_prepare_enable(hdmi->hsm_clock); + if (ret) { + DRM_ERROR("Failed to turn on HDMI state machine clock: %d\n", +@@ -518,7 +528,24 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) + vc4->hdmi = hdmi; + + /* HDMI core must be enabled. */ +- WARN_ON_ONCE((HD_READ(VC4_HD_M_CTL) & VC4_HD_M_ENABLE) == 0); ++ if (!(HD_READ(VC4_HD_M_CTL) & VC4_HD_M_ENABLE)) { ++ HD_WRITE(VC4_HD_M_CTL, VC4_HD_M_SW_RST); ++ udelay(1); ++ HD_WRITE(VC4_HD_M_CTL, 0); ++ ++ HD_WRITE(VC4_HD_M_CTL, VC4_HD_M_ENABLE); ++ ++ HDMI_WRITE(VC4_HDMI_SW_RESET_CONTROL, ++ VC4_HDMI_SW_RESET_HDMI | ++ VC4_HDMI_SW_RESET_FORMAT_DETECT); ++ ++ HDMI_WRITE(VC4_HDMI_SW_RESET_CONTROL, 0); ++ ++ /* PHY should be in reset, like ++ * vc4_hdmi_encoder_disable() does. ++ */ ++ HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0xf << 16); ++ } + + drm_encoder_init(drm, hdmi->encoder, &vc4_hdmi_encoder_funcs, + DRM_MODE_ENCODER_TMDS); +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 25df20ef939c55c273c31fa73bb3f146f4f51c55..31042a44577f4b3c6d57c6eb89b1777a49c7d2dc 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -456,6 +456,8 @@ + #define VC4_HDMI_TX_PHY_RESET_CTL 0x2c0 + + #define VC4_HD_M_CTL 0x00c ++# define VC4_HD_M_REGISTER_FILE_STANDBY (3 << 6) ++# define VC4_HD_M_RAM_STANDBY (3 << 4) + # define VC4_HD_M_SW_RST BIT(2) + # define VC4_HD_M_ENABLE BIT(0) + + +From c19c9b3f13c335ac43daa755723bf033ba586bfd Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 12 Feb 2016 15:16:56 -0800 +Subject: [PATCH 286/398] drm/vc4: Add another reg to HDMI debug dumping. + +This is also involved in the HDMI setup sequence so it's nice to see +it. + +Signed-off-by: Eric Anholt +(cherry picked from commit 936f1a53f32148cc6164fad7c9a26ebf144e5ffb) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index c6fbee654117905de8dcf628bcb833f5237c53c0..689e285ff874a503fb94e98db258adce9b0cf145 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -95,6 +95,7 @@ static const struct { + HDMI_REG(VC4_HDMI_SW_RESET_CONTROL), + HDMI_REG(VC4_HDMI_HOTPLUG_INT), + HDMI_REG(VC4_HDMI_HOTPLUG), ++ HDMI_REG(VC4_HDMI_RAM_PACKET_CONFIG), + HDMI_REG(VC4_HDMI_HORZA), + HDMI_REG(VC4_HDMI_HORZB), + HDMI_REG(VC4_HDMI_FIFO_CTL), + +From dfbb43ac6003e00c0c3e8b7202f41cc726eaf829 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 15 Feb 2016 17:06:02 -0800 +Subject: [PATCH 287/398] drm/vc4: Fix the name of the VSYNCD_EVEN register. + +It's used for delaying vsync in interlaced mode. + +Signed-off-by: Eric Anholt +(cherry picked from commit c31806fbdda910d337b60896040afa708bdfa2bd) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- + drivers/gpu/drm/vc4/vc4_regs.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index c65d1f0f4fd5f381c5a4b266f1f70c9e78c8b4c2..dbc1733ffc6eaeaff94a7be79fa5c07c27215e07 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -88,7 +88,7 @@ static const struct { + } crtc_regs[] = { + CRTC_REG(PV_CONTROL), + CRTC_REG(PV_V_CONTROL), +- CRTC_REG(PV_VSYNCD), ++ CRTC_REG(PV_VSYNCD_EVEN), + CRTC_REG(PV_HORZA), + CRTC_REG(PV_HORZB), + CRTC_REG(PV_VERTA), +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 31042a44577f4b3c6d57c6eb89b1777a49c7d2dc..58d4cb36e903bb5548d9ab168906299a845623ab 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -187,7 +187,7 @@ + # define PV_VCONTROL_CONTINUOUS BIT(1) + # define PV_VCONTROL_VIDEN BIT(0) + +-#define PV_VSYNCD 0x08 ++#define PV_VSYNCD_EVEN 0x08 + + #define PV_HORZA 0x0c + # define PV_HORZA_HBP_MASK VC4_MASK(31, 16) + +From 718336beca41652045661a01175241f72ee652e3 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 15 Feb 2016 17:31:41 -0800 +Subject: [PATCH 288/398] drm/vc4: Fix setting of vertical timings in the CRTC. + +It looks like when I went to add the interlaced bits, I just took the +existing PV_VERT* block and indented it, instead of copy and pasting +it first. Without this, changing resolution never worked. + +Signed-off-by: Eric Anholt +(cherry picked from commit a7c5047d1ce178dd2b1fa577fc8909ad663d56d5) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index dbc1733ffc6eaeaff94a7be79fa5c07c27215e07..ba1b7f6e3995182d23810903c3b81f6d91ab1a54 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -217,6 +217,16 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + PV_HORZB_HFP) | + VC4_SET_FIELD(mode->hdisplay, PV_HORZB_HACTIVE)); + ++ CRTC_WRITE(PV_VERTA, ++ VC4_SET_FIELD(mode->vtotal - mode->vsync_end, ++ PV_VERTA_VBP) | ++ VC4_SET_FIELD(mode->vsync_end - mode->vsync_start, ++ PV_VERTA_VSYNC)); ++ CRTC_WRITE(PV_VERTB, ++ VC4_SET_FIELD(mode->vsync_start - mode->vdisplay, ++ PV_VERTB_VFP) | ++ VC4_SET_FIELD(vactive, PV_VERTB_VACTIVE)); ++ + if (interlace) { + CRTC_WRITE(PV_VERTA_EVEN, + VC4_SET_FIELD(mode->vtotal - mode->vsync_end - 1, + +From cbf975a6e41947813f9fbdcf2a81a2a8182eea56 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 16 Feb 2016 10:24:08 -0800 +Subject: [PATCH 289/398] drm/vc4: Initialize scaler DISPBKGND on modeset. + +We weren't updating the interlaced bit, so we'd scan out incorrectly +if the firmware had brought up the TV encoder and we were switching to +HDMI. + +Signed-off-by: Eric Anholt +(cherry picked from commit 6a609209865247cc748e90158c99f374f79b494c) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 6 ++++++ + drivers/gpu/drm/vc4/vc4_regs.h | 14 ++++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index ba1b7f6e3995182d23810903c3b81f6d91ab1a54..34ff59c3d0029774b241b5dd60269606ea288b05 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -188,6 +188,8 @@ static int vc4_get_clock_select(struct drm_crtc *crtc) + + static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + { ++ struct drm_device *dev = crtc->dev; ++ struct vc4_dev *vc4 = to_vc4_dev(dev); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); + struct drm_crtc_state *state = crtc->state; + struct drm_display_mode *mode = &state->adjusted_mode; +@@ -256,6 +258,10 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + PV_CONTROL_FIFO_CLR | + PV_CONTROL_EN); + ++ HVS_WRITE(SCALER_DISPBKGNDX(vc4_crtc->channel), ++ SCALER_DISPBKGND_AUTOHS | ++ (interlace ? SCALER_DISPBKGND_INTERLACE : 0)); ++ + if (debug_dump_regs) { + DRM_INFO("CRTC %d regs after:\n", drm_crtc_index(crtc)); + vc4_crtc_dump_regs(vc4_crtc); +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 58d4cb36e903bb5548d9ab168906299a845623ab..bf42a8e87111f2e5fd3108209d0a3dc9ad3e871f 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -350,6 +350,17 @@ + # define SCALER_DISPCTRLX_HEIGHT_SHIFT 0 + + #define SCALER_DISPBKGND0 0x00000044 ++# define SCALER_DISPBKGND_AUTOHS BIT(31) ++# define SCALER_DISPBKGND_INTERLACE BIT(30) ++# define SCALER_DISPBKGND_GAMMA BIT(29) ++# define SCALER_DISPBKGND_TESTMODE_MASK VC4_MASK(28, 25) ++# define SCALER_DISPBKGND_TESTMODE_SHIFT 25 ++/* Enables filling the scaler line with the RGB value in the low 24 ++ * bits before compositing. Costs cycles, so should be skipped if ++ * opaque display planes will cover everything. ++ */ ++# define SCALER_DISPBKGND_FILL BIT(24) ++ + #define SCALER_DISPSTAT0 0x00000048 + #define SCALER_DISPBASE0 0x0000004c + # define SCALER_DISPSTATX_MODE_MASK VC4_MASK(31, 30) +@@ -362,6 +373,9 @@ + # define SCALER_DISPSTATX_EMPTY BIT(28) + #define SCALER_DISPCTRL1 0x00000050 + #define SCALER_DISPBKGND1 0x00000054 ++#define SCALER_DISPBKGNDX(x) (SCALER_DISPBKGND0 + \ ++ (x) * (SCALER_DISPBKGND1 - \ ++ SCALER_DISPBKGND0)) + #define SCALER_DISPSTAT1 0x00000058 + #define SCALER_DISPSTATX(x) (SCALER_DISPSTAT0 + \ + (x) * (SCALER_DISPSTAT1 - \ + +From 500f9dd2f9e9d0b44e0e5f89d09786710c17bc71 Mon Sep 17 00:00:00 2001 +From: Varad Gautam +Date: Wed, 17 Feb 2016 19:08:21 +0530 +Subject: [PATCH 290/398] drm/vc4: improve throughput by pipelining binning and + rendering jobs + +The hardware provides us with separate threads for binning and +rendering, and the existing model waits for them both to complete +before submitting the next job. + +Splitting the binning and rendering submissions reduces idle time and +gives us approx 20-30% speedup with some x11perf tests such as -line10 +and -tilerect1. Improves openarena performance by 1.01897% +/- +0.247857% (n=16). + +Thanks to anholt for suggesting this. + +v2: Rebase on the spurious resets fix (change by anholt). + +Signed-off-by: Varad Gautam +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +(cherry picked from commit ca26d28bbaa39f31d5e7e4812603b015c8d54207) +--- + drivers/gpu/drm/vc4/vc4_drv.h | 37 +++++++++---- + drivers/gpu/drm/vc4/vc4_gem.c | 123 ++++++++++++++++++++++++++++++------------ + drivers/gpu/drm/vc4/vc4_irq.c | 58 ++++++++++++++++---- + 3 files changed, 166 insertions(+), 52 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 2f4c2b70870aae2334713056a0241fd390a429fe..7f0b63435c7e48c592deac2671c8eb7c12ad3787 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -53,7 +53,7 @@ struct vc4_dev { + /* Protects bo_cache and the BO stats. */ + struct mutex bo_lock; + +- /* Sequence number for the last job queued in job_list. ++ /* Sequence number for the last job queued in bin_job_list. + * Starts at 0 (no jobs emitted). + */ + uint64_t emit_seqno; +@@ -63,11 +63,19 @@ struct vc4_dev { + */ + uint64_t finished_seqno; + +- /* List of all struct vc4_exec_info for jobs to be executed. +- * The first job in the list is the one currently programmed +- * into ct0ca/ct1ca for execution. ++ /* List of all struct vc4_exec_info for jobs to be executed in ++ * the binner. The first job in the list is the one currently ++ * programmed into ct0ca for execution. + */ +- struct list_head job_list; ++ struct list_head bin_job_list; ++ ++ /* List of all struct vc4_exec_info for jobs that have ++ * completed binning and are ready for rendering. The first ++ * job in the list is the one currently programmed into ct1ca ++ * for execution. ++ */ ++ struct list_head render_job_list; ++ + /* List of the finished vc4_exec_infos waiting to be freed by + * job_done_work. + */ +@@ -291,11 +299,20 @@ struct vc4_exec_info { + }; + + static inline struct vc4_exec_info * +-vc4_first_job(struct vc4_dev *vc4) ++vc4_first_bin_job(struct vc4_dev *vc4) ++{ ++ if (list_empty(&vc4->bin_job_list)) ++ return NULL; ++ return list_first_entry(&vc4->bin_job_list, struct vc4_exec_info, head); ++} ++ ++static inline struct vc4_exec_info * ++vc4_first_render_job(struct vc4_dev *vc4) + { +- if (list_empty(&vc4->job_list)) ++ if (list_empty(&vc4->render_job_list)) + return NULL; +- return list_first_entry(&vc4->job_list, struct vc4_exec_info, head); ++ return list_first_entry(&vc4->render_job_list, ++ struct vc4_exec_info, head); + } + + /** +@@ -410,7 +427,9 @@ int vc4_wait_seqno_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); + int vc4_wait_bo_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +-void vc4_submit_next_job(struct drm_device *dev); ++void vc4_submit_next_bin_job(struct drm_device *dev); ++void vc4_submit_next_render_job(struct drm_device *dev); ++void vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec); + int vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, + uint64_t timeout_ns, bool interruptible); + void vc4_job_handle_completed(struct vc4_dev *vc4); +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index 29f7e3060374efc97783dde8fd1506ff62e0076d..9b03a900c8391e208abaa1629ebc802a8731762e 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -154,10 +154,10 @@ vc4_save_hang_state(struct drm_device *dev) + struct vc4_dev *vc4 = to_vc4_dev(dev); + struct drm_vc4_get_hang_state *state; + struct vc4_hang_state *kernel_state; +- struct vc4_exec_info *exec; ++ struct vc4_exec_info *exec[2]; + struct vc4_bo *bo; + unsigned long irqflags; +- unsigned int i, unref_list_count; ++ unsigned int i, j, unref_list_count, prev_idx; + + kernel_state = kcalloc(1, sizeof(*kernel_state), GFP_KERNEL); + if (!kernel_state) +@@ -166,37 +166,55 @@ vc4_save_hang_state(struct drm_device *dev) + state = &kernel_state->user_state; + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- exec = vc4_first_job(vc4); +- if (!exec) { ++ exec[0] = vc4_first_bin_job(vc4); ++ exec[1] = vc4_first_render_job(vc4); ++ if (!exec[0] && !exec[1]) { + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; + } + +- unref_list_count = 0; +- list_for_each_entry(bo, &exec->unref_list, unref_head) +- unref_list_count++; ++ /* Get the bos from both binner and renderer into hang state. */ ++ state->bo_count = 0; ++ for (i = 0; i < 2; i++) { ++ if (!exec[i]) ++ continue; ++ ++ unref_list_count = 0; ++ list_for_each_entry(bo, &exec[i]->unref_list, unref_head) ++ unref_list_count++; ++ state->bo_count += exec[i]->bo_count + unref_list_count; ++ } ++ ++ kernel_state->bo = kcalloc(state->bo_count, ++ sizeof(*kernel_state->bo), GFP_ATOMIC); + +- state->bo_count = exec->bo_count + unref_list_count; +- kernel_state->bo = kcalloc(state->bo_count, sizeof(*kernel_state->bo), +- GFP_ATOMIC); + if (!kernel_state->bo) { + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; + } + +- for (i = 0; i < exec->bo_count; i++) { +- drm_gem_object_reference(&exec->bo[i]->base); +- kernel_state->bo[i] = &exec->bo[i]->base; +- } ++ prev_idx = 0; ++ for (i = 0; i < 2; i++) { ++ if (!exec[i]) ++ continue; + +- list_for_each_entry(bo, &exec->unref_list, unref_head) { +- drm_gem_object_reference(&bo->base.base); +- kernel_state->bo[i] = &bo->base.base; +- i++; ++ for (j = 0; j < exec[i]->bo_count; j++) { ++ drm_gem_object_reference(&exec[i]->bo[j]->base); ++ kernel_state->bo[j + prev_idx] = &exec[i]->bo[j]->base; ++ } ++ ++ list_for_each_entry(bo, &exec[i]->unref_list, unref_head) { ++ drm_gem_object_reference(&bo->base.base); ++ kernel_state->bo[j + prev_idx] = &bo->base.base; ++ j++; ++ } ++ prev_idx = j + 1; + } + +- state->start_bin = exec->ct0ca; +- state->start_render = exec->ct1ca; ++ if (exec[0]) ++ state->start_bin = exec[0]->ct0ca; ++ if (exec[1]) ++ state->start_render = exec[1]->ct1ca; + + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + +@@ -272,13 +290,15 @@ vc4_hangcheck_elapsed(unsigned long data) + struct vc4_dev *vc4 = to_vc4_dev(dev); + uint32_t ct0ca, ct1ca; + unsigned long irqflags; +- struct vc4_exec_info *exec; ++ struct vc4_exec_info *bin_exec, *render_exec; + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- exec = vc4_first_job(vc4); ++ ++ bin_exec = vc4_first_bin_job(vc4); ++ render_exec = vc4_first_render_job(vc4); + + /* If idle, we can stop watching for hangs. */ +- if (!exec) { ++ if (!bin_exec && !render_exec) { + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; + } +@@ -289,9 +309,12 @@ vc4_hangcheck_elapsed(unsigned long data) + /* If we've made any progress in execution, rearm the timer + * and wait. + */ +- if (ct0ca != exec->last_ct0ca || ct1ca != exec->last_ct1ca) { +- exec->last_ct0ca = ct0ca; +- exec->last_ct1ca = ct1ca; ++ if ((bin_exec && ct0ca != bin_exec->last_ct0ca) || ++ (render_exec && ct1ca != render_exec->last_ct1ca)) { ++ if (bin_exec) ++ bin_exec->last_ct0ca = ct0ca; ++ if (render_exec) ++ render_exec->last_ct1ca = ct1ca; + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + vc4_queue_hangcheck(dev); + return; +@@ -391,11 +414,13 @@ vc4_flush_caches(struct drm_device *dev) + * The job_lock should be held during this. + */ + void +-vc4_submit_next_job(struct drm_device *dev) ++vc4_submit_next_bin_job(struct drm_device *dev) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); +- struct vc4_exec_info *exec = vc4_first_job(vc4); ++ struct vc4_exec_info *exec; + ++again: ++ exec = vc4_first_bin_job(vc4); + if (!exec) + return; + +@@ -405,11 +430,40 @@ vc4_submit_next_job(struct drm_device *dev) + V3D_WRITE(V3D_BPOA, 0); + V3D_WRITE(V3D_BPOS, 0); + +- if (exec->ct0ca != exec->ct0ea) ++ /* Either put the job in the binner if it uses the binner, or ++ * immediately move it to the to-be-rendered queue. ++ */ ++ if (exec->ct0ca != exec->ct0ea) { + submit_cl(dev, 0, exec->ct0ca, exec->ct0ea); ++ } else { ++ vc4_move_job_to_render(dev, exec); ++ goto again; ++ } ++} ++ ++void ++vc4_submit_next_render_job(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_exec_info *exec = vc4_first_render_job(vc4); ++ ++ if (!exec) ++ return; ++ + submit_cl(dev, 1, exec->ct1ca, exec->ct1ea); + } + ++void ++vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ bool was_empty = list_empty(&vc4->render_job_list); ++ ++ list_move_tail(&exec->head, &vc4->render_job_list); ++ if (was_empty) ++ vc4_submit_next_render_job(dev); ++} ++ + static void + vc4_update_bo_seqnos(struct vc4_exec_info *exec, uint64_t seqno) + { +@@ -448,14 +502,14 @@ vc4_queue_submit(struct drm_device *dev, struct vc4_exec_info *exec) + exec->seqno = seqno; + vc4_update_bo_seqnos(exec, seqno); + +- list_add_tail(&exec->head, &vc4->job_list); ++ list_add_tail(&exec->head, &vc4->bin_job_list); + + /* If no job was executing, kick ours off. Otherwise, it'll +- * get started when the previous job's frame done interrupt ++ * get started when the previous job's flush done interrupt + * occurs. + */ +- if (vc4_first_job(vc4) == exec) { +- vc4_submit_next_job(dev); ++ if (vc4_first_bin_job(vc4) == exec) { ++ vc4_submit_next_bin_job(dev); + vc4_queue_hangcheck(dev); + } + +@@ -849,7 +903,8 @@ vc4_gem_init(struct drm_device *dev) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); + +- INIT_LIST_HEAD(&vc4->job_list); ++ INIT_LIST_HEAD(&vc4->bin_job_list); ++ INIT_LIST_HEAD(&vc4->render_job_list); + INIT_LIST_HEAD(&vc4->job_done_list); + INIT_LIST_HEAD(&vc4->seqno_cb_list); + spin_lock_init(&vc4->job_lock); +diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c +index 78a21357fb2de9fe88d50a26f20f0634d97dbd88..b0104a346a74eb44f0230d1a04968906661ae4fa 100644 +--- a/drivers/gpu/drm/vc4/vc4_irq.c ++++ b/drivers/gpu/drm/vc4/vc4_irq.c +@@ -30,6 +30,10 @@ + * disables that specific interrupt, and 0s written are ignored + * (reading either one returns the set of enabled interrupts). + * ++ * When we take a binning flush done interrupt, we need to submit the ++ * next frame for binning and move the finished frame to the render ++ * thread. ++ * + * When we take a render frame interrupt, we need to wake the + * processes waiting for some frame to be done, and get the next frame + * submitted ASAP (so the hardware doesn't sit idle when there's work +@@ -44,6 +48,7 @@ + #include "vc4_regs.h" + + #define V3D_DRIVER_IRQS (V3D_INT_OUTOMEM | \ ++ V3D_INT_FLDONE | \ + V3D_INT_FRDONE) + + DECLARE_WAIT_QUEUE_HEAD(render_wait); +@@ -77,7 +82,7 @@ vc4_overflow_mem_work(struct work_struct *work) + unsigned long irqflags; + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- current_exec = vc4_first_job(vc4); ++ current_exec = vc4_first_bin_job(vc4); + if (current_exec) { + vc4->overflow_mem->seqno = vc4->finished_seqno + 1; + list_add_tail(&vc4->overflow_mem->unref_head, +@@ -98,17 +103,43 @@ vc4_overflow_mem_work(struct work_struct *work) + } + + static void +-vc4_irq_finish_job(struct drm_device *dev) ++vc4_irq_finish_bin_job(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_exec_info *exec = vc4_first_bin_job(vc4); ++ ++ if (!exec) ++ return; ++ ++ vc4_move_job_to_render(dev, exec); ++ vc4_submit_next_bin_job(dev); ++} ++ ++static void ++vc4_cancel_bin_job(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_exec_info *exec = vc4_first_bin_job(vc4); ++ ++ if (!exec) ++ return; ++ ++ list_move_tail(&exec->head, &vc4->bin_job_list); ++ vc4_submit_next_bin_job(dev); ++} ++ ++static void ++vc4_irq_finish_render_job(struct drm_device *dev) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); +- struct vc4_exec_info *exec = vc4_first_job(vc4); ++ struct vc4_exec_info *exec = vc4_first_render_job(vc4); + + if (!exec) + return; + + vc4->finished_seqno++; + list_move_tail(&exec->head, &vc4->job_done_list); +- vc4_submit_next_job(dev); ++ vc4_submit_next_render_job(dev); + + wake_up_all(&vc4->job_wait_queue); + schedule_work(&vc4->job_done_work); +@@ -125,9 +156,10 @@ vc4_irq(int irq, void *arg) + barrier(); + intctl = V3D_READ(V3D_INTCTL); + +- /* Acknowledge the interrupts we're handling here. The render +- * frame done interrupt will be cleared, while OUTOMEM will +- * stay high until the underlying cause is cleared. ++ /* Acknowledge the interrupts we're handling here. The binner ++ * last flush / render frame done interrupt will be cleared, ++ * while OUTOMEM will stay high until the underlying cause is ++ * cleared. + */ + V3D_WRITE(V3D_INTCTL, intctl); + +@@ -138,9 +170,16 @@ vc4_irq(int irq, void *arg) + status = IRQ_HANDLED; + } + ++ if (intctl & V3D_INT_FLDONE) { ++ spin_lock(&vc4->job_lock); ++ vc4_irq_finish_bin_job(dev); ++ spin_unlock(&vc4->job_lock); ++ status = IRQ_HANDLED; ++ } ++ + if (intctl & V3D_INT_FRDONE) { + spin_lock(&vc4->job_lock); +- vc4_irq_finish_job(dev); ++ vc4_irq_finish_render_job(dev); + spin_unlock(&vc4->job_lock); + status = IRQ_HANDLED; + } +@@ -205,6 +244,7 @@ void vc4_irq_reset(struct drm_device *dev) + V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS); + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- vc4_irq_finish_job(dev); ++ vc4_cancel_bin_job(dev); ++ vc4_irq_finish_render_job(dev); + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + } + +From 177c1f1d0244e0399556c23c5ed384bd5de2184c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 29 Feb 2016 17:53:00 -0800 +Subject: [PATCH 291/398] drm/vc4: Let gpiolib know that we're OK with sleeping + for HPD. + +Fixes an error thrown every few seconds when we poll HPD when it's on +a I2C to GPIO expander. + +Signed-off-by: Eric Anholt +Tested-by: Daniel Stone +(cherry picked from commit 0e60eab57557bc06bb3a5ef8d5d6dcd9ddd47aff) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 689e285ff874a503fb94e98db258adce9b0cf145..7214e8926cb53190f9d7c1f8594d71785fb34229 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -168,7 +168,7 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + return connector_status_connected; + + if (vc4->hdmi->hpd_gpio) { +- if (gpio_get_value(vc4->hdmi->hpd_gpio)) ++ if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio)) + return connector_status_connected; + else + return connector_status_disconnected; + +From d3a47cf3187315f40a11c9ed19a790d38ec3cdcc Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 29 Feb 2016 17:53:01 -0800 +Subject: [PATCH 292/398] drm/vc4: Respect GPIO_ACTIVE_LOW on HDMI HPD if set + in the devicetree. + +The original Raspberry Pi had the GPIO active high, but the later +models are active low. The DT GPIO bindings allow specifying the +active flag, except that it doesn't get propagated to the gpiodesc, so +you have to handle it yourself. + +Signed-off-by: Eric Anholt +Tested-by: Daniel Stone +(cherry picked from commit 0b06e0a7945130e6a187f7959529cba7725f573a) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 7214e8926cb53190f9d7c1f8594d71785fb34229..db6db77b70cb92f14dda2ebcabf77fa7e9fcceea 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -47,6 +47,7 @@ struct vc4_hdmi { + void __iomem *hdmicore_regs; + void __iomem *hd_regs; + int hpd_gpio; ++ bool hpd_active_low; + + struct clk *pixel_clock; + struct clk *hsm_clock; +@@ -168,7 +169,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + return connector_status_connected; + + if (vc4->hdmi->hpd_gpio) { +- if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio)) ++ if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ ++ vc4->hdmi->hpd_active_low) + return connector_status_connected; + else + return connector_status_disconnected; +@@ -519,11 +521,17 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) + * we'll use the HDMI core's register. + */ + if (of_find_property(dev->of_node, "hpd-gpios", &value)) { +- hdmi->hpd_gpio = of_get_named_gpio(dev->of_node, "hpd-gpios", 0); ++ enum of_gpio_flags hpd_gpio_flags; ++ ++ hdmi->hpd_gpio = of_get_named_gpio_flags(dev->of_node, ++ "hpd-gpios", 0, ++ &hpd_gpio_flags); + if (hdmi->hpd_gpio < 0) { + ret = hdmi->hpd_gpio; + goto err_unprepare_hsm; + } ++ ++ hdmi->hpd_active_low = hpd_gpio_flags & OF_GPIO_ACTIVE_LOW; + } + + vc4->hdmi = hdmi; + +From bfbcaa072d7230471312cd198e843398b9608888 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Tue, 8 Mar 2016 15:09:41 +0300 +Subject: [PATCH 293/398] drm/vc4: Return -EFAULT on copy_from_user() failure + +The copy_from_user() function returns the number of bytes not copied but +we want to return a negative error code. + +Fixes: 463873d57014 ('drm/vc4: Add an API for creating GPU shaders in GEM BOs.') +Cc: stable@vger.kernel.org +Signed-off-by: Dan Carpenter +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +(cherry picked from commit 585cb132a48190b554aecda2ebc3e2911fcbb665) +--- + drivers/gpu/drm/vc4/vc4_bo.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c +index 847757914c4eb792512e8019222b04d83876600d..2953ab84cbbcb6e41971820759395abfb764dc88 100644 +--- a/drivers/gpu/drm/vc4/vc4_bo.c ++++ b/drivers/gpu/drm/vc4/vc4_bo.c +@@ -519,11 +519,12 @@ vc4_create_shader_bo_ioctl(struct drm_device *dev, void *data, + if (IS_ERR(bo)) + return PTR_ERR(bo); + +- ret = copy_from_user(bo->base.vaddr, ++ if (copy_from_user(bo->base.vaddr, + (void __user *)(uintptr_t)args->data, +- args->size); +- if (ret != 0) ++ args->size)) { ++ ret = -EFAULT; + goto fail; ++ } + /* Clear the rest of the memory from allocating from the BO + * cache. + */ + +From 55cb53a580010bf2da100bc0b5b16f575bd60cb0 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 4 Mar 2016 12:32:07 -0800 +Subject: [PATCH 294/398] drm/vc4: Recognize a more specific compatible string + for V3D. + +The Raspberry Pi Foundation's firmware updates are shipping device +trees using the old string, so we'll keep recognizing that as this rev +of V3D. Still, we should use a more specific name in the upstream DT +to clarify which board is being supported, in case we do other revs of +V3D in the future. + +Signed-off-by: Eric Anholt +Acked-by: Stephen Warren +(cherry picked from commit 90d7116061f86c1f8ea460806a0414addea7b58b) +--- + drivers/gpu/drm/vc4/vc4_v3d.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c +index 4d103f7ff8c9113329aa4738bd67baa4ad14250d..3422306049b2f98d69684c5cc7f34ccf8a24309e 100644 +--- a/drivers/gpu/drm/vc4/vc4_v3d.c ++++ b/drivers/gpu/drm/vc4/vc4_v3d.c +@@ -256,6 +256,7 @@ static int vc4_v3d_dev_remove(struct platform_device *pdev) + } + + static const struct of_device_id vc4_v3d_dt_match[] = { ++ { .compatible = "brcm,bcm2835-v3d" }, + { .compatible = "brcm,vc4-v3d" }, + {} + }; + +From 84196ff3a5eb8285a48ea57ab1a3ebb4337e0195 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 17:21:06 -0700 +Subject: [PATCH 295/398] ARM: bcm2708: Move the CMA range down for kernel 4.4. + +The previous area no longer works, for reasons I haven't investigated. +Just move it somewhere that works. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index af540a346426974386031e6c076c7c45531435d2..d07c5373b90adbbeb79659733a5c8c5fa73ca88d 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -91,7 +91,7 @@ + fragment@4 { + target-path = "/chosen"; + __overlay__ { +- bootargs = "cma=256M@512M"; ++ bootargs = "cma=256M@256M"; + }; + }; + }; + +From f86b64e74341a62057743bbc33068ae87f54e04c Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <6by9@users.noreply.github.com> +Date: Sat, 16 Apr 2016 23:09:54 +0100 +Subject: [PATCH 296/398] V4L2: Request maximum resolution from GPU + +Get resolution information about the sensors from the GPU +and advertise it correctly. + +Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 59 +++++++++++++++++-------- + drivers/media/platform/bcm2835/bcm2835-camera.h | 3 +- + 2 files changed, 43 insertions(+), 19 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 0e6c9b4f125ccdf052f5566992a4c2a09f8f5471..12326f876bdbc29083cb7afbf5d5cac7c4f321a7 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -38,8 +38,6 @@ + #define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2" + #define MIN_WIDTH 16 + #define MIN_HEIGHT 16 +-#define MAX_WIDTH 2592 +-#define MAX_HEIGHT 1944 + #define MIN_BUFFER_SIZE (80*1024) + + #define MAX_VIDEO_MODE_WIDTH 1280 +@@ -729,11 +727,11 @@ static int vidioc_try_fmt_vid_overlay(struct file *file, void *priv, + f->fmt.win.clipcount = 0; + f->fmt.win.bitmap = NULL; + +- v4l_bound_align_image(&f->fmt.win.w.width, MIN_WIDTH, MAX_WIDTH, 1, +- &f->fmt.win.w.height, MIN_HEIGHT, MAX_HEIGHT, ++ v4l_bound_align_image(&f->fmt.win.w.width, MIN_WIDTH, dev->max_width, 1, ++ &f->fmt.win.w.height, MIN_HEIGHT, dev->max_height, + 1, 0); +- v4l_bound_align_image(&f->fmt.win.w.left, MIN_WIDTH, MAX_WIDTH, 1, +- &f->fmt.win.w.top, MIN_HEIGHT, MAX_HEIGHT, ++ v4l_bound_align_image(&f->fmt.win.w.left, MIN_WIDTH, dev->max_width, 1, ++ &f->fmt.win.w.top, MIN_HEIGHT, dev->max_height, + 1, 0); + + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, +@@ -961,8 +959,9 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, + "Clipping/aligning %dx%d format %08X\n", + f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.pixelformat); + +- v4l_bound_align_image(&f->fmt.pix.width, MIN_WIDTH, MAX_WIDTH, 1, +- &f->fmt.pix.height, MIN_HEIGHT, MAX_HEIGHT, 1, 0); ++ v4l_bound_align_image(&f->fmt.pix.width, MIN_WIDTH, dev->max_width, 1, ++ &f->fmt.pix.height, MIN_HEIGHT, dev->max_height, ++ 1, 0); + f->fmt.pix.bytesperline = f->fmt.pix.width * mfmt->ybbp; + + /* Image buffer has to be padded to allow for alignment, even though +@@ -1301,9 +1300,10 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, + int vidioc_enum_framesizes(struct file *file, void *fh, + struct v4l2_frmsizeenum *fsize) + { ++ struct bm2835_mmal_dev *dev = video_drvdata(file); + static const struct v4l2_frmsize_stepwise sizes = { +- MIN_WIDTH, MAX_WIDTH, 2, +- MIN_HEIGHT, MAX_HEIGHT, 2 ++ MIN_WIDTH, 0, 2, ++ MIN_HEIGHT, 0, 2 + }; + int i; + +@@ -1316,6 +1316,8 @@ int vidioc_enum_framesizes(struct file *file, void *fh, + return -EINVAL; + fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE; + fsize->stepwise = sizes; ++ fsize->stepwise.max_width = dev->max_width; ++ fsize->stepwise.max_height = dev->max_height; + return 0; + } + +@@ -1323,6 +1325,7 @@ int vidioc_enum_framesizes(struct file *file, void *fh, + static int vidioc_enum_frameintervals(struct file *file, void *priv, + struct v4l2_frmivalenum *fival) + { ++ struct bm2835_mmal_dev *dev = video_drvdata(file); + int i; + + if (fival->index) +@@ -1335,8 +1338,8 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv, + return -EINVAL; + + /* regarding width & height - we support any within range */ +- if (fival->width < MIN_WIDTH || fival->width > MAX_WIDTH || +- fival->height < MIN_HEIGHT || fival->height > MAX_HEIGHT) ++ if (fival->width < MIN_WIDTH || fival->width > dev->max_width || ++ fival->height < MIN_HEIGHT || fival->height > dev->max_height) + return -EINVAL; + + fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS; +@@ -1499,12 +1502,17 @@ static struct video_device vdev_template = { + .release = video_device_release_empty, + }; + +-static int get_num_cameras(struct vchiq_mmal_instance *instance) ++/* Returns the number of cameras, and also the max resolution supported ++ * by those cameras. ++ */ ++static int get_num_cameras(struct vchiq_mmal_instance *instance, ++ unsigned int resolutions[][2], int num_resolutions) + { + int ret; + struct vchiq_mmal_component *cam_info_component; + struct mmal_parameter_camera_info_t cam_info = {0}; + int param_size = sizeof(cam_info); ++ int i; + + /* create a camera_info component */ + ret = vchiq_mmal_component_init(instance, "camera_info", +@@ -1520,6 +1528,14 @@ static int get_num_cameras(struct vchiq_mmal_instance *instance) + ¶m_size)) { + pr_info("Failed to get camera info\n"); + } ++ for (i = 0; ++ i < (cam_info.num_cameras > num_resolutions ? ++ cam_info.num_cameras : ++ num_resolutions); ++ i++) { ++ resolutions[i][0] = cam_info.cameras[i].max_width; ++ resolutions[i][1] = cam_info.cameras[i].max_height; ++ } + + vchiq_mmal_component_finalise(instance, + cam_info_component); +@@ -1528,12 +1544,13 @@ static int get_num_cameras(struct vchiq_mmal_instance *instance) + } + + static int set_camera_parameters(struct vchiq_mmal_instance *instance, +- struct vchiq_mmal_component *camera) ++ struct vchiq_mmal_component *camera, ++ struct bm2835_mmal_dev *dev) + { + int ret; + struct mmal_parameter_camera_config cam_config = { +- .max_stills_w = MAX_WIDTH, +- .max_stills_h = MAX_HEIGHT, ++ .max_stills_w = dev->max_width, ++ .max_stills_h = dev->max_height, + .stills_yuv422 = 1, + .one_shot_stills = 1, + .max_preview_video_w = (max_video_width > 1920) ? +@@ -1576,7 +1593,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + } + + ret = set_camera_parameters(dev->instance, +- dev->component[MMAL_COMPONENT_CAMERA]); ++ dev->component[MMAL_COMPONENT_CAMERA], ++ dev); + if (ret < 0) + goto unreg_camera; + +@@ -1838,12 +1856,15 @@ static int __init bm2835_mmal_init(void) + int camera; + unsigned int num_cameras; + struct vchiq_mmal_instance *instance; ++ unsigned int resolutions[MAX_BCM2835_CAMERAS][2]; + + ret = vchiq_mmal_init(&instance); + if (ret < 0) + return ret; + +- num_cameras = get_num_cameras(instance); ++ num_cameras = get_num_cameras(instance, ++ resolutions, ++ MAX_BCM2835_CAMERAS); + if (num_cameras > MAX_BCM2835_CAMERAS) + num_cameras = MAX_BCM2835_CAMERAS; + +@@ -1853,6 +1874,8 @@ static int __init bm2835_mmal_init(void) + return -ENOMEM; + + dev->camera_num = camera; ++ dev->max_width = resolutions[camera][0]; ++ dev->max_height = resolutions[camera][1]; + + /* setup device defaults */ + dev->overlay.w.left = 150; +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 202906b9e8e6ec5a9cb4e953cac85f505d7dabd3..13f426f5ecdffeab714d658a6f8b76e63af5fcdb 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.h ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.h +@@ -107,7 +107,8 @@ struct bm2835_mmal_dev { + } capture; + + unsigned int camera_num; +- ++ unsigned int max_width; ++ unsigned int max_height; + }; + + int bm2835_mmal_init_controls( + +From 84e7fef10ff701b2b45e6b8e6a5a6b815eb9e835 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Sat, 23 Apr 2016 15:21:41 +0000 +Subject: [PATCH 297/398] ARM: bcm2835: add i2s-gpio28-31 for cm + +Add i2s-gpio28-31 overlay for compute module +so that i2s is using gpio28-31 + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 ++++++ + arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts | 18 ++++++++++++++++++ + 3 files changed, 25 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 4842dc1d5c68fa61505fd16dab9709a10ee417eb..c8033a7914f96ce03f0256e1a3693c09f644f80a 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -37,6 +37,7 @@ dtbo-$(RPI_DT_OVERLAYS) += i2c-mux-pca9548a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 6a62e6fdb073aa8daf86828b4b308d1ca6259b3f..af0676e29f16b59fe50fe018b6892fdaea800525 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -464,6 +464,12 @@ Params: sda1_pin GPIO pin for SDA1 (2 or 44 - default 2) + default 4) + + ++Name: i2s-gpio28-31 ++Info: move I2S function block to GPIO 28 to 31 ++Load: dtoverlay=i2s-gpio28-31 ++Params: ++ ++ + Name: i2s-mmap + Info: Enables mmap support in the bcm2708-i2s driver + Load: dtoverlay=i2s-mmap +diff --git a/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts b/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..30c356d6070cc3b1dfd1d5a07dc1021339bf5bd2 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts +@@ -0,0 +1,18 @@ ++/* ++ * Device tree overlay to move i2s to gpio 28 to 31 on CM ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&i2s_pins>; ++ __overlay__ { ++ brcm,pins = <28 29 30 31>; ++ brcm,function = <6>; /* alt2 */ ++ }; ++ }; ++}; + +From 2d0cc5e9bac56b8af7ecaf73068f34157391f3e9 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 24 Apr 2016 17:28:15 +0100 +Subject: [PATCH 298/398] drm/vc4: Add DT parameters to control CMA usage + +Example: dtoverlay=vc4-kms-v3d,cma-128 + +See: https://github.com/raspberrypi/linux/pull/1431 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 8 +++-- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 36 ++++++++++++++++++++++ + 2 files changed, 42 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index af0676e29f16b59fe50fe018b6892fdaea800525..9ba2884991994b15591d6f09669bdc99d87e7e15 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1023,8 +1023,12 @@ Name: vc4-kms-v3d + Info: Enable Eric Anholt's DRM VC4 HDMI/HVS/V3D driver. Running startx or + booting to GUI while this overlay is in use will cause interesting + lockups. +-Load: dtoverlay=vc4-kms-v3d +-Params: ++Load: dtoverlay=vc4-kms-v3d, ++Params: cma-256 CMA is 256MB, 256MB-aligned (needs 1GB) ++ cma-192 CMA is 192MB, 256MB-aligned (needs 1GB) ++ cma-128 CMA is 128MB, 128MB-aligned ++ cma-96 CMA is 96MB, 128MB-aligned ++ cma-64 CMA is 64MB, 64MB-aligned + + + Name: vga666 +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index d07c5373b90adbbeb79659733a5c8c5fa73ca88d..547b2c723f347fece54aa28425d9dec8fc239855 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -94,4 +94,40 @@ + bootargs = "cma=256M@256M"; + }; + }; ++ ++ fragment@5 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=192M@256M"; ++ }; ++ }; ++ ++ fragment@6 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=128M@128M"; ++ }; ++ }; ++ ++ fragment@7 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=96M@128M"; ++ }; ++ }; ++ ++ fragment@8 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=64M@64M"; ++ }; ++ }; ++ ++ __overrides__ { ++ cma-256 = <0>,"+4-5-6-7-8"; ++ cma-192 = <0>,"-4+5-6-7-8"; ++ cma-128 = <0>,"-4-5+6-7-8"; ++ cma-96 = <0>,"-4-5-6+7-8"; ++ cma-64 = <0>,"-4-5-6-7+8"; ++ }; + }; + +From 968a87c758e6703823478ede32e6a212e53dec05 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 25 Apr 2016 10:43:36 +0100 +Subject: [PATCH 299/398] SQUASH: BCM270X_DT: Add make rule for sdio-1bit + +See: https://github.com/raspberrypi/linux/pull/1301 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index c8033a7914f96ce03f0256e1a3693c09f644f80a..50bfa55af8c9e4a40ba31624769b274aea61caab 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -66,6 +66,7 @@ dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdio-1bit.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdtweak.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo + +From b859ef311c6804910e8ac6e4c21c473eaac5ac7a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= +Date: Fri, 8 Jan 2016 09:02:44 +0100 +Subject: [PATCH 300/398] dts: add overlay for pitft22 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo: +https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic + +Signed-off-by: Petter Mabäcker +Signed-off-by: Andrei Gherzan +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 12 +++++ + arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++ + 3 files changed, 82 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pitft22-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 50bfa55af8c9e4a40ba31624769b274aea61caab..90d2034031edebf050da430843abd54d3ae03e1e 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -51,6 +51,7 @@ dtbo-$(RPI_DT_OVERLAYS) += pi3-disable-bt.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo + dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo + dtbo-$(RPI_DT_OVERLAYS) += piscreen2r.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pitft22.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pitft28-capacitive.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pitft28-resistive.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pps-gpio.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 9ba2884991994b15591d6f09669bdc99d87e7e15..710085e8d896ed4193a42cbc9c8dbf9e03c413f2 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -644,6 +644,18 @@ Params: speed Display SPI bus speed + xohms Touchpanel sensitivity (X-plate resistance) + + ++Name: pitft22 ++Info: Adafruit PiTFT 2.2" screen ++Load: dtoverlay=pitft22,= ++Params: speed Display SPI bus speed ++ ++ rotate Display rotation {0,90,180,270} ++ ++ fps Delay between frame updates ++ ++ debug Debug output level {0-7} ++ ++ + Name: pitft28-capacitive + Info: Adafruit PiTFT 2.8" capacitive touch screen + Load: dtoverlay=pitft28-capacitive,= +diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..894ba2292f6be76356f3ab39376d84ebd72fa29d +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +@@ -0,0 +1,69 @@ ++/* ++ * Device Tree overlay for pitft by Adafruit ++ * ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&spi0>; ++ __overlay__ { ++ status = "okay"; ++ ++ spidev@0{ ++ status = "disabled"; ++ }; ++ ++ spidev@1{ ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&gpio>; ++ __overlay__ { ++ pitft_pins: pitft_pins { ++ brcm,pins = <25>; ++ brcm,function = <1>; /* out */ ++ brcm,pull = <0>; /* none */ ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&spi0>; ++ __overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ pitft: pitft@0{ ++ compatible = "ilitek,ili9340"; ++ reg = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pitft_pins>; ++ ++ spi-max-frequency = <32000000>; ++ rotate = <90>; ++ fps = <25>; ++ bgr; ++ buswidth = <8>; ++ dc-gpios = <&gpio 25 0>; ++ debug = <0>; ++ }; ++ ++ }; ++ }; ++ ++ __overrides__ { ++ speed = <&pitft>,"spi-max-frequency:0"; ++ rotate = <&pitft>,"rotate:0"; ++ fps = <&pitft>,"fps:0"; ++ debug = <&pitft>,"debug:0"; ++ }; ++}; + +From c54ce14b256c409bdab9495a7122df9a019f4bbf Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 26 Apr 2016 10:44:59 +0100 +Subject: [PATCH 301/398] BCM270X_DT: Sound DT adjustments for Dynamic DT + +There are a number of issues when loading and unloading overlays for +sound cards: +1) The "sound" and "audio" nodes must be children of a bus node, such + as "/soc", otherwise the DT changes don't result in platform devices + being created and deleted. +2) The "/sound" node must have a "disabled" status property, otherwise + setting the status to "okay" won't be detected. +3) ALSA doesn't like having components unloaded under its feet, and it + is easy to deadlock or crash. Ordering the overlay fragments so that + the sound card appears last avoids this problem. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 23 +++++++++--------- + .../dts/overlays/akkordion-iqdacplus-overlay.dts | 28 +++++++++++----------- + .../boot/dts/overlays/boomberry-dac-overlay.dts | 22 ++++++++--------- + .../boot/dts/overlays/boomberry-digi-overlay.dts | 20 ++++++++-------- + .../boot/dts/overlays/hifiberry-amp-overlay.dts | 20 ++++++++-------- + .../boot/dts/overlays/hifiberry-dac-overlay.dts | 22 ++++++++--------- + .../dts/overlays/hifiberry-dacplus-overlay.dts | 22 ++++++++--------- + .../boot/dts/overlays/hifiberry-digi-overlay.dts | 20 ++++++++-------- + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 20 ++++++++-------- + .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 22 ++++++++--------- + arch/arm/boot/dts/overlays/raspidac3-overlay.dts | 20 ++++++++-------- + arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 22 ++++++++--------- + arch/arm/boot/dts/overlays/rpi-proto-overlay.dts | 20 ++++++++-------- + 13 files changed, 141 insertions(+), 140 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 7ff7a886ca551c74102e1027e228bc47c6ecb749..4ec0156566051d198e96e8f7ce1ae8655f42c879 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -34,17 +34,6 @@ + clocks = &clocks; + }; + +- /* Onboard audio */ +- audio: audio { +- compatible = "brcm,bcm2835-audio"; +- brcm,pwm-channels = <8>; +- status = "disabled"; +- }; +- +- /* External sound card */ +- sound: sound { +- }; +- + soc: soc { + compatible = "simple-bus"; + #address-cells = <1>; +@@ -313,6 +302,18 @@ + compatible = "brcm,bcm2835-thermal"; + firmware = <&firmware>; + }; ++ ++ /* Onboard audio */ ++ audio: audio { ++ compatible = "brcm,bcm2835-audio"; ++ brcm,pwm-channels = <8>; ++ status = "disabled"; ++ }; ++ ++ /* External sound card */ ++ sound: sound { ++ status = "disabled"; ++ }; + }; + + clocks: clocks { +diff --git a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +index 47c7664f7f058436b41a89ded35a1d0197b0f187..208849d5c39274ed0aa557f63a19430a451a95f5 100644 +--- a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +@@ -6,25 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- frag0: __overlay__ { +- compatible = "iqaudio,iqaudio-dac"; +- card_name = "Akkordion"; +- dai_name = "IQaudIO DAC"; +- dai_stream_name = "IQaudIO DAC HiFi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -40,7 +28,19 @@ + }; + }; + ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ card_name = "Akkordion"; ++ dai_name = "IQaudIO DAC"; ++ dai_stream_name = "IQaudIO DAC HiFi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; ++ 24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts +index 0f7c9b0bfdb7d1527cb474137c9a8e65b92cff4e..725e8550f21d304b219d314acc2405d6e85ea8e5 100644 +--- a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- frag0: __overlay__ { +- compatible = "boomberry,boomberry-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -37,7 +28,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "boomberry,boomberry-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag0>,"boomberry,24db_digital_gain?"; ++ 24db_digital_gain = <&frag2>,"boomberry,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts +index a86e1d0750d70854fbd1c1ca7574d1b262ea3aa7..a451f6ddbe2fc66e5cdb1e010551eb217b5abf99 100644 +--- a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts ++++ b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "boomberry,boomberry-digi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "boomberry,boomberry-digi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts +index 2c81448c969e93b6511fa9382b5d8ae16edfffce..5f5785534fd3d9a97309796f842c8881e2d6979a 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "hifiberry,hifiberry-amp"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-amp"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +index 5e7633ae85cd32cf074380579e9f67a220bb0320..af7e32a9067d6a4bcb85a17844ed4cdd87589bf2 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +@@ -6,23 +6,14 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "hifiberry,hifiberry-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { +- target-path = "/"; ++ fragment@1 { ++ target = <&soc>; + __overlay__ { + pcm5102a-codec { + #sound-dai-cells = <0>; +@@ -31,4 +22,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +index 42a0194e97c067840fa0c578857818a883fb2327..4d8e09f11aacfebba78a9ac2f1e98f20883b5d70 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +@@ -16,22 +16,13 @@ + }; + + fragment@1 { +- target = <&sound>; +- frag1: __overlay__ { +- compatible = "hifiberry,hifiberry-dacplus"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@2 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@3 { ++ fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -48,7 +39,16 @@ + }; + }; + ++ fragment@3 { ++ target = <&sound>; ++ frag3: __overlay__ { ++ compatible = "hifiberry,hifiberry-dacplus"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag1>,"hifiberry,24db_digital_gain?"; ++ 24db_digital_gain = <&frag3>,"hifiberry,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts +index d0e0d8aa63a9be729e8c0f3b8814f15e92da2e61..f5e41f48ba4fed92194ff5a63d13c70bb2d1c091 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "hifiberry,hifiberry-digi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-digi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +index ea8173e529117dc17295efeb89f47e78147ed178..8e8ee0685da38c23f400cbfd20ab801a144eac90 100644 +--- a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "iqaudio,iqaudio-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts +index e0aaf8f03349bb5e7685cc9b65e7ac5820b71c5a..1d0663e19e7bf7395957ae49b501e5b15ecf3881 100644 +--- a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- frag0: __overlay__ { +- compatible = "iqaudio,iqaudio-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -37,7 +28,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; ++ 24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/raspidac3-overlay.dts b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts +index 1bd80542e3e5e6b1cd5c5255db2642549a6e92c5..2fac57ca179fcf114655ea91dbef419c16aceb79 100644 +--- a/arch/arm/boot/dts/overlays/raspidac3-overlay.dts ++++ b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "jg,raspidacv3"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -42,4 +33,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "jg,raspidacv3"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +index 7fc6ac996f934a87bfc17089212252e95a7e24e4..1523eae9c39997aa68cfa583ada92a92395bb1e0 100644 +--- a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +@@ -6,23 +6,14 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "rpi,rpi-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { +- target-path = "/"; ++ fragment@1 { ++ target = <&soc>; + __overlay__ { + pcm1794a-codec { + #sound-dai-cells = <0>; +@@ -31,4 +22,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "rpi,rpi-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts +index 20299305328541631a0810d97e0fbe2e39df1d4e..8332d0159a45b29952d0ad1a8fda339d4fdbee3e 100644 +--- a/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "rpi,rpi-proto"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "rpi,rpi-proto"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; + +From d137c48e5c4eb06bfffdf49e3bd126ca39d26149 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 27 Apr 2016 12:01:41 +0100 +Subject: [PATCH 302/398] BCM270X_DT: Fix codec use in hifiberry-dac overlay + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +index af7e32a9067d6a4bcb85a17844ed4cdd87589bf2..0b74fdc6e0f640967a5681b28360e33b8d4b7cfa 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +@@ -13,7 +13,7 @@ + }; + + fragment@1 { +- target = <&soc>; ++ target-path = "/"; + __overlay__ { + pcm5102a-codec { + #sound-dai-cells = <0>; + +From b897734521f4d30305e6634984b1277781f15415 Mon Sep 17 00:00:00 2001 +From: Arend van Spriel +Date: Thu, 10 Dec 2015 13:43:06 +0100 +Subject: [PATCH 303/398] brcmfmac: no interface combination check for single + interface + +The interface combinations are intended for use-case in which the driver +handles multiple interface concurrently. This means that the combinations +do not need to be checked when there is only a single interface active. + +Reviewed-by: Hante Meuleman +Reviewed-by: Pieter-Paul Giesberts +Signed-off-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index 90f65d9b3d73e58c3ba68b097cf828652d308245..de4ecec4eb5ffc859bc92dbe5e8884b11c8167c4 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -392,15 +392,23 @@ static int brcmf_vif_change_validate(struct brcmf_cfg80211_info *cfg, + { + int iftype_num[NUM_NL80211_IFTYPES]; + struct brcmf_cfg80211_vif *pos; ++ bool check_combos = false; ++ int ret = 0; + + memset(&iftype_num[0], 0, sizeof(iftype_num)); + list_for_each_entry(pos, &cfg->vif_list, list) +- if (pos == vif) ++ if (pos == vif) { + iftype_num[new_type]++; +- else ++ } else { ++ /* concurrent interfaces so need check combinations */ ++ check_combos = true; + iftype_num[pos->wdev.iftype]++; ++ } + +- return cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num); ++ if (check_combos) ++ ret = cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num); ++ ++ return ret; + } + + static int brcmf_vif_add_validate(struct brcmf_cfg80211_info *cfg, + +From 314df941251f1d640ce6b49a6d1883ad14ec9a49 Mon Sep 17 00:00:00 2001 +From: Hante Meuleman +Date: Thu, 10 Dec 2015 13:43:07 +0100 +Subject: [PATCH 304/398] brcmfmac: Fix IBSS setup + +IBSS got broken over time. Disconnect events should not be given +for IBSS mode and connect events for IBSS need to have channel +information. + +Reviewed-by: Arend Van Spriel +Reviewed-by: Pieter-Paul Giesberts +Signed-off-by: Hante Meuleman +Signed-off-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index de4ecec4eb5ffc859bc92dbe5e8884b11c8167c4..2bba94dbd86e0df03e99147f59ec224cf4221b3e 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -1268,17 +1268,17 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason) + + brcmf_dbg(TRACE, "Enter\n"); + +- if (test_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) { ++ if (test_and_clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) { + brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n "); + err = brcmf_fil_cmd_data_set(vif->ifp, + BRCMF_C_DISASSOC, NULL, 0); + if (err) { + brcmf_err("WLC_DISASSOC failed (%d)\n", err); + } +- clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state); +- cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0, +- true, GFP_KERNEL); +- ++ if ((vif->wdev.iftype == NL80211_IFTYPE_STATION) || ++ (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT)) ++ cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0, ++ true, GFP_KERNEL); + } + clear_bit(BRCMF_VIF_STATUS_CONNECTING, &vif->sme_state); + clear_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status); +@@ -2701,8 +2701,8 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg) + return err; + } + +-static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg, +- struct net_device *ndev, const u8 *bssid) ++static s32 brcmf_inform_ibss(struct brcmf_cfg80211_info *cfg, ++ struct net_device *ndev, const u8 *bssid) + { + struct wiphy *wiphy = cfg_to_wiphy(cfg); + struct ieee80211_channel *notify_channel; +@@ -2747,6 +2747,7 @@ static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg, + band = wiphy->bands[IEEE80211_BAND_5GHZ]; + + freq = ieee80211_channel_to_frequency(ch.chnum, band->band); ++ cfg->channel = freq; + notify_channel = ieee80211_get_channel(wiphy, freq); + + notify_capability = le16_to_cpu(bi->capability); +@@ -5026,9 +5027,9 @@ brcmf_notify_connect_status(struct brcmf_if *ifp, + } else if (brcmf_is_linkup(e)) { + brcmf_dbg(CONN, "Linkup\n"); + if (brcmf_is_ibssmode(ifp->vif)) { ++ brcmf_inform_ibss(cfg, ndev, e->addr); + chan = ieee80211_get_channel(cfg->wiphy, cfg->channel); + memcpy(profile->bssid, e->addr, ETH_ALEN); +- wl_inform_ibss(cfg, ndev, e->addr); + cfg80211_ibss_joined(ndev, e->addr, chan, GFP_KERNEL); + clear_bit(BRCMF_VIF_STATUS_CONNECTING, + &ifp->vif->sme_state); + +From 93b2257668732905fc341aeaf8e18a84826029aa Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:33 +0100 +Subject: [PATCH 305/398] Revert "bcm2835: log which channel map is set" + +This reverts commit cd560b8658868d9652ab31754e02f86daf6831ba. +--- + sound/arm/bcm2835-vchiq.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 876986dc2733085769e77a3858134d8409b7eabc..93710735d5d3e2930ec9cac0fe596c3f08602d64 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -596,11 +596,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + instance->result = -1; + + if (alsa_stream->chip->cea_chmap >= 0) { +- LOG_INFO("Using application requested channel map: %d\n", +- alsa_stream->chip->cea_chmap); + chmap_value = (unsigned)alsa_stream->chip->cea_chmap << 24; + } else { +- LOG_INFO("Using fallback channel map.\n"); + /* fallback layouts for applications which do not use chmap API */ + chmap_value = 0x00; + switch (channels) { +@@ -617,8 +614,6 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + for (i = 0; i < 8; i++) + chmap_value |= alsa_stream->chip->map_channels[i] << (i * 3); + +- LOG_INFO("Requesting AUDS channel map: 0x%lx\n", (long)chmap_value); +- + m.type = VC_AUDIO_MSG_TYPE_CONFIG; + m.u.config.channels = channels; + m.u.config.samplerate = samplerate; + +From bf343d765880accb8679a750d030e3c433d2fbd8 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:35 +0100 +Subject: [PATCH 306/398] Revert "bcm2835: add fallback channel layouts if + channel map API is not used" + +This reverts commit ceacfff9f86f89826dbc8a6df667f485894327d1. +--- + sound/arm/bcm2835-vchiq.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 93710735d5d3e2930ec9cac0fe596c3f08602d64..8ecd2d735fbf94b9018c89c705a68750aad5bf97 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -598,16 +598,7 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + if (alsa_stream->chip->cea_chmap >= 0) { + chmap_value = (unsigned)alsa_stream->chip->cea_chmap << 24; + } else { +- /* fallback layouts for applications which do not use chmap API */ +- chmap_value = 0x00; +- switch (channels) { +- case 3: chmap_value = 0x01; break; +- case 4: chmap_value = 0x03; break; +- case 5: chmap_value = 0x07; break; +- case 6: chmap_value = 0x0b; break; +- case 7: chmap_value = 0x0f; break; +- case 8: chmap_value = 0x13; break; +- } ++ chmap_value = 0; /* force stereo */ + for (i = 0; i < 8; i++) + alsa_stream->chip->map_channels[i] = i; + } + +From 5fa96b9df11fd2f9b7a7eddec9ea0dda3737ed3a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:36 +0100 +Subject: [PATCH 307/398] Revert "bcm2835: do not require substream for + accessing chmap ctl" + +This reverts commit a05b4815196018c329ea98c24205bc6fa9c097e0. +--- + sound/arm/bcm2835-ctl.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index 8b855f9ded88e0d297fd770edffa9835fa9e6b00..e9307186b082fc292af79f48ca71e3cd6ce8c99c 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -489,6 +489,8 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, + { + struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); + bcm2835_chip_t *chip = info->private_data; ++ unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); ++ struct snd_pcm_substream *substream = snd_pcm_chmap_substream(info, idx); + struct cea_channel_speaker_allocation *ch = NULL; + int res = 0; + int cur = 0; +@@ -497,6 +499,11 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, + if (mutex_lock_interruptible(&chip->audio_mutex)) + return -EINTR; + ++ if (!substream || !substream->runtime) { ++ res = -ENODEV; ++ goto unlock; ++ } ++ + for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { + if (channel_allocations[i].ca_index == chip->cea_chmap) + ch = &channel_allocations[i]; +@@ -514,6 +521,7 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, + while (cur < 8) + ucontrol->value.integer.value[cur++] = SNDRV_CHMAP_NA; + ++unlock: + mutex_unlock(&chip->audio_mutex); + return res; + } +@@ -533,7 +541,7 @@ static int snd_bcm2835_chmap_ctl_put(struct snd_kcontrol *kcontrol, + return -EINTR; + + if (!substream || !substream->runtime) { +- /* ignore and return success for the sake of alsactl */ ++ res = -ENODEV; + goto unlock; + } + + +From 15b96b298d93e979fccb1261e56ecd0875a80ecb Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:37 +0100 +Subject: [PATCH 308/398] Revert "bcm2835: interpolate audio delay" + +This reverts commit 83eca613d0eddd2c8299f114b8fe573ccaffdefc. +--- + sound/arm/bcm2835-pcm.c | 12 +----------- + sound/arm/bcm2835.h | 1 - + 2 files changed, 1 insertion(+), 12 deletions(-) + +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index f3a4c6da6a1e1f1cc937022557fccaebf4c87669..48da3bbd7395e2d3611990b7c5f31db9157b2afc 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -25,7 +25,7 @@ + /* hardware definition */ + static struct snd_pcm_hardware snd_bcm2835_playback_hw = { + .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | +- SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BATCH), ++ SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, + .rate_min = 8000, +@@ -99,8 +99,6 @@ static irqreturn_t bcm2835_playback_fifo_irq(int irq, void *dev_id) + alsa_stream->pos %= alsa_stream->buffer_size; + } + +- alsa_stream->interpolate_start = ktime_get_ns(); +- + if (alsa_stream->substream) { + if (new_period) + snd_pcm_period_elapsed(alsa_stream->substream); +@@ -401,7 +399,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) + alsa_stream->buffer_size = snd_pcm_lib_buffer_bytes(substream); + alsa_stream->period_size = snd_pcm_lib_period_bytes(substream); + alsa_stream->pos = 0; +- alsa_stream->interpolate_start = ktime_get_ns(); + + audio_debug("buffer_size=%d, period_size=%d pos=%d frame_bits=%d\n", + alsa_stream->buffer_size, alsa_stream->period_size, +@@ -498,7 +495,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream) + { + struct snd_pcm_runtime *runtime = substream->runtime; + bcm2835_alsa_stream_t *alsa_stream = runtime->private_data; +- u64 now = ktime_get_ns(); + + audio_info(" .. IN\n"); + +@@ -507,12 +503,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream) + frames_to_bytes(runtime, runtime->control->appl_ptr), + alsa_stream->pos); + +- /* Give userspace better delay reporting by interpolating between GPU +- * notifications, assuming audio speed is close enough to the clock +- * used for ktime */ +- if (alsa_stream->interpolate_start && alsa_stream->interpolate_start < now) +- runtime->delay = -(int)div_u64((now - alsa_stream->interpolate_start) * runtime->rate, 1000000000); +- + audio_info(" .. OUT\n"); + return snd_pcm_indirect_playback_pointer(substream, + &alsa_stream->pcm_indirect, +diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h +index 20ef108cb693575f0a1b5d5703a1fe4968277975..997fb69da951c7ceb732f4897b7450ecfc37d168 100755 +--- a/sound/arm/bcm2835.h ++++ b/sound/arm/bcm2835.h +@@ -137,7 +137,6 @@ typedef struct bcm2835_alsa_stream { + unsigned int pos; + unsigned int buffer_size; + unsigned int period_size; +- u64 interpolate_start; + + uint32_t enable_fifo_irq; + irq_handler_t fifo_irq_handler; + +From 748c839b52758b5265ad1bc77350be05f13bff4a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:28:06 +0100 +Subject: [PATCH 309/398] Revert "bcm2835: only allow stereo if analogue jack + is selected" + +This reverts commit 5f7049894f47b3836838cd68e29ee883179c80b3. +--- + sound/arm/bcm2835-ctl.c | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index e9307186b082fc292af79f48ca71e3cd6ce8c99c..dec052b9c0a5a3f69f90878cde814cb9adc27848 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -423,16 +423,9 @@ static struct cea_channel_speaker_allocation channel_allocations[] = { + { .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, + }; + +-static int uses_analogue(bcm2835_chip_t *chip) +-{ +- return chip->dest == 1; +-} +- + static int snd_bcm2835_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag, + unsigned int size, unsigned int __user *tlv) + { +- struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); +- bcm2835_chip_t *chip = info->private_data; + unsigned int __user *dst; + int count = 0; + int i; +@@ -449,9 +442,6 @@ static int snd_bcm2835_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag, + int chs_bytes; + int c; + +- if (i > 0 && uses_analogue(chip)) +- break; +- + for (c = 0; c < 8; c++) { + if (ch->speakers[c]) + num_chs++; +@@ -562,8 +552,6 @@ static int snd_bcm2835_chmap_ctl_put(struct snd_kcontrol *kcontrol, + int matches = 1; + int cur = 0; + int x; +- if (i > 0 && uses_analogue(chip)) +- break; + memset(remap, 0, sizeof(remap)); + for (x = 0; x < substream->runtime->channels; x++) { + int sp = ucontrol->value.integer.value[x]; + +From 3b3c482f4a637a463d20d6d61881fb10f620827c Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:28:08 +0100 +Subject: [PATCH 310/398] Revert "bcm2835: always use 2/4/8 channels for + multichannel layouts" + +This reverts commit 06931f74092d86087144f070b06a4444df8b444b. +--- + sound/arm/bcm2835-ctl.c | 89 ++++++++++++++++++++++++------------------------- + 1 file changed, 44 insertions(+), 45 deletions(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index dec052b9c0a5a3f69f90878cde814cb9adc27848..5b8e6bd2b89abf8135933a4028e23e25e5f2eef5 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -349,7 +349,6 @@ struct cea_channel_speaker_allocation { + #define FRW SNDRV_CHMAP_FRW + #define TC SNDRV_CHMAP_TC + #define FCH SNDRV_CHMAP_TFC +-#define NA SNDRV_CHMAP_NA + + /* + * CEA-861 channel maps +@@ -357,69 +356,69 @@ struct cea_channel_speaker_allocation { + * Stolen from sound/pci/hda/patch_hdmi.c + * (unlike the source, this uses SNDRV_* constants directly, as by the + * map_tables array in patch_hdmi.c) +- * Entries which do not have a physical output channel use 0. Entries which +- * require userspace to output silence use NA (SNDRV_CHMAP_NA). ++ * Unknown entries use 0, which unfortunately is SNDRV_CHMAP_UNKNOWN instead ++ * of SNDRV_CHMAP_NA. + */ + static struct cea_channel_speaker_allocation channel_allocations[] = { + /* channel: 7 6 5 4 3 2 1 0 */ + { .ca_index = 0x00, .speakers = { 0, 0, 0, 0, 0, 0, FR, FL } }, + /* 2.1 */ +-{ .ca_index = 0x01, .speakers = { 0, 0, 0, 0, NA, LFE, FR, FL } }, ++{ .ca_index = 0x01, .speakers = { 0, 0, 0, 0, 0, LFE, FR, FL } }, + /* Dolby Surround */ +-{ .ca_index = 0x02, .speakers = { 0, 0, 0, 0, FC, NA, FR, FL } }, ++{ .ca_index = 0x02, .speakers = { 0, 0, 0, 0, FC, 0, FR, FL } }, + /* surround40 */ +-{ .ca_index = 0x08, .speakers = { NA, NA, RR, RL, NA, NA, FR, FL } }, ++{ .ca_index = 0x08, .speakers = { 0, 0, RR, RL, 0, 0, FR, FL } }, + /* surround41 */ +-{ .ca_index = 0x09, .speakers = { NA, NA, RR, RL, NA, LFE, FR, FL } }, ++{ .ca_index = 0x09, .speakers = { 0, 0, RR, RL, 0, LFE, FR, FL } }, + /* surround50 */ +-{ .ca_index = 0x0a, .speakers = { NA, NA, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x0a, .speakers = { 0, 0, RR, RL, FC, 0, FR, FL } }, + /* surround51 */ +-{ .ca_index = 0x0b, .speakers = { NA, NA, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x0b, .speakers = { 0, 0, RR, RL, FC, LFE, FR, FL } }, + /* 6.1 */ +-{ .ca_index = 0x0f, .speakers = { NA, RC, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x0f, .speakers = { 0, RC, RR, RL, FC, LFE, FR, FL } }, + /* surround71 */ + { .ca_index = 0x13, .speakers = { RRC, RLC, RR, RL, FC, LFE, FR, FL } }, + +-{ .ca_index = 0x03, .speakers = { NA, NA, NA, NA, FC, LFE, FR, FL } }, +-{ .ca_index = 0x04, .speakers = { NA, NA, NA, RC, NA, NA, FR, FL } }, +-{ .ca_index = 0x05, .speakers = { NA, NA, NA, RC, NA, LFE, FR, FL } }, +-{ .ca_index = 0x06, .speakers = { NA, NA, NA, RC, FC, NA, FR, FL } }, +-{ .ca_index = 0x07, .speakers = { NA, NA, NA, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x0c, .speakers = { NA, RC, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x0d, .speakers = { NA, RC, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x0e, .speakers = { NA, RC, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x10, .speakers = { RRC, RLC, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x11, .speakers = { RRC, RLC, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x12, .speakers = { RRC, RLC, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x14, .speakers = { FRC, FLC, NA, NA, NA, NA, FR, FL } }, +-{ .ca_index = 0x15, .speakers = { FRC, FLC, NA, NA, NA, LFE, FR, FL } }, +-{ .ca_index = 0x16, .speakers = { FRC, FLC, NA, NA, FC, NA, FR, FL } }, +-{ .ca_index = 0x17, .speakers = { FRC, FLC, NA, NA, FC, LFE, FR, FL } }, +-{ .ca_index = 0x18, .speakers = { FRC, FLC, NA, RC, NA, NA, FR, FL } }, +-{ .ca_index = 0x19, .speakers = { FRC, FLC, NA, RC, NA, LFE, FR, FL } }, +-{ .ca_index = 0x1a, .speakers = { FRC, FLC, NA, RC, FC, NA, FR, FL } }, +-{ .ca_index = 0x1b, .speakers = { FRC, FLC, NA, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x1c, .speakers = { FRC, FLC, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x1d, .speakers = { FRC, FLC, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x1e, .speakers = { FRC, FLC, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x03, .speakers = { 0, 0, 0, 0, FC, LFE, FR, FL } }, ++{ .ca_index = 0x04, .speakers = { 0, 0, 0, RC, 0, 0, FR, FL } }, ++{ .ca_index = 0x05, .speakers = { 0, 0, 0, RC, 0, LFE, FR, FL } }, ++{ .ca_index = 0x06, .speakers = { 0, 0, 0, RC, FC, 0, FR, FL } }, ++{ .ca_index = 0x07, .speakers = { 0, 0, 0, RC, FC, LFE, FR, FL } }, ++{ .ca_index = 0x0c, .speakers = { 0, RC, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x0d, .speakers = { 0, RC, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x0e, .speakers = { 0, RC, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x10, .speakers = { RRC, RLC, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x11, .speakers = { RRC, RLC, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x12, .speakers = { RRC, RLC, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x14, .speakers = { FRC, FLC, 0, 0, 0, 0, FR, FL } }, ++{ .ca_index = 0x15, .speakers = { FRC, FLC, 0, 0, 0, LFE, FR, FL } }, ++{ .ca_index = 0x16, .speakers = { FRC, FLC, 0, 0, FC, 0, FR, FL } }, ++{ .ca_index = 0x17, .speakers = { FRC, FLC, 0, 0, FC, LFE, FR, FL } }, ++{ .ca_index = 0x18, .speakers = { FRC, FLC, 0, RC, 0, 0, FR, FL } }, ++{ .ca_index = 0x19, .speakers = { FRC, FLC, 0, RC, 0, LFE, FR, FL } }, ++{ .ca_index = 0x1a, .speakers = { FRC, FLC, 0, RC, FC, 0, FR, FL } }, ++{ .ca_index = 0x1b, .speakers = { FRC, FLC, 0, RC, FC, LFE, FR, FL } }, ++{ .ca_index = 0x1c, .speakers = { FRC, FLC, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x1d, .speakers = { FRC, FLC, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x1e, .speakers = { FRC, FLC, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x1f, .speakers = { FRC, FLC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x20, .speakers = { NA, FCH, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x21, .speakers = { NA, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x22, .speakers = { TC, NA, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x23, .speakers = { TC, NA, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x24, .speakers = { FRH, FLH, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x25, .speakers = { FRH, FLH, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x26, .speakers = { FRW, FLW, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x27, .speakers = { FRW, FLW, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x28, .speakers = { TC, RC, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x20, .speakers = { 0, FCH, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x21, .speakers = { 0, FCH, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x22, .speakers = { TC, 0, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x23, .speakers = { TC, 0, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x24, .speakers = { FRH, FLH, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x25, .speakers = { FRH, FLH, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x26, .speakers = { FRW, FLW, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x27, .speakers = { FRW, FLW, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x28, .speakers = { TC, RC, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x29, .speakers = { TC, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2a, .speakers = { FCH, RC, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x2a, .speakers = { FCH, RC, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x2b, .speakers = { FCH, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2c, .speakers = { TC, FCH, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x2c, .speakers = { TC, FCH, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x2d, .speakers = { TC, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2e, .speakers = { FRH, FLH, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x2e, .speakers = { FRH, FLH, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x2f, .speakers = { FRH, FLH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x30, .speakers = { FRW, FLW, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x30, .speakers = { FRW, FLW, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, + }; + + +From 16ce63a1493bdee82bea51bc5342639a12e64eb0 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:29:03 +0100 +Subject: [PATCH 311/398] Revert "bcm2835: implement channel map API" + +This reverts commit 5efba3f8c180c39609a8d40033ef92046ef0de75. +--- + sound/arm/bcm2835-ctl.c | 299 ---------------------------------------------- + sound/arm/bcm2835-pcm.c | 69 ++--------- + sound/arm/bcm2835-vchiq.c | 13 -- + sound/arm/bcm2835.h | 4 - + 4 files changed, 7 insertions(+), 378 deletions(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index 5b8e6bd2b89abf8135933a4028e23e25e5f2eef5..75dc3224be7ce8353378e9676ad2c6847dd0750b 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -327,304 +327,6 @@ static struct snd_kcontrol_new snd_bcm2835_spdif[] = { + }, + }; + +-struct cea_channel_speaker_allocation { +- int ca_index; +- int speakers[8]; +-}; +- +-#define FL SNDRV_CHMAP_FL +-#define FR SNDRV_CHMAP_FR +-#define RL SNDRV_CHMAP_RL +-#define RR SNDRV_CHMAP_RR +-#define LFE SNDRV_CHMAP_LFE +-#define FC SNDRV_CHMAP_FC +-#define RLC SNDRV_CHMAP_RLC +-#define RRC SNDRV_CHMAP_RRC +-#define RC SNDRV_CHMAP_RC +-#define FLC SNDRV_CHMAP_FLC +-#define FRC SNDRV_CHMAP_FRC +-#define FLH SNDRV_CHMAP_TFL +-#define FRH SNDRV_CHMAP_TFR +-#define FLW SNDRV_CHMAP_FLW +-#define FRW SNDRV_CHMAP_FRW +-#define TC SNDRV_CHMAP_TC +-#define FCH SNDRV_CHMAP_TFC +- +-/* +- * CEA-861 channel maps +- * +- * Stolen from sound/pci/hda/patch_hdmi.c +- * (unlike the source, this uses SNDRV_* constants directly, as by the +- * map_tables array in patch_hdmi.c) +- * Unknown entries use 0, which unfortunately is SNDRV_CHMAP_UNKNOWN instead +- * of SNDRV_CHMAP_NA. +- */ +-static struct cea_channel_speaker_allocation channel_allocations[] = { +-/* channel: 7 6 5 4 3 2 1 0 */ +-{ .ca_index = 0x00, .speakers = { 0, 0, 0, 0, 0, 0, FR, FL } }, +- /* 2.1 */ +-{ .ca_index = 0x01, .speakers = { 0, 0, 0, 0, 0, LFE, FR, FL } }, +- /* Dolby Surround */ +-{ .ca_index = 0x02, .speakers = { 0, 0, 0, 0, FC, 0, FR, FL } }, +- /* surround40 */ +-{ .ca_index = 0x08, .speakers = { 0, 0, RR, RL, 0, 0, FR, FL } }, +- /* surround41 */ +-{ .ca_index = 0x09, .speakers = { 0, 0, RR, RL, 0, LFE, FR, FL } }, +- /* surround50 */ +-{ .ca_index = 0x0a, .speakers = { 0, 0, RR, RL, FC, 0, FR, FL } }, +- /* surround51 */ +-{ .ca_index = 0x0b, .speakers = { 0, 0, RR, RL, FC, LFE, FR, FL } }, +- /* 6.1 */ +-{ .ca_index = 0x0f, .speakers = { 0, RC, RR, RL, FC, LFE, FR, FL } }, +- /* surround71 */ +-{ .ca_index = 0x13, .speakers = { RRC, RLC, RR, RL, FC, LFE, FR, FL } }, +- +-{ .ca_index = 0x03, .speakers = { 0, 0, 0, 0, FC, LFE, FR, FL } }, +-{ .ca_index = 0x04, .speakers = { 0, 0, 0, RC, 0, 0, FR, FL } }, +-{ .ca_index = 0x05, .speakers = { 0, 0, 0, RC, 0, LFE, FR, FL } }, +-{ .ca_index = 0x06, .speakers = { 0, 0, 0, RC, FC, 0, FR, FL } }, +-{ .ca_index = 0x07, .speakers = { 0, 0, 0, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x0c, .speakers = { 0, RC, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x0d, .speakers = { 0, RC, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x0e, .speakers = { 0, RC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x10, .speakers = { RRC, RLC, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x11, .speakers = { RRC, RLC, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x12, .speakers = { RRC, RLC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x14, .speakers = { FRC, FLC, 0, 0, 0, 0, FR, FL } }, +-{ .ca_index = 0x15, .speakers = { FRC, FLC, 0, 0, 0, LFE, FR, FL } }, +-{ .ca_index = 0x16, .speakers = { FRC, FLC, 0, 0, FC, 0, FR, FL } }, +-{ .ca_index = 0x17, .speakers = { FRC, FLC, 0, 0, FC, LFE, FR, FL } }, +-{ .ca_index = 0x18, .speakers = { FRC, FLC, 0, RC, 0, 0, FR, FL } }, +-{ .ca_index = 0x19, .speakers = { FRC, FLC, 0, RC, 0, LFE, FR, FL } }, +-{ .ca_index = 0x1a, .speakers = { FRC, FLC, 0, RC, FC, 0, FR, FL } }, +-{ .ca_index = 0x1b, .speakers = { FRC, FLC, 0, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x1c, .speakers = { FRC, FLC, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x1d, .speakers = { FRC, FLC, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x1e, .speakers = { FRC, FLC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x1f, .speakers = { FRC, FLC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x20, .speakers = { 0, FCH, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x21, .speakers = { 0, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x22, .speakers = { TC, 0, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x23, .speakers = { TC, 0, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x24, .speakers = { FRH, FLH, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x25, .speakers = { FRH, FLH, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x26, .speakers = { FRW, FLW, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x27, .speakers = { FRW, FLW, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x28, .speakers = { TC, RC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x29, .speakers = { TC, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2a, .speakers = { FCH, RC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x2b, .speakers = { FCH, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2c, .speakers = { TC, FCH, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x2d, .speakers = { TC, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2e, .speakers = { FRH, FLH, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x2f, .speakers = { FRH, FLH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x30, .speakers = { FRW, FLW, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, +-}; +- +-static int snd_bcm2835_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag, +- unsigned int size, unsigned int __user *tlv) +-{ +- unsigned int __user *dst; +- int count = 0; +- int i; +- +- if (size < 8) +- return -ENOMEM; +- if (put_user(SNDRV_CTL_TLVT_CONTAINER, tlv)) +- return -EFAULT; +- size -= 8; +- dst = tlv + 2; +- for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { +- struct cea_channel_speaker_allocation *ch = &channel_allocations[i]; +- int num_chs = 0; +- int chs_bytes; +- int c; +- +- for (c = 0; c < 8; c++) { +- if (ch->speakers[c]) +- num_chs++; +- } +- +- chs_bytes = num_chs * 4; +- if (size < 8) +- return -ENOMEM; +- if (put_user(SNDRV_CTL_TLVT_CHMAP_FIXED, dst) || +- put_user(chs_bytes, dst + 1)) +- return -EFAULT; +- dst += 2; +- size -= 8; +- count += 8; +- if (size < chs_bytes) +- return -ENOMEM; +- size -= chs_bytes; +- count += chs_bytes; +- for (c = 0; c < 8; c++) { +- int sp = ch->speakers[7 - c]; +- if (sp) { +- if (put_user(sp, dst)) +- return -EFAULT; +- dst++; +- } +- } +- } +- if (put_user(count, tlv + 1)) +- return -EFAULT; +- return 0; +-} +- +-static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, +- struct snd_ctl_elem_value *ucontrol) +-{ +- struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); +- bcm2835_chip_t *chip = info->private_data; +- unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); +- struct snd_pcm_substream *substream = snd_pcm_chmap_substream(info, idx); +- struct cea_channel_speaker_allocation *ch = NULL; +- int res = 0; +- int cur = 0; +- int i; +- +- if (mutex_lock_interruptible(&chip->audio_mutex)) +- return -EINTR; +- +- if (!substream || !substream->runtime) { +- res = -ENODEV; +- goto unlock; +- } +- +- for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { +- if (channel_allocations[i].ca_index == chip->cea_chmap) +- ch = &channel_allocations[i]; +- } +- +- /* If no layout was set yet, return a dummy. Apparently the userspace +- * API will be confused if we don't. */ +- if (!ch) +- ch = &channel_allocations[0]; +- +- for (i = 0; i < 8; i++) { +- if (ch->speakers[7 - i]) +- ucontrol->value.integer.value[cur++] = ch->speakers[7 - i]; +- } +- while (cur < 8) +- ucontrol->value.integer.value[cur++] = SNDRV_CHMAP_NA; +- +-unlock: +- mutex_unlock(&chip->audio_mutex); +- return res; +-} +- +-static int snd_bcm2835_chmap_ctl_put(struct snd_kcontrol *kcontrol, +- struct snd_ctl_elem_value *ucontrol) +-{ +- struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); +- bcm2835_chip_t *chip = info->private_data; +- unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); +- struct snd_pcm_substream *substream = snd_pcm_chmap_substream(info, idx); +- int i, prepared = 0, cea_chmap = -1; +- int res = 0; +- int remap[8]; +- +- if (mutex_lock_interruptible(&chip->audio_mutex)) +- return -EINTR; +- +- if (!substream || !substream->runtime) { +- res = -ENODEV; +- goto unlock; +- } +- +- switch (substream->runtime->status->state) { +- case SNDRV_PCM_STATE_OPEN: +- case SNDRV_PCM_STATE_SETUP: +- break; +- case SNDRV_PCM_STATE_PREPARED: +- prepared = 1; +- break; +- default: +- res = -EBUSY; +- goto unlock; +- } +- +- for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { +- struct cea_channel_speaker_allocation *ch = &channel_allocations[i]; +- int matches = 1; +- int cur = 0; +- int x; +- memset(remap, 0, sizeof(remap)); +- for (x = 0; x < substream->runtime->channels; x++) { +- int sp = ucontrol->value.integer.value[x]; +- while (cur < 8 && !ch->speakers[7 - cur]) +- cur++; +- if (cur >= 8) { +- /* user has more channels than ch */ +- matches = 0; +- break; +- } +- if (ch->speakers[7 - cur] != sp) { +- matches = 0; +- break; +- } +- remap[x] = cur; +- cur++; +- } +- for (x = cur; x < 8; x++) { +- if (ch->speakers[7 - x]) { +- /* ch has more channels than user */ +- matches = 0; +- break; +- } +- } +- if (matches) { +- cea_chmap = ch->ca_index; +- break; +- } +- } +- +- if (cea_chmap < 0) { +- res = -EINVAL; +- goto unlock; +- } +- +- /* don't change the layout if another substream is active */ +- if (chip->opened != (1 << substream->number) && chip->cea_chmap != cea_chmap) { +- res = -EBUSY; /* unsure whether this is a good error code */ +- goto unlock; +- } +- +- chip->cea_chmap = cea_chmap; +- for (i = 0; i < 8; i++) +- chip->map_channels[i] = remap[i]; +- if (prepared) +- snd_bcm2835_pcm_prepare_again(substream); +- +-unlock: +- mutex_unlock(&chip->audio_mutex); +- return res; +-} +- +-static int snd_bcm2835_add_chmap_ctl(bcm2835_chip_t * chip) +-{ +- struct snd_pcm_chmap *chmap; +- struct snd_kcontrol *kctl; +- int err, i; +- +- err = snd_pcm_add_chmap_ctls(chip->pcm, +- SNDRV_PCM_STREAM_PLAYBACK, +- NULL, 8, 0, &chmap); +- if (err < 0) +- return err; +- /* override handlers */ +- chmap->private_data = chip; +- kctl = chmap->kctl; +- for (i = 0; i < kctl->count; i++) +- kctl->vd[i].access |= SNDRV_CTL_ELEM_ACCESS_WRITE; +- kctl->get = snd_bcm2835_chmap_ctl_get; +- kctl->put = snd_bcm2835_chmap_ctl_put; +- kctl->tlv.c = snd_bcm2835_chmap_ctl_tlv; +- return 0; +-} +- + int snd_bcm2835_new_ctl(bcm2835_chip_t * chip) + { + int err; +@@ -638,7 +340,6 @@ int snd_bcm2835_new_ctl(bcm2835_chip_t * chip) + if (err < 0) + return err; + } +- snd_bcm2835_add_chmap_ctl(chip); + for (idx = 0; idx < ARRAY_SIZE(snd_bcm2835_spdif); idx++) { + err = snd_ctl_add(chip->card, + snd_ctl_new1(&snd_bcm2835_spdif[idx], chip)); +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index 48da3bbd7395e2d3611990b7c5f31db9157b2afc..b6ee0279eff9ad84be0fc6caf5189d1e61f46493 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -19,9 +19,6 @@ + + #include "bcm2835.h" + +-/* The hardware can not do much more num_channels*samplerate then this value */ +-#define MAX_COMBINED_RATE 768000 +- + /* hardware definition */ + static struct snd_pcm_hardware snd_bcm2835_playback_hw = { + .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | +@@ -110,31 +107,6 @@ static irqreturn_t bcm2835_playback_fifo_irq(int irq, void *dev_id) + return IRQ_HANDLED; + } + +- +-static int rate_hw_constraint_rate(struct snd_pcm_hw_params *params, +- struct snd_pcm_hw_rule *rule) +-{ +- struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); +- struct snd_interval rates = { +- .min = 8000, +- .max = min(192000u, MAX_COMBINED_RATE / max(channels->min, 1u)), +- }; +- struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); +- return snd_interval_refine(rate, &rates); +-} +- +-static int rate_hw_constraint_channels(struct snd_pcm_hw_params *params, +- struct snd_pcm_hw_rule *rule) +-{ +- struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); +- struct snd_interval channels_interval = { +- .min = 1, +- .max = min(8u, MAX_COMBINED_RATE / max(rate->min, 1u)), +- }; +- struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); +- return snd_interval_refine(channels, &channels_interval); +-} +- + /* open callback */ + static int snd_bcm2835_playback_open_generic( + struct snd_pcm_substream *substream, int spdif) +@@ -216,24 +188,8 @@ static int snd_bcm2835_playback_open_generic( + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + 16); + +- /* When playing PCM, pretend that we support the full range of channels +- * and sample rates. The GPU can't output it, but is able to resample +- * the data to a rate the hardware can handle it. This won't work with +- * compressed data; the resampler would just destroy it. */ +- if (spdif) { +- err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, +- rate_hw_constraint_rate, NULL, +- SNDRV_PCM_HW_PARAM_CHANNELS, -1); +- err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, +- rate_hw_constraint_channels, NULL, +- SNDRV_PCM_HW_PARAM_RATE, -1); +- } +- + chip->alsa_stream[idx] = alsa_stream; + +- if (!chip->opened) +- chip->cea_chmap = -1; +- + chip->opened |= (1 << idx); + alsa_stream->open = 1; + alsa_stream->draining = 1; +@@ -344,7 +300,8 @@ static int snd_bcm2835_pcm_hw_free(struct snd_pcm_substream *substream) + return snd_pcm_lib_free_pages(substream); + } + +-int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream) ++/* prepare callback */ ++static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) + { + bcm2835_chip_t *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; +@@ -352,6 +309,11 @@ int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream) + int channels; + int err; + ++ audio_info(" .. IN\n"); ++ ++ if (mutex_lock_interruptible(&chip->audio_mutex)) ++ return -EINTR; ++ + /* notify the vchiq that it should enter spdif passthrough mode by + * setting channels=0 (see + * https://github.com/raspberrypi/linux/issues/528) */ +@@ -367,23 +329,6 @@ int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream) + audio_error(" error setting hw params\n"); + } + +- return err; +-} +- +-/* prepare callback */ +-static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) +-{ +- bcm2835_chip_t *chip = snd_pcm_substream_chip(substream); +- struct snd_pcm_runtime *runtime = substream->runtime; +- bcm2835_alsa_stream_t *alsa_stream = runtime->private_data; +- +- audio_info(" .. IN\n"); +- +- if (mutex_lock_interruptible(&chip->audio_mutex)) +- return -EINTR; +- +- snd_bcm2835_pcm_prepare_again(substream); +- + bcm2835_audio_setup(alsa_stream); + + /* in preparation of the stream, set the controls (volume level) of the stream */ +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 8ecd2d735fbf94b9018c89c705a68750aad5bf97..3de30945d8155b90d244734881a7caa81930fa7c 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -570,8 +570,6 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + VC_AUDIO_MSG_T m; + AUDIO_INSTANCE_T *instance = alsa_stream->instance; + int32_t success; +- uint32_t chmap_value; +- int i; + int ret; + LOG_DBG(" .. IN\n"); + +@@ -595,21 +593,10 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + + instance->result = -1; + +- if (alsa_stream->chip->cea_chmap >= 0) { +- chmap_value = (unsigned)alsa_stream->chip->cea_chmap << 24; +- } else { +- chmap_value = 0; /* force stereo */ +- for (i = 0; i < 8; i++) +- alsa_stream->chip->map_channels[i] = i; +- } +- for (i = 0; i < 8; i++) +- chmap_value |= alsa_stream->chip->map_channels[i] << (i * 3); +- + m.type = VC_AUDIO_MSG_TYPE_CONFIG; + m.u.config.channels = channels; + m.u.config.samplerate = samplerate; + m.u.config.bps = bps; +- m.u.config.channelmap = chmap_value; + + /* Create the message available completion */ + init_completion(&instance->msg_avail_comp); +diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h +index 997fb69da951c7ceb732f4897b7450ecfc37d168..0f71c5def314a63252fa4fe18ae2ba5a339f2cfb 100755 +--- a/sound/arm/bcm2835.h ++++ b/sound/arm/bcm2835.h +@@ -107,8 +107,6 @@ typedef struct bcm2835_chip { + int old_volume; /* stores the volume value whist muted */ + int dest; + int mute; +- int cea_chmap; /* currently requested Audio InfoFrame Data Byte 4 */ +- int map_channels[8]; + + unsigned int opened; + unsigned int spdif_status; +@@ -151,8 +149,6 @@ int snd_bcm2835_new_ctl(bcm2835_chip_t * chip); + int snd_bcm2835_new_pcm(bcm2835_chip_t * chip); + int snd_bcm2835_new_spdif_pcm(bcm2835_chip_t * chip); + +-int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream); +- + int bcm2835_audio_open(bcm2835_alsa_stream_t * alsa_stream); + int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream); + int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + +From ff89a3669951dc42a944cb007c355186c2f080d5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:30:00 +0100 +Subject: [PATCH 312/398] Revert "bcm2835: extend allowed range of channels and + samplerates" + +This reverts commit 688a5f0daa45e0a51b324707768d472e1d715c13. +--- + sound/arm/bcm2835-pcm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index b6ee0279eff9ad84be0fc6caf5189d1e61f46493..d2de13cbd76ed16634f27c0843474825671a28eb 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -26,9 +26,9 @@ static struct snd_pcm_hardware snd_bcm2835_playback_hw = { + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, + .rate_min = 8000, +- .rate_max = 192000, ++ .rate_max = 48000, + .channels_min = 1, +- .channels_max = 8, ++ .channels_max = 2, + .buffer_bytes_max = 128 * 1024, + .period_bytes_min = 1 * 1024, + .period_bytes_max = 128 * 1024, +@@ -43,9 +43,9 @@ static struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = { + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_44100 | + SNDRV_PCM_RATE_48000, + .rate_min = 44100, +- .rate_max = 192000, ++ .rate_max = 48000, + .channels_min = 2, +- .channels_max = 8, ++ .channels_max = 2, + .buffer_bytes_max = 128 * 1024, + .period_bytes_min = 1 * 1024, + .period_bytes_max = 128 * 1024, + +From 98f9191a7090b5b0996ed0e9bd706095f4edc726 Mon Sep 17 00:00:00 2001 +From: Sakari Ailus +Date: Sun, 3 Apr 2016 16:31:03 -0300 +Subject: [PATCH 313/398] videobuf2-v4l2: Verify planes array in buffer + dequeueing + +commit 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab upstream. + +When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer +which will be dequeued is not known until the buffer has been removed from +the queue. The number of planes is specific to a buffer, not to the queue. + +This does lead to the situation where multi-plane buffers may be requested +and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument +struct with fewer planes. + +__fill_v4l2_buffer() however uses the number of planes from the dequeued +videobuf2 buffer, overwriting kernel memory (the m.planes array allocated +in video_usercopy() in v4l2-ioctl.c) if the user provided fewer +planes than the dequeued buffer had. Oops! + +Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2") + +Signed-off-by: Sakari Ailus +Acked-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c +index 502984c724ff5efd14ef10250dd5d8e653468111..6c441be8f893d8e931825b63b810d67ae67a2864 100644 +--- a/drivers/media/v4l2-core/videobuf2-v4l2.c ++++ b/drivers/media/v4l2-core/videobuf2-v4l2.c +@@ -67,6 +67,11 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer + return 0; + } + ++static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb) ++{ ++ return __verify_planes_array(vb, pb); ++} ++ + /** + * __verify_length() - Verify that the bytesused value for each plane fits in + * the plane length and that the data offset doesn't exceed the bytesused value. +@@ -432,6 +437,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb, + } + + static const struct vb2_buf_ops v4l2_buf_ops = { ++ .verify_planes_array = __verify_planes_array_core, + .fill_user_buffer = __fill_v4l2_buffer, + .fill_vb2_buffer = __fill_vb2_buffer, + .set_timestamp = __set_timestamp, + +From c4a0807ad1dd05e5cb079b7d2fdfae74212b4914 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 6 May 2016 12:32:47 +0100 +Subject: [PATCH 314/398] pinctrl-bcm2835: Return pins to inputs when freed + +When dynamically unloading overlays, it is important that freed pins are +restored to being inputs to prevent functions from being enabled in +multiple places at once. + +Signed-off-by: Phil Elwell +--- + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +index 32f779eeafcba4b29390572e5393b2f4058e0d13..aa3bc650038da62f1c32159b4e47988383508f8e 100644 +--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c ++++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +@@ -831,6 +831,15 @@ static const struct pinctrl_ops bcm2835_pctl_ops = { + .dt_free_map = bcm2835_pctl_dt_free_map, + }; + ++static void bcm2835_pmx_free(struct pinctrl_dev *pctldev, ++ unsigned offset) ++{ ++ struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); ++ ++ /* disable by setting to GPIO_IN */ ++ bcm2835_pinctrl_fsel_set(pc, offset, BCM2835_FSEL_GPIO_IN); ++} ++ + static int bcm2835_pmx_get_functions_count(struct pinctrl_dev *pctldev) + { + return BCM2835_FSEL_COUNT; +@@ -890,6 +899,7 @@ static int bcm2835_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, + } + + static const struct pinmux_ops bcm2835_pmx_ops = { ++ .free = bcm2835_pmx_free, + .get_functions_count = bcm2835_pmx_get_functions_count, + .get_function_name = bcm2835_pmx_get_function_name, + .get_function_groups = bcm2835_pmx_get_function_groups, + +From d5b07c4be6d02c4626ae7bcf64ff87b66ef58c7d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 6 May 2016 12:53:16 +0100 +Subject: [PATCH 315/398] BCM270X_DT: i2c0-bcm2708 - pin group params + +Add parameters to set pin groups as a unit, setting the pin function +appropriately. The parameters are: + pins_0_1 + pins_28_29 + pins_44_45 + pins_46_47 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 11 ++++-- + .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 43 +++++++++++++++++----- + 2 files changed, 42 insertions(+), 12 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 710085e8d896ed4193a42cbc9c8dbf9e03c413f2..1c81b141d81e4eeda5202913da4abac08f0aa3e8 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -449,10 +449,15 @@ Params: ds1307 Select the DS1307 device + + + Name: i2c0-bcm2708 +-Info: Enable the i2c_bcm2708 driver for the i2c0 bus ++Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations ++ are usable on all platforms. + Load: dtoverlay=i2c0-bcm2708,= +-Params: sda0_pin GPIO pin for SDA0 (0, 28 [or 44] - default 0) +- scl0_pin GPIO pin for SCL0 (1, 29 [or 45] - default 1) ++Params: sda0_pin GPIO pin for SDA0 (deprecated - use pins_*) ++ scl0_pin GPIO pin for SCL0 (deprecated - use pins_*) ++ pins_0_1 Use pins 0 and 1 (default) ++ pins_28_29 Use pins 28 and 29 ++ pins_44_45 Use pins 44 and 45 ++ pins_46_47 Use pins 46 and 47 + + + Name: i2c1-bcm2708 +diff --git a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts +index 5c0e55b73531925f91a1cc3867ddf00ebb782db3..1f4fc7b570604a50ff6d3f6d676c3c4642d66b17 100644 +--- a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts +@@ -14,23 +14,48 @@ + fragment@0 { + target = <&i2c0>; + __overlay__ { +- pinctrl-0 = <&i2c0_pins>; + status = "okay"; + }; + }; + + fragment@1 { +- target = <&gpio>; +- __overlay__ { +- i2c0_pins: i2c0 { +- brcm,pins = <0 1>; +- brcm,function = <4>; /* alt0 */ +- }; ++ target = <&i2c0_pins>; ++ frag1: __overlay__ { ++ brcm,pins = <0 1>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c0_pins>; ++ __dormant__ { ++ brcm,pins = <28 29>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c0_pins>; ++ __dormant__ { ++ brcm,pins = <44 45>; ++ brcm,function = <5>; /* alt1 */ ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c0_pins>; ++ __dormant__ { ++ brcm,pins = <46 47>; ++ brcm,function = <4>; /* alt0 */ + }; + }; + + __overrides__ { +- sda0_pin = <&i2c0_pins>,"brcm,pins:0"; +- scl0_pin = <&i2c0_pins>,"brcm,pins:4"; ++ sda0_pin = <&frag1>,"brcm,pins:0"; ++ scl0_pin = <&frag1>,"brcm,pins:4"; ++ pins_0_1 = <0>,"+1-2-3-4"; ++ pins_28_29 = <0>,"-1+2-3-4"; ++ pins_44_45 = <0>,"-1-2+3-4"; ++ pins_46_47 = <0>,"-1-2-3+4"; + }; + }; + +From b8b34bc3ca4b51b920e79c58d9983d1d2089d1cd Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 12:40:37 +0100 +Subject: [PATCH 316/398] config: Add CONFIG_DRM_LOAD_EDID_FIRMWARE + +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 54c8f4ed3c41e67d46c509aab8fce3d390b1e369..aa4b12396e9bc5c908e28cc24eaadbdb1e9852f5 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -815,6 +815,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 13471cc1c4433669c716a820a054bec99fd13aa6..757a020a5b73399ca4c66e3585f4008578355bb6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -807,6 +807,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + +From 3647aaf5f0bc1bd3f2e1525ad8cc115ff0e3f67e Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 17:18:57 +0100 +Subject: [PATCH 317/398] Revert "rpi: update vc_vchi_audioserv_defs.h" + +This reverts commit 64fa9f963dffab0145f7960a593422064bb0aa8d. +--- + sound/arm/vc_vchi_audioserv_defs.h | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h +index 5f4409fc821cee48abf3b4c581c09072d55dd56a..af3e6eb690113fc32ce9e06bd2f0f294da7a7f00 100644 +--- a/sound/arm/vc_vchi_audioserv_defs.h ++++ b/sound/arm/vc_vchi_audioserv_defs.h +@@ -16,7 +16,7 @@ + #define _VC_AUDIO_DEFS_H_ + + #define VC_AUDIOSERV_MIN_VER 1 +-#define VC_AUDIOSERV_VER 3 ++#define VC_AUDIOSERV_VER 2 + + // FourCC code used for VCHI connection + #define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS") +@@ -36,7 +36,6 @@ typedef enum { + VC_AUDIO_MSG_TYPE_START, // Configure audio + VC_AUDIO_MSG_TYPE_STOP, // Configure audio + VC_AUDIO_MSG_TYPE_WRITE, // Configure audio +- VC_AUDIO_MSG_TYPE_LATENCY, // request latency in cycles + VC_AUDIO_MSG_TYPE_MAX + } VC_AUDIO_MSG_TYPE; + +@@ -45,7 +44,6 @@ typedef struct { + uint32_t channels; + uint32_t samplerate; + uint32_t bps; +- uint32_t channelmap; + + } VC_AUDIO_CONFIG_T; + +@@ -86,12 +84,6 @@ typedef struct { + uint16_t max_packet; + } VC_AUDIO_WRITE_T; + +-// query latency in samples of sink +-typedef struct +-{ +- uint32_t dummy; +-} VC_AUDIO_LATENCY_T; +- + // Generic result for a request (VC->HOST) + typedef struct { + int32_t success; // Success value +@@ -116,10 +108,9 @@ typedef struct { + VC_AUDIO_START_T start; + VC_AUDIO_STOP_T stop; + VC_AUDIO_WRITE_T write; +- VC_AUDIO_LATENCY_T latency; + VC_AUDIO_RESULT_T result; + VC_AUDIO_COMPLETE_T complete; + } u; + } VC_AUDIO_MSG_T; + +-#endif // _VC_AUDIO_DEFS_H_ +\ No newline at end of file ++#endif // _VC_AUDIO_DEFS_H_ + +From 93b425583314d15781b80ebbf7b8e9482c7b4796 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 17:21:58 +0100 +Subject: [PATCH 318/398] Revert "config: Add CONFIG_DRM_LOAD_EDID_FIRMWARE" + +This reverts commit 417aed4cb35a479e001c8389fd8d97c3ea612999. +--- + arch/arm/configs/bcm2709_defconfig | 1 - + arch/arm/configs/bcmrpi_defconfig | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index aa4b12396e9bc5c908e28cc24eaadbdb1e9852f5..54c8f4ed3c41e67d46c509aab8fce3d390b1e369 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -815,7 +815,6 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m +-CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 757a020a5b73399ca4c66e3585f4008578355bb6..13471cc1c4433669c716a820a054bec99fd13aa6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -807,7 +807,6 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m +-CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + +From edb9094f623138aa655c713763ff867a66cd7289 Mon Sep 17 00:00:00 2001 +From: Andrey Grodzovsky +Date: Tue, 3 May 2016 22:10:59 -0400 +Subject: [PATCH 319/398] ARM: adau1977-adc: Add basic machine driver for + adau1977 codec driver. + +This commit adds basic support for the codec usage including: Device tree overlay, +binding I2S bus and setting I2S mode, clock source and frequency setting according +to spec. + +Signed-off-by: Andrey Grodzovsky +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 7 ++ + .../arm/boot/dts/overlays/adau1977-adc-overlay.dts | 53 +++++++++ + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + sound/soc/bcm/Kconfig | 7 ++ + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/adau1977-adc.c | 125 +++++++++++++++++++++ + 8 files changed, 197 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts + create mode 100644 sound/soc/bcm/adau1977-adc.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 90d2034031edebf050da430843abd54d3ae03e1e..3758fa9992bde3d6e62a08919df388f9b6bbc6ae 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -12,6 +12,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + RPI_DT_OVERLAYS=y + endif + ++dtbo-$(RPI_DT_OVERLAYS) += adau1977-adc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 1c81b141d81e4eeda5202913da4abac08f0aa3e8..a0488adbf700c15c677b31aa14857690c6531c01 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -161,6 +161,13 @@ Params: + and the other i2c baudrate parameters. + + ++Name: adau1977-adc ++Info: Overlay for activation of ADAU1977 ADC codec over I2C for control ++ and I2S for data. ++Load: dtoverlay=adau1977-adc ++Params: ++ ++ + Name: ads7846 + Info: ADS7846 Touch controller + Load: dtoverlay=ads7846,= +diff --git a/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts b/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..24fcd58fd1dc61d97a77def3d5d1f7c65130dde6 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts +@@ -0,0 +1,53 @@ ++// Definitions for ADAU1977 ADC ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&soc>; ++ ++ __overlay__ { ++ codec_supply: fixedregulator@0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "AVDD"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c>; ++ ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ adau1977: codec@11 { ++ compatible = "adi,adau1977"; ++ reg = <0x11>; ++ reset-gpios = <&gpio 5 0>; ++ AVDD-supply = <&codec_supply>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "adi,adau1977-adc"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 54c8f4ed3c41e67d46c509aab8fce3d390b1e369..47bd1c27b15978a57be891d60feed8c77bcef9f9 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -861,6 +861,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m + CONFIG_SND_SIMPLE_CARD=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 13471cc1c4433669c716a820a054bec99fd13aa6..d66fcd4a4bce71c218fe7307ff106a084893ffed 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -853,6 +853,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m + CONFIG_SND_SIMPLE_CARD=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 3383381122d9c9f77b98a1d83d4e9bd3df16b82f..c05e656eaa9684a64e2d0d5c41b599815d3c8840 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -78,3 +78,10 @@ config SND_BCM2708_SOC_RASPIDAC3 + select SND_SOC_TPA6130A2 + help + Say Y or M if you want to add support for RaspiDAC Rev.3x. ++ ++config SND_BCM2708_SOC_ADAU1977_ADC ++ tristate "Support for ADAU1977 ADC" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_ADAU1977_I2C ++ help ++ Say Y or M if you want to add support for ADAU1977 ADC. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index b04b0d2ea8d31d6d528d08ff8df11b80182676ef..7de2ef13a0d3c72c2a77921e69004ba4cbd5c02b 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -4,6 +4,7 @@ snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o + obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o + + # BCM2708 Machine Support ++snd-soc-adau1977-adc-objs := adau1977-adc.o + snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o +@@ -15,6 +16,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o + snd-soc-raspidac3-objs := raspidac3.o + ++obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o +diff --git a/sound/soc/bcm/adau1977-adc.c b/sound/soc/bcm/adau1977-adc.c +new file mode 100644 +index 0000000000000000000000000000000000000000..6e2ee027926ee63c89222f75ceb89e3d2434b0e1 +--- /dev/null ++++ b/sound/soc/bcm/adau1977-adc.c +@@ -0,0 +1,125 @@ ++/* ++ * ASoC Driver for ADAU1977 ADC ++ * ++ * Author: Andrey Grodzovsky ++ * Copyright 2016 ++ * ++ * This file is based on hifibery_dac driver by Florian Meier. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++enum adau1977_clk_id { ++ ADAU1977_SYSCLK, ++}; ++ ++enum adau1977_sysclk_src { ++ ADAU1977_SYSCLK_SRC_MCLK, ++ ADAU1977_SYSCLK_SRC_LRCLK, ++}; ++ ++static int eval_adau1977_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ int ret; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ ++ ret = snd_soc_dai_set_tdm_slot(codec_dai, 0, 0, 0, 0); ++ if (ret < 0) ++ return ret; ++ ++ return snd_soc_codec_set_sysclk(rtd->codec, ADAU1977_SYSCLK, ++ ADAU1977_SYSCLK_SRC_MCLK, 11289600, SND_SOC_CLOCK_IN); ++} ++ ++static struct snd_soc_dai_link snd_rpi_adau1977_dai[] = { ++ { ++ .name = "adau1977", ++ .stream_name = "ADAU1977", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "adau1977-hifi", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "adau1977.1-0011", ++ .init = eval_adau1977_init, ++ .dai_fmt = SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ }, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_adau1977_adc = { ++ .name = "snd_rpi_adau1977_adc", ++ .owner = THIS_MODULE, ++ .dai_link = snd_rpi_adau1977_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_adau1977_dai), ++}; ++ ++static int snd_adau1977_adc_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_adau1977_adc.dev = &pdev->dev; ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_adau1977_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ ++ ret = snd_soc_register_card(&snd_adau1977_adc); ++ if (ret) ++ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); ++ ++ return ret; ++} ++ ++static int snd_adau1977_adc_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_adau1977_adc); ++} ++ ++static const struct of_device_id snd_adau1977_adc_of_match[] = { ++ { .compatible = "adi,adau1977-adc", }, ++ {}, ++}; ++ ++MODULE_DEVICE_TABLE(of, snd_adau1977_adc_of_match); ++ ++static struct platform_driver snd_adau1977_adc_driver = { ++ .driver = { ++ .name = "snd-adau1977-adc", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_adau1977_adc_of_match, ++ }, ++ .probe = snd_adau1977_adc_probe, ++ .remove = snd_adau1977_adc_remove, ++}; ++ ++module_platform_driver(snd_adau1977_adc_driver); ++ ++MODULE_AUTHOR("Andrey Grodzovsky "); ++MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); ++MODULE_LICENSE("GPL v2"); + +From ce77029a91fa44ccf49dfdb18cd86eba608deda4 Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Fri, 6 May 2016 09:42:55 +0100 +Subject: [PATCH 320/398] Allow up to 24dB digital gain to be applied when + using IQAudIO DAC + +24db_digital_gain DT param can be used to specify that PCM512x +codec "Digital" volume control should not be limited to 0dB gain, +and if specified will allow the full 24dB gain. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/overlays/README | 17 +++++++++++++++-- + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 6 +++++- + 2 files changed, 20 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index a0488adbf700c15c677b31aa14857690c6531c01..78b2616399987df7ab8c07baa0842662f486d2b4 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -490,8 +490,21 @@ Params: + + Name: iqaudio-dac + Info: Configures the IQaudio DAC audio card +-Load: dtoverlay=iqaudio-dac +-Params: ++Load: dtoverlay=iqaudio-dac, ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ "dtoverlay=iqaudio-dac,24db_digital_gain" ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24db_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) + + + Name: iqaudio-dacplus +diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +index 8e8ee0685da38c23f400cbfd20ab801a144eac90..0d35c85382bb5766b3eeb9de1bd4a94621229e4b 100644 +--- a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +@@ -30,10 +30,14 @@ + + fragment@2 { + target = <&sound>; +- __overlay__ { ++ frag2: __overlay__ { + compatible = "iqaudio,iqaudio-dac"; + i2s-controller = <&i2s>; + status = "okay"; + }; + }; ++ ++ __overrides__ { ++ 24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?"; ++ }; + }; + +From f642ea5ba1d2c520a4a146e6bf9eb7753163aff5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 12:40:37 +0100 +Subject: [PATCH 321/398] config: Add CONFIG_DRM_LOAD_EDID_FIRMWARE + +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 47bd1c27b15978a57be891d60feed8c77bcef9f9..0bdc63180a149eaf51c199d727ba85cd74412e4a 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -815,6 +815,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index d66fcd4a4bce71c218fe7307ff106a084893ffed..57393b5e216f80cddd11b119cc57aab7e56006b3 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -807,6 +807,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + +From 7ae212b3ef1f581abb51e4bb1c7bc3d70423493a Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 11:48:35 -0700 +Subject: [PATCH 322/398] BCM270X_DT: Move vc4 node contents to + bcm2708_common.dtsi. + +This should clarify what's going on with the overlay: The hardware is +always present, we're just enabling the DT node so that the vc4 driver +probes. + +The interrupts are left in the overlay, because the firmware doesn't +check node status before masking out the vc4 interrupts. + +By having the nodes in the common file, we'll be able to correctly +connect the HDMI HPD GPIO so that we can detect whether an HDMI +monitor is connected. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 51 +++++++ + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 160 ++++++++++----------- + 2 files changed, 129 insertions(+), 82 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4ec0156566051d198e96e8f7ce1ae8655f42c879..2562372d2e7986c29f7f671d4d1bcc226484bfc0 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -1,4 +1,7 @@ ++#include "dt-bindings/clock/bcm2835.h" + #include ++#include "dt-bindings/power/raspberrypi-power.h" ++#include "dt-bindings/gpio/gpio.h" + #include "skeleton.dtsi" + + / { +@@ -170,6 +173,18 @@ + status = "disabled"; + }; + ++ pixelvalve0: pixelvalve@7e206000 { ++ compatible = "brcm,bcm2835-pixelvalve0"; ++ reg = <0x7e206000 0x100>; ++ status = "disabled"; ++ }; ++ ++ pixelvalve1: pixelvalve@7e207000 { ++ compatible = "brcm,bcm2835-pixelvalve1"; ++ reg = <0x7e207000 0x100>; ++ status = "disabled"; ++ }; ++ + pwm: pwm@7e20c000 { + compatible = "brcm,bcm2835-pwm"; + reg = <0x7e20c000 0x28>; +@@ -227,6 +242,12 @@ + status = "disabled"; + }; + ++ hvs: hvs@7e400000 { ++ compatible = "brcm,bcm2835-hvs"; ++ reg = <0x7e400000 0x6000>; ++ status = "disabled"; ++ }; ++ + i2c1: i2c@7e804000 { + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e804000 0x1000>; +@@ -261,6 +282,25 @@ + status = "disabled"; + }; + ++ pixelvalve2: pixelvalve@7e807000 { ++ compatible = "brcm,bcm2835-pixelvalve2"; ++ reg = <0x7e807000 0x100>; ++ status = "disabled"; ++ }; ++ ++ hdmi: hdmi@7e902000 { ++ compatible = "brcm,bcm2835-hdmi"; ++ reg = <0x7e902000 0x600>, ++ <0x7e808000 0x100>; ++ ddc = <&i2c2>; ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; ++ clocks = <&cprman BCM2835_PLLH_PIX>, ++ <&cprman BCM2835_CLOCK_HSM>; ++ clock-names = "pixel", "hdmi"; ++ power-domains = <&power RPI_POWER_DOMAIN_HDMI>; ++ status = "disabled"; ++ }; ++ + usb: usb@7e980000 { + compatible = "brcm,bcm2708-usb"; + reg = <0x7e980000 0x10000>, +@@ -269,6 +309,12 @@ + <1 9>; + }; + ++ v3d: v3d@7ec00000 { ++ compatible = "brcm,vc4-v3d"; ++ reg = <0x7ec00000 0x1000>; ++ status = "disabled"; ++ }; ++ + firmware: firmware { + compatible = "raspberrypi,bcm2835-firmware"; + mboxes = <&mailbox>; +@@ -303,6 +349,11 @@ + firmware = <&firmware>; + }; + ++ gpu: gpu { ++ compatible = "brcm,bcm2835-vc4"; ++ status = "disabled"; ++ }; ++ + /* Onboard audio */ + audio: audio { + compatible = "brcm,bcm2835-audio"; +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index 547b2c723f347fece54aa28425d9dec8fc239855..a4ca2cabd4cd19d3a82ad1135604dfa52784fb3f 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -5,129 +5,125 @@ + /dts-v1/; + /plugin/; + +-#include "dt-bindings/clock/bcm2835.h" +-#include "dt-bindings/power/raspberrypi-power.h" +-#include "dt-bindings/gpio/gpio.h" +- + / { + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; + + fragment@0 { ++ target-path = "/chosen"; ++ __overlay__ { ++ bootargs = "cma=256M@256M"; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=192M@256M"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=128M@128M"; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=96M@128M"; ++ }; ++ }; ++ ++ fragment@4 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=64M@64M"; ++ }; ++ }; ++ ++ fragment@5 { + target = <&i2c2>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@1 { ++ fragment@6 { + target = <&cprman>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@7 { + target = <&fb>; + __overlay__ { + status = "disabled"; + }; + }; + +- fragment@3 { +- target = <&soc>; ++ fragment@8 { ++ target = <&pixelvalve0>; + __overlay__ { +- #address-cells = <1>; +- #size-cells = <1>; +- +- pixelvalve@7e206000 { +- compatible = "brcm,bcm2835-pixelvalve0"; +- reg = <0x7e206000 0x100>; +- interrupts = <2 13>; /* pwa0 */ +- }; +- +- pixelvalve@7e207000 { +- compatible = "brcm,bcm2835-pixelvalve1"; +- reg = <0x7e207000 0x100>; +- interrupts = <2 14>; /* pwa1 */ +- }; +- +- hvs@7e400000 { +- compatible = "brcm,bcm2835-hvs"; +- reg = <0x7e400000 0x6000>; +- interrupts = <2 1>; +- }; +- +- pixelvalve@7e807000 { +- compatible = "brcm,bcm2835-pixelvalve2"; +- reg = <0x7e807000 0x100>; +- interrupts = <2 10>; /* pixelvalve */ +- }; +- +- hdmi@7e902000 { +- compatible = "brcm,bcm2835-hdmi"; +- reg = <0x7e902000 0x600>, +- <0x7e808000 0x100>; +- interrupts = <2 8>, <2 9>; +- ddc = <&i2c2>; +- hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; +- clocks = <&cprman BCM2835_PLLH_PIX>, +- <&cprman BCM2835_CLOCK_HSM>; +- clock-names = "pixel", "hdmi"; +- power-domains = <&power RPI_POWER_DOMAIN_HDMI>; +- }; +- +- v3d@7ec00000 { +- compatible = "brcm,vc4-v3d"; +- reg = <0x7ec00000 0x1000>; +- interrupts = <1 10>; +- }; +- +- gpu@7e4c0000 { +- compatible = "brcm,bcm2835-vc4"; +- }; ++ interrupts = <2 13>; /* pwa0 */ ++ status = "okay"; + }; + }; + +- fragment@4 { +- target-path = "/chosen"; +- __overlay__ { +- bootargs = "cma=256M@256M"; ++ fragment@9 { ++ target = <&pixelvalve1>; ++ __overlay__ { ++ interrupts = <2 14>; /* pwa1 */ ++ status = "okay"; + }; + }; + +- fragment@5 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=192M@256M"; ++ fragment@10 { ++ target = <&pixelvalve2>; ++ __overlay__ { ++ interrupts = <2 10>; /* pixelvalve */ ++ status = "okay"; + }; + }; + +- fragment@6 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=128M@128M"; ++ fragment@11 { ++ target = <&hvs>; ++ __overlay__ { ++ interrupts = <2 1>; ++ status = "okay"; + }; + }; + +- fragment@7 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=96M@128M"; ++ fragment@12 { ++ target = <&hdmi>; ++ __overlay__ { ++ interrupts = <2 8>, <2 9>; ++ status = "okay"; + }; + }; + +- fragment@8 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=64M@64M"; ++ fragment@13 { ++ target = <&v3d>; ++ __overlay__ { ++ interrupts = <1 10>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@14 { ++ target = <&gpu>; ++ __overlay__ { ++ status = "okay"; + }; + }; + + __overrides__ { +- cma-256 = <0>,"+4-5-6-7-8"; +- cma-192 = <0>,"-4+5-6-7-8"; +- cma-128 = <0>,"-4-5+6-7-8"; +- cma-96 = <0>,"-4-5-6+7-8"; +- cma-64 = <0>,"-4-5-6-7+8"; ++ cma-256 = <0>,"+0-1-2-3-4"; ++ cma-192 = <0>,"-0+1-2-3-4"; ++ cma-128 = <0>,"-0-1+2-3-4"; ++ cma-96 = <0>,"-0-1-2+3-4"; ++ cma-64 = <0>,"-0-1-2-3+4"; + }; + }; + +From e539649694b4dec6474ff50be79257b8d8193d0f Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 12:42:26 -0700 +Subject: [PATCH 323/398] BCM270X_DT: Set correct HDMI HPD GPIO levels for + various boards. + +The CM is left out, because I haven't found a source for how the CM's +HPD is connected. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 4 ++++ + arch/arm/boot/dts/bcm2708-rpi-b.dts | 4 ++++ + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 4 ++++ + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++++ + 4 files changed, 16 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index 0e9a22d147dd1ace4a7075c431ca13812716a00a..0ac7725224aea4f490c670316f0ab8e6e2eee966 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -116,6 +116,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; ++}; ++ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index a60342c3127cda9b426ec70e08007954af7d05d5..847483495a55f6e6567c81c10cf8023681478bcc 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -110,6 +110,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; ++}; ++ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index 9176d57fe40eaac7b123e8d0249fe93e5b73f755..5e23c04f453ddadb97d244089100f3ff857a2603 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -116,6 +116,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; ++}; ++ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index adba6824ebb46e481b492ce59d3bfc34b6669c7f..0979a27f05d97602ddbf550f7fe50cfaff14c151 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -161,6 +161,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; ++}; ++ + / { + chosen { + bootargs = "8250.nr_uarts=1"; + +From 07f42fbc4cd5974eff80c6412b6a4b6205f7886b Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 12:43:25 -0700 +Subject: [PATCH 324/398] Revert "drm/vc4: Force HDMI to connected." + +Now that we have the HDMI HPD GPIOs correctly identified in the DT, we +should be able to successfully detect HDMI. + +This reverts commit fbec01e2d17b924d91850e17eeecf975e74c9ebf. + +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index db6db77b70cb92f14dda2ebcabf77fa7e9fcceea..85224e542086c913975a86820104eca06d3917c2 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -166,8 +166,6 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + struct drm_device *dev = connector->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + +- return connector_status_connected; +- + if (vc4->hdmi->hpd_gpio) { + if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ + vc4->hdmi->hpd_active_low) + +From cf73ad5a12d0cad160f4dd84301ecc2f25ce2240 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 11 May 2016 15:38:04 +0100 +Subject: [PATCH 325/398] BCM270X_DT: Add umbrella I2C Mux overlay i2c-mux + +This overlay supports a range of I2C multiplexers - PCA9542 (2 ports), +PCA9545 (4 ports) and PCA9548 (8 ports). + +Also remove the dedicated i2c-mux-9548a overlays since it is no longer +needed. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 2 +- + arch/arm/boot/dts/overlays/README | 17 ++- + arch/arm/boot/dts/overlays/i2c-mux-overlay.dts | 138 +++++++++++++++++++++ + .../boot/dts/overlays/i2c-mux-pca9548a-overlay.dts | 67 ---------- + 4 files changed, 152 insertions(+), 72 deletions(-) + create mode 100644 arch/arm/boot/dts/overlays/i2c-mux-overlay.dts + delete mode 100644 arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 3758fa9992bde3d6e62a08919df388f9b6bbc6ae..3d8de479d0a5a1b08e2bcad3c47500f152d792d9 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -34,7 +34,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += i2c-mux-pca9548a.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-mux.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 78b2616399987df7ab8c07baa0842662f486d2b4..97dff3597a86212065c03a0a129a00d28b4c26e0 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -421,10 +421,19 @@ Params: i2c_gpio_sda GPIO used for I2C data (default "23") + (default "2" = ~100kHz) + + +-Name: i2c-mux-pca9548a +-Info: Adds support for an NXP PCA9548A I2C multiplexer on i2c_arm +-Load: dtoverlay=i2c-mux-pca9548a,= +-Params: addr I2C address of PCA9548A (default 0x70) ++Name: i2c-mux ++Info: Adds support for a number of I2C bus multiplexers on i2c_arm ++Load: dtoverlay=i2c-mux,= ++Params: pca9542 Select the NXP PCA9542 device ++ ++ pca9545 Select the NXP PCA9545 device ++ ++ pca9548 Select the NXP PCA9548 device ++ ++ addr Change I2C address of the device (default 0x70) ++ ++ ++[ The i2c-mux-pca9548a overlay has been deleted. See i2c-mux. ] + + + Name: i2c-pwm-pca9685a +diff --git a/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..28ea37fdb8eabfb5bbe86f16d47ed09b5ee16cf3 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +@@ -0,0 +1,138 @@ ++// Umbrella I2C Mux overlay ++ ++/dts-v1/; ++/plugin/; ++ ++/{ ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pca9542: mux@70 { ++ compatible = "nxp,pca9542"; ++ reg = <0x70>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ }; ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pca9545: mux@70 { ++ compatible = "nxp,pca9545"; ++ reg = <0x70>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ }; ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ }; ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pca9548: mux@70 { ++ compatible = "nxp,pca9548"; ++ reg = <0x70>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ }; ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ }; ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ }; ++ i2c@4 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <4>; ++ }; ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ }; ++ i2c@6 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <6>; ++ }; ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ }; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ pca9542 = <0>, "+0"; ++ pca9545 = <0>, "+1"; ++ pca9548 = <0>, "+2"; ++ ++ addr = <&pca9545>,"reg:0", ++ <&pca9548>,"reg:0"; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts +deleted file mode 100644 +index 1729fd6f3c29b3c85996274ad92006453c6e4ce9..0000000000000000000000000000000000000000 +--- a/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts ++++ /dev/null +@@ -1,67 +0,0 @@ +-// Definitions for NXP PCA9548A I2C mux on ARM I2C bus. +-/dts-v1/; +-/plugin/; +- +-/{ +- compatible = "brcm,bcm2708"; +- +- fragment@0 { +- target = <&i2c_arm>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- +- i2cmux: mux@70 { +- compatible = "nxp,pca9548"; +- reg = <0x70>; +- #address-cells = <1>; +- #size-cells = <0>; +- +- i2c@0 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <0>; +- }; +- i2c@1 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <1>; +- }; +- i2c@2 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <2>; +- }; +- i2c@3 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <3>; +- }; +- i2c@4 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <4>; +- }; +- i2c@5 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <5>; +- }; +- i2c@6 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <6>; +- }; +- i2c@7 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <7>; +- }; +- }; +- }; +- }; +- __overrides__ { +- addr = <&i2cmux>,"reg:0"; +- }; +-}; + +From 05ee832e0c901f6cc4df0f2845e5ab3e9032fa1d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 12 May 2016 08:52:06 +0100 +Subject: [PATCH 326/398] BCM270X_DT: Include address override for pca9542 + +Omitted from "BCM270X_DT: Add umbrella I2C Mux overlay i2c-mux". + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/i2c-mux-overlay.dts | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +index 28ea37fdb8eabfb5bbe86f16d47ed09b5ee16cf3..976d38e781539093e91fe641497d8a6701dd6035 100644 +--- a/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +@@ -132,7 +132,8 @@ + pca9545 = <0>, "+1"; + pca9548 = <0>, "+2"; + +- addr = <&pca9545>,"reg:0", ++ addr = <&pca9542>,"reg:0", ++ <&pca9545>,"reg:0", + <&pca9548>,"reg:0"; + }; + }; + +From 592f6b7d021787560786c9de1fc93126279868fd Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 12 May 2016 09:04:20 +0100 +Subject: [PATCH 327/398] BCM270X_DT: Fix the tinylcd35 overlay RTC support + +Now that overlay parameters are applied before the merge (a requirement +for kernel runtime overlays) it is illegal for parameters/overrides to +target nodes in the base DTB. Solve the problem of only enabling I2C +when an RTC option is used by making the RTC fragments conditional, +and including the required status="okay" within the fragments. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts +index 33c0651eac9b8b664a3001cb3ffff1acd184c96d..ed2b053aef23e0b1b34d8d3cb888b2b196758f59 100644 +--- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts ++++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts +@@ -132,28 +132,32 @@ + + fragment@5 { + target = <&i2c1>; +- __overlay__ { ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + ++ status = "okay"; ++ + pcf8563: pcf8563@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; +- status = "disabled"; ++ status = "okay"; + }; + }; + }; + + fragment@6 { + target = <&i2c1>; +- __overlay__ { ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + ++ status = "okay"; ++ + ds1307: ds1307@68 { + compatible = "maxim,ds1307"; + reg = <0x68>; +- status = "disabled"; ++ status = "okay"; + }; + }; + }; +@@ -213,10 +217,8 @@ + <&tinylcd35_ts>,"interrupts:0", + <&tinylcd35_ts>,"pendown-gpio:4"; + xohms = <&tinylcd35_ts>,"ti,x-plate-ohms;0"; +- rtc-pcf = <&i2c1>,"status", +- <&pcf8563>,"status"; +- rtc-ds = <&i2c1>,"status", +- <&ds1307>,"status"; ++ rtc-pcf = <0>,"=5"; ++ rtc-ds = <0>,"=6"; + keypad = <&keypad>,"status"; + }; + }; + +From 004c1938573c74bdc433d941f29317028229978e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 11 May 2016 12:50:33 +0100 +Subject: [PATCH 328/398] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards + +Some SD cards have been found that corrupt data when small blocks +are erased. Add a quirk to indicate that ERASE should not be used, +and set it for cards of that type. + +Signed-off-by: Phil Elwell +--- + drivers/mmc/card/block.c | 7 +++++++ + drivers/mmc/core/core.c | 3 ++- + include/linux/mmc/card.h | 3 +++ + 3 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index c641c202fe7e4d5c0a7fbdba664ebe5f29d76ac7..d194a7d46be080b5d757246af9a02c0bb670c3ef 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -2552,6 +2552,13 @@ static const struct mmc_fixup blk_fixups[] = + MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc, + MMC_QUIRK_TRIM_BROKEN), + ++ /* ++ * On some Kingston SD cards, multiple erases of less than 64 ++ * sectors can cause corruption. ++ */ ++ MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk_mmc, ++ MMC_QUIRK_ERASE_BROKEN), ++ + END_FIXUP + }; + +diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c +index 5f7d10ba498a8b3183e620fcb5ce3873b969cb5f..19d1e14f3cfe89cbdebdd2c845ebd15320cbe600 100644 +--- a/drivers/mmc/core/core.c ++++ b/drivers/mmc/core/core.c +@@ -2253,7 +2253,8 @@ EXPORT_SYMBOL(mmc_erase); + int mmc_can_erase(struct mmc_card *card) + { + if ((card->host->caps & MMC_CAP_ERASE) && +- (card->csd.cmdclass & CCC_ERASE) && card->erase_size) ++ (card->csd.cmdclass & CCC_ERASE) && card->erase_size && ++ !(card->quirks & MMC_QUIRK_ERASE_BROKEN)) + return 1; + return 0; + } +diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h +index eb0151bac50c1fd796f479d017bc3c3d7017c9e9..fa4e6454456747f02a10621f4f4da3ac1a5be2c1 100644 +--- a/include/linux/mmc/card.h ++++ b/include/linux/mmc/card.h +@@ -281,6 +281,9 @@ struct mmc_card { + #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */ + + ++#define MMC_QUIRK_ERASE_BROKEN (1<<31) /* Skip erase */ ++ ++ + unsigned int erase_size; /* erase size in sectors */ + unsigned int erase_shift; /* if erase unit is power 2 */ + unsigned int pref_erase; /* in sectors */ + +From 5fe5ed68d4e94d9ec37d64f4955dc9a56faf2a92 Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Mon, 16 May 2016 21:36:31 +1000 +Subject: [PATCH 329/398] New AudioInjector.net Pi soundcard with low jitter + audio in and out. + +Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. +Adds the dts overlay and updates the Makefile and README. +Updates the relevant defconfig files to enable building for the Raspberry Pi. +Thanks to Phil Elwell (pelwell) for the review, simple-card concepts and discussion. Thanks to Clive Messer for overlay naming suggestions. +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 + + .../audioinjector-wm8731-audio-overlay.dts | 39 ++++++ + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + sound/soc/bcm/Kconfig | 7 + + sound/soc/bcm/Makefile | 3 + + sound/soc/bcm/audioinjector-pi-soundcard.c | 142 +++++++++++++++++++++ + 8 files changed, 200 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts + create mode 100644 sound/soc/bcm/audioinjector-pi-soundcard.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 3d8de479d0a5a1b08e2bcad3c47500f152d792d9..02acf884753c2f1fa7eb570ebe5ce7d7adcf8fb4 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -16,6 +16,7 @@ dtbo-$(RPI_DT_OVERLAYS) += adau1977-adc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo + dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += boomberry-digi.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 97dff3597a86212065c03a0a129a00d28b4c26e0..279802a1ec1e9262bc0d205de7c8ba16bd71625b 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -225,6 +225,12 @@ Params: interrupt GPIO used for INT (default 23) + arrays (0=+0pF, 15=+4.5pF, default 15) + + ++Name: audioinjector-wm8731-audio ++Info: Configures the audioinjector.net audio add on soundcard ++Load: dtoverlay=audioinjector-wm8731-audio ++Params: ++ ++ + Name: bmp085_i2c-sensor + Info: Configures the BMP085/BMP180 digital barometric pressure and temperature + sensors from Bosch Sensortec +diff --git a/arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts b/arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..4ed66577fa1d59e7b167ffdfd5a3f0de066cded2 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for audioinjector.net audio add on soundcard ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8731@1a { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8731"; ++ reg = <0x1a>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "ai,audioinjector-pi-soundcard"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 0bdc63180a149eaf51c199d727ba85cd74412e4a..666811f5ac56c4a059447be1139c536d34af1e56 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -862,6 +862,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 57393b5e216f80cddd11b119cc57aab7e56006b3..9ebfd0c96aeac64d78f3755301e8b2bcf63ce96c 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -854,6 +854,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index c05e656eaa9684a64e2d0d5c41b599815d3c8840..30f8208371ee81896f68249ec442da76da35f21a 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -85,3 +85,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC + select SND_SOC_ADAU1977_I2C + help + Say Y or M if you want to add support for ADAU1977 ADC. ++ ++config SND_AUDIOINJECTOR_PI_SOUNDCARD ++ tristate "Support for audioinjector.net Pi add on soundcard" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_WM8731 ++ help ++ Say Y or M if you want to add support for audioinjector.net Pi Hat +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 7de2ef13a0d3c72c2a77921e69004ba4cbd5c02b..4af578211f4c5522a6b47245c4c7020977daf0b6 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -15,6 +15,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o + snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o + snd-soc-raspidac3-objs := raspidac3.o ++snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o + + obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o +@@ -27,3 +28,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o ++obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o ++ +diff --git a/sound/soc/bcm/audioinjector-pi-soundcard.c b/sound/soc/bcm/audioinjector-pi-soundcard.c +new file mode 100644 +index 0000000000000000000000000000000000000000..39f29e26897226a413b4fa0a11a9bc160a485281 +--- /dev/null ++++ b/sound/soc/bcm/audioinjector-pi-soundcard.c +@@ -0,0 +1,142 @@ ++/* ++ * ASoC Driver for AudioInjector Pi add on soundcard ++ * ++ * Created on: 13-May-2016 ++ * Author: flatmax@flatmax.org ++ * based on code by Cliff Cai for the ssm2602 machine blackfin. ++ * with help from Lars-Peter Clausen for simplifying the original code to use the dai_fmt field. ++ * i2s_node code taken from the other sound/soc/bcm machine drivers. ++ * ++ * Copyright (C) 2016 Flatmax Pty. Ltd. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "../codecs/wm8731.h" ++ ++static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_dapm_context *dapm = &rtd->card->dapm; ++ ++ // not connected ++ snd_soc_dapm_nc_pin(dapm, "Mic Bias"); ++ snd_soc_dapm_nc_pin(dapm, "MICIN"); ++ snd_soc_dapm_nc_pin(dapm, "RHPOUT"); ++ snd_soc_dapm_nc_pin(dapm, "LHPOUT"); ++ ++ return snd_soc_dai_set_sysclk(rtd->codec_dai, WM8731_SYSCLK_XTAL, 12000000, SND_SOC_CLOCK_IN); ++} ++ ++static struct snd_soc_dai_link audioinjector_pi_soundcard_dai[] = { ++ { ++ .name = "AudioInjector audio", ++ .stream_name = "AudioInjector audio", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8731-hifi", ++ .platform_name = "bcm2835-i2s.0", ++ .codec_name = "wm8731.1-001a", ++ .init = audioinjector_pi_soundcard_dai_init, ++ .dai_fmt = SND_SOC_DAIFMT_CBM_CFM|SND_SOC_DAIFMT_I2S|SND_SOC_DAIFMT_NB_NF, ++ }, ++}; ++ ++static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = { ++ SND_SOC_DAPM_SPK("Ext Spk", NULL), ++ SND_SOC_DAPM_LINE("Line In Jacks", NULL), ++}; ++ ++/* Corgi machine connections to the codec pins */ ++static const struct snd_soc_dapm_route audioinjector_audio_map[] = { ++ /* speaker connected to LOUT, ROUT */ ++ {"Ext Spk", NULL, "ROUT"}, ++ {"Ext Spk", NULL, "LOUT"}, ++ ++ /* line inputs */ ++ {"Line In Jacks", NULL, "Line Input"}, ++}; ++ ++static struct snd_soc_card snd_soc_audioinjector = { ++ .name = "audioinjector-pi-soundcard", ++ .dai_link = audioinjector_pi_soundcard_dai, ++ .num_links = 1, ++ ++ .dapm_widgets = wm8731_dapm_widgets, ++ .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), ++ .dapm_routes = audioinjector_audio_map, ++ .num_dapm_routes = ARRAY_SIZE(audioinjector_audio_map), ++}; ++ ++static int audioinjector_pi_soundcard_probe(struct platform_device *pdev) ++{ ++ struct snd_soc_card *card = &snd_soc_audioinjector; ++ int ret; ++ ++ card->dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct snd_soc_dai_link *dai = &audioinjector_pi_soundcard_dai[0]; ++ struct device_node *i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } else ++ if (!dai->cpu_of_node) { ++ dev_err(&pdev->dev, "Property 'i2s-controller' missing or invalid\n"); ++ return -EINVAL; ++ } ++ } ++ ++ if ((ret = snd_soc_register_card(card))) { ++ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); ++ } ++ return ret; ++} ++ ++static int audioinjector_pi_soundcard_remove(struct platform_device *pdev) ++{ ++ struct snd_soc_card *card = platform_get_drvdata(pdev); ++ return snd_soc_unregister_card(card); ++ ++} ++ ++static const struct of_device_id audioinjector_pi_soundcard_of_match[] = { ++ { .compatible = "ai,audioinjector-pi-soundcard", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, audioinjector_pi_soundcard_of_match); ++ ++static struct platform_driver audioinjector_pi_soundcard_driver = { ++ .driver = { ++ .name = "audioinjector-audio", ++ .owner = THIS_MODULE, ++ .of_match_table = audioinjector_pi_soundcard_of_match, ++ }, ++ .probe = audioinjector_pi_soundcard_probe, ++ .remove = audioinjector_pi_soundcard_remove, ++}; ++ ++module_platform_driver(audioinjector_pi_soundcard_driver); ++MODULE_AUTHOR("Matt Flax "); ++MODULE_DESCRIPTION("AudioInjector.net Pi Soundcard"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:audioinjector-pi-soundcard"); ++ + +From a3a625450271e9d63727b47b18d9e3085536f0b0 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 19 May 2016 14:40:28 +0100 +Subject: [PATCH 330/398] mmc: Apply QUIRK_BROKEN_ERASE to other capacities + +Signed-off-by: Phil Elwell +--- + drivers/mmc/card/block.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index d194a7d46be080b5d757246af9a02c0bb670c3ef..c6c381c3f14612182d0ccba8c3b44b1b37ff6e47 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -2558,6 +2558,10 @@ static const struct mmc_fixup blk_fixups[] = + */ + MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk_mmc, + MMC_QUIRK_ERASE_BROKEN), ++ MMC_FIXUP("SD32G", 0x41, 0x3432, add_quirk_mmc, ++ MMC_QUIRK_ERASE_BROKEN), ++ MMC_FIXUP("SD64G", 0x41, 0x3432, add_quirk_mmc, ++ MMC_QUIRK_ERASE_BROKEN), + + END_FIXUP + }; + +From 3b49f6ddef38d1336d8903ea58762a4f785ec929 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 19 May 2016 15:36:09 +0100 +Subject: [PATCH 331/398] brcmfmac: Plug memory leak in brcmf_fill_bss_param + +See: https://github.com/raspberrypi/linux/issues/1471 + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index 2bba94dbd86e0df03e99147f59ec224cf4221b3e..f6bf107851435470e775fb8eddab5f25b05af54e 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -2416,7 +2416,7 @@ static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) + WL_BSS_INFO_MAX); + if (err) { + brcmf_err("Failed to get bss info (%d)\n", err); +- return; ++ goto out_err; + } + si->filled |= BIT(NL80211_STA_INFO_BSS_PARAM); + si->bss_param.beacon_interval = le16_to_cpu(buf->bss_le.beacon_period); +@@ -2428,6 +2428,9 @@ static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) + si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE; + if (capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) + si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; ++ ++out_err: ++ kfree(buf); + } + + static s32 + +From 5f3415e397523fd001b37fca64a22b835df2bbcb Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 20 May 2016 10:11:43 +0100 +Subject: [PATCH 332/398] mmc: Add card_quirks module parameter, log quirks + +Use mmc_block.card_quirks to override the quirks for all SD or MMC +cards. The value is a bitfield using the bit positions defined in +include/linux/mmc/card.h. If the module parameter is placed in the +kernel command line (or bootargs) stored on the card then, assuming the +device only has one SD card interface, the override effectively becomes +card-specific. + +Signed-off-by: Phil Elwell +--- + drivers/mmc/card/block.c | 28 +++++++++++++++++++++++++--- + 1 file changed, 25 insertions(+), 3 deletions(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index c6c381c3f14612182d0ccba8c3b44b1b37ff6e47..74f5314fb87ad71923c84891d144dfa8ae272f24 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -137,6 +137,13 @@ enum { + module_param(perdev_minors, int, 0444); + MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); + ++/* ++ * Allow quirks to be overridden for the current card ++ */ ++static char *card_quirks; ++module_param(card_quirks, charp, 0644); ++MODULE_PARM_DESC(card_quirks, "Force the use of the indicated quirks (a bitfield)"); ++ + static inline int mmc_blk_part_switch(struct mmc_card *card, + struct mmc_blk_data *md); + static int get_card_status(struct mmc_card *card, u32 *status, int retries); +@@ -2570,6 +2577,7 @@ static int mmc_blk_probe(struct mmc_card *card) + { + struct mmc_blk_data *md, *part_md; + char cap_str[10]; ++ char quirk_str[24]; + + /* + * Check that the card supports the command class(es) we need. +@@ -2577,7 +2585,16 @@ static int mmc_blk_probe(struct mmc_card *card) + if (!(card->csd.cmdclass & CCC_BLOCK_READ)) + return -ENODEV; + +- mmc_fixup_device(card, blk_fixups); ++ if (card_quirks) { ++ unsigned long quirks; ++ if (kstrtoul(card_quirks, 0, &quirks) == 0) ++ card->quirks = (unsigned int)quirks; ++ else ++ pr_err("mmc_block: Invalid card_quirks parameter '%s'\n", ++ card_quirks); ++ } ++ else ++ mmc_fixup_device(card, blk_fixups); + + md = mmc_blk_alloc(card); + if (IS_ERR(md)) +@@ -2585,9 +2602,14 @@ static int mmc_blk_probe(struct mmc_card *card) + + string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, + cap_str, sizeof(cap_str)); +- pr_info("%s: %s %s %s %s\n", ++ if (card->quirks) ++ snprintf(quirk_str, sizeof(quirk_str), ++ " (quirks 0x%08x)", card->quirks); ++ else ++ quirk_str[0] = '\0'; ++ pr_info("%s: %s %s %s%s%s\n", + md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), +- cap_str, md->read_only ? "(ro)" : ""); ++ cap_str, md->read_only ? " (ro)" : "", quirk_str); + + if (mmc_blk_alloc_parts(card, md)) + goto out; + +From 55622121181ea7c65f356beb0a569612f1d5754f Mon Sep 17 00:00:00 2001 +From: Nicolas Boullis +Date: Sun, 10 Apr 2016 13:23:05 +0200 +Subject: [PATCH 333/398] rtc: ds1307: ensure that any pending alarm is cleared + before a new alarm is enabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If a previously-set alarm was disabled and then triggered, it may still +be pending when a new alarm is configured. + +Then, if the alarm is enabled before the pending alarm is cleared, then +an interrupt is immediately raised. + +Unfortunately, when the alarm is cleared and enabled during the same I²C +block write, the chip (at least the DS1339 I have) considers that the +alarm is enabled before it is cleared, and raises an interrupt. + +This patch ensures that the pending alarm is cleared before the alarm is +enabled. + +Signed-off-by: Nicolas Boullis +Signed-off-by: Alexandre Belloni +--- + drivers/rtc/rtc-ds1307.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c +index 28ca4bfaa8db0094e63acf6c9c2dbfc96abd445c..0abd5154955b88c6b62fb52924480f832a79bb48 100644 +--- a/drivers/rtc/rtc-ds1307.c ++++ b/drivers/rtc/rtc-ds1307.c +@@ -540,12 +540,8 @@ static int ds1337_set_alarm(struct device *dev, struct rtc_wkalrm *t) + buf[5] = 0; + buf[6] = 0; + +- /* optionally enable ALARM1 */ ++ /* disable alarms */ + buf[7] = control & ~(DS1337_BIT_A1IE | DS1337_BIT_A2IE); +- if (t->enabled) { +- dev_dbg(dev, "alarm IRQ armed\n"); +- buf[7] |= DS1337_BIT_A1IE; /* only ALARM1 is used */ +- } + buf[8] = status & ~(DS1337_BIT_A1I | DS1337_BIT_A2I); + + ret = ds1307->write_block_data(client, +@@ -555,6 +551,13 @@ static int ds1337_set_alarm(struct device *dev, struct rtc_wkalrm *t) + return ret; + } + ++ /* optionally enable ALARM1 */ ++ if (t->enabled) { ++ dev_dbg(dev, "alarm IRQ armed\n"); ++ buf[7] |= DS1337_BIT_A1IE; /* only ALARM1 is used */ ++ i2c_smbus_write_byte_data(client, DS1337_REG_CONTROL, buf[7]); ++ } ++ + return 0; + } + + +From b8b0224274b010918a551d89543ca0b7d2d96bb7 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 12:59:27 -0700 +Subject: [PATCH 334/398] BCM270X: Include DRM_PANEL_SIMPLE in the defconfigs. + +This is going to be required for the Adafruit DPI panel support. + +Signed-off-by: Eric Anholt +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 666811f5ac56c4a059447be1139c536d34af1e56..87023c7eacbdb9460492c22a89365aa5068d58c9 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -817,6 +817,7 @@ CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m + CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m ++CONFIG_DRM_PANEL_SIMPLE=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + CONFIG_FB_BCM2708=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 9ebfd0c96aeac64d78f3755301e8b2bcf63ce96c..edb049cbcf3a7f3ff19f2f7d02602f89225b6ec3 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -809,6 +809,7 @@ CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m + CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m ++CONFIG_DRM_PANEL_SIMPLE=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + CONFIG_FB_BCM2708=y + +From 957f3123c15c6cfa6d85b76fcb47893147c9c532 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 18 Mar 2016 12:34:59 -0700 +Subject: [PATCH 335/398] drm: Add an encoder and connector type enum for DPI. + +Right now exynos is exposing DPI as a TMDS encoder and VGA connector, +which seems rather misleading. This isn't just an internal detail, +since xrandr actually exposes "VGA" as the output name. Define some +new enums so that vc4's DPI can have a more informative name. + +I considered other names for the connector as well. For VC4, the +Adafruit DPI kippah takes the 28 GPIO pins and routes them to a +standard-ish 40-pin FPC connector, but "40-pin FPC" doesn't uniquely +identify an ordering of pins (apparently some other orderings exist), +doesn't explain things as well for the user (who, if anything, knows +their product is a DPI kippah/panel combo), and actually doesn't have +to exist (one could connect the 28 GPIOs directly to something else). +Simply "DPI" seems like a good compromise name to distinguish from the +HDMI, DSI, and TV connectors . + +Signed-off-by: Eric Anholt +Reviewed-by: Daniel Vetter +(cherry picked from commit 0b27c02a7f1c697694f2ad6d6517e7dbf9ecfa39) +--- + drivers/gpu/drm/drm_crtc.c | 2 ++ + include/uapi/drm/drm_mode.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c +index 24c5434abd1c44e1040676220b84002fdce74ee9..e741af195863d08e661f0c3010df2a66e74978c1 100644 +--- a/drivers/gpu/drm/drm_crtc.c ++++ b/drivers/gpu/drm/drm_crtc.c +@@ -168,6 +168,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = { + { DRM_MODE_CONNECTOR_eDP, "eDP" }, + { DRM_MODE_CONNECTOR_VIRTUAL, "Virtual" }, + { DRM_MODE_CONNECTOR_DSI, "DSI" }, ++ { DRM_MODE_CONNECTOR_DPI, "DPI" }, + }; + + static const struct drm_prop_enum_list drm_encoder_enum_list[] = { +@@ -179,6 +180,7 @@ static const struct drm_prop_enum_list drm_encoder_enum_list[] = { + { DRM_MODE_ENCODER_VIRTUAL, "Virtual" }, + { DRM_MODE_ENCODER_DSI, "DSI" }, + { DRM_MODE_ENCODER_DPMST, "DP MST" }, ++ { DRM_MODE_ENCODER_DPI, "DPI" }, + }; + + static const struct drm_prop_enum_list drm_subpixel_enum_list[] = { +diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h +index 6c11ca401de8b4f4400478f500352ddd48380644..325e9eb3d812c7d2b526f33f4e71023f9b4f112d 100644 +--- a/include/uapi/drm/drm_mode.h ++++ b/include/uapi/drm/drm_mode.h +@@ -202,6 +202,7 @@ struct drm_mode_get_plane_res { + #define DRM_MODE_ENCODER_VIRTUAL 5 + #define DRM_MODE_ENCODER_DSI 6 + #define DRM_MODE_ENCODER_DPMST 7 ++#define DRM_MODE_ENCODER_DPI 8 + + struct drm_mode_get_encoder { + __u32 encoder_id; +@@ -241,6 +242,7 @@ struct drm_mode_get_encoder { + #define DRM_MODE_CONNECTOR_eDP 14 + #define DRM_MODE_CONNECTOR_VIRTUAL 15 + #define DRM_MODE_CONNECTOR_DSI 16 ++#define DRM_MODE_CONNECTOR_DPI 17 + + struct drm_mode_get_connector { + + +From 48da666e18fe89a6ad22a429943f3d912d9620bf Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 4 Mar 2016 12:32:06 -0800 +Subject: [PATCH 336/398] dt-bindings: Add binding docs for V3D. + +This was missed in the upstreaming process. + +Signed-off-by: Eric Anholt +Acked-by: Stephen Warren +(cherry picked from commit 4653f22e9ab08b2b7178b7262a9326eb777e0266) +--- + Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +index 56a961aa50613054ff4354b2ebfa86fd3503bfa1..9f97df4d51524bf55beff1f3e3eaace0b8e61637 100644 +--- a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt ++++ b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +@@ -35,6 +35,12 @@ Optional properties for HDMI: + as an interrupt/status bit in the HDMI controller + itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt + ++Required properties for V3D: ++- compatible: Should be "brcm,bcm2835-v3d" ++- reg: Physical base address and length of the V3D's registers ++- interrupts: The interrupt number ++ See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt ++ + Example: + pixelvalve@7e807000 { + compatible = "brcm,bcm2835-pixelvalve2"; +@@ -60,6 +66,12 @@ hdmi: hdmi@7e902000 { + clock-names = "pixel", "hdmi"; + }; + ++v3d: v3d@7ec00000 { ++ compatible = "brcm,bcm2835-v3d"; ++ reg = <0x7ec00000 0x1000>; ++ interrupts = <1 10>; ++}; ++ + vc4: gpu { + compatible = "brcm,bcm2835-vc4"; + }; + +From 777500e897bca33053b77d3df27354f3ca7fa822 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 10 Feb 2016 11:42:32 -0800 +Subject: [PATCH 337/398] drm/vc4: Add DPI driver + +The DPI interface involves taking a ton of our GPIOs to be used as +outputs, and routing display signals over them in parallel. + +v2: Use display_info.bus_formats[] to replace our custom DT + properties. +v3: Rebase on V3D documentation changes. +v4: Fix rebase detritus from V3D documentation changes. + +Signed-off-by: Eric Anholt +Acked-by: Rob Herring +(cherry picked from commit 08302c35b59d306ff37b996e56fb2a488c1d2c2e) +--- + .../devicetree/bindings/display/brcm,bcm-vc4.txt | 36 ++ + drivers/gpu/drm/vc4/Kconfig | 1 + + drivers/gpu/drm/vc4/Makefile | 1 + + drivers/gpu/drm/vc4/vc4_debugfs.c | 1 + + drivers/gpu/drm/vc4/vc4_dpi.c | 520 +++++++++++++++++++++ + drivers/gpu/drm/vc4/vc4_drv.c | 1 + + drivers/gpu/drm/vc4/vc4_drv.h | 5 + + 7 files changed, 565 insertions(+) + create mode 100644 drivers/gpu/drm/vc4/vc4_dpi.c + +diff --git a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +index 9f97df4d51524bf55beff1f3e3eaace0b8e61637..a5ea451e67fcfe8cf08b94aab409fe05d5095c24 100644 +--- a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt ++++ b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +@@ -35,12 +35,22 @@ Optional properties for HDMI: + as an interrupt/status bit in the HDMI controller + itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt + ++Required properties for DPI: ++- compatible: Should be "brcm,bcm2835-dpi" ++- reg: Physical base address and length of the registers ++- clocks: a) core: The core clock the unit runs on ++ b) pixel: The pixel clock that feeds the pixelvalve ++- port: Port node with a single endpoint connecting to the panel ++ device, as defined in [1] ++ + Required properties for V3D: + - compatible: Should be "brcm,bcm2835-v3d" + - reg: Physical base address and length of the V3D's registers + - interrupts: The interrupt number + See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt + ++[1] Documentation/devicetree/bindings/media/video-interfaces.txt ++ + Example: + pixelvalve@7e807000 { + compatible = "brcm,bcm2835-pixelvalve2"; +@@ -66,6 +76,22 @@ hdmi: hdmi@7e902000 { + clock-names = "pixel", "hdmi"; + }; + ++dpi: dpi@7e208000 { ++ compatible = "brcm,bcm2835-dpi"; ++ reg = <0x7e208000 0x8c>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>, ++ <&clocks BCM2835_CLOCK_DPI>; ++ clock-names = "core", "pixel"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port { ++ dpi_out: endpoint@0 { ++ remote-endpoint = <&panel_in>; ++ }; ++ }; ++}; ++ + v3d: v3d@7ec00000 { + compatible = "brcm,bcm2835-v3d"; + reg = <0x7ec00000 0x1000>; +@@ -75,3 +101,13 @@ v3d: v3d@7ec00000 { + vc4: gpu { + compatible = "brcm,bcm2835-vc4"; + }; ++ ++panel: panel { ++ compatible = "ontat,yx700wv03", "simple-panel"; ++ ++ port { ++ panel_in: endpoint { ++ remote-endpoint = <&dpi_out>; ++ }; ++ }; ++}; +diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig +index 71f019f603da21f66453518a02c224e2ed722ed7..33aa7f5ecb6a5dd746adb2f6b65ccff98a3ec032 100644 +--- a/drivers/gpu/drm/vc4/Kconfig ++++ b/drivers/gpu/drm/vc4/Kconfig +@@ -5,6 +5,7 @@ config DRM_VC4 + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER ++ select DRM_PANEL + help + Choose this option if you have a system that has a Broadcom + VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835. +diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile +index 4c6a99f0398c03ce5d83dea1ec3f7906a817bf89..fb77db755e0a29d8589860da82186c7a1f394c72 100644 +--- a/drivers/gpu/drm/vc4/Makefile ++++ b/drivers/gpu/drm/vc4/Makefile +@@ -7,6 +7,7 @@ vc4-y := \ + vc4_bo.o \ + vc4_crtc.o \ + vc4_drv.o \ ++ vc4_dpi.o \ + vc4_kms.o \ + vc4_gem.o \ + vc4_hdmi.o \ +diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c +index a99aa8676af774977778edfa2604b6b9df31a4dc..94f2154c3685255e2e67d225f77dea372eae371a 100644 +--- a/drivers/gpu/drm/vc4/vc4_debugfs.c ++++ b/drivers/gpu/drm/vc4/vc4_debugfs.c +@@ -17,6 +17,7 @@ + + static const struct drm_info_list vc4_debugfs_list[] = { + {"bo_stats", vc4_bo_stats_debugfs, 0}, ++ {"dpi_regs", vc4_dpi_debugfs_regs, 0}, + {"gem_exec", vc4_gem_exec_debugfs, 0}, + {"hdmi_regs", vc4_hdmi_debugfs_regs, 0}, + {"hvs_regs", vc4_hvs_debugfs_regs, 0}, +diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c +new file mode 100644 +index 0000000000000000000000000000000000000000..86e4e52d06c04987c58b78bb09ad0f6fc0498339 +--- /dev/null ++++ b/drivers/gpu/drm/vc4/vc4_dpi.c +@@ -0,0 +1,520 @@ ++/* ++ * Copyright (C) 2016 Broadcom Limited ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see . ++ */ ++ ++/** ++ * DOC: VC4 DPI module ++ * ++ * The VC4 DPI hardware supports MIPI DPI type 4 and Nokia ViSSI ++ * signals, which are routed out to GPIO0-27 with the ALT2 function. ++ */ ++ ++#include "drm_atomic_helper.h" ++#include "drm_crtc_helper.h" ++#include "drm_edid.h" ++#include "drm_panel.h" ++#include "linux/clk.h" ++#include "linux/component.h" ++#include "linux/of_graph.h" ++#include "linux/of_platform.h" ++#include "vc4_drv.h" ++#include "vc4_regs.h" ++ ++#define DPI_C 0x00 ++# define DPI_OUTPUT_ENABLE_MODE BIT(16) ++ ++/* The order field takes the incoming 24 bit RGB from the pixel valve ++ * and shuffles the 3 channels. ++ */ ++# define DPI_ORDER_MASK VC4_MASK(15, 14) ++# define DPI_ORDER_SHIFT 14 ++# define DPI_ORDER_RGB 0 ++# define DPI_ORDER_BGR 1 ++# define DPI_ORDER_GRB 2 ++# define DPI_ORDER_BRG 3 ++ ++/* The format field takes the ORDER-shuffled pixel valve data and ++ * formats it onto the output lines. ++ */ ++# define DPI_FORMAT_MASK VC4_MASK(13, 11) ++# define DPI_FORMAT_SHIFT 11 ++/* This define is named in the hardware, but actually just outputs 0. */ ++# define DPI_FORMAT_9BIT_666_RGB 0 ++/* Outputs 00000000rrrrrggggggbbbbb */ ++# define DPI_FORMAT_16BIT_565_RGB_1 1 ++/* Outputs 000rrrrr00gggggg000bbbbb */ ++# define DPI_FORMAT_16BIT_565_RGB_2 2 ++/* Outputs 00rrrrr000gggggg00bbbbb0 */ ++# define DPI_FORMAT_16BIT_565_RGB_3 3 ++/* Outputs 000000rrrrrrggggggbbbbbb */ ++# define DPI_FORMAT_18BIT_666_RGB_1 4 ++/* Outputs 00rrrrrr00gggggg00bbbbbb */ ++# define DPI_FORMAT_18BIT_666_RGB_2 5 ++/* Outputs rrrrrrrrggggggggbbbbbbbb */ ++# define DPI_FORMAT_24BIT_888_RGB 6 ++ ++/* Reverses the polarity of the corresponding signal */ ++# define DPI_PIXEL_CLK_INVERT BIT(10) ++# define DPI_HSYNC_INVERT BIT(9) ++# define DPI_VSYNC_INVERT BIT(8) ++# define DPI_OUTPUT_ENABLE_INVERT BIT(7) ++ ++/* Outputs the signal the falling clock edge instead of rising. */ ++# define DPI_HSYNC_NEGATE BIT(6) ++# define DPI_VSYNC_NEGATE BIT(5) ++# define DPI_OUTPUT_ENABLE_NEGATE BIT(4) ++ ++/* Disables the signal */ ++# define DPI_HSYNC_DISABLE BIT(3) ++# define DPI_VSYNC_DISABLE BIT(2) ++# define DPI_OUTPUT_ENABLE_DISABLE BIT(1) ++ ++/* Power gate to the device, full reset at 0 -> 1 transition */ ++# define DPI_ENABLE BIT(0) ++ ++/* All other registers besides DPI_C return the ID */ ++#define DPI_ID 0x04 ++# define DPI_ID_VALUE 0x00647069 ++ ++/* General DPI hardware state. */ ++struct vc4_dpi { ++ struct platform_device *pdev; ++ ++ struct drm_encoder *encoder; ++ struct drm_connector *connector; ++ struct drm_panel *panel; ++ ++ void __iomem *regs; ++ ++ struct clk *pixel_clock; ++ struct clk *core_clock; ++}; ++ ++#define DPI_READ(offset) readl(dpi->regs + (offset)) ++#define DPI_WRITE(offset, val) writel(val, dpi->regs + (offset)) ++ ++/* VC4 DPI encoder KMS struct */ ++struct vc4_dpi_encoder { ++ struct vc4_encoder base; ++ struct vc4_dpi *dpi; ++}; ++ ++static inline struct vc4_dpi_encoder * ++to_vc4_dpi_encoder(struct drm_encoder *encoder) ++{ ++ return container_of(encoder, struct vc4_dpi_encoder, base.base); ++} ++ ++/* VC4 DPI connector KMS struct */ ++struct vc4_dpi_connector { ++ struct drm_connector base; ++ struct vc4_dpi *dpi; ++ ++ /* Since the connector is attached to just the one encoder, ++ * this is the reference to it so we can do the best_encoder() ++ * hook. ++ */ ++ struct drm_encoder *encoder; ++}; ++ ++static inline struct vc4_dpi_connector * ++to_vc4_dpi_connector(struct drm_connector *connector) ++{ ++ return container_of(connector, struct vc4_dpi_connector, base); ++} ++ ++#define DPI_REG(reg) { reg, #reg } ++static const struct { ++ u32 reg; ++ const char *name; ++} dpi_regs[] = { ++ DPI_REG(DPI_C), ++ DPI_REG(DPI_ID), ++}; ++ ++static void vc4_dpi_dump_regs(struct vc4_dpi *dpi) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(dpi_regs); i++) { ++ DRM_INFO("0x%04x (%s): 0x%08x\n", ++ dpi_regs[i].reg, dpi_regs[i].name, ++ DPI_READ(dpi_regs[i].reg)); ++ } ++} ++ ++#ifdef CONFIG_DEBUG_FS ++int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused) ++{ ++ struct drm_info_node *node = (struct drm_info_node *)m->private; ++ struct drm_device *dev = node->minor->dev; ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_dpi *dpi = vc4->dpi; ++ int i; ++ ++ if (!dpi) ++ return 0; ++ ++ for (i = 0; i < ARRAY_SIZE(dpi_regs); i++) { ++ seq_printf(m, "%s (0x%04x): 0x%08x\n", ++ dpi_regs[i].name, dpi_regs[i].reg, ++ DPI_READ(dpi_regs[i].reg)); ++ } ++ ++ return 0; ++} ++#endif ++ ++static enum drm_connector_status ++vc4_dpi_connector_detect(struct drm_connector *connector, bool force) ++{ ++ struct vc4_dpi_connector *vc4_connector = ++ to_vc4_dpi_connector(connector); ++ struct vc4_dpi *dpi = vc4_connector->dpi; ++ ++ if (dpi->panel) ++ return connector_status_connected; ++ else ++ return connector_status_disconnected; ++} ++ ++static void vc4_dpi_connector_destroy(struct drm_connector *connector) ++{ ++ drm_connector_unregister(connector); ++ drm_connector_cleanup(connector); ++} ++ ++static int vc4_dpi_connector_get_modes(struct drm_connector *connector) ++{ ++ struct vc4_dpi_connector *vc4_connector = ++ to_vc4_dpi_connector(connector); ++ struct vc4_dpi *dpi = vc4_connector->dpi; ++ ++ if (dpi->panel) ++ return drm_panel_get_modes(dpi->panel); ++ ++ return 0; ++} ++ ++static struct drm_encoder * ++vc4_dpi_connector_best_encoder(struct drm_connector *connector) ++{ ++ struct vc4_dpi_connector *dpi_connector = ++ to_vc4_dpi_connector(connector); ++ return dpi_connector->encoder; ++} ++ ++static const struct drm_connector_funcs vc4_dpi_connector_funcs = { ++ .dpms = drm_atomic_helper_connector_dpms, ++ .detect = vc4_dpi_connector_detect, ++ .fill_modes = drm_helper_probe_single_connector_modes, ++ .destroy = vc4_dpi_connector_destroy, ++ .reset = drm_atomic_helper_connector_reset, ++ .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, ++ .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, ++}; ++ ++static const struct drm_connector_helper_funcs vc4_dpi_connector_helper_funcs = { ++ .get_modes = vc4_dpi_connector_get_modes, ++ .best_encoder = vc4_dpi_connector_best_encoder, ++}; ++ ++static struct drm_connector *vc4_dpi_connector_init(struct drm_device *dev, ++ struct vc4_dpi *dpi) ++{ ++ struct drm_connector *connector = NULL; ++ struct vc4_dpi_connector *dpi_connector; ++ int ret = 0; ++ ++ dpi_connector = devm_kzalloc(dev->dev, sizeof(*dpi_connector), ++ GFP_KERNEL); ++ if (!dpi_connector) { ++ ret = -ENOMEM; ++ goto fail; ++ } ++ connector = &dpi_connector->base; ++ ++ dpi_connector->encoder = dpi->encoder; ++ dpi_connector->dpi = dpi; ++ ++ drm_connector_init(dev, connector, &vc4_dpi_connector_funcs, ++ DRM_MODE_CONNECTOR_DPI); ++ drm_connector_helper_add(connector, &vc4_dpi_connector_helper_funcs); ++ ++ connector->polled = 0; ++ connector->interlace_allowed = 0; ++ connector->doublescan_allowed = 0; ++ ++ drm_mode_connector_attach_encoder(connector, dpi->encoder); ++ ++ return connector; ++ ++ fail: ++ if (connector) ++ vc4_dpi_connector_destroy(connector); ++ ++ return ERR_PTR(ret); ++} ++ ++static const struct drm_encoder_funcs vc4_dpi_encoder_funcs = { ++ .destroy = drm_encoder_cleanup, ++}; ++ ++static void vc4_dpi_encoder_disable(struct drm_encoder *encoder) ++{ ++ struct vc4_dpi_encoder *vc4_encoder = to_vc4_dpi_encoder(encoder); ++ struct vc4_dpi *dpi = vc4_encoder->dpi; ++ ++ drm_panel_disable(dpi->panel); ++ ++ clk_disable_unprepare(dpi->pixel_clock); ++ ++ drm_panel_unprepare(dpi->panel); ++} ++ ++static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) ++{ ++ struct drm_display_mode *mode = &encoder->crtc->mode; ++ struct vc4_dpi_encoder *vc4_encoder = to_vc4_dpi_encoder(encoder); ++ struct vc4_dpi *dpi = vc4_encoder->dpi; ++ u32 dpi_c = DPI_ENABLE | DPI_OUTPUT_ENABLE_MODE; ++ int ret; ++ ++ ret = drm_panel_prepare(dpi->panel); ++ if (ret) { ++ DRM_ERROR("Panel failed to prepare\n"); ++ return; ++ } ++ ++ if (dpi->connector->display_info.num_bus_formats) { ++ u32 bus_format = dpi->connector->display_info.bus_formats[0]; ++ ++ switch (bus_format) { ++ case MEDIA_BUS_FMT_RGB888_1X24: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_24BIT_888_RGB, ++ DPI_FORMAT); ++ break; ++ case MEDIA_BUS_FMT_BGR888_1X24: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_24BIT_888_RGB, ++ DPI_FORMAT); ++ dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER); ++ break; ++ case MEDIA_BUS_FMT_RGB666_1X24_CPADHI: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_2, ++ DPI_FORMAT); ++ break; ++ case MEDIA_BUS_FMT_RGB666_1X18: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1, ++ DPI_FORMAT); ++ break; ++ case MEDIA_BUS_FMT_RGB565_1X16: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3, ++ DPI_FORMAT); ++ break; ++ default: ++ DRM_ERROR("Unknown media bus format %d\n", bus_format); ++ break; ++ } ++ } ++ ++ if (mode->flags & DRM_MODE_FLAG_NHSYNC) ++ dpi_c |= DPI_HSYNC_INVERT; ++ else if (!(mode->flags & DRM_MODE_FLAG_PHSYNC)) ++ dpi_c |= DPI_HSYNC_DISABLE; ++ ++ if (mode->flags & DRM_MODE_FLAG_NVSYNC) ++ dpi_c |= DPI_VSYNC_INVERT; ++ else if (!(mode->flags & DRM_MODE_FLAG_PVSYNC)) ++ dpi_c |= DPI_VSYNC_DISABLE; ++ ++ DPI_WRITE(DPI_C, dpi_c); ++ ++ ret = clk_set_rate(dpi->pixel_clock, mode->clock * 1000); ++ if (ret) ++ DRM_ERROR("Failed to set clock rate: %d\n", ret); ++ ++ ret = clk_prepare_enable(dpi->pixel_clock); ++ if (ret) ++ DRM_ERROR("Failed to set clock rate: %d\n", ret); ++ ++ ret = drm_panel_enable(dpi->panel); ++ if (ret) { ++ DRM_ERROR("Panel failed to enable\n"); ++ drm_panel_unprepare(dpi->panel); ++ return; ++ } ++} ++ ++static const struct drm_encoder_helper_funcs vc4_dpi_encoder_helper_funcs = { ++ .disable = vc4_dpi_encoder_disable, ++ .enable = vc4_dpi_encoder_enable, ++}; ++ ++static const struct of_device_id vc4_dpi_dt_match[] = { ++ { .compatible = "brcm,bcm2835-dpi", .data = NULL }, ++ {} ++}; ++ ++/* Walks the OF graph to find the panel node and then asks DRM to look ++ * up the panel. ++ */ ++static struct drm_panel *vc4_dpi_get_panel(struct device *dev) ++{ ++ struct device_node *endpoint, *panel_node; ++ struct device_node *np = dev->of_node; ++ struct drm_panel *panel; ++ ++ endpoint = of_graph_get_next_endpoint(np, NULL); ++ if (!endpoint) { ++ dev_err(dev, "no endpoint to fetch DPI panel\n"); ++ return NULL; ++ } ++ ++ /* don't proceed if we have an endpoint but no panel_node tied to it */ ++ panel_node = of_graph_get_remote_port_parent(endpoint); ++ of_node_put(endpoint); ++ if (!panel_node) { ++ dev_err(dev, "no valid panel node\n"); ++ return NULL; ++ } ++ ++ panel = of_drm_find_panel(panel_node); ++ of_node_put(panel_node); ++ ++ return panel; ++} ++ ++static int vc4_dpi_bind(struct device *dev, struct device *master, void *data) ++{ ++ struct platform_device *pdev = to_platform_device(dev); ++ struct drm_device *drm = dev_get_drvdata(master); ++ struct vc4_dev *vc4 = to_vc4_dev(drm); ++ struct vc4_dpi *dpi; ++ struct vc4_dpi_encoder *vc4_dpi_encoder; ++ int ret; ++ ++ dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL); ++ if (!dpi) ++ return -ENOMEM; ++ ++ vc4_dpi_encoder = devm_kzalloc(dev, sizeof(*vc4_dpi_encoder), ++ GFP_KERNEL); ++ if (!vc4_dpi_encoder) ++ return -ENOMEM; ++ vc4_dpi_encoder->base.type = VC4_ENCODER_TYPE_DPI; ++ vc4_dpi_encoder->dpi = dpi; ++ dpi->encoder = &vc4_dpi_encoder->base.base; ++ ++ dpi->pdev = pdev; ++ dpi->regs = vc4_ioremap_regs(pdev, 0); ++ if (IS_ERR(dpi->regs)) ++ return PTR_ERR(dpi->regs); ++ ++ vc4_dpi_dump_regs(dpi); ++ ++ if (DPI_READ(DPI_ID) != DPI_ID_VALUE) { ++ dev_err(dev, "Port returned 0x%08x for ID instead of 0x%08x\n", ++ DPI_READ(DPI_ID), DPI_ID_VALUE); ++ return -ENODEV; ++ } ++ ++ dpi->core_clock = devm_clk_get(dev, "core"); ++ if (IS_ERR(dpi->core_clock)) { ++ ret = PTR_ERR(dpi->core_clock); ++ if (ret != -EPROBE_DEFER) ++ DRM_ERROR("Failed to get core clock: %d\n", ret); ++ return ret; ++ } ++ dpi->pixel_clock = devm_clk_get(dev, "pixel"); ++ if (IS_ERR(dpi->pixel_clock)) { ++ ret = PTR_ERR(dpi->pixel_clock); ++ if (ret != -EPROBE_DEFER) ++ DRM_ERROR("Failed to get pixel clock: %d\n", ret); ++ return ret; ++ } ++ ++ ret = clk_prepare_enable(dpi->core_clock); ++ if (ret) ++ DRM_ERROR("Failed to turn on core clock: %d\n", ret); ++ ++ dpi->panel = vc4_dpi_get_panel(dev); ++ ++ drm_encoder_init(drm, dpi->encoder, &vc4_dpi_encoder_funcs, ++ DRM_MODE_ENCODER_DPI); ++ drm_encoder_helper_add(dpi->encoder, &vc4_dpi_encoder_helper_funcs); ++ ++ dpi->connector = vc4_dpi_connector_init(drm, dpi); ++ if (IS_ERR(dpi->connector)) { ++ ret = PTR_ERR(dpi->connector); ++ goto err_destroy_encoder; ++ } ++ ++ if (dpi->panel) ++ drm_panel_attach(dpi->panel, dpi->connector); ++ ++ dev_set_drvdata(dev, dpi); ++ ++ vc4->dpi = dpi; ++ ++ return 0; ++ ++err_destroy_encoder: ++ drm_encoder_cleanup(dpi->encoder); ++ clk_disable_unprepare(dpi->core_clock); ++ return ret; ++} ++ ++static void vc4_dpi_unbind(struct device *dev, struct device *master, ++ void *data) ++{ ++ struct drm_device *drm = dev_get_drvdata(master); ++ struct vc4_dev *vc4 = to_vc4_dev(drm); ++ struct vc4_dpi *dpi = dev_get_drvdata(dev); ++ ++ if (dpi->panel) ++ drm_panel_detach(dpi->panel); ++ ++ vc4_dpi_connector_destroy(dpi->connector); ++ drm_encoder_cleanup(dpi->encoder); ++ ++ clk_disable_unprepare(dpi->core_clock); ++ ++ vc4->dpi = NULL; ++} ++ ++static const struct component_ops vc4_dpi_ops = { ++ .bind = vc4_dpi_bind, ++ .unbind = vc4_dpi_unbind, ++}; ++ ++static int vc4_dpi_dev_probe(struct platform_device *pdev) ++{ ++ return component_add(&pdev->dev, &vc4_dpi_ops); ++} ++ ++static int vc4_dpi_dev_remove(struct platform_device *pdev) ++{ ++ component_del(&pdev->dev, &vc4_dpi_ops); ++ return 0; ++} ++ ++struct platform_driver vc4_dpi_driver = { ++ .probe = vc4_dpi_dev_probe, ++ .remove = vc4_dpi_dev_remove, ++ .driver = { ++ .name = "vc4_dpi", ++ .of_match_table = vc4_dpi_dt_match, ++ }, ++}; +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 22061aedef515b08cc5230272464f7a309a27e9d..282918352fe556407c3179e7e9023c21d5b00f21 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -259,6 +259,7 @@ static const struct component_master_ops vc4_drm_ops = { + + static struct platform_driver *const component_drivers[] = { + &vc4_hdmi_driver, ++ &vc4_dpi_driver, + &vc4_crtc_driver, + &vc4_hvs_driver, + &vc4_v3d_driver, +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 7f0b63435c7e48c592deac2671c8eb7c12ad3787..8b381d1716c42f6798b5f71224c2ac96412820cd 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -16,6 +16,7 @@ struct vc4_dev { + struct vc4_hvs *hvs; + struct vc4_crtc *crtc[3]; + struct vc4_v3d *v3d; ++ struct vc4_dpi *dpi; + + struct drm_fbdev_cma *fbdev; + struct rpi_firmware *firmware; +@@ -418,6 +419,10 @@ void vc4_debugfs_cleanup(struct drm_minor *minor); + /* vc4_drv.c */ + void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index); + ++/* vc4_dpi.c */ ++extern struct platform_driver vc4_dpi_driver; ++int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused); ++ + /* vc4_gem.c */ + void vc4_gem_init(struct drm_device *dev); + void vc4_gem_destroy(struct drm_device *dev); + +From bc5e2293a88a7dac4dbbc77122d49cc5d33b9b1e Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 4 Apr 2016 14:25:59 -0700 +Subject: [PATCH 338/398] drm/vc4: Fix NULL deref in HDMI init error path + +If you make it here other than through err_destroy_encoder, vc4->hdmi +is still NULL. + +Signed-off-by: Eric Anholt +(cherry picked from commit 5883980313af70aec0ceebaef6ef0709726e5e63) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 85224e542086c913975a86820104eca06d3917c2..524eae9531d015c8b0f4409229f89ce981c3c020 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -573,7 +573,7 @@ err_unprepare_hsm: + err_unprepare_pix: + clk_disable_unprepare(hdmi->pixel_clock); + err_put_i2c: +- put_device(&vc4->hdmi->ddc->dev); ++ put_device(&hdmi->ddc->dev); + + return ret; + } + +From 39c7dd73bedfa54aced823714bf9f304ed59d9f1 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 13:24:14 -0700 +Subject: [PATCH 339/398] drm/vc4: Kick out the simplefb framebuffer before we + set up KMS. + +If we don't, then simplefb stays loaded on /dev/fb0 even though +scanout isn't happening from simplefb's memory area any more, and you +end up with no console. + +Signed-off-by: Eric Anholt +Acked-by: Dave Airlie +(cherry picked from commit b3a15f6d55fb584dd4d8baac5d1b6a398720620c) +--- + drivers/gpu/drm/vc4/vc4_drv.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 282918352fe556407c3179e7e9023c21d5b00f21..4b655affc4caa134f556581e88b218efa39c54a0 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -164,6 +164,24 @@ static void vc4_match_add_drivers(struct device *dev, + } + } + ++static void vc4_kick_out_firmware_fb(void) ++{ ++ struct apertures_struct *ap; ++ ++ ap = alloc_apertures(1); ++ if (!ap) ++ return; ++ ++ /* Since VC4 is a UMA device, the simplefb node may have been ++ * located anywhere in memory. ++ */ ++ ap->ranges[0].base = 0; ++ ap->ranges[0].size = ~0; ++ ++ remove_conflicting_framebuffers(ap, "vc4drmfb", false); ++ kfree(ap); ++} ++ + static int vc4_drm_bind(struct device *dev) + { + struct platform_device *pdev = to_platform_device(dev); +@@ -208,6 +226,8 @@ static int vc4_drm_bind(struct device *dev) + if (ret) + goto gem_destroy; + ++ vc4_kick_out_firmware_fb(); ++ + ret = drm_dev_register(drm, 0); + if (ret < 0) + goto unbind_all; + +From c83b6e2b1a6fd87900619d2b80ec0d1973142f77 Mon Sep 17 00:00:00 2001 +From: Maarten Lankhorst +Date: Tue, 26 Apr 2016 16:11:44 +0200 +Subject: [PATCH 340/398] drm/vc4: Rename async to nonblock. + +The async name is deprecated and should be changed to nonblocking. + +Cc: Eric Anholt +Signed-off-by: Maarten Lankhorst +Signed-off-by: Daniel Vetter +Link: http://patchwork.freedesktop.org/patch/msgid/1461679905-30177-12-git-send-email-maarten.lankhorst@linux.intel.com +(cherry picked from commit eb63961ba52ba545f5b7ebeeeefe1c98704e1a79) +--- + drivers/gpu/drm/vc4/vc4_kms.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index 4718ae5176cc6813a033d12783c30af726d95756..d423ba10239aa0835991ec7fbefca0b01e3598b4 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -93,7 +93,7 @@ static struct vc4_commit *commit_init(struct drm_atomic_state *state) + * vc4_atomic_commit - commit validated state object + * @dev: DRM device + * @state: the driver state object +- * @async: asynchronous commit ++ * @nonblock: nonblocking commit + * + * This function commits a with drm_atomic_helper_check() pre-validated state + * object. This can still fail when e.g. the framebuffer reservation fails. For +@@ -104,7 +104,7 @@ static struct vc4_commit *commit_init(struct drm_atomic_state *state) + */ + static int vc4_atomic_commit(struct drm_device *dev, + struct drm_atomic_state *state, +- bool async) ++ bool nonblock) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); + int ret; +@@ -170,7 +170,7 @@ static int vc4_atomic_commit(struct drm_device *dev, + * current layout. + */ + +- if (async) { ++ if (nonblock) { + vc4_queue_seqno_cb(dev, &c->cb, wait_seqno, + vc4_atomic_complete_commit_seqno_cb); + } else { + +From 9e166991c2492b36fc2606bf885dc31d310dc3b6 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 31 Mar 2016 18:38:20 -0700 +Subject: [PATCH 341/398] drm/vc4: Add support for gamma ramps. + +We could possibly save a bit of power by not requesting gamma +conversion when the ramp happens to be 1:1, but at least if all the +CRTCs are off the SRAM will be disabled. + +This should fix brightness sliders in a lot of fullscreen games. + +Signed-off-by: Eric Anholt +(cherry picked from commit e582b6c7e7f9d0b1e30e8017e4082d3a9ede3310) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 58 ++++++++++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/vc4/vc4_regs.h | 6 +++++ + 2 files changed, 64 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 34ff59c3d0029774b241b5dd60269606ea288b05..defb4911fb5fd96bd4ca44363352eabf8eed53dd 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -49,6 +49,10 @@ struct vc4_crtc { + /* Which HVS channel we're using for our CRTC. */ + int channel; + ++ u8 lut_r[256]; ++ u8 lut_g[256]; ++ u8 lut_b[256]; ++ + struct drm_pending_vblank_event *event; + }; + +@@ -147,6 +151,46 @@ static void vc4_crtc_destroy(struct drm_crtc *crtc) + drm_crtc_cleanup(crtc); + } + ++static void ++vc4_crtc_lut_load(struct drm_crtc *crtc) ++{ ++ struct drm_device *dev = crtc->dev; ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ u32 i; ++ ++ /* The LUT memory is laid out with each HVS channel in order, ++ * each of which takes 256 writes for R, 256 for G, then 256 ++ * for B. ++ */ ++ HVS_WRITE(SCALER_GAMADDR, ++ SCALER_GAMADDR_AUTOINC | ++ (vc4_crtc->channel * 3 * crtc->gamma_size)); ++ ++ for (i = 0; i < crtc->gamma_size; i++) ++ HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_r[i]); ++ for (i = 0; i < crtc->gamma_size; i++) ++ HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_g[i]); ++ for (i = 0; i < crtc->gamma_size; i++) ++ HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_b[i]); ++} ++ ++static void ++vc4_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, ++ uint32_t start, uint32_t size) ++{ ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ u32 i; ++ ++ for (i = start; i < start + size; i++) { ++ vc4_crtc->lut_r[i] = r[i] >> 8; ++ vc4_crtc->lut_g[i] = g[i] >> 8; ++ vc4_crtc->lut_b[i] = b[i] >> 8; ++ } ++ ++ vc4_crtc_lut_load(crtc); ++} ++ + static u32 vc4_get_fifo_full_level(u32 format) + { + static const u32 fifo_len_bytes = 64; +@@ -260,8 +304,14 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + + HVS_WRITE(SCALER_DISPBKGNDX(vc4_crtc->channel), + SCALER_DISPBKGND_AUTOHS | ++ SCALER_DISPBKGND_GAMMA | + (interlace ? SCALER_DISPBKGND_INTERLACE : 0)); + ++ /* Reload the LUT, since the SRAMs would have been disabled if ++ * all CRTCs had SCALER_DISPBKGND_GAMMA unset at once. ++ */ ++ vc4_crtc_lut_load(crtc); ++ + if (debug_dump_regs) { + DRM_INFO("CRTC %d regs after:\n", drm_crtc_index(crtc)); + vc4_crtc_dump_regs(vc4_crtc); +@@ -613,6 +663,7 @@ static const struct drm_crtc_funcs vc4_crtc_funcs = { + .reset = drm_atomic_helper_crtc_reset, + .atomic_duplicate_state = vc4_crtc_duplicate_state, + .atomic_destroy_state = vc4_crtc_destroy_state, ++ .gamma_set = vc4_crtc_gamma_set, + }; + + static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { +@@ -731,6 +782,7 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + primary_plane->crtc = crtc; + vc4->crtc[drm_crtc_index(crtc)] = vc4_crtc; + vc4_crtc->channel = vc4_crtc->data->hvs_channel; ++ drm_mode_crtc_set_gamma_size(crtc, ARRAY_SIZE(vc4_crtc->lut_r)); + + /* Set up some arbitrary number of planes. We're not limited + * by a set number of physical registers, just the space in +@@ -771,6 +823,12 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + + vc4_set_crtc_possible_masks(drm, crtc); + ++ for (i = 0; i < crtc->gamma_size; i++) { ++ vc4_crtc->lut_r[i] = i; ++ vc4_crtc->lut_g[i] = i; ++ vc4_crtc->lut_b[i] = i; ++ } ++ + platform_set_drvdata(pdev, vc4_crtc); + + return 0; +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index bf42a8e87111f2e5fd3108209d0a3dc9ad3e871f..6163b95c54111bde8c20bfd8e2efd233cb90b6ae 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -390,6 +390,12 @@ + #define SCALER_DISPBASE2 0x0000006c + #define SCALER_DISPALPHA2 0x00000070 + #define SCALER_GAMADDR 0x00000078 ++# define SCALER_GAMADDR_AUTOINC BIT(31) ++/* Enables all gamma ramp SRAMs, not just those of CRTCs with gamma ++ * enabled. ++ */ ++# define SCALER_GAMADDR_SRAMENB BIT(30) ++ + #define SCALER_GAMDATA 0x000000e0 + #define SCALER_DLIST_START 0x00002000 + #define SCALER_DLIST_SIZE 0x00004000 + +From 68fb21cb4ac1904b14e182247eb7f762f07be547 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 14 Apr 2016 23:16:05 -0700 +Subject: [PATCH 342/398] drm/vc4: Add missing render node support + +There shouldn't be any other driver support necessary, since none of +the driver-specific ioctls ever required auth, and none of them deal +with modesetting. + +Signed-off-by: Eric Anholt +Reviewed-by: Daniel Vetter +(cherry picked from commit 0cd3e27476620176c19e346f82576c6e139b85a9) +--- + drivers/gpu/drm/vc4/vc4_drv.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 4b655affc4caa134f556581e88b218efa39c54a0..a5b68c1aa07c42b8b0891b3c3346a1790ce02532 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -90,6 +90,7 @@ static struct drm_driver vc4_drm_driver = { + DRIVER_ATOMIC | + DRIVER_GEM | + DRIVER_HAVE_IRQ | ++ DRIVER_RENDER | + DRIVER_PRIME), + .lastclose = vc4_lastclose, + .preclose = vc4_drm_preclose, + +From 82aa9e4919cf881c88e427e29caa1ebc85ed635d Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 24 Mar 2016 17:23:48 -0700 +Subject: [PATCH 343/398] drm/panel: simple: Add the 7" DPI panel from Adafruit + +This is a basic TFT panel with a 40-pin FPC connector on it. The +specification doesn't define timings, but the Adafruit instructions +were setting up 800x480 CVT. + +v2: Add .bus_format and vsync/hsync flags. + +Signed-off-by: Eric Anholt +Acked-by: Rob Herring +[treding@nvidia.com: keep entries properly sorted] +Signed-off-by: Thierry Reding + +(cherry picked from commit 8070fdbd024727c752f815b18e5339c681a01bbe) +--- + .../bindings/display/panel/ontat,yx700wv03.txt | 7 ++++ + drivers/gpu/drm/panel/panel-simple.c | 37 ++++++++++++++++++++++ + 2 files changed, 44 insertions(+) + create mode 100644 Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt + +diff --git a/Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt b/Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt +new file mode 100644 +index 0000000000000000000000000000000000000000..3d8a5e029242a38d9b442559ad0edbc062fd52d3 +--- /dev/null ++++ b/Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt +@@ -0,0 +1,7 @@ ++On Tat Industrial Company 7" DPI TFT panel. ++ ++Required properties: ++- compatible: should be "ontat,yx700wv03" ++ ++This binding is compatible with the simple-panel binding, which is specified ++in simple-panel.txt in this directory. +diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c +index f97b73ec4713722ae3af5a05ba048ea95042e4e0..e4a28487591628fe98169b91e389ae5053972e03 100644 +--- a/drivers/gpu/drm/panel/panel-simple.c ++++ b/drivers/gpu/drm/panel/panel-simple.c +@@ -1003,6 +1003,40 @@ static const struct panel_desc okaya_rs800480t_7x0gp = { + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, + }; + ++/* ++ * 800x480 CVT. The panel appears to be quite accepting, at least as far as ++ * pixel clocks, but this is the timing that was being used in the Adafruit ++ * installation instructions. ++ */ ++static const struct drm_display_mode ontat_yx700wv03_mode = { ++ .clock = 29500, ++ .hdisplay = 800, ++ .hsync_start = 824, ++ .hsync_end = 896, ++ .htotal = 992, ++ .vdisplay = 480, ++ .vsync_start = 483, ++ .vsync_end = 493, ++ .vtotal = 500, ++ .vrefresh = 60, ++ .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, ++}; ++ ++/* ++ * Specification at: ++ * https://www.adafruit.com/images/product-files/2406/c3163.pdf ++ */ ++static const struct panel_desc ontat_yx700wv03 = { ++ .modes = &ontat_yx700wv03_mode, ++ .num_modes = 1, ++ .bpc = 8, ++ .size = { ++ .width = 154, ++ .height = 83, ++ }, ++ .bus_format = MEDIA_BUS_FMT_RGB888_1X24, ++}; ++ + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { + .clock = 25000, + .hdisplay = 480, +@@ -1179,6 +1213,9 @@ static const struct of_device_id platform_of_match[] = { + .compatible = "okaya,rs800480t-7x0gp", + .data = &okaya_rs800480t_7x0gp, + }, { ++ .compatible = "ontat,yx700wv03", ++ .data = &ontat_yx700wv03, ++ }, { + .compatible = "ortustech,com43h4m85ulc", + .data = &ortustech_com43h4m85ulc, + }, { + +From def7707c309a871aa297c11e95fbf8fdca16c9b1 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 13:18:09 -0700 +Subject: [PATCH 344/398] BCM270X_DT: Add the disabled-by-default DPI device + node. + +This will be enabled and connected to a particular panel by DT +overlays. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 2562372d2e7986c29f7f671d4d1bcc226484bfc0..c8e0870898756dd940a6806ac3a45c6e6a80d516 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -179,6 +179,17 @@ + status = "disabled"; + }; + ++ dpi: dpi@7e208000 { ++ compatible = "brcm,bcm2835-dpi"; ++ reg = <0x7e208000 0x8c>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>, ++ <&cprman BCM2835_CLOCK_DPI>; ++ clock-names = "core", "pixel"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + pixelvalve1: pixelvalve@7e207000 { + compatible = "brcm,bcm2835-pixelvalve1"; + reg = <0x7e207000 0x100>; + +From f0b481b1efdfe2e2e9bfbdc62bce856c7413f454 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner +Date: Fri, 6 May 2016 19:26:05 +0200 +Subject: [PATCH 345/398] drm/vc4: Fix get_vblank_counter with proper no-op for + Linux 4.4+ + +get_vblank_counter hooked up to drm_vblank_count() which alway was +non-sensical but didn't hurt in the past. Since Linux 4.4 it +triggers a WARN_ON_ONCE in drm_update_vblank_count on first vblank +irq disable, so fix it by hooking to drm_vblank_no_hw_counter(). + +Tested against Raspian kernel 4.4.8 tree on RPi 2B. + +Signed-off-by: Mario Kleiner +Cc: Eric Anholt +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_drv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index a5b68c1aa07c42b8b0891b3c3346a1790ce02532..2854ba313a6b8ead0f768d5bee204bc1603e3e57 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -102,7 +102,7 @@ static struct drm_driver vc4_drm_driver = { + + .enable_vblank = vc4_enable_vblank, + .disable_vblank = vc4_disable_vblank, +- .get_vblank_counter = drm_vblank_count, ++ .get_vblank_counter = drm_vblank_no_hw_counter, + + #if defined(CONFIG_DEBUG_FS) + .debugfs_init = vc4_debugfs_init, + +From 90a557a68377ca7f9d41dbef39be8c952a2d8c81 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner +Date: Fri, 6 May 2016 19:26:06 +0200 +Subject: [PATCH 346/398] drm/vc4: Fix drm_vblank_put/get imbalance in page + flip path. + +The async page flip path was missing drm_crtc_vblank_get/put +completely. The sync flip path was missing a vblank put, so async +flips only reported proper pageflip completion events by chance, +and vblank irq's never turned off after a first vsync'ed page flip +until system reboot. + +Tested against Raspian kernel 4.4.8 tree on RPi 2B. + +Signed-off-by: Mario Kleiner +Cc: Eric Anholt +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index defb4911fb5fd96bd4ca44363352eabf8eed53dd..07662bd44bac219661f458fe7e91405fee6ccd79 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -506,6 +506,7 @@ static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) + if (vc4_crtc->event) { + drm_crtc_send_vblank_event(crtc, vc4_crtc->event); + vc4_crtc->event = NULL; ++ drm_crtc_vblank_put(crtc); + } + spin_unlock_irqrestore(&dev->event_lock, flags); + } +@@ -556,6 +557,7 @@ vc4_async_page_flip_complete(struct vc4_seqno_cb *cb) + spin_unlock_irqrestore(&dev->event_lock, flags); + } + ++ drm_crtc_vblank_put(crtc); + drm_framebuffer_unreference(flip_state->fb); + kfree(flip_state); + +@@ -598,6 +600,8 @@ static int vc4_async_page_flip(struct drm_crtc *crtc, + return ret; + } + ++ WARN_ON(drm_crtc_vblank_get(crtc) != 0); ++ + /* Immediately update the plane's legacy fb pointer, so that later + * modeset prep sees the state that will be present when the semaphore + * is released. + +From c71b8445e04a45846613109cb599bbb43ef7aad9 Mon Sep 17 00:00:00 2001 +From: Lee Jones +Date: Thu, 11 Feb 2016 13:19:09 -0800 +Subject: [PATCH 347/398] clk: Allow clocks to be marked as CRITICAL + +Critical clocks are those which must not be gated, else undefined +or catastrophic failure would occur. Here we have chosen to +ensure the prepare/enable counts are correctly incremented, so as +not to confuse users with enabled clocks with no visible users. + +Signed-off-by: Lee Jones +Signed-off-by: Michael Turquette +Link: lkml.kernel.org/r/1455225554-13267-2-git-send-email-mturquette@baylibre.com +(cherry picked from commit 32b9b10961860860268961d9aad0c56a73018c37) +--- + drivers/clk/clk.c | 5 +++++ + include/linux/clk-provider.h | 1 + + 2 files changed, 6 insertions(+) + +diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c +index f13c3f4228d4d51d5649c3705fd565b4aac82913..351369ef7ebbe560941d5e153e21588ad5393804 100644 +--- a/drivers/clk/clk.c ++++ b/drivers/clk/clk.c +@@ -2466,6 +2466,11 @@ static int __clk_init(struct device *dev, struct clk *clk_user) + if (core->ops->init) + core->ops->init(core->hw); + ++ if (core->flags & CLK_IS_CRITICAL) { ++ clk_core_prepare(core); ++ clk_core_enable(core); ++ } ++ + kref_init(&core->ref); + out: + clk_prepare_unlock(); +diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h +index 7cd0171963ae174c37a1c69b325f9430f9e44904..b79d854fe3358dbd5300610e11c43dc1bb54f009 100644 +--- a/include/linux/clk-provider.h ++++ b/include/linux/clk-provider.h +@@ -31,6 +31,7 @@ + #define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change */ + #define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */ + #define CLK_RECALC_NEW_RATES BIT(9) /* recalc rates after notifications */ ++#define CLK_IS_CRITICAL BIT(11) /* do not gate, ever */ + + struct clk; + struct clk_hw; + +From 52084421643ecd0af44f17d14c904cd67f407c19 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 11:44:59 -0700 +Subject: [PATCH 348/398] clk: bcm2835: Mark the VPU clock as critical + +The VPU clock is also the clock for our AXI bus, so we really can't +disable it. This might have happened during boot if, for example, +uart1 (aux_uart clock) probed and was then disabled before the other +consumers of the VPU clock had probed. + +v2: Rewrite to use a .flags in bcm2835_clock_data, since other clocks + will need this too. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 35f8de736cee3aa8b05c60bf4debd4c1da11fb5a..11ac28a0b90e6803601dcba8e11fde7d969850cd 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -446,6 +446,8 @@ struct bcm2835_clock_data { + /* Number of fractional bits in the divider */ + u32 frac_bits; + ++ u32 flags; ++ + bool is_vpu_clock; + bool is_mash_clock; + }; +@@ -1242,7 +1244,7 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.parent_names = parents; + init.num_parents = data->num_mux_parents; + init.name = data->name; +- init.flags = CLK_IGNORE_UNUSED; ++ init.flags = data->flags | CLK_IGNORE_UNUSED; + + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; +@@ -1661,6 +1663,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_VPUDIV, + .int_bits = 12, + .frac_bits = 8, ++ .flags = CLK_IS_CRITICAL, + .is_vpu_clock = true), + + /* clocks with per parent mux */ + +From f26adebc4fb70825a4713124fd3a28d4c51275d1 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 9 May 2016 17:28:18 -0700 +Subject: [PATCH 349/398] clk: bcm2835: Mark GPIO clocks enabled at boot as + critical. + +These divide off of PLLD_PER and are used for the ethernet and wifi +PHYs source PLLs. Neither of them is currently represented by a phy +device that would grab the clock for us. + +This keeps other drivers from killing the networking PHYs when they +disable their own clocks and trigger PLLD_PER's refcount going to 0. + +v2: Skip marking as critical if they aren't on at boot. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 11ac28a0b90e6803601dcba8e11fde7d969850cd..970d89011c44c9c13c3c3bb221e5c5b0da817683 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1246,6 +1246,15 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.name = data->name; + init.flags = data->flags | CLK_IGNORE_UNUSED; + ++ /* ++ * Some GPIO clocks for ethernet/wifi PLLs are marked as ++ * critical (since some platforms use them), but if the ++ * firmware didn't have them turned on then they clearly ++ * aren't actually critical. ++ */ ++ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) ++ init.flags &= ~CLK_IS_CRITICAL; ++ + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; + } else { +@@ -1720,13 +1729,15 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_GP1DIV, + .int_bits = 12, + .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL, + .is_mash_clock = true), + [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( + .name = "gp2", + .ctl_reg = CM_GP2CTL, + .div_reg = CM_GP2DIV, + .int_bits = 12, +- .frac_bits = 12), ++ .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL), + + /* HDMI state machine */ + [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( + +From 2e084a62c50576995b676439b7433d368cef5bfa Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 12:39:45 -0700 +Subject: [PATCH 350/398] clk: bcm2835: Skip PLLC clocks when deciding on a new + clock parent + +If the firmware had set up a clock to source from PLLC, go along with +it. But if we're looking for a new parent, we don't want to switch it +to PLLC because the firmware will force PLLC (and thus the AXI bus +clock) to different frequencies during over-temp/under-voltage, +without notification to Linux. + +On my system, this moves the Linux-enabled HDMI state machine and DSI1 +escape clock over to plld_per from pllc_per. EMMC still ends up on +pllc_per, because the firmware had set it up to use that. + +Signed-off-by: Eric Anholt +Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") +--- + drivers/clk/bcm/clk-bcm2835.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 970d89011c44c9c13c3c3bb221e5c5b0da817683..6b6b279a640ae03b295432d977978d1926d30d7e 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1020,16 +1020,28 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + return 0; + } + ++static bool ++bcm2835_clk_is_pllc(struct clk_hw *hw) ++{ ++ if (!hw) ++ return false; ++ ++ return strncmp(clk_hw_get_name(hw), "pllc", 4) == 0; ++} ++ + static int bcm2835_clock_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct clk_hw *parent, *best_parent = NULL; ++ bool current_parent_is_pllc; + unsigned long rate, best_rate = 0; + unsigned long prate, best_prate = 0; + size_t i; + u32 div; + ++ current_parent_is_pllc = bcm2835_clk_is_pllc(clk_hw_get_parent(hw)); ++ + /* + * Select parent clock that results in the closest but lower rate + */ +@@ -1037,6 +1049,17 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, + parent = clk_hw_get_parent_by_index(hw, i); + if (!parent) + continue; ++ ++ /* ++ * Don't choose a PLLC-derived clock as our parent ++ * unless it had been manually set that way. PLLC's ++ * frequency gets adjusted by the firmware due to ++ * over-temp or under-voltage conditions, without ++ * prior notification to our clock consumer. ++ */ ++ if (bcm2835_clk_is_pllc(parent) && !current_parent_is_pllc) ++ continue; ++ + prate = clk_hw_get_rate(parent); + div = bcm2835_clock_choose_div(hw, req->rate, prate, true); + rate = bcm2835_clock_rate_from_divisor(clock, prate, div); + +From 5f29e652bca9e3a9a62519ba7e44cdfd098e68d5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 23 May 2016 17:06:08 +0100 +Subject: [PATCH 351/398] Revert "Revert "drm/vc4: Force HDMI to connected."" + +This reverts commit 7da44d06540b4a191ecc74e943f3203577fce0df. + +This breaks the driver on Pi3 as hotplug is implemented through a +gpio expander owned by the GPU. + +We need to extend the virtual gpio driver to support this, but for +now assume hotplug is always enabled. +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 524eae9531d015c8b0f4409229f89ce981c3c020..69650a8330ddcf28080327624135048be2847120 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -166,6 +166,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + struct drm_device *dev = connector->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + ++ return connector_status_connected; ++ + if (vc4->hdmi->hpd_gpio) { + if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ + vc4->hdmi->hpd_active_low) + +From e7405b9aa9d815df033e80eaca50d021e3a5376a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 23 May 2016 18:22:52 +0100 +Subject: [PATCH 352/398] config: Add NF_MATCH_RPFILTER + +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + arch/arm/configs/bcmrpi_defconfig | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 87023c7eacbdb9460492c22a89365aa5068d58c9..e8c589eea820ed776acedee3d371d4607829a4cd 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -223,6 +223,7 @@ CONFIG_NF_CONNTRACK_IPV4=m + CONFIG_IP_NF_IPTABLES=m + CONFIG_IP_NF_MATCH_AH=m + CONFIG_IP_NF_MATCH_ECN=m ++CONFIG_IP_NF_MATCH_RPFILTER=m + CONFIG_IP_NF_MATCH_TTL=m + CONFIG_IP_NF_FILTER=m + CONFIG_IP_NF_TARGET_REJECT=m +@@ -247,6 +248,7 @@ CONFIG_IP6_NF_MATCH_OPTS=m + CONFIG_IP6_NF_MATCH_HL=m + CONFIG_IP6_NF_MATCH_IPV6HEADER=m + CONFIG_IP6_NF_MATCH_MH=m ++CONFIG_IP6_NF_MATCH_RPFILTER=m + CONFIG_IP6_NF_MATCH_RT=m + CONFIG_IP6_NF_TARGET_HL=m + CONFIG_IP6_NF_FILTER=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index edb049cbcf3a7f3ff19f2f7d02602f89225b6ec3..b8b22a2a82f7adc62de8ce645f769567cc298a26 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -216,6 +216,7 @@ CONFIG_NF_CONNTRACK_IPV4=m + CONFIG_IP_NF_IPTABLES=m + CONFIG_IP_NF_MATCH_AH=m + CONFIG_IP_NF_MATCH_ECN=m ++CONFIG_IP_NF_MATCH_RPFILTER=m + CONFIG_IP_NF_MATCH_TTL=m + CONFIG_IP_NF_FILTER=m + CONFIG_IP_NF_TARGET_REJECT=m +@@ -240,6 +241,7 @@ CONFIG_IP6_NF_MATCH_OPTS=m + CONFIG_IP6_NF_MATCH_HL=m + CONFIG_IP6_NF_MATCH_IPV6HEADER=m + CONFIG_IP6_NF_MATCH_MH=m ++CONFIG_IP6_NF_MATCH_RPFILTER=m + CONFIG_IP6_NF_MATCH_RT=m + CONFIG_IP6_NF_TARGET_HL=m + CONFIG_IP6_NF_FILTER=m + +From 90b7790cd6a257cbb71bdcd4f824cd0c0a0acc95 Mon Sep 17 00:00:00 2001 +From: Michael Kaplan +Date: Tue, 24 May 2016 10:19:08 +0200 +Subject: [PATCH 353/398] Added Overlay for Microchip MCP23017 I2C gpio + expander + +--- + arch/arm/boot/dts/overlays/README | 9 +++++ + arch/arm/boot/dts/overlays/mcp23017-overlay.dts | 54 +++++++++++++++++++++++++ + 2 files changed, 63 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/mcp23017-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 279802a1ec1e9262bc0d205de7c8ba16bd71625b..181ed072c3c0e79940acf8c0a3650de6e3e47b82 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -567,6 +567,15 @@ Params: gpio_out_pin GPIO for output (default "17") + (default "off") + + ++Name: mcp23017 ++Info: Configures the MCP23017 I2C port expander ++Load: dtoverlay=mcp23017,= ++Params: gpiopin Gpio pin connected to the INTA output of the ++ MCP23017 (default: 4) ++ ++ addr I2C address of the MCP23017 (default: 0x20) ++ ++ + Name: mcp2515-can0 + Info: Configures the MCP2515 CAN controller on spi0.0 + Load: dtoverlay=mcp2515-can0,= +diff --git a/arch/arm/boot/dts/overlays/mcp23017-overlay.dts b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..412f966a3cc0a312771b7182310a7045fb923224 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts +@@ -0,0 +1,54 @@ ++// Definitions for MCP23017 Gpio Extender from Microchip Semiconductor ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&i2c1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&gpio>; ++ __overlay__ { ++ mcp23017_pins: mcp23017_pins { ++ brcm,pins = <4>; ++ brcm,function = <0>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mcp23017: mcp@20 { ++ compatible = "microchip,mcp23017"; ++ reg = <0x20>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ #interrupt-cells=<2>; ++ interrupt-parent = <&gpio>; ++ interrupts = <4 2>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ gpiopin = <&mcp23017_pins>,"brcm,pins:0", ++ <&mcp23017>,"interrupts:0"; ++ addr = <&mcp23017>,"reg:0"; ++ }; ++}; ++ + +From 312f9df6383395f27d1dbce23021b9ccf58ab10a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 24 May 2016 16:20:09 +0100 +Subject: [PATCH 354/398] bcm2835-camera: Fix max/min error when looping over + cameras/resolutions + +See: https://github.com/raspberrypi/linux/issues/1447#issuecomment-221303506 +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 12326f876bdbc29083cb7afbf5d5cac7c4f321a7..ef4a9f65da3b09d0618b7366418e4167687a229b 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -1530,8 +1530,8 @@ static int get_num_cameras(struct vchiq_mmal_instance *instance, + } + for (i = 0; + i < (cam_info.num_cameras > num_resolutions ? +- cam_info.num_cameras : +- num_resolutions); ++ num_resolutions : ++ cam_info.num_cameras); + i++) { + resolutions[i][0] = cam_info.cameras[i].max_width; + resolutions[i][1] = cam_info.cameras[i].max_height; + +From ed5a568c7019eb0be575581e64e048db8f7a7e1c Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Sun, 29 May 2016 05:22:29 +0100 +Subject: [PATCH 355/398] Add dt param to force HiFiBerry DAC+ Pro into slave + mode + +"dtoverlay=hifiberry-dacplus,slave" + +Add 'slave' param to use HiFiBerry DAC+ Pro in slave mode, +with Pi as master for bit and frame clock. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/overlays/README | 2 ++ + arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts | 6 ++++-- + sound/soc/bcm/hifiberry_dacplus.c | 10 ++++++++-- + 3 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 181ed072c3c0e79940acf8c0a3650de6e3e47b82..d16b9eb587d535ff44839296190636945cb5c0c2 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -370,6 +370,8 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec + responsibility of the user to ensure that + the Digital volume control is set to a value + that does not result in clipping/distortion!) ++ slave Force DAC+ Pro into slave mode, using Pi as ++ master for bit clock and frame clock. + + + Name: hifiberry-digi +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +index 4d8e09f11aacfebba78a9ac2f1e98f20883b5d70..2f078d4747ccfdc5172e24b18ce65454f1219b9d 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +@@ -41,7 +41,7 @@ + + fragment@3 { + target = <&sound>; +- frag3: __overlay__ { ++ hifiberry_dacplus: __overlay__ { + compatible = "hifiberry,hifiberry-dacplus"; + i2s-controller = <&i2s>; + status = "okay"; +@@ -49,6 +49,8 @@ + }; + + __overrides__ { +- 24db_digital_gain = <&frag3>,"hifiberry,24db_digital_gain?"; ++ 24db_digital_gain = ++ <&hifiberry_dacplus>,"hifiberry,24db_digital_gain?"; ++ slave = <&hifiberry_dacplus>,"hifiberry-dacplus,slave?"; + }; + }; +diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c +index 03d8d2a289b368e5e720ff8e18d3a74a3d788d29..65600674c286e8a7be8efd352d5a80889221a1d6 100644 +--- a/sound/soc/bcm/hifiberry_dacplus.c ++++ b/sound/soc/bcm/hifiberry_dacplus.c +@@ -47,6 +47,7 @@ struct pcm512x_priv { + /* Clock rate of CLK48EN attached to GPIO3 pin */ + #define CLK_48EN_RATE 24576000UL + ++static bool slave; + static bool snd_rpi_hifiberry_is_dacpro; + static bool digital_gain_0db_limit = true; + +@@ -145,8 +146,11 @@ static int snd_rpi_hifiberry_dacplus_init(struct snd_soc_pcm_runtime *rtd) + struct snd_soc_codec *codec = rtd->codec; + struct pcm512x_priv *priv; + +- snd_rpi_hifiberry_is_dacpro +- = snd_rpi_hifiberry_dacplus_is_pro_card(codec); ++ if (slave) ++ snd_rpi_hifiberry_is_dacpro = false; ++ else ++ snd_rpi_hifiberry_is_dacpro = ++ snd_rpi_hifiberry_dacplus_is_pro_card(codec); + + if (snd_rpi_hifiberry_is_dacpro) { + struct snd_soc_dai_link *dai = rtd->dai_link; +@@ -314,6 +318,8 @@ static int snd_rpi_hifiberry_dacplus_probe(struct platform_device *pdev) + + digital_gain_0db_limit = !of_property_read_bool( + pdev->dev.of_node, "hifiberry,24db_digital_gain"); ++ slave = of_property_read_bool(pdev->dev.of_node, ++ "hifiberry-dacplus,slave"); + } + + ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); + +From 1e5d96d22acacfa78d0a51eae225632dd062f019 Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Thu, 19 May 2016 00:00:00 +0100 +Subject: [PATCH 356/398] simple: add sound-dai-cells to I2S def + +Add '#sound-dai-cells = <0>;' to the I2S definition in +bcm2708_common.dtsi + +Not having it specified, whilst not causing an issue right now with +rpi-4.4.y, is going to cause an issue going forward with the use of +simple-card driver. So it doesn't fall through the cracks, patch it +in now. + +Hopefully Martin has taken care of getting a patch submitted for the +upstream Pi dts, as it was he who first run into the issue with the +current upstream kernel.... +https://github.com/msperl/linux-rpi/issues/3#issue-154916615 + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index c8e0870898756dd940a6806ac3a45c6e6a80d516..fa3f6b672a3d17373aa8bf0bbc27743f2631d53d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -137,6 +137,7 @@ + + i2s: i2s@7e203000 { + compatible = "brcm,bcm2835-i2s"; ++ #sound-dai-cells = <0>; + reg = <0x7e203000 0x24>, + <0x7e101098 0x08>; + + +From 1a0ffe1d9e70c6a47e7783206a4e7e6828bcbc3c Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <6by9@users.noreply.github.com> +Date: Tue, 31 May 2016 10:38:31 +0100 +Subject: [PATCH 357/398] BCM2835-V4L2: Increase minimum resolution to 32x32 + +https://github.com/raspberrypi/linux/issues/1498 showed +up that 16x16 is failing to work on the GPU for some reason. + +GPU bug being tracked on +https://github.com/raspberrypi/firmware/issues/607 +Workaround here by increasing minimum resolution via V4L2 +to 32x32. + +Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index ef4a9f65da3b09d0618b7366418e4167687a229b..1da6fcfb6b314fce8947df77bd4bb239bfc84c6d 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -36,8 +36,8 @@ + + #define BM2835_MMAL_VERSION "0.0.2" + #define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2" +-#define MIN_WIDTH 16 +-#define MIN_HEIGHT 16 ++#define MIN_WIDTH 32 ++#define MIN_HEIGHT 32 + #define MIN_BUFFER_SIZE (80*1024) + + #define MAX_VIDEO_MODE_WIDTH 1280 + +From 6130cf71963486309da7bb9dc2ba7ce3b8e51557 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 27 May 2016 18:23:51 +0100 +Subject: [PATCH 358/398] config: Add support for Logitech Rumblepad + +--- + arch/arm/configs/bcm2709_defconfig | 4 ++++ + arch/arm/configs/bcmrpi_defconfig | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index e8c589eea820ed776acedee3d371d4607829a4cd..43322fb1f9c32d0ed18aec9a1f28713f8ec3a2bd 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -896,6 +896,10 @@ CONFIG_HID_TWINHAN=m + CONFIG_HID_KENSINGTON=m + CONFIG_HID_LCPOWER=m + CONFIG_HID_LOGITECH=m ++CONFIG_HID_LOGITECH_DJ=m ++CONFIG_LOGITECH_FF=y ++CONFIG_LOGIRUMBLEPAD2_FF=y ++CONFIG_LOGIG940_FF=y + CONFIG_HID_MAGICMOUSE=m + CONFIG_HID_MICROSOFT=m + CONFIG_HID_MONTEREY=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index b8b22a2a82f7adc62de8ce645f769567cc298a26..474aa33be0dd2fa2a23e9fc4dc1b74f69776de03 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -888,6 +888,10 @@ CONFIG_HID_TWINHAN=m + CONFIG_HID_KENSINGTON=m + CONFIG_HID_LCPOWER=m + CONFIG_HID_LOGITECH=m ++CONFIG_HID_LOGITECH_DJ=m ++CONFIG_LOGITECH_FF=y ++CONFIG_LOGIRUMBLEPAD2_FF=y ++CONFIG_LOGIG940_FF=y + CONFIG_HID_MAGICMOUSE=m + CONFIG_HID_MICROSOFT=m + CONFIG_HID_MONTEREY=m + +From e20529355438f25673049518c75eb583c4369b6c Mon Sep 17 00:00:00 2001 +From: escalator2015 +Date: Tue, 24 May 2016 16:20:09 +0100 +Subject: [PATCH 359/398] New driver for RRA DigiDAC1 soundcard using WM8741 + + WM8804 + +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 + + .../overlays/rra-digidac1-wm8741-audio-overlay.dts | 81 ++++ + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + sound/soc/bcm/Kconfig | 8 + + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/digidac1-soundcard.c | 422 +++++++++++++++++++++ + 8 files changed, 522 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts + create mode 100644 sound/soc/bcm/digidac1-soundcard.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 02acf884753c2f1fa7eb570ebe5ce7d7adcf8fb4..14a7848fe029cf2ace6a1809c08446b58945a56a 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -67,6 +67,7 @@ dtbo-$(RPI_DT_OVERLAYS) += rpi-display.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rra-digidac1-wm8741-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio-1bit.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index d16b9eb587d535ff44839296190636945cb5c0c2..76f93e1e9123ef4361d3456df4c8297c8a1b2e3d 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -842,6 +842,12 @@ Load: dtoverlay=rpi-sense + Params: + + ++Name: rra-digidac1-wm8741-audio ++Info: Configures the Red Rocks Audio DigiDAC1 soundcard ++Load: dtoverlay=rra-digidac1-wm8741-audio ++Params: ++ ++ + Name: sdhost + Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock. + N.B. This overlay is designed for situations where the mmc driver is +diff --git a/arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts b/arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..16b1247bfa618ff85936ddf78c3aea58075eaa67 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts +@@ -0,0 +1,81 @@ ++// Definitions for RRA DigiDAC1 Audio card ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target-path = "/"; ++ __overlay__ { ++ aliases { ++ ldo0 = &ldo0; ++ ldo1 = &ldo1; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/soc"; ++ __overlay__ { ++ ++ ldo1: ldo1 { ++ compatible = "regulator-fixed"; ++ regulator-name = "DC_5V"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-always-on; ++ }; ++ ++ ldo0: ldo0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "DC_3V3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ status = "okay"; ++ PVDD-supply = <&ldo0>; ++ DVDD-supply = <&ldo0>; ++ }; ++ ++ wm8742: wm8741@1a { ++ compatible = "wlf,wm8741"; ++ reg = <0x1a>; ++ status = "okay"; ++ AVDD-supply = <&ldo1>; ++ DVDD-supply = <&ldo0>; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "rra,digidac1-soundcard"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 43322fb1f9c32d0ed18aec9a1f28713f8ec3a2bd..e32cafa2a6b5d26b9c025ac0873f9af2f3da4124 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -866,6 +866,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m ++CONFIG_SND_DIGIDAC1_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 474aa33be0dd2fa2a23e9fc4dc1b74f69776de03..59161e7d21e17e24171e1020cc0b95b64f39055e 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -858,6 +858,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m ++CONFIG_SND_DIGIDAC1_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 30f8208371ee81896f68249ec442da76da35f21a..a2e0921c310536ca313cdb37b5da4dab4c9b9551 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -92,3 +92,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD + select SND_SOC_WM8731 + help + Say Y or M if you want to add support for audioinjector.net Pi Hat ++ ++config SND_DIGIDAC1_SOUNDCARD ++ tristate "Support for Red Rocks Audio DigiDAC1" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_WM8804 ++ select SND_SOC_WM8741 ++ help ++ Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 4af578211f4c5522a6b47245c4c7020977daf0b6..ee7342e6f90f6d12e1e5472df7294fe479b25407 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -16,6 +16,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o + snd-soc-raspidac3-objs := raspidac3.o + snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o ++snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o + + obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o +@@ -29,4 +30,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o + obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o ++obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o + +diff --git a/sound/soc/bcm/digidac1-soundcard.c b/sound/soc/bcm/digidac1-soundcard.c +new file mode 100644 +index 0000000000000000000000000000000000000000..446796e7e4c14a7d95b2f2a01211d9a0b151f1f3 +--- /dev/null ++++ b/sound/soc/bcm/digidac1-soundcard.c +@@ -0,0 +1,422 @@ ++/* ++ * ASoC Driver for RRA DigiDAC1 ++ * Copyright 2016 ++ * Author: José M. Tasende ++ * based on the HifiBerry DAC driver by Florian Meier ++ * and the Wolfson card driver by Nikesh Oswal, ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/wm8804.h" ++#include "../codecs/wm8741.h" ++ ++#define WM8741_NUM_SUPPLIES 2 ++ ++/* codec private data */ ++struct wm8741_priv { ++ struct wm8741_platform_data pdata; ++ struct regmap *regmap; ++ struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES]; ++ unsigned int sysclk; ++ const struct snd_pcm_hw_constraint_list *sysclk_constraints; ++}; ++ ++static int samplerate = 44100; ++ ++/* New Alsa Controls not exposed by original wm8741 codec driver */ ++/* in actual driver the att. adjustment is wrong because */ ++/* this DAC has a coarse attenuation register with 4dB steps */ ++/* and a fine level register with 0.125dB steps */ ++/* each register has 32 steps so combining both we have 1024 steps */ ++/* of 0.125 dB. */ ++/* The original level controls from driver are removed at startup */ ++/* and replaced by the corrected ones. */ ++/* The same wm8741 driver can be used for wm8741 and wm8742 devices */ ++ ++static const DECLARE_TLV_DB_SCALE(dac_tlv_fine, 0, 13, 0); ++static const DECLARE_TLV_DB_SCALE(dac_tlv_coarse, -12700, 400, 1); ++static const char *w8741_dither[4] = {"Off", "RPDF", "TPDF", "HPDF"}; ++static const char *w8741_filter[5] = { ++ "Type 1", "Type 2", "Type 3", "Type 4", "Type 5"}; ++static const char *w8741_switch[2] = {"Off", "On"}; ++static const struct soc_enum w8741_enum[] = { ++SOC_ENUM_SINGLE(WM8741_MODE_CONTROL_2, 0, 4, w8741_dither),/* dithering type */ ++SOC_ENUM_SINGLE(WM8741_FILTER_CONTROL, 0, 5, w8741_filter),/* filter type */ ++SOC_ENUM_SINGLE(WM8741_FORMAT_CONTROL, 6, 2, w8741_switch),/* phase invert */ ++SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 0, 2, w8741_switch),/* volume ramp */ ++SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 3, 2, w8741_switch),/* soft mute */ ++}; ++ ++static const struct snd_kcontrol_new w8741_snd_controls_stereo[] = { ++SOC_DOUBLE_R_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION, ++ WM8741_DACRLSB_ATTENUATION, 0, 31, 1, dac_tlv_fine), ++SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION, ++ WM8741_DACRMSB_ATTENUATION, 0, 31, 1, dac_tlv_coarse), ++SOC_ENUM("DAC Dither", w8741_enum[0]), ++SOC_ENUM("DAC Digital Filter", w8741_enum[1]), ++SOC_ENUM("DAC Phase Invert", w8741_enum[2]), ++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]), ++SOC_ENUM("DAC Soft Mute", w8741_enum[4]), ++}; ++ ++static const struct snd_kcontrol_new w8741_snd_controls_mono_left[] = { ++SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION, ++ 0, 31, 0, dac_tlv_fine), ++SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION, ++ 0, 31, 1, dac_tlv_coarse), ++SOC_ENUM("DAC Dither", w8741_enum[0]), ++SOC_ENUM("DAC Digital Filter", w8741_enum[1]), ++SOC_ENUM("DAC Phase Invert", w8741_enum[2]), ++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]), ++SOC_ENUM("DAC Soft Mute", w8741_enum[4]), ++}; ++ ++static const struct snd_kcontrol_new w8741_snd_controls_mono_right[] = { ++SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACRLSB_ATTENUATION, ++ 0, 31, 0, dac_tlv_fine), ++SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACRMSB_ATTENUATION, ++ 0, 31, 1, dac_tlv_coarse), ++SOC_ENUM("DAC Dither", w8741_enum[0]), ++SOC_ENUM("DAC Digital Filter", w8741_enum[1]), ++SOC_ENUM("DAC Phase Invert", w8741_enum[2]), ++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]), ++SOC_ENUM("DAC Soft Mute", w8741_enum[4]), ++}; ++ ++static int w8741_add_controls(struct snd_soc_codec *codec) ++{ ++ struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); ++ ++ switch (wm8741->pdata.diff_mode) { ++ case WM8741_DIFF_MODE_STEREO: ++ case WM8741_DIFF_MODE_STEREO_REVERSED: ++ snd_soc_add_codec_controls(codec, ++ w8741_snd_controls_stereo, ++ ARRAY_SIZE(w8741_snd_controls_stereo)); ++ break; ++ case WM8741_DIFF_MODE_MONO_LEFT: ++ snd_soc_add_codec_controls(codec, ++ w8741_snd_controls_mono_left, ++ ARRAY_SIZE(w8741_snd_controls_mono_left)); ++ break; ++ case WM8741_DIFF_MODE_MONO_RIGHT: ++ snd_soc_add_codec_controls(codec, ++ w8741_snd_controls_mono_right, ++ ARRAY_SIZE(w8741_snd_controls_mono_right)); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++static int digidac1_soundcard_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_card *card = rtd->card; ++ struct snd_soc_pcm_runtime *wm8741_rtd; ++ struct snd_soc_codec *wm8741_codec; ++ struct snd_card *sound_card = card->snd_card; ++ struct snd_kcontrol *kctl; ++ int ret; ++ ++ wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name); ++ if (!wm8741_rtd) { ++ dev_warn(card->dev, "digidac1_soundcard_init: couldn't get wm8741 rtd\n"); ++ return -EFAULT; ++ } ++ wm8741_codec = wm8741_rtd->codec; ++ ret = w8741_add_controls(wm8741_codec); ++ if (ret < 0) ++ dev_warn(card->dev, "Failed to add new wm8741 controls: %d\n", ++ ret); ++ ++ /* enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ kctl = snd_soc_card_get_kcontrol(card, ++ "Playback Volume"); ++ if (kctl) { ++ kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE; ++ snd_ctl_remove(sound_card, kctl); ++ } ++ kctl = snd_soc_card_get_kcontrol(card, ++ "Fine Playback Volume"); ++ if (kctl) { ++ kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE; ++ snd_ctl_remove(sound_card, kctl); ++ } ++ return 0; ++} ++ ++static int digidac1_soundcard_startup(struct snd_pcm_substream *substream) ++{ ++ /* turn on wm8804 digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_card *card = rtd->card; ++ struct snd_soc_pcm_runtime *wm8741_rtd; ++ struct snd_soc_codec *wm8741_codec; ++ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); ++ wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name); ++ if (!wm8741_rtd) { ++ dev_warn(card->dev, "digidac1_soundcard_startup: couldn't get WM8741 rtd\n"); ++ return -EFAULT; ++ } ++ wm8741_codec = wm8741_rtd->codec; ++ ++ /* latch wm8741 level */ ++ snd_soc_update_bits(wm8741_codec, WM8741_DACLLSB_ATTENUATION, ++ WM8741_UPDATELL, WM8741_UPDATELL); ++ snd_soc_update_bits(wm8741_codec, WM8741_DACLMSB_ATTENUATION, ++ WM8741_UPDATELM, WM8741_UPDATELM); ++ snd_soc_update_bits(wm8741_codec, WM8741_DACRLSB_ATTENUATION, ++ WM8741_UPDATERL, WM8741_UPDATERL); ++ snd_soc_update_bits(wm8741_codec, WM8741_DACRMSB_ATTENUATION, ++ WM8741_UPDATERM, WM8741_UPDATERM); ++ ++ return 0; ++} ++ ++static void digidac1_soundcard_shutdown(struct snd_pcm_substream *substream) ++{ ++ /* turn off wm8804 digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); ++} ++ ++static int digidac1_soundcard_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ struct snd_soc_card *card = rtd->card; ++ struct snd_soc_pcm_runtime *wm8741_rtd; ++ struct snd_soc_codec *wm8741_codec; ++ ++ int sysclk = 27000000; ++ long mclk_freq = 0; ++ int mclk_div = 1; ++ int sampling_freq = 1; ++ int ret; ++ ++ wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name); ++ if (!wm8741_rtd) { ++ dev_warn(card->dev, "digidac1_soundcard_hw_params: couldn't get WM8741 rtd\n"); ++ return -EFAULT; ++ } ++ wm8741_codec = wm8741_rtd->codec; ++ samplerate = params_rate(params); ++ ++ if (samplerate <= 96000) { ++ mclk_freq = samplerate*256; ++ mclk_div = WM8804_MCLKDIV_256FS; ++ } else { ++ mclk_freq = samplerate*128; ++ mclk_div = WM8804_MCLKDIV_128FS; ++ } ++ ++ switch (samplerate) { ++ case 32000: ++ sampling_freq = 0x03; ++ break; ++ case 44100: ++ sampling_freq = 0x00; ++ break; ++ case 48000: ++ sampling_freq = 0x02; ++ break; ++ case 88200: ++ sampling_freq = 0x08; ++ break; ++ case 96000: ++ sampling_freq = 0x0a; ++ break; ++ case 176400: ++ sampling_freq = 0x0c; ++ break; ++ case 192000: ++ sampling_freq = 0x0e; ++ break; ++ default: ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", ++ samplerate); ++ } ++ ++ snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); ++ snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, ++ sysclk, SND_SOC_CLOCK_OUT); ++ if (ret < 0) { ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK: %d\n", ret); ++ return ret; ++ } ++ /* Enable wm8804 TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ /* wm8804 Power on */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); ++ ++ /* wm8804 set sampling frequency status bits */ ++ snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); ++ ++ /* Now update wm8741 registers for the correct oversampling */ ++ if (samplerate <= 48000) ++ snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1, ++ WM8741_OSR_MASK, 0x00); ++ else if (samplerate <= 96000) ++ snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1, ++ WM8741_OSR_MASK, 0x20); ++ else ++ snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1, ++ WM8741_OSR_MASK, 0x40); ++ ++ /* wm8741 bit size */ ++ switch (params_width(params)) { ++ case 16: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x00); ++ break; ++ case 20: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x01); ++ break; ++ case 24: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x02); ++ break; ++ case 32: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x03); ++ break; ++ default: ++ dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d", ++ params_width(params)); ++ return -EINVAL; ++ } ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); ++} ++/* machine stream operations */ ++static struct snd_soc_ops digidac1_soundcard_ops = { ++ .hw_params = digidac1_soundcard_hw_params, ++ .startup = digidac1_soundcard_startup, ++ .shutdown = digidac1_soundcard_shutdown, ++}; ++ ++static struct snd_soc_dai_link digidac1_soundcard_dai[] = { ++ { ++ .name = "RRA DigiDAC1", ++ .stream_name = "RRA DigiDAC1 HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8804-spdif", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "wm8804.1-003b", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ .ops = &digidac1_soundcard_ops, ++ .init = digidac1_soundcard_init, ++ }, ++ { ++ .name = "RRA DigiDAC11", ++ .stream_name = "RRA DigiDAC11 HiFi", ++ .cpu_dai_name = "wm8804-spdif", ++ .codec_dai_name = "wm8741", ++ .codec_name = "wm8741.1-001a", ++ .dai_fmt = SND_SOC_DAIFMT_I2S ++ | SND_SOC_DAIFMT_NB_NF ++ | SND_SOC_DAIFMT_CBS_CFS, ++ }, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card digidac1_soundcard = { ++ .name = "digidac1-soundcard", ++ .owner = THIS_MODULE, ++ .dai_link = digidac1_soundcard_dai, ++ .num_links = ARRAY_SIZE(digidac1_soundcard_dai), ++}; ++ ++static int digidac1_soundcard_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ digidac1_soundcard.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &digidac1_soundcard_dai[0]; ++ ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ ++ ret = snd_soc_register_card(&digidac1_soundcard); ++ if (ret) ++ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ++ ret); ++ ++ return ret; ++} ++ ++static int digidac1_soundcard_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&digidac1_soundcard); ++} ++ ++static const struct of_device_id digidac1_soundcard_of_match[] = { ++ { .compatible = "rra,digidac1-soundcard", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, digidac1_soundcard_of_match); ++ ++static struct platform_driver digidac1_soundcard_driver = { ++ .driver = { ++ .name = "digidac1-audio", ++ .owner = THIS_MODULE, ++ .of_match_table = digidac1_soundcard_of_match, ++ }, ++ .probe = digidac1_soundcard_probe, ++ .remove = digidac1_soundcard_remove, ++}; ++ ++module_platform_driver(digidac1_soundcard_driver); ++ ++MODULE_AUTHOR("José M. Tasende "); ++MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); ++MODULE_LICENSE("GPL v2"); + +From 0be657956f95f50eabfbc5e12940082e50cdb7c9 Mon Sep 17 00:00:00 2001 +From: Aaron Shaw +Date: Thu, 26 May 2016 23:37:11 +0100 +Subject: [PATCH 360/398] Change BoomBerry name to JustBoom in all locations + due to legal challenge + +--- + arch/arm/boot/dts/overlays/Makefile | 4 +- + arch/arm/boot/dts/overlays/README | 52 ++--- + .../boot/dts/overlays/boomberry-dac-overlay.dts | 43 ----- + .../boot/dts/overlays/boomberry-digi-overlay.dts | 39 ---- + .../arm/boot/dts/overlays/justboom-dac-overlay.dts | 43 +++++ + .../boot/dts/overlays/justboom-digi-overlay.dts | 39 ++++ + arch/arm/configs/bcm2709_defconfig | 4 +- + arch/arm/configs/bcmrpi_defconfig | 4 +- + sound/soc/bcm/Kconfig | 12 +- + sound/soc/bcm/Makefile | 8 +- + sound/soc/bcm/boomberry-dac.c | 162 ---------------- + sound/soc/bcm/boomberry-digi.c | 215 --------------------- + sound/soc/bcm/justboom-dac.c | 162 ++++++++++++++++ + sound/soc/bcm/justboom-digi.c | 215 +++++++++++++++++++++ + 14 files changed, 501 insertions(+), 501 deletions(-) + delete mode 100644 arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts + delete mode 100644 arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/justboom-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/justboom-digi-overlay.dts + delete mode 100644 sound/soc/bcm/boomberry-dac.c + delete mode 100644 sound/soc/bcm/boomberry-digi.c + create mode 100644 sound/soc/bcm/justboom-dac.c + create mode 100644 sound/soc/bcm/justboom-digi.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 14a7848fe029cf2ace6a1809c08446b58945a56a..0adb5b92c047cb7e12871cf75515f822924924cd 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -18,8 +18,6 @@ dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += boomberry-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo +@@ -43,6 +41,8 @@ dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += justboom-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += justboom-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 76f93e1e9123ef4361d3456df4c8297c8a1b2e3d..1516cc2e1616bb5e0cb519e05eee6776fe84e52a 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -238,32 +238,6 @@ Load: dtoverlay=bmp085_i2c-sensor + Params: + + +-Name: boomberry-dac +-Info: Configures the BoomBerry DAC HAT, Amp HAT, DAC Zero and Amp Zero audio +- cards +-Load: dtoverlay=boomberry-dac,= +-Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec +- Digital volume control. Enable with +- "dtoverlay=boomberry-dac,24db_digital_gain" +- (The default behaviour is that the Digital +- volume control is limited to a maximum of +- 0dB. ie. it can attenuate but not provide +- gain. For most users, this will be desired +- as it will prevent clipping. By appending +- the 24dB_digital_gain parameter, the Digital +- volume control will allow up to 24dB of +- gain. If this parameter is enabled, it is the +- responsibility of the user to ensure that +- the Digital volume control is set to a value +- that does not result in clipping/distortion!) +- +- +-Name: boomberry-digi +-Info: Configures the BoomBerry Digi HAT and Digi Zero audio cards +-Load: dtoverlay=boomberry-digi +-Params: +- +- + Name: dht11 + Info: Overlay for the DHT11/DHT21/DHT22 humidity/temperature sensors + Also sometimes found with the part number(s) AM230x. +@@ -543,6 +517,32 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec + that does not result in clipping/distortion!) + + ++Name: justboom-dac ++Info: Configures the JustBoom DAC HAT, Amp HAT, DAC Zero and Amp Zero audio ++ cards ++Load: dtoverlay=justboom-dac,= ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ "dtoverlay=justboom-dac,24db_digital_gain" ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24dB_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) ++ ++ ++Name: justboom-digi ++Info: Configures the JustBoom Digi HAT and Digi Zero audio cards ++Load: dtoverlay=justboom-digi ++Params: ++ ++ + Name: lirc-rpi + Info: Configures lirc-rpi (Linux Infrared Remote Control for Raspberry Pi) + Consult the module documentation for more details. +diff --git a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts +deleted file mode 100644 +index 725e8550f21d304b219d314acc2405d6e85ea8e5..0000000000000000000000000000000000000000 +--- a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts ++++ /dev/null +@@ -1,43 +0,0 @@ +-// Definitions for BoomBerry DAC +-/dts-v1/; +-/plugin/; +- +-/ { +- compatible = "brcm,bcm2708"; +- +- fragment@0 { +- target = <&i2s>; +- __overlay__ { +- status = "okay"; +- }; +- }; +- +- fragment@1 { +- target = <&i2c1>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- +- pcm5122@4d { +- #sound-dai-cells = <0>; +- compatible = "ti,pcm5122"; +- reg = <0x4d>; +- status = "okay"; +- }; +- }; +- }; +- +- fragment@2 { +- target = <&sound>; +- frag2: __overlay__ { +- compatible = "boomberry,boomberry-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- __overrides__ { +- 24db_digital_gain = <&frag2>,"boomberry,24db_digital_gain?"; +- }; +-}; +diff --git a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts +deleted file mode 100644 +index a451f6ddbe2fc66e5cdb1e010551eb217b5abf99..0000000000000000000000000000000000000000 +--- a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts ++++ /dev/null +@@ -1,39 +0,0 @@ +-// Definitions for BoomBerry Digi +-/dts-v1/; +-/plugin/; +- +-/ { +- compatible = "brcm,bcm2708"; +- +- fragment@0 { +- target = <&i2s>; +- __overlay__ { +- status = "okay"; +- }; +- }; +- +- fragment@1 { +- target = <&i2c1>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- +- wm8804@3b { +- #sound-dai-cells = <0>; +- compatible = "wlf,wm8804"; +- reg = <0x3b>; +- status = "okay"; +- }; +- }; +- }; +- +- fragment@2 { +- target = <&sound>; +- __overlay__ { +- compatible = "boomberry,boomberry-digi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +-}; +diff --git a/arch/arm/boot/dts/overlays/justboom-dac-overlay.dts b/arch/arm/boot/dts/overlays/justboom-dac-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..312632ad376d5b8c8ff1dbf31fa03d0d18181d94 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/justboom-dac-overlay.dts +@@ -0,0 +1,43 @@ ++// Definitions for JustBoom DAC ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4d { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4d>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "justboom,justboom-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ __overrides__ { ++ 24db_digital_gain = <&frag2>,"justboom,24db_digital_gain?"; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlays/justboom-digi-overlay.dts b/arch/arm/boot/dts/overlays/justboom-digi-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..cbbede9a541166ba257122918081982016e0b7eb +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/justboom-digi-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for JustBoom Digi ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "justboom,justboom-digi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index e32cafa2a6b5d26b9c025ac0873f9af2f3da4124..a8d7790b0524fd852bc80f5bcac2371503de5f5f 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -861,8 +861,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 59161e7d21e17e24171e1020cc0b95b64f39055e..af21699bae62dac47d9e3f1328cfb540e2856781 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -853,8 +853,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index a2e0921c310536ca313cdb37b5da4dab4c9b9551..fa11cd792824f21424a3b798336b676d33181a43 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -50,19 +50,19 @@ config SND_BCM2708_SOC_RPI_PROTO + help + Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731). + +-config SND_BCM2708_SOC_BOOMBERRY_DAC +- tristate "Support for BoomBerry DAC" ++config SND_BCM2708_SOC_JUSTBOOM_DAC ++ tristate "Support for JustBoom DAC" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S + select SND_SOC_PCM512x + help +- Say Y or M if you want to add support for BoomBerry DAC. ++ Say Y or M if you want to add support for JustBoom DAC. + +-config SND_BCM2708_SOC_BOOMBERRY_DIGI +- tristate "Support for BoomBerry Digi" ++config SND_BCM2708_SOC_JUSTBOOM_DIGI ++ tristate "Support for JustBoom Digi" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S + select SND_SOC_WM8804 + help +- Say Y or M if you want to add support for BoomBerry Digi. ++ Say Y or M if you want to add support for JustBoom Digi. + + config SND_BCM2708_SOC_IQAUDIO_DAC + tristate "Support for IQaudIO-DAC" +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index ee7342e6f90f6d12e1e5472df7294fe479b25407..a9448fdcd6bcc4e4cb96e985fbe758aea002ddd8 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -9,8 +9,8 @@ snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o + snd-soc-hifiberry-amp-objs := hifiberry_amp.o +-snd-soc-boomberry-dac-objs := boomberry-dac.o +-snd-soc-boomberry-digi-objs := boomberry-digi.o ++snd-soc-justboom-dac-objs := justboom-dac.o ++snd-soc-justboom-digi-objs := justboom-digi.o + snd-soc-rpi-dac-objs := rpi-dac.o + snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o +@@ -23,8 +23,8 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o +-obj-$(CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC) += snd-soc-boomberry-dac.o +-obj-$(CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI) += snd-soc-boomberry-digi.o ++obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o ++obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o +diff --git a/sound/soc/bcm/boomberry-dac.c b/sound/soc/bcm/boomberry-dac.c +deleted file mode 100644 +index 8d39de24289d875cebd5455f28aafe3e24132ab5..0000000000000000000000000000000000000000 +--- a/sound/soc/bcm/boomberry-dac.c ++++ /dev/null +@@ -1,162 +0,0 @@ +-/* +- * ASoC Driver for BoomBerry DAC Raspberry Pi HAT Sound Card +- * +- * Author: Milan Neskovic +- * Copyright 2016 +- * based on code by Daniel Matuschek +- * based on code by Florian Meier +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License +- * version 2 as published by the Free Software Foundation. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * General Public License for more details. +- */ +- +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +- +-#include "../codecs/pcm512x.h" +- +-static bool digital_gain_0db_limit = true; +- +-static int snd_rpi_boomberry_dac_init(struct snd_soc_pcm_runtime *rtd) +-{ +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08); +- snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02); +- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); +- +- if (digital_gain_0db_limit) +- { +- int ret; +- struct snd_soc_card *card = rtd->card; +- +- ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207); +- if (ret < 0) +- dev_warn(card->dev, "Failed to set volume limit: %d\n", ret); +- } +- +- return 0; +-} +- +-static int snd_rpi_boomberry_dac_hw_params(struct snd_pcm_substream *substream, +- struct snd_pcm_hw_params *params) +-{ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_dai *cpu_dai = rtd->cpu_dai; +- /*return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);*/ +- unsigned int sample_bits = +- snd_pcm_format_physical_width(params_format(params)); +- return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2); +-} +- +-static int snd_rpi_boomberry_dac_startup(struct snd_pcm_substream *substream) { +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); +- return 0; +-} +- +-static void snd_rpi_boomberry_dac_shutdown(struct snd_pcm_substream *substream) { +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00); +-} +- +-/* machine stream operations */ +-static struct snd_soc_ops snd_rpi_boomberry_dac_ops = { +- .hw_params = snd_rpi_boomberry_dac_hw_params, +- .startup = snd_rpi_boomberry_dac_startup, +- .shutdown = snd_rpi_boomberry_dac_shutdown, +-}; +- +-static struct snd_soc_dai_link snd_rpi_boomberry_dac_dai[] = { +-{ +- .name = "BoomBerry DAC", +- .stream_name = "BoomBerry DAC HiFi", +- .cpu_dai_name = "bcm2708-i2s.0", +- .codec_dai_name = "pcm512x-hifi", +- .platform_name = "bcm2708-i2s.0", +- .codec_name = "pcm512x.1-004d", +- .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | +- SND_SOC_DAIFMT_CBS_CFS, +- .ops = &snd_rpi_boomberry_dac_ops, +- .init = snd_rpi_boomberry_dac_init, +-}, +-}; +- +-/* audio machine driver */ +-static struct snd_soc_card snd_rpi_boomberry_dac = { +- .name = "snd_rpi_boomberry_dac", +- .owner = THIS_MODULE, +- .dai_link = snd_rpi_boomberry_dac_dai, +- .num_links = ARRAY_SIZE(snd_rpi_boomberry_dac_dai), +-}; +- +-static int snd_rpi_boomberry_dac_probe(struct platform_device *pdev) +-{ +- int ret = 0; +- +- snd_rpi_boomberry_dac.dev = &pdev->dev; +- +- if (pdev->dev.of_node) { +- struct device_node *i2s_node; +- struct snd_soc_dai_link *dai = &snd_rpi_boomberry_dac_dai[0]; +- i2s_node = of_parse_phandle(pdev->dev.of_node, +- "i2s-controller", 0); +- +- if (i2s_node) { +- dai->cpu_dai_name = NULL; +- dai->cpu_of_node = i2s_node; +- dai->platform_name = NULL; +- dai->platform_of_node = i2s_node; +- } +- +- digital_gain_0db_limit = !of_property_read_bool( +- pdev->dev.of_node, "boomberry,24db_digital_gain"); +- } +- +- ret = snd_soc_register_card(&snd_rpi_boomberry_dac); +- if (ret) +- dev_err(&pdev->dev, +- "snd_soc_register_card() failed: %d\n", ret); +- +- return ret; +-} +- +-static int snd_rpi_boomberry_dac_remove(struct platform_device *pdev) +-{ +- return snd_soc_unregister_card(&snd_rpi_boomberry_dac); +-} +- +-static const struct of_device_id snd_rpi_boomberry_dac_of_match[] = { +- { .compatible = "boomberry,boomberry-dac", }, +- {}, +-}; +-MODULE_DEVICE_TABLE(of, snd_rpi_boomberry_dac_of_match); +- +-static struct platform_driver snd_rpi_boomberry_dac_driver = { +- .driver = { +- .name = "snd-rpi-boomberry-dac", +- .owner = THIS_MODULE, +- .of_match_table = snd_rpi_boomberry_dac_of_match, +- }, +- .probe = snd_rpi_boomberry_dac_probe, +- .remove = snd_rpi_boomberry_dac_remove, +-}; +- +-module_platform_driver(snd_rpi_boomberry_dac_driver); +- +-MODULE_AUTHOR("Milan Neskovic "); +-MODULE_DESCRIPTION("ASoC Driver for BoomBerry PI DAC HAT Sound Card"); +-MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/bcm/boomberry-digi.c b/sound/soc/bcm/boomberry-digi.c +deleted file mode 100644 +index 3d5b5ff26f9b10648d308d489693407e6e7e7ac7..0000000000000000000000000000000000000000 +--- a/sound/soc/bcm/boomberry-digi.c ++++ /dev/null +@@ -1,215 +0,0 @@ +-/* +- * ASoC Driver for BoomBerry Raspberry Pi Digi HAT Sound Card +- * +- * Author: Milan Neskovic +- * Copyright 2016 +- * based on code by Daniel Matuschek +- * based on code by Florian Meier +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License +- * version 2 as published by the Free Software Foundation. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * General Public License for more details. +- */ +- +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +- +-#include "../codecs/wm8804.h" +- +-static int snd_rpi_boomberry_digi_init(struct snd_soc_pcm_runtime *rtd) +-{ +- struct snd_soc_codec *codec = rtd->codec; +- +- /* enable TX output */ +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); +- +- return 0; +-} +- +-static int snd_rpi_boomberry_digi_startup(struct snd_pcm_substream *substream) { +- /* turn on digital output */ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); +- return 0; +-} +- +-static void snd_rpi_boomberry_digi_shutdown(struct snd_pcm_substream *substream) { +- /* turn off output */ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); +-} +- +-static int snd_rpi_boomberry_digi_hw_params(struct snd_pcm_substream *substream, +- struct snd_pcm_hw_params *params) +-{ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_dai *codec_dai = rtd->codec_dai; +- struct snd_soc_codec *codec = rtd->codec; +- struct snd_soc_dai *cpu_dai = rtd->cpu_dai; +- +- int sysclk = 27000000; /* This is fixed on this board */ +- +- long mclk_freq=0; +- int mclk_div=1; +- int sampling_freq=1; +- +- int ret; +- +- int samplerate = params_rate(params); +- +- if (samplerate<=96000) { +- mclk_freq=samplerate*256; +- mclk_div=WM8804_MCLKDIV_256FS; +- } else { +- mclk_freq=samplerate*128; +- mclk_div=WM8804_MCLKDIV_128FS; +- } +- +- switch (samplerate) { +- case 32000: +- sampling_freq=0x03; +- break; +- case 44100: +- sampling_freq=0x00; +- break; +- case 48000: +- sampling_freq=0x02; +- break; +- case 88200: +- sampling_freq=0x08; +- break; +- case 96000: +- sampling_freq=0x0a; +- break; +- case 176400: +- sampling_freq=0x0c; +- break; +- case 192000: +- sampling_freq=0x0e; +- break; +- default: +- dev_err(codec->dev, +- "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", +- samplerate); +- } +- +- snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); +- snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); +- +- ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, +- sysclk, SND_SOC_CLOCK_OUT); +- if (ret < 0) { +- dev_err(codec->dev, +- "Failed to set WM8804 SYSCLK: %d\n", ret); +- return ret; +- } +- +- /* Enable TX output */ +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); +- +- /* Power on */ +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); +- +- /* set sampling frequency status bits */ +- snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); +- +- return snd_soc_dai_set_bclk_ratio(cpu_dai,64); +-} +- +-/* machine stream operations */ +-static struct snd_soc_ops snd_rpi_boomberry_digi_ops = { +- .hw_params = snd_rpi_boomberry_digi_hw_params, +- .startup = snd_rpi_boomberry_digi_startup, +- .shutdown = snd_rpi_boomberry_digi_shutdown, +-}; +- +-static struct snd_soc_dai_link snd_rpi_boomberry_digi_dai[] = { +-{ +- .name = "BoomBerry Digi", +- .stream_name = "BoomBerry Digi HiFi", +- .cpu_dai_name = "bcm2708-i2s.0", +- .codec_dai_name = "wm8804-spdif", +- .platform_name = "bcm2708-i2s.0", +- .codec_name = "wm8804.1-003b", +- .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | +- SND_SOC_DAIFMT_CBM_CFM, +- .ops = &snd_rpi_boomberry_digi_ops, +- .init = snd_rpi_boomberry_digi_init, +-}, +-}; +- +-/* audio machine driver */ +-static struct snd_soc_card snd_rpi_boomberry_digi = { +- .name = "snd_rpi_boomberry_digi", +- .owner = THIS_MODULE, +- .dai_link = snd_rpi_boomberry_digi_dai, +- .num_links = ARRAY_SIZE(snd_rpi_boomberry_digi_dai), +-}; +- +-static int snd_rpi_boomberry_digi_probe(struct platform_device *pdev) +-{ +- int ret = 0; +- +- snd_rpi_boomberry_digi.dev = &pdev->dev; +- +- if (pdev->dev.of_node) { +- struct device_node *i2s_node; +- struct snd_soc_dai_link *dai = &snd_rpi_boomberry_digi_dai[0]; +- i2s_node = of_parse_phandle(pdev->dev.of_node, +- "i2s-controller", 0); +- +- if (i2s_node) { +- dai->cpu_dai_name = NULL; +- dai->cpu_of_node = i2s_node; +- dai->platform_name = NULL; +- dai->platform_of_node = i2s_node; +- } +- } +- +- ret = snd_soc_register_card(&snd_rpi_boomberry_digi); +- if (ret) +- dev_err(&pdev->dev, +- "snd_soc_register_card() failed: %d\n", ret); +- +- return ret; +-} +- +-static int snd_rpi_boomberry_digi_remove(struct platform_device *pdev) +-{ +- return snd_soc_unregister_card(&snd_rpi_boomberry_digi); +-} +- +-static const struct of_device_id snd_rpi_boomberry_digi_of_match[] = { +- { .compatible = "boomberry,boomberry-digi", }, +- {}, +-}; +-MODULE_DEVICE_TABLE(of, snd_rpi_boomberry_digi_of_match); +- +-static struct platform_driver snd_rpi_boomberry_digi_driver = { +- .driver = { +- .name = "snd-rpi-boomberry-digi", +- .owner = THIS_MODULE, +- .of_match_table = snd_rpi_boomberry_digi_of_match, +- }, +- .probe = snd_rpi_boomberry_digi_probe, +- .remove = snd_rpi_boomberry_digi_remove, +-}; +- +-module_platform_driver(snd_rpi_boomberry_digi_driver); +- +-MODULE_AUTHOR("Milan Neskovic "); +-MODULE_DESCRIPTION("ASoC Driver for BoomBerry PI Digi HAT Sound Card"); +-MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/bcm/justboom-dac.c b/sound/soc/bcm/justboom-dac.c +new file mode 100644 +index 0000000000000000000000000000000000000000..8fd50dbe681508a2cfe8fdde1c9fedbe9a507fa7 +--- /dev/null ++++ b/sound/soc/bcm/justboom-dac.c +@@ -0,0 +1,162 @@ ++/* ++ * ASoC Driver for JustBoom DAC Raspberry Pi HAT Sound Card ++ * ++ * Author: Milan Neskovic ++ * Copyright 2016 ++ * based on code by Daniel Matuschek ++ * based on code by Florian Meier ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/pcm512x.h" ++ ++static bool digital_gain_0db_limit = true; ++ ++static int snd_rpi_justboom_dac_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08); ++ snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02); ++ snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); ++ ++ if (digital_gain_0db_limit) ++ { ++ int ret; ++ struct snd_soc_card *card = rtd->card; ++ ++ ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207); ++ if (ret < 0) ++ dev_warn(card->dev, "Failed to set volume limit: %d\n", ret); ++ } ++ ++ return 0; ++} ++ ++static int snd_rpi_justboom_dac_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ /*return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);*/ ++ unsigned int sample_bits = ++ snd_pcm_format_physical_width(params_format(params)); ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2); ++} ++ ++static int snd_rpi_justboom_dac_startup(struct snd_pcm_substream *substream) { ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); ++ return 0; ++} ++ ++static void snd_rpi_justboom_dac_shutdown(struct snd_pcm_substream *substream) { ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00); ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_rpi_justboom_dac_ops = { ++ .hw_params = snd_rpi_justboom_dac_hw_params, ++ .startup = snd_rpi_justboom_dac_startup, ++ .shutdown = snd_rpi_justboom_dac_shutdown, ++}; ++ ++static struct snd_soc_dai_link snd_rpi_justboom_dac_dai[] = { ++{ ++ .name = "JustBoom DAC", ++ .stream_name = "JustBoom DAC HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "pcm512x-hifi", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "pcm512x.1-004d", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBS_CFS, ++ .ops = &snd_rpi_justboom_dac_ops, ++ .init = snd_rpi_justboom_dac_init, ++}, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_rpi_justboom_dac = { ++ .name = "snd_rpi_justboom_dac", ++ .owner = THIS_MODULE, ++ .dai_link = snd_rpi_justboom_dac_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_justboom_dac_dai), ++}; ++ ++static int snd_rpi_justboom_dac_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_rpi_justboom_dac.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_justboom_dac_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ ++ digital_gain_0db_limit = !of_property_read_bool( ++ pdev->dev.of_node, "justboom,24db_digital_gain"); ++ } ++ ++ ret = snd_soc_register_card(&snd_rpi_justboom_dac); ++ if (ret) ++ dev_err(&pdev->dev, ++ "snd_soc_register_card() failed: %d\n", ret); ++ ++ return ret; ++} ++ ++static int snd_rpi_justboom_dac_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_rpi_justboom_dac); ++} ++ ++static const struct of_device_id snd_rpi_justboom_dac_of_match[] = { ++ { .compatible = "justboom,justboom-dac", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_rpi_justboom_dac_of_match); ++ ++static struct platform_driver snd_rpi_justboom_dac_driver = { ++ .driver = { ++ .name = "snd-rpi-justboom-dac", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_rpi_justboom_dac_of_match, ++ }, ++ .probe = snd_rpi_justboom_dac_probe, ++ .remove = snd_rpi_justboom_dac_remove, ++}; ++ ++module_platform_driver(snd_rpi_justboom_dac_driver); ++ ++MODULE_AUTHOR("Milan Neskovic "); ++MODULE_DESCRIPTION("ASoC Driver for JustBoom PI DAC HAT Sound Card"); ++MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/bcm/justboom-digi.c b/sound/soc/bcm/justboom-digi.c +new file mode 100644 +index 0000000000000000000000000000000000000000..91acb666380faa3c0deb2230f8a0f8bbec59417b +--- /dev/null ++++ b/sound/soc/bcm/justboom-digi.c +@@ -0,0 +1,215 @@ ++/* ++ * ASoC Driver for JustBoom Raspberry Pi Digi HAT Sound Card ++ * ++ * Author: Milan Neskovic ++ * Copyright 2016 ++ * based on code by Daniel Matuschek ++ * based on code by Florian Meier ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/wm8804.h" ++ ++static int snd_rpi_justboom_digi_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ ++ /* enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ return 0; ++} ++ ++static int snd_rpi_justboom_digi_startup(struct snd_pcm_substream *substream) { ++ /* turn on digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); ++ return 0; ++} ++ ++static void snd_rpi_justboom_digi_shutdown(struct snd_pcm_substream *substream) { ++ /* turn off output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); ++} ++ ++static int snd_rpi_justboom_digi_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ int sysclk = 27000000; /* This is fixed on this board */ ++ ++ long mclk_freq=0; ++ int mclk_div=1; ++ int sampling_freq=1; ++ ++ int ret; ++ ++ int samplerate = params_rate(params); ++ ++ if (samplerate<=96000) { ++ mclk_freq=samplerate*256; ++ mclk_div=WM8804_MCLKDIV_256FS; ++ } else { ++ mclk_freq=samplerate*128; ++ mclk_div=WM8804_MCLKDIV_128FS; ++ } ++ ++ switch (samplerate) { ++ case 32000: ++ sampling_freq=0x03; ++ break; ++ case 44100: ++ sampling_freq=0x00; ++ break; ++ case 48000: ++ sampling_freq=0x02; ++ break; ++ case 88200: ++ sampling_freq=0x08; ++ break; ++ case 96000: ++ sampling_freq=0x0a; ++ break; ++ case 176400: ++ sampling_freq=0x0c; ++ break; ++ case 192000: ++ sampling_freq=0x0e; ++ break; ++ default: ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", ++ samplerate); ++ } ++ ++ snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); ++ snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, ++ sysclk, SND_SOC_CLOCK_OUT); ++ if (ret < 0) { ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK: %d\n", ret); ++ return ret; ++ } ++ ++ /* Enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ /* Power on */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); ++ ++ /* set sampling frequency status bits */ ++ snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai,64); ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_rpi_justboom_digi_ops = { ++ .hw_params = snd_rpi_justboom_digi_hw_params, ++ .startup = snd_rpi_justboom_digi_startup, ++ .shutdown = snd_rpi_justboom_digi_shutdown, ++}; ++ ++static struct snd_soc_dai_link snd_rpi_justboom_digi_dai[] = { ++{ ++ .name = "JustBoom Digi", ++ .stream_name = "JustBoom Digi HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8804-spdif", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "wm8804.1-003b", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ .ops = &snd_rpi_justboom_digi_ops, ++ .init = snd_rpi_justboom_digi_init, ++}, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_rpi_justboom_digi = { ++ .name = "snd_rpi_justboom_digi", ++ .owner = THIS_MODULE, ++ .dai_link = snd_rpi_justboom_digi_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_justboom_digi_dai), ++}; ++ ++static int snd_rpi_justboom_digi_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_rpi_justboom_digi.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_justboom_digi_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ ++ ret = snd_soc_register_card(&snd_rpi_justboom_digi); ++ if (ret) ++ dev_err(&pdev->dev, ++ "snd_soc_register_card() failed: %d\n", ret); ++ ++ return ret; ++} ++ ++static int snd_rpi_justboom_digi_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_rpi_justboom_digi); ++} ++ ++static const struct of_device_id snd_rpi_justboom_digi_of_match[] = { ++ { .compatible = "justboom,justboom-digi", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_rpi_justboom_digi_of_match); ++ ++static struct platform_driver snd_rpi_justboom_digi_driver = { ++ .driver = { ++ .name = "snd-rpi-justboom-digi", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_rpi_justboom_digi_of_match, ++ }, ++ .probe = snd_rpi_justboom_digi_probe, ++ .remove = snd_rpi_justboom_digi_remove, ++}; ++ ++module_platform_driver(snd_rpi_justboom_digi_driver); ++ ++MODULE_AUTHOR("Milan Neskovic "); ++MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); ++MODULE_LICENSE("GPL v2"); + +From 67ebb0e0b421bc6ab803ca163502db158f2cf459 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <6by9@users.noreply.github.com> +Date: Wed, 25 May 2016 23:25:36 +0100 +Subject: [PATCH 361/398] BCM2835-V4L2: Correct handling for BGR24 vs RGB24. + +There was a bug in the GPU firmware that had reversed these +two formats. +Detect the old firmware, and reverse the formats if necessary. + +Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 69 ++++++++++++++++++------- + drivers/media/platform/bcm2835/bcm2835-camera.h | 1 + + 2 files changed, 52 insertions(+), 18 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 1da6fcfb6b314fce8947df77bd4bb239bfc84c6d..a2cfff91331f27e5132017ecd487d3da921bc87e 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -115,7 +115,7 @@ static struct mmal_fmt formats[] = { + .name = "RGB24 (LE)", + .fourcc = V4L2_PIX_FMT_RGB24, + .flags = 0, +- .mmal = MMAL_ENCODING_BGR24, ++ .mmal = MMAL_ENCODING_RGB24, + .depth = 24, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 3, +@@ -187,7 +187,7 @@ static struct mmal_fmt formats[] = { + .name = "RGB24 (BE)", + .fourcc = V4L2_PIX_FMT_BGR24, + .flags = 0, +- .mmal = MMAL_ENCODING_RGB24, ++ .mmal = MMAL_ENCODING_BGR24, + .depth = 24, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 3, +@@ -1059,6 +1059,13 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, + else + camera_port->format.encoding = mfmt->mmal; + ++ if (dev->rgb_bgr_swapped) { ++ if (camera_port->format.encoding == MMAL_ENCODING_RGB24) ++ camera_port->format.encoding = MMAL_ENCODING_BGR24; ++ else if (camera_port->format.encoding == MMAL_ENCODING_BGR24) ++ camera_port->format.encoding = MMAL_ENCODING_RGB24; ++ } ++ + camera_port->format.encoding_variant = 0; + camera_port->es.video.width = f->fmt.pix.width; + camera_port->es.video.height = f->fmt.pix.height; +@@ -1569,12 +1576,17 @@ static int set_camera_parameters(struct vchiq_mmal_instance *instance, + return ret; + } + ++#define MAX_SUPPORTED_ENCODINGS 20 ++ + /* MMAL instance and component init */ + static int __init mmal_init(struct bm2835_mmal_dev *dev) + { + int ret; + struct mmal_es_format *format; + u32 bool_true = 1; ++ u32 supported_encodings[MAX_SUPPORTED_ENCODINGS]; ++ int param_size; ++ struct vchiq_mmal_component *camera; + + ret = vchiq_mmal_init(&dev->instance); + if (ret < 0) +@@ -1586,21 +1598,48 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + if (ret < 0) + goto unreg_mmal; + +- if (dev->component[MMAL_COMPONENT_CAMERA]->outputs < +- MMAL_CAMERA_PORT_COUNT) { ++ camera = dev->component[MMAL_COMPONENT_CAMERA]; ++ if (camera->outputs < MMAL_CAMERA_PORT_COUNT) { + ret = -EINVAL; + goto unreg_camera; + } + + ret = set_camera_parameters(dev->instance, +- dev->component[MMAL_COMPONENT_CAMERA], ++ camera, + dev); + if (ret < 0) + goto unreg_camera; + +- format = +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_PREVIEW].format; ++ /* There was an error in the firmware that meant the camera component ++ * produced BGR instead of RGB. ++ * This is now fixed, but in order to support the old firmwares, we ++ * have to check. ++ */ ++ dev->rgb_bgr_swapped = true; ++ param_size = sizeof(supported_encodings); ++ ret = vchiq_mmal_port_parameter_get(dev->instance, ++ &camera->output[MMAL_CAMERA_PORT_CAPTURE], ++ MMAL_PARAMETER_SUPPORTED_ENCODINGS, ++ &supported_encodings, ++ ¶m_size); ++ if (ret == 0) { ++ int i; ++ ++ for (i = 0; i < param_size/sizeof(u32); i++) { ++ if (supported_encodings[i] == MMAL_ENCODING_BGR24) { ++ /* Found BGR24 first - old firmware. */ ++ break; ++ } ++ if (supported_encodings[i] == MMAL_ENCODING_RGB24) { ++ /* Found RGB24 first ++ * new firmware, so use RGB24. ++ */ ++ dev->rgb_bgr_swapped = false; ++ break; ++ } ++ } ++ } ++ format = &camera->output[MMAL_CAMERA_PORT_PREVIEW].format; + + format->encoding = MMAL_ENCODING_OPAQUE; + format->encoding_variant = MMAL_ENCODING_I420; +@@ -1614,9 +1653,7 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + format->es->video.frame_rate.num = 0; /* Rely on fps_range */ + format->es->video.frame_rate.den = 1; + +- format = +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_VIDEO].format; ++ format = &camera->output[MMAL_CAMERA_PORT_VIDEO].format; + + format->encoding = MMAL_ENCODING_OPAQUE; + format->encoding_variant = MMAL_ENCODING_I420; +@@ -1631,14 +1668,11 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + format->es->video.frame_rate.den = 1; + + vchiq_mmal_port_parameter_set(dev->instance, +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_VIDEO], ++ &camera->output[MMAL_CAMERA_PORT_VIDEO], + MMAL_PARAMETER_NO_IMAGE_PADDING, + &bool_true, sizeof(bool_true)); + +- format = +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_CAPTURE].format; ++ format = &camera->output[MMAL_CAMERA_PORT_CAPTURE].format; + + format->encoding = MMAL_ENCODING_OPAQUE; + +@@ -1660,8 +1694,7 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + dev->capture.enc_level = V4L2_MPEG_VIDEO_H264_LEVEL_4_0; + + vchiq_mmal_port_parameter_set(dev->instance, +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_CAPTURE], ++ &camera->output[MMAL_CAMERA_PORT_CAPTURE], + MMAL_PARAMETER_NO_IMAGE_PADDING, + &bool_true, sizeof(bool_true)); + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 13f426f5ecdffeab714d658a6f8b76e63af5fcdb..e6aeb7e7e381de65d6c6586205069a4c5cd33274 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.h ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.h +@@ -109,6 +109,7 @@ struct bm2835_mmal_dev { + unsigned int camera_num; + unsigned int max_width; + unsigned int max_height; ++ unsigned int rgb_bgr_swapped; + }; + + int bm2835_mmal_init_controls( + +From 046f7aef5b5c6c5251d5b7b1ed0c7e2670319da6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 3 Jun 2016 22:21:47 +0100 +Subject: [PATCH 362/398] BCM270X_DT: Add mcp23017 to the overlay Makefile + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 0adb5b92c047cb7e12871cf75515f822924924cd..c514bbfe7384f58d5db4e861d842bd772cc4e51a 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -44,6 +44,7 @@ dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += justboom-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += justboom-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp23017.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo + +From e65c8432e4bc232a93dfe1cca96f4ccd8bead88c Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 3 Jun 2016 23:01:01 +0100 +Subject: [PATCH 363/398] BCM270X_DT: Sort entries to placate check script + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index c514bbfe7384f58d5db4e861d842bd772cc4e51a..ed62846e18e4d3098169f05a1a8ba16caf1619aa 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -18,10 +18,10 @@ dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo + dtbo-$(RPI_DT_OVERLAYS) += enc28j60.dtbo + dtbo-$(RPI_DT_OVERLAYS) += gpio-ir.dtbo + dtbo-$(RPI_DT_OVERLAYS) += gpio-poweroff.dtbo +@@ -31,10 +31,10 @@ dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hifiberry-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-mux.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo +@@ -73,16 +73,16 @@ dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio-1bit.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdtweak.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi2-1cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi2-2cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi2-3cs.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo + dtbo-$(RPI_DT_OVERLAYS) += tinylcd35.dtbo + dtbo-$(RPI_DT_OVERLAYS) += uart1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += vc4-kms-v3d.dtbo + +From ba143cfa2b2cac3ea6b50d11b173ebdbaa4b5c76 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sat, 4 Jun 2016 11:30:48 +0200 +Subject: [PATCH 364/398] gpio-ir overlay: gpio_pin shouldn't change pull + setting + +Signed-off-by: Matthias Reichl +--- + arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts +index a2d6bc79f4cd2604e6c65c000668cbb228327fe6..af5baf7ddc92be7a59ad3d5f9a9fefba915bed05 100644 +--- a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts ++++ b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts +@@ -36,8 +36,7 @@ + __overrides__ { + // parameters + gpio_pin = <&gpio_ir>,"gpios:4", +- <&gpio_ir_pins>,"brcm,pins:0", +- <&gpio_ir_pins>,"brcm,pull:0"; // pin number ++ <&gpio_ir_pins>,"brcm,pins:0"; // pin number + gpio_pull = <&gpio_ir_pins>,"brcm,pull:0"; // pull-up/down state + + rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map + +From 885ba53dfb47105c09a418101affcdadead7ba09 Mon Sep 17 00:00:00 2001 +From: Eric Nelson +Date: Sat, 3 Oct 2015 08:18:50 -0700 +Subject: [PATCH 365/398] [media] rc-core: define a default timeout for drivers + +A default timeout value of 125 ms should work for all decoders. + +Declare a constant to help standardize its' use. + +Signed-off-by: Eric Nelson +Signed-off-by: Mauro Carvalho Chehab +--- + include/media/rc-core.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/media/rc-core.h b/include/media/rc-core.h +index ec921f6538c777db5d81deb655ecfdf6facc4b83..f6494709e230d0a34a5486ccb89236494a53edb7 100644 +--- a/include/media/rc-core.h ++++ b/include/media/rc-core.h +@@ -239,6 +239,7 @@ static inline void init_ir_raw_event(struct ir_raw_event *ev) + memset(ev, 0, sizeof(*ev)); + } + ++#define IR_DEFAULT_TIMEOUT MS_TO_NS(125) + #define IR_MAX_DURATION 500000000 /* 500 ms */ + #define US_TO_NS(usec) ((usec) * 1000) + #define MS_TO_US(msec) ((msec) * 1000) + +From d067ecc0fa76cb30de0a33a0876be1e66991b9c7 Mon Sep 17 00:00:00 2001 +From: Eric Nelson +Date: Wed, 23 Sep 2015 11:07:08 -0300 +Subject: [PATCH 366/398] [media] rc: gpio-ir-recv: add timeout on idle + +Many decoders require a trailing space (period without IR illumination) +to be delivered before completing a decode. + +Since the gpio-ir-recv driver only delivers events on gpio transitions, +a single IR symbol (caused by a quick touch on an IR remote) will not +be properly decoded without the use of a timer to flush the tail end +state of the IR receiver. + +This patch initializes and uses a timer and the timeout field of rcdev +to complete the stream and allow decode. + +The timeout can be overridden through the use of the LIRC_SET_REC_TIMEOUT +ioctl. + +Signed-off-by: Eric Nelson +Acked-by: Sean Young +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/rc/gpio-ir-recv.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c +index 7dbc9ca6d8852ba49b7c2693ca882068f0fc2bf1..f62e3f1f9d9dcc1987721b220547dfa388a1a1bc 100644 +--- a/drivers/media/rc/gpio-ir-recv.c ++++ b/drivers/media/rc/gpio-ir-recv.c +@@ -30,6 +30,7 @@ struct gpio_rc_dev { + struct rc_dev *rcdev; + int gpio_nr; + bool active_low; ++ struct timer_list flush_timer; + }; + + #ifdef CONFIG_OF +@@ -93,12 +94,26 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id) + if (rc < 0) + goto err_get_value; + ++ mod_timer(&gpio_dev->flush_timer, ++ jiffies + nsecs_to_jiffies(gpio_dev->rcdev->timeout)); ++ + ir_raw_event_handle(gpio_dev->rcdev); + + err_get_value: + return IRQ_HANDLED; + } + ++static void flush_timer(unsigned long arg) ++{ ++ struct gpio_rc_dev *gpio_dev = (struct gpio_rc_dev *)arg; ++ DEFINE_IR_RAW_EVENT(ev); ++ ++ ev.timeout = true; ++ ev.duration = gpio_dev->rcdev->timeout; ++ ir_raw_event_store(gpio_dev->rcdev, &ev); ++ ir_raw_event_handle(gpio_dev->rcdev); ++} ++ + static int gpio_ir_recv_probe(struct platform_device *pdev) + { + struct gpio_rc_dev *gpio_dev; +@@ -144,6 +159,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) + rcdev->input_id.version = 0x0100; + rcdev->dev.parent = &pdev->dev; + rcdev->driver_name = GPIO_IR_DRIVER_NAME; ++ rcdev->min_timeout = 0; ++ rcdev->timeout = IR_DEFAULT_TIMEOUT; ++ rcdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT; + if (pdata->allowed_protos) + rcdev->allowed_protocols = pdata->allowed_protos; + else +@@ -154,6 +172,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) + gpio_dev->gpio_nr = pdata->gpio_nr; + gpio_dev->active_low = pdata->active_low; + ++ setup_timer(&gpio_dev->flush_timer, flush_timer, ++ (unsigned long)gpio_dev); ++ + rc = gpio_request(pdata->gpio_nr, "gpio-ir-recv"); + if (rc < 0) + goto err_gpio_request; +@@ -196,6 +217,7 @@ static int gpio_ir_recv_remove(struct platform_device *pdev) + struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev); + + free_irq(gpio_to_irq(gpio_dev->gpio_nr), gpio_dev); ++ del_timer_sync(&gpio_dev->flush_timer); + rc_unregister_device(gpio_dev->rcdev); + gpio_free(gpio_dev->gpio_nr); + kfree(gpio_dev); + +From d08e4db32da4ddd74080512ca5b3ee1da87935db Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Thu, 19 Nov 2015 11:41:36 -0200 +Subject: [PATCH 367/398] smsir.h: remove a now duplicated definition + (IR_DEFAULT_TIMEOUT) + +This macro is now part of the core. Remove from Siano driver. + +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/common/siano/smsir.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/media/common/siano/smsir.h b/drivers/media/common/siano/smsir.h +index fc8b7925c53252c28b3ba46e4fca8bf961873c43..d9abd96ef48bf5e0a3f9bb9ccdf7f407669ddfd1 100644 +--- a/drivers/media/common/siano/smsir.h ++++ b/drivers/media/common/siano/smsir.h +@@ -30,8 +30,6 @@ along with this program. If not, see . + #include + #include + +-#define IR_DEFAULT_TIMEOUT 100 +- + struct smscore_device_t; + + struct ir_t { + +From fb3d7d9d61fa6533a3eb2a83918390b399c37640 Mon Sep 17 00:00:00 2001 +From: Nicolas Boullis +Date: Sat, 4 Jun 2016 00:57:06 +0200 +Subject: [PATCH 368/398] Implement a "wakeup-source" option for the i2c-rtc + DeviceTree overlay. + +See: https://github.com/raspberrypi/linux/pull/1511 +--- + arch/arm/boot/dts/overlays/README | 3 +++ + arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 1516cc2e1616bb5e0cb519e05eee6776fe84e52a..628cff3fc60a13b26b3f2f572573884df480c7bf 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -445,6 +445,9 @@ Params: ds1307 Select the DS1307 device + + trickle-resistor-ohms Resistor value for trickle charge (DS1339-only) + ++ wakeup-source Specify that the RTC can be used as a wakeup ++ source ++ + + Name: i2c0-bcm2708 + Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations +diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +index 40656474dfc16505433221a745c1d129c2737399..8b6f978155c02409eeb7c83353b8194fa3462435 100644 +--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +@@ -65,5 +65,9 @@ + pcf8523 = <&pcf8523>,"status"; + pcf8563 = <&pcf8563>,"status"; + trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0"; ++ wakeup-source = <&ds1339>,"wakeup-source?", ++ <&ds3231>,"wakeup-source?", ++ <&mcp7940x>,"wakeup-source?", ++ <&mcp7941x>,"wakeup-source?"; + }; + }; + +From 7f29fb93dd2c418cab07717ee242e96941f60d17 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 3 Jun 2016 21:56:40 +0100 +Subject: [PATCH 369/398] BCM270X_DT: Fix rpi-dac overlay + +The rpi-dac overlay is almost identical to the hifiberry-dac overlay - +the codec used is different but it also doesn't sit on the I2C bus. As +a result, when the overlays were modified for dynamic loading and it +was discovered that the hifiberry-dac overlay didn't work any more, the +the rpi-dac overlay was also broken. + +The failure was caused by the fact that outside a bus, device names are +constructed from the concatenation of the path elements leading to it, +so moving the codec instantiation inside /soc caused the device name +to get a "soc" added, breaking ALSA's naming. + +See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +index 1523eae9c39997aa68cfa583ada92a92395bb1e0..a442c8f0ec01b7503f32e070683a984e895f5668 100644 +--- a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +@@ -13,7 +13,7 @@ + }; + + fragment@1 { +- target = <&soc>; ++ target-path = "/"; + __overlay__ { + pcm1794a-codec { + #sound-dai-cells = <0>; + +From 63102a32cd5e7453af86599d95297513470d6220 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 6 Jun 2016 09:23:37 +0100 +Subject: [PATCH 370/398] BCM270X_DT: Make i2c-gpio usable by other overlays + +Modify the i2c-gpio overlay to export symbol i2c-gpio for use by other +overlays. Export the alias as well for good measure. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts +index 2a2dc986770cfb036492ba8de19cbaff521c5fd5..b72b32e936774d901bc253b06e025c2dd48bdb1b 100644 +--- a/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts +@@ -19,6 +19,21 @@ + }; + }; + }; ++ ++ fragment@1 { ++ target-path = "/aliases"; ++ __overlay__ { ++ i2c_gpio = "/i2c@0"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "/__symbols__"; ++ __overlay__ { ++ i2c_gpio = "/i2c@0"; ++ }; ++ }; ++ + __overrides__ { + i2c_gpio_sda = <&i2c_gpio>,"gpios:4"; + i2c_gpio_scl = <&i2c_gpio>,"gpios:16"; + +From ecf7d9c349b80ef5a12b3511a8ee27048d1c6972 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:19:27 +0100 +Subject: [PATCH 371/398] brcmfmac: revise SDIO error message in + brcmf_sdio_drivestrengthinit + +The error message is given for something that is not an error here as +the drive strength configuration may not be applicable for specific +devices. Therefore the error message is rephrased and changed to a +debug message. + +[ Patch from Broadcom ] + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +index 818f7562f6b42d6eb7c1c454179a0722bc6ab5a0..fee5ff5168268553f25e49236ab2b2848e402c0a 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +@@ -3769,7 +3769,7 @@ brcmf_sdio_drivestrengthinit(struct brcmf_sdio_dev *sdiodev, + str_shift = 11; + break; + default: +- brcmf_err("No SDIO Drive strength init done for chip %s rev %d pmurev %d\n", ++ brcmf_dbg(INFO, "No SDIO driver strength init needed for chip %s rev %d pmurev %d\n", + ci->name, ci->chiprev, ci->pmurev); + break; + } + +From 27e19b05084085ba81db22ef5dc3a9b0731b116f Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:26:31 +0100 +Subject: [PATCH 372/398] brcmfmac: use ndev->needed_headroom to reserve + additional header space + +When using nmap tool with FMAC, the nmap packets were be dropped by kernel +because the size was too short. The kernel message showed like +"nmap: packet size is too short (42 <= 50)". It is caused by the packet +length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE() +and hard_header_len definition, we should use hard_header_len to reserve L2 +header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for +the additional headroom needed by hardware. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1357 + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/core.c b/drivers/net/wireless/brcm80211/brcmfmac/core.c +index b5ab98ee14455aea9774814128faa8b0177a0071..842d0786b076eccdb7cffc32921d32db71c8371b 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/core.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +@@ -696,7 +696,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked) + /* set appropriate operations */ + ndev->netdev_ops = &brcmf_netdev_ops_pri; + +- ndev->hard_header_len += drvr->hdrlen; ++ ndev->needed_headroom += drvr->hdrlen; + ndev->ethtool_ops = &brcmf_ethtool_ops; + + drvr->rxsz = ndev->mtu + ndev->hard_header_len + + +From 435aa4b8b9a3e4dc75b40d8352839e7ba2c55caf Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 6 Jun 2016 11:11:33 +0100 +Subject: [PATCH 373/398] brcmfmac: change rx_seq check log from error print to + debug print + +The bus rx sequence is not in order because that control and event +frames always cause immediate send, but data frames may be held +for glomming in firmware side. It is not actually an error as the +packets are still processed even if the RX sequence is not in order. +Therefore the error message is rephrased and changed to a debug +message. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1313 +--- + drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +index fee5ff5168268553f25e49236ab2b2848e402c0a..652fd12d734001e1e08d7b58834b5c87a92f30aa 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +@@ -1476,8 +1476,7 @@ static int brcmf_sdio_hdparse(struct brcmf_sdio *bus, u8 *header, + return -ENXIO; + } + if (rd->seq_num != rx_seq) { +- brcmf_err("seq %d: sequence number error, expect %d\n", +- rx_seq, rd->seq_num); ++ brcmf_dbg(SDIO, "seq %d, expected %d\n", rx_seq, rd->seq_num); + bus->sdcnt.rx_badseq++; + rd->seq_num = rx_seq; + } + +From d329ead5160a817c0138f6d4f9b1f27d622cccb7 Mon Sep 17 00:00:00 2001 +From: Erik Sejr +Date: Tue, 7 Jun 2016 20:58:17 -0400 +Subject: [PATCH 374/398] Add ads1015 overlay + +See: https://github.com/raspberrypi/linux/pull/1520 +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 22 ++++++ + arch/arm/boot/dts/overlays/ads1015-overlay.dts | 98 ++++++++++++++++++++++++++ + 3 files changed, 121 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/ads1015-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index ed62846e18e4d3098169f05a1a8ba16caf1619aa..e17bea26c888d805c3badd0ef48cc5021766b094 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + endif + + dtbo-$(RPI_DT_OVERLAYS) += adau1977-adc.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += ads1015.dtbo + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 628cff3fc60a13b26b3f2f572573884df480c7bf..887431824c79792fa7b42ded78e60a2427806865 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -168,6 +168,28 @@ Load: dtoverlay=adau1977-adc + Params: + + ++Name: ads1015 ++Info: Overlay for activation of Texas Instruments ADS1015 ADC over I2C ++Load: dtoverlay=ads1015,= ++Params: addr I2C bus address of device. Set based on how the ++ addr pin is wired. (default=0x48 assumes addr ++ is pulled to GND) ++ cha_enable Enable virtual channel a. (default=true) ++ cha_cfg Set the configuration for virtual channel a. ++ (default=4 configures this channel for the ++ voltage at A0 with respect to GND) ++ cha_datarate Set the datarate (samples/sec) for this channel. ++ (default=4 sets 1600 sps) ++ cha_gain Set the gain of the Programmable Gain ++ Amplifier for this channel. (default=2 sets the ++ full scale of the channel to 2.048 Volts) ++ ++ Channel (ch) parameters can be set for each enabled channel. ++ A maximum of 4 channels can be enabled (letters a thru d). ++ For more information refer to the device datasheet at: ++ http://www.ti.com/lit/ds/symlink/ads1015.pdf ++ ++ + Name: ads7846 + Info: ADS7846 Touch controller + Load: dtoverlay=ads7846,= +diff --git a/arch/arm/boot/dts/overlays/ads1015-overlay.dts b/arch/arm/boot/dts/overlays/ads1015-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..02b9de46299bae8f22e1a665a482c0cb99cd30c9 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/ads1015-overlay.dts +@@ -0,0 +1,98 @@ ++/* ++ * 2016 - Erik Sejr ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ /* ----------- ADS1015 ------------ */ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ads1015: ads1015 { ++ compatible = "ti,ads1015"; ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x48>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "i2c_arm/ads1015"; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_a: channel_a { ++ reg = <4>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "i2c_arm/ads1015"; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_b: channel_b { ++ reg = <5>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "i2c_arm/ads1015"; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_c: channel_c { ++ reg = <6>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target-path = "i2c_arm/ads1015"; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_d: channel_d { ++ reg = <7>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ addr = <&ads1015>,"reg:0"; ++ cha_enable = <0>,"=1"; ++ cha_cfg = <&channel_a>,"reg:0"; ++ cha_gain = <&channel_a>,"ti,gain:0"; ++ cha_datarate = <&channel_a>,"ti,datarate:0"; ++ chb_enable = <0>,"=2"; ++ chb_cfg = <&channel_b>,"reg:0"; ++ chb_gain = <&channel_b>,"ti,gain:0"; ++ chb_datarate = <&channel_b>,"ti,datarate:0"; ++ chc_enable = <0>,"=3"; ++ chc_cfg = <&channel_c>,"reg:0"; ++ chc_gain = <&channel_c>,"ti,gain:0"; ++ chc_datarate = <&channel_c>,"ti,datarate:0"; ++ chd_enable = <0>,"=4"; ++ chd_cfg = <&channel_d>,"reg:0"; ++ chd_gain = <&channel_d>,"ti,gain:0"; ++ chd_datarate = <&channel_d>,"ti,datarate:0"; ++ }; ++ ++}; + +From 6bbb839100a4930f4d8f134cee30ab0cb6344ed3 Mon Sep 17 00:00:00 2001 +From: Michael Kaplan +Date: Wed, 8 Jun 2016 15:14:11 +0200 +Subject: [PATCH 375/398] Fixed MCP23017 section in overlay README + +Old description could have led to the misunderstanding that it is an +i2c port expander, but in fact it is a gpio expander. +--- + arch/arm/boot/dts/overlays/README | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 887431824c79792fa7b42ded78e60a2427806865..dcb6849b0bc0ca2c8cec3a80ae1ae4bd2c15ac1f 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -595,7 +595,7 @@ Params: gpio_out_pin GPIO for output (default "17") + + + Name: mcp23017 +-Info: Configures the MCP23017 I2C port expander ++Info: Configures the MCP23017 I2C GPIO expander + Load: dtoverlay=mcp23017,= + Params: gpiopin Gpio pin connected to the INTA output of the + MCP23017 (default: 4) + +From 60ded884d95b9b523646ef4a0e3af9b36ffabdc3 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:13 +0000 +Subject: [PATCH 376/398] Revert "bcm2835-dma: Fix up convert to DMA pool" + +This reverts commit ec2e48fda22c57cab56a4332d1a095f91c919493. +--- + drivers/dma/bcm2835-dma.c | 36 ++++++++++-------------------------- + 1 file changed, 10 insertions(+), 26 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index d26b6bdbcf1ab33ab92937b889a37e505c925311..6b87ce2bb3c9d30e54e0da4f76586d3f077f6aa9 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -488,17 +488,6 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + c->cyclic = true; + + return vchan_tx_prep(&c->vc, &d->vd, flags); +-error_cb: +- i--; +- for (; i >= 0; i--) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; +- +- dma_pool_free(c->cb_pool, cb_entry->cb, cb_entry->paddr); +- } +- +- kfree(d->cb_list); +- kfree(d); +- return NULL; + } + + static struct dma_async_tx_descriptor * +@@ -545,7 +534,6 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + if (!d) + return NULL; + +- d->c = c; + d->dir = direction; + + if (c->ch >= 8) /* LITE channel */ +@@ -565,21 +553,15 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + d->frames += len / max_size + 1; + } + +- d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); +- if (!d->cb_list) { ++ /* Allocate memory for control blocks */ ++ d->control_block_size = d->frames * sizeof(struct bcm2835_dma_cb); ++ d->control_block_base = dma_zalloc_coherent(chan->device->dev, ++ d->control_block_size, &d->control_block_base_phys, ++ GFP_NOWAIT); ++ if (!d->control_block_base) { + kfree(d); + return NULL; + } +- /* Allocate memory for control blocks */ +- for (i = 0; i < d->frames; i++) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; +- +- cb_entry->cb = dma_pool_zalloc(c->cb_pool, GFP_ATOMIC, +- &cb_entry->paddr); +- +- if (!cb_entry->cb) +- goto error_cb; +- } + + /* + * Iterate over all SG entries, create a control block +@@ -596,7 +578,7 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + + for (j = 0; j < len; j += max_size) { + struct bcm2835_dma_cb *control_block = +- d->cb_list[i + split_cnt].cb; ++ &d->control_block_base[i + split_cnt]; + + /* Setup addresses */ + if (d->dir == DMA_DEV_TO_MEM) { +@@ -638,7 +620,9 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + if (i < sg_len - 1 || len - j > max_size) { + /* Next block is the next frame. */ + control_block->next = +- d->cb_list[i + split_cnt + 1].paddr; ++ d->control_block_base_phys + ++ sizeof(struct bcm2835_dma_cb) * ++ (i + split_cnt + 1); + } else { + /* Next block is empty. */ + control_block->next = 0; + +From 1e55d8affa4aa2946cfa325414a4c7673205de02 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:22 +0000 +Subject: [PATCH 377/398] Revert "bcm2835-dma: Limit cyclic transfers on lite + channels to 32k" + +This reverts commit 052c2005b6ecedc5abad86632f5781adda310aa7. +--- + drivers/dma/bcm2835-dma.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 6b87ce2bb3c9d30e54e0da4f76586d3f077f6aa9..5db0a95985b20a2086c65762ea8f125511f67471 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -144,12 +144,6 @@ struct bcm2835_desc { + */ + #define MAX_LITE_TRANSFER (SZ_64K - 4) + +-/* +- * Transfers larger than 32k cause issues with the bcm2708-i2s driver, +- * so limit transfer size to 32k as bcm2708-dmaengine did. +- */ +-#define MAX_CYCLIC_LITE_TRANSFER SZ_32K +- + static inline struct bcm2835_dmadev *to_bcm2835_dma_dev(struct dma_device *d) + { + return container_of(d, struct bcm2835_dmadev, ddev); +@@ -418,7 +412,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + d->c = c; + d->dir = direction; + if (c->ch >= 8) /* LITE channel */ +- max_size = MAX_CYCLIC_LITE_TRANSFER; ++ max_size = MAX_LITE_TRANSFER; + else + max_size = MAX_NORMAL_TRANSFER; + period_len = min(period_len, max_size); + +From 99ae20506cf88197199403319da3e87c814ca291 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:30 +0000 +Subject: [PATCH 378/398] Revert "dmaengine: bcm2835: Load driver early and + support legacy API" + +This reverts commit 6f56fff39c811953809b011f59c49a2122c4d173. +--- + drivers/dma/Kconfig | 2 +- + drivers/dma/bcm2835-dma.c | 30 ++++++------------------------ + 2 files changed, 7 insertions(+), 25 deletions(-) + +diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig +index 33e36b90cfeddc4e58e233c6e655a20102a7da45..b7a17b1c40e23c07d2bc0c7148eacbfafb00428e 100644 +--- a/drivers/dma/Kconfig ++++ b/drivers/dma/Kconfig +@@ -108,7 +108,7 @@ config COH901318 + + config DMA_BCM2835 + tristate "BCM2835 DMA engine support" +- depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709 ++ depends on ARCH_BCM2835 + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 5db0a95985b20a2086c65762ea8f125511f67471..696fb30b4f5a01cda9b98038b8e548368cea05f4 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -36,7 +36,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -787,10 +786,6 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + if (IS_ERR(base)) + return PTR_ERR(base); + +- rc = bcm_dmaman_probe(pdev, base, BCM2835_DMA_BULK_MASK); +- if (rc) +- dev_err(&pdev->dev, "Failed to initialize the legacy API\n"); +- + od->base = base; + + dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); +@@ -823,8 +818,11 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + goto err_no_dma; + } + +- /* Channel 0 is used by the legacy API */ +- chans_available &= ~BCM2835_DMA_BULK_MASK; ++ /* ++ * Do not use the FIQ and BULK channels, ++ * because they are used by the GPU. ++ */ ++ chans_available &= ~(BCM2835_DMA_FIQ_MASK | BCM2835_DMA_BULK_MASK); + + for (i = 0; i < pdev->num_resources; i++) { + irq = platform_get_irq(pdev, i); +@@ -868,7 +866,6 @@ static int bcm2835_dma_remove(struct platform_device *pdev) + { + struct bcm2835_dmadev *od = platform_get_drvdata(pdev); + +- bcm_dmaman_remove(pdev); + dma_async_device_unregister(&od->ddev); + bcm2835_dma_free(od); + +@@ -884,22 +881,7 @@ static struct platform_driver bcm2835_dma_driver = { + }, + }; + +-static int bcm2835_dma_init(void) +-{ +- return platform_driver_register(&bcm2835_dma_driver); +-} +- +-static void bcm2835_dma_exit(void) +-{ +- platform_driver_unregister(&bcm2835_dma_driver); +-} +- +-/* +- * Load after serial driver (arch_initcall) so we see the messages if it fails, +- * but before drivers (module_init) that need a DMA channel. +- */ +-subsys_initcall(bcm2835_dma_init); +-module_exit(bcm2835_dma_exit); ++module_platform_driver(bcm2835_dma_driver); + + MODULE_ALIAS("platform:bcm2835-dma"); + MODULE_DESCRIPTION("BCM2835 DMA engine driver"); + +From 333b3db9f8aab921341bf6b5e21a1bc6b42f1ea9 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:37 +0000 +Subject: [PATCH 379/398] Revert "dmaengine: bcm2835: Add slave dma support" + +This reverts commit 8a349301238aabb40c9da5ca8c8492b6b8d146f6. +--- + drivers/dma/bcm2835-dma.c | 206 ++++------------------------------------------ + 1 file changed, 14 insertions(+), 192 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 696fb30b4f5a01cda9b98038b8e548368cea05f4..2d72fe81243fbbcc92f52e1935ed48b6cbc23665 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -1,10 +1,11 @@ + /* + * BCM2835 DMA engine support + * ++ * This driver only supports cyclic DMA transfers ++ * as needed for the I2S module. ++ * + * Author: Florian Meier + * Copyright 2013 +- * Gellert Weisz +- * Copyright 2013-2014 + * + * Based on + * OMAP DMAengine support by Russell King +@@ -94,8 +95,6 @@ struct bcm2835_desc { + size_t size; + }; + +-#define BCM2835_DMA_WAIT_CYCLES 0 /* Slow down DMA transfers: 0-31 */ +- + #define BCM2835_DMA_CS 0x00 + #define BCM2835_DMA_ADDR 0x04 + #define BCM2835_DMA_SOURCE_AD 0x0c +@@ -112,16 +111,12 @@ struct bcm2835_desc { + #define BCM2835_DMA_RESET BIT(31) /* WO, self clearing */ + + #define BCM2835_DMA_INT_EN BIT(0) +-#define BCM2835_DMA_WAIT_RESP BIT(3) + #define BCM2835_DMA_D_INC BIT(4) +-#define BCM2835_DMA_D_WIDTH BIT(5) + #define BCM2835_DMA_D_DREQ BIT(6) + #define BCM2835_DMA_S_INC BIT(8) +-#define BCM2835_DMA_S_WIDTH BIT(9) + #define BCM2835_DMA_S_DREQ BIT(10) + + #define BCM2835_DMA_PER_MAP(x) ((x) << 16) +-#define BCM2835_DMA_WAITS(x) (((x) & 0x1f) << 21) + + #define BCM2835_DMA_DATA_TYPE_S8 1 + #define BCM2835_DMA_DATA_TYPE_S16 2 +@@ -135,14 +130,6 @@ struct bcm2835_desc { + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) + +-#define MAX_NORMAL_TRANSFER SZ_1G +-/* +- * Max length on a Lite channel is 65535 bytes. +- * DMA handles byte-enables on SDRAM reads and writes even on 128-bit accesses, +- * but byte-enables don't exist on peripheral addresses, so align to 32-bit. +- */ +-#define MAX_LITE_TRANSFER (SZ_64K - 4) +- + static inline struct bcm2835_dmadev *to_bcm2835_dma_dev(struct dma_device *d) + { + return container_of(d, struct bcm2835_dmadev, ddev); +@@ -239,19 +226,13 @@ static irqreturn_t bcm2835_dma_callback(int irq, void *data) + d = c->desc; + + if (d) { +- if (c->cyclic) { +- vchan_cyclic_callback(&d->vd); +- +- /* Keep the DMA engine running */ +- writel(BCM2835_DMA_ACTIVE, +- c->chan_base + BCM2835_DMA_CS); +- +- } else { +- vchan_cookie_complete(&c->desc->vd); +- bcm2835_dma_start_desc(c); +- } ++ /* TODO Only works for cyclic DMA */ ++ vchan_cyclic_callback(&d->vd); + } + ++ /* Keep the DMA engine running */ ++ writel(BCM2835_DMA_ACTIVE, c->chan_base + BCM2835_DMA_CS); ++ + spin_unlock_irqrestore(&c->vc.lock, flags); + + return IRQ_HANDLED; +@@ -358,6 +339,8 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); + unsigned long flags; + ++ c->cyclic = true; /* Nothing else is implemented */ ++ + spin_lock_irqsave(&c->vc.lock, flags); + if (vchan_issue_pending(&c->vc) && !c->desc) + bcm2835_dma_start_desc(c); +@@ -375,7 +358,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + struct bcm2835_desc *d; + dma_addr_t dev_addr; + unsigned int es, sync_type; +- unsigned int frame, max_size; ++ unsigned int frame; + int i; + + /* Grab configuration */ +@@ -410,12 +393,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + + d->c = c; + d->dir = direction; +- if (c->ch >= 8) /* LITE channel */ +- max_size = MAX_LITE_TRANSFER; +- else +- max_size = MAX_NORMAL_TRANSFER; +- period_len = min(period_len, max_size); +- d->frames = (buf_len - 1) / (period_len + 1); ++ d->frames = buf_len / period_len; + + d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); + if (!d->cb_list) { +@@ -463,171 +441,17 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + BCM2835_DMA_PER_MAP(c->dreq); + + /* Length of a frame */ +- if (frame != d->frames - 1) +- control_block->length = period_len; +- else +- control_block->length = buf_len - (d->frames - 1) * +- period_len; ++ control_block->length = period_len; + d->size += control_block->length; + + /* + * Next block is the next frame. +- * This function is called on cyclic DMA transfers. ++ * This DMA engine driver currently only supports cyclic DMA. + * Therefore, wrap around at number of frames. + */ + control_block->next = d->cb_list[((frame + 1) % d->frames)].paddr; + } + +- c->cyclic = true; +- +- return vchan_tx_prep(&c->vc, &d->vd, flags); +-} +- +-static struct dma_async_tx_descriptor * +-bcm2835_dma_prep_slave_sg(struct dma_chan *chan, +- struct scatterlist *sgl, +- unsigned int sg_len, +- enum dma_transfer_direction direction, +- unsigned long flags, void *context) +-{ +- struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); +- enum dma_slave_buswidth dev_width; +- struct bcm2835_desc *d; +- dma_addr_t dev_addr; +- struct scatterlist *sgent; +- unsigned int i, sync_type, split_cnt, max_size; +- +- if (!is_slave_direction(direction)) { +- dev_err(chan->device->dev, "direction not supported\n"); +- return NULL; +- } +- +- if (direction == DMA_DEV_TO_MEM) { +- dev_addr = c->cfg.src_addr; +- dev_width = c->cfg.src_addr_width; +- sync_type = BCM2835_DMA_S_DREQ; +- } else { +- dev_addr = c->cfg.dst_addr; +- dev_width = c->cfg.dst_addr_width; +- sync_type = BCM2835_DMA_D_DREQ; +- } +- +- /* Bus width translates to the element size (ES) */ +- switch (dev_width) { +- case DMA_SLAVE_BUSWIDTH_4_BYTES: +- break; +- default: +- dev_err(chan->device->dev, "buswidth not supported: %i\n", +- dev_width); +- return NULL; +- } +- +- /* Allocate and setup the descriptor. */ +- d = kzalloc(sizeof(*d), GFP_NOWAIT); +- if (!d) +- return NULL; +- +- d->dir = direction; +- +- if (c->ch >= 8) /* LITE channel */ +- max_size = MAX_LITE_TRANSFER; +- else +- max_size = MAX_NORMAL_TRANSFER; +- +- /* +- * Store the length of the SG list in d->frames +- * taking care to account for splitting up transfers +- * too large for a LITE channel +- */ +- d->frames = 0; +- for_each_sg(sgl, sgent, sg_len, i) { +- unsigned int len = sg_dma_len(sgent); +- +- d->frames += len / max_size + 1; +- } +- +- /* Allocate memory for control blocks */ +- d->control_block_size = d->frames * sizeof(struct bcm2835_dma_cb); +- d->control_block_base = dma_zalloc_coherent(chan->device->dev, +- d->control_block_size, &d->control_block_base_phys, +- GFP_NOWAIT); +- if (!d->control_block_base) { +- kfree(d); +- return NULL; +- } +- +- /* +- * Iterate over all SG entries, create a control block +- * for each frame and link them together. +- * Count the number of times an SG entry had to be split +- * as a result of using a LITE channel +- */ +- split_cnt = 0; +- +- for_each_sg(sgl, sgent, sg_len, i) { +- unsigned int j; +- dma_addr_t addr = sg_dma_address(sgent); +- unsigned int len = sg_dma_len(sgent); +- +- for (j = 0; j < len; j += max_size) { +- struct bcm2835_dma_cb *control_block = +- &d->control_block_base[i + split_cnt]; +- +- /* Setup addresses */ +- if (d->dir == DMA_DEV_TO_MEM) { +- control_block->info = BCM2835_DMA_D_INC | +- BCM2835_DMA_D_WIDTH | +- BCM2835_DMA_S_DREQ; +- control_block->src = dev_addr; +- control_block->dst = addr + (dma_addr_t)j; +- } else { +- control_block->info = BCM2835_DMA_S_INC | +- BCM2835_DMA_S_WIDTH | +- BCM2835_DMA_D_DREQ; +- control_block->src = addr + (dma_addr_t)j; +- control_block->dst = dev_addr; +- } +- +- /* Common part */ +- control_block->info |= +- BCM2835_DMA_WAITS(BCM2835_DMA_WAIT_CYCLES); +- control_block->info |= BCM2835_DMA_WAIT_RESP; +- +- /* Enable */ +- if (i == sg_len - 1 && len - j <= max_size) +- control_block->info |= BCM2835_DMA_INT_EN; +- +- /* Setup synchronization */ +- if (sync_type) +- control_block->info |= sync_type; +- +- /* Setup DREQ channel */ +- if (c->dreq) +- control_block->info |= +- BCM2835_DMA_PER_MAP(c->dreq); +- +- /* Length of a frame */ +- control_block->length = min(len - j, max_size); +- d->size += control_block->length; +- +- if (i < sg_len - 1 || len - j > max_size) { +- /* Next block is the next frame. */ +- control_block->next = +- d->control_block_base_phys + +- sizeof(struct bcm2835_dma_cb) * +- (i + split_cnt + 1); +- } else { +- /* Next block is empty. */ +- control_block->next = 0; +- } +- +- if (len - j > max_size) +- split_cnt++; +- } +- } +- +- c->cyclic = false; +- + return vchan_tx_prep(&c->vc, &d->vd, flags); + error_cb: + i--; +@@ -796,7 +620,6 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + od->ddev.device_tx_status = bcm2835_dma_tx_status; + od->ddev.device_issue_pending = bcm2835_dma_issue_pending; + od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; +- od->ddev.device_prep_slave_sg = bcm2835_dma_prep_slave_sg; + od->ddev.device_config = bcm2835_dma_slave_config; + od->ddev.device_terminate_all = bcm2835_dma_terminate_all; + od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); +@@ -886,5 +709,4 @@ module_platform_driver(bcm2835_dma_driver); + MODULE_ALIAS("platform:bcm2835-dma"); + MODULE_DESCRIPTION("BCM2835 DMA engine driver"); + MODULE_AUTHOR("Florian Meier "); +-MODULE_AUTHOR("Gellert Weisz "); + MODULE_LICENSE("GPL v2"); + +From e859859b01bd4279679400eb8d1590d6d544976d Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:56 -0700 +Subject: [PATCH 380/398] dmaengine: bcm2835: remove unnecessary masking of dma + channels + +The original patch contained 3 dma channels that were masked out. + +These - as far as research and discussions show - are a +artefacts remaining from the downstream legacy dma-api. + +Right now down-stream still includes a legacy api used only +in a single (downstream only) driver (bcm2708_fb) that requires +2D DMA for speedup (DMA-channel 0). +Formerly the sd-card support driver also was using this legacy +api (DMA-channel 2), but since has been moved over to use +dmaengine directly. + +The DMA-channel 3 is already masked out in the devicetree in +the default property "brcm,dma-channel-mask = <0x7f35>;" + +So we can remove the whole masking of DMA channels. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 2d72fe81243fbbcc92f52e1935ed48b6cbc23665..e4ca980049bab83ddbb58435c662e4a30321d4f8 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -123,9 +123,6 @@ struct bcm2835_desc { + #define BCM2835_DMA_DATA_TYPE_S32 4 + #define BCM2835_DMA_DATA_TYPE_S128 16 + +-#define BCM2835_DMA_BULK_MASK BIT(0) +-#define BCM2835_DMA_FIQ_MASK (BIT(2) | BIT(3)) +- + /* Valid only for channels 0 - 14, 15 has its own base address */ + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) +@@ -641,12 +638,6 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + goto err_no_dma; + } + +- /* +- * Do not use the FIQ and BULK channels, +- * because they are used by the GPU. +- */ +- chans_available &= ~(BCM2835_DMA_FIQ_MASK | BCM2835_DMA_BULK_MASK); +- + for (i = 0; i < pdev->num_resources; i++) { + irq = platform_get_irq(pdev, i); + if (irq < 0) + +From 37242a99d4883a11be75bc17f05857863a036966 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:57 -0700 +Subject: [PATCH 381/398] dmaengine: bcm2835: add additional defines for + DMA-registers + +Add additional defines describing the DMA registers +as well as adding some more documentation to those registers. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 57 ++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 49 insertions(+), 8 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index e4ca980049bab83ddbb58435c662e4a30321d4f8..a1d851aa5b182f9b0f4d6c2ab719b1ade2167c11 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -97,26 +97,67 @@ struct bcm2835_desc { + + #define BCM2835_DMA_CS 0x00 + #define BCM2835_DMA_ADDR 0x04 ++#define BCM2835_DMA_TI 0x08 + #define BCM2835_DMA_SOURCE_AD 0x0c + #define BCM2835_DMA_DEST_AD 0x10 +-#define BCM2835_DMA_NEXTCB 0x1C ++#define BCM2835_DMA_LEN 0x14 ++#define BCM2835_DMA_STRIDE 0x18 ++#define BCM2835_DMA_NEXTCB 0x1c ++#define BCM2835_DMA_DEBUG 0x20 + + /* DMA CS Control and Status bits */ +-#define BCM2835_DMA_ACTIVE BIT(0) +-#define BCM2835_DMA_INT BIT(2) ++#define BCM2835_DMA_ACTIVE BIT(0) /* activate the DMA */ ++#define BCM2835_DMA_END BIT(1) /* current CB has ended */ ++#define BCM2835_DMA_INT BIT(2) /* interrupt status */ ++#define BCM2835_DMA_DREQ BIT(3) /* DREQ state */ + #define BCM2835_DMA_ISPAUSED BIT(4) /* Pause requested or not active */ + #define BCM2835_DMA_ISHELD BIT(5) /* Is held by DREQ flow control */ +-#define BCM2835_DMA_ERR BIT(8) ++#define BCM2835_DMA_WAITING_FOR_WRITES BIT(6) /* waiting for last ++ * AXI-write to ack ++ */ ++#define BCM2835_DMA_ERR BIT(8) ++#define BCM2835_DMA_PRIORITY(x) ((x & 15) << 16) /* AXI priority */ ++#define BCM2835_DMA_PANIC_PRIORITY(x) ((x & 15) << 20) /* panic priority */ ++/* current value of TI.BCM2835_DMA_WAIT_RESP */ ++#define BCM2835_DMA_WAIT_FOR_WRITES BIT(28) ++#define BCM2835_DMA_DIS_DEBUG BIT(29) /* disable debug pause signal */ + #define BCM2835_DMA_ABORT BIT(30) /* Stop current CB, go to next, WO */ + #define BCM2835_DMA_RESET BIT(31) /* WO, self clearing */ + ++/* Transfer information bits - also bcm2835_cb.info field */ + #define BCM2835_DMA_INT_EN BIT(0) ++#define BCM2835_DMA_TDMODE BIT(1) /* 2D-Mode */ ++#define BCM2835_DMA_WAIT_RESP BIT(3) /* wait for AXI-write to be acked */ + #define BCM2835_DMA_D_INC BIT(4) +-#define BCM2835_DMA_D_DREQ BIT(6) ++#define BCM2835_DMA_D_WIDTH BIT(5) /* 128bit writes if set */ ++#define BCM2835_DMA_D_DREQ BIT(6) /* enable DREQ for destination */ ++#define BCM2835_DMA_D_IGNORE BIT(7) /* ignore destination writes */ + #define BCM2835_DMA_S_INC BIT(8) +-#define BCM2835_DMA_S_DREQ BIT(10) +- +-#define BCM2835_DMA_PER_MAP(x) ((x) << 16) ++#define BCM2835_DMA_S_WIDTH BIT(9) /* 128bit writes if set */ ++#define BCM2835_DMA_S_DREQ BIT(10) /* enable SREQ for source */ ++#define BCM2835_DMA_S_IGNORE BIT(11) /* ignore source reads - read 0 */ ++#define BCM2835_DMA_BURST_LENGTH(x) ((x & 15) << 12) ++#define BCM2835_DMA_PER_MAP(x) ((x & 31) << 16) /* REQ source */ ++#define BCM2835_DMA_WAIT(x) ((x & 31) << 21) /* add DMA-wait cycles */ ++#define BCM2835_DMA_NO_WIDE_BURSTS BIT(26) /* no 2 beat write bursts */ ++ ++/* debug register bits */ ++#define BCM2835_DMA_DEBUG_LAST_NOT_SET_ERR BIT(0) ++#define BCM2835_DMA_DEBUG_FIFO_ERR BIT(1) ++#define BCM2835_DMA_DEBUG_READ_ERR BIT(2) ++#define BCM2835_DMA_DEBUG_OUTSTANDING_WRITES_SHIFT 4 ++#define BCM2835_DMA_DEBUG_OUTSTANDING_WRITES_BITS 4 ++#define BCM2835_DMA_DEBUG_ID_SHIFT 16 ++#define BCM2835_DMA_DEBUG_ID_BITS 9 ++#define BCM2835_DMA_DEBUG_STATE_SHIFT 16 ++#define BCM2835_DMA_DEBUG_STATE_BITS 9 ++#define BCM2835_DMA_DEBUG_VERSION_SHIFT 25 ++#define BCM2835_DMA_DEBUG_VERSION_BITS 3 ++#define BCM2835_DMA_DEBUG_LITE BIT(28) ++ ++/* shared registers for all dma channels */ ++#define BCM2835_DMA_INT_STATUS 0xfe0 ++#define BCM2835_DMA_ENABLE 0xff0 + + #define BCM2835_DMA_DATA_TYPE_S8 1 + #define BCM2835_DMA_DATA_TYPE_S16 2 + +From c23d021f911db3da728d06d8f84160a131b62581 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:58 -0700 +Subject: [PATCH 382/398] dmaengine: bcm2835: move cyclic member from + bcm2835_chan into bcm2835_desc + +In preparation to consolidating code we move the cyclic member +into the bcm_2835_desc structure. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index a1d851aa5b182f9b0f4d6c2ab719b1ade2167c11..b3bc382fd1998324d6034e203afdd77a4d7ad168 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -73,7 +73,6 @@ struct bcm2835_chan { + struct list_head node; + + struct dma_slave_config cfg; +- bool cyclic; + unsigned int dreq; + + int ch; +@@ -93,6 +92,8 @@ struct bcm2835_desc { + + unsigned int frames; + size_t size; ++ ++ bool cyclic; + }; + + #define BCM2835_DMA_CS 0x00 +@@ -377,8 +378,6 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); + unsigned long flags; + +- c->cyclic = true; /* Nothing else is implemented */ +- + spin_lock_irqsave(&c->vc.lock, flags); + if (vchan_issue_pending(&c->vc) && !c->desc) + bcm2835_dma_start_desc(c); +@@ -432,6 +431,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + d->c = c; + d->dir = direction; + d->frames = buf_len / period_len; ++ d->cyclic = true; + + d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); + if (!d->cb_list) { + +From d55949164ae68340071839e5c7271f4559ff8ead Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:59 -0700 +Subject: [PATCH 383/398] dmaengine: bcm2835: move controlblock chain + generation into separate method + +In preparation of adding slave_sg functionality this patch moves the +generation/allocation of bcm2835_desc and the building of +the corresponding DMA-control-block chain from bcm2835_dma_prep_dma_cyclic +into the newly created method bcm2835_dma_create_cb_chain. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 294 +++++++++++++++++++++++++++++++--------------- + 1 file changed, 198 insertions(+), 96 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index b3bc382fd1998324d6034e203afdd77a4d7ad168..4db0e232fab8e3422d4c28a164ed67f0676981f2 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -88,12 +88,12 @@ struct bcm2835_desc { + struct virt_dma_desc vd; + enum dma_transfer_direction dir; + +- struct bcm2835_cb_entry *cb_list; +- + unsigned int frames; + size_t size; + + bool cyclic; ++ ++ struct bcm2835_cb_entry cb_list[]; + }; + + #define BCM2835_DMA_CS 0x00 +@@ -169,6 +169,13 @@ struct bcm2835_desc { + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) + ++/* how many frames of max_len size do we need to transfer len bytes */ ++static inline size_t bcm2835_dma_frames_for_length(size_t len, ++ size_t max_len) ++{ ++ return DIV_ROUND_UP(len, max_len); ++} ++ + static inline struct bcm2835_dmadev *to_bcm2835_dma_dev(struct dma_device *d) + { + return container_of(d, struct bcm2835_dmadev, ddev); +@@ -185,19 +192,161 @@ static inline struct bcm2835_desc *to_bcm2835_dma_desc( + return container_of(t, struct bcm2835_desc, vd.tx); + } + +-static void bcm2835_dma_desc_free(struct virt_dma_desc *vd) ++static void bcm2835_dma_free_cb_chain(struct bcm2835_desc *desc) + { +- struct bcm2835_desc *desc = container_of(vd, struct bcm2835_desc, vd); +- int i; ++ size_t i; + + for (i = 0; i < desc->frames; i++) + dma_pool_free(desc->c->cb_pool, desc->cb_list[i].cb, + desc->cb_list[i].paddr); + +- kfree(desc->cb_list); + kfree(desc); + } + ++static void bcm2835_dma_desc_free(struct virt_dma_desc *vd) ++{ ++ bcm2835_dma_free_cb_chain( ++ container_of(vd, struct bcm2835_desc, vd)); ++} ++ ++static void bcm2835_dma_create_cb_set_length( ++ struct bcm2835_chan *chan, ++ struct bcm2835_dma_cb *control_block, ++ size_t len, ++ size_t period_len, ++ size_t *total_len, ++ u32 finalextrainfo) ++{ ++ /* set the length */ ++ control_block->length = len; ++ ++ /* finished if we have no period_length */ ++ if (!period_len) ++ return; ++ ++ /* ++ * period_len means: that we need to generate ++ * transfers that are terminating at every ++ * multiple of period_len - this is typically ++ * used to set the interrupt flag in info ++ * which is required during cyclic transfers ++ */ ++ ++ /* have we filled in period_length yet? */ ++ if (*total_len + control_block->length < period_len) ++ return; ++ ++ /* calculate the length that remains to reach period_length */ ++ control_block->length = period_len - *total_len; ++ ++ /* reset total_length for next period */ ++ *total_len = 0; ++ ++ /* add extrainfo bits in info */ ++ control_block->info |= finalextrainfo; ++} ++ ++/** ++ * bcm2835_dma_create_cb_chain - create a control block and fills data in ++ * ++ * @chan: the @dma_chan for which we run this ++ * @direction: the direction in which we transfer ++ * @cyclic: it is a cyclic transfer ++ * @info: the default info bits to apply per controlblock ++ * @frames: number of controlblocks to allocate ++ * @src: the src address to assign (if the S_INC bit is set ++ * in @info, then it gets incremented) ++ * @dst: the dst address to assign (if the D_INC bit is set ++ * in @info, then it gets incremented) ++ * @buf_len: the full buffer length (may also be 0) ++ * @period_len: the period length when to apply @finalextrainfo ++ * in addition to the last transfer ++ * this will also break some control-blocks early ++ * @finalextrainfo: additional bits in last controlblock ++ * (or when period_len is reached in case of cyclic) ++ * @gfp: the GFP flag to use for allocation ++ */ ++static struct bcm2835_desc *bcm2835_dma_create_cb_chain( ++ struct dma_chan *chan, enum dma_transfer_direction direction, ++ bool cyclic, u32 info, u32 finalextrainfo, size_t frames, ++ dma_addr_t src, dma_addr_t dst, size_t buf_len, ++ size_t period_len, gfp_t gfp) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ size_t len = buf_len, total_len; ++ size_t frame; ++ struct bcm2835_desc *d; ++ struct bcm2835_cb_entry *cb_entry; ++ struct bcm2835_dma_cb *control_block; ++ ++ /* allocate and setup the descriptor. */ ++ d = kzalloc(sizeof(*d) + frames * sizeof(struct bcm2835_cb_entry), ++ gfp); ++ if (!d) ++ return NULL; ++ ++ d->c = c; ++ d->dir = direction; ++ d->cyclic = cyclic; ++ ++ /* ++ * Iterate over all frames, create a control block ++ * for each frame and link them together. ++ */ ++ for (frame = 0, total_len = 0; frame < frames; d->frames++, frame++) { ++ cb_entry = &d->cb_list[frame]; ++ cb_entry->cb = dma_pool_alloc(c->cb_pool, gfp, ++ &cb_entry->paddr); ++ if (!cb_entry->cb) ++ goto error_cb; ++ ++ /* fill in the control block */ ++ control_block = cb_entry->cb; ++ control_block->info = info; ++ control_block->src = src; ++ control_block->dst = dst; ++ control_block->stride = 0; ++ control_block->next = 0; ++ /* set up length in control_block if requested */ ++ if (buf_len) { ++ /* calculate length honoring period_length */ ++ bcm2835_dma_create_cb_set_length( ++ c, control_block, ++ len, period_len, &total_len, ++ cyclic ? finalextrainfo : 0); ++ ++ /* calculate new remaining length */ ++ len -= control_block->length; ++ } ++ ++ /* link this the last controlblock */ ++ if (frame) ++ d->cb_list[frame - 1].cb->next = cb_entry->paddr; ++ ++ /* update src and dst and length */ ++ if (src && (info & BCM2835_DMA_S_INC)) ++ src += control_block->length; ++ if (dst && (info & BCM2835_DMA_D_INC)) ++ dst += control_block->length; ++ ++ /* Length of total transfer */ ++ d->size += control_block->length; ++ } ++ ++ /* the last frame requires extra flags */ ++ d->cb_list[d->frames - 1].cb->info |= finalextrainfo; ++ ++ /* detect a size missmatch */ ++ if (buf_len && (d->size != buf_len)) ++ goto error_cb; ++ ++ return d; ++error_cb: ++ bcm2835_dma_free_cb_chain(d); ++ ++ return NULL; ++} ++ + static int bcm2835_dma_abort(void __iomem *chan_base) + { + unsigned long cs; +@@ -391,12 +540,11 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + unsigned long flags) + { + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); +- enum dma_slave_buswidth dev_width; + struct bcm2835_desc *d; +- dma_addr_t dev_addr; +- unsigned int es, sync_type; +- unsigned int frame; +- int i; ++ dma_addr_t src, dst; ++ u32 info = BCM2835_DMA_WAIT_RESP; ++ u32 extra = BCM2835_DMA_INT_EN; ++ size_t frames; + + /* Grab configuration */ + if (!is_slave_direction(direction)) { +@@ -404,104 +552,58 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + return NULL; + } + +- if (direction == DMA_DEV_TO_MEM) { +- dev_addr = c->cfg.src_addr; +- dev_width = c->cfg.src_addr_width; +- sync_type = BCM2835_DMA_S_DREQ; +- } else { +- dev_addr = c->cfg.dst_addr; +- dev_width = c->cfg.dst_addr_width; +- sync_type = BCM2835_DMA_D_DREQ; +- } +- +- /* Bus width translates to the element size (ES) */ +- switch (dev_width) { +- case DMA_SLAVE_BUSWIDTH_4_BYTES: +- es = BCM2835_DMA_DATA_TYPE_S32; +- break; +- default: ++ if (!buf_len) { ++ dev_err(chan->device->dev, ++ "%s: bad buffer length (= 0)\n", __func__); + return NULL; + } + +- /* Now allocate and setup the descriptor. */ +- d = kzalloc(sizeof(*d), GFP_NOWAIT); +- if (!d) +- return NULL; ++ /* ++ * warn if buf_len is not a multiple of period_len - this may leed ++ * to unexpected latencies for interrupts and thus audiable clicks ++ */ ++ if (buf_len % period_len) ++ dev_warn_once(chan->device->dev, ++ "%s: buffer_length (%zd) is not a multiple of period_len (%zd)\n", ++ __func__, buf_len, period_len); + +- d->c = c; +- d->dir = direction; +- d->frames = buf_len / period_len; +- d->cyclic = true; ++ /* Setup DREQ channel */ ++ if (c->dreq != 0) ++ info |= BCM2835_DMA_PER_MAP(c->dreq); + +- d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); +- if (!d->cb_list) { +- kfree(d); +- return NULL; ++ if (direction == DMA_DEV_TO_MEM) { ++ if (c->cfg.src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ src = c->cfg.src_addr; ++ dst = buf_addr; ++ info |= BCM2835_DMA_S_DREQ | BCM2835_DMA_D_INC; ++ } else { ++ if (c->cfg.dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ dst = c->cfg.dst_addr; ++ src = buf_addr; ++ info |= BCM2835_DMA_D_DREQ | BCM2835_DMA_S_INC; + } +- /* Allocate memory for control blocks */ +- for (i = 0; i < d->frames; i++) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; + +- cb_entry->cb = dma_pool_zalloc(c->cb_pool, GFP_ATOMIC, +- &cb_entry->paddr); +- if (!cb_entry->cb) +- goto error_cb; +- } ++ /* calculate number of frames */ ++ frames = DIV_ROUND_UP(buf_len, period_len); + + /* +- * Iterate over all frames, create a control block +- * for each frame and link them together. ++ * allocate the CB chain ++ * note that we need to use GFP_NOWAIT, as the ALSA i2s dmaengine ++ * implementation calls prep_dma_cyclic with interrupts disabled. + */ +- for (frame = 0; frame < d->frames; frame++) { +- struct bcm2835_dma_cb *control_block = d->cb_list[frame].cb; +- +- /* Setup adresses */ +- if (d->dir == DMA_DEV_TO_MEM) { +- control_block->info = BCM2835_DMA_D_INC; +- control_block->src = dev_addr; +- control_block->dst = buf_addr + frame * period_len; +- } else { +- control_block->info = BCM2835_DMA_S_INC; +- control_block->src = buf_addr + frame * period_len; +- control_block->dst = dev_addr; +- } +- +- /* Enable interrupt */ +- control_block->info |= BCM2835_DMA_INT_EN; +- +- /* Setup synchronization */ +- if (sync_type != 0) +- control_block->info |= sync_type; +- +- /* Setup DREQ channel */ +- if (c->dreq != 0) +- control_block->info |= +- BCM2835_DMA_PER_MAP(c->dreq); +- +- /* Length of a frame */ +- control_block->length = period_len; +- d->size += control_block->length; ++ d = bcm2835_dma_create_cb_chain(chan, direction, true, ++ info, extra, ++ frames, src, dst, buf_len, ++ period_len, GFP_NOWAIT); ++ if (!d) ++ return NULL; + +- /* +- * Next block is the next frame. +- * This DMA engine driver currently only supports cyclic DMA. +- * Therefore, wrap around at number of frames. +- */ +- control_block->next = d->cb_list[((frame + 1) % d->frames)].paddr; +- } ++ /* wrap around into a loop */ ++ d->cb_list[d->frames - 1].cb->next = d->cb_list[0].paddr; + + return vchan_tx_prep(&c->vc, &d->vd, flags); +-error_cb: +- i--; +- for (; i >= 0; i--) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; +- +- dma_pool_free(c->cb_pool, cb_entry->cb, cb_entry->paddr); +- } +- +- kfree(d->cb_list); +- kfree(d); +- return NULL; + } + + static int bcm2835_dma_slave_config(struct dma_chan *chan, + +From 2e5c815b44d0945a00e09aec7bff6c31b2ade42f Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:25:00 -0700 +Subject: [PATCH 384/398] dmaengine: bcm2835: limit max length based on channel + type + +The bcm2835 dma system has 2 basic types of dma-channels: +* "normal" channels +* "light" channels + +Lite channels are limited in several aspects: +* internal data-structure is 128 bit (not 256) +* does not support BCM2835_DMA_TDMODE (2D) +* DMA length register is limited to 16 bit. + so 0-65535 (not 0-65536 as mentioned in the official datasheet) +* BCM2835_DMA_S/D_IGNORE are not supported + +The detection of the type of mode is implemented by looking at +the LITE bit in the DEBUG register for each channel. +This allows automatic detection. + +Based on this the maximum block size is set to (64K - 4) or to 1G +and this limit is honored during generation of control block +chains. The effect is that when a LITE channel is used more +control blocks are used to do the same transfer (compared +to a normal channel). + +As there are several sources/target DREQS that are 32 bit wide +we need to have the transfer to be a multiple of 4 as this would +break the transfer otherwise. + +This is why the limit of (64K - 4) was chosen over the +alternative of (64K - 4K). + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 29 ++++++++++++++++++++++++++--- + 1 file changed, 26 insertions(+), 3 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 4db0e232fab8e3422d4c28a164ed67f0676981f2..59c5ef36d97059a4f988f083a64f084da02093cd 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -81,6 +81,8 @@ struct bcm2835_chan { + + void __iomem *chan_base; + int irq_number; ++ ++ bool is_lite_channel; + }; + + struct bcm2835_desc { +@@ -169,6 +171,16 @@ struct bcm2835_desc { + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) + ++/* the max dma length for different channels */ ++#define MAX_DMA_LEN SZ_1G ++#define MAX_LITE_DMA_LEN (SZ_64K - 4) ++ ++static inline size_t bcm2835_dma_max_frame_length(struct bcm2835_chan *c) ++{ ++ /* lite and normal channels have different max frame length */ ++ return c->is_lite_channel ? MAX_LITE_DMA_LEN : MAX_DMA_LEN; ++} ++ + /* how many frames of max_len size do we need to transfer len bytes */ + static inline size_t bcm2835_dma_frames_for_length(size_t len, + size_t max_len) +@@ -217,8 +229,10 @@ static void bcm2835_dma_create_cb_set_length( + size_t *total_len, + u32 finalextrainfo) + { +- /* set the length */ +- control_block->length = len; ++ size_t max_len = bcm2835_dma_max_frame_length(chan); ++ ++ /* set the length taking lite-channel limitations into account */ ++ control_block->length = min_t(u32, len, max_len); + + /* finished if we have no period_length */ + if (!period_len) +@@ -544,6 +558,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + dma_addr_t src, dst; + u32 info = BCM2835_DMA_WAIT_RESP; + u32 extra = BCM2835_DMA_INT_EN; ++ size_t max_len = bcm2835_dma_max_frame_length(c); + size_t frames; + + /* Grab configuration */ +@@ -586,7 +601,10 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + } + + /* calculate number of frames */ +- frames = DIV_ROUND_UP(buf_len, period_len); ++ frames = /* number of periods */ ++ DIV_ROUND_UP(buf_len, period_len) * ++ /* number of frames per period */ ++ bcm2835_dma_frames_for_length(period_len, max_len); + + /* + * allocate the CB chain +@@ -685,6 +703,11 @@ static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, int irq) + c->ch = chan_id; + c->irq_number = irq; + ++ /* check in DEBUG register if this is a LITE channel */ ++ if (readl(c->chan_base + BCM2835_DMA_DEBUG) & ++ BCM2835_DMA_DEBUG_LITE) ++ c->is_lite_channel = true; ++ + return 0; + } + + +From 7222acdfa135aca5e8c6494319152e1827e5c208 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:25:01 -0700 +Subject: [PATCH 385/398] dmaengine: bcm2835: add slave_sg support to + bcm2835-dma + +Add slave_sg support to bcm2835-dma using shared allocation +code for bcm2835_desc and DMA-control blocks already used by +dma_cyclic. + +Note that bcm2835_dma_callback had to get modified to support +both modes of operation (cyclic and non-cyclic). + +Tested using: +* Hifiberry I2S card (using cyclic DMA) +* fb_st7735r SPI-framebuffer (using slave_sg DMA via spi-bcm2835) +playing BigBuckBunny for audio and video. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 113 ++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 108 insertions(+), 5 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 59c5ef36d97059a4f988f083a64f084da02093cd..b46b12f66f387e0b87aa6d09192071b58da9e953 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -260,6 +260,23 @@ static void bcm2835_dma_create_cb_set_length( + control_block->info |= finalextrainfo; + } + ++static inline size_t bcm2835_dma_count_frames_for_sg( ++ struct bcm2835_chan *c, ++ struct scatterlist *sgl, ++ unsigned int sg_len) ++{ ++ size_t frames = 0; ++ struct scatterlist *sgent; ++ unsigned int i; ++ size_t plength = bcm2835_dma_max_frame_length(c); ++ ++ for_each_sg(sgl, sgent, sg_len, i) ++ frames += bcm2835_dma_frames_for_length( ++ sg_dma_len(sgent), plength); ++ ++ return frames; ++} ++ + /** + * bcm2835_dma_create_cb_chain - create a control block and fills data in + * +@@ -361,6 +378,32 @@ error_cb: + return NULL; + } + ++static void bcm2835_dma_fill_cb_chain_with_sg( ++ struct dma_chan *chan, ++ enum dma_transfer_direction direction, ++ struct bcm2835_cb_entry *cb, ++ struct scatterlist *sgl, ++ unsigned int sg_len) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ size_t max_len = bcm2835_dma_max_frame_length(c); ++ unsigned int i, len; ++ dma_addr_t addr; ++ struct scatterlist *sgent; ++ ++ for_each_sg(sgl, sgent, sg_len, i) { ++ for (addr = sg_dma_address(sgent), len = sg_dma_len(sgent); ++ len > 0; ++ addr += cb->cb->length, len -= cb->cb->length, cb++) { ++ if (direction == DMA_DEV_TO_MEM) ++ cb->cb->dst = addr; ++ else ++ cb->cb->src = addr; ++ cb->cb->length = min(len, max_len); ++ } ++ } ++} ++ + static int bcm2835_dma_abort(void __iomem *chan_base) + { + unsigned long cs; +@@ -428,13 +471,19 @@ static irqreturn_t bcm2835_dma_callback(int irq, void *data) + d = c->desc; + + if (d) { +- /* TODO Only works for cyclic DMA */ +- vchan_cyclic_callback(&d->vd); ++ if (d->cyclic) { ++ /* call the cyclic callback */ ++ vchan_cyclic_callback(&d->vd); ++ ++ /* Keep the DMA engine running */ ++ writel(BCM2835_DMA_ACTIVE, ++ c->chan_base + BCM2835_DMA_CS); ++ } else { ++ vchan_cookie_complete(&c->desc->vd); ++ bcm2835_dma_start_desc(c); ++ } + } + +- /* Keep the DMA engine running */ +- writel(BCM2835_DMA_ACTIVE, c->chan_base + BCM2835_DMA_CS); +- + spin_unlock_irqrestore(&c->vc.lock, flags); + + return IRQ_HANDLED; +@@ -548,6 +597,58 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + spin_unlock_irqrestore(&c->vc.lock, flags); + } + ++static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg( ++ struct dma_chan *chan, ++ struct scatterlist *sgl, unsigned int sg_len, ++ enum dma_transfer_direction direction, ++ unsigned long flags, void *context) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ struct bcm2835_desc *d; ++ dma_addr_t src = 0, dst = 0; ++ u32 info = BCM2835_DMA_WAIT_RESP; ++ u32 extra = BCM2835_DMA_INT_EN; ++ size_t frames; ++ ++ if (!is_slave_direction(direction)) { ++ dev_err(chan->device->dev, ++ "%s: bad direction?\n", __func__); ++ return NULL; ++ } ++ ++ if (c->dreq != 0) ++ info |= BCM2835_DMA_PER_MAP(c->dreq); ++ ++ if (direction == DMA_DEV_TO_MEM) { ++ if (c->cfg.src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ src = c->cfg.src_addr; ++ info |= BCM2835_DMA_S_DREQ | BCM2835_DMA_D_INC; ++ } else { ++ if (c->cfg.dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ dst = c->cfg.dst_addr; ++ info |= BCM2835_DMA_D_DREQ | BCM2835_DMA_S_INC; ++ } ++ ++ /* count frames in sg list */ ++ frames = bcm2835_dma_count_frames_for_sg(c, sgl, sg_len); ++ ++ /* allocate the CB chain */ ++ d = bcm2835_dma_create_cb_chain(chan, direction, false, ++ info, extra, ++ frames, src, dst, 0, 0, ++ GFP_KERNEL); ++ if (!d) ++ return NULL; ++ ++ /* fill in frames with scatterlist pointers */ ++ bcm2835_dma_fill_cb_chain_with_sg(chan, direction, d->cb_list, ++ sgl, sg_len); ++ ++ return vchan_tx_prep(&c->vc, &d->vd, flags); ++} ++ + static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, + size_t period_len, enum dma_transfer_direction direction, +@@ -778,11 +879,13 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); + dma_cap_set(DMA_PRIVATE, od->ddev.cap_mask); + dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask); ++ dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); + od->ddev.device_alloc_chan_resources = bcm2835_dma_alloc_chan_resources; + od->ddev.device_free_chan_resources = bcm2835_dma_free_chan_resources; + od->ddev.device_tx_status = bcm2835_dma_tx_status; + od->ddev.device_issue_pending = bcm2835_dma_issue_pending; + od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; ++ od->ddev.device_prep_slave_sg = bcm2835_dma_prep_slave_sg; + od->ddev.device_config = bcm2835_dma_slave_config; + od->ddev.device_terminate_all = bcm2835_dma_terminate_all; + od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); + +From 26a2ecaffc6566362240c6845fdbb3273fcaab1f Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:25:02 -0700 +Subject: [PATCH 386/398] dmaengine: bcm2835: add dma_memcopy support to + bcm2835-dma + +Also added check for an error condition in bcm2835_dma_create_cb_chain +that showed up during development of this patch. + +Tested using dmatest for all enabled channels. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 36 +++++++++++++++++++++++++++++++++++- + 1 file changed, 35 insertions(+), 1 deletion(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index b46b12f66f387e0b87aa6d09192071b58da9e953..cc771cd35dd0c28829b6500421af686be865000b 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -310,6 +310,9 @@ static struct bcm2835_desc *bcm2835_dma_create_cb_chain( + struct bcm2835_cb_entry *cb_entry; + struct bcm2835_dma_cb *control_block; + ++ if (!frames) ++ return NULL; ++ + /* allocate and setup the descriptor. */ + d = kzalloc(sizeof(*d) + frames * sizeof(struct bcm2835_cb_entry), + gfp); +@@ -597,6 +600,34 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + spin_unlock_irqrestore(&c->vc.lock, flags); + } + ++struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_memcpy( ++ struct dma_chan *chan, dma_addr_t dst, dma_addr_t src, ++ size_t len, unsigned long flags) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ struct bcm2835_desc *d; ++ u32 info = BCM2835_DMA_D_INC | BCM2835_DMA_S_INC; ++ u32 extra = BCM2835_DMA_INT_EN | BCM2835_DMA_WAIT_RESP; ++ size_t max_len = bcm2835_dma_max_frame_length(c); ++ size_t frames; ++ ++ /* if src, dst or len is not given return with an error */ ++ if (!src || !dst || !len) ++ return NULL; ++ ++ /* calculate number of frames */ ++ frames = bcm2835_dma_frames_for_length(len, max_len); ++ ++ /* allocate the CB chain - this also fills in the pointers */ ++ d = bcm2835_dma_create_cb_chain(chan, DMA_MEM_TO_MEM, false, ++ info, extra, frames, ++ src, dst, len, 0, GFP_KERNEL); ++ if (!d) ++ return NULL; ++ ++ return vchan_tx_prep(&c->vc, &d->vd, flags); ++} ++ + static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg( + struct dma_chan *chan, + struct scatterlist *sgl, unsigned int sg_len, +@@ -880,17 +911,20 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + dma_cap_set(DMA_PRIVATE, od->ddev.cap_mask); + dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask); + dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); ++ dma_cap_set(DMA_MEMCPY, od->ddev.cap_mask); + od->ddev.device_alloc_chan_resources = bcm2835_dma_alloc_chan_resources; + od->ddev.device_free_chan_resources = bcm2835_dma_free_chan_resources; + od->ddev.device_tx_status = bcm2835_dma_tx_status; + od->ddev.device_issue_pending = bcm2835_dma_issue_pending; + od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; + od->ddev.device_prep_slave_sg = bcm2835_dma_prep_slave_sg; ++ od->ddev.device_prep_dma_memcpy = bcm2835_dma_prep_dma_memcpy; + od->ddev.device_config = bcm2835_dma_slave_config; + od->ddev.device_terminate_all = bcm2835_dma_terminate_all; + od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); + od->ddev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); +- od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); ++ od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV) | ++ BIT(DMA_MEM_TO_MEM); + od->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; + od->ddev.dev = &pdev->dev; + INIT_LIST_HEAD(&od->ddev.channels); + +From a07dd2eb9b2b125d7ece610326cc5715dc8766f0 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 11 Apr 2016 13:29:08 +0000 +Subject: [PATCH 387/398] dmaengine: bcm2835: use platform_get_irq_byname + +Use platform_get_irq_byname to allow for correct mapping of +interrupts to dma channels. + +The currently implemented device tree is unfortunately +implemented with the wrong assumption, that each dma-channel +has its own dma channel, but dma-irq 11 is handling +dma-channel 11-14 and dma-irq 12 is actually a "catch all" +interrupt. + +So here we use the byname variant and require that interrupts +are explicitly named via the interrupts-name property in the +device tree. + +The use of shared interrupts is also implemented. + +As a side-effect this means we can now use dma channels 12, 13 and 14 +in a correct manner - also testing shows that onl using +channels 11 to 14 for spi and i2s works perfectly (when playing +some video) + +Signed-off-by: Martin Sperl +Acked-by: Eric Anholt +Acked-by: Mark Rutland +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 77 ++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 63 insertions(+), 14 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index cc771cd35dd0c28829b6500421af686be865000b..974015193b93cdb398f1157b89b6e2cf5234354e 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -46,6 +46,9 @@ + + #include "virt-dma.h" + ++#define BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED 14 ++#define BCM2835_DMA_CHAN_NAME_SIZE 8 ++ + struct bcm2835_dmadev { + struct dma_device ddev; + spinlock_t lock; +@@ -81,6 +84,7 @@ struct bcm2835_chan { + + void __iomem *chan_base; + int irq_number; ++ unsigned int irq_flags; + + bool is_lite_channel; + }; +@@ -466,6 +470,15 @@ static irqreturn_t bcm2835_dma_callback(int irq, void *data) + struct bcm2835_desc *d; + unsigned long flags; + ++ /* check the shared interrupt */ ++ if (c->irq_flags & IRQF_SHARED) { ++ /* check if the interrupt is enabled */ ++ flags = readl(c->chan_base + BCM2835_DMA_CS); ++ /* if not set then we are not the reason for the irq */ ++ if (!(flags & BCM2835_DMA_INT)) ++ return IRQ_NONE; ++ } ++ + spin_lock_irqsave(&c->vc.lock, flags); + + /* Acknowledge interrupt */ +@@ -506,8 +519,8 @@ static int bcm2835_dma_alloc_chan_resources(struct dma_chan *chan) + return -ENOMEM; + } + +- return request_irq(c->irq_number, +- bcm2835_dma_callback, 0, "DMA IRQ", c); ++ return request_irq(c->irq_number, bcm2835_dma_callback, ++ c->irq_flags, "DMA IRQ", c); + } + + static void bcm2835_dma_free_chan_resources(struct dma_chan *chan) +@@ -819,7 +832,8 @@ static int bcm2835_dma_terminate_all(struct dma_chan *chan) + return 0; + } + +-static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, int irq) ++static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, ++ int irq, unsigned int irq_flags) + { + struct bcm2835_chan *c; + +@@ -834,6 +848,7 @@ static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, int irq) + c->chan_base = BCM2835_DMA_CHANIO(d->base, chan_id); + c->ch = chan_id; + c->irq_number = irq; ++ c->irq_flags = irq_flags; + + /* check in DEBUG register if this is a LITE channel */ + if (readl(c->chan_base + BCM2835_DMA_DEBUG) & +@@ -882,9 +897,11 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + struct resource *res; + void __iomem *base; + int rc; +- int i; +- int irq; ++ int i, j; ++ int irq[BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED + 1]; ++ int irq_flags; + uint32_t chans_available; ++ char chan_name[BCM2835_DMA_CHAN_NAME_SIZE]; + + if (!pdev->dev.dma_mask) + pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; +@@ -941,16 +958,48 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + goto err_no_dma; + } + +- for (i = 0; i < pdev->num_resources; i++) { +- irq = platform_get_irq(pdev, i); +- if (irq < 0) +- break; +- +- if (chans_available & (1 << i)) { +- rc = bcm2835_dma_chan_init(od, i, irq); +- if (rc) +- goto err_no_dma; ++ /* get irqs for each channel that we support */ ++ for (i = 0; i <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; i++) { ++ /* skip masked out channels */ ++ if (!(chans_available & (1 << i))) { ++ irq[i] = -1; ++ continue; + } ++ ++ /* get the named irq */ ++ snprintf(chan_name, sizeof(chan_name), "dma%i", i); ++ irq[i] = platform_get_irq_byname(pdev, chan_name); ++ if (irq[i] >= 0) ++ continue; ++ ++ /* legacy device tree case handling */ ++ dev_warn_once(&pdev->dev, ++ "missing interrupts-names property in device tree - legacy interpretation is used"); ++ /* ++ * in case of channel >= 11 ++ * use the 11th interrupt and that is shared ++ */ ++ irq[i] = platform_get_irq(pdev, i < 11 ? i : 11); ++ } ++ ++ /* get irqs for each channel */ ++ for (i = 0; i <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; i++) { ++ /* skip channels without irq */ ++ if (irq[i] < 0) ++ continue; ++ ++ /* check if there are other channels that also use this irq */ ++ irq_flags = 0; ++ for (j = 0; j <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; j++) ++ if ((i != j) && (irq[j] == irq[i])) { ++ irq_flags = IRQF_SHARED; ++ break; ++ } ++ ++ /* initialize the channel */ ++ rc = bcm2835_dma_chan_init(od, i, irq[i], irq_flags); ++ if (rc) ++ goto err_no_dma; + } + + dev_dbg(&pdev->dev, "Initialized %i DMA channels\n", i); + +From bdcbd59f7e252fbb7764349fe75ed75d459bf08e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= +Date: Sat, 3 Oct 2015 22:22:55 +0200 +Subject: [PATCH 388/398] dmaengine: bcm2835: Load driver early and support + legacy API +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Load driver early since at least bcm2708_fb doesn't support deferred +probing and even if it did, we don't want the video driver deferred. + +Support the legacy DMA API which is needed by bcm2708_fb +(but only using the dedicated dma channel 0). + +Signed-off-by: Noralf Trønnes +Signed-off-by: Martin Sperl +--- + drivers/dma/Kconfig | 2 +- + drivers/dma/bcm2835-dma.c | 27 ++++++++++++++++++++++++++- + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig +index b7a17b1c40e23c07d2bc0c7148eacbfafb00428e..33e36b90cfeddc4e58e233c6e655a20102a7da45 100644 +--- a/drivers/dma/Kconfig ++++ b/drivers/dma/Kconfig +@@ -108,7 +108,7 @@ config COH901318 + + config DMA_BCM2835 + tristate "BCM2835 DMA engine support" +- depends on ARCH_BCM2835 ++ depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709 + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 974015193b93cdb398f1157b89b6e2cf5234354e..2d7aba118640447854732384351601137b502839 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1021,6 +1022,14 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + + dev_dbg(&pdev->dev, "Load BCM2835 DMA engine driver\n"); + ++ /* load the legacy api if bit 0 in the mask is cleared */ ++ if ((chans_available & BIT(0)) == 0) { ++ rc = bcm_dmaman_probe(pdev, base, BIT(0)); ++ if (rc) ++ dev_err(&pdev->dev, ++ "Failed to initialize the legacy API\n"); ++ } ++ + return 0; + + err_no_dma: +@@ -1032,6 +1041,7 @@ static int bcm2835_dma_remove(struct platform_device *pdev) + { + struct bcm2835_dmadev *od = platform_get_drvdata(pdev); + ++ bcm_dmaman_remove(pdev); + dma_async_device_unregister(&od->ddev); + bcm2835_dma_free(od); + +@@ -1047,7 +1057,22 @@ static struct platform_driver bcm2835_dma_driver = { + }, + }; + +-module_platform_driver(bcm2835_dma_driver); ++static int bcm2835_dma_init(void) ++{ ++ return platform_driver_register(&bcm2835_dma_driver); ++} ++ ++static void bcm2835_dma_exit(void) ++{ ++ platform_driver_unregister(&bcm2835_dma_driver); ++} ++ ++/* ++ * Load after serial driver (arch_initcall) so we see the messages if it fails, ++ * but before drivers (module_init) that need a DMA channel. ++ */ ++subsys_initcall(bcm2835_dma_init); ++module_exit(bcm2835_dma_exit); + + MODULE_ALIAS("platform:bcm2835-dma"); + MODULE_DESCRIPTION("BCM2835 DMA engine driver"); + +From 6930003ed820ad0fa21b85ed807ff5df004c188a Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 16:13:59 +0000 +Subject: [PATCH 389/398] ARM: bcm270x: changed bcrm,dma-channel-mask to mask + out the used channel + +Dma channel0 is used by the legacy api - to avoid confilcts this +needs to get masked out in the device-tree instead of hardcoding it +in the driver. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index fa3f6b672a3d17373aa8bf0bbc27743f2631d53d..3bf78706af57fc2be08be2d6c441e6c1765e975d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -59,7 +59,7 @@ + <1 27>; + + #dma-cells = <1>; +- brcm,dma-channel-mask = <0x0f35>; ++ brcm,dma-channel-mask = <0x0f34>; + }; + + intc: interrupt-controller@7e00b200 { + +From 557731106df011a2b39a2021114663ac2ca73c5c Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Sat, 23 Apr 2016 14:07:03 +0000 +Subject: [PATCH 390/398] ARM: bcm2835: add interrupt-names and apply correct + mapping + +Add interrupt-names properties to dt and apply the correct +mapping between irq and dma channels. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 3bf78706af57fc2be08be2d6c441e6c1765e975d..6f3982eaac8d88d5826154b5474c93ccf5e99a3b 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -56,10 +56,32 @@ + <1 24>, + <1 25>, + <1 26>, +- <1 27>; ++ /* dma channel 11-14 share one irq */ ++ <1 27>, ++ <1 27>, ++ <1 27>, ++ <1 27>, ++ /* unused shared irq for all channels */ ++ <1 28>; ++ interrupt-names = "dma0", ++ "dma1", ++ "dma2", ++ "dma3", ++ "dma4", ++ "dma5", ++ "dma6", ++ "dma7", ++ "dma8", ++ "dma9", ++ "dma10", ++ "dma11", ++ "dma12", ++ "dma13", ++ "dma14", ++ "dma-shared-all"; + + #dma-cells = <1>; +- brcm,dma-channel-mask = <0x0f34>; ++ brcm,dma-channel-mask = <0x7f34>; + }; + + intc: interrupt-controller@7e00b200 { + +From c607f37771df9da9fcb63e7dca90db6b3d60c58b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Sat, 23 Apr 2016 14:20:41 +0000 +Subject: [PATCH 391/398] ARM: bcm2835: make dma-channel-0 available for kms + setups + +Enable the use of dma-channel 0 when using the vc4-kms-v3d overlay. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index a4ca2cabd4cd19d3a82ad1135604dfa52784fb3f..4f1cc20f90dc6780f74e08ebee00e5a1a6062c85 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -119,6 +119,13 @@ + }; + }; + ++ fragment@15 { ++ target-path = "/soc/dma"; ++ __overlay__ { ++ brcm,dma-channel-mask = <0x7f35>; ++ }; ++ }; ++ + __overrides__ { + cma-256 = <0>,"+0-1-2-3-4"; + cma-192 = <0>,"-0+1-2-3-4"; + +From 0aa5d3ea6f0280a05c217d95e28e050ec90d4203 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Tue, 7 Jun 2016 19:37:10 +0200 +Subject: [PATCH 392/398] dmaengine: bcm2835: Fix cyclic DMA period splitting + +The code responsible for splitting periods into chunks that +can be handled by the DMA controller missed to update total_len, +the number of bytes processed in the current period, when there +are more chunks to follow. + +Therefore total_len was stuck at 0 and the code didn't work at all. +This resulted in a wrong control block layout and audio issues because +the cyclic DMA callback wasn't executing on period boundaries. + +Fix this by adding the missing total_len update. + +Signed-off-by: Matthias Reichl +Signed-off-by: Martin Sperl +Tested-by: Clive Messer +--- + drivers/dma/bcm2835-dma.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 2d7aba118640447854732384351601137b502839..ea58967594c5a2d712026f50307c2d4de7089e8d 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -252,8 +252,11 @@ static void bcm2835_dma_create_cb_set_length( + */ + + /* have we filled in period_length yet? */ +- if (*total_len + control_block->length < period_len) ++ if (*total_len + control_block->length < period_len) { ++ /* update number of bytes in this period so far */ ++ *total_len += control_block->length; + return; ++ } + + /* calculate the length that remains to reach period_length */ + control_block->length = period_len - *total_len; + +From 809acb204415f5098261856463849f241d5afad2 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Wed, 8 Jun 2016 13:09:56 +0200 +Subject: [PATCH 393/398] dmaengine: bcm2835: Avoid splitting periods into very + small chunks + +The current cyclic DMA period splitting implementation can generate +very small chunks at the end of each period. For example a 65536 byte +period will be split into a 65532 byte chunk and a 4 byte chunk on +the "lite" DMA channels. + +This increases pressure on the RAM controller as the DMA controller +needs to fetch two control blocks from RAM in quick succession and +could potentially cause latency issues if the RAM is tied up by other +devices. + +We can easily avoid these situations by distributing the remaining +length evenly between the last-but-one and the last chunk, making +sure that split chunks will be at least half the maximum length the +DMA controller can handle. + +This patch checks if the last chunk would be less than half of +the maximum DMA length and if yes distributes the max len+4...max_len*1.5 +bytes evenly between the last 2 chunks. This results in chunk sizes +between max_len/2 and max_len*0.75 bytes. + +Signed-off-by: Matthias Reichl +Signed-off-by: Martin Sperl +Tested-by: Clive Messer +--- + drivers/dma/bcm2835-dma.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index ea58967594c5a2d712026f50307c2d4de7089e8d..0173b912afb26b8f59e623a9055513df34cd3caa 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -253,6 +253,20 @@ static void bcm2835_dma_create_cb_set_length( + + /* have we filled in period_length yet? */ + if (*total_len + control_block->length < period_len) { ++ /* ++ * If the next control block is the last in the period ++ * and it's length would be less than half of max_len ++ * change it so that both control blocks are (almost) ++ * equally long. This avoids generating very short ++ * control blocks (worst case would be 4 bytes) which ++ * might be problematic. We also have to make sure the ++ * new length is a multiple of 4 bytes. ++ */ ++ if (*total_len + control_block->length + max_len / 2 > ++ period_len) { ++ control_block->length = ++ DIV_ROUND_UP(period_len - *total_len, 8) * 4; ++ } + /* update number of bytes in this period so far */ + *total_len += control_block->length; + return; + +From 75b5ee520e5fbe33124e335f1d343a79f43eeffb Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 3 Jun 2016 19:29:11 -0700 +Subject: [PATCH 394/398] dmaengine: bcm2835: Fix polling for completion of DMA + with interrupts masked. + +The tx_status hook is supposed to be safe to call from interrupt +context, but it wouldn't ever return completion for the last transfer, +meaning you couldn't poll for DMA completion with interrupts masked. + +This fixes IRQ handling for bcm2835's DSI1, which requires using the +DMA engine to write its registers due to a bug in the AXI bridge. + +Signed-off-by: Eric Anholt +--- + drivers/dma/bcm2835-dma.c | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 0173b912afb26b8f59e623a9055513df34cd3caa..a98e2c2e6888f6351461c25f9f7d2a34330d0a76 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -588,16 +588,16 @@ static enum dma_status bcm2835_dma_tx_status(struct dma_chan *chan, + struct virt_dma_desc *vd; + enum dma_status ret; + unsigned long flags; ++ u32 residue; + + ret = dma_cookie_status(chan, cookie, txstate); +- if (ret == DMA_COMPLETE || !txstate) ++ if (ret == DMA_COMPLETE) + return ret; + + spin_lock_irqsave(&c->vc.lock, flags); + vd = vchan_find_desc(&c->vc, cookie); + if (vd) { +- txstate->residue = +- bcm2835_dma_desc_size(to_bcm2835_dma_desc(&vd->tx)); ++ residue = bcm2835_dma_desc_size(to_bcm2835_dma_desc(&vd->tx)); + } else if (c->desc && c->desc->vd.tx.cookie == cookie) { + struct bcm2835_desc *d = c->desc; + dma_addr_t pos; +@@ -609,11 +609,25 @@ static enum dma_status bcm2835_dma_tx_status(struct dma_chan *chan, + else + pos = 0; + +- txstate->residue = bcm2835_dma_desc_size_pos(d, pos); ++ residue = bcm2835_dma_desc_size_pos(d, pos); ++ ++ /* ++ * If our non-cyclic transfer is done, then report ++ * complete and trigger the next tx now. This lets ++ * the dmaengine API be used synchronously from an IRQ ++ * handler. ++ */ ++ if (!d->cyclic && residue == 0) { ++ vchan_cookie_complete(&c->desc->vd); ++ bcm2835_dma_start_desc(c); ++ ret = dma_cookie_status(chan, cookie, txstate); ++ } + } else { +- txstate->residue = 0; ++ residue = 0; + } + ++ dma_set_residue(txstate, residue); ++ + spin_unlock_irqrestore(&c->vc.lock, flags); + + return ret; + +From 08b0c2bbcd0f2a8d01b8898bfd0b7859e26af558 Mon Sep 17 00:00:00 2001 +From: Thomas Kriechbaumer +Date: Fri, 3 Jun 2016 09:40:44 +0200 +Subject: [PATCH 395/398] BCM270X_DT: Add spi-rtc overlay on SPI0.0 + +Initial version only supports PCF2123 RTC. + +See: https://github.com/raspberrypi/linux/pull/1510 +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 +++++ + arch/arm/boot/dts/overlays/spi-rtc-overlay.dts | 33 ++++++++++++++++++++++++++ + 3 files changed, 40 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/spi-rtc-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index e17bea26c888d805c3badd0ef48cc5021766b094..f528bd4a33ca336716dc4859e5bb60bf70e6a831 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -78,6 +78,7 @@ dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index dcb6849b0bc0ca2c8cec3a80ae1ae4bd2c15ac1f..3cc1588039d4a2359fd7a358b7d7410804d18f34 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -975,6 +975,12 @@ Load: dtoverlay=spi-gpio35-39 + Params: + + ++Name: spi-rtc ++Info: Adds support for a number of SPI Real Time Clock devices ++Load: dtoverlay=spi-rtc,= ++Params: pcf2123 Select the PCF2123 device ++ ++ + Name: spi1-1cs + Info: Enables spi1 with a single chip select (CS) line and associated spidev + dev node. The gpio pin number for the CS line and spidev device node +diff --git a/arch/arm/boot/dts/overlays/spi-rtc-overlay.dts b/arch/arm/boot/dts/overlays/spi-rtc-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..88d1800d63c9f6727b46d4e590c8e96c671c3755 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/spi-rtc-overlay.dts +@@ -0,0 +1,33 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&spidev0>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi0>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ rtc-pcf2123@0 { ++ compatible = "nxp,rtc-pcf2123"; ++ spi-max-frequency = <5000000>; ++ spi-cs-high = <1>; ++ reg = <0>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ pcf2123 = <0>, "=0=1"; ++ }; ++}; + +From 210d43c5cb2083c184b3d6d3a37dd6d774d11b20 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 15 Jun 2016 16:48:41 +0100 +Subject: [PATCH 396/398] rtc: Add SPI alias for pcf2123 driver + +Without this alias, Device Tree won't cause the driver +to be loaded. + +See: https://github.com/raspberrypi/linux/pull/1510 +--- + drivers/rtc/rtc-pcf2123.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c +index ea8a31c91641d46a7a5b44a2225a98e03c4317a3..7ba232ea770d89b0898694bdfdce475c26717226 100644 +--- a/drivers/rtc/rtc-pcf2123.c ++++ b/drivers/rtc/rtc-pcf2123.c +@@ -358,3 +358,4 @@ MODULE_AUTHOR("Chris Verges "); + MODULE_DESCRIPTION("NXP PCF2123 RTC driver"); + MODULE_LICENSE("GPL"); + MODULE_VERSION(DRV_VERSION); ++MODULE_ALIAS("spi:rtc-pcf2123"); + +From 324d251f545625cbaaf91dea5fc0f08b8e262978 Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Fri, 17 Jun 2016 12:03:39 +1000 +Subject: [PATCH 397/398] Added support for headphones, microphone and + bclk_ratio settings. + +This patch adds headphone and microphone capability to the Audio Injector sound card. The patch also sets the bit clock ratio for use in the bcm2835-i2s driver. The bcm2835-i2s can't handle an 8 kHz sample rate when the bit clock is at 12 MHz because its register is only 10 bits wide which can't represent the ch2 offset of 1508. For that reason, the rate constraint is added. +--- + sound/soc/bcm/audioinjector-pi-soundcard.c | 67 ++++++++++++++++++++++++++---- + 1 file changed, 58 insertions(+), 9 deletions(-) + +diff --git a/sound/soc/bcm/audioinjector-pi-soundcard.c b/sound/soc/bcm/audioinjector-pi-soundcard.c +index 39f29e26897226a413b4fa0a11a9bc160a485281..5ff0985e07efb96b95634a65995f09f7c68d9e99 100644 +--- a/sound/soc/bcm/audioinjector-pi-soundcard.c ++++ b/sound/soc/bcm/audioinjector-pi-soundcard.c +@@ -29,16 +29,56 @@ + + #include "../codecs/wm8731.h" + +-static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd) ++static const unsigned int bcm2835_rates_12000000[] = { ++ 32000, 44100, 48000, 96000, 88200, ++}; ++ ++static struct snd_pcm_hw_constraint_list bcm2835_constraints_12000000 = { ++ .list = bcm2835_rates_12000000, ++ .count = ARRAY_SIZE(bcm2835_rates_12000000), ++}; ++ ++static int snd_audioinjector_pi_soundcard_startup(struct snd_pcm_substream *substream) + { +- struct snd_soc_dapm_context *dapm = &rtd->card->dapm; ++ /* Setup constraints, because there is a 12 MHz XTAL on the board */ ++ snd_pcm_hw_constraint_list(substream->runtime, 0, ++ SNDRV_PCM_HW_PARAM_RATE, ++ &bcm2835_constraints_12000000); ++ return 0; ++} + +- // not connected +- snd_soc_dapm_nc_pin(dapm, "Mic Bias"); +- snd_soc_dapm_nc_pin(dapm, "MICIN"); +- snd_soc_dapm_nc_pin(dapm, "RHPOUT"); +- snd_soc_dapm_nc_pin(dapm, "LHPOUT"); ++static int snd_audioinjector_pi_soundcard_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ switch (params_rate(params)){ ++ case 8000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 1508); ++ case 32000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 378); ++ case 44100: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 274); ++ case 48000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 252); ++ case 88200: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 136); ++ case 96000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 126); ++ default: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 126); ++ } ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_audioinjector_pi_soundcard_ops = { ++ .startup = snd_audioinjector_pi_soundcard_startup, ++ .hw_params = snd_audioinjector_pi_soundcard_hw_params, ++}; + ++static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd) ++{ + return snd_soc_dai_set_sysclk(rtd->codec_dai, WM8731_SYSCLK_XTAL, 12000000, SND_SOC_CLOCK_IN); + } + +@@ -50,30 +90,39 @@ static struct snd_soc_dai_link audioinjector_pi_soundcard_dai[] = { + .codec_dai_name = "wm8731-hifi", + .platform_name = "bcm2835-i2s.0", + .codec_name = "wm8731.1-001a", ++ .ops = &snd_audioinjector_pi_soundcard_ops, + .init = audioinjector_pi_soundcard_dai_init, + .dai_fmt = SND_SOC_DAIFMT_CBM_CFM|SND_SOC_DAIFMT_I2S|SND_SOC_DAIFMT_NB_NF, + }, + }; + + static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = { ++ SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_SPK("Ext Spk", NULL), + SND_SOC_DAPM_LINE("Line In Jacks", NULL), ++ SND_SOC_DAPM_MIC("Microphone", NULL), + }; + +-/* Corgi machine connections to the codec pins */ + static const struct snd_soc_dapm_route audioinjector_audio_map[] = { ++ /* headphone connected to LHPOUT, RHPOUT */ ++ {"Headphone Jack", NULL, "LHPOUT"}, ++ {"Headphone Jack", NULL, "RHPOUT"}, ++ + /* speaker connected to LOUT, ROUT */ + {"Ext Spk", NULL, "ROUT"}, + {"Ext Spk", NULL, "LOUT"}, + + /* line inputs */ + {"Line In Jacks", NULL, "Line Input"}, ++ ++ /* mic is connected to Mic Jack, with WM8731 Mic Bias */ ++ {"Microphone", NULL, "Mic Bias"}, + }; + + static struct snd_soc_card snd_soc_audioinjector = { + .name = "audioinjector-pi-soundcard", + .dai_link = audioinjector_pi_soundcard_dai, +- .num_links = 1, ++ .num_links = ARRAY_SIZE(audioinjector_pi_soundcard_dai), + + .dapm_widgets = wm8731_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), + +From 505918ae7a5094cd5b4863f061766de5d541a60a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 21 Jun 2016 20:26:48 +0100 +Subject: [PATCH 398/398] Revert "videobuf2-v4l2: Verify planes array in buffer + dequeueing" + +This reverts commit ec797f4091efd796d0d1fa2ea61e372a3b3dfa20. +--- + drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c +index 6c441be8f893d8e931825b63b810d67ae67a2864..502984c724ff5efd14ef10250dd5d8e653468111 100644 +--- a/drivers/media/v4l2-core/videobuf2-v4l2.c ++++ b/drivers/media/v4l2-core/videobuf2-v4l2.c +@@ -67,11 +67,6 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer + return 0; + } + +-static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb) +-{ +- return __verify_planes_array(vb, pb); +-} +- + /** + * __verify_length() - Verify that the bytesused value for each plane fits in + * the plane length and that the data offset doesn't exceed the bytesused value. +@@ -437,7 +432,6 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb, + } + + static const struct vb2_buf_ops v4l2_buf_ops = { +- .verify_planes_array = __verify_planes_array_core, + .fill_user_buffer = __fill_v4l2_buffer, + .fill_vb2_buffer = __fill_vb2_buffer, + .set_timestamp = __set_timestamp, diff --git a/projects/RPi2/patches/linux/linux-01-RPi_support.patch b/projects/RPi2/patches/linux/linux-01-RPi_support.patch index fce60a62ce..46da9939fa 100644 --- a/projects/RPi2/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi2/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,7 @@ -From 3cc8c1beb520133149f9cb5d394cbc1c8bbb01b0 Mon Sep 17 00:00:00 2001 +From 32fbd277d5d5047ce40d88c511a1b1437e27cdd9 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/251] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/398] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -16,7 +16,7 @@ Signed-off-by: Steve Glendinning diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c old mode 100644 new mode 100755 -index 66b3ab9..b544181 +index 66b3ab9f614eb07edb05757ee333e998f7841f7d..b544181956c1f2dc3ea7473cdf412bf26095028e --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1785,7 +1785,6 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) @@ -36,17 +36,17 @@ index 66b3ab9..b544181 usbnet_skb_return(dev, ax_skb); } -From d41a067375e9d557ee14ad6ecefbc559b724087c Mon Sep 17 00:00:00 2001 +From 755d2a3e036c87d61d9eec3439cbece8c1276f4f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Apr 2015 16:58:45 +0100 -Subject: [PATCH 002/251] smsc95xx: Disable turbo mode by default +Subject: [PATCH 002/398] smsc95xx: Disable turbo mode by default --- drivers/net/usb/smsc95xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index b544181..9c0da18 100755 +index b544181956c1f2dc3ea7473cdf412bf26095028e..9c0da18957430ff7ddd4aeb030a8139e7085cb9e 100755 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -70,7 +70,7 @@ struct smsc95xx_priv { @@ -59,10 +59,10 @@ index b544181..9c0da18 100755 MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); -From 52a67e5a346e7dfcd6af9115800108d6c9fca84e Mon Sep 17 00:00:00 2001 +From 2c76614449f79b488e6ae9a5d3939618c04c2950 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 003/251] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 003/398] vmstat: Workaround for issue where dirty page count goes negative See: @@ -73,7 +73,7 @@ http://www.spinics.net/lists/linux-mm/msg72236.html 1 file changed, 4 insertions(+) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h -index 3e5d907..2539068 100644 +index 3e5d9075960f6c756ead3c60013f84f873206932..253906809c84085487caf2fb99f0cb151f108ff6 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -219,7 +219,11 @@ static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) @@ -89,10 +89,10 @@ index 3e5d907..2539068 100644 static inline void __inc_zone_page_state(struct page *page, -From 5956e14120ab88b53fe2f68f7de6c197eae4a811 Mon Sep 17 00:00:00 2001 +From 1f3629562a7377004c4ffb1ff080b4a9bbf75e71 Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 004/251] BCM2835_DT: Fix I2S register map +Subject: [PATCH 004/398] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -101,7 +101,7 @@ Subject: [PATCH 004/251] BCM2835_DT: Fix I2S register map 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt -index 1396078..2db8294 100644 +index 1396078d15ac625e737487bb242f79b330796951..2db8294474db47d8c199796d4d50a3a0a8a3cac5 100644 --- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt +++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt @@ -48,8 +48,8 @@ Example: @@ -116,7 +116,7 @@ index 1396078..2db8294 100644 dmas = <&dma 2>, <&dma 3>; diff --git a/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt -index 65783de..a89fe42 100644 +index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554427118a2 100644 --- a/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt +++ b/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt @@ -16,8 +16,8 @@ Example: @@ -131,7 +131,7 @@ index 65783de..a89fe42 100644 dmas = <&dma 2>, <&dma 3>; diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi -index aef64de..864a3ef 100644 +index aef64de77495b4be5867dc6ee0fcc9892bdcea7e..864a3effc758aee575013169af129687ad37bef7 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -120,8 +120,8 @@ @@ -146,10 +146,10 @@ index aef64de..864a3ef 100644 dmas = <&dma 2>, <&dma 3>; -From bd8d0148b99e3281aaa294257961377c93a9381d Mon Sep 17 00:00:00 2001 +From 764a8ffa182a56e7be1da720057e09f3ea2f6c6e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/251] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/398] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -164,7 +164,7 @@ though, so trap them early. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index f687082..4cd8ebe 100644 +index f68708281fcf4a821071f6d84246e34b016db4c5..4cd8ebe07274554395e4de4a9d83a3b525d4b366 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -170,9 +170,10 @@ __exception_irq_entry bcm2836_arm_irqchip_handle_irq(struct pt_regs *regs) @@ -180,10 +180,10 @@ index f687082..4cd8ebe 100644 handle_IRQ(irq_linear_revmap(intc.domain, hwirq), regs); -From 2311742728ef10f5d7ed17debc4065e90cb25c7e Mon Sep 17 00:00:00 2001 +From d6a763397a23b1e1c663bc8b82f62579adeb2265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 006/251] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 006/398] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -201,7 +201,7 @@ Acked-by: Stephen Warren 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig -index 8c53c55..c943747 100644 +index 8c53c55be1feb318e84e2c2aba475b42646527c2..c943747b7c1138b342207cacd9fddd7e403f649b 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -128,6 +128,7 @@ config ARCH_BCM2835 @@ -213,7 +213,7 @@ index 8c53c55..c943747 100644 select PINCTRL_BCM2835 help diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c -index bf9cc5f..3f601f9 100644 +index bf9cc5f2e839e845fe1ce65caa672b6212d3ffbc..3f601f98aa884b941fbb84edb349f6c469b940b1 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -55,7 +55,7 @@ @@ -312,10 +312,10 @@ index bf9cc5f..3f601f9 100644 } -From 60f12c460c71c04609a23be23df6eb986481c365 Mon Sep 17 00:00:00 2001 +From c490d2838992e95190e08e962ad848478ceb98f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 007/251] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 007/398] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -326,7 +326,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c -index 3f601f9..20deb28 100644 +index 3f601f98aa884b941fbb84edb349f6c469b940b1..20deb282286834b1f234a65e614b8584688a25d7 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -50,6 +50,8 @@ @@ -411,17 +411,17 @@ index 3f601f9..20deb28 100644 for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 8de2ecc5c42ae0a909fbc23da58ef2fa552d4c5b Mon Sep 17 00:00:00 2001 +From 9b6fd10c34f19d7095f69ffbc3e4d2d6fc5e8de3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 008/251] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 008/398] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c -index 3912646..b51a59c 100644 +index 39126460c1f59097ad164bfee65579e8ce54085a..b51a59c30931a4e096aef7b1c12736ac14df22ce 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -509,6 +509,8 @@ static void __init serial8250_isa_init_ports(void) @@ -434,10 +434,10 @@ index 3912646..b51a59c 100644 for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; -From 2567dee80cdc0654788137d07308fa428d3dc8fb Mon Sep 17 00:00:00 2001 +From f728a7e668aeaccf0808e245868bb358d6820b65 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 009/251] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 009/398] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -446,7 +446,7 @@ Signed-off-by: Noralf Tronnes 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 17dd8fe..613be28 100644 +index 17dd8fe12b54ab6b44c31fcd3c3c917beda9691d..613be2827c2b104f6d29da910f1bf452563fc007 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -373,7 +373,7 @@ static struct gpio_chip bcm2835_gpio_chip = { @@ -459,10 +459,10 @@ index 17dd8fe..613be28 100644 .can_sleep = false, }; -From f23532983c575cac8b55c4bceb1e45a1439f7e0e Mon Sep 17 00:00:00 2001 +From 31827d79eb26067668fcb00cfd018a68f7f4add9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 010/251] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 010/398] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -483,7 +483,7 @@ the pins are often used for I2S instead. 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 613be28..a06cf9e 100644 +index 613be2827c2b104f6d29da910f1bf452563fc007..a06cf9e5f38d23b43da0914b98d6ffb4a7216c00 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -47,6 +47,7 @@ @@ -608,10 +608,10 @@ index 613be28..a06cf9e 100644 }, }; -From fe30b946aef6315884bd029f889f6eb3692705e5 Mon Sep 17 00:00:00 2001 +From 20e20f5f7ccbeada3387f59f887694c2955401b6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 011/251] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 011/398] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -625,7 +625,7 @@ interface, is unlikely to be a problem. 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index a06cf9e..32f779e 100644 +index a06cf9e5f38d23b43da0914b98d6ffb4a7216c00..32f779eeafcba4b29390572e5393b2f4058e0d13 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -1029,6 +1029,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) @@ -638,10 +638,10 @@ index a06cf9e..32f779e 100644 pc->irq_data[i].irqgroup = i; -From cc544ca7cb8b033c7bf3d884277f32887a1417a7 Mon Sep 17 00:00:00 2001 +From 1686ef5059e87ba4c83d48cd496695b30201751b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 012/251] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 012/398] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -658,7 +658,7 @@ Signed-off-by: Phil Elwell 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c -index cf04960..a2b1f45 100644 +index cf04960cc3e6ca1f5a87ad24f3d88cdbcfaa8a36..a2b1f45c43cea72833660702971a525575851e16 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -688,6 +688,8 @@ static int bcm2835_spi_setup(struct spi_device *spi) @@ -722,10 +722,10 @@ index cf04960..a2b1f45 100644 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 8cf07dd13a251b72f28805060d58b942b582feef Mon Sep 17 00:00:00 2001 +From da3aabaf8eb4de9ed3bc74bc30450f9b78d5e1a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 013/251] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 013/398] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -750,7 +750,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 0f7b9ea..1e6f1cf 100644 +index 0f7b9eac3d15d23dc7faa78699e119c7faad547c..1e6f1cf95bf37c6ab984d6c5dfbd3537e25c17b8 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -17,12 +17,16 @@ @@ -783,10 +783,10 @@ index 0f7b9ea..1e6f1cf 100644 static const char * const bcm2835_compat[] = { -From 902ceaaea891e7883c141d45e52dde7d859e2324 Mon Sep 17 00:00:00 2001 +From 8bbff36e2a0565b1557aa5154f2c98b8ac3320df Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 16:44:05 +0200 -Subject: [PATCH 014/251] bcm2835-i2s: get base address for DMA from devicetree +Subject: [PATCH 014/398] bcm2835-i2s: get base address for DMA from devicetree Code copied from spi-bcm2835. Get physical address from devicetree instead of using hardcoded constant. @@ -797,7 +797,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 8c435be..0bc4f47 100644 +index 8c435beb263dfc02df2ee714b1abf43a6cbe6bad..0bc4f47695ce0130ca65547ca2cf3f369102b0e3 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -38,6 +38,7 @@ @@ -851,10 +851,10 @@ index 8c435be..0bc4f47 100644 /* Set the bus width */ dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = -From c89c8dc0cde738e6d2a5d07dbfd2aaa72f4a07d0 Mon Sep 17 00:00:00 2001 +From 2d8b5ad42c914b6f89a4fcbfe2efd511948962ad Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:21:16 +0200 -Subject: [PATCH 015/251] bcm2835-i2s: add 24bit support, update bclk_ratio to +Subject: [PATCH 015/398] bcm2835-i2s: add 24bit support, update bclk_ratio to more correct values Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -886,7 +886,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0bc4f47..cf60390 100644 +index 0bc4f47695ce0130ca65547ca2cf3f369102b0e3..cf60390fa174d965378ede80b81e69baa54266de 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -340,11 +340,15 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, @@ -933,10 +933,10 @@ index 0bc4f47..cf60390 100644 }, .ops = &bcm2835_i2s_dai_ops, -From da23963f1f4c8999ec76bb99234aec3864b0e56f Mon Sep 17 00:00:00 2001 +From 21bf597a7864303e1796788ec6609972cf300e03 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:25:51 +0200 -Subject: [PATCH 016/251] bcm2835-i2s: setup clock only if CPU is clock master +Subject: [PATCH 016/398] bcm2835-i2s: setup clock only if CPU is clock master Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -952,7 +952,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index cf60390..4ac4e92 100644 +index cf60390fa174d965378ede80b81e69baa54266de..4ac4e929e8fb9a6d34535e54550f724bffb092b5 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -411,15 +411,25 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, @@ -991,10 +991,10 @@ index cf60390..4ac4e92 100644 /* Setup the frame format */ format = BCM2835_I2S_CHEN; -From 611d61511eefc080a178187b36c9d86aec9bb8b0 Mon Sep 17 00:00:00 2001 +From 2b4e5a6e9d089cf458ec6fa053afc44c69e89014 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:49:51 +0200 -Subject: [PATCH 017/251] bcm2835-i2s: Eliminate debugfs directory error +Subject: [PATCH 017/398] bcm2835-i2s: Eliminate debugfs directory error Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1010,7 +1010,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 2 insertions(+) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 4ac4e92..aab3df9 100644 +index 4ac4e929e8fb9a6d34535e54550f724bffb092b5..aab3df97d209269b6c64d9e199296464aea903bb 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -782,6 +782,7 @@ static const struct regmap_config bcm2835_regmap_config[] = { @@ -1030,10 +1030,10 @@ index 4ac4e92..aab3df9 100644 }; -From bb6885bf7549495ca00d9a839954dcd35c4b9e61 Mon Sep 17 00:00:00 2001 +From dc4f3ebf7ed390889e24212b3abcd5ca95a0961a Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:35:20 +0200 -Subject: [PATCH 018/251] bcm2835-i2s: Register PCM device +Subject: [PATCH 018/398] bcm2835-i2s: Register PCM device Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1055,7 +1055,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index aab3df9..0e5c787 100644 +index aab3df97d209269b6c64d9e199296464aea903bb..0e5c7876c8edf310ba175604b18e25d8acf8fdbb 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -799,6 +799,25 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { @@ -1096,10 +1096,10 @@ index aab3df9..0e5c787 100644 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); return ret; -From 7eced106f678f81b479e3f4fcc0de5b0c8e1dbd9 Mon Sep 17 00:00:00 2001 +From 99541365fe9f07ad114784763b5bc3fee81189c0 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:55:21 +0200 -Subject: [PATCH 019/251] bcm2835-i2s: Enable MMAP support via a DT property +Subject: [PATCH 019/398] bcm2835-i2s: Enable MMAP support via a DT property Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1118,7 +1118,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0e5c787..04c1d13 100644 +index 0e5c7876c8edf310ba175604b18e25d8acf8fdbb..04c1d1310d34527e9d57148a4b70ca73cf99e3a8 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -799,7 +799,7 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { @@ -1143,10 +1143,10 @@ index 0e5c787..04c1d13 100644 for (i = 0; i <= 1; i++) { void __iomem *base; -From 6de25eb4521167e2d9d5a9c777333cec1542192f Mon Sep 17 00:00:00 2001 +From 725ec95e16bda21c122f97d9371f9d22510dfad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 9 Apr 2015 12:34:11 +0200 -Subject: [PATCH 020/251] dmaengine: bcm2835: Add slave dma support +Subject: [PATCH 020/398] dmaengine: bcm2835: Add slave dma support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1163,7 +1163,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 192 insertions(+), 14 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 996c4b0..b278c66 100644 +index 996c4b00d323ed5c2dd6455f80eb36ed8e9a8b23..b278c663e3b31a7c906dd32d53db5e670f6bbc10 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -1,11 +1,10 @@ @@ -1466,10 +1466,10 @@ index 996c4b0..b278c66 100644 +MODULE_AUTHOR("Gellert Weisz "); MODULE_LICENSE("GPL v2"); -From 6090e63c27886fcd841ba451d8646c093a179b8d Mon Sep 17 00:00:00 2001 +From 0e08822b156b5b289c865c0b46316b73782d8d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 15:58:59 +0200 -Subject: [PATCH 021/251] dmaengine: bcm2835: set residue_granularity field +Subject: [PATCH 021/398] dmaengine: bcm2835: set residue_granularity field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1486,7 +1486,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 1 insertion(+) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index b278c66..696fb30 100644 +index b278c663e3b31a7c906dd32d53db5e670f6bbc10..696fb30b4f5a01cda9b98038b8e548368cea05f4 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -802,6 +802,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev) @@ -1498,10 +1498,10 @@ index b278c66..696fb30 100644 INIT_LIST_HEAD(&od->ddev.channels); spin_lock_init(&od->lock); -From ea0d9861bde9e049f8d5e43ae89dcf7844cb5e8d Mon Sep 17 00:00:00 2001 +From 0b6e03af9b92d380d18be88d3a7f0cd98adfe232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 022/251] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 022/398] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1519,7 +1519,7 @@ Signed-off-by: Noralf Trønnes 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index e6cd1a3..060306e 100644 +index e6cd1a32025a916cec7d219d4693c7c71e4c09a9..060306e6b4cbba1b8849d1212ebe2ad63aa493f7 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -108,7 +108,7 @@ config COH901318 @@ -1532,7 +1532,7 @@ index e6cd1a3..060306e 100644 select DMA_VIRTUAL_CHANNELS diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 696fb30..5db0a95 100644 +index 696fb30b4f5a01cda9b98038b8e548368cea05f4..5db0a95985b20a2086c65762ea8f125511f67471 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -36,6 +36,7 @@ @@ -1601,10 +1601,10 @@ index 696fb30..5db0a95 100644 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 8947371bab57f6f0adb8c9519ceeba017fa5fc6a Mon Sep 17 00:00:00 2001 +From 039a71eb9467f89bee3ec6c8593e4264ba0fa292 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sat, 10 Oct 2015 12:29:18 +0200 -Subject: [PATCH 023/251] bcm2835-dma: Fix dreq not set for slave transfers +Subject: [PATCH 023/398] bcm2835-dma: Fix dreq not set for slave transfers Set dreq to slave_id if it is not set like in bcm2708-dmaengine. --- @@ -1612,7 +1612,7 @@ Set dreq to slave_id if it is not set like in bcm2708-dmaengine. 1 file changed, 2 insertions(+) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 5db0a95..fe1fd60 100644 +index 5db0a95985b20a2086c65762ea8f125511f67471..fe1fd609ce5d94b1ccf7ec09895556108395a6b1 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -657,6 +657,8 @@ static int bcm2835_dma_slave_config(struct dma_chan *chan, @@ -1625,10 +1625,10 @@ index 5db0a95..fe1fd60 100644 return 0; } -From 22399cbc5ece0905650012b73e51a366d1c754e6 Mon Sep 17 00:00:00 2001 +From c7a79fc7cc5699799c60d9df929f025feb8b9c1b Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 12:28:30 +0200 -Subject: [PATCH 024/251] bcm2835-dma: Limit cyclic transfers on lite channels +Subject: [PATCH 024/398] bcm2835-dma: Limit cyclic transfers on lite channels to 32k Transfers larger than 32k cause repeated clicking with I2S soundcards. @@ -1639,7 +1639,7 @@ did as an intermediate fix. 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index fe1fd60..0adc347 100644 +index fe1fd609ce5d94b1ccf7ec09895556108395a6b1..0adc347fe5de46196aee65e86e9a4e3dcc7349f0 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -144,6 +144,12 @@ struct bcm2835_desc { @@ -1665,10 +1665,10 @@ index fe1fd60..0adc347 100644 max_size = MAX_NORMAL_TRANSFER; period_len = min(period_len, max_size); -From 1e8033be36dd0c3b000c014245cc45f94118faa0 Mon Sep 17 00:00:00 2001 +From 34d88c613d4377d3cd7dc341573998f40ed816c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:50:02 +0200 -Subject: [PATCH 025/251] bcm2835: Add support for uart1 +Subject: [PATCH 025/398] bcm2835: Add support for uart1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1682,7 +1682,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 25 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 1e6f1cf..ea36eec 100644 +index 1e6f1cf95bf37c6ab984d6c5dfbd3537e25c17b8..ea36eeca903872ff8258a6081ab7b34fd32b3334 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -22,6 +22,29 @@ @@ -1725,10 +1725,10 @@ index 1e6f1cf..ea36eec 100644 static const char * const bcm2835_compat[] = { -From d97842cc1aac3d0ff132500fad402068743d08df Mon Sep 17 00:00:00 2001 +From b6a810edef23f932b2a75ac8ea3c58283a807984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:21:20 +0200 -Subject: [PATCH 026/251] firmware: bcm2835: Add missing property tags +Subject: [PATCH 026/398] firmware: bcm2835: Add missing property tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1739,7 +1739,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 8 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index c07d74a..525816d 100644 +index c07d74aa39bfa82b5c1da19bb01294ee48310ea4..525816d7547e4aa1703d5b4283f5f39dbf92f7d7 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -63,6 +63,7 @@ enum rpi_firmware_property_tag { @@ -1790,10 +1790,10 @@ index c07d74a..525816d 100644 RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, -From f01f5606b8fe5e7ea7d70f4f2e0e7435040cabaa Mon Sep 17 00:00:00 2001 +From c0e63fc9b4a1ee32d99592e357b40b9f21880057 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 027/251] Main bcm2708/bcm2709 linux port +Subject: [PATCH 027/398] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1866,7 +1866,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 arch/arm/mach-bcm2709/vc_mem.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 34e1569..8f06ea8 100644 +index 34e1569a11ee322a0a020bdfe0c9b801b6b58c12..8f06ea82ddf1be7c77f6eacacc5a77dd4608af97 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -317,6 +317,52 @@ choice @@ -1933,7 +1933,7 @@ index 34e1569..8f06ea8 100644 source "arch/arm/mach-alpine/Kconfig" diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug -index ddbb361..340b759 100644 +index ddbb361267d879c3c2947c9b094d7be784e2f1c2..340b75907723c87a9792f9f43e7fa4b77b9b73af 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1240,6 +1240,14 @@ choice @@ -1952,7 +1952,7 @@ index ddbb361..340b759 100644 config DEBUG_EXYNOS_UART diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index 2c2b28e..a2e7cf7 100644 +index 2c2b28ee48119771dfa92f353124795d456d770a..a2e7cf71e771e3703d484f78aaad90072d6c8181 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -154,6 +154,8 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 @@ -1965,7 +1965,7 @@ index 2c2b28e..a2e7cf7 100644 machine-$(CONFIG_ARCH_AT91) += at91 machine-$(CONFIG_ARCH_AXXIA) += axxia diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S -index 04286fd..ed82628 100644 +index 04286fd9e09ce7a27259c4d375a05a965e3be0ea..ed826280e744828ebb1c5ae6b7a62d70f28c1429 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -700,6 +700,14 @@ ARM_BE8(rev16 ip, ip) @@ -1984,7 +1984,7 @@ index 04286fd..ed82628 100644 ENDPROC(__fixup_a_pv_table) diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c -index 4adfb46..69aad0e 100644 +index 4adfb46e3ee93276ea506b723eb11e33c57459f4..69aad0ebc902b82a83afd24938cafdfe1686136d 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -91,6 +91,16 @@ void arch_cpu_idle_exit(void) @@ -2006,7 +2006,7 @@ index 4adfb46..69aad0e 100644 unsigned long flags; diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig new file mode 100644 -index 0000000..6eabe84 +index 0000000000000000000000000000000000000000..6eabe844767f7fa9bdc09a897bab83e5149fc0dd --- /dev/null +++ b/arch/arm/mach-bcm2708/Kconfig @@ -0,0 +1,23 @@ @@ -2035,7 +2035,7 @@ index 0000000..6eabe84 +endmenu diff --git a/arch/arm/mach-bcm2708/Makefile b/arch/arm/mach-bcm2708/Makefile new file mode 100644 -index 0000000..3da1a1b +index 0000000000000000000000000000000000000000..3da1a1b4ea1fb04ae0b535b2915ea9f386f5701c --- /dev/null +++ b/arch/arm/mach-bcm2708/Makefile @@ -0,0 +1,5 @@ @@ -2046,7 +2046,7 @@ index 0000000..3da1a1b +obj-$(CONFIG_MACH_BCM2708) += bcm2708.o diff --git a/arch/arm/mach-bcm2708/Makefile.boot b/arch/arm/mach-bcm2708/Makefile.boot new file mode 100644 -index 0000000..67039c3 +index 0000000000000000000000000000000000000000..67039c3e0c48fa6b94f1147b3316f74afcecba9e --- /dev/null +++ b/arch/arm/mach-bcm2708/Makefile.boot @@ -0,0 +1,3 @@ @@ -2055,7 +2055,7 @@ index 0000000..67039c3 +initrd_phys-y := 0x00800000 diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c new file mode 100644 -index 0000000..280628b +index 0000000000000000000000000000000000000000..280628ba8907d2a4323fc86dfc6db7fc684aeabc --- /dev/null +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -0,0 +1,231 @@ @@ -2292,7 +2292,7 @@ index 0000000..280628b +module_param(reboot_part, uint, 0644); diff --git a/arch/arm/mach-bcm2708/include/mach/debug-macro.S b/arch/arm/mach-bcm2708/include/mach/debug-macro.S new file mode 100644 -index 0000000..b24304a +index 0000000000000000000000000000000000000000..b24304a6755e965b8a28eb048b7f4e2d868820f9 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/debug-macro.S @@ -0,0 +1,22 @@ @@ -2320,7 +2320,7 @@ index 0000000..b24304a +#include diff --git a/arch/arm/mach-bcm2708/include/mach/io.h b/arch/arm/mach-bcm2708/include/mach/io.h new file mode 100644 -index 0000000..e6eb84d +index 0000000000000000000000000000000000000000..e6eb84d71006db417dbd0afc4d08d3b19b09a619 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/io.h @@ -0,0 +1,27 @@ @@ -2353,7 +2353,7 @@ index 0000000..e6eb84d +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/memory.h b/arch/arm/mach-bcm2708/include/mach/memory.h new file mode 100644 -index 0000000..7548a52 +index 0000000000000000000000000000000000000000..7548a52dcf84affa4d1b0667e5e2f89f591891b8 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/memory.h @@ -0,0 +1,57 @@ @@ -2416,7 +2416,7 @@ index 0000000..7548a52 +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h new file mode 100644 -index 0000000..4fb43cf +index 0000000000000000000000000000000000000000..4fb43cf391e50e702d0a0588ceff397c79c501d7 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -0,0 +1,112 @@ @@ -2534,7 +2534,7 @@ index 0000000..4fb43cf +/* END */ diff --git a/arch/arm/mach-bcm2708/include/mach/system.h b/arch/arm/mach-bcm2708/include/mach/system.h new file mode 100644 -index 0000000..c9a9c9a +index 0000000000000000000000000000000000000000..c9a9c9a881102c5354971d15203a746906761a70 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/system.h @@ -0,0 +1,37 @@ @@ -2577,7 +2577,7 @@ index 0000000..c9a9c9a +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/uncompress.h b/arch/arm/mach-bcm2708/include/mach/uncompress.h new file mode 100644 -index 0000000..de7504b +index 0000000000000000000000000000000000000000..de7504bfc20ba24be8707861b8389783860adb77 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/uncompress.h @@ -0,0 +1,84 @@ @@ -2667,7 +2667,7 @@ index 0000000..de7504b +#define arch_decomp_wdog() diff --git a/arch/arm/mach-bcm2708/include/mach/vmalloc.h b/arch/arm/mach-bcm2708/include/mach/vmalloc.h new file mode 100644 -index 0000000..502c617 +index 0000000000000000000000000000000000000000..502c6178101be60b10c9eb31afec938b5534c33f --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vmalloc.h @@ -0,0 +1,20 @@ @@ -2693,7 +2693,7 @@ index 0000000..502c617 +#define VMALLOC_END (0xe8000000) diff --git a/arch/arm/mach-bcm2709/Kconfig b/arch/arm/mach-bcm2709/Kconfig new file mode 100644 -index 0000000..643b4b9 +index 0000000000000000000000000000000000000000..643b4b984512a5f2ae33cee9beffa70a53e005ff --- /dev/null +++ b/arch/arm/mach-bcm2709/Kconfig @@ -0,0 +1,16 @@ @@ -2715,7 +2715,7 @@ index 0000000..643b4b9 +endmenu diff --git a/arch/arm/mach-bcm2709/Makefile b/arch/arm/mach-bcm2709/Makefile new file mode 100644 -index 0000000..26cd67d +index 0000000000000000000000000000000000000000..26cd67d3dc343dbd250fa97855a82c28bbd95af0 --- /dev/null +++ b/arch/arm/mach-bcm2709/Makefile @@ -0,0 +1,5 @@ @@ -2726,7 +2726,7 @@ index 0000000..26cd67d +obj-$(CONFIG_MACH_BCM2709) += bcm2709.o diff --git a/arch/arm/mach-bcm2709/Makefile.boot b/arch/arm/mach-bcm2709/Makefile.boot new file mode 100644 -index 0000000..67039c3 +index 0000000000000000000000000000000000000000..67039c3e0c48fa6b94f1147b3316f74afcecba9e --- /dev/null +++ b/arch/arm/mach-bcm2709/Makefile.boot @@ -0,0 +1,3 @@ @@ -2735,7 +2735,7 @@ index 0000000..67039c3 +initrd_phys-y := 0x00800000 diff --git a/arch/arm/mach-bcm2709/bcm2709.c b/arch/arm/mach-bcm2709/bcm2709.c new file mode 100644 -index 0000000..90773a3 +index 0000000000000000000000000000000000000000..90773a30b87abbfda1615326c6faf59b9db6d68e --- /dev/null +++ b/arch/arm/mach-bcm2709/bcm2709.c @@ -0,0 +1,380 @@ @@ -3121,7 +3121,7 @@ index 0000000..90773a3 +module_param(reboot_part, uint, 0644); diff --git a/arch/arm/mach-bcm2709/include/mach/debug-macro.S b/arch/arm/mach-bcm2709/include/mach/debug-macro.S new file mode 100644 -index 0000000..b24304a +index 0000000000000000000000000000000000000000..b24304a6755e965b8a28eb048b7f4e2d868820f9 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/debug-macro.S @@ -0,0 +1,22 @@ @@ -3149,7 +3149,7 @@ index 0000000..b24304a +#include diff --git a/arch/arm/mach-bcm2709/include/mach/entry-macro.S b/arch/arm/mach-bcm2709/include/mach/entry-macro.S new file mode 100644 -index 0000000..d08591b +index 0000000000000000000000000000000000000000..d08591b63c1a1710c40350d343d3eddc97ae74c1 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/entry-macro.S @@ -0,0 +1,123 @@ @@ -3278,7 +3278,7 @@ index 0000000..d08591b + .endm diff --git a/arch/arm/mach-bcm2709/include/mach/io.h b/arch/arm/mach-bcm2709/include/mach/io.h new file mode 100644 -index 0000000..e6eb84d +index 0000000000000000000000000000000000000000..e6eb84d71006db417dbd0afc4d08d3b19b09a619 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/io.h @@ -0,0 +1,27 @@ @@ -3311,7 +3311,7 @@ index 0000000..e6eb84d +#endif diff --git a/arch/arm/mach-bcm2709/include/mach/memory.h b/arch/arm/mach-bcm2709/include/mach/memory.h new file mode 100644 -index 0000000..7548a52 +index 0000000000000000000000000000000000000000..7548a52dcf84affa4d1b0667e5e2f89f591891b8 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/memory.h @@ -0,0 +1,57 @@ @@ -3374,7 +3374,7 @@ index 0000000..7548a52 +#endif diff --git a/arch/arm/mach-bcm2709/include/mach/platform.h b/arch/arm/mach-bcm2709/include/mach/platform.h new file mode 100644 -index 0000000..311b9f2 +index 0000000000000000000000000000000000000000..311b9f26fab7dd770bdcd684c7691442b0872d55 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/platform.h @@ -0,0 +1,188 @@ @@ -3568,7 +3568,7 @@ index 0000000..311b9f2 +/* END */ diff --git a/arch/arm/mach-bcm2709/include/mach/system.h b/arch/arm/mach-bcm2709/include/mach/system.h new file mode 100644 -index 0000000..c9a9c9a +index 0000000000000000000000000000000000000000..c9a9c9a881102c5354971d15203a746906761a70 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/system.h @@ -0,0 +1,37 @@ @@ -3611,7 +3611,7 @@ index 0000000..c9a9c9a +#endif diff --git a/arch/arm/mach-bcm2709/include/mach/uncompress.h b/arch/arm/mach-bcm2709/include/mach/uncompress.h new file mode 100644 -index 0000000..de7504b +index 0000000000000000000000000000000000000000..de7504bfc20ba24be8707861b8389783860adb77 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/uncompress.h @@ -0,0 +1,84 @@ @@ -3701,7 +3701,7 @@ index 0000000..de7504b +#define arch_decomp_wdog() diff --git a/arch/arm/mach-bcm2709/include/mach/vc_mem.h b/arch/arm/mach-bcm2709/include/mach/vc_mem.h new file mode 100644 -index 0000000..4a4a338 +index 0000000000000000000000000000000000000000..4a4a33845cbc02f0e0d5368fed3609f6ba9ff92b --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/vc_mem.h @@ -0,0 +1,35 @@ @@ -3742,7 +3742,7 @@ index 0000000..4a4a338 +#endif /* VC_MEM_H */ diff --git a/arch/arm/mach-bcm2709/include/mach/vmalloc.h b/arch/arm/mach-bcm2709/include/mach/vmalloc.h new file mode 100644 -index 0000000..6aa6826 +index 0000000000000000000000000000000000000000..6aa68260dd866c83527dffece8de483913231fb3 --- /dev/null +++ b/arch/arm/mach-bcm2709/include/mach/vmalloc.h @@ -0,0 +1,20 @@ @@ -3768,7 +3768,7 @@ index 0000000..6aa6826 +#define VMALLOC_END (0xff000000) diff --git a/arch/arm/mach-bcm2709/vc_mem.c b/arch/arm/mach-bcm2709/vc_mem.c new file mode 100644 -index 0000000..d2adfd1 +index 0000000000000000000000000000000000000000..d2adfd1db2421984ea8ab8fb809d1adb0765714e --- /dev/null +++ b/arch/arm/mach-bcm2709/vc_mem.c @@ -0,0 +1,431 @@ @@ -4204,7 +4204,7 @@ index 0000000..d2adfd1 +module_param(mem_size, uint, 0644); +module_param(mem_base, uint, 0644); diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig -index 4121886..253bed8 100644 +index 41218867a9a604286b83a14bc83fa7908f115dcc..253bed8f001e9c73234662255bde4be0ebc23f7c 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -358,7 +358,7 @@ config CPU_PJ4B @@ -4217,7 +4217,7 @@ index 4121886..253bed8 100644 select CPU_ABRT_EV6 select CPU_CACHE_V6 diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S -index 06d890a..30d96e8 100644 +index 06d890a2342b1600e2eae6e350994ad59f5c3a08..30d96e81c0e052c725bdb00bb3df56194023ab9f 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S @@ -73,10 +73,19 @@ ENDPROC(cpu_v6_reset) @@ -4244,7 +4244,7 @@ index 06d890a..30d96e8 100644 ENTRY(cpu_v6_dcache_clean_area) diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S -index 8e1ea43..be40ccb 100644 +index 8e1ea433c3f1e321d7ed4e91fe582a5be4eb85be..be40ccbf57f6f47418855af08c42531dc17ee7ca 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -480,6 +480,7 @@ __errata_finish: @@ -4256,7 +4256,7 @@ index 8e1ea43..be40ccb 100644 .align 2 diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types -index 2ed1b8a..b52d949 100644 +index 2ed1b8a922ed02b9e3545991873af77b4c1bf871..b52d949ee91d96eb7672fbbb4969bfa1e7afc376 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types @@ -522,6 +522,8 @@ torbreck MACH_TORBRECK TORBRECK 3090 @@ -4269,7 +4269,7 @@ index 2ed1b8a..b52d949 100644 ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile -index 56bd16e..c2ac46d 100644 +index 56bd16e77ae37147da0fa4e977adffcb9bc1a4c6..c2ac46d6b465ce639e17592da552758795cd3481 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -19,7 +19,7 @@ obj-$(CONFIG_CLKSRC_NOMADIK_MTU) += nomadik-mtu.o @@ -4282,7 +4282,7 @@ index 56bd16e..c2ac46d 100644 obj-$(CONFIG_ARCH_ATLAS7) += timer-atlas7.o obj-$(CONFIG_ARCH_MOXART) += moxart_timer.o diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile -index 177f78f..6a9e2d0 100644 +index 177f78f6e6d6313fd9fd16595fe36089296ce25f..6a9e2d087600cb3947194b6606d03a2dc18c0e0d 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -2,6 +2,9 @@ obj-$(CONFIG_IRQCHIP) += irqchip.o @@ -4296,7 +4296,7 @@ index 177f78f..6a9e2d0 100644 obj-$(CONFIG_ARCH_HIP04) += irq-hip04.o obj-$(CONFIG_ARCH_MMP) += irq-mmp.o diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h -index 8673ffe..ad22ebb 100644 +index 8673ffe3d86ef83fc657cde31a43058b94840f61..ad22ebbef8f9d8f4879cc32b33eff0b6d37db7ea 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -289,6 +289,7 @@ struct mmc_host { @@ -4308,10 +4308,10 @@ index 8673ffe..ad22ebb 100644 mmc_pm_flag_t pm_caps; /* supported pm features */ -From cc5bcfaa350113324f7433660c9a3dfc0229bcdd Mon Sep 17 00:00:00 2001 +From b8c9f480117ebd0c35b87e85f15ac375729323e5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 11 Nov 2015 21:01:15 +0000 -Subject: [PATCH 028/251] squash: include ARCH_BCM2708 / ARCH_BCM2709 +Subject: [PATCH 028/398] squash: include ARCH_BCM2708 / ARCH_BCM2709 --- drivers/char/hw_random/Kconfig | 2 +- @@ -4325,7 +4325,7 @@ Subject: [PATCH 028/251] squash: include ARCH_BCM2708 / ARCH_BCM2709 8 files changed, 23 insertions(+), 8 deletions(-) diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig -index dbf2271..e11e3f2 100644 +index dbf22719462f9481006b5c874ca99200342b4bee..e11e3f2aa8f8385bcf07aa2d0f4b6418b2755727 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -90,7 +90,7 @@ config HW_RANDOM_BCM63XX @@ -4338,7 +4338,7 @@ index dbf2271..e11e3f2 100644 ---help--- This driver provides kernel-side support for the Random Number diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig -index 546d05f..5a045c9 100644 +index 546d05f4358a7c452ee80366b3ae782e685fd7ef..5a045c912a9f47238cccf13e27f35dc14cd272bc 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -65,7 +65,7 @@ config ALTERA_MBOX @@ -4351,7 +4351,7 @@ index 546d05f..5a045c9 100644 An implementation of the BCM2385 Mailbox. It is used to invoke the services of the Videocore. Say Y here if you want to use the diff --git a/drivers/mailbox/bcm2835-mailbox.c b/drivers/mailbox/bcm2835-mailbox.c -index cfb4b44..d9c6c21 100644 +index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f27006f4edd15 100644 --- a/drivers/mailbox/bcm2835-mailbox.c +++ b/drivers/mailbox/bcm2835-mailbox.c @@ -51,12 +51,15 @@ @@ -4400,7 +4400,7 @@ index cfb4b44..d9c6c21 100644 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile -index 738cb49..4fd086f 100644 +index 738cb4929a49428890f543df5eab92976d40dbe7..4fd086f78b00241778beb89b01fdea1a4fe39285 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o @@ -4412,7 +4412,7 @@ index 738cb49..4fd086f 100644 obj-$(CONFIG_ARCH_BERLIN) += berlin/ obj-y += freescale/ diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig -index 2f4641a..d5c1a5d 100644 +index 2f4641a0e88bc3da19e28c3a8e3f432c14f504a9..d5c1a5d12a60099d1c011f2a780ad34200b4bfc8 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -85,7 +85,7 @@ config PWM_BCM_KONA @@ -4425,7 +4425,7 @@ index 2f4641a..d5c1a5d 100644 PWM framework driver for BCM2835 controller (Raspberry Pi) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index 8b9c2a3..e842e86 100644 +index 8b9c2a38d1ccd8ae00d9f2642026438d349c8be1..e842e8613b144f16916b1fce53cba1b538b8628d 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -78,7 +78,7 @@ config SPI_ATMEL @@ -4438,7 +4438,7 @@ index 8b9c2a3..e842e86 100644 help This selects a driver for the Broadcom BCM2835 SPI master. diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig -index 1c427be..3c03d17 100644 +index 1c427beffadd97b3e95522fc9236193006d58fcc..3c03d17bc5cbca981799dee8e8bb04bf46cd1591 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -1282,7 +1282,7 @@ config BCM63XX_WDT @@ -4451,7 +4451,7 @@ index 1c427be..3c03d17 100644 help Watchdog driver for the built in watchdog hardware in Broadcom diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 6a834e1..c5070ae 100644 +index 6a834e109f1de47e533d17e87cdc73d8ee86fc4d..c5070aec5996aafb2d9daaf75163e16a29bc6892 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -1,6 +1,6 @@ @@ -4463,10 +4463,10 @@ index 6a834e1..c5070ae 100644 select REGMAP_MMIO help -From d23b18d79e915fa0a5820230ee7a35d682e7af42 Mon Sep 17 00:00:00 2001 +From e3bbd1a761820916adae6a156661312e1b78b9bb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 029/251] Add dwc_otg driver +Subject: [PATCH 029/398] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -5064,7 +5064,7 @@ dwc_otg: Remove duplicate gadget probe/unregister function create mode 100644 drivers/usb/host/dwc_otg/test/test_sysfs.pl diff --git a/arch/arm/include/asm/irqflags.h b/arch/arm/include/asm/irqflags.h -index e6b70d9..a48ccf7 100644 +index e6b70d9d084ea5d369c237f9a3f81c92e331a429..a48ccf7c73d873eb236b61e25a9e1cbde93b60e7 100644 --- a/arch/arm/include/asm/irqflags.h +++ b/arch/arm/include/asm/irqflags.h @@ -162,13 +162,23 @@ static inline unsigned long arch_local_save_flags(void) @@ -5095,7 +5095,7 @@ index e6b70d9..a48ccf7 100644 : "r" (flags) : "memory", "cc"); diff --git a/arch/arm/kernel/fiqasm.S b/arch/arm/kernel/fiqasm.S -index 8dd26e1..eef4847 100644 +index 8dd26e1a9bd69051a1548d99c157cad2e65ba81b..eef484756af2179be8acd76b9ddbd3e983605990 100644 --- a/arch/arm/kernel/fiqasm.S +++ b/arch/arm/kernel/fiqasm.S @@ -47,3 +47,7 @@ ENTRY(__get_fiq_regs) @@ -5107,7 +5107,7 @@ index 8dd26e1..eef4847 100644 + mov pc, r8 +ENDPROC(__FIQ_Branch) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile -index d5c57f1..0e15a22 100644 +index d5c57f1e98fddfffb39c948159558ca4ea09b0f3..0e15a229384919db16372bd10e1fc98189933c96 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -7,6 +7,7 @@ @@ -5119,7 +5119,7 @@ index d5c57f1..0e15a22 100644 obj-$(CONFIG_USB_DWC2) += dwc2/ obj-$(CONFIG_USB_ISP1760) += isp1760/ diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c -index 358ca8d..abaac7c 100644 +index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c0e1683f7 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c @@ -152,6 +152,7 @@ int usb_choose_configuration(struct usb_device *udev) @@ -5131,7 +5131,7 @@ index 358ca8d..abaac7c 100644 return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 2a27488..ae4dca1 100644 +index 84df093639acb18c37e7b8b45bb878d0aca2bf5a..116a774ab9c6d4315cfa9368afa62c4709ce6251 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4973,7 +4973,7 @@ static void port_event(struct usb_hub *hub, int port1) @@ -5144,7 +5144,7 @@ index 2a27488..ae4dca1 100644 USB_PORT_FEAT_C_OVER_CURRENT); msleep(100); /* Cool down */ diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 8e641b5..de3ed7d 100644 +index 8e641b5893edb7a6195c34e43248540fbff39aa6..de3ed7d5d3dd3e9b2d20025e0c35a728248f4026 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1909,6 +1909,85 @@ free_interfaces: @@ -5234,7 +5234,7 @@ index 8e641b5..de3ed7d 100644 /* Now that the interfaces are installed, re-enable LPM. */ usb_unlocked_enable_lpm(dev); diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h -index a95b0c9..17b605f 100644 +index a95b0c989c216eca774abd0709451096fda19792..17b605f5e1a3219b2c878e2aeeb45cec8e56ff3a 100644 --- a/drivers/usb/core/otg_whitelist.h +++ b/drivers/usb/core/otg_whitelist.h @@ -19,33 +19,82 @@ @@ -5392,7 +5392,7 @@ index a95b0c9..17b605f 100644 diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c new file mode 100644 -index 0000000..a896d73 +index 0000000000000000000000000000000000000000..a896d73f7a9336f5a34015c44ea5a6b04ce34f10 --- /dev/null +++ b/drivers/usb/gadget/file_storage.c @@ -0,0 +1,3676 @@ @@ -9073,7 +9073,7 @@ index 0000000..a896d73 +} +module_exit(fsg_cleanup); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 3bb0887..0905a86 100644 +index 3bb08870148f467de4869c133fa6adfef4602116..0905a86821fae896a3782e952f5ee1a5ee2cf4be 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -735,6 +735,19 @@ config USB_HWA_HCD @@ -9097,7 +9097,7 @@ index 3bb0887..0905a86 100644 tristate "i.MX21 HCD support" depends on ARM && ARCH_MXC diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile -index e7558ab..0bb50e6 100644 +index e7558abc994d76be29a347ed6904bca36d3765de..0bb50e6db87ec709648c9a8fb212a22a258799b3 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -69,6 +69,8 @@ obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o @@ -9111,7 +9111,7 @@ index e7558ab..0bb50e6 100644 obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o diff --git a/drivers/usb/host/dwc_common_port/Makefile b/drivers/usb/host/dwc_common_port/Makefile new file mode 100644 -index 0000000..f10d466 +index 0000000000000000000000000000000000000000..f10d466d1aea8696fb394aebebb9945e6b79a991 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile @@ -0,0 +1,58 @@ @@ -9175,7 +9175,7 @@ index 0000000..f10d466 + rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/ diff --git a/drivers/usb/host/dwc_common_port/Makefile.fbsd b/drivers/usb/host/dwc_common_port/Makefile.fbsd new file mode 100644 -index 0000000..45db991 +index 0000000000000000000000000000000000000000..45db9915b9d31f39dd9aaf97772b3c31234c4ce6 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile.fbsd @@ -0,0 +1,17 @@ @@ -9198,7 +9198,7 @@ index 0000000..45db991 +.include diff --git a/drivers/usb/host/dwc_common_port/Makefile.linux b/drivers/usb/host/dwc_common_port/Makefile.linux new file mode 100644 -index 0000000..0cef7b4 +index 0000000000000000000000000000000000000000..0cef7b461bd5084f261b28ebd05d62418956956e --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile.linux @@ -0,0 +1,49 @@ @@ -9253,7 +9253,7 @@ index 0000000..0cef7b4 + rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/ diff --git a/drivers/usb/host/dwc_common_port/changes.txt b/drivers/usb/host/dwc_common_port/changes.txt new file mode 100644 -index 0000000..f6839f9 +index 0000000000000000000000000000000000000000..f6839f92c2760d8dc29e514a1f6833d356cfd217 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/changes.txt @@ -0,0 +1,174 @@ @@ -9433,7 +9433,7 @@ index 0000000..f6839f9 +library code directly into a driver module, instead of as a standalone module. diff --git a/drivers/usb/host/dwc_common_port/doc/doxygen.cfg b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg new file mode 100644 -index 0000000..89aa887 +index 0000000000000000000000000000000000000000..89aa887af29dfc3a71580acec4f10dc7cf00185d --- /dev/null +++ b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg @@ -0,0 +1,270 @@ @@ -9709,7 +9709,7 @@ index 0000000..89aa887 +SEARCHENGINE = NO diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.c b/drivers/usb/host/dwc_common_port/dwc_cc.c new file mode 100644 -index 0000000..5ec2ae2 +index 0000000000000000000000000000000000000000..5ec2ae28698c15d1c441d3104706b04e9f1dde27 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.c @@ -0,0 +1,532 @@ @@ -10247,7 +10247,7 @@ index 0000000..5ec2ae2 +#endif /* DWC_CCLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.h b/drivers/usb/host/dwc_common_port/dwc_cc.h new file mode 100644 -index 0000000..f86e6f2 +index 0000000000000000000000000000000000000000..f86e6f21792b9961bda7d569f4d35f7076947546 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.h @@ -0,0 +1,224 @@ @@ -10477,7 +10477,7 @@ index 0000000..f86e6f2 +#endif /* _DWC_CC_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c new file mode 100644 -index 0000000..6dd04b5 +index 0000000000000000000000000000000000000000..6dd04b58f8f6c6d5ddad3b0b0148ff5dd936ac28 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c @@ -0,0 +1,1308 @@ @@ -11791,7 +11791,7 @@ index 0000000..6dd04b5 +} diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c new file mode 100644 -index 0000000..4664684 +index 0000000000000000000000000000000000000000..46646841dda96fb2bed01152de552ccac5f0e5e4 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c @@ -0,0 +1,1433 @@ @@ -13230,7 +13230,7 @@ index 0000000..4664684 +#endif /* DWC_LIBMODULE */ diff --git a/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c new file mode 100644 -index 0000000..49b07e1 +index 0000000000000000000000000000000000000000..49b07e1722645105e0433dceaec91add3412523f --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c @@ -0,0 +1,1275 @@ @@ -14511,7 +14511,7 @@ index 0000000..49b07e1 +} diff --git a/drivers/usb/host/dwc_common_port/dwc_crypto.c b/drivers/usb/host/dwc_common_port/dwc_crypto.c new file mode 100644 -index 0000000..3b03532 +index 0000000000000000000000000000000000000000..3b0353296148f6297b5bdc2f45e9fe92a17c680d --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_crypto.c @@ -0,0 +1,308 @@ @@ -14825,7 +14825,7 @@ index 0000000..3b03532 +#endif /* DWC_CRYPTOLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_crypto.h b/drivers/usb/host/dwc_common_port/dwc_crypto.h new file mode 100644 -index 0000000..26fcddc +index 0000000000000000000000000000000000000000..26fcddcfe9ba4b83c921cd2ef8498021176a287f --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_crypto.h @@ -0,0 +1,111 @@ @@ -14942,7 +14942,7 @@ index 0000000..26fcddc +#endif /* _DWC_CRYPTO_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_dh.c b/drivers/usb/host/dwc_common_port/dwc_dh.c new file mode 100644 -index 0000000..2b429a3 +index 0000000000000000000000000000000000000000..2b429a32aaf0903c2b73e9aa30ef78ba280393ee --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_dh.c @@ -0,0 +1,291 @@ @@ -15239,7 +15239,7 @@ index 0000000..2b429a3 +#endif /* DWC_CRYPTOLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_dh.h b/drivers/usb/host/dwc_common_port/dwc_dh.h new file mode 100644 -index 0000000..25c1cc0 +index 0000000000000000000000000000000000000000..25c1cc0d588a44b7c3594c21031e32daca2d38cc --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_dh.h @@ -0,0 +1,106 @@ @@ -15351,7 +15351,7 @@ index 0000000..25c1cc0 +#endif /* _DWC_DH_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_list.h b/drivers/usb/host/dwc_common_port/dwc_list.h new file mode 100644 -index 0000000..4ce560d +index 0000000000000000000000000000000000000000..4ce560df0cae63c7adea9af95daf4e087870346d --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_list.h @@ -0,0 +1,594 @@ @@ -15951,7 +15951,7 @@ index 0000000..4ce560d +#endif /* _DWC_LIST_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_mem.c b/drivers/usb/host/dwc_common_port/dwc_mem.c new file mode 100644 -index 0000000..ad645ff +index 0000000000000000000000000000000000000000..ad645ff1ba7e06c852440396767e69279b3b31db --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_mem.c @@ -0,0 +1,245 @@ @@ -16202,7 +16202,7 @@ index 0000000..ad645ff +#endif /* DWC_DEBUG_MEMORY */ diff --git a/drivers/usb/host/dwc_common_port/dwc_modpow.c b/drivers/usb/host/dwc_common_port/dwc_modpow.c new file mode 100644 -index 0000000..2004538 +index 0000000000000000000000000000000000000000..20045381208a31d5dfb420318b0a4fbb1eca51a1 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_modpow.c @@ -0,0 +1,636 @@ @@ -16844,7 +16844,7 @@ index 0000000..2004538 +#endif /*DWC_CRYPTOLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_modpow.h b/drivers/usb/host/dwc_common_port/dwc_modpow.h new file mode 100644 -index 0000000..64f00c2 +index 0000000000000000000000000000000000000000..64f00c276e71bf2e1d58bc9e02ff64c13489dbd4 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_modpow.h @@ -0,0 +1,34 @@ @@ -16884,7 +16884,7 @@ index 0000000..64f00c2 +#endif /* _LINUX_BIGNUM_H */ diff --git a/drivers/usb/host/dwc_common_port/dwc_notifier.c b/drivers/usb/host/dwc_common_port/dwc_notifier.c new file mode 100644 -index 0000000..8b3772a +index 0000000000000000000000000000000000000000..8b3772afe11d1d81bdb7cabe335f0f3bc834fb7a --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_notifier.c @@ -0,0 +1,319 @@ @@ -17209,7 +17209,7 @@ index 0000000..8b3772a +#endif /* DWC_NOTIFYLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_notifier.h b/drivers/usb/host/dwc_common_port/dwc_notifier.h new file mode 100644 -index 0000000..4a8cdfe +index 0000000000000000000000000000000000000000..4a8cdfe565b1fcefb400706dc7bc13cf69a9d3b2 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_notifier.h @@ -0,0 +1,122 @@ @@ -17337,7 +17337,7 @@ index 0000000..4a8cdfe +#endif /* __DWC_NOTIFIER_H__ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_common_port/dwc_os.h new file mode 100644 -index 0000000..a2bbe23 +index 0000000000000000000000000000000000000000..a2bbe232ffc3b58001d026864c3019792cdf5efa --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_os.h @@ -0,0 +1,1276 @@ @@ -18619,7 +18619,7 @@ index 0000000..a2bbe23 +#endif /* _DWC_OS_H_ */ diff --git a/drivers/usb/host/dwc_common_port/usb.h b/drivers/usb/host/dwc_common_port/usb.h new file mode 100644 -index 0000000..27bda82 +index 0000000000000000000000000000000000000000..27bda82dac2eb27923120c43aac3610974610221 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/usb.h @@ -0,0 +1,946 @@ @@ -19571,7 +19571,7 @@ index 0000000..27bda82 +#endif /* _USB_H_ */ diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile new file mode 100644 -index 0000000..e7bdd12 +index 0000000000000000000000000000000000000000..e7bdd12015fee1727a7956ae3e3b2786e88892c1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/Makefile @@ -0,0 +1,82 @@ @@ -19659,7 +19659,7 @@ index 0000000..e7bdd12 +endif diff --git a/drivers/usb/host/dwc_otg/doc/doxygen.cfg b/drivers/usb/host/dwc_otg/doc/doxygen.cfg new file mode 100644 -index 0000000..712b057 +index 0000000000000000000000000000000000000000..712b057ef7c293e8ddfa95d89e2471fb96a38006 --- /dev/null +++ b/drivers/usb/host/dwc_otg/doc/doxygen.cfg @@ -0,0 +1,224 @@ @@ -19889,7 +19889,7 @@ index 0000000..712b057 +SEARCHENGINE = NO diff --git a/drivers/usb/host/dwc_otg/dummy_audio.c b/drivers/usb/host/dwc_otg/dummy_audio.c new file mode 100644 -index 0000000..225decf +index 0000000000000000000000000000000000000000..225decf765ce825b896ba98771ccb19c20d99404 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dummy_audio.c @@ -0,0 +1,1575 @@ @@ -21470,7 +21470,7 @@ index 0000000..225decf +module_exit (cleanup); diff --git a/drivers/usb/host/dwc_otg/dwc_cfi_common.h b/drivers/usb/host/dwc_otg/dwc_cfi_common.h new file mode 100644 -index 0000000..7770e20 +index 0000000000000000000000000000000000000000..7770e201ad3bd877f1bb613284091301d084ade9 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_cfi_common.h @@ -0,0 +1,142 @@ @@ -21618,7 +21618,7 @@ index 0000000..7770e20 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.c b/drivers/usb/host/dwc_otg/dwc_otg_adp.c new file mode 100644 -index 0000000..ce0618d +index 0000000000000000000000000000000000000000..ce0618dd3f4a6b2b2e7e65ba75f1214faca7c6f0 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.c @@ -0,0 +1,854 @@ @@ -22478,7 +22478,7 @@ index 0000000..ce0618d +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.h b/drivers/usb/host/dwc_otg/dwc_otg_adp.h new file mode 100644 -index 0000000..4110b25 +index 0000000000000000000000000000000000000000..4110b25d2002ed64a760cf41bbf81c903b5bc572 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.h @@ -0,0 +1,80 @@ @@ -22564,7 +22564,7 @@ index 0000000..4110b25 +#endif //__DWC_OTG_ADP_H__ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c new file mode 100644 -index 0000000..9da0c92 +index 0000000000000000000000000000000000000000..9da0c92aaeca2fc393016442cc6578cb4a52c978 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c @@ -0,0 +1,1210 @@ @@ -23780,7 +23780,7 @@ index 0000000..9da0c92 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.h b/drivers/usb/host/dwc_otg/dwc_otg_attr.h new file mode 100644 -index 0000000..e10b67f +index 0000000000000000000000000000000000000000..e10b67f97c522094b553b7675741ba1b3cae293d --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.h @@ -0,0 +1,89 @@ @@ -23875,7 +23875,7 @@ index 0000000..e10b67f +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.c b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c new file mode 100644 -index 0000000..bbb3d32 +index 0000000000000000000000000000000000000000..bbb3d32093d029e93f903bd76f45a3f715e55afd --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c @@ -0,0 +1,1876 @@ @@ -25757,7 +25757,7 @@ index 0000000..bbb3d32 +#endif //DWC_UTE_CFI diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.h b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h new file mode 100644 -index 0000000..55fd337 +index 0000000000000000000000000000000000000000..55fd337a283c39512eb1409dfc1183c56dfd7680 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h @@ -0,0 +1,320 @@ @@ -26083,7 +26083,7 @@ index 0000000..55fd337 +#endif /* (__DWC_OTG_CFI_H__) */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.c b/drivers/usb/host/dwc_otg/dwc_otg_cil.c new file mode 100644 -index 0000000..beaa8b3 +index 0000000000000000000000000000000000000000..beaa8b3effbf0124be28db3e5f8c707330bd5402 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.c @@ -0,0 +1,7141 @@ @@ -33230,7 +33230,7 @@ index 0000000..beaa8b3 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.h b/drivers/usb/host/dwc_otg/dwc_otg_cil.h new file mode 100644 -index 0000000..79dbf83 +index 0000000000000000000000000000000000000000..79dbf8374f023e262e3bfb755ff0f67604a456cb --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.h @@ -0,0 +1,1464 @@ @@ -34700,7 +34700,7 @@ index 0000000..79dbf83 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c new file mode 100644 -index 0000000..96c76e3 +index 0000000000000000000000000000000000000000..96c76e38cd372b8ca8c375ae8d8653f32a3faf80 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -0,0 +1,1594 @@ @@ -36300,7 +36300,7 @@ index 0000000..96c76e3 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_core_if.h b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h new file mode 100644 -index 0000000..4138fd1 +index 0000000000000000000000000000000000000000..4138fd173337dd566d402d5b924d4dc121e32428 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h @@ -0,0 +1,705 @@ @@ -37011,7 +37011,7 @@ index 0000000..4138fd1 +#endif /* __DWC_CORE_IF_H__ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h new file mode 100644 -index 0000000..ccc24e0 +index 0000000000000000000000000000000000000000..ccc24e010e449cbda488050d901e9a3995236e33 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h @@ -0,0 +1,117 @@ @@ -37134,7 +37134,7 @@ index 0000000..ccc24e0 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c new file mode 100644 -index 0000000..95edadf +index 0000000000000000000000000000000000000000..95edadf088cf2aa5826d411c04ea85f3651ebc48 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -0,0 +1,1757 @@ @@ -38897,7 +38897,7 @@ index 0000000..95edadf +*/ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.h b/drivers/usb/host/dwc_otg/dwc_otg_driver.h new file mode 100644 -index 0000000..6a8be63 +index 0000000000000000000000000000000000000000..6a8be63a0ab20f4e1c56251b85648aa2a1d66383 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.h @@ -0,0 +1,86 @@ @@ -38989,7 +38989,7 @@ index 0000000..6a8be63 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c new file mode 100644 -index 0000000..85d82f3 +index 0000000000000000000000000000000000000000..85d82f31cb49631f03b23631882d2b6c063b33db --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c @@ -0,0 +1,1355 @@ @@ -40350,7 +40350,7 @@ index 0000000..85d82f3 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h new file mode 100644 -index 0000000..f9fddfb +index 0000000000000000000000000000000000000000..f9fddfbcffb37f32c808fd78f222b676378398b1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h @@ -0,0 +1,370 @@ @@ -40726,7 +40726,7 @@ index 0000000..f9fddfb +#endif /* DWC_OTG_FIQ_FSM_H_ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S b/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S new file mode 100644 -index 0000000..ffa8d21 +index 0000000000000000000000000000000000000000..ffa8d21bc61e893fee86ba04955587e7661d3ff2 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S @@ -0,0 +1,80 @@ @@ -40812,7 +40812,7 @@ index 0000000..ffa8d21 +END(_dwc_otg_fiq_stub) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c new file mode 100644 -index 0000000..135b611 +index 0000000000000000000000000000000000000000..135b611abe08e141c937612ab7baada6b13113fc --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -0,0 +1,4257 @@ @@ -45075,7 +45075,7 @@ index 0000000..135b611 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h new file mode 100644 -index 0000000..43dbed9 +index 0000000000000000000000000000000000000000..43dbed9fddbf5491bab33cc6e551b99ca8dce7dc --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -0,0 +1,862 @@ @@ -45943,7 +45943,7 @@ index 0000000..43dbed9 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c new file mode 100644 -index 0000000..ee920c4 +index 0000000000000000000000000000000000000000..ee920c4d8f4a2980e4406cb878b81d809fec4e70 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c @@ -0,0 +1,1132 @@ @@ -47081,7 +47081,7 @@ index 0000000..ee920c4 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h new file mode 100644 -index 0000000..fb57db0 +index 0000000000000000000000000000000000000000..fb57db09378f4ab95d57cb58aa570a915ccb61c3 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h @@ -0,0 +1,417 @@ @@ -47504,7 +47504,7 @@ index 0000000..fb57db0 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c new file mode 100644 -index 0000000..8db3dfc +index 0000000000000000000000000000000000000000..8db3dfcba4ffb9cf267ed1fe6b809142792f7384 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -0,0 +1,2714 @@ @@ -50224,7 +50224,7 @@ index 0000000..8db3dfc +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c new file mode 100644 -index 0000000..2ceed42 +index 0000000000000000000000000000000000000000..2ceed4212980f04ad082e78851c6a7e83aee1443 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -0,0 +1,1005 @@ @@ -51235,7 +51235,7 @@ index 0000000..2ceed42 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c new file mode 100644 -index 0000000..acd0dd7 +index 0000000000000000000000000000000000000000..acd0dd7906cccd0658baacf4e2622c447a52a049 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -0,0 +1,957 @@ @@ -52198,7 +52198,7 @@ index 0000000..acd0dd7 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h new file mode 100644 -index 0000000..6b2c7d0 +index 0000000000000000000000000000000000000000..6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h @@ -0,0 +1,188 @@ @@ -52392,7 +52392,7 @@ index 0000000..6b2c7d0 +#endif /* _DWC_OS_DEP_H_ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c new file mode 100644 -index 0000000..ae0c72d +index 0000000000000000000000000000000000000000..ae0c72d02d007d5e7ce0f2dfb79b35d3d7ef86b8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c @@ -0,0 +1,2712 @@ @@ -55110,7 +55110,7 @@ index 0000000..ae0c72d +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.h b/drivers/usb/host/dwc_otg/dwc_otg_pcd.h new file mode 100644 -index 0000000..8ef7ba6 +index 0000000000000000000000000000000000000000..8ef7ba648ad92b9b7e141f22db2a0c2837ddcfa8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.h @@ -0,0 +1,266 @@ @@ -55382,7 +55382,7 @@ index 0000000..8ef7ba6 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h new file mode 100644 -index 0000000..c8d2e0e +index 0000000000000000000000000000000000000000..c8d2e0e0c99486558a4964a8c82de80c64b496b4 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h @@ -0,0 +1,360 @@ @@ -55748,7 +55748,7 @@ index 0000000..c8d2e0e +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c new file mode 100644 -index 0000000..c8590b5 +index 0000000000000000000000000000000000000000..c8590b527110753b8064d35fab4c34226d094f84 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -0,0 +1,5147 @@ @@ -60901,7 +60901,7 @@ index 0000000..c8590b5 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c new file mode 100644 -index 0000000..0eb0f35 +index 0000000000000000000000000000000000000000..0eb0f3572d1230fdd23966c47ba9370d22bb8cb5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c @@ -0,0 +1,1280 @@ @@ -62187,7 +62187,7 @@ index 0000000..0eb0f35 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_regs.h b/drivers/usb/host/dwc_otg/dwc_otg_regs.h new file mode 100644 -index 0000000..8e0e7b5 +index 0000000000000000000000000000000000000000..8e0e7b569f1ac00fdbf3cdd2e22102cf195c74b7 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_regs.h @@ -0,0 +1,2550 @@ @@ -64743,7 +64743,7 @@ index 0000000..8e0e7b5 +#endif diff --git a/drivers/usb/host/dwc_otg/test/Makefile b/drivers/usb/host/dwc_otg/test/Makefile new file mode 100644 -index 0000000..fc45375 +index 0000000000000000000000000000000000000000..fc453759dea3e88b8f79a1a151bbcaab7e242899 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/Makefile @@ -0,0 +1,16 @@ @@ -64765,7 +64765,7 @@ index 0000000..fc45375 + done diff --git a/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm new file mode 100644 -index 0000000..85e55fd +index 0000000000000000000000000000000000000000..85e55fd6ddbc78051d65a11125d4265aea6c24e3 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm @@ -0,0 +1,337 @@ @@ -65108,7 +65108,7 @@ index 0000000..85e55fd +1; diff --git a/drivers/usb/host/dwc_otg/test/test_mod_param.pl b/drivers/usb/host/dwc_otg/test/test_mod_param.pl new file mode 100644 -index 0000000..dc3820d +index 0000000000000000000000000000000000000000..dc3820df577bae2c51bc2b1cef57ac9c4fdfc6e5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_mod_param.pl @@ -0,0 +1,133 @@ @@ -65247,7 +65247,7 @@ index 0000000..dc3820d +0; diff --git a/drivers/usb/host/dwc_otg/test/test_sysfs.pl b/drivers/usb/host/dwc_otg/test/test_sysfs.pl new file mode 100644 -index 0000000..cdc9963 +index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c578d7130a --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_sysfs.pl @@ -0,0 +1,193 @@ @@ -65445,10 +65445,10 @@ index 0000000..cdc9963 +test_main(); +0; -From 09d89e5bb8c9adc39556accbf5bb118e1609fb80 Mon Sep 17 00:00:00 2001 +From 0fe7969383547f9439d89e1455b9a113f32e2812 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 030/251] bcm2708 framebuffer driver +Subject: [PATCH 030/398] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -65530,7 +65530,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/video/fbdev/bcm2708_fb.c diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig -index e6d16d6..0f33a78 100644 +index f07a0974fda287c2feae4296ef3fc4672fb64f43..8da620f0b20ce4f1badcba83efdc2d2e5274c135 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -224,6 +224,20 @@ config FB_TILEBLITTING @@ -65555,7 +65555,7 @@ index e6d16d6..0f33a78 100644 tristate "Aeroflex Gaisler framebuffer support" depends on FB && SPARC diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile -index 50ed1b4..9b086ac 100644 +index 50ed1b4fc2bf33b3d82b10d211616765839bc818..9b086ac5fd5bb1a44460b91a2cf421e67958b6fc 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_FB_MACMODES) += macmodes.o @@ -65568,7 +65568,7 @@ index 50ed1b4..9b086ac 100644 obj-$(CONFIG_FB_CLPS711X) += clps711x-fb.o diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c new file mode 100644 -index 0000000..a20539a +index 0000000000000000000000000000000000000000..a20539a96b21228b52f4b74d7259d732baa28cc6 --- /dev/null +++ b/drivers/video/fbdev/bcm2708_fb.c @@ -0,0 +1,847 @@ @@ -66420,7 +66420,7 @@ index 0000000..a20539a +MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); +MODULE_PARM_DESC(fbswap, "Swap order of red and blue in 24 and 32 bit modes"); diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm -index 3c14e43..7626beb 100644 +index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f66ae85d0 100644 --- a/drivers/video/logo/logo_linux_clut224.ppm +++ b/drivers/video/logo/logo_linux_clut224.ppm @@ -1,1604 +1,883 @@ @@ -68910,10 +68910,10 @@ 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 -From 185a83f51686987a770243702f0c54304c60cca2 Mon Sep 17 00:00:00 2001 +From caa680c40f80f47e8f881d9df0569113caab9b36 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 031/251] dmaengine: Add support for BCM2708 +Subject: [PATCH 031/398] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69070,7 +69070,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/platform_data/dma-bcm2708.h diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 060306e..33e36b9 100644 +index 060306e6b4cbba1b8849d1212ebe2ad63aa493f7..33e36b90cfeddc4e58e233c6e655a20102a7da45 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -470,6 +470,10 @@ config TIMB_DMA @@ -69085,7 +69085,7 @@ index 060306e..33e36b9 100644 tristate "AM33xx CPPI41 DMA support" depends on ARCH_OMAP diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile -index ef9c099..e0cf5e6 100644 +index ef9c099bd2b6c4e2d09c1a14dfb6563118745c17..e0cf5e617792608cb792e2f82674d993a55802f1 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_AT_HDMAC) += at_hdmac.o @@ -69098,7 +69098,7 @@ index ef9c099..e0cf5e6 100644 obj-$(CONFIG_DMA_JZ4780) += dma-jz4780.o diff --git a/drivers/dma/bcm2708-dmaengine.c b/drivers/dma/bcm2708-dmaengine.c new file mode 100644 -index 0000000..56f18dc +index 0000000000000000000000000000000000000000..56f18dc4aa5627625e9620daa9d6482e0098af7e --- /dev/null +++ b/drivers/dma/bcm2708-dmaengine.c @@ -0,0 +1,281 @@ @@ -69385,7 +69385,7 @@ index 0000000..56f18dc +MODULE_LICENSE("GPL"); diff --git a/include/linux/platform_data/dma-bcm2708.h b/include/linux/platform_data/dma-bcm2708.h new file mode 100644 -index 0000000..99cc7fd +index 0000000000000000000000000000000000000000..99cc7fdbf543207208bf3638a0d4dbb6ec4ea8c2 --- /dev/null +++ b/include/linux/platform_data/dma-bcm2708.h @@ -0,0 +1,143 @@ @@ -69533,10 +69533,10 @@ index 0000000..99cc7fd + +#endif /* _PLAT_BCM2708_DMA_H */ -From dd0f809dccd2522c01727b2822f484ce8e9ce23a Mon Sep 17 00:00:00 2001 +From 340567cb867f641420fa841e773bf1325be5021f Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 032/251] MMC: added alternative MMC driver +Subject: [PATCH 032/398] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69611,7 +69611,7 @@ bcm2835-mmc: Don't overwrite MMC capabilities from DT create mode 100644 drivers/mmc/host/bcm2835-mmc.c diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.c -index fad660b..87ae2e9 100644 +index fad660b95809224e3a06abde0709be3d50acf307..87ae2e9beb8dfb329520b63f6d8f5a05d7d5ac36 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.c @@ -53,6 +53,7 @@ static const struct mmc_fixup mmc_fixup_methods[] = { @@ -69634,7 +69634,7 @@ index fad660b..87ae2e9 100644 } EXPORT_SYMBOL(mmc_fixup_device); diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 1dee533..9b72d2c 100644 +index 1dee533634c986d71176917f4d510a4c7214bf5a..9b72d2c2c57ebb526cd86e492e12643c1e21b5a3 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -4,6 +4,35 @@ @@ -69674,7 +69674,7 @@ index 1dee533..9b72d2c 100644 tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index 3595f83..6cf6457 100644 +index 3595f83e89dd2caf9d56cdf6ceb875ef85ece719..6cf64571597f9428299b14b639b42432e4782ff4 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -69687,7 +69687,7 @@ index 3595f83..6cf6457 100644 obj-$(CONFIG_MMC_MTK) += mtk-sd.o diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c new file mode 100644 -index 0000000..43aed6e +index 0000000000000000000000000000000000000000..43aed6eadd573aec3ac3c8ee0f418a8dbd6376ed --- /dev/null +++ b/drivers/mmc/host/bcm2835-mmc.c @@ -0,0 +1,1542 @@ @@ -71234,10 +71234,10 @@ index 0000000..43aed6e +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From e15ccca87e0a679797cbcaf24bbf2304b1e8eba3 Mon Sep 17 00:00:00 2001 +From 79972f2d8478813857b662b10478a05f933315d1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 033/251] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 033/398] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -71318,7 +71318,7 @@ is on. create mode 100644 drivers/mmc/host/bcm2835-sdhost.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 9b72d2c..d509d10 100644 +index 9b72d2c2c57ebb526cd86e492e12643c1e21b5a3..d509d10cd919d4ba941ec0cb12a3a17bb0b9b818 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -33,6 +33,16 @@ config MMC_BCM2835_PIO_DMA_BARRIER @@ -71339,7 +71339,7 @@ index 9b72d2c..d509d10 100644 tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index 6cf6457..df27ae9 100644 +index 6cf64571597f9428299b14b639b42432e4782ff4..df27ae938c9a5c5f923fa2ddb7c0ff24d5244ddb 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -71352,7 +71352,7 @@ index 6cf6457..df27ae9 100644 obj-$(CONFIG_MMC_AU1X) += au1xmmc.o diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c new file mode 100644 -index 0000000..da08998 +index 0000000000000000000000000000000000000000..da089985f94beebae4a25878cd88a871e08527fa --- /dev/null +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -0,0 +1,1907 @@ @@ -73264,10 +73264,10 @@ index 0000000..da08998 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From a5a139f18bcc782f2cc3a1de66c936ce2dbb6ffb Mon Sep 17 00:00:00 2001 +From dba4ead3642c6d0813d702bab93968dd69b9a284 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 034/251] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 034/398] cma: Add vc_cma driver to enable use of CMA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -73299,7 +73299,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vc_cma.h diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index a043107..2ba2d82 100644 +index a043107da2af775d567126174107c23ff89a5afb..2ba2d82de41ebdc9ed1c3630fb733076dd9bfe03 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -4,6 +4,8 @@ @@ -73312,7 +73312,7 @@ index a043107..2ba2d82 100644 config DEVMEM diff --git a/drivers/char/Makefile b/drivers/char/Makefile -index d8a7579..9d8662e 100644 +index d8a7579300d2df1112446c3a69a29713fd2af163..9d8662e2ccc637cabb56e31c936ca23bcc15e120 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -60,3 +60,4 @@ js-rtc-y = rtc.o @@ -73322,7 +73322,7 @@ index d8a7579..9d8662e 100644 +obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/ diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig new file mode 100644 -index 0000000..2d8bd6e +index 0000000000000000000000000000000000000000..2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0 --- /dev/null +++ b/drivers/char/broadcom/Kconfig @@ -0,0 +1,15 @@ @@ -73343,14 +73343,14 @@ index 0000000..2d8bd6e + Helper for videocore CMA access. diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile new file mode 100644 -index 0000000..13c5bca +index 0000000000000000000000000000000000000000..13c5bca291ccc0df090c4e61169ace8f18ba60fe --- /dev/null +++ b/drivers/char/broadcom/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_BCM_VC_CMA) += vc_cma/ diff --git a/drivers/char/broadcom/vc_cma/Makefile b/drivers/char/broadcom/vc_cma/Makefile new file mode 100644 -index 0000000..6a94de4 +index 0000000000000000000000000000000000000000..6a94de4a7576f7c608f5bd01eb9f21a1a852120f --- /dev/null +++ b/drivers/char/broadcom/vc_cma/Makefile @@ -0,0 +1,14 @@ @@ -73370,7 +73370,7 @@ index 0000000..6a94de4 +vc-cma-objs := vc_cma.o diff --git a/drivers/char/broadcom/vc_cma/vc_cma.c b/drivers/char/broadcom/vc_cma/vc_cma.c new file mode 100644 -index 0000000..85f6e9d +index 0000000000000000000000000000000000000000..85f6e9da9e5baa0abfba618a171881c078f38496 --- /dev/null +++ b/drivers/char/broadcom/vc_cma/vc_cma.c @@ -0,0 +1,1193 @@ @@ -74569,7 +74569,7 @@ index 0000000..85f6e9d +MODULE_AUTHOR("Broadcom Corporation"); diff --git a/include/linux/broadcom/vc_cma.h b/include/linux/broadcom/vc_cma.h new file mode 100644 -index 0000000..be2819d +index 0000000000000000000000000000000000000000..be2819d5d41f9d5ed65daf8eedb94c9e9a4c2f1a --- /dev/null +++ b/include/linux/broadcom/vc_cma.h @@ -0,0 +1,36 @@ @@ -74610,10 +74610,10 @@ index 0000000..be2819d + +#endif /* VC_CMA_H */ -From 79708ff24769bfa53cc800dd05f951340829cc5d Mon Sep 17 00:00:00 2001 +From 612dc56e2c5d0cda830817390d463ce164f464f8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 035/251] bcm2708: alsa sound driver +Subject: [PATCH 035/398] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -74668,7 +74668,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 sound/arm/vc_vchi_audioserv_defs.h diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig -index e040621..7746e5d 100644 +index e0406211716b003daae37efbc8cdfd73213b31f3..7746e5d28d49f2ea9161546b35ae278a718101b5 100644 --- a/sound/arm/Kconfig +++ b/sound/arm/Kconfig @@ -40,5 +40,13 @@ config SND_PXA2XX_AC97 @@ -74686,7 +74686,7 @@ index e040621..7746e5d 100644 endif # SND_ARM diff --git a/sound/arm/Makefile b/sound/arm/Makefile -index 8c0c851..6796d7f 100644 +index 8c0c851d464109819beb296c2624bbec7af131e9..6796d7f5c7803ccfdaadbe56b2520c5454678686 100644 --- a/sound/arm/Makefile +++ b/sound/arm/Makefile @@ -14,3 +14,8 @@ snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97) += pxa2xx-ac97-lib.o @@ -74700,7 +74700,7 @@ index 8c0c851..6796d7f 100644 +ccflags-y += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c new file mode 100755 -index 0000000..aad905f +index 0000000000000000000000000000000000000000..aad905f1fe12d9f6c5f72e4ec0134be420f2580c --- /dev/null +++ b/sound/arm/bcm2835-ctl.c @@ -0,0 +1,323 @@ @@ -75029,7 +75029,7 @@ index 0000000..aad905f +} diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c new file mode 100755 -index 0000000..8c86375 +index 0000000000000000000000000000000000000000..8c863758ff030f84889be7a01333e63bf05b909a --- /dev/null +++ b/sound/arm/bcm2835-pcm.c @@ -0,0 +1,557 @@ @@ -75592,7 +75592,7 @@ index 0000000..8c86375 +} diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c new file mode 100755 -index 0000000..3de3094 +index 0000000000000000000000000000000000000000..3de30945d8155b90d244734881a7caa81930fa7c --- /dev/null +++ b/sound/arm/bcm2835-vchiq.c @@ -0,0 +1,902 @@ @@ -76500,7 +76500,7 @@ index 0000000..3de3094 +MODULE_PARM_DESC(force_bulk, "Force use of vchiq bulk for audio"); diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c new file mode 100644 -index 0000000..6b545e7 +index 0000000000000000000000000000000000000000..6b545e786c5618955b74feff2af52abdefff2e3e --- /dev/null +++ b/sound/arm/bcm2835.c @@ -0,0 +1,511 @@ @@ -77017,7 +77017,7 @@ index 0000000..6b545e7 +MODULE_ALIAS("platform:bcm2835_alsa"); diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h new file mode 100755 -index 0000000..0f71c5d +index 0000000000000000000000000000000000000000..0f71c5def314a63252fa4fe18ae2ba5a339f2cfb --- /dev/null +++ b/sound/arm/bcm2835.h @@ -0,0 +1,167 @@ @@ -77190,7 +77190,7 @@ index 0000000..0f71c5d +#endif /* __SOUND_ARM_BCM2835_H */ diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h new file mode 100644 -index 0000000..af3e6eb +index 0000000000000000000000000000000000000000..af3e6eb690113fc32ce9e06bd2f0f294da7a7f00 --- /dev/null +++ b/sound/arm/vc_vchi_audioserv_defs.h @@ -0,0 +1,116 @@ @@ -77311,10 +77311,10 @@ index 0000000..af3e6eb + +#endif // _VC_AUDIO_DEFS_H_ -From 522686ae5036c50971853fee0fdb371ed8309222 Mon Sep 17 00:00:00 2001 +From 18c12602f6f7554e6c9e7d22f5b470070a1449f3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 036/251] bcm2708 vchiq driver +Subject: [PATCH 036/398] bcm2708 vchiq driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77558,7 +77558,7 @@ vchiq: hack: Add include depecated dma include file create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h -index 4fb43cf..e98ec5a 100644 +index 4fb43cf391e50e702d0a0588ceff397c79c501d7..e98ec5acc70ba9eb2bc7ff560ed3c92e21518b73 100644 --- a/arch/arm/mach-bcm2708/include/mach/platform.h +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -78,6 +78,8 @@ @@ -77571,7 +77571,7 @@ index 4fb43cf..e98ec5a 100644 /* * Watchdog diff --git a/arch/arm/mach-bcm2709/include/mach/platform.h b/arch/arm/mach-bcm2709/include/mach/platform.h -index 311b9f2..9a638f5 100644 +index 311b9f26fab7dd770bdcd684c7691442b0872d55..9a638f528fcebc9206419a2cc68f3c9856dda3c3 100644 --- a/arch/arm/mach-bcm2709/include/mach/platform.h +++ b/arch/arm/mach-bcm2709/include/mach/platform.h @@ -78,6 +78,8 @@ @@ -77584,7 +77584,7 @@ index 311b9f2..9a638f5 100644 /* * Watchdog diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index 22892c7..b859ce0 100644 +index 4bf7d50b1bc7cc8ccb55171d9ca76ac3bd6fe114..339f75b98129bf10752bf9f4666f2883c4f09414 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -533,6 +533,7 @@ source "drivers/misc/lis3lv02d/Kconfig" @@ -77596,7 +77596,7 @@ index 22892c7..b859ce0 100644 source "drivers/misc/genwqe/Kconfig" source "drivers/misc/echo/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile -index 537d7f3..ac24d77 100644 +index 537d7f3b78da9a35afcf4fe41053bbcbef1dd1f2..ac24d7735306954abd9f9327e7a56ed334afc591 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -51,6 +51,7 @@ obj-$(CONFIG_INTEL_MEI) += mei/ @@ -77609,7 +77609,7 @@ index 537d7f3..ac24d77 100644 obj-$(CONFIG_ECHO) += echo/ diff --git a/drivers/misc/vc04_services/Kconfig b/drivers/misc/vc04_services/Kconfig new file mode 100644 -index 0000000..db8e1be +index 0000000000000000000000000000000000000000..db8e1beb89f9f8c48ea5964016c8285ea82497d8 --- /dev/null +++ b/drivers/misc/vc04_services/Kconfig @@ -0,0 +1,9 @@ @@ -77624,7 +77624,7 @@ index 0000000..db8e1be + are included in the build, N otherwise. diff --git a/drivers/misc/vc04_services/Makefile b/drivers/misc/vc04_services/Makefile new file mode 100644 -index 0000000..8d038fe +index 0000000000000000000000000000000000000000..8d038feb42105cb2cad688690086ba69379b12e1 --- /dev/null +++ b/drivers/misc/vc04_services/Makefile @@ -0,0 +1,14 @@ @@ -77644,7 +77644,7 @@ index 0000000..8d038fe + diff --git a/drivers/misc/vc04_services/interface/vchi/connections/connection.h b/drivers/misc/vc04_services/interface/vchi/connections/connection.h new file mode 100644 -index 0000000..fef6ac3 +index 0000000000000000000000000000000000000000..fef6ac34c6d2c04dfdba66f33850e72c24c613c2 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/connections/connection.h @@ -0,0 +1,328 @@ @@ -77978,7 +77978,7 @@ index 0000000..fef6ac3 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h b/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h new file mode 100644 -index 0000000..8b3f767 +index 0000000000000000000000000000000000000000..8b3f76735bd45ab09a12dc6e17e335241fd11755 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h @@ -0,0 +1,204 @@ @@ -78188,7 +78188,7 @@ index 0000000..8b3f767 +/****************************** End of file ***********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi.h b/drivers/misc/vc04_services/interface/vchi/vchi.h new file mode 100644 -index 0000000..1b17e98 +index 0000000000000000000000000000000000000000..1b17e98f737979eef19906609bc19ecd19455618 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi.h @@ -0,0 +1,378 @@ @@ -78572,7 +78572,7 @@ index 0000000..1b17e98 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h new file mode 100644 -index 0000000..26bc2d3 +index 0000000000000000000000000000000000000000..26bc2d38d725e3c4c24a4cb894da11e65d01625a --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h @@ -0,0 +1,224 @@ @@ -78802,7 +78802,7 @@ index 0000000..26bc2d3 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h new file mode 100644 -index 0000000..35dcba4 +index 0000000000000000000000000000000000000000..35dcba4837d492307f3b273acaefa752cdbd6478 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h @@ -0,0 +1,71 @@ @@ -78879,7 +78879,7 @@ index 0000000..35dcba4 +#endif /*VCHI_CFG_INTERNAL_H_*/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_common.h b/drivers/misc/vc04_services/interface/vchi/vchi_common.h new file mode 100644 -index 0000000..d535a72 +index 0000000000000000000000000000000000000000..d535a72970d3f1ee63d2038550db8f4e43589c72 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_common.h @@ -0,0 +1,175 @@ @@ -79060,7 +79060,7 @@ index 0000000..d535a72 +#endif // VCHI_COMMON_H_ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_mh.h b/drivers/misc/vc04_services/interface/vchi/vchi_mh.h new file mode 100644 -index 0000000..198bd07 +index 0000000000000000000000000000000000000000..198bd076b6668d729e0b6619a1f38eb927a2398b --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_mh.h @@ -0,0 +1,42 @@ @@ -79108,7 +79108,7 @@ index 0000000..198bd07 +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h new file mode 100644 -index 0000000..ad398ba +index 0000000000000000000000000000000000000000..ad398bae6ee4c3d64fc1a37808398397a9a0fefe --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h @@ -0,0 +1,40 @@ @@ -79154,7 +79154,7 @@ index 0000000..ad398ba +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h new file mode 100644 -index 0000000..7ea5c64 +index 0000000000000000000000000000000000000000..7ea5c64d5343d43786903161518ef1ce0287e27d --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h @@ -0,0 +1,42 @@ @@ -79202,7 +79202,7 @@ index 0000000..7ea5c64 +#endif /* VCHIQ_2835_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c new file mode 100644 -index 0000000..c29040f +index 0000000000000000000000000000000000000000..c29040fdf9a7757b7c0d428616e244a6e4d5f697 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -0,0 +1,586 @@ @@ -79794,7 +79794,7 @@ index 0000000..c29040f +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c new file mode 100644 -index 0000000..e11c0e0 +index 0000000000000000000000000000000000000000..e11c0e07471bc7ebba04e48d3efc746236ec2f4e --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -0,0 +1,2903 @@ @@ -82703,7 +82703,7 @@ index 0000000..e11c0e0 +MODULE_AUTHOR("Broadcom Corporation"); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h new file mode 100644 -index 0000000..9740e1a +index 0000000000000000000000000000000000000000..9740e1afbc9dc6223f2fea5106916062a3e783ce --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -0,0 +1,220 @@ @@ -82929,7 +82929,7 @@ index 0000000..9740e1a +#endif /* VCHIQ_ARM_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h new file mode 100644 -index 0000000..df64581 +index 0000000000000000000000000000000000000000..df645813bdaeb2cd6296154af434ebc1b0c5939a --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h @@ -0,0 +1,37 @@ @@ -82972,7 +82972,7 @@ index 0000000..df64581 +const char *vchiq_get_build_date(void); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h new file mode 100644 -index 0000000..d2797db +index 0000000000000000000000000000000000000000..d2797db702f9fd2e35beb3dd2d5ac9323ccedfc6 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h @@ -0,0 +1,69 @@ @@ -83047,7 +83047,7 @@ index 0000000..d2797db +#endif /* VCHIQ_CFG_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c new file mode 100644 -index 0000000..5efc62f +index 0000000000000000000000000000000000000000..5efc62ffb2f5e441cb307d0a575565338b407249 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -0,0 +1,120 @@ @@ -83173,7 +83173,7 @@ index 0000000..5efc62f +EXPORT_SYMBOL(vchiq_add_connected_callback); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h new file mode 100644 -index 0000000..863b3e3 +index 0000000000000000000000000000000000000000..863b3e335c1aa4bbe7f8652e0e6c3713ea1aed45 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h @@ -0,0 +1,50 @@ @@ -83229,7 +83229,7 @@ index 0000000..863b3e3 +#endif /* VCHIQ_CONNECTED_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c new file mode 100644 -index 0000000..2c98da4 +index 0000000000000000000000000000000000000000..2c98da4307dff994a00dc246574ef0aaee05d5da --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -0,0 +1,3934 @@ @@ -87169,7 +87169,7 @@ index 0000000..2c98da4 +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h new file mode 100644 -index 0000000..9be484c +index 0000000000000000000000000000000000000000..9be484c776d044a51bb3904c6a1e2cd11a852e35 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -0,0 +1,712 @@ @@ -87887,7 +87887,7 @@ index 0000000..9be484c +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c new file mode 100644 -index 0000000..7e03213 +index 0000000000000000000000000000000000000000..7e032130d967a69384926ddbe614e9af4be8f22e --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c @@ -0,0 +1,383 @@ @@ -88276,7 +88276,7 @@ index 0000000..7e03213 +#endif /* CONFIG_DEBUG_FS */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h new file mode 100644 -index 0000000..4d6a378 +index 0000000000000000000000000000000000000000..4d6a3788e9c508c9eb1379980c4f3a67791e428e --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h @@ -0,0 +1,52 @@ @@ -88334,7 +88334,7 @@ index 0000000..4d6a378 +#endif /* VCHIQ_DEBUGFS_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion new file mode 100644 -index 0000000..9f5b634 +index 0000000000000000000000000000000000000000..9f5b6344b9b77f72ebd4ff6621c90fd0ac47efb1 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion @@ -0,0 +1,87 @@ @@ -88427,7 +88427,7 @@ index 0000000..9f5b634 +EOF diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h new file mode 100644 -index 0000000..8067bbe +index 0000000000000000000000000000000000000000..8067bbe7ce8d70c41b2e6e0466d20a4612e39d93 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h @@ -0,0 +1,189 @@ @@ -88622,7 +88622,7 @@ index 0000000..8067bbe +#endif /* VCHIQ_IF_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h new file mode 100644 -index 0000000..6137ae9 +index 0000000000000000000000000000000000000000..6137ae9de1c19cb0ffc486dc60505061a10aea6c --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h @@ -0,0 +1,131 @@ @@ -88759,7 +88759,7 @@ index 0000000..6137ae9 +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c new file mode 100644 -index 0000000..25e7011 +index 0000000000000000000000000000000000000000..25e7011edc5094372919d7e3be482f3bbd7b6155 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c @@ -0,0 +1,458 @@ @@ -89223,7 +89223,7 @@ index 0000000..25e7011 +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h new file mode 100644 -index 0000000..335446e +index 0000000000000000000000000000000000000000..335446e05476c3dbb905a69e45b37a2702566bf6 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h @@ -0,0 +1,69 @@ @@ -89298,7 +89298,7 @@ index 0000000..335446e +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h new file mode 100644 -index 0000000..d02e776 +index 0000000000000000000000000000000000000000..d02e7764bd0d8721453d2e0a4900c26c12634c8b --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h @@ -0,0 +1,71 @@ @@ -89375,7 +89375,7 @@ index 0000000..d02e776 +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h new file mode 100644 -index 0000000..54a3ece +index 0000000000000000000000000000000000000000..54a3ecec69ef6702c382a7af339d21b87ec8a346 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h @@ -0,0 +1,58 @@ @@ -89439,7 +89439,7 @@ index 0000000..54a3ece +#endif /* VCHIQ_PAGELIST_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c new file mode 100644 -index 0000000..8072ff6 +index 0000000000000000000000000000000000000000..8072ff613636121d50293693d0bd2aaf0b6e07b5 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -0,0 +1,860 @@ @@ -90305,7 +90305,7 @@ index 0000000..8072ff6 +EXPORT_SYMBOL(vchi_service_release); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c new file mode 100644 -index 0000000..384acb8 +index 0000000000000000000000000000000000000000..384acb8d2eae12eca8aa955c274467f120e8824f --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c @@ -0,0 +1,156 @@ @@ -90467,7 +90467,7 @@ index 0000000..384acb8 +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h new file mode 100644 -index 0000000..4055d4b +index 0000000000000000000000000000000000000000..4055d4bf9f740ab9f10a7e44673b9795681981f7 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h @@ -0,0 +1,82 @@ @@ -90555,7 +90555,7 @@ index 0000000..4055d4b +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c new file mode 100644 -index 0000000..b6bfa21 +index 0000000000000000000000000000000000000000..b6bfa21155e431e93bfb2c149d32437184c2b6e3 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c @@ -0,0 +1,59 @@ @@ -90619,10 +90619,10 @@ index 0000000..b6bfa21 + return vchiq_build_time; +} -From a4ad9bf42376a39e5314f41ecd1ea8fbafb4ca46 Mon Sep 17 00:00:00 2001 +From bbf75cf8590d40fcaefe5ba87750f58af07e0cb2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 16:07:06 +0100 -Subject: [PATCH 037/251] vc_mem: Add vc_mem driver +Subject: [PATCH 037/398] vc_mem: Add vc_mem driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -90649,7 +90649,7 @@ Signed-off-by: Noralf Trønnes diff --git a/arch/arm/mach-bcm2709/include/mach/vc_mem.h b/arch/arm/mach-bcm2709/include/mach/vc_mem.h deleted file mode 100644 -index 4a4a338..0000000 +index 4a4a33845cbc02f0e0d5368fed3609f6ba9ff92b..0000000000000000000000000000000000000000 --- a/arch/arm/mach-bcm2709/include/mach/vc_mem.h +++ /dev/null @@ -1,35 +0,0 @@ @@ -90690,7 +90690,7 @@ index 4a4a338..0000000 -#endif /* VC_MEM_H */ diff --git a/arch/arm/mach-bcm2709/vc_mem.c b/arch/arm/mach-bcm2709/vc_mem.c deleted file mode 100644 -index d2adfd1..0000000 +index d2adfd1db2421984ea8ab8fb809d1adb0765714e..0000000000000000000000000000000000000000 --- a/arch/arm/mach-bcm2709/vc_mem.c +++ /dev/null @@ -1,431 +0,0 @@ @@ -91126,7 +91126,7 @@ index d2adfd1..0000000 -module_param(mem_size, uint, 0644); -module_param(mem_base, uint, 0644); diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 2d8bd6e..7037928 100644 +index 2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0..70379287f6261fd833202ac47de1bcca8b84959a 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -7,9 +7,19 @@ menuconfig BRCM_CHAR_DRIVERS @@ -91151,7 +91151,7 @@ index 2d8bd6e..7037928 100644 + +endif diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index 13c5bca..fce918c 100644 +index 13c5bca291ccc0df090c4e61169ace8f18ba60fe..fce918c369f7a9430136fea3ab098350339f1b01 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1 +1,2 @@ @@ -91159,7 +91159,7 @@ index 13c5bca..fce918c 100644 +obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o diff --git a/drivers/char/broadcom/vc_mem.c b/drivers/char/broadcom/vc_mem.c new file mode 100644 -index 0000000..be64f23 +index 0000000000000000000000000000000000000000..be64f238ee0cc1e57f9401b0ee16c23e9fa238cc --- /dev/null +++ b/drivers/char/broadcom/vc_mem.c @@ -0,0 +1,422 @@ @@ -91587,7 +91587,7 @@ index 0000000..be64f23 +module_param(mem_base, uint, 0644); diff --git a/include/linux/broadcom/vc_mem.h b/include/linux/broadcom/vc_mem.h new file mode 100644 -index 0000000..20a4753 +index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35a58411b4 --- /dev/null +++ b/include/linux/broadcom/vc_mem.h @@ -0,0 +1,35 @@ @@ -91627,10 +91627,10 @@ index 0000000..20a4753 + +#endif /* _VC_MEM_H */ -From c18ab896c13c1824cdc4c8c544f2576e778d4595 Mon Sep 17 00:00:00 2001 +From 4521923bc57b81154f2186ec5249d601415cd0cf Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 038/251] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/398] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -91690,7 +91690,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vmcs_sm_ioctl.h diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 7037928..75fa1cb 100644 +index 70379287f6261fd833202ac47de1bcca8b84959a..75fa1cba764084160f7cb77e56058f25b5e9f0ce 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -23,3 +23,12 @@ config BCM2708_VCMEM @@ -91707,7 +91707,7 @@ index 7037928..75fa1cb 100644 + Support for the VC shared memory on the Broadcom reference + design. Uses the VCHIQ stack. diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index fce918c..de8feb9 100644 +index fce918c369f7a9430136fea3ab098350339f1b01..de8feb98c63ff1e6437d80a6db85a8d30f433705 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1,2 +1,3 @@ @@ -91716,7 +91716,7 @@ index fce918c..de8feb9 100644 +obj-$(CONFIG_BCM_VC_SM) += vc_sm/ diff --git a/drivers/char/broadcom/vc_sm/Makefile b/drivers/char/broadcom/vc_sm/Makefile new file mode 100644 -index 0000000..68fa2aa +index 0000000000000000000000000000000000000000..68fa2aa7f725d3587c47c22489efc3418e48dce8 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/Makefile @@ -0,0 +1,20 @@ @@ -91742,7 +91742,7 @@ index 0000000..68fa2aa + vc_vchi_sm.o diff --git a/drivers/char/broadcom/vc_sm/vc_sm_defs.h b/drivers/char/broadcom/vc_sm/vc_sm_defs.h new file mode 100644 -index 0000000..c4d5ff7 +index 0000000000000000000000000000000000000000..c4d5ff718a5ba9071ef87fa4c6cf632486c4d36f --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_sm_defs.h @@ -0,0 +1,181 @@ @@ -91929,7 +91929,7 @@ index 0000000..c4d5ff7 +#endif /* __VC_SM_DEFS_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vc_sm_knl.h b/drivers/char/broadcom/vc_sm/vc_sm_knl.h new file mode 100644 -index 0000000..965f9a2 +index 0000000000000000000000000000000000000000..965f9a209a025202fea8065d3947c36f4fa43d0a --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_sm_knl.h @@ -0,0 +1,55 @@ @@ -91990,7 +91990,7 @@ index 0000000..965f9a2 +#endif /* __VC_SM_KNL_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.c b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c new file mode 100644 -index 0000000..7c6ba1a +index 0000000000000000000000000000000000000000..7c6ba1a244a8aff8132e0177e02b2b2a6cd364e0 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.c @@ -0,0 +1,492 @@ @@ -92488,7 +92488,7 @@ index 0000000..7c6ba1a +} diff --git a/drivers/char/broadcom/vc_sm/vc_vchi_sm.h b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h new file mode 100644 -index 0000000..5e279f5 +index 0000000000000000000000000000000000000000..5e279f5a95fac7227cea15941bf0570ddc2b0886 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vc_vchi_sm.h @@ -0,0 +1,82 @@ @@ -92576,7 +92576,7 @@ index 0000000..5e279f5 +#endif /* __VC_VCHI_SM_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c new file mode 100644 -index 0000000..5d16e35 +index 0000000000000000000000000000000000000000..5d16e356bbdd275856d43f75d00ef6c086dbb09e --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c @@ -0,0 +1,3211 @@ @@ -95793,7 +95793,7 @@ index 0000000..5d16e35 +MODULE_LICENSE("GPL v2"); diff --git a/include/linux/broadcom/vmcs_sm_ioctl.h b/include/linux/broadcom/vmcs_sm_ioctl.h new file mode 100644 -index 0000000..334f36d +index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f38cf76564 --- /dev/null +++ b/include/linux/broadcom/vmcs_sm_ioctl.h @@ -0,0 +1,248 @@ @@ -96046,10 +96046,10 @@ index 0000000..334f36d + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From d778ec78cbc50597690495a4767dad44d9329547 Mon Sep 17 00:00:00 2001 +From 930053c4bb99207bb32254a38cd796c0a2aca0dd Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 039/251] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/398] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -96066,7 +96066,7 @@ See: https://github.com/raspberrypi/linux/issues/1154 create mode 100644 drivers/char/broadcom/bcm2835-gpiomem.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 75fa1cb..b75c9b2 100644 +index 75fa1cba764084160f7cb77e56058f25b5e9f0ce..b75c9b2639fb0e63dd2623ddc1dcaac5759c132b 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -32,3 +32,12 @@ config BCM_VC_SM @@ -96083,7 +96083,7 @@ index 75fa1cb..b75c9b2 100644 + register page to the user's pointer. + diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index de8feb9..1eb06e9 100644 +index de8feb98c63ff1e6437d80a6db85a8d30f433705..1eb06e9788663c3e75d201a559db55556cecfe2b 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1,3 +1,6 @@ @@ -96095,7 +96095,7 @@ index de8feb9..1eb06e9 100644 + diff --git a/drivers/char/broadcom/bcm2835-gpiomem.c b/drivers/char/broadcom/bcm2835-gpiomem.c new file mode 100644 -index 0000000..911f5b7 +index 0000000000000000000000000000000000000000..911f5b7393ed48ceed8751f06967ae6463453f9c --- /dev/null +++ b/drivers/char/broadcom/bcm2835-gpiomem.c @@ -0,0 +1,260 @@ @@ -96360,10 +96360,10 @@ index 0000000..911f5b7 +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 684fa35717d47554b4e019f45e513b58823b50dc Mon Sep 17 00:00:00 2001 +From 24a48c21ffc517ff14af16b6b8ee34c7fb78393c Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 040/251] Add SMI driver +Subject: [PATCH 040/398] Add SMI driver Signed-off-by: Luke Wren --- @@ -96385,7 +96385,7 @@ Signed-off-by: Luke Wren diff --git a/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt new file mode 100644 -index 0000000..68cc8eb +index 0000000000000000000000000000000000000000..68cc8ebc3392d45cbccac0dc0354514076d43398 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt @@ -0,0 +1,17 @@ @@ -96408,7 +96408,7 @@ index 0000000..68cc8eb + diff --git a/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt new file mode 100644 -index 0000000..b76dc69 +index 0000000000000000000000000000000000000000..b76dc694f1ac0b8044000ae54d312c803b1ef6f7 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt @@ -0,0 +1,48 @@ @@ -96461,7 +96461,7 @@ index 0000000..b76dc69 +}; + diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index b75c9b2..2292ed2 100644 +index b75c9b2639fb0e63dd2623ddc1dcaac5759c132b..2292ed2ac9f457a7d491110e673666136faa5a5e 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -41,3 +41,11 @@ config BCM2835_DEVGPIOMEM @@ -96477,7 +96477,7 @@ index b75c9b2..2292ed2 100644 + Broadcom's Secondary Memory interface. The low-level functionality is provided + by the SMI driver itself. diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index 1eb06e9..667d33e 100644 +index 1eb06e9788663c3e75d201a559db55556cecfe2b..667d33ef38f3512b52818537c11d369798b6f1c0 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -3,4 +3,4 @@ obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o @@ -96488,7 +96488,7 @@ index 1eb06e9..667d33e 100644 +obj-$(CONFIG_BCM2835_SMI_DEV) += bcm2835_smi_dev.o diff --git a/drivers/char/broadcom/bcm2835_smi_dev.c b/drivers/char/broadcom/bcm2835_smi_dev.c new file mode 100644 -index 0000000..d6efd92 +index 0000000000000000000000000000000000000000..d6efd92fdfe46df5cfe219d2123e0dff23dc5ab7 --- /dev/null +++ b/drivers/char/broadcom/bcm2835_smi_dev.c @@ -0,0 +1,402 @@ @@ -96895,7 +96895,7 @@ index 0000000..d6efd92 + "Character device driver for BCM2835's secondary memory interface"); +MODULE_AUTHOR("Luke Wren "); diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index b859ce0..b978ba9 100644 +index 339f75b98129bf10752bf9f4666f2883c4f09414..e7c274d8a9354a0e17edd141efd7a0a629a2627e 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -10,6 +10,14 @@ config SENSORS_LIS3LV02D @@ -96914,7 +96914,7 @@ index b859ce0..b978ba9 100644 tristate "Analog Devices Digital Potentiometers" depends on (I2C || SPI) && SYSFS diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile -index ac24d77..1acff5b 100644 +index ac24d7735306954abd9f9327e7a56ed334afc591..1acff5beaeda4f7da492e34376503bafcb1bcc13 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_AD525X_DPOT_SPI) += ad525x_dpot-spi.o @@ -96927,7 +96927,7 @@ index ac24d77..1acff5b 100644 obj-$(CONFIG_BMP085_SPI) += bmp085-spi.o diff --git a/drivers/misc/bcm2835_smi.c b/drivers/misc/bcm2835_smi.c new file mode 100644 -index 0000000..63a4ea0 +index 0000000000000000000000000000000000000000..63a4ea08b9930a3a31a985f0a1d969b488ed49ec --- /dev/null +++ b/drivers/misc/bcm2835_smi.c @@ -0,0 +1,985 @@ @@ -97918,7 +97918,7 @@ index 0000000..63a4ea0 +MODULE_AUTHOR("Luke Wren "); diff --git a/include/linux/broadcom/bcm2835_smi.h b/include/linux/broadcom/bcm2835_smi.h new file mode 100644 -index 0000000..ee3a75e +index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10fd8543a3 --- /dev/null +++ b/include/linux/broadcom/bcm2835_smi.h @@ -0,0 +1,391 @@ @@ -98314,10 +98314,10 @@ index 0000000..ee3a75e + +#endif /* BCM2835_SMI_H */ -From d6893b8f68df96a0dd728a1ea8518af748d3de55 Mon Sep 17 00:00:00 2001 +From 8d8b653aadb22cfb362afe0f8db547e859d11f54 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 041/251] Add SMI NAND driver +Subject: [PATCH 041/398] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -98331,7 +98331,7 @@ Signed-off-by: Luke Wren diff --git a/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt b/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt new file mode 100644 -index 0000000..159544d +index 0000000000000000000000000000000000000000..159544d6579070d376d146bd24a86653e7245707 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt @@ -0,0 +1,42 @@ @@ -98379,7 +98379,7 @@ index 0000000..159544d +}; \ No newline at end of file diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig -index 2896640..56ff00b 100644 +index 289664089cf32ce9770baefba951e089f0681a11..56ff00b69b848ccb8008db08560b36b04170182b 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -41,6 +41,13 @@ config MTD_SM_COMMON @@ -98397,7 +98397,7 @@ index 2896640..56ff00b 100644 tristate diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile -index 2c7f014..30e22f0 100644 +index 2c7f014b349e56c50b6fd2cf109bd5ed0f9f7eb7..30e22f0cff78bb8a3df7ef52b148af314e75d9a2 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_MTD_NAND_DENALI) += denali.o @@ -98410,7 +98410,7 @@ index 2c7f014..30e22f0 100644 obj-$(CONFIG_MTD_NAND_DAVINCI) += davinci_nand.o diff --git a/drivers/mtd/nand/bcm2835_smi_nand.c b/drivers/mtd/nand/bcm2835_smi_nand.c new file mode 100644 -index 0000000..b747326 +index 0000000000000000000000000000000000000000..b7473263afceadd8d5debefd11a8de1d4fa067fb --- /dev/null +++ b/drivers/mtd/nand/bcm2835_smi_nand.c @@ -0,0 +1,268 @@ @@ -98683,10 +98683,10 @@ index 0000000..b747326 + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 90d547aa8fc1259726f56f404af4ecf9dff6ba0e Mon Sep 17 00:00:00 2001 +From 6f81a327ee297185753af41cb99fa6d13a61fb77 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 042/251] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 042/398] lirc: added support for RaspberryPi GPIO lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: https://github.com/raspberrypi/linux/issues/525 @@ -98741,7 +98741,7 @@ lirc-rpi: Also support pinctrl-bcm2835 in non-DT mode create mode 100644 include/linux/platform_data/bcm2708.h diff --git a/drivers/staging/media/lirc/Kconfig b/drivers/staging/media/lirc/Kconfig -index 6879c46..77c69f2 100644 +index 6879c4651b46c8b48460626cb346b8ee23fa6587..77c69f2d4158be625a5956095b988cd3774dbfae 100644 --- a/drivers/staging/media/lirc/Kconfig +++ b/drivers/staging/media/lirc/Kconfig @@ -32,6 +32,12 @@ config LIRC_PARALLEL @@ -98758,7 +98758,7 @@ index 6879c46..77c69f2 100644 tristate "Sasem USB IR Remote" depends on LIRC && USB diff --git a/drivers/staging/media/lirc/Makefile b/drivers/staging/media/lirc/Makefile -index 5430adf..9e53cd0 100644 +index 5430adf0475ded5abe2ef4b4cf4e7f2c08297894..9e53cd0caf58ba28a939b780c876d4017a23ac2b 100644 --- a/drivers/staging/media/lirc/Makefile +++ b/drivers/staging/media/lirc/Makefile @@ -6,6 +6,7 @@ @@ -98771,7 +98771,7 @@ index 5430adf..9e53cd0 100644 obj-$(CONFIG_LIRC_SIR) += lirc_sir.o diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c new file mode 100644 -index 0000000..cd09c99 +index 0000000000000000000000000000000000000000..cd09c9996b12c62f9f831261379b84f8389129ff --- /dev/null +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -0,0 +1,730 @@ @@ -99507,7 +99507,7 @@ index 0000000..cd09c99 +MODULE_PARM_DESC(debug, "Enable debugging messages"); diff --git a/include/linux/platform_data/bcm2708.h b/include/linux/platform_data/bcm2708.h new file mode 100644 -index 0000000..fb69624 +index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b172de57ec --- /dev/null +++ b/include/linux/platform_data/bcm2708.h @@ -0,0 +1,23 @@ @@ -99535,10 +99535,10 @@ index 0000000..fb69624 + +#endif -From c220c109c1a18cf786523a205b85a4ebca638624 Mon Sep 17 00:00:00 2001 +From 2ae836c205e6946ae0e246d5c58a7d5e93eae21e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 043/251] Add cpufreq driver +Subject: [PATCH 043/398] Add cpufreq driver Signed-off-by: popcornmix --- @@ -99549,7 +99549,7 @@ Signed-off-by: popcornmix create mode 100644 drivers/cpufreq/bcm2835-cpufreq.c diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm -index b1f8a73..930b3ef 100644 +index b1f8a73e5a943e8fc692dfcba7f28d1e08dba4f2..930b3ef3ff3832a03f4120c2037d364e8e1596ce 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -217,6 +217,15 @@ config ARM_SPEAR_CPUFREQ @@ -99569,7 +99569,7 @@ index b1f8a73..930b3ef 100644 bool "Tegra20 CPUFreq support" depends on ARCH_TEGRA diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile -index c0af1a1..f6a753a 100644 +index c0af1a1281c89134269445f9330d4d449c37135e..f6a753aa00798ec17545a628d4a2d49027076980 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -73,6 +73,7 @@ obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o @@ -99582,7 +99582,7 @@ index c0af1a1..f6a753a 100644 obj-$(CONFIG_ARM_VEXPRESS_SPC_CPUFREQ) += vexpress-spc-cpufreq.o diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c new file mode 100644 -index 0000000..3eb9e93 +index 0000000000000000000000000000000000000000..3eb9e9326231b08e6ee95ad486485245c71cf868 --- /dev/null +++ b/drivers/cpufreq/bcm2835-cpufreq.c @@ -0,0 +1,213 @@ @@ -99800,10 +99800,10 @@ index 0000000..3eb9e93 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 1184f7bb9072fe8b453e3c9a71938a16943a708f Mon Sep 17 00:00:00 2001 +From 9205067ba334d6aae73793cbbb700b2542fba29b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 044/251] Added hwmon/thermal driver for reporting core +Subject: [PATCH 044/398] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -99824,7 +99824,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/thermal/bcm2835-thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig -index 8cc4ac6..b273311 100644 +index 8cc4ac64a91c36347b9307addb88ae99d545d2b7..b273311e0bb91ef5c59812d15f03496e1039457e 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -285,6 +285,13 @@ config INTEL_POWERCLAMP @@ -99842,7 +99842,7 @@ index 8cc4ac6..b273311 100644 tristate "X86 package temperature thermal driver" depends on X86_THERMAL_VECTOR diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile -index cfae6a6..b0e336f 100644 +index cfae6a654793bbc0ad28bf96ea5784aa8330f6d7..b0e336f4ee9883f8f6cd74a415f44563d16d11cc 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -38,6 +38,7 @@ obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o @@ -99855,7 +99855,7 @@ index cfae6a6..b0e336f 100644 obj-$(CONFIG_INTEL_SOC_DTS_THERMAL) += intel_soc_dts_thermal.o diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c new file mode 100644 -index 0000000..08d8dc7 +index 0000000000000000000000000000000000000000..08d8dc7c5d005384660f90bc9cb541b83c032411 --- /dev/null +++ b/drivers/thermal/bcm2835-thermal.c @@ -0,0 +1,141 @@ @@ -100001,10 +100001,10 @@ index 0000000..08d8dc7 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 418bd7563b83b568046489b0f4b8c67391d31445 Mon Sep 17 00:00:00 2001 +From 3724e82cdfe9073f3ba8c37ea3f98c80840e9a49 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 045/251] Add Chris Boot's i2c driver +Subject: [PATCH 045/398] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100093,7 +100093,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/i2c/busses/i2c-bcm2708.c diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index 7b0aa82..effadb0 100644 +index 7b0aa82ea38b2e7521650e6c9a1cab5b25ac8ee4..effadb087fc1178bc32e0b1aa0c404b4253a99bd 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -8,6 +8,25 @@ menu "I2C Hardware Bus support" @@ -100132,7 +100132,7 @@ index 7b0aa82..effadb0 100644 If you say yes to this option, support will be included for the BCM2835 I2C controller. diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index 37f2819..e309579 100644 +index 37f2819b4560b0e0947b74c214f5c5a0952bc0ae..e309579e691599031f25bd9b9b36430753f004a7 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -2,6 +2,8 @@ @@ -100146,7 +100146,7 @@ index 37f2819..e309579 100644 diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c new file mode 100644 -index 0000000..85f411c +index 0000000000000000000000000000000000000000..85f411cccf61f42d8fdf5a867b3b1f27d6821d2d --- /dev/null +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -0,0 +1,493 @@ @@ -100644,10 +100644,10 @@ index 0000000..85f411c +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 3c15dbca1ea1cf9b6843cb55e2fd01d4701ef874 Mon Sep 17 00:00:00 2001 +From dd464faa0a05fa82235f66540a00af8d140a622a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 046/251] char: broadcom: Add vcio module +Subject: [PATCH 046/398] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100664,7 +100664,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/char/broadcom/vcio.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 2292ed2..5489f19 100644 +index 2292ed2ac9f457a7d491110e673666136faa5a5e..5489f19f05c620a30541e1a222d77b6ee4356d97 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -22,6 +22,12 @@ config BCM2708_VCMEM @@ -100681,7 +100681,7 @@ index 2292ed2..5489f19 100644 config BCM_VC_SM diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile -index 667d33e..14775c9 100644 +index 667d33ef38f3512b52818537c11d369798b6f1c0..14775c9b20b4b6a58f681f3687614676b5e2a871 100644 --- a/drivers/char/broadcom/Makefile +++ b/drivers/char/broadcom/Makefile @@ -1,5 +1,6 @@ @@ -100693,7 +100693,7 @@ index 667d33e..14775c9 100644 obj-$(CONFIG_BCM2835_DEVGPIOMEM)+= bcm2835-gpiomem.o diff --git a/drivers/char/broadcom/vcio.c b/drivers/char/broadcom/vcio.c new file mode 100644 -index 0000000..c19bc20 +index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a140fe5aba0 --- /dev/null +++ b/drivers/char/broadcom/vcio.c @@ -0,0 +1,175 @@ @@ -100873,10 +100873,10 @@ index 0000000..c19bc20 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 8481c7c7094e5395ab47c8ecc6c7c12d654baf5a Mon Sep 17 00:00:00 2001 +From 7fc66d82bf96fd466ef2b80e585e1ae83172f72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 047/251] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 047/398] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100892,7 +100892,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c -index dd506cd..b980d53 100644 +index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..b980d531b35b9981a88356ef1c8a7b868a85f2b5 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -28,6 +28,8 @@ struct rpi_firmware { @@ -100982,10 +100982,10 @@ index dd506cd..b980d53 100644 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 7e74c5de1a6c613a28ee5a5cc871661ceadd0fcd Mon Sep 17 00:00:00 2001 +From 11cf04e2b2d79bbbffd87952da499a7e5da6ea66 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 048/251] bcm2835: add v4l2 camera device +Subject: [PATCH 048/398] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -101299,7 +101299,7 @@ squash: Fixup bcm2835-camera for changes in kernel 4.4 api diff --git a/Documentation/video4linux/bcm2835-v4l2.txt b/Documentation/video4linux/bcm2835-v4l2.txt new file mode 100644 -index 0000000..c585a8f +index 0000000000000000000000000000000000000000..c585a8fadf91c5a04453e442fc29ed893c65bf99 --- /dev/null +++ b/Documentation/video4linux/bcm2835-v4l2.txt @@ -0,0 +1,60 @@ @@ -101364,7 +101364,7 @@ index 0000000..c585a8f + +$ v4l2-ctl --list-formats diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig -index ccbc974..63c9715 100644 +index ccbc9742cb7aeca46b22edb65eaaae69ce00aa17..63c97152af3c9484b16882ad56c1703fc8975ee6 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -11,6 +11,8 @@ menuconfig V4L_PLATFORM_DRIVERS @@ -101377,7 +101377,7 @@ index ccbc974..63c9715 100644 config VIDEO_VIA_CAMERA diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile -index efa0295..8c0b3b5 100644 +index efa0295af87bfe089acb526329b1601e95756c89..8c0b3b55ae9871c54ef9b498d5ab34403f5ca69f 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -2,6 +2,8 @@ @@ -101391,7 +101391,7 @@ index efa0295..8c0b3b5 100644 diff --git a/drivers/media/platform/bcm2835/Kconfig b/drivers/media/platform/bcm2835/Kconfig new file mode 100644 -index 0000000..99a5cbc +index 0000000000000000000000000000000000000000..99a5cbccf0f3fa66ad5190ec0942b0c232c3e824 --- /dev/null +++ b/drivers/media/platform/bcm2835/Kconfig @@ -0,0 +1,25 @@ @@ -101422,7 +101422,7 @@ index 0000000..99a5cbc +endif # VIDEO_BM2835 diff --git a/drivers/media/platform/bcm2835/Makefile b/drivers/media/platform/bcm2835/Makefile new file mode 100644 -index 0000000..f17c79c +index 0000000000000000000000000000000000000000..f17c79c33e4a07a2294907d3c748b4d62fc55e21 --- /dev/null +++ b/drivers/media/platform/bcm2835/Makefile @@ -0,0 +1,5 @@ @@ -101433,7 +101433,7 @@ index 0000000..f17c79c +ccflags-$(CONFIG_VIDEO_BCM2835) += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c new file mode 100644 -index 0000000..e83334c +index 0000000000000000000000000000000000000000..e83334c01e63da951d60c964418ef105f8755932 --- /dev/null +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -0,0 +1,1844 @@ @@ -103283,7 +103283,7 @@ index 0000000..e83334c +module_exit(bm2835_mmal_exit); diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h new file mode 100644 -index 0000000..7fe9f65 +index 0000000000000000000000000000000000000000..7fe9f658a927042b95eaba63aaa49daed2a8f2b8 --- /dev/null +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -0,0 +1,126 @@ @@ -103415,7 +103415,7 @@ index 0000000..7fe9f65 +} diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c new file mode 100644 -index 0000000..f9f903f +index 0000000000000000000000000000000000000000..f9f903f9574d576dde069e56f618f235f99194c7 --- /dev/null +++ b/drivers/media/platform/bcm2835/controls.c @@ -0,0 +1,1324 @@ @@ -104745,7 +104745,7 @@ index 0000000..f9f903f +} diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h new file mode 100644 -index 0000000..840fd13 +index 0000000000000000000000000000000000000000..840fd139e03315b5d9ac2d5742ab589bc6b17ade --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-common.h @@ -0,0 +1,53 @@ @@ -104804,7 +104804,7 @@ index 0000000..840fd13 +}; diff --git a/drivers/media/platform/bcm2835/mmal-encodings.h b/drivers/media/platform/bcm2835/mmal-encodings.h new file mode 100644 -index 0000000..024d620 +index 0000000000000000000000000000000000000000..024d620dc1dfda006a9d36dffeeec691faf24ac5 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-encodings.h @@ -0,0 +1,127 @@ @@ -104937,7 +104937,7 @@ index 0000000..024d620 +#endif /* MMAL_ENCODINGS_H */ diff --git a/drivers/media/platform/bcm2835/mmal-msg-common.h b/drivers/media/platform/bcm2835/mmal-msg-common.h new file mode 100644 -index 0000000..66e8a6e +index 0000000000000000000000000000000000000000..66e8a6edf628565aeb487662b0b503c0c562ac8a --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-common.h @@ -0,0 +1,50 @@ @@ -104993,7 +104993,7 @@ index 0000000..66e8a6e +#endif /* MMAL_MSG_COMMON_H */ diff --git a/drivers/media/platform/bcm2835/mmal-msg-format.h b/drivers/media/platform/bcm2835/mmal-msg-format.h new file mode 100644 -index 0000000..123d86e +index 0000000000000000000000000000000000000000..123d86ef582b0d059d1d5d14ba9add56b7365419 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-format.h @@ -0,0 +1,81 @@ @@ -105080,7 +105080,7 @@ index 0000000..123d86e +#endif /* MMAL_MSG_FORMAT_H */ diff --git a/drivers/media/platform/bcm2835/mmal-msg-port.h b/drivers/media/platform/bcm2835/mmal-msg-port.h new file mode 100644 -index 0000000..a55c1ea +index 0000000000000000000000000000000000000000..a55c1ea2eceb190689910a6a84370f126b1e9cbb --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-port.h @@ -0,0 +1,107 @@ @@ -105193,7 +105193,7 @@ index 0000000..a55c1ea +}; diff --git a/drivers/media/platform/bcm2835/mmal-msg.h b/drivers/media/platform/bcm2835/mmal-msg.h new file mode 100644 -index 0000000..67b1076 +index 0000000000000000000000000000000000000000..67b1076015a54646eb0a3b956afdc97e75d2a39c --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg.h @@ -0,0 +1,404 @@ @@ -105603,7 +105603,7 @@ index 0000000..67b1076 +}; diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h new file mode 100644 -index 0000000..aa0fd18 +index 0000000000000000000000000000000000000000..aa0fd180271b1b58e96e027df951fcbc7f610eb8 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -0,0 +1,656 @@ @@ -106265,7 +106265,7 @@ index 0000000..aa0fd18 +}; diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c new file mode 100644 -index 0000000..7813225 +index 0000000000000000000000000000000000000000..781322542d5a8295f3d7d5a3eaaf0cac29930c30 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-vchiq.c @@ -0,0 +1,1916 @@ @@ -108187,7 +108187,7 @@ index 0000000..7813225 +} diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.h b/drivers/media/platform/bcm2835/mmal-vchiq.h new file mode 100644 -index 0000000..9d1d11e +index 0000000000000000000000000000000000000000..9d1d11e4a53e510c04a416d92d195a7df15012d5 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-vchiq.h @@ -0,0 +1,178 @@ @@ -108370,10 +108370,10 @@ index 0000000..9d1d11e + +#endif /* MMAL_VCHIQ_H */ -From 2a1cb83a705ce839581fbabeb9a8db3dad478ccf Mon Sep 17 00:00:00 2001 +From 1d1f4890731c035b778fb636ad9dd0c76ef82453 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 049/251] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 049/398] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -108415,7 +108415,7 @@ See: https://github.com/raspberrypi/linux/issues/1157 diff --git a/scripts/knlinfo b/scripts/knlinfo new file mode 100755 -index 0000000..a0e8663 +index 0000000000000000000000000000000000000000..a0e8663ae86b97ecded54bd469ac4ffe84eb2684 --- /dev/null +++ b/scripts/knlinfo @@ -0,0 +1,168 @@ @@ -108589,7 +108589,7 @@ index 0000000..a0e8663 +} diff --git a/scripts/mkknlimg b/scripts/mkknlimg new file mode 100755 -index 0000000..3998d43 +index 0000000000000000000000000000000000000000..3998d43b694ff06fd9562b89f5a7be26b4cb6e15 --- /dev/null +++ b/scripts/mkknlimg @@ -0,0 +1,244 @@ @@ -108838,17 +108838,17 @@ index 0000000..3998d43 + return (($val eq 'y') || ($val eq '1')); +} -From 3c9e2867950ad9a36623e07c2d1641445bab50dd Mon Sep 17 00:00:00 2001 +From b7502bfb13562d930b16690f4b9942a3d9fd0191 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 5 Dec 2014 17:26:26 +0000 -Subject: [PATCH 050/251] fdt: Add support for the CONFIG_CMDLINE_EXTEND option +Subject: [PATCH 050/398] fdt: Add support for the CONFIG_CMDLINE_EXTEND option --- drivers/of/fdt.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c -index 655f79d..fdc4501 100644 +index 655f79db7899ffd0628714d51203847630a8075c..fdc45015b8d3a4ddc99edbc976e904742b3b85bd 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -954,19 +954,38 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, @@ -108896,10 +108896,10 @@ index 655f79d..fdc4501 100644 pr_debug("Command line is: %s\n", (char*)data); -From 336ecbfbddc122378578b727f46bfe71858aaa05 Mon Sep 17 00:00:00 2001 +From f69405c92a4084903e65551475b0c3a404d28fc9 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 051/251] BCM2708: Add core Device Tree support +Subject: [PATCH 051/398] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -109077,7 +109077,7 @@ BCM270X_DT: Use clk_core for I2C interfaces create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 30bbc37..d583e67 100644 +index 30bbc3746130a56e54fa665a763894fe4ec02e6a..d583e67d065a7d841e4606a4b99d94f252969a5c 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1,5 +1,25 @@ @@ -109129,7 +109129,7 @@ index 30bbc37..d583e67 100644 +endif diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts new file mode 100644 -index 0000000..2e4df17 +index 0000000000000000000000000000000000000000..2e4df17ea71ab73b20314ed8ffc4396378195240 --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -0,0 +1,145 @@ @@ -109280,7 +109280,7 @@ index 0000000..2e4df17 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts new file mode 100644 -index 0000000..0445b46 +index 0000000000000000000000000000000000000000..0445b46367689877f62d0bd6c36aed7cdd93383e --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -0,0 +1,135 @@ @@ -109421,7 +109421,7 @@ index 0000000..0445b46 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts new file mode 100755 -index 0000000..87c1a54 +index 0000000000000000000000000000000000000000..87c1a54ed569df899e6340f4e26e0c885ef7df0a --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -0,0 +1,102 @@ @@ -109529,7 +109529,7 @@ index 0000000..87c1a54 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi new file mode 100644 -index 0000000..3c8bdde +index 0000000000000000000000000000000000000000..3c8bdde83189a5d4089d509e59a4fd9668e5c746 --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi @@ -0,0 +1,40 @@ @@ -109575,7 +109575,7 @@ index 0000000..3c8bdde +}; diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi new file mode 100644 -index 0000000..f5a44cd +index 0000000000000000000000000000000000000000..f5a44cd4fef0ee221ed6ae1c43ca81dabffa110d --- /dev/null +++ b/arch/arm/boot/dts/bcm2708.dtsi @@ -0,0 +1,40 @@ @@ -109621,7 +109621,7 @@ index 0000000..f5a44cd +}; diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi new file mode 100644 -index 0000000..75fb4ce +index 0000000000000000000000000000000000000000..75fb4ce688a6f1774163628f9d2f706bc4d06767 --- /dev/null +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -0,0 +1,347 @@ @@ -109974,7 +109974,7 @@ index 0000000..75fb4ce +}; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts new file mode 100644 -index 0000000..5206ba2 +index 0000000000000000000000000000000000000000..5206ba204d97c3e904ff482bb04b169f434827ca --- /dev/null +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -0,0 +1,145 @@ @@ -110125,7 +110125,7 @@ index 0000000..5206ba2 +}; diff --git a/arch/arm/boot/dts/bcm2709.dtsi b/arch/arm/boot/dts/bcm2709.dtsi new file mode 100644 -index 0000000..a8cfd7c +index 0000000000000000000000000000000000000000..a8cfd7c4df5bcf7692d13882833c97852649932d --- /dev/null +++ b/arch/arm/boot/dts/bcm2709.dtsi @@ -0,0 +1,102 @@ @@ -110233,7 +110233,7 @@ index 0000000..a8cfd7c +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm.dts b/arch/arm/boot/dts/bcm2835-rpi-cm.dts new file mode 100644 -index 0000000..c6e6860 +index 0000000000000000000000000000000000000000..c6e6860a6d4356a613f4f7ab41c6befc76740a15 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-cm.dts @@ -0,0 +1,93 @@ @@ -110332,7 +110332,7 @@ index 0000000..c6e6860 +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2835-rpi-cm.dtsi new file mode 100644 -index 0000000..9c4000f +index 0000000000000000000000000000000000000000..9c4000fc686a9882b9ddde24fdcf937d52b0f86f --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-cm.dtsi @@ -0,0 +1,30 @@ @@ -110368,7 +110368,7 @@ index 0000000..9c4000f +}; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile new file mode 100644 -index 0000000..d8c2771 +index 0000000000000000000000000000000000000000..d8c2771cfd22aa73100220a6ba3cb8833b19004f --- /dev/null +++ b/arch/arm/boot/dts/overlays/Makefile @@ -0,0 +1,69 @@ @@ -110443,7 +110443,7 @@ index 0000000..d8c2771 +endif diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000..268d400 +index 0000000000000000000000000000000000000000..268d400a3500e6a257cca90ba54d97bebdf797fe --- /dev/null +++ b/arch/arm/boot/dts/overlays/README @@ -0,0 +1,648 @@ @@ -111097,7 +111097,7 @@ index 0000000..268d400 +http://www.raspberrypi.org/documentation/configuration/device-tree.md diff --git a/arch/arm/boot/dts/overlays/ads7846-overlay.dts b/arch/arm/boot/dts/overlays/ads7846-overlay.dts new file mode 100644 -index 0000000..6a92cd1 +index 0000000000000000000000000000000000000000..6a92cd1a9ffc370f386612843fc9a0236ddb48ee --- /dev/null +++ b/arch/arm/boot/dts/overlays/ads7846-overlay.dts @@ -0,0 +1,83 @@ @@ -111186,7 +111186,7 @@ index 0000000..6a92cd1 +}; diff --git a/arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts new file mode 100644 -index 0000000..782b171 +index 0000000000000000000000000000000000000000..782b1715467e943c18fe936cc76448f3db960fbc --- /dev/null +++ b/arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts @@ -0,0 +1,23 @@ @@ -111215,7 +111215,7 @@ index 0000000..782b171 +}; diff --git a/arch/arm/boot/dts/overlays/dht11-overlay.dts b/arch/arm/boot/dts/overlays/dht11-overlay.dts new file mode 100644 -index 0000000..9bf67fd +index 0000000000000000000000000000000000000000..9bf67fd57bada3c3e06c09744fb184767bab5d14 --- /dev/null +++ b/arch/arm/boot/dts/overlays/dht11-overlay.dts @@ -0,0 +1,39 @@ @@ -111260,7 +111260,7 @@ index 0000000..9bf67fd +}; diff --git a/arch/arm/boot/dts/overlays/enc28j60-overlay.dts b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts new file mode 100644 -index 0000000..8fae869 +index 0000000000000000000000000000000000000000..8fae869511ca53a533c7bffa9a59a4437e6501e3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts @@ -0,0 +1,50 @@ @@ -111316,7 +111316,7 @@ index 0000000..8fae869 +}; diff --git a/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts b/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts new file mode 100644 -index 0000000..ff8cb36 +index 0000000000000000000000000000000000000000..ff8cb36d94d4940d5151ace24afc4ad1a9aa9fb6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts @@ -0,0 +1,34 @@ @@ -111356,7 +111356,7 @@ index 0000000..ff8cb36 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts new file mode 100644 -index 0000000..2c81448 +index 0000000000000000000000000000000000000000..2c81448c969e93b6511fa9382b5d8ae16edfffce --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts @@ -0,0 +1,39 @@ @@ -111401,7 +111401,7 @@ index 0000000..2c81448 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts new file mode 100644 -index 0000000..5e7633a +index 0000000000000000000000000000000000000000..5e7633ae85cd32cf074380579e9f67a220bb0320 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -111441,7 +111441,7 @@ index 0000000..5e7633a +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts new file mode 100644 -index 0000000..deb9c62 +index 0000000000000000000000000000000000000000..deb9c625fe861cc3425f975ce71821326e3f64b3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -0,0 +1,39 @@ @@ -111486,7 +111486,7 @@ index 0000000..deb9c62 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts new file mode 100644 -index 0000000..d0e0d8a +index 0000000000000000000000000000000000000000..d0e0d8aa63a9be729e8c0f3b8814f15e92da2e61 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts @@ -0,0 +1,39 @@ @@ -111531,7 +111531,7 @@ index 0000000..d0e0d8a +}; diff --git a/arch/arm/boot/dts/overlays/hy28a-overlay.dts b/arch/arm/boot/dts/overlays/hy28a-overlay.dts new file mode 100644 -index 0000000..3cd3083 +index 0000000000000000000000000000000000000000..3cd3083f178b4a39dfb7c2742d15da7822701e1f --- /dev/null +++ b/arch/arm/boot/dts/overlays/hy28a-overlay.dts @@ -0,0 +1,87 @@ @@ -111624,7 +111624,7 @@ index 0000000..3cd3083 +}; diff --git a/arch/arm/boot/dts/overlays/hy28b-overlay.dts b/arch/arm/boot/dts/overlays/hy28b-overlay.dts new file mode 100644 -index 0000000..f774c4a +index 0000000000000000000000000000000000000000..f774c4ab1770529cac96b5e85a183ebe04359fbd --- /dev/null +++ b/arch/arm/boot/dts/overlays/hy28b-overlay.dts @@ -0,0 +1,142 @@ @@ -111772,7 +111772,7 @@ index 0000000..f774c4a +}; diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts new file mode 100644 -index 0000000..fed4bd8 +index 0000000000000000000000000000000000000000..fed4bd867620e0c0958b92b7c7729591d3ea12ec --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts @@ -0,0 +1,55 @@ @@ -111833,7 +111833,7 @@ index 0000000..fed4bd8 +}; diff --git a/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts new file mode 100644 -index 0000000..a11160a +index 0000000000000000000000000000000000000000..a11160afa4bfb2aeda5937b3b1138bb1f9b9b0f8 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts @@ -0,0 +1,13 @@ @@ -111852,7 +111852,7 @@ index 0000000..a11160a +}; diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts new file mode 100644 -index 0000000..ea8173e +index 0000000000000000000000000000000000000000..ea8173e529117dc17295efeb89f47e78147ed178 --- /dev/null +++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts @@ -0,0 +1,39 @@ @@ -111897,7 +111897,7 @@ index 0000000..ea8173e +}; diff --git a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts new file mode 100644 -index 0000000..735d8ab +index 0000000000000000000000000000000000000000..735d8abfccb2e60be7a87ce5832440f9d38333b7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts @@ -0,0 +1,39 @@ @@ -111942,7 +111942,7 @@ index 0000000..735d8ab +}; diff --git a/arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts b/arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts new file mode 100644 -index 0000000..7d5d82b +index 0000000000000000000000000000000000000000..7d5d82bdf4c41cfbafada51a6d23cbd57822828f --- /dev/null +++ b/arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts @@ -0,0 +1,57 @@ @@ -112005,7 +112005,7 @@ index 0000000..7d5d82b +}; diff --git a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts new file mode 100755 -index 0000000..398d59c +index 0000000000000000000000000000000000000000..398d59cf1184aaf735d01c2f74cecdeee5fa58c9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts @@ -0,0 +1,69 @@ @@ -112080,7 +112080,7 @@ index 0000000..398d59c +}; diff --git a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts new file mode 100644 -index 0000000..6bef9ae +index 0000000000000000000000000000000000000000..6bef9ae5c52c76c1daede15f67404cb66c7fd6da --- /dev/null +++ b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts @@ -0,0 +1,69 @@ @@ -112155,7 +112155,7 @@ index 0000000..6bef9ae +}; diff --git a/arch/arm/boot/dts/overlays/mmc-overlay.dts b/arch/arm/boot/dts/overlays/mmc-overlay.dts new file mode 100644 -index 0000000..00a22be +index 0000000000000000000000000000000000000000..00a22be8d63c7ecc19d3eff8ba9d073765c4fb8a --- /dev/null +++ b/arch/arm/boot/dts/overlays/mmc-overlay.dts @@ -0,0 +1,39 @@ @@ -112200,7 +112200,7 @@ index 0000000..00a22be +}; diff --git a/arch/arm/boot/dts/overlays/mz61581-overlay.dts b/arch/arm/boot/dts/overlays/mz61581-overlay.dts new file mode 100644 -index 0000000..9242a6e +index 0000000000000000000000000000000000000000..9242a6e9a48c4f95dccc60c3d39550cae1363459 --- /dev/null +++ b/arch/arm/boot/dts/overlays/mz61581-overlay.dts @@ -0,0 +1,111 @@ @@ -112317,7 +112317,7 @@ index 0000000..9242a6e +}; diff --git a/arch/arm/boot/dts/overlays/piscreen-overlay.dts b/arch/arm/boot/dts/overlays/piscreen-overlay.dts new file mode 100644 -index 0000000..ba4ad33 +index 0000000000000000000000000000000000000000..ba4ad33fe00163e5515d23afa3dd77ff448e3c8e --- /dev/null +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts @@ -0,0 +1,96 @@ @@ -112419,7 +112419,7 @@ index 0000000..ba4ad33 +}; diff --git a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts new file mode 100644 -index 0000000..d506eae +index 0000000000000000000000000000000000000000..d506eae7d141410f74a6c1339d811493b73d64ed --- /dev/null +++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts @@ -0,0 +1,115 @@ @@ -112540,7 +112540,7 @@ index 0000000..d506eae +}; diff --git a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts new file mode 100644 -index 0000000..40bf0e1 +index 0000000000000000000000000000000000000000..40bf0e11015f5abebd0d4139276da888d728d569 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts @@ -0,0 +1,34 @@ @@ -112580,7 +112580,7 @@ index 0000000..40bf0e1 +}; diff --git a/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts new file mode 100644 -index 0000000..957e1a4 +index 0000000000000000000000000000000000000000..957e1a4ec34724c7852086a5c44f493d9b75bfa6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts @@ -0,0 +1,46 @@ @@ -112632,7 +112632,7 @@ index 0000000..957e1a4 +}; diff --git a/arch/arm/boot/dts/overlays/pwm-overlay.dts b/arch/arm/boot/dts/overlays/pwm-overlay.dts new file mode 100644 -index 0000000..ddd67ff +index 0000000000000000000000000000000000000000..ddd67ffcd8bb34b05ec61481a162a37d64b30680 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pwm-overlay.dts @@ -0,0 +1,42 @@ @@ -112680,7 +112680,7 @@ index 0000000..ddd67ff +}; diff --git a/arch/arm/boot/dts/overlays/raspidac3-overlay.dts b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts new file mode 100644 -index 0000000..1bd8054 +index 0000000000000000000000000000000000000000..1bd80542e3e5e6b1cd5c5255db2642549a6e92c5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts @@ -0,0 +1,45 @@ @@ -112731,7 +112731,7 @@ index 0000000..1bd8054 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts new file mode 100644 -index 0000000..7fc6ac9 +index 0000000000000000000000000000000000000000..7fc6ac996f934a87bfc17089212252e95a7e24e4 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -112771,7 +112771,7 @@ index 0000000..7fc6ac9 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts new file mode 100644 -index 0000000..a8fa974 +index 0000000000000000000000000000000000000000..a8fa9745251216186c987fa8bae17b96d12c90bf --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts @@ -0,0 +1,82 @@ @@ -112859,7 +112859,7 @@ index 0000000..a8fa974 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts new file mode 100644 -index 0000000..2e53a17 +index 0000000000000000000000000000000000000000..2e53a17491706bdb6245426b548a54960a40966f --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts @@ -0,0 +1,17 @@ @@ -112882,7 +112882,7 @@ index 0000000..2e53a17 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts new file mode 100644 -index 0000000..2029930 +index 0000000000000000000000000000000000000000..20299305328541631a0810d97e0fbe2e39df1d4e --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts @@ -0,0 +1,39 @@ @@ -112927,7 +112927,7 @@ index 0000000..2029930 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts b/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts new file mode 100644 -index 0000000..2715324 +index 0000000000000000000000000000000000000000..27153240e1be595ae07c7ec74db1615532904140 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-sense-overlay.dts @@ -0,0 +1,47 @@ @@ -112980,7 +112980,7 @@ index 0000000..2715324 +}; diff --git a/arch/arm/boot/dts/overlays/sdhost-overlay.dts b/arch/arm/boot/dts/overlays/sdhost-overlay.dts new file mode 100644 -index 0000000..85f0725 +index 0000000000000000000000000000000000000000..85f0725e1ed9e1ec6d41b1956b43528a2d92aa63 --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts @@ -0,0 +1,29 @@ @@ -113015,7 +113015,7 @@ index 0000000..85f0725 +}; diff --git a/arch/arm/boot/dts/overlays/sdio-overlay.dts b/arch/arm/boot/dts/overlays/sdio-overlay.dts new file mode 100644 -index 0000000..afc8742 +index 0000000000000000000000000000000000000000..afc874269ac592d2df67abbc1d9c0d4f973e6baf --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts @@ -0,0 +1,32 @@ @@ -113053,7 +113053,7 @@ index 0000000..afc8742 +}; diff --git a/arch/arm/boot/dts/overlays/smi-dev-overlay.dts b/arch/arm/boot/dts/overlays/smi-dev-overlay.dts new file mode 100644 -index 0000000..b610d82 +index 0000000000000000000000000000000000000000..b610d828360810e80133850adf7b459c66b3ed5d --- /dev/null +++ b/arch/arm/boot/dts/overlays/smi-dev-overlay.dts @@ -0,0 +1,18 @@ @@ -113077,7 +113077,7 @@ index 0000000..b610d82 +}; diff --git a/arch/arm/boot/dts/overlays/smi-nand-overlay.dts b/arch/arm/boot/dts/overlays/smi-nand-overlay.dts new file mode 100644 -index 0000000..13ce0b7 +index 0000000000000000000000000000000000000000..13ce0b7cfb242df1019f91ed2fc03f514927c3e7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/smi-nand-overlay.dts @@ -0,0 +1,69 @@ @@ -113152,7 +113152,7 @@ index 0000000..13ce0b7 +}; diff --git a/arch/arm/boot/dts/overlays/smi-overlay.dts b/arch/arm/boot/dts/overlays/smi-overlay.dts new file mode 100644 -index 0000000..095f52c +index 0000000000000000000000000000000000000000..095f52c355fd6382233d8a471c3590a4275d6c75 --- /dev/null +++ b/arch/arm/boot/dts/overlays/smi-overlay.dts @@ -0,0 +1,37 @@ @@ -113195,7 +113195,7 @@ index 0000000..095f52c +}; diff --git a/arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts b/arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts new file mode 100644 -index 0000000..9648063 +index 0000000000000000000000000000000000000000..9648063d5963f2f6ec8f31038f3af5820a8135a6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts @@ -0,0 +1,31 @@ @@ -113232,7 +113232,7 @@ index 0000000..9648063 +}; diff --git a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts new file mode 100644 -index 0000000..f7102c8 +index 0000000000000000000000000000000000000000..f7102c878b13340a1b142f563462fb7027922159 --- /dev/null +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts @@ -0,0 +1,216 @@ @@ -113454,7 +113454,7 @@ index 0000000..f7102c8 +}; diff --git a/arch/arm/boot/dts/overlays/uart1-overlay.dts b/arch/arm/boot/dts/overlays/uart1-overlay.dts new file mode 100644 -index 0000000..fa73e1f +index 0000000000000000000000000000000000000000..fa73e1feaeb1bf53a6755e81a998e71cd8c7eda9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/uart1-overlay.dts @@ -0,0 +1,38 @@ @@ -113498,7 +113498,7 @@ index 0000000..fa73e1f +}; diff --git a/arch/arm/boot/dts/overlays/vga666-overlay.dts b/arch/arm/boot/dts/overlays/vga666-overlay.dts new file mode 100644 -index 0000000..7fcab96 +index 0000000000000000000000000000000000000000..7fcab963eb4aed4b9edea94c9e60deb7650e0eb5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vga666-overlay.dts @@ -0,0 +1,30 @@ @@ -113534,7 +113534,7 @@ index 0000000..7fcab96 +}; diff --git a/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts b/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts new file mode 100644 -index 0000000..29a3b48 +index 0000000000000000000000000000000000000000..29a3b48d19ab36b814c09e4cc4eef6d9e2022da1 --- /dev/null +++ b/arch/arm/boot/dts/overlays/w1-gpio-overlay.dts @@ -0,0 +1,39 @@ @@ -113579,7 +113579,7 @@ index 0000000..29a3b48 +}; diff --git a/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts b/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts new file mode 100644 -index 0000000..66a98f6 +index 0000000000000000000000000000000000000000..66a98f6c9601f51483f27803995bec772bb3350e --- /dev/null +++ b/arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts @@ -0,0 +1,41 @@ @@ -113625,10 +113625,10 @@ index 0000000..66a98f6 + }; +}; -From 83d747d78be86190ad18c8c49e0d5518ac6bf83b Mon Sep 17 00:00:00 2001 +From 5b1291d73f0444fb8b7a047cbecb5e44b0380541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:47:07 +0200 -Subject: [PATCH 052/251] bcm2835: Match with BCM2708 Device Trees +Subject: [PATCH 052/398] bcm2835: Match with BCM2708 Device Trees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -113641,7 +113641,7 @@ Signed-off-by: Noralf Trønnes 3 files changed, 237 insertions(+), 205 deletions(-) diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts -index 668442b..17e2443 100644 +index 668442b1bda581a49c9f757d0eb2d7019aff1971..17e24434b201d6389e71508e9d9e6d45dfdb4ed0 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts @@ -1,30 +1,128 @@ @@ -113791,7 +113791,7 @@ index 668442b..17e2443 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts -index ff6b2d1..221d252 100644 +index ff6b2d1c6c9077823ca3351b200c46cbf8b83a94..221d2524798d16a3975924c3b814ec8119f744f3 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts @@ -1,17 +1,118 @@ @@ -113921,7 +113921,7 @@ index ff6b2d1..221d252 100644 + }; }; diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi -index 864a3ef..3256bff 100644 +index 864a3effc758aee575013169af129687ad37bef7..3256bff273466aac3b3f4e2014d7bbbfa485a331 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -1,206 +1,39 @@ @@ -114146,10 +114146,10 @@ index 864a3ef..3256bff 100644 + status = "okay"; +}; -From 1b4ab4d431eed3ced1dfdcb4ac14ce3937b74244 Mon Sep 17 00:00:00 2001 +From 7752ebb6aa77af25d8dcb4d5d58b9fc774dbf70d Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 053/251] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 053/398] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -114164,7 +114164,7 @@ Signed-off-by: Siarhei Siamashka 2 files changed, 35 insertions(+) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c -index 0705d88..771992a 100644 +index 0705d8883edecc785a72f4ef256b9894e4d0e950..771992af4fa33092813a9fa5e093f85342425b16 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1084,6 +1084,25 @@ fb_blank(struct fb_info *info, int blank) @@ -114226,7 +114226,7 @@ index 0705d88..771992a 100644 case FBIOBLANK: ret = do_fb_ioctl(info, cmd, arg); diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h -index fb795c3..fa72af0 100644 +index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..fa72af0c981710fe80bacf4cf6612f6da19046ee 100644 --- a/include/uapi/linux/fb.h +++ b/include/uapi/linux/fb.h @@ -34,6 +34,11 @@ @@ -114242,10 +114242,10 @@ index fb795c3..fa72af0 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -From 25f558f2cb3b7c357c2b3fff66afca442b8462f9 Mon Sep 17 00:00:00 2001 +From a034fbf868452410c0050fac52b460c02cbbfa18 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 054/251] Speed up console framebuffer imageblit function +Subject: [PATCH 054/398] 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 @@ -114277,7 +114277,7 @@ Signed-off-by: Harm Hanemaaijer 1 file changed, 147 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/core/cfbimgblt.c b/drivers/video/fbdev/core/cfbimgblt.c -index a2bb276..436494f 100644 +index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466fafb10feb95 100644 --- a/drivers/video/fbdev/core/cfbimgblt.c +++ b/drivers/video/fbdev/core/cfbimgblt.c @@ -28,6 +28,11 @@ @@ -114454,10 +114454,10 @@ index a2bb276..436494f 100644 start_index, pitch_index); } else -From 0490dab9480fa92983af098b472d6a6e6e573e29 Mon Sep 17 00:00:00 2001 +From 7c64817900ca6af87ab25f4d4213cb95dbf2fe3b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 055/251] Allow mac address to be set in smsc95xx +Subject: [PATCH 055/398] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -114465,7 +114465,7 @@ Signed-off-by: popcornmix 1 file changed, 56 insertions(+) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index 9c0da18..3244a90 100755 +index 9c0da18957430ff7ddd4aeb030a8139e7085cb9e..3244a908a00147cb028b5632073b4e8f74e4d509 100755 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -59,6 +59,7 @@ @@ -114548,10 +114548,10 @@ index 9c0da18..3244a90 100755 if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { -From 5f3d302d1cd2e2684c1a4a21953c4677809a2f87 Mon Sep 17 00:00:00 2001 +From a85df68a4548c8a28f3e3906ca58988edf27a066 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 056/251] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 056/398] 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 @@ -114579,7 +114579,7 @@ w1-gpio: Sort out the pullup/parasitic power tangle 5 files changed, 99 insertions(+), 9 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c -index a373ae6..080e597 100644 +index a373ae69d9f6ef8a5925dbd5004cd5e9b8fc5c05..080e5976e2a6b75965ed753ddf29648cb0b2f000 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -23,6 +23,19 @@ @@ -114717,7 +114717,7 @@ index a373ae6..080e597 100644 } diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h -index 56a49ba..881d728 100644 +index 56a49ba41d83c0945203827946ba35dcb79897b0..881d72879b27fed8697ded8962e2f7c16796837d 100644 --- a/drivers/w1/w1.h +++ b/drivers/w1/w1.h @@ -171,6 +171,12 @@ struct w1_bus_master @@ -114734,7 +114734,7 @@ index 56a49ba..881d728 100644 u8, w1_slave_found_callback); }; diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c -index 20f766a..c4fbdb1 100644 +index 20f766afa4c7d7b8116565687541f84184fe61f4..c4fbdb1f25e961f9f7bacbac7b52a6d74cabaf12 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c @@ -122,6 +122,20 @@ int w1_add_master_device(struct w1_bus_master *master) @@ -114759,7 +114759,7 @@ index 20f766a..c4fbdb1 100644 mutex_lock(&w1_mlock); /* Search for the first available id (starting at 1). */ diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c -index 2820924..fd0550f 100644 +index 282092421cc9ee29d541e8722139387d0060c7db..fd0550f263f789b94038fd2fb2931022333029c2 100644 --- a/drivers/w1/w1_io.c +++ b/drivers/w1/w1_io.c @@ -134,10 +134,22 @@ static void w1_pre_write(struct w1_master *dev) @@ -114789,7 +114789,7 @@ index 2820924..fd0550f 100644 } } diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h -index d58594a..feae942 100644 +index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af803fb2ce 100644 --- a/include/linux/w1-gpio.h +++ b/include/linux/w1-gpio.h @@ -18,6 +18,7 @@ @@ -114801,10 +114801,10 @@ index d58594a..feae942 100644 unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From bc26cb5ca41caddb82d291450e32b27e56d9b87f Mon Sep 17 00:00:00 2001 +From f19e6cb5a85b97bdd18b4a9a2e226640502f83f0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 057/251] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 057/398] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -114812,10 +114812,10 @@ Subject: [PATCH 057/251] config: Enable CONFIG_MEMCG, but leave it disabled 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c -index dc94f8b..3dda8a8 100644 +index 1c9d701f7a72916155759c56561b084f0fc4900d..35264cdb91b683e122daee3fcf0a43999069133f 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5302,7 +5302,7 @@ int __init cgroup_init_early(void) +@@ -5306,7 +5306,7 @@ int __init cgroup_init_early(void) return 0; } @@ -114824,7 +114824,7 @@ index dc94f8b..3dda8a8 100644 /** * cgroup_init - cgroup initialization -@@ -5798,6 +5798,27 @@ static int __init cgroup_disable(char *str) +@@ -5802,6 +5802,27 @@ static int __init cgroup_disable(char *str) } __setup("cgroup_disable=", cgroup_disable); @@ -114853,10 +114853,10 @@ index dc94f8b..3dda8a8 100644 * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest -From 22689d60a6ca6191119ef7ab70c5b23991a41e16 Mon Sep 17 00:00:00 2001 +From 558545d1dea9c623a5e2f29a6a4525e9c7a245be Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 058/251] ASoC: Add support for PCM5102A codec +Subject: [PATCH 058/398] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -114870,7 +114870,7 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/codecs/pcm5102a.c diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index cfdafc4..bd38590 100644 +index cfdafc4c11ea9a64c465eef6d9ac4ed3520c159a..bd38590be90a0edc0896e2adf6ff8e692d33d045 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -89,6 +89,7 @@ config SND_SOC_ALL_CODECS @@ -114893,7 +114893,7 @@ index cfdafc4..bd38590 100644 tristate "Realtek ALC5631/RT5631 CODEC" depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index f632fc4..7ba76ba 100644 +index f632fc42f59f08d9d6c72f6aac045d9fe28176a1..7ba76ba20681cc4704c93d424a15ef3a8a2c6315 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -85,6 +85,7 @@ snd-soc-rl6231-objs := rl6231.o @@ -114914,7 +114914,7 @@ index f632fc4..7ba76ba 100644 obj-$(CONFIG_SND_SOC_RT5645) += snd-soc-rt5645.o diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c new file mode 100644 -index 0000000..7c6598e +index 0000000000000000000000000000000000000000..7c6598e717c523bc2e717861492a622ce66486c7 --- /dev/null +++ b/sound/soc/codecs/pcm5102a.c @@ -0,0 +1,70 @@ @@ -114989,10 +114989,10 @@ index 0000000..7c6598e +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 26aeeecaac62fdee4bff333a743680693009f15a Mon Sep 17 00:00:00 2001 +From c8987b368437bae8a416b932978c555e268796b0 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 059/251] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 059/398] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -115007,7 +115007,7 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/bcm/hifiberry_dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index c5070ae..ce81f14 100644 +index c5070aec5996aafb2d9daaf75163e16a29bc6892..ce81f14a88d08c90fb565cf3d60321a9b9a1fcee 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -7,3 +7,10 @@ config SND_BCM2835_SOC_I2S @@ -115022,7 +115022,7 @@ index c5070ae..ce81f14 100644 + help + Say Y or M if you want to add support for HifiBerry DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index bc816b7..b877d38 100644 +index bc816b71e5a40958953bf7bf7e7bd08342e87738..b877d386363d935deefda3664089a4ae5b33b889 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -3,3 +3,7 @@ snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o @@ -115035,7 +115035,7 @@ index bc816b7..b877d38 100644 +obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o diff --git a/sound/soc/bcm/hifiberry_dac.c b/sound/soc/bcm/hifiberry_dac.c new file mode 100644 -index 0000000..3ab0f47 +index 0000000000000000000000000000000000000000..3ab0f4705a9ffc4caa5e6a9788300a34505795ed --- /dev/null +++ b/sound/soc/bcm/hifiberry_dac.c @@ -0,0 +1,122 @@ @@ -115162,10 +115162,10 @@ index 0000000..3ab0f47 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 5bf2d31cda2340e5d7d73c35ea876225d2f8e9a1 Mon Sep 17 00:00:00 2001 +From 4ee630a46d47eeae6f261d9ca44bcd338b4d7014 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 060/251] ASoC: Add support for Rpi-DAC +Subject: [PATCH 060/398] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -115179,7 +115179,7 @@ Subject: [PATCH 060/251] ASoC: Add support for Rpi-DAC create mode 100644 sound/soc/codecs/pcm1794a.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index ce81f14..900de22 100644 +index ce81f14a88d08c90fb565cf3d60321a9b9a1fcee..900de22369a66758bbe49861238b647bd2ca037e 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -14,3 +14,10 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -115194,7 +115194,7 @@ index ce81f14..900de22 100644 + help + Say Y or M if you want to add support for RPi-DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index b877d38..99c96b4 100644 +index b877d386363d935deefda3664089a4ae5b33b889..99c96b4c41e46c17c38c8691e7a8a33b1bc7b3bb 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -5,5 +5,7 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -115207,7 +115207,7 @@ index b877d38..99c96b4 100644 +obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o diff --git a/sound/soc/bcm/rpi-dac.c b/sound/soc/bcm/rpi-dac.c new file mode 100644 -index 0000000..d5fac1b +index 0000000000000000000000000000000000000000..d5fac1b21d50c323afe27c1d1e0283d82b81507f --- /dev/null +++ b/sound/soc/bcm/rpi-dac.c @@ -0,0 +1,118 @@ @@ -115330,7 +115330,7 @@ index 0000000..d5fac1b +MODULE_DESCRIPTION("ASoC Driver for RPi-DAC"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index bd38590..b63f2fb 100644 +index bd38590be90a0edc0896e2adf6ff8e692d33d045..b63f2fb8c713855de0069385f11acab5b4a39e52 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -90,6 +90,7 @@ config SND_SOC_ALL_CODECS @@ -115357,7 +115357,7 @@ index bd38590..b63f2fb 100644 tristate depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 7ba76ba..2147436 100644 +index 7ba76ba20681cc4704c93d424a15ef3a8a2c6315..21474368551f34247cc476a6077325637b51ccc7 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -85,6 +85,7 @@ snd-soc-rl6231-objs := rl6231.o @@ -115378,7 +115378,7 @@ index 7ba76ba..2147436 100644 obj-$(CONFIG_SND_SOC_RT5640) += snd-soc-rt5640.o diff --git a/sound/soc/codecs/pcm1794a.c b/sound/soc/codecs/pcm1794a.c new file mode 100644 -index 0000000..afe1b41 +index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd843e17f4 --- /dev/null +++ b/sound/soc/codecs/pcm1794a.c @@ -0,0 +1,69 @@ @@ -115452,10 +115452,10 @@ index 0000000..afe1b41 +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 2b8d51c50a053f52a94bf0965ad472d7e411a737 Mon Sep 17 00:00:00 2001 +From e1d5e4fb7d82da8346e8ed2fb6200d6a8be0794c Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 061/251] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 061/398] 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 @@ -115474,7 +115474,7 @@ Signed-off-by: Daniel Matuschek 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c -index 8d91470..5795fb1 100644 +index 8d914702cae4a3fe2c0ca0599cd1ec79f7322c83..5795fb11a2c2a4963c6df7d991bd37f54d0e02ba 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -304,6 +304,7 @@ static int wm8804_hw_params(struct snd_pcm_substream *substream, @@ -115495,10 +115495,10 @@ index 8d91470..5795fb1 100644 #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ -From ef7ccc94b42ad0827735d8fadac43b23548a0b35 Mon Sep 17 00:00:00 2001 +From 8cb9f1a31df75ddb5e97830b63047193d05aefbb Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 062/251] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 062/398] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -115524,7 +115524,7 @@ adds the sample rate bits in the SPDIF status block. create mode 100644 sound/soc/bcm/hifiberry_digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 900de22..a34aff2 100644 +index 900de22369a66758bbe49861238b647bd2ca037e..a34aff27bb3010f58773edb942adccc193ea0d26 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -15,6 +15,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -115542,7 +115542,7 @@ index 900de22..a34aff2 100644 tristate "Support for RPi-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 99c96b4..4d53c58 100644 +index 99c96b4c41e46c17c38c8691e7a8a33b1bc7b3bb..4d53c58dc6ba41116d1fa210b6ba08ee75526dd2 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -5,7 +5,9 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -115557,7 +115557,7 @@ index 99c96b4..4d53c58 100644 obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o diff --git a/sound/soc/bcm/hifiberry_digi.c b/sound/soc/bcm/hifiberry_digi.c new file mode 100644 -index 0000000..80732b8 +index 0000000000000000000000000000000000000000..80732b8ac1809d9921450e0789b1022d4dd0c7fd --- /dev/null +++ b/sound/soc/bcm/hifiberry_digi.c @@ -0,0 +1,223 @@ @@ -115785,10 +115785,10 @@ index 0000000..80732b8 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 9871f390c47d90a75d21d20be88e88aa49536fd5 Mon Sep 17 00:00:00 2001 +From 9dbb5d7cf07441514eaadd993347594ab12c46fd Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 063/251] ASoC: wm8804: Set idle_bias_off to false Idle bias +Subject: [PATCH 063/398] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -115797,7 +115797,7 @@ Signed-off-by: Daniel Matuschek 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c -index 5795fb1..c846716 100644 +index 5795fb11a2c2a4963c6df7d991bd37f54d0e02ba..c846716b4ed1027ade5512e8be90801dc0fa1c7b 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -544,7 +544,7 @@ static struct snd_soc_dai_driver wm8804_dai = { @@ -115810,10 +115810,10 @@ index 5795fb1..c846716 100644 .dapm_widgets = wm8804_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), -From bad079610353ec3b8632ca9109da462435b41ba3 Mon Sep 17 00:00:00 2001 +From 1c16db7477b84a42212379ddc88e2c0a5f5c5169 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 064/251] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 064/398] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -115829,7 +115829,7 @@ limit of 0dB for this control. create mode 100644 sound/soc/bcm/iqaudio-dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index a34aff2..38dcdd9 100644 +index a34aff27bb3010f58773edb942adccc193ea0d26..38dcdd975b406b9308e151f5d3a80dbca5163be5 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -28,3 +28,10 @@ config SND_BCM2708_SOC_RPI_DAC @@ -115844,7 +115844,7 @@ index a34aff2..38dcdd9 100644 + help + Say Y or M if you want to add support for IQaudIO-DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 4d53c58..08e4dc5 100644 +index 4d53c58dc6ba41116d1fa210b6ba08ee75526dd2..08e4dc55757855fedec6845b82fc5f9f91f1584b 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -7,7 +7,9 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -115859,7 +115859,7 @@ index 4d53c58..08e4dc5 100644 +obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c new file mode 100644 -index 0000000..37038d4 +index 0000000000000000000000000000000000000000..37038d48bd6ef47eb8733a9045621eae03983d60 --- /dev/null +++ b/sound/soc/bcm/iqaudio-dac.c @@ -0,0 +1,132 @@ @@ -115996,10 +115996,10 @@ index 0000000..37038d4 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From a5a08b66a1ac4a02bc9aaac168e363dd45f28087 Mon Sep 17 00:00:00 2001 +From 0eb38084f99d9d3c4cfcaaf7bc1773f82ba79d86 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 065/251] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 065/398] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -116007,7 +116007,7 @@ Reduces overhead when using X 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c -index 5dd426f..9ae0cd5 100644 +index 0df32fe0e3459a0db81661a9241bdd3f12d801d2..1d60eb589eb45520762abfd9563f617595376d8a 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -49,7 +49,7 @@ @@ -116019,7 +116019,7 @@ index 5dd426f..9ae0cd5 100644 module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); -@@ -1091,8 +1091,12 @@ static int usbhid_start(struct hid_device *hid) +@@ -1083,8 +1083,12 @@ static int usbhid_start(struct hid_device *hid) } /* Change the polling interval of mice. */ @@ -116035,10 +116035,10 @@ index 5dd426f..9ae0cd5 100644 ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 6181933c3fb422cf92cf1f2720064e48d1f93955 Mon Sep 17 00:00:00 2001 +From a4216f7b930ac8651b2969758f29ecb6e1142a12 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 066/251] Added support for HiFiBerry DAC+ +Subject: [PATCH 066/398] Added support for HiFiBerry DAC+ The driver is based on the HiFiBerry DAC driver. However HiFiBerry DAC+ uses a different codec chip (PCM5122), therefore a new driver is necessary. @@ -116050,7 +116050,7 @@ a different codec chip (PCM5122), therefore a new driver is necessary. create mode 100644 sound/soc/bcm/hifiberry_dacplus.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 38dcdd9..8c338b5 100644 +index 38dcdd975b406b9308e151f5d3a80dbca5163be5..8c338b5803042ad3834ee46a8dc93f53c53953f6 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -15,6 +15,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -116068,7 +116068,7 @@ index 38dcdd9..8c338b5 100644 tristate "Support for HifiBerry Digi" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 08e4dc5..a29538e 100644 +index 08e4dc55757855fedec6845b82fc5f9f91f1584b..a29538e56b62ef6e7098b81b81e1389a22beeafa 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -5,11 +5,13 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -116087,7 +116087,7 @@ index 08e4dc5..a29538e 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c new file mode 100644 -index 0000000..11e4f39 +index 0000000000000000000000000000000000000000..11e4f3918bfc6329074d81d12892b9ae6262a726 --- /dev/null +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -0,0 +1,141 @@ @@ -116233,10 +116233,10 @@ index 0000000..11e4f39 +MODULE_DESCRIPTION("ASoC Driver for HiFiBerry DAC+"); +MODULE_LICENSE("GPL v2"); -From 2804c1880d7b34b85e35eaa503fee6d648c243de Mon Sep 17 00:00:00 2001 +From 34be63e1fcfcd7e9c79353ff870757706f1af068 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 067/251] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 067/398] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the drivers for the Raspberry Pi I2S subsystem. @@ -116265,7 +116265,7 @@ Some code to load the driver based on device-tree-overlays was missing. This is create mode 100644 sound/soc/codecs/tas5713.h diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8c338b5..7677c89 100644 +index 8c338b5803042ad3834ee46a8dc93f53c53953f6..7677c898773e6dd87c3ef385e380aa42c85e66d8 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -29,6 +29,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI @@ -116283,7 +116283,7 @@ index 8c338b5..7677c89 100644 tristate "Support for RPi-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a29538e..30db495 100644 +index a29538e56b62ef6e7098b81b81e1389a22beeafa..30db4951129c2d853c5cf631f4cd1263926692d0 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -7,11 +7,13 @@ obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o @@ -116302,7 +116302,7 @@ index a29538e..30db495 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c new file mode 100644 -index 0000000..5903915 +index 0000000000000000000000000000000000000000..590391597bc602528ad52a41086d260427a806f9 --- /dev/null +++ b/sound/soc/bcm/hifiberry_amp.c @@ -0,0 +1,127 @@ @@ -116434,7 +116434,7 @@ index 0000000..5903915 +MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index b63f2fb..fe32cca 100644 +index b63f2fb8c713855de0069385f11acab5b4a39e52..fe32ccaaaebe9ca0076124bbc221f4751b65c824 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -117,6 +117,7 @@ config SND_SOC_ALL_CODECS @@ -116456,7 +116456,7 @@ index b63f2fb..fe32cca 100644 tristate diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 2147436..dbb213d 100644 +index 21474368551f34247cc476a6077325637b51ccc7..dbb213da41a16e5e40cabec24327a9e530ade293 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -118,6 +118,7 @@ snd-soc-sti-sas-objs := sti-sas.o @@ -116477,7 +116477,7 @@ index 2147436..dbb213d 100644 obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c new file mode 100644 -index 0000000..9b27138 +index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1eae5867411 --- /dev/null +++ b/sound/soc/codecs/tas5713.c @@ -0,0 +1,369 @@ @@ -116852,7 +116852,7 @@ index 0000000..9b27138 +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/tas5713.h b/sound/soc/codecs/tas5713.h new file mode 100644 -index 0000000..8f019e0 +index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8f612a342 --- /dev/null +++ b/sound/soc/codecs/tas5713.h @@ -0,0 +1,210 @@ @@ -117067,10 +117067,10 @@ index 0000000..8f019e0 + +#endif /* _TAS5713_H */ -From cb468b5a1270e4819be26c8cacfd0cb6c70be776 Mon Sep 17 00:00:00 2001 +From 29e302c1d42fa36c2d723c5bfb36cc11ecf2df4c Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 068/251] Update ds1307 driver for device-tree support +Subject: [PATCH 068/398] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -117078,7 +117078,7 @@ Signed-off-by: Ryan Coe 1 file changed, 8 insertions(+) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c -index aa705bb..1cb13fe 100644 +index aa705bb4748c08ac302d45775ef698cf26c69d5b..1cb13feea21f0403c0600f73898a10911ee59d14 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -1207,6 +1207,14 @@ static int ds1307_remove(struct i2c_client *client) @@ -117097,10 +117097,10 @@ index aa705bb..1cb13fe 100644 .driver = { .name = "rtc-ds1307", -From e545dfb5383a8d5d775818282c7f95ae7a2e1f72 Mon Sep 17 00:00:00 2001 +From 5980b4c44a3c7c5f360640c5d9466acee13c4974 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 069/251] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 069/398] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -117130,7 +117130,7 @@ See: https://github.com/raspberrypi/linux/issues/1064 create mode 100644 drivers/leds/trigger/ledtrig-input.c diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c -index 5db4515..685a8b5 100644 +index 5db4515a4fd7aaf292958a5a7fa982bcccceb999..685a8b586b690cc89bf8bbebbe6b6df0f9f33824 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -42,6 +42,13 @@ static void gpio_led_work(struct work_struct *work) @@ -117180,7 +117180,7 @@ index 5db4515..685a8b5 100644 state = !!gpiod_get_value_cansleep(led_dat->gpiod); else diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig -index 5bda6a9..eb98cca 100644 +index 5bda6a9b56bbd90b4a3749f87bc0c6fda8dd5034..eb98cca4c239e5bb5c4abf7c731021ae56f3e91d 100644 --- a/drivers/leds/trigger/Kconfig +++ b/drivers/leds/trigger/Kconfig @@ -108,4 +108,11 @@ config LEDS_TRIGGER_CAMERA @@ -117196,7 +117196,7 @@ index 5bda6a9..eb98cca 100644 + endif # LEDS_TRIGGERS diff --git a/drivers/leds/trigger/Makefile b/drivers/leds/trigger/Makefile -index 1abf48d..c03afdc 100644 +index 1abf48dacf7ebfcfb8208f7ae7bdf29d7c11ba32..c03afdc34404a406a658326bcf28a2f22b4f4122 100644 --- a/drivers/leds/trigger/Makefile +++ b/drivers/leds/trigger/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_LEDS_TRIGGER_CPU) += ledtrig-cpu.o @@ -117206,7 +117206,7 @@ index 1abf48d..c03afdc 100644 +obj-$(CONFIG_LEDS_TRIGGER_INPUT) += ledtrig-input.o diff --git a/drivers/leds/trigger/ledtrig-input.c b/drivers/leds/trigger/ledtrig-input.c new file mode 100644 -index 0000000..07d1219 +index 0000000000000000000000000000000000000000..07d12197e340e003c13003d08f53c9e7af676720 --- /dev/null +++ b/drivers/leds/trigger/ledtrig-input.c @@ -0,0 +1,54 @@ @@ -117265,7 +117265,7 @@ index 0000000..07d1219 +MODULE_DESCRIPTION("Set LED GPIO to Input \"trigger\""); +MODULE_LICENSE("GPL"); diff --git a/include/linux/leds.h b/include/linux/leds.h -index fa359c7..4b25a1a 100644 +index fa359c79c825e666789ec1ce65392b6ff184d93c..4b25a1a8c13d8a64a9f9ffee75329bf60a733384 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -48,6 +48,9 @@ struct led_classdev { @@ -117279,10 +117279,10 @@ index fa359c7..4b25a1a 100644 /* Set LED brightness level */ /* Must not sleep, use a workqueue if needed */ -From f6d9d6ba910f1604a3d488091f052a57f14cd998 Mon Sep 17 00:00:00 2001 +From c6955290a95a991b6c5ae230e9ed7f0a38f20120 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 27 Feb 2015 15:10:24 +0000 -Subject: [PATCH 070/251] enc28j60: Add device tree compatible string and an +Subject: [PATCH 070/398] enc28j60: Add device tree compatible string and an overlay --- @@ -117290,7 +117290,7 @@ Subject: [PATCH 070/251] enc28j60: Add device tree compatible string and an 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c -index 86ea17e..a1b20c1 100644 +index 86ea17e7ba7bff17f40755663e1b10b7d7b4cbcc..a1b20c146eb8f3d9af757b79c19be96ed43adfba 100644 --- a/drivers/net/ethernet/microchip/enc28j60.c +++ b/drivers/net/ethernet/microchip/enc28j60.c @@ -1630,9 +1630,16 @@ static int enc28j60_remove(struct spi_device *spi) @@ -117311,10 +117311,10 @@ index 86ea17e..a1b20c1 100644 .probe = enc28j60_probe, .remove = enc28j60_remove, -From 68eb237af6a1c15b68fb1eff1596d152f06eeaa5 Mon Sep 17 00:00:00 2001 +From b136cb290d96dc232879a4b68fe0a9ca8c1eba18 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 071/251] Add driver for rpi-proto +Subject: [PATCH 071/398] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -117334,7 +117334,7 @@ Signed-off-by: Waldemar Brodkorb create mode 100644 sound/soc/bcm/rpi-proto.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 7677c89..8669a9a 100644 +index 7677c898773e6dd87c3ef385e380aa42c85e66d8..8669a9ac9734c465c7dc3f40c864f71b68a6de75 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -43,6 +43,13 @@ config SND_BCM2708_SOC_RPI_DAC @@ -117352,7 +117352,7 @@ index 7677c89..8669a9a 100644 tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 30db495..4f5ab1f 100644 +index 30db4951129c2d853c5cf631f4cd1263926692d0..4f5ab1fa4414e64a164eaa4575ffaa06d1cbf332 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -9,6 +9,7 @@ snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o @@ -117371,7 +117371,7 @@ index 30db495..4f5ab1f 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/rpi-proto.c b/sound/soc/bcm/rpi-proto.c new file mode 100644 -index 0000000..c6e45a0 +index 0000000000000000000000000000000000000000..c6e45a03f4c36dab7930fdfc1c8b36c38bd41fb8 --- /dev/null +++ b/sound/soc/bcm/rpi-proto.c @@ -0,0 +1,153 @@ @@ -117529,10 +117529,10 @@ index 0000000..c6e45a0 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From d76384c130898ee68885a8cddfbe4686ad41aa0f Mon Sep 17 00:00:00 2001 +From eb38e3719a0cecee40304c043ccaa3585830dec5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 072/251] config: Add default configs +Subject: [PATCH 072/398] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1254 +++++++++++++++++++++++++++++++++++ @@ -117543,7 +117543,7 @@ Subject: [PATCH 072/251] config: Add default configs diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig new file mode 100644 -index 0000000..16062bf +index 0000000000000000000000000000000000000000..16062bf9ef94dba59e63928d4f4c77e2cfab6e69 --- /dev/null +++ b/arch/arm/configs/bcm2709_defconfig @@ -0,0 +1,1254 @@ @@ -118803,7 +118803,7 @@ index 0000000..16062bf +CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig new file mode 100644 -index 0000000..1d1b799 +index 0000000000000000000000000000000000000000..1d1b7997ba53542b6ebba750c1243a5870f38478 --- /dev/null +++ b/arch/arm/configs/bcmrpi_defconfig @@ -0,0 +1,1265 @@ @@ -120073,10 +120073,10 @@ index 0000000..1d1b799 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 704b0ef1532a29776c5a9df0fe8d93eabdff6f4d Mon Sep 17 00:00:00 2001 +From 7ebc6fee2aec0ea73018812f47afa111c2efddd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 29 Apr 2015 17:24:02 +0200 -Subject: [PATCH 073/251] bcm2835: bcm2835_defconfig +Subject: [PATCH 073/398] bcm2835: bcm2835_defconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -120218,7 +120218,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 1140 insertions(+), 26 deletions(-) diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig -index 31cb073..fdb2e2a 100644 +index 31cb07388885fa22e57798980576ff65cf94fec3..fdb2e2a8d7602d5b1103c8ec26445b55ad393125 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig @@ -1,105 +1,1103 @@ @@ -121502,10 +121502,10 @@ index 31cb073..fdb2e2a 100644 # CONFIG_XZ_DEC_ARM is not set # CONFIG_XZ_DEC_ARMTHUMB is not set -From e3d855ae8766391b2c35d6c61b852e79ca9f9047 Mon Sep 17 00:00:00 2001 +From 80e052626836428b53596160eb261493a65556ee Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 074/251] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 074/398] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -121518,7 +121518,7 @@ rpi-ft5406: Use firmware API create mode 100644 drivers/input/touchscreen/rpi-ft5406.c diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig -index ae33da7..5935716 100644 +index ae33da7ab51ff7f5f84464366be1c4b9f8030527..59357160753f5423a03fc22e9083453c3acb3945 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -608,6 +608,13 @@ config TOUCHSCREEN_EDT_FT5X06 @@ -121536,7 +121536,7 @@ index ae33da7..5935716 100644 tristate "Renesas MIGO-R touchscreen" depends on SH_MIGOR && I2C diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile -index cbaa6ab..13ab8c0 100644 +index cbaa6abb08dae6c58ea1125b0fc0baa335dbc444..13ab8c05fc0bcef6b81938f8de9eca432d695b02 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_TOUCHSCREEN_DA9034) += da9034-ts.o @@ -121549,7 +121549,7 @@ index cbaa6ab..13ab8c0 100644 obj-$(CONFIG_TOUCHSCREEN_EETI) += eeti_ts.o diff --git a/drivers/input/touchscreen/rpi-ft5406.c b/drivers/input/touchscreen/rpi-ft5406.c new file mode 100644 -index 0000000..b27dbee +index 0000000000000000000000000000000000000000..b27dbee8f56773dbd2a5503dc864747d0bebdddc --- /dev/null +++ b/drivers/input/touchscreen/rpi-ft5406.c @@ -0,0 +1,246 @@ @@ -121800,10 +121800,10 @@ index 0000000..b27dbee +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); -From 7298b88fd999f55dc6dde8cb6288562f68b05e56 Mon Sep 17 00:00:00 2001 +From c91d49206485c437b4e2a7fa01256d047919f9ee Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Oct 2014 11:47:53 +0100 -Subject: [PATCH 075/251] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 075/398] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -121835,7 +121835,7 @@ See: https://github.com/raspberrypi/linux/issues/1082 create mode 100644 arch/arm/lib/memset_rpi.S diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h -index cf4f3aa..9fe7780 100644 +index cf4f3aad0fc1c2154c6cf3839ff21bb1c46d6499..9fe7780002ce1847b9009ff9b741b56f34e19256 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h @@ -24,6 +24,11 @@ extern void * memchr(const void *, int, __kernel_size_t); @@ -121851,7 +121851,7 @@ index cf4f3aa..9fe7780 100644 #define memset(p,v,n) \ diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h -index 35c9db8..52d3401 100644 +index 35c9db857ebe9c7d53715ec42518a6e9fbe1dc6e..52d3401ae932b565f732294e5ef2f7a4c184f0ed 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -493,6 +493,9 @@ do { \ @@ -121865,7 +121865,7 @@ index 35c9db8..52d3401 100644 __copy_from_user(void *to, const void __user *from, unsigned long n) { diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile -index d8a7807..9c7dc5b 100644 +index d8a780799506b59bc2edd3f6a513021bcb45ebc0..9c7dc5bc616311a5181a11c479da7cee64208f58 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -6,9 +6,8 @@ @@ -121899,7 +121899,7 @@ index d8a7807..9c7dc5b 100644 diff --git a/arch/arm/lib/arm-mem.h b/arch/arm/lib/arm-mem.h new file mode 100644 -index 0000000..5d4bda1 +index 0000000000000000000000000000000000000000..5d4bda19ad207c65e7b7c6d6d733087faa96a8cc --- /dev/null +++ b/arch/arm/lib/arm-mem.h @@ -0,0 +1,159 @@ @@ -122063,7 +122063,7 @@ index 0000000..5d4bda1 +92: +.endm diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S -index 1512beb..3da60dd 100644 +index 1512bebfbf1b18ad317648891385a24e93d1f35f..3da60dd2caab0968e2156cf8705ebbe5f2551a8b 100644 --- a/arch/arm/lib/copy_from_user.S +++ b/arch/arm/lib/copy_from_user.S @@ -89,11 +89,13 @@ @@ -122083,7 +122083,7 @@ index 1512beb..3da60dd 100644 .align 0 diff --git a/arch/arm/lib/exports_rpi.c b/arch/arm/lib/exports_rpi.c new file mode 100644 -index 0000000..1f82604 +index 0000000000000000000000000000000000000000..1f826047db754ffde0077ac291b9605e201abd07 --- /dev/null +++ b/arch/arm/lib/exports_rpi.c @@ -0,0 +1,37 @@ @@ -122126,7 +122126,7 @@ index 0000000..1f82604 +EXPORT_SYMBOL(memcmp); diff --git a/arch/arm/lib/memcmp_rpi.S b/arch/arm/lib/memcmp_rpi.S new file mode 100644 -index 0000000..bf6e4ed +index 0000000000000000000000000000000000000000..bf6e4edfc9d3b9882b72edada681b79ce37850df --- /dev/null +++ b/arch/arm/lib/memcmp_rpi.S @@ -0,0 +1,285 @@ @@ -122417,7 +122417,7 @@ index 0000000..bf6e4ed +ENDPROC(memcmp) diff --git a/arch/arm/lib/memcpy_rpi.S b/arch/arm/lib/memcpy_rpi.S new file mode 100644 -index 0000000..30f8a90 +index 0000000000000000000000000000000000000000..30f8a9089a835ff265ce5aaf98f066258608eb92 --- /dev/null +++ b/arch/arm/lib/memcpy_rpi.S @@ -0,0 +1,61 @@ @@ -122484,7 +122484,7 @@ index 0000000..30f8a90 +ENDPROC(mmiocpy) diff --git a/arch/arm/lib/memcpymove.h b/arch/arm/lib/memcpymove.h new file mode 100644 -index 0000000..d8be584 +index 0000000000000000000000000000000000000000..d8be5849c8609f4ead85527ec527184614a77371 --- /dev/null +++ b/arch/arm/lib/memcpymove.h @@ -0,0 +1,506 @@ @@ -122996,7 +122996,7 @@ index 0000000..d8be584 +.endm diff --git a/arch/arm/lib/memmove_rpi.S b/arch/arm/lib/memmove_rpi.S new file mode 100644 -index 0000000..8b0760c +index 0000000000000000000000000000000000000000..8b0760c0904c51ef205e56d238b5df8a5226d7cf --- /dev/null +++ b/arch/arm/lib/memmove_rpi.S @@ -0,0 +1,61 @@ @@ -123063,7 +123063,7 @@ index 0000000..8b0760c +ENDPROC(memmove) diff --git a/arch/arm/lib/memset_rpi.S b/arch/arm/lib/memset_rpi.S new file mode 100644 -index 0000000..7067415 +index 0000000000000000000000000000000000000000..70674158d76cd38d8d70c987aa54a6b477e4fa91 --- /dev/null +++ b/arch/arm/lib/memset_rpi.S @@ -0,0 +1,123 @@ @@ -123191,7 +123191,7 @@ index 0000000..7067415 +ENDPROC(memset) +ENDPROC(mmioset) diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c -index 588bbc2..c29df92 100644 +index 588bbc288396ae52fe0d801bc537906b3e5dbfce..c29df924b50c2e7b071257aa2d842169252d9bd9 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c @@ -22,6 +22,14 @@ @@ -123342,10 +123342,10 @@ index 588bbc2..c29df92 100644 static unsigned long noinline __clear_user_memset(void __user *addr, unsigned long n) -From e8f27792e51eda819e6918697a67dc85a2d2fc13 Mon Sep 17 00:00:00 2001 +From 7d8058fd705acc31a50c81cb86d33dbafeab9ead Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 076/251] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 076/398] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -123363,7 +123363,7 @@ of the trigger signal may be preferable. 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/reset/gpio-poweroff.c b/drivers/power/reset/gpio-poweroff.c -index be3d81f..a030ae9 100644 +index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e821869eedd320 100644 --- a/drivers/power/reset/gpio-poweroff.c +++ b/drivers/power/reset/gpio-poweroff.c @@ -49,9 +49,11 @@ static int gpio_poweroff_probe(struct platform_device *pdev) @@ -123380,10 +123380,10 @@ index be3d81f..a030ae9 100644 "%s: pm_power_off function already registered", __func__); -From e1cb11c1118f942ad55724ec8036065cbba41a62 Mon Sep 17 00:00:00 2001 +From 18115d7af2425a21897b39343652c9b629ea6019 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 077/251] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 077/398] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -123392,7 +123392,7 @@ See: https://github.com/raspberrypi/linux/issues/1054 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c -index d0e7dfc..57b0760 100644 +index d0e7dfc647cf21a729696cbe499f7fc6dbf53b02..57b0760cf0027c36aff6568a547e1aed9a1e68d5 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -695,6 +695,7 @@ static struct class *spidev_class; @@ -123404,10 +123404,10 @@ index d0e7dfc..57b0760 100644 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From e74c88c3ce4685417d4a3aee8ce6cd22092c5315 Mon Sep 17 00:00:00 2001 +From 0ab435dcd27c18ad290be39bb63d57a24ee7c119 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 17:00:18 +0100 -Subject: [PATCH 078/251] scripts/dtc: Add overlay support +Subject: [PATCH 078/398] scripts/dtc: Add overlay support --- scripts/dtc/checks.c | 119 ++- @@ -123423,7 +123423,7 @@ Subject: [PATCH 078/251] scripts/dtc: Add overlay support 10 files changed, 1685 insertions(+), 1145 deletions(-) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index e81a8c7..efd1bc6 100644 +index e81a8c74b8d2802003c14584b8326bb5bfb174be..efd1bc6457747bd665f707523bf745e9ebe94def 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -458,21 +458,91 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -123578,7 +123578,7 @@ index e81a8c7..efd1bc6 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index 0ee1caf..dd44ba2 100644 +index 0ee1caf03dd057bee8c212002568941f0658edd7..dd44ba2aa11d019c7b71cede4f0806dd53c7b0db 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); @@ -123594,7 +123594,7 @@ index 0ee1caf..dd44ba2 100644 DPRINT("Keyword: /memreserve/\n"); BEGIN_DEFAULT(); diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped -index 11cd78e..1518525 100644 +index 11cd78e723050e56d00709ef63164bd83cccff9e..15185255fafdbebf805ad2bb2c63f0fdef4c8776 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ @@ -124488,7 +124488,7 @@ index 11cd78e..1518525 100644 diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped -index 116458c..2c1784e 100644 +index 116458c8dfc4cbd728db8fc348bb254a9bae7208..2c1784e3b4e1c56a3eeeb9c00d1bcb4a187f2fb5 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -1,19 +1,19 @@ @@ -127299,7 +127299,7 @@ index 116458c..2c1784e 100644 } + diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped -index 30867c6..0b22bbb 100644 +index 30867c688300e38333877360e3b05475d5b4a2a3..0b22bbb974795a98eafd8f22425039713d3994b7 100644 --- a/scripts/dtc/dtc-parser.tab.h_shipped +++ b/scripts/dtc/dtc-parser.tab.h_shipped @@ -1,19 +1,19 @@ @@ -127462,7 +127462,7 @@ index 30867c6..0b22bbb 100644 -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y -index 5a897e3..56b9c15 100644 +index 5a897e36562d67107dba44fa91274253b34152dc..56b9c152b11edf404834e2aa9c7637205d4d1c38 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -19,6 +19,7 @@ @@ -127521,7 +127521,7 @@ index 5a897e3..56b9c15 100644 ; diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c -index 8c4add6..0cbb14c 100644 +index 8c4add69a76578839de910292b165b4504f47cf2..0cbb14c96a012a6975f6f4f697398e9ad9aedce1 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -29,6 +29,7 @@ int reservenum; /* Number of memory reservation slots */ @@ -127569,7 +127569,7 @@ index 8c4add6..0cbb14c 100644 usage(NULL); default: diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h -index 56212c8..fe45748 100644 +index 56212c8df660396b1d9bf6752e1121990e0789ab..fe4574855e41f8313a5f4e15b468816a07a5d84b 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h @@ -54,6 +54,7 @@ extern int reservenum; /* Number of memory reservation slots */ @@ -127639,7 +127639,7 @@ index 56212c8..fe45748 100644 void delete_labels(struct label **labels); diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c -index bd99fa2..f439b40 100644 +index bd99fa2d33b85e873bd00178d6390d70f4afaa0d..f439b405848bdf314077e77808d4ba04663515ad 100644 --- a/scripts/dtc/flattree.c +++ b/scripts/dtc/flattree.c @@ -262,6 +262,12 @@ static void flatten_tree(struct node *tree, struct emitter *emit, @@ -127805,17 +127805,17 @@ index bd99fa2..f439b40 100644 } diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h -index 5b8c7d5..86b7338 100644 +index 5b8c7d53d608bdbb60776c97732e44cb310cc4c1..86b7338ad78fd60a0d5e5b4a44bce194ee07cc48 100644 --- a/scripts/dtc/version_gen.h +++ b/scripts/dtc/version_gen.h @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" -From 682bf3cce9aab7644697e66b2a3e3e9ae5ccdf1c Mon Sep 17 00:00:00 2001 +From 99acfdaf21130f5abbb6f35b20a34f4ec0326b63 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 079/251] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 079/398] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -127839,7 +127839,7 @@ Subject: [PATCH 079/251] mfd: Add Raspberry Pi Sense HAT core driver create mode 100644 include/linux/mfd/rpisense/joystick.h diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig -index 4215b53..4364d7c 100644 +index 4215b5382092c15d693e62de6e029626e9fa551d..4364d7c85543b4537c839df95cf5b524948a06c2 100644 --- a/drivers/input/joystick/Kconfig +++ b/drivers/input/joystick/Kconfig @@ -330,4 +330,12 @@ config JOYSTICK_MAPLE @@ -127856,7 +127856,7 @@ index 4215b53..4364d7c 100644 + endif diff --git a/drivers/input/joystick/Makefile b/drivers/input/joystick/Makefile -index 92dc0de..1758160 100644 +index 92dc0de9dfeda43171a901f96c40bebe0e7a5ae2..1758160374938dd150b8a380797b6decc00a64aa 100644 --- a/drivers/input/joystick/Makefile +++ b/drivers/input/joystick/Makefile @@ -32,4 +32,5 @@ obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o @@ -127867,7 +127867,7 @@ index 92dc0de..1758160 100644 diff --git a/drivers/input/joystick/rpisense-js.c b/drivers/input/joystick/rpisense-js.c new file mode 100644 -index 0000000..6a41676 +index 0000000000000000000000000000000000000000..6a416769065d2198344792eb02d8e38da1d03fd4 --- /dev/null +++ b/drivers/input/joystick/rpisense-js.c @@ -0,0 +1,153 @@ @@ -128025,7 +128025,7 @@ index 0000000..6a41676 +MODULE_AUTHOR("Serge Schneider "); +MODULE_LICENSE("GPL"); diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig -index 4d92df6..c5730dc 100644 +index 4d92df6ef9fe92ac69c6f26e99e33f83e7e2ac71..c5730dc627440f87f424a6c47a4bf0a7a3bf1f9d 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -10,6 +10,14 @@ config MFD_CORE @@ -128044,7 +128044,7 @@ index 4d92df6..c5730dc 100644 tristate "AMD CS5535 and CS5536 southbridge core functions" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile -index a8b76b8..e6339d2 100644 +index a8b76b81b467987383c7a857f2dc5f0620a5b4dc..e6339d283525b49ca6bddbcc4d7ba59a044d3926 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -194,3 +194,5 @@ intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o @@ -128055,7 +128055,7 @@ index a8b76b8..e6339d2 100644 +obj-$(CONFIG_MFD_RPISENSE_CORE) += rpisense-core.o diff --git a/drivers/mfd/rpisense-core.c b/drivers/mfd/rpisense-core.c new file mode 100644 -index 0000000..eea9312 +index 0000000000000000000000000000000000000000..eea9312dc96a496ce846b0c5a83e6e4f3be5ee1e --- /dev/null +++ b/drivers/mfd/rpisense-core.c @@ -0,0 +1,157 @@ @@ -128217,10 +128217,10 @@ index 0000000..eea9312 +MODULE_LICENSE("GPL"); + diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig -index 0f33a78..4caa417 100644 +index 8da620f0b20ce4f1badcba83efdc2d2e5274c135..6fbf6986e104571a9ab275a68001d4906d80af45 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig -@@ -2506,3 +2506,16 @@ config FB_SM712 +@@ -2505,3 +2505,16 @@ config FB_SM712 This driver is also available as a module. The module will be called sm712fb. If you want to compile it as a module, say M here and read . @@ -128238,7 +128238,7 @@ index 0f33a78..4caa417 100644 + help + This is the framebuffer driver for the Raspberry Pi Sense HAT diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile -index 9b086ac..7101277 100644 +index 9b086ac5fd5bb1a44460b91a2cf421e67958b6fc..7101277a0704df847796525f1b9e4a8a37d2d6a6 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -150,6 +150,7 @@ obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o @@ -128251,7 +128251,7 @@ index 9b086ac..7101277 100644 obj-$(CONFIG_FB_VIRTUAL) += vfb.o diff --git a/drivers/video/fbdev/rpisense-fb.c b/drivers/video/fbdev/rpisense-fb.c new file mode 100644 -index 0000000..26432a5 +index 0000000000000000000000000000000000000000..26432a5a0b4b4a5198768eceb1e34da99fe1efb2 --- /dev/null +++ b/drivers/video/fbdev/rpisense-fb.c @@ -0,0 +1,293 @@ @@ -128550,7 +128550,7 @@ index 0000000..26432a5 + diff --git a/include/linux/mfd/rpisense/core.h b/include/linux/mfd/rpisense/core.h new file mode 100644 -index 0000000..4856aa3 +index 0000000000000000000000000000000000000000..4856aa3c8b0661647ec1b5466d3a8743c02b1ddb --- /dev/null +++ b/include/linux/mfd/rpisense/core.h @@ -0,0 +1,47 @@ @@ -128603,7 +128603,7 @@ index 0000000..4856aa3 +#endif diff --git a/include/linux/mfd/rpisense/framebuffer.h b/include/linux/mfd/rpisense/framebuffer.h new file mode 100644 -index 0000000..2ba95d7 +index 0000000000000000000000000000000000000000..2ba95d7eebaf9ccce910b43835286df94cb7d075 --- /dev/null +++ b/include/linux/mfd/rpisense/framebuffer.h @@ -0,0 +1,32 @@ @@ -128641,7 +128641,7 @@ index 0000000..2ba95d7 +#endif diff --git a/include/linux/mfd/rpisense/joystick.h b/include/linux/mfd/rpisense/joystick.h new file mode 100644 -index 0000000..56196dc +index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c9c9cff39 --- /dev/null +++ b/include/linux/mfd/rpisense/joystick.h @@ -0,0 +1,35 @@ @@ -128681,10 +128681,10 @@ index 0000000..56196dc + +#endif -From 28fda0b00b2fe4e5a5151024124e57a3821c1ec4 Mon Sep 17 00:00:00 2001 +From 12b86e42a9d0ea0501508c8e0317c92263c0952f Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 080/251] RaspiDAC3 support +Subject: [PATCH 080/398] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -128702,7 +128702,7 @@ Signed-off-by: Matthias Reichl create mode 100644 sound/soc/bcm/raspidac3.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8669a9a..1a3f826 100644 +index 8669a9ac9734c465c7dc3f40c864f71b68a6de75..1a3f8264403d64690fef60d41df38d21d3eb6030 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -56,3 +56,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC @@ -128718,7 +128718,7 @@ index 8669a9a..1a3f826 100644 + help + Say Y or M if you want to add support for RaspiDAC Rev.3x. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 4f5ab1f..b21e11e 100644 +index 4f5ab1fa4414e64a164eaa4575ffaa06d1cbf332..b21e11ee36e17a29bfae9c4eda78f73ca9c23d48 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -11,6 +11,7 @@ snd-soc-hifiberry-amp-objs := hifiberry_amp.o @@ -128736,7 +128736,7 @@ index 4f5ab1f..b21e11e 100644 +obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o diff --git a/sound/soc/bcm/raspidac3.c b/sound/soc/bcm/raspidac3.c new file mode 100644 -index 0000000..3cabf5b +index 0000000000000000000000000000000000000000..3cabf5b42f50c708443c44fec30e0b8701cc7196 --- /dev/null +++ b/sound/soc/bcm/raspidac3.c @@ -0,0 +1,191 @@ @@ -128932,10 +128932,10 @@ index 0000000..3cabf5b +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 852162b9ea81d2a87bd17ad36b1e347dd02039e2 Mon Sep 17 00:00:00 2001 +From f820357b8325fdfc8a2b670752da5f7565cb9f78 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:02:34 +0100 -Subject: [PATCH 081/251] tpa6130a2: Add headphone switch control +Subject: [PATCH 081/398] tpa6130a2: Add headphone switch control Signed-off-by: Jan Grulich --- @@ -128943,7 +128943,7 @@ Signed-off-by: Jan Grulich 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c -index 11d85c5..3caaa17 100644 +index 11d85c5c787addb8d8add7fc2b52ab91cc49b63d..3caaa17e28e91e995d6781ca7f88b747da542e9b 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -4,6 +4,7 @@ @@ -129026,17 +129026,17 @@ index 11d85c5..3caaa17 100644 /* -From a75c4939c66e03c683d86b01d793d28c074818eb Mon Sep 17 00:00:00 2001 +From a69891f08f15f21a2d2c16cf80cbe8c2ff191a91 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Sep 2015 23:38:59 +0100 -Subject: [PATCH 082/251] irq-bcm2835: Fix building with 2708 +Subject: [PATCH 082/398] irq-bcm2835: Fix building with 2708 --- drivers/irqchip/irq-bcm2835.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c -index 20deb28..c02bf8a 100644 +index 20deb282286834b1f234a65e614b8584688a25d7..c02bf8a9f9970401dc98c4f656c20c35d8070123 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c @@ -82,6 +82,7 @@ @@ -129057,10 +129057,10 @@ index 20deb28..c02bf8a 100644 } init_FIQ(FIQ_START); -From ef612ffab83e04751eca4f4d4a5017fecaab9cae Mon Sep 17 00:00:00 2001 +From 4c55aeef8eafa8be7e31181a26ddaf086c08632c Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 083/251] rpi_display: add backlight driver and overlay +Subject: [PATCH 083/398] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -129082,7 +129082,7 @@ Signed-off-by: Gordon Hollingworth create mode 100644 drivers/video/backlight/rpi_backlight.c diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index d8c2771..fb7ac49 100644 +index d8c2771cfd22aa73100220a6ba3cb8833b19004f..fb7ac496e7a179daf720bdeba503e33381c96191 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -38,6 +38,7 @@ dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb @@ -129094,7 +129094,7 @@ index d8c2771..fb7ac49 100644 dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 268d400..d7f2979 100644 +index 268d400a3500e6a257cca90ba54d97bebdf797fe..d7f2979dfe1cb516a70d0cc0a68301976ef86f74 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -462,6 +462,12 @@ Load: dtoverlay=raspidac3 @@ -129112,7 +129112,7 @@ index 268d400..d7f2979 100644 Load: dtoverlay=rpi-dac diff --git a/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts b/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts new file mode 100644 -index 0000000..c021d02 +index 0000000000000000000000000000000000000000..c021d02bb75ff5ceb5c5066d00e4bca942554032 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts @@ -0,0 +1,21 @@ @@ -129138,7 +129138,7 @@ index 0000000..c021d02 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 16062bf..13999af 100644 +index 16062bf9ef94dba59e63928d4f4c77e2cfab6e69..13999af72f2a90c4485eacc8bf0af74f3c6af1d5 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -808,6 +808,7 @@ CONFIG_FB_UDL=m @@ -129150,7 +129150,7 @@ index 16062bf..13999af 100644 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 1d1b799..146add9 100644 +index 1d1b7997ba53542b6ebba750c1243a5870f38478..146add9db493d15005ece554cc0694d8b815dda4 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -801,6 +801,7 @@ CONFIG_FB_UDL=m @@ -129162,7 +129162,7 @@ index 1d1b799..146add9 100644 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_LOGO=y diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig -index 5ffa4b4..c3023ab 100644 +index 5ffa4b4e26c0e874d3f63068456b3d72d8b4beb5..c3023ab052b477dde522a262a360ec312e94de22 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -265,6 +265,12 @@ config BACKLIGHT_PWM @@ -129179,7 +129179,7 @@ index 5ffa4b4..c3023ab 100644 tristate "Backlight Driver for DA9030/DA9034 using WLED" depends on PMIC_DA903X diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile -index 16ec534..00eff87 100644 +index 16ec534cff3044209adbae3495c19d97fee3ef73..00eff87fb3391300e78f055fa05d3b9647fa053d 100644 --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile @@ -50,6 +50,7 @@ obj-$(CONFIG_BACKLIGHT_PANDORA) += pandora_bl.o @@ -129192,7 +129192,7 @@ index 16ec534..00eff87 100644 obj-$(CONFIG_BACKLIGHT_TOSA) += tosa_bl.o diff --git a/drivers/video/backlight/rpi_backlight.c b/drivers/video/backlight/rpi_backlight.c new file mode 100644 -index 0000000..14a0d9b +index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd509fcbaad --- /dev/null +++ b/drivers/video/backlight/rpi_backlight.c @@ -0,0 +1,119 @@ @@ -129316,7 +129316,7 @@ index 0000000..14a0d9b +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 525816d..b011489 100644 +index 525816d7547e4aa1703d5b4283f5f39dbf92f7d7..b011489eebc0180fce28eea86bd637853c0d05de 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -112,6 +112,7 @@ enum rpi_firmware_property_tag { @@ -129328,17 +129328,17 @@ index 525816d..b011489 100644 RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 9e683aed13baf656729ca37b7efb70d595781f85 Mon Sep 17 00:00:00 2001 +From 488717703ff08168d900b443ce1e18adf5216fbe Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 16 Nov 2015 14:05:35 +0000 -Subject: [PATCH 084/251] bcm2835-dma: Fix up convert to DMA pool +Subject: [PATCH 084/398] bcm2835-dma: Fix up convert to DMA pool --- drivers/dma/bcm2835-dma.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 0adc347..985019b 100644 +index 0adc347fe5de46196aee65e86e9a4e3dcc7349f0..985019b72456f65ddbb54c3bfa49e18dffe4285c 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -488,6 +488,17 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( @@ -129416,10 +129416,10 @@ index 0adc347..985019b 100644 /* Next block is empty. */ control_block->next = 0; -From 17d171c260c02491c27b1d89e84c09053f825ac2 Mon Sep 17 00:00:00 2001 +From 4076b2d4454f2767b8d52bb26ab2d2468e36ad55 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 Nov 2015 11:38:59 +0000 -Subject: [PATCH 085/251] scripts: Multi-platform support for mkknlimg and +Subject: [PATCH 085/398] scripts: Multi-platform support for mkknlimg and knlinfo The firmware uses tags in the kernel trailer to choose which dtb file @@ -129437,7 +129437,7 @@ builds. 2 files changed, 80 insertions(+), 58 deletions(-) diff --git a/scripts/knlinfo b/scripts/knlinfo -index a0e8663..b9ef124 100755 +index a0e8663ae86b97ecded54bd469ac4ffe84eb2684..b9ef124fa033fddc8847cf1586a6108f4e5eda04 100755 --- a/scripts/knlinfo +++ b/scripts/knlinfo @@ -18,6 +18,8 @@ my %atom_formats = @@ -129450,7 +129450,7 @@ index a0e8663..b9ef124 100755 ); diff --git a/scripts/mkknlimg b/scripts/mkknlimg -index 3998d43..005f404 100755 +index 3998d43b694ff06fd9562b89f5a7be26b4cb6e15..005f404f572029822bb5bea32774a7c26d7141e5 100755 --- a/scripts/mkknlimg +++ b/scripts/mkknlimg @@ -13,12 +13,20 @@ use strict; @@ -129668,10 +129668,10 @@ index 3998d43..005f404 100755 - return (($val eq 'y') || ($val eq '1')); -} -From 3daa279385ccf4297bb8beb5b1f770ea535e7245 Mon Sep 17 00:00:00 2001 +From ca59628f8b7f04ce3fb4f80cd119afc9ad865fa4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 2 Mar 2015 13:01:12 -0800 -Subject: [PATCH 086/251] drm/vc4: Add suport for 3D rendering using the V3D +Subject: [PATCH 086/398] drm/vc4: Add suport for 3D rendering using the V3D engine. This is a squash of the out-of-tree development series. Since that @@ -129716,7 +129716,7 @@ Signed-off-by: Eric Anholt create mode 100644 include/uapi/drm/vc4_drm.h diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile -index 32b4f9c..4c6a99f 100644 +index 32b4f9cd8f5267b1176f1221f6324df60d0a5951..4c6a99f0398c03ce5d83dea1ec3f7906a817bf89 100644 --- a/drivers/gpu/drm/vc4/Makefile +++ b/drivers/gpu/drm/vc4/Makefile @@ -8,10 +8,19 @@ vc4-y := \ @@ -129741,7 +129741,7 @@ index 32b4f9c..4c6a99f 100644 + +CFLAGS_vc4_trace_points.o := -I$(src) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index ab9f510..bfa605f 100644 +index ab9f5108ae1ab1650af40fd9395cde751a3b25a4..bfa605f68e9459585de68d872a0fe5596b6819cc 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -15,16 +15,174 @@ @@ -130244,7 +130244,7 @@ index ab9f510..bfa605f 100644 +} +#endif diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c -index 265064c..3be2720 100644 +index 265064c62d493b54023947d49597852a16328a5f..3be272047820ac8f809839f252a1f8bdba2ac97c 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -35,6 +35,7 @@ @@ -130363,7 +130363,7 @@ index 265064c..3be2720 100644 .cursor_set = NULL, /* handled by drm_mode_cursor_universal */ .cursor_move = NULL, /* handled by drm_mode_cursor_universal */ diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c -index 4297b0a..d76ad10 100644 +index 4297b0a5b74e1be08a0933a89660958b2e61b824..d76ad10b07fda3bb674f45c2151e621c60633364 100644 --- a/drivers/gpu/drm/vc4/vc4_debugfs.c +++ b/drivers/gpu/drm/vc4/vc4_debugfs.c @@ -16,11 +16,14 @@ @@ -130382,7 +130382,7 @@ index 4297b0a..d76ad10 100644 #define VC4_DEBUGFS_ENTRIES ARRAY_SIZE(vc4_debugfs_list) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index d5db9e0..3baf1fc 100644 +index d5db9e0f3b736ee1acc07888f59c4650aaa84287..3baf1fcb8e875064c009d2120203e42fa624db9b 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -14,8 +14,10 @@ @@ -130529,7 +130529,7 @@ index d5db9e0..3baf1fc 100644 static int vc4_platform_drm_probe(struct platform_device *pdev) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index fd8319f..8cc89d1 100644 +index fd8319fa682ecc64bd10cff71c0a5fbf1247c213..8cc89d125bbf5ed90875dc7c94aee171571f4830 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -15,8 +15,85 @@ struct vc4_dev { @@ -130906,7 +130906,7 @@ index fd8319f..8cc89d1 100644 + uint32_t width, uint32_t height, uint8_t cpp); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c new file mode 100644 -index 0000000..361390b +index 0000000000000000000000000000000000000000..361390b5febd6f97e69b395f6d3c5e3f60a122fe --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -0,0 +1,686 @@ @@ -131598,7 +131598,7 @@ index 0000000..361390b +} diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c new file mode 100644 -index 0000000..f29b796 +index 0000000000000000000000000000000000000000..f29b7961695ce3f6a09c249a63e8cd25f35a91a7 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -0,0 +1,211 @@ @@ -131814,7 +131814,7 @@ index 0000000..f29b796 + spin_unlock_irqrestore(&vc4->job_lock, irqflags); +} diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c -index 2e5597d..c83287a 100644 +index 2e5597d10cc629e08ccde726a64d6e36da69a48f..c83287af8c897d36b65c045c7663121901d43592 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -15,6 +15,7 @@ @@ -131998,7 +131998,7 @@ index 2e5597d..c83287a 100644 drm_mode_config_reset(dev); diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h new file mode 100644 -index 0000000..9757bc8 +index 0000000000000000000000000000000000000000..9757bc8d3c0d274b7c878cc0bb65cb81b7fdc9fa --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -0,0 +1,384 @@ @@ -132387,7 +132387,7 @@ index 0000000..9757bc8 + +#endif /* VC4_PACKET_H */ diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c -index 887f3ca..65e5455 100644 +index 887f3caad0be6b6fd115b4e9430abfd3aeadd53f..65e545555c21f9fb709d4542f7e89274fdc63eca 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -29,6 +29,14 @@ struct vc4_plane_state { @@ -132460,7 +132460,7 @@ index 887f3ca..65e5455 100644 .cleanup_fb = NULL, diff --git a/drivers/gpu/drm/vc4/vc4_qpu_defines.h b/drivers/gpu/drm/vc4/vc4_qpu_defines.h new file mode 100644 -index 0000000..e47c994 +index 0000000000000000000000000000000000000000..e47c994d36bf81ef350041ce0aad9f68a82417f4 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_qpu_defines.h @@ -0,0 +1,268 @@ @@ -132734,7 +132734,7 @@ index 0000000..e47c994 +#endif /* VC4_QPU_DEFINES_H */ diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c new file mode 100644 -index 0000000..0ffac8d +index 0000000000000000000000000000000000000000..0ffac8df92cd3ee5be1de1368a5964ae62560741 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -0,0 +1,448 @@ @@ -133188,7 +133188,7 @@ index 0000000..0ffac8d +} diff --git a/drivers/gpu/drm/vc4/vc4_trace.h b/drivers/gpu/drm/vc4/vc4_trace.h new file mode 100644 -index 0000000..ad7b1ea +index 0000000000000000000000000000000000000000..ad7b1ea720c288eb587d16e5f8e10eace5de93f3 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_trace.h @@ -0,0 +1,63 @@ @@ -133257,7 +133257,7 @@ index 0000000..ad7b1ea +#include diff --git a/drivers/gpu/drm/vc4/vc4_trace_points.c b/drivers/gpu/drm/vc4/vc4_trace_points.c new file mode 100644 -index 0000000..e6278f2 +index 0000000000000000000000000000000000000000..e6278f25716b72121560595fc5df976bc4870b4f --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_trace_points.c @@ -0,0 +1,14 @@ @@ -133277,7 +133277,7 @@ index 0000000..e6278f2 +#endif diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c new file mode 100644 -index 0000000..b9cb7cf +index 0000000000000000000000000000000000000000..b9cb7cf40082c625cefd3b7048b1bace95489869 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -0,0 +1,268 @@ @@ -133551,7 +133551,7 @@ index 0000000..b9cb7cf +}; diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c new file mode 100644 -index 0000000..ff3b62f +index 0000000000000000000000000000000000000000..ff3b62fbc920b05745d35f1b69c4a1b6ad5f83ba --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -0,0 +1,958 @@ @@ -134515,7 +134515,7 @@ index 0000000..ff3b62f +} diff --git a/drivers/gpu/drm/vc4/vc4_validate_shaders.c b/drivers/gpu/drm/vc4/vc4_validate_shaders.c new file mode 100644 -index 0000000..0aab9d7 +index 0000000000000000000000000000000000000000..0aab9d72bec4744028c124d8d578fe8712010dc7 --- /dev/null +++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c @@ -0,0 +1,521 @@ @@ -135042,7 +135042,7 @@ index 0000000..0aab9d7 +} diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h new file mode 100644 -index 0000000..499daae +index 0000000000000000000000000000000000000000..499daae549a559e85fec9ed4216460a2cb7872c9 --- /dev/null +++ b/include/uapi/drm/vc4_drm.h @@ -0,0 +1,229 @@ @@ -135276,10 +135276,10 @@ index 0000000..499daae + +#endif /* _UAPI_VC4_DRM_H_ */ -From 666602424fba993b28229ce2133ff8d2a16b248e Mon Sep 17 00:00:00 2001 +From b33b506d4d789214569241f6bc54934a5ecfede3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Oct 2015 11:32:14 -0700 -Subject: [PATCH 087/251] drm/vc4: Force HDMI to connected. +Subject: [PATCH 087/398] drm/vc4: Force HDMI to connected. For some reason on the downstream tree, the HPD GPIO isn't working. @@ -135289,7 +135289,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c -index da9a36d..d15c529 100644 +index da9a36d6e1d18164282222cb8530348bfba8da37..d15c529bee2123eb740247bdfbc67eb4b0311f2b 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -164,6 +164,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) @@ -135302,10 +135302,10 @@ index da9a36d..d15c529 100644 if (gpio_get_value(vc4->hdmi->hpd_gpio)) return connector_status_connected; -From 83244506ffc629eb672d74f1e075d25188b4d081 Mon Sep 17 00:00:00 2001 +From 2184193072955bbc39806612500d67aebd05c6a8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:23:18 -0700 -Subject: [PATCH 088/251] drm/vc4: bo cache locking fixes. +Subject: [PATCH 088/398] drm/vc4: bo cache locking fixes. Signed-off-by: Eric Anholt --- @@ -135314,7 +135314,7 @@ Signed-off-by: Eric Anholt 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index bfa605f..af0fde6 100644 +index bfa605f68e9459585de68d872a0fe5596b6819cc..af0fde6ea8cd594f90b55eb13f1183d06797f957 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -112,14 +112,14 @@ void vc4_bo_cache_purge(struct drm_device *dev) @@ -135441,7 +135441,7 @@ index bfa605f..af0fde6 100644 seq_printf(m, "num bos allocated: %d\n", stats.num_allocated); seq_printf(m, "size bos allocated: %dkb\n", stats.size_allocated / 1024); diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 8cc89d1..c079b82 100644 +index 8cc89d125bbf5ed90875dc7c94aee171571f4830..c079b8253c653f776654c02072221b6a67c1b274 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -49,7 +49,7 @@ struct vc4_dev { @@ -135454,10 +135454,10 @@ index 8cc89d1..c079b82 100644 /* Sequence number for the last job queued in job_list. * Starts at 0 (no jobs emitted). -From 149b9d3feccb3fcc379d91cacc35fa8e6ce59dd1 Mon Sep 17 00:00:00 2001 +From 00ce428786e4dac155c5414303d23ec6e0818b20 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:29:41 -0700 -Subject: [PATCH 089/251] drm/vc4: bo cache locking cleanup. +Subject: [PATCH 089/398] drm/vc4: bo cache locking cleanup. Signed-off-by: Eric Anholt --- @@ -135465,7 +135465,7 @@ Signed-off-by: Eric Anholt 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index af0fde6..acd360c 100644 +index af0fde6ea8cd594f90b55eb13f1183d06797f957..acd360c89e14740c7a32889e58575dd138edf654 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -215,7 +215,6 @@ vc4_bo_cache_free_old(struct drm_device *dev) @@ -135549,10 +135549,10 @@ index af0fde6..acd360c 100644 static void vc4_bo_cache_time_timer(unsigned long data) -From 7a42f6a5addb1961f016f14ef9010bdc19565a77 Mon Sep 17 00:00:00 2001 +From 3c69ea7fcc18ecae1f640de1a0cfd808d277d52b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:32:24 -0700 -Subject: [PATCH 090/251] drm/vc4: Use job_lock to protect seqno_cb_list. +Subject: [PATCH 090/398] drm/vc4: Use job_lock to protect seqno_cb_list. We're (mostly) not supposed to be using struct_mutex in drivers these days. @@ -135563,7 +135563,7 @@ Signed-off-by: Eric Anholt 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 361390b..b1853b2 100644 +index 361390b5febd6f97e69b395f6d3c5e3f60a122fe..b1853b217a919fbed64aa8680f7974c36f58d3a3 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -474,7 +474,6 @@ vc4_job_handle_completed(struct vc4_dev *vc4) @@ -135606,10 +135606,10 @@ index 361390b..b1853b2 100644 return ret; } -From bf31c306877aef83b109356b8471a69590d0a915 Mon Sep 17 00:00:00 2001 +From a6acf91fd2518806ed87e75a2188b37451b19f76 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 091/251] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 091/398] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135625,7 +135625,7 @@ Signed-off-by: Eric Anholt 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index b1853b2..32f375a 100644 +index b1853b217a919fbed64aa8680f7974c36f58d3a3..32f375ad7b7211e1fcd226f50af4e755b89b2fb9 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -244,13 +244,15 @@ static void @@ -135672,10 +135672,10 @@ index b1853b2..32f375a 100644 } -From 90604ba9389fd34efcd5c4266fd9d4604f1543e4 Mon Sep 17 00:00:00 2001 +From d8389dbf870e5dd81ff1043f329df1a6baaf80e3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 092/251] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 092/398] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135692,7 +135692,7 @@ Signed-off-by: Eric Anholt 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 32f375a..55551ea 100644 +index 32f375ad7b7211e1fcd226f50af4e755b89b2fb9..55551ea7467941ae057a10c094f79e16125877b8 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -439,10 +439,12 @@ fail: @@ -135749,10 +135749,10 @@ index 32f375a..55551ea 100644 return ret; } -From dcdfacf7cbb2ad8feb6c11326919b7482b2ac3cd Mon Sep 17 00:00:00 2001 +From 91141c5d2fba78ccc9ae78e23d7bd6e31be03b6a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 20 Oct 2015 13:59:15 +0100 -Subject: [PATCH 093/251] drm/vc4: Add support for more display plane formats. +Subject: [PATCH 093/398] drm/vc4: Add support for more display plane formats. Signed-off-by: Eric Anholt --- @@ -135760,7 +135760,7 @@ Signed-off-by: Eric Anholt 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c -index 65e5455..0f85eb5 100644 +index 65e545555c21f9fb709d4542f7e89274fdc63eca..0f85eb5b9f3d49fb24f3981eafca964af552db79 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -59,6 +59,22 @@ static const struct hvs_format { @@ -135787,10 +135787,10 @@ index 65e5455..0f85eb5 100644 static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) -From 4f981196d46dcd9576c87c957b15acc0a68dcca8 Mon Sep 17 00:00:00 2001 +From 9eaae76052f3a9c81a97bbf3a5565002426ce43f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:31:56 +0100 -Subject: [PATCH 094/251] drm/vc4: No need to stop the stopped threads. +Subject: [PATCH 094/398] drm/vc4: No need to stop the stopped threads. This was leftover debug code from the hackdriver. We never submit unless the thread is already idle. @@ -135801,7 +135801,7 @@ Signed-off-by: Eric Anholt 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 55551ea..eeb0925 100644 +index 55551ea7467941ae057a10c094f79e16125877b8..eeb092570ca5cd489e5646334fa10f89063bc5ab 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -104,10 +104,6 @@ submit_cl(struct drm_device *dev, uint32_t thread, uint32_t start, uint32_t end) @@ -135816,10 +135816,10 @@ index 55551ea..eeb0925 100644 barrier(); -From adb820489d061187ae01daa98ab1a404dbe5cd86 Mon Sep 17 00:00:00 2001 +From d41506b3daf5d060c33d87e9fde96f6abafdfb68 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:33:43 +0100 -Subject: [PATCH 095/251] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA +Subject: [PATCH 095/398] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA setup. The writel() that these expand to already does barriers. @@ -135830,7 +135830,7 @@ Signed-off-by: Eric Anholt 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index eeb0925..0cea723 100644 +index eeb092570ca5cd489e5646334fa10f89063bc5ab..0cea723721635ece743729cf5abc9d82d71d7aa6 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -104,14 +104,11 @@ submit_cl(struct drm_device *dev, uint32_t thread, uint32_t start, uint32_t end) @@ -135852,10 +135852,10 @@ index eeb0925..0cea723 100644 int -From 90058bcf1d4a588a3ddba5e78e1f998a33d2d5b1 Mon Sep 17 00:00:00 2001 +From 7d80add214fc35cf8216fb946d291a8bd10345f1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 14:57:22 +0100 -Subject: [PATCH 096/251] drm/vc4: Fix a typo in a V3D debug register. +Subject: [PATCH 096/398] drm/vc4: Fix a typo in a V3D debug register. Signed-off-by: Eric Anholt --- @@ -135864,7 +135864,7 @@ Signed-off-by: Eric Anholt 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h -index 9e4e904..4e52a0a 100644 +index 9e4e904c668e8398c16368b888704ee7ec2dba93..4e52a0a885515252befc2fdf7abf99b707ae4bef 100644 --- a/drivers/gpu/drm/vc4/vc4_regs.h +++ b/drivers/gpu/drm/vc4/vc4_regs.h @@ -154,7 +154,7 @@ @@ -135877,7 +135877,7 @@ index 9e4e904..4e52a0a 100644 #define V3D_FDBGB 0x00f08 #define V3D_FDBGR 0x00f0c diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index b9cb7cf..cf35f58 100644 +index b9cb7cf40082c625cefd3b7048b1bace95489869..cf35f587656dd76b15cc7a6a1992473fd31877cd 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -99,7 +99,7 @@ static const struct { @@ -135890,10 +135890,10 @@ index b9cb7cf..cf35f58 100644 REGDEF(V3D_FDBGB), REGDEF(V3D_FDBGR), -From fa03eea2a7fd499bd9254430e4396cf91aa96d39 Mon Sep 17 00:00:00 2001 +From a0dfbf05c6a77450ac1f6ad54c908ff9bb662ea7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 2 Nov 2015 17:07:33 +0000 -Subject: [PATCH 097/251] drm/vc4: Enable VC4 modules, and increase CMA size +Subject: [PATCH 097/398] drm/vc4: Enable VC4 modules, and increase CMA size with overlay If using the overlay, be careful not to boot to GUI or run startx, @@ -135907,7 +135907,7 @@ or the Pi will almost hang, reporting stalls in kernel threads. create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d7f2979..1fa98ce 100644 +index d7f2979dfe1cb516a70d0cc0a68301976ef86f74..1fa98ce6940862678c09c8d90945c886fe3b3fc2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -601,6 +601,14 @@ Params: txd1_pin GPIO pin for TXD1 (14, 32 or 40 - default 14) @@ -135927,7 +135927,7 @@ index d7f2979..1fa98ce 100644 This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts new file mode 100644 -index 0000000..cf5d5c9 +index 0000000000000000000000000000000000000000..cf5d5c9b502499d119ef604aa754eed7e17b1c01 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts @@ -0,0 +1,95 @@ @@ -136027,7 +136027,7 @@ index 0000000..cf5d5c9 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 13999af..4e474c7 100644 +index 13999af72f2a90c4485eacc8bf0af74f3c6af1d5..4e474c770b0025fe57f9cd0cd88f788526f835bb 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -802,6 +802,8 @@ CONFIG_VIDEO_TW9903=m @@ -136040,7 +136040,7 @@ index 13999af..4e474c7 100644 CONFIG_FB_BCM2708=y CONFIG_FB_UDL=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 146add9..d6aa058 100644 +index 146add9db493d15005ece554cc0694d8b815dda4..d6aa058157fb47390c30fe2d92fb746d7de228e9 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -795,6 +795,8 @@ CONFIG_VIDEO_TW9903=m @@ -136053,10 +136053,10 @@ index 146add9..d6aa058 100644 CONFIG_FB_BCM2708=y CONFIG_FB_UDL=m -From de2afd5a8db4a62e65057ace15fe15b498074dff Mon Sep 17 00:00:00 2001 +From 10ff359708188f2146c6f8323b99a7af01a703d7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 18:29:58 +0000 -Subject: [PATCH 098/251] squash: fixups +Subject: [PATCH 098/398] squash: fixups --- drivers/gpu/drm/vc4/Kconfig | 2 +- @@ -136065,7 +136065,7 @@ Subject: [PATCH 098/251] squash: fixups 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig -index 2d7d115..71f019f 100644 +index 2d7d115ddf3fae6558ab42d80255917c5eabad1a..71f019f603da21f66453518a02c224e2ed722ed7 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -1,6 +1,6 @@ @@ -136077,7 +136077,7 @@ index 2d7d115..71f019f 100644 select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 3baf1fc..e2a2be2 100644 +index 3baf1fcb8e875064c009d2120203e42fa624db9b..e2a2be2901777e87d3c6fc5c0d360be09639c4bb 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -127,7 +127,7 @@ static struct drm_driver vc4_drm_driver = { @@ -136090,7 +136090,7 @@ index 3baf1fc..e2a2be2 100644 .name = DRIVER_NAME, .desc = DRIVER_DESC, diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c -index c83287a..2082713 100644 +index c83287af8c897d36b65c045c7663121901d43592..208271363eb33e1b1e85a63b76f1a43bfef20e0a 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -45,7 +45,7 @@ vc4_atomic_complete_commit(struct vc4_commit *c) @@ -136103,10 +136103,10 @@ index c83287a..2082713 100644 drm_atomic_helper_commit_modeset_enables(dev, state); -From 454534cc445c73a8d95814b1bf8e2ef67f3c4f41 Mon Sep 17 00:00:00 2001 +From 3bf474e9ac7f8fa99770ae68950acba4e7b3cc88 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 20:26:03 +0000 -Subject: [PATCH 099/251] squash: add missing vc4-kms-v3d-overlay.dtb to +Subject: [PATCH 099/398] squash: add missing vc4-kms-v3d-overlay.dtb to makefile --- @@ -136114,7 +136114,7 @@ Subject: [PATCH 099/251] squash: add missing vc4-kms-v3d-overlay.dtb to 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index fb7ac49..fc09bfb 100644 +index fb7ac496e7a179daf720bdeba503e33381c96191..fc09bfbcaf615e830267fd24def970f0f8792041 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -52,6 +52,7 @@ dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb @@ -136126,10 +136126,10 @@ index fb7ac49..fc09bfb 100644 dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb -From 971c63d209cdcdeec8eba9211e9f75add0c6b10b Mon Sep 17 00:00:00 2001 +From 24b66c3910512f81e9ad0566dad0942075cc1dcb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 12 Oct 2015 11:23:34 -0700 -Subject: [PATCH 100/251] clk: bcm2835: Also build the driver for downstream +Subject: [PATCH 100/398] clk: bcm2835: Also build the driver for downstream kernels. Signed-off-by: Eric Anholt @@ -136138,7 +136138,7 @@ Signed-off-by: Eric Anholt 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index 3fc9506..a1b4cbc 100644 +index 3fc95060d875e8607696c61bece2020613f4fdb1..a1b4cbcae647e7c3a2cc6d3a7e7e1505d50e24d4 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o @@ -136151,10 +136151,10 @@ index 3fc9506..a1b4cbc 100644 obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o -From 64297bcfecf13b8fa1939fc725b772875157b0a4 Mon Sep 17 00:00:00 2001 +From 7d8073299ca19b2b800606db047cda167909769f Mon Sep 17 00:00:00 2001 From: Holger Steinhaus Date: Sat, 14 Nov 2015 18:37:43 +0100 -Subject: [PATCH 101/251] dts: Added overlay for gpio_ir_recv driver +Subject: [PATCH 101/398] dts: Added overlay for gpio_ir_recv driver --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136164,7 +136164,7 @@ Subject: [PATCH 101/251] dts: Added overlay for gpio_ir_recv driver create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index fc09bfb..ebc3354 100644 +index fc09bfbcaf615e830267fd24def970f0f8792041..ebc3354397abda14414ebccbdd0a2648fd6088f1 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -16,6 +16,7 @@ dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb @@ -136176,7 +136176,7 @@ index fc09bfb..ebc3354 100644 dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 1fa98ce..b4578cc 100644 +index 1fa98ce6940862678c09c8d90945c886fe3b3fc2..b4578cc7401ecca397293b8126c066d85b6e1dbb 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -196,6 +196,22 @@ Params: int_pin GPIO used for INT (default 25) @@ -136213,7 +136213,7 @@ index 1fa98ce..b4578cc 100644 gpio_in_pin GPIO for input (default "18") diff --git a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts new file mode 100644 -index 0000000..a2d6bc7 +index 0000000000000000000000000000000000000000..a2d6bc79f4cd2604e6c65c000668cbb228327fe6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts @@ -0,0 +1,45 @@ @@ -136263,10 +136263,10 @@ index 0000000..a2d6bc7 + }; +}; -From 1cb2b31fb379d569dd28ef81a69b04e748aa0a7e Mon Sep 17 00:00:00 2001 +From 8583e7672a1b5e309fc6c2580b7db601879bee5c Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Sun, 1 Nov 2015 22:27:56 +0000 -Subject: [PATCH 102/251] Build i2c_gpio module and add a device tree overlay +Subject: [PATCH 102/398] Build i2c_gpio module and add a device tree overlay to configure it. --- @@ -136279,7 +136279,7 @@ Subject: [PATCH 102/251] Build i2c_gpio module and add a device tree overlay create mode 100644 arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index ebc3354..e15d55c 100644 +index ebc3354397abda14414ebccbdd0a2648fd6088f1..e15d55c9ea18c53097a7e2b8593bf9a21965e7a8 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -25,6 +25,7 @@ dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb @@ -136291,7 +136291,7 @@ index ebc3354..e15d55c 100644 dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index b4578cc..9362443 100644 +index b4578cc7401ecca397293b8126c066d85b6e1dbb..936244334ae7a51a597d861557aa8c83d7229bf4 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -287,9 +287,20 @@ Params: speed Display SPI bus speed @@ -136318,7 +136318,7 @@ index b4578cc..9362443 100644 ds3231 Select the DS3231 device diff --git a/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts new file mode 100644 -index 0000000..2a2dc98 +index 0000000000000000000000000000000000000000..2a2dc986770cfb036492ba8de19cbaff521c5fd5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts @@ -0,0 +1,28 @@ @@ -136351,7 +136351,7 @@ index 0000000..2a2dc98 +}; + diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 4e474c7..fc35254 100644 +index 4e474c770b0025fe57f9cd0cd88f788526f835bb..fc3525411dd631e6f0032315314444644a3f6706 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -595,6 +595,7 @@ CONFIG_RAW_DRIVER=y @@ -136363,7 +136363,7 @@ index 4e474c7..fc35254 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_SPIDEV=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index d6aa058..51dc019 100644 +index d6aa058157fb47390c30fe2d92fb746d7de228e9..51dc0197b7e47dc9cdeb09cafe830ec84abf67e6 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -588,6 +588,7 @@ CONFIG_RAW_DRIVER=y @@ -136375,10 +136375,10 @@ index d6aa058..51dc019 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_SPIDEV=y -From d8810f6aa46773aab926661593de341c6bd77cae Mon Sep 17 00:00:00 2001 +From 6a9d20c03d69763ba5d30b02301798952640232e Mon Sep 17 00:00:00 2001 From: mwilliams03 Date: Sun, 18 Oct 2015 17:07:24 -0700 -Subject: [PATCH 103/251] New overlay for PiScreen2r +Subject: [PATCH 103/398] New overlay for PiScreen2r --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136388,7 +136388,7 @@ Subject: [PATCH 103/251] New overlay for PiScreen2r create mode 100644 arch/arm/boot/dts/overlays/piscreen2r-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index e15d55c..8595b14 100644 +index e15d55c9ea18c53097a7e2b8593bf9a21965e7a8..8595b1481c62dcd63a31702c02a8a247bbc06005 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -35,6 +35,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb @@ -136400,7 +136400,7 @@ index e15d55c..8595b14 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 9362443..0a21248 100644 +index 936244334ae7a51a597d861557aa8c83d7229bf4..0a212482ab59f34b2aedbb1843562ebfd3ee5f8f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -425,6 +425,20 @@ Params: speed Display SPI bus speed @@ -136426,7 +136426,7 @@ index 9362443..0a21248 100644 Load: dtoverlay=pitft28-resistive,= diff --git a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts new file mode 100644 -index 0000000..7c018e0 +index 0000000000000000000000000000000000000000..7c018e081acbb2a7c157e3305a955be165ff6105 --- /dev/null +++ b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts @@ -0,0 +1,100 @@ @@ -136531,10 +136531,10 @@ index 0000000..7c018e0 +}; + -From f2812d3b0fa2cda5f79e89235222c787bce2adac Mon Sep 17 00:00:00 2001 +From e147318d2f8e89f494562163ce902bf6d9aabb9c Mon Sep 17 00:00:00 2001 From: Ondrej Wisniewski Date: Fri, 6 Nov 2015 15:01:28 +0100 -Subject: [PATCH 104/251] dts: Added overlay for Adafruit PiTFT 2.8" capacitive +Subject: [PATCH 104/398] dts: Added overlay for Adafruit PiTFT 2.8" capacitive touch screen --- @@ -136545,7 +136545,7 @@ Subject: [PATCH 104/251] dts: Added overlay for Adafruit PiTFT 2.8" capacitive create mode 100644 arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 8595b14..7d747bc 100644 +index 8595b1481c62dcd63a31702c02a8a247bbc06005..7d747bcd7031f2430cde860e3b24e4f90ef5f72e 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -36,6 +36,7 @@ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb @@ -136557,7 +136557,7 @@ index 8595b14..7d747bc 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 0a21248..422a0d4 100644 +index 0a212482ab59f34b2aedbb1843562ebfd3ee5f8f..422a0d4462fd1bb18379486e78d8b9fb3e59cfd3 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -439,6 +439,28 @@ Params: speed Display SPI bus speed @@ -136591,7 +136591,7 @@ index 0a21248..422a0d4 100644 Load: dtoverlay=pitft28-resistive,= diff --git a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts new file mode 100644 -index 0000000..48920e9 +index 0000000000000000000000000000000000000000..48920e92365661cbb956911b8af1d6992ea801db --- /dev/null +++ b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts @@ -0,0 +1,88 @@ @@ -136684,10 +136684,10 @@ index 0000000..48920e9 + }; +}; -From bc31b90ccadb0bfeaefbe40b460be9e7fa20b7f2 Mon Sep 17 00:00:00 2001 +From a217bf740d76672654801071579c42435122b522 Mon Sep 17 00:00:00 2001 From: Stuart MacLean Date: Fri, 2 Oct 2015 15:12:59 +0100 -Subject: [PATCH 105/251] Add support for the HiFiBerry DAC+ Pro. +Subject: [PATCH 105/398] Add support for the HiFiBerry DAC+ Pro. The HiFiBerry DAC+ and DAC+ Pro products both use the existing bcm sound driver with the DAC+ Pro having a special clock device driver representing the two high precision oscillators. @@ -136702,7 +136702,7 @@ An addition bug fix is included for the PCM512x codec where by the physical size create mode 100644 drivers/clk/clk-hifiberry-dacpro.c diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts -index deb9c62..f923a48 100644 +index deb9c625fe861cc3425f975ce71821326e3f64b3..f923a48628d7472f635d25f25bd3c9badc530c9e 100644 --- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -6,6 +6,16 @@ @@ -136748,7 +136748,7 @@ index deb9c62..f923a48 100644 }; }; diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile -index 820714c..94ccf03 100644 +index 820714c72d368e29fe211d1699c9a68202c98359..94ccf03850b78320d37809c366aefbf90348ba13 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o @@ -136761,7 +136761,7 @@ index 820714c..94ccf03 100644 obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o diff --git a/drivers/clk/clk-hifiberry-dacpro.c b/drivers/clk/clk-hifiberry-dacpro.c new file mode 100644 -index 0000000..3e35d45 +index 0000000000000000000000000000000000000000..3e35d455f4559bc0100a1e268eeb200f7c10df7e --- /dev/null +++ b/drivers/clk/clk-hifiberry-dacpro.c @@ -0,0 +1,160 @@ @@ -136926,7 +136926,7 @@ index 0000000..3e35d45 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:clk-hifiberry-dacpro"); diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c -index 11e4f39..a6b651c 100644 +index 11e4f3918bfc6329074d81d12892b9ae6262a726..a6b651cb608a5d133456cf493d187951eb47a61d 100644 --- a/sound/soc/bcm/hifiberry_dacplus.c +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -1,8 +1,8 @@ @@ -137221,7 +137221,7 @@ index 11e4f39..a6b651c 100644 ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c -index 047c489..090fe0e 100644 +index 047c48953a20cd4075000ac294a17fe59baedcde..090fe0ee08e8765f9edbb62777413bb69f87d693 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -854,7 +854,8 @@ static int pcm512x_set_dividers(struct snd_soc_dai *dai, @@ -137235,10 +137235,10 @@ index 047c489..090fe0e 100644 dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 0ef9ae2d5aba6fea2fe0520a24296a8fa4b858e5 Mon Sep 17 00:00:00 2001 +From d7d3a3ee1e570c8d8a8b3fc67cb3682e099a8711 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2015 10:47:45 +0100 -Subject: [PATCH 106/251] BCM270X_DT: Add at86rf233 overlay +Subject: [PATCH 106/398] BCM270X_DT: Add at86rf233 overlay Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0. @@ -137251,7 +137251,7 @@ See: https://github.com/raspberrypi/linux/issues/1151 create mode 100644 arch/arm/boot/dts/overlays/at86rf233-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 7d747bc..be9dead 100644 +index 7d747bcd7031f2430cde860e3b24e4f90ef5f72e..be9dead2107a49d3ca7191a62c7fcea17cb45a1c 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) @@ -137263,7 +137263,7 @@ index 7d747bc..be9dead 100644 dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 422a0d4..d0ef256 100644 +index 422a0d4462fd1bb18379486e78d8b9fb3e59cfd3..d0ef256ab1b4b345b672ec320bf778227c115ed3 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -69,13 +69,14 @@ DT parameters: @@ -137314,7 +137314,7 @@ index 422a0d4..d0ef256 100644 sensors from Bosch Sensortec diff --git a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts new file mode 100644 -index 0000000..0460269 +index 0000000000000000000000000000000000000000..0460269cd6d1c0f42f1e5122ae247ff142235958 --- /dev/null +++ b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts @@ -0,0 +1,54 @@ @@ -137373,10 +137373,10 @@ index 0000000..0460269 + }; +}; -From 45d717abcc94edabe07e5909f1d984a392198921 Mon Sep 17 00:00:00 2001 +From 424995f35309f858502bd0c0ef901693d4137716 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 107/251] mm: Remove the PFN busy warning +Subject: [PATCH 107/398] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -137388,7 +137388,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index c69531a..dc484d3 100644 +index 99c1738684ece6af231473d5f3d29e19b3220f70..7d24010c6d5e7475d977f331c12db7b046b5c2d8 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6780,8 +6780,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, @@ -137401,10 +137401,10 @@ index c69531a..dc484d3 100644 goto done; } -From 11a46a37a0da7f87fc9e278178f294047110f6ab Mon Sep 17 00:00:00 2001 +From 8c8012ef4651ec2660c6faaa08e44cdaebe87c4f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Nov 2014 12:06:38 -0800 -Subject: [PATCH 108/251] drm: Put an optional field in the driver struct for +Subject: [PATCH 108/398] drm: Put an optional field in the driver struct for GEM obj struct size. This allows a driver to derive from the CMA object without copying all @@ -137417,7 +137417,7 @@ Signed-off-by: Eric Anholt 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c -index e109b49..1c25500 100644 +index e109b49cd25d59cd7e4c10a08425d39f14c90a7c..1c25500d37d1500101379480fd6b5d21f62925e8 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -58,8 +58,11 @@ __drm_gem_cma_create(struct drm_device *drm, size_t size) @@ -137434,7 +137434,7 @@ index e109b49..1c25500 100644 return ERR_PTR(-ENOMEM); diff --git a/include/drm/drmP.h b/include/drm/drmP.h -index 0a271ca..54f5469 100644 +index 0a271ca1f7c7ec12199b4c9781bb5aa5ded75dae..54f54691699766dfbc83f1c702f1a2b17ef2b3e9 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -639,6 +639,7 @@ struct drm_driver { @@ -137446,10 +137446,10 @@ index 0a271ca..54f5469 100644 int num_ioctls; const struct file_operations *fops; -From b28efa9d1051537449004db1bfaf083429144d1b Mon Sep 17 00:00:00 2001 +From 92bf2e15398f4b3246b5857d36d000f83da6c88f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 30 Oct 2015 10:09:02 -0700 -Subject: [PATCH 109/251] drm/vc4: Add an interface for capturing the GPU state +Subject: [PATCH 109/398] drm/vc4: Add an interface for capturing the GPU state after a hang. This can be parsed with vc4-gpu-tools tools for trying to figure out @@ -137465,7 +137465,7 @@ Signed-off-by: Eric Anholt 5 files changed, 237 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index acd360c..58dcbae 100644 +index acd360c89e14740c7a32889e58575dd138edf654..58dcbaef741f7804dea834e704a440201ff0c79d 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -415,8 +415,8 @@ int vc4_mmap(struct file *filp, struct vm_area_struct *vma) @@ -137480,7 +137480,7 @@ index acd360c..58dcbae 100644 } diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index e2a2be2..e8192b4 100644 +index e2a2be2901777e87d3c6fc5c0d360be09639c4bb..e8192b435a16e2e3918ed78763fdb45c849e4697 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -81,6 +81,7 @@ static const struct drm_ioctl_desc vc4_drm_ioctls[] = { @@ -137492,7 +137492,7 @@ index e2a2be2..e8192b4 100644 static struct drm_driver vc4_drm_driver = { diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index c079b82..24845c1 100644 +index c079b8253c653f776654c02072221b6a67c1b274..24845c1174d6fbdde825851b027d437d3874ff51 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -20,6 +20,8 @@ struct vc4_dev { @@ -137514,7 +137514,7 @@ index c079b82..24845c1 100644 int vc4_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); void *vc4_prime_vmap(struct drm_gem_object *obj); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 0cea723..d90c664 100644 +index 0cea723721635ece743729cf5abc9d82d71d7aa6..d90c664db1c14ddab1831f3a2985f5c756e4014b 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -40,6 +40,186 @@ vc4_queue_hangcheck(struct drm_device *dev) @@ -137722,7 +137722,7 @@ index 0cea723..d90c664 100644 + vc4_free_hang_state(dev, vc4->hang_state); } diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 499daae..4a8d19f 100644 +index 499daae549a559e85fec9ed4216460a2cb7872c9..4a8d19f864bed0b2836bf450d936fda3ebc40116 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -32,6 +32,7 @@ @@ -137790,10 +137790,10 @@ index 499daae..4a8d19f 100644 + #endif /* _UAPI_VC4_DRM_H_ */ -From 341ad4b0afa7154311296be071b39f42f18fe228 Mon Sep 17 00:00:00 2001 +From 3142a9a02eb95941210757e76f44b3f35c957a15 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 4 Dec 2015 11:35:34 -0800 -Subject: [PATCH 110/251] drm/vc4: Update a bunch of code to match upstream +Subject: [PATCH 110/398] drm/vc4: Update a bunch of code to match upstream submission. This gets almost everything matching, except for the MSAA support and @@ -137819,7 +137819,7 @@ Signed-off-by: Eric Anholt 15 files changed, 598 insertions(+), 536 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c -index 1c25500..0f7b00b 100644 +index 1c25500d37d1500101379480fd6b5d21f62925e8..0f7b00ba57daab4b2d4ddb26f165027ef14a9ee3 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -58,15 +58,14 @@ __drm_gem_cma_create(struct drm_device *drm, size_t size) @@ -137845,7 +137845,7 @@ index 1c25500..0f7b00b 100644 ret = drm_gem_object_init(drm, gem_obj, size); if (ret) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index 58dcbae..6247ff8 100644 +index 58dcbaef741f7804dea834e704a440201ff0c79d..6247ff88e6156fc98fb97b8bbcc9ac377a1f8707 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -12,6 +12,10 @@ @@ -138289,7 +138289,7 @@ index 58dcbae..6247ff8 100644 -} -#endif diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c -index 3be2720..3c67914 100644 +index 3be272047820ac8f809839f252a1f8bdba2ac97c..3c6791467e835032e167fc25c4ecb4cef9bd98c4 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -501,6 +501,7 @@ vc4_async_page_flip_complete(struct vc4_seqno_cb *cb) @@ -138314,7 +138314,7 @@ index 3be2720..3c67914 100644 if (flags & DRM_MODE_PAGE_FLIP_ASYNC) return vc4_async_page_flip(crtc, fb, event, flags); diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index e8192b4..22061ae 100644 +index e8192b435a16e2e3918ed78763fdb45c849e4697..22061aedef515b08cc5230272464f7a309a27e9d 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -81,7 +81,8 @@ static const struct drm_ioctl_desc vc4_drm_ioctls[] = { @@ -138345,7 +138345,7 @@ index e8192b4..22061ae 100644 .desc = DRIVER_DESC, .date = DRIVER_DATE, diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 24845c1..53dfa8d 100644 +index 24845c1174d6fbdde825851b027d437d3874ff51..53dfa8df292a6d061a3bd8cb57bd06a0ab6ca579 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -72,6 +72,9 @@ struct vc4_dev { @@ -138409,7 +138409,7 @@ index 24845c1..53dfa8d 100644 +struct vc4_validated_shader_info * +vc4_validate_shader(struct drm_gem_cma_object *shader_obj); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index d90c664..fb0b92d 100644 +index d90c664db1c14ddab1831f3a2985f5c756e4014b..fb0b92d941df73af9d8a9b6138bc815581019426 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -53,9 +53,8 @@ vc4_free_hang_state(struct drm_device *dev, struct vc4_hang_state *state) @@ -138511,7 +138511,7 @@ index d90c664..fb0b92d 100644 INIT_WORK(&vc4->job_done_work, vc4_job_done_work); } diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c -index f29b796..b68060e 100644 +index f29b7961695ce3f6a09c249a63e8cd25f35a91a7..b68060e758dbd26e1dccd17beeba4c09bbb1441e 100644 --- a/drivers/gpu/drm/vc4/vc4_irq.c +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -56,7 +56,7 @@ vc4_overflow_mem_work(struct work_struct *work) @@ -138535,7 +138535,7 @@ index f29b796..b68060e 100644 V3D_WRITE(V3D_BPOA, bo->base.paddr); diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c -index 2082713..f95f2df 100644 +index 208271363eb33e1b1e85a63b76f1a43bfef20e0a..f95f2df5f8d1a52031a35dd26b03331c513fe13e 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -132,6 +132,7 @@ static int vc4_atomic_commit(struct drm_device *dev, @@ -138547,7 +138547,7 @@ index 2082713..f95f2df 100644 } } diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index 9757bc8..cee38aa 100644 +index 9757bc8d3c0d274b7c878cc0bb65cb81b7fdc9fa..cee38aad33bd8984290d9eae2bda60db4f61ab5f 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -27,60 +27,60 @@ @@ -138836,7 +138836,7 @@ index 9757bc8..cee38aa 100644 #define VC4_TEX_P0_OFFSET_MASK VC4_MASK(31, 12) diff --git a/drivers/gpu/drm/vc4/vc4_qpu_defines.h b/drivers/gpu/drm/vc4/vc4_qpu_defines.h -index e47c994..d5c2f3c 100644 +index e47c994d36bf81ef350041ce0aad9f68a82417f4..d5c2f3c85ebbf6b1ae7ca731d12d604ca24b176e 100644 --- a/drivers/gpu/drm/vc4/vc4_qpu_defines.h +++ b/drivers/gpu/drm/vc4/vc4_qpu_defines.h @@ -25,194 +25,190 @@ @@ -139187,7 +139187,7 @@ index e47c994..d5c2f3c 100644 #define QPU_SIG_SHIFT 60 #define QPU_SIG_MASK QPU_MASK(63, 60) diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 0ffac8d..3516354 100644 +index 0ffac8df92cd3ee5be1de1368a5964ae62560741..3516354ffdbc8a4b5f0162f140ee21849328d9d3 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -63,7 +63,6 @@ static inline void rcl_u32(struct vc4_rcl_setup *setup, u32 val) @@ -139216,7 +139216,7 @@ index 0ffac8d..3516354 100644 } } diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index cf35f58..29a222f 100644 +index cf35f587656dd76b15cc7a6a1992473fd31877cd..29a222fc4a6213ae783cb7c2c170838186568ac2 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -125,7 +125,7 @@ int vc4_v3d_debugfs_regs(struct seq_file *m, void *unused) @@ -139254,7 +139254,7 @@ index cf35f58..29a222f 100644 struct drm_device *drm = dev_get_drvdata(master); struct vc4_dev *vc4 = to_vc4_dev(drm); diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index ff3b62f..e44e355 100644 +index ff3b62fbc920b05745d35f1b69c4a1b6ad5f83ba..e44e355393229f7ac4fd0bb2c434695a22080be5 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -48,7 +48,6 @@ @@ -139534,7 +139534,7 @@ index ff3b62f..e44e355 100644 return -EINVAL; } diff --git a/drivers/gpu/drm/vc4/vc4_validate_shaders.c b/drivers/gpu/drm/vc4/vc4_validate_shaders.c -index 0aab9d7..f67124b 100644 +index 0aab9d72bec4744028c124d8d578fe8712010dc7..f67124b4c5348706136e4c0f9fe06ea10b77b230 100644 --- a/drivers/gpu/drm/vc4/vc4_validate_shaders.c +++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c @@ -24,24 +24,16 @@ @@ -139687,7 +139687,7 @@ index 0aab9d7..f67124b 100644 goto fail; } diff --git a/include/drm/drmP.h b/include/drm/drmP.h -index 54f5469..987c25a 100644 +index 54f54691699766dfbc83f1c702f1a2b17ef2b3e9..987c25ac08e0d5454dd4cd03f81c285a351df428 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -585,6 +585,13 @@ struct drm_driver { @@ -139713,10 +139713,10 @@ index 54f5469..987c25a 100644 int num_ioctls; const struct file_operations *fops; -From 527fa9469f0876bade592e985a6c973ca8c84839 Mon Sep 17 00:00:00 2001 +From 9a91bd66857e5957924b3769abf7075f31ab67b6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 11 Dec 2015 19:45:03 -0800 -Subject: [PATCH 111/251] drm: Use the driver's gem_object_free function from +Subject: [PATCH 111/398] drm: Use the driver's gem_object_free function from CMA helpers. VC4 wraps the CMA objects in its own structures, so it needs to do its @@ -139731,7 +139731,7 @@ Signed-off-by: Eric Anholt 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c -index c19a625..c1a37d3 100644 +index c19a62561183537046dc896254d09d4ac3a70b1e..c1a37d334477ed4044bea3196aed10b6d07ed1fb 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -266,7 +266,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper, @@ -139755,7 +139755,7 @@ index c19a625..c1a37d3 100644 } diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c -index 0f7b00b..e5df53b 100644 +index 0f7b00ba57daab4b2d4ddb26f165027ef14a9ee3..e5df53b6e229ff0348541eeaa921acc6cf4700ef 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -121,7 +121,7 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm, @@ -139777,10 +139777,10 @@ index 0f7b00b..e5df53b 100644 return ERR_PTR(ret); } -From d5d7b446f3dc3c30886937f4750b96d5c40a0904 Mon Sep 17 00:00:00 2001 +From 84d9a4171198c1eb667016b8babdbf0b2273bd0e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 17 Jul 2015 13:15:50 -0700 -Subject: [PATCH 112/251] drm/vc4: Add support for MSAA rendering. +Subject: [PATCH 112/398] drm/vc4: Add support for MSAA rendering. For MSAA, you set a bit in the binner that halves the size of tiles in each direction, so you can pack 4 samples per pixel in the tile @@ -139799,7 +139799,7 @@ Signed-off-by: Eric Anholt 4 files changed, 258 insertions(+), 55 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index cee38aa..0f31cc0 100644 +index cee38aad33bd8984290d9eae2bda60db4f61ab5f..0f31cc06500f1b5308892bb11a727efa6f56dcff 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -123,6 +123,11 @@ enum vc4_packet { @@ -139840,7 +139840,7 @@ index cee38aa..0f31cc0 100644 /** @{ * diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 3516354..8f2ec57 100644 +index 3516354ffdbc8a4b5f0162f140ee21849328d9d3..8f2ec57fbfb32cc7db1a805d594f4e0e9cbd1c7d 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -37,9 +37,11 @@ @@ -140255,7 +140255,7 @@ index 3516354..8f2ec57 100644 return -EINVAL; } diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index e44e355..2f22f19 100644 +index e44e355393229f7ac4fd0bb2c434695a22080be5..2f22f19687032b494c447be9707cfec10b848f3e 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -400,9 +400,8 @@ validate_tile_binning_config(VALIDATE_ARGS) @@ -140271,7 +140271,7 @@ index e44e355..2f22f19 100644 } diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 4a8d19f..49cd992 100644 +index 4a8d19f864bed0b2836bf450d936fda3ebc40116..49cd9928a65cd97e60760f52cd0e1c9c49116068 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -46,10 +46,13 @@ struct drm_vc4_submit_rcl_surface { @@ -140304,10 +140304,10 @@ index 4a8d19f..49cd992 100644 uint32_t clear_z; uint8_t clear_s; -From 8c5854914cb7ffd1d418a4013b2089eec87600d2 Mon Sep 17 00:00:00 2001 +From ca18e496f817f7d578274711ec2e3abf1941eaff Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 8 Dec 2015 14:00:43 -0800 -Subject: [PATCH 113/251] drm/vc4: A few more non-functional changes to sync to +Subject: [PATCH 113/398] drm/vc4: A few more non-functional changes to sync to upstream. At this point all that's left is the force-enable of HDMI connector, @@ -140321,7 +140321,7 @@ Signed-off-by: Eric Anholt 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index 29a222f..4d103f7 100644 +index 29a222fc4a6213ae783cb7c2c170838186568ac2..4d103f7ff8c9113329aa4738bd67baa4ad14250d 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -109,7 +109,7 @@ static const struct { @@ -140334,7 +140334,7 @@ index 29a222f..4d103f7 100644 struct vc4_dev *vc4 = to_vc4_dev(dev); int i; diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 49cd992..eeb37e3 100644 +index 49cd9928a65cd97e60760f52cd0e1c9c49116068..eeb37e394f1347ef0c87ec2305604a0510d4dd37 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -24,7 +24,7 @@ @@ -140651,10 +140651,10 @@ index 49cd992..eeb37e3 100644 #endif /* _UAPI_VC4_DRM_H_ */ -From 96201e14bde5eadd0a63d291930c6931206dd945 Mon Sep 17 00:00:00 2001 +From 913cbb34a3c960fea40cb5b530bb60680a375f1f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 23:46:32 +0000 -Subject: [PATCH 114/251] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what +Subject: [PATCH 114/398] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what landed upstream. Signed-off-by: Eric Anholt @@ -140663,7 +140663,7 @@ Signed-off-by: Eric Anholt 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts -index cf5d5c9..da37483 100644 +index cf5d5c9b502499d119ef604aa754eed7e17b1c01..da37483b955e8abfc5d5ce0905ed81d928474084 100644 --- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts @@ -68,7 +68,7 @@ @@ -140676,10 +140676,10 @@ index cf5d5c9..da37483 100644 <&cprman BCM2835_CLOCK_HSM>; clock-names = "pixel", "hdmi"; -From c23f3c3bbf31b734f44040207eda9db1fdb3d565 Mon Sep 17 00:00:00 2001 +From d5de27ef3a6f9dfe63745a3aaae6af6a845ea5ce Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 7 Dec 2015 12:35:01 -0800 -Subject: [PATCH 115/251] drm/vc4: Synchronize validation code for v2 +Subject: [PATCH 115/398] drm/vc4: Synchronize validation code for v2 submission upstream. Signed-off-by: Eric Anholt @@ -140691,7 +140691,7 @@ Signed-off-by: Eric Anholt 4 files changed, 135 insertions(+), 196 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 53dfa8d..ed93fa7 100644 +index 53dfa8df292a6d061a3bd8cb57bd06a0ab6ca579..ed93fa78a32df3c1c98b5c48fa193934de77dda5 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -189,17 +189,6 @@ to_vc4_encoder(struct drm_encoder *encoder) @@ -140761,7 +140761,7 @@ index 53dfa8d..ed93fa7 100644 int vc4_get_rcl(struct drm_device *dev, struct vc4_exec_info *exec); diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index fb0b92d..39f29e7 100644 +index fb0b92d941df73af9d8a9b6138bc815581019426..39f29e7593342d9555dd51cbc2790a56abe06179 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -169,8 +169,8 @@ vc4_save_hang_state(struct drm_device *dev) @@ -140821,7 +140821,7 @@ index fb0b92d..39f29e7 100644 } diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 8f2ec57..8a2a312 100644 +index 8f2ec57fbfb32cc7db1a805d594f4e0e9cbd1c7d..8a2a312e2c1bb618ea414ed3f0dd87e82ed7e09a 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -436,7 +436,8 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec, @@ -140845,7 +140845,7 @@ index 8f2ec57..8a2a312 100644 if (tiling > VC4_TILING_FORMAT_LT) { diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index 2f22f19..0fb5b99 100644 +index 2f22f19687032b494c447be9707cfec10b848f3e..0fb5b994b9ddb1e6fde3d8e99d727d3e7afc4d22 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -94,42 +94,42 @@ size_is_lt(uint32_t width, uint32_t height, int cpp) @@ -141296,10 +141296,10 @@ index 2f22f19..0fb5b99 100644 return ret; } -From 677855b754d34a5fc02b572d3605e0a6ff754843 Mon Sep 17 00:00:00 2001 +From fcd597cecf8812eb54290d6ce097ced5ac3354e5 Mon Sep 17 00:00:00 2001 From: janluca Date: Sun, 27 Dec 2015 14:34:04 +0100 -Subject: [PATCH 116/251] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is +Subject: [PATCH 116/398] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is not set If CONFIG_MMC_BCM2835 was not set the compiling of the kernel failed @@ -141312,7 +141312,7 @@ commit 64d395457f793250d2e582eeb38cc3403b1db98c 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/core/quirks.c b/drivers/mmc/core/quirks.c -index 87ae2e9..b79fe14 100644 +index 87ae2e9beb8dfb329520b63f6d8f5a05d7d5ac36..b79fe14c18f1fe521fadf8adfc136de62140c8b9 100644 --- a/drivers/mmc/core/quirks.c +++ b/drivers/mmc/core/quirks.c @@ -53,7 +53,9 @@ static const struct mmc_fixup mmc_fixup_methods[] = { @@ -141336,10 +141336,10 @@ index 87ae2e9..b79fe14 100644 } EXPORT_SYMBOL(mmc_fixup_device); -From 6c2f1c57e559b53e84735f0a38ad50e8177b3f4d Mon Sep 17 00:00:00 2001 +From 7d216c02516536699082a61430a8539659a86abc Mon Sep 17 00:00:00 2001 From: Devon Fyson Date: Wed, 30 Dec 2015 16:40:47 -0500 -Subject: [PATCH 117/251] Extend clock timeout, fix modprobe baudrate +Subject: [PATCH 117/398] Extend clock timeout, fix modprobe baudrate parameter. Set the BSC_CLKT clock streching timeout to 35ms as per SMBus specs.\n- Increase priority of baudrate parameter passed to modprobe (in /etc/modprobe.d/*.conf or command line). Currently custom baudrates don't work because they are overridden by clock-frequency in the platform_device passed to the function. @@ -141348,7 +141348,7 @@ Set the BSC_CLKT clock streching timeout to 35ms as per SMBus specs.\n- Increase 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c -index 85f411c..b152639 100644 +index 85f411cccf61f42d8fdf5a867b3b1f27d6821d2d..b1526396bc83552e76c0ce7c96033d3833f218ec 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -71,7 +71,8 @@ @@ -141447,10 +141447,10 @@ index 85f411c..b152639 100644 dev_info(&pdev->dev, "BSC%d Controller at 0x%08lx (irq %d) (baudrate %d)\n", pdev->id, (unsigned long)regs->start, irq, baudrate); -From 138eda1c8216d04356fa821fe6500771bf14fb10 Mon Sep 17 00:00:00 2001 +From 194fffbee4b522a84d8eea0d6623dc7935bf1278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 31 Dec 2015 16:44:58 +0100 -Subject: [PATCH 118/251] bcm270x_dt: Add dwc2 and dwc-otg overlays +Subject: [PATCH 118/398] bcm270x_dt: Add dwc2 and dwc-otg overlays --- arch/arm/boot/dts/overlays/Makefile | 2 ++ @@ -141462,7 +141462,7 @@ Subject: [PATCH 118/251] bcm270x_dt: Add dwc2 and dwc-otg overlays create mode 100644 arch/arm/boot/dts/overlays/dwc2-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index be9dead..aaa8976 100644 +index be9dead2107a49d3ca7191a62c7fcea17cb45a1c..aaa897652f1a31eefacb98f2ac81d32040b8b78c 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -15,6 +15,8 @@ endif @@ -141475,7 +141475,7 @@ index be9dead..aaa8976 100644 dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d0ef256..4d3f974 100644 +index d0ef256ab1b4b345b672ec320bf778227c115ed3..4d3f974c89871f994362ee91ceeb033db8bbd3fd 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -198,6 +198,27 @@ Params: gpiopin GPIO connected to the sensor's DATA output. @@ -141508,7 +141508,7 @@ index d0ef256..4d3f974 100644 diff --git a/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts new file mode 100644 -index 0000000..fc48bd1 +index 0000000000000000000000000000000000000000..fc48bd1eac605115c3b89fddfe39f5ea6181459f --- /dev/null +++ b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts @@ -0,0 +1,20 @@ @@ -141534,7 +141534,7 @@ index 0000000..fc48bd1 +}; diff --git a/arch/arm/boot/dts/overlays/dwc2-overlay.dts b/arch/arm/boot/dts/overlays/dwc2-overlay.dts new file mode 100644 -index 0000000..90c9811 +index 0000000000000000000000000000000000000000..90c981143fc7a55ae1cc6462c959e21d8cb7365e --- /dev/null +++ b/arch/arm/boot/dts/overlays/dwc2-overlay.dts @@ -0,0 +1,29 @@ @@ -141568,10 +141568,10 @@ index 0000000..90c9811 + }; +}; -From 534a6b55b445527c1a8aef9f0328987cb2c1c1d4 Mon Sep 17 00:00:00 2001 +From 72c7207c7d07e102d1b57be7e8db460e0dcb4051 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Jan 2016 14:42:17 +0000 -Subject: [PATCH 119/251] BCM270X_DT: Add the sdtweak overlay, for tuning +Subject: [PATCH 119/398] BCM270X_DT: Add the sdtweak overlay, for tuning sdhost The sdhost overlay declares the sdhost interface and allows parameters @@ -141586,7 +141586,7 @@ sdtweak overlay that does just that. create mode 100644 arch/arm/boot/dts/overlays/sdtweak-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index aaa8976..4d9d640 100644 +index aaa897652f1a31eefacb98f2ac81d32040b8b78c..4d9d64059660c65c4f52be42f9bef53801505f58 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -53,6 +53,7 @@ dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb @@ -141598,7 +141598,7 @@ index aaa8976..4d9d640 100644 dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4d3f974..1c6b000 100644 +index 4d3f974c89871f994362ee91ceeb033db8bbd3fd..1c6b000de10720eed719340d39ddfabdc17ca903 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -635,6 +635,20 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141624,7 +141624,7 @@ index 4d3f974..1c6b000 100644 Load: dtoverlay=smi diff --git a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts new file mode 100644 -index 0000000..74c168d +index 0000000000000000000000000000000000000000..74c168d7d64cac6bc3fe72ef89e7f4b2ab0717ea --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts @@ -0,0 +1,21 @@ @@ -141650,10 +141650,10 @@ index 0000000..74c168d + }; +}; -From baed92c64a0b70434069ec7f8cb906e33f7d50b4 Mon Sep 17 00:00:00 2001 +From 7b6408f394619f8172a36606cb97f030afa9d2e0 Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:54:21 +0000 -Subject: [PATCH 120/251] bcm2835-mmc: Don't override bus width capabilities +Subject: [PATCH 120/398] bcm2835-mmc: Don't override bus width capabilities from devicetree Take out the force setting of the MMC_CAP_4_BIT_DATA host capability @@ -141664,7 +141664,7 @@ preserved. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c -index 43aed6e..104f93e 100644 +index 43aed6eadd573aec3ac3c8ee0f418a8dbd6376ed..104f93ecd51d963ac92fcfcf04b1f15225468d8d 100644 --- a/drivers/mmc/host/bcm2835-mmc.c +++ b/drivers/mmc/host/bcm2835-mmc.c @@ -1305,7 +1305,7 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host) @@ -141677,10 +141677,10 @@ index 43aed6e..104f93e 100644 mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD; -From 2a12d02d01ad199df7c17296243ddef8a9ca6c33 Mon Sep 17 00:00:00 2001 +From 909302c184042a4c5df3783343babad493c2c9ed Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:55:54 +0000 -Subject: [PATCH 121/251] SDIO-overlay: add bus_width parameter +Subject: [PATCH 121/398] SDIO-overlay: add bus_width parameter Allow setting of the SDIO bus width capability of the bcm2835-mmc host. This is helpful when only a 1 bit wide bus is connected @@ -141692,7 +141692,7 @@ mode. 2 files changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 1c6b000..34a1b7f 100644 +index 1c6b000de10720eed719340d39ddfabdc17ca903..34a1b7f1632dcdc74b3b0c06eefed71da7521ba8 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -634,6 +634,8 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141705,7 +141705,7 @@ index 1c6b000..34a1b7f 100644 Name: sdtweak Info: Tunes the bcm2835-sdhost SD/MMC driver diff --git a/arch/arm/boot/dts/overlays/sdio-overlay.dts b/arch/arm/boot/dts/overlays/sdio-overlay.dts -index afc8742..7935e7a 100644 +index afc874269ac592d2df67abbc1d9c0d4f973e6baf..7935e7af882d09ca0a59a82b5712f03cc957e158 100644 --- a/arch/arm/boot/dts/overlays/sdio-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts @@ -11,6 +11,7 @@ @@ -141724,10 +141724,10 @@ index afc8742..7935e7a 100644 }; }; -From 1589aee29dc9d1fafe145b75a018771ed993e869 Mon Sep 17 00:00:00 2001 +From 4f782d250103d4fd0b7f55052be0e19f28434a7b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:41:45 +0100 -Subject: [PATCH 122/251] bcm2835: extend allowed range of channels and +Subject: [PATCH 122/398] bcm2835: extend allowed range of channels and samplerates Allow everything the videocore accepts. @@ -141736,7 +141736,7 @@ Allow everything the videocore accepts. 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 8c86375..31e3131 100755 +index 8c863758ff030f84889be7a01333e63bf05b909a..31e3131472340bd09673d153f3008fbcd8732282 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -26,9 +26,9 @@ static struct snd_pcm_hardware snd_bcm2835_playback_hw = { @@ -141764,10 +141764,10 @@ index 8c86375..31e3131 100755 .period_bytes_min = 1 * 1024, .period_bytes_max = 128 * 1024, -From 768a8ae2b4eebe250c3872901caae49ecf92b483 Mon Sep 17 00:00:00 2001 +From f0d10e66ad6a413aa6282aa61804cb1129557355 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:18 +0100 -Subject: [PATCH 123/251] bcm2835: restrict channels*rate to 8*960000 +Subject: [PATCH 123/398] bcm2835: restrict channels*rate to 8*960000 This is required at least for SPDIF. If the bitrate goes above, videocore will either resample the audio or corrupt it due to @@ -141781,7 +141781,7 @@ Some code is based on ac97_pcm.c. 1 file changed, 41 insertions(+) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 31e3131..b17ed32 100755 +index 31e3131472340bd09673d153f3008fbcd8732282..b17ed320d69acf354b8ebd24934b8e10f0f0b204 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -19,6 +19,9 @@ @@ -141847,10 +141847,10 @@ index 31e3131..b17ed32 100755 chip->opened |= (1 << idx); -From 19d09a4d7b66ffed44ec5b9da81304f3a11f4586 Mon Sep 17 00:00:00 2001 +From bd4a8ca7d1ee11ed66c72726d2ead6a648a1538d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:48 +0100 -Subject: [PATCH 124/251] rpi: update vc_vchi_audioserv_defs.h +Subject: [PATCH 124/398] rpi: update vc_vchi_audioserv_defs.h Add audioserv 3 extensions. The changes were taken from the paste linked here: @@ -141861,7 +141861,7 @@ https://github.com/raspberrypi/linux/pull/1166#issuecomment-151917067 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h -index af3e6eb..5f4409f 100644 +index af3e6eb690113fc32ce9e06bd2f0f294da7a7f00..5f4409fc821cee48abf3b4c581c09072d55dd56a 100644 --- a/sound/arm/vc_vchi_audioserv_defs.h +++ b/sound/arm/vc_vchi_audioserv_defs.h @@ -16,7 +16,7 @@ @@ -141916,10 +141916,10 @@ index af3e6eb..5f4409f 100644 +#endif // _VC_AUDIO_DEFS_H_ \ No newline at end of file -From c507443d3266d9f0cbdc1832089ad90b8943f48b Mon Sep 17 00:00:00 2001 +From 717077903c48b517ed82340885de6f2db57b3e6b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:12 +0100 -Subject: [PATCH 125/251] bcm2835: implement channel map API +Subject: [PATCH 125/398] bcm2835: implement channel map API Report all layouts supported by the HDMI protocol to userspace. Make the videocore set the correct layout according to the @@ -141941,7 +141941,7 @@ speakers, while RR is never heard. 4 files changed, 311 insertions(+), 4 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index aad905f..92d3f76 100755 +index aad905f1fe12d9f6c5f72e4ec0134be420f2580c..92d3f7672046a89aeb5f777b039d5963b6f59e42 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -300,6 +300,281 @@ static struct snd_kcontrol_new snd_bcm2835_spdif[] = { @@ -142235,7 +142235,7 @@ index aad905f..92d3f76 100755 err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_bcm2835_spdif[idx], chip)); diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index b17ed32..1067460 100755 +index b17ed320d69acf354b8ebd24934b8e10f0f0b204..1067460809044c5cbc260a5b9051d37cfaa15028 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -231,6 +231,9 @@ static int snd_bcm2835_playback_open_generic( @@ -142289,7 +142289,7 @@ index b17ed32..1067460 100755 /* in preparation of the stream, set the controls (volume level) of the stream */ diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 3de3094..8ecd2d7 100755 +index 3de30945d8155b90d244734881a7caa81930fa7c..8ecd2d735fbf94b9018c89c705a68750aad5bf97 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -570,6 +570,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -142324,7 +142324,7 @@ index 3de3094..8ecd2d7 100755 /* Create the message available completion */ init_completion(&instance->msg_avail_comp); diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h -index 0f71c5d..997fb69 100755 +index 0f71c5def314a63252fa4fe18ae2ba5a339f2cfb..997fb69da951c7ceb732f4897b7450ecfc37d168 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h @@ -107,6 +107,8 @@ typedef struct bcm2835_chip { @@ -142346,10 +142346,10 @@ index 0f71c5d..997fb69 100755 int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream); int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, -From 9e7ef4d08f6e2dbcdca8f7f2833f2eb38bee78e1 Mon Sep 17 00:00:00 2001 +From fbf91bf6a921381314854a705dbcaddbcab677b0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:35 +0100 -Subject: [PATCH 126/251] bcm2835: access controls under the audio mutex +Subject: [PATCH 126/398] bcm2835: access controls under the audio mutex I don't think the ALSA framework provides any kind of automatic synchronization within the control callbacks. We most likely need @@ -142362,7 +142362,7 @@ probably always be called under our own audio lock. 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index 92d3f76..5b8e6bd 100755 +index 92d3f7672046a89aeb5f777b039d5963b6f59e42..5b8e6bd2b89abf8135933a4028e23e25e5f2eef5 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -94,6 +94,9 @@ static int snd_bcm2835_ctl_get(struct snd_kcontrol *kcontrol, @@ -142566,7 +142566,7 @@ index 92d3f76..5b8e6bd 100755 static int snd_bcm2835_add_chmap_ctl(bcm2835_chip_t * chip) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 1067460..48da3bb 100755 +index 1067460809044c5cbc260a5b9051d37cfaa15028..48da3bbd7395e2d3611990b7c5f31db9157b2afc 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -379,6 +379,9 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) @@ -142588,10 +142588,10 @@ index 1067460..48da3bb 100755 return 0; } -From 04d7228226398968e0fc67ec3722760f729dbfc9 Mon Sep 17 00:00:00 2001 +From f5f53e6fba5b5c752810ed3a1cb212cf55c136a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:03 +0100 -Subject: [PATCH 127/251] bcm2835: always use 2/4/8 channels for multichannel +Subject: [PATCH 127/398] bcm2835: always use 2/4/8 channels for multichannel layouts Pad the unused channels with NA. This means userspace needs to write @@ -142604,7 +142604,7 @@ Works around noise at the following channel counts: 3, 5, 6, 7 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index 5b8e6bd..dec052b 100755 +index 5b8e6bd2b89abf8135933a4028e23e25e5f2eef5..dec052b9c0a5a3f69f90878cde814cb9adc27848 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -349,6 +349,7 @@ struct cea_channel_speaker_allocation { @@ -142730,10 +142730,10 @@ index 5b8e6bd..dec052b 100755 }; -From 7a65c83035dbea9a9ac43867cc82167d64e5c233 Mon Sep 17 00:00:00 2001 +From 1bcf84d0dcf0a5b0d2facbe9362657886246e88c Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:24 +0100 -Subject: [PATCH 128/251] bcm2835: only allow stereo if analogue jack is +Subject: [PATCH 128/398] bcm2835: only allow stereo if analogue jack is selected Sending more than 2 channels to videocore while outputting to analogue @@ -142755,7 +142755,7 @@ also doesn't seem worth the trouble. 1 file changed, 12 insertions(+) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index dec052b..e930718 100755 +index dec052b9c0a5a3f69f90878cde814cb9adc27848..e9307186b082fc292af79f48ca71e3cd6ce8c99c 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -423,9 +423,16 @@ static struct cea_channel_speaker_allocation channel_allocations[] = { @@ -142795,10 +142795,10 @@ index dec052b..e930718 100755 for (x = 0; x < substream->runtime->channels; x++) { int sp = ucontrol->value.integer.value[x]; -From 1009b70932a4980e21de9429c596dbdccac1ecdb Mon Sep 17 00:00:00 2001 +From 53bbe925e9218b12a14d0ce36752d41e100476a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:47 +0100 -Subject: [PATCH 129/251] bcm2835: interpolate audio delay +Subject: [PATCH 129/398] bcm2835: interpolate audio delay It appears the GPU only sends us a message all 10ms to update the playback progress. Other than this, the playback position @@ -142827,7 +142827,7 @@ harder due to locking and synchronization requirements. 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 48da3bb..f3a4c6d 100755 +index 48da3bbd7395e2d3611990b7c5f31db9157b2afc..f3a4c6da6a1e1f1cc937022557fccaebf4c87669 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -25,7 +25,7 @@ @@ -142878,7 +142878,7 @@ index 48da3bb..f3a4c6d 100755 return snd_pcm_indirect_playback_pointer(substream, &alsa_stream->pcm_indirect, diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h -index 997fb69..20ef108 100755 +index 997fb69da951c7ceb732f4897b7450ecfc37d168..20ef108cb693575f0a1b5d5703a1fe4968277975 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h @@ -137,6 +137,7 @@ typedef struct bcm2835_alsa_stream { @@ -142890,10 +142890,10 @@ index 997fb69..20ef108 100755 uint32_t enable_fifo_irq; irq_handler_t fifo_irq_handler; -From fb73e06c694d16d8be119e08e71bf5601f386352 Mon Sep 17 00:00:00 2001 +From d6ceb13cadff8352d5704196ae1026d328562098 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 17:16:38 +0000 -Subject: [PATCH 130/251] bcm2835-sdhost: Add workaround for odd behaviour on +Subject: [PATCH 130/398] bcm2835-sdhost: Add workaround for odd behaviour on some cards For reasons not understood, the sdhost driver fails when reading @@ -142907,7 +142907,7 @@ that problem which ensures those sectors are always read singly. 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index da08998..309633c 100644 +index da089985f94beebae4a25878cd88a871e08527fa..309633cedd616b03800d279d2daeea61642cd244 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -173,6 +173,9 @@ struct bcm2835_host { @@ -143030,10 +143030,10 @@ index da08998..309633c 100644 } -From 6671675d3a1a7df0f838121c8166b57f0fd6f0c3 Mon Sep 17 00:00:00 2001 +From 9ad9df7b3b83b0b6f8c9730820a5913d30c22046 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Jan 2016 16:03:24 +0000 -Subject: [PATCH 131/251] bcm2835-sdhost: Add debug_flags dtparam +Subject: [PATCH 131/398] bcm2835-sdhost: Add debug_flags dtparam Bit zero disables the single-read-sectors map: @@ -143052,7 +143052,7 @@ Also revert the timeout change, just in case. 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/overlays/sdhost-overlay.dts b/arch/arm/boot/dts/overlays/sdhost-overlay.dts -index 85f0725..dbe6574 100644 +index 85f0725e1ed9e1ec6d41b1956b43528a2d92aa63..dbe6574fbd2b89efc0fbee87eb7bedce4f462069 100644 --- a/arch/arm/boot/dts/overlays/sdhost-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts @@ -16,6 +16,7 @@ @@ -143071,7 +143071,7 @@ index 85f0725..dbe6574 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts -index 74c168d..b0b208c 100644 +index 74c168d7d64cac6bc3fe72ef89e7f4b2ab0717ea..b0b208c2261ef53b8a30f0ecc176cead69a5b1c7 100644 --- a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts @@ -9,6 +9,7 @@ @@ -143090,7 +143090,7 @@ index 74c168d..b0b208c 100644 }; }; diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 309633c..ef9b1e6 100644 +index 309633cedd616b03800d279d2daeea61642cd244..ef9b1e6f710a2dade4b7f6f4564702f97af42ef0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -174,6 +174,8 @@ struct bcm2835_host { @@ -143157,10 +143157,10 @@ index 309633c..ef9b1e6 100644 if (node) { host->dma_chan_tx = -From 559103cc40fb480a58ff12002ac79dc204c5c19d Mon Sep 17 00:00:00 2001 +From 753d08b6f578b097a2ca4d94a8b39ee4345e77ab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 25 Jan 2016 09:12:06 +0000 -Subject: [PATCH 132/251] BCM270X_DT: Add sdio_overclock parameter to sdio +Subject: [PATCH 132/398] BCM270X_DT: Add sdio_overclock parameter to sdio overlay The sdio_overclock parameter is like the overclock_50 parameter, i.e. @@ -143183,7 +143183,7 @@ Examples: 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 34a1b7f..709d3e4 100644 +index 34a1b7f1632dcdc74b3b0c06eefed71da7521ba8..709d3e4967922152248e57472870648eb4a749c4 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -53,8 +53,8 @@ have its contents deleted (or commented out). @@ -143212,7 +143212,7 @@ index 34a1b7f..709d3e4 100644 pio_limit Number of blocks above which to use DMA diff --git a/arch/arm/boot/dts/overlays/sdio-overlay.dts b/arch/arm/boot/dts/overlays/sdio-overlay.dts -index 7935e7a..398bd81 100644 +index 7935e7af882d09ca0a59a82b5712f03cc957e158..398bd812c716c9e472fbac5aba4fe882114c65d1 100644 --- a/arch/arm/boot/dts/overlays/sdio-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts @@ -12,6 +12,7 @@ @@ -143231,10 +143231,10 @@ index 7935e7a..398bd81 100644 }; }; -From 73ad066f76a5c18c621dbc86b02ff90d3adc814a Mon Sep 17 00:00:00 2001 +From 7f6f1a121b8973951a29ff205aed548c86a1d337 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 21 Jan 2016 18:10:16 +0100 -Subject: [PATCH 133/251] rtc: ds1307: add support for the DT property +Subject: [PATCH 133/398] rtc: ds1307: add support for the DT property 'wakeup-source' For RTC chips with no IRQ directly connected to the SoC, the RTC chip @@ -143264,7 +143264,7 @@ Signed-off-by: Alexandre Belloni 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c -index 1cb13fe..28ca4bf 100644 +index 1cb13feea21f0403c0600f73898a10911ee59d14..28ca4bfaa8db0094e63acf6c9c2dbfc96abd445c 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -860,6 +860,7 @@ static int ds1307_probe(struct i2c_client *client, @@ -143328,10 +143328,10 @@ index 1cb13fe..28ca4bf 100644 err = devm_request_threaded_irq(&client->dev, client->irq, NULL, irq_handler, -From 4f6fbb96cdcdc9e66c0521d1b0a46ca0b1d2c47d Mon Sep 17 00:00:00 2001 +From ebf1de45d015134bf56cfb56da3592973fa0cf64 Mon Sep 17 00:00:00 2001 From: vitalogy Date: Tue, 19 Jan 2016 07:02:02 +0100 -Subject: [PATCH 134/251] dt-overlay: add wittypi-overlay.dts +Subject: [PATCH 134/398] dt-overlay: add wittypi-overlay.dts --- arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 ++++++++++++++++++++++++++ @@ -143340,7 +143340,7 @@ Subject: [PATCH 134/251] dt-overlay: add wittypi-overlay.dts diff --git a/arch/arm/boot/dts/overlays/wittypi-overlay.dts b/arch/arm/boot/dts/overlays/wittypi-overlay.dts new file mode 100644 -index 0000000..be5987d +index 0000000000000000000000000000000000000000..be5987db5d27560da9b5eadacd92457dada7092c --- /dev/null +++ b/arch/arm/boot/dts/overlays/wittypi-overlay.dts @@ -0,0 +1,44 @@ @@ -143389,10 +143389,10 @@ index 0000000..be5987d + +}; -From ed208e16047972bbaf88000ab35b61fa82293247 Mon Sep 17 00:00:00 2001 +From 40a7723d64eb9ba932d1c38e7686c634417a3122 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 16:28:05 +0000 -Subject: [PATCH 135/251] FIXUP i2c_bcm2708: Don't change module baudrate +Subject: [PATCH 135/398] FIXUP i2c_bcm2708: Don't change module baudrate parameter Overwriting the baudrate module parameter creates an apparent @@ -143406,7 +143406,7 @@ Also fix whitespace errors. 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c -index b152639..c9b8e5c 100644 +index b1526396bc83552e76c0ce7c96033d3833f218ec..c9b8e5cb1702e4b20e45214d81a7a40ac709220f 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -71,7 +71,6 @@ @@ -143491,10 +143491,10 @@ index b152639..c9b8e5c 100644 return 0; -From 1172f40b76155e169d23802f5bfd81555571cb7e Mon Sep 17 00:00:00 2001 +From 2a93ad780c76576630b78bf371a934c8c89d42c8 Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 14:14:44 +0000 -Subject: [PATCH 136/251] Allow up to 24dB digital gain to be applied when +Subject: [PATCH 136/398] Allow up to 24dB digital gain to be applied when using IQAudIO DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143507,7 +143507,7 @@ and if specified will allow the full 24dB gain. 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 709d3e4..3c8436e 100644 +index 709d3e4967922152248e57472870648eb4a749c4..3c8436e60743f419ce3e43b07408a02645b8e116 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -362,8 +362,21 @@ Params: @@ -143535,7 +143535,7 @@ index 709d3e4..3c8436e 100644 Name: lirc-rpi diff --git a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts -index 735d8ab..e0aaf8f 100644 +index 735d8abfccb2e60be7a87ce5832440f9d38333b7..e0aaf8f03349bb5e7685cc9b65e7ac5820b71c5a 100644 --- a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts @@ -7,7 +7,7 @@ @@ -143557,7 +143557,7 @@ index 735d8ab..e0aaf8f 100644 + }; }; diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c -index 37038d4..124d7a9 100644 +index 37038d48bd6ef47eb8733a9045621eae03983d60..124d7a91976fb7b28de652c0df40c4319257fab2 100644 --- a/sound/soc/bcm/iqaudio-dac.c +++ b/sound/soc/bcm/iqaudio-dac.c @@ -23,14 +23,19 @@ @@ -143597,10 +143597,10 @@ index 37038d4..124d7a9 100644 ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); -From d87eb9396da3d0cf59346531fb93cfaa452760d8 Mon Sep 17 00:00:00 2001 +From d63511193f20430245e6b4f5e89333d83d3240c6 Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 20:04:00 +0000 -Subject: [PATCH 137/251] Limit PCM512x "Digital" gain to 0dB by default with +Subject: [PATCH 137/398] Limit PCM512x "Digital" gain to 0dB by default with HiFiBerry DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143613,7 +143613,7 @@ and if specified will allow the full 24dB gain. 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 3c8436e..296184f 100644 +index 3c8436e60743f419ce3e43b07408a02645b8e116..296184fe050ee70ba35025443b6f92732e3c5a5f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -273,8 +273,21 @@ Params: @@ -143641,7 +143641,7 @@ index 3c8436e..296184f 100644 Name: hifiberry-digi diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts -index f923a48..42a0194 100644 +index f923a48628d7472f635d25f25bd3c9badc530c9e..42a0194e97c067840fa0c578857818a883fb2327 100644 --- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -17,7 +17,7 @@ @@ -143663,7 +143663,7 @@ index f923a48..42a0194 100644 + }; }; diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c -index a6b651c..153dbcd 100644 +index a6b651cb608a5d133456cf493d187951eb47a61d..153dbcd957df12fd215712f2e74d7deba6f7e997 100644 --- a/sound/soc/bcm/hifiberry_dacplus.c +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -48,6 +48,7 @@ struct pcm512x_priv { @@ -143702,17 +143702,17 @@ index a6b651c..153dbcd 100644 ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); -From f279fd3295cc2407f05e56fafb77edc800148547 Mon Sep 17 00:00:00 2001 +From b6ad0477737edf1483f9fa5858406b9d1799d031 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 Feb 2016 09:46:33 +0000 -Subject: [PATCH 138/251] BCM270X_DT: Adjust overlay README formatting +Subject: [PATCH 138/398] BCM270X_DT: Adjust overlay README formatting --- arch/arm/boot/dts/overlays/README | 414 +++++++++++++++++++------------------- 1 file changed, 207 insertions(+), 207 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 296184f..f987565 100644 +index 296184fe050ee70ba35025443b6f92732e3c5a5f..f9875655c4a2e8bfe648208a719df6fa832ecef5 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -83,58 +83,58 @@ Name: @@ -144434,10 +144434,10 @@ index 296184f..f987565 100644 Troubleshooting -From 414077cd3a0694b0a49a8e1bc92b574290aa8fcf Mon Sep 17 00:00:00 2001 +From 2e6be519a55561dda5b78848709ec39222119971 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Feb 2016 16:51:01 +0000 -Subject: [PATCH 139/251] bcm2835-sdhost: Major revision +Subject: [PATCH 139/398] bcm2835-sdhost: Major revision This is a significant revision of the bcm2835-sdhost driver. It improves on the original in a number of ways: @@ -144455,7 +144455,7 @@ Signed-off-by: Phil Elwell 1 file changed, 686 insertions(+), 598 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index ef9b1e6..262180b 100644 +index ef9b1e6f710a2dade4b7f6f4564702f97af42ef0..262180bbd40e5a026676f15fca206e01918a7caa 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -2,7 +2,7 @@ @@ -146506,10 +146506,10 @@ index ef9b1e6..262180b 100644 .probe = bcm2835_sdhost_probe, .remove = bcm2835_sdhost_remove, -From 28749d393c5f8b68c20ab5827c0e519eb96c89fe Mon Sep 17 00:00:00 2001 +From 1d5b152308a645c20c91300d6f86b05258d7393f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 12 Feb 2016 15:38:00 +0000 -Subject: [PATCH 140/251] BCM270X_DT: Add dtparams for the SD interface +Subject: [PATCH 140/398] BCM270X_DT: Add dtparams for the SD interface Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit and sd_debug. @@ -146527,7 +146527,7 @@ and sd_debug. 10 files changed, 58 insertions(+), 23 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -index 2e4df17..d2d6fa0 100644 +index 2e4df17ea71ab73b20314ed8ffc4396378195240..d2d6fa0fa6b384a4cbc296ad37813f36f744b69c 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -141,5 +141,9 @@ @@ -146541,7 +146541,7 @@ index 2e4df17..d2d6fa0 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts -index 0445b46..d033ee4 100644 +index 0445b46367689877f62d0bd6c36aed7cdd93383e..d033ee4cab87c1cbdeb9a4c136c7233eff68f3c7 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -131,5 +131,9 @@ @@ -146555,7 +146555,7 @@ index 0445b46..d033ee4 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 87c1a54..8bcafb4 100755 +index 87c1a54ed569df899e6340f4e26e0c885ef7df0a..8bcafb41c39595a47b7d932871cb6463f137241d 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -97,6 +97,5 @@ @@ -146566,7 +146566,7 @@ index 87c1a54..8bcafb4 100755 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi -index 3c8bdde..e09e499 100644 +index 3c8bdde83189a5d4089d509e59a4fd9668e5c746..e09e4993e8f06df83b72b1342d2d21de7fbc542a 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi @@ -7,6 +7,13 @@ @@ -146603,7 +146603,7 @@ index 3c8bdde..e09e499 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 75fb4ce..18d3c45 100644 +index 75fb4ce688a6f1774163628f9d2f706bc4d06767..18d3c4516ff0b78f7c612d92620e6326dd7f5a17 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -135,6 +135,7 @@ @@ -146623,7 +146623,7 @@ index 75fb4ce..18d3c45 100644 }; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 5206ba2..aca253f 100644 +index 5206ba204d97c3e904ff482bb04b169f434827ca..aca253ff9b7b21f628e4294fd3e7d8de061e26fb 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -141,5 +141,9 @@ @@ -146637,7 +146637,7 @@ index 5206ba2..aca253f 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index f987565..0a2df01 100644 +index f9875655c4a2e8bfe648208a719df6fa832ecef5..0a2df0195378feb884142361ac28ae1911879c82 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -112,6 +112,16 @@ Params: @@ -146666,7 +146666,7 @@ index f987565..0a2df01 100644 Name: mz61581 diff --git a/arch/arm/boot/dts/overlays/mmc-overlay.dts b/arch/arm/boot/dts/overlays/mmc-overlay.dts -index 00a22be..d32b02c 100644 +index 00a22be8d63c7ecc19d3eff8ba9d073765c4fb8a..d32b02ca01ced5ab3de00d66d5412c8fda4bc510 100644 --- a/arch/arm/boot/dts/overlays/mmc-overlay.dts +++ b/arch/arm/boot/dts/overlays/mmc-overlay.dts @@ -34,6 +34,5 @@ @@ -146677,7 +146677,7 @@ index 00a22be..d32b02c 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/sdhost-overlay.dts b/arch/arm/boot/dts/overlays/sdhost-overlay.dts -index dbe6574..a431177 100644 +index dbe6574fbd2b89efc0fbee87eb7bedce4f462069..a431177a1c9d320d5432ea448ad4d0f696c34525 100644 --- a/arch/arm/boot/dts/overlays/sdhost-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdhost-overlay.dts @@ -1,19 +1,14 @@ @@ -146727,7 +146727,7 @@ index dbe6574..a431177 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts -index b0b208c..e4a4677 100644 +index b0b208c2261ef53b8a30f0ecc176cead69a5b1c7..e4a4677f6b20da6b51751e9675c1c276ca4d2051 100644 --- a/arch/arm/boot/dts/overlays/sdtweak-overlay.dts +++ b/arch/arm/boot/dts/overlays/sdtweak-overlay.dts @@ -1,23 +1,23 @@ @@ -146762,10 +146762,10 @@ index b0b208c..e4a4677 100644 }; }; -From bad7a004e1e990eefa9f402684b19021baa81812 Mon Sep 17 00:00:00 2001 +From e838f32445da76d18655f87b3f0c39c8712b31cc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Feb 2016 14:50:25 +0000 -Subject: [PATCH 141/251] dcw_otg: trim xfer length when buffer larger than +Subject: [PATCH 141/398] dcw_otg: trim xfer length when buffer larger than allocated size is received --- @@ -146773,7 +146773,7 @@ Subject: [PATCH 141/251] dcw_otg: trim xfer length when buffer larger than 1 file changed, 11 insertions(+) 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 8db3dfc..d672a76 100644 +index 8db3dfcba4ffb9cf267ed1fe6b809142792f7384..d672a76dd2a0a885783321c366f1fdc71b9b132f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -737,6 +737,11 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, @@ -146802,10 +146802,10 @@ index 8db3dfc..d672a76 100644 if (hc->align_buff && bytes_transferred && hc->ep_is_in) { dwc_memcpy(urb->buf + urb->actual_length, hc->qh->dw_align_buf, -From 3f19b475b6394511ee22af77c8287ea1c1b8295a Mon Sep 17 00:00:00 2001 +From 2922f7c70cf972afc37a0493121b5fbabc08e1f2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 15 Feb 2016 10:00:27 +0000 -Subject: [PATCH 142/251] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping +Subject: [PATCH 142/398] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping Allocation problems have been seen in a wireless driver, and this is the only change which might have been responsible. @@ -146814,7 +146814,7 @@ this is the only change which might have been responsible. 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 262180b..d66385c 100644 +index 262180bbd40e5a026676f15fca206e01918a7caa..d66385c788e97a4d2704d8b5636ca172e7d81639 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -874,15 +874,14 @@ static void bcm2835_sdhost_prepare_data(struct bcm2835_host *host, struct mmc_co @@ -146837,10 +146837,10 @@ index 262180b..d66385c 100644 host->blocks = data->blocks; } -From 962dfa8efd816762704046d501b703eb153fca3f Mon Sep 17 00:00:00 2001 +From c537d4ecb50eee5ec692ed851fbfedd7b82eaf34 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Tue, 16 Feb 2016 10:03:42 +0000 -Subject: [PATCH 143/251] Updated smsc95xx driver to check for a valid MAC +Subject: [PATCH 143/398] Updated smsc95xx driver to check for a valid MAC address in eeprom before using smsc95xx.macaddr parameter passed on command line. @@ -146852,7 +146852,7 @@ meaning they don't end up with the same MAC address as the built-in RPi adaptor. 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index 3244a90..7483222 100755 +index 3244a908a00147cb028b5632073b4e8f74e4d509..7483222f330ad77fe8656e2046205daa87a3255e 100755 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -817,10 +817,6 @@ static int smsc95xx_is_macaddr_param(struct usbnet *dev, u8 *dev_mac) @@ -146880,17 +146880,17 @@ index 3244a90..7483222 100755 netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); } -From 0139c7899ec18de29f16b6dad11ea5cddd06ae62 Mon Sep 17 00:00:00 2001 +From 812f9c59b1d8ec57378fb58437b5f9a8a6a19b85 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Feb 2016 19:02:31 +0000 -Subject: [PATCH 144/251] dcw_otg: Make trimming messages less noisy +Subject: [PATCH 144/398] dcw_otg: Make trimming messages less noisy --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 d672a76..e6b38ac 100644 +index d672a76dd2a0a885783321c366f1fdc71b9b132f..e6b38ac330b72152204c2a6879c20f0ce02ac2e5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -738,7 +738,8 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, @@ -146914,10 +146914,10 @@ index d672a76..e6b38ac 100644 } -From e41f1f667f3d2f4e6e22dc585a6d4dabbc5aafd7 Mon Sep 17 00:00:00 2001 +From 5f7d35464bfb4bc8cf59c28218a678dd82eab736 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 Feb 2016 15:28:14 +0000 -Subject: [PATCH 145/251] BCM270X_DT: at86rf233 overlay - drop to 3MHz +Subject: [PATCH 145/398] BCM270X_DT: at86rf233 overlay - drop to 3MHz The consensus is that 6MHz is too fast, but that 3MHz is OK. @@ -146929,7 +146929,7 @@ See: https://github.com/raspberrypi/linux/issues/1294 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 0a2df01..4de0b6f 100644 +index 0a2df0195378feb884142361ac28ae1911879c82..4de0b6fbcb504b2213836bb95cae910c6d6ee05f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -188,7 +188,7 @@ Load: dtoverlay=at86rf233,= @@ -146942,7 +146942,7 @@ index 0a2df01..4de0b6f 100644 arrays (0=+0pF, 15=+4.5pF, default 15) diff --git a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts -index 0460269..eab4052 100644 +index 0460269cd6d1c0f42f1e5122ae247ff142235958..eab40523b78f20676f267bf5e81bff69b07becb3 100644 --- a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts +++ b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts @@ -25,7 +25,7 @@ @@ -146955,17 +146955,17 @@ index 0460269..eab4052 100644 }; }; -From 61f20e3098ef685f6a14238c58b7158e637652bc Mon Sep 17 00:00:00 2001 +From fe1e133a0c70bebc09bb81a2a8e714e320d3f0db Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 19 Feb 2016 12:04:48 +0000 -Subject: [PATCH 146/251] bcm2835-sdhost: Downgrade log message status +Subject: [PATCH 146/398] bcm2835-sdhost: Downgrade log message status --- drivers/mmc/host/bcm2835-sdhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index d66385c..4f6cab5 100644 +index d66385c788e97a4d2704d8b5636ca172e7d81639..4f6cab52a60f5a0426076ffdb9e6098c2be8aa1d 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -232,8 +232,8 @@ static void log_init(u32 bus_to_phys) @@ -146980,10 +146980,10 @@ index d66385c..4f6cab5 100644 if (!timer_base) pr_err("sdhost: failed to remap timer\n"); -From 8d7f055a36864ccb388a526cca31a4e416125ac6 Mon Sep 17 00:00:00 2001 +From ddbb6514e092603a8923606b6534011a363004dd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 Jan 2016 16:48:27 +0000 -Subject: [PATCH 147/251] config: Enable HCI over UARTs +Subject: [PATCH 147/398] config: Enable HCI over UARTs --- arch/arm/configs/bcm2709_defconfig | 3 +++ @@ -146991,7 +146991,7 @@ Subject: [PATCH 147/251] config: Enable HCI over UARTs 2 files changed, 5 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index fc35254..48ecb2e 100644 +index fc3525411dd631e6f0032315314444644a3f6706..48ecb2e7672f86c6104537b689c0baa75030b26c 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -376,6 +376,9 @@ CONFIG_BT_BNEP_PROTO_FILTER=y @@ -147005,7 +147005,7 @@ index fc35254..48ecb2e 100644 CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 51dc019..4368f0d 100644 +index 51dc0197b7e47dc9cdeb09cafe830ec84abf67e6..4368f0d33b30f8a5e58070e852491faeed786b69 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -370,6 +370,8 @@ CONFIG_BT_HIDP=m @@ -147018,10 +147018,10 @@ index 51dc019..4368f0d 100644 CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m -From 4e80e74fc12bf2b3f75908afce3fe399323ccb90 Mon Sep 17 00:00:00 2001 +From f4d7e9dd665e9afd09be6c8c49856e046b45243a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 148/251] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 148/398] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -147030,7 +147030,7 @@ other with conf_req and conf_rsp messages, in a demented game of tag. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c -index abee221..2825833 100644 +index abee2216fdeb263bb6cc1d1052a070825f5926cd..2825833b952567bfdf6568b62a87afa5bebd1e1b 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c @@ -314,7 +314,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu) @@ -147044,10 +147044,10 @@ index abee221..2825833 100644 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 7); -From 7ea16aeff2daf97ada8b68b9acad503f5a922c61 Mon Sep 17 00:00:00 2001 +From bd4aa588916168c0f480694c4abc31f5754ee53b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 149/251] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 149/398] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -147059,7 +147059,7 @@ use the same logic. 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 899a771..68b3353 100644 +index 899a77187bdead871b2e1f22ed4f320486e5288b..68b3353c5c035203fe3ad03c80eeb303a0cbc322 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2313,7 +2313,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, @@ -147076,10 +147076,10 @@ index 899a771..68b3353 100644 uap->old_cr = 0; uap->port.dev = dev; -From cce16b3c1c46f74a3178029ac894c89aea751af4 Mon Sep 17 00:00:00 2001 +From 712724340039373dc6a2b09bbfc645ee82bb5e82 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:57 -0800 -Subject: [PATCH 150/251] clk: bcm2835: Add bindings for the auxiliary +Subject: [PATCH 150/398] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates. These will be used for enabling UART1, SPI1, and SPI2. @@ -147096,7 +147096,7 @@ Signed-off-by: Michael Turquette diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt new file mode 100644 -index 0000000..7a837d2 +index 0000000000000000000000000000000000000000..7a837d2182acf74e0104b4da227cc2a4715d7504 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt @@ -0,0 +1,31 @@ @@ -147133,7 +147133,7 @@ index 0000000..7a837d2 + }; diff --git a/include/dt-bindings/clock/bcm2835-aux.h b/include/dt-bindings/clock/bcm2835-aux.h new file mode 100644 -index 0000000..d91156e +index 0000000000000000000000000000000000000000..d91156e2658dabeaaa8624921c322646d3d18dda --- /dev/null +++ b/include/dt-bindings/clock/bcm2835-aux.h @@ -0,0 +1,17 @@ @@ -147155,10 +147155,10 @@ index 0000000..d91156e +#define BCM2835_AUX_CLOCK_SPI2 2 +#define BCM2835_AUX_CLOCK_COUNT 3 -From 16aac0eab690fbafcf6cb70a19ceffd848cc8ee8 Mon Sep 17 00:00:00 2001 +From d6d12e2533078f3ce2c55a451044c7598e33c786 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:58 -0800 -Subject: [PATCH 151/251] clk: bcm2835: Add a driver for the auxiliary +Subject: [PATCH 151/398] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. There are a pair of SPI masters and a mini UART that were last minute @@ -147176,7 +147176,7 @@ updated Makefile to preserve the rasoberry pi architectures create mode 100644 drivers/clk/bcm/clk-bcm2835-aux.c diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index a1b4cbc..84070d5 100644 +index a1b4cbcae647e7c3a2cc6d3a7e7e1505d50e24d4..84070d51da8b11342cbbe6dd685692831a8f26eb 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -147189,7 +147189,7 @@ index a1b4cbc..84070d5 100644 obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o diff --git a/drivers/clk/bcm/clk-bcm2835-aux.c b/drivers/clk/bcm/clk-bcm2835-aux.c new file mode 100644 -index 0000000..e4f89e2 +index 0000000000000000000000000000000000000000..e4f89e28b5ecf5a88bbbdc50111904beb470b2a6 --- /dev/null +++ b/drivers/clk/bcm/clk-bcm2835-aux.c @@ -0,0 +1,85 @@ @@ -147279,10 +147279,10 @@ index 0000000..e4f89e2 +MODULE_DESCRIPTION("BCM2835 auxiliary peripheral clock driver"); +MODULE_LICENSE("GPL v2"); -From c7b36d3709441f04c40763f17c82e6734cc14fc1 Mon Sep 17 00:00:00 2001 +From 9bef661118767a1f0997456da62acde9e915c5bf Mon Sep 17 00:00:00 2001 From: Fraser Date: Tue, 23 Feb 2016 10:04:37 +1100 -Subject: [PATCH 152/251] Aux SPI 1&2 implementation +Subject: [PATCH 152/398] Aux SPI 1&2 implementation Adds aux spi 1 & 2 devices to compatible raspberry PIs. * Minor config of the driver build environment to ensure they get built @@ -147315,7 +147315,7 @@ users a degree of control over how they are setup. create mode 100644 arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 18d3c45..4f65203 100644 +index 18d3c4516ff0b78f7c612d92620e6326dd7f5a17..4f65203b784c0a5ad411adf4530ff5c71e916feb 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -1,3 +1,4 @@ @@ -147385,7 +147385,7 @@ index 18d3c45..4f65203 100644 mmc: mmc@7e300000 { compatible = "brcm,bcm2835-mmc"; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 4d9d640..a787d66 100644 +index 4d9d64059660c65c4f52be42f9bef53801505f58..a787d6634f0eabb15ee9a6f173a2e20ff1db02bf 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -57,6 +57,12 @@ dtb-$(RPI_DT_OVERLAYS) += sdtweak-overlay.dtb @@ -147402,7 +147402,7 @@ index 4d9d640..a787d66 100644 dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += uart1-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4de0b6f..cf5f5be 100644 +index 4de0b6fbcb504b2213836bb95cae910c6d6ee05f..cf5f5bee0d3312754be7fb71418bf9183994a2c5 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -713,6 +713,105 @@ Load: dtoverlay=spi-gpio35-39 @@ -147513,7 +147513,7 @@ index 4de0b6f..cf5f5be 100644 Options: Touch, RTC, keypad diff --git a/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts new file mode 100644 -index 0000000..71c2439 +index 0000000000000000000000000000000000000000..71c243947004fa887998065df9c259b50edfa428 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts @@ -0,0 +1,57 @@ @@ -147576,7 +147576,7 @@ index 0000000..71c2439 +}; diff --git a/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts new file mode 100644 -index 0000000..2ae0885 +index 0000000000000000000000000000000000000000..2ae0885cf1e7fb7420f65e538310ab1addafbece --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts @@ -0,0 +1,69 @@ @@ -147651,7 +147651,7 @@ index 0000000..2ae0885 +}; diff --git a/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts new file mode 100644 -index 0000000..8f79044 +index 0000000000000000000000000000000000000000..8f79044cd8f47ea055394822cc380497c985c7e5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts @@ -0,0 +1,81 @@ @@ -147738,7 +147738,7 @@ index 0000000..8f79044 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts new file mode 100644 -index 0000000..6f57bc7 +index 0000000000000000000000000000000000000000..6f57bc710fe123028a5a216063733f0cea9bbd54 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts @@ -0,0 +1,57 @@ @@ -147801,7 +147801,7 @@ index 0000000..6f57bc7 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts new file mode 100644 -index 0000000..d090631 +index 0000000000000000000000000000000000000000..d090631d36821b0c89833b9f217216f0b134a8f3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts @@ -0,0 +1,69 @@ @@ -147876,7 +147876,7 @@ index 0000000..d090631 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts new file mode 100644 -index 0000000..e258672 +index 0000000000000000000000000000000000000000..e2586728c311829462f6a4b3b348e35603f033ce --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts @@ -0,0 +1,81 @@ @@ -147962,7 +147962,7 @@ index 0000000..e258672 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 48ecb2e..76b3a88 100644 +index 48ecb2e7672f86c6104537b689c0baa75030b26c..76b3a88d9d61bf7a713ae69567ffa5375c6969ce 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -601,6 +601,7 @@ CONFIG_I2C_BCM2708=m @@ -147974,7 +147974,7 @@ index 48ecb2e..76b3a88 100644 CONFIG_PPS=m CONFIG_PPS_CLIENT_LDISC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 4368f0d..1ca1695 100644 +index 4368f0d33b30f8a5e58070e852491faeed786b69..1ca1695f699c9311d14fe09a555736b1898717ee 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -593,6 +593,7 @@ CONFIG_I2C_BCM2708=m @@ -147986,7 +147986,7 @@ index 4368f0d..1ca1695 100644 CONFIG_PPS=m CONFIG_PPS_CLIENT_LDISC=m diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index 84070d5..d60fd3f 100644 +index 84070d51da8b11342cbbe6dd685692831a8f26eb..d60fd3f220a0eac7ca9613d91767b9d4a7285a53 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -147999,7 +147999,7 @@ index 84070d5..d60fd3f 100644 obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index e842e86..c9d1558 100644 +index e842e8613b144f16916b1fce53cba1b538b8628d..c9d1558eddcc68128e02c3a493f9f95c00c4cc37 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -90,7 +90,7 @@ config SPI_BCM2835 @@ -148012,10 +148012,10 @@ index e842e86..c9d1558 100644 help This selects a driver for the Broadcom BCM2835 SPI aux master. -From 9c53b072c7283c02625434a42fbc2aaa3b2b4bbc Mon Sep 17 00:00:00 2001 +From 122c9e6cc7f3e4a0820d841da1460d3d679739aa Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 23 Feb 2016 17:28:23 +0100 -Subject: [PATCH 153/251] ASoC: bcm: add missing .owner fields in sound card +Subject: [PATCH 153/398] ASoC: bcm: add missing .owner fields in sound card drivers If snd_soc_card.owner is not set the kernel won't do usage refcounting @@ -148041,7 +148041,7 @@ Signed-off-by: Matthias Reichl 8 files changed, 8 insertions(+) diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c -index 5903915..0bb12e4 100644 +index 590391597bc602528ad52a41086d260427a806f9..0bb12e4761ce60d3364c66b2bd0f8f7dbdcecfb1 100644 --- a/sound/soc/bcm/hifiberry_amp.c +++ b/sound/soc/bcm/hifiberry_amp.c @@ -61,6 +61,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = { @@ -148053,7 +148053,7 @@ index 5903915..0bb12e4 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai), }; diff --git a/sound/soc/bcm/hifiberry_dac.c b/sound/soc/bcm/hifiberry_dac.c -index 3ab0f47..29ecc08 100644 +index 3ab0f4705a9ffc4caa5e6a9788300a34505795ed..29ecc08a227cdd4b3c6141935d0c5d21c2c6b4d8 100644 --- a/sound/soc/bcm/hifiberry_dac.c +++ b/sound/soc/bcm/hifiberry_dac.c @@ -63,6 +63,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_dac_dai[] = { @@ -148065,7 +148065,7 @@ index 3ab0f47..29ecc08 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_dac_dai), }; diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c -index 153dbcd..03d8d2a 100644 +index 153dbcd957df12fd215712f2e74d7deba6f7e997..03d8d2a289b368e5e720ff8e18d3a74a3d788d29 100644 --- a/sound/soc/bcm/hifiberry_dacplus.c +++ b/sound/soc/bcm/hifiberry_dacplus.c @@ -287,6 +287,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_dacplus_dai[] = { @@ -148077,7 +148077,7 @@ index 153dbcd..03d8d2a 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_dacplus_dai), }; diff --git a/sound/soc/bcm/hifiberry_digi.c b/sound/soc/bcm/hifiberry_digi.c -index 80732b8..9840e15 100644 +index 80732b8ac1809d9921450e0789b1022d4dd0c7fd..9840e15d3e2be6396bc3ce6e74749408cc28c333 100644 --- a/sound/soc/bcm/hifiberry_digi.c +++ b/sound/soc/bcm/hifiberry_digi.c @@ -164,6 +164,7 @@ static struct snd_soc_dai_link snd_rpi_hifiberry_digi_dai[] = { @@ -148089,7 +148089,7 @@ index 80732b8..9840e15 100644 .num_links = ARRAY_SIZE(snd_rpi_hifiberry_digi_dai), }; diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c -index 124d7a9..a5eaa9e 100644 +index 124d7a91976fb7b28de652c0df40c4319257fab2..a5eaa9ee0994f3a8e89179bf51328a3f92cef316 100644 --- a/sound/soc/bcm/iqaudio-dac.c +++ b/sound/soc/bcm/iqaudio-dac.c @@ -77,6 +77,7 @@ static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { @@ -148101,7 +148101,7 @@ index 124d7a9..a5eaa9e 100644 .num_links = ARRAY_SIZE(snd_rpi_iqaudio_dac_dai), }; diff --git a/sound/soc/bcm/raspidac3.c b/sound/soc/bcm/raspidac3.c -index 3cabf5b..e7422e2 100644 +index 3cabf5b42f50c708443c44fec30e0b8701cc7196..e7422e2dd3d70622a48ab3b2e192986931235764 100644 --- a/sound/soc/bcm/raspidac3.c +++ b/sound/soc/bcm/raspidac3.c @@ -128,6 +128,7 @@ static struct snd_soc_dai_link snd_rpi_raspidac3_dai[] = { @@ -148113,7 +148113,7 @@ index 3cabf5b..e7422e2 100644 .num_links = ARRAY_SIZE(snd_rpi_raspidac3_dai), }; diff --git a/sound/soc/bcm/rpi-dac.c b/sound/soc/bcm/rpi-dac.c -index d5fac1b..59dc89e 100644 +index d5fac1b21d50c323afe27c1d1e0283d82b81507f..59dc89ecabc082c0a1ed8adacdc4f0f1337a1c73 100644 --- a/sound/soc/bcm/rpi-dac.c +++ b/sound/soc/bcm/rpi-dac.c @@ -60,6 +60,7 @@ static struct snd_soc_dai_link snd_rpi_rpi_dac_dai[] = { @@ -148125,7 +148125,7 @@ index d5fac1b..59dc89e 100644 .num_links = ARRAY_SIZE(snd_rpi_rpi_dac_dai), }; diff --git a/sound/soc/bcm/rpi-proto.c b/sound/soc/bcm/rpi-proto.c -index c6e45a0..9db678e 100644 +index c6e45a03f4c36dab7930fdfc1c8b36c38bd41fb8..9db678e885efd63d84d60a098a84ed6772b19a2d 100644 --- a/sound/soc/bcm/rpi-proto.c +++ b/sound/soc/bcm/rpi-proto.c @@ -91,6 +91,7 @@ static struct snd_soc_dai_link snd_rpi_proto_dai[] = { @@ -148137,10 +148137,10 @@ index c6e45a0..9db678e 100644 .num_links = ARRAY_SIZE(snd_rpi_proto_dai), }; -From 797d7607625bed287bdadcee2471a247ced1ded5 Mon Sep 17 00:00:00 2001 +From 2541ed2537e93a858b2092310041c490f9d7b927 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 20 Jan 2016 17:50:09 +0000 -Subject: [PATCH 154/251] smsx95xx: Add option to disable the crimes against +Subject: [PATCH 154/398] smsx95xx: Add option to disable the crimes against truesize fix It may improve iperf numbers on Pi 1, but may generate dmesg warnings and possibly cause network issues @@ -148153,7 +148153,7 @@ See issue 1248. diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c old mode 100755 new mode 100644 -index 7483222..a61bd08 +index 7483222f330ad77fe8656e2046205daa87a3255e..a61bd08d81a0dc6a18f3989b87f57101e78aa4ac --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -75,6 +75,10 @@ static bool turbo_mode = false; @@ -148186,10 +148186,10 @@ index 7483222..a61bd08 usbnet_skb_return(dev, ax_skb); } -From 93c08f5b50bbb8181c4d34bb40fc57e4e3142f8f Mon Sep 17 00:00:00 2001 +From 87c0d251c33ca5f55b7806c45d756f8cd6ab3ad4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 155/251] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 155/398] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -148203,7 +148203,7 @@ request that the VPU toggles LEDs. create mode 100644 drivers/gpio/gpio-bcm-virt.c diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 76b3a88..6d6b519 100644 +index 76b3a88d9d61bf7a713ae69567ffa5375c6969ce..6d6b5196de44a9d306e5adfbc47d46a4a9cfb2e6 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -607,6 +607,7 @@ CONFIG_PPS=m @@ -148215,7 +148215,7 @@ index 76b3a88..6d6b519 100644 CONFIG_GPIO_STMPE=y CONFIG_W1=m diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index b18bea0..a1f4cce 100644 +index b18bea08ff253398db70846445dca4ee3ea0eafc..a1f4ccee349ff4799a6872a8b3e293d4afceac7b 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -132,6 +132,12 @@ config GPIO_BCM_KONA @@ -148232,7 +148232,7 @@ index b18bea0..a1f4cce 100644 tristate "BRCMSTB GPIO support" default y if ARCH_BRCMSTB diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile -index 986dbd8..b2ccc9f 100644 +index 986dbd838ceaceb03c42ffc15a704bf5f180b09d..b2ccc9fd7011d14b7f7a10ad1e4910f540867085 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o @@ -148245,7 +148245,7 @@ index 986dbd8..b2ccc9f 100644 obj-$(CONFIG_GPIO_CLPS711X) += gpio-clps711x.o diff --git a/drivers/gpio/gpio-bcm-virt.c b/drivers/gpio/gpio-bcm-virt.c new file mode 100644 -index 0000000..53edcb4 +index 0000000000000000000000000000000000000000..53edcb47a04ea69fc3dc8e2e11a755d9830b75b0 --- /dev/null +++ b/drivers/gpio/gpio-bcm-virt.c @@ -0,0 +1,180 @@ @@ -148430,7 +148430,7 @@ index 0000000..53edcb4 +MODULE_DESCRIPTION("brcmvirt GPIO driver"); +MODULE_ALIAS("platform:brcmvirt-gpio"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index b011489..c844968 100644 +index b011489eebc0180fce28eea86bd637853c0d05de..c844968bf0d2f551587d2879195bb70c8e7f1333 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -93,6 +93,7 @@ enum rpi_firmware_property_tag { @@ -148442,10 +148442,10 @@ index b011489..c844968 100644 RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003, RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004, -From 686310b3289232a8ae9d21061318e2ee3ca65c3d Mon Sep 17 00:00:00 2001 +From 75e02ab8cd21a770b43c02b60ccbe5593693e58a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Jan 2016 17:57:49 +0000 -Subject: [PATCH 156/251] BCM270X_DT: Add Pi3 support +Subject: [PATCH 156/398] BCM270X_DT: Add Pi3 support --- arch/arm/boot/dts/Makefile | 1 + @@ -148456,7 +148456,7 @@ Subject: [PATCH 156/251] BCM270X_DT: Add Pi3 support create mode 100644 arch/arm/boot/dts/bcm2710.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index d583e67..fdc450f 100644 +index d583e67d065a7d841e4606a4b99d94f252969a5c..fdc450f4c9d9623ac4723d39df9419eb80a420db 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b-plus.dtb @@ -148469,7 +148469,7 @@ index d583e67..fdc450f 100644 ifeq ($(CONFIG_ARCH_BCM2708),y) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts new file mode 100644 -index 0000000..cc06089 +index 0000000000000000000000000000000000000000..cc060898f428d9cb4f98f8e35345a3323130a098 --- /dev/null +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -0,0 +1,192 @@ @@ -148667,7 +148667,7 @@ index 0000000..cc06089 +}; diff --git a/arch/arm/boot/dts/bcm2710.dtsi b/arch/arm/boot/dts/bcm2710.dtsi new file mode 100644 -index 0000000..1a48686 +index 0000000000000000000000000000000000000000..1a48686a15d44dc6fbdddc569d564779f76ae5d1 --- /dev/null +++ b/arch/arm/boot/dts/bcm2710.dtsi @@ -0,0 +1,102 @@ @@ -148774,10 +148774,10 @@ index 0000000..1a48686 + interrupts = <8>; +}; -From 5704ec08a597c580de377bb0fca760fa30b927b0 Mon Sep 17 00:00:00 2001 +From 839356fda81c8aa74879d175851b4a3206fff510 Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Mon, 8 Feb 2016 23:49:41 +0000 -Subject: [PATCH 157/251] DT: Add overlays to configure I2C pins +Subject: [PATCH 157/398] DT: Add overlays to configure I2C pins Lifted from https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=120938&p=825883 @@ -148794,7 +148794,7 @@ allocations for i2c-0 and i2c-1 to be changed. create mode 100644 arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index a787d66..f2bc3ce 100644 +index a787d6634f0eabb15ee9a6f173a2e20ff1db02bf..f2bc3cee6613bdea7ec6476a467f2f2c31b0220d 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -29,6 +29,8 @@ dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb @@ -148807,7 +148807,7 @@ index a787d66..f2bc3ce 100644 dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index cf5f5be..7d7bbb8 100644 +index cf5f5bee0d3312754be7fb71418bf9183994a2c5..7d7bbb889d15bb9cc10e3089a2d40f2b6ae6c3b2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -371,6 +371,22 @@ Params: ds1307 Select the DS1307 device @@ -148835,7 +148835,7 @@ index cf5f5be..7d7bbb8 100644 Load: dtoverlay=i2s-mmap diff --git a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts new file mode 100644 -index 0000000..5c0e55b +index 0000000000000000000000000000000000000000..5c0e55b73531925f91a1cc3867ddf00ebb782db3 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts @@ -0,0 +1,36 @@ @@ -148877,7 +148877,7 @@ index 0000000..5c0e55b +}; diff --git a/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts new file mode 100644 -index 0000000..e303b9c +index 0000000000000000000000000000000000000000..e303b9c61c82a28eab7b48f6b085661574d5a849 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts @@ -0,0 +1,37 @@ @@ -148919,10 +148919,10 @@ index 0000000..e303b9c + }; +}; -From c0d707957191b16ee951b09e3b2d28e5a5cda0f3 Mon Sep 17 00:00:00 2001 +From 3eee68a509484ab18f18e307fa5de8288cd0c610 Mon Sep 17 00:00:00 2001 From: Dhiraj Goel Date: Thu, 3 Mar 2016 21:10:50 -0800 -Subject: [PATCH 158/251] bcm2835-camera: fix a bug in computation of frame +Subject: [PATCH 158/398] bcm2835-camera: fix a bug in computation of frame timestamp Fixes #1318 @@ -148931,7 +148931,7 @@ Fixes #1318 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c -index e83334c..98a892e 100644 +index e83334c01e63da951d60c964418ef105f8755932..98a892e5140ac0e9e4631965b43bcdae5e8f587b 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -360,8 +360,7 @@ static void buffer_cb(struct vchiq_mmal_instance *instance, @@ -148945,10 +148945,10 @@ index e83334c..98a892e 100644 dev->capture.kernel_start_ts.tv_usec + rem; -From e16268752be460f8d65e4d613c690508ce985f3f Mon Sep 17 00:00:00 2001 +From 82c01a55e7a26f8e7f46031dad2dcd3c2c45ee06 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 2 Mar 2016 10:59:05 +0000 -Subject: [PATCH 159/251] BCM270X_DT: Add pi3-disable-bt overlay +Subject: [PATCH 159/398] BCM270X_DT: Add pi3-disable-bt overlay Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. To disable the systemd service that initialises the modem so it doesn't use the UART: @@ -148964,7 +148964,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index f2bc3ce..2c2b2fa 100644 +index f2bc3cee6613bdea7ec6476a467f2f2c31b0220d..2c2b2fa868ee4d82053fb180b1514a9b960c9855 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -39,6 +39,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb @@ -148976,7 +148976,7 @@ index f2bc3ce..2c2b2fa 100644 dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 7d7bbb8..4f0be23 100644 +index 7d7bbb889d15bb9cc10e3089a2d40f2b6ae6c3b2..4f0be234af6bf7faa8d4b3196571dc3ea912e614 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -496,6 +496,14 @@ Params: speed Display SPI bus speed @@ -148996,7 +148996,7 @@ index 7d7bbb8..4f0be23 100644 Load: dtoverlay=piscreen,= diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts new file mode 100644 -index 0000000..05403e2 +index 0000000000000000000000000000000000000000..05403e2a98a5146c6e4d0d2c7ff2ee0241153273 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts @@ -0,0 +1,48 @@ @@ -149049,10 +149049,10 @@ index 0000000..05403e2 + }; +}; -From 59b04f45fe08783a5564c784869cfc93cd40c109 Mon Sep 17 00:00:00 2001 +From 15016b290e0723aa73aeb9cc2cf8b6cebbf403c5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 09:53:03 +0000 -Subject: [PATCH 160/251] BCM270X_DT: Add pi3-miniuart-bt DT overlay +Subject: [PATCH 160/398] BCM270X_DT: Add pi3-miniuart-bt DT overlay Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum @@ -149074,7 +149074,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 2c2b2fa..687cc7c 100644 +index 2c2b2fa868ee4d82053fb180b1514a9b960c9855..687cc7c0d4f1506ee1be8a67df76c9eef080a65b 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -40,6 +40,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb @@ -149086,7 +149086,7 @@ index 2c2b2fa..687cc7c 100644 dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4f0be23..6a7aa31 100644 +index 4f0be234af6bf7faa8d4b3196571dc3ea912e614..6a7aa31ec363250c333b0659cecb6c4960c6e16a 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -504,6 +504,16 @@ Load: dtoverlay=pi3-disable-bt @@ -149108,7 +149108,7 @@ index 4f0be23..6a7aa31 100644 Load: dtoverlay=piscreen,= diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts new file mode 100644 -index 0000000..ae1292a +index 0000000000000000000000000000000000000000..ae1292aed606dd9bab09f66bfd894019fd5d8a0e --- /dev/null +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -0,0 +1,61 @@ @@ -149174,10 +149174,10 @@ index 0000000..ae1292a + }; +}; -From 7c539311298d0f848ba5e300d251572d4f02a891 Mon Sep 17 00:00:00 2001 +From 13ede9a4b841b2f5338c78eaac93a85d01a675aa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 13:38:39 +0000 -Subject: [PATCH 161/251] Pi3 DT: Add dtparams for the SD interface +Subject: [PATCH 161/398] Pi3 DT: Add dtparams for the SD interface Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit and sd_debug. These were missed out of the initial Pi3 DTB. @@ -149188,7 +149188,7 @@ Signed-off-by: Phil Elwell 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index cc06089..36972d8 100644 +index cc060898f428d9cb4f98f8e35345a3323130a098..36972d8e413f39de89f94025541bcfcf14128097 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -188,5 +188,9 @@ @@ -149202,10 +149202,10 @@ index cc06089..36972d8 100644 }; }; -From a852495aa0826899b7cf9b7c341ef4c5baea1073 Mon Sep 17 00:00:00 2001 +From 380df2ff740d14960518a610dc6763b4acbb4d0e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 15:05:11 +0000 -Subject: [PATCH 162/251] vchiq_arm: Tweak the logging output +Subject: [PATCH 162/398] vchiq_arm: Tweak the logging output Signed-off-by: Phil Elwell --- @@ -149213,7 +149213,7 @@ Signed-off-by: Phil Elwell 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c -index 2c98da4..160db24 100644 +index 2c98da4307dff994a00dc246574ef0aaee05d5da..160db24aeea33a8296923501009c1f02bc41e599 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -891,16 +891,14 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, @@ -149280,10 +149280,10 @@ index 2c98da4..160db24 100644 switch (type) { -From e7f05008cced2d27c9b221614ca469dd48f5bc81 Mon Sep 17 00:00:00 2001 +From 97c7535c4648dbf8974a48063f87d0c17bae2c2c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 7 Mar 2016 16:46:39 +0000 -Subject: [PATCH 163/251] bcm2835-sdhost: Only claim one DMA channel +Subject: [PATCH 163/398] bcm2835-sdhost: Only claim one DMA channel With both MMC controllers enabled there are few DMA channels left. The bcm2835-sdhost driver only uses DMA in one direction at a time, so it @@ -149298,7 +149298,7 @@ Signed-off-by: Phil Elwell 2 files changed, 50 insertions(+), 25 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 4f65203..4f833a9 100644 +index 4f65203b784c0a5ad411adf4530ff5c71e916feb..4f833a93b22fab64a23356ce1e29d0ed4fb91d29 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -136,9 +136,8 @@ @@ -149314,7 +149314,7 @@ index 4f65203..4f833a9 100644 brcm,pio-limit = <1>; status = "disabled"; diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 4f6cab5..4cc4272 100644 +index 4f6cab52a60f5a0426076ffdb9e6098c2be8aa1d..4cc4272c869d85305233ce5399367ab5ac8acfd0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -185,9 +185,10 @@ struct bcm2835_host { @@ -149445,10 +149445,10 @@ index 4f6cab5..4cc4272 100644 } } -From afe2e242d78005f19d1611ad15124ce576225778 Mon Sep 17 00:00:00 2001 +From 299b36098eea09b4e07f9dc63c21f1415116395b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Mar 2016 09:49:16 +0000 -Subject: [PATCH 164/251] bcm2835-mmc: Only claim one DMA channel +Subject: [PATCH 164/398] bcm2835-mmc: Only claim one DMA channel With both MMC controllers enabled there are few DMA channels left. The bcm2835-mmc driver only uses DMA in one direction at a time, so it @@ -149463,7 +149463,7 @@ Signed-off-by: Phil Elwell 2 files changed, 51 insertions(+), 23 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi -index 4f833a9..e0be77a 100644 +index 4f833a93b22fab64a23356ce1e29d0ed4fb91d29..e0be77a00a6c5339e5c4c26e672ddbd57f9d9c76 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -232,9 +232,8 @@ @@ -149479,7 +149479,7 @@ index 4f833a9..e0be77a 100644 status = "disabled"; }; diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c -index 104f93e..ceb3793 100644 +index 104f93ecd51d963ac92fcfcf04b1f15225468d8d..ceb37930e167f47c9c848e8de757ad098eec9a19 100644 --- a/drivers/mmc/host/bcm2835-mmc.c +++ b/drivers/mmc/host/bcm2835-mmc.c @@ -108,8 +108,9 @@ struct bcm2835_host { @@ -149620,17 +149620,17 @@ index 104f93e..ceb3793 100644 #endif clk = devm_clk_get(dev, NULL); -From ba461323859e90843ed2a65dd223a60244782814 Mon Sep 17 00:00:00 2001 +From dd1768db125e2d28b7498a26aae749e2cbec2d48 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 Mar 2016 17:08:39 +0000 -Subject: [PATCH 165/251] config: rebuild with savedefconfig +Subject: [PATCH 165/398] config: rebuild with savedefconfig --- arch/arm/configs/bcm2709_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 6d6b519..116002b 100644 +index 6d6b5196de44a9d306e5adfbc47d46a4a9cfb2e6..116002ba56bfdebc8174d7949e945909b6b47280 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -593,7 +593,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y @@ -149651,10 +149651,10 @@ index 6d6b519..116002b 100644 CONFIG_MCP320X=m CONFIG_DHT11=m -From 226c823c6dde5546476a22be8d681712924ad6ef Mon Sep 17 00:00:00 2001 +From b476721c33983c416dbfb3d67d932e2b4524b475 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 Mar 2016 17:06:33 +0000 -Subject: [PATCH 166/251] config: Add module for mcp3422 ADC +Subject: [PATCH 166/398] config: Add module for mcp3422 ADC --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -149662,7 +149662,7 @@ Subject: [PATCH 166/251] config: Add module for mcp3422 ADC 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 116002b..7793baf 100644 +index 116002ba56bfdebc8174d7949e945909b6b47280..7793bafc6b9ffd96f9676f8bd9e44e4c96e8cbfc 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -1114,6 +1114,7 @@ CONFIG_IIO_BUFFER=y @@ -149674,7 +149674,7 @@ index 116002b..7793baf 100644 CONFIG_PWM_BCM2835=m CONFIG_RASPBERRYPI_FIRMWARE=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 1ca1695..f09be87 100644 +index 1ca1695f699c9311d14fe09a555736b1898717ee..f09be8737e6cf697ebf3dd3ee171993ee0127033 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -1121,6 +1121,7 @@ CONFIG_IIO_BUFFER=y @@ -149686,10 +149686,10 @@ index 1ca1695..f09be87 100644 CONFIG_PWM_BCM2835=m CONFIG_RASPBERRYPI_FIRMWARE=y -From f27ae7ba1432ab3604faaf8ca79ed31a5edc8d42 Mon Sep 17 00:00:00 2001 +From 9f18d07576437ddb30d4bb88515cf9f82a2e7bf0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Mar 2016 16:18:57 +0000 -Subject: [PATCH 167/251] Pi3 DT: Add pull-ups on the UART RX lines +Subject: [PATCH 167/398] Pi3 DT: Add pull-ups on the UART RX lines Signed-off-by: Phil Elwell --- @@ -149698,7 +149698,7 @@ Signed-off-by: Phil Elwell 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 36972d8..5a0c45a 100644 +index 36972d8e413f39de89f94025541bcfcf14128097..5a0c45ae55e3480975157b6b3d7cf5e3adfd642b 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -53,13 +53,13 @@ @@ -149718,7 +149718,7 @@ index 36972d8..5a0c45a 100644 }; diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index ae1292a..0b8f0ca 100644 +index ae1292aed606dd9bab09f66bfd894019fd5d8a0e..0b8f0ca74e8fd5a70520e468a754ead8767e23ff 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -46,7 +46,7 @@ @@ -149731,10 +149731,10 @@ index ae1292a..0b8f0ca 100644 }; }; -From e5b66ba646a96ad37ea4c7cc240c34e9d77f0eea Mon Sep 17 00:00:00 2001 +From 417808afe360f6a129432c9024080f466715aebf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 17:25:59 +0000 -Subject: [PATCH 168/251] brcmfmac: Disable power management +Subject: [PATCH 168/398] brcmfmac: Disable power management Disable wireless power saving in the brcmfmac WLAN driver. This is a temporary measure until the connectivity loss resulting from power @@ -149746,7 +149746,7 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c -index deb5f78..90f65d9 100644 +index deb5f78dcacc0d9ef188360d300a7b4f1bcfba19..90f65d9b3d73e58c3ba68b097cf828652d308245 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c @@ -2567,6 +2567,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, @@ -149759,10 +149759,10 @@ index deb5f78..90f65d9 100644 if (!check_vif_up(ifp->vif)) { -From 6be841fb1dc54f49488ac814034726a0eecb26c7 Mon Sep 17 00:00:00 2001 +From 963fbad639f61648124d80262f2bae15b2c814a9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 21:28:52 +0000 -Subject: [PATCH 169/251] BCM270X_DT: rpi-display overlay - add swapxy param +Subject: [PATCH 169/398] BCM270X_DT: rpi-display overlay - add swapxy param Signed-off-by: Phil Elwell --- @@ -149771,7 +149771,7 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 6a7aa31..6fa5b80 100644 +index 6a7aa31ec363250c333b0659cecb6c4960c6e16a..6fa5b80419a16da426ade774fab812ad9ab4a158 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -644,14 +644,11 @@ Name: rpi-display @@ -149791,7 +149791,7 @@ index 6a7aa31..6fa5b80 100644 Name: rpi-ft5406 diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts -index a8fa974..ccb296e 100644 +index a8fa9745251216186c987fa8bae17b96d12c90bf..ccb296e023fa7f7c87660ffc1b460acf55f8adff 100644 --- a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts @@ -78,5 +78,6 @@ @@ -149802,10 +149802,10 @@ index a8fa974..ccb296e 100644 }; }; -From 0775a4eb95034a3460293cbd08bc7c6ebbe47a0f Mon Sep 17 00:00:00 2001 +From ca0051d9acdc787cab8de7240cf864bd05779ce4 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Fri, 11 Mar 2016 11:44:35 +0000 -Subject: [PATCH 170/251] Remove I2S config from bt_pins. +Subject: [PATCH 170/398] Remove I2S config from bt_pins. Remove I2S config from bt_pins. Causes issues with clock alignment when I2S is used by an external DAC via GPIO header. @@ -149815,7 +149815,7 @@ used by an external DAC via GPIO header. 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 5a0c45a..2cb7d43 100644 +index 5a0c45ae55e3480975157b6b3d7cf5e3adfd642b..2cb7d43110230cf119105f749d811463a2cc4041 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -45,9 +45,9 @@ @@ -149832,7 +149832,7 @@ index 5a0c45a..2cb7d43 100644 uart0_pins: uart0_pins { diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index 0b8f0ca..f07afcb 100644 +index 0b8f0ca74e8fd5a70520e468a754ead8767e23ff..f07afcb225200a651a362653d0e0522392e6ab40 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -29,7 +29,7 @@ @@ -149845,10 +149845,10 @@ index 0b8f0ca..f07afcb 100644 }; }; -From c80d4e337d289f911bc3d9c972cbcc85c0bf758c Mon Sep 17 00:00:00 2001 +From 2dea58e6028e5a08fa0119836cd3232f7fd41a60 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:44:59 +0100 -Subject: [PATCH 171/251] Revert "scripts/dtc: Add overlay support" +Subject: [PATCH 171/398] Revert "scripts/dtc: Add overlay support" This reverts commit fa6d1755c2fdd9451077d8248e3804f0619f19b9. --- @@ -149865,7 +149865,7 @@ This reverts commit fa6d1755c2fdd9451077d8248e3804f0619f19b9. 10 files changed, 1145 insertions(+), 1685 deletions(-) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index efd1bc6..e81a8c7 100644 +index efd1bc6457747bd665f707523bf745e9ebe94def..e81a8c74b8d2802003c14584b8326bb5bfb174be 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -458,91 +458,21 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -150020,7 +150020,7 @@ index efd1bc6..e81a8c7 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index dd44ba2..0ee1caf 100644 +index dd44ba2aa11d019c7b71cede4f0806dd53c7b0db..0ee1caf03dd057bee8c212002568941f0658edd7 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,11 +113,6 @@ static void lexical_error(const char *fmt, ...); @@ -150036,7 +150036,7 @@ index dd44ba2..0ee1caf 100644 DPRINT("Keyword: /memreserve/\n"); BEGIN_DEFAULT(); diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped -index 1518525..11cd78e 100644 +index 15185255fafdbebf805ad2bb2c63f0fdef4c8776..11cd78e723050e56d00709ef63164bd83cccff9e 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ @@ -150930,7 +150930,7 @@ index 1518525..11cd78e 100644 diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped -index 2c1784e..116458c 100644 +index 2c1784e3b4e1c56a3eeeb9c00d1bcb4a187f2fb5..116458c8dfc4cbd728db8fc348bb254a9bae7208 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -1,19 +1,19 @@ @@ -153740,7 +153740,7 @@ index 2c1784e..116458c 100644 } - diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped -index 0b22bbb..30867c6 100644 +index 0b22bbb974795a98eafd8f22425039713d3994b7..30867c688300e38333877360e3b05475d5b4a2a3 100644 --- a/scripts/dtc/dtc-parser.tab.h_shipped +++ b/scripts/dtc/dtc-parser.tab.h_shipped @@ -1,19 +1,19 @@ @@ -153903,7 +153903,7 @@ index 0b22bbb..30867c6 100644 +#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y -index 56b9c15..5a897e3 100644 +index 56b9c152b11edf404834e2aa9c7637205d4d1c38..5a897e36562d67107dba44fa91274253b34152dc 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -19,7 +19,6 @@ @@ -153962,7 +153962,7 @@ index 56b9c15..5a897e3 100644 ; diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c -index 0cbb14c..8c4add6 100644 +index 0cbb14c96a012a6975f6f4f697398e9ad9aedce1..8c4add69a76578839de910292b165b4504f47cf2 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -29,7 +29,6 @@ int reservenum; /* Number of memory reservation slots */ @@ -154010,7 +154010,7 @@ index 0cbb14c..8c4add6 100644 usage(NULL); default: diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h -index fe45748..56212c8 100644 +index fe4574855e41f8313a5f4e15b468816a07a5d84b..56212c8df660396b1d9bf6752e1121990e0789ab 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h @@ -54,7 +54,6 @@ extern int reservenum; /* Number of memory reservation slots */ @@ -154080,7 +154080,7 @@ index fe45748..56212c8 100644 void delete_labels(struct label **labels); diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c -index f439b40..bd99fa2 100644 +index f439b405848bdf314077e77808d4ba04663515ad..bd99fa2d33b85e873bd00178d6390d70f4afaa0d 100644 --- a/scripts/dtc/flattree.c +++ b/scripts/dtc/flattree.c @@ -262,12 +262,6 @@ static void flatten_tree(struct node *tree, struct emitter *emit, @@ -154246,17 +154246,17 @@ index f439b40..bd99fa2 100644 } diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h -index 86b7338..5b8c7d5 100644 +index 86b7338ad78fd60a0d5e5b4a44bce194ee07cc48..5b8c7d53d608bdbb60776c97732e44cb310cc4c1 100644 --- a/scripts/dtc/version_gen.h +++ b/scripts/dtc/version_gen.h @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" +#define DTC_VERSION "DTC 1.4.1-g9d3649bd" -From 4db35c3559c7b70c617593f51cdde1e6a9f75376 Mon Sep 17 00:00:00 2001 +From f4777105ead3f6f99117bbe2d981bd22ecef3236 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:49:15 +0100 -Subject: [PATCH 172/251] scripts/dtc: Update to upstream version 1.4.1 +Subject: [PATCH 172/398] scripts/dtc: Update to upstream version 1.4.1 Includes the new localfixups format. @@ -154275,7 +154275,7 @@ Signed-off-by: Phil Elwell 10 files changed, 1021 insertions(+), 622 deletions(-) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index e81a8c7..540a3ea 100644 +index e81a8c74b8d2802003c14584b8326bb5bfb174be..540a3ea1f073d385c629b25dfcbe5f7e67c3d8a5 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -458,6 +458,8 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -154415,7 +154415,7 @@ index e81a8c7..540a3ea 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index 0ee1caf..dd44ba2 100644 +index 0ee1caf03dd057bee8c212002568941f0658edd7..dd44ba2aa11d019c7b71cede4f0806dd53c7b0db 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); @@ -154431,7 +154431,7 @@ index 0ee1caf..dd44ba2 100644 DPRINT("Keyword: /memreserve/\n"); BEGIN_DEFAULT(); diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped -index 11cd78e..1518525 100644 +index 11cd78e723050e56d00709ef63164bd83cccff9e..15185255fafdbebf805ad2bb2c63f0fdef4c8776 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ @@ -155325,7 +155325,7 @@ index 11cd78e..1518525 100644 diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped -index 116458c..844c462 100644 +index 116458c8dfc4cbd728db8fc348bb254a9bae7208..844c4628962d0e3e2860edf1315bec4e21b7a810 100644 --- a/scripts/dtc/dtc-parser.tab.c_shipped +++ b/scripts/dtc/dtc-parser.tab.c_shipped @@ -65,6 +65,7 @@ @@ -156533,7 +156533,7 @@ index 116458c..844c462 100644 void yyerror(char const *s) diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped -index 30867c6..276d078 100644 +index 30867c688300e38333877360e3b05475d5b4a2a3..276d0788f8581bf1970ec8ef9c29b1981b4fe252 100644 --- a/scripts/dtc/dtc-parser.tab.h_shipped +++ b/scripts/dtc/dtc-parser.tab.h_shipped @@ -46,26 +46,27 @@ extern int yydebug; @@ -156605,7 +156605,7 @@ index 30867c6..276d078 100644 # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y -index 5a897e3..d23927d 100644 +index 5a897e36562d67107dba44fa91274253b34152dc..d23927d9921558c14e983d2851e6c0cfcce74c17 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -19,6 +19,7 @@ @@ -156663,7 +156663,7 @@ index 5a897e3..d23927d 100644 ; diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c -index 8c4add6..91e91e7 100644 +index 8c4add69a76578839de910292b165b4504f47cf2..91e91e79e95090f8cfe986eb742c8beeec0ffd49 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -29,6 +29,7 @@ int reservenum; /* Number of memory reservation slots */ @@ -156711,7 +156711,7 @@ index 8c4add6..91e91e7 100644 usage(NULL); default: diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h -index 56212c8..f163b22 100644 +index 56212c8df660396b1d9bf6752e1121990e0789ab..f163b22b14b806b637c9fe996efd02762d182e1d 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h @@ -54,6 +54,7 @@ extern int reservenum; /* Number of memory reservation slots */ @@ -156783,7 +156783,7 @@ index 56212c8..f163b22 100644 void delete_labels(struct label **labels); diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c -index bd99fa2..2385137 100644 +index bd99fa2d33b85e873bd00178d6390d70f4afaa0d..238513780a5ba08c70d3995f45c35817fbabeb45 100644 --- a/scripts/dtc/flattree.c +++ b/scripts/dtc/flattree.c @@ -255,6 +255,204 @@ static int stringtable_insert(struct data *d, const char *str) @@ -157003,17 +157003,17 @@ index bd99fa2..2385137 100644 } diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h -index 5b8c7d5..2595dfd 100644 +index 5b8c7d53d608bdbb60776c97732e44cb310cc4c1..2595dfda020fd9e03f0beff5006f229d5e393151 100644 --- a/scripts/dtc/version_gen.h +++ b/scripts/dtc/version_gen.h @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +#define DTC_VERSION "DTC 1.4.1-g25efc119" -From 04317cda235aa8627422fd132fe4bbb19036f4a5 Mon Sep 17 00:00:00 2001 +From 6fd1390b344a222b8aa165cb48a37aa419fe5735 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 22 Oct 2015 23:30:04 +0300 -Subject: [PATCH 173/251] configfs: implement binary attributes +Subject: [PATCH 173/398] configfs: implement binary attributes ConfigFS lacked binary attributes up until now. This patch introduces support for binary attributes in a somewhat similar @@ -157045,7 +157045,7 @@ Signed-off-by: Christoph Hellwig 6 files changed, 374 insertions(+), 22 deletions(-) diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt -index af68efd..e5fe521 100644 +index af68efdbbfaddb0827b29f1fc4fb4b0eacc43b3a..e5fe521eea1d3b568404831efbbfc15bb935430c 100644 --- a/Documentation/filesystems/configfs/configfs.txt +++ b/Documentation/filesystems/configfs/configfs.txt @@ -51,15 +51,27 @@ configfs tree is always there, whether mounted on /config or not. @@ -157127,7 +157127,7 @@ index af68efd..e5fe521 100644 A config_item cannot live in a vacuum. The only way one can be created diff --git a/fs/configfs/configfs_internal.h b/fs/configfs/configfs_internal.h -index b65d1ef..ccc31fa 100644 +index b65d1ef532d52d692cc7ebbdc3c7350d1dd9d735..ccc31fa6f1a7e13cbcb6f9b0af501fbe52bd971f 100644 --- a/fs/configfs/configfs_internal.h +++ b/fs/configfs/configfs_internal.h @@ -53,13 +53,14 @@ struct configfs_dirent { @@ -157179,7 +157179,7 @@ index b65d1ef..ccc31fa 100644 { struct config_item * item = NULL; diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c -index a7a1b21..7ae97e8 100644 +index a7a1b218f308af56ac3094fa5f2ddb6b2749dd4a..7ae97e83f12154a52b90642d2a7b557e956c86e1 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -255,6 +255,12 @@ static void configfs_init_file(struct inode * inode) @@ -157229,7 +157229,7 @@ index a7a1b21..7ae97e8 100644 if (error) detach_attrs(item); diff --git a/fs/configfs/file.c b/fs/configfs/file.c -index d39099e..3687187 100644 +index d39099ea7df76d723e4501c316eb43352b11e69c..3687187c8ea59e8a6a2795c8e36fa95e897955a7 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -28,6 +28,7 @@ @@ -157574,7 +157574,7 @@ index d39099e..3687187 100644 + return error; +} diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c -index eae8757..0cc810e 100644 +index eae87575e681bbbed9db2ca48eb91cffa7ed8e88..0cc810e9dccc15fb764d53a4cb26604b3d16672f 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -218,7 +218,7 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd) @@ -157587,7 +157587,7 @@ index eae8757..0cc810e 100644 return attr->ca_name; } diff --git a/include/linux/configfs.h b/include/linux/configfs.h -index 758a029..f7300d0 100644 +index 758a029011b11a3d1d2c1acfe9fa171e82a55343..f7300d023dbee10be54beed582718066a162c368 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h @@ -51,6 +51,7 @@ struct module; @@ -157662,10 +157662,10 @@ index 758a029..f7300d0 100644 * If allow_link() exists, the item can symlink(2) out to other * items. If the item is a group, it may support mkdir(2). -From 15c5929aef0ebd49a3afc31a307b0fa3e24a2923 Mon Sep 17 00:00:00 2001 +From b8269e48edf57070ab03a1549b6d460bd660e9dd Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 174/251] OF: DT-Overlay configfs interface +Subject: [PATCH 174/398] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -157699,7 +157699,7 @@ Signed-off-by: Phil Elwell diff --git a/Documentation/devicetree/configfs-overlays.txt b/Documentation/devicetree/configfs-overlays.txt new file mode 100644 -index 0000000..5fa43e0 +index 0000000000000000000000000000000000000000..5fa43e0643072c7963daddc18cec7772910378ad --- /dev/null +++ b/Documentation/devicetree/configfs-overlays.txt @@ -0,0 +1,31 @@ @@ -157735,7 +157735,7 @@ index 0000000..5fa43e0 +intended to be used by hardware managers in the kernel, while the copy interface +make sense for developers (since it avoids problems with namespaces). diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig -index e2a4841..7e5e6c4 100644 +index e2a48415d9691059f1beb2afee7f134019d65ecf..7e5e6c4e77e070692cab0ed2e4b827c08c0a1c29 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -112,4 +112,11 @@ config OF_OVERLAY @@ -157751,7 +157751,7 @@ index e2a4841..7e5e6c4 100644 + endif # OF diff --git a/drivers/of/Makefile b/drivers/of/Makefile -index 156c072..46c8f57 100644 +index 156c072b31177eab081de4e54ab28b7815e32c95..46c8f5754ed84410d7dea83bfedcbdebf3f85453 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -1,4 +1,5 @@ @@ -157762,7 +157762,7 @@ index 156c072..46c8f57 100644 obj-$(CONFIG_OF_EARLY_FLATTREE) += fdt_address.o diff --git a/drivers/of/configfs.c b/drivers/of/configfs.c new file mode 100644 -index 0000000..7b66deb +index 0000000000000000000000000000000000000000..7b66deb9b2c46d23063c4fe4aab534b6a8cdf932 --- /dev/null +++ b/drivers/of/configfs.c @@ -0,0 +1,314 @@ @@ -158081,10 +158081,10 @@ index 0000000..7b66deb +} +late_initcall(of_cfs_init); -From ee377daa5f1e9811fa04bbf254f4930ed5c7c9c5 Mon Sep 17 00:00:00 2001 +From 94677a94525dab68ac86c59c5badf18ba12b9796 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 175/251] Protect __release_resource against resources without +Subject: [PATCH 175/398] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -158095,7 +158095,7 @@ Signed-off-by: Phil Elwell 1 file changed, 6 insertions(+) diff --git a/kernel/resource.c b/kernel/resource.c -index 249b1eb..eb973a5 100644 +index 249b1eb1e6e1381c6963296db8c408f99a01b3b5..eb973a53d6f7bb9ad8293e1ca9aad950892cb4c1 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -237,6 +237,12 @@ static int __release_resource(struct resource *old) @@ -158112,10 +158112,10 @@ index 249b1eb..eb973a5 100644 for (;;) { tmp = *p; -From fa4cb194572f56c3ab11913af77d31084b8f40e5 Mon Sep 17 00:00:00 2001 +From 9090e667162645c5f19a1cc641bff0456480962d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 20:00:21 +0000 -Subject: [PATCH 176/251] BCM270X_DT: Add a .dtbo target, use for overlays +Subject: [PATCH 176/398] BCM270X_DT: Add a .dtbo target, use for overlays Change the filenames and extensions to keep the pre-DDT style of overlay (-overlay.dtb) distinct from new ones that use a @@ -158133,7 +158133,7 @@ Signed-off-by: Phil Elwell 3 files changed, 76 insertions(+), 71 deletions(-) diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore -index 3c79f85..eaaeb17 100644 +index 3c79f85975aaa26c7c2e353fefc54d71d89bc5bf..eaaeb17e5986e5f7178b2851169444ac7e45be8d 100644 --- a/arch/arm/boot/.gitignore +++ b/arch/arm/boot/.gitignore @@ -3,4 +3,4 @@ zImage @@ -158143,7 +158143,7 @@ index 3c79f85..eaaeb17 100644 -*.dtb +*.dtb* diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 687cc7c..d81fa09 100644 +index 687cc7c0d4f1506ee1be8a67df76c9eef080a65b..d81fa0910f0efe00692d2db5bd7e8940dce904ec 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -12,78 +12,73 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) @@ -158291,7 +158291,7 @@ index 687cc7c..d81fa09 100644 +always := $(dtbo-y) +clean-files := *.dtbo diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib -index 79e8661..7209d62 100644 +index 79e86613712f22308b8ad4c3442403e09770f2ed..7209d622eb16b113511bb7d8bd7a1b01e088f113 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -292,6 +292,16 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ @@ -158312,10 +158312,10 @@ index 79e8661..7209d62 100644 # Bzip2 -From 3c760a6a8f336bfb891214091b71bc3408c93b6f Mon Sep 17 00:00:00 2001 +From 1fa9dc8766b0b3d3899dc1577e9c8a08800214de Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 May 2015 11:18:58 +0100 -Subject: [PATCH 177/251] scripts/knlinfo: Decode DDTK atom +Subject: [PATCH 177/398] scripts/knlinfo: Decode DDTK atom Show the DDTK atom as being a boolean. @@ -158325,7 +158325,7 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/knlinfo b/scripts/knlinfo -index b9ef124..263ec93 100755 +index b9ef124fa033fddc8847cf1586a6108f4e5eda04..263ec937eaa70b4fd00bff18599db7f22671753c 100755 --- a/scripts/knlinfo +++ b/scripts/knlinfo @@ -16,6 +16,7 @@ my $trailer_magic = 'RPTL'; @@ -158346,10 +158346,10 @@ index b9ef124..263ec93 100755 sub format_int -From 2db1009fef8b23bac3b3ae61dd1382bffb0827b1 Mon Sep 17 00:00:00 2001 +From da3cb41f068a1de1f23bc3281d7a26dc08c61b2a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 May 2015 11:48:59 +0100 -Subject: [PATCH 178/251] Enable Dynamic Device Tree for bcmrpi_defconfig and +Subject: [PATCH 178/398] Enable Dynamic Device Tree for bcmrpi_defconfig and bcm2709_defconfig Signed-off-by: Phil Elwell @@ -158359,7 +158359,7 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 7793baf..0fff5a3 100644 +index 7793bafc6b9ffd96f9676f8bd9e44e4c96e8cbfc..0fff5a3f29e3127e8f1edc3477722af2bd05eac4 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -403,6 +403,7 @@ CONFIG_MTD=m @@ -158379,7 +158379,7 @@ index 7793baf..0fff5a3 100644 CONFIG_HFS_FS=m CONFIG_HFSPLUS_FS=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index f09be87..2db41e6 100644 +index f09be8737e6cf697ebf3dd3ee171993ee0127033..2db41e640c52078765504505d01fc1ccd7fce692 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -396,6 +396,7 @@ CONFIG_MTD=m @@ -158391,10 +158391,10 @@ index f09be87..2db41e6 100644 CONFIG_ZRAM_LZ4_COMPRESS=y CONFIG_BLK_DEV_LOOP=y -From efe315038fd3581998bf6c93f432ac6cf85bb53f Mon Sep 17 00:00:00 2001 +From 1dfd87bedaf339cfba5f5d284de974f8e606df5c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sun, 13 Mar 2016 16:14:44 +0000 -Subject: [PATCH 179/251] SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig +Subject: [PATCH 179/398] SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig Signed-off-by: Phil Elwell --- @@ -158402,7 +158402,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 2db41e6..74149cf 100644 +index 2db41e640c52078765504505d01fc1ccd7fce692..74149cfc43e32b6f7b8cbbeae726347469b5fb12 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -396,7 +396,7 @@ CONFIG_MTD=m @@ -158423,10 +158423,10 @@ index 2db41e6..74149cf 100644 CONFIG_HFS_FS=m CONFIG_HFSPLUS_FS=m -From 558d3a84b6363b021f77f138615cbf7b72c6f38c Mon Sep 17 00:00:00 2001 +From 1aaf6e52bf05c33bcf7e01a2c964854c3107128f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 14 Mar 2016 16:56:54 +0000 -Subject: [PATCH 180/251] dts, kbuild: dtbs_install installs .dtbo files too +Subject: [PATCH 180/398] dts, kbuild: dtbs_install installs .dtbo files too Signed-off-by: Phil Elwell --- @@ -158434,7 +158434,7 @@ Signed-off-by: Phil Elwell 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst -index 1c15717..43647b3 100644 +index 1c15717e0d5686972c1130fb718d0bc445c08dad..43647b3edd713cf1612c8f1ba56e4874ed033ceb 100644 --- a/scripts/Makefile.dtbinst +++ b/scripts/Makefile.dtbinst @@ -29,6 +29,7 @@ ifeq ("$(dtbinst-root)", "$(obj)") @@ -158468,10 +158468,10 @@ index 1c15717..43647b3 100644 .PHONY: $(PHONY) -From 3df4e691dcda317e661b026201c28db902be6830 Mon Sep 17 00:00:00 2001 +From ea2af8d393ceba096b8023ca8a06fc0a8218d35d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 14:10:29 +0000 -Subject: [PATCH 181/251] bcm2835-sdhost: Workaround for "slow" sectors +Subject: [PATCH 181/398] bcm2835-sdhost: Workaround for "slow" sectors Some cards have been seen to cause timeouts after certain sectors are read. This workaround enforces a minimum delay between the stop after @@ -158486,7 +158486,7 @@ Signed-off-by: Phil Elwell 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 4cc4272..f43aae0 100644 +index 4cc4272c869d85305233ce5399367ab5ac8acfd0..f43aae07bb9260a94542a9653a95afacb38cc263 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -202,9 +202,12 @@ struct bcm2835_host { @@ -158589,10 +158589,10 @@ index 4cc4272..f43aae0 100644 } } else { -From 16f0b8c220be3459c873578037994693c7e025d1 Mon Sep 17 00:00:00 2001 +From 75c3733ef2587cba36f4e3b08c3070b2e70a8907 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 15:49:16 +0000 -Subject: [PATCH 182/251] BCM270X_DT: Add labels to spidev nodes +Subject: [PATCH 182/398] BCM270X_DT: Add labels to spidev nodes Signed-off-by: Phil Elwell --- @@ -158604,7 +158604,7 @@ Signed-off-by: Phil Elwell 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -index d2d6fa0..00ea1b2 100644 +index d2d6fa0fa6b384a4cbc296ad37813f36f744b69c..00ea1b2edc600101f7257f537bb869f5476a14bd 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -59,7 +59,7 @@ @@ -158626,7 +158626,7 @@ index d2d6fa0..00ea1b2 100644 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts -index d033ee4..2f8a718 100644 +index d033ee4cab87c1cbdeb9a4c136c7233eff68f3c7..2f8a718c940fc43036e06620a95470b6f3b0aadf 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -59,7 +59,7 @@ @@ -158648,7 +158648,7 @@ index d033ee4..2f8a718 100644 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 8bcafb4..954896e 100755 +index 8bcafb41c39595a47b7d932871cb6463f137241d..954896e9b8f4df45c66ffdc3d1b601647cf5afca 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -42,7 +42,7 @@ @@ -158670,7 +158670,7 @@ index 8bcafb4..954896e 100755 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index aca253f..66523d6 100644 +index aca253ff9b7b21f628e4294fd3e7d8de061e26fb..66523d6f48ed1247219883f0096b1d5c19bd5023 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -59,7 +59,7 @@ @@ -158692,7 +158692,7 @@ index aca253f..66523d6 100644 reg = <1>; /* CE1 */ #address-cells = <1>; diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 2cb7d43..1ce4ea2 100644 +index 2cb7d43110230cf119105f749d811463a2cc4041..1ce4ea2a0871842bc8f83f0be9077761b127fe55 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -110,7 +110,7 @@ @@ -158714,10 +158714,10 @@ index 2cb7d43..1ce4ea2 100644 reg = <1>; /* CE1 */ #address-cells = <1>; -From 320ed2194edfdcd5fcc93772a353b7480fd4aa5a Mon Sep 17 00:00:00 2001 +From 5dd6507c86d9190d04f7ab794debbf3351c25fb2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 16:27:26 +0000 -Subject: [PATCH 183/251] BCM270X_DT: Use spidev labels in overlays +Subject: [PATCH 183/398] BCM270X_DT: Use spidev labels in overlays --- arch/arm/boot/dts/overlays/ads7846-overlay.dts | 22 ++++++++++------- @@ -158737,7 +158737,7 @@ Subject: [PATCH 183/251] BCM270X_DT: Use spidev labels in overlays 14 files changed, 174 insertions(+), 103 deletions(-) diff --git a/arch/arm/boot/dts/overlays/ads7846-overlay.dts b/arch/arm/boot/dts/overlays/ads7846-overlay.dts -index 6a92cd1..edf2dc9 100644 +index 6a92cd1a9ffc370f386612843fc9a0236ddb48ee..edf2dc9d5d5f6830508edabf2d04c42d27ba9b41 100644 --- a/arch/arm/boot/dts/overlays/ads7846-overlay.dts +++ b/arch/arm/boot/dts/overlays/ads7846-overlay.dts @@ -13,18 +13,24 @@ @@ -158782,7 +158782,7 @@ index 6a92cd1..edf2dc9 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts -index eab4052..880c753 100644 +index eab40523b78f20676f267bf5e81bff69b07becb3..880c7539d496fb10672ee573f7c51b8a213cecf7 100644 --- a/arch/arm/boot/dts/overlays/at86rf233-overlay.dts +++ b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts @@ -14,10 +14,6 @@ @@ -158811,7 +158811,7 @@ index eab4052..880c753 100644 __overlay__ { lowpan0_pins: lowpan0_pins { diff --git a/arch/arm/boot/dts/overlays/enc28j60-overlay.dts b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts -index 8fae869..db8a8fe 100644 +index 8fae869511ca53a533c7bffa9a59a4437e6501e3..db8a8feed94c010e368065fdd88b028622303b6f 100644 --- a/arch/arm/boot/dts/overlays/enc28j60-overlay.dts +++ b/arch/arm/boot/dts/overlays/enc28j60-overlay.dts @@ -14,10 +14,6 @@ @@ -158840,7 +158840,7 @@ index 8fae869..db8a8fe 100644 __overlay__ { eth1_pins: eth1_pins { diff --git a/arch/arm/boot/dts/overlays/hy28a-overlay.dts b/arch/arm/boot/dts/overlays/hy28a-overlay.dts -index 3cd3083..ac0f3c2 100644 +index 3cd3083f178b4a39dfb7c2742d15da7822701e1f..ac0f3c28ea855a620dc6a3385d9d15009f26358d 100644 --- a/arch/arm/boot/dts/overlays/hy28a-overlay.dts +++ b/arch/arm/boot/dts/overlays/hy28a-overlay.dts @@ -13,18 +13,24 @@ @@ -158885,7 +158885,7 @@ index 3cd3083..ac0f3c2 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/hy28b-overlay.dts b/arch/arm/boot/dts/overlays/hy28b-overlay.dts -index f774c4a..8018aeb 100644 +index f774c4ab1770529cac96b5e85a183ebe04359fbd..8018aebde8e557f45ffd63eb86f6c7a1048fe3cb 100644 --- a/arch/arm/boot/dts/overlays/hy28b-overlay.dts +++ b/arch/arm/boot/dts/overlays/hy28b-overlay.dts @@ -13,18 +13,24 @@ @@ -158930,7 +158930,7 @@ index f774c4a..8018aeb 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts -index 398d59c..c96cdae 100755 +index 398d59cf1184aaf735d01c2f74cecdeee5fa58c9..c96cdae27fb15055c4a6ec55d1ee45644768c392 100755 --- a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts +++ b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts @@ -12,14 +12,18 @@ @@ -158975,7 +158975,7 @@ index 398d59c..c96cdae 100755 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts -index 6bef9ae..67bd0d9 100644 +index 6bef9ae5c52c76c1daede15f67404cb66c7fd6da..67bd0d9bdaa2ff767d284010a69ecfe3f2aa1fd1 100644 --- a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts +++ b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts @@ -12,14 +12,18 @@ @@ -159020,7 +159020,7 @@ index 6bef9ae..67bd0d9 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/mz61581-overlay.dts b/arch/arm/boot/dts/overlays/mz61581-overlay.dts -index 9242a6e..2c29aae 100644 +index 9242a6e9a48c4f95dccc60c3d39550cae1363459..2c29aaed44c5959d7f0df2a3baf2af052b24b6b4 100644 --- a/arch/arm/boot/dts/overlays/mz61581-overlay.dts +++ b/arch/arm/boot/dts/overlays/mz61581-overlay.dts @@ -13,18 +13,24 @@ @@ -159065,7 +159065,7 @@ index 9242a6e..2c29aae 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/piscreen-overlay.dts b/arch/arm/boot/dts/overlays/piscreen-overlay.dts -index ba4ad33..40a1f29 100644 +index ba4ad33fe00163e5515d23afa3dd77ff448e3c8e..40a1f295346e39130a9d5a97844163c434b19e82 100644 --- a/arch/arm/boot/dts/overlays/piscreen-overlay.dts +++ b/arch/arm/boot/dts/overlays/piscreen-overlay.dts @@ -13,18 +13,24 @@ @@ -159110,7 +159110,7 @@ index ba4ad33..40a1f29 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts -index 7c018e0..9c0bed8 100644 +index 7c018e081acbb2a7c157e3305a955be165ff6105..9c0bed893057b9129c8f16b0b695b85b1f634597 100644 --- a/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts +++ b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts @@ -13,18 +13,24 @@ @@ -159155,7 +159155,7 @@ index 7c018e0..9c0bed8 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts -index 48920e9..5c07526 100644 +index 48920e92365661cbb956911b8af1d6992ea801db..5c0752655c70692e1c63f2f662e5b541c4be3617 100644 --- a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts +++ b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts @@ -13,14 +13,17 @@ @@ -159200,7 +159200,7 @@ index 48920e9..5c07526 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts -index d506eae..ed2afc2 100644 +index d506eae7d141410f74a6c1339d811493b73d64ed..ed2afc2f7fd6528f4e6d75bb2d534307ed020720 100644 --- a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts +++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts @@ -13,18 +13,24 @@ @@ -159254,7 +159254,7 @@ index d506eae..ed2afc2 100644 __overlay__ { backlight { diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts -index ccb296e..d7e72ee 100644 +index ccb296e023fa7f7c87660ffc1b460acf55f8adff..d7e72eef594e08b309ffbaa04f43c68909c08f36 100644 --- a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts @@ -13,18 +13,24 @@ @@ -159299,7 +159299,7 @@ index ccb296e..d7e72ee 100644 __overlay__ { /* needed to avoid dtc warning */ diff --git a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts -index f7102c8..33c0651 100644 +index f7102c878b13340a1b142f563462fb7027922159..33c0651eac9b8b664a3001cb3ffff1acd184c96d 100644 --- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts +++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts @@ -30,18 +30,24 @@ @@ -159371,10 +159371,10 @@ index f7102c8..33c0651 100644 __overlay__ { keypad: keypad { -From 19da6ff34954c7a0c2aecef0451463522ea24ca1 Mon Sep 17 00:00:00 2001 +From b020007c02f0ea368524920b018d49f96b92da69 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 15 Mar 2016 16:41:37 +0000 -Subject: [PATCH 184/251] BCM270X_DT: Build and document the wittypi overlay +Subject: [PATCH 184/398] BCM270X_DT: Build and document the wittypi overlay Signed-off-by: Phil Elwell --- @@ -159384,7 +159384,7 @@ Signed-off-by: Phil Elwell 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index d81fa09..4f3ca9c 100644 +index d81fa0910f0efe00692d2db5bd7e8940dce904ec..4f3ca9c6419983553d613c90c98425788eecb4b5 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -74,6 +74,7 @@ dtbo-$(RPI_DT_OVERLAYS) += vc4-kms-v3d.dtbo @@ -159396,7 +159396,7 @@ index d81fa09..4f3ca9c 100644 targets += dtbs dtbs_install targets += $(dtbo-y) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 6fa5b80..d939739 100644 +index 6fa5b80419a16da426ade774fab812ad9ab4a158..d9397391a7e14432bc37c26b13daa86d5c7436b5 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -920,6 +920,14 @@ Params: gpiopin GPIO for I/O (default "4") @@ -159415,7 +159415,7 @@ index 6fa5b80..d939739 100644 =============== diff --git a/arch/arm/boot/dts/overlays/wittypi-overlay.dts b/arch/arm/boot/dts/overlays/wittypi-overlay.dts -index be5987d..8498134 100644 +index be5987db5d27560da9b5eadacd92457dada7092c..8498134fdbb3912e9ce18282b53084d871a82370 100644 --- a/arch/arm/boot/dts/overlays/wittypi-overlay.dts +++ b/arch/arm/boot/dts/overlays/wittypi-overlay.dts @@ -37,7 +37,7 @@ @@ -159428,10 +159428,10 @@ index be5987d..8498134 100644 }; -From e45f33c187edcda0e4affe6930068deadebf8b6c Mon Sep 17 00:00:00 2001 +From a33647c8ed2e36a80a9811a7f670a808bfbce01e Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 15 Mar 2016 21:13:39 +0100 -Subject: [PATCH 185/251] scripts/dtc: Fix UMR causing corrupt dtbo overlay +Subject: [PATCH 185/398] scripts/dtc: Fix UMR causing corrupt dtbo overlay files struct fixup_entry is allocated from the heap but it's member @@ -159446,7 +159446,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 1 insertion(+) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index 540a3ea..2b3b3a7 100644 +index 540a3ea1f073d385c629b25dfcbe5f7e67c3d8a5..2b3b3a7aa70261a8206ba102bccea20d96c7fbfb 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -523,6 +523,7 @@ static void fixup_phandle_references(struct check *c, struct node *dt, @@ -159458,10 +159458,10 @@ index 540a3ea..2b3b3a7 100644 /* append it to the local fixups */ fep = &dt->local_fixups; -From e45af7e57db63c4bd5d0ad7fe400cfdd36df42d4 Mon Sep 17 00:00:00 2001 +From a5606457daa7f443db415d043cd03dba416cd49b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 16 Mar 2016 08:35:06 +0000 -Subject: [PATCH 186/251] BCM270X_DT: Add dtparam for uart1 +Subject: [PATCH 186/398] BCM270X_DT: Add dtparam for uart1 Signed-off-by: Phil Elwell --- @@ -159474,7 +159474,7 @@ Signed-off-by: Phil Elwell 6 files changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -index 00ea1b2..0e9a22d 100644 +index 00ea1b2edc600101f7257f537bb869f5476a14bd..0e9a22d147dd1ace4a7075c431ca13812716a00a 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -120,6 +120,7 @@ @@ -159486,7 +159486,7 @@ index 00ea1b2..0e9a22d 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts -index 2f8a718..a60342c 100644 +index 2f8a718c940fc43036e06620a95470b6f3b0aadf..a60342c3127cda9b426ec70e08007954af7d05d5 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -114,6 +114,7 @@ @@ -159498,7 +159498,7 @@ index 2f8a718..a60342c 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 954896e..cd0e1ac 100755 +index 954896e9b8f4df45c66ffdc3d1b601647cf5afca..cd0e1acc22f8ded801f29d331570828e5582247b 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -89,6 +89,7 @@ @@ -159510,7 +159510,7 @@ index 954896e..cd0e1ac 100755 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 66523d6..9176d57 100644 +index 66523d6f48ed1247219883f0096b1d5c19bd5023..9176d57fe40eaac7b123e8d0249fe93e5b73f755 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -120,6 +120,7 @@ @@ -159522,7 +159522,7 @@ index 66523d6..9176d57 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 1ce4ea2..d2d39c6 100644 +index 1ce4ea2a0871842bc8f83f0be9077761b127fe55..d2d39c68bd5ddadf8077670e84868abd4a3d82f8 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -171,6 +171,7 @@ @@ -159534,7 +159534,7 @@ index 1ce4ea2..d2d39c6 100644 spi = <&spi0>,"status"; i2c0 = <&i2c0>,"status"; diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d939739..4ce7921 100644 +index d9397391a7e14432bc37c26b13daa86d5c7436b5..4ce792171a3154f48f599621bcb0a154a95d5787 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -124,6 +124,9 @@ Params: @@ -159548,17 +159548,17 @@ index d939739..4ce7921 100644 (default "off") -From 3f7271f5e6747663f2db11f01721ee60961e0178 Mon Sep 17 00:00:00 2001 +From bbd0852e62c0f7173e9e5f159167b8ffa8730597 Mon Sep 17 00:00:00 2001 From: Przemek Rudy Date: Fri, 11 Mar 2016 22:41:26 +0100 -Subject: [PATCH 187/251] dwc-overlay: Use label so overrides can apply. +Subject: [PATCH 187/398] dwc-overlay: Use label so overrides can apply. --- arch/arm/boot/dts/overlays/dwc2-overlay.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/overlays/dwc2-overlay.dts b/arch/arm/boot/dts/overlays/dwc2-overlay.dts -index 90c9811..527abc9 100644 +index 90c981143fc7a55ae1cc6462c959e21d8cb7365e..527abc9f0ddf71f4dc7d58336d87684c931cc2f3 100644 --- a/arch/arm/boot/dts/overlays/dwc2-overlay.dts +++ b/arch/arm/boot/dts/overlays/dwc2-overlay.dts @@ -8,7 +8,7 @@ @@ -159585,10 +159585,10 @@ index 90c9811..527abc9 100644 }; }; -From 5b7b03b9220d45e9fa99c2f9c73a08792cc4684b Mon Sep 17 00:00:00 2001 +From 9eeb0ac836f72258cd23796591d4b2294f772a5e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 22 Jan 2016 13:06:39 -0800 -Subject: [PATCH 188/251] drm/vc4: Add a debugfs node for tracking execution +Subject: [PATCH 188/398] drm/vc4: Add a debugfs node for tracking execution state. Signed-off-by: Eric Anholt @@ -159599,7 +159599,7 @@ Signed-off-by: Eric Anholt 3 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c -index d76ad10..a99aa86 100644 +index d76ad10b07fda3bb674f45c2151e621c60633364..a99aa8676af774977778edfa2604b6b9df31a4dc 100644 --- a/drivers/gpu/drm/vc4/vc4_debugfs.c +++ b/drivers/gpu/drm/vc4/vc4_debugfs.c @@ -17,6 +17,7 @@ @@ -159611,7 +159611,7 @@ index d76ad10..a99aa86 100644 {"hvs_regs", vc4_hvs_debugfs_regs, 0}, {"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0}, diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index ed93fa7..aa0d00e 100644 +index ed93fa78a32df3c1c98b5c48fa193934de77dda5..aa0d00e6f6c8147eabbe165f0dbdd5e854086bd4 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -403,6 +403,7 @@ void vc4_job_handle_completed(struct vc4_dev *vc4); @@ -159623,7 +159623,7 @@ index ed93fa7..aa0d00e 100644 /* vc4_hdmi.c */ extern struct platform_driver vc4_hdmi_driver; diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 39f29e7..1243f4e 100644 +index 39f29e7593342d9555dd51cbc2790a56abe06179..1243f4ecee6ea5e13b23b969655f8dcd68fa54c1 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -31,6 +31,20 @@ @@ -159648,10 +159648,10 @@ index 39f29e7..1243f4e 100644 vc4_queue_hangcheck(struct drm_device *dev) { -From 04fb589070fd36693251a40ceb61743bb3a0c2c6 Mon Sep 17 00:00:00 2001 +From 0c1d2c74514556abb88e3a9b1c746f9857a78b0f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:03:33 -0800 -Subject: [PATCH 189/251] drm/vc4: Include vc4_drm.h in uapi in downstream +Subject: [PATCH 189/398] drm/vc4: Include vc4_drm.h in uapi in downstream build. Signed-off-by: Eric Anholt @@ -159660,7 +159660,7 @@ Signed-off-by: Eric Anholt 1 file changed, 1 insertion(+) diff --git a/include/uapi/drm/Kbuild b/include/uapi/drm/Kbuild -index 38d4370..23381b5 100644 +index 38d437096c358c884a403e4f3f5be5fb86f21d3b..23381b5f571cf34fd2485f0bea87549cd7a90233 100644 --- a/include/uapi/drm/Kbuild +++ b/include/uapi/drm/Kbuild @@ -14,6 +14,7 @@ header-y += radeon_drm.h @@ -159672,10 +159672,10 @@ index 38d4370..23381b5 100644 header-y += vmwgfx_drm.h header-y += msm_drm.h -From 3472309b991f5f8c75a655d2f077a1eb632af3cf Mon Sep 17 00:00:00 2001 +From 5123e18dca1985a89ee52b87c6df822f8d326494 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:05:00 -0800 -Subject: [PATCH 190/251] drm/vc4: Validate that WAIT_BO padding is cleared. +Subject: [PATCH 190/398] drm/vc4: Validate that WAIT_BO padding is cleared. This is ABI future-proofing if we ever want to extend the pad to mean something. @@ -159686,7 +159686,7 @@ Signed-off-by: Eric Anholt 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 1243f4e..849d374 100644 +index 1243f4ecee6ea5e13b23b969655f8dcd68fa54c1..849d3749268767942c0e7ad69d00cd7a6a307ad6 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -761,6 +761,9 @@ vc4_wait_bo_ioctl(struct drm_device *dev, void *data, @@ -159700,10 +159700,10 @@ index 1243f4e..849d374 100644 if (!gem_obj) { DRM_ERROR("Failed to look up GEM BO %d\n", args->handle); -From fc63883845d0d69d746b00a54d8cf2aaf2db30a5 Mon Sep 17 00:00:00 2001 +From c7bf07a6bcf451b2924c3f549675aa78d94f888a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:52:41 -0800 -Subject: [PATCH 191/251] drm/vc4: Fix the clear color for the first tile +Subject: [PATCH 191/398] drm/vc4: Fix the clear color for the first tile rendered. Apparently in hardware (as opposed to simulation), the clear colors @@ -159716,7 +159716,7 @@ Signed-off-by: Eric Anholt 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index 8a2a312..dea97f4 100644 +index 8a2a312e2c1bb618ea414ed3f0dd87e82ed7e09a..dea97f45e5aff4fa3a06f41980b169953f75f4f6 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -321,15 +321,6 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec, @@ -159752,10 +159752,10 @@ index 8a2a312..dea97f4 100644 for (x = min_x_tile; x <= max_x_tile; x++) { bool first = (x == min_x_tile && y == min_y_tile); -From 6128659e9deeb8f7b15a0e8bb9e4e974afe39064 Mon Sep 17 00:00:00 2001 +From b0cc8c2da19226a31dad9028cd00ee86ca5a50b4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 14:13:12 -0800 -Subject: [PATCH 192/251] drm/vc4: Return an ERR_PTR from BO creation instead +Subject: [PATCH 192/398] drm/vc4: Return an ERR_PTR from BO creation instead of NULL. Fixes igt vc4_create_bo/create-bo-0 by returning -EINVAL from the @@ -159771,7 +159771,7 @@ Signed-off-by: Eric Anholt 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c -index 6247ff8..8477579 100644 +index 6247ff88e6156fc98fb97b8bbcc9ac377a1f8707..847757914c4eb792512e8019222b04d83876600d 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -213,10 +213,10 @@ struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size, @@ -159841,7 +159841,7 @@ index 6247ff8..8477579 100644 ret = copy_from_user(bo->base.vaddr, (void __user *)(uintptr_t)args->data, diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index 849d374..f8c003a 100644 +index 849d3749268767942c0e7ad69d00cd7a6a307ad6..f8c003aee6e8ba379e0696f9cba80cdfa7357294 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -593,9 +593,9 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) @@ -159857,7 +159857,7 @@ index 849d374..f8c003a 100644 } exec->exec_bo = &bo->base; diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c -index b68060e..78a2135 100644 +index b68060e758dbd26e1dccd17beeba4c09bbb1441e..78a21357fb2de9fe88d50a26f20f0634d97dbd88 100644 --- a/drivers/gpu/drm/vc4/vc4_irq.c +++ b/drivers/gpu/drm/vc4/vc4_irq.c @@ -57,7 +57,7 @@ vc4_overflow_mem_work(struct work_struct *work) @@ -159870,7 +159870,7 @@ index b68060e..78a2135 100644 return; } diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c -index dea97f4..0f12418 100644 +index dea97f45e5aff4fa3a06f41980b169953f75f4f6..0f12418725e552f7378dada1d5af1244f52599ad 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -316,8 +316,8 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec, @@ -159885,7 +159885,7 @@ index dea97f4..0f12418 100644 &exec->unref_list); diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index 0fb5b99..8396960 100644 +index 0fb5b994b9ddb1e6fde3d8e99d727d3e7afc4d22..839696007e97528070a8c2c3676d4f30f3dd6d80 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -401,8 +401,8 @@ validate_tile_binning_config(VALIDATE_ARGS) @@ -159900,10 +159900,10 @@ index 0fb5b99..8396960 100644 /* tile alloc address. */ -From e62f39b87fb3577d0c154ee50459a8d0b83865ca Mon Sep 17 00:00:00 2001 +From f903d674e01e462876bb1fa12d6554e4103cabdf Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 14:32:41 -0800 -Subject: [PATCH 193/251] drm/vc4: Fix -ERESTARTSYS error return from BO waits. +Subject: [PATCH 193/398] drm/vc4: Fix -ERESTARTSYS error return from BO waits. This caused the wait ioctls to claim that waiting had completed when we actually got interrupted by a signal before it was done. Fixes @@ -159916,7 +159916,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index f8c003a..dc3044d 100644 +index f8c003aee6e8ba379e0696f9cba80cdfa7357294..dc3044d8d71f7e5be2243ffdcf5d32740dbd1111 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -352,12 +352,10 @@ vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, uint64_t timeout_ns, @@ -159935,10 +159935,10 @@ index f8c003a..dc3044d 100644 static void -From 7942d03413ee330d2fb041dc62dabc8ce738cc0c Mon Sep 17 00:00:00 2001 +From 2d635ab8e6b5bcd93c79ce7d2c33773516af334b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 14:33:50 -0800 -Subject: [PATCH 194/251] drm/vc4: Drop error message on seqno wait timeouts. +Subject: [PATCH 194/398] drm/vc4: Drop error message on seqno wait timeouts. These ioctls end up getting exposed to userspace, and having normal user requests print DRM errors is obviously wrong. The message was @@ -159951,7 +159951,7 @@ Signed-off-by: Eric Anholt 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c -index dc3044d..a6fa63f 100644 +index dc3044d8d71f7e5be2243ffdcf5d32740dbd1111..a6fa63f0e8a1825de063960fad40af230e77afaa 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -352,9 +352,6 @@ vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, uint64_t timeout_ns, @@ -159965,10 +159965,10 @@ index dc3044d..a6fa63f 100644 } -From 9ceac017a764704d9919a494590e8fea0e458adc Mon Sep 17 00:00:00 2001 +From a8ad198cac25a5790dd2a0447938134fbaf6d7e0 Mon Sep 17 00:00:00 2001 From: campag Date: Wed, 24 Feb 2016 16:45:42 +0000 -Subject: [PATCH 195/251] BCM270X_DT: Add 1-bit SDIO using minimal pins... +Subject: [PATCH 195/398] BCM270X_DT: Add 1-bit SDIO using minimal pins... ... for that mode: GPIOs 22-25. --- @@ -159978,7 +159978,7 @@ Subject: [PATCH 195/251] BCM270X_DT: Add 1-bit SDIO using minimal pins... create mode 100644 arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 4ce7921..7118510 100644 +index 4ce792171a3154f48f599621bcb0a154a95d5787..711851072615f7ba690e73d97c1f4ab6dcb304a8 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -709,6 +709,27 @@ Params: overclock_50 SD Clock (in MHz) to use when the MMC framework @@ -160011,7 +160011,7 @@ index 4ce7921..7118510 100644 Load: dtoverlay=sdtweak,= diff --git a/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts new file mode 100644 -index 0000000..46d4538 +index 0000000000000000000000000000000000000000..46d453859b31f5c700a8a2e39a2c209330bc108f --- /dev/null +++ b/arch/arm/boot/dts/overlays/sdio-1bit-overlay.dts @@ -0,0 +1,36 @@ @@ -160052,10 +160052,10 @@ index 0000000..46d4538 + }; +}; -From 6dd9dc84456f9341739f6c6d2c7d5b1f08d5c8fe Mon Sep 17 00:00:00 2001 +From 11f11b3aa22fb9dc5811ef0c5aacc12168959b0b Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 196/251] brcm: adds support for BCM43341 wifi +Subject: [PATCH 196/398] brcm: adds support for BCM43341 wifi --- drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 5 +++++ @@ -160063,7 +160063,7 @@ Subject: [PATCH 196/251] brcm: adds support for BCM43341 wifi 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c -index 7e74ac3..818f756 100644 +index 7e74ac3ad81519491ac01460cd3b578e6fb3cc80..818f7562f6b42d6eb7c1c454179a0722bc6ab5a0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c @@ -613,6 +613,8 @@ static const struct sdiod_drive_str sdiod_drvstr_tab2_3v3[] = { @@ -160093,7 +160093,7 @@ index 7e74ac3..818f756 100644 { BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, BRCMF_FIRMWARE_NVRAM(BCM43362) }, { BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4339) }, diff --git a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h -index aa06ea2..f3ae83d 100644 +index aa06ea231db32eadae6bbe7c89fcb2825fabb228..f3ae83d648c7d5682afa0487e2c33ff0ff23b11d 100644 --- a/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h @@ -34,6 +34,7 @@ @@ -160105,10 +160105,10 @@ index aa06ea2..f3ae83d 100644 #define BRCM_CC_4335_CHIP_ID 0x4335 #define BRCM_CC_4339_CHIP_ID 0x4339 -From 0702cbfdf586a8c1b67d28cdfc84a0623c8b12f1 Mon Sep 17 00:00:00 2001 +From afec54ef1194ca1e54790330004c9748f9f52d1c Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Fri, 29 Jan 2016 12:00:37 +0100 -Subject: [PATCH 197/251] Add overlay and enable support for QCA7000 board +Subject: [PATCH 197/398] Add overlay and enable support for QCA7000 board This adds a device tree overlay for the QCA7000 which can be used when attaching an I2SE's PLC Stamp micro EVK to the Raspberry Pi. @@ -160131,7 +160131,7 @@ Signed-off-by: Michael Heimpold create mode 100644 arch/arm/boot/dts/overlays/qca7000-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 4f3ca9c..f4ae95a 100644 +index 4f3ca9c6419983553d613c90c98425788eecb4b5..f4ae95a171c259f8a8ee700f5524f20b766de70d 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -48,6 +48,7 @@ dtbo-$(RPI_DT_OVERLAYS) += pitft28-resistive.dtbo @@ -160143,7 +160143,7 @@ index 4f3ca9c..f4ae95a 100644 dtbo-$(RPI_DT_OVERLAYS) += rpi-backlight.dtbo dtbo-$(RPI_DT_OVERLAYS) += rpi-dac.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 7118510..2a354b3 100644 +index 711851072615f7ba690e73d97c1f4ab6dcb304a8..2a354b3713105963d5a00e1131a5bef8f3c85d69 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -625,6 +625,14 @@ Params: pin Output pin (default 18) - see table @@ -160163,7 +160163,7 @@ index 7118510..2a354b3 100644 Load: dtoverlay=raspidac3 diff --git a/arch/arm/boot/dts/overlays/qca7000-overlay.dts b/arch/arm/boot/dts/overlays/qca7000-overlay.dts new file mode 100644 -index 0000000..b4e6013 +index 0000000000000000000000000000000000000000..b4e601396c4955b9e5de3a639d9afd74d051e3fd --- /dev/null +++ b/arch/arm/boot/dts/overlays/qca7000-overlay.dts @@ -0,0 +1,52 @@ @@ -160220,7 +160220,7 @@ index 0000000..b4e6013 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 0fff5a3..b63632d 100644 +index 0fff5a3f29e3127e8f1edc3477722af2bd05eac4..b63632d685ddc790eab57b9e449806c3a8d64a9e 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -446,6 +446,7 @@ CONFIG_NETCONSOLE=m @@ -160232,7 +160232,7 @@ index 0fff5a3..b63632d 100644 CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 74149cf..e720c74 100644 +index 74149cfc43e32b6f7b8cbbeae726347469b5fb12..e720c74562ccabe41676b7ddd6aa8447c9505938 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -439,6 +439,7 @@ CONFIG_NETCONSOLE=m @@ -160244,10 +160244,10 @@ index 74149cf..e720c74 100644 CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m -From 5fbc1847fdefcf563be0c51ffc07de6666036ba6 Mon Sep 17 00:00:00 2001 +From 88eae7509291a65bc66c8e673d6c2ab5ea9ca742 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 13:28:24 +0000 -Subject: [PATCH 198/251] serial: Take care starting a hung-up tty's port +Subject: [PATCH 198/398] serial: Take care starting a hung-up tty's port tty_port_hangup sets a port's tty field to NULL (holding the port lock), but uart_tx_stopped, called from __uart_start (with the port lock), @@ -160262,7 +160262,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h -index 297d4fa..00ce6c6 100644 +index 297d4fa1cfe513d85340ae43c1217d47e9c7e881..00ce6c6970aa92e95507f0778ecbd602c13df88b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -397,7 +397,7 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port); @@ -160275,10 +160275,10 @@ index 297d4fa..00ce6c6 100644 return 0; } -From b8127d80609179210ae5ceea4929391991dbce9a Mon Sep 17 00:00:00 2001 +From c4bfac235fc44b4520449a0e980d454e66b8267e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Mar 2016 10:16:16 +0000 -Subject: [PATCH 199/251] pi3-miniuart-bt-overlay: Correct and clarify info +Subject: [PATCH 199/398] pi3-miniuart-bt-overlay: Correct and clarify info Signed-off-by: Phil Elwell --- @@ -160287,7 +160287,7 @@ Signed-off-by: Phil Elwell 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 2a354b3..b674394 100644 +index 2a354b3713105963d5a00e1131a5bef8f3c85d69..b6743947874849953a5c5877b1b4c7d60afbbd10 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -511,8 +511,10 @@ Name: pi3-miniuart-bt @@ -160304,7 +160304,7 @@ index 2a354b3..b674394 100644 Params: diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index f07afcb..38ed33b 100644 +index f07afcb225200a651a362653d0e0522392e6ab40..38ed33ba1f8dca4df27d5c74ffe7bd4d6b7a3982 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -5,8 +5,10 @@ @@ -160321,10 +160321,10 @@ index f07afcb..38ed33b 100644 If cmdline.txt uses the alias serial0 to refer to the user-accessable port then the firmware will replace with the appropriate port whether or not -From ee65eba2fa76dc0ca35f2c74ec655f89d9d33b13 Mon Sep 17 00:00:00 2001 +From 4fbdbd8620437e1f977ed227485bdf64694b343c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Mar 2016 10:41:56 +0000 -Subject: [PATCH 200/251] pwm overlays: Params must have in-overlay targets +Subject: [PATCH 200/398] pwm overlays: Params must have in-overlay targets --- arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts | 9 ++++++++- @@ -160332,7 +160332,7 @@ Subject: [PATCH 200/251] pwm overlays: Params must have in-overlay targets 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts -index 957e1a4..18e4e4f 100644 +index 957e1a4ec34724c7852086a5c44f493d9b75bfa6..18e4e4fa9465c87eb96c8d712a9967c4805c7176 100644 --- a/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts +++ b/arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts @@ -36,11 +36,18 @@ N.B.: @@ -160356,7 +160356,7 @@ index 957e1a4..18e4e4f 100644 }; }; diff --git a/arch/arm/boot/dts/overlays/pwm-overlay.dts b/arch/arm/boot/dts/overlays/pwm-overlay.dts -index ddd67ff..bf030a6 100644 +index ddd67ffcd8bb34b05ec61481a162a37d64b30680..bf030a6d1545448faf5e7992a0dc5c505522433e 100644 --- a/arch/arm/boot/dts/overlays/pwm-overlay.dts +++ b/arch/arm/boot/dts/overlays/pwm-overlay.dts @@ -34,9 +34,16 @@ N.B.: @@ -160378,10 +160378,10 @@ index ddd67ff..bf030a6 100644 }; }; -From 62279457d4e5c3a132a0c8fe60c0d9c51c3edd9d Mon Sep 17 00:00:00 2001 +From 6aa1245fd75b702650e229995f900e4e4579cbf5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 18 Mar 2016 13:06:29 +0000 -Subject: [PATCH 201/251] BCM270X_DT: Switch Compute Module to MMC +Subject: [PATCH 201/398] BCM270X_DT: Switch Compute Module to MMC Signed-off-by: Phil Elwell --- @@ -160389,7 +160389,7 @@ Signed-off-by: Phil Elwell 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi -index e09e499..90e330d 100644 +index e09e4993e8f06df83b72b1342d2d21de7fbc542a..90e330d1978da8624c042d52a38aa5d6d95d2377 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi @@ -8,9 +8,9 @@ @@ -160434,10 +160434,10 @@ index e09e499..90e330d 100644 }; }; -From 82ecf79397939c59b5b50cd683b823e1233568f7 Mon Sep 17 00:00:00 2001 +From 04bcbabe7c66c5bd736b15770c15b2180a40597a Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 18 Mar 2016 17:38:37 +0000 -Subject: [PATCH 202/251] dwc_otg: Don't free qh align buffers in atomic +Subject: [PATCH 202/398] dwc_otg: Don't free qh align buffers in atomic context --- @@ -160445,7 +160445,7 @@ Subject: [PATCH 202/251] dwc_otg: Don't free qh align buffers in atomic 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index acd0dd7..3b2a607 100644 +index acd0dd7906cccd0658baacf4e2622c447a52a049..3b2a60763b92fb2e9261a8ade3d4b33e3896cd62 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -56,6 +56,9 @@ void dwc_otg_hcd_qh_free(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) @@ -160481,10 +160481,10 @@ index acd0dd7..3b2a607 100644 } -From 6e02745d8e2fc480d3442e6adaf4547e100611b5 Mon Sep 17 00:00:00 2001 +From fecfa94b98661c0404ab2670ac180a846740b034 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 21 Mar 2016 15:38:38 +0000 -Subject: [PATCH 203/251] dwc_otg: Enable the hack for Split Interrupt +Subject: [PATCH 203/398] dwc_otg: Enable the hack for Split Interrupt transactions by default dwc_otg.fiq_fsm_mask=0xF has long been a suggestion for users with audio stutters or other USB bandwidth issues. @@ -160499,7 +160499,7 @@ Signed-off-by: popcornmix 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index 95edadf..cb060a7 100644 +index 95edadf088cf2aa5826d411c04ea85f3651ebc48..cb060a7179a3eec791506ed2779b553cad9841b0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -247,7 +247,7 @@ bool fiq_fsm_enable = true; @@ -160512,10 +160512,10 @@ index 95edadf..cb060a7 100644 /** * This function shows the Driver Version. -From 6a2fc8f71762aab14aee7311f8b7cd94aa316773 Mon Sep 17 00:00:00 2001 +From fb7a514ccaf4b5a41483d70c81390958a8036bc3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 19 Mar 2016 16:51:37 +0000 -Subject: [PATCH 204/251] BCM270X_DT: Remove explicit claiming of UART pins +Subject: [PATCH 204/398] BCM270X_DT: Remove explicit claiming of UART pins It is convenient to be able to map a different function to the UART pins (e.g. DPI for vga666) without having to disable the UART first. @@ -160528,7 +160528,7 @@ Signed-off-by: Phil Elwell 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index d2d39c6..adba682 100644 +index d2d39c68bd5ddadf8077670e84868abd4a3d82f8..adba6824ebb46e481b492ce59d3bfc34b6669c7f 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -57,9 +57,9 @@ @@ -160545,7 +160545,7 @@ index d2d39c6..adba682 100644 }; diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts -index 05403e2..68f6069 100644 +index 05403e2a98a5146c6e4d0d2c7ff2ee0241153273..68f6069dd24cbf6a2ed11365ac0717e36879abe3 100644 --- a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts @@ -28,13 +28,11 @@ @@ -160567,7 +160567,7 @@ index 05403e2..68f6069 100644 }; diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index 38ed33b..17d04cf 100644 +index 38ed33ba1f8dca4df27d5c74ffe7bd4d6b7a3982..17d04cf87195a6ff192e1ddbe4f92b1afa9e5ddb 100644 --- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts @@ -37,23 +37,24 @@ @@ -160608,10 +160608,10 @@ index 38ed33b..17d04cf 100644 __overlay__ { serial0 = "/soc/uart@7e201000"; -From 403390e94d98b9f7b6f41397b04b2f29900cdcb0 Mon Sep 17 00:00:00 2001 +From 6cc73c1e07cde068463381b7111874182169f16f Mon Sep 17 00:00:00 2001 From: Rodrigo Freire Date: Tue, 22 Mar 2016 12:40:33 -0300 -Subject: [PATCH 205/251] lirc_rpi: Lower IR reception error to debug +Subject: [PATCH 205/398] lirc_rpi: Lower IR reception error to debug Lowers a IR reception error condition message to KERNEL_DEBUG --- @@ -160619,7 +160619,7 @@ Lowers a IR reception error condition message to KERNEL_DEBUG 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c -index cd09c99..0624439 100644 +index cd09c9996b12c62f9f831261379b84f8389129ff..06244398e42b9a1501a48fb4693218e017e5a651 100644 --- a/drivers/staging/media/lirc/lirc_rpi.c +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -271,7 +271,7 @@ static irqreturn_t irq_handler(int i, void *blah, struct pt_regs *regs) @@ -160632,10 +160632,10 @@ index cd09c99..0624439 100644 signal, sense, tv.tv_sec, lasttv.tv_sec, tv.tv_usec, lasttv.tv_usec); -From 0fb8769fe60a8bba6f871ff6d91a04fb7950b67d Mon Sep 17 00:00:00 2001 +From 2ee87f3fd2b54f73d4f5c1150aedab069decc4f5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 14:16:25 +0000 -Subject: [PATCH 206/251] vchiq_arm: Access the dequeue_pending flag locked +Subject: [PATCH 206/398] vchiq_arm: Access the dequeue_pending flag locked Reading through this code looking for another problem (now found in userland) the use of dequeue_pending outside a lock didn't seem safe. @@ -160646,7 +160646,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c -index e11c0e0..71883e5 100644 +index e11c0e07471bc7ebba04e48d3efc746236ec2f4e..71883e55fd0cc81e3f7a724dcf499bfe6ddcc761 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -279,6 +279,7 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header, @@ -160693,10 +160693,10 @@ index e11c0e0..71883e5 100644 return add_completion(instance, reason, header, user_service, -From 797c1c2110ba155df9fbdb44a7c052f7beeb0a50 Mon Sep 17 00:00:00 2001 +From b49b8e5afca0b7468d46ee6f5d3698b61e8661dc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 15:57:14 +0000 -Subject: [PATCH 207/251] BCM270X_DT: Add pi3-act-led overlay +Subject: [PATCH 207/398] BCM270X_DT: Add pi3-act-led overlay Signed-off-by: Phil Elwell --- @@ -160707,7 +160707,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index f4ae95a..4c3db73 100644 +index f4ae95a171c259f8a8ee700f5524f20b766de70d..4c3db7347f94552bed44f866eab2502180f31b54 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -39,6 +39,7 @@ dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo @@ -160719,7 +160719,7 @@ index f4ae95a..4c3db73 100644 dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index b674394..9b49868 100644 +index b6743947874849953a5c5877b1b4c7d60afbbd10..9b498689badb0165bbcabdeca8822a18700c1aef 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -136,12 +136,14 @@ Params: @@ -160763,7 +160763,7 @@ index b674394..9b49868 100644 N.B. To disable the systemd service that initialises the modem so it diff --git a/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts b/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts new file mode 100644 -index 0000000..14a59dc +index 0000000000000000000000000000000000000000..14a59dcf13ca64eb0bdbd34d70690a11abe83cfa --- /dev/null +++ b/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts @@ -0,0 +1,27 @@ @@ -160795,10 +160795,10 @@ index 0000000..14a59dc + }; +}; -From 6de376456d86ba0211a2e8c10cf50fda9f3b6e20 Mon Sep 17 00:00:00 2001 +From 58b7519b0b9d6d9ee3d5b3b5044aa2d81a74400d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 20:53:47 +0000 -Subject: [PATCH 208/251] vchiq_arm: Service callbacks must not fail +Subject: [PATCH 208/398] vchiq_arm: Service callbacks must not fail Service callbacks are not allowed to return an error. The internal callback that delivers events and messages to user tasks does not enqueue them if @@ -160811,7 +160811,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 71883e5..a5cc385 100644 +index 71883e55fd0cc81e3f7a724dcf499bfe6ddcc761..a5cc385cc25ada02fc45af5d5ca68cd6d2687850 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -224,7 +224,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -160824,10 +160824,10 @@ index 71883e5..a5cc385 100644 DEBUG_TRACE(SERVICE_CALLBACK_LINE); } -From 4793b34f7a3f71b1acfcd769b8d25fdcbb01b2cd Mon Sep 17 00:00:00 2001 +From fb495c03344b61a7ad3f4d99aefd0495049bf6db Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Thu, 17 Mar 2016 18:16:16 +0000 -Subject: [PATCH 209/251] Add configs and overlay for PCA9548 I2C mux +Subject: [PATCH 209/398] Add configs and overlay for PCA9548 I2C mux Adds kernel configs for I2C muxes and a dt overlay for PCA9548 that adds the 8 muxed I2C buses and mux device. @@ -160841,7 +160841,7 @@ that adds the 8 muxed I2C buses and mux device. create mode 100644 arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 4c3db73..7c4fc30 100644 +index 4c3db7347f94552bed44f866eab2502180f31b54..7c4fc306116299df98e3006bafdaf3e096802b69 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -29,6 +29,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo @@ -160853,7 +160853,7 @@ index 4c3db73..7c4fc30 100644 dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 9b49868..a9b1ff5 100644 +index 9b498689badb0165bbcabdeca8822a18700c1aef..a9b1ff52fc3f213e68afc3d07a737af1e7352a40 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -360,6 +360,12 @@ Params: i2c_gpio_sda GPIO used for I2C data (default "23") @@ -160871,7 +160871,7 @@ index 9b49868..a9b1ff5 100644 Load: dtoverlay=i2c-rtc,= diff --git a/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts new file mode 100644 -index 0000000..1729fd6 +index 0000000000000000000000000000000000000000..1729fd6f3c29b3c85996274ad92006453c6e4ce9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts @@ -0,0 +1,67 @@ @@ -160943,7 +160943,7 @@ index 0000000..1729fd6 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index b63632d..2c8e4b7 100644 +index b63632d685ddc790eab57b9e449806c3a8d64a9e..2c8e4b742e744965ad638e0a123d749a4ea8be16 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -600,6 +600,8 @@ CONFIG_I2C=y @@ -160956,7 +160956,7 @@ index b63632d..2c8e4b7 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index e720c74..f6e2d84 100644 +index e720c74562ccabe41676b7ddd6aa8447c9505938..f6e2d84c4200078ab49c0224c5b1f90a0a13b285 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -593,6 +593,8 @@ CONFIG_I2C=y @@ -160969,10 +160969,10 @@ index e720c74..f6e2d84 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From 77700bbcd5dc6285892ea67acba46e45c3341b66 Mon Sep 17 00:00:00 2001 +From 431e0bc06eee9bcc68647b789e638eb1e2909b61 Mon Sep 17 00:00:00 2001 From: Nicolas Boullis Date: Wed, 23 Mar 2016 23:40:15 +0100 -Subject: [PATCH 210/251] BCM270X_DT: Add DS1339 to i2c-rtc overlay +Subject: [PATCH 210/398] BCM270X_DT: Add DS1339 to i2c-rtc overlay --- arch/arm/boot/dts/overlays/README | 4 ++++ @@ -160980,7 +160980,7 @@ Subject: [PATCH 210/251] BCM270X_DT: Add DS1339 to i2c-rtc overlay 2 files changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index a9b1ff5..e88e7c8 100644 +index a9b1ff52fc3f213e68afc3d07a737af1e7352a40..e88e7c8c56f69c8926db6354afdea5176a6b7856 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -371,6 +371,8 @@ Info: Adds support for a number of I2C Real Time Clock devices @@ -161002,7 +161002,7 @@ index a9b1ff5..e88e7c8 100644 Name: i2c0-bcm2708 Info: Enable the i2c_bcm2708 driver for the i2c0 bus diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -index fed4bd8..eecec16 100644 +index fed4bd867620e0c0958b92b7c7729591d3ea12ec..eecec16461c696d3c6885bc7b346b2f5f1f58670 100644 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts @@ -17,6 +17,12 @@ @@ -161032,10 +161032,10 @@ index fed4bd8..eecec16 100644 }; }; -From c17b3228544635d56826292c0989d2e944917148 Mon Sep 17 00:00:00 2001 +From 49dd6979754dda01fd6d9a030bb72770132e7ea9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 29 Mar 2016 15:32:30 +0100 -Subject: [PATCH 211/251] copy_from_user: CPU_SW_DOMAIN_PAN compatibility +Subject: [PATCH 211/398] copy_from_user: CPU_SW_DOMAIN_PAN compatibility The downstream copy_from_user acceleration must also play nice with CONFIG_CPU_SW_DOMAIN_PAN. @@ -161048,7 +161048,7 @@ Signed-off-by: Phil Elwell 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c -index c29df92..6681df5 100644 +index c29df924b50c2e7b071257aa2d842169252d9bd9..6681df593cc3f8d8fe3fd814962b2e67f9755cbc 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c @@ -186,6 +186,7 @@ out: @@ -161088,10 +161088,10 @@ index c29df92..6681df5 100644 static unsigned long noinline -From 6abb732a5e79d2ab8384b6b70fd17e5347f59d0e Mon Sep 17 00:00:00 2001 +From b255bbdc1208af444a49f19575a2dee9a2822e00 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 16:33:09 +0100 -Subject: [PATCH 212/251] bcm2835-sdhost: Adjust to core clock changes +Subject: [PATCH 212/398] bcm2835-sdhost: Adjust to core clock changes The SDHOST block uses the core clock, so previously it has been necessary to prevent the core clock from changing in order to maintain @@ -161112,7 +161112,7 @@ Signed-off-by: Phil Elwell 2 files changed, 119 insertions(+), 22 deletions(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index d509d10..98a7fa5 100644 +index d509d10cd919d4ba941ec0cb12a3a17bb0b9b818..98a7fa537bba72814dd84e8a8330d260a8a266ff 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -36,6 +36,7 @@ config MMC_BCM2835_PIO_DMA_BARRIER @@ -161124,7 +161124,7 @@ index d509d10..98a7fa5 100644 This selects the SDHost controller on BCM2835/6. diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index f43aae0..1deecef 100644 +index f43aae07bb9260a94542a9653a95afacb38cc263..1deecef36ccea805440c84542642de03fa87c0a0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -50,6 +50,10 @@ @@ -161432,10 +161432,10 @@ index f43aae0..1deecef 100644 bcm2835_sdhost_set_power(host, false); -From 788985576c5b7f413466d4ea5e1b9c471ff2b7fc Mon Sep 17 00:00:00 2001 +From 932b9bbd724124ebc8c5bc5ebf81f4f6df1f85d2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 17:07:15 +0100 -Subject: [PATCH 213/251] BCM270X_DT: Document hazards of sdhost overlay +Subject: [PATCH 213/398] BCM270X_DT: Document hazards of sdhost overlay Signed-off-by: Phil Elwell --- @@ -161443,7 +161443,7 @@ Signed-off-by: Phil Elwell 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index e88e7c8..337be4a 100644 +index e88e7c8c56f69c8926db6354afdea5176a6b7856..337be4a7076ed74c506605771c3e020c902e4166 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -712,7 +712,11 @@ Params: @@ -161469,10 +161469,10 @@ index e88e7c8..337be4a 100644 Params: overclock_50 Clock (in MHz) to use when the MMC framework requests 50MHz -From 58fb42a1ecf4bec15d3236183955f4b54f199e75 Mon Sep 17 00:00:00 2001 +From 75590c5e572edb6aac3d31a8ce93f57b34823df3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 17:23:15 +0100 -Subject: [PATCH 214/251] cpufreq: Temporarily ignore io_is_busy=1 +Subject: [PATCH 214/398] cpufreq: Temporarily ignore io_is_busy=1 To speed testing of the new sdhost driver that adapts to changes in core_freq, hack the on-demand governor to treat io_is_busy=1 as @@ -161485,7 +161485,7 @@ Signed-off-by: Phil Elwell 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c -index 03ac6ce..99a9610 100644 +index 03ac6ce540424a189e2946a1dd98d2046cbc3622..99a9610d467e4f5ff128f96780677d57997280ce 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -307,7 +307,12 @@ static ssize_t store_io_is_busy(struct dbs_data *dbs_data, const char *buf, @@ -161503,10 +161503,10 @@ index 03ac6ce..99a9610 100644 /* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu(j) { -From 8bf41d1b2f41d6af2c196497168d3cc8f97a0071 Mon Sep 17 00:00:00 2001 +From d9d886c8f45caa239ca4aed77d18c69149b88340 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 20:18:38 +0100 -Subject: [PATCH 215/251] Revert "cpufreq: Temporarily ignore io_is_busy=1" +Subject: [PATCH 215/398] Revert "cpufreq: Temporarily ignore io_is_busy=1" This reverts commit 2af1218a8a0220fec526f64d03977b8451afb4c8. --- @@ -161514,7 +161514,7 @@ This reverts commit 2af1218a8a0220fec526f64d03977b8451afb4c8. 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c -index 99a9610..03ac6ce 100644 +index 99a9610d467e4f5ff128f96780677d57997280ce..03ac6ce540424a189e2946a1dd98d2046cbc3622 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -307,12 +307,7 @@ static ssize_t store_io_is_busy(struct dbs_data *dbs_data, const char *buf, @@ -161532,10 +161532,10 @@ index 99a9610..03ac6ce 100644 /* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu(j) { -From f9634b17e0d05988abbe329efd4b9eee59aadb0c Mon Sep 17 00:00:00 2001 +From 71bfe9deb6e69465029c89c799050e3f26b9b172 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 7 Jan 2016 15:50:22 +0100 -Subject: [PATCH 216/251] net, sched: add skb_at_tc_ingress helper +Subject: [PATCH 216/398] net, sched: add skb_at_tc_ingress helper Add a skb_at_tc_ingress() as this will be needed elsewhere as well and can hide the ugly ifdef. @@ -161549,10 +161549,10 @@ Signed-off-by: David S. Miller 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h -index b2a8e63..636a362 100644 +index 86df0835f6b58517c671e200779d9045200cb5d3..e5bba897d20649223bf393b94a66677177e0f554 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h -@@ -407,6 +407,15 @@ bool tcf_destroy(struct tcf_proto *tp, bool force); +@@ -408,6 +408,15 @@ bool tcf_destroy(struct tcf_proto *tp, bool force); void tcf_destroy_chain(struct tcf_proto __rcu **fl); int skb_do_redirect(struct sk_buff *); @@ -161569,7 +161569,7 @@ index b2a8e63..636a362 100644 static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i) { diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c -index 5faaa54..b3c8bb4 100644 +index 5faaa5425f7b72293fdd80e1b27405fcf479e207..b3c8bb4aeef5ce82d0675769dd61d8152fd16c5e 100644 --- a/net/sched/cls_bpf.c +++ b/net/sched/cls_bpf.c @@ -79,12 +79,8 @@ static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp, @@ -161587,88 +161587,10 @@ index 5faaa54..b3c8bb4 100644 if (unlikely(!skb_mac_header_was_set(skb))) -From de42773e4545e48e35472cdf01f1bcb7af1f27cf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Linus=20L=C3=BCssing?= -Date: Wed, 24 Feb 2016 04:21:42 +0100 -Subject: [PATCH 217/251] net: fix bridge multicast packet checksum validation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We need to update the skb->csum after pulling the skb, otherwise -an unnecessary checksum (re)computation can ocure for IGMP/MLD packets -in the bridge code. Additionally this fixes the following splats for -network devices / bridge ports with support for and enabled RX checksum -offloading: - -[...] -[ 43.986968] eth0: hw csum failure -[ 43.990344] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.0 #2 -[ 43.996193] Hardware name: BCM2709 -[ 43.999647] [<800204e0>] (unwind_backtrace) from [<8001cf14>] (show_stack+0x10/0x14) -[ 44.007432] [<8001cf14>] (show_stack) from [<801ab614>] (dump_stack+0x80/0x90) -[ 44.014695] [<801ab614>] (dump_stack) from [<802e4548>] (__skb_checksum_complete+0x6c/0xac) -[ 44.023090] [<802e4548>] (__skb_checksum_complete) from [<803a055c>] (ipv6_mc_validate_checksum+0x104/0x178) -[ 44.032959] [<803a055c>] (ipv6_mc_validate_checksum) from [<802e111c>] (skb_checksum_trimmed+0x130/0x188) -[ 44.042565] [<802e111c>] (skb_checksum_trimmed) from [<803a06e8>] (ipv6_mc_check_mld+0x118/0x338) -[ 44.051501] [<803a06e8>] (ipv6_mc_check_mld) from [<803b2c98>] (br_multicast_rcv+0x5dc/0xd00) -[ 44.060077] [<803b2c98>] (br_multicast_rcv) from [<803aa510>] (br_handle_frame_finish+0xac/0x51c) -[...] - -Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code") -Reported-by: Álvaro Fernández Rojas -Signed-off-by: Linus Lüssing -Signed-off-by: David S. Miller ---- - net/core/skbuff.c | 22 ++++++++++++++++++++-- - 1 file changed, 20 insertions(+), 2 deletions(-) - -diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 5bf88f5..8616d11 100644 ---- a/net/core/skbuff.c -+++ b/net/core/skbuff.c -@@ -2948,6 +2948,24 @@ int skb_append_pagefrags(struct sk_buff *skb, struct page *page, - EXPORT_SYMBOL_GPL(skb_append_pagefrags); - - /** -+ * skb_push_rcsum - push skb and update receive checksum -+ * @skb: buffer to update -+ * @len: length of data pulled -+ * -+ * This function performs an skb_push on the packet and updates -+ * the CHECKSUM_COMPLETE checksum. It should be used on -+ * receive path processing instead of skb_push unless you know -+ * that the checksum difference is zero (e.g., a valid IP header) -+ * or you are setting ip_summed to CHECKSUM_NONE. -+ */ -+static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len) -+{ -+ skb_push(skb, len); -+ skb_postpush_rcsum(skb, skb->data, len); -+ return skb->data; -+} -+ -+/** - * skb_pull_rcsum - pull skb and update receive checksum - * @skb: buffer to update - * @len: length of data pulled -@@ -4084,9 +4102,9 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb, - if (!pskb_may_pull(skb_chk, offset)) - goto err; - -- __skb_pull(skb_chk, offset); -+ skb_pull_rcsum(skb_chk, offset); - ret = skb_chkf(skb_chk); -- __skb_push(skb_chk, offset); -+ skb_push_rcsum(skb_chk, offset); - - if (ret) - goto err; - -From 2c0f60ed53c5a180397b2b740bbf796e09471012 Mon Sep 17 00:00:00 2001 +From e95b72cdb5a4576d8f675a870c4739ff9866203c Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 7 Jan 2016 15:50:23 +0100 -Subject: [PATCH 218/251] bpf: add skb_postpush_rcsum and fix dev_forward_skb +Subject: [PATCH 217/398] bpf: add skb_postpush_rcsum and fix dev_forward_skb occasions Add a small helper skb_postpush_rcsum() and fix up redirect locations @@ -161717,43 +161639,14 @@ Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller --- - include/linux/skbuff.h | 17 +++++++++++++++++ - net/core/filter.c | 17 +++++++++++++---- - 2 files changed, 30 insertions(+), 4 deletions(-) + net/core/filter.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 75f136a..d84c593 100644 ---- a/include/linux/skbuff.h -+++ b/include/linux/skbuff.h -@@ -2724,6 +2724,23 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb, - - unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); - -+static inline void skb_postpush_rcsum(struct sk_buff *skb, -+ const void *start, unsigned int len) -+{ -+ /* For performing the reverse operation to skb_postpull_rcsum(), -+ * we can instead of ... -+ * -+ * skb->csum = csum_add(skb->csum, csum_partial(start, len, 0)); -+ * -+ * ... just use this equivalent version here to save a few -+ * instructions. Feeding csum of 0 in csum_partial() and later -+ * on adding skb->csum is equivalent to feed skb->csum in the -+ * first place. -+ */ -+ if (skb->ip_summed == CHECKSUM_COMPLETE) -+ skb->csum = csum_partial(start, len, skb->csum); -+} -+ - /** - * pskb_trim_rcsum - trim received skb and update checksum - * @skb: buffer to trim diff --git a/net/core/filter.c b/net/core/filter.c -index 37157c4..6e337ea 100644 +index f393a22b9d5049b3161812105474bd93d72db965..b683e60cfb4c90d11e4fb5f03b5f845da8febf57 100644 --- a/net/core/filter.c +++ b/net/core/filter.c -@@ -1288,8 +1288,9 @@ static u64 bpf_skb_store_bytes(u64 r1, u64 r2, u64 r3, u64 r4, u64 flags) +@@ -1293,8 +1293,9 @@ static u64 bpf_skb_store_bytes(u64 r1, u64 r2, u64 r3, u64 r4, u64 flags) /* skb_store_bits cannot return -EFAULT here */ skb_store_bits(skb, offset, ptr, len); @@ -161765,7 +161658,7 @@ index 37157c4..6e337ea 100644 return 0; } -@@ -1415,8 +1416,12 @@ static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5) +@@ -1420,8 +1421,12 @@ static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5) if (unlikely(!skb2)) return -ENOMEM; @@ -161779,7 +161672,7 @@ index 37157c4..6e337ea 100644 skb2->dev = dev; skb_sender_cpu_clear(skb2); -@@ -1459,8 +1464,12 @@ int skb_do_redirect(struct sk_buff *skb) +@@ -1464,8 +1469,12 @@ int skb_do_redirect(struct sk_buff *skb) return -EINVAL; } @@ -161794,10 +161687,10 @@ index 37157c4..6e337ea 100644 skb->dev = dev; skb_sender_cpu_clear(skb); -From 67ba5d253f79ddbf1c28d7e3cb48efd0b845f87c Mon Sep 17 00:00:00 2001 +From f6fc8a87fe2c4a3ea3be092ec2668d8b5b1c6de5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 31 Mar 2016 15:44:53 +0100 -Subject: [PATCH 219/251] bcm2835-sdhost: Precalc divisors and overclocks +Subject: [PATCH 218/398] bcm2835-sdhost: Precalc divisors and overclocks Recalculating the clock divisors when the core clock changes is wasteful and makes it harder to manage the overclock settings. Instead, @@ -161809,7 +161702,7 @@ Signed-off-by: Phil Elwell 1 file changed, 88 insertions(+), 64 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 1deecef..cc18ec8 100644 +index 1deecef36ccea805440c84542642de03fa87c0a0..cc18ec890d1578def372af6558e01a2a982520d0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -154,12 +154,15 @@ struct bcm2835_host { @@ -162068,10 +161961,10 @@ index 1deecef..cc18ec8 100644 pr_debug("bcm2835_sdhost_probe -> OK\n"); -From 7a21e0c9d567d27b000ef8350ee503776720852d Mon Sep 17 00:00:00 2001 +From b41a8737be0f1fbdbc5a1bb5a32c826ec3c83624 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Apr 2016 12:35:32 +0100 -Subject: [PATCH 220/251] Revert "bcm2835-sdhost: Precalc divisors and +Subject: [PATCH 219/398] Revert "bcm2835-sdhost: Precalc divisors and overclocks" This reverts commit 20260462773366a5734e5268dae0a4c179a21a2d. @@ -162080,7 +161973,7 @@ This reverts commit 20260462773366a5734e5268dae0a4c179a21a2d. 1 file changed, 64 insertions(+), 88 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index cc18ec8..1deecef 100644 +index cc18ec890d1578def372af6558e01a2a982520d0..1deecef36ccea805440c84542642de03fa87c0a0 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -154,15 +154,12 @@ struct bcm2835_host { @@ -162339,10 +162232,10 @@ index cc18ec8..1deecef 100644 pr_debug("bcm2835_sdhost_probe -> OK\n"); -From a44f96721ff123198ef527c1471425cc5e2ee1b1 Mon Sep 17 00:00:00 2001 +From 8e1e2e73fb217c2d9f5ed3310ccc2bb7de315906 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Apr 2016 12:35:51 +0100 -Subject: [PATCH 221/251] Revert "bcm2835-sdhost: Adjust to core clock changes" +Subject: [PATCH 220/398] Revert "bcm2835-sdhost: Adjust to core clock changes" This reverts commit 4b89d07fd299a0f4e25321920cb74416ba2e638e. --- @@ -162351,7 +162244,7 @@ This reverts commit 4b89d07fd299a0f4e25321920cb74416ba2e638e. 2 files changed, 22 insertions(+), 119 deletions(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 98a7fa5..d509d10 100644 +index 98a7fa537bba72814dd84e8a8330d260a8a266ff..d509d10cd919d4ba941ec0cb12a3a17bb0b9b818 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -36,7 +36,6 @@ config MMC_BCM2835_PIO_DMA_BARRIER @@ -162363,7 +162256,7 @@ index 98a7fa5..d509d10 100644 This selects the SDHost controller on BCM2835/6. diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 1deecef..f43aae0 100644 +index 1deecef36ccea805440c84542642de03fa87c0a0..f43aae07bb9260a94542a9653a95afacb38cc263 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -50,10 +50,6 @@ @@ -162671,10 +162564,10 @@ index 1deecef..f43aae0 100644 bcm2835_sdhost_set_power(host, false); -From 99a50a0418f27f7b894ee9668b2ed02b435c9113 Mon Sep 17 00:00:00 2001 +From f99e0a13c2a85f19cd6ecbeb758af61a1db4fe2d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Apr 2016 16:03:18 +0100 -Subject: [PATCH 222/251] bcm2835-sdhost: Firmware manages the clock divisor +Subject: [PATCH 221/398] bcm2835-sdhost: Firmware manages the clock divisor The bcm2835-sdhost driver hands control of the CDIV clock divisor register to matching firmware, allowing it to adjust to a changing @@ -162693,7 +162586,7 @@ Signed-off-by: Phil Elwell 2 files changed, 74 insertions(+), 47 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index f43aae0..54087b2 100644 +index f43aae07bb9260a94542a9653a95afacb38cc263..54087b2e22d4c543adb08dbf24e4b3199b9b5893 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -50,6 +50,7 @@ @@ -162888,7 +162781,7 @@ index f43aae0..54087b2 100644 if (ret) goto err; diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index c844968..e312e9c 100644 +index c844968bf0d2f551587d2879195bb70c8e7f1333..e312e9cf31c4b149bfcbee525807cc45476aefc9 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -79,6 +79,7 @@ enum rpi_firmware_property_tag { @@ -162900,10 +162793,10 @@ index c844968..e312e9c 100644 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 3a3bd335bf71e17af13de24423c806f9a26480b7 Mon Sep 17 00:00:00 2001 +From ebf1d1767050c8df9a4e86970dff876998e491b1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 4 Apr 2016 19:52:27 +0100 -Subject: [PATCH 223/251] Revert "Revert "cpufreq: Temporarily ignore +Subject: [PATCH 222/398] Revert "Revert "cpufreq: Temporarily ignore io_is_busy=1"" This reverts commit c353af0f83220068c10f6593b1767576b9b6cc18. @@ -162912,7 +162805,7 @@ This reverts commit c353af0f83220068c10f6593b1767576b9b6cc18. 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c -index 03ac6ce..99a9610 100644 +index 03ac6ce540424a189e2946a1dd98d2046cbc3622..99a9610d467e4f5ff128f96780677d57997280ce 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -307,7 +307,12 @@ static ssize_t store_io_is_busy(struct dbs_data *dbs_data, const char *buf, @@ -162930,10 +162823,10 @@ index 03ac6ce..99a9610 100644 /* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu(j) { -From 82caca6544d42613722befb52dd121bd9c7d8159 Mon Sep 17 00:00:00 2001 +From 2c3e1576729d26acbda6992321ea336da20af815 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 31 Mar 2016 16:49:52 +0100 -Subject: [PATCH 224/251] config: Enabled IPV6_SUBTREES +Subject: [PATCH 223/398] config: Enabled IPV6_SUBTREES --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -162941,7 +162834,7 @@ Subject: [PATCH 224/251] config: Enabled IPV6_SUBTREES 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 2c8e4b7..d509168 100644 +index 2c8e4b742e744965ad638e0a123d749a4ea8be16..d5091681e1c357f0acabaa957bbc86a00b9b7661 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -106,6 +106,7 @@ CONFIG_INET6_ESP=m @@ -162953,7 +162846,7 @@ index 2c8e4b7..d509168 100644 CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y CONFIG_IPV6_PIMSM_V2=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index f6e2d84..060ec5f 100644 +index f6e2d84c4200078ab49c0224c5b1f90a0a13b285..060ec5ff8b558f007cc93deb8595e0aee233f2b8 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -73,6 +73,7 @@ CONFIG_INET=y @@ -162965,10 +162858,10 @@ index f6e2d84..060ec5f 100644 CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_PNP=y -From 67cf7c950c17a731c934a3b30b474cb8886744c5 Mon Sep 17 00:00:00 2001 +From 1f9dd507c2df4e1c8e8b402d92751912427925f2 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 225/251] add smsc95xx packetsize module_param +Subject: [PATCH 224/398] add smsc95xx packetsize module_param Signed-off-by: Sam Nazarko --- @@ -162976,7 +162869,7 @@ Signed-off-by: Sam Nazarko 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index a61bd08..3c23b11 100644 +index a61bd08d81a0dc6a18f3989b87f57101e78aa4ac..3c23b11c606d6deb7cfabe4d28992475417da303 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -83,6 +83,10 @@ static char *macaddr = ":"; @@ -163010,10 +162903,10 @@ index a61bd08..3c23b11 100644 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From fd1df6d4b4d6ebf352da378dcca5965297b242ec Mon Sep 17 00:00:00 2001 +From 1cb970e3ccc6ce1de9e5f28bc35ab9bb41dc2622 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 226/251] reboot: Use power off rather than busy spinning when +Subject: [PATCH 225/398] reboot: Use power off rather than busy spinning when halt is requested --- @@ -163021,7 +162914,7 @@ Subject: [PATCH 226/251] reboot: Use power off rather than busy spinning when 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c -index 3826935..2cd6af2 100644 +index 38269358fd252c6bb93fd58a0478319c436cdfd3..2cd6af2d3b49024d8fab2d59384c566bba7e415b 100644 --- a/arch/arm/kernel/reboot.c +++ b/arch/arm/kernel/reboot.c @@ -102,11 +102,7 @@ void machine_shutdown(void) @@ -163038,10 +162931,10 @@ index 3826935..2cd6af2 100644 /* -From d1766b543e9362da3ed16d5b03828a67214e7476 Mon Sep 17 00:00:00 2001 +From dcdb7c061bafa6c920787f80f6f702e4b5d91747 Mon Sep 17 00:00:00 2001 From: HiassofT Date: Wed, 6 Apr 2016 21:45:01 +0200 -Subject: [PATCH 227/251] Revert "bcm2835-dma: Fix dreq not set for slave +Subject: [PATCH 226/398] Revert "bcm2835-dma: Fix dreq not set for slave transfers" This reverts commit 8ad957e866a1fe1450f663f2b00a57d7de44904c. @@ -163060,7 +162953,7 @@ Signed-off-by: Matthias Reichl 1 file changed, 2 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c -index 985019b..d26b6bd 100644 +index 985019b72456f65ddbb54c3bfa49e18dffe4285c..d26b6bdbcf1ab33ab92937b889a37e505c925311 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -679,8 +679,6 @@ static int bcm2835_dma_slave_config(struct dma_chan *chan, @@ -163073,10 +162966,10 @@ index 985019b..d26b6bd 100644 return 0; } -From 68172482aa367aa118a7a46537206c817669b10c Mon Sep 17 00:00:00 2001 +From d16571cb5439fc70257b7968c966c94550db3cfa Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Fri, 1 Apr 2016 15:28:46 +0100 -Subject: [PATCH 228/251] RPi config: Add CONFIG_PWM_PCA9685 for NXP PCA9685 +Subject: [PATCH 227/398] RPi config: Add CONFIG_PWM_PCA9685 for NXP PCA9685 driver over I2C Includes DT overlay to configure it. @@ -163092,7 +162985,7 @@ Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> create mode 100644 arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 7c4fc30..239c6a1 100644 +index 7c4fc306116299df98e3006bafdaf3e096802b69..239c6a12d85a334ab8f0d592a7a8d42152a65dd2 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -30,6 +30,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo @@ -163104,7 +162997,7 @@ index 7c4fc30..239c6a1 100644 dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 337be4a..9df71a4 100644 +index 337be4a7076ed74c506605771c3e020c902e4166..9df71a4afa0f78ec1249a739ff2926e315f80189 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -366,6 +366,12 @@ Load: dtoverlay=i2c-mux-pca9548a,= @@ -163122,7 +163015,7 @@ index 337be4a..9df71a4 100644 Load: dtoverlay=i2c-rtc,= diff --git a/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts b/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts new file mode 100644 -index 0000000..d1ffd23 +index 0000000000000000000000000000000000000000..d1ffd2326669e46ad68939f94713cc992dee57e0 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts @@ -0,0 +1,26 @@ @@ -163153,7 +163046,7 @@ index 0000000..d1ffd23 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index d509168..299d7be 100644 +index d5091681e1c357f0acabaa957bbc86a00b9b7661..299d7be8060173c06cc5f01aaf80f5ea62f5ce11 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -1122,6 +1122,7 @@ CONFIG_MCP320X=m @@ -163165,7 +163058,7 @@ index d509168..299d7be 100644 CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 060ec5f..acda16b 100644 +index 060ec5ff8b558f007cc93deb8595e0aee233f2b8..acda16b3a7e65d9577daa6e0657c286cc16138cc 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -1129,6 +1129,7 @@ CONFIG_MCP320X=m @@ -163177,10 +163070,10 @@ index 060ec5f..acda16b 100644 CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y -From 3d3c095375d6ac4508dc49a80d615b1fd56eb12a Mon Sep 17 00:00:00 2001 +From b208581faca58d0d7cadfd97662dcc9cdd99c565 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 8 Apr 2016 17:43:27 +0100 -Subject: [PATCH 229/251] BCM270X_DT: Don't generate "linux,phandle" props +Subject: [PATCH 228/398] BCM270X_DT: Don't generate "linux,phandle" props The EPAPR standard says to use "phandle" properties to store phandles, rather than the deprecated "linux,phandle" version. By default, dtc @@ -163194,7 +163087,7 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index fdc450f..49badba 100644 +index fdc450f4c9d9623ac4723d39df9419eb80a420db..49badbac2b303e31fff103ddf43c63e7a261b049 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -813,5 +813,5 @@ clean-files := *.dtb @@ -163205,7 +163098,7 @@ index fdc450f..49badba 100644 + DTC_FLAGS ?= -@ -H epapr endif diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib -index 7209d62..3079c4f 100644 +index 7209d622eb16b113511bb7d8bd7a1b01e088f113..3079c4fd3580f7484cabb302007ec44934951480 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -294,7 +294,7 @@ $(obj)/%.dtb: $(src)/%.dts FORCE @@ -163218,10 +163111,10 @@ index 7209d62..3079c4f 100644 -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -From 5cec9f4a5fb37bc1041c351ab309001c4f9f9d1d Mon Sep 17 00:00:00 2001 +From d130bd30736a1796752d115a3cbc79e3a2485699 Mon Sep 17 00:00:00 2001 From: 6by9 <6by9@users.noreply.github.com> Date: Fri, 8 Apr 2016 18:15:43 +0100 -Subject: [PATCH 230/251] V4L2 driver updates (#1393) +Subject: [PATCH 229/398] V4L2 driver updates (#1393) * BCM2835-V4L2: Correct ISO control and add V4L2_CID_ISO_SENSITIVITY_AUTO @@ -163279,7 +163172,7 @@ Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> 4 files changed, 320 insertions(+), 135 deletions(-) diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c -index 98a892e..0e6c9b4 100644 +index 98a892e5140ac0e9e4631965b43bcdae5e8f587b..0e6c9b4f125ccdf052f5566992a4c2a09f8f5471 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -45,6 +45,8 @@ @@ -163785,7 +163678,7 @@ index 98a892e..0e6c9b4 100644 module_init(bm2835_mmal_init); diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h -index 7fe9f65..202906b 100644 +index 7fe9f658a927042b95eaba63aaa49daed2a8f2b8..202906b9e8e6ec5a9cb4e953cac85f505d7dabd3 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -15,7 +15,7 @@ @@ -163833,7 +163726,7 @@ index 7fe9f65..202906b 100644 + (win_fmt)->bitmap); \ +} diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c -index f9f903f..fe61330 100644 +index f9f903f9574d576dde069e56f618f235f99194c7..fe61330ba2a64f850ff3e4930ff813f648889804 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c @@ -49,10 +49,13 @@ static const s64 ev_bias_qmenu[] = { @@ -163903,7 +163796,7 @@ index f9f903f..fe61330 100644 }, { diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h -index aa0fd18..f6abb5c 100644 +index aa0fd180271b1b58e96e027df951fcbc7f610eb8..f6abb5cfa49d58277fddfb40b7ad329518bd397f 100644 --- a/drivers/media/platform/bcm2835/mmal-parameters.h +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -654,3 +654,36 @@ struct mmal_parameter_imagefx_parameters { @@ -163944,10 +163837,10 @@ index aa0fd18..f6abb5c 100644 + flashes[MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES]; +}; -From 4366809281c7cf500e97f9a113cb1234d273aed3 Mon Sep 17 00:00:00 2001 +From ca330a52ca9aca9fb42825c3079d49666df68bf2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 Apr 2016 12:50:58 +0100 -Subject: [PATCH 231/251] bcm2835-sdhost: Reset the clock in task context +Subject: [PATCH 230/398] bcm2835-sdhost: Reset the clock in task context Since reprogramming the clock can now involve a round-trip to the firmware it must not be done at atomic context, and a tasklet @@ -163959,7 +163852,7 @@ Signed-off-by: Phil Elwell 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c -index 54087b2..a57faed 100644 +index 54087b2e22d4c543adb08dbf24e4b3199b9b5893..a57faedd8ba71a38d057664f3b7e599026d43785 100644 --- a/drivers/mmc/host/bcm2835-sdhost.c +++ b/drivers/mmc/host/bcm2835-sdhost.c @@ -185,6 +185,7 @@ struct bcm2835_host { @@ -164054,10 +163947,10 @@ index 54087b2..a57faed 100644 host->pio_limit = 1; host->max_delay = 1; /* Warn if over 1ms */ -From 37e270746e49ee6bf0e7a8404503e67364519ce2 Mon Sep 17 00:00:00 2001 +From a0b80147f624f751f3b11850b662b884339bbfad Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 7 Apr 2016 12:44:24 +0100 -Subject: [PATCH 232/251] config: Enable CONFIG_IPV6_ROUTER_PREF for networks +Subject: [PATCH 231/398] config: Enable CONFIG_IPV6_ROUTER_PREF for networks with multiple routers --- @@ -164066,7 +163959,7 @@ Subject: [PATCH 232/251] config: Enable CONFIG_IPV6_ROUTER_PREF for networks 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 299d7be..7bfc073 100644 +index 299d7be8060173c06cc5f01aaf80f5ea62f5ce11..7bfc073222b859260c8befed51a01ae60468a606 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -101,6 +101,7 @@ CONFIG_INET_XFRM_MODE_TUNNEL=m @@ -164078,7 +163971,7 @@ index 299d7be..7bfc073 100644 CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index acda16b..59026b3 100644 +index acda16b3a7e65d9577daa6e0657c286cc16138cc..59026b368223e93478204a4459d19253a22c78d5 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -95,6 +95,7 @@ CONFIG_INET_XFRM_MODE_TUNNEL=m @@ -164090,10 +163983,10 @@ index acda16b..59026b3 100644 CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m -From aa9f1aedb9a495b6688cc30a17a0b01c3ab03f8c Mon Sep 17 00:00:00 2001 +From 1752d3172827a4e590076f9ddc405e0ee19c2d7b Mon Sep 17 00:00:00 2001 From: jochenberger Date: Thu, 7 Apr 2016 21:38:46 +0200 -Subject: [PATCH 233/251] Enable hid-betopff module +Subject: [PATCH 232/398] Enable hid-betopff module Add force feedback support for Betop based devices https://github.com/raspberrypi/linux/blob/rpi-4.1.y/drivers/hid/hid-betopff.c @@ -164103,7 +163996,7 @@ https://github.com/raspberrypi/linux/blob/rpi-4.1.y/drivers/hid/hid-betopff.c 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 7bfc073..31e3ac5 100644 +index 7bfc073222b859260c8befed51a01ae60468a606..31e3ac5b8680f12b2e8a236718239f61ce3b137e 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -867,6 +867,7 @@ CONFIG_HID_A4TECH=m @@ -164115,7 +164008,7 @@ index 7bfc073..31e3ac5 100644 CONFIG_HID_CHICONY=m CONFIG_HID_CYPRESS=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 59026b3..ac9287f 100644 +index 59026b368223e93478204a4459d19253a22c78d5..ac9287f9673254494fb8d751346563daee23af77 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -859,6 +859,7 @@ CONFIG_HID_A4TECH=m @@ -164127,10 +164020,10 @@ index 59026b3..ac9287f 100644 CONFIG_HID_CHICONY=m CONFIG_HID_CYPRESS=m -From 51edceabf0a57229b0ccb3742640aefe4fcb161d Mon Sep 17 00:00:00 2001 +From 3f1c02cf5867fc6ca99ccdf2d0bb12ba637e4350 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 12 Apr 2016 12:45:16 +0100 -Subject: [PATCH 234/251] config: Make IPV6 a module and regenerate with +Subject: [PATCH 233/398] config: Make IPV6 a module and regenerate with defconfig --- @@ -164139,7 +164032,7 @@ Subject: [PATCH 234/251] config: Make IPV6 a module and regenerate with 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 31e3ac5..5a8ab1e 100644 +index 31e3ac5b8680f12b2e8a236718239f61ce3b137e..5a8ab1e8fe39daf100a8b9d25269cb45bf22df78 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -101,6 +101,7 @@ CONFIG_INET_XFRM_MODE_TUNNEL=m @@ -164163,7 +164056,7 @@ index 31e3ac5..5a8ab1e 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index ac9287f..852751e 100644 +index ac9287f9673254494fb8d751346563daee23af77..852751ed9a165d7a1a12c8c26c1bcf94f06430ae 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -73,7 +73,6 @@ CONFIG_INET=y @@ -164202,10 +164095,10 @@ index ac9287f..852751e 100644 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From 037a9e0fd0cb7eeb947bb4dbff674833419dd7f7 Mon Sep 17 00:00:00 2001 +From c78f26209947db049f7cce43e38ec2b459755041 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 5 Apr 2016 13:01:54 +0100 -Subject: [PATCH 235/251] BCM270X_DT: Add dpi24 overlay +Subject: [PATCH 234/398] BCM270X_DT: Add dpi24 overlay Signed-off-by: Phil Elwell --- @@ -164216,7 +164109,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/dpi24-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 239c6a1..688ba0b 100644 +index 239c6a12d85a334ab8f0d592a7a8d42152a65dd2..688ba0bfec5777558b99fe6416dcc7a09b805981 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -15,6 +15,7 @@ endif @@ -164228,7 +164121,7 @@ index 239c6a1..688ba0b 100644 dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 9df71a4..1438908 100644 +index 9df71a4afa0f78ec1249a739ff2926e315f80189..1438908dfde5487ecacc25b5918861a589f9faa1 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -213,6 +213,14 @@ Params: gpiopin GPIO connected to the sensor's DATA output. @@ -164248,7 +164141,7 @@ index 9df71a4..1438908 100644 is the default on all except the Pi Zero which defaults to dwc2. diff --git a/arch/arm/boot/dts/overlays/dpi24-overlay.dts b/arch/arm/boot/dts/overlays/dpi24-overlay.dts new file mode 100644 -index 0000000..e4dbe40 +index 0000000000000000000000000000000000000000..e4dbe40218a008ef4028c1214740c3d6bc574724 --- /dev/null +++ b/arch/arm/boot/dts/overlays/dpi24-overlay.dts @@ -0,0 +1,31 @@ @@ -164284,183 +164177,10 @@ index 0000000..e4dbe40 + }; +}; -From 8e95bfba2bfc4186ee007176c9d2f7c42c369312 Mon Sep 17 00:00:00 2001 -From: DigitalDreamtime -Date: Thu, 14 Apr 2016 00:57:33 +0100 -Subject: [PATCH 236/251] Modify IQAudIO DAC+ ASoC driver to set card/dai - config from dt - -Add the ability to set the card name, dai name and dai stream name, from -dt config. - -Signed-off-by: DigitalDreamtime ---- - sound/soc/bcm/iqaudio-dac.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c -index a5eaa9e..b6b6dcf 100644 ---- a/sound/soc/bcm/iqaudio-dac.c -+++ b/sound/soc/bcm/iqaudio-dac.c -@@ -61,8 +61,6 @@ static struct snd_soc_ops snd_rpi_iqaudio_dac_ops = { - - static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { - { -- .name = "IQaudIO DAC", -- .stream_name = "IQaudIO DAC HiFi", - .cpu_dai_name = "bcm2708-i2s.0", - .codec_dai_name = "pcm512x-hifi", - .platform_name = "bcm2708-i2s.0", -@@ -76,7 +74,6 @@ static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { - - /* audio machine driver */ - static struct snd_soc_card snd_rpi_iqaudio_dac = { -- .name = "IQaudIODAC", - .owner = THIS_MODULE, - .dai_link = snd_rpi_iqaudio_dac_dai, - .num_links = ARRAY_SIZE(snd_rpi_iqaudio_dac_dai), -@@ -90,6 +87,7 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) - - if (pdev->dev.of_node) { - struct device_node *i2s_node; -+ struct snd_soc_card *card = &snd_rpi_iqaudio_dac; - struct snd_soc_dai_link *dai = &snd_rpi_iqaudio_dac_dai[0]; - i2s_node = of_parse_phandle(pdev->dev.of_node, - "i2s-controller", 0); -@@ -103,6 +101,15 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) - - digital_gain_0db_limit = !of_property_read_bool(pdev->dev.of_node, - "iqaudio,24db_digital_gain"); -+ if (of_property_read_string(pdev->dev.of_node, "card_name", -+ &card->name)) -+ card->name = "IQaudIODAC"; -+ if (of_property_read_string(pdev->dev.of_node, "dai_name", -+ &dai->name)) -+ dai->name = "IQaudIO DAC"; -+ if (of_property_read_string(pdev->dev.of_node, "dai_stream_name", -+ &dai->stream_name)) -+ dai->stream_name = "IQaudIO DAC HiFi"; - } - - ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); - -From 7ea9f79b042605984245d4a0387f0e667fdc947c Mon Sep 17 00:00:00 2001 -From: DigitalDreamtime -Date: Thu, 14 Apr 2016 01:00:58 +0100 -Subject: [PATCH 237/251] Add support for the Digital Dreamtime Akkordion music - player. - -Support the Digital Dreamtime Akkordion using the OEM IQAudIO DAC+ or -DACZero modules. Set ALSA card name, ("Akkordion"), from dt config. - -Signed-off-by: DigitalDreamtime ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 20 ++++++++++ - .../dts/overlays/akkordion-iqdacplus-overlay.dts | 46 ++++++++++++++++++++++ - 3 files changed, 67 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 688ba0b..6bd6048 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) - endif - - dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo -+dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo - dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo - dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo - dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 1438908..5d0887f 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -186,6 +186,26 @@ Params: cs SPI bus Chip Select (default 1) - www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt - - -+Name: akkordion-iqdacplus -+Info: Configures the Digital Dreamtime Akkordion Music Player (based on the -+ OEM IQAudIO DAC+ or DAC Zero module). -+Load: dtoverlay=akkordion-iqdacplus,= -+Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec -+ Digital volume control. Enable with -+ dtoverlay=akkordion-iqdacplus,24db_digital_gain -+ (The default behaviour is that the Digital -+ volume control is limited to a maximum of -+ 0dB. ie. it can attenuate but not provide -+ gain. For most users, this will be desired -+ as it will prevent clipping. By appending -+ the 24db_digital_gain parameter, the Digital -+ volume control will allow up to 24dB of -+ gain. If this parameter is enabled, it is the -+ responsibility of the user to ensure that -+ the Digital volume control is set to a value -+ that does not result in clipping/distortion!) -+ -+ - Name: at86rf233 - Info: Configures the Atmel AT86RF233 802.15.4 low-power WPAN transceiver, - connected to spi0.0 -diff --git a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts -new file mode 100644 -index 0000000..47c7664 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts -@@ -0,0 +1,46 @@ -+// Definitions for Digital Dreamtime Akkordion using IQaudIO DAC+ or DACZero -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&sound>; -+ frag0: __overlay__ { -+ compatible = "iqaudio,iqaudio-dac"; -+ card_name = "Akkordion"; -+ dai_name = "IQaudIO DAC"; -+ dai_stream_name = "IQaudIO DAC HiFi"; -+ i2s-controller = <&i2s>; -+ status = "okay"; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&i2s>; -+ __overlay__ { -+ status = "okay"; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&i2c1>; -+ __overlay__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ pcm5122@4c { -+ #sound-dai-cells = <0>; -+ compatible = "ti,pcm5122"; -+ reg = <0x4c>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; -+ }; -+}; - -From 2544f9707d98c5d4251e0d6792a5a40016adedcb Mon Sep 17 00:00:00 2001 +From 8cba741c4cb8f624c1af599ff8a0ecb41f76800c Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 238/251] Add Support for BoomBerry Audio boards +Subject: [PATCH 235/398] Add Support for BoomBerry Audio boards --- arch/arm/boot/dts/overlays/Makefile | 2 + @@ -164480,11 +164200,11 @@ Subject: [PATCH 238/251] Add Support for BoomBerry Audio boards create mode 100644 sound/soc/bcm/boomberry-digi.c diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 6bd6048..4842dc1 100644 +index 688ba0bfec5777558b99fe6416dcc7a09b805981..04a9fce6889dbfecaf9471d96e0c695bc8b774d7 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -16,6 +16,8 @@ dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo - dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo +@@ -15,6 +15,8 @@ endif + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo +dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo @@ -164493,10 +164213,10 @@ index 6bd6048..4842dc1 100644 dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 5d0887f..eb5fc04 100644 +index 1438908dfde5487ecacc25b5918861a589f9faa1..2b6fb4f94fe54d0de499bfd93857e1cbd06b0a10 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README -@@ -225,6 +225,32 @@ Load: dtoverlay=bmp085_i2c-sensor +@@ -205,6 +205,32 @@ Load: dtoverlay=bmp085_i2c-sensor Params: @@ -164531,7 +164251,7 @@ index 5d0887f..eb5fc04 100644 Also sometimes found with the part number(s) AM230x. diff --git a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts new file mode 100644 -index 0000000..0f7c9b0 +index 0000000000000000000000000000000000000000..0f7c9b0bfdb7d1527cb474137c9a8e65b92cff4e --- /dev/null +++ b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts @@ -0,0 +1,43 @@ @@ -164580,7 +164300,7 @@ index 0000000..0f7c9b0 +}; diff --git a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts new file mode 100644 -index 0000000..a86e1d0 +index 0000000000000000000000000000000000000000..a86e1d0750d70854fbd1c1ca7574d1b262ea3aa7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts @@ -0,0 +1,39 @@ @@ -164624,7 +164344,7 @@ index 0000000..a86e1d0 + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 5a8ab1e..84ec380 100644 +index 5a8ab1e8fe39daf100a8b9d25269cb45bf22df78..84ec3807f16496c74a0d5483da7703f21dd5bcb7 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -853,6 +853,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m @@ -164637,7 +164357,7 @@ index 5a8ab1e..84ec380 100644 CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 852751e..603ba04 100644 +index 852751ed9a165d7a1a12c8c26c1bcf94f06430ae..603ba0493321e494ca2a127657cee3f85a0bb04d 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -845,6 +845,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m @@ -164650,7 +164370,7 @@ index 852751e..603ba04 100644 CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 1a3f826..3383381 100644 +index 1a3f8264403d64690fef60d41df38d21d3eb6030..3383381122d9c9f77b98a1d83d4e9bd3df16b82f 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -50,6 +50,20 @@ config SND_BCM2708_SOC_RPI_PROTO @@ -164675,7 +164395,7 @@ index 1a3f826..3383381 100644 tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index b21e11e..b04b0d2 100644 +index b21e11ee36e17a29bfae9c4eda78f73ca9c23d48..b04b0d2ea8d31d6d528d08ff8df11b80182676ef 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -8,6 +8,8 @@ snd-soc-hifiberry-dac-objs := hifiberry_dac.o @@ -164698,7 +164418,7 @@ index b21e11e..b04b0d2 100644 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/boomberry-dac.c b/sound/soc/bcm/boomberry-dac.c new file mode 100644 -index 0000000..08845ad +index 0000000000000000000000000000000000000000..08845ad14dc1c330626491762502036dd4cf0de9 --- /dev/null +++ b/sound/soc/bcm/boomberry-dac.c @@ -0,0 +1,163 @@ @@ -164867,7 +164587,7 @@ index 0000000..08845ad +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/bcm/boomberry-digi.c b/sound/soc/bcm/boomberry-digi.c new file mode 100644 -index 0000000..3d5b5ff +index 0000000000000000000000000000000000000000..3d5b5ff26f9b10648d308d489693407e6e7e7ac7 --- /dev/null +++ b/sound/soc/bcm/boomberry-digi.c @@ -0,0 +1,215 @@ @@ -165087,10 +164807,10 @@ index 0000000..3d5b5ff +MODULE_DESCRIPTION("ASoC Driver for BoomBerry PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From e3ea2e74ce1c734d3bbfd1270e8934cb3de80431 Mon Sep 17 00:00:00 2001 +From d9e9e97eb465977da36ed86f9672025a785e4f41 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Fri, 8 Apr 2016 00:06:00 +0100 -Subject: [PATCH 239/251] Add support for mcp7940x family of RTC +Subject: [PATCH 236/398] Add support for mcp7940x family of RTC --- arch/arm/boot/dts/overlays/README | 2 ++ @@ -165098,10 +164818,10 @@ Subject: [PATCH 239/251] Add support for mcp7940x family of RTC 2 files changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index eb5fc04..6a62e6f 100644 +index 2b6fb4f94fe54d0de499bfd93857e1cbd06b0a10..ea6b816057a05281380a0532fa1f574af35a7a6c 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README -@@ -435,6 +435,8 @@ Params: ds1307 Select the DS1307 device +@@ -415,6 +415,8 @@ Params: ds1307 Select the DS1307 device ds3231 Select the DS3231 device @@ -165111,7 +164831,7 @@ index eb5fc04..6a62e6f 100644 pcf2127 Select the PCF2127 device diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -index eecec16..4065647 100644 +index eecec16461c696d3c6885bc7b346b2f5f1f58670..40656474dfc16505433221a745c1d129c2737399 100644 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts @@ -23,6 +23,11 @@ @@ -165135,10 +164855,183 @@ index eecec16..4065647 100644 pcf2127 = <&pcf2127>,"status"; pcf8523 = <&pcf8523>,"status"; -From a10d74e309c02ad451678e59c320d62208944605 Mon Sep 17 00:00:00 2001 +From deba9c0271aeb002cf081496ea6affc1e3fc4bff Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Thu, 14 Apr 2016 00:57:33 +0100 +Subject: [PATCH 237/398] Modify IQAudIO DAC+ ASoC driver to set card/dai + config from dt + +Add the ability to set the card name, dai name and dai stream name, from +dt config. + +Signed-off-by: DigitalDreamtime +--- + sound/soc/bcm/iqaudio-dac.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c +index a5eaa9ee0994f3a8e89179bf51328a3f92cef316..b6b6dcf6e5a420d2c39d220b91928cd8ca832de7 100644 +--- a/sound/soc/bcm/iqaudio-dac.c ++++ b/sound/soc/bcm/iqaudio-dac.c +@@ -61,8 +61,6 @@ static struct snd_soc_ops snd_rpi_iqaudio_dac_ops = { + + static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { + { +- .name = "IQaudIO DAC", +- .stream_name = "IQaudIO DAC HiFi", + .cpu_dai_name = "bcm2708-i2s.0", + .codec_dai_name = "pcm512x-hifi", + .platform_name = "bcm2708-i2s.0", +@@ -76,7 +74,6 @@ static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { + + /* audio machine driver */ + static struct snd_soc_card snd_rpi_iqaudio_dac = { +- .name = "IQaudIODAC", + .owner = THIS_MODULE, + .dai_link = snd_rpi_iqaudio_dac_dai, + .num_links = ARRAY_SIZE(snd_rpi_iqaudio_dac_dai), +@@ -90,6 +87,7 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) + + if (pdev->dev.of_node) { + struct device_node *i2s_node; ++ struct snd_soc_card *card = &snd_rpi_iqaudio_dac; + struct snd_soc_dai_link *dai = &snd_rpi_iqaudio_dac_dai[0]; + i2s_node = of_parse_phandle(pdev->dev.of_node, + "i2s-controller", 0); +@@ -103,6 +101,15 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) + + digital_gain_0db_limit = !of_property_read_bool(pdev->dev.of_node, + "iqaudio,24db_digital_gain"); ++ if (of_property_read_string(pdev->dev.of_node, "card_name", ++ &card->name)) ++ card->name = "IQaudIODAC"; ++ if (of_property_read_string(pdev->dev.of_node, "dai_name", ++ &dai->name)) ++ dai->name = "IQaudIO DAC"; ++ if (of_property_read_string(pdev->dev.of_node, "dai_stream_name", ++ &dai->stream_name)) ++ dai->stream_name = "IQaudIO DAC HiFi"; + } + + ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); + +From b37dc31bb7feee22248f89ff3648c8373c4a698a Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Thu, 14 Apr 2016 01:00:58 +0100 +Subject: [PATCH 238/398] Add support for the Digital Dreamtime Akkordion music + player. + +Support the Digital Dreamtime Akkordion using the OEM IQAudIO DAC+ or +DACZero modules. Set ALSA card name, ("Akkordion"), from dt config. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 20 ++++++++++ + .../dts/overlays/akkordion-iqdacplus-overlay.dts | 46 ++++++++++++++++++++++ + 3 files changed, 67 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 04a9fce6889dbfecaf9471d96e0c695bc8b774d7..4842dc1d5c68fa61505fd16dab9709a10ee417eb 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + endif + + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo + dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index ea6b816057a05281380a0532fa1f574af35a7a6c..6a62e6fdb073aa8daf86828b4b308d1ca6259b3f 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -186,6 +186,26 @@ Params: cs SPI bus Chip Select (default 1) + www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt + + ++Name: akkordion-iqdacplus ++Info: Configures the Digital Dreamtime Akkordion Music Player (based on the ++ OEM IQAudIO DAC+ or DAC Zero module). ++Load: dtoverlay=akkordion-iqdacplus,= ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ dtoverlay=akkordion-iqdacplus,24db_digital_gain ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24db_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) ++ ++ + Name: at86rf233 + Info: Configures the Atmel AT86RF233 802.15.4 low-power WPAN transceiver, + connected to spi0.0 +diff --git a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..47c7664f7f058436b41a89ded35a1d0197b0f187 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +@@ -0,0 +1,46 @@ ++// Definitions for Digital Dreamtime Akkordion using IQaudIO DAC+ or DACZero ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&sound>; ++ frag0: __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ card_name = "Akkordion"; ++ dai_name = "IQaudIO DAC"; ++ dai_stream_name = "IQaudIO DAC HiFi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4c { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4c>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; ++ }; ++}; + +From baab978348c571c6111981464540e64a50f75cdd Mon Sep 17 00:00:00 2001 From: Jeremy McDermond Date: Thu, 14 Apr 2016 09:39:20 -0700 -Subject: [PATCH 240/251] bcm2709_defconfig: Fix typo on BoomBerry +Subject: [PATCH 239/398] bcm2709_defconfig: Fix typo on BoomBerry configuration directive The BoomBerry configuration directive in bcm2709_defconfig has a typo. @@ -165147,7 +165040,7 @@ The BoomBerry configuration directive in bcm2709_defconfig has a typo. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 84ec380..7353332 100644 +index 84ec3807f16496c74a0d5483da7703f21dd5bcb7..73533320f3b14bbe2ebe571b800a5c0df57a96a9 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -854,7 +854,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m @@ -165160,10 +165053,10 @@ index 84ec380..7353332 100644 CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m -From eb62c144a47bbc7d0015d65629fad05884aa654b Mon Sep 17 00:00:00 2001 +From d1da21d6464c5ae52c7e1bea7406aba0e3784bfc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 Apr 2016 10:48:39 +0100 -Subject: [PATCH 241/251] boomberry-dac: Adjust for ALSA API change +Subject: [PATCH 240/398] boomberry-dac: Adjust for ALSA API change As of 4.4, snd_soc_limit_volume now takes a struct snd_soc_card * rather than a struct snd_soc_codec *. @@ -165174,7 +165067,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/bcm/boomberry-dac.c b/sound/soc/bcm/boomberry-dac.c -index 08845ad..8d39de2 100644 +index 08845ad14dc1c330626491762502036dd4cf0de9..8d39de24289d875cebd5455f28aafe3e24132ab5 100644 --- a/sound/soc/bcm/boomberry-dac.c +++ b/sound/soc/bcm/boomberry-dac.c @@ -40,9 +40,8 @@ static int snd_rpi_boomberry_dac_init(struct snd_soc_pcm_runtime *rtd) @@ -165189,10 +165082,10 @@ index 08845ad..8d39de2 100644 dev_warn(card->dev, "Failed to set volume limit: %d\n", ret); } -From d113d5842f6896cdcdd7c7c2e5733fe0ed0a5b06 Mon Sep 17 00:00:00 2001 +From ecdf2daf80788264187639a67469a967e8f22c62 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 17 Apr 2016 04:44:47 -0700 -Subject: [PATCH 242/251] vmcs: Remove unused sm_cache_map_vector definition +Subject: [PATCH 241/398] vmcs: Remove unused sm_cache_map_vector definition (#1411) The code using it also ifdef'ed with 0, anyyd gcc 6 @@ -165208,7 +165101,7 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+) diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c -index 5d16e35..1db6716 100644 +index 5d16e356bbdd275856d43f75d00ef6c086dbb09e..1db6716c2c0c8b2013203391501f92d09db258af 100644 --- a/drivers/char/broadcom/vc_sm/vmcs_sm.c +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c @@ -197,12 +197,14 @@ struct SM_STATE_T { @@ -165227,10 +165120,10 @@ index 5d16e35..1db6716 100644 /* ---- Private Function Prototypes -------------------------------------- */ -From 8842f5b24445286359d13b8f85230384a361f26b Mon Sep 17 00:00:00 2001 +From 88d26a9b92815b37d8992e8ca3b768794fe7e0a7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 18 Apr 2016 11:56:53 +0100 -Subject: [PATCH 243/251] scripts/mkknlimg: Append a trailer for all input +Subject: [PATCH 242/398] scripts/mkknlimg: Append a trailer for all input Now that the firmware assumes an unsigned kernel is DT-capable, it is helpful to be able to mark a kernel as being non-DT-capable. @@ -165241,7 +165134,7 @@ Signed-off-by: Phil Elwell 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/mkknlimg b/scripts/mkknlimg -index 005f404..78c5845 100755 +index 005f404f572029822bb5bea32774a7c26d7141e5..78c5845d2f01deb04b477327d83fa60624f87f98 100755 --- a/scripts/mkknlimg +++ b/scripts/mkknlimg @@ -98,7 +98,7 @@ my $append_trailer; @@ -165293,41 +165186,17 @@ index 005f404..78c5845 100755 push @atoms, [ '283X', pack('V', $is_283x) ]; push @atoms, [ '283x', pack('V', $is_283x && !$is_270x) ]; -From 4713de1914febfd095de6c68d7152c10ba60a475 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 19 Apr 2016 13:55:29 +0100 -Subject: [PATCH 244/251] scripts/dtc: Only emit local fixups for overlays - -Signed-off-by: Phil Elwell ---- - scripts/dtc/checks.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c -index 2b3b3a7..fedfa79 100644 ---- a/scripts/dtc/checks.c -+++ b/scripts/dtc/checks.c -@@ -514,7 +514,7 @@ static void fixup_phandle_references(struct check *c, struct node *dt, - } - - /* if it's a local reference, we need to record it */ -- if (symbol_fixup_support) { -+ if (symbol_fixup_support && dt->is_plugin) { - - /* allocate a new local fixup entry */ - fe = xmalloc(sizeof(*fe)); - -From 8f691a8d8e5dd4a0e48f3fcc766936215a0efb27 Mon Sep 17 00:00:00 2001 +From 68c20102fa4aa0b58a8ac492976e9d24a2b0f222 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 19 Apr 2016 12:57:52 +0100 -Subject: [PATCH 245/251] bcm2835_thermal: Don't report unsupported trip type +Subject: [PATCH 243/398] bcm2835_thermal: Don't report unsupported trip type --- drivers/thermal/bcm2835-thermal.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c -index 08d8dc7..c63fb9f 100644 +index 08d8dc7c5d005384660f90bc9cb541b83c032411..c63fb9f9d143e19612a18fe530c7b2b3518a22a4 100644 --- a/drivers/thermal/bcm2835-thermal.c +++ b/drivers/thermal/bcm2835-thermal.c @@ -49,38 +49,8 @@ static int bcm2835_thermal_get_temp(struct thermal_zone_device *tz, @@ -165389,10 +165258,34 @@ index 08d8dc7..c63fb9f 100644 if (IS_ERR(tz)) { dev_err(&pdev->dev, "Failed to register the thermal device\n"); -From f92bda16cd790cb612920ed266d19c6ae2620c22 Mon Sep 17 00:00:00 2001 +From ab0b99ca61dfb9be9a1b9c666df5415dca8d65f4 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 19 Apr 2016 13:55:29 +0100 +Subject: [PATCH 244/398] scripts/dtc: Only emit local fixups for overlays + +Signed-off-by: Phil Elwell +--- + scripts/dtc/checks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c +index 2b3b3a7aa70261a8206ba102bccea20d96c7fbfb..fedfa793b05779097f2b78d00aac0eebff4a4d0d 100644 +--- a/scripts/dtc/checks.c ++++ b/scripts/dtc/checks.c +@@ -514,7 +514,7 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + } + + /* if it's a local reference, we need to record it */ +- if (symbol_fixup_support) { ++ if (symbol_fixup_support && dt->is_plugin) { + + /* allocate a new local fixup entry */ + fe = xmalloc(sizeof(*fe)); + +From e717e1265b2577b13e5b77d98fb931e3043db6a9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 19 Apr 2016 16:08:35 +0200 -Subject: [PATCH 246/251] bcm2835: do not require substream for accessing chmap +Subject: [PATCH 245/398] bcm2835: do not require substream for accessing chmap ctl Fixes alsasctl store/restore operation. @@ -165401,7 +165294,7 @@ Fixes alsasctl store/restore operation. 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c -index e930718..8b855f9 100755 +index e9307186b082fc292af79f48ca71e3cd6ce8c99c..8b855f9ded88e0d297fd770edffa9835fa9e6b00 100755 --- a/sound/arm/bcm2835-ctl.c +++ b/sound/arm/bcm2835-ctl.c @@ -489,8 +489,6 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, @@ -165443,10 +165336,10 @@ index e930718..8b855f9 100755 } -From 2c9ca7ae6ac79df824b94224936d378d725b7bb7 Mon Sep 17 00:00:00 2001 +From 16c2a012bdf41eb88c8e32fa2003544f6e2f02aa Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 19 Apr 2016 16:29:41 +0200 -Subject: [PATCH 247/251] bcm2835: add fallback channel layouts if channel map +Subject: [PATCH 246/398] bcm2835: add fallback channel layouts if channel map API is not used Should be more useful than just forcing stereo. @@ -165465,7 +165358,7 @@ at a later point. 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 8ecd2d7..9371073 100755 +index 8ecd2d735fbf94b9018c89c705a68750aad5bf97..93710735d5d3e2930ec9cac0fe596c3f08602d64 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -598,7 +598,16 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -165487,17 +165380,17 @@ index 8ecd2d7..9371073 100755 alsa_stream->chip->map_channels[i] = i; } -From a9670f6cc4cd89aa953d6240b037ebfa161e552b Mon Sep 17 00:00:00 2001 +From b5f917cd568807dba4e4bf92fa9a678fd970efd7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 19 Apr 2016 16:38:03 +0200 -Subject: [PATCH 248/251] bcm2835: log which channel map is set +Subject: [PATCH 247/398] bcm2835: log which channel map is set --- sound/arm/bcm2835-vchiq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 9371073..876986d 100755 +index 93710735d5d3e2930ec9cac0fe596c3f08602d64..876986dc2733085769e77a3858134d8409b7eabc 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -596,8 +596,11 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -165522,10 +165415,10 @@ index 9371073..876986d 100755 m.u.config.channels = channels; m.u.config.samplerate = samplerate; -From 9135f5620348b62310684d40896ae21d993a563d Mon Sep 17 00:00:00 2001 +From 44f453360ee571cc2189c3a3d4b4966837a557de Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 13:49:32 +0100 -Subject: [PATCH 249/251] vchiq_arm: Add completion records under the mutex +Subject: [PATCH 248/398] vchiq_arm: Add completion records under the mutex An issue was observed when flushing openmax components which generate a large number of messages returning @@ -165544,7 +165437,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c -index a5cc385..4886236 100644 +index a5cc385cc25ada02fc45af5d5ca68cd6d2687850..48862365fb2cc5573793cd37599993654972fb86 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -210,6 +210,8 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -165588,10 +165481,10 @@ index a5cc385..4886236 100644 return VCHIQ_SUCCESS; -From 14ba3016c66394dca226fc4fd66b2fd2e677497c Mon Sep 17 00:00:00 2001 +From cbd619421691a04c39ecafaaaa8a7ec5de58eade Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 16:07:15 +0100 -Subject: [PATCH 250/251] config: Add DRM_UDL module +Subject: [PATCH 249/398] config: Add DRM_UDL module See: https://github.com/raspberrypi/linux/issues/1422 @@ -165602,7 +165495,7 @@ Signed-off-by: Phil Elwell 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 7353332..7788ecb 100644 +index 73533320f3b14bbe2ebe571b800a5c0df57a96a9..7788ecb4b42dcf0c296fe3a6cc84acf297638fcc 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -814,6 +814,7 @@ CONFIG_VIDEO_TW9906=m @@ -165627,7 +165520,7 @@ index 7353332..7788ecb 100644 CONFIG_SND_BCM2708_SOC_RASPIDAC3=m CONFIG_SND_SOC_ADAU1701=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 603ba04..5b8b19a 100644 +index 603ba0493321e494ca2a127657cee3f85a0bb04d..5b8b19a09dd05ee19199764b8169b5dce83f158d 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -806,6 +806,7 @@ CONFIG_VIDEO_TW9906=m @@ -165652,10 +165545,10 @@ index 603ba04..5b8b19a 100644 CONFIG_SND_BCM2708_SOC_RASPIDAC3=m CONFIG_SND_SOC_ADAU1701=m -From a114d1bd49a30b9b3aa31d4b18069986e0335e12 Mon Sep 17 00:00:00 2001 +From ccc74d920e2e7a2edf247b8c6b18852c233a1cc2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 15:44:14 +0100 -Subject: [PATCH 251/251] bcm2835-i2s: Reduce the TX DREQ threshold +Subject: [PATCH 250/398] bcm2835-i2s: Reduce the TX DREQ threshold TX FIFO overrun is thought to be the cause of channel swapping, so reducing the DREQ threshold seems reasonable and appears to be @@ -165669,7 +165562,7 @@ Signed-off-by: Phil Elwell 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 04c1d13..aedb01f 100644 +index 04c1d1310d34527e9d57148a4b70ca73cf99e3a8..aedb01fe87112cb5c56027ed0a7eac9d5991765b 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -555,15 +555,22 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, @@ -165702,3 +165595,17281 @@ index 04c1d13..aedb01f 100644 /* Clear FIFOs */ bcm2835_i2s_clear_fifos(dev, true, true); + +From 22014c375350e4baefe2b636aa1e8b501d417d03 Mon Sep 17 00:00:00 2001 +From: Vladimir Zapolskiy +Date: Sun, 6 Mar 2016 03:21:35 +0200 +Subject: [PATCH 251/398] clk: bcm2835: fix check of error code returned by + devm_ioremap_resource() + +The change fixes potential oops while accessing iomem on invalid +address, if devm_ioremap_resource() fails due to some reason. + +The devm_ioremap_resource() function returns ERR_PTR() and never +returns NULL, which makes useless a following check for NULL. + +Signed-off-by: Vladimir Zapolskiy +Fixes: 5e63dcc74b30 ("clk: bcm2835: Add a driver for the auxiliary peripheral clock gates") +Reviewed-by: Eric Anholt +Signed-off-by: Stephen Boyd +--- + drivers/clk/bcm/clk-bcm2835-aux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835-aux.c b/drivers/clk/bcm/clk-bcm2835-aux.c +index e4f89e28b5ecf5a88bbbdc50111904beb470b2a6..3a177ade6e6cc71d84337504df37543227bcb74f 100644 +--- a/drivers/clk/bcm/clk-bcm2835-aux.c ++++ b/drivers/clk/bcm/clk-bcm2835-aux.c +@@ -38,8 +38,8 @@ static int bcm2835_aux_clk_probe(struct platform_device *pdev) + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + reg = devm_ioremap_resource(dev, res); +- if (!reg) +- return -ENODEV; ++ if (IS_ERR(reg)) ++ return PTR_ERR(reg); + + onecell = devm_kmalloc(dev, sizeof(*onecell), GFP_KERNEL); + if (!onecell) + +From 1877431a2ff57c3fc174cb58d8f6618ba7a41c61 Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Sun, 6 Dec 2015 17:22:46 +0100 +Subject: [PATCH 252/398] clk: bcm2835: add a round up ability to the clock + divisor + +Make bcm2835_clock_choose_div to optionally round up the chosen MASH divisor +so that the resulting average rate will not be higher than the requested one. + +Signed-off-by: Remi Pommarel +Reviewed-by: Eric Anholt +Signed-off-by: Michael Turquette +(cherry picked from commit 9c95b32ca09364e4687b72c4e17b78dc1c420026) +--- + drivers/clk/bcm/clk-bcm2835.c | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 6029313aa99586b3088de8ca82e66dd0e0752b70..1d0594f9b24ea8249511560fb55e06aaca1e4132 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1164,22 +1164,24 @@ static int bcm2835_clock_is_on(struct clk_hw *hw) + + static u32 bcm2835_clock_choose_div(struct clk_hw *hw, + unsigned long rate, +- unsigned long parent_rate) ++ unsigned long parent_rate, ++ bool round_up) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + const struct bcm2835_clock_data *data = clock->data; +- u32 unused_frac_mask = GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0); ++ u32 unused_frac_mask = ++ GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1; + u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS; ++ u64 rem; + u32 div; + +- do_div(temp, rate); ++ rem = do_div(temp, rate); + div = temp; + +- /* Round and mask off the unused bits */ +- if (unused_frac_mask != 0) { +- div += unused_frac_mask >> 1; +- div &= ~unused_frac_mask; +- } ++ /* Round up and mask off the unused bits */ ++ if (round_up && ((div & unused_frac_mask) != 0 || rem != 0)) ++ div += unused_frac_mask + 1; ++ div &= ~unused_frac_mask; + + /* clamp to min divider of 1 */ + div = max_t(u32, div, 1 << CM_DIV_FRAC_BITS); +@@ -1219,7 +1221,7 @@ static long bcm2835_clock_round_rate(struct clk_hw *hw, + unsigned long *parent_rate) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); +- u32 div = bcm2835_clock_choose_div(hw, rate, *parent_rate); ++ u32 div = bcm2835_clock_choose_div(hw, rate, *parent_rate, false); + + return bcm2835_clock_rate_from_divisor(clock, *parent_rate, div); + } +@@ -1288,7 +1290,7 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct bcm2835_cprman *cprman = clock->cprman; + const struct bcm2835_clock_data *data = clock->data; +- u32 div = bcm2835_clock_choose_div(hw, rate, parent_rate); ++ u32 div = bcm2835_clock_choose_div(hw, rate, parent_rate, false); + + cprman_write(cprman, data->div_reg, div); + + +From 4a9baf3f4ece64f41c123cd599e9c1abbf9be83a Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Sun, 6 Dec 2015 17:22:47 +0100 +Subject: [PATCH 253/398] clk: bcm2835: Support for clock parent selection + +Some bcm2835 clocks used by hardware (like "PWM" or "H264") can have multiple +parent clocks. These clocks divide the rate of a parent which can be selected by +setting the proper bits in the clock control register. + +Previously all these parents where handled by a mux clock. But a mux clock +cannot be used because updating clock control register to select parent needs a +password to be xor'd with the parent index. + +This patch get rid of mux clock and make these clocks handle their own parent, +allowing them to select the one to use. + +Signed-off-by: Remi Pommarel +Reviewed-by: Eric Anholt +Signed-off-by: Michael Turquette +(cherry picked from commit 6d18b8adbe679b5947aa822b676efff230acc5f6) +--- + drivers/clk/bcm/clk-bcm2835.c | 122 ++++++++++++++++++++++++++---------------- + 1 file changed, 77 insertions(+), 45 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 1d0594f9b24ea8249511560fb55e06aaca1e4132..529e94a59e6d34df2778b3adcfef76026db3bb8a 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1216,16 +1216,6 @@ static long bcm2835_clock_rate_from_divisor(struct bcm2835_clock *clock, + return temp; + } + +-static long bcm2835_clock_round_rate(struct clk_hw *hw, +- unsigned long rate, +- unsigned long *parent_rate) +-{ +- struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); +- u32 div = bcm2835_clock_choose_div(hw, rate, *parent_rate, false); +- +- return bcm2835_clock_rate_from_divisor(clock, *parent_rate, div); +-} +- + static unsigned long bcm2835_clock_get_rate(struct clk_hw *hw, + unsigned long parent_rate) + { +@@ -1297,13 +1287,75 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + return 0; + } + ++static int bcm2835_clock_determine_rate(struct clk_hw *hw, ++ struct clk_rate_request *req) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct clk_hw *parent, *best_parent = NULL; ++ unsigned long rate, best_rate = 0; ++ unsigned long prate, best_prate = 0; ++ size_t i; ++ u32 div; ++ ++ /* ++ * Select parent clock that results in the closest but lower rate ++ */ ++ for (i = 0; i < clk_hw_get_num_parents(hw); ++i) { ++ parent = clk_hw_get_parent_by_index(hw, i); ++ if (!parent) ++ continue; ++ prate = clk_hw_get_rate(parent); ++ div = bcm2835_clock_choose_div(hw, req->rate, prate, true); ++ rate = bcm2835_clock_rate_from_divisor(clock, prate, div); ++ if (rate > best_rate && rate <= req->rate) { ++ best_parent = parent; ++ best_prate = prate; ++ best_rate = rate; ++ } ++ } ++ ++ if (!best_parent) ++ return -EINVAL; ++ ++ req->best_parent_hw = best_parent; ++ req->best_parent_rate = best_prate; ++ ++ req->rate = best_rate; ++ ++ return 0; ++} ++ ++static int bcm2835_clock_set_parent(struct clk_hw *hw, u8 index) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct bcm2835_cprman *cprman = clock->cprman; ++ const struct bcm2835_clock_data *data = clock->data; ++ u8 src = (index << CM_SRC_SHIFT) & CM_SRC_MASK; ++ ++ cprman_write(cprman, data->ctl_reg, src); ++ return 0; ++} ++ ++static u8 bcm2835_clock_get_parent(struct clk_hw *hw) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct bcm2835_cprman *cprman = clock->cprman; ++ const struct bcm2835_clock_data *data = clock->data; ++ u32 src = cprman_read(cprman, data->ctl_reg); ++ ++ return (src & CM_SRC_MASK) >> CM_SRC_SHIFT; ++} ++ ++ + static const struct clk_ops bcm2835_clock_clk_ops = { + .is_prepared = bcm2835_clock_is_on, + .prepare = bcm2835_clock_on, + .unprepare = bcm2835_clock_off, + .recalc_rate = bcm2835_clock_get_rate, + .set_rate = bcm2835_clock_set_rate, +- .round_rate = bcm2835_clock_round_rate, ++ .determine_rate = bcm2835_clock_determine_rate, ++ .set_parent = bcm2835_clock_set_parent, ++ .get_parent = bcm2835_clock_get_parent, + }; + + static int bcm2835_vpu_clock_is_on(struct clk_hw *hw) +@@ -1319,7 +1371,9 @@ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { + .is_prepared = bcm2835_vpu_clock_is_on, + .recalc_rate = bcm2835_clock_get_rate, + .set_rate = bcm2835_clock_set_rate, +- .round_rate = bcm2835_clock_round_rate, ++ .determine_rate = bcm2835_clock_determine_rate, ++ .set_parent = bcm2835_clock_set_parent, ++ .get_parent = bcm2835_clock_get_parent, + }; + + static struct clk *bcm2835_register_pll(struct bcm2835_cprman *cprman, +@@ -1413,45 +1467,23 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + { + struct bcm2835_clock *clock; + struct clk_init_data init; +- const char *parent; ++ const char *parents[1 << CM_SRC_BITS]; ++ size_t i; + + /* +- * Most of the clock generators have a mux field, so we +- * instantiate a generic mux as our parent to handle it. ++ * Replace our "xosc" references with the oscillator's ++ * actual name. + */ +- if (data->num_mux_parents) { +- const char *parents[1 << CM_SRC_BITS]; +- int i; +- +- parent = devm_kasprintf(cprman->dev, GFP_KERNEL, +- "mux_%s", data->name); +- if (!parent) +- return NULL; +- +- /* +- * Replace our "xosc" references with the oscillator's +- * actual name. +- */ +- for (i = 0; i < data->num_mux_parents; i++) { +- if (strcmp(data->parents[i], "xosc") == 0) +- parents[i] = cprman->osc_name; +- else +- parents[i] = data->parents[i]; +- } +- +- clk_register_mux(cprman->dev, parent, +- parents, data->num_mux_parents, +- CLK_SET_RATE_PARENT, +- cprman->regs + data->ctl_reg, +- CM_SRC_SHIFT, CM_SRC_BITS, +- 0, &cprman->regs_lock); +- } else { +- parent = data->parents[0]; ++ for (i = 0; i < data->num_mux_parents; i++) { ++ if (strcmp(data->parents[i], "xosc") == 0) ++ parents[i] = cprman->osc_name; ++ else ++ parents[i] = data->parents[i]; + } + + memset(&init, 0, sizeof(init)); +- init.parent_names = &parent; +- init.num_parents = 1; ++ init.parent_names = parents; ++ init.num_parents = data->num_mux_parents; + init.name = data->name; + init.flags = CLK_IGNORE_UNUSED; + + +From 8d183fbe1acc384ae75cacaed472fea0f532590e Mon Sep 17 00:00:00 2001 +From: Remi Pommarel +Date: Sun, 6 Dec 2015 17:22:48 +0100 +Subject: [PATCH 254/398] clk: bcm2835: Add PWM clock support + +Register the pwm clock for bcm2835. + +Signed-off-by: Remi Pommarel +Reviewed-by: Eric Anholt +Signed-off-by: Michael Turquette +(cherry picked from commit cfbab8fbab9c330aca963095a439c451ac97c0dd) +--- + drivers/clk/bcm/clk-bcm2835.c | 13 +++++++++++++ + include/dt-bindings/clock/bcm2835.h | 3 ++- + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 529e94a59e6d34df2778b3adcfef76026db3bb8a..670ae1837b72c850cf2fcca75f52e67f8f2c0834 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -807,6 +807,16 @@ static const struct bcm2835_clock_data bcm2835_clock_emmc_data = { + .frac_bits = 8, + }; + ++static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { ++ .name = "pwm", ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), ++ .parents = bcm2835_clock_per_parents, ++ .ctl_reg = CM_PWMCTL, ++ .div_reg = CM_PWMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++}; ++ + struct bcm2835_pll { + struct clk_hw hw; + struct bcm2835_cprman *cprman; +@@ -1601,6 +1611,9 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + cprman->regs + CM_PERIICTL, CM_GATE_BIT, + 0, &cprman->regs_lock); + ++ clks[BCM2835_CLOCK_PWM] = ++ bcm2835_register_clock(cprman, &bcm2835_clock_pwm_data); ++ + return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, + &cprman->onecell); + } +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index d323efac7edf0610fa54d882db26608227bce477..61f1d20c2a6735f2b90c69bcbc68b8a759e3981a 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -43,5 +43,6 @@ + #define BCM2835_CLOCK_TSENS 27 + #define BCM2835_CLOCK_EMMC 28 + #define BCM2835_CLOCK_PERI_IMAGE 29 ++#define BCM2835_CLOCK_PWM 30 + +-#define BCM2835_CLOCK_COUNT 30 ++#define BCM2835_CLOCK_COUNT 31 + +From ee174c95abc84c434a976b2bcc31c3434ae7d85b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 22 Dec 2015 20:13:08 +0000 +Subject: [PATCH 255/398] clk: bcm2835: added missing clock register + definitions + +Added missing CTRL and DIV clock register definitions for: +PCM, SLIM, TCNT, TEC, TD0, TD1 + +Register information taken from: +https://rawgit.com/msperl/rpi-registers/master/rpi-registers.html#CM +which extracted the information from the header files shared by +Broadcom/rpi foundation in this file: +http://www.broadcom.com/docs/support/videocore/Brcm_Android_ICS_Graphics_Stack.tar.gz + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Stephen Boyd +(cherry picked from commit 2103a2156119b30f5924af2a1094227954be4617) +--- + drivers/clk/bcm/clk-bcm2835.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 670ae1837b72c850cf2fcca75f52e67f8f2c0834..282ce03e7d4b52a20546506b95ff536cdf0b0097 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -88,10 +88,23 @@ + #define CM_HSMDIV 0x08c + #define CM_OTPCTL 0x090 + #define CM_OTPDIV 0x094 ++#define CM_PCMCTL 0x098 ++#define CM_PCMDIV 0x09c + #define CM_PWMCTL 0x0a0 + #define CM_PWMDIV 0x0a4 ++#define CM_SLIMCTL 0x0a8 ++#define CM_SLIMDIV 0x0ac + #define CM_SMICTL 0x0b0 + #define CM_SMIDIV 0x0b4 ++/* no definition for 0x0b8 and 0x0bc */ ++#define CM_TCNTCTL 0x0c0 ++#define CM_TCNTDIV 0x0c4 ++#define CM_TECCTL 0x0c8 ++#define CM_TECDIV 0x0cc ++#define CM_TD0CTL 0x0d0 ++#define CM_TD0DIV 0x0d4 ++#define CM_TD1CTL 0x0d8 ++#define CM_TD1DIV 0x0dc + #define CM_TSENSCTL 0x0e0 + #define CM_TSENSDIV 0x0e4 + #define CM_TIMERCTL 0x0e8 + +From f28a592bd09d389ca8638766b317264e0f82e69b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 11:39:21 +0000 +Subject: [PATCH 256/398] clk: bcm2835: correctly enable fractional clock + support + +The current driver calculates the clock divider with +fractional support enabled. + +But it does not enable fractional support in the +control register itself resulting in an integer only divider, +but in clk_set_rate responds back the fractionally divided +clock frequency. + +This patch enables fractional support in the control register +whenever there is a fractional bit set in the requested clock divider. + +Mash clock limits are are also handled for the PWM clock +applying the correct divider limits (2 and max_int) applicable to +basic fractional divider support (mash order of 1). + +It also adds locking to protect the read/modify/write cycle of +the register modification. + +Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the +audio domain clocks") + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 959ca92a3235fc4b17c1e18483fc390b3d612254) +--- + drivers/clk/bcm/clk-bcm2835.c | 45 +++++++++++++++++++++++++++++++++++++------ + 1 file changed, 39 insertions(+), 6 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 282ce03e7d4b52a20546506b95ff536cdf0b0097..2093e7e4aed63b79edac74d5dcceec402ed9f442 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -51,6 +51,7 @@ + #define CM_GNRICCTL 0x000 + #define CM_GNRICDIV 0x004 + # define CM_DIV_FRAC_BITS 12 ++# define CM_DIV_FRAC_MASK GENMASK(CM_DIV_FRAC_BITS - 1, 0) + + #define CM_VPUCTL 0x008 + #define CM_VPUDIV 0x00c +@@ -128,6 +129,7 @@ + # define CM_GATE BIT(CM_GATE_BIT) + # define CM_BUSY BIT(7) + # define CM_BUSYD BIT(8) ++# define CM_FRAC BIT(9) + # define CM_SRC_SHIFT 0 + # define CM_SRC_BITS 4 + # define CM_SRC_MASK 0xf +@@ -647,6 +649,7 @@ struct bcm2835_clock_data { + u32 frac_bits; + + bool is_vpu_clock; ++ bool is_mash_clock; + }; + + static const char *const bcm2835_clock_per_parents[] = { +@@ -828,6 +831,7 @@ static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { + .div_reg = CM_PWMDIV, + .int_bits = 12, + .frac_bits = 12, ++ .is_mash_clock = true, + }; + + struct bcm2835_pll { +@@ -1196,7 +1200,7 @@ static u32 bcm2835_clock_choose_div(struct clk_hw *hw, + GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1; + u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS; + u64 rem; +- u32 div; ++ u32 div, mindiv, maxdiv; + + rem = do_div(temp, rate); + div = temp; +@@ -1206,11 +1210,23 @@ static u32 bcm2835_clock_choose_div(struct clk_hw *hw, + div += unused_frac_mask + 1; + div &= ~unused_frac_mask; + +- /* clamp to min divider of 1 */ +- div = max_t(u32, div, 1 << CM_DIV_FRAC_BITS); +- /* clamp to the highest possible fractional divider */ +- div = min_t(u32, div, GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1, +- CM_DIV_FRAC_BITS - data->frac_bits)); ++ /* different clamping limits apply for a mash clock */ ++ if (data->is_mash_clock) { ++ /* clamp to min divider of 2 */ ++ mindiv = 2 << CM_DIV_FRAC_BITS; ++ /* clamp to the highest possible integer divider */ ++ maxdiv = (BIT(data->int_bits) - 1) << CM_DIV_FRAC_BITS; ++ } else { ++ /* clamp to min divider of 1 */ ++ mindiv = 1 << CM_DIV_FRAC_BITS; ++ /* clamp to the highest possible fractional divider */ ++ maxdiv = GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1, ++ CM_DIV_FRAC_BITS - data->frac_bits); ++ } ++ ++ /* apply the clamping limits */ ++ div = max_t(u32, div, mindiv); ++ div = min_t(u32, div, maxdiv); + + return div; + } +@@ -1304,9 +1320,26 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + struct bcm2835_cprman *cprman = clock->cprman; + const struct bcm2835_clock_data *data = clock->data; + u32 div = bcm2835_clock_choose_div(hw, rate, parent_rate, false); ++ u32 ctl; ++ ++ spin_lock(&cprman->regs_lock); ++ ++ /* ++ * Setting up frac support ++ * ++ * In principle it is recommended to stop/start the clock first, ++ * but as we set CLK_SET_RATE_GATE during registration of the ++ * clock this requirement should be take care of by the ++ * clk-framework. ++ */ ++ ctl = cprman_read(cprman, data->ctl_reg) & ~CM_FRAC; ++ ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0; ++ cprman_write(cprman, data->ctl_reg, ctl); + + cprman_write(cprman, data->div_reg, div); + ++ spin_unlock(&cprman->regs_lock); ++ + return 0; + } + + +From 29b78f5b5d5ed10a89cde1d66e7f7f6dc3ef260c Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 11:39:22 +0000 +Subject: [PATCH 257/398] clk: bcm2835: clean up coding style issues + +Fix all the checkpatch complaints for clk-bcm2835.c + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +(cherry picked from commit 6e1e60dacee7b32aef1468ea461b02e4c7a90a45) +--- + drivers/clk/bcm/clk-bcm2835.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 2093e7e4aed63b79edac74d5dcceec402ed9f442..f76adaa9c0e38183285202d373b8af1f04095b2b 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -12,9 +12,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + /** +@@ -299,7 +296,7 @@ + struct bcm2835_cprman { + struct device *dev; + void __iomem *regs; +- spinlock_t regs_lock; ++ spinlock_t regs_lock; /* spinlock for all clocks */ + const char *osc_name; + + struct clk_onecell_data onecell; +@@ -1344,7 +1341,7 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + } + + static int bcm2835_clock_determine_rate(struct clk_hw *hw, +- struct clk_rate_request *req) ++ struct clk_rate_request *req) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct clk_hw *parent, *best_parent = NULL; +@@ -1402,7 +1399,6 @@ static u8 bcm2835_clock_get_parent(struct clk_hw *hw) + return (src & CM_SRC_MASK) >> CM_SRC_SHIFT; + } + +- + static const struct clk_ops bcm2835_clock_clk_ops = { + .is_prepared = bcm2835_clock_is_on, + .prepare = bcm2835_clock_on, + +From bc93d6079cb8e699ef504792ba924046d7bd6b92 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 14:20:15 +0000 +Subject: [PATCH 258/398] clk: bcm2835: expose raw clock-registers via debugfs + +For debugging purposes under some circumstance +it helps to be able to see the actual clock registers. + +E.g: when looking at the clock divider it is helpful to +see what the actual clock divider is. + +This patch exposes all the clock registers specific to each +clock/pll/pll-divider via debugfs. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Acked-by: Eric Anholt +(cherry picked from commit 96bf9c69d5729781018a00f08e2ae395ec3346b4) +--- + drivers/clk/bcm/clk-bcm2835.c | 101 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 101 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index f76adaa9c0e38183285202d373b8af1f04095b2b..4ea2617e602c81d57cacb48dc685928e24f26218 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -313,6 +314,27 @@ static inline u32 cprman_read(struct bcm2835_cprman *cprman, u32 reg) + return readl(cprman->regs + reg); + } + ++static int bcm2835_debugfs_regset(struct bcm2835_cprman *cprman, u32 base, ++ struct debugfs_reg32 *regs, size_t nregs, ++ struct dentry *dentry) ++{ ++ struct dentry *regdump; ++ struct debugfs_regset32 *regset; ++ ++ regset = devm_kzalloc(cprman->dev, sizeof(*regset), GFP_KERNEL); ++ if (!regset) ++ return -ENOMEM; ++ ++ regset->regs = regs; ++ regset->nregs = nregs; ++ regset->base = cprman->regs + base; ++ ++ regdump = debugfs_create_regset32("regdump", S_IRUGO, dentry, ++ regset); ++ ++ return regdump ? 0 : -ENOMEM; ++} ++ + /* + * These are fixed clocks. They're probably not all root clocks and it may + * be possible to turn them on and off but until this is mapped out better +@@ -1044,6 +1066,36 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw, + return 0; + } + ++static int bcm2835_pll_debug_init(struct clk_hw *hw, ++ struct dentry *dentry) ++{ ++ struct bcm2835_pll *pll = container_of(hw, struct bcm2835_pll, hw); ++ struct bcm2835_cprman *cprman = pll->cprman; ++ const struct bcm2835_pll_data *data = pll->data; ++ struct debugfs_reg32 *regs; ++ ++ regs = devm_kzalloc(cprman->dev, 7 * sizeof(*regs), GFP_KERNEL); ++ if (!regs) ++ return -ENOMEM; ++ ++ regs[0].name = "cm_ctrl"; ++ regs[0].offset = data->cm_ctrl_reg; ++ regs[1].name = "a2w_ctrl"; ++ regs[1].offset = data->a2w_ctrl_reg; ++ regs[2].name = "frac"; ++ regs[2].offset = data->frac_reg; ++ regs[3].name = "ana0"; ++ regs[3].offset = data->ana_reg_base + 0 * 4; ++ regs[4].name = "ana1"; ++ regs[4].offset = data->ana_reg_base + 1 * 4; ++ regs[5].name = "ana2"; ++ regs[5].offset = data->ana_reg_base + 2 * 4; ++ regs[6].name = "ana3"; ++ regs[6].offset = data->ana_reg_base + 3 * 4; ++ ++ return bcm2835_debugfs_regset(cprman, 0, regs, 7, dentry); ++} ++ + static const struct clk_ops bcm2835_pll_clk_ops = { + .is_prepared = bcm2835_pll_is_on, + .prepare = bcm2835_pll_on, +@@ -1051,6 +1103,7 @@ static const struct clk_ops bcm2835_pll_clk_ops = { + .recalc_rate = bcm2835_pll_get_rate, + .set_rate = bcm2835_pll_set_rate, + .round_rate = bcm2835_pll_round_rate, ++ .debug_init = bcm2835_pll_debug_init, + }; + + struct bcm2835_pll_divider { +@@ -1151,6 +1204,26 @@ static int bcm2835_pll_divider_set_rate(struct clk_hw *hw, + return 0; + } + ++static int bcm2835_pll_divider_debug_init(struct clk_hw *hw, ++ struct dentry *dentry) ++{ ++ struct bcm2835_pll_divider *divider = bcm2835_pll_divider_from_hw(hw); ++ struct bcm2835_cprman *cprman = divider->cprman; ++ const struct bcm2835_pll_divider_data *data = divider->data; ++ struct debugfs_reg32 *regs; ++ ++ regs = devm_kzalloc(cprman->dev, 7 * sizeof(*regs), GFP_KERNEL); ++ if (!regs) ++ return -ENOMEM; ++ ++ regs[0].name = "cm"; ++ regs[0].offset = data->cm_reg; ++ regs[1].name = "a2w"; ++ regs[1].offset = data->a2w_reg; ++ ++ return bcm2835_debugfs_regset(cprman, 0, regs, 2, dentry); ++} ++ + static const struct clk_ops bcm2835_pll_divider_clk_ops = { + .is_prepared = bcm2835_pll_divider_is_on, + .prepare = bcm2835_pll_divider_on, +@@ -1158,6 +1231,7 @@ static const struct clk_ops bcm2835_pll_divider_clk_ops = { + .recalc_rate = bcm2835_pll_divider_get_rate, + .set_rate = bcm2835_pll_divider_set_rate, + .round_rate = bcm2835_pll_divider_round_rate, ++ .debug_init = bcm2835_pll_divider_debug_init, + }; + + /* +@@ -1399,6 +1473,31 @@ static u8 bcm2835_clock_get_parent(struct clk_hw *hw) + return (src & CM_SRC_MASK) >> CM_SRC_SHIFT; + } + ++static struct debugfs_reg32 bcm2835_debugfs_clock_reg32[] = { ++ { ++ .name = "ctl", ++ .offset = 0, ++ }, ++ { ++ .name = "div", ++ .offset = 4, ++ }, ++}; ++ ++static int bcm2835_clock_debug_init(struct clk_hw *hw, ++ struct dentry *dentry) ++{ ++ struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); ++ struct bcm2835_cprman *cprman = clock->cprman; ++ const struct bcm2835_clock_data *data = clock->data; ++ ++ return bcm2835_debugfs_regset( ++ cprman, data->ctl_reg, ++ bcm2835_debugfs_clock_reg32, ++ ARRAY_SIZE(bcm2835_debugfs_clock_reg32), ++ dentry); ++} ++ + static const struct clk_ops bcm2835_clock_clk_ops = { + .is_prepared = bcm2835_clock_is_on, + .prepare = bcm2835_clock_on, +@@ -1408,6 +1507,7 @@ static const struct clk_ops bcm2835_clock_clk_ops = { + .determine_rate = bcm2835_clock_determine_rate, + .set_parent = bcm2835_clock_set_parent, + .get_parent = bcm2835_clock_get_parent, ++ .debug_init = bcm2835_clock_debug_init, + }; + + static int bcm2835_vpu_clock_is_on(struct clk_hw *hw) +@@ -1426,6 +1526,7 @@ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { + .determine_rate = bcm2835_clock_determine_rate, + .set_parent = bcm2835_clock_set_parent, + .get_parent = bcm2835_clock_get_parent, ++ .debug_init = bcm2835_clock_debug_init, + }; + + static struct clk *bcm2835_register_pll(struct bcm2835_cprman *cprman, + +From d84d3c429a0c0aba749ef9f3f3444b091b2ce9d4 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 12:51:41 +0000 +Subject: [PATCH 259/398] clk: bcm2835: remove use of BCM2835_CLOCK_COUNT in + driver + +As the use of BCM2835_CLOCK_COUNT in +include/dt-bindings/clock/bcm2835.h is frowned upon as +it needs to get modified every time a new clock gets introduced +this patch changes the clk-bcm2835 driver to use a different +scheme for registration of clocks and pll, so that there +is no more need for BCM2835_CLOCK_COUNT to be defined. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 56eb3a2ed9726961e1bcfa69d4a3f86d68f0eb52) +--- + drivers/clk/bcm/clk-bcm2835.c | 167 ++++++++++++++++++++---------------- + include/dt-bindings/clock/bcm2835.h | 2 - + 2 files changed, 94 insertions(+), 75 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 4ea2617e602c81d57cacb48dc685928e24f26218..a1eff0543363e792042ebacfdc53bd9be2ada41a 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -301,7 +301,7 @@ struct bcm2835_cprman { + const char *osc_name; + + struct clk_onecell_data onecell; +- struct clk *clks[BCM2835_CLOCK_COUNT]; ++ struct clk *clks[]; + }; + + static inline void cprman_write(struct bcm2835_cprman *cprman, u32 reg, u32 val) +@@ -853,6 +853,25 @@ static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { + .is_mash_clock = true, + }; + ++struct bcm2835_gate_data { ++ const char *name; ++ const char *parent; ++ ++ u32 ctl_reg; ++}; ++ ++/* ++ * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if ++ * you have the debug bit set in the power manager, which we ++ * don't bother exposing) are individual gates off of the ++ * non-stop vpu clock. ++ */ ++static const struct bcm2835_gate_data bcm2835_clock_peri_image_data = { ++ .name = "peri_image", ++ .parent = "vpu", ++ .ctl_reg = CM_PERIICTL, ++}; ++ + struct bcm2835_pll { + struct clk_hw hw; + struct bcm2835_cprman *cprman; +@@ -1658,14 +1677,81 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + return devm_clk_register(cprman->dev, &clock->hw); + } + ++static struct clk *bcm2835_register_gate(struct bcm2835_cprman *cprman, ++ const struct bcm2835_gate_data *data) ++{ ++ return clk_register_gate(cprman->dev, data->name, data->parent, ++ CLK_IGNORE_UNUSED | CLK_SET_RATE_GATE, ++ cprman->regs + data->ctl_reg, ++ CM_GATE_BIT, 0, &cprman->regs_lock); ++} ++ ++typedef struct clk *(*bcm2835_clk_register)(struct bcm2835_cprman *cprman, ++ const void *data); ++struct bcm2835_clk_desc { ++ bcm2835_clk_register clk_register; ++ const void *data; ++}; ++ ++#define _REGISTER(f, d) { .clk_register = (bcm2835_clk_register)f, \ ++ .data = d } ++#define REGISTER_PLL(d) _REGISTER(&bcm2835_register_pll, d) ++#define REGISTER_PLL_DIV(d) _REGISTER(&bcm2835_register_pll_divider, d) ++#define REGISTER_CLK(d) _REGISTER(&bcm2835_register_clock, d) ++#define REGISTER_GATE(d) _REGISTER(&bcm2835_register_gate, d) ++ ++static const struct bcm2835_clk_desc clk_desc_array[] = { ++ /* register PLL */ ++ [BCM2835_PLLA] = REGISTER_PLL(&bcm2835_plla_data), ++ [BCM2835_PLLB] = REGISTER_PLL(&bcm2835_pllb_data), ++ [BCM2835_PLLC] = REGISTER_PLL(&bcm2835_pllc_data), ++ [BCM2835_PLLD] = REGISTER_PLL(&bcm2835_plld_data), ++ [BCM2835_PLLH] = REGISTER_PLL(&bcm2835_pllh_data), ++ /* the PLL dividers */ ++ [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV(&bcm2835_plla_core_data), ++ [BCM2835_PLLA_PER] = REGISTER_PLL_DIV(&bcm2835_plla_per_data), ++ [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV(&bcm2835_pllc_core0_data), ++ [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV(&bcm2835_pllc_core1_data), ++ [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV(&bcm2835_pllc_core2_data), ++ [BCM2835_PLLC_PER] = REGISTER_PLL_DIV(&bcm2835_pllc_per_data), ++ [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV(&bcm2835_plld_core_data), ++ [BCM2835_PLLD_PER] = REGISTER_PLL_DIV(&bcm2835_plld_per_data), ++ [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV(&bcm2835_pllh_rcal_data), ++ [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV(&bcm2835_pllh_aux_data), ++ [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV(&bcm2835_pllh_pix_data), ++ /* the clocks */ ++ [BCM2835_CLOCK_TIMER] = REGISTER_CLK(&bcm2835_clock_timer_data), ++ [BCM2835_CLOCK_OTP] = REGISTER_CLK(&bcm2835_clock_otp_data), ++ [BCM2835_CLOCK_TSENS] = REGISTER_CLK(&bcm2835_clock_tsens_data), ++ [BCM2835_CLOCK_VPU] = REGISTER_CLK(&bcm2835_clock_vpu_data), ++ [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), ++ [BCM2835_CLOCK_ISP] = REGISTER_CLK(&bcm2835_clock_isp_data), ++ [BCM2835_CLOCK_H264] = REGISTER_CLK(&bcm2835_clock_h264_data), ++ [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), ++ [BCM2835_CLOCK_SDRAM] = REGISTER_CLK(&bcm2835_clock_sdram_data), ++ [BCM2835_CLOCK_UART] = REGISTER_CLK(&bcm2835_clock_uart_data), ++ [BCM2835_CLOCK_VEC] = REGISTER_CLK(&bcm2835_clock_vec_data), ++ [BCM2835_CLOCK_HSM] = REGISTER_CLK(&bcm2835_clock_hsm_data), ++ [BCM2835_CLOCK_EMMC] = REGISTER_CLK(&bcm2835_clock_emmc_data), ++ [BCM2835_CLOCK_PWM] = REGISTER_CLK(&bcm2835_clock_pwm_data), ++ /* the gates */ ++ [BCM2835_CLOCK_PERI_IMAGE] = REGISTER_GATE( ++ &bcm2835_clock_peri_image_data), ++}; ++ + static int bcm2835_clk_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; + struct clk **clks; + struct bcm2835_cprman *cprman; + struct resource *res; ++ const struct bcm2835_clk_desc *desc; ++ const size_t asize = ARRAY_SIZE(clk_desc_array); ++ size_t i; + +- cprman = devm_kzalloc(dev, sizeof(*cprman), GFP_KERNEL); ++ cprman = devm_kzalloc(dev, ++ sizeof(*cprman) + asize * sizeof(*clks), ++ GFP_KERNEL); + if (!cprman) + return -ENOMEM; + +@@ -1682,80 +1768,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + + platform_set_drvdata(pdev, cprman); + +- cprman->onecell.clk_num = BCM2835_CLOCK_COUNT; ++ cprman->onecell.clk_num = asize; + cprman->onecell.clks = cprman->clks; + clks = cprman->clks; + +- clks[BCM2835_PLLA] = bcm2835_register_pll(cprman, &bcm2835_plla_data); +- clks[BCM2835_PLLB] = bcm2835_register_pll(cprman, &bcm2835_pllb_data); +- clks[BCM2835_PLLC] = bcm2835_register_pll(cprman, &bcm2835_pllc_data); +- clks[BCM2835_PLLD] = bcm2835_register_pll(cprman, &bcm2835_plld_data); +- clks[BCM2835_PLLH] = bcm2835_register_pll(cprman, &bcm2835_pllh_data); +- +- clks[BCM2835_PLLA_CORE] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plla_core_data); +- clks[BCM2835_PLLA_PER] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plla_per_data); +- clks[BCM2835_PLLC_CORE0] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_core0_data); +- clks[BCM2835_PLLC_CORE1] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_core1_data); +- clks[BCM2835_PLLC_CORE2] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_core2_data); +- clks[BCM2835_PLLC_PER] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllc_per_data); +- clks[BCM2835_PLLD_CORE] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plld_core_data); +- clks[BCM2835_PLLD_PER] = +- bcm2835_register_pll_divider(cprman, &bcm2835_plld_per_data); +- clks[BCM2835_PLLH_RCAL] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllh_rcal_data); +- clks[BCM2835_PLLH_AUX] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllh_aux_data); +- clks[BCM2835_PLLH_PIX] = +- bcm2835_register_pll_divider(cprman, &bcm2835_pllh_pix_data); +- +- clks[BCM2835_CLOCK_TIMER] = +- bcm2835_register_clock(cprman, &bcm2835_clock_timer_data); +- clks[BCM2835_CLOCK_OTP] = +- bcm2835_register_clock(cprman, &bcm2835_clock_otp_data); +- clks[BCM2835_CLOCK_TSENS] = +- bcm2835_register_clock(cprman, &bcm2835_clock_tsens_data); +- clks[BCM2835_CLOCK_VPU] = +- bcm2835_register_clock(cprman, &bcm2835_clock_vpu_data); +- clks[BCM2835_CLOCK_V3D] = +- bcm2835_register_clock(cprman, &bcm2835_clock_v3d_data); +- clks[BCM2835_CLOCK_ISP] = +- bcm2835_register_clock(cprman, &bcm2835_clock_isp_data); +- clks[BCM2835_CLOCK_H264] = +- bcm2835_register_clock(cprman, &bcm2835_clock_h264_data); +- clks[BCM2835_CLOCK_V3D] = +- bcm2835_register_clock(cprman, &bcm2835_clock_v3d_data); +- clks[BCM2835_CLOCK_SDRAM] = +- bcm2835_register_clock(cprman, &bcm2835_clock_sdram_data); +- clks[BCM2835_CLOCK_UART] = +- bcm2835_register_clock(cprman, &bcm2835_clock_uart_data); +- clks[BCM2835_CLOCK_VEC] = +- bcm2835_register_clock(cprman, &bcm2835_clock_vec_data); +- clks[BCM2835_CLOCK_HSM] = +- bcm2835_register_clock(cprman, &bcm2835_clock_hsm_data); +- clks[BCM2835_CLOCK_EMMC] = +- bcm2835_register_clock(cprman, &bcm2835_clock_emmc_data); +- +- /* +- * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if +- * you have the debug bit set in the power manager, which we +- * don't bother exposing) are individual gates off of the +- * non-stop vpu clock. +- */ +- clks[BCM2835_CLOCK_PERI_IMAGE] = +- clk_register_gate(dev, "peri_image", "vpu", +- CLK_IGNORE_UNUSED | CLK_SET_RATE_GATE, +- cprman->regs + CM_PERIICTL, CM_GATE_BIT, +- 0, &cprman->regs_lock); +- +- clks[BCM2835_CLOCK_PWM] = +- bcm2835_register_clock(cprman, &bcm2835_clock_pwm_data); ++ for (i = 0; i < asize; i++) { ++ desc = &clk_desc_array[i]; ++ if (desc->clk_register && desc->data) ++ clks[i] = desc->clk_register(cprman, desc->data); ++ } + + return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, + &cprman->onecell); +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index 61f1d20c2a6735f2b90c69bcbc68b8a759e3981a..87235ac76ef102c749e3912b43bce5fc47b24f91 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -44,5 +44,3 @@ + #define BCM2835_CLOCK_EMMC 28 + #define BCM2835_CLOCK_PERI_IMAGE 29 + #define BCM2835_CLOCK_PWM 30 +- +-#define BCM2835_CLOCK_COUNT 31 + +From 42ab3c62e347846044a590a8aa3ec740d1127cf3 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 12:51:42 +0000 +Subject: [PATCH 260/398] clk: bcm2835: reorganize bcm2835_clock_array + assignment + +Reorganize bcm2835_clock_array so that there is no more +need for separate bcm2835_*_data structures to be defined. +Instead the required structures are generated inline via +helper macros. + +To allow this to also work for pll alone it was required that +the parent_pll was changed from a pointer to bcm2835_pll_data +to the name of the pll instead. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 3b15afefbef9b5952e3d68ad73d93f981b9faca8) +--- + drivers/clk/bcm/clk-bcm2835.c | 852 +++++++++++++++++++----------------------- + 1 file changed, 393 insertions(+), 459 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index a1eff0543363e792042ebacfdc53bd9be2ada41a..a85030e21e017a1a437971ea0b478c134607b237 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -418,115 +418,10 @@ static const struct bcm2835_pll_ana_bits bcm2835_ana_pllh = { + .fb_prediv_mask = BIT(11), + }; + +-/* +- * PLLA is the auxiliary PLL, used to drive the CCP2 (Compact Camera +- * Port 2) transmitter clock. +- * +- * It is in the PX LDO power domain, which is on when the AUDIO domain +- * is on. +- */ +-static const struct bcm2835_pll_data bcm2835_plla_data = { +- .name = "plla", +- .cm_ctrl_reg = CM_PLLA, +- .a2w_ctrl_reg = A2W_PLLA_CTRL, +- .frac_reg = A2W_PLLA_FRAC, +- .ana_reg_base = A2W_PLLA_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLA_ENABLE, +- .lock_mask = CM_LOCK_FLOCKA, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 2400000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* PLLB is used for the ARM's clock. */ +-static const struct bcm2835_pll_data bcm2835_pllb_data = { +- .name = "pllb", +- .cm_ctrl_reg = CM_PLLB, +- .a2w_ctrl_reg = A2W_PLLB_CTRL, +- .frac_reg = A2W_PLLB_FRAC, +- .ana_reg_base = A2W_PLLB_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLB_ENABLE, +- .lock_mask = CM_LOCK_FLOCKB, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 3000000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* +- * PLLC is the core PLL, used to drive the core VPU clock. +- * +- * It is in the PX LDO power domain, which is on when the AUDIO domain +- * is on. +-*/ +-static const struct bcm2835_pll_data bcm2835_pllc_data = { +- .name = "pllc", +- .cm_ctrl_reg = CM_PLLC, +- .a2w_ctrl_reg = A2W_PLLC_CTRL, +- .frac_reg = A2W_PLLC_FRAC, +- .ana_reg_base = A2W_PLLC_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, +- .lock_mask = CM_LOCK_FLOCKC, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 3000000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* +- * PLLD is the display PLL, used to drive DSI display panels. +- * +- * It is in the PX LDO power domain, which is on when the AUDIO domain +- * is on. +- */ +-static const struct bcm2835_pll_data bcm2835_plld_data = { +- .name = "plld", +- .cm_ctrl_reg = CM_PLLD, +- .a2w_ctrl_reg = A2W_PLLD_CTRL, +- .frac_reg = A2W_PLLD_FRAC, +- .ana_reg_base = A2W_PLLD_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_DDR_ENABLE, +- .lock_mask = CM_LOCK_FLOCKD, +- +- .ana = &bcm2835_ana_default, +- +- .min_rate = 600000000u, +- .max_rate = 2400000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- +-/* +- * PLLH is used to supply the pixel clock or the AUX clock for the TV +- * encoder. +- * +- * It is in the HDMI power domain. +- */ +-static const struct bcm2835_pll_data bcm2835_pllh_data = { +- "pllh", +- .cm_ctrl_reg = CM_PLLH, +- .a2w_ctrl_reg = A2W_PLLH_CTRL, +- .frac_reg = A2W_PLLH_FRAC, +- .ana_reg_base = A2W_PLLH_ANA0, +- .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, +- .lock_mask = CM_LOCK_FLOCKH, +- +- .ana = &bcm2835_ana_pllh, +- +- .min_rate = 600000000u, +- .max_rate = 3000000000u, +- .max_fb_rate = BCM2835_MAX_FB_RATE, +-}; +- + struct bcm2835_pll_divider_data { + const char *name; +- const struct bcm2835_pll_data *source_pll; ++ const char *source_pll; ++ + u32 cm_reg; + u32 a2w_reg; + +@@ -535,124 +430,6 @@ struct bcm2835_pll_divider_data { + u32 fixed_divider; + }; + +-static const struct bcm2835_pll_divider_data bcm2835_plla_core_data = { +- .name = "plla_core", +- .source_pll = &bcm2835_plla_data, +- .cm_reg = CM_PLLA, +- .a2w_reg = A2W_PLLA_CORE, +- .load_mask = CM_PLLA_LOADCORE, +- .hold_mask = CM_PLLA_HOLDCORE, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_plla_per_data = { +- .name = "plla_per", +- .source_pll = &bcm2835_plla_data, +- .cm_reg = CM_PLLA, +- .a2w_reg = A2W_PLLA_PER, +- .load_mask = CM_PLLA_LOADPER, +- .hold_mask = CM_PLLA_HOLDPER, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllb_arm_data = { +- .name = "pllb_arm", +- .source_pll = &bcm2835_pllb_data, +- .cm_reg = CM_PLLB, +- .a2w_reg = A2W_PLLB_ARM, +- .load_mask = CM_PLLB_LOADARM, +- .hold_mask = CM_PLLB_HOLDARM, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_core0_data = { +- .name = "pllc_core0", +- .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, +- .a2w_reg = A2W_PLLC_CORE0, +- .load_mask = CM_PLLC_LOADCORE0, +- .hold_mask = CM_PLLC_HOLDCORE0, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_core1_data = { +- .name = "pllc_core1", .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, A2W_PLLC_CORE1, +- .load_mask = CM_PLLC_LOADCORE1, +- .hold_mask = CM_PLLC_HOLDCORE1, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_core2_data = { +- .name = "pllc_core2", +- .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, +- .a2w_reg = A2W_PLLC_CORE2, +- .load_mask = CM_PLLC_LOADCORE2, +- .hold_mask = CM_PLLC_HOLDCORE2, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllc_per_data = { +- .name = "pllc_per", +- .source_pll = &bcm2835_pllc_data, +- .cm_reg = CM_PLLC, +- .a2w_reg = A2W_PLLC_PER, +- .load_mask = CM_PLLC_LOADPER, +- .hold_mask = CM_PLLC_HOLDPER, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_plld_core_data = { +- .name = "plld_core", +- .source_pll = &bcm2835_plld_data, +- .cm_reg = CM_PLLD, +- .a2w_reg = A2W_PLLD_CORE, +- .load_mask = CM_PLLD_LOADCORE, +- .hold_mask = CM_PLLD_HOLDCORE, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_plld_per_data = { +- .name = "plld_per", +- .source_pll = &bcm2835_plld_data, +- .cm_reg = CM_PLLD, +- .a2w_reg = A2W_PLLD_PER, +- .load_mask = CM_PLLD_LOADPER, +- .hold_mask = CM_PLLD_HOLDPER, +- .fixed_divider = 1, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllh_rcal_data = { +- .name = "pllh_rcal", +- .source_pll = &bcm2835_pllh_data, +- .cm_reg = CM_PLLH, +- .a2w_reg = A2W_PLLH_RCAL, +- .load_mask = CM_PLLH_LOADRCAL, +- .hold_mask = 0, +- .fixed_divider = 10, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllh_aux_data = { +- .name = "pllh_aux", +- .source_pll = &bcm2835_pllh_data, +- .cm_reg = CM_PLLH, +- .a2w_reg = A2W_PLLH_AUX, +- .load_mask = CM_PLLH_LOADAUX, +- .hold_mask = 0, +- .fixed_divider = 10, +-}; +- +-static const struct bcm2835_pll_divider_data bcm2835_pllh_pix_data = { +- .name = "pllh_pix", +- .source_pll = &bcm2835_pllh_data, +- .cm_reg = CM_PLLH, +- .a2w_reg = A2W_PLLH_PIX, +- .load_mask = CM_PLLH_LOADPIX, +- .hold_mask = 0, +- .fixed_divider = 10, +-}; +- + struct bcm2835_clock_data { + const char *name; + +@@ -671,188 +448,6 @@ struct bcm2835_clock_data { + bool is_mash_clock; + }; + +-static const char *const bcm2835_clock_per_parents[] = { +- "gnd", +- "xosc", +- "testdebug0", +- "testdebug1", +- "plla_per", +- "pllc_per", +- "plld_per", +- "pllh_aux", +-}; +- +-static const char *const bcm2835_clock_vpu_parents[] = { +- "gnd", +- "xosc", +- "testdebug0", +- "testdebug1", +- "plla_core", +- "pllc_core0", +- "plld_core", +- "pllh_aux", +- "pllc_core1", +- "pllc_core2", +-}; +- +-static const char *const bcm2835_clock_osc_parents[] = { +- "gnd", +- "xosc", +- "testdebug0", +- "testdebug1" +-}; +- +-/* +- * Used for a 1Mhz clock for the system clocksource, and also used by +- * the watchdog timer and the camera pulse generator. +- */ +-static const struct bcm2835_clock_data bcm2835_clock_timer_data = { +- .name = "timer", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), +- .parents = bcm2835_clock_osc_parents, +- .ctl_reg = CM_TIMERCTL, +- .div_reg = CM_TIMERDIV, +- .int_bits = 6, +- .frac_bits = 12, +-}; +- +-/* One Time Programmable Memory clock. Maximum 10Mhz. */ +-static const struct bcm2835_clock_data bcm2835_clock_otp_data = { +- .name = "otp", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), +- .parents = bcm2835_clock_osc_parents, +- .ctl_reg = CM_OTPCTL, +- .div_reg = CM_OTPDIV, +- .int_bits = 4, +- .frac_bits = 0, +-}; +- +-/* +- * VPU clock. This doesn't have an enable bit, since it drives the +- * bus for everything else, and is special so it doesn't need to be +- * gated for rate changes. It is also known as "clk_audio" in various +- * hardware documentation. +- */ +-static const struct bcm2835_clock_data bcm2835_clock_vpu_data = { +- .name = "vpu", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_VPUCTL, +- .div_reg = CM_VPUDIV, +- .int_bits = 12, +- .frac_bits = 8, +- .is_vpu_clock = true, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_v3d_data = { +- .name = "v3d", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_V3DCTL, +- .div_reg = CM_V3DDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_isp_data = { +- .name = "isp", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_ISPCTL, +- .div_reg = CM_ISPDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_h264_data = { +- .name = "h264", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_H264CTL, +- .div_reg = CM_H264DIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-/* TV encoder clock. Only operating frequency is 108Mhz. */ +-static const struct bcm2835_clock_data bcm2835_clock_vec_data = { +- .name = "vec", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_VECCTL, +- .div_reg = CM_VECDIV, +- .int_bits = 4, +- .frac_bits = 0, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_uart_data = { +- .name = "uart", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_UARTCTL, +- .div_reg = CM_UARTDIV, +- .int_bits = 10, +- .frac_bits = 12, +-}; +- +-/* HDMI state machine */ +-static const struct bcm2835_clock_data bcm2835_clock_hsm_data = { +- .name = "hsm", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_HSMCTL, +- .div_reg = CM_HSMDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-/* +- * Secondary SDRAM clock. Used for low-voltage modes when the PLL in +- * the SDRAM controller can't be used. +- */ +-static const struct bcm2835_clock_data bcm2835_clock_sdram_data = { +- .name = "sdram", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), +- .parents = bcm2835_clock_vpu_parents, +- .ctl_reg = CM_SDCCTL, +- .div_reg = CM_SDCDIV, +- .int_bits = 6, +- .frac_bits = 0, +-}; +- +-/* Clock for the temperature sensor. Generally run at 2Mhz, max 5Mhz. */ +-static const struct bcm2835_clock_data bcm2835_clock_tsens_data = { +- .name = "tsens", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), +- .parents = bcm2835_clock_osc_parents, +- .ctl_reg = CM_TSENSCTL, +- .div_reg = CM_TSENSDIV, +- .int_bits = 5, +- .frac_bits = 0, +-}; +- +-/* Arasan EMMC clock */ +-static const struct bcm2835_clock_data bcm2835_clock_emmc_data = { +- .name = "emmc", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_EMMCCTL, +- .div_reg = CM_EMMCDIV, +- .int_bits = 4, +- .frac_bits = 8, +-}; +- +-static const struct bcm2835_clock_data bcm2835_clock_pwm_data = { +- .name = "pwm", +- .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), +- .parents = bcm2835_clock_per_parents, +- .ctl_reg = CM_PWMCTL, +- .div_reg = CM_PWMDIV, +- .int_bits = 12, +- .frac_bits = 12, +- .is_mash_clock = true, +-}; +- + struct bcm2835_gate_data { + const char *name; + const char *parent; +@@ -860,18 +455,6 @@ struct bcm2835_gate_data { + u32 ctl_reg; + }; + +-/* +- * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if +- * you have the debug bit set in the power manager, which we +- * don't bother exposing) are individual gates off of the +- * non-stop vpu clock. +- */ +-static const struct bcm2835_gate_data bcm2835_clock_peri_image_data = { +- .name = "peri_image", +- .parent = "vpu", +- .ctl_reg = CM_PERIICTL, +-}; +- + struct bcm2835_pll { + struct clk_hw hw; + struct bcm2835_cprman *cprman; +@@ -1594,7 +1177,7 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, + + memset(&init, 0, sizeof(init)); + +- init.parent_names = &data->source_pll->name; ++ init.parent_names = &data->source_pll; + init.num_parents = 1; + init.name = divider_name; + init.ops = &bcm2835_pll_divider_clk_ops; +@@ -1693,50 +1276,401 @@ struct bcm2835_clk_desc { + const void *data; + }; + +-#define _REGISTER(f, d) { .clk_register = (bcm2835_clk_register)f, \ +- .data = d } +-#define REGISTER_PLL(d) _REGISTER(&bcm2835_register_pll, d) +-#define REGISTER_PLL_DIV(d) _REGISTER(&bcm2835_register_pll_divider, d) +-#define REGISTER_CLK(d) _REGISTER(&bcm2835_register_clock, d) +-#define REGISTER_GATE(d) _REGISTER(&bcm2835_register_gate, d) ++/* assignment helper macros for different clock types */ ++#define _REGISTER(f, ...) { .clk_register = (bcm2835_clk_register)f, \ ++ .data = __VA_ARGS__ } ++#define REGISTER_PLL(...) _REGISTER(&bcm2835_register_pll, \ ++ &(struct bcm2835_pll_data) \ ++ {__VA_ARGS__}) ++#define REGISTER_PLL_DIV(...) _REGISTER(&bcm2835_register_pll_divider, \ ++ &(struct bcm2835_pll_divider_data) \ ++ {__VA_ARGS__}) ++#define REGISTER_CLK(...) _REGISTER(&bcm2835_register_clock, \ ++ &(struct bcm2835_clock_data) \ ++ {__VA_ARGS__}) ++#define REGISTER_GATE(...) _REGISTER(&bcm2835_register_gate, \ ++ &(struct bcm2835_gate_data) \ ++ {__VA_ARGS__}) ++ ++/* parent mux arrays plus helper macros */ ++ ++/* main oscillator parent mux */ ++static const char *const bcm2835_clock_osc_parents[] = { ++ "gnd", ++ "xosc", ++ "testdebug0", ++ "testdebug1" ++}; ++ ++#define REGISTER_OSC_CLK(...) REGISTER_CLK( \ ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), \ ++ .parents = bcm2835_clock_osc_parents, \ ++ __VA_ARGS__) ++ ++/* main peripherial parent mux */ ++static const char *const bcm2835_clock_per_parents[] = { ++ "gnd", ++ "xosc", ++ "testdebug0", ++ "testdebug1", ++ "plla_per", ++ "pllc_per", ++ "plld_per", ++ "pllh_aux", ++}; ++ ++#define REGISTER_PER_CLK(...) REGISTER_CLK( \ ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \ ++ .parents = bcm2835_clock_per_parents, \ ++ __VA_ARGS__) + ++/* main vpu parent mux */ ++static const char *const bcm2835_clock_vpu_parents[] = { ++ "gnd", ++ "xosc", ++ "testdebug0", ++ "testdebug1", ++ "plla_core", ++ "pllc_core0", ++ "plld_core", ++ "pllh_aux", ++ "pllc_core1", ++ "pllc_core2", ++}; ++ ++#define REGISTER_VPU_CLK(...) REGISTER_CLK( \ ++ .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), \ ++ .parents = bcm2835_clock_vpu_parents, \ ++ __VA_ARGS__) ++ ++/* ++ * the real definition of all the pll, pll_dividers and clocks ++ * these make use of the above REGISTER_* macros ++ */ + static const struct bcm2835_clk_desc clk_desc_array[] = { +- /* register PLL */ +- [BCM2835_PLLA] = REGISTER_PLL(&bcm2835_plla_data), +- [BCM2835_PLLB] = REGISTER_PLL(&bcm2835_pllb_data), +- [BCM2835_PLLC] = REGISTER_PLL(&bcm2835_pllc_data), +- [BCM2835_PLLD] = REGISTER_PLL(&bcm2835_plld_data), +- [BCM2835_PLLH] = REGISTER_PLL(&bcm2835_pllh_data), +- /* the PLL dividers */ +- [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV(&bcm2835_plla_core_data), +- [BCM2835_PLLA_PER] = REGISTER_PLL_DIV(&bcm2835_plla_per_data), +- [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV(&bcm2835_pllc_core0_data), +- [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV(&bcm2835_pllc_core1_data), +- [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV(&bcm2835_pllc_core2_data), +- [BCM2835_PLLC_PER] = REGISTER_PLL_DIV(&bcm2835_pllc_per_data), +- [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV(&bcm2835_plld_core_data), +- [BCM2835_PLLD_PER] = REGISTER_PLL_DIV(&bcm2835_plld_per_data), +- [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV(&bcm2835_pllh_rcal_data), +- [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV(&bcm2835_pllh_aux_data), +- [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV(&bcm2835_pllh_pix_data), ++ /* the PLL + PLL dividers */ ++ ++ /* ++ * PLLA is the auxiliary PLL, used to drive the CCP2 ++ * (Compact Camera Port 2) transmitter clock. ++ * ++ * It is in the PX LDO power domain, which is on when the ++ * AUDIO domain is on. ++ */ ++ [BCM2835_PLLA] = REGISTER_PLL( ++ .name = "plla", ++ .cm_ctrl_reg = CM_PLLA, ++ .a2w_ctrl_reg = A2W_PLLA_CTRL, ++ .frac_reg = A2W_PLLA_FRAC, ++ .ana_reg_base = A2W_PLLA_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLA_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKA, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 2400000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV( ++ .name = "plla_core", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_CORE, ++ .load_mask = CM_PLLA_LOADCORE, ++ .hold_mask = CM_PLLA_HOLDCORE, ++ .fixed_divider = 1), ++ [BCM2835_PLLA_PER] = REGISTER_PLL_DIV( ++ .name = "plla_per", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_PER, ++ .load_mask = CM_PLLA_LOADPER, ++ .hold_mask = CM_PLLA_HOLDPER, ++ .fixed_divider = 1), ++ ++ /* PLLB is used for the ARM's clock. */ ++ [BCM2835_PLLB] = REGISTER_PLL( ++ .name = "pllb", ++ .cm_ctrl_reg = CM_PLLB, ++ .a2w_ctrl_reg = A2W_PLLB_CTRL, ++ .frac_reg = A2W_PLLB_FRAC, ++ .ana_reg_base = A2W_PLLB_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLB_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKB, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 3000000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLB_ARM] = REGISTER_PLL_DIV( ++ .name = "pllb_arm", ++ .source_pll = "pllb", ++ .cm_reg = CM_PLLB, ++ .a2w_reg = A2W_PLLB_ARM, ++ .load_mask = CM_PLLB_LOADARM, ++ .hold_mask = CM_PLLB_HOLDARM, ++ .fixed_divider = 1), ++ ++ /* ++ * PLLC is the core PLL, used to drive the core VPU clock. ++ * ++ * It is in the PX LDO power domain, which is on when the ++ * AUDIO domain is on. ++ */ ++ [BCM2835_PLLC] = REGISTER_PLL( ++ .name = "pllc", ++ .cm_ctrl_reg = CM_PLLC, ++ .a2w_ctrl_reg = A2W_PLLC_CTRL, ++ .frac_reg = A2W_PLLC_FRAC, ++ .ana_reg_base = A2W_PLLC_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKC, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 3000000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV( ++ .name = "pllc_core0", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_CORE0, ++ .load_mask = CM_PLLC_LOADCORE0, ++ .hold_mask = CM_PLLC_HOLDCORE0, ++ .fixed_divider = 1), ++ [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV( ++ .name = "pllc_core1", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_CORE1, ++ .load_mask = CM_PLLC_LOADCORE1, ++ .hold_mask = CM_PLLC_HOLDCORE1, ++ .fixed_divider = 1), ++ [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV( ++ .name = "pllc_core2", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_CORE2, ++ .load_mask = CM_PLLC_LOADCORE2, ++ .hold_mask = CM_PLLC_HOLDCORE2, ++ .fixed_divider = 1), ++ [BCM2835_PLLC_PER] = REGISTER_PLL_DIV( ++ .name = "pllc_per", ++ .source_pll = "pllc", ++ .cm_reg = CM_PLLC, ++ .a2w_reg = A2W_PLLC_PER, ++ .load_mask = CM_PLLC_LOADPER, ++ .hold_mask = CM_PLLC_HOLDPER, ++ .fixed_divider = 1), ++ ++ /* ++ * PLLD is the display PLL, used to drive DSI display panels. ++ * ++ * It is in the PX LDO power domain, which is on when the ++ * AUDIO domain is on. ++ */ ++ [BCM2835_PLLD] = REGISTER_PLL( ++ .name = "plld", ++ .cm_ctrl_reg = CM_PLLD, ++ .a2w_ctrl_reg = A2W_PLLD_CTRL, ++ .frac_reg = A2W_PLLD_FRAC, ++ .ana_reg_base = A2W_PLLD_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_DDR_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKD, ++ ++ .ana = &bcm2835_ana_default, ++ ++ .min_rate = 600000000u, ++ .max_rate = 2400000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV( ++ .name = "plld_core", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_CORE, ++ .load_mask = CM_PLLD_LOADCORE, ++ .hold_mask = CM_PLLD_HOLDCORE, ++ .fixed_divider = 1), ++ [BCM2835_PLLD_PER] = REGISTER_PLL_DIV( ++ .name = "plld_per", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_PER, ++ .load_mask = CM_PLLD_LOADPER, ++ .hold_mask = CM_PLLD_HOLDPER, ++ .fixed_divider = 1), ++ ++ /* ++ * PLLH is used to supply the pixel clock or the AUX clock for the ++ * TV encoder. ++ * ++ * It is in the HDMI power domain. ++ */ ++ [BCM2835_PLLH] = REGISTER_PLL( ++ "pllh", ++ .cm_ctrl_reg = CM_PLLH, ++ .a2w_ctrl_reg = A2W_PLLH_CTRL, ++ .frac_reg = A2W_PLLH_FRAC, ++ .ana_reg_base = A2W_PLLH_ANA0, ++ .reference_enable_mask = A2W_XOSC_CTRL_PLLC_ENABLE, ++ .lock_mask = CM_LOCK_FLOCKH, ++ ++ .ana = &bcm2835_ana_pllh, ++ ++ .min_rate = 600000000u, ++ .max_rate = 3000000000u, ++ .max_fb_rate = BCM2835_MAX_FB_RATE), ++ [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV( ++ .name = "pllh_rcal", ++ .source_pll = "pllh", ++ .cm_reg = CM_PLLH, ++ .a2w_reg = A2W_PLLH_RCAL, ++ .load_mask = CM_PLLH_LOADRCAL, ++ .hold_mask = 0, ++ .fixed_divider = 10), ++ [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV( ++ .name = "pllh_aux", ++ .source_pll = "pllh", ++ .cm_reg = CM_PLLH, ++ .a2w_reg = A2W_PLLH_AUX, ++ .load_mask = CM_PLLH_LOADAUX, ++ .hold_mask = 0, ++ .fixed_divider = 10), ++ [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV( ++ .name = "pllh_pix", ++ .source_pll = "pllh", ++ .cm_reg = CM_PLLH, ++ .a2w_reg = A2W_PLLH_PIX, ++ .load_mask = CM_PLLH_LOADPIX, ++ .hold_mask = 0, ++ .fixed_divider = 10), ++ + /* the clocks */ +- [BCM2835_CLOCK_TIMER] = REGISTER_CLK(&bcm2835_clock_timer_data), +- [BCM2835_CLOCK_OTP] = REGISTER_CLK(&bcm2835_clock_otp_data), +- [BCM2835_CLOCK_TSENS] = REGISTER_CLK(&bcm2835_clock_tsens_data), +- [BCM2835_CLOCK_VPU] = REGISTER_CLK(&bcm2835_clock_vpu_data), +- [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), +- [BCM2835_CLOCK_ISP] = REGISTER_CLK(&bcm2835_clock_isp_data), +- [BCM2835_CLOCK_H264] = REGISTER_CLK(&bcm2835_clock_h264_data), +- [BCM2835_CLOCK_V3D] = REGISTER_CLK(&bcm2835_clock_v3d_data), +- [BCM2835_CLOCK_SDRAM] = REGISTER_CLK(&bcm2835_clock_sdram_data), +- [BCM2835_CLOCK_UART] = REGISTER_CLK(&bcm2835_clock_uart_data), +- [BCM2835_CLOCK_VEC] = REGISTER_CLK(&bcm2835_clock_vec_data), +- [BCM2835_CLOCK_HSM] = REGISTER_CLK(&bcm2835_clock_hsm_data), +- [BCM2835_CLOCK_EMMC] = REGISTER_CLK(&bcm2835_clock_emmc_data), +- [BCM2835_CLOCK_PWM] = REGISTER_CLK(&bcm2835_clock_pwm_data), ++ ++ /* clocks with oscillator parent mux */ ++ ++ /* One Time Programmable Memory clock. Maximum 10Mhz. */ ++ [BCM2835_CLOCK_OTP] = REGISTER_OSC_CLK( ++ .name = "otp", ++ .ctl_reg = CM_OTPCTL, ++ .div_reg = CM_OTPDIV, ++ .int_bits = 4, ++ .frac_bits = 0), ++ /* ++ * Used for a 1Mhz clock for the system clocksource, and also used ++ * bythe watchdog timer and the camera pulse generator. ++ */ ++ [BCM2835_CLOCK_TIMER] = REGISTER_OSC_CLK( ++ .name = "timer", ++ .ctl_reg = CM_TIMERCTL, ++ .div_reg = CM_TIMERDIV, ++ .int_bits = 6, ++ .frac_bits = 12), ++ /* ++ * Clock for the temperature sensor. ++ * Generally run at 2Mhz, max 5Mhz. ++ */ ++ [BCM2835_CLOCK_TSENS] = REGISTER_OSC_CLK( ++ .name = "tsens", ++ .ctl_reg = CM_TSENSCTL, ++ .div_reg = CM_TSENSDIV, ++ .int_bits = 5, ++ .frac_bits = 0), ++ ++ /* clocks with vpu parent mux */ ++ [BCM2835_CLOCK_H264] = REGISTER_VPU_CLK( ++ .name = "h264", ++ .ctl_reg = CM_H264CTL, ++ .div_reg = CM_H264DIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_ISP] = REGISTER_VPU_CLK( ++ .name = "isp", ++ .ctl_reg = CM_ISPCTL, ++ .div_reg = CM_ISPDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ /* ++ * Secondary SDRAM clock. Used for low-voltage modes when the PLL ++ * in the SDRAM controller can't be used. ++ */ ++ [BCM2835_CLOCK_SDRAM] = REGISTER_VPU_CLK( ++ .name = "sdram", ++ .ctl_reg = CM_SDCCTL, ++ .div_reg = CM_SDCDIV, ++ .int_bits = 6, ++ .frac_bits = 0), ++ [BCM2835_CLOCK_V3D] = REGISTER_VPU_CLK( ++ .name = "v3d", ++ .ctl_reg = CM_V3DCTL, ++ .div_reg = CM_V3DDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ /* ++ * VPU clock. This doesn't have an enable bit, since it drives ++ * the bus for everything else, and is special so it doesn't need ++ * to be gated for rate changes. It is also known as "clk_audio" ++ * in various hardware documentation. ++ */ ++ [BCM2835_CLOCK_VPU] = REGISTER_VPU_CLK( ++ .name = "vpu", ++ .ctl_reg = CM_VPUCTL, ++ .div_reg = CM_VPUDIV, ++ .int_bits = 12, ++ .frac_bits = 8, ++ .is_vpu_clock = true), ++ ++ /* clocks with per parent mux */ ++ ++ /* Arasan EMMC clock */ ++ [BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK( ++ .name = "emmc", ++ .ctl_reg = CM_EMMCCTL, ++ .div_reg = CM_EMMCDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ /* HDMI state machine */ ++ [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( ++ .name = "hsm", ++ .ctl_reg = CM_HSMCTL, ++ .div_reg = CM_HSMDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( ++ .name = "pwm", ++ .ctl_reg = CM_PWMCTL, ++ .div_reg = CM_PWMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_UART] = REGISTER_PER_CLK( ++ .name = "uart", ++ .ctl_reg = CM_UARTCTL, ++ .div_reg = CM_UARTDIV, ++ .int_bits = 10, ++ .frac_bits = 12), ++ /* TV encoder clock. Only operating frequency is 108Mhz. */ ++ [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK( ++ .name = "vec", ++ .ctl_reg = CM_VECCTL, ++ .div_reg = CM_VECDIV, ++ .int_bits = 4, ++ .frac_bits = 0), ++ + /* the gates */ ++ ++ /* ++ * CM_PERIICTL (and CM_PERIACTL, CM_SYSCTL and CM_VPUCTL if ++ * you have the debug bit set in the power manager, which we ++ * don't bother exposing) are individual gates off of the ++ * non-stop vpu clock. ++ */ + [BCM2835_CLOCK_PERI_IMAGE] = REGISTER_GATE( +- &bcm2835_clock_peri_image_data), ++ .name = "peri_image", ++ .parent = "vpu", ++ .ctl_reg = CM_PERIICTL), + }; + + static int bcm2835_clk_probe(struct platform_device *pdev) + +From 3abdf05dbf0714896e55bc301929475e775c5cdc Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 12:51:43 +0000 +Subject: [PATCH 261/398] clk: bcm2835: enable management of PCM clock + +Enable the PCM clock in the SOC, which is used by the +bcm2835-i2s driver. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 33b689600f43094a9316a1b582f2286d17bc737b) +--- + drivers/clk/bcm/clk-bcm2835.c | 7 +++++++ + include/dt-bindings/clock/bcm2835.h | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index a85030e21e017a1a437971ea0b478c134607b237..7803921276efaff0ef6155d1d7922c60a3f4f9cb 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1638,6 +1638,13 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_HSMDIV, + .int_bits = 4, + .frac_bits = 8), ++ [BCM2835_CLOCK_PCM] = REGISTER_PER_CLK( ++ .name = "pcm", ++ .ctl_reg = CM_PCMCTL, ++ .div_reg = CM_PCMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), + [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( + .name = "pwm", + .ctl_reg = CM_PWMCTL, +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index 87235ac76ef102c749e3912b43bce5fc47b24f91..9a7b4a5cd6e635ce37c10afba4c26c8ca3d7cf35 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -44,3 +44,4 @@ + #define BCM2835_CLOCK_EMMC 28 + #define BCM2835_CLOCK_PERI_IMAGE 29 + #define BCM2835_CLOCK_PWM 30 ++#define BCM2835_CLOCK_PCM 31 + +From cd5d9b76272bb2146a3c69426e5490c48374743b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 15:43:56 +0000 +Subject: [PATCH 262/398] clk: bcm2835: add missing PLL clock dividers + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit 728436956aa172b24a3212295f8b53feb6479f32) +--- + drivers/clk/bcm/clk-bcm2835.c | 32 ++++++++++++++++++++++++++++++++ + include/dt-bindings/clock/bcm2835.h | 5 +++++ + 2 files changed, 37 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 7803921276efaff0ef6155d1d7922c60a3f4f9cb..2fe20f7f44f7f3627c5255c334aae17cfe702032 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1387,6 +1387,22 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .load_mask = CM_PLLA_LOADPER, + .hold_mask = CM_PLLA_HOLDPER, + .fixed_divider = 1), ++ [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( ++ .name = "plla_dsi0", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_DSI0, ++ .load_mask = CM_PLLA_LOADDSI0, ++ .hold_mask = CM_PLLA_HOLDDSI0, ++ .fixed_divider = 1), ++ [BCM2835_PLLA_CCP2] = REGISTER_PLL_DIV( ++ .name = "plla_ccp2", ++ .source_pll = "plla", ++ .cm_reg = CM_PLLA, ++ .a2w_reg = A2W_PLLA_CCP2, ++ .load_mask = CM_PLLA_LOADCCP2, ++ .hold_mask = CM_PLLA_HOLDCCP2, ++ .fixed_divider = 1), + + /* PLLB is used for the ARM's clock. */ + [BCM2835_PLLB] = REGISTER_PLL( +@@ -1501,6 +1517,22 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .load_mask = CM_PLLD_LOADPER, + .hold_mask = CM_PLLD_HOLDPER, + .fixed_divider = 1), ++ [BCM2835_PLLD_DSI0] = REGISTER_PLL_DIV( ++ .name = "plld_dsi0", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_DSI0, ++ .load_mask = CM_PLLD_LOADDSI0, ++ .hold_mask = CM_PLLD_HOLDDSI0, ++ .fixed_divider = 1), ++ [BCM2835_PLLD_DSI1] = REGISTER_PLL_DIV( ++ .name = "plld_dsi1", ++ .source_pll = "plld", ++ .cm_reg = CM_PLLD, ++ .a2w_reg = A2W_PLLD_DSI1, ++ .load_mask = CM_PLLD_LOADDSI1, ++ .hold_mask = CM_PLLD_HOLDDSI1, ++ .fixed_divider = 1), + + /* + * PLLH is used to supply the pixel clock or the AUX clock for the +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index 9a7b4a5cd6e635ce37c10afba4c26c8ca3d7cf35..a001e38651347d30fb1fd4faae103fee1693d37f 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -45,3 +45,8 @@ + #define BCM2835_CLOCK_PERI_IMAGE 29 + #define BCM2835_CLOCK_PWM 30 + #define BCM2835_CLOCK_PCM 31 ++ ++#define BCM2835_PLLA_DSI0 32 ++#define BCM2835_PLLA_CCP2 33 ++#define BCM2835_PLLD_DSI0 34 ++#define BCM2835_PLLD_DSI1 35 + +From 2efc1b65905d7574d3faa78a13b3355f8fe0ac06 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 29 Feb 2016 15:43:57 +0000 +Subject: [PATCH 263/398] clk: bcm2835: add missing osc and per clocks + +Add AVE0, DFT, GP0, GP1, GP2, SLIM, SMI, TEC, DPI, CAM0, CAM1, DSI0E, +and DSI1E. PULSE is not added because it has an extra divider. + +Signed-off-by: Martin Sperl +Signed-off-by: Eric Anholt +Reviewed-by: Eric Anholt +(cherry picked from commit d3d6f15fd376e3dbba851724057b112558c70b79) +--- + drivers/clk/bcm/clk-bcm2835.c | 90 +++++++++++++++++++++++++++++++++++++ + include/dt-bindings/clock/bcm2835.h | 14 ++++++ + 2 files changed, 104 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 2fe20f7f44f7f3627c5255c334aae17cfe702032..35f8de736cee3aa8b05c60bf4debd4c1da11fb5a 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -117,6 +117,8 @@ + #define CM_SDCCTL 0x1a8 + #define CM_SDCDIV 0x1ac + #define CM_ARMCTL 0x1b0 ++#define CM_AVEOCTL 0x1b8 ++#define CM_AVEODIV 0x1bc + #define CM_EMMCCTL 0x1c0 + #define CM_EMMCDIV 0x1c4 + +@@ -1610,6 +1612,12 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_TSENSDIV, + .int_bits = 5, + .frac_bits = 0), ++ [BCM2835_CLOCK_TEC] = REGISTER_OSC_CLK( ++ .name = "tec", ++ .ctl_reg = CM_TECCTL, ++ .div_reg = CM_TECDIV, ++ .int_bits = 6, ++ .frac_bits = 0), + + /* clocks with vpu parent mux */ + [BCM2835_CLOCK_H264] = REGISTER_VPU_CLK( +@@ -1624,6 +1632,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_ISPDIV, + .int_bits = 4, + .frac_bits = 8), ++ + /* + * Secondary SDRAM clock. Used for low-voltage modes when the PLL + * in the SDRAM controller can't be used. +@@ -1655,6 +1664,36 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .is_vpu_clock = true), + + /* clocks with per parent mux */ ++ [BCM2835_CLOCK_AVEO] = REGISTER_PER_CLK( ++ .name = "aveo", ++ .ctl_reg = CM_AVEOCTL, ++ .div_reg = CM_AVEODIV, ++ .int_bits = 4, ++ .frac_bits = 0), ++ [BCM2835_CLOCK_CAM0] = REGISTER_PER_CLK( ++ .name = "cam0", ++ .ctl_reg = CM_CAM0CTL, ++ .div_reg = CM_CAM0DIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_CAM1] = REGISTER_PER_CLK( ++ .name = "cam1", ++ .ctl_reg = CM_CAM1CTL, ++ .div_reg = CM_CAM1DIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_DFT] = REGISTER_PER_CLK( ++ .name = "dft", ++ .ctl_reg = CM_DFTCTL, ++ .div_reg = CM_DFTDIV, ++ .int_bits = 5, ++ .frac_bits = 0), ++ [BCM2835_CLOCK_DPI] = REGISTER_PER_CLK( ++ .name = "dpi", ++ .ctl_reg = CM_DPICTL, ++ .div_reg = CM_DPIDIV, ++ .int_bits = 4, ++ .frac_bits = 8), + + /* Arasan EMMC clock */ + [BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK( +@@ -1663,6 +1702,29 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_EMMCDIV, + .int_bits = 4, + .frac_bits = 8), ++ ++ /* General purpose (GPIO) clocks */ ++ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( ++ .name = "gp0", ++ .ctl_reg = CM_GP0CTL, ++ .div_reg = CM_GP0DIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_GP1] = REGISTER_PER_CLK( ++ .name = "gp1", ++ .ctl_reg = CM_GP1CTL, ++ .div_reg = CM_GP1DIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( ++ .name = "gp2", ++ .ctl_reg = CM_GP2CTL, ++ .div_reg = CM_GP2DIV, ++ .int_bits = 12, ++ .frac_bits = 12), ++ + /* HDMI state machine */ + [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( + .name = "hsm", +@@ -1684,12 +1746,26 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .int_bits = 12, + .frac_bits = 12, + .is_mash_clock = true), ++ [BCM2835_CLOCK_SLIM] = REGISTER_PER_CLK( ++ .name = "slim", ++ .ctl_reg = CM_SLIMCTL, ++ .div_reg = CM_SLIMDIV, ++ .int_bits = 12, ++ .frac_bits = 12, ++ .is_mash_clock = true), ++ [BCM2835_CLOCK_SMI] = REGISTER_PER_CLK( ++ .name = "smi", ++ .ctl_reg = CM_SMICTL, ++ .div_reg = CM_SMIDIV, ++ .int_bits = 4, ++ .frac_bits = 8), + [BCM2835_CLOCK_UART] = REGISTER_PER_CLK( + .name = "uart", + .ctl_reg = CM_UARTCTL, + .div_reg = CM_UARTDIV, + .int_bits = 10, + .frac_bits = 12), ++ + /* TV encoder clock. Only operating frequency is 108Mhz. */ + [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK( + .name = "vec", +@@ -1698,6 +1774,20 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .int_bits = 4, + .frac_bits = 0), + ++ /* dsi clocks */ ++ [BCM2835_CLOCK_DSI0E] = REGISTER_PER_CLK( ++ .name = "dsi0e", ++ .ctl_reg = CM_DSI0ECTL, ++ .div_reg = CM_DSI0EDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ [BCM2835_CLOCK_DSI1E] = REGISTER_PER_CLK( ++ .name = "dsi1e", ++ .ctl_reg = CM_DSI1ECTL, ++ .div_reg = CM_DSI1EDIV, ++ .int_bits = 4, ++ .frac_bits = 8), ++ + /* the gates */ + + /* +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index a001e38651347d30fb1fd4faae103fee1693d37f..360e00cefd35679b49890234b5c369fb52b89e20 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -50,3 +50,17 @@ + #define BCM2835_PLLA_CCP2 33 + #define BCM2835_PLLD_DSI0 34 + #define BCM2835_PLLD_DSI1 35 ++ ++#define BCM2835_CLOCK_AVEO 36 ++#define BCM2835_CLOCK_DFT 37 ++#define BCM2835_CLOCK_GP0 38 ++#define BCM2835_CLOCK_GP1 39 ++#define BCM2835_CLOCK_GP2 40 ++#define BCM2835_CLOCK_SLIM 41 ++#define BCM2835_CLOCK_SMI 42 ++#define BCM2835_CLOCK_TEC 43 ++#define BCM2835_CLOCK_DPI 44 ++#define BCM2835_CLOCK_CAM0 45 ++#define BCM2835_CLOCK_CAM1 46 ++#define BCM2835_CLOCK_DSI0E 47 ++#define BCM2835_CLOCK_DSI1E 48 + +From 9044ec7f587636af7760deb893e9235051379ef8 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 1 Dec 2015 16:49:12 -0800 +Subject: [PATCH 264/398] ARM: bcm2835: Define two new packets from the latest + firmware. + +These packets give us direct access to the firmware's power management +code, as opposed to GET/SET_POWER_STATE packets that only had a couple +of domains implemented. + +Signed-off-by: Eric Anholt +Reviewed-by: Kevin Hilman +(cherry picked from commit 60d56333e869be6ad6926cdba3ba974512b2183b) +--- + include/soc/bcm2835/raspberrypi-firmware.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h +index e312e9cf31c4b149bfcbee525807cc45476aefc9..227a107214a02deadcca3db202da265eba1fdd21 100644 +--- a/include/soc/bcm2835/raspberrypi-firmware.h ++++ b/include/soc/bcm2835/raspberrypi-firmware.h +@@ -74,11 +74,13 @@ enum rpi_firmware_property_tag { + RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014, + RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020, + RPI_FIRMWARE_GET_CUSTOMER_OTP = 0x00030021, ++ RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030, + RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001, + RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002, + RPI_FIRMWARE_SET_VOLTAGE = 0x00038003, + RPI_FIRMWARE_SET_TURBO = 0x00038009, + RPI_FIRMWARE_SET_CUSTOMER_OTP = 0x00038021, ++ RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030, + RPI_FIRMWARE_SET_SDHOST_CLOCK = 0x00038042, + + /* Dispmanx TAGS */ + +From 2fd68664c99dbb24f8df5f65943ed3ae5873a20c Mon Sep 17 00:00:00 2001 +From: Alexander Aring +Date: Wed, 16 Dec 2015 16:26:47 -0800 +Subject: [PATCH 265/398] ARM: bcm2835: add rpi power domain driver + +This patch adds support for several power domains on Raspberry Pi, +including USB (so it can be enabled even if the bootloader didn't do +it), and graphics. + +This patch is the combined work of Eric Anholt (who wrote USB support +inside of the Raspberry Pi firmware driver, and wrote the non-USB +domain support) and Alexander Aring (who separated the original USB +work out from the firmware driver). + +Signed-off-by: Alexander Aring +Signed-off-by: Eric Anholt +Reviewed-by: Ulf Hansson +Reviewed-by: Kevin Hilman +(cherry picked from commit a09cd356586d33f64cbe64ee4f5c1a7c4a6abee5) +--- + drivers/soc/Kconfig | 1 + + drivers/soc/Makefile | 1 + + drivers/soc/bcm/Kconfig | 9 + + drivers/soc/bcm/Makefile | 1 + + drivers/soc/bcm/raspberrypi-power.c | 247 ++++++++++++++++++++++++++ + include/dt-bindings/power/raspberrypi-power.h | 41 +++++ + 6 files changed, 300 insertions(+) + create mode 100644 drivers/soc/bcm/Kconfig + create mode 100644 drivers/soc/bcm/Makefile + create mode 100644 drivers/soc/bcm/raspberrypi-power.c + create mode 100644 include/dt-bindings/power/raspberrypi-power.h + +diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig +index 4e853ed2c82b937ebd8fb6cf4c22288a122fca3a..844142620031ff73e42e6df53d4c0d9e282e16fb 100644 +--- a/drivers/soc/Kconfig ++++ b/drivers/soc/Kconfig +@@ -1,5 +1,6 @@ + menu "SOC (System On Chip) specific Drivers" + ++source "drivers/soc/bcm/Kconfig" + source "drivers/soc/brcmstb/Kconfig" + source "drivers/soc/mediatek/Kconfig" + source "drivers/soc/qcom/Kconfig" +diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile +index f2ba2e932ae10c5d2cda1de269b826b9875a4a5c..f3f955cdb04bbfc39ab324269c933ef370126683 100644 +--- a/drivers/soc/Makefile ++++ b/drivers/soc/Makefile +@@ -2,6 +2,7 @@ + # Makefile for the Linux Kernel SOC specific device drivers. + # + ++obj-y += bcm/ + obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/ + obj-$(CONFIG_MACH_DOVE) += dove/ + obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ +diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig +new file mode 100644 +index 0000000000000000000000000000000000000000..5ba1827fe36ff975b6ad37cd93afca97f86e9d53 +--- /dev/null ++++ b/drivers/soc/bcm/Kconfig +@@ -0,0 +1,9 @@ ++config RASPBERRYPI_POWER ++ bool "Raspberry Pi power domain driver" ++ depends on ARCH_BCM2835 || COMPILE_TEST ++ depends on RASPBERRYPI_FIRMWARE ++ select PM_GENERIC_DOMAINS if PM ++ select PM_GENERIC_DOMAINS_OF if PM ++ help ++ This enables support for the RPi power domains which can be enabled ++ or disabled via the RPi firmware. +diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile +new file mode 100644 +index 0000000000000000000000000000000000000000..63aa3eb23087b65c9779a1b3db22390a541ee49a +--- /dev/null ++++ b/drivers/soc/bcm/Makefile +@@ -0,0 +1 @@ ++obj-$(CONFIG_RASPBERRYPI_POWER) += raspberrypi-power.o +diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/soc/bcm/raspberrypi-power.c +new file mode 100644 +index 0000000000000000000000000000000000000000..fe96a8b956fbd54424bea059af5b0be1240c91b3 +--- /dev/null ++++ b/drivers/soc/bcm/raspberrypi-power.c +@@ -0,0 +1,247 @@ ++/* (C) 2015 Pengutronix, Alexander Aring ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Authors: ++ * Alexander Aring ++ * Eric Anholt ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* ++ * Firmware indices for the old power domains interface. Only a few ++ * of them were actually implemented. ++ */ ++#define RPI_OLD_POWER_DOMAIN_USB 3 ++#define RPI_OLD_POWER_DOMAIN_V3D 10 ++ ++struct rpi_power_domain { ++ u32 domain; ++ bool enabled; ++ bool old_interface; ++ struct generic_pm_domain base; ++ struct rpi_firmware *fw; ++}; ++ ++struct rpi_power_domains { ++ bool has_new_interface; ++ struct genpd_onecell_data xlate; ++ struct rpi_firmware *fw; ++ struct rpi_power_domain domains[RPI_POWER_DOMAIN_COUNT]; ++}; ++ ++/* ++ * Packet definition used by RPI_FIRMWARE_SET_POWER_STATE and ++ * RPI_FIRMWARE_SET_DOMAIN_STATE ++ */ ++struct rpi_power_domain_packet { ++ u32 domain; ++ u32 on; ++} __packet; ++ ++/* ++ * Asks the firmware to enable or disable power on a specific power ++ * domain. ++ */ ++static int rpi_firmware_set_power(struct rpi_power_domain *rpi_domain, bool on) ++{ ++ struct rpi_power_domain_packet packet; ++ ++ packet.domain = rpi_domain->domain; ++ packet.on = on; ++ return rpi_firmware_property(rpi_domain->fw, ++ rpi_domain->old_interface ? ++ RPI_FIRMWARE_SET_POWER_STATE : ++ RPI_FIRMWARE_SET_DOMAIN_STATE, ++ &packet, sizeof(packet)); ++} ++ ++static int rpi_domain_off(struct generic_pm_domain *domain) ++{ ++ struct rpi_power_domain *rpi_domain = ++ container_of(domain, struct rpi_power_domain, base); ++ ++ return rpi_firmware_set_power(rpi_domain, false); ++} ++ ++static int rpi_domain_on(struct generic_pm_domain *domain) ++{ ++ struct rpi_power_domain *rpi_domain = ++ container_of(domain, struct rpi_power_domain, base); ++ ++ return rpi_firmware_set_power(rpi_domain, true); ++} ++ ++static void rpi_common_init_power_domain(struct rpi_power_domains *rpi_domains, ++ int xlate_index, const char *name) ++{ ++ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; ++ ++ dom->fw = rpi_domains->fw; ++ ++ dom->base.name = name; ++ dom->base.power_on = rpi_domain_on; ++ dom->base.power_off = rpi_domain_off; ++ ++ /* ++ * Treat all power domains as off at boot. ++ * ++ * The firmware itself may be keeping some domains on, but ++ * from Linux's perspective all we control is the refcounts ++ * that we give to the firmware, and we can't ask the firmware ++ * to turn off something that we haven't ourselves turned on. ++ */ ++ pm_genpd_init(&dom->base, NULL, true); ++ ++ rpi_domains->xlate.domains[xlate_index] = &dom->base; ++} ++ ++static void rpi_init_power_domain(struct rpi_power_domains *rpi_domains, ++ int xlate_index, const char *name) ++{ ++ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; ++ ++ if (!rpi_domains->has_new_interface) ++ return; ++ ++ /* The DT binding index is the firmware's domain index minus one. */ ++ dom->domain = xlate_index + 1; ++ ++ rpi_common_init_power_domain(rpi_domains, xlate_index, name); ++} ++ ++static void rpi_init_old_power_domain(struct rpi_power_domains *rpi_domains, ++ int xlate_index, int domain, ++ const char *name) ++{ ++ struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; ++ ++ dom->old_interface = true; ++ dom->domain = domain; ++ ++ rpi_common_init_power_domain(rpi_domains, xlate_index, name); ++} ++ ++/* ++ * Detects whether the firmware supports the new power domains interface. ++ * ++ * The firmware doesn't actually return an error on an unknown tag, ++ * and just skips over it, so we do the detection by putting an ++ * unexpected value in the return field and checking if it was ++ * unchanged. ++ */ ++static bool ++rpi_has_new_domain_support(struct rpi_power_domains *rpi_domains) ++{ ++ struct rpi_power_domain_packet packet; ++ int ret; ++ ++ packet.domain = RPI_POWER_DOMAIN_ARM; ++ packet.on = ~0; ++ ++ ret = rpi_firmware_property(rpi_domains->fw, ++ RPI_FIRMWARE_GET_DOMAIN_STATE, ++ &packet, sizeof(packet)); ++ ++ return ret == 0 && packet.on != ~0; ++} ++ ++static int rpi_power_probe(struct platform_device *pdev) ++{ ++ struct device_node *fw_np; ++ struct device *dev = &pdev->dev; ++ struct rpi_power_domains *rpi_domains; ++ ++ rpi_domains = devm_kzalloc(dev, sizeof(*rpi_domains), GFP_KERNEL); ++ if (!rpi_domains) ++ return -ENOMEM; ++ ++ rpi_domains->xlate.domains = ++ devm_kzalloc(dev, sizeof(*rpi_domains->xlate.domains) * ++ RPI_POWER_DOMAIN_COUNT, GFP_KERNEL); ++ if (!rpi_domains->xlate.domains) ++ return -ENOMEM; ++ ++ rpi_domains->xlate.num_domains = RPI_POWER_DOMAIN_COUNT; ++ ++ fw_np = of_parse_phandle(pdev->dev.of_node, "firmware", 0); ++ if (!fw_np) { ++ dev_err(&pdev->dev, "no firmware node\n"); ++ return -ENODEV; ++ } ++ ++ rpi_domains->fw = rpi_firmware_get(fw_np); ++ of_node_put(fw_np); ++ if (!rpi_domains->fw) ++ return -EPROBE_DEFER; ++ ++ rpi_domains->has_new_interface = ++ rpi_has_new_domain_support(rpi_domains); ++ ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C0, "I2C0"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C1, "I2C1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C2, "I2C2"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VIDEO_SCALER, ++ "VIDEO_SCALER"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VPU1, "VPU1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_HDMI, "HDMI"); ++ ++ /* ++ * Use the old firmware interface for USB power, so that we ++ * can turn it on even if the firmware hasn't been updated. ++ */ ++ rpi_init_old_power_domain(rpi_domains, RPI_POWER_DOMAIN_USB, ++ RPI_OLD_POWER_DOMAIN_USB, "USB"); ++ ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VEC, "VEC"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_JPEG, "JPEG"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_H264, "H264"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_V3D, "V3D"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ISP, "ISP"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM0, "UNICAM0"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM1, "UNICAM1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2RX, "CCP2RX"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CSI2, "CSI2"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CPI, "CPI"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI0, "DSI0"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI1, "DSI1"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_TRANSPOSER, ++ "TRANSPOSER"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2TX, "CCP2TX"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CDP, "CDP"); ++ rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ARM, "ARM"); ++ ++ of_genpd_add_provider_onecell(dev->of_node, &rpi_domains->xlate); ++ ++ platform_set_drvdata(pdev, rpi_domains); ++ ++ return 0; ++} ++ ++static const struct of_device_id rpi_power_of_match[] = { ++ { .compatible = "raspberrypi,bcm2835-power", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, rpi_power_of_match); ++ ++static struct platform_driver rpi_power_driver = { ++ .driver = { ++ .name = "raspberrypi-power", ++ .of_match_table = rpi_power_of_match, ++ }, ++ .probe = rpi_power_probe, ++}; ++builtin_platform_driver(rpi_power_driver); ++ ++MODULE_AUTHOR("Alexander Aring "); ++MODULE_AUTHOR("Eric Anholt "); ++MODULE_DESCRIPTION("Raspberry Pi power domain driver"); ++MODULE_LICENSE("GPL v2"); +diff --git a/include/dt-bindings/power/raspberrypi-power.h b/include/dt-bindings/power/raspberrypi-power.h +new file mode 100644 +index 0000000000000000000000000000000000000000..b3ff8e09a78f41ae29cf4a27bc956fac64f20dfb +--- /dev/null ++++ b/include/dt-bindings/power/raspberrypi-power.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright © 2015 Broadcom ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H ++#define _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H ++ ++/* These power domain indices are the firmware interface's indices ++ * minus one. ++ */ ++#define RPI_POWER_DOMAIN_I2C0 0 ++#define RPI_POWER_DOMAIN_I2C1 1 ++#define RPI_POWER_DOMAIN_I2C2 2 ++#define RPI_POWER_DOMAIN_VIDEO_SCALER 3 ++#define RPI_POWER_DOMAIN_VPU1 4 ++#define RPI_POWER_DOMAIN_HDMI 5 ++#define RPI_POWER_DOMAIN_USB 6 ++#define RPI_POWER_DOMAIN_VEC 7 ++#define RPI_POWER_DOMAIN_JPEG 8 ++#define RPI_POWER_DOMAIN_H264 9 ++#define RPI_POWER_DOMAIN_V3D 10 ++#define RPI_POWER_DOMAIN_ISP 11 ++#define RPI_POWER_DOMAIN_UNICAM0 12 ++#define RPI_POWER_DOMAIN_UNICAM1 13 ++#define RPI_POWER_DOMAIN_CCP2RX 14 ++#define RPI_POWER_DOMAIN_CSI2 15 ++#define RPI_POWER_DOMAIN_CPI 16 ++#define RPI_POWER_DOMAIN_DSI0 17 ++#define RPI_POWER_DOMAIN_DSI1 18 ++#define RPI_POWER_DOMAIN_TRANSPOSER 19 ++#define RPI_POWER_DOMAIN_CCP2TX 20 ++#define RPI_POWER_DOMAIN_CDP 21 ++#define RPI_POWER_DOMAIN_ARM 22 ++ ++#define RPI_POWER_DOMAIN_COUNT 23 ++ ++#endif /* _DT_BINDINGS_ARM_BCM2835_RPI_POWER_H */ + +From 2f8eb81bc97bca5bb82d1101c9a1baa1d144d4cb Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Thu, 31 Dec 2015 23:39:14 +0100 +Subject: [PATCH 266/398] ARM: bcm2835: clarify RASPBERRYPI_FIRMWARE dependency + +The firmware driver can be a loadable module, but the power domain +can only be built-in, so we get a build error in an allmodconfig +kernel: + +:(.text+0x17e59c): undefined reference to `rpi_firmware_property' +:(.text+0x17e51c): undefined reference to `rpi_firmware_get' +:(.text+0x17e244): undefined reference to `rpi_firmware_property' + +This changes the dependency to only allow the power domain code +to be enabled when the firmware driver is built-in. Other users +of the firmware driver may still be loadable modules and not +everyone needs the power domains, so we don't change the firmware +code. + +Signed-off-by: Arnd Bergmann +(cherry picked from commit 22a5b1ddd83b991b96cb635898e011cce48bf6f8) +--- + drivers/soc/bcm/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig +index 5ba1827fe36ff975b6ad37cd93afca97f86e9d53..3066edea184d765a670ded0cead470597654abc1 100644 +--- a/drivers/soc/bcm/Kconfig ++++ b/drivers/soc/bcm/Kconfig +@@ -1,7 +1,7 @@ + config RASPBERRYPI_POWER + bool "Raspberry Pi power domain driver" + depends on ARCH_BCM2835 || COMPILE_TEST +- depends on RASPBERRYPI_FIRMWARE ++ depends on RASPBERRYPI_FIRMWARE=y + select PM_GENERIC_DOMAINS if PM + select PM_GENERIC_DOMAINS_OF if PM + help + +From f18576d163b7925daf04d21c4a22a0f97d399ade Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 15:55:02 -0700 +Subject: [PATCH 267/398] ARM: bcm2708: Enable building power domain driver. + +Signed-off-by: Eric Anholt +--- + drivers/soc/bcm/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig +index 3066edea184d765a670ded0cead470597654abc1..e23518142ceac6651641cc30c327d60dded319d5 100644 +--- a/drivers/soc/bcm/Kconfig ++++ b/drivers/soc/bcm/Kconfig +@@ -1,6 +1,6 @@ + config RASPBERRYPI_POWER + bool "Raspberry Pi power domain driver" +- depends on ARCH_BCM2835 || COMPILE_TEST ++ depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709 || COMPILE_TEST + depends on RASPBERRYPI_FIRMWARE=y + select PM_GENERIC_DOMAINS if PM + select PM_GENERIC_DOMAINS_OF if PM + +From abed02997d54c35d0eed3700c2d703e3e2b39036 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 14:23:30 -0700 +Subject: [PATCH 268/398] bcm2708: Add RASPBERRYPI_POWER to the defconfigs. + +This will be used by the GPU driver for powering on HDMI at boot time +and for 3D hang reset. + +Signed-off-by: Eric Anholt +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + arch/arm/configs/bcmrpi_defconfig | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 7788ecb4b42dcf0c296fe3a6cc84acf297638fcc..54c8f4ed3c41e67d46c509aab8fce3d390b1e369 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -71,6 +71,7 @@ CONFIG_NEON=y + CONFIG_KERNEL_MODE_NEON=y + CONFIG_BINFMT_MISC=m + # CONFIG_SUSPEND is not set ++CONFIG_PM=y + CONFIG_NET=y + CONFIG_PACKET=y + CONFIG_UNIX=y +@@ -1117,6 +1118,7 @@ CONFIG_FB_TFT_FBTFT_DEVICE=m + CONFIG_MAILBOX=y + CONFIG_BCM2835_MBOX=y + # CONFIG_IOMMU_SUPPORT is not set ++CONFIG_RASPBERRYPI_POWER=y + CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 5b8b19a09dd05ee19199764b8169b5dce83f158d..13471cc1c4433669c716a820a054bec99fd13aa6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -64,6 +64,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y + CONFIG_VFP=y + CONFIG_BINFMT_MISC=m + # CONFIG_SUSPEND is not set ++CONFIG_PM=y + CONFIG_NET=y + CONFIG_PACKET=y + CONFIG_UNIX=y +@@ -1124,6 +1125,7 @@ CONFIG_FB_TFT_FBTFT_DEVICE=m + CONFIG_MAILBOX=y + CONFIG_BCM2835_MBOX=y + # CONFIG_IOMMU_SUPPORT is not set ++CONFIG_RASPBERRYPI_POWER=y + CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m + +From 59b557ba7b218b7d9fa804d70235bbf77e5a438c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 14:36:31 -0700 +Subject: [PATCH 269/398] bcm2708: Add the power domain driver to the device + tree. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index e0be77a00a6c5339e5c4c26e672ddbd57f9d9c76..7ff7a886ca551c74102e1027e228bc47c6ecb749 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -285,6 +285,12 @@ + mboxes = <&mailbox>; + }; + ++ power: power { ++ compatible = "raspberrypi,bcm2835-power"; ++ firmware = <&firmware>; ++ #power-domain-cells = <1>; ++ }; ++ + leds: leds { + compatible = "gpio-leds"; + }; + +From 6e23231d420afcaccc560f1d96b3f55b74a3d085 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 14:40:08 -0700 +Subject: [PATCH 270/398] bcm2708: Reference the HDMI power domain for the HDMI + driver. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index da37483b955e8abfc5d5ce0905ed81d928474084..af540a346426974386031e6c076c7c45531435d2 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -6,6 +6,7 @@ + /plugin/; + + #include "dt-bindings/clock/bcm2835.h" ++#include "dt-bindings/power/raspberrypi-power.h" + #include "dt-bindings/gpio/gpio.h" + + / { +@@ -72,6 +73,7 @@ + clocks = <&cprman BCM2835_PLLH_PIX>, + <&cprman BCM2835_CLOCK_HSM>; + clock-names = "pixel", "hdmi"; ++ power-domains = <&power RPI_POWER_DOMAIN_HDMI>; + }; + + v3d@7ec00000 { + +From f9f5132adc16869a8cb44987e5a8c682670c5c8b Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 17 Dec 2015 15:36:28 +0300 +Subject: [PATCH 271/398] drm/vc4: copy_to_user() returns the number of bytes + remaining + +The copy_to/from_user() functions return the number of bytes remaining +to be copied. We want to return error codes here. + +Also it's a bad idea to print an error message if a copy from user fails +because users can use that to spam /var/log/messages which is annoying +so I removed those. + +Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.') +Signed-off-by: Dan Carpenter +Reviewed-by: Eric Anholt +(cherry picked from commit 65c4777de54a39b2722a4b1ff3306d044014d511) +--- + drivers/gpu/drm/vc4/vc4_gem.c | 37 ++++++++++++++++++------------------- + 1 file changed, 18 insertions(+), 19 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index a6fa63f0e8a1825de063960fad40af230e77afaa..55d452af63192c89f6bba1f6dc44559c4592d249 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -85,7 +85,7 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, + struct vc4_dev *vc4 = to_vc4_dev(dev); + unsigned long irqflags; + u32 i; +- int ret; ++ int ret = 0; + + spin_lock_irqsave(&vc4->job_lock, irqflags); + kernel_state = vc4->hang_state; +@@ -133,9 +133,11 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, + bo_state[i].size = vc4_bo->base.base.size; + } + +- ret = copy_to_user((void __user *)(uintptr_t)get_state->bo, +- bo_state, +- state->bo_count * sizeof(*bo_state)); ++ if (copy_to_user((void __user *)(uintptr_t)get_state->bo, ++ bo_state, ++ state->bo_count * sizeof(*bo_state))) ++ ret = -EFAULT; ++ + kfree(bo_state); + + err_free: +@@ -563,27 +565,24 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) + exec->shader_state = temp + exec_size; + exec->shader_state_size = args->shader_rec_count; + +- ret = copy_from_user(bin, +- (void __user *)(uintptr_t)args->bin_cl, +- args->bin_cl_size); +- if (ret) { +- DRM_ERROR("Failed to copy in bin cl\n"); ++ if (copy_from_user(bin, ++ (void __user *)(uintptr_t)args->bin_cl, ++ args->bin_cl_size)) { ++ ret = -EFAULT; + goto fail; + } + +- ret = copy_from_user(exec->shader_rec_u, +- (void __user *)(uintptr_t)args->shader_rec, +- args->shader_rec_size); +- if (ret) { +- DRM_ERROR("Failed to copy in shader recs\n"); ++ if (copy_from_user(exec->shader_rec_u, ++ (void __user *)(uintptr_t)args->shader_rec, ++ args->shader_rec_size)) { ++ ret = -EFAULT; + goto fail; + } + +- ret = copy_from_user(exec->uniforms_u, +- (void __user *)(uintptr_t)args->uniforms, +- args->uniforms_size); +- if (ret) { +- DRM_ERROR("Failed to copy in uniforms cl\n"); ++ if (copy_from_user(exec->uniforms_u, ++ (void __user *)(uintptr_t)args->uniforms, ++ args->uniforms_size)) { ++ ret = -EFAULT; + goto fail; + } + + +From b87d626757de6c89bc3fbd134c1942d0f9ec1a33 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 17 Dec 2015 15:39:08 +0300 +Subject: [PATCH 272/398] drm/vc4: allocate enough memory in + vc4_save_hang_state() + +"state" is smaller than "kernel_state" so we end up corrupting memory. + +Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.') +Signed-off-by: Dan Carpenter +Reviewed-by: Eric Anholt +(cherry picked from commit 7e5082fbc00cc157e57a70cdb6b9bbb21289afb1) +--- + drivers/gpu/drm/vc4/vc4_gem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index 55d452af63192c89f6bba1f6dc44559c4592d249..456333f5dc785bcd607ac9803df25e9ff582d51c 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -159,7 +159,7 @@ vc4_save_hang_state(struct drm_device *dev) + unsigned long irqflags; + unsigned int i, unref_list_count; + +- kernel_state = kcalloc(1, sizeof(*state), GFP_KERNEL); ++ kernel_state = kcalloc(1, sizeof(*kernel_state), GFP_KERNEL); + if (!kernel_state) + return; + + +From ca7699321b219f40f9cf516c931bef7532fee397 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Mon, 18 Jan 2016 09:10:42 +1000 +Subject: [PATCH 273/398] drm/vc4: fix warning in validate printf. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This just fixes a warning on 64-bit builds: + + drivers/gpu/drm/vc4/vc4_validate.c: In function ‘validate_gl_shader_rec’: + drivers/gpu/drm/vc4/vc4_validate.c:864:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] + +Reported-by: Linus Torvalds +Signed-off-by: Dave Airlie +Signed-off-by: Linus Torvalds +(cherry picked from commit c671e1e30259da587d7a0162895200601979ee65) +--- + drivers/gpu/drm/vc4/vc4_validate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c +index 839696007e97528070a8c2c3676d4f30f3dd6d80..24c2c746e8f397aafd0285323508bd2ee351d3a2 100644 +--- a/drivers/gpu/drm/vc4/vc4_validate.c ++++ b/drivers/gpu/drm/vc4/vc4_validate.c +@@ -861,7 +861,7 @@ validate_gl_shader_rec(struct drm_device *dev, + + if (vbo->base.size < offset || + vbo->base.size - offset < attr_size) { +- DRM_ERROR("BO offset overflow (%d + %d > %d)\n", ++ DRM_ERROR("BO offset overflow (%d + %d > %zu)\n", + offset, attr_size, vbo->base.size); + return -EINVAL; + } + +From 80312788ab2d1f6da314fea4f1a0657109464920 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:14:09 -0800 +Subject: [PATCH 274/398] drm/vc4: Improve comments on vc4_plane_state members. + +Signed-off-by: Eric Anholt +(cherry picked from commit f427fb16cf756548c39256b569cf083f39bcc4e9) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 0f85eb5b9f3d49fb24f3981eafca964af552db79..43f461680d573868f2491f5258514bf293e81b0f 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -26,16 +26,19 @@ + + struct vc4_plane_state { + struct drm_plane_state base; ++ /* System memory copy of the display list for this element, computed ++ * at atomic_check time. ++ */ + u32 *dlist; +- u32 dlist_size; /* Number of dwords in allocated for the display list */ ++ u32 dlist_size; /* Number of dwords allocated for the display list */ + u32 dlist_count; /* Number of used dwords in the display list. */ + + /* Offset in the dlist to pointer word 0. */ + u32 pw0_offset; + + /* Offset where the plane's dlist was last stored in the +- hardware at vc4_crtc_atomic_flush() time. +- */ ++ * hardware at vc4_crtc_atomic_flush() time. ++ */ + u32 *hw_dlist; + }; + + +From 55a3d6ee8302dad3fbe903dad94fdd3bca5ec366 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:14:57 -0800 +Subject: [PATCH 275/398] drm/vc4: Add missing __iomem annotation to hw_dlist. + +This is the pointer to the HVS device's memory where we stored the +contents of *dlist. + +Signed-off-by: Eric Anholt +(cherry picked from commit 17eac75111ebda33e13d8d8d98aaedfc1a9c2abf) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 43f461680d573868f2491f5258514bf293e81b0f..b5b760a9f4f1cc08c0d798e1aafe7540eb922842 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -39,7 +39,7 @@ struct vc4_plane_state { + /* Offset where the plane's dlist was last stored in the + * hardware at vc4_crtc_atomic_flush() time. + */ +- u32 *hw_dlist; ++ u32 __iomem *hw_dlist; + }; + + static inline struct vc4_plane_state * + +From 788b4c9002ec3ae305e89c1bb2647807809e1d8c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:34:44 -0800 +Subject: [PATCH 276/398] drm/vc4: Move the plane clipping/scaling setup to a + separate function. + +As we add actual scaling, this is going to get way more complicated. + +Signed-off-by: Eric Anholt +(cherry picked from commit 5c6799942003df91801b1d2277bba34d71f99603) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 78 +++++++++++++++++++++++++++-------------- + 1 file changed, 52 insertions(+), 26 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index b5b760a9f4f1cc08c0d798e1aafe7540eb922842..6edd87323f4ed52daa015239af2ae97e2443917a 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -40,6 +40,14 @@ struct vc4_plane_state { + * hardware at vc4_crtc_atomic_flush() time. + */ + u32 __iomem *hw_dlist; ++ ++ /* Clipped coordinates of the plane on the display. */ ++ int crtc_x, crtc_y, crtc_w, crtc_h; ++ ++ /* Offset to start scanning out from the start of the plane's ++ * BO. ++ */ ++ u32 offset; + }; + + static inline struct vc4_plane_state * +@@ -167,22 +175,17 @@ static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) + vc4_state->dlist[vc4_state->dlist_count++] = val; + } + +-/* Writes out a full display list for an active plane to the plane's +- * private dlist state. +- */ +-static int vc4_plane_mode_set(struct drm_plane *plane, +- struct drm_plane_state *state) ++static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + { + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; +- struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); +- u32 ctl0_offset = vc4_state->dlist_count; +- const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); +- uint32_t offset = fb->offsets[0]; +- int crtc_x = state->crtc_x; +- int crtc_y = state->crtc_y; +- int crtc_w = state->crtc_w; +- int crtc_h = state->crtc_h; ++ ++ vc4_state->offset = fb->offsets[0]; ++ ++ vc4_state->crtc_x = state->crtc_x; ++ vc4_state->crtc_y = state->crtc_y; ++ vc4_state->crtc_w = state->crtc_w; ++ vc4_state->crtc_h = state->crtc_h; + + if (state->crtc_w << 16 != state->src_w || + state->crtc_h << 16 != state->src_h) { +@@ -194,18 +197,41 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + return -EINVAL; + } + +- if (crtc_x < 0) { +- offset += drm_format_plane_cpp(fb->pixel_format, 0) * -crtc_x; +- crtc_w += crtc_x; +- crtc_x = 0; ++ if (vc4_state->crtc_x < 0) { ++ vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, ++ 0) * ++ -vc4_state->crtc_x); ++ vc4_state->crtc_w += vc4_state->crtc_x; ++ vc4_state->crtc_x = 0; + } + +- if (crtc_y < 0) { +- offset += fb->pitches[0] * -crtc_y; +- crtc_h += crtc_y; +- crtc_y = 0; ++ if (vc4_state->crtc_y < 0) { ++ vc4_state->offset += fb->pitches[0] * -vc4_state->crtc_y; ++ vc4_state->crtc_h += vc4_state->crtc_y; ++ vc4_state->crtc_y = 0; + } + ++ return 0; ++} ++ ++ ++/* Writes out a full display list for an active plane to the plane's ++ * private dlist state. ++ */ ++static int vc4_plane_mode_set(struct drm_plane *plane, ++ struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ struct drm_framebuffer *fb = state->fb; ++ struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); ++ u32 ctl0_offset = vc4_state->dlist_count; ++ const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); ++ int ret; ++ ++ ret = vc4_plane_setup_clipping_and_scaling(state); ++ if (ret) ++ return ret; ++ + vc4_dlist_write(vc4_state, + SCALER_CTL0_VALID | + (format->pixel_order << SCALER_CTL0_ORDER_SHIFT) | +@@ -215,8 +241,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + /* Position Word 0: Image Positions and Alpha Value */ + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(0xff, SCALER_POS0_FIXED_ALPHA) | +- VC4_SET_FIELD(crtc_x, SCALER_POS0_START_X) | +- VC4_SET_FIELD(crtc_y, SCALER_POS0_START_Y)); ++ VC4_SET_FIELD(vc4_state->crtc_x, SCALER_POS0_START_X) | ++ VC4_SET_FIELD(vc4_state->crtc_y, SCALER_POS0_START_Y)); + + /* Position Word 1: Scaled Image Dimensions. + * Skipped due to SCALER_CTL0_UNITY scaling. +@@ -228,8 +254,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_POS2_ALPHA_MODE_PIPELINE : + SCALER_POS2_ALPHA_MODE_FIXED, + SCALER_POS2_ALPHA_MODE) | +- VC4_SET_FIELD(crtc_w, SCALER_POS2_WIDTH) | +- VC4_SET_FIELD(crtc_h, SCALER_POS2_HEIGHT)); ++ VC4_SET_FIELD(vc4_state->crtc_w, SCALER_POS2_WIDTH) | ++ VC4_SET_FIELD(vc4_state->crtc_h, SCALER_POS2_HEIGHT)); + + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); +@@ -237,7 +263,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + vc4_state->pw0_offset = vc4_state->dlist_count; + + /* Pointer Word 0: RGB / Y Pointer */ +- vc4_dlist_write(vc4_state, bo->paddr + offset); ++ vc4_dlist_write(vc4_state, bo->paddr + vc4_state->offset); + + /* Pointer Context Word 0: Written by the HVS */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +From f159dc31c12195297c64e2e4f11040d7f56d5fd4 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 30 Dec 2015 11:50:22 -0800 +Subject: [PATCH 277/398] drm/vc4: Add a proper short-circut path for legacy + cursor updates. + +Previously, on every modeset we would allocate new display list +memory, recompute changed planes, write all of them to the new memory, +and pointed scanout at the new list (which will latch approximately at +the next line of scanout). We let +drm_atomic_helper_wait_for_vblanks() decide whether we needed to wait +for a vblank after a modeset before cleaning up the old state and +letting the next modeset proceed, and on legacy cursor updates we +wouldn't wait. If you moved the cursor fast enough, we could +potentially wrap around the display list memory area and overwrite the +existing display list while it was still being scanned out, resulting +in the HVS scanning out garbage or just halting. + +Instead of making cursor updates wait for scanout to move to the new +display list area (which introduces significant cursor lag in X), we +just rewrite our current display list. + +Signed-off-by: Eric Anholt +(cherry picked from commit 6674a904d68041d982ffb284d2827410765a097a) +--- + drivers/gpu/drm/vc4/vc4_kms.c | 9 ++++ + drivers/gpu/drm/vc4/vc4_plane.c | 94 ++++++++++++++++++++++++++++++++++++++--- + 2 files changed, 96 insertions(+), 7 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index f95f2df5f8d1a52031a35dd26b03331c513fe13e..4718ae5176cc6813a033d12783c30af726d95756 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -49,6 +49,15 @@ vc4_atomic_complete_commit(struct vc4_commit *c) + + drm_atomic_helper_commit_modeset_enables(dev, state); + ++ /* Make sure that drm_atomic_helper_wait_for_vblanks() ++ * actually waits for vblank. If we're doing a full atomic ++ * modeset (as opposed to a vc4_update_plane() short circuit), ++ * then we need to wait for scanout to be done with our ++ * display lists before we free it and potentially reallocate ++ * and overwrite the dlist memory with a new modeset. ++ */ ++ state->legacy_cursor_update = false; ++ + drm_atomic_helper_wait_for_vblanks(dev, state); + + drm_atomic_helper_cleanup_planes(dev, state); +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 6edd87323f4ed52daa015239af2ae97e2443917a..dad66017ebb4668546d8fe5cd2d93aaf52c30666 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -33,8 +33,12 @@ struct vc4_plane_state { + u32 dlist_size; /* Number of dwords allocated for the display list */ + u32 dlist_count; /* Number of used dwords in the display list. */ + +- /* Offset in the dlist to pointer word 0. */ +- u32 pw0_offset; ++ /* Offset in the dlist to various words, for pageflip or ++ * cursor updates. ++ */ ++ u32 pos0_offset; ++ u32 pos2_offset; ++ u32 ptr0_offset; + + /* Offset where the plane's dlist was last stored in the + * hardware at vc4_crtc_atomic_flush() time. +@@ -239,6 +243,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_CTL0_UNITY); + + /* Position Word 0: Image Positions and Alpha Value */ ++ vc4_state->pos0_offset = vc4_state->dlist_count; + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(0xff, SCALER_POS0_FIXED_ALPHA) | + VC4_SET_FIELD(vc4_state->crtc_x, SCALER_POS0_START_X) | +@@ -249,6 +254,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + */ + + /* Position Word 2: Source Image Size, Alpha Mode */ ++ vc4_state->pos2_offset = vc4_state->dlist_count; + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(format->has_alpha ? + SCALER_POS2_ALPHA_MODE_PIPELINE : +@@ -260,9 +266,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +- vc4_state->pw0_offset = vc4_state->dlist_count; +- + /* Pointer Word 0: RGB / Y Pointer */ ++ vc4_state->ptr0_offset = vc4_state->dlist_count; + vc4_dlist_write(vc4_state, bo->paddr + vc4_state->offset); + + /* Pointer Context Word 0: Written by the HVS */ +@@ -348,13 +353,13 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb) + * scanout will start from this address as soon as the FIFO + * needs to refill with pixels. + */ +- writel(addr, &vc4_state->hw_dlist[vc4_state->pw0_offset]); ++ writel(addr, &vc4_state->hw_dlist[vc4_state->ptr0_offset]); + + /* Also update the CPU-side dlist copy, so that any later + * atomic updates that don't do a new modeset on our plane + * also use our updated address. + */ +- vc4_state->dlist[vc4_state->pw0_offset] = addr; ++ vc4_state->dlist[vc4_state->ptr0_offset] = addr; + } + + static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = { +@@ -370,8 +375,83 @@ static void vc4_plane_destroy(struct drm_plane *plane) + drm_plane_cleanup(plane); + } + ++/* Implements immediate (non-vblank-synced) updates of the cursor ++ * position, or falls back to the atomic helper otherwise. ++ */ ++static int ++vc4_update_plane(struct drm_plane *plane, ++ struct drm_crtc *crtc, ++ struct drm_framebuffer *fb, ++ int crtc_x, int crtc_y, ++ unsigned int crtc_w, unsigned int crtc_h, ++ uint32_t src_x, uint32_t src_y, ++ uint32_t src_w, uint32_t src_h) ++{ ++ struct drm_plane_state *plane_state; ++ struct vc4_plane_state *vc4_state; ++ ++ if (plane != crtc->cursor) ++ goto out; ++ ++ plane_state = plane->state; ++ vc4_state = to_vc4_plane_state(plane_state); ++ ++ if (!plane_state) ++ goto out; ++ ++ /* If we're changing the cursor contents, do that in the ++ * normal vblank-synced atomic path. ++ */ ++ if (fb != plane_state->fb) ++ goto out; ++ ++ /* No configuring new scaling in the fast path. */ ++ if (crtc_w != plane_state->crtc_w || ++ crtc_h != plane_state->crtc_h || ++ src_w != plane_state->src_w || ++ src_h != plane_state->src_h) { ++ goto out; ++ } ++ ++ /* Set the cursor's position on the screen. This is the ++ * expected change from the drm_mode_cursor_universal() ++ * helper. ++ */ ++ plane_state->crtc_x = crtc_x; ++ plane_state->crtc_y = crtc_y; ++ ++ /* Allow changing the start position within the cursor BO, if ++ * that matters. ++ */ ++ plane_state->src_x = src_x; ++ plane_state->src_y = src_y; ++ ++ /* Update the display list based on the new crtc_x/y. */ ++ vc4_plane_atomic_check(plane, plane_state); ++ ++ /* Note that we can't just call vc4_plane_write_dlist() ++ * because that would smash the context data that the HVS is ++ * currently using. ++ */ ++ writel(vc4_state->dlist[vc4_state->pos0_offset], ++ &vc4_state->hw_dlist[vc4_state->pos0_offset]); ++ writel(vc4_state->dlist[vc4_state->pos2_offset], ++ &vc4_state->hw_dlist[vc4_state->pos2_offset]); ++ writel(vc4_state->dlist[vc4_state->ptr0_offset], ++ &vc4_state->hw_dlist[vc4_state->ptr0_offset]); ++ ++ return 0; ++ ++out: ++ return drm_atomic_helper_update_plane(plane, crtc, fb, ++ crtc_x, crtc_y, ++ crtc_w, crtc_h, ++ src_x, src_y, ++ src_w, src_h); ++} ++ + static const struct drm_plane_funcs vc4_plane_funcs = { +- .update_plane = drm_atomic_helper_update_plane, ++ .update_plane = vc4_update_plane, + .disable_plane = drm_atomic_helper_disable_plane, + .destroy = vc4_plane_destroy, + .set_property = NULL, + +From d063af0f7115d13a2aef83663c03ac496d1535ed Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 13:25:41 -0800 +Subject: [PATCH 278/398] drm/vc4: Make the CRTCs cooperate on allocating + display lists. + +So far, we've only ever lit up one CRTC, so this has been fine. To +extend to more displays or more planes, we need to make sure we don't +run our display lists into each other. + +Signed-off-by: Eric Anholt +(cherry picked from commit d8dbf44f13b91185c618219d912b246817a8d132) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 115 +++++++++++++++++++++++------------------ + drivers/gpu/drm/vc4/vc4_drv.h | 8 ++- + drivers/gpu/drm/vc4/vc4_hvs.c | 13 +++++ + 3 files changed, 84 insertions(+), 52 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 3c6791467e835032e167fc25c4ecb4cef9bd98c4..2735d44fc92f7907545c3bc9574486d60a3ab050 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -49,22 +49,27 @@ struct vc4_crtc { + /* Which HVS channel we're using for our CRTC. */ + int channel; + +- /* Pointer to the actual hardware display list memory for the +- * crtc. +- */ +- u32 __iomem *dlist; +- +- u32 dlist_size; /* in dwords */ +- + struct drm_pending_vblank_event *event; + }; + ++struct vc4_crtc_state { ++ struct drm_crtc_state base; ++ /* Dlist area for this CRTC configuration. */ ++ struct drm_mm_node mm; ++}; ++ + static inline struct vc4_crtc * + to_vc4_crtc(struct drm_crtc *crtc) + { + return (struct vc4_crtc *)crtc; + } + ++static inline struct vc4_crtc_state * ++to_vc4_crtc_state(struct drm_crtc_state *crtc_state) ++{ ++ return (struct vc4_crtc_state *)crtc_state; ++} ++ + struct vc4_crtc_data { + /* Which channel of the HVS this pixelvalve sources from. */ + int hvs_channel; +@@ -319,11 +324,13 @@ static void vc4_crtc_enable(struct drm_crtc *crtc) + static int vc4_crtc_atomic_check(struct drm_crtc *crtc, + struct drm_crtc_state *state) + { ++ struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state); + struct drm_device *dev = crtc->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + struct drm_plane *plane; +- struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ unsigned long flags; + u32 dlist_count = 0; ++ int ret; + + /* The pixelvalve can only feed one encoder (and encoders are + * 1:1 with connectors.) +@@ -346,18 +353,12 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc, + + dlist_count++; /* Account for SCALER_CTL0_END. */ + +- if (!vc4_crtc->dlist || dlist_count > vc4_crtc->dlist_size) { +- vc4_crtc->dlist = ((u32 __iomem *)vc4->hvs->dlist + +- HVS_BOOTLOADER_DLIST_END); +- vc4_crtc->dlist_size = ((SCALER_DLIST_SIZE >> 2) - +- HVS_BOOTLOADER_DLIST_END); +- +- if (dlist_count > vc4_crtc->dlist_size) { +- DRM_DEBUG_KMS("dlist too large for CRTC (%d > %d).\n", +- dlist_count, vc4_crtc->dlist_size); +- return -EINVAL; +- } +- } ++ spin_lock_irqsave(&vc4->hvs->mm_lock, flags); ++ ret = drm_mm_insert_node(&vc4->hvs->dlist_mm, &vc4_state->mm, ++ dlist_count, 1, 0); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, flags); ++ if (ret) ++ return ret; + + return 0; + } +@@ -368,47 +369,29 @@ static void vc4_crtc_atomic_flush(struct drm_crtc *crtc, + struct drm_device *dev = crtc->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); + struct drm_plane *plane; + bool debug_dump_regs = false; +- u32 __iomem *dlist_next = vc4_crtc->dlist; ++ u32 __iomem *dlist_start = vc4->hvs->dlist + vc4_state->mm.start; ++ u32 __iomem *dlist_next = dlist_start; + + if (debug_dump_regs) { + DRM_INFO("CRTC %d HVS before:\n", drm_crtc_index(crtc)); + vc4_hvs_dump_state(dev); + } + +- /* Copy all the active planes' dlist contents to the hardware dlist. +- * +- * XXX: If the new display list was large enough that it +- * overlapped a currently-read display list, we need to do +- * something like disable scanout before putting in the new +- * list. For now, we're safe because we only have the two +- * planes. +- */ ++ /* Copy all the active planes' dlist contents to the hardware dlist. */ + drm_atomic_crtc_for_each_plane(plane, crtc) { + dlist_next += vc4_plane_write_dlist(plane, dlist_next); + } + +- if (dlist_next == vc4_crtc->dlist) { +- /* If no planes were enabled, use the SCALER_CTL0_END +- * at the start of the display list memory (in the +- * bootloader section). We'll rewrite that +- * SCALER_CTL0_END, just in case, though. +- */ +- writel(SCALER_CTL0_END, vc4->hvs->dlist); +- HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), 0); +- } else { +- writel(SCALER_CTL0_END, dlist_next); +- dlist_next++; +- +- HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), +- (u32 __iomem *)vc4_crtc->dlist - +- (u32 __iomem *)vc4->hvs->dlist); +- +- /* Make the next display list start after ours. */ +- vc4_crtc->dlist_size -= (dlist_next - vc4_crtc->dlist); +- vc4_crtc->dlist = dlist_next; +- } ++ writel(SCALER_CTL0_END, dlist_next); ++ dlist_next++; ++ ++ WARN_ON_ONCE(dlist_next - dlist_start != vc4_state->mm.size); ++ ++ HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), ++ vc4_state->mm.start); + + if (debug_dump_regs) { + DRM_INFO("CRTC %d HVS after:\n", drm_crtc_index(crtc)); +@@ -573,6 +556,36 @@ static int vc4_page_flip(struct drm_crtc *crtc, + return drm_atomic_helper_page_flip(crtc, fb, event, flags); + } + ++static struct drm_crtc_state *vc4_crtc_duplicate_state(struct drm_crtc *crtc) ++{ ++ struct vc4_crtc_state *vc4_state; ++ ++ vc4_state = kzalloc(sizeof(*vc4_state), GFP_KERNEL); ++ if (!vc4_state) ++ return NULL; ++ ++ __drm_atomic_helper_crtc_duplicate_state(crtc, &vc4_state->base); ++ return &vc4_state->base; ++} ++ ++static void vc4_crtc_destroy_state(struct drm_crtc *crtc, ++ struct drm_crtc_state *state) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(crtc->dev); ++ struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state); ++ ++ if (vc4_state->mm.allocated) { ++ unsigned long flags; ++ ++ spin_lock_irqsave(&vc4->hvs->mm_lock, flags); ++ drm_mm_remove_node(&vc4_state->mm); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, flags); ++ ++ } ++ ++ __drm_atomic_helper_crtc_destroy_state(crtc, state); ++} ++ + static const struct drm_crtc_funcs vc4_crtc_funcs = { + .set_config = drm_atomic_helper_set_config, + .destroy = vc4_crtc_destroy, +@@ -581,8 +594,8 @@ static const struct drm_crtc_funcs vc4_crtc_funcs = { + .cursor_set = NULL, /* handled by drm_mode_cursor_universal */ + .cursor_move = NULL, /* handled by drm_mode_cursor_universal */ + .reset = drm_atomic_helper_crtc_reset, +- .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, +- .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, ++ .atomic_duplicate_state = vc4_crtc_duplicate_state, ++ .atomic_destroy_state = vc4_crtc_destroy_state, + }; + + static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index aa0d00e6f6c8147eabbe165f0dbdd5e854086bd4..52b747854994fc3fd0ebf1933daea0d9947a61ed 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -150,7 +150,13 @@ struct vc4_v3d { + struct vc4_hvs { + struct platform_device *pdev; + void __iomem *regs; +- void __iomem *dlist; ++ u32 __iomem *dlist; ++ ++ /* Memory manager for CRTCs to allocate space in the display ++ * list. Units are dwords. ++ */ ++ struct drm_mm dlist_mm; ++ spinlock_t mm_lock; + }; + + struct vc4_plane { +diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c +index 8098c5b21ba447c43a16c7a62b9a4de0590abe1f..9e435545b3b65c5148c36c04babacd263e29d381 100644 +--- a/drivers/gpu/drm/vc4/vc4_hvs.c ++++ b/drivers/gpu/drm/vc4/vc4_hvs.c +@@ -119,6 +119,17 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) + + hvs->dlist = hvs->regs + SCALER_DLIST_START; + ++ spin_lock_init(&hvs->mm_lock); ++ ++ /* Set up the HVS display list memory manager. We never ++ * overwrite the setup from the bootloader (just 128b out of ++ * our 16K), since we don't want to scramble the screen when ++ * transitioning from the firmware's boot setup to runtime. ++ */ ++ drm_mm_init(&hvs->dlist_mm, ++ HVS_BOOTLOADER_DLIST_END, ++ (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END); ++ + vc4->hvs = hvs; + return 0; + } +@@ -129,6 +140,8 @@ static void vc4_hvs_unbind(struct device *dev, struct device *master, + struct drm_device *drm = dev_get_drvdata(master); + struct vc4_dev *vc4 = drm->dev_private; + ++ drm_mm_takedown(&vc4->hvs->dlist_mm); ++ + vc4->hvs = NULL; + } + + +From 2b1868f853b3dd83af22ed6efbb724de5b7d07c8 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 20 Oct 2015 14:18:56 +0100 +Subject: [PATCH 279/398] drm/vc4: Add more display planes to each CRTC. + +Previously we only did the primary and cursor plane, but overlay +planes are useful and just require this setup to add, since all planes +go into the HVS display list in the same way. + +Signed-off-by: Eric Anholt +(cherry picked from commit fc2d6f1eabee9d971453da2a27a72471c2a347dd) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 56 ++++++++++++++++++++++++++++++------------ + 1 file changed, 40 insertions(+), 16 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 2735d44fc92f7907545c3bc9574486d60a3ab050..dad6a8ba380965599f5259291a9aae22b4d705f5 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -677,9 +677,9 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + struct vc4_dev *vc4 = to_vc4_dev(drm); + struct vc4_crtc *vc4_crtc; + struct drm_crtc *crtc; +- struct drm_plane *primary_plane, *cursor_plane; ++ struct drm_plane *primary_plane, *cursor_plane, *destroy_plane, *temp; + const struct of_device_id *match; +- int ret; ++ int ret, i; + + vc4_crtc = devm_kzalloc(dev, sizeof(*vc4_crtc), GFP_KERNEL); + if (!vc4_crtc) +@@ -708,27 +708,49 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + goto err; + } + +- cursor_plane = vc4_plane_init(drm, DRM_PLANE_TYPE_CURSOR); +- if (IS_ERR(cursor_plane)) { +- dev_err(dev, "failed to construct cursor plane\n"); +- ret = PTR_ERR(cursor_plane); +- goto err_primary; +- } +- +- drm_crtc_init_with_planes(drm, crtc, primary_plane, cursor_plane, ++ drm_crtc_init_with_planes(drm, crtc, primary_plane, NULL, + &vc4_crtc_funcs); + drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs); + primary_plane->crtc = crtc; +- cursor_plane->crtc = crtc; + vc4->crtc[drm_crtc_index(crtc)] = vc4_crtc; + vc4_crtc->channel = vc4_crtc->data->hvs_channel; + ++ /* Set up some arbitrary number of planes. We're not limited ++ * by a set number of physical registers, just the space in ++ * the HVS (16k) and how small an plane can be (28 bytes). ++ * However, each plane we set up takes up some memory, and ++ * increases the cost of looping over planes, which atomic ++ * modesetting does quite a bit. As a result, we pick a ++ * modest number of planes to expose, that should hopefully ++ * still cover any sane usecase. ++ */ ++ for (i = 0; i < 8; i++) { ++ struct drm_plane *plane = ++ vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY); ++ ++ if (IS_ERR(plane)) ++ continue; ++ ++ plane->possible_crtcs = 1 << drm_crtc_index(crtc); ++ } ++ ++ /* Set up the legacy cursor after overlay initialization, ++ * since we overlay planes on the CRTC in the order they were ++ * initialized. ++ */ ++ cursor_plane = vc4_plane_init(drm, DRM_PLANE_TYPE_CURSOR); ++ if (!IS_ERR(cursor_plane)) { ++ cursor_plane->possible_crtcs = 1 << drm_crtc_index(crtc); ++ cursor_plane->crtc = crtc; ++ crtc->cursor = cursor_plane; ++ } ++ + CRTC_WRITE(PV_INTEN, 0); + CRTC_WRITE(PV_INTSTAT, PV_INT_VFP_START); + ret = devm_request_irq(dev, platform_get_irq(pdev, 0), + vc4_crtc_irq_handler, 0, "vc4 crtc", vc4_crtc); + if (ret) +- goto err_cursor; ++ goto err_destroy_planes; + + vc4_set_crtc_possible_masks(drm, crtc); + +@@ -736,10 +758,12 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + + return 0; + +-err_cursor: +- cursor_plane->funcs->destroy(cursor_plane); +-err_primary: +- primary_plane->funcs->destroy(primary_plane); ++err_destroy_planes: ++ list_for_each_entry_safe(destroy_plane, temp, ++ &drm->mode_config.plane_list, head) { ++ if (destroy_plane->possible_crtcs == 1 << drm_crtc_index(crtc)) ++ destroy_plane->funcs->destroy(destroy_plane); ++ } + err: + return ret; + } + +From ff5084d6b39a8b80b98bc5efd33b759ec7b157d7 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 28 Dec 2015 14:45:25 -0800 +Subject: [PATCH 280/398] drm/vc4: Fix which value is being used for source + image size. + +This doesn't matter yet since we only allow 1:1 scaling, but the +comment clearly says we should be using the source size. + +Signed-off-by: Eric Anholt +(cherry picked from commit f863e356013d628fa65b1cd89aa298eed26fc936) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index dad66017ebb4668546d8fe5cd2d93aaf52c30666..50a51dc5d68d66e0278994a5a6409ded316f96cc 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -47,6 +47,8 @@ struct vc4_plane_state { + + /* Clipped coordinates of the plane on the display. */ + int crtc_x, crtc_y, crtc_w, crtc_h; ++ /* Clipped size of the area scanned from in the FB. */ ++ u32 src_w, src_h; + + /* Offset to start scanning out from the start of the plane's + * BO. +@@ -186,11 +188,6 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + + vc4_state->offset = fb->offsets[0]; + +- vc4_state->crtc_x = state->crtc_x; +- vc4_state->crtc_y = state->crtc_y; +- vc4_state->crtc_w = state->crtc_w; +- vc4_state->crtc_h = state->crtc_h; +- + if (state->crtc_w << 16 != state->src_w || + state->crtc_h << 16 != state->src_h) { + /* We don't support scaling yet, which involves +@@ -201,17 +198,25 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + return -EINVAL; + } + ++ vc4_state->src_w = state->src_w >> 16; ++ vc4_state->src_h = state->src_h >> 16; ++ ++ vc4_state->crtc_x = state->crtc_x; ++ vc4_state->crtc_y = state->crtc_y; ++ vc4_state->crtc_w = state->crtc_w; ++ vc4_state->crtc_h = state->crtc_h; ++ + if (vc4_state->crtc_x < 0) { + vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, + 0) * + -vc4_state->crtc_x); +- vc4_state->crtc_w += vc4_state->crtc_x; ++ vc4_state->src_w += vc4_state->crtc_x; + vc4_state->crtc_x = 0; + } + + if (vc4_state->crtc_y < 0) { + vc4_state->offset += fb->pitches[0] * -vc4_state->crtc_y; +- vc4_state->crtc_h += vc4_state->crtc_y; ++ vc4_state->src_h += vc4_state->crtc_y; + vc4_state->crtc_y = 0; + } + +@@ -260,8 +265,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_POS2_ALPHA_MODE_PIPELINE : + SCALER_POS2_ALPHA_MODE_FIXED, + SCALER_POS2_ALPHA_MODE) | +- VC4_SET_FIELD(vc4_state->crtc_w, SCALER_POS2_WIDTH) | +- VC4_SET_FIELD(vc4_state->crtc_h, SCALER_POS2_HEIGHT)); ++ VC4_SET_FIELD(vc4_state->src_w, SCALER_POS2_WIDTH) | ++ VC4_SET_FIELD(vc4_state->src_h, SCALER_POS2_HEIGHT)); + + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +From 280653e31394154803ca5d9cc79f190eb0db4150 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 20 Oct 2015 16:06:57 +0100 +Subject: [PATCH 281/398] drm/vc4: Add support for scaling of display planes. + +This implements a simple policy for choosing scaling modes +(trapezoidal for decimation, PPF for magnification), and a single PPF +filter (Mitchell/Netravali's recommendation). + +Signed-off-by: Eric Anholt +(cherry picked from commit 21af94cf1a4c2d3450ab7fead58e6e2291ab92a9) +--- + drivers/gpu/drm/vc4/vc4_drv.h | 4 + + drivers/gpu/drm/vc4/vc4_hvs.c | 84 +++++++++++++ + drivers/gpu/drm/vc4/vc4_plane.c | 253 +++++++++++++++++++++++++++++++++++++--- + drivers/gpu/drm/vc4/vc4_regs.h | 46 ++++++++ + 4 files changed, 374 insertions(+), 13 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 52b747854994fc3fd0ebf1933daea0d9947a61ed..49665d20239399b44e588419a9eee653d80c1b04 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -156,7 +156,11 @@ struct vc4_hvs { + * list. Units are dwords. + */ + struct drm_mm dlist_mm; ++ /* Memory manager for the LBM memory used by HVS scaling. */ ++ struct drm_mm lbm_mm; + spinlock_t mm_lock; ++ ++ struct drm_mm_node mitchell_netravali_filter; + }; + + struct vc4_plane { +diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c +index 9e435545b3b65c5148c36c04babacd263e29d381..6fbab1c82cb1089bde0834f3e0bf1fdf99f54221 100644 +--- a/drivers/gpu/drm/vc4/vc4_hvs.c ++++ b/drivers/gpu/drm/vc4/vc4_hvs.c +@@ -100,12 +100,76 @@ int vc4_hvs_debugfs_regs(struct seq_file *m, void *unused) + } + #endif + ++/* The filter kernel is composed of dwords each containing 3 9-bit ++ * signed integers packed next to each other. ++ */ ++#define VC4_INT_TO_COEFF(coeff) (coeff & 0x1ff) ++#define VC4_PPF_FILTER_WORD(c0, c1, c2) \ ++ ((((c0) & 0x1ff) << 0) | \ ++ (((c1) & 0x1ff) << 9) | \ ++ (((c2) & 0x1ff) << 18)) ++ ++/* The whole filter kernel is arranged as the coefficients 0-16 going ++ * up, then a pad, then 17-31 going down and reversed within the ++ * dwords. This means that a linear phase kernel (where it's ++ * symmetrical at the boundary between 15 and 16) has the last 5 ++ * dwords matching the first 5, but reversed. ++ */ ++#define VC4_LINEAR_PHASE_KERNEL(c0, c1, c2, c3, c4, c5, c6, c7, c8, \ ++ c9, c10, c11, c12, c13, c14, c15) \ ++ {VC4_PPF_FILTER_WORD(c0, c1, c2), \ ++ VC4_PPF_FILTER_WORD(c3, c4, c5), \ ++ VC4_PPF_FILTER_WORD(c6, c7, c8), \ ++ VC4_PPF_FILTER_WORD(c9, c10, c11), \ ++ VC4_PPF_FILTER_WORD(c12, c13, c14), \ ++ VC4_PPF_FILTER_WORD(c15, c15, 0)} ++ ++#define VC4_LINEAR_PHASE_KERNEL_DWORDS 6 ++#define VC4_KERNEL_DWORDS (VC4_LINEAR_PHASE_KERNEL_DWORDS * 2 - 1) ++ ++/* Recommended B=1/3, C=1/3 filter choice from Mitchell/Netravali. ++ * http://www.cs.utexas.edu/~fussell/courses/cs384g/lectures/mitchell/Mitchell.pdf ++ */ ++static const u32 mitchell_netravali_1_3_1_3_kernel[] = ++ VC4_LINEAR_PHASE_KERNEL(0, -2, -6, -8, -10, -8, -3, 2, 18, ++ 50, 82, 119, 155, 187, 213, 227); ++ ++static int vc4_hvs_upload_linear_kernel(struct vc4_hvs *hvs, ++ struct drm_mm_node *space, ++ const u32 *kernel) ++{ ++ int ret, i; ++ u32 __iomem *dst_kernel; ++ ++ ret = drm_mm_insert_node(&hvs->dlist_mm, space, VC4_KERNEL_DWORDS, 1, ++ 0); ++ if (ret) { ++ DRM_ERROR("Failed to allocate space for filter kernel: %d\n", ++ ret); ++ return ret; ++ } ++ ++ dst_kernel = hvs->dlist + space->start; ++ ++ for (i = 0; i < VC4_KERNEL_DWORDS; i++) { ++ if (i < VC4_LINEAR_PHASE_KERNEL_DWORDS) ++ writel(kernel[i], &dst_kernel[i]); ++ else { ++ writel(kernel[VC4_KERNEL_DWORDS - i - 1], ++ &dst_kernel[i]); ++ } ++ } ++ ++ return 0; ++} ++ + static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) + { + struct platform_device *pdev = to_platform_device(dev); + struct drm_device *drm = dev_get_drvdata(master); + struct vc4_dev *vc4 = drm->dev_private; + struct vc4_hvs *hvs = NULL; ++ int ret; + + hvs = devm_kzalloc(&pdev->dev, sizeof(*hvs), GFP_KERNEL); + if (!hvs) +@@ -130,6 +194,22 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data) + HVS_BOOTLOADER_DLIST_END, + (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END); + ++ /* Set up the HVS LBM memory manager. We could have some more ++ * complicated data structure that allowed reuse of LBM areas ++ * between planes when they don't overlap on the screen, but ++ * for now we just allocate globally. ++ */ ++ drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024); ++ ++ /* Upload filter kernels. We only have the one for now, so we ++ * keep it around for the lifetime of the driver. ++ */ ++ ret = vc4_hvs_upload_linear_kernel(hvs, ++ &hvs->mitchell_netravali_filter, ++ mitchell_netravali_1_3_1_3_kernel); ++ if (ret) ++ return ret; ++ + vc4->hvs = hvs; + return 0; + } +@@ -140,7 +220,11 @@ static void vc4_hvs_unbind(struct device *dev, struct device *master, + struct drm_device *drm = dev_get_drvdata(master); + struct vc4_dev *vc4 = drm->dev_private; + ++ if (vc4->hvs->mitchell_netravali_filter.allocated) ++ drm_mm_remove_node(&vc4->hvs->mitchell_netravali_filter); ++ + drm_mm_takedown(&vc4->hvs->dlist_mm); ++ drm_mm_takedown(&vc4->hvs->lbm_mm); + + vc4->hvs = NULL; + } +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 50a51dc5d68d66e0278994a5a6409ded316f96cc..6b8903879d72e10352b203d904bc0a329161410e 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -24,6 +24,12 @@ + #include "drm_fb_cma_helper.h" + #include "drm_plane_helper.h" + ++enum vc4_scaling_mode { ++ VC4_SCALING_NONE, ++ VC4_SCALING_TPZ, ++ VC4_SCALING_PPF, ++}; ++ + struct vc4_plane_state { + struct drm_plane_state base; + /* System memory copy of the display list for this element, computed +@@ -47,13 +53,19 @@ struct vc4_plane_state { + + /* Clipped coordinates of the plane on the display. */ + int crtc_x, crtc_y, crtc_w, crtc_h; +- /* Clipped size of the area scanned from in the FB. */ +- u32 src_w, src_h; ++ /* Clipped area being scanned from in the FB. */ ++ u32 src_x, src_y, src_w, src_h; ++ ++ enum vc4_scaling_mode x_scaling, y_scaling; ++ bool is_unity; + + /* Offset to start scanning out from the start of the plane's + * BO. + */ + u32 offset; ++ ++ /* Our allocation in LBM for temporary storage during scaling. */ ++ struct drm_mm_node lbm; + }; + + static inline struct vc4_plane_state * +@@ -106,6 +118,16 @@ static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) + return NULL; + } + ++static enum vc4_scaling_mode vc4_get_scaling_mode(u32 src, u32 dst) ++{ ++ if (dst > src) ++ return VC4_SCALING_PPF; ++ else if (dst < src) ++ return VC4_SCALING_TPZ; ++ else ++ return VC4_SCALING_NONE; ++} ++ + static bool plane_enabled(struct drm_plane_state *state) + { + return state->fb && state->crtc; +@@ -122,6 +144,8 @@ static struct drm_plane_state *vc4_plane_duplicate_state(struct drm_plane *plane + if (!vc4_state) + return NULL; + ++ memset(&vc4_state->lbm, 0, sizeof(vc4_state->lbm)); ++ + __drm_atomic_helper_plane_duplicate_state(plane, &vc4_state->base); + + if (vc4_state->dlist) { +@@ -141,8 +165,17 @@ static struct drm_plane_state *vc4_plane_duplicate_state(struct drm_plane *plane + static void vc4_plane_destroy_state(struct drm_plane *plane, + struct drm_plane_state *state) + { ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + ++ if (vc4_state->lbm.allocated) { ++ unsigned long irqflags; ++ ++ spin_lock_irqsave(&vc4->hvs->mm_lock, irqflags); ++ drm_mm_remove_node(&vc4_state->lbm); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, irqflags); ++ } ++ + kfree(vc4_state->dlist); + __drm_atomic_helper_plane_destroy_state(plane, &vc4_state->base); + kfree(state); +@@ -181,23 +214,60 @@ static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) + vc4_state->dlist[vc4_state->dlist_count++] = val; + } + ++/* Returns the scl0/scl1 field based on whether the dimensions need to ++ * be up/down/non-scaled. ++ * ++ * This is a replication of a table from the spec. ++ */ ++static u32 vc4_get_scl_field(struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ ++ switch (vc4_state->x_scaling << 2 | vc4_state->y_scaling) { ++ case VC4_SCALING_PPF << 2 | VC4_SCALING_PPF: ++ return SCALER_CTL0_SCL_H_PPF_V_PPF; ++ case VC4_SCALING_TPZ << 2 | VC4_SCALING_PPF: ++ return SCALER_CTL0_SCL_H_TPZ_V_PPF; ++ case VC4_SCALING_PPF << 2 | VC4_SCALING_TPZ: ++ return SCALER_CTL0_SCL_H_PPF_V_TPZ; ++ case VC4_SCALING_TPZ << 2 | VC4_SCALING_TPZ: ++ return SCALER_CTL0_SCL_H_TPZ_V_TPZ; ++ case VC4_SCALING_PPF << 2 | VC4_SCALING_NONE: ++ return SCALER_CTL0_SCL_H_PPF_V_NONE; ++ case VC4_SCALING_NONE << 2 | VC4_SCALING_PPF: ++ return SCALER_CTL0_SCL_H_NONE_V_PPF; ++ case VC4_SCALING_NONE << 2 | VC4_SCALING_TPZ: ++ return SCALER_CTL0_SCL_H_NONE_V_TPZ; ++ case VC4_SCALING_TPZ << 2 | VC4_SCALING_NONE: ++ return SCALER_CTL0_SCL_H_TPZ_V_NONE; ++ default: ++ case VC4_SCALING_NONE << 2 | VC4_SCALING_NONE: ++ /* The unity case is independently handled by ++ * SCALER_CTL0_UNITY. ++ */ ++ return 0; ++ } ++} ++ + static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + { ++ struct drm_plane *plane = state->plane; + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; ++ u32 subpixel_src_mask = (1 << 16) - 1; + + vc4_state->offset = fb->offsets[0]; + +- if (state->crtc_w << 16 != state->src_w || +- state->crtc_h << 16 != state->src_h) { +- /* We don't support scaling yet, which involves +- * allocating the LBM memory for scaling temporary +- * storage, and putting filter kernels in the HVS +- * context. +- */ ++ /* We don't support subpixel source positioning for scaling. */ ++ if ((state->src_x & subpixel_src_mask) || ++ (state->src_y & subpixel_src_mask) || ++ (state->src_w & subpixel_src_mask) || ++ (state->src_h & subpixel_src_mask)) { + return -EINVAL; + } + ++ vc4_state->src_x = state->src_x >> 16; ++ vc4_state->src_y = state->src_y >> 16; + vc4_state->src_w = state->src_w >> 16; + vc4_state->src_h = state->src_h >> 16; + +@@ -206,6 +276,23 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + vc4_state->crtc_w = state->crtc_w; + vc4_state->crtc_h = state->crtc_h; + ++ vc4_state->x_scaling = vc4_get_scaling_mode(vc4_state->src_w, ++ vc4_state->crtc_w); ++ vc4_state->y_scaling = vc4_get_scaling_mode(vc4_state->src_h, ++ vc4_state->crtc_h); ++ vc4_state->is_unity = (vc4_state->x_scaling == VC4_SCALING_NONE && ++ vc4_state->y_scaling == VC4_SCALING_NONE); ++ ++ /* No configuring scaling on the cursor plane, since it gets ++ non-vblank-synced updates, and scaling requires requires ++ LBM changes which have to be vblank-synced. ++ */ ++ if (plane->type == DRM_PLANE_TYPE_CURSOR && !vc4_state->is_unity) ++ return -EINVAL; ++ ++ /* Clamp the on-screen start x/y to 0. The hardware doesn't ++ * support negative y, and negative x wastes bandwidth. ++ */ + if (vc4_state->crtc_x < 0) { + vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, + 0) * +@@ -223,6 +310,87 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + return 0; + } + ++static void vc4_write_tpz(struct vc4_plane_state *vc4_state, u32 src, u32 dst) ++{ ++ u32 scale, recip; ++ ++ scale = (1 << 16) * src / dst; ++ ++ /* The specs note that while the reciprocal would be defined ++ * as (1<<32)/scale, ~0 is close enough. ++ */ ++ recip = ~0 / scale; ++ ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(scale, SCALER_TPZ0_SCALE) | ++ VC4_SET_FIELD(0, SCALER_TPZ0_IPHASE)); ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(recip, SCALER_TPZ1_RECIP)); ++} ++ ++static void vc4_write_ppf(struct vc4_plane_state *vc4_state, u32 src, u32 dst) ++{ ++ u32 scale = (1 << 16) * src / dst; ++ ++ vc4_dlist_write(vc4_state, ++ SCALER_PPF_AGC | ++ VC4_SET_FIELD(scale, SCALER_PPF_SCALE) | ++ VC4_SET_FIELD(0, SCALER_PPF_IPHASE)); ++} ++ ++static u32 vc4_lbm_size(struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ /* This is the worst case number. One of the two sizes will ++ * be used depending on the scaling configuration. ++ */ ++ u32 pix_per_line = max(vc4_state->src_w, (u32)vc4_state->crtc_w); ++ u32 lbm; ++ ++ if (vc4_state->is_unity) ++ return 0; ++ else if (vc4_state->y_scaling == VC4_SCALING_TPZ) ++ lbm = pix_per_line * 8; ++ else { ++ /* In special cases, this multiplier might be 12. */ ++ lbm = pix_per_line * 16; ++ } ++ ++ lbm = roundup(lbm, 32); ++ ++ return lbm; ++} ++ ++static void vc4_write_scaling_parameters(struct drm_plane_state *state) ++{ ++ struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); ++ ++ /* Ch0 H-PPF Word 0: Scaling Parameters */ ++ if (vc4_state->x_scaling == VC4_SCALING_PPF) { ++ vc4_write_ppf(vc4_state, ++ vc4_state->src_w, vc4_state->crtc_w); ++ } ++ ++ /* Ch0 V-PPF Words 0-1: Scaling Parameters, Context */ ++ if (vc4_state->y_scaling == VC4_SCALING_PPF) { ++ vc4_write_ppf(vc4_state, ++ vc4_state->src_h, vc4_state->crtc_h); ++ vc4_dlist_write(vc4_state, 0xc0c0c0c0); ++ } ++ ++ /* Ch0 H-TPZ Words 0-1: Scaling Parameters, Recip */ ++ if (vc4_state->x_scaling == VC4_SCALING_TPZ) { ++ vc4_write_tpz(vc4_state, ++ vc4_state->src_w, vc4_state->crtc_w); ++ } ++ ++ /* Ch0 V-TPZ Words 0-2: Scaling Parameters, Recip, Context */ ++ if (vc4_state->y_scaling == VC4_SCALING_TPZ) { ++ vc4_write_tpz(vc4_state, ++ vc4_state->src_h, vc4_state->crtc_h); ++ vc4_dlist_write(vc4_state, 0xc0c0c0c0); ++ } ++} + + /* Writes out a full display list for an active plane to the plane's + * private dlist state. +@@ -230,22 +398,50 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + static int vc4_plane_mode_set(struct drm_plane *plane, + struct drm_plane_state *state) + { ++ struct vc4_dev *vc4 = to_vc4_dev(plane->dev); + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; + struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); + u32 ctl0_offset = vc4_state->dlist_count; + const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); ++ u32 scl; ++ u32 lbm_size; ++ unsigned long irqflags; + int ret; + + ret = vc4_plane_setup_clipping_and_scaling(state); + if (ret) + return ret; + ++ /* Allocate the LBM memory that the HVS will use for temporary ++ * storage due to our scaling/format conversion. ++ */ ++ lbm_size = vc4_lbm_size(state); ++ if (lbm_size) { ++ if (!vc4_state->lbm.allocated) { ++ spin_lock_irqsave(&vc4->hvs->mm_lock, irqflags); ++ ret = drm_mm_insert_node(&vc4->hvs->lbm_mm, ++ &vc4_state->lbm, ++ lbm_size, 32, 0); ++ spin_unlock_irqrestore(&vc4->hvs->mm_lock, irqflags); ++ } else { ++ WARN_ON_ONCE(lbm_size != vc4_state->lbm.size); ++ } ++ } ++ ++ if (ret) ++ return ret; ++ ++ scl = vc4_get_scl_field(state); ++ ++ /* Control word */ + vc4_dlist_write(vc4_state, + SCALER_CTL0_VALID | + (format->pixel_order << SCALER_CTL0_ORDER_SHIFT) | + (format->hvs << SCALER_CTL0_PIXEL_FORMAT_SHIFT) | +- SCALER_CTL0_UNITY); ++ (vc4_state->is_unity ? SCALER_CTL0_UNITY : 0) | ++ VC4_SET_FIELD(scl, SCALER_CTL0_SCL0) | ++ VC4_SET_FIELD(scl, SCALER_CTL0_SCL1)); + + /* Position Word 0: Image Positions and Alpha Value */ + vc4_state->pos0_offset = vc4_state->dlist_count; +@@ -254,9 +450,14 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + VC4_SET_FIELD(vc4_state->crtc_x, SCALER_POS0_START_X) | + VC4_SET_FIELD(vc4_state->crtc_y, SCALER_POS0_START_Y)); + +- /* Position Word 1: Scaled Image Dimensions. +- * Skipped due to SCALER_CTL0_UNITY scaling. +- */ ++ /* Position Word 1: Scaled Image Dimensions. */ ++ if (!vc4_state->is_unity) { ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(vc4_state->crtc_w, ++ SCALER_POS1_SCL_WIDTH) | ++ VC4_SET_FIELD(vc4_state->crtc_h, ++ SCALER_POS1_SCL_HEIGHT)); ++ } + + /* Position Word 2: Source Image Size, Alpha Mode */ + vc4_state->pos2_offset = vc4_state->dlist_count; +@@ -282,6 +483,32 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + vc4_dlist_write(vc4_state, + VC4_SET_FIELD(fb->pitches[0], SCALER_SRC_PITCH)); + ++ if (!vc4_state->is_unity) { ++ /* LBM Base Address. */ ++ if (vc4_state->y_scaling != VC4_SCALING_NONE) ++ vc4_dlist_write(vc4_state, vc4_state->lbm.start); ++ ++ vc4_write_scaling_parameters(state); ++ ++ /* If any PPF setup was done, then all the kernel ++ * pointers get uploaded. ++ */ ++ if (vc4_state->x_scaling == VC4_SCALING_PPF || ++ vc4_state->y_scaling == VC4_SCALING_PPF) { ++ u32 kernel = VC4_SET_FIELD(vc4->hvs->mitchell_netravali_filter.start, ++ SCALER_PPF_KERNEL_OFFSET); ++ ++ /* HPPF plane 0 */ ++ vc4_dlist_write(vc4_state, kernel); ++ /* VPPF plane 0 */ ++ vc4_dlist_write(vc4_state, kernel); ++ /* HPPF plane 1 */ ++ vc4_dlist_write(vc4_state, kernel); ++ /* VPPF plane 1 */ ++ vc4_dlist_write(vc4_state, kernel); ++ } ++ } ++ + vc4_state->dlist[ctl0_offset] |= + VC4_SET_FIELD(vc4_state->dlist_count, SCALER_CTL0_SIZE); + +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 4e52a0a885515252befc2fdf7abf99b707ae4bef..037c7fe671878e833f6843512d30147204948342 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -536,6 +536,21 @@ enum hvs_pixel_format { + #define SCALER_CTL0_ORDER_MASK VC4_MASK(14, 13) + #define SCALER_CTL0_ORDER_SHIFT 13 + ++#define SCALER_CTL0_SCL1_MASK VC4_MASK(10, 8) ++#define SCALER_CTL0_SCL1_SHIFT 8 ++ ++#define SCALER_CTL0_SCL0_MASK VC4_MASK(7, 5) ++#define SCALER_CTL0_SCL0_SHIFT 5 ++ ++#define SCALER_CTL0_SCL_H_PPF_V_PPF 0 ++#define SCALER_CTL0_SCL_H_TPZ_V_PPF 1 ++#define SCALER_CTL0_SCL_H_PPF_V_TPZ 2 ++#define SCALER_CTL0_SCL_H_TPZ_V_TPZ 3 ++#define SCALER_CTL0_SCL_H_PPF_V_NONE 4 ++#define SCALER_CTL0_SCL_H_NONE_V_PPF 5 ++#define SCALER_CTL0_SCL_H_NONE_V_TPZ 6 ++#define SCALER_CTL0_SCL_H_TPZ_V_NONE 7 ++ + /* Set to indicate no scaling. */ + #define SCALER_CTL0_UNITY BIT(4) + +@@ -551,6 +566,12 @@ enum hvs_pixel_format { + #define SCALER_POS0_START_X_MASK VC4_MASK(11, 0) + #define SCALER_POS0_START_X_SHIFT 0 + ++#define SCALER_POS1_SCL_HEIGHT_MASK VC4_MASK(27, 16) ++#define SCALER_POS1_SCL_HEIGHT_SHIFT 16 ++ ++#define SCALER_POS1_SCL_WIDTH_MASK VC4_MASK(11, 0) ++#define SCALER_POS1_SCL_WIDTH_SHIFT 0 ++ + #define SCALER_POS2_ALPHA_MODE_MASK VC4_MASK(31, 30) + #define SCALER_POS2_ALPHA_MODE_SHIFT 30 + #define SCALER_POS2_ALPHA_MODE_PIPELINE 0 +@@ -564,6 +585,31 @@ enum hvs_pixel_format { + #define SCALER_POS2_WIDTH_MASK VC4_MASK(11, 0) + #define SCALER_POS2_WIDTH_SHIFT 0 + ++#define SCALER_TPZ0_VERT_RECALC BIT(31) ++#define SCALER_TPZ0_SCALE_MASK VC4_MASK(28, 8) ++#define SCALER_TPZ0_SCALE_SHIFT 8 ++#define SCALER_TPZ0_IPHASE_MASK VC4_MASK(7, 0) ++#define SCALER_TPZ0_IPHASE_SHIFT 0 ++#define SCALER_TPZ1_RECIP_MASK VC4_MASK(15, 0) ++#define SCALER_TPZ1_RECIP_SHIFT 0 ++ ++/* Skips interpolating coefficients to 64 phases, so just 8 are used. ++ * Required for nearest neighbor. ++ */ ++#define SCALER_PPF_NOINTERP BIT(31) ++/* Replaes the highest valued coefficient with one that makes all 4 ++ * sum to unity. ++ */ ++#define SCALER_PPF_AGC BIT(30) ++#define SCALER_PPF_SCALE_MASK VC4_MASK(24, 8) ++#define SCALER_PPF_SCALE_SHIFT 8 ++#define SCALER_PPF_IPHASE_MASK VC4_MASK(6, 0) ++#define SCALER_PPF_IPHASE_SHIFT 0 ++ ++#define SCALER_PPF_KERNEL_OFFSET_MASK VC4_MASK(13, 0) ++#define SCALER_PPF_KERNEL_OFFSET_SHIFT 0 ++#define SCALER_PPF_KERNEL_UNCACHED BIT(31) ++ + #define SCALER_SRC_PITCH_MASK VC4_MASK(15, 0) + #define SCALER_SRC_PITCH_SHIFT 0 + + +From 71915513512e74556d092bcda332ffdff9cea846 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 30 Dec 2015 12:25:44 -0800 +Subject: [PATCH 282/398] drm/vc4: Add support for YUV planes. + +This supports 420 and 422 subsampling with 2 or 3 planes, tested with +modetest. It doesn't set up chroma subsampling position (which it +appears KMS doesn't deal with yet). + +The LBM memory is overallocated in many cases, but apparently the docs +aren't quite correct and I'll probably need to look at the hardware +source to really figure it out. + +Signed-off-by: Eric Anholt +(cherry picked from commit fc04023fafecf19ebd09278d8d67dc5ed1f68b46) +--- + drivers/gpu/drm/vc4/vc4_plane.c | 256 +++++++++++++++++++++++++++++++--------- + drivers/gpu/drm/vc4/vc4_regs.h | 56 ++++++++- + 2 files changed, 253 insertions(+), 59 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c +index 6b8903879d72e10352b203d904bc0a329161410e..90f6f992abb1cf848b1a3e6582b62f9938dd2e06 100644 +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -54,15 +54,19 @@ struct vc4_plane_state { + /* Clipped coordinates of the plane on the display. */ + int crtc_x, crtc_y, crtc_w, crtc_h; + /* Clipped area being scanned from in the FB. */ +- u32 src_x, src_y, src_w, src_h; ++ u32 src_x, src_y; + +- enum vc4_scaling_mode x_scaling, y_scaling; ++ u32 src_w[2], src_h[2]; ++ ++ /* Scaling selection for the RGB/Y plane and the Cb/Cr planes. */ ++ enum vc4_scaling_mode x_scaling[2], y_scaling[2]; + bool is_unity; ++ bool is_yuv; + + /* Offset to start scanning out from the start of the plane's + * BO. + */ +- u32 offset; ++ u32 offsets[3]; + + /* Our allocation in LBM for temporary storage during scaling. */ + struct drm_mm_node lbm; +@@ -79,6 +83,7 @@ static const struct hvs_format { + u32 hvs; /* HVS_FORMAT_* */ + u32 pixel_order; + bool has_alpha; ++ bool flip_cbcr; + } hvs_formats[] = { + { + .drm = DRM_FORMAT_XRGB8888, .hvs = HVS_PIXEL_FORMAT_RGBA8888, +@@ -104,6 +109,32 @@ static const struct hvs_format { + .drm = DRM_FORMAT_XRGB1555, .hvs = HVS_PIXEL_FORMAT_RGBA5551, + .pixel_order = HVS_PIXEL_ORDER_ABGR, .has_alpha = false, + }, ++ { ++ .drm = DRM_FORMAT_YUV422, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_3PLANE, ++ }, ++ { ++ .drm = DRM_FORMAT_YVU422, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_3PLANE, ++ .flip_cbcr = true, ++ }, ++ { ++ .drm = DRM_FORMAT_YUV420, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE, ++ }, ++ { ++ .drm = DRM_FORMAT_YVU420, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE, ++ .flip_cbcr = true, ++ }, ++ { ++ .drm = DRM_FORMAT_NV12, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV420_2PLANE, ++ }, ++ { ++ .drm = DRM_FORMAT_NV16, ++ .hvs = HVS_PIXEL_FORMAT_YCBCR_YUV422_2PLANE, ++ }, + }; + + static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) +@@ -219,11 +250,11 @@ static void vc4_dlist_write(struct vc4_plane_state *vc4_state, u32 val) + * + * This is a replication of a table from the spec. + */ +-static u32 vc4_get_scl_field(struct drm_plane_state *state) ++static u32 vc4_get_scl_field(struct drm_plane_state *state, int plane) + { + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + +- switch (vc4_state->x_scaling << 2 | vc4_state->y_scaling) { ++ switch (vc4_state->x_scaling[plane] << 2 | vc4_state->y_scaling[plane]) { + case VC4_SCALING_PPF << 2 | VC4_SCALING_PPF: + return SCALER_CTL0_SCL_H_PPF_V_PPF; + case VC4_SCALING_TPZ << 2 | VC4_SCALING_PPF: +@@ -254,9 +285,16 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + struct drm_plane *plane = state->plane; + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; ++ struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); + u32 subpixel_src_mask = (1 << 16) - 1; ++ u32 format = fb->pixel_format; ++ int num_planes = drm_format_num_planes(format); ++ u32 h_subsample = 1; ++ u32 v_subsample = 1; ++ int i; + +- vc4_state->offset = fb->offsets[0]; ++ for (i = 0; i < num_planes; i++) ++ vc4_state->offsets[i] = bo->paddr + fb->offsets[i]; + + /* We don't support subpixel source positioning for scaling. */ + if ((state->src_x & subpixel_src_mask) || +@@ -268,20 +306,48 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + + vc4_state->src_x = state->src_x >> 16; + vc4_state->src_y = state->src_y >> 16; +- vc4_state->src_w = state->src_w >> 16; +- vc4_state->src_h = state->src_h >> 16; ++ vc4_state->src_w[0] = state->src_w >> 16; ++ vc4_state->src_h[0] = state->src_h >> 16; + + vc4_state->crtc_x = state->crtc_x; + vc4_state->crtc_y = state->crtc_y; + vc4_state->crtc_w = state->crtc_w; + vc4_state->crtc_h = state->crtc_h; + +- vc4_state->x_scaling = vc4_get_scaling_mode(vc4_state->src_w, +- vc4_state->crtc_w); +- vc4_state->y_scaling = vc4_get_scaling_mode(vc4_state->src_h, +- vc4_state->crtc_h); +- vc4_state->is_unity = (vc4_state->x_scaling == VC4_SCALING_NONE && +- vc4_state->y_scaling == VC4_SCALING_NONE); ++ vc4_state->x_scaling[0] = vc4_get_scaling_mode(vc4_state->src_w[0], ++ vc4_state->crtc_w); ++ vc4_state->y_scaling[0] = vc4_get_scaling_mode(vc4_state->src_h[0], ++ vc4_state->crtc_h); ++ ++ if (num_planes > 1) { ++ vc4_state->is_yuv = true; ++ ++ h_subsample = drm_format_horz_chroma_subsampling(format); ++ v_subsample = drm_format_vert_chroma_subsampling(format); ++ vc4_state->src_w[1] = vc4_state->src_w[0] / h_subsample; ++ vc4_state->src_h[1] = vc4_state->src_h[0] / v_subsample; ++ ++ vc4_state->x_scaling[1] = ++ vc4_get_scaling_mode(vc4_state->src_w[1], ++ vc4_state->crtc_w); ++ vc4_state->y_scaling[1] = ++ vc4_get_scaling_mode(vc4_state->src_h[1], ++ vc4_state->crtc_h); ++ ++ /* YUV conversion requires that scaling be enabled, ++ * even on a plane that's otherwise 1:1. Choose TPZ ++ * for simplicity. ++ */ ++ if (vc4_state->x_scaling[0] == VC4_SCALING_NONE) ++ vc4_state->x_scaling[0] = VC4_SCALING_TPZ; ++ if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) ++ vc4_state->y_scaling[0] = VC4_SCALING_TPZ; ++ } ++ ++ vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE && ++ vc4_state->y_scaling[0] == VC4_SCALING_NONE && ++ vc4_state->x_scaling[1] == VC4_SCALING_NONE && ++ vc4_state->y_scaling[1] == VC4_SCALING_NONE); + + /* No configuring scaling on the cursor plane, since it gets + non-vblank-synced updates, and scaling requires requires +@@ -294,16 +360,27 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) + * support negative y, and negative x wastes bandwidth. + */ + if (vc4_state->crtc_x < 0) { +- vc4_state->offset += (drm_format_plane_cpp(fb->pixel_format, +- 0) * +- -vc4_state->crtc_x); +- vc4_state->src_w += vc4_state->crtc_x; ++ for (i = 0; i < num_planes; i++) { ++ u32 cpp = drm_format_plane_cpp(fb->pixel_format, i); ++ u32 subs = ((i == 0) ? 1 : h_subsample); ++ ++ vc4_state->offsets[i] += (cpp * ++ (-vc4_state->crtc_x) / subs); ++ } ++ vc4_state->src_w[0] += vc4_state->crtc_x; ++ vc4_state->src_w[1] += vc4_state->crtc_x / h_subsample; + vc4_state->crtc_x = 0; + } + + if (vc4_state->crtc_y < 0) { +- vc4_state->offset += fb->pitches[0] * -vc4_state->crtc_y; +- vc4_state->src_h += vc4_state->crtc_y; ++ for (i = 0; i < num_planes; i++) { ++ u32 subs = ((i == 0) ? 1 : v_subsample); ++ ++ vc4_state->offsets[i] += (fb->pitches[i] * ++ (-vc4_state->crtc_y) / subs); ++ } ++ vc4_state->src_h[0] += vc4_state->crtc_y; ++ vc4_state->src_h[1] += vc4_state->crtc_y / v_subsample; + vc4_state->crtc_y = 0; + } + +@@ -344,15 +421,23 @@ static u32 vc4_lbm_size(struct drm_plane_state *state) + /* This is the worst case number. One of the two sizes will + * be used depending on the scaling configuration. + */ +- u32 pix_per_line = max(vc4_state->src_w, (u32)vc4_state->crtc_w); ++ u32 pix_per_line = max(vc4_state->src_w[0], (u32)vc4_state->crtc_w); + u32 lbm; + +- if (vc4_state->is_unity) +- return 0; +- else if (vc4_state->y_scaling == VC4_SCALING_TPZ) +- lbm = pix_per_line * 8; +- else { +- /* In special cases, this multiplier might be 12. */ ++ if (!vc4_state->is_yuv) { ++ if (vc4_state->is_unity) ++ return 0; ++ else if (vc4_state->y_scaling[0] == VC4_SCALING_TPZ) ++ lbm = pix_per_line * 8; ++ else { ++ /* In special cases, this multiplier might be 12. */ ++ lbm = pix_per_line * 16; ++ } ++ } else { ++ /* There are cases for this going down to a multiplier ++ * of 2, but according to the firmware source, the ++ * table in the docs is somewhat wrong. ++ */ + lbm = pix_per_line * 16; + } + +@@ -361,33 +446,34 @@ static u32 vc4_lbm_size(struct drm_plane_state *state) + return lbm; + } + +-static void vc4_write_scaling_parameters(struct drm_plane_state *state) ++static void vc4_write_scaling_parameters(struct drm_plane_state *state, ++ int channel) + { + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + + /* Ch0 H-PPF Word 0: Scaling Parameters */ +- if (vc4_state->x_scaling == VC4_SCALING_PPF) { ++ if (vc4_state->x_scaling[channel] == VC4_SCALING_PPF) { + vc4_write_ppf(vc4_state, +- vc4_state->src_w, vc4_state->crtc_w); ++ vc4_state->src_w[channel], vc4_state->crtc_w); + } + + /* Ch0 V-PPF Words 0-1: Scaling Parameters, Context */ +- if (vc4_state->y_scaling == VC4_SCALING_PPF) { ++ if (vc4_state->y_scaling[channel] == VC4_SCALING_PPF) { + vc4_write_ppf(vc4_state, +- vc4_state->src_h, vc4_state->crtc_h); ++ vc4_state->src_h[channel], vc4_state->crtc_h); + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + } + + /* Ch0 H-TPZ Words 0-1: Scaling Parameters, Recip */ +- if (vc4_state->x_scaling == VC4_SCALING_TPZ) { ++ if (vc4_state->x_scaling[channel] == VC4_SCALING_TPZ) { + vc4_write_tpz(vc4_state, +- vc4_state->src_w, vc4_state->crtc_w); ++ vc4_state->src_w[channel], vc4_state->crtc_w); + } + + /* Ch0 V-TPZ Words 0-2: Scaling Parameters, Recip, Context */ +- if (vc4_state->y_scaling == VC4_SCALING_TPZ) { ++ if (vc4_state->y_scaling[channel] == VC4_SCALING_TPZ) { + vc4_write_tpz(vc4_state, +- vc4_state->src_h, vc4_state->crtc_h); ++ vc4_state->src_h[channel], vc4_state->crtc_h); + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + } + } +@@ -401,13 +487,13 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + struct vc4_dev *vc4 = to_vc4_dev(plane->dev); + struct vc4_plane_state *vc4_state = to_vc4_plane_state(state); + struct drm_framebuffer *fb = state->fb; +- struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0); + u32 ctl0_offset = vc4_state->dlist_count; + const struct hvs_format *format = vc4_get_hvs_format(fb->pixel_format); +- u32 scl; ++ int num_planes = drm_format_num_planes(format->drm); ++ u32 scl0, scl1; + u32 lbm_size; + unsigned long irqflags; +- int ret; ++ int ret, i; + + ret = vc4_plane_setup_clipping_and_scaling(state); + if (ret) +@@ -432,7 +518,19 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + if (ret) + return ret; + +- scl = vc4_get_scl_field(state); ++ /* SCL1 is used for Cb/Cr scaling of planar formats. For RGB ++ * and 4:4:4, scl1 should be set to scl0 so both channels of ++ * the scaler do the same thing. For YUV, the Y plane needs ++ * to be put in channel 1 and Cb/Cr in channel 0, so we swap ++ * the scl fields here. ++ */ ++ if (num_planes == 1) { ++ scl0 = vc4_get_scl_field(state, 1); ++ scl1 = scl0; ++ } else { ++ scl0 = vc4_get_scl_field(state, 1); ++ scl1 = vc4_get_scl_field(state, 0); ++ } + + /* Control word */ + vc4_dlist_write(vc4_state, +@@ -440,8 +538,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + (format->pixel_order << SCALER_CTL0_ORDER_SHIFT) | + (format->hvs << SCALER_CTL0_PIXEL_FORMAT_SHIFT) | + (vc4_state->is_unity ? SCALER_CTL0_UNITY : 0) | +- VC4_SET_FIELD(scl, SCALER_CTL0_SCL0) | +- VC4_SET_FIELD(scl, SCALER_CTL0_SCL1)); ++ VC4_SET_FIELD(scl0, SCALER_CTL0_SCL0) | ++ VC4_SET_FIELD(scl1, SCALER_CTL0_SCL1)); + + /* Position Word 0: Image Positions and Alpha Value */ + vc4_state->pos0_offset = vc4_state->dlist_count; +@@ -466,35 +564,68 @@ static int vc4_plane_mode_set(struct drm_plane *plane, + SCALER_POS2_ALPHA_MODE_PIPELINE : + SCALER_POS2_ALPHA_MODE_FIXED, + SCALER_POS2_ALPHA_MODE) | +- VC4_SET_FIELD(vc4_state->src_w, SCALER_POS2_WIDTH) | +- VC4_SET_FIELD(vc4_state->src_h, SCALER_POS2_HEIGHT)); ++ VC4_SET_FIELD(vc4_state->src_w[0], SCALER_POS2_WIDTH) | ++ VC4_SET_FIELD(vc4_state->src_h[0], SCALER_POS2_HEIGHT)); + + /* Position Word 3: Context. Written by the HVS. */ + vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +- /* Pointer Word 0: RGB / Y Pointer */ ++ ++ /* Pointer Word 0/1/2: RGB / Y / Cb / Cr Pointers ++ * ++ * The pointers may be any byte address. ++ */ + vc4_state->ptr0_offset = vc4_state->dlist_count; +- vc4_dlist_write(vc4_state, bo->paddr + vc4_state->offset); ++ if (!format->flip_cbcr) { ++ for (i = 0; i < num_planes; i++) ++ vc4_dlist_write(vc4_state, vc4_state->offsets[i]); ++ } else { ++ WARN_ON_ONCE(num_planes != 3); ++ vc4_dlist_write(vc4_state, vc4_state->offsets[0]); ++ vc4_dlist_write(vc4_state, vc4_state->offsets[2]); ++ vc4_dlist_write(vc4_state, vc4_state->offsets[1]); ++ } + +- /* Pointer Context Word 0: Written by the HVS */ +- vc4_dlist_write(vc4_state, 0xc0c0c0c0); ++ /* Pointer Context Word 0/1/2: Written by the HVS */ ++ for (i = 0; i < num_planes; i++) ++ vc4_dlist_write(vc4_state, 0xc0c0c0c0); + +- /* Pitch word 0: Pointer 0 Pitch */ +- vc4_dlist_write(vc4_state, +- VC4_SET_FIELD(fb->pitches[0], SCALER_SRC_PITCH)); ++ /* Pitch word 0/1/2 */ ++ for (i = 0; i < num_planes; i++) { ++ vc4_dlist_write(vc4_state, ++ VC4_SET_FIELD(fb->pitches[i], SCALER_SRC_PITCH)); ++ } ++ ++ /* Colorspace conversion words */ ++ if (vc4_state->is_yuv) { ++ vc4_dlist_write(vc4_state, SCALER_CSC0_ITR_R_601_5); ++ vc4_dlist_write(vc4_state, SCALER_CSC1_ITR_R_601_5); ++ vc4_dlist_write(vc4_state, SCALER_CSC2_ITR_R_601_5); ++ } + + if (!vc4_state->is_unity) { + /* LBM Base Address. */ +- if (vc4_state->y_scaling != VC4_SCALING_NONE) ++ if (vc4_state->y_scaling[0] != VC4_SCALING_NONE || ++ vc4_state->y_scaling[1] != VC4_SCALING_NONE) { + vc4_dlist_write(vc4_state, vc4_state->lbm.start); ++ } + +- vc4_write_scaling_parameters(state); ++ if (num_planes > 1) { ++ /* Emit Cb/Cr as channel 0 and Y as channel ++ * 1. This matches how we set up scl0/scl1 ++ * above. ++ */ ++ vc4_write_scaling_parameters(state, 1); ++ } ++ vc4_write_scaling_parameters(state, 0); + + /* If any PPF setup was done, then all the kernel + * pointers get uploaded. + */ +- if (vc4_state->x_scaling == VC4_SCALING_PPF || +- vc4_state->y_scaling == VC4_SCALING_PPF) { ++ if (vc4_state->x_scaling[0] == VC4_SCALING_PPF || ++ vc4_state->y_scaling[0] == VC4_SCALING_PPF || ++ vc4_state->x_scaling[1] == VC4_SCALING_PPF || ++ vc4_state->y_scaling[1] == VC4_SCALING_PPF) { + u32 kernel = VC4_SET_FIELD(vc4->hvs->mitchell_netravali_filter.start, + SCALER_PPF_KERNEL_OFFSET); + +@@ -698,6 +829,7 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev, + struct drm_plane *plane = NULL; + struct vc4_plane *vc4_plane; + u32 formats[ARRAY_SIZE(hvs_formats)]; ++ u32 num_formats = 0; + int ret = 0; + unsigned i; + +@@ -708,12 +840,20 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev, + goto fail; + } + +- for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) +- formats[i] = hvs_formats[i].drm; ++ for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) { ++ /* Don't allow YUV in cursor planes, since that means ++ * tuning on the scaler, which we don't allow for the ++ * cursor. ++ */ ++ if (type != DRM_PLANE_TYPE_CURSOR || ++ hvs_formats[i].hvs < HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE) { ++ formats[num_formats++] = hvs_formats[i].drm; ++ } ++ } + plane = &vc4_plane->base; + ret = drm_universal_plane_init(dev, plane, 0xff, + &vc4_plane_funcs, +- formats, ARRAY_SIZE(formats), ++ formats, num_formats, + type); + + drm_plane_helper_add(plane, &vc4_plane_helper_funcs); +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 037c7fe671878e833f6843512d30147204948342..25df20ef939c55c273c31fa73bb3f146f4f51c55 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -503,7 +503,12 @@ enum hvs_pixel_format { + HVS_PIXEL_FORMAT_RGB888 = 5, + HVS_PIXEL_FORMAT_RGBA6666 = 6, + /* 32bpp */ +- HVS_PIXEL_FORMAT_RGBA8888 = 7 ++ HVS_PIXEL_FORMAT_RGBA8888 = 7, ++ ++ HVS_PIXEL_FORMAT_YCBCR_YUV420_3PLANE = 8, ++ HVS_PIXEL_FORMAT_YCBCR_YUV420_2PLANE = 9, ++ HVS_PIXEL_FORMAT_YCBCR_YUV422_3PLANE = 10, ++ HVS_PIXEL_FORMAT_YCBCR_YUV422_2PLANE = 11, + }; + + /* Note: the LSB is the rightmost character shown. Only valid for +@@ -585,6 +590,55 @@ enum hvs_pixel_format { + #define SCALER_POS2_WIDTH_MASK VC4_MASK(11, 0) + #define SCALER_POS2_WIDTH_SHIFT 0 + ++/* Color Space Conversion words. Some values are S2.8 signed ++ * integers, except that the 2 integer bits map as {0x0: 0, 0x1: 1, ++ * 0x2: 2, 0x3: -1} ++ */ ++/* bottom 8 bits of S2.8 contribution of Cr to Blue */ ++#define SCALER_CSC0_COEF_CR_BLU_MASK VC4_MASK(31, 24) ++#define SCALER_CSC0_COEF_CR_BLU_SHIFT 24 ++/* Signed offset to apply to Y before CSC. (Y' = Y + YY_OFS) */ ++#define SCALER_CSC0_COEF_YY_OFS_MASK VC4_MASK(23, 16) ++#define SCALER_CSC0_COEF_YY_OFS_SHIFT 16 ++/* Signed offset to apply to CB before CSC (Cb' = Cb - 128 + CB_OFS). */ ++#define SCALER_CSC0_COEF_CB_OFS_MASK VC4_MASK(15, 8) ++#define SCALER_CSC0_COEF_CB_OFS_SHIFT 8 ++/* Signed offset to apply to CB before CSC (Cr' = Cr - 128 + CR_OFS). */ ++#define SCALER_CSC0_COEF_CR_OFS_MASK VC4_MASK(7, 0) ++#define SCALER_CSC0_COEF_CR_OFS_SHIFT 0 ++#define SCALER_CSC0_ITR_R_601_5 0x00f00000 ++#define SCALER_CSC0_ITR_R_709_3 0x00f00000 ++#define SCALER_CSC0_JPEG_JFIF 0x00000000 ++ ++/* S2.8 contribution of Cb to Green */ ++#define SCALER_CSC1_COEF_CB_GRN_MASK VC4_MASK(31, 22) ++#define SCALER_CSC1_COEF_CB_GRN_SHIFT 22 ++/* S2.8 contribution of Cr to Green */ ++#define SCALER_CSC1_COEF_CR_GRN_MASK VC4_MASK(21, 12) ++#define SCALER_CSC1_COEF_CR_GRN_SHIFT 12 ++/* S2.8 contribution of Y to all of RGB */ ++#define SCALER_CSC1_COEF_YY_ALL_MASK VC4_MASK(11, 2) ++#define SCALER_CSC1_COEF_YY_ALL_SHIFT 2 ++/* top 2 bits of S2.8 contribution of Cr to Blue */ ++#define SCALER_CSC1_COEF_CR_BLU_MASK VC4_MASK(1, 0) ++#define SCALER_CSC1_COEF_CR_BLU_SHIFT 0 ++#define SCALER_CSC1_ITR_R_601_5 0xe73304a8 ++#define SCALER_CSC1_ITR_R_709_3 0xf2b784a8 ++#define SCALER_CSC1_JPEG_JFIF 0xea34a400 ++ ++/* S2.8 contribution of Cb to Red */ ++#define SCALER_CSC2_COEF_CB_RED_MASK VC4_MASK(29, 20) ++#define SCALER_CSC2_COEF_CB_RED_SHIFT 20 ++/* S2.8 contribution of Cr to Red */ ++#define SCALER_CSC2_COEF_CR_RED_MASK VC4_MASK(19, 10) ++#define SCALER_CSC2_COEF_CR_RED_SHIFT 10 ++/* S2.8 contribution of Cb to Blue */ ++#define SCALER_CSC2_COEF_CB_BLU_MASK VC4_MASK(19, 10) ++#define SCALER_CSC2_COEF_CB_BLU_SHIFT 10 ++#define SCALER_CSC2_ITR_R_601_5 0x00066204 ++#define SCALER_CSC2_ITR_R_709_3 0x00072a1c ++#define SCALER_CSC2_JPEG_JFIF 0x000599c5 ++ + #define SCALER_TPZ0_VERT_RECALC BIT(31) + #define SCALER_TPZ0_SCALE_MASK VC4_MASK(28, 8) + #define SCALER_TPZ0_SCALE_SHIFT 8 + +From 5af277106a55ca8ed5b7c36ea0de5107a9a47917 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 8 Feb 2016 11:19:14 -0800 +Subject: [PATCH 283/398] drm/vc4: Fix spurious GPU resets due to BO reuse. + +We were tracking the "where are the head pointers pointing" globally, +so if another job reused the same BOs and execution was at the same +point as last time we checked, we'd stop and trigger a reset even +though the GPU had made progress. + +Signed-off-by: Eric Anholt +(cherry picked from commit c4ce60dc30912df09b2438f1e5594eae1ef64d1e) +--- + drivers/gpu/drm/vc4/vc4_drv.h | 6 +++++- + drivers/gpu/drm/vc4/vc4_gem.c | 19 ++++++++++++++----- + 2 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 49665d20239399b44e588419a9eee653d80c1b04..2f4c2b70870aae2334713056a0241fd390a429fe 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -93,7 +93,6 @@ struct vc4_dev { + struct work_struct overflow_mem_work; + + struct { +- uint32_t last_ct0ca, last_ct1ca; + struct timer_list timer; + struct work_struct reset_work; + } hangcheck; +@@ -203,6 +202,11 @@ struct vc4_exec_info { + /* Sequence number for this bin/render job. */ + uint64_t seqno; + ++ /* Last current addresses the hardware was processing when the ++ * hangcheck timer checked on us. ++ */ ++ uint32_t last_ct0ca, last_ct1ca; ++ + /* Kernel-space copy of the ioctl arguments */ + struct drm_vc4_submit_cl *args; + +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index 456333f5dc785bcd607ac9803df25e9ff582d51c..29f7e3060374efc97783dde8fd1506ff62e0076d 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -271,10 +271,17 @@ vc4_hangcheck_elapsed(unsigned long data) + struct drm_device *dev = (struct drm_device *)data; + struct vc4_dev *vc4 = to_vc4_dev(dev); + uint32_t ct0ca, ct1ca; ++ unsigned long irqflags; ++ struct vc4_exec_info *exec; ++ ++ spin_lock_irqsave(&vc4->job_lock, irqflags); ++ exec = vc4_first_job(vc4); + + /* If idle, we can stop watching for hangs. */ +- if (list_empty(&vc4->job_list)) ++ if (!exec) { ++ spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; ++ } + + ct0ca = V3D_READ(V3D_CTNCA(0)); + ct1ca = V3D_READ(V3D_CTNCA(1)); +@@ -282,14 +289,16 @@ vc4_hangcheck_elapsed(unsigned long data) + /* If we've made any progress in execution, rearm the timer + * and wait. + */ +- if (ct0ca != vc4->hangcheck.last_ct0ca || +- ct1ca != vc4->hangcheck.last_ct1ca) { +- vc4->hangcheck.last_ct0ca = ct0ca; +- vc4->hangcheck.last_ct1ca = ct1ca; ++ if (ct0ca != exec->last_ct0ca || ct1ca != exec->last_ct1ca) { ++ exec->last_ct0ca = ct0ca; ++ exec->last_ct1ca = ct1ca; ++ spin_unlock_irqrestore(&vc4->job_lock, irqflags); + vc4_queue_hangcheck(dev); + return; + } + ++ spin_unlock_irqrestore(&vc4->job_lock, irqflags); ++ + /* We've gone too long with no progress, reset. This has to + * be done from a work struct, since resetting can sleep and + * this timer hook isn't allowed to. + +From 62c7f8489b6d5397462d4cba9e16372c5cc65d9c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 5 Feb 2016 15:06:15 -0800 +Subject: [PATCH 284/398] drm/vc4: Fix a framebuffer reference leak on async + flip interrupt. + +We'd need X to queue up an async pageflip while another is +outstanding, and then take a SIGIO. I think X actually avoids sending +out the next pageflip while one's already queued, but I'm not sure. + +Signed-off-by: Eric Anholt +(cherry picked from commit 48627eb8dc55c60d35794105f6f79fb627347dbd) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index dad6a8ba380965599f5259291a9aae22b4d705f5..c65d1f0f4fd5f381c5a4b266f1f70c9e78c8b4c2 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -527,6 +527,7 @@ static int vc4_async_page_flip(struct drm_crtc *crtc, + /* Make sure all other async modesetes have landed. */ + ret = down_interruptible(&vc4->async_modeset); + if (ret) { ++ drm_framebuffer_unreference(fb); + kfree(flip_state); + return ret; + } + +From 0c3fe6cc54fe7f7a498a1116b1a7eb51cf7c25a6 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 12 Feb 2016 14:15:14 -0800 +Subject: [PATCH 285/398] drm/vc4: Bring HDMI up from power off if necessary. + +If the firmware hadn't brought up HDMI for us, we need to do its +power-on reset sequence (reset HD and and clear its STANDBY bits, +reset HDMI, and leave the PHY disabled). + +Signed-off-by: Eric Anholt +(cherry picked from commit 851479ad5927b7b1aa141ca9dedb897a7bce2b1d) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 29 ++++++++++++++++++++++++++++- + drivers/gpu/drm/vc4/vc4_regs.h | 2 ++ + 2 files changed, 30 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index d15c529bee2123eb740247bdfbc67eb4b0311f2b..c6fbee654117905de8dcf628bcb833f5237c53c0 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -497,6 +497,16 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) + goto err_put_i2c; + } + ++ /* This is the rate that is set by the firmware. The number ++ * needs to be a bit higher than the pixel clock rate ++ * (generally 148.5Mhz). ++ */ ++ ret = clk_set_rate(hdmi->hsm_clock, 163682864); ++ if (ret) { ++ DRM_ERROR("Failed to set HSM clock rate: %d\n", ret); ++ goto err_unprepare_pix; ++ } ++ + ret = clk_prepare_enable(hdmi->hsm_clock); + if (ret) { + DRM_ERROR("Failed to turn on HDMI state machine clock: %d\n", +@@ -518,7 +528,24 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) + vc4->hdmi = hdmi; + + /* HDMI core must be enabled. */ +- WARN_ON_ONCE((HD_READ(VC4_HD_M_CTL) & VC4_HD_M_ENABLE) == 0); ++ if (!(HD_READ(VC4_HD_M_CTL) & VC4_HD_M_ENABLE)) { ++ HD_WRITE(VC4_HD_M_CTL, VC4_HD_M_SW_RST); ++ udelay(1); ++ HD_WRITE(VC4_HD_M_CTL, 0); ++ ++ HD_WRITE(VC4_HD_M_CTL, VC4_HD_M_ENABLE); ++ ++ HDMI_WRITE(VC4_HDMI_SW_RESET_CONTROL, ++ VC4_HDMI_SW_RESET_HDMI | ++ VC4_HDMI_SW_RESET_FORMAT_DETECT); ++ ++ HDMI_WRITE(VC4_HDMI_SW_RESET_CONTROL, 0); ++ ++ /* PHY should be in reset, like ++ * vc4_hdmi_encoder_disable() does. ++ */ ++ HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0xf << 16); ++ } + + drm_encoder_init(drm, hdmi->encoder, &vc4_hdmi_encoder_funcs, + DRM_MODE_ENCODER_TMDS); +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 25df20ef939c55c273c31fa73bb3f146f4f51c55..31042a44577f4b3c6d57c6eb89b1777a49c7d2dc 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -456,6 +456,8 @@ + #define VC4_HDMI_TX_PHY_RESET_CTL 0x2c0 + + #define VC4_HD_M_CTL 0x00c ++# define VC4_HD_M_REGISTER_FILE_STANDBY (3 << 6) ++# define VC4_HD_M_RAM_STANDBY (3 << 4) + # define VC4_HD_M_SW_RST BIT(2) + # define VC4_HD_M_ENABLE BIT(0) + + +From c19c9b3f13c335ac43daa755723bf033ba586bfd Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 12 Feb 2016 15:16:56 -0800 +Subject: [PATCH 286/398] drm/vc4: Add another reg to HDMI debug dumping. + +This is also involved in the HDMI setup sequence so it's nice to see +it. + +Signed-off-by: Eric Anholt +(cherry picked from commit 936f1a53f32148cc6164fad7c9a26ebf144e5ffb) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index c6fbee654117905de8dcf628bcb833f5237c53c0..689e285ff874a503fb94e98db258adce9b0cf145 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -95,6 +95,7 @@ static const struct { + HDMI_REG(VC4_HDMI_SW_RESET_CONTROL), + HDMI_REG(VC4_HDMI_HOTPLUG_INT), + HDMI_REG(VC4_HDMI_HOTPLUG), ++ HDMI_REG(VC4_HDMI_RAM_PACKET_CONFIG), + HDMI_REG(VC4_HDMI_HORZA), + HDMI_REG(VC4_HDMI_HORZB), + HDMI_REG(VC4_HDMI_FIFO_CTL), + +From dfbb43ac6003e00c0c3e8b7202f41cc726eaf829 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 15 Feb 2016 17:06:02 -0800 +Subject: [PATCH 287/398] drm/vc4: Fix the name of the VSYNCD_EVEN register. + +It's used for delaying vsync in interlaced mode. + +Signed-off-by: Eric Anholt +(cherry picked from commit c31806fbdda910d337b60896040afa708bdfa2bd) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- + drivers/gpu/drm/vc4/vc4_regs.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index c65d1f0f4fd5f381c5a4b266f1f70c9e78c8b4c2..dbc1733ffc6eaeaff94a7be79fa5c07c27215e07 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -88,7 +88,7 @@ static const struct { + } crtc_regs[] = { + CRTC_REG(PV_CONTROL), + CRTC_REG(PV_V_CONTROL), +- CRTC_REG(PV_VSYNCD), ++ CRTC_REG(PV_VSYNCD_EVEN), + CRTC_REG(PV_HORZA), + CRTC_REG(PV_HORZB), + CRTC_REG(PV_VERTA), +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 31042a44577f4b3c6d57c6eb89b1777a49c7d2dc..58d4cb36e903bb5548d9ab168906299a845623ab 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -187,7 +187,7 @@ + # define PV_VCONTROL_CONTINUOUS BIT(1) + # define PV_VCONTROL_VIDEN BIT(0) + +-#define PV_VSYNCD 0x08 ++#define PV_VSYNCD_EVEN 0x08 + + #define PV_HORZA 0x0c + # define PV_HORZA_HBP_MASK VC4_MASK(31, 16) + +From 718336beca41652045661a01175241f72ee652e3 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 15 Feb 2016 17:31:41 -0800 +Subject: [PATCH 288/398] drm/vc4: Fix setting of vertical timings in the CRTC. + +It looks like when I went to add the interlaced bits, I just took the +existing PV_VERT* block and indented it, instead of copy and pasting +it first. Without this, changing resolution never worked. + +Signed-off-by: Eric Anholt +(cherry picked from commit a7c5047d1ce178dd2b1fa577fc8909ad663d56d5) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index dbc1733ffc6eaeaff94a7be79fa5c07c27215e07..ba1b7f6e3995182d23810903c3b81f6d91ab1a54 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -217,6 +217,16 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + PV_HORZB_HFP) | + VC4_SET_FIELD(mode->hdisplay, PV_HORZB_HACTIVE)); + ++ CRTC_WRITE(PV_VERTA, ++ VC4_SET_FIELD(mode->vtotal - mode->vsync_end, ++ PV_VERTA_VBP) | ++ VC4_SET_FIELD(mode->vsync_end - mode->vsync_start, ++ PV_VERTA_VSYNC)); ++ CRTC_WRITE(PV_VERTB, ++ VC4_SET_FIELD(mode->vsync_start - mode->vdisplay, ++ PV_VERTB_VFP) | ++ VC4_SET_FIELD(vactive, PV_VERTB_VACTIVE)); ++ + if (interlace) { + CRTC_WRITE(PV_VERTA_EVEN, + VC4_SET_FIELD(mode->vtotal - mode->vsync_end - 1, + +From cbf975a6e41947813f9fbdcf2a81a2a8182eea56 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 16 Feb 2016 10:24:08 -0800 +Subject: [PATCH 289/398] drm/vc4: Initialize scaler DISPBKGND on modeset. + +We weren't updating the interlaced bit, so we'd scan out incorrectly +if the firmware had brought up the TV encoder and we were switching to +HDMI. + +Signed-off-by: Eric Anholt +(cherry picked from commit 6a609209865247cc748e90158c99f374f79b494c) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 6 ++++++ + drivers/gpu/drm/vc4/vc4_regs.h | 14 ++++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index ba1b7f6e3995182d23810903c3b81f6d91ab1a54..34ff59c3d0029774b241b5dd60269606ea288b05 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -188,6 +188,8 @@ static int vc4_get_clock_select(struct drm_crtc *crtc) + + static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + { ++ struct drm_device *dev = crtc->dev; ++ struct vc4_dev *vc4 = to_vc4_dev(dev); + struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); + struct drm_crtc_state *state = crtc->state; + struct drm_display_mode *mode = &state->adjusted_mode; +@@ -256,6 +258,10 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + PV_CONTROL_FIFO_CLR | + PV_CONTROL_EN); + ++ HVS_WRITE(SCALER_DISPBKGNDX(vc4_crtc->channel), ++ SCALER_DISPBKGND_AUTOHS | ++ (interlace ? SCALER_DISPBKGND_INTERLACE : 0)); ++ + if (debug_dump_regs) { + DRM_INFO("CRTC %d regs after:\n", drm_crtc_index(crtc)); + vc4_crtc_dump_regs(vc4_crtc); +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index 58d4cb36e903bb5548d9ab168906299a845623ab..bf42a8e87111f2e5fd3108209d0a3dc9ad3e871f 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -350,6 +350,17 @@ + # define SCALER_DISPCTRLX_HEIGHT_SHIFT 0 + + #define SCALER_DISPBKGND0 0x00000044 ++# define SCALER_DISPBKGND_AUTOHS BIT(31) ++# define SCALER_DISPBKGND_INTERLACE BIT(30) ++# define SCALER_DISPBKGND_GAMMA BIT(29) ++# define SCALER_DISPBKGND_TESTMODE_MASK VC4_MASK(28, 25) ++# define SCALER_DISPBKGND_TESTMODE_SHIFT 25 ++/* Enables filling the scaler line with the RGB value in the low 24 ++ * bits before compositing. Costs cycles, so should be skipped if ++ * opaque display planes will cover everything. ++ */ ++# define SCALER_DISPBKGND_FILL BIT(24) ++ + #define SCALER_DISPSTAT0 0x00000048 + #define SCALER_DISPBASE0 0x0000004c + # define SCALER_DISPSTATX_MODE_MASK VC4_MASK(31, 30) +@@ -362,6 +373,9 @@ + # define SCALER_DISPSTATX_EMPTY BIT(28) + #define SCALER_DISPCTRL1 0x00000050 + #define SCALER_DISPBKGND1 0x00000054 ++#define SCALER_DISPBKGNDX(x) (SCALER_DISPBKGND0 + \ ++ (x) * (SCALER_DISPBKGND1 - \ ++ SCALER_DISPBKGND0)) + #define SCALER_DISPSTAT1 0x00000058 + #define SCALER_DISPSTATX(x) (SCALER_DISPSTAT0 + \ + (x) * (SCALER_DISPSTAT1 - \ + +From 500f9dd2f9e9d0b44e0e5f89d09786710c17bc71 Mon Sep 17 00:00:00 2001 +From: Varad Gautam +Date: Wed, 17 Feb 2016 19:08:21 +0530 +Subject: [PATCH 290/398] drm/vc4: improve throughput by pipelining binning and + rendering jobs + +The hardware provides us with separate threads for binning and +rendering, and the existing model waits for them both to complete +before submitting the next job. + +Splitting the binning and rendering submissions reduces idle time and +gives us approx 20-30% speedup with some x11perf tests such as -line10 +and -tilerect1. Improves openarena performance by 1.01897% +/- +0.247857% (n=16). + +Thanks to anholt for suggesting this. + +v2: Rebase on the spurious resets fix (change by anholt). + +Signed-off-by: Varad Gautam +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +(cherry picked from commit ca26d28bbaa39f31d5e7e4812603b015c8d54207) +--- + drivers/gpu/drm/vc4/vc4_drv.h | 37 +++++++++---- + drivers/gpu/drm/vc4/vc4_gem.c | 123 ++++++++++++++++++++++++++++++------------ + drivers/gpu/drm/vc4/vc4_irq.c | 58 ++++++++++++++++---- + 3 files changed, 166 insertions(+), 52 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 2f4c2b70870aae2334713056a0241fd390a429fe..7f0b63435c7e48c592deac2671c8eb7c12ad3787 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -53,7 +53,7 @@ struct vc4_dev { + /* Protects bo_cache and the BO stats. */ + struct mutex bo_lock; + +- /* Sequence number for the last job queued in job_list. ++ /* Sequence number for the last job queued in bin_job_list. + * Starts at 0 (no jobs emitted). + */ + uint64_t emit_seqno; +@@ -63,11 +63,19 @@ struct vc4_dev { + */ + uint64_t finished_seqno; + +- /* List of all struct vc4_exec_info for jobs to be executed. +- * The first job in the list is the one currently programmed +- * into ct0ca/ct1ca for execution. ++ /* List of all struct vc4_exec_info for jobs to be executed in ++ * the binner. The first job in the list is the one currently ++ * programmed into ct0ca for execution. + */ +- struct list_head job_list; ++ struct list_head bin_job_list; ++ ++ /* List of all struct vc4_exec_info for jobs that have ++ * completed binning and are ready for rendering. The first ++ * job in the list is the one currently programmed into ct1ca ++ * for execution. ++ */ ++ struct list_head render_job_list; ++ + /* List of the finished vc4_exec_infos waiting to be freed by + * job_done_work. + */ +@@ -291,11 +299,20 @@ struct vc4_exec_info { + }; + + static inline struct vc4_exec_info * +-vc4_first_job(struct vc4_dev *vc4) ++vc4_first_bin_job(struct vc4_dev *vc4) ++{ ++ if (list_empty(&vc4->bin_job_list)) ++ return NULL; ++ return list_first_entry(&vc4->bin_job_list, struct vc4_exec_info, head); ++} ++ ++static inline struct vc4_exec_info * ++vc4_first_render_job(struct vc4_dev *vc4) + { +- if (list_empty(&vc4->job_list)) ++ if (list_empty(&vc4->render_job_list)) + return NULL; +- return list_first_entry(&vc4->job_list, struct vc4_exec_info, head); ++ return list_first_entry(&vc4->render_job_list, ++ struct vc4_exec_info, head); + } + + /** +@@ -410,7 +427,9 @@ int vc4_wait_seqno_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); + int vc4_wait_bo_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +-void vc4_submit_next_job(struct drm_device *dev); ++void vc4_submit_next_bin_job(struct drm_device *dev); ++void vc4_submit_next_render_job(struct drm_device *dev); ++void vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec); + int vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, + uint64_t timeout_ns, bool interruptible); + void vc4_job_handle_completed(struct vc4_dev *vc4); +diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c +index 29f7e3060374efc97783dde8fd1506ff62e0076d..9b03a900c8391e208abaa1629ebc802a8731762e 100644 +--- a/drivers/gpu/drm/vc4/vc4_gem.c ++++ b/drivers/gpu/drm/vc4/vc4_gem.c +@@ -154,10 +154,10 @@ vc4_save_hang_state(struct drm_device *dev) + struct vc4_dev *vc4 = to_vc4_dev(dev); + struct drm_vc4_get_hang_state *state; + struct vc4_hang_state *kernel_state; +- struct vc4_exec_info *exec; ++ struct vc4_exec_info *exec[2]; + struct vc4_bo *bo; + unsigned long irqflags; +- unsigned int i, unref_list_count; ++ unsigned int i, j, unref_list_count, prev_idx; + + kernel_state = kcalloc(1, sizeof(*kernel_state), GFP_KERNEL); + if (!kernel_state) +@@ -166,37 +166,55 @@ vc4_save_hang_state(struct drm_device *dev) + state = &kernel_state->user_state; + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- exec = vc4_first_job(vc4); +- if (!exec) { ++ exec[0] = vc4_first_bin_job(vc4); ++ exec[1] = vc4_first_render_job(vc4); ++ if (!exec[0] && !exec[1]) { + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; + } + +- unref_list_count = 0; +- list_for_each_entry(bo, &exec->unref_list, unref_head) +- unref_list_count++; ++ /* Get the bos from both binner and renderer into hang state. */ ++ state->bo_count = 0; ++ for (i = 0; i < 2; i++) { ++ if (!exec[i]) ++ continue; ++ ++ unref_list_count = 0; ++ list_for_each_entry(bo, &exec[i]->unref_list, unref_head) ++ unref_list_count++; ++ state->bo_count += exec[i]->bo_count + unref_list_count; ++ } ++ ++ kernel_state->bo = kcalloc(state->bo_count, ++ sizeof(*kernel_state->bo), GFP_ATOMIC); + +- state->bo_count = exec->bo_count + unref_list_count; +- kernel_state->bo = kcalloc(state->bo_count, sizeof(*kernel_state->bo), +- GFP_ATOMIC); + if (!kernel_state->bo) { + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; + } + +- for (i = 0; i < exec->bo_count; i++) { +- drm_gem_object_reference(&exec->bo[i]->base); +- kernel_state->bo[i] = &exec->bo[i]->base; +- } ++ prev_idx = 0; ++ for (i = 0; i < 2; i++) { ++ if (!exec[i]) ++ continue; + +- list_for_each_entry(bo, &exec->unref_list, unref_head) { +- drm_gem_object_reference(&bo->base.base); +- kernel_state->bo[i] = &bo->base.base; +- i++; ++ for (j = 0; j < exec[i]->bo_count; j++) { ++ drm_gem_object_reference(&exec[i]->bo[j]->base); ++ kernel_state->bo[j + prev_idx] = &exec[i]->bo[j]->base; ++ } ++ ++ list_for_each_entry(bo, &exec[i]->unref_list, unref_head) { ++ drm_gem_object_reference(&bo->base.base); ++ kernel_state->bo[j + prev_idx] = &bo->base.base; ++ j++; ++ } ++ prev_idx = j + 1; + } + +- state->start_bin = exec->ct0ca; +- state->start_render = exec->ct1ca; ++ if (exec[0]) ++ state->start_bin = exec[0]->ct0ca; ++ if (exec[1]) ++ state->start_render = exec[1]->ct1ca; + + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + +@@ -272,13 +290,15 @@ vc4_hangcheck_elapsed(unsigned long data) + struct vc4_dev *vc4 = to_vc4_dev(dev); + uint32_t ct0ca, ct1ca; + unsigned long irqflags; +- struct vc4_exec_info *exec; ++ struct vc4_exec_info *bin_exec, *render_exec; + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- exec = vc4_first_job(vc4); ++ ++ bin_exec = vc4_first_bin_job(vc4); ++ render_exec = vc4_first_render_job(vc4); + + /* If idle, we can stop watching for hangs. */ +- if (!exec) { ++ if (!bin_exec && !render_exec) { + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + return; + } +@@ -289,9 +309,12 @@ vc4_hangcheck_elapsed(unsigned long data) + /* If we've made any progress in execution, rearm the timer + * and wait. + */ +- if (ct0ca != exec->last_ct0ca || ct1ca != exec->last_ct1ca) { +- exec->last_ct0ca = ct0ca; +- exec->last_ct1ca = ct1ca; ++ if ((bin_exec && ct0ca != bin_exec->last_ct0ca) || ++ (render_exec && ct1ca != render_exec->last_ct1ca)) { ++ if (bin_exec) ++ bin_exec->last_ct0ca = ct0ca; ++ if (render_exec) ++ render_exec->last_ct1ca = ct1ca; + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + vc4_queue_hangcheck(dev); + return; +@@ -391,11 +414,13 @@ vc4_flush_caches(struct drm_device *dev) + * The job_lock should be held during this. + */ + void +-vc4_submit_next_job(struct drm_device *dev) ++vc4_submit_next_bin_job(struct drm_device *dev) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); +- struct vc4_exec_info *exec = vc4_first_job(vc4); ++ struct vc4_exec_info *exec; + ++again: ++ exec = vc4_first_bin_job(vc4); + if (!exec) + return; + +@@ -405,11 +430,40 @@ vc4_submit_next_job(struct drm_device *dev) + V3D_WRITE(V3D_BPOA, 0); + V3D_WRITE(V3D_BPOS, 0); + +- if (exec->ct0ca != exec->ct0ea) ++ /* Either put the job in the binner if it uses the binner, or ++ * immediately move it to the to-be-rendered queue. ++ */ ++ if (exec->ct0ca != exec->ct0ea) { + submit_cl(dev, 0, exec->ct0ca, exec->ct0ea); ++ } else { ++ vc4_move_job_to_render(dev, exec); ++ goto again; ++ } ++} ++ ++void ++vc4_submit_next_render_job(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_exec_info *exec = vc4_first_render_job(vc4); ++ ++ if (!exec) ++ return; ++ + submit_cl(dev, 1, exec->ct1ca, exec->ct1ea); + } + ++void ++vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ bool was_empty = list_empty(&vc4->render_job_list); ++ ++ list_move_tail(&exec->head, &vc4->render_job_list); ++ if (was_empty) ++ vc4_submit_next_render_job(dev); ++} ++ + static void + vc4_update_bo_seqnos(struct vc4_exec_info *exec, uint64_t seqno) + { +@@ -448,14 +502,14 @@ vc4_queue_submit(struct drm_device *dev, struct vc4_exec_info *exec) + exec->seqno = seqno; + vc4_update_bo_seqnos(exec, seqno); + +- list_add_tail(&exec->head, &vc4->job_list); ++ list_add_tail(&exec->head, &vc4->bin_job_list); + + /* If no job was executing, kick ours off. Otherwise, it'll +- * get started when the previous job's frame done interrupt ++ * get started when the previous job's flush done interrupt + * occurs. + */ +- if (vc4_first_job(vc4) == exec) { +- vc4_submit_next_job(dev); ++ if (vc4_first_bin_job(vc4) == exec) { ++ vc4_submit_next_bin_job(dev); + vc4_queue_hangcheck(dev); + } + +@@ -849,7 +903,8 @@ vc4_gem_init(struct drm_device *dev) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); + +- INIT_LIST_HEAD(&vc4->job_list); ++ INIT_LIST_HEAD(&vc4->bin_job_list); ++ INIT_LIST_HEAD(&vc4->render_job_list); + INIT_LIST_HEAD(&vc4->job_done_list); + INIT_LIST_HEAD(&vc4->seqno_cb_list); + spin_lock_init(&vc4->job_lock); +diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c +index 78a21357fb2de9fe88d50a26f20f0634d97dbd88..b0104a346a74eb44f0230d1a04968906661ae4fa 100644 +--- a/drivers/gpu/drm/vc4/vc4_irq.c ++++ b/drivers/gpu/drm/vc4/vc4_irq.c +@@ -30,6 +30,10 @@ + * disables that specific interrupt, and 0s written are ignored + * (reading either one returns the set of enabled interrupts). + * ++ * When we take a binning flush done interrupt, we need to submit the ++ * next frame for binning and move the finished frame to the render ++ * thread. ++ * + * When we take a render frame interrupt, we need to wake the + * processes waiting for some frame to be done, and get the next frame + * submitted ASAP (so the hardware doesn't sit idle when there's work +@@ -44,6 +48,7 @@ + #include "vc4_regs.h" + + #define V3D_DRIVER_IRQS (V3D_INT_OUTOMEM | \ ++ V3D_INT_FLDONE | \ + V3D_INT_FRDONE) + + DECLARE_WAIT_QUEUE_HEAD(render_wait); +@@ -77,7 +82,7 @@ vc4_overflow_mem_work(struct work_struct *work) + unsigned long irqflags; + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- current_exec = vc4_first_job(vc4); ++ current_exec = vc4_first_bin_job(vc4); + if (current_exec) { + vc4->overflow_mem->seqno = vc4->finished_seqno + 1; + list_add_tail(&vc4->overflow_mem->unref_head, +@@ -98,17 +103,43 @@ vc4_overflow_mem_work(struct work_struct *work) + } + + static void +-vc4_irq_finish_job(struct drm_device *dev) ++vc4_irq_finish_bin_job(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_exec_info *exec = vc4_first_bin_job(vc4); ++ ++ if (!exec) ++ return; ++ ++ vc4_move_job_to_render(dev, exec); ++ vc4_submit_next_bin_job(dev); ++} ++ ++static void ++vc4_cancel_bin_job(struct drm_device *dev) ++{ ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_exec_info *exec = vc4_first_bin_job(vc4); ++ ++ if (!exec) ++ return; ++ ++ list_move_tail(&exec->head, &vc4->bin_job_list); ++ vc4_submit_next_bin_job(dev); ++} ++ ++static void ++vc4_irq_finish_render_job(struct drm_device *dev) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); +- struct vc4_exec_info *exec = vc4_first_job(vc4); ++ struct vc4_exec_info *exec = vc4_first_render_job(vc4); + + if (!exec) + return; + + vc4->finished_seqno++; + list_move_tail(&exec->head, &vc4->job_done_list); +- vc4_submit_next_job(dev); ++ vc4_submit_next_render_job(dev); + + wake_up_all(&vc4->job_wait_queue); + schedule_work(&vc4->job_done_work); +@@ -125,9 +156,10 @@ vc4_irq(int irq, void *arg) + barrier(); + intctl = V3D_READ(V3D_INTCTL); + +- /* Acknowledge the interrupts we're handling here. The render +- * frame done interrupt will be cleared, while OUTOMEM will +- * stay high until the underlying cause is cleared. ++ /* Acknowledge the interrupts we're handling here. The binner ++ * last flush / render frame done interrupt will be cleared, ++ * while OUTOMEM will stay high until the underlying cause is ++ * cleared. + */ + V3D_WRITE(V3D_INTCTL, intctl); + +@@ -138,9 +170,16 @@ vc4_irq(int irq, void *arg) + status = IRQ_HANDLED; + } + ++ if (intctl & V3D_INT_FLDONE) { ++ spin_lock(&vc4->job_lock); ++ vc4_irq_finish_bin_job(dev); ++ spin_unlock(&vc4->job_lock); ++ status = IRQ_HANDLED; ++ } ++ + if (intctl & V3D_INT_FRDONE) { + spin_lock(&vc4->job_lock); +- vc4_irq_finish_job(dev); ++ vc4_irq_finish_render_job(dev); + spin_unlock(&vc4->job_lock); + status = IRQ_HANDLED; + } +@@ -205,6 +244,7 @@ void vc4_irq_reset(struct drm_device *dev) + V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS); + + spin_lock_irqsave(&vc4->job_lock, irqflags); +- vc4_irq_finish_job(dev); ++ vc4_cancel_bin_job(dev); ++ vc4_irq_finish_render_job(dev); + spin_unlock_irqrestore(&vc4->job_lock, irqflags); + } + +From 177c1f1d0244e0399556c23c5ed384bd5de2184c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 29 Feb 2016 17:53:00 -0800 +Subject: [PATCH 291/398] drm/vc4: Let gpiolib know that we're OK with sleeping + for HPD. + +Fixes an error thrown every few seconds when we poll HPD when it's on +a I2C to GPIO expander. + +Signed-off-by: Eric Anholt +Tested-by: Daniel Stone +(cherry picked from commit 0e60eab57557bc06bb3a5ef8d5d6dcd9ddd47aff) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 689e285ff874a503fb94e98db258adce9b0cf145..7214e8926cb53190f9d7c1f8594d71785fb34229 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -168,7 +168,7 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + return connector_status_connected; + + if (vc4->hdmi->hpd_gpio) { +- if (gpio_get_value(vc4->hdmi->hpd_gpio)) ++ if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio)) + return connector_status_connected; + else + return connector_status_disconnected; + +From d3a47cf3187315f40a11c9ed19a790d38ec3cdcc Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 29 Feb 2016 17:53:01 -0800 +Subject: [PATCH 292/398] drm/vc4: Respect GPIO_ACTIVE_LOW on HDMI HPD if set + in the devicetree. + +The original Raspberry Pi had the GPIO active high, but the later +models are active low. The DT GPIO bindings allow specifying the +active flag, except that it doesn't get propagated to the gpiodesc, so +you have to handle it yourself. + +Signed-off-by: Eric Anholt +Tested-by: Daniel Stone +(cherry picked from commit 0b06e0a7945130e6a187f7959529cba7725f573a) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 7214e8926cb53190f9d7c1f8594d71785fb34229..db6db77b70cb92f14dda2ebcabf77fa7e9fcceea 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -47,6 +47,7 @@ struct vc4_hdmi { + void __iomem *hdmicore_regs; + void __iomem *hd_regs; + int hpd_gpio; ++ bool hpd_active_low; + + struct clk *pixel_clock; + struct clk *hsm_clock; +@@ -168,7 +169,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + return connector_status_connected; + + if (vc4->hdmi->hpd_gpio) { +- if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio)) ++ if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ ++ vc4->hdmi->hpd_active_low) + return connector_status_connected; + else + return connector_status_disconnected; +@@ -519,11 +521,17 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) + * we'll use the HDMI core's register. + */ + if (of_find_property(dev->of_node, "hpd-gpios", &value)) { +- hdmi->hpd_gpio = of_get_named_gpio(dev->of_node, "hpd-gpios", 0); ++ enum of_gpio_flags hpd_gpio_flags; ++ ++ hdmi->hpd_gpio = of_get_named_gpio_flags(dev->of_node, ++ "hpd-gpios", 0, ++ &hpd_gpio_flags); + if (hdmi->hpd_gpio < 0) { + ret = hdmi->hpd_gpio; + goto err_unprepare_hsm; + } ++ ++ hdmi->hpd_active_low = hpd_gpio_flags & OF_GPIO_ACTIVE_LOW; + } + + vc4->hdmi = hdmi; + +From bfbcaa072d7230471312cd198e843398b9608888 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Tue, 8 Mar 2016 15:09:41 +0300 +Subject: [PATCH 293/398] drm/vc4: Return -EFAULT on copy_from_user() failure + +The copy_from_user() function returns the number of bytes not copied but +we want to return a negative error code. + +Fixes: 463873d57014 ('drm/vc4: Add an API for creating GPU shaders in GEM BOs.') +Cc: stable@vger.kernel.org +Signed-off-by: Dan Carpenter +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +(cherry picked from commit 585cb132a48190b554aecda2ebc3e2911fcbb665) +--- + drivers/gpu/drm/vc4/vc4_bo.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c +index 847757914c4eb792512e8019222b04d83876600d..2953ab84cbbcb6e41971820759395abfb764dc88 100644 +--- a/drivers/gpu/drm/vc4/vc4_bo.c ++++ b/drivers/gpu/drm/vc4/vc4_bo.c +@@ -519,11 +519,12 @@ vc4_create_shader_bo_ioctl(struct drm_device *dev, void *data, + if (IS_ERR(bo)) + return PTR_ERR(bo); + +- ret = copy_from_user(bo->base.vaddr, ++ if (copy_from_user(bo->base.vaddr, + (void __user *)(uintptr_t)args->data, +- args->size); +- if (ret != 0) ++ args->size)) { ++ ret = -EFAULT; + goto fail; ++ } + /* Clear the rest of the memory from allocating from the BO + * cache. + */ + +From 55cb53a580010bf2da100bc0b5b16f575bd60cb0 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 4 Mar 2016 12:32:07 -0800 +Subject: [PATCH 294/398] drm/vc4: Recognize a more specific compatible string + for V3D. + +The Raspberry Pi Foundation's firmware updates are shipping device +trees using the old string, so we'll keep recognizing that as this rev +of V3D. Still, we should use a more specific name in the upstream DT +to clarify which board is being supported, in case we do other revs of +V3D in the future. + +Signed-off-by: Eric Anholt +Acked-by: Stephen Warren +(cherry picked from commit 90d7116061f86c1f8ea460806a0414addea7b58b) +--- + drivers/gpu/drm/vc4/vc4_v3d.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c +index 4d103f7ff8c9113329aa4738bd67baa4ad14250d..3422306049b2f98d69684c5cc7f34ccf8a24309e 100644 +--- a/drivers/gpu/drm/vc4/vc4_v3d.c ++++ b/drivers/gpu/drm/vc4/vc4_v3d.c +@@ -256,6 +256,7 @@ static int vc4_v3d_dev_remove(struct platform_device *pdev) + } + + static const struct of_device_id vc4_v3d_dt_match[] = { ++ { .compatible = "brcm,bcm2835-v3d" }, + { .compatible = "brcm,vc4-v3d" }, + {} + }; + +From 84196ff3a5eb8285a48ea57ab1a3ebb4337e0195 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 17:21:06 -0700 +Subject: [PATCH 295/398] ARM: bcm2708: Move the CMA range down for kernel 4.4. + +The previous area no longer works, for reasons I haven't investigated. +Just move it somewhere that works. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index af540a346426974386031e6c076c7c45531435d2..d07c5373b90adbbeb79659733a5c8c5fa73ca88d 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -91,7 +91,7 @@ + fragment@4 { + target-path = "/chosen"; + __overlay__ { +- bootargs = "cma=256M@512M"; ++ bootargs = "cma=256M@256M"; + }; + }; + }; + +From f86b64e74341a62057743bbc33068ae87f54e04c Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <6by9@users.noreply.github.com> +Date: Sat, 16 Apr 2016 23:09:54 +0100 +Subject: [PATCH 296/398] V4L2: Request maximum resolution from GPU + +Get resolution information about the sensors from the GPU +and advertise it correctly. + +Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 59 +++++++++++++++++-------- + drivers/media/platform/bcm2835/bcm2835-camera.h | 3 +- + 2 files changed, 43 insertions(+), 19 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 0e6c9b4f125ccdf052f5566992a4c2a09f8f5471..12326f876bdbc29083cb7afbf5d5cac7c4f321a7 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -38,8 +38,6 @@ + #define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2" + #define MIN_WIDTH 16 + #define MIN_HEIGHT 16 +-#define MAX_WIDTH 2592 +-#define MAX_HEIGHT 1944 + #define MIN_BUFFER_SIZE (80*1024) + + #define MAX_VIDEO_MODE_WIDTH 1280 +@@ -729,11 +727,11 @@ static int vidioc_try_fmt_vid_overlay(struct file *file, void *priv, + f->fmt.win.clipcount = 0; + f->fmt.win.bitmap = NULL; + +- v4l_bound_align_image(&f->fmt.win.w.width, MIN_WIDTH, MAX_WIDTH, 1, +- &f->fmt.win.w.height, MIN_HEIGHT, MAX_HEIGHT, ++ v4l_bound_align_image(&f->fmt.win.w.width, MIN_WIDTH, dev->max_width, 1, ++ &f->fmt.win.w.height, MIN_HEIGHT, dev->max_height, + 1, 0); +- v4l_bound_align_image(&f->fmt.win.w.left, MIN_WIDTH, MAX_WIDTH, 1, +- &f->fmt.win.w.top, MIN_HEIGHT, MAX_HEIGHT, ++ v4l_bound_align_image(&f->fmt.win.w.left, MIN_WIDTH, dev->max_width, 1, ++ &f->fmt.win.w.top, MIN_HEIGHT, dev->max_height, + 1, 0); + + v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, +@@ -961,8 +959,9 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, + "Clipping/aligning %dx%d format %08X\n", + f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.pixelformat); + +- v4l_bound_align_image(&f->fmt.pix.width, MIN_WIDTH, MAX_WIDTH, 1, +- &f->fmt.pix.height, MIN_HEIGHT, MAX_HEIGHT, 1, 0); ++ v4l_bound_align_image(&f->fmt.pix.width, MIN_WIDTH, dev->max_width, 1, ++ &f->fmt.pix.height, MIN_HEIGHT, dev->max_height, ++ 1, 0); + f->fmt.pix.bytesperline = f->fmt.pix.width * mfmt->ybbp; + + /* Image buffer has to be padded to allow for alignment, even though +@@ -1301,9 +1300,10 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, + int vidioc_enum_framesizes(struct file *file, void *fh, + struct v4l2_frmsizeenum *fsize) + { ++ struct bm2835_mmal_dev *dev = video_drvdata(file); + static const struct v4l2_frmsize_stepwise sizes = { +- MIN_WIDTH, MAX_WIDTH, 2, +- MIN_HEIGHT, MAX_HEIGHT, 2 ++ MIN_WIDTH, 0, 2, ++ MIN_HEIGHT, 0, 2 + }; + int i; + +@@ -1316,6 +1316,8 @@ int vidioc_enum_framesizes(struct file *file, void *fh, + return -EINVAL; + fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE; + fsize->stepwise = sizes; ++ fsize->stepwise.max_width = dev->max_width; ++ fsize->stepwise.max_height = dev->max_height; + return 0; + } + +@@ -1323,6 +1325,7 @@ int vidioc_enum_framesizes(struct file *file, void *fh, + static int vidioc_enum_frameintervals(struct file *file, void *priv, + struct v4l2_frmivalenum *fival) + { ++ struct bm2835_mmal_dev *dev = video_drvdata(file); + int i; + + if (fival->index) +@@ -1335,8 +1338,8 @@ static int vidioc_enum_frameintervals(struct file *file, void *priv, + return -EINVAL; + + /* regarding width & height - we support any within range */ +- if (fival->width < MIN_WIDTH || fival->width > MAX_WIDTH || +- fival->height < MIN_HEIGHT || fival->height > MAX_HEIGHT) ++ if (fival->width < MIN_WIDTH || fival->width > dev->max_width || ++ fival->height < MIN_HEIGHT || fival->height > dev->max_height) + return -EINVAL; + + fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS; +@@ -1499,12 +1502,17 @@ static struct video_device vdev_template = { + .release = video_device_release_empty, + }; + +-static int get_num_cameras(struct vchiq_mmal_instance *instance) ++/* Returns the number of cameras, and also the max resolution supported ++ * by those cameras. ++ */ ++static int get_num_cameras(struct vchiq_mmal_instance *instance, ++ unsigned int resolutions[][2], int num_resolutions) + { + int ret; + struct vchiq_mmal_component *cam_info_component; + struct mmal_parameter_camera_info_t cam_info = {0}; + int param_size = sizeof(cam_info); ++ int i; + + /* create a camera_info component */ + ret = vchiq_mmal_component_init(instance, "camera_info", +@@ -1520,6 +1528,14 @@ static int get_num_cameras(struct vchiq_mmal_instance *instance) + ¶m_size)) { + pr_info("Failed to get camera info\n"); + } ++ for (i = 0; ++ i < (cam_info.num_cameras > num_resolutions ? ++ cam_info.num_cameras : ++ num_resolutions); ++ i++) { ++ resolutions[i][0] = cam_info.cameras[i].max_width; ++ resolutions[i][1] = cam_info.cameras[i].max_height; ++ } + + vchiq_mmal_component_finalise(instance, + cam_info_component); +@@ -1528,12 +1544,13 @@ static int get_num_cameras(struct vchiq_mmal_instance *instance) + } + + static int set_camera_parameters(struct vchiq_mmal_instance *instance, +- struct vchiq_mmal_component *camera) ++ struct vchiq_mmal_component *camera, ++ struct bm2835_mmal_dev *dev) + { + int ret; + struct mmal_parameter_camera_config cam_config = { +- .max_stills_w = MAX_WIDTH, +- .max_stills_h = MAX_HEIGHT, ++ .max_stills_w = dev->max_width, ++ .max_stills_h = dev->max_height, + .stills_yuv422 = 1, + .one_shot_stills = 1, + .max_preview_video_w = (max_video_width > 1920) ? +@@ -1576,7 +1593,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + } + + ret = set_camera_parameters(dev->instance, +- dev->component[MMAL_COMPONENT_CAMERA]); ++ dev->component[MMAL_COMPONENT_CAMERA], ++ dev); + if (ret < 0) + goto unreg_camera; + +@@ -1838,12 +1856,15 @@ static int __init bm2835_mmal_init(void) + int camera; + unsigned int num_cameras; + struct vchiq_mmal_instance *instance; ++ unsigned int resolutions[MAX_BCM2835_CAMERAS][2]; + + ret = vchiq_mmal_init(&instance); + if (ret < 0) + return ret; + +- num_cameras = get_num_cameras(instance); ++ num_cameras = get_num_cameras(instance, ++ resolutions, ++ MAX_BCM2835_CAMERAS); + if (num_cameras > MAX_BCM2835_CAMERAS) + num_cameras = MAX_BCM2835_CAMERAS; + +@@ -1853,6 +1874,8 @@ static int __init bm2835_mmal_init(void) + return -ENOMEM; + + dev->camera_num = camera; ++ dev->max_width = resolutions[camera][0]; ++ dev->max_height = resolutions[camera][1]; + + /* setup device defaults */ + dev->overlay.w.left = 150; +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 202906b9e8e6ec5a9cb4e953cac85f505d7dabd3..13f426f5ecdffeab714d658a6f8b76e63af5fcdb 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.h ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.h +@@ -107,7 +107,8 @@ struct bm2835_mmal_dev { + } capture; + + unsigned int camera_num; +- ++ unsigned int max_width; ++ unsigned int max_height; + }; + + int bm2835_mmal_init_controls( + +From 84e7fef10ff701b2b45e6b8e6a5a6b815eb9e835 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Sat, 23 Apr 2016 15:21:41 +0000 +Subject: [PATCH 297/398] ARM: bcm2835: add i2s-gpio28-31 for cm + +Add i2s-gpio28-31 overlay for compute module +so that i2s is using gpio28-31 + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 ++++++ + arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts | 18 ++++++++++++++++++ + 3 files changed, 25 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 4842dc1d5c68fa61505fd16dab9709a10ee417eb..c8033a7914f96ce03f0256e1a3693c09f644f80a 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -37,6 +37,7 @@ dtbo-$(RPI_DT_OVERLAYS) += i2c-mux-pca9548a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 6a62e6fdb073aa8daf86828b4b308d1ca6259b3f..af0676e29f16b59fe50fe018b6892fdaea800525 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -464,6 +464,12 @@ Params: sda1_pin GPIO pin for SDA1 (2 or 44 - default 2) + default 4) + + ++Name: i2s-gpio28-31 ++Info: move I2S function block to GPIO 28 to 31 ++Load: dtoverlay=i2s-gpio28-31 ++Params: ++ ++ + Name: i2s-mmap + Info: Enables mmap support in the bcm2708-i2s driver + Load: dtoverlay=i2s-mmap +diff --git a/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts b/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..30c356d6070cc3b1dfd1d5a07dc1021339bf5bd2 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts +@@ -0,0 +1,18 @@ ++/* ++ * Device tree overlay to move i2s to gpio 28 to 31 on CM ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&i2s_pins>; ++ __overlay__ { ++ brcm,pins = <28 29 30 31>; ++ brcm,function = <6>; /* alt2 */ ++ }; ++ }; ++}; + +From 2d0cc5e9bac56b8af7ecaf73068f34157391f3e9 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 24 Apr 2016 17:28:15 +0100 +Subject: [PATCH 298/398] drm/vc4: Add DT parameters to control CMA usage + +Example: dtoverlay=vc4-kms-v3d,cma-128 + +See: https://github.com/raspberrypi/linux/pull/1431 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 8 +++-- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 36 ++++++++++++++++++++++ + 2 files changed, 42 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index af0676e29f16b59fe50fe018b6892fdaea800525..9ba2884991994b15591d6f09669bdc99d87e7e15 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1023,8 +1023,12 @@ Name: vc4-kms-v3d + Info: Enable Eric Anholt's DRM VC4 HDMI/HVS/V3D driver. Running startx or + booting to GUI while this overlay is in use will cause interesting + lockups. +-Load: dtoverlay=vc4-kms-v3d +-Params: ++Load: dtoverlay=vc4-kms-v3d, ++Params: cma-256 CMA is 256MB, 256MB-aligned (needs 1GB) ++ cma-192 CMA is 192MB, 256MB-aligned (needs 1GB) ++ cma-128 CMA is 128MB, 128MB-aligned ++ cma-96 CMA is 96MB, 128MB-aligned ++ cma-64 CMA is 64MB, 64MB-aligned + + + Name: vga666 +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index d07c5373b90adbbeb79659733a5c8c5fa73ca88d..547b2c723f347fece54aa28425d9dec8fc239855 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -94,4 +94,40 @@ + bootargs = "cma=256M@256M"; + }; + }; ++ ++ fragment@5 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=192M@256M"; ++ }; ++ }; ++ ++ fragment@6 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=128M@128M"; ++ }; ++ }; ++ ++ fragment@7 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=96M@128M"; ++ }; ++ }; ++ ++ fragment@8 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=64M@64M"; ++ }; ++ }; ++ ++ __overrides__ { ++ cma-256 = <0>,"+4-5-6-7-8"; ++ cma-192 = <0>,"-4+5-6-7-8"; ++ cma-128 = <0>,"-4-5+6-7-8"; ++ cma-96 = <0>,"-4-5-6+7-8"; ++ cma-64 = <0>,"-4-5-6-7+8"; ++ }; + }; + +From 968a87c758e6703823478ede32e6a212e53dec05 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 25 Apr 2016 10:43:36 +0100 +Subject: [PATCH 299/398] SQUASH: BCM270X_DT: Add make rule for sdio-1bit + +See: https://github.com/raspberrypi/linux/pull/1301 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index c8033a7914f96ce03f0256e1a3693c09f644f80a..50bfa55af8c9e4a40ba31624769b274aea61caab 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -66,6 +66,7 @@ dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdio-1bit.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdtweak.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo + +From b859ef311c6804910e8ac6e4c21c473eaac5ac7a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= +Date: Fri, 8 Jan 2016 09:02:44 +0100 +Subject: [PATCH 300/398] dts: add overlay for pitft22 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo: +https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic + +Signed-off-by: Petter Mabäcker +Signed-off-by: Andrei Gherzan +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 12 +++++ + arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++ + 3 files changed, 82 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pitft22-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 50bfa55af8c9e4a40ba31624769b274aea61caab..90d2034031edebf050da430843abd54d3ae03e1e 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -51,6 +51,7 @@ dtbo-$(RPI_DT_OVERLAYS) += pi3-disable-bt.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo + dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo + dtbo-$(RPI_DT_OVERLAYS) += piscreen2r.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pitft22.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pitft28-capacitive.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pitft28-resistive.dtbo + dtbo-$(RPI_DT_OVERLAYS) += pps-gpio.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 9ba2884991994b15591d6f09669bdc99d87e7e15..710085e8d896ed4193a42cbc9c8dbf9e03c413f2 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -644,6 +644,18 @@ Params: speed Display SPI bus speed + xohms Touchpanel sensitivity (X-plate resistance) + + ++Name: pitft22 ++Info: Adafruit PiTFT 2.2" screen ++Load: dtoverlay=pitft22,= ++Params: speed Display SPI bus speed ++ ++ rotate Display rotation {0,90,180,270} ++ ++ fps Delay between frame updates ++ ++ debug Debug output level {0-7} ++ ++ + Name: pitft28-capacitive + Info: Adafruit PiTFT 2.8" capacitive touch screen + Load: dtoverlay=pitft28-capacitive,= +diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..894ba2292f6be76356f3ab39376d84ebd72fa29d +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +@@ -0,0 +1,69 @@ ++/* ++ * Device Tree overlay for pitft by Adafruit ++ * ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&spi0>; ++ __overlay__ { ++ status = "okay"; ++ ++ spidev@0{ ++ status = "disabled"; ++ }; ++ ++ spidev@1{ ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&gpio>; ++ __overlay__ { ++ pitft_pins: pitft_pins { ++ brcm,pins = <25>; ++ brcm,function = <1>; /* out */ ++ brcm,pull = <0>; /* none */ ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&spi0>; ++ __overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ pitft: pitft@0{ ++ compatible = "ilitek,ili9340"; ++ reg = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pitft_pins>; ++ ++ spi-max-frequency = <32000000>; ++ rotate = <90>; ++ fps = <25>; ++ bgr; ++ buswidth = <8>; ++ dc-gpios = <&gpio 25 0>; ++ debug = <0>; ++ }; ++ ++ }; ++ }; ++ ++ __overrides__ { ++ speed = <&pitft>,"spi-max-frequency:0"; ++ rotate = <&pitft>,"rotate:0"; ++ fps = <&pitft>,"fps:0"; ++ debug = <&pitft>,"debug:0"; ++ }; ++}; + +From c54ce14b256c409bdab9495a7122df9a019f4bbf Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 26 Apr 2016 10:44:59 +0100 +Subject: [PATCH 301/398] BCM270X_DT: Sound DT adjustments for Dynamic DT + +There are a number of issues when loading and unloading overlays for +sound cards: +1) The "sound" and "audio" nodes must be children of a bus node, such + as "/soc", otherwise the DT changes don't result in platform devices + being created and deleted. +2) The "/sound" node must have a "disabled" status property, otherwise + setting the status to "okay" won't be detected. +3) ALSA doesn't like having components unloaded under its feet, and it + is easy to deadlock or crash. Ordering the overlay fragments so that + the sound card appears last avoids this problem. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 23 +++++++++--------- + .../dts/overlays/akkordion-iqdacplus-overlay.dts | 28 +++++++++++----------- + .../boot/dts/overlays/boomberry-dac-overlay.dts | 22 ++++++++--------- + .../boot/dts/overlays/boomberry-digi-overlay.dts | 20 ++++++++-------- + .../boot/dts/overlays/hifiberry-amp-overlay.dts | 20 ++++++++-------- + .../boot/dts/overlays/hifiberry-dac-overlay.dts | 22 ++++++++--------- + .../dts/overlays/hifiberry-dacplus-overlay.dts | 22 ++++++++--------- + .../boot/dts/overlays/hifiberry-digi-overlay.dts | 20 ++++++++-------- + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 20 ++++++++-------- + .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 22 ++++++++--------- + arch/arm/boot/dts/overlays/raspidac3-overlay.dts | 20 ++++++++-------- + arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 22 ++++++++--------- + arch/arm/boot/dts/overlays/rpi-proto-overlay.dts | 20 ++++++++-------- + 13 files changed, 141 insertions(+), 140 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 7ff7a886ca551c74102e1027e228bc47c6ecb749..4ec0156566051d198e96e8f7ce1ae8655f42c879 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -34,17 +34,6 @@ + clocks = &clocks; + }; + +- /* Onboard audio */ +- audio: audio { +- compatible = "brcm,bcm2835-audio"; +- brcm,pwm-channels = <8>; +- status = "disabled"; +- }; +- +- /* External sound card */ +- sound: sound { +- }; +- + soc: soc { + compatible = "simple-bus"; + #address-cells = <1>; +@@ -313,6 +302,18 @@ + compatible = "brcm,bcm2835-thermal"; + firmware = <&firmware>; + }; ++ ++ /* Onboard audio */ ++ audio: audio { ++ compatible = "brcm,bcm2835-audio"; ++ brcm,pwm-channels = <8>; ++ status = "disabled"; ++ }; ++ ++ /* External sound card */ ++ sound: sound { ++ status = "disabled"; ++ }; + }; + + clocks: clocks { +diff --git a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +index 47c7664f7f058436b41a89ded35a1d0197b0f187..208849d5c39274ed0aa557f63a19430a451a95f5 100644 +--- a/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/akkordion-iqdacplus-overlay.dts +@@ -6,25 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- frag0: __overlay__ { +- compatible = "iqaudio,iqaudio-dac"; +- card_name = "Akkordion"; +- dai_name = "IQaudIO DAC"; +- dai_stream_name = "IQaudIO DAC HiFi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -40,7 +28,19 @@ + }; + }; + ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ card_name = "Akkordion"; ++ dai_name = "IQaudIO DAC"; ++ dai_stream_name = "IQaudIO DAC HiFi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; ++ 24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts +index 0f7c9b0bfdb7d1527cb474137c9a8e65b92cff4e..725e8550f21d304b219d314acc2405d6e85ea8e5 100644 +--- a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- frag0: __overlay__ { +- compatible = "boomberry,boomberry-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -37,7 +28,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "boomberry,boomberry-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag0>,"boomberry,24db_digital_gain?"; ++ 24db_digital_gain = <&frag2>,"boomberry,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts +index a86e1d0750d70854fbd1c1ca7574d1b262ea3aa7..a451f6ddbe2fc66e5cdb1e010551eb217b5abf99 100644 +--- a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts ++++ b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "boomberry,boomberry-digi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "boomberry,boomberry-digi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts +index 2c81448c969e93b6511fa9382b5d8ae16edfffce..5f5785534fd3d9a97309796f842c8881e2d6979a 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "hifiberry,hifiberry-amp"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-amp"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +index 5e7633ae85cd32cf074380579e9f67a220bb0320..af7e32a9067d6a4bcb85a17844ed4cdd87589bf2 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +@@ -6,23 +6,14 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "hifiberry,hifiberry-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { +- target-path = "/"; ++ fragment@1 { ++ target = <&soc>; + __overlay__ { + pcm5102a-codec { + #sound-dai-cells = <0>; +@@ -31,4 +22,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +index 42a0194e97c067840fa0c578857818a883fb2327..4d8e09f11aacfebba78a9ac2f1e98f20883b5d70 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +@@ -16,22 +16,13 @@ + }; + + fragment@1 { +- target = <&sound>; +- frag1: __overlay__ { +- compatible = "hifiberry,hifiberry-dacplus"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@2 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@3 { ++ fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -48,7 +39,16 @@ + }; + }; + ++ fragment@3 { ++ target = <&sound>; ++ frag3: __overlay__ { ++ compatible = "hifiberry,hifiberry-dacplus"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag1>,"hifiberry,24db_digital_gain?"; ++ 24db_digital_gain = <&frag3>,"hifiberry,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts +index d0e0d8aa63a9be729e8c0f3b8814f15e92da2e61..f5e41f48ba4fed92194ff5a63d13c70bb2d1c091 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "hifiberry,hifiberry-digi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-digi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +index ea8173e529117dc17295efeb89f47e78147ed178..8e8ee0685da38c23f400cbfd20ab801a144eac90 100644 +--- a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "iqaudio,iqaudio-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts +index e0aaf8f03349bb5e7685cc9b65e7ac5820b71c5a..1d0663e19e7bf7395957ae49b501e5b15ecf3881 100644 +--- a/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- frag0: __overlay__ { +- compatible = "iqaudio,iqaudio-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -37,7 +28,16 @@ + }; + }; + ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "iqaudio,iqaudio-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ + __overrides__ { +- 24db_digital_gain = <&frag0>,"iqaudio,24db_digital_gain?"; ++ 24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?"; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/raspidac3-overlay.dts b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts +index 1bd80542e3e5e6b1cd5c5255db2642549a6e92c5..2fac57ca179fcf114655ea91dbef419c16aceb79 100644 +--- a/arch/arm/boot/dts/overlays/raspidac3-overlay.dts ++++ b/arch/arm/boot/dts/overlays/raspidac3-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "jg,raspidacv3"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -42,4 +33,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "jg,raspidacv3"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +index 7fc6ac996f934a87bfc17089212252e95a7e24e4..1523eae9c39997aa68cfa583ada92a92395bb1e0 100644 +--- a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +@@ -6,23 +6,14 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "rpi,rpi-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { +- target-path = "/"; ++ fragment@1 { ++ target = <&soc>; + __overlay__ { + pcm1794a-codec { + #sound-dai-cells = <0>; +@@ -31,4 +22,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "rpi,rpi-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; +diff --git a/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts +index 20299305328541631a0810d97e0fbe2e39df1d4e..8332d0159a45b29952d0ad1a8fda339d4fdbee3e 100644 +--- a/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts +@@ -6,22 +6,13 @@ + compatible = "brcm,bcm2708"; + + fragment@0 { +- target = <&sound>; +- __overlay__ { +- compatible = "rpi,rpi-proto"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- fragment@1 { + target = <&i2s>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@1 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; +@@ -36,4 +27,13 @@ + }; + }; + }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "rpi,rpi-proto"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; + }; + +From d137c48e5c4eb06bfffdf49e3bd126ca39d26149 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 27 Apr 2016 12:01:41 +0100 +Subject: [PATCH 302/398] BCM270X_DT: Fix codec use in hifiberry-dac overlay + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +index af7e32a9067d6a4bcb85a17844ed4cdd87589bf2..0b74fdc6e0f640967a5681b28360e33b8d4b7cfa 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts +@@ -13,7 +13,7 @@ + }; + + fragment@1 { +- target = <&soc>; ++ target-path = "/"; + __overlay__ { + pcm5102a-codec { + #sound-dai-cells = <0>; + +From b897734521f4d30305e6634984b1277781f15415 Mon Sep 17 00:00:00 2001 +From: Arend van Spriel +Date: Thu, 10 Dec 2015 13:43:06 +0100 +Subject: [PATCH 303/398] brcmfmac: no interface combination check for single + interface + +The interface combinations are intended for use-case in which the driver +handles multiple interface concurrently. This means that the combinations +do not need to be checked when there is only a single interface active. + +Reviewed-by: Hante Meuleman +Reviewed-by: Pieter-Paul Giesberts +Signed-off-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index 90f65d9b3d73e58c3ba68b097cf828652d308245..de4ecec4eb5ffc859bc92dbe5e8884b11c8167c4 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -392,15 +392,23 @@ static int brcmf_vif_change_validate(struct brcmf_cfg80211_info *cfg, + { + int iftype_num[NUM_NL80211_IFTYPES]; + struct brcmf_cfg80211_vif *pos; ++ bool check_combos = false; ++ int ret = 0; + + memset(&iftype_num[0], 0, sizeof(iftype_num)); + list_for_each_entry(pos, &cfg->vif_list, list) +- if (pos == vif) ++ if (pos == vif) { + iftype_num[new_type]++; +- else ++ } else { ++ /* concurrent interfaces so need check combinations */ ++ check_combos = true; + iftype_num[pos->wdev.iftype]++; ++ } + +- return cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num); ++ if (check_combos) ++ ret = cfg80211_check_combinations(cfg->wiphy, 1, 0, iftype_num); ++ ++ return ret; + } + + static int brcmf_vif_add_validate(struct brcmf_cfg80211_info *cfg, + +From 314df941251f1d640ce6b49a6d1883ad14ec9a49 Mon Sep 17 00:00:00 2001 +From: Hante Meuleman +Date: Thu, 10 Dec 2015 13:43:07 +0100 +Subject: [PATCH 304/398] brcmfmac: Fix IBSS setup + +IBSS got broken over time. Disconnect events should not be given +for IBSS mode and connect events for IBSS need to have channel +information. + +Reviewed-by: Arend Van Spriel +Reviewed-by: Pieter-Paul Giesberts +Signed-off-by: Hante Meuleman +Signed-off-by: Arend van Spriel +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index de4ecec4eb5ffc859bc92dbe5e8884b11c8167c4..2bba94dbd86e0df03e99147f59ec224cf4221b3e 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -1268,17 +1268,17 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason) + + brcmf_dbg(TRACE, "Enter\n"); + +- if (test_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) { ++ if (test_and_clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) { + brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n "); + err = brcmf_fil_cmd_data_set(vif->ifp, + BRCMF_C_DISASSOC, NULL, 0); + if (err) { + brcmf_err("WLC_DISASSOC failed (%d)\n", err); + } +- clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state); +- cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0, +- true, GFP_KERNEL); +- ++ if ((vif->wdev.iftype == NL80211_IFTYPE_STATION) || ++ (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT)) ++ cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0, ++ true, GFP_KERNEL); + } + clear_bit(BRCMF_VIF_STATUS_CONNECTING, &vif->sme_state); + clear_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status); +@@ -2701,8 +2701,8 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg) + return err; + } + +-static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg, +- struct net_device *ndev, const u8 *bssid) ++static s32 brcmf_inform_ibss(struct brcmf_cfg80211_info *cfg, ++ struct net_device *ndev, const u8 *bssid) + { + struct wiphy *wiphy = cfg_to_wiphy(cfg); + struct ieee80211_channel *notify_channel; +@@ -2747,6 +2747,7 @@ static s32 wl_inform_ibss(struct brcmf_cfg80211_info *cfg, + band = wiphy->bands[IEEE80211_BAND_5GHZ]; + + freq = ieee80211_channel_to_frequency(ch.chnum, band->band); ++ cfg->channel = freq; + notify_channel = ieee80211_get_channel(wiphy, freq); + + notify_capability = le16_to_cpu(bi->capability); +@@ -5026,9 +5027,9 @@ brcmf_notify_connect_status(struct brcmf_if *ifp, + } else if (brcmf_is_linkup(e)) { + brcmf_dbg(CONN, "Linkup\n"); + if (brcmf_is_ibssmode(ifp->vif)) { ++ brcmf_inform_ibss(cfg, ndev, e->addr); + chan = ieee80211_get_channel(cfg->wiphy, cfg->channel); + memcpy(profile->bssid, e->addr, ETH_ALEN); +- wl_inform_ibss(cfg, ndev, e->addr); + cfg80211_ibss_joined(ndev, e->addr, chan, GFP_KERNEL); + clear_bit(BRCMF_VIF_STATUS_CONNECTING, + &ifp->vif->sme_state); + +From 93b2257668732905fc341aeaf8e18a84826029aa Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:33 +0100 +Subject: [PATCH 305/398] Revert "bcm2835: log which channel map is set" + +This reverts commit cd560b8658868d9652ab31754e02f86daf6831ba. +--- + sound/arm/bcm2835-vchiq.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 876986dc2733085769e77a3858134d8409b7eabc..93710735d5d3e2930ec9cac0fe596c3f08602d64 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -596,11 +596,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + instance->result = -1; + + if (alsa_stream->chip->cea_chmap >= 0) { +- LOG_INFO("Using application requested channel map: %d\n", +- alsa_stream->chip->cea_chmap); + chmap_value = (unsigned)alsa_stream->chip->cea_chmap << 24; + } else { +- LOG_INFO("Using fallback channel map.\n"); + /* fallback layouts for applications which do not use chmap API */ + chmap_value = 0x00; + switch (channels) { +@@ -617,8 +614,6 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + for (i = 0; i < 8; i++) + chmap_value |= alsa_stream->chip->map_channels[i] << (i * 3); + +- LOG_INFO("Requesting AUDS channel map: 0x%lx\n", (long)chmap_value); +- + m.type = VC_AUDIO_MSG_TYPE_CONFIG; + m.u.config.channels = channels; + m.u.config.samplerate = samplerate; + +From bf343d765880accb8679a750d030e3c433d2fbd8 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:35 +0100 +Subject: [PATCH 306/398] Revert "bcm2835: add fallback channel layouts if + channel map API is not used" + +This reverts commit ceacfff9f86f89826dbc8a6df667f485894327d1. +--- + sound/arm/bcm2835-vchiq.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 93710735d5d3e2930ec9cac0fe596c3f08602d64..8ecd2d735fbf94b9018c89c705a68750aad5bf97 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -598,16 +598,7 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + if (alsa_stream->chip->cea_chmap >= 0) { + chmap_value = (unsigned)alsa_stream->chip->cea_chmap << 24; + } else { +- /* fallback layouts for applications which do not use chmap API */ +- chmap_value = 0x00; +- switch (channels) { +- case 3: chmap_value = 0x01; break; +- case 4: chmap_value = 0x03; break; +- case 5: chmap_value = 0x07; break; +- case 6: chmap_value = 0x0b; break; +- case 7: chmap_value = 0x0f; break; +- case 8: chmap_value = 0x13; break; +- } ++ chmap_value = 0; /* force stereo */ + for (i = 0; i < 8; i++) + alsa_stream->chip->map_channels[i] = i; + } + +From 5fa96b9df11fd2f9b7a7eddec9ea0dda3737ed3a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:36 +0100 +Subject: [PATCH 307/398] Revert "bcm2835: do not require substream for + accessing chmap ctl" + +This reverts commit a05b4815196018c329ea98c24205bc6fa9c097e0. +--- + sound/arm/bcm2835-ctl.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index 8b855f9ded88e0d297fd770edffa9835fa9e6b00..e9307186b082fc292af79f48ca71e3cd6ce8c99c 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -489,6 +489,8 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, + { + struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); + bcm2835_chip_t *chip = info->private_data; ++ unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); ++ struct snd_pcm_substream *substream = snd_pcm_chmap_substream(info, idx); + struct cea_channel_speaker_allocation *ch = NULL; + int res = 0; + int cur = 0; +@@ -497,6 +499,11 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, + if (mutex_lock_interruptible(&chip->audio_mutex)) + return -EINTR; + ++ if (!substream || !substream->runtime) { ++ res = -ENODEV; ++ goto unlock; ++ } ++ + for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { + if (channel_allocations[i].ca_index == chip->cea_chmap) + ch = &channel_allocations[i]; +@@ -514,6 +521,7 @@ static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, + while (cur < 8) + ucontrol->value.integer.value[cur++] = SNDRV_CHMAP_NA; + ++unlock: + mutex_unlock(&chip->audio_mutex); + return res; + } +@@ -533,7 +541,7 @@ static int snd_bcm2835_chmap_ctl_put(struct snd_kcontrol *kcontrol, + return -EINTR; + + if (!substream || !substream->runtime) { +- /* ignore and return success for the sake of alsactl */ ++ res = -ENODEV; + goto unlock; + } + + +From 15b96b298d93e979fccb1261e56ecd0875a80ecb Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:27:37 +0100 +Subject: [PATCH 308/398] Revert "bcm2835: interpolate audio delay" + +This reverts commit 83eca613d0eddd2c8299f114b8fe573ccaffdefc. +--- + sound/arm/bcm2835-pcm.c | 12 +----------- + sound/arm/bcm2835.h | 1 - + 2 files changed, 1 insertion(+), 12 deletions(-) + +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index f3a4c6da6a1e1f1cc937022557fccaebf4c87669..48da3bbd7395e2d3611990b7c5f31db9157b2afc 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -25,7 +25,7 @@ + /* hardware definition */ + static struct snd_pcm_hardware snd_bcm2835_playback_hw = { + .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | +- SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BATCH), ++ SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, + .rate_min = 8000, +@@ -99,8 +99,6 @@ static irqreturn_t bcm2835_playback_fifo_irq(int irq, void *dev_id) + alsa_stream->pos %= alsa_stream->buffer_size; + } + +- alsa_stream->interpolate_start = ktime_get_ns(); +- + if (alsa_stream->substream) { + if (new_period) + snd_pcm_period_elapsed(alsa_stream->substream); +@@ -401,7 +399,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) + alsa_stream->buffer_size = snd_pcm_lib_buffer_bytes(substream); + alsa_stream->period_size = snd_pcm_lib_period_bytes(substream); + alsa_stream->pos = 0; +- alsa_stream->interpolate_start = ktime_get_ns(); + + audio_debug("buffer_size=%d, period_size=%d pos=%d frame_bits=%d\n", + alsa_stream->buffer_size, alsa_stream->period_size, +@@ -498,7 +495,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream) + { + struct snd_pcm_runtime *runtime = substream->runtime; + bcm2835_alsa_stream_t *alsa_stream = runtime->private_data; +- u64 now = ktime_get_ns(); + + audio_info(" .. IN\n"); + +@@ -507,12 +503,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream) + frames_to_bytes(runtime, runtime->control->appl_ptr), + alsa_stream->pos); + +- /* Give userspace better delay reporting by interpolating between GPU +- * notifications, assuming audio speed is close enough to the clock +- * used for ktime */ +- if (alsa_stream->interpolate_start && alsa_stream->interpolate_start < now) +- runtime->delay = -(int)div_u64((now - alsa_stream->interpolate_start) * runtime->rate, 1000000000); +- + audio_info(" .. OUT\n"); + return snd_pcm_indirect_playback_pointer(substream, + &alsa_stream->pcm_indirect, +diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h +index 20ef108cb693575f0a1b5d5703a1fe4968277975..997fb69da951c7ceb732f4897b7450ecfc37d168 100755 +--- a/sound/arm/bcm2835.h ++++ b/sound/arm/bcm2835.h +@@ -137,7 +137,6 @@ typedef struct bcm2835_alsa_stream { + unsigned int pos; + unsigned int buffer_size; + unsigned int period_size; +- u64 interpolate_start; + + uint32_t enable_fifo_irq; + irq_handler_t fifo_irq_handler; + +From 748c839b52758b5265ad1bc77350be05f13bff4a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:28:06 +0100 +Subject: [PATCH 309/398] Revert "bcm2835: only allow stereo if analogue jack + is selected" + +This reverts commit 5f7049894f47b3836838cd68e29ee883179c80b3. +--- + sound/arm/bcm2835-ctl.c | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index e9307186b082fc292af79f48ca71e3cd6ce8c99c..dec052b9c0a5a3f69f90878cde814cb9adc27848 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -423,16 +423,9 @@ static struct cea_channel_speaker_allocation channel_allocations[] = { + { .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, + }; + +-static int uses_analogue(bcm2835_chip_t *chip) +-{ +- return chip->dest == 1; +-} +- + static int snd_bcm2835_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag, + unsigned int size, unsigned int __user *tlv) + { +- struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); +- bcm2835_chip_t *chip = info->private_data; + unsigned int __user *dst; + int count = 0; + int i; +@@ -449,9 +442,6 @@ static int snd_bcm2835_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag, + int chs_bytes; + int c; + +- if (i > 0 && uses_analogue(chip)) +- break; +- + for (c = 0; c < 8; c++) { + if (ch->speakers[c]) + num_chs++; +@@ -562,8 +552,6 @@ static int snd_bcm2835_chmap_ctl_put(struct snd_kcontrol *kcontrol, + int matches = 1; + int cur = 0; + int x; +- if (i > 0 && uses_analogue(chip)) +- break; + memset(remap, 0, sizeof(remap)); + for (x = 0; x < substream->runtime->channels; x++) { + int sp = ucontrol->value.integer.value[x]; + +From 3b3c482f4a637a463d20d6d61881fb10f620827c Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:28:08 +0100 +Subject: [PATCH 310/398] Revert "bcm2835: always use 2/4/8 channels for + multichannel layouts" + +This reverts commit 06931f74092d86087144f070b06a4444df8b444b. +--- + sound/arm/bcm2835-ctl.c | 89 ++++++++++++++++++++++++------------------------- + 1 file changed, 44 insertions(+), 45 deletions(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index dec052b9c0a5a3f69f90878cde814cb9adc27848..5b8e6bd2b89abf8135933a4028e23e25e5f2eef5 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -349,7 +349,6 @@ struct cea_channel_speaker_allocation { + #define FRW SNDRV_CHMAP_FRW + #define TC SNDRV_CHMAP_TC + #define FCH SNDRV_CHMAP_TFC +-#define NA SNDRV_CHMAP_NA + + /* + * CEA-861 channel maps +@@ -357,69 +356,69 @@ struct cea_channel_speaker_allocation { + * Stolen from sound/pci/hda/patch_hdmi.c + * (unlike the source, this uses SNDRV_* constants directly, as by the + * map_tables array in patch_hdmi.c) +- * Entries which do not have a physical output channel use 0. Entries which +- * require userspace to output silence use NA (SNDRV_CHMAP_NA). ++ * Unknown entries use 0, which unfortunately is SNDRV_CHMAP_UNKNOWN instead ++ * of SNDRV_CHMAP_NA. + */ + static struct cea_channel_speaker_allocation channel_allocations[] = { + /* channel: 7 6 5 4 3 2 1 0 */ + { .ca_index = 0x00, .speakers = { 0, 0, 0, 0, 0, 0, FR, FL } }, + /* 2.1 */ +-{ .ca_index = 0x01, .speakers = { 0, 0, 0, 0, NA, LFE, FR, FL } }, ++{ .ca_index = 0x01, .speakers = { 0, 0, 0, 0, 0, LFE, FR, FL } }, + /* Dolby Surround */ +-{ .ca_index = 0x02, .speakers = { 0, 0, 0, 0, FC, NA, FR, FL } }, ++{ .ca_index = 0x02, .speakers = { 0, 0, 0, 0, FC, 0, FR, FL } }, + /* surround40 */ +-{ .ca_index = 0x08, .speakers = { NA, NA, RR, RL, NA, NA, FR, FL } }, ++{ .ca_index = 0x08, .speakers = { 0, 0, RR, RL, 0, 0, FR, FL } }, + /* surround41 */ +-{ .ca_index = 0x09, .speakers = { NA, NA, RR, RL, NA, LFE, FR, FL } }, ++{ .ca_index = 0x09, .speakers = { 0, 0, RR, RL, 0, LFE, FR, FL } }, + /* surround50 */ +-{ .ca_index = 0x0a, .speakers = { NA, NA, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x0a, .speakers = { 0, 0, RR, RL, FC, 0, FR, FL } }, + /* surround51 */ +-{ .ca_index = 0x0b, .speakers = { NA, NA, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x0b, .speakers = { 0, 0, RR, RL, FC, LFE, FR, FL } }, + /* 6.1 */ +-{ .ca_index = 0x0f, .speakers = { NA, RC, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x0f, .speakers = { 0, RC, RR, RL, FC, LFE, FR, FL } }, + /* surround71 */ + { .ca_index = 0x13, .speakers = { RRC, RLC, RR, RL, FC, LFE, FR, FL } }, + +-{ .ca_index = 0x03, .speakers = { NA, NA, NA, NA, FC, LFE, FR, FL } }, +-{ .ca_index = 0x04, .speakers = { NA, NA, NA, RC, NA, NA, FR, FL } }, +-{ .ca_index = 0x05, .speakers = { NA, NA, NA, RC, NA, LFE, FR, FL } }, +-{ .ca_index = 0x06, .speakers = { NA, NA, NA, RC, FC, NA, FR, FL } }, +-{ .ca_index = 0x07, .speakers = { NA, NA, NA, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x0c, .speakers = { NA, RC, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x0d, .speakers = { NA, RC, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x0e, .speakers = { NA, RC, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x10, .speakers = { RRC, RLC, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x11, .speakers = { RRC, RLC, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x12, .speakers = { RRC, RLC, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x14, .speakers = { FRC, FLC, NA, NA, NA, NA, FR, FL } }, +-{ .ca_index = 0x15, .speakers = { FRC, FLC, NA, NA, NA, LFE, FR, FL } }, +-{ .ca_index = 0x16, .speakers = { FRC, FLC, NA, NA, FC, NA, FR, FL } }, +-{ .ca_index = 0x17, .speakers = { FRC, FLC, NA, NA, FC, LFE, FR, FL } }, +-{ .ca_index = 0x18, .speakers = { FRC, FLC, NA, RC, NA, NA, FR, FL } }, +-{ .ca_index = 0x19, .speakers = { FRC, FLC, NA, RC, NA, LFE, FR, FL } }, +-{ .ca_index = 0x1a, .speakers = { FRC, FLC, NA, RC, FC, NA, FR, FL } }, +-{ .ca_index = 0x1b, .speakers = { FRC, FLC, NA, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x1c, .speakers = { FRC, FLC, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x1d, .speakers = { FRC, FLC, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x1e, .speakers = { FRC, FLC, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x03, .speakers = { 0, 0, 0, 0, FC, LFE, FR, FL } }, ++{ .ca_index = 0x04, .speakers = { 0, 0, 0, RC, 0, 0, FR, FL } }, ++{ .ca_index = 0x05, .speakers = { 0, 0, 0, RC, 0, LFE, FR, FL } }, ++{ .ca_index = 0x06, .speakers = { 0, 0, 0, RC, FC, 0, FR, FL } }, ++{ .ca_index = 0x07, .speakers = { 0, 0, 0, RC, FC, LFE, FR, FL } }, ++{ .ca_index = 0x0c, .speakers = { 0, RC, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x0d, .speakers = { 0, RC, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x0e, .speakers = { 0, RC, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x10, .speakers = { RRC, RLC, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x11, .speakers = { RRC, RLC, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x12, .speakers = { RRC, RLC, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x14, .speakers = { FRC, FLC, 0, 0, 0, 0, FR, FL } }, ++{ .ca_index = 0x15, .speakers = { FRC, FLC, 0, 0, 0, LFE, FR, FL } }, ++{ .ca_index = 0x16, .speakers = { FRC, FLC, 0, 0, FC, 0, FR, FL } }, ++{ .ca_index = 0x17, .speakers = { FRC, FLC, 0, 0, FC, LFE, FR, FL } }, ++{ .ca_index = 0x18, .speakers = { FRC, FLC, 0, RC, 0, 0, FR, FL } }, ++{ .ca_index = 0x19, .speakers = { FRC, FLC, 0, RC, 0, LFE, FR, FL } }, ++{ .ca_index = 0x1a, .speakers = { FRC, FLC, 0, RC, FC, 0, FR, FL } }, ++{ .ca_index = 0x1b, .speakers = { FRC, FLC, 0, RC, FC, LFE, FR, FL } }, ++{ .ca_index = 0x1c, .speakers = { FRC, FLC, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x1d, .speakers = { FRC, FLC, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x1e, .speakers = { FRC, FLC, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x1f, .speakers = { FRC, FLC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x20, .speakers = { NA, FCH, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x21, .speakers = { NA, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x22, .speakers = { TC, NA, RR, RL, FC, NA, FR, FL } }, +-{ .ca_index = 0x23, .speakers = { TC, NA, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x24, .speakers = { FRH, FLH, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x25, .speakers = { FRH, FLH, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x26, .speakers = { FRW, FLW, RR, RL, NA, NA, FR, FL } }, +-{ .ca_index = 0x27, .speakers = { FRW, FLW, RR, RL, NA, LFE, FR, FL } }, +-{ .ca_index = 0x28, .speakers = { TC, RC, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x20, .speakers = { 0, FCH, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x21, .speakers = { 0, FCH, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x22, .speakers = { TC, 0, RR, RL, FC, 0, FR, FL } }, ++{ .ca_index = 0x23, .speakers = { TC, 0, RR, RL, FC, LFE, FR, FL } }, ++{ .ca_index = 0x24, .speakers = { FRH, FLH, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x25, .speakers = { FRH, FLH, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x26, .speakers = { FRW, FLW, RR, RL, 0, 0, FR, FL } }, ++{ .ca_index = 0x27, .speakers = { FRW, FLW, RR, RL, 0, LFE, FR, FL } }, ++{ .ca_index = 0x28, .speakers = { TC, RC, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x29, .speakers = { TC, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2a, .speakers = { FCH, RC, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x2a, .speakers = { FCH, RC, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x2b, .speakers = { FCH, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2c, .speakers = { TC, FCH, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x2c, .speakers = { TC, FCH, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x2d, .speakers = { TC, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2e, .speakers = { FRH, FLH, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x2e, .speakers = { FRH, FLH, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x2f, .speakers = { FRH, FLH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x30, .speakers = { FRW, FLW, RR, RL, FC, NA, FR, FL } }, ++{ .ca_index = 0x30, .speakers = { FRW, FLW, RR, RL, FC, 0, FR, FL } }, + { .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, + }; + + +From 16ce63a1493bdee82bea51bc5342639a12e64eb0 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:29:03 +0100 +Subject: [PATCH 311/398] Revert "bcm2835: implement channel map API" + +This reverts commit 5efba3f8c180c39609a8d40033ef92046ef0de75. +--- + sound/arm/bcm2835-ctl.c | 299 ---------------------------------------------- + sound/arm/bcm2835-pcm.c | 69 ++--------- + sound/arm/bcm2835-vchiq.c | 13 -- + sound/arm/bcm2835.h | 4 - + 4 files changed, 7 insertions(+), 378 deletions(-) + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +index 5b8e6bd2b89abf8135933a4028e23e25e5f2eef5..75dc3224be7ce8353378e9676ad2c6847dd0750b 100755 +--- a/sound/arm/bcm2835-ctl.c ++++ b/sound/arm/bcm2835-ctl.c +@@ -327,304 +327,6 @@ static struct snd_kcontrol_new snd_bcm2835_spdif[] = { + }, + }; + +-struct cea_channel_speaker_allocation { +- int ca_index; +- int speakers[8]; +-}; +- +-#define FL SNDRV_CHMAP_FL +-#define FR SNDRV_CHMAP_FR +-#define RL SNDRV_CHMAP_RL +-#define RR SNDRV_CHMAP_RR +-#define LFE SNDRV_CHMAP_LFE +-#define FC SNDRV_CHMAP_FC +-#define RLC SNDRV_CHMAP_RLC +-#define RRC SNDRV_CHMAP_RRC +-#define RC SNDRV_CHMAP_RC +-#define FLC SNDRV_CHMAP_FLC +-#define FRC SNDRV_CHMAP_FRC +-#define FLH SNDRV_CHMAP_TFL +-#define FRH SNDRV_CHMAP_TFR +-#define FLW SNDRV_CHMAP_FLW +-#define FRW SNDRV_CHMAP_FRW +-#define TC SNDRV_CHMAP_TC +-#define FCH SNDRV_CHMAP_TFC +- +-/* +- * CEA-861 channel maps +- * +- * Stolen from sound/pci/hda/patch_hdmi.c +- * (unlike the source, this uses SNDRV_* constants directly, as by the +- * map_tables array in patch_hdmi.c) +- * Unknown entries use 0, which unfortunately is SNDRV_CHMAP_UNKNOWN instead +- * of SNDRV_CHMAP_NA. +- */ +-static struct cea_channel_speaker_allocation channel_allocations[] = { +-/* channel: 7 6 5 4 3 2 1 0 */ +-{ .ca_index = 0x00, .speakers = { 0, 0, 0, 0, 0, 0, FR, FL } }, +- /* 2.1 */ +-{ .ca_index = 0x01, .speakers = { 0, 0, 0, 0, 0, LFE, FR, FL } }, +- /* Dolby Surround */ +-{ .ca_index = 0x02, .speakers = { 0, 0, 0, 0, FC, 0, FR, FL } }, +- /* surround40 */ +-{ .ca_index = 0x08, .speakers = { 0, 0, RR, RL, 0, 0, FR, FL } }, +- /* surround41 */ +-{ .ca_index = 0x09, .speakers = { 0, 0, RR, RL, 0, LFE, FR, FL } }, +- /* surround50 */ +-{ .ca_index = 0x0a, .speakers = { 0, 0, RR, RL, FC, 0, FR, FL } }, +- /* surround51 */ +-{ .ca_index = 0x0b, .speakers = { 0, 0, RR, RL, FC, LFE, FR, FL } }, +- /* 6.1 */ +-{ .ca_index = 0x0f, .speakers = { 0, RC, RR, RL, FC, LFE, FR, FL } }, +- /* surround71 */ +-{ .ca_index = 0x13, .speakers = { RRC, RLC, RR, RL, FC, LFE, FR, FL } }, +- +-{ .ca_index = 0x03, .speakers = { 0, 0, 0, 0, FC, LFE, FR, FL } }, +-{ .ca_index = 0x04, .speakers = { 0, 0, 0, RC, 0, 0, FR, FL } }, +-{ .ca_index = 0x05, .speakers = { 0, 0, 0, RC, 0, LFE, FR, FL } }, +-{ .ca_index = 0x06, .speakers = { 0, 0, 0, RC, FC, 0, FR, FL } }, +-{ .ca_index = 0x07, .speakers = { 0, 0, 0, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x0c, .speakers = { 0, RC, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x0d, .speakers = { 0, RC, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x0e, .speakers = { 0, RC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x10, .speakers = { RRC, RLC, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x11, .speakers = { RRC, RLC, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x12, .speakers = { RRC, RLC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x14, .speakers = { FRC, FLC, 0, 0, 0, 0, FR, FL } }, +-{ .ca_index = 0x15, .speakers = { FRC, FLC, 0, 0, 0, LFE, FR, FL } }, +-{ .ca_index = 0x16, .speakers = { FRC, FLC, 0, 0, FC, 0, FR, FL } }, +-{ .ca_index = 0x17, .speakers = { FRC, FLC, 0, 0, FC, LFE, FR, FL } }, +-{ .ca_index = 0x18, .speakers = { FRC, FLC, 0, RC, 0, 0, FR, FL } }, +-{ .ca_index = 0x19, .speakers = { FRC, FLC, 0, RC, 0, LFE, FR, FL } }, +-{ .ca_index = 0x1a, .speakers = { FRC, FLC, 0, RC, FC, 0, FR, FL } }, +-{ .ca_index = 0x1b, .speakers = { FRC, FLC, 0, RC, FC, LFE, FR, FL } }, +-{ .ca_index = 0x1c, .speakers = { FRC, FLC, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x1d, .speakers = { FRC, FLC, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x1e, .speakers = { FRC, FLC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x1f, .speakers = { FRC, FLC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x20, .speakers = { 0, FCH, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x21, .speakers = { 0, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x22, .speakers = { TC, 0, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x23, .speakers = { TC, 0, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x24, .speakers = { FRH, FLH, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x25, .speakers = { FRH, FLH, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x26, .speakers = { FRW, FLW, RR, RL, 0, 0, FR, FL } }, +-{ .ca_index = 0x27, .speakers = { FRW, FLW, RR, RL, 0, LFE, FR, FL } }, +-{ .ca_index = 0x28, .speakers = { TC, RC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x29, .speakers = { TC, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2a, .speakers = { FCH, RC, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x2b, .speakers = { FCH, RC, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2c, .speakers = { TC, FCH, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x2d, .speakers = { TC, FCH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x2e, .speakers = { FRH, FLH, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x2f, .speakers = { FRH, FLH, RR, RL, FC, LFE, FR, FL } }, +-{ .ca_index = 0x30, .speakers = { FRW, FLW, RR, RL, FC, 0, FR, FL } }, +-{ .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, +-}; +- +-static int snd_bcm2835_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag, +- unsigned int size, unsigned int __user *tlv) +-{ +- unsigned int __user *dst; +- int count = 0; +- int i; +- +- if (size < 8) +- return -ENOMEM; +- if (put_user(SNDRV_CTL_TLVT_CONTAINER, tlv)) +- return -EFAULT; +- size -= 8; +- dst = tlv + 2; +- for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { +- struct cea_channel_speaker_allocation *ch = &channel_allocations[i]; +- int num_chs = 0; +- int chs_bytes; +- int c; +- +- for (c = 0; c < 8; c++) { +- if (ch->speakers[c]) +- num_chs++; +- } +- +- chs_bytes = num_chs * 4; +- if (size < 8) +- return -ENOMEM; +- if (put_user(SNDRV_CTL_TLVT_CHMAP_FIXED, dst) || +- put_user(chs_bytes, dst + 1)) +- return -EFAULT; +- dst += 2; +- size -= 8; +- count += 8; +- if (size < chs_bytes) +- return -ENOMEM; +- size -= chs_bytes; +- count += chs_bytes; +- for (c = 0; c < 8; c++) { +- int sp = ch->speakers[7 - c]; +- if (sp) { +- if (put_user(sp, dst)) +- return -EFAULT; +- dst++; +- } +- } +- } +- if (put_user(count, tlv + 1)) +- return -EFAULT; +- return 0; +-} +- +-static int snd_bcm2835_chmap_ctl_get(struct snd_kcontrol *kcontrol, +- struct snd_ctl_elem_value *ucontrol) +-{ +- struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); +- bcm2835_chip_t *chip = info->private_data; +- unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); +- struct snd_pcm_substream *substream = snd_pcm_chmap_substream(info, idx); +- struct cea_channel_speaker_allocation *ch = NULL; +- int res = 0; +- int cur = 0; +- int i; +- +- if (mutex_lock_interruptible(&chip->audio_mutex)) +- return -EINTR; +- +- if (!substream || !substream->runtime) { +- res = -ENODEV; +- goto unlock; +- } +- +- for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { +- if (channel_allocations[i].ca_index == chip->cea_chmap) +- ch = &channel_allocations[i]; +- } +- +- /* If no layout was set yet, return a dummy. Apparently the userspace +- * API will be confused if we don't. */ +- if (!ch) +- ch = &channel_allocations[0]; +- +- for (i = 0; i < 8; i++) { +- if (ch->speakers[7 - i]) +- ucontrol->value.integer.value[cur++] = ch->speakers[7 - i]; +- } +- while (cur < 8) +- ucontrol->value.integer.value[cur++] = SNDRV_CHMAP_NA; +- +-unlock: +- mutex_unlock(&chip->audio_mutex); +- return res; +-} +- +-static int snd_bcm2835_chmap_ctl_put(struct snd_kcontrol *kcontrol, +- struct snd_ctl_elem_value *ucontrol) +-{ +- struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); +- bcm2835_chip_t *chip = info->private_data; +- unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); +- struct snd_pcm_substream *substream = snd_pcm_chmap_substream(info, idx); +- int i, prepared = 0, cea_chmap = -1; +- int res = 0; +- int remap[8]; +- +- if (mutex_lock_interruptible(&chip->audio_mutex)) +- return -EINTR; +- +- if (!substream || !substream->runtime) { +- res = -ENODEV; +- goto unlock; +- } +- +- switch (substream->runtime->status->state) { +- case SNDRV_PCM_STATE_OPEN: +- case SNDRV_PCM_STATE_SETUP: +- break; +- case SNDRV_PCM_STATE_PREPARED: +- prepared = 1; +- break; +- default: +- res = -EBUSY; +- goto unlock; +- } +- +- for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) { +- struct cea_channel_speaker_allocation *ch = &channel_allocations[i]; +- int matches = 1; +- int cur = 0; +- int x; +- memset(remap, 0, sizeof(remap)); +- for (x = 0; x < substream->runtime->channels; x++) { +- int sp = ucontrol->value.integer.value[x]; +- while (cur < 8 && !ch->speakers[7 - cur]) +- cur++; +- if (cur >= 8) { +- /* user has more channels than ch */ +- matches = 0; +- break; +- } +- if (ch->speakers[7 - cur] != sp) { +- matches = 0; +- break; +- } +- remap[x] = cur; +- cur++; +- } +- for (x = cur; x < 8; x++) { +- if (ch->speakers[7 - x]) { +- /* ch has more channels than user */ +- matches = 0; +- break; +- } +- } +- if (matches) { +- cea_chmap = ch->ca_index; +- break; +- } +- } +- +- if (cea_chmap < 0) { +- res = -EINVAL; +- goto unlock; +- } +- +- /* don't change the layout if another substream is active */ +- if (chip->opened != (1 << substream->number) && chip->cea_chmap != cea_chmap) { +- res = -EBUSY; /* unsure whether this is a good error code */ +- goto unlock; +- } +- +- chip->cea_chmap = cea_chmap; +- for (i = 0; i < 8; i++) +- chip->map_channels[i] = remap[i]; +- if (prepared) +- snd_bcm2835_pcm_prepare_again(substream); +- +-unlock: +- mutex_unlock(&chip->audio_mutex); +- return res; +-} +- +-static int snd_bcm2835_add_chmap_ctl(bcm2835_chip_t * chip) +-{ +- struct snd_pcm_chmap *chmap; +- struct snd_kcontrol *kctl; +- int err, i; +- +- err = snd_pcm_add_chmap_ctls(chip->pcm, +- SNDRV_PCM_STREAM_PLAYBACK, +- NULL, 8, 0, &chmap); +- if (err < 0) +- return err; +- /* override handlers */ +- chmap->private_data = chip; +- kctl = chmap->kctl; +- for (i = 0; i < kctl->count; i++) +- kctl->vd[i].access |= SNDRV_CTL_ELEM_ACCESS_WRITE; +- kctl->get = snd_bcm2835_chmap_ctl_get; +- kctl->put = snd_bcm2835_chmap_ctl_put; +- kctl->tlv.c = snd_bcm2835_chmap_ctl_tlv; +- return 0; +-} +- + int snd_bcm2835_new_ctl(bcm2835_chip_t * chip) + { + int err; +@@ -638,7 +340,6 @@ int snd_bcm2835_new_ctl(bcm2835_chip_t * chip) + if (err < 0) + return err; + } +- snd_bcm2835_add_chmap_ctl(chip); + for (idx = 0; idx < ARRAY_SIZE(snd_bcm2835_spdif); idx++) { + err = snd_ctl_add(chip->card, + snd_ctl_new1(&snd_bcm2835_spdif[idx], chip)); +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index 48da3bbd7395e2d3611990b7c5f31db9157b2afc..b6ee0279eff9ad84be0fc6caf5189d1e61f46493 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -19,9 +19,6 @@ + + #include "bcm2835.h" + +-/* The hardware can not do much more num_channels*samplerate then this value */ +-#define MAX_COMBINED_RATE 768000 +- + /* hardware definition */ + static struct snd_pcm_hardware snd_bcm2835_playback_hw = { + .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | +@@ -110,31 +107,6 @@ static irqreturn_t bcm2835_playback_fifo_irq(int irq, void *dev_id) + return IRQ_HANDLED; + } + +- +-static int rate_hw_constraint_rate(struct snd_pcm_hw_params *params, +- struct snd_pcm_hw_rule *rule) +-{ +- struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); +- struct snd_interval rates = { +- .min = 8000, +- .max = min(192000u, MAX_COMBINED_RATE / max(channels->min, 1u)), +- }; +- struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); +- return snd_interval_refine(rate, &rates); +-} +- +-static int rate_hw_constraint_channels(struct snd_pcm_hw_params *params, +- struct snd_pcm_hw_rule *rule) +-{ +- struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); +- struct snd_interval channels_interval = { +- .min = 1, +- .max = min(8u, MAX_COMBINED_RATE / max(rate->min, 1u)), +- }; +- struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); +- return snd_interval_refine(channels, &channels_interval); +-} +- + /* open callback */ + static int snd_bcm2835_playback_open_generic( + struct snd_pcm_substream *substream, int spdif) +@@ -216,24 +188,8 @@ static int snd_bcm2835_playback_open_generic( + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + 16); + +- /* When playing PCM, pretend that we support the full range of channels +- * and sample rates. The GPU can't output it, but is able to resample +- * the data to a rate the hardware can handle it. This won't work with +- * compressed data; the resampler would just destroy it. */ +- if (spdif) { +- err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, +- rate_hw_constraint_rate, NULL, +- SNDRV_PCM_HW_PARAM_CHANNELS, -1); +- err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, +- rate_hw_constraint_channels, NULL, +- SNDRV_PCM_HW_PARAM_RATE, -1); +- } +- + chip->alsa_stream[idx] = alsa_stream; + +- if (!chip->opened) +- chip->cea_chmap = -1; +- + chip->opened |= (1 << idx); + alsa_stream->open = 1; + alsa_stream->draining = 1; +@@ -344,7 +300,8 @@ static int snd_bcm2835_pcm_hw_free(struct snd_pcm_substream *substream) + return snd_pcm_lib_free_pages(substream); + } + +-int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream) ++/* prepare callback */ ++static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) + { + bcm2835_chip_t *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; +@@ -352,6 +309,11 @@ int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream) + int channels; + int err; + ++ audio_info(" .. IN\n"); ++ ++ if (mutex_lock_interruptible(&chip->audio_mutex)) ++ return -EINTR; ++ + /* notify the vchiq that it should enter spdif passthrough mode by + * setting channels=0 (see + * https://github.com/raspberrypi/linux/issues/528) */ +@@ -367,23 +329,6 @@ int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream) + audio_error(" error setting hw params\n"); + } + +- return err; +-} +- +-/* prepare callback */ +-static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) +-{ +- bcm2835_chip_t *chip = snd_pcm_substream_chip(substream); +- struct snd_pcm_runtime *runtime = substream->runtime; +- bcm2835_alsa_stream_t *alsa_stream = runtime->private_data; +- +- audio_info(" .. IN\n"); +- +- if (mutex_lock_interruptible(&chip->audio_mutex)) +- return -EINTR; +- +- snd_bcm2835_pcm_prepare_again(substream); +- + bcm2835_audio_setup(alsa_stream); + + /* in preparation of the stream, set the controls (volume level) of the stream */ +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 8ecd2d735fbf94b9018c89c705a68750aad5bf97..3de30945d8155b90d244734881a7caa81930fa7c 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -570,8 +570,6 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + VC_AUDIO_MSG_T m; + AUDIO_INSTANCE_T *instance = alsa_stream->instance; + int32_t success; +- uint32_t chmap_value; +- int i; + int ret; + LOG_DBG(" .. IN\n"); + +@@ -595,21 +593,10 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + + instance->result = -1; + +- if (alsa_stream->chip->cea_chmap >= 0) { +- chmap_value = (unsigned)alsa_stream->chip->cea_chmap << 24; +- } else { +- chmap_value = 0; /* force stereo */ +- for (i = 0; i < 8; i++) +- alsa_stream->chip->map_channels[i] = i; +- } +- for (i = 0; i < 8; i++) +- chmap_value |= alsa_stream->chip->map_channels[i] << (i * 3); +- + m.type = VC_AUDIO_MSG_TYPE_CONFIG; + m.u.config.channels = channels; + m.u.config.samplerate = samplerate; + m.u.config.bps = bps; +- m.u.config.channelmap = chmap_value; + + /* Create the message available completion */ + init_completion(&instance->msg_avail_comp); +diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h +index 997fb69da951c7ceb732f4897b7450ecfc37d168..0f71c5def314a63252fa4fe18ae2ba5a339f2cfb 100755 +--- a/sound/arm/bcm2835.h ++++ b/sound/arm/bcm2835.h +@@ -107,8 +107,6 @@ typedef struct bcm2835_chip { + int old_volume; /* stores the volume value whist muted */ + int dest; + int mute; +- int cea_chmap; /* currently requested Audio InfoFrame Data Byte 4 */ +- int map_channels[8]; + + unsigned int opened; + unsigned int spdif_status; +@@ -151,8 +149,6 @@ int snd_bcm2835_new_ctl(bcm2835_chip_t * chip); + int snd_bcm2835_new_pcm(bcm2835_chip_t * chip); + int snd_bcm2835_new_spdif_pcm(bcm2835_chip_t * chip); + +-int snd_bcm2835_pcm_prepare_again(struct snd_pcm_substream *substream); +- + int bcm2835_audio_open(bcm2835_alsa_stream_t * alsa_stream); + int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream); + int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, + +From ff89a3669951dc42a944cb007c355186c2f080d5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 29 Apr 2016 17:30:00 +0100 +Subject: [PATCH 312/398] Revert "bcm2835: extend allowed range of channels and + samplerates" + +This reverts commit 688a5f0daa45e0a51b324707768d472e1d715c13. +--- + sound/arm/bcm2835-pcm.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index b6ee0279eff9ad84be0fc6caf5189d1e61f46493..d2de13cbd76ed16634f27c0843474825671a28eb 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -26,9 +26,9 @@ static struct snd_pcm_hardware snd_bcm2835_playback_hw = { + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, + .rate_min = 8000, +- .rate_max = 192000, ++ .rate_max = 48000, + .channels_min = 1, +- .channels_max = 8, ++ .channels_max = 2, + .buffer_bytes_max = 128 * 1024, + .period_bytes_min = 1 * 1024, + .period_bytes_max = 128 * 1024, +@@ -43,9 +43,9 @@ static struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = { + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_44100 | + SNDRV_PCM_RATE_48000, + .rate_min = 44100, +- .rate_max = 192000, ++ .rate_max = 48000, + .channels_min = 2, +- .channels_max = 8, ++ .channels_max = 2, + .buffer_bytes_max = 128 * 1024, + .period_bytes_min = 1 * 1024, + .period_bytes_max = 128 * 1024, + +From 98f9191a7090b5b0996ed0e9bd706095f4edc726 Mon Sep 17 00:00:00 2001 +From: Sakari Ailus +Date: Sun, 3 Apr 2016 16:31:03 -0300 +Subject: [PATCH 313/398] videobuf2-v4l2: Verify planes array in buffer + dequeueing + +commit 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab upstream. + +When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer +which will be dequeued is not known until the buffer has been removed from +the queue. The number of planes is specific to a buffer, not to the queue. + +This does lead to the situation where multi-plane buffers may be requested +and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument +struct with fewer planes. + +__fill_v4l2_buffer() however uses the number of planes from the dequeued +videobuf2 buffer, overwriting kernel memory (the m.planes array allocated +in video_usercopy() in v4l2-ioctl.c) if the user provided fewer +planes than the dequeued buffer had. Oops! + +Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2") + +Signed-off-by: Sakari Ailus +Acked-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c +index 502984c724ff5efd14ef10250dd5d8e653468111..6c441be8f893d8e931825b63b810d67ae67a2864 100644 +--- a/drivers/media/v4l2-core/videobuf2-v4l2.c ++++ b/drivers/media/v4l2-core/videobuf2-v4l2.c +@@ -67,6 +67,11 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer + return 0; + } + ++static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb) ++{ ++ return __verify_planes_array(vb, pb); ++} ++ + /** + * __verify_length() - Verify that the bytesused value for each plane fits in + * the plane length and that the data offset doesn't exceed the bytesused value. +@@ -432,6 +437,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb, + } + + static const struct vb2_buf_ops v4l2_buf_ops = { ++ .verify_planes_array = __verify_planes_array_core, + .fill_user_buffer = __fill_v4l2_buffer, + .fill_vb2_buffer = __fill_vb2_buffer, + .set_timestamp = __set_timestamp, + +From c4a0807ad1dd05e5cb079b7d2fdfae74212b4914 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 6 May 2016 12:32:47 +0100 +Subject: [PATCH 314/398] pinctrl-bcm2835: Return pins to inputs when freed + +When dynamically unloading overlays, it is important that freed pins are +restored to being inputs to prevent functions from being enabled in +multiple places at once. + +Signed-off-by: Phil Elwell +--- + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +index 32f779eeafcba4b29390572e5393b2f4058e0d13..aa3bc650038da62f1c32159b4e47988383508f8e 100644 +--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c ++++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +@@ -831,6 +831,15 @@ static const struct pinctrl_ops bcm2835_pctl_ops = { + .dt_free_map = bcm2835_pctl_dt_free_map, + }; + ++static void bcm2835_pmx_free(struct pinctrl_dev *pctldev, ++ unsigned offset) ++{ ++ struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); ++ ++ /* disable by setting to GPIO_IN */ ++ bcm2835_pinctrl_fsel_set(pc, offset, BCM2835_FSEL_GPIO_IN); ++} ++ + static int bcm2835_pmx_get_functions_count(struct pinctrl_dev *pctldev) + { + return BCM2835_FSEL_COUNT; +@@ -890,6 +899,7 @@ static int bcm2835_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, + } + + static const struct pinmux_ops bcm2835_pmx_ops = { ++ .free = bcm2835_pmx_free, + .get_functions_count = bcm2835_pmx_get_functions_count, + .get_function_name = bcm2835_pmx_get_function_name, + .get_function_groups = bcm2835_pmx_get_function_groups, + +From d5b07c4be6d02c4626ae7bcf64ff87b66ef58c7d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 6 May 2016 12:53:16 +0100 +Subject: [PATCH 315/398] BCM270X_DT: i2c0-bcm2708 - pin group params + +Add parameters to set pin groups as a unit, setting the pin function +appropriately. The parameters are: + pins_0_1 + pins_28_29 + pins_44_45 + pins_46_47 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 11 ++++-- + .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 43 +++++++++++++++++----- + 2 files changed, 42 insertions(+), 12 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 710085e8d896ed4193a42cbc9c8dbf9e03c413f2..1c81b141d81e4eeda5202913da4abac08f0aa3e8 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -449,10 +449,15 @@ Params: ds1307 Select the DS1307 device + + + Name: i2c0-bcm2708 +-Info: Enable the i2c_bcm2708 driver for the i2c0 bus ++Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations ++ are usable on all platforms. + Load: dtoverlay=i2c0-bcm2708,= +-Params: sda0_pin GPIO pin for SDA0 (0, 28 [or 44] - default 0) +- scl0_pin GPIO pin for SCL0 (1, 29 [or 45] - default 1) ++Params: sda0_pin GPIO pin for SDA0 (deprecated - use pins_*) ++ scl0_pin GPIO pin for SCL0 (deprecated - use pins_*) ++ pins_0_1 Use pins 0 and 1 (default) ++ pins_28_29 Use pins 28 and 29 ++ pins_44_45 Use pins 44 and 45 ++ pins_46_47 Use pins 46 and 47 + + + Name: i2c1-bcm2708 +diff --git a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts +index 5c0e55b73531925f91a1cc3867ddf00ebb782db3..1f4fc7b570604a50ff6d3f6d676c3c4642d66b17 100644 +--- a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts +@@ -14,23 +14,48 @@ + fragment@0 { + target = <&i2c0>; + __overlay__ { +- pinctrl-0 = <&i2c0_pins>; + status = "okay"; + }; + }; + + fragment@1 { +- target = <&gpio>; +- __overlay__ { +- i2c0_pins: i2c0 { +- brcm,pins = <0 1>; +- brcm,function = <4>; /* alt0 */ +- }; ++ target = <&i2c0_pins>; ++ frag1: __overlay__ { ++ brcm,pins = <0 1>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c0_pins>; ++ __dormant__ { ++ brcm,pins = <28 29>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c0_pins>; ++ __dormant__ { ++ brcm,pins = <44 45>; ++ brcm,function = <5>; /* alt1 */ ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c0_pins>; ++ __dormant__ { ++ brcm,pins = <46 47>; ++ brcm,function = <4>; /* alt0 */ + }; + }; + + __overrides__ { +- sda0_pin = <&i2c0_pins>,"brcm,pins:0"; +- scl0_pin = <&i2c0_pins>,"brcm,pins:4"; ++ sda0_pin = <&frag1>,"brcm,pins:0"; ++ scl0_pin = <&frag1>,"brcm,pins:4"; ++ pins_0_1 = <0>,"+1-2-3-4"; ++ pins_28_29 = <0>,"-1+2-3-4"; ++ pins_44_45 = <0>,"-1-2+3-4"; ++ pins_46_47 = <0>,"-1-2-3+4"; + }; + }; + +From b8b34bc3ca4b51b920e79c58d9983d1d2089d1cd Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 12:40:37 +0100 +Subject: [PATCH 316/398] config: Add CONFIG_DRM_LOAD_EDID_FIRMWARE + +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 54c8f4ed3c41e67d46c509aab8fce3d390b1e369..aa4b12396e9bc5c908e28cc24eaadbdb1e9852f5 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -815,6 +815,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 13471cc1c4433669c716a820a054bec99fd13aa6..757a020a5b73399ca4c66e3585f4008578355bb6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -807,6 +807,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + +From 3647aaf5f0bc1bd3f2e1525ad8cc115ff0e3f67e Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 17:18:57 +0100 +Subject: [PATCH 317/398] Revert "rpi: update vc_vchi_audioserv_defs.h" + +This reverts commit 64fa9f963dffab0145f7960a593422064bb0aa8d. +--- + sound/arm/vc_vchi_audioserv_defs.h | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h +index 5f4409fc821cee48abf3b4c581c09072d55dd56a..af3e6eb690113fc32ce9e06bd2f0f294da7a7f00 100644 +--- a/sound/arm/vc_vchi_audioserv_defs.h ++++ b/sound/arm/vc_vchi_audioserv_defs.h +@@ -16,7 +16,7 @@ + #define _VC_AUDIO_DEFS_H_ + + #define VC_AUDIOSERV_MIN_VER 1 +-#define VC_AUDIOSERV_VER 3 ++#define VC_AUDIOSERV_VER 2 + + // FourCC code used for VCHI connection + #define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS") +@@ -36,7 +36,6 @@ typedef enum { + VC_AUDIO_MSG_TYPE_START, // Configure audio + VC_AUDIO_MSG_TYPE_STOP, // Configure audio + VC_AUDIO_MSG_TYPE_WRITE, // Configure audio +- VC_AUDIO_MSG_TYPE_LATENCY, // request latency in cycles + VC_AUDIO_MSG_TYPE_MAX + } VC_AUDIO_MSG_TYPE; + +@@ -45,7 +44,6 @@ typedef struct { + uint32_t channels; + uint32_t samplerate; + uint32_t bps; +- uint32_t channelmap; + + } VC_AUDIO_CONFIG_T; + +@@ -86,12 +84,6 @@ typedef struct { + uint16_t max_packet; + } VC_AUDIO_WRITE_T; + +-// query latency in samples of sink +-typedef struct +-{ +- uint32_t dummy; +-} VC_AUDIO_LATENCY_T; +- + // Generic result for a request (VC->HOST) + typedef struct { + int32_t success; // Success value +@@ -116,10 +108,9 @@ typedef struct { + VC_AUDIO_START_T start; + VC_AUDIO_STOP_T stop; + VC_AUDIO_WRITE_T write; +- VC_AUDIO_LATENCY_T latency; + VC_AUDIO_RESULT_T result; + VC_AUDIO_COMPLETE_T complete; + } u; + } VC_AUDIO_MSG_T; + +-#endif // _VC_AUDIO_DEFS_H_ +\ No newline at end of file ++#endif // _VC_AUDIO_DEFS_H_ + +From 93b425583314d15781b80ebbf7b8e9482c7b4796 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 17:21:58 +0100 +Subject: [PATCH 318/398] Revert "config: Add CONFIG_DRM_LOAD_EDID_FIRMWARE" + +This reverts commit 417aed4cb35a479e001c8389fd8d97c3ea612999. +--- + arch/arm/configs/bcm2709_defconfig | 1 - + arch/arm/configs/bcmrpi_defconfig | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index aa4b12396e9bc5c908e28cc24eaadbdb1e9852f5..54c8f4ed3c41e67d46c509aab8fce3d390b1e369 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -815,7 +815,6 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m +-CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 757a020a5b73399ca4c66e3585f4008578355bb6..13471cc1c4433669c716a820a054bec99fd13aa6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -807,7 +807,6 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m +-CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + +From edb9094f623138aa655c713763ff867a66cd7289 Mon Sep 17 00:00:00 2001 +From: Andrey Grodzovsky +Date: Tue, 3 May 2016 22:10:59 -0400 +Subject: [PATCH 319/398] ARM: adau1977-adc: Add basic machine driver for + adau1977 codec driver. + +This commit adds basic support for the codec usage including: Device tree overlay, +binding I2S bus and setting I2S mode, clock source and frequency setting according +to spec. + +Signed-off-by: Andrey Grodzovsky +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 7 ++ + .../arm/boot/dts/overlays/adau1977-adc-overlay.dts | 53 +++++++++ + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + sound/soc/bcm/Kconfig | 7 ++ + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/adau1977-adc.c | 125 +++++++++++++++++++++ + 8 files changed, 197 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts + create mode 100644 sound/soc/bcm/adau1977-adc.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 90d2034031edebf050da430843abd54d3ae03e1e..3758fa9992bde3d6e62a08919df388f9b6bbc6ae 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -12,6 +12,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + RPI_DT_OVERLAYS=y + endif + ++dtbo-$(RPI_DT_OVERLAYS) += adau1977-adc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 1c81b141d81e4eeda5202913da4abac08f0aa3e8..a0488adbf700c15c677b31aa14857690c6531c01 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -161,6 +161,13 @@ Params: + and the other i2c baudrate parameters. + + ++Name: adau1977-adc ++Info: Overlay for activation of ADAU1977 ADC codec over I2C for control ++ and I2S for data. ++Load: dtoverlay=adau1977-adc ++Params: ++ ++ + Name: ads7846 + Info: ADS7846 Touch controller + Load: dtoverlay=ads7846,= +diff --git a/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts b/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..24fcd58fd1dc61d97a77def3d5d1f7c65130dde6 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts +@@ -0,0 +1,53 @@ ++// Definitions for ADAU1977 ADC ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&soc>; ++ ++ __overlay__ { ++ codec_supply: fixedregulator@0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "AVDD"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c>; ++ ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ adau1977: codec@11 { ++ compatible = "adi,adau1977"; ++ reg = <0x11>; ++ reset-gpios = <&gpio 5 0>; ++ AVDD-supply = <&codec_supply>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "adi,adau1977-adc"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 54c8f4ed3c41e67d46c509aab8fce3d390b1e369..47bd1c27b15978a57be891d60feed8c77bcef9f9 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -861,6 +861,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m + CONFIG_SND_SIMPLE_CARD=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 13471cc1c4433669c716a820a054bec99fd13aa6..d66fcd4a4bce71c218fe7307ff106a084893ffed 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -853,6 +853,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m + CONFIG_SND_SIMPLE_CARD=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 3383381122d9c9f77b98a1d83d4e9bd3df16b82f..c05e656eaa9684a64e2d0d5c41b599815d3c8840 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -78,3 +78,10 @@ config SND_BCM2708_SOC_RASPIDAC3 + select SND_SOC_TPA6130A2 + help + Say Y or M if you want to add support for RaspiDAC Rev.3x. ++ ++config SND_BCM2708_SOC_ADAU1977_ADC ++ tristate "Support for ADAU1977 ADC" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_ADAU1977_I2C ++ help ++ Say Y or M if you want to add support for ADAU1977 ADC. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index b04b0d2ea8d31d6d528d08ff8df11b80182676ef..7de2ef13a0d3c72c2a77921e69004ba4cbd5c02b 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -4,6 +4,7 @@ snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o + obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o + + # BCM2708 Machine Support ++snd-soc-adau1977-adc-objs := adau1977-adc.o + snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o +@@ -15,6 +16,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o + snd-soc-raspidac3-objs := raspidac3.o + ++obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o +diff --git a/sound/soc/bcm/adau1977-adc.c b/sound/soc/bcm/adau1977-adc.c +new file mode 100644 +index 0000000000000000000000000000000000000000..6e2ee027926ee63c89222f75ceb89e3d2434b0e1 +--- /dev/null ++++ b/sound/soc/bcm/adau1977-adc.c +@@ -0,0 +1,125 @@ ++/* ++ * ASoC Driver for ADAU1977 ADC ++ * ++ * Author: Andrey Grodzovsky ++ * Copyright 2016 ++ * ++ * This file is based on hifibery_dac driver by Florian Meier. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++enum adau1977_clk_id { ++ ADAU1977_SYSCLK, ++}; ++ ++enum adau1977_sysclk_src { ++ ADAU1977_SYSCLK_SRC_MCLK, ++ ADAU1977_SYSCLK_SRC_LRCLK, ++}; ++ ++static int eval_adau1977_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ int ret; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ ++ ret = snd_soc_dai_set_tdm_slot(codec_dai, 0, 0, 0, 0); ++ if (ret < 0) ++ return ret; ++ ++ return snd_soc_codec_set_sysclk(rtd->codec, ADAU1977_SYSCLK, ++ ADAU1977_SYSCLK_SRC_MCLK, 11289600, SND_SOC_CLOCK_IN); ++} ++ ++static struct snd_soc_dai_link snd_rpi_adau1977_dai[] = { ++ { ++ .name = "adau1977", ++ .stream_name = "ADAU1977", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "adau1977-hifi", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "adau1977.1-0011", ++ .init = eval_adau1977_init, ++ .dai_fmt = SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ }, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_adau1977_adc = { ++ .name = "snd_rpi_adau1977_adc", ++ .owner = THIS_MODULE, ++ .dai_link = snd_rpi_adau1977_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_adau1977_dai), ++}; ++ ++static int snd_adau1977_adc_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_adau1977_adc.dev = &pdev->dev; ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_adau1977_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ ++ ret = snd_soc_register_card(&snd_adau1977_adc); ++ if (ret) ++ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); ++ ++ return ret; ++} ++ ++static int snd_adau1977_adc_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_adau1977_adc); ++} ++ ++static const struct of_device_id snd_adau1977_adc_of_match[] = { ++ { .compatible = "adi,adau1977-adc", }, ++ {}, ++}; ++ ++MODULE_DEVICE_TABLE(of, snd_adau1977_adc_of_match); ++ ++static struct platform_driver snd_adau1977_adc_driver = { ++ .driver = { ++ .name = "snd-adau1977-adc", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_adau1977_adc_of_match, ++ }, ++ .probe = snd_adau1977_adc_probe, ++ .remove = snd_adau1977_adc_remove, ++}; ++ ++module_platform_driver(snd_adau1977_adc_driver); ++ ++MODULE_AUTHOR("Andrey Grodzovsky "); ++MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); ++MODULE_LICENSE("GPL v2"); + +From ce77029a91fa44ccf49dfdb18cd86eba608deda4 Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Fri, 6 May 2016 09:42:55 +0100 +Subject: [PATCH 320/398] Allow up to 24dB digital gain to be applied when + using IQAudIO DAC + +24db_digital_gain DT param can be used to specify that PCM512x +codec "Digital" volume control should not be limited to 0dB gain, +and if specified will allow the full 24dB gain. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/overlays/README | 17 +++++++++++++++-- + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 6 +++++- + 2 files changed, 20 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index a0488adbf700c15c677b31aa14857690c6531c01..78b2616399987df7ab8c07baa0842662f486d2b4 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -490,8 +490,21 @@ Params: + + Name: iqaudio-dac + Info: Configures the IQaudio DAC audio card +-Load: dtoverlay=iqaudio-dac +-Params: ++Load: dtoverlay=iqaudio-dac, ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ "dtoverlay=iqaudio-dac,24db_digital_gain" ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24db_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) + + + Name: iqaudio-dacplus +diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +index 8e8ee0685da38c23f400cbfd20ab801a144eac90..0d35c85382bb5766b3eeb9de1bd4a94621229e4b 100644 +--- a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts +@@ -30,10 +30,14 @@ + + fragment@2 { + target = <&sound>; +- __overlay__ { ++ frag2: __overlay__ { + compatible = "iqaudio,iqaudio-dac"; + i2s-controller = <&i2s>; + status = "okay"; + }; + }; ++ ++ __overrides__ { ++ 24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?"; ++ }; + }; + +From f642ea5ba1d2c520a4a146e6bf9eb7753163aff5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 6 May 2016 12:40:37 +0100 +Subject: [PATCH 321/398] config: Add CONFIG_DRM_LOAD_EDID_FIRMWARE + +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 47bd1c27b15978a57be891d60feed8c77bcef9f9..0bdc63180a149eaf51c199d727ba85cd74412e4a 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -815,6 +815,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index d66fcd4a4bce71c218fe7307ff106a084893ffed..57393b5e216f80cddd11b119cc57aab7e56006b3 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -807,6 +807,7 @@ CONFIG_VIDEO_TW9906=m + CONFIG_VIDEO_OV7640=m + CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m ++CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + +From 7ae212b3ef1f581abb51e4bb1c7bc3d70423493a Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 11:48:35 -0700 +Subject: [PATCH 322/398] BCM270X_DT: Move vc4 node contents to + bcm2708_common.dtsi. + +This should clarify what's going on with the overlay: The hardware is +always present, we're just enabling the DT node so that the vc4 driver +probes. + +The interrupts are left in the overlay, because the firmware doesn't +check node status before masking out the vc4 interrupts. + +By having the nodes in the common file, we'll be able to correctly +connect the HDMI HPD GPIO so that we can detect whether an HDMI +monitor is connected. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 51 +++++++ + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 160 ++++++++++----------- + 2 files changed, 129 insertions(+), 82 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4ec0156566051d198e96e8f7ce1ae8655f42c879..2562372d2e7986c29f7f671d4d1bcc226484bfc0 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -1,4 +1,7 @@ ++#include "dt-bindings/clock/bcm2835.h" + #include ++#include "dt-bindings/power/raspberrypi-power.h" ++#include "dt-bindings/gpio/gpio.h" + #include "skeleton.dtsi" + + / { +@@ -170,6 +173,18 @@ + status = "disabled"; + }; + ++ pixelvalve0: pixelvalve@7e206000 { ++ compatible = "brcm,bcm2835-pixelvalve0"; ++ reg = <0x7e206000 0x100>; ++ status = "disabled"; ++ }; ++ ++ pixelvalve1: pixelvalve@7e207000 { ++ compatible = "brcm,bcm2835-pixelvalve1"; ++ reg = <0x7e207000 0x100>; ++ status = "disabled"; ++ }; ++ + pwm: pwm@7e20c000 { + compatible = "brcm,bcm2835-pwm"; + reg = <0x7e20c000 0x28>; +@@ -227,6 +242,12 @@ + status = "disabled"; + }; + ++ hvs: hvs@7e400000 { ++ compatible = "brcm,bcm2835-hvs"; ++ reg = <0x7e400000 0x6000>; ++ status = "disabled"; ++ }; ++ + i2c1: i2c@7e804000 { + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e804000 0x1000>; +@@ -261,6 +282,25 @@ + status = "disabled"; + }; + ++ pixelvalve2: pixelvalve@7e807000 { ++ compatible = "brcm,bcm2835-pixelvalve2"; ++ reg = <0x7e807000 0x100>; ++ status = "disabled"; ++ }; ++ ++ hdmi: hdmi@7e902000 { ++ compatible = "brcm,bcm2835-hdmi"; ++ reg = <0x7e902000 0x600>, ++ <0x7e808000 0x100>; ++ ddc = <&i2c2>; ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; ++ clocks = <&cprman BCM2835_PLLH_PIX>, ++ <&cprman BCM2835_CLOCK_HSM>; ++ clock-names = "pixel", "hdmi"; ++ power-domains = <&power RPI_POWER_DOMAIN_HDMI>; ++ status = "disabled"; ++ }; ++ + usb: usb@7e980000 { + compatible = "brcm,bcm2708-usb"; + reg = <0x7e980000 0x10000>, +@@ -269,6 +309,12 @@ + <1 9>; + }; + ++ v3d: v3d@7ec00000 { ++ compatible = "brcm,vc4-v3d"; ++ reg = <0x7ec00000 0x1000>; ++ status = "disabled"; ++ }; ++ + firmware: firmware { + compatible = "raspberrypi,bcm2835-firmware"; + mboxes = <&mailbox>; +@@ -303,6 +349,11 @@ + firmware = <&firmware>; + }; + ++ gpu: gpu { ++ compatible = "brcm,bcm2835-vc4"; ++ status = "disabled"; ++ }; ++ + /* Onboard audio */ + audio: audio { + compatible = "brcm,bcm2835-audio"; +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index 547b2c723f347fece54aa28425d9dec8fc239855..a4ca2cabd4cd19d3a82ad1135604dfa52784fb3f 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -5,129 +5,125 @@ + /dts-v1/; + /plugin/; + +-#include "dt-bindings/clock/bcm2835.h" +-#include "dt-bindings/power/raspberrypi-power.h" +-#include "dt-bindings/gpio/gpio.h" +- + / { + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; + + fragment@0 { ++ target-path = "/chosen"; ++ __overlay__ { ++ bootargs = "cma=256M@256M"; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=192M@256M"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=128M@128M"; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=96M@128M"; ++ }; ++ }; ++ ++ fragment@4 { ++ target-path = "/chosen"; ++ __dormant__ { ++ bootargs = "cma=64M@64M"; ++ }; ++ }; ++ ++ fragment@5 { + target = <&i2c2>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@1 { ++ fragment@6 { + target = <&cprman>; + __overlay__ { + status = "okay"; + }; + }; + +- fragment@2 { ++ fragment@7 { + target = <&fb>; + __overlay__ { + status = "disabled"; + }; + }; + +- fragment@3 { +- target = <&soc>; ++ fragment@8 { ++ target = <&pixelvalve0>; + __overlay__ { +- #address-cells = <1>; +- #size-cells = <1>; +- +- pixelvalve@7e206000 { +- compatible = "brcm,bcm2835-pixelvalve0"; +- reg = <0x7e206000 0x100>; +- interrupts = <2 13>; /* pwa0 */ +- }; +- +- pixelvalve@7e207000 { +- compatible = "brcm,bcm2835-pixelvalve1"; +- reg = <0x7e207000 0x100>; +- interrupts = <2 14>; /* pwa1 */ +- }; +- +- hvs@7e400000 { +- compatible = "brcm,bcm2835-hvs"; +- reg = <0x7e400000 0x6000>; +- interrupts = <2 1>; +- }; +- +- pixelvalve@7e807000 { +- compatible = "brcm,bcm2835-pixelvalve2"; +- reg = <0x7e807000 0x100>; +- interrupts = <2 10>; /* pixelvalve */ +- }; +- +- hdmi@7e902000 { +- compatible = "brcm,bcm2835-hdmi"; +- reg = <0x7e902000 0x600>, +- <0x7e808000 0x100>; +- interrupts = <2 8>, <2 9>; +- ddc = <&i2c2>; +- hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; +- clocks = <&cprman BCM2835_PLLH_PIX>, +- <&cprman BCM2835_CLOCK_HSM>; +- clock-names = "pixel", "hdmi"; +- power-domains = <&power RPI_POWER_DOMAIN_HDMI>; +- }; +- +- v3d@7ec00000 { +- compatible = "brcm,vc4-v3d"; +- reg = <0x7ec00000 0x1000>; +- interrupts = <1 10>; +- }; +- +- gpu@7e4c0000 { +- compatible = "brcm,bcm2835-vc4"; +- }; ++ interrupts = <2 13>; /* pwa0 */ ++ status = "okay"; + }; + }; + +- fragment@4 { +- target-path = "/chosen"; +- __overlay__ { +- bootargs = "cma=256M@256M"; ++ fragment@9 { ++ target = <&pixelvalve1>; ++ __overlay__ { ++ interrupts = <2 14>; /* pwa1 */ ++ status = "okay"; + }; + }; + +- fragment@5 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=192M@256M"; ++ fragment@10 { ++ target = <&pixelvalve2>; ++ __overlay__ { ++ interrupts = <2 10>; /* pixelvalve */ ++ status = "okay"; + }; + }; + +- fragment@6 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=128M@128M"; ++ fragment@11 { ++ target = <&hvs>; ++ __overlay__ { ++ interrupts = <2 1>; ++ status = "okay"; + }; + }; + +- fragment@7 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=96M@128M"; ++ fragment@12 { ++ target = <&hdmi>; ++ __overlay__ { ++ interrupts = <2 8>, <2 9>; ++ status = "okay"; + }; + }; + +- fragment@8 { +- target-path = "/chosen"; +- __dormant__ { +- bootargs = "cma=64M@64M"; ++ fragment@13 { ++ target = <&v3d>; ++ __overlay__ { ++ interrupts = <1 10>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@14 { ++ target = <&gpu>; ++ __overlay__ { ++ status = "okay"; + }; + }; + + __overrides__ { +- cma-256 = <0>,"+4-5-6-7-8"; +- cma-192 = <0>,"-4+5-6-7-8"; +- cma-128 = <0>,"-4-5+6-7-8"; +- cma-96 = <0>,"-4-5-6+7-8"; +- cma-64 = <0>,"-4-5-6-7+8"; ++ cma-256 = <0>,"+0-1-2-3-4"; ++ cma-192 = <0>,"-0+1-2-3-4"; ++ cma-128 = <0>,"-0-1+2-3-4"; ++ cma-96 = <0>,"-0-1-2+3-4"; ++ cma-64 = <0>,"-0-1-2-3+4"; + }; + }; + +From e539649694b4dec6474ff50be79257b8d8193d0f Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 12:42:26 -0700 +Subject: [PATCH 323/398] BCM270X_DT: Set correct HDMI HPD GPIO levels for + various boards. + +The CM is left out, because I haven't found a source for how the CM's +HPD is connected. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 4 ++++ + arch/arm/boot/dts/bcm2708-rpi-b.dts | 4 ++++ + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 4 ++++ + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++++ + 4 files changed, 16 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index 0e9a22d147dd1ace4a7075c431ca13812716a00a..0ac7725224aea4f490c670316f0ab8e6e2eee966 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -116,6 +116,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; ++}; ++ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index a60342c3127cda9b426ec70e08007954af7d05d5..847483495a55f6e6567c81c10cf8023681478bcc 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -110,6 +110,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; ++}; ++ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index 9176d57fe40eaac7b123e8d0249fe93e5b73f755..5e23c04f453ddadb97d244089100f3ff857a2603 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -116,6 +116,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; ++}; ++ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index adba6824ebb46e481b492ce59d3bfc34b6669c7f..0979a27f05d97602ddbf550f7fe50cfaff14c151 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -161,6 +161,10 @@ + }; + }; + ++&hdmi { ++ hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; ++}; ++ + / { + chosen { + bootargs = "8250.nr_uarts=1"; + +From 07f42fbc4cd5974eff80c6412b6a4b6205f7886b Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 12:43:25 -0700 +Subject: [PATCH 324/398] Revert "drm/vc4: Force HDMI to connected." + +Now that we have the HDMI HPD GPIOs correctly identified in the DT, we +should be able to successfully detect HDMI. + +This reverts commit fbec01e2d17b924d91850e17eeecf975e74c9ebf. + +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index db6db77b70cb92f14dda2ebcabf77fa7e9fcceea..85224e542086c913975a86820104eca06d3917c2 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -166,8 +166,6 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + struct drm_device *dev = connector->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + +- return connector_status_connected; +- + if (vc4->hdmi->hpd_gpio) { + if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ + vc4->hdmi->hpd_active_low) + +From cf73ad5a12d0cad160f4dd84301ecc2f25ce2240 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 11 May 2016 15:38:04 +0100 +Subject: [PATCH 325/398] BCM270X_DT: Add umbrella I2C Mux overlay i2c-mux + +This overlay supports a range of I2C multiplexers - PCA9542 (2 ports), +PCA9545 (4 ports) and PCA9548 (8 ports). + +Also remove the dedicated i2c-mux-9548a overlays since it is no longer +needed. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 2 +- + arch/arm/boot/dts/overlays/README | 17 ++- + arch/arm/boot/dts/overlays/i2c-mux-overlay.dts | 138 +++++++++++++++++++++ + .../boot/dts/overlays/i2c-mux-pca9548a-overlay.dts | 67 ---------- + 4 files changed, 152 insertions(+), 72 deletions(-) + create mode 100644 arch/arm/boot/dts/overlays/i2c-mux-overlay.dts + delete mode 100644 arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 3758fa9992bde3d6e62a08919df388f9b6bbc6ae..3d8de479d0a5a1b08e2bcad3c47500f152d792d9 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -34,7 +34,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += i2c-mux-pca9548a.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-mux.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 78b2616399987df7ab8c07baa0842662f486d2b4..97dff3597a86212065c03a0a129a00d28b4c26e0 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -421,10 +421,19 @@ Params: i2c_gpio_sda GPIO used for I2C data (default "23") + (default "2" = ~100kHz) + + +-Name: i2c-mux-pca9548a +-Info: Adds support for an NXP PCA9548A I2C multiplexer on i2c_arm +-Load: dtoverlay=i2c-mux-pca9548a,= +-Params: addr I2C address of PCA9548A (default 0x70) ++Name: i2c-mux ++Info: Adds support for a number of I2C bus multiplexers on i2c_arm ++Load: dtoverlay=i2c-mux,= ++Params: pca9542 Select the NXP PCA9542 device ++ ++ pca9545 Select the NXP PCA9545 device ++ ++ pca9548 Select the NXP PCA9548 device ++ ++ addr Change I2C address of the device (default 0x70) ++ ++ ++[ The i2c-mux-pca9548a overlay has been deleted. See i2c-mux. ] + + + Name: i2c-pwm-pca9685a +diff --git a/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..28ea37fdb8eabfb5bbe86f16d47ed09b5ee16cf3 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +@@ -0,0 +1,138 @@ ++// Umbrella I2C Mux overlay ++ ++/dts-v1/; ++/plugin/; ++ ++/{ ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pca9542: mux@70 { ++ compatible = "nxp,pca9542"; ++ reg = <0x70>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ }; ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pca9545: mux@70 { ++ compatible = "nxp,pca9545"; ++ reg = <0x70>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ }; ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ }; ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pca9548: mux@70 { ++ compatible = "nxp,pca9548"; ++ reg = <0x70>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ }; ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ }; ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ }; ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ }; ++ i2c@4 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <4>; ++ }; ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ }; ++ i2c@6 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <6>; ++ }; ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ }; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ pca9542 = <0>, "+0"; ++ pca9545 = <0>, "+1"; ++ pca9548 = <0>, "+2"; ++ ++ addr = <&pca9545>,"reg:0", ++ <&pca9548>,"reg:0"; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts +deleted file mode 100644 +index 1729fd6f3c29b3c85996274ad92006453c6e4ce9..0000000000000000000000000000000000000000 +--- a/arch/arm/boot/dts/overlays/i2c-mux-pca9548a-overlay.dts ++++ /dev/null +@@ -1,67 +0,0 @@ +-// Definitions for NXP PCA9548A I2C mux on ARM I2C bus. +-/dts-v1/; +-/plugin/; +- +-/{ +- compatible = "brcm,bcm2708"; +- +- fragment@0 { +- target = <&i2c_arm>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- +- i2cmux: mux@70 { +- compatible = "nxp,pca9548"; +- reg = <0x70>; +- #address-cells = <1>; +- #size-cells = <0>; +- +- i2c@0 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <0>; +- }; +- i2c@1 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <1>; +- }; +- i2c@2 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <2>; +- }; +- i2c@3 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <3>; +- }; +- i2c@4 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <4>; +- }; +- i2c@5 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <5>; +- }; +- i2c@6 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <6>; +- }; +- i2c@7 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <7>; +- }; +- }; +- }; +- }; +- __overrides__ { +- addr = <&i2cmux>,"reg:0"; +- }; +-}; + +From 05ee832e0c901f6cc4df0f2845e5ab3e9032fa1d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 12 May 2016 08:52:06 +0100 +Subject: [PATCH 326/398] BCM270X_DT: Include address override for pca9542 + +Omitted from "BCM270X_DT: Add umbrella I2C Mux overlay i2c-mux". + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/i2c-mux-overlay.dts | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +index 28ea37fdb8eabfb5bbe86f16d47ed09b5ee16cf3..976d38e781539093e91fe641497d8a6701dd6035 100644 +--- a/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-mux-overlay.dts +@@ -132,7 +132,8 @@ + pca9545 = <0>, "+1"; + pca9548 = <0>, "+2"; + +- addr = <&pca9545>,"reg:0", ++ addr = <&pca9542>,"reg:0", ++ <&pca9545>,"reg:0", + <&pca9548>,"reg:0"; + }; + }; + +From 592f6b7d021787560786c9de1fc93126279868fd Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 12 May 2016 09:04:20 +0100 +Subject: [PATCH 327/398] BCM270X_DT: Fix the tinylcd35 overlay RTC support + +Now that overlay parameters are applied before the merge (a requirement +for kernel runtime overlays) it is illegal for parameters/overrides to +target nodes in the base DTB. Solve the problem of only enabling I2C +when an RTC option is used by making the RTC fragments conditional, +and including the required status="okay" within the fragments. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts +index 33c0651eac9b8b664a3001cb3ffff1acd184c96d..ed2b053aef23e0b1b34d8d3cb888b2b196758f59 100644 +--- a/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts ++++ b/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts +@@ -132,28 +132,32 @@ + + fragment@5 { + target = <&i2c1>; +- __overlay__ { ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + ++ status = "okay"; ++ + pcf8563: pcf8563@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; +- status = "disabled"; ++ status = "okay"; + }; + }; + }; + + fragment@6 { + target = <&i2c1>; +- __overlay__ { ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + ++ status = "okay"; ++ + ds1307: ds1307@68 { + compatible = "maxim,ds1307"; + reg = <0x68>; +- status = "disabled"; ++ status = "okay"; + }; + }; + }; +@@ -213,10 +217,8 @@ + <&tinylcd35_ts>,"interrupts:0", + <&tinylcd35_ts>,"pendown-gpio:4"; + xohms = <&tinylcd35_ts>,"ti,x-plate-ohms;0"; +- rtc-pcf = <&i2c1>,"status", +- <&pcf8563>,"status"; +- rtc-ds = <&i2c1>,"status", +- <&ds1307>,"status"; ++ rtc-pcf = <0>,"=5"; ++ rtc-ds = <0>,"=6"; + keypad = <&keypad>,"status"; + }; + }; + +From 004c1938573c74bdc433d941f29317028229978e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 11 May 2016 12:50:33 +0100 +Subject: [PATCH 328/398] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards + +Some SD cards have been found that corrupt data when small blocks +are erased. Add a quirk to indicate that ERASE should not be used, +and set it for cards of that type. + +Signed-off-by: Phil Elwell +--- + drivers/mmc/card/block.c | 7 +++++++ + drivers/mmc/core/core.c | 3 ++- + include/linux/mmc/card.h | 3 +++ + 3 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index c641c202fe7e4d5c0a7fbdba664ebe5f29d76ac7..d194a7d46be080b5d757246af9a02c0bb670c3ef 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -2552,6 +2552,13 @@ static const struct mmc_fixup blk_fixups[] = + MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc, + MMC_QUIRK_TRIM_BROKEN), + ++ /* ++ * On some Kingston SD cards, multiple erases of less than 64 ++ * sectors can cause corruption. ++ */ ++ MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk_mmc, ++ MMC_QUIRK_ERASE_BROKEN), ++ + END_FIXUP + }; + +diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c +index 5f7d10ba498a8b3183e620fcb5ce3873b969cb5f..19d1e14f3cfe89cbdebdd2c845ebd15320cbe600 100644 +--- a/drivers/mmc/core/core.c ++++ b/drivers/mmc/core/core.c +@@ -2253,7 +2253,8 @@ EXPORT_SYMBOL(mmc_erase); + int mmc_can_erase(struct mmc_card *card) + { + if ((card->host->caps & MMC_CAP_ERASE) && +- (card->csd.cmdclass & CCC_ERASE) && card->erase_size) ++ (card->csd.cmdclass & CCC_ERASE) && card->erase_size && ++ !(card->quirks & MMC_QUIRK_ERASE_BROKEN)) + return 1; + return 0; + } +diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h +index eb0151bac50c1fd796f479d017bc3c3d7017c9e9..fa4e6454456747f02a10621f4f4da3ac1a5be2c1 100644 +--- a/include/linux/mmc/card.h ++++ b/include/linux/mmc/card.h +@@ -281,6 +281,9 @@ struct mmc_card { + #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */ + + ++#define MMC_QUIRK_ERASE_BROKEN (1<<31) /* Skip erase */ ++ ++ + unsigned int erase_size; /* erase size in sectors */ + unsigned int erase_shift; /* if erase unit is power 2 */ + unsigned int pref_erase; /* in sectors */ + +From 5fe5ed68d4e94d9ec37d64f4955dc9a56faf2a92 Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Mon, 16 May 2016 21:36:31 +1000 +Subject: [PATCH 329/398] New AudioInjector.net Pi soundcard with low jitter + audio in and out. + +Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. +Adds the dts overlay and updates the Makefile and README. +Updates the relevant defconfig files to enable building for the Raspberry Pi. +Thanks to Phil Elwell (pelwell) for the review, simple-card concepts and discussion. Thanks to Clive Messer for overlay naming suggestions. +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 + + .../audioinjector-wm8731-audio-overlay.dts | 39 ++++++ + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + sound/soc/bcm/Kconfig | 7 + + sound/soc/bcm/Makefile | 3 + + sound/soc/bcm/audioinjector-pi-soundcard.c | 142 +++++++++++++++++++++ + 8 files changed, 200 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts + create mode 100644 sound/soc/bcm/audioinjector-pi-soundcard.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 3d8de479d0a5a1b08e2bcad3c47500f152d792d9..02acf884753c2f1fa7eb570ebe5ce7d7adcf8fb4 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -16,6 +16,7 @@ dtbo-$(RPI_DT_OVERLAYS) += adau1977-adc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo + dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += boomberry-digi.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 97dff3597a86212065c03a0a129a00d28b4c26e0..279802a1ec1e9262bc0d205de7c8ba16bd71625b 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -225,6 +225,12 @@ Params: interrupt GPIO used for INT (default 23) + arrays (0=+0pF, 15=+4.5pF, default 15) + + ++Name: audioinjector-wm8731-audio ++Info: Configures the audioinjector.net audio add on soundcard ++Load: dtoverlay=audioinjector-wm8731-audio ++Params: ++ ++ + Name: bmp085_i2c-sensor + Info: Configures the BMP085/BMP180 digital barometric pressure and temperature + sensors from Bosch Sensortec +diff --git a/arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts b/arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..4ed66577fa1d59e7b167ffdfd5a3f0de066cded2 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/audioinjector-wm8731-audio-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for audioinjector.net audio add on soundcard ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8731@1a { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8731"; ++ reg = <0x1a>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "ai,audioinjector-pi-soundcard"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 0bdc63180a149eaf51c199d727ba85cd74412e4a..666811f5ac56c4a059447be1139c536d34af1e56 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -862,6 +862,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 57393b5e216f80cddd11b119cc57aab7e56006b3..9ebfd0c96aeac64d78f3755301e8b2bcf63ce96c 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -854,6 +854,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m ++CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index c05e656eaa9684a64e2d0d5c41b599815d3c8840..30f8208371ee81896f68249ec442da76da35f21a 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -85,3 +85,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC + select SND_SOC_ADAU1977_I2C + help + Say Y or M if you want to add support for ADAU1977 ADC. ++ ++config SND_AUDIOINJECTOR_PI_SOUNDCARD ++ tristate "Support for audioinjector.net Pi add on soundcard" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_WM8731 ++ help ++ Say Y or M if you want to add support for audioinjector.net Pi Hat +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 7de2ef13a0d3c72c2a77921e69004ba4cbd5c02b..4af578211f4c5522a6b47245c4c7020977daf0b6 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -15,6 +15,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o + snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o + snd-soc-raspidac3-objs := raspidac3.o ++snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o + + obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o +@@ -27,3 +28,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o ++obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o ++ +diff --git a/sound/soc/bcm/audioinjector-pi-soundcard.c b/sound/soc/bcm/audioinjector-pi-soundcard.c +new file mode 100644 +index 0000000000000000000000000000000000000000..39f29e26897226a413b4fa0a11a9bc160a485281 +--- /dev/null ++++ b/sound/soc/bcm/audioinjector-pi-soundcard.c +@@ -0,0 +1,142 @@ ++/* ++ * ASoC Driver for AudioInjector Pi add on soundcard ++ * ++ * Created on: 13-May-2016 ++ * Author: flatmax@flatmax.org ++ * based on code by Cliff Cai for the ssm2602 machine blackfin. ++ * with help from Lars-Peter Clausen for simplifying the original code to use the dai_fmt field. ++ * i2s_node code taken from the other sound/soc/bcm machine drivers. ++ * ++ * Copyright (C) 2016 Flatmax Pty. Ltd. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "../codecs/wm8731.h" ++ ++static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_dapm_context *dapm = &rtd->card->dapm; ++ ++ // not connected ++ snd_soc_dapm_nc_pin(dapm, "Mic Bias"); ++ snd_soc_dapm_nc_pin(dapm, "MICIN"); ++ snd_soc_dapm_nc_pin(dapm, "RHPOUT"); ++ snd_soc_dapm_nc_pin(dapm, "LHPOUT"); ++ ++ return snd_soc_dai_set_sysclk(rtd->codec_dai, WM8731_SYSCLK_XTAL, 12000000, SND_SOC_CLOCK_IN); ++} ++ ++static struct snd_soc_dai_link audioinjector_pi_soundcard_dai[] = { ++ { ++ .name = "AudioInjector audio", ++ .stream_name = "AudioInjector audio", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8731-hifi", ++ .platform_name = "bcm2835-i2s.0", ++ .codec_name = "wm8731.1-001a", ++ .init = audioinjector_pi_soundcard_dai_init, ++ .dai_fmt = SND_SOC_DAIFMT_CBM_CFM|SND_SOC_DAIFMT_I2S|SND_SOC_DAIFMT_NB_NF, ++ }, ++}; ++ ++static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = { ++ SND_SOC_DAPM_SPK("Ext Spk", NULL), ++ SND_SOC_DAPM_LINE("Line In Jacks", NULL), ++}; ++ ++/* Corgi machine connections to the codec pins */ ++static const struct snd_soc_dapm_route audioinjector_audio_map[] = { ++ /* speaker connected to LOUT, ROUT */ ++ {"Ext Spk", NULL, "ROUT"}, ++ {"Ext Spk", NULL, "LOUT"}, ++ ++ /* line inputs */ ++ {"Line In Jacks", NULL, "Line Input"}, ++}; ++ ++static struct snd_soc_card snd_soc_audioinjector = { ++ .name = "audioinjector-pi-soundcard", ++ .dai_link = audioinjector_pi_soundcard_dai, ++ .num_links = 1, ++ ++ .dapm_widgets = wm8731_dapm_widgets, ++ .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), ++ .dapm_routes = audioinjector_audio_map, ++ .num_dapm_routes = ARRAY_SIZE(audioinjector_audio_map), ++}; ++ ++static int audioinjector_pi_soundcard_probe(struct platform_device *pdev) ++{ ++ struct snd_soc_card *card = &snd_soc_audioinjector; ++ int ret; ++ ++ card->dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct snd_soc_dai_link *dai = &audioinjector_pi_soundcard_dai[0]; ++ struct device_node *i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } else ++ if (!dai->cpu_of_node) { ++ dev_err(&pdev->dev, "Property 'i2s-controller' missing or invalid\n"); ++ return -EINVAL; ++ } ++ } ++ ++ if ((ret = snd_soc_register_card(card))) { ++ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); ++ } ++ return ret; ++} ++ ++static int audioinjector_pi_soundcard_remove(struct platform_device *pdev) ++{ ++ struct snd_soc_card *card = platform_get_drvdata(pdev); ++ return snd_soc_unregister_card(card); ++ ++} ++ ++static const struct of_device_id audioinjector_pi_soundcard_of_match[] = { ++ { .compatible = "ai,audioinjector-pi-soundcard", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, audioinjector_pi_soundcard_of_match); ++ ++static struct platform_driver audioinjector_pi_soundcard_driver = { ++ .driver = { ++ .name = "audioinjector-audio", ++ .owner = THIS_MODULE, ++ .of_match_table = audioinjector_pi_soundcard_of_match, ++ }, ++ .probe = audioinjector_pi_soundcard_probe, ++ .remove = audioinjector_pi_soundcard_remove, ++}; ++ ++module_platform_driver(audioinjector_pi_soundcard_driver); ++MODULE_AUTHOR("Matt Flax "); ++MODULE_DESCRIPTION("AudioInjector.net Pi Soundcard"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:audioinjector-pi-soundcard"); ++ + +From a3a625450271e9d63727b47b18d9e3085536f0b0 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 19 May 2016 14:40:28 +0100 +Subject: [PATCH 330/398] mmc: Apply QUIRK_BROKEN_ERASE to other capacities + +Signed-off-by: Phil Elwell +--- + drivers/mmc/card/block.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index d194a7d46be080b5d757246af9a02c0bb670c3ef..c6c381c3f14612182d0ccba8c3b44b1b37ff6e47 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -2558,6 +2558,10 @@ static const struct mmc_fixup blk_fixups[] = + */ + MMC_FIXUP("SD16G", 0x41, 0x3432, add_quirk_mmc, + MMC_QUIRK_ERASE_BROKEN), ++ MMC_FIXUP("SD32G", 0x41, 0x3432, add_quirk_mmc, ++ MMC_QUIRK_ERASE_BROKEN), ++ MMC_FIXUP("SD64G", 0x41, 0x3432, add_quirk_mmc, ++ MMC_QUIRK_ERASE_BROKEN), + + END_FIXUP + }; + +From 3b49f6ddef38d1336d8903ea58762a4f785ec929 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 19 May 2016 15:36:09 +0100 +Subject: [PATCH 331/398] brcmfmac: Plug memory leak in brcmf_fill_bss_param + +See: https://github.com/raspberrypi/linux/issues/1471 + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index 2bba94dbd86e0df03e99147f59ec224cf4221b3e..f6bf107851435470e775fb8eddab5f25b05af54e 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -2416,7 +2416,7 @@ static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) + WL_BSS_INFO_MAX); + if (err) { + brcmf_err("Failed to get bss info (%d)\n", err); +- return; ++ goto out_err; + } + si->filled |= BIT(NL80211_STA_INFO_BSS_PARAM); + si->bss_param.beacon_interval = le16_to_cpu(buf->bss_le.beacon_period); +@@ -2428,6 +2428,9 @@ static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) + si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE; + if (capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) + si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; ++ ++out_err: ++ kfree(buf); + } + + static s32 + +From 5f3415e397523fd001b37fca64a22b835df2bbcb Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 20 May 2016 10:11:43 +0100 +Subject: [PATCH 332/398] mmc: Add card_quirks module parameter, log quirks + +Use mmc_block.card_quirks to override the quirks for all SD or MMC +cards. The value is a bitfield using the bit positions defined in +include/linux/mmc/card.h. If the module parameter is placed in the +kernel command line (or bootargs) stored on the card then, assuming the +device only has one SD card interface, the override effectively becomes +card-specific. + +Signed-off-by: Phil Elwell +--- + drivers/mmc/card/block.c | 28 +++++++++++++++++++++++++--- + 1 file changed, 25 insertions(+), 3 deletions(-) + +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index c6c381c3f14612182d0ccba8c3b44b1b37ff6e47..74f5314fb87ad71923c84891d144dfa8ae272f24 100644 +--- a/drivers/mmc/card/block.c ++++ b/drivers/mmc/card/block.c +@@ -137,6 +137,13 @@ enum { + module_param(perdev_minors, int, 0444); + MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); + ++/* ++ * Allow quirks to be overridden for the current card ++ */ ++static char *card_quirks; ++module_param(card_quirks, charp, 0644); ++MODULE_PARM_DESC(card_quirks, "Force the use of the indicated quirks (a bitfield)"); ++ + static inline int mmc_blk_part_switch(struct mmc_card *card, + struct mmc_blk_data *md); + static int get_card_status(struct mmc_card *card, u32 *status, int retries); +@@ -2570,6 +2577,7 @@ static int mmc_blk_probe(struct mmc_card *card) + { + struct mmc_blk_data *md, *part_md; + char cap_str[10]; ++ char quirk_str[24]; + + /* + * Check that the card supports the command class(es) we need. +@@ -2577,7 +2585,16 @@ static int mmc_blk_probe(struct mmc_card *card) + if (!(card->csd.cmdclass & CCC_BLOCK_READ)) + return -ENODEV; + +- mmc_fixup_device(card, blk_fixups); ++ if (card_quirks) { ++ unsigned long quirks; ++ if (kstrtoul(card_quirks, 0, &quirks) == 0) ++ card->quirks = (unsigned int)quirks; ++ else ++ pr_err("mmc_block: Invalid card_quirks parameter '%s'\n", ++ card_quirks); ++ } ++ else ++ mmc_fixup_device(card, blk_fixups); + + md = mmc_blk_alloc(card); + if (IS_ERR(md)) +@@ -2585,9 +2602,14 @@ static int mmc_blk_probe(struct mmc_card *card) + + string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, + cap_str, sizeof(cap_str)); +- pr_info("%s: %s %s %s %s\n", ++ if (card->quirks) ++ snprintf(quirk_str, sizeof(quirk_str), ++ " (quirks 0x%08x)", card->quirks); ++ else ++ quirk_str[0] = '\0'; ++ pr_info("%s: %s %s %s%s%s\n", + md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), +- cap_str, md->read_only ? "(ro)" : ""); ++ cap_str, md->read_only ? " (ro)" : "", quirk_str); + + if (mmc_blk_alloc_parts(card, md)) + goto out; + +From 55622121181ea7c65f356beb0a569612f1d5754f Mon Sep 17 00:00:00 2001 +From: Nicolas Boullis +Date: Sun, 10 Apr 2016 13:23:05 +0200 +Subject: [PATCH 333/398] rtc: ds1307: ensure that any pending alarm is cleared + before a new alarm is enabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If a previously-set alarm was disabled and then triggered, it may still +be pending when a new alarm is configured. + +Then, if the alarm is enabled before the pending alarm is cleared, then +an interrupt is immediately raised. + +Unfortunately, when the alarm is cleared and enabled during the same I²C +block write, the chip (at least the DS1339 I have) considers that the +alarm is enabled before it is cleared, and raises an interrupt. + +This patch ensures that the pending alarm is cleared before the alarm is +enabled. + +Signed-off-by: Nicolas Boullis +Signed-off-by: Alexandre Belloni +--- + drivers/rtc/rtc-ds1307.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c +index 28ca4bfaa8db0094e63acf6c9c2dbfc96abd445c..0abd5154955b88c6b62fb52924480f832a79bb48 100644 +--- a/drivers/rtc/rtc-ds1307.c ++++ b/drivers/rtc/rtc-ds1307.c +@@ -540,12 +540,8 @@ static int ds1337_set_alarm(struct device *dev, struct rtc_wkalrm *t) + buf[5] = 0; + buf[6] = 0; + +- /* optionally enable ALARM1 */ ++ /* disable alarms */ + buf[7] = control & ~(DS1337_BIT_A1IE | DS1337_BIT_A2IE); +- if (t->enabled) { +- dev_dbg(dev, "alarm IRQ armed\n"); +- buf[7] |= DS1337_BIT_A1IE; /* only ALARM1 is used */ +- } + buf[8] = status & ~(DS1337_BIT_A1I | DS1337_BIT_A2I); + + ret = ds1307->write_block_data(client, +@@ -555,6 +551,13 @@ static int ds1337_set_alarm(struct device *dev, struct rtc_wkalrm *t) + return ret; + } + ++ /* optionally enable ALARM1 */ ++ if (t->enabled) { ++ dev_dbg(dev, "alarm IRQ armed\n"); ++ buf[7] |= DS1337_BIT_A1IE; /* only ALARM1 is used */ ++ i2c_smbus_write_byte_data(client, DS1337_REG_CONTROL, buf[7]); ++ } ++ + return 0; + } + + +From b8b0224274b010918a551d89543ca0b7d2d96bb7 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 12:59:27 -0700 +Subject: [PATCH 334/398] BCM270X: Include DRM_PANEL_SIMPLE in the defconfigs. + +This is going to be required for the Adafruit DPI panel support. + +Signed-off-by: Eric Anholt +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 666811f5ac56c4a059447be1139c536d34af1e56..87023c7eacbdb9460492c22a89365aa5068d58c9 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -817,6 +817,7 @@ CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m + CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m ++CONFIG_DRM_PANEL_SIMPLE=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + CONFIG_FB_BCM2708=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 9ebfd0c96aeac64d78f3755301e8b2bcf63ce96c..edb049cbcf3a7f3ff19f2f7d02602f89225b6ec3 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -809,6 +809,7 @@ CONFIG_VIDEO_MT9V011=m + CONFIG_DRM=m + CONFIG_DRM_LOAD_EDID_FIRMWARE=y + CONFIG_DRM_UDL=m ++CONFIG_DRM_PANEL_SIMPLE=m + CONFIG_DRM_VC4=m + CONFIG_FB=y + CONFIG_FB_BCM2708=y + +From 957f3123c15c6cfa6d85b76fcb47893147c9c532 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 18 Mar 2016 12:34:59 -0700 +Subject: [PATCH 335/398] drm: Add an encoder and connector type enum for DPI. + +Right now exynos is exposing DPI as a TMDS encoder and VGA connector, +which seems rather misleading. This isn't just an internal detail, +since xrandr actually exposes "VGA" as the output name. Define some +new enums so that vc4's DPI can have a more informative name. + +I considered other names for the connector as well. For VC4, the +Adafruit DPI kippah takes the 28 GPIO pins and routes them to a +standard-ish 40-pin FPC connector, but "40-pin FPC" doesn't uniquely +identify an ordering of pins (apparently some other orderings exist), +doesn't explain things as well for the user (who, if anything, knows +their product is a DPI kippah/panel combo), and actually doesn't have +to exist (one could connect the 28 GPIOs directly to something else). +Simply "DPI" seems like a good compromise name to distinguish from the +HDMI, DSI, and TV connectors . + +Signed-off-by: Eric Anholt +Reviewed-by: Daniel Vetter +(cherry picked from commit 0b27c02a7f1c697694f2ad6d6517e7dbf9ecfa39) +--- + drivers/gpu/drm/drm_crtc.c | 2 ++ + include/uapi/drm/drm_mode.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c +index 24c5434abd1c44e1040676220b84002fdce74ee9..e741af195863d08e661f0c3010df2a66e74978c1 100644 +--- a/drivers/gpu/drm/drm_crtc.c ++++ b/drivers/gpu/drm/drm_crtc.c +@@ -168,6 +168,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = { + { DRM_MODE_CONNECTOR_eDP, "eDP" }, + { DRM_MODE_CONNECTOR_VIRTUAL, "Virtual" }, + { DRM_MODE_CONNECTOR_DSI, "DSI" }, ++ { DRM_MODE_CONNECTOR_DPI, "DPI" }, + }; + + static const struct drm_prop_enum_list drm_encoder_enum_list[] = { +@@ -179,6 +180,7 @@ static const struct drm_prop_enum_list drm_encoder_enum_list[] = { + { DRM_MODE_ENCODER_VIRTUAL, "Virtual" }, + { DRM_MODE_ENCODER_DSI, "DSI" }, + { DRM_MODE_ENCODER_DPMST, "DP MST" }, ++ { DRM_MODE_ENCODER_DPI, "DPI" }, + }; + + static const struct drm_prop_enum_list drm_subpixel_enum_list[] = { +diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h +index 6c11ca401de8b4f4400478f500352ddd48380644..325e9eb3d812c7d2b526f33f4e71023f9b4f112d 100644 +--- a/include/uapi/drm/drm_mode.h ++++ b/include/uapi/drm/drm_mode.h +@@ -202,6 +202,7 @@ struct drm_mode_get_plane_res { + #define DRM_MODE_ENCODER_VIRTUAL 5 + #define DRM_MODE_ENCODER_DSI 6 + #define DRM_MODE_ENCODER_DPMST 7 ++#define DRM_MODE_ENCODER_DPI 8 + + struct drm_mode_get_encoder { + __u32 encoder_id; +@@ -241,6 +242,7 @@ struct drm_mode_get_encoder { + #define DRM_MODE_CONNECTOR_eDP 14 + #define DRM_MODE_CONNECTOR_VIRTUAL 15 + #define DRM_MODE_CONNECTOR_DSI 16 ++#define DRM_MODE_CONNECTOR_DPI 17 + + struct drm_mode_get_connector { + + +From 48da666e18fe89a6ad22a429943f3d912d9620bf Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 4 Mar 2016 12:32:06 -0800 +Subject: [PATCH 336/398] dt-bindings: Add binding docs for V3D. + +This was missed in the upstreaming process. + +Signed-off-by: Eric Anholt +Acked-by: Stephen Warren +(cherry picked from commit 4653f22e9ab08b2b7178b7262a9326eb777e0266) +--- + Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +index 56a961aa50613054ff4354b2ebfa86fd3503bfa1..9f97df4d51524bf55beff1f3e3eaace0b8e61637 100644 +--- a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt ++++ b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +@@ -35,6 +35,12 @@ Optional properties for HDMI: + as an interrupt/status bit in the HDMI controller + itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt + ++Required properties for V3D: ++- compatible: Should be "brcm,bcm2835-v3d" ++- reg: Physical base address and length of the V3D's registers ++- interrupts: The interrupt number ++ See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt ++ + Example: + pixelvalve@7e807000 { + compatible = "brcm,bcm2835-pixelvalve2"; +@@ -60,6 +66,12 @@ hdmi: hdmi@7e902000 { + clock-names = "pixel", "hdmi"; + }; + ++v3d: v3d@7ec00000 { ++ compatible = "brcm,bcm2835-v3d"; ++ reg = <0x7ec00000 0x1000>; ++ interrupts = <1 10>; ++}; ++ + vc4: gpu { + compatible = "brcm,bcm2835-vc4"; + }; + +From 777500e897bca33053b77d3df27354f3ca7fa822 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 10 Feb 2016 11:42:32 -0800 +Subject: [PATCH 337/398] drm/vc4: Add DPI driver + +The DPI interface involves taking a ton of our GPIOs to be used as +outputs, and routing display signals over them in parallel. + +v2: Use display_info.bus_formats[] to replace our custom DT + properties. +v3: Rebase on V3D documentation changes. +v4: Fix rebase detritus from V3D documentation changes. + +Signed-off-by: Eric Anholt +Acked-by: Rob Herring +(cherry picked from commit 08302c35b59d306ff37b996e56fb2a488c1d2c2e) +--- + .../devicetree/bindings/display/brcm,bcm-vc4.txt | 36 ++ + drivers/gpu/drm/vc4/Kconfig | 1 + + drivers/gpu/drm/vc4/Makefile | 1 + + drivers/gpu/drm/vc4/vc4_debugfs.c | 1 + + drivers/gpu/drm/vc4/vc4_dpi.c | 520 +++++++++++++++++++++ + drivers/gpu/drm/vc4/vc4_drv.c | 1 + + drivers/gpu/drm/vc4/vc4_drv.h | 5 + + 7 files changed, 565 insertions(+) + create mode 100644 drivers/gpu/drm/vc4/vc4_dpi.c + +diff --git a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +index 9f97df4d51524bf55beff1f3e3eaace0b8e61637..a5ea451e67fcfe8cf08b94aab409fe05d5095c24 100644 +--- a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt ++++ b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt +@@ -35,12 +35,22 @@ Optional properties for HDMI: + as an interrupt/status bit in the HDMI controller + itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt + ++Required properties for DPI: ++- compatible: Should be "brcm,bcm2835-dpi" ++- reg: Physical base address and length of the registers ++- clocks: a) core: The core clock the unit runs on ++ b) pixel: The pixel clock that feeds the pixelvalve ++- port: Port node with a single endpoint connecting to the panel ++ device, as defined in [1] ++ + Required properties for V3D: + - compatible: Should be "brcm,bcm2835-v3d" + - reg: Physical base address and length of the V3D's registers + - interrupts: The interrupt number + See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt + ++[1] Documentation/devicetree/bindings/media/video-interfaces.txt ++ + Example: + pixelvalve@7e807000 { + compatible = "brcm,bcm2835-pixelvalve2"; +@@ -66,6 +76,22 @@ hdmi: hdmi@7e902000 { + clock-names = "pixel", "hdmi"; + }; + ++dpi: dpi@7e208000 { ++ compatible = "brcm,bcm2835-dpi"; ++ reg = <0x7e208000 0x8c>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>, ++ <&clocks BCM2835_CLOCK_DPI>; ++ clock-names = "core", "pixel"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port { ++ dpi_out: endpoint@0 { ++ remote-endpoint = <&panel_in>; ++ }; ++ }; ++}; ++ + v3d: v3d@7ec00000 { + compatible = "brcm,bcm2835-v3d"; + reg = <0x7ec00000 0x1000>; +@@ -75,3 +101,13 @@ v3d: v3d@7ec00000 { + vc4: gpu { + compatible = "brcm,bcm2835-vc4"; + }; ++ ++panel: panel { ++ compatible = "ontat,yx700wv03", "simple-panel"; ++ ++ port { ++ panel_in: endpoint { ++ remote-endpoint = <&dpi_out>; ++ }; ++ }; ++}; +diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig +index 71f019f603da21f66453518a02c224e2ed722ed7..33aa7f5ecb6a5dd746adb2f6b65ccff98a3ec032 100644 +--- a/drivers/gpu/drm/vc4/Kconfig ++++ b/drivers/gpu/drm/vc4/Kconfig +@@ -5,6 +5,7 @@ config DRM_VC4 + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER ++ select DRM_PANEL + help + Choose this option if you have a system that has a Broadcom + VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835. +diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile +index 4c6a99f0398c03ce5d83dea1ec3f7906a817bf89..fb77db755e0a29d8589860da82186c7a1f394c72 100644 +--- a/drivers/gpu/drm/vc4/Makefile ++++ b/drivers/gpu/drm/vc4/Makefile +@@ -7,6 +7,7 @@ vc4-y := \ + vc4_bo.o \ + vc4_crtc.o \ + vc4_drv.o \ ++ vc4_dpi.o \ + vc4_kms.o \ + vc4_gem.o \ + vc4_hdmi.o \ +diff --git a/drivers/gpu/drm/vc4/vc4_debugfs.c b/drivers/gpu/drm/vc4/vc4_debugfs.c +index a99aa8676af774977778edfa2604b6b9df31a4dc..94f2154c3685255e2e67d225f77dea372eae371a 100644 +--- a/drivers/gpu/drm/vc4/vc4_debugfs.c ++++ b/drivers/gpu/drm/vc4/vc4_debugfs.c +@@ -17,6 +17,7 @@ + + static const struct drm_info_list vc4_debugfs_list[] = { + {"bo_stats", vc4_bo_stats_debugfs, 0}, ++ {"dpi_regs", vc4_dpi_debugfs_regs, 0}, + {"gem_exec", vc4_gem_exec_debugfs, 0}, + {"hdmi_regs", vc4_hdmi_debugfs_regs, 0}, + {"hvs_regs", vc4_hvs_debugfs_regs, 0}, +diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c +new file mode 100644 +index 0000000000000000000000000000000000000000..86e4e52d06c04987c58b78bb09ad0f6fc0498339 +--- /dev/null ++++ b/drivers/gpu/drm/vc4/vc4_dpi.c +@@ -0,0 +1,520 @@ ++/* ++ * Copyright (C) 2016 Broadcom Limited ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see . ++ */ ++ ++/** ++ * DOC: VC4 DPI module ++ * ++ * The VC4 DPI hardware supports MIPI DPI type 4 and Nokia ViSSI ++ * signals, which are routed out to GPIO0-27 with the ALT2 function. ++ */ ++ ++#include "drm_atomic_helper.h" ++#include "drm_crtc_helper.h" ++#include "drm_edid.h" ++#include "drm_panel.h" ++#include "linux/clk.h" ++#include "linux/component.h" ++#include "linux/of_graph.h" ++#include "linux/of_platform.h" ++#include "vc4_drv.h" ++#include "vc4_regs.h" ++ ++#define DPI_C 0x00 ++# define DPI_OUTPUT_ENABLE_MODE BIT(16) ++ ++/* The order field takes the incoming 24 bit RGB from the pixel valve ++ * and shuffles the 3 channels. ++ */ ++# define DPI_ORDER_MASK VC4_MASK(15, 14) ++# define DPI_ORDER_SHIFT 14 ++# define DPI_ORDER_RGB 0 ++# define DPI_ORDER_BGR 1 ++# define DPI_ORDER_GRB 2 ++# define DPI_ORDER_BRG 3 ++ ++/* The format field takes the ORDER-shuffled pixel valve data and ++ * formats it onto the output lines. ++ */ ++# define DPI_FORMAT_MASK VC4_MASK(13, 11) ++# define DPI_FORMAT_SHIFT 11 ++/* This define is named in the hardware, but actually just outputs 0. */ ++# define DPI_FORMAT_9BIT_666_RGB 0 ++/* Outputs 00000000rrrrrggggggbbbbb */ ++# define DPI_FORMAT_16BIT_565_RGB_1 1 ++/* Outputs 000rrrrr00gggggg000bbbbb */ ++# define DPI_FORMAT_16BIT_565_RGB_2 2 ++/* Outputs 00rrrrr000gggggg00bbbbb0 */ ++# define DPI_FORMAT_16BIT_565_RGB_3 3 ++/* Outputs 000000rrrrrrggggggbbbbbb */ ++# define DPI_FORMAT_18BIT_666_RGB_1 4 ++/* Outputs 00rrrrrr00gggggg00bbbbbb */ ++# define DPI_FORMAT_18BIT_666_RGB_2 5 ++/* Outputs rrrrrrrrggggggggbbbbbbbb */ ++# define DPI_FORMAT_24BIT_888_RGB 6 ++ ++/* Reverses the polarity of the corresponding signal */ ++# define DPI_PIXEL_CLK_INVERT BIT(10) ++# define DPI_HSYNC_INVERT BIT(9) ++# define DPI_VSYNC_INVERT BIT(8) ++# define DPI_OUTPUT_ENABLE_INVERT BIT(7) ++ ++/* Outputs the signal the falling clock edge instead of rising. */ ++# define DPI_HSYNC_NEGATE BIT(6) ++# define DPI_VSYNC_NEGATE BIT(5) ++# define DPI_OUTPUT_ENABLE_NEGATE BIT(4) ++ ++/* Disables the signal */ ++# define DPI_HSYNC_DISABLE BIT(3) ++# define DPI_VSYNC_DISABLE BIT(2) ++# define DPI_OUTPUT_ENABLE_DISABLE BIT(1) ++ ++/* Power gate to the device, full reset at 0 -> 1 transition */ ++# define DPI_ENABLE BIT(0) ++ ++/* All other registers besides DPI_C return the ID */ ++#define DPI_ID 0x04 ++# define DPI_ID_VALUE 0x00647069 ++ ++/* General DPI hardware state. */ ++struct vc4_dpi { ++ struct platform_device *pdev; ++ ++ struct drm_encoder *encoder; ++ struct drm_connector *connector; ++ struct drm_panel *panel; ++ ++ void __iomem *regs; ++ ++ struct clk *pixel_clock; ++ struct clk *core_clock; ++}; ++ ++#define DPI_READ(offset) readl(dpi->regs + (offset)) ++#define DPI_WRITE(offset, val) writel(val, dpi->regs + (offset)) ++ ++/* VC4 DPI encoder KMS struct */ ++struct vc4_dpi_encoder { ++ struct vc4_encoder base; ++ struct vc4_dpi *dpi; ++}; ++ ++static inline struct vc4_dpi_encoder * ++to_vc4_dpi_encoder(struct drm_encoder *encoder) ++{ ++ return container_of(encoder, struct vc4_dpi_encoder, base.base); ++} ++ ++/* VC4 DPI connector KMS struct */ ++struct vc4_dpi_connector { ++ struct drm_connector base; ++ struct vc4_dpi *dpi; ++ ++ /* Since the connector is attached to just the one encoder, ++ * this is the reference to it so we can do the best_encoder() ++ * hook. ++ */ ++ struct drm_encoder *encoder; ++}; ++ ++static inline struct vc4_dpi_connector * ++to_vc4_dpi_connector(struct drm_connector *connector) ++{ ++ return container_of(connector, struct vc4_dpi_connector, base); ++} ++ ++#define DPI_REG(reg) { reg, #reg } ++static const struct { ++ u32 reg; ++ const char *name; ++} dpi_regs[] = { ++ DPI_REG(DPI_C), ++ DPI_REG(DPI_ID), ++}; ++ ++static void vc4_dpi_dump_regs(struct vc4_dpi *dpi) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(dpi_regs); i++) { ++ DRM_INFO("0x%04x (%s): 0x%08x\n", ++ dpi_regs[i].reg, dpi_regs[i].name, ++ DPI_READ(dpi_regs[i].reg)); ++ } ++} ++ ++#ifdef CONFIG_DEBUG_FS ++int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused) ++{ ++ struct drm_info_node *node = (struct drm_info_node *)m->private; ++ struct drm_device *dev = node->minor->dev; ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_dpi *dpi = vc4->dpi; ++ int i; ++ ++ if (!dpi) ++ return 0; ++ ++ for (i = 0; i < ARRAY_SIZE(dpi_regs); i++) { ++ seq_printf(m, "%s (0x%04x): 0x%08x\n", ++ dpi_regs[i].name, dpi_regs[i].reg, ++ DPI_READ(dpi_regs[i].reg)); ++ } ++ ++ return 0; ++} ++#endif ++ ++static enum drm_connector_status ++vc4_dpi_connector_detect(struct drm_connector *connector, bool force) ++{ ++ struct vc4_dpi_connector *vc4_connector = ++ to_vc4_dpi_connector(connector); ++ struct vc4_dpi *dpi = vc4_connector->dpi; ++ ++ if (dpi->panel) ++ return connector_status_connected; ++ else ++ return connector_status_disconnected; ++} ++ ++static void vc4_dpi_connector_destroy(struct drm_connector *connector) ++{ ++ drm_connector_unregister(connector); ++ drm_connector_cleanup(connector); ++} ++ ++static int vc4_dpi_connector_get_modes(struct drm_connector *connector) ++{ ++ struct vc4_dpi_connector *vc4_connector = ++ to_vc4_dpi_connector(connector); ++ struct vc4_dpi *dpi = vc4_connector->dpi; ++ ++ if (dpi->panel) ++ return drm_panel_get_modes(dpi->panel); ++ ++ return 0; ++} ++ ++static struct drm_encoder * ++vc4_dpi_connector_best_encoder(struct drm_connector *connector) ++{ ++ struct vc4_dpi_connector *dpi_connector = ++ to_vc4_dpi_connector(connector); ++ return dpi_connector->encoder; ++} ++ ++static const struct drm_connector_funcs vc4_dpi_connector_funcs = { ++ .dpms = drm_atomic_helper_connector_dpms, ++ .detect = vc4_dpi_connector_detect, ++ .fill_modes = drm_helper_probe_single_connector_modes, ++ .destroy = vc4_dpi_connector_destroy, ++ .reset = drm_atomic_helper_connector_reset, ++ .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, ++ .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, ++}; ++ ++static const struct drm_connector_helper_funcs vc4_dpi_connector_helper_funcs = { ++ .get_modes = vc4_dpi_connector_get_modes, ++ .best_encoder = vc4_dpi_connector_best_encoder, ++}; ++ ++static struct drm_connector *vc4_dpi_connector_init(struct drm_device *dev, ++ struct vc4_dpi *dpi) ++{ ++ struct drm_connector *connector = NULL; ++ struct vc4_dpi_connector *dpi_connector; ++ int ret = 0; ++ ++ dpi_connector = devm_kzalloc(dev->dev, sizeof(*dpi_connector), ++ GFP_KERNEL); ++ if (!dpi_connector) { ++ ret = -ENOMEM; ++ goto fail; ++ } ++ connector = &dpi_connector->base; ++ ++ dpi_connector->encoder = dpi->encoder; ++ dpi_connector->dpi = dpi; ++ ++ drm_connector_init(dev, connector, &vc4_dpi_connector_funcs, ++ DRM_MODE_CONNECTOR_DPI); ++ drm_connector_helper_add(connector, &vc4_dpi_connector_helper_funcs); ++ ++ connector->polled = 0; ++ connector->interlace_allowed = 0; ++ connector->doublescan_allowed = 0; ++ ++ drm_mode_connector_attach_encoder(connector, dpi->encoder); ++ ++ return connector; ++ ++ fail: ++ if (connector) ++ vc4_dpi_connector_destroy(connector); ++ ++ return ERR_PTR(ret); ++} ++ ++static const struct drm_encoder_funcs vc4_dpi_encoder_funcs = { ++ .destroy = drm_encoder_cleanup, ++}; ++ ++static void vc4_dpi_encoder_disable(struct drm_encoder *encoder) ++{ ++ struct vc4_dpi_encoder *vc4_encoder = to_vc4_dpi_encoder(encoder); ++ struct vc4_dpi *dpi = vc4_encoder->dpi; ++ ++ drm_panel_disable(dpi->panel); ++ ++ clk_disable_unprepare(dpi->pixel_clock); ++ ++ drm_panel_unprepare(dpi->panel); ++} ++ ++static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) ++{ ++ struct drm_display_mode *mode = &encoder->crtc->mode; ++ struct vc4_dpi_encoder *vc4_encoder = to_vc4_dpi_encoder(encoder); ++ struct vc4_dpi *dpi = vc4_encoder->dpi; ++ u32 dpi_c = DPI_ENABLE | DPI_OUTPUT_ENABLE_MODE; ++ int ret; ++ ++ ret = drm_panel_prepare(dpi->panel); ++ if (ret) { ++ DRM_ERROR("Panel failed to prepare\n"); ++ return; ++ } ++ ++ if (dpi->connector->display_info.num_bus_formats) { ++ u32 bus_format = dpi->connector->display_info.bus_formats[0]; ++ ++ switch (bus_format) { ++ case MEDIA_BUS_FMT_RGB888_1X24: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_24BIT_888_RGB, ++ DPI_FORMAT); ++ break; ++ case MEDIA_BUS_FMT_BGR888_1X24: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_24BIT_888_RGB, ++ DPI_FORMAT); ++ dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER); ++ break; ++ case MEDIA_BUS_FMT_RGB666_1X24_CPADHI: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_2, ++ DPI_FORMAT); ++ break; ++ case MEDIA_BUS_FMT_RGB666_1X18: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1, ++ DPI_FORMAT); ++ break; ++ case MEDIA_BUS_FMT_RGB565_1X16: ++ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3, ++ DPI_FORMAT); ++ break; ++ default: ++ DRM_ERROR("Unknown media bus format %d\n", bus_format); ++ break; ++ } ++ } ++ ++ if (mode->flags & DRM_MODE_FLAG_NHSYNC) ++ dpi_c |= DPI_HSYNC_INVERT; ++ else if (!(mode->flags & DRM_MODE_FLAG_PHSYNC)) ++ dpi_c |= DPI_HSYNC_DISABLE; ++ ++ if (mode->flags & DRM_MODE_FLAG_NVSYNC) ++ dpi_c |= DPI_VSYNC_INVERT; ++ else if (!(mode->flags & DRM_MODE_FLAG_PVSYNC)) ++ dpi_c |= DPI_VSYNC_DISABLE; ++ ++ DPI_WRITE(DPI_C, dpi_c); ++ ++ ret = clk_set_rate(dpi->pixel_clock, mode->clock * 1000); ++ if (ret) ++ DRM_ERROR("Failed to set clock rate: %d\n", ret); ++ ++ ret = clk_prepare_enable(dpi->pixel_clock); ++ if (ret) ++ DRM_ERROR("Failed to set clock rate: %d\n", ret); ++ ++ ret = drm_panel_enable(dpi->panel); ++ if (ret) { ++ DRM_ERROR("Panel failed to enable\n"); ++ drm_panel_unprepare(dpi->panel); ++ return; ++ } ++} ++ ++static const struct drm_encoder_helper_funcs vc4_dpi_encoder_helper_funcs = { ++ .disable = vc4_dpi_encoder_disable, ++ .enable = vc4_dpi_encoder_enable, ++}; ++ ++static const struct of_device_id vc4_dpi_dt_match[] = { ++ { .compatible = "brcm,bcm2835-dpi", .data = NULL }, ++ {} ++}; ++ ++/* Walks the OF graph to find the panel node and then asks DRM to look ++ * up the panel. ++ */ ++static struct drm_panel *vc4_dpi_get_panel(struct device *dev) ++{ ++ struct device_node *endpoint, *panel_node; ++ struct device_node *np = dev->of_node; ++ struct drm_panel *panel; ++ ++ endpoint = of_graph_get_next_endpoint(np, NULL); ++ if (!endpoint) { ++ dev_err(dev, "no endpoint to fetch DPI panel\n"); ++ return NULL; ++ } ++ ++ /* don't proceed if we have an endpoint but no panel_node tied to it */ ++ panel_node = of_graph_get_remote_port_parent(endpoint); ++ of_node_put(endpoint); ++ if (!panel_node) { ++ dev_err(dev, "no valid panel node\n"); ++ return NULL; ++ } ++ ++ panel = of_drm_find_panel(panel_node); ++ of_node_put(panel_node); ++ ++ return panel; ++} ++ ++static int vc4_dpi_bind(struct device *dev, struct device *master, void *data) ++{ ++ struct platform_device *pdev = to_platform_device(dev); ++ struct drm_device *drm = dev_get_drvdata(master); ++ struct vc4_dev *vc4 = to_vc4_dev(drm); ++ struct vc4_dpi *dpi; ++ struct vc4_dpi_encoder *vc4_dpi_encoder; ++ int ret; ++ ++ dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL); ++ if (!dpi) ++ return -ENOMEM; ++ ++ vc4_dpi_encoder = devm_kzalloc(dev, sizeof(*vc4_dpi_encoder), ++ GFP_KERNEL); ++ if (!vc4_dpi_encoder) ++ return -ENOMEM; ++ vc4_dpi_encoder->base.type = VC4_ENCODER_TYPE_DPI; ++ vc4_dpi_encoder->dpi = dpi; ++ dpi->encoder = &vc4_dpi_encoder->base.base; ++ ++ dpi->pdev = pdev; ++ dpi->regs = vc4_ioremap_regs(pdev, 0); ++ if (IS_ERR(dpi->regs)) ++ return PTR_ERR(dpi->regs); ++ ++ vc4_dpi_dump_regs(dpi); ++ ++ if (DPI_READ(DPI_ID) != DPI_ID_VALUE) { ++ dev_err(dev, "Port returned 0x%08x for ID instead of 0x%08x\n", ++ DPI_READ(DPI_ID), DPI_ID_VALUE); ++ return -ENODEV; ++ } ++ ++ dpi->core_clock = devm_clk_get(dev, "core"); ++ if (IS_ERR(dpi->core_clock)) { ++ ret = PTR_ERR(dpi->core_clock); ++ if (ret != -EPROBE_DEFER) ++ DRM_ERROR("Failed to get core clock: %d\n", ret); ++ return ret; ++ } ++ dpi->pixel_clock = devm_clk_get(dev, "pixel"); ++ if (IS_ERR(dpi->pixel_clock)) { ++ ret = PTR_ERR(dpi->pixel_clock); ++ if (ret != -EPROBE_DEFER) ++ DRM_ERROR("Failed to get pixel clock: %d\n", ret); ++ return ret; ++ } ++ ++ ret = clk_prepare_enable(dpi->core_clock); ++ if (ret) ++ DRM_ERROR("Failed to turn on core clock: %d\n", ret); ++ ++ dpi->panel = vc4_dpi_get_panel(dev); ++ ++ drm_encoder_init(drm, dpi->encoder, &vc4_dpi_encoder_funcs, ++ DRM_MODE_ENCODER_DPI); ++ drm_encoder_helper_add(dpi->encoder, &vc4_dpi_encoder_helper_funcs); ++ ++ dpi->connector = vc4_dpi_connector_init(drm, dpi); ++ if (IS_ERR(dpi->connector)) { ++ ret = PTR_ERR(dpi->connector); ++ goto err_destroy_encoder; ++ } ++ ++ if (dpi->panel) ++ drm_panel_attach(dpi->panel, dpi->connector); ++ ++ dev_set_drvdata(dev, dpi); ++ ++ vc4->dpi = dpi; ++ ++ return 0; ++ ++err_destroy_encoder: ++ drm_encoder_cleanup(dpi->encoder); ++ clk_disable_unprepare(dpi->core_clock); ++ return ret; ++} ++ ++static void vc4_dpi_unbind(struct device *dev, struct device *master, ++ void *data) ++{ ++ struct drm_device *drm = dev_get_drvdata(master); ++ struct vc4_dev *vc4 = to_vc4_dev(drm); ++ struct vc4_dpi *dpi = dev_get_drvdata(dev); ++ ++ if (dpi->panel) ++ drm_panel_detach(dpi->panel); ++ ++ vc4_dpi_connector_destroy(dpi->connector); ++ drm_encoder_cleanup(dpi->encoder); ++ ++ clk_disable_unprepare(dpi->core_clock); ++ ++ vc4->dpi = NULL; ++} ++ ++static const struct component_ops vc4_dpi_ops = { ++ .bind = vc4_dpi_bind, ++ .unbind = vc4_dpi_unbind, ++}; ++ ++static int vc4_dpi_dev_probe(struct platform_device *pdev) ++{ ++ return component_add(&pdev->dev, &vc4_dpi_ops); ++} ++ ++static int vc4_dpi_dev_remove(struct platform_device *pdev) ++{ ++ component_del(&pdev->dev, &vc4_dpi_ops); ++ return 0; ++} ++ ++struct platform_driver vc4_dpi_driver = { ++ .probe = vc4_dpi_dev_probe, ++ .remove = vc4_dpi_dev_remove, ++ .driver = { ++ .name = "vc4_dpi", ++ .of_match_table = vc4_dpi_dt_match, ++ }, ++}; +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 22061aedef515b08cc5230272464f7a309a27e9d..282918352fe556407c3179e7e9023c21d5b00f21 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -259,6 +259,7 @@ static const struct component_master_ops vc4_drm_ops = { + + static struct platform_driver *const component_drivers[] = { + &vc4_hdmi_driver, ++ &vc4_dpi_driver, + &vc4_crtc_driver, + &vc4_hvs_driver, + &vc4_v3d_driver, +diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h +index 7f0b63435c7e48c592deac2671c8eb7c12ad3787..8b381d1716c42f6798b5f71224c2ac96412820cd 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.h ++++ b/drivers/gpu/drm/vc4/vc4_drv.h +@@ -16,6 +16,7 @@ struct vc4_dev { + struct vc4_hvs *hvs; + struct vc4_crtc *crtc[3]; + struct vc4_v3d *v3d; ++ struct vc4_dpi *dpi; + + struct drm_fbdev_cma *fbdev; + struct rpi_firmware *firmware; +@@ -418,6 +419,10 @@ void vc4_debugfs_cleanup(struct drm_minor *minor); + /* vc4_drv.c */ + void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index); + ++/* vc4_dpi.c */ ++extern struct platform_driver vc4_dpi_driver; ++int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused); ++ + /* vc4_gem.c */ + void vc4_gem_init(struct drm_device *dev); + void vc4_gem_destroy(struct drm_device *dev); + +From bc5e2293a88a7dac4dbbc77122d49cc5d33b9b1e Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 4 Apr 2016 14:25:59 -0700 +Subject: [PATCH 338/398] drm/vc4: Fix NULL deref in HDMI init error path + +If you make it here other than through err_destroy_encoder, vc4->hdmi +is still NULL. + +Signed-off-by: Eric Anholt +(cherry picked from commit 5883980313af70aec0ceebaef6ef0709726e5e63) +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 85224e542086c913975a86820104eca06d3917c2..524eae9531d015c8b0f4409229f89ce981c3c020 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -573,7 +573,7 @@ err_unprepare_hsm: + err_unprepare_pix: + clk_disable_unprepare(hdmi->pixel_clock); + err_put_i2c: +- put_device(&vc4->hdmi->ddc->dev); ++ put_device(&hdmi->ddc->dev); + + return ret; + } + +From 39c7dd73bedfa54aced823714bf9f304ed59d9f1 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 19 Apr 2016 13:24:14 -0700 +Subject: [PATCH 339/398] drm/vc4: Kick out the simplefb framebuffer before we + set up KMS. + +If we don't, then simplefb stays loaded on /dev/fb0 even though +scanout isn't happening from simplefb's memory area any more, and you +end up with no console. + +Signed-off-by: Eric Anholt +Acked-by: Dave Airlie +(cherry picked from commit b3a15f6d55fb584dd4d8baac5d1b6a398720620c) +--- + drivers/gpu/drm/vc4/vc4_drv.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 282918352fe556407c3179e7e9023c21d5b00f21..4b655affc4caa134f556581e88b218efa39c54a0 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -164,6 +164,24 @@ static void vc4_match_add_drivers(struct device *dev, + } + } + ++static void vc4_kick_out_firmware_fb(void) ++{ ++ struct apertures_struct *ap; ++ ++ ap = alloc_apertures(1); ++ if (!ap) ++ return; ++ ++ /* Since VC4 is a UMA device, the simplefb node may have been ++ * located anywhere in memory. ++ */ ++ ap->ranges[0].base = 0; ++ ap->ranges[0].size = ~0; ++ ++ remove_conflicting_framebuffers(ap, "vc4drmfb", false); ++ kfree(ap); ++} ++ + static int vc4_drm_bind(struct device *dev) + { + struct platform_device *pdev = to_platform_device(dev); +@@ -208,6 +226,8 @@ static int vc4_drm_bind(struct device *dev) + if (ret) + goto gem_destroy; + ++ vc4_kick_out_firmware_fb(); ++ + ret = drm_dev_register(drm, 0); + if (ret < 0) + goto unbind_all; + +From c83b6e2b1a6fd87900619d2b80ec0d1973142f77 Mon Sep 17 00:00:00 2001 +From: Maarten Lankhorst +Date: Tue, 26 Apr 2016 16:11:44 +0200 +Subject: [PATCH 340/398] drm/vc4: Rename async to nonblock. + +The async name is deprecated and should be changed to nonblocking. + +Cc: Eric Anholt +Signed-off-by: Maarten Lankhorst +Signed-off-by: Daniel Vetter +Link: http://patchwork.freedesktop.org/patch/msgid/1461679905-30177-12-git-send-email-maarten.lankhorst@linux.intel.com +(cherry picked from commit eb63961ba52ba545f5b7ebeeeefe1c98704e1a79) +--- + drivers/gpu/drm/vc4/vc4_kms.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c +index 4718ae5176cc6813a033d12783c30af726d95756..d423ba10239aa0835991ec7fbefca0b01e3598b4 100644 +--- a/drivers/gpu/drm/vc4/vc4_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_kms.c +@@ -93,7 +93,7 @@ static struct vc4_commit *commit_init(struct drm_atomic_state *state) + * vc4_atomic_commit - commit validated state object + * @dev: DRM device + * @state: the driver state object +- * @async: asynchronous commit ++ * @nonblock: nonblocking commit + * + * This function commits a with drm_atomic_helper_check() pre-validated state + * object. This can still fail when e.g. the framebuffer reservation fails. For +@@ -104,7 +104,7 @@ static struct vc4_commit *commit_init(struct drm_atomic_state *state) + */ + static int vc4_atomic_commit(struct drm_device *dev, + struct drm_atomic_state *state, +- bool async) ++ bool nonblock) + { + struct vc4_dev *vc4 = to_vc4_dev(dev); + int ret; +@@ -170,7 +170,7 @@ static int vc4_atomic_commit(struct drm_device *dev, + * current layout. + */ + +- if (async) { ++ if (nonblock) { + vc4_queue_seqno_cb(dev, &c->cb, wait_seqno, + vc4_atomic_complete_commit_seqno_cb); + } else { + +From 9e166991c2492b36fc2606bf885dc31d310dc3b6 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 31 Mar 2016 18:38:20 -0700 +Subject: [PATCH 341/398] drm/vc4: Add support for gamma ramps. + +We could possibly save a bit of power by not requesting gamma +conversion when the ramp happens to be 1:1, but at least if all the +CRTCs are off the SRAM will be disabled. + +This should fix brightness sliders in a lot of fullscreen games. + +Signed-off-by: Eric Anholt +(cherry picked from commit e582b6c7e7f9d0b1e30e8017e4082d3a9ede3310) +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 58 ++++++++++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/vc4/vc4_regs.h | 6 +++++ + 2 files changed, 64 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index 34ff59c3d0029774b241b5dd60269606ea288b05..defb4911fb5fd96bd4ca44363352eabf8eed53dd 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -49,6 +49,10 @@ struct vc4_crtc { + /* Which HVS channel we're using for our CRTC. */ + int channel; + ++ u8 lut_r[256]; ++ u8 lut_g[256]; ++ u8 lut_b[256]; ++ + struct drm_pending_vblank_event *event; + }; + +@@ -147,6 +151,46 @@ static void vc4_crtc_destroy(struct drm_crtc *crtc) + drm_crtc_cleanup(crtc); + } + ++static void ++vc4_crtc_lut_load(struct drm_crtc *crtc) ++{ ++ struct drm_device *dev = crtc->dev; ++ struct vc4_dev *vc4 = to_vc4_dev(dev); ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ u32 i; ++ ++ /* The LUT memory is laid out with each HVS channel in order, ++ * each of which takes 256 writes for R, 256 for G, then 256 ++ * for B. ++ */ ++ HVS_WRITE(SCALER_GAMADDR, ++ SCALER_GAMADDR_AUTOINC | ++ (vc4_crtc->channel * 3 * crtc->gamma_size)); ++ ++ for (i = 0; i < crtc->gamma_size; i++) ++ HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_r[i]); ++ for (i = 0; i < crtc->gamma_size; i++) ++ HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_g[i]); ++ for (i = 0; i < crtc->gamma_size; i++) ++ HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_b[i]); ++} ++ ++static void ++vc4_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, ++ uint32_t start, uint32_t size) ++{ ++ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); ++ u32 i; ++ ++ for (i = start; i < start + size; i++) { ++ vc4_crtc->lut_r[i] = r[i] >> 8; ++ vc4_crtc->lut_g[i] = g[i] >> 8; ++ vc4_crtc->lut_b[i] = b[i] >> 8; ++ } ++ ++ vc4_crtc_lut_load(crtc); ++} ++ + static u32 vc4_get_fifo_full_level(u32 format) + { + static const u32 fifo_len_bytes = 64; +@@ -260,8 +304,14 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) + + HVS_WRITE(SCALER_DISPBKGNDX(vc4_crtc->channel), + SCALER_DISPBKGND_AUTOHS | ++ SCALER_DISPBKGND_GAMMA | + (interlace ? SCALER_DISPBKGND_INTERLACE : 0)); + ++ /* Reload the LUT, since the SRAMs would have been disabled if ++ * all CRTCs had SCALER_DISPBKGND_GAMMA unset at once. ++ */ ++ vc4_crtc_lut_load(crtc); ++ + if (debug_dump_regs) { + DRM_INFO("CRTC %d regs after:\n", drm_crtc_index(crtc)); + vc4_crtc_dump_regs(vc4_crtc); +@@ -613,6 +663,7 @@ static const struct drm_crtc_funcs vc4_crtc_funcs = { + .reset = drm_atomic_helper_crtc_reset, + .atomic_duplicate_state = vc4_crtc_duplicate_state, + .atomic_destroy_state = vc4_crtc_destroy_state, ++ .gamma_set = vc4_crtc_gamma_set, + }; + + static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { +@@ -731,6 +782,7 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + primary_plane->crtc = crtc; + vc4->crtc[drm_crtc_index(crtc)] = vc4_crtc; + vc4_crtc->channel = vc4_crtc->data->hvs_channel; ++ drm_mode_crtc_set_gamma_size(crtc, ARRAY_SIZE(vc4_crtc->lut_r)); + + /* Set up some arbitrary number of planes. We're not limited + * by a set number of physical registers, just the space in +@@ -771,6 +823,12 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) + + vc4_set_crtc_possible_masks(drm, crtc); + ++ for (i = 0; i < crtc->gamma_size; i++) { ++ vc4_crtc->lut_r[i] = i; ++ vc4_crtc->lut_g[i] = i; ++ vc4_crtc->lut_b[i] = i; ++ } ++ + platform_set_drvdata(pdev, vc4_crtc); + + return 0; +diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h +index bf42a8e87111f2e5fd3108209d0a3dc9ad3e871f..6163b95c54111bde8c20bfd8e2efd233cb90b6ae 100644 +--- a/drivers/gpu/drm/vc4/vc4_regs.h ++++ b/drivers/gpu/drm/vc4/vc4_regs.h +@@ -390,6 +390,12 @@ + #define SCALER_DISPBASE2 0x0000006c + #define SCALER_DISPALPHA2 0x00000070 + #define SCALER_GAMADDR 0x00000078 ++# define SCALER_GAMADDR_AUTOINC BIT(31) ++/* Enables all gamma ramp SRAMs, not just those of CRTCs with gamma ++ * enabled. ++ */ ++# define SCALER_GAMADDR_SRAMENB BIT(30) ++ + #define SCALER_GAMDATA 0x000000e0 + #define SCALER_DLIST_START 0x00002000 + #define SCALER_DLIST_SIZE 0x00004000 + +From 68fb21cb4ac1904b14e182247eb7f762f07be547 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 14 Apr 2016 23:16:05 -0700 +Subject: [PATCH 342/398] drm/vc4: Add missing render node support + +There shouldn't be any other driver support necessary, since none of +the driver-specific ioctls ever required auth, and none of them deal +with modesetting. + +Signed-off-by: Eric Anholt +Reviewed-by: Daniel Vetter +(cherry picked from commit 0cd3e27476620176c19e346f82576c6e139b85a9) +--- + drivers/gpu/drm/vc4/vc4_drv.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index 4b655affc4caa134f556581e88b218efa39c54a0..a5b68c1aa07c42b8b0891b3c3346a1790ce02532 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -90,6 +90,7 @@ static struct drm_driver vc4_drm_driver = { + DRIVER_ATOMIC | + DRIVER_GEM | + DRIVER_HAVE_IRQ | ++ DRIVER_RENDER | + DRIVER_PRIME), + .lastclose = vc4_lastclose, + .preclose = vc4_drm_preclose, + +From 82aa9e4919cf881c88e427e29caa1ebc85ed635d Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Thu, 24 Mar 2016 17:23:48 -0700 +Subject: [PATCH 343/398] drm/panel: simple: Add the 7" DPI panel from Adafruit + +This is a basic TFT panel with a 40-pin FPC connector on it. The +specification doesn't define timings, but the Adafruit instructions +were setting up 800x480 CVT. + +v2: Add .bus_format and vsync/hsync flags. + +Signed-off-by: Eric Anholt +Acked-by: Rob Herring +[treding@nvidia.com: keep entries properly sorted] +Signed-off-by: Thierry Reding + +(cherry picked from commit 8070fdbd024727c752f815b18e5339c681a01bbe) +--- + .../bindings/display/panel/ontat,yx700wv03.txt | 7 ++++ + drivers/gpu/drm/panel/panel-simple.c | 37 ++++++++++++++++++++++ + 2 files changed, 44 insertions(+) + create mode 100644 Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt + +diff --git a/Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt b/Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt +new file mode 100644 +index 0000000000000000000000000000000000000000..3d8a5e029242a38d9b442559ad0edbc062fd52d3 +--- /dev/null ++++ b/Documentation/devicetree/bindings/display/panel/ontat,yx700wv03.txt +@@ -0,0 +1,7 @@ ++On Tat Industrial Company 7" DPI TFT panel. ++ ++Required properties: ++- compatible: should be "ontat,yx700wv03" ++ ++This binding is compatible with the simple-panel binding, which is specified ++in simple-panel.txt in this directory. +diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c +index f97b73ec4713722ae3af5a05ba048ea95042e4e0..e4a28487591628fe98169b91e389ae5053972e03 100644 +--- a/drivers/gpu/drm/panel/panel-simple.c ++++ b/drivers/gpu/drm/panel/panel-simple.c +@@ -1003,6 +1003,40 @@ static const struct panel_desc okaya_rs800480t_7x0gp = { + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, + }; + ++/* ++ * 800x480 CVT. The panel appears to be quite accepting, at least as far as ++ * pixel clocks, but this is the timing that was being used in the Adafruit ++ * installation instructions. ++ */ ++static const struct drm_display_mode ontat_yx700wv03_mode = { ++ .clock = 29500, ++ .hdisplay = 800, ++ .hsync_start = 824, ++ .hsync_end = 896, ++ .htotal = 992, ++ .vdisplay = 480, ++ .vsync_start = 483, ++ .vsync_end = 493, ++ .vtotal = 500, ++ .vrefresh = 60, ++ .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, ++}; ++ ++/* ++ * Specification at: ++ * https://www.adafruit.com/images/product-files/2406/c3163.pdf ++ */ ++static const struct panel_desc ontat_yx700wv03 = { ++ .modes = &ontat_yx700wv03_mode, ++ .num_modes = 1, ++ .bpc = 8, ++ .size = { ++ .width = 154, ++ .height = 83, ++ }, ++ .bus_format = MEDIA_BUS_FMT_RGB888_1X24, ++}; ++ + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { + .clock = 25000, + .hdisplay = 480, +@@ -1179,6 +1213,9 @@ static const struct of_device_id platform_of_match[] = { + .compatible = "okaya,rs800480t-7x0gp", + .data = &okaya_rs800480t_7x0gp, + }, { ++ .compatible = "ontat,yx700wv03", ++ .data = &ontat_yx700wv03, ++ }, { + .compatible = "ortustech,com43h4m85ulc", + .data = &ortustech_com43h4m85ulc, + }, { + +From def7707c309a871aa297c11e95fbf8fdca16c9b1 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 6 May 2016 13:18:09 -0700 +Subject: [PATCH 344/398] BCM270X_DT: Add the disabled-by-default DPI device + node. + +This will be enabled and connected to a particular panel by DT +overlays. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 2562372d2e7986c29f7f671d4d1bcc226484bfc0..c8e0870898756dd940a6806ac3a45c6e6a80d516 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -179,6 +179,17 @@ + status = "disabled"; + }; + ++ dpi: dpi@7e208000 { ++ compatible = "brcm,bcm2835-dpi"; ++ reg = <0x7e208000 0x8c>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>, ++ <&cprman BCM2835_CLOCK_DPI>; ++ clock-names = "core", "pixel"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + pixelvalve1: pixelvalve@7e207000 { + compatible = "brcm,bcm2835-pixelvalve1"; + reg = <0x7e207000 0x100>; + +From f0b481b1efdfe2e2e9bfbdc62bce856c7413f454 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner +Date: Fri, 6 May 2016 19:26:05 +0200 +Subject: [PATCH 345/398] drm/vc4: Fix get_vblank_counter with proper no-op for + Linux 4.4+ + +get_vblank_counter hooked up to drm_vblank_count() which alway was +non-sensical but didn't hurt in the past. Since Linux 4.4 it +triggers a WARN_ON_ONCE in drm_update_vblank_count on first vblank +irq disable, so fix it by hooking to drm_vblank_no_hw_counter(). + +Tested against Raspian kernel 4.4.8 tree on RPi 2B. + +Signed-off-by: Mario Kleiner +Cc: Eric Anholt +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_drv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c +index a5b68c1aa07c42b8b0891b3c3346a1790ce02532..2854ba313a6b8ead0f768d5bee204bc1603e3e57 100644 +--- a/drivers/gpu/drm/vc4/vc4_drv.c ++++ b/drivers/gpu/drm/vc4/vc4_drv.c +@@ -102,7 +102,7 @@ static struct drm_driver vc4_drm_driver = { + + .enable_vblank = vc4_enable_vblank, + .disable_vblank = vc4_disable_vblank, +- .get_vblank_counter = drm_vblank_count, ++ .get_vblank_counter = drm_vblank_no_hw_counter, + + #if defined(CONFIG_DEBUG_FS) + .debugfs_init = vc4_debugfs_init, + +From 90a557a68377ca7f9d41dbef39be8c952a2d8c81 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner +Date: Fri, 6 May 2016 19:26:06 +0200 +Subject: [PATCH 346/398] drm/vc4: Fix drm_vblank_put/get imbalance in page + flip path. + +The async page flip path was missing drm_crtc_vblank_get/put +completely. The sync flip path was missing a vblank put, so async +flips only reported proper pageflip completion events by chance, +and vblank irq's never turned off after a first vsync'ed page flip +until system reboot. + +Tested against Raspian kernel 4.4.8 tree on RPi 2B. + +Signed-off-by: Mario Kleiner +Cc: Eric Anholt +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c +index defb4911fb5fd96bd4ca44363352eabf8eed53dd..07662bd44bac219661f458fe7e91405fee6ccd79 100644 +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -506,6 +506,7 @@ static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) + if (vc4_crtc->event) { + drm_crtc_send_vblank_event(crtc, vc4_crtc->event); + vc4_crtc->event = NULL; ++ drm_crtc_vblank_put(crtc); + } + spin_unlock_irqrestore(&dev->event_lock, flags); + } +@@ -556,6 +557,7 @@ vc4_async_page_flip_complete(struct vc4_seqno_cb *cb) + spin_unlock_irqrestore(&dev->event_lock, flags); + } + ++ drm_crtc_vblank_put(crtc); + drm_framebuffer_unreference(flip_state->fb); + kfree(flip_state); + +@@ -598,6 +600,8 @@ static int vc4_async_page_flip(struct drm_crtc *crtc, + return ret; + } + ++ WARN_ON(drm_crtc_vblank_get(crtc) != 0); ++ + /* Immediately update the plane's legacy fb pointer, so that later + * modeset prep sees the state that will be present when the semaphore + * is released. + +From c71b8445e04a45846613109cb599bbb43ef7aad9 Mon Sep 17 00:00:00 2001 +From: Lee Jones +Date: Thu, 11 Feb 2016 13:19:09 -0800 +Subject: [PATCH 347/398] clk: Allow clocks to be marked as CRITICAL + +Critical clocks are those which must not be gated, else undefined +or catastrophic failure would occur. Here we have chosen to +ensure the prepare/enable counts are correctly incremented, so as +not to confuse users with enabled clocks with no visible users. + +Signed-off-by: Lee Jones +Signed-off-by: Michael Turquette +Link: lkml.kernel.org/r/1455225554-13267-2-git-send-email-mturquette@baylibre.com +(cherry picked from commit 32b9b10961860860268961d9aad0c56a73018c37) +--- + drivers/clk/clk.c | 5 +++++ + include/linux/clk-provider.h | 1 + + 2 files changed, 6 insertions(+) + +diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c +index f13c3f4228d4d51d5649c3705fd565b4aac82913..351369ef7ebbe560941d5e153e21588ad5393804 100644 +--- a/drivers/clk/clk.c ++++ b/drivers/clk/clk.c +@@ -2466,6 +2466,11 @@ static int __clk_init(struct device *dev, struct clk *clk_user) + if (core->ops->init) + core->ops->init(core->hw); + ++ if (core->flags & CLK_IS_CRITICAL) { ++ clk_core_prepare(core); ++ clk_core_enable(core); ++ } ++ + kref_init(&core->ref); + out: + clk_prepare_unlock(); +diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h +index 7cd0171963ae174c37a1c69b325f9430f9e44904..b79d854fe3358dbd5300610e11c43dc1bb54f009 100644 +--- a/include/linux/clk-provider.h ++++ b/include/linux/clk-provider.h +@@ -31,6 +31,7 @@ + #define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change */ + #define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */ + #define CLK_RECALC_NEW_RATES BIT(9) /* recalc rates after notifications */ ++#define CLK_IS_CRITICAL BIT(11) /* do not gate, ever */ + + struct clk; + struct clk_hw; + +From 52084421643ecd0af44f17d14c904cd67f407c19 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 11:44:59 -0700 +Subject: [PATCH 348/398] clk: bcm2835: Mark the VPU clock as critical + +The VPU clock is also the clock for our AXI bus, so we really can't +disable it. This might have happened during boot if, for example, +uart1 (aux_uart clock) probed and was then disabled before the other +consumers of the VPU clock had probed. + +v2: Rewrite to use a .flags in bcm2835_clock_data, since other clocks + will need this too. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 35f8de736cee3aa8b05c60bf4debd4c1da11fb5a..11ac28a0b90e6803601dcba8e11fde7d969850cd 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -446,6 +446,8 @@ struct bcm2835_clock_data { + /* Number of fractional bits in the divider */ + u32 frac_bits; + ++ u32 flags; ++ + bool is_vpu_clock; + bool is_mash_clock; + }; +@@ -1242,7 +1244,7 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.parent_names = parents; + init.num_parents = data->num_mux_parents; + init.name = data->name; +- init.flags = CLK_IGNORE_UNUSED; ++ init.flags = data->flags | CLK_IGNORE_UNUSED; + + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; +@@ -1661,6 +1663,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_VPUDIV, + .int_bits = 12, + .frac_bits = 8, ++ .flags = CLK_IS_CRITICAL, + .is_vpu_clock = true), + + /* clocks with per parent mux */ + +From f26adebc4fb70825a4713124fd3a28d4c51275d1 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 9 May 2016 17:28:18 -0700 +Subject: [PATCH 349/398] clk: bcm2835: Mark GPIO clocks enabled at boot as + critical. + +These divide off of PLLD_PER and are used for the ethernet and wifi +PHYs source PLLs. Neither of them is currently represented by a phy +device that would grab the clock for us. + +This keeps other drivers from killing the networking PHYs when they +disable their own clocks and trigger PLLD_PER's refcount going to 0. + +v2: Skip marking as critical if they aren't on at boot. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 11ac28a0b90e6803601dcba8e11fde7d969850cd..970d89011c44c9c13c3c3bb221e5c5b0da817683 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1246,6 +1246,15 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.name = data->name; + init.flags = data->flags | CLK_IGNORE_UNUSED; + ++ /* ++ * Some GPIO clocks for ethernet/wifi PLLs are marked as ++ * critical (since some platforms use them), but if the ++ * firmware didn't have them turned on then they clearly ++ * aren't actually critical. ++ */ ++ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) ++ init.flags &= ~CLK_IS_CRITICAL; ++ + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; + } else { +@@ -1720,13 +1729,15 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_GP1DIV, + .int_bits = 12, + .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL, + .is_mash_clock = true), + [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( + .name = "gp2", + .ctl_reg = CM_GP2CTL, + .div_reg = CM_GP2DIV, + .int_bits = 12, +- .frac_bits = 12), ++ .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL), + + /* HDMI state machine */ + [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( + +From 2e084a62c50576995b676439b7433d368cef5bfa Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 12:39:45 -0700 +Subject: [PATCH 350/398] clk: bcm2835: Skip PLLC clocks when deciding on a new + clock parent + +If the firmware had set up a clock to source from PLLC, go along with +it. But if we're looking for a new parent, we don't want to switch it +to PLLC because the firmware will force PLLC (and thus the AXI bus +clock) to different frequencies during over-temp/under-voltage, +without notification to Linux. + +On my system, this moves the Linux-enabled HDMI state machine and DSI1 +escape clock over to plld_per from pllc_per. EMMC still ends up on +pllc_per, because the firmware had set it up to use that. + +Signed-off-by: Eric Anholt +Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") +--- + drivers/clk/bcm/clk-bcm2835.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 970d89011c44c9c13c3c3bb221e5c5b0da817683..6b6b279a640ae03b295432d977978d1926d30d7e 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1020,16 +1020,28 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + return 0; + } + ++static bool ++bcm2835_clk_is_pllc(struct clk_hw *hw) ++{ ++ if (!hw) ++ return false; ++ ++ return strncmp(clk_hw_get_name(hw), "pllc", 4) == 0; ++} ++ + static int bcm2835_clock_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct clk_hw *parent, *best_parent = NULL; ++ bool current_parent_is_pllc; + unsigned long rate, best_rate = 0; + unsigned long prate, best_prate = 0; + size_t i; + u32 div; + ++ current_parent_is_pllc = bcm2835_clk_is_pllc(clk_hw_get_parent(hw)); ++ + /* + * Select parent clock that results in the closest but lower rate + */ +@@ -1037,6 +1049,17 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, + parent = clk_hw_get_parent_by_index(hw, i); + if (!parent) + continue; ++ ++ /* ++ * Don't choose a PLLC-derived clock as our parent ++ * unless it had been manually set that way. PLLC's ++ * frequency gets adjusted by the firmware due to ++ * over-temp or under-voltage conditions, without ++ * prior notification to our clock consumer. ++ */ ++ if (bcm2835_clk_is_pllc(parent) && !current_parent_is_pllc) ++ continue; ++ + prate = clk_hw_get_rate(parent); + div = bcm2835_clock_choose_div(hw, req->rate, prate, true); + rate = bcm2835_clock_rate_from_divisor(clock, prate, div); + +From 5f29e652bca9e3a9a62519ba7e44cdfd098e68d5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 23 May 2016 17:06:08 +0100 +Subject: [PATCH 351/398] Revert "Revert "drm/vc4: Force HDMI to connected."" + +This reverts commit 7da44d06540b4a191ecc74e943f3203577fce0df. + +This breaks the driver on Pi3 as hotplug is implemented through a +gpio expander owned by the GPU. + +We need to extend the virtual gpio driver to support this, but for +now assume hotplug is always enabled. +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c +index 524eae9531d015c8b0f4409229f89ce981c3c020..69650a8330ddcf28080327624135048be2847120 100644 +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -166,6 +166,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) + struct drm_device *dev = connector->dev; + struct vc4_dev *vc4 = to_vc4_dev(dev); + ++ return connector_status_connected; ++ + if (vc4->hdmi->hpd_gpio) { + if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ + vc4->hdmi->hpd_active_low) + +From e7405b9aa9d815df033e80eaca50d021e3a5376a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 23 May 2016 18:22:52 +0100 +Subject: [PATCH 352/398] config: Add NF_MATCH_RPFILTER + +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + arch/arm/configs/bcmrpi_defconfig | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 87023c7eacbdb9460492c22a89365aa5068d58c9..e8c589eea820ed776acedee3d371d4607829a4cd 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -223,6 +223,7 @@ CONFIG_NF_CONNTRACK_IPV4=m + CONFIG_IP_NF_IPTABLES=m + CONFIG_IP_NF_MATCH_AH=m + CONFIG_IP_NF_MATCH_ECN=m ++CONFIG_IP_NF_MATCH_RPFILTER=m + CONFIG_IP_NF_MATCH_TTL=m + CONFIG_IP_NF_FILTER=m + CONFIG_IP_NF_TARGET_REJECT=m +@@ -247,6 +248,7 @@ CONFIG_IP6_NF_MATCH_OPTS=m + CONFIG_IP6_NF_MATCH_HL=m + CONFIG_IP6_NF_MATCH_IPV6HEADER=m + CONFIG_IP6_NF_MATCH_MH=m ++CONFIG_IP6_NF_MATCH_RPFILTER=m + CONFIG_IP6_NF_MATCH_RT=m + CONFIG_IP6_NF_TARGET_HL=m + CONFIG_IP6_NF_FILTER=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index edb049cbcf3a7f3ff19f2f7d02602f89225b6ec3..b8b22a2a82f7adc62de8ce645f769567cc298a26 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -216,6 +216,7 @@ CONFIG_NF_CONNTRACK_IPV4=m + CONFIG_IP_NF_IPTABLES=m + CONFIG_IP_NF_MATCH_AH=m + CONFIG_IP_NF_MATCH_ECN=m ++CONFIG_IP_NF_MATCH_RPFILTER=m + CONFIG_IP_NF_MATCH_TTL=m + CONFIG_IP_NF_FILTER=m + CONFIG_IP_NF_TARGET_REJECT=m +@@ -240,6 +241,7 @@ CONFIG_IP6_NF_MATCH_OPTS=m + CONFIG_IP6_NF_MATCH_HL=m + CONFIG_IP6_NF_MATCH_IPV6HEADER=m + CONFIG_IP6_NF_MATCH_MH=m ++CONFIG_IP6_NF_MATCH_RPFILTER=m + CONFIG_IP6_NF_MATCH_RT=m + CONFIG_IP6_NF_TARGET_HL=m + CONFIG_IP6_NF_FILTER=m + +From 90b7790cd6a257cbb71bdcd4f824cd0c0a0acc95 Mon Sep 17 00:00:00 2001 +From: Michael Kaplan +Date: Tue, 24 May 2016 10:19:08 +0200 +Subject: [PATCH 353/398] Added Overlay for Microchip MCP23017 I2C gpio + expander + +--- + arch/arm/boot/dts/overlays/README | 9 +++++ + arch/arm/boot/dts/overlays/mcp23017-overlay.dts | 54 +++++++++++++++++++++++++ + 2 files changed, 63 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/mcp23017-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 279802a1ec1e9262bc0d205de7c8ba16bd71625b..181ed072c3c0e79940acf8c0a3650de6e3e47b82 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -567,6 +567,15 @@ Params: gpio_out_pin GPIO for output (default "17") + (default "off") + + ++Name: mcp23017 ++Info: Configures the MCP23017 I2C port expander ++Load: dtoverlay=mcp23017,= ++Params: gpiopin Gpio pin connected to the INTA output of the ++ MCP23017 (default: 4) ++ ++ addr I2C address of the MCP23017 (default: 0x20) ++ ++ + Name: mcp2515-can0 + Info: Configures the MCP2515 CAN controller on spi0.0 + Load: dtoverlay=mcp2515-can0,= +diff --git a/arch/arm/boot/dts/overlays/mcp23017-overlay.dts b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..412f966a3cc0a312771b7182310a7045fb923224 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/mcp23017-overlay.dts +@@ -0,0 +1,54 @@ ++// Definitions for MCP23017 Gpio Extender from Microchip Semiconductor ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&i2c1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&gpio>; ++ __overlay__ { ++ mcp23017_pins: mcp23017_pins { ++ brcm,pins = <4>; ++ brcm,function = <0>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ mcp23017: mcp@20 { ++ compatible = "microchip,mcp23017"; ++ reg = <0x20>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ #interrupt-cells=<2>; ++ interrupt-parent = <&gpio>; ++ interrupts = <4 2>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ gpiopin = <&mcp23017_pins>,"brcm,pins:0", ++ <&mcp23017>,"interrupts:0"; ++ addr = <&mcp23017>,"reg:0"; ++ }; ++}; ++ + +From 312f9df6383395f27d1dbce23021b9ccf58ab10a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 24 May 2016 16:20:09 +0100 +Subject: [PATCH 354/398] bcm2835-camera: Fix max/min error when looping over + cameras/resolutions + +See: https://github.com/raspberrypi/linux/issues/1447#issuecomment-221303506 +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 12326f876bdbc29083cb7afbf5d5cac7c4f321a7..ef4a9f65da3b09d0618b7366418e4167687a229b 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -1530,8 +1530,8 @@ static int get_num_cameras(struct vchiq_mmal_instance *instance, + } + for (i = 0; + i < (cam_info.num_cameras > num_resolutions ? +- cam_info.num_cameras : +- num_resolutions); ++ num_resolutions : ++ cam_info.num_cameras); + i++) { + resolutions[i][0] = cam_info.cameras[i].max_width; + resolutions[i][1] = cam_info.cameras[i].max_height; + +From ed5a568c7019eb0be575581e64e048db8f7a7e1c Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Sun, 29 May 2016 05:22:29 +0100 +Subject: [PATCH 355/398] Add dt param to force HiFiBerry DAC+ Pro into slave + mode + +"dtoverlay=hifiberry-dacplus,slave" + +Add 'slave' param to use HiFiBerry DAC+ Pro in slave mode, +with Pi as master for bit and frame clock. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/overlays/README | 2 ++ + arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts | 6 ++++-- + sound/soc/bcm/hifiberry_dacplus.c | 10 ++++++++-- + 3 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 181ed072c3c0e79940acf8c0a3650de6e3e47b82..d16b9eb587d535ff44839296190636945cb5c0c2 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -370,6 +370,8 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec + responsibility of the user to ensure that + the Digital volume control is set to a value + that does not result in clipping/distortion!) ++ slave Force DAC+ Pro into slave mode, using Pi as ++ master for bit clock and frame clock. + + + Name: hifiberry-digi +diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +index 4d8e09f11aacfebba78a9ac2f1e98f20883b5d70..2f078d4747ccfdc5172e24b18ce65454f1219b9d 100644 +--- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +@@ -41,7 +41,7 @@ + + fragment@3 { + target = <&sound>; +- frag3: __overlay__ { ++ hifiberry_dacplus: __overlay__ { + compatible = "hifiberry,hifiberry-dacplus"; + i2s-controller = <&i2s>; + status = "okay"; +@@ -49,6 +49,8 @@ + }; + + __overrides__ { +- 24db_digital_gain = <&frag3>,"hifiberry,24db_digital_gain?"; ++ 24db_digital_gain = ++ <&hifiberry_dacplus>,"hifiberry,24db_digital_gain?"; ++ slave = <&hifiberry_dacplus>,"hifiberry-dacplus,slave?"; + }; + }; +diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c +index 03d8d2a289b368e5e720ff8e18d3a74a3d788d29..65600674c286e8a7be8efd352d5a80889221a1d6 100644 +--- a/sound/soc/bcm/hifiberry_dacplus.c ++++ b/sound/soc/bcm/hifiberry_dacplus.c +@@ -47,6 +47,7 @@ struct pcm512x_priv { + /* Clock rate of CLK48EN attached to GPIO3 pin */ + #define CLK_48EN_RATE 24576000UL + ++static bool slave; + static bool snd_rpi_hifiberry_is_dacpro; + static bool digital_gain_0db_limit = true; + +@@ -145,8 +146,11 @@ static int snd_rpi_hifiberry_dacplus_init(struct snd_soc_pcm_runtime *rtd) + struct snd_soc_codec *codec = rtd->codec; + struct pcm512x_priv *priv; + +- snd_rpi_hifiberry_is_dacpro +- = snd_rpi_hifiberry_dacplus_is_pro_card(codec); ++ if (slave) ++ snd_rpi_hifiberry_is_dacpro = false; ++ else ++ snd_rpi_hifiberry_is_dacpro = ++ snd_rpi_hifiberry_dacplus_is_pro_card(codec); + + if (snd_rpi_hifiberry_is_dacpro) { + struct snd_soc_dai_link *dai = rtd->dai_link; +@@ -314,6 +318,8 @@ static int snd_rpi_hifiberry_dacplus_probe(struct platform_device *pdev) + + digital_gain_0db_limit = !of_property_read_bool( + pdev->dev.of_node, "hifiberry,24db_digital_gain"); ++ slave = of_property_read_bool(pdev->dev.of_node, ++ "hifiberry-dacplus,slave"); + } + + ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); + +From 1e5d96d22acacfa78d0a51eae225632dd062f019 Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Thu, 19 May 2016 00:00:00 +0100 +Subject: [PATCH 356/398] simple: add sound-dai-cells to I2S def + +Add '#sound-dai-cells = <0>;' to the I2S definition in +bcm2708_common.dtsi + +Not having it specified, whilst not causing an issue right now with +rpi-4.4.y, is going to cause an issue going forward with the use of +simple-card driver. So it doesn't fall through the cracks, patch it +in now. + +Hopefully Martin has taken care of getting a patch submitted for the +upstream Pi dts, as it was he who first run into the issue with the +current upstream kernel.... +https://github.com/msperl/linux-rpi/issues/3#issue-154916615 + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index c8e0870898756dd940a6806ac3a45c6e6a80d516..fa3f6b672a3d17373aa8bf0bbc27743f2631d53d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -137,6 +137,7 @@ + + i2s: i2s@7e203000 { + compatible = "brcm,bcm2835-i2s"; ++ #sound-dai-cells = <0>; + reg = <0x7e203000 0x24>, + <0x7e101098 0x08>; + + +From 1a0ffe1d9e70c6a47e7783206a4e7e6828bcbc3c Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <6by9@users.noreply.github.com> +Date: Tue, 31 May 2016 10:38:31 +0100 +Subject: [PATCH 357/398] BCM2835-V4L2: Increase minimum resolution to 32x32 + +https://github.com/raspberrypi/linux/issues/1498 showed +up that 16x16 is failing to work on the GPU for some reason. + +GPU bug being tracked on +https://github.com/raspberrypi/firmware/issues/607 +Workaround here by increasing minimum resolution via V4L2 +to 32x32. + +Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index ef4a9f65da3b09d0618b7366418e4167687a229b..1da6fcfb6b314fce8947df77bd4bb239bfc84c6d 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -36,8 +36,8 @@ + + #define BM2835_MMAL_VERSION "0.0.2" + #define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2" +-#define MIN_WIDTH 16 +-#define MIN_HEIGHT 16 ++#define MIN_WIDTH 32 ++#define MIN_HEIGHT 32 + #define MIN_BUFFER_SIZE (80*1024) + + #define MAX_VIDEO_MODE_WIDTH 1280 + +From 6130cf71963486309da7bb9dc2ba7ce3b8e51557 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 27 May 2016 18:23:51 +0100 +Subject: [PATCH 358/398] config: Add support for Logitech Rumblepad + +--- + arch/arm/configs/bcm2709_defconfig | 4 ++++ + arch/arm/configs/bcmrpi_defconfig | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index e8c589eea820ed776acedee3d371d4607829a4cd..43322fb1f9c32d0ed18aec9a1f28713f8ec3a2bd 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -896,6 +896,10 @@ CONFIG_HID_TWINHAN=m + CONFIG_HID_KENSINGTON=m + CONFIG_HID_LCPOWER=m + CONFIG_HID_LOGITECH=m ++CONFIG_HID_LOGITECH_DJ=m ++CONFIG_LOGITECH_FF=y ++CONFIG_LOGIRUMBLEPAD2_FF=y ++CONFIG_LOGIG940_FF=y + CONFIG_HID_MAGICMOUSE=m + CONFIG_HID_MICROSOFT=m + CONFIG_HID_MONTEREY=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index b8b22a2a82f7adc62de8ce645f769567cc298a26..474aa33be0dd2fa2a23e9fc4dc1b74f69776de03 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -888,6 +888,10 @@ CONFIG_HID_TWINHAN=m + CONFIG_HID_KENSINGTON=m + CONFIG_HID_LCPOWER=m + CONFIG_HID_LOGITECH=m ++CONFIG_HID_LOGITECH_DJ=m ++CONFIG_LOGITECH_FF=y ++CONFIG_LOGIRUMBLEPAD2_FF=y ++CONFIG_LOGIG940_FF=y + CONFIG_HID_MAGICMOUSE=m + CONFIG_HID_MICROSOFT=m + CONFIG_HID_MONTEREY=m + +From e20529355438f25673049518c75eb583c4369b6c Mon Sep 17 00:00:00 2001 +From: escalator2015 +Date: Tue, 24 May 2016 16:20:09 +0100 +Subject: [PATCH 359/398] New driver for RRA DigiDAC1 soundcard using WM8741 + + WM8804 + +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 + + .../overlays/rra-digidac1-wm8741-audio-overlay.dts | 81 ++++ + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + sound/soc/bcm/Kconfig | 8 + + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/digidac1-soundcard.c | 422 +++++++++++++++++++++ + 8 files changed, 522 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts + create mode 100644 sound/soc/bcm/digidac1-soundcard.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 02acf884753c2f1fa7eb570ebe5ce7d7adcf8fb4..14a7848fe029cf2ace6a1809c08446b58945a56a 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -67,6 +67,7 @@ dtbo-$(RPI_DT_OVERLAYS) += rpi-display.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rra-digidac1-wm8741-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio-1bit.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index d16b9eb587d535ff44839296190636945cb5c0c2..76f93e1e9123ef4361d3456df4c8297c8a1b2e3d 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -842,6 +842,12 @@ Load: dtoverlay=rpi-sense + Params: + + ++Name: rra-digidac1-wm8741-audio ++Info: Configures the Red Rocks Audio DigiDAC1 soundcard ++Load: dtoverlay=rra-digidac1-wm8741-audio ++Params: ++ ++ + Name: sdhost + Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock. + N.B. This overlay is designed for situations where the mmc driver is +diff --git a/arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts b/arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..16b1247bfa618ff85936ddf78c3aea58075eaa67 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/rra-digidac1-wm8741-audio-overlay.dts +@@ -0,0 +1,81 @@ ++// Definitions for RRA DigiDAC1 Audio card ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target-path = "/"; ++ __overlay__ { ++ aliases { ++ ldo0 = &ldo0; ++ ldo1 = &ldo1; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/soc"; ++ __overlay__ { ++ ++ ldo1: ldo1 { ++ compatible = "regulator-fixed"; ++ regulator-name = "DC_5V"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-always-on; ++ }; ++ ++ ldo0: ldo0 { ++ compatible = "regulator-fixed"; ++ regulator-name = "DC_3V3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ status = "okay"; ++ PVDD-supply = <&ldo0>; ++ DVDD-supply = <&ldo0>; ++ }; ++ ++ wm8742: wm8741@1a { ++ compatible = "wlf,wm8741"; ++ reg = <0x1a>; ++ status = "okay"; ++ AVDD-supply = <&ldo1>; ++ DVDD-supply = <&ldo0>; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "rra,digidac1-soundcard"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 43322fb1f9c32d0ed18aec9a1f28713f8ec3a2bd..e32cafa2a6b5d26b9c025ac0873f9af2f3da4124 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -866,6 +866,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m ++CONFIG_SND_DIGIDAC1_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 474aa33be0dd2fa2a23e9fc4dc1b74f69776de03..59161e7d21e17e24171e1020cc0b95b64f39055e 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -858,6 +858,7 @@ CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m ++CONFIG_SND_DIGIDAC1_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_WM8804_I2C=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 30f8208371ee81896f68249ec442da76da35f21a..a2e0921c310536ca313cdb37b5da4dab4c9b9551 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -92,3 +92,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD + select SND_SOC_WM8731 + help + Say Y or M if you want to add support for audioinjector.net Pi Hat ++ ++config SND_DIGIDAC1_SOUNDCARD ++ tristate "Support for Red Rocks Audio DigiDAC1" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_WM8804 ++ select SND_SOC_WM8741 ++ help ++ Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 4af578211f4c5522a6b47245c4c7020977daf0b6..ee7342e6f90f6d12e1e5472df7294fe479b25407 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -16,6 +16,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o + snd-soc-raspidac3-objs := raspidac3.o + snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o ++snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o + + obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o +@@ -29,4 +30,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o + obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o ++obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o + +diff --git a/sound/soc/bcm/digidac1-soundcard.c b/sound/soc/bcm/digidac1-soundcard.c +new file mode 100644 +index 0000000000000000000000000000000000000000..446796e7e4c14a7d95b2f2a01211d9a0b151f1f3 +--- /dev/null ++++ b/sound/soc/bcm/digidac1-soundcard.c +@@ -0,0 +1,422 @@ ++/* ++ * ASoC Driver for RRA DigiDAC1 ++ * Copyright 2016 ++ * Author: José M. Tasende ++ * based on the HifiBerry DAC driver by Florian Meier ++ * and the Wolfson card driver by Nikesh Oswal, ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/wm8804.h" ++#include "../codecs/wm8741.h" ++ ++#define WM8741_NUM_SUPPLIES 2 ++ ++/* codec private data */ ++struct wm8741_priv { ++ struct wm8741_platform_data pdata; ++ struct regmap *regmap; ++ struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES]; ++ unsigned int sysclk; ++ const struct snd_pcm_hw_constraint_list *sysclk_constraints; ++}; ++ ++static int samplerate = 44100; ++ ++/* New Alsa Controls not exposed by original wm8741 codec driver */ ++/* in actual driver the att. adjustment is wrong because */ ++/* this DAC has a coarse attenuation register with 4dB steps */ ++/* and a fine level register with 0.125dB steps */ ++/* each register has 32 steps so combining both we have 1024 steps */ ++/* of 0.125 dB. */ ++/* The original level controls from driver are removed at startup */ ++/* and replaced by the corrected ones. */ ++/* The same wm8741 driver can be used for wm8741 and wm8742 devices */ ++ ++static const DECLARE_TLV_DB_SCALE(dac_tlv_fine, 0, 13, 0); ++static const DECLARE_TLV_DB_SCALE(dac_tlv_coarse, -12700, 400, 1); ++static const char *w8741_dither[4] = {"Off", "RPDF", "TPDF", "HPDF"}; ++static const char *w8741_filter[5] = { ++ "Type 1", "Type 2", "Type 3", "Type 4", "Type 5"}; ++static const char *w8741_switch[2] = {"Off", "On"}; ++static const struct soc_enum w8741_enum[] = { ++SOC_ENUM_SINGLE(WM8741_MODE_CONTROL_2, 0, 4, w8741_dither),/* dithering type */ ++SOC_ENUM_SINGLE(WM8741_FILTER_CONTROL, 0, 5, w8741_filter),/* filter type */ ++SOC_ENUM_SINGLE(WM8741_FORMAT_CONTROL, 6, 2, w8741_switch),/* phase invert */ ++SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 0, 2, w8741_switch),/* volume ramp */ ++SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 3, 2, w8741_switch),/* soft mute */ ++}; ++ ++static const struct snd_kcontrol_new w8741_snd_controls_stereo[] = { ++SOC_DOUBLE_R_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION, ++ WM8741_DACRLSB_ATTENUATION, 0, 31, 1, dac_tlv_fine), ++SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION, ++ WM8741_DACRMSB_ATTENUATION, 0, 31, 1, dac_tlv_coarse), ++SOC_ENUM("DAC Dither", w8741_enum[0]), ++SOC_ENUM("DAC Digital Filter", w8741_enum[1]), ++SOC_ENUM("DAC Phase Invert", w8741_enum[2]), ++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]), ++SOC_ENUM("DAC Soft Mute", w8741_enum[4]), ++}; ++ ++static const struct snd_kcontrol_new w8741_snd_controls_mono_left[] = { ++SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION, ++ 0, 31, 0, dac_tlv_fine), ++SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION, ++ 0, 31, 1, dac_tlv_coarse), ++SOC_ENUM("DAC Dither", w8741_enum[0]), ++SOC_ENUM("DAC Digital Filter", w8741_enum[1]), ++SOC_ENUM("DAC Phase Invert", w8741_enum[2]), ++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]), ++SOC_ENUM("DAC Soft Mute", w8741_enum[4]), ++}; ++ ++static const struct snd_kcontrol_new w8741_snd_controls_mono_right[] = { ++SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACRLSB_ATTENUATION, ++ 0, 31, 0, dac_tlv_fine), ++SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACRMSB_ATTENUATION, ++ 0, 31, 1, dac_tlv_coarse), ++SOC_ENUM("DAC Dither", w8741_enum[0]), ++SOC_ENUM("DAC Digital Filter", w8741_enum[1]), ++SOC_ENUM("DAC Phase Invert", w8741_enum[2]), ++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]), ++SOC_ENUM("DAC Soft Mute", w8741_enum[4]), ++}; ++ ++static int w8741_add_controls(struct snd_soc_codec *codec) ++{ ++ struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); ++ ++ switch (wm8741->pdata.diff_mode) { ++ case WM8741_DIFF_MODE_STEREO: ++ case WM8741_DIFF_MODE_STEREO_REVERSED: ++ snd_soc_add_codec_controls(codec, ++ w8741_snd_controls_stereo, ++ ARRAY_SIZE(w8741_snd_controls_stereo)); ++ break; ++ case WM8741_DIFF_MODE_MONO_LEFT: ++ snd_soc_add_codec_controls(codec, ++ w8741_snd_controls_mono_left, ++ ARRAY_SIZE(w8741_snd_controls_mono_left)); ++ break; ++ case WM8741_DIFF_MODE_MONO_RIGHT: ++ snd_soc_add_codec_controls(codec, ++ w8741_snd_controls_mono_right, ++ ARRAY_SIZE(w8741_snd_controls_mono_right)); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++static int digidac1_soundcard_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_card *card = rtd->card; ++ struct snd_soc_pcm_runtime *wm8741_rtd; ++ struct snd_soc_codec *wm8741_codec; ++ struct snd_card *sound_card = card->snd_card; ++ struct snd_kcontrol *kctl; ++ int ret; ++ ++ wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name); ++ if (!wm8741_rtd) { ++ dev_warn(card->dev, "digidac1_soundcard_init: couldn't get wm8741 rtd\n"); ++ return -EFAULT; ++ } ++ wm8741_codec = wm8741_rtd->codec; ++ ret = w8741_add_controls(wm8741_codec); ++ if (ret < 0) ++ dev_warn(card->dev, "Failed to add new wm8741 controls: %d\n", ++ ret); ++ ++ /* enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ kctl = snd_soc_card_get_kcontrol(card, ++ "Playback Volume"); ++ if (kctl) { ++ kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE; ++ snd_ctl_remove(sound_card, kctl); ++ } ++ kctl = snd_soc_card_get_kcontrol(card, ++ "Fine Playback Volume"); ++ if (kctl) { ++ kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE; ++ snd_ctl_remove(sound_card, kctl); ++ } ++ return 0; ++} ++ ++static int digidac1_soundcard_startup(struct snd_pcm_substream *substream) ++{ ++ /* turn on wm8804 digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_card *card = rtd->card; ++ struct snd_soc_pcm_runtime *wm8741_rtd; ++ struct snd_soc_codec *wm8741_codec; ++ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); ++ wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name); ++ if (!wm8741_rtd) { ++ dev_warn(card->dev, "digidac1_soundcard_startup: couldn't get WM8741 rtd\n"); ++ return -EFAULT; ++ } ++ wm8741_codec = wm8741_rtd->codec; ++ ++ /* latch wm8741 level */ ++ snd_soc_update_bits(wm8741_codec, WM8741_DACLLSB_ATTENUATION, ++ WM8741_UPDATELL, WM8741_UPDATELL); ++ snd_soc_update_bits(wm8741_codec, WM8741_DACLMSB_ATTENUATION, ++ WM8741_UPDATELM, WM8741_UPDATELM); ++ snd_soc_update_bits(wm8741_codec, WM8741_DACRLSB_ATTENUATION, ++ WM8741_UPDATERL, WM8741_UPDATERL); ++ snd_soc_update_bits(wm8741_codec, WM8741_DACRMSB_ATTENUATION, ++ WM8741_UPDATERM, WM8741_UPDATERM); ++ ++ return 0; ++} ++ ++static void digidac1_soundcard_shutdown(struct snd_pcm_substream *substream) ++{ ++ /* turn off wm8804 digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); ++} ++ ++static int digidac1_soundcard_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ struct snd_soc_card *card = rtd->card; ++ struct snd_soc_pcm_runtime *wm8741_rtd; ++ struct snd_soc_codec *wm8741_codec; ++ ++ int sysclk = 27000000; ++ long mclk_freq = 0; ++ int mclk_div = 1; ++ int sampling_freq = 1; ++ int ret; ++ ++ wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name); ++ if (!wm8741_rtd) { ++ dev_warn(card->dev, "digidac1_soundcard_hw_params: couldn't get WM8741 rtd\n"); ++ return -EFAULT; ++ } ++ wm8741_codec = wm8741_rtd->codec; ++ samplerate = params_rate(params); ++ ++ if (samplerate <= 96000) { ++ mclk_freq = samplerate*256; ++ mclk_div = WM8804_MCLKDIV_256FS; ++ } else { ++ mclk_freq = samplerate*128; ++ mclk_div = WM8804_MCLKDIV_128FS; ++ } ++ ++ switch (samplerate) { ++ case 32000: ++ sampling_freq = 0x03; ++ break; ++ case 44100: ++ sampling_freq = 0x00; ++ break; ++ case 48000: ++ sampling_freq = 0x02; ++ break; ++ case 88200: ++ sampling_freq = 0x08; ++ break; ++ case 96000: ++ sampling_freq = 0x0a; ++ break; ++ case 176400: ++ sampling_freq = 0x0c; ++ break; ++ case 192000: ++ sampling_freq = 0x0e; ++ break; ++ default: ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", ++ samplerate); ++ } ++ ++ snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); ++ snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, ++ sysclk, SND_SOC_CLOCK_OUT); ++ if (ret < 0) { ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK: %d\n", ret); ++ return ret; ++ } ++ /* Enable wm8804 TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ /* wm8804 Power on */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); ++ ++ /* wm8804 set sampling frequency status bits */ ++ snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); ++ ++ /* Now update wm8741 registers for the correct oversampling */ ++ if (samplerate <= 48000) ++ snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1, ++ WM8741_OSR_MASK, 0x00); ++ else if (samplerate <= 96000) ++ snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1, ++ WM8741_OSR_MASK, 0x20); ++ else ++ snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1, ++ WM8741_OSR_MASK, 0x40); ++ ++ /* wm8741 bit size */ ++ switch (params_width(params)) { ++ case 16: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x00); ++ break; ++ case 20: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x01); ++ break; ++ case 24: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x02); ++ break; ++ case 32: ++ snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL, ++ WM8741_IWL_MASK, 0x03); ++ break; ++ default: ++ dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d", ++ params_width(params)); ++ return -EINVAL; ++ } ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); ++} ++/* machine stream operations */ ++static struct snd_soc_ops digidac1_soundcard_ops = { ++ .hw_params = digidac1_soundcard_hw_params, ++ .startup = digidac1_soundcard_startup, ++ .shutdown = digidac1_soundcard_shutdown, ++}; ++ ++static struct snd_soc_dai_link digidac1_soundcard_dai[] = { ++ { ++ .name = "RRA DigiDAC1", ++ .stream_name = "RRA DigiDAC1 HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8804-spdif", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "wm8804.1-003b", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ .ops = &digidac1_soundcard_ops, ++ .init = digidac1_soundcard_init, ++ }, ++ { ++ .name = "RRA DigiDAC11", ++ .stream_name = "RRA DigiDAC11 HiFi", ++ .cpu_dai_name = "wm8804-spdif", ++ .codec_dai_name = "wm8741", ++ .codec_name = "wm8741.1-001a", ++ .dai_fmt = SND_SOC_DAIFMT_I2S ++ | SND_SOC_DAIFMT_NB_NF ++ | SND_SOC_DAIFMT_CBS_CFS, ++ }, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card digidac1_soundcard = { ++ .name = "digidac1-soundcard", ++ .owner = THIS_MODULE, ++ .dai_link = digidac1_soundcard_dai, ++ .num_links = ARRAY_SIZE(digidac1_soundcard_dai), ++}; ++ ++static int digidac1_soundcard_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ digidac1_soundcard.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &digidac1_soundcard_dai[0]; ++ ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ ++ ret = snd_soc_register_card(&digidac1_soundcard); ++ if (ret) ++ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ++ ret); ++ ++ return ret; ++} ++ ++static int digidac1_soundcard_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&digidac1_soundcard); ++} ++ ++static const struct of_device_id digidac1_soundcard_of_match[] = { ++ { .compatible = "rra,digidac1-soundcard", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, digidac1_soundcard_of_match); ++ ++static struct platform_driver digidac1_soundcard_driver = { ++ .driver = { ++ .name = "digidac1-audio", ++ .owner = THIS_MODULE, ++ .of_match_table = digidac1_soundcard_of_match, ++ }, ++ .probe = digidac1_soundcard_probe, ++ .remove = digidac1_soundcard_remove, ++}; ++ ++module_platform_driver(digidac1_soundcard_driver); ++ ++MODULE_AUTHOR("José M. Tasende "); ++MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); ++MODULE_LICENSE("GPL v2"); + +From 0be657956f95f50eabfbc5e12940082e50cdb7c9 Mon Sep 17 00:00:00 2001 +From: Aaron Shaw +Date: Thu, 26 May 2016 23:37:11 +0100 +Subject: [PATCH 360/398] Change BoomBerry name to JustBoom in all locations + due to legal challenge + +--- + arch/arm/boot/dts/overlays/Makefile | 4 +- + arch/arm/boot/dts/overlays/README | 52 ++--- + .../boot/dts/overlays/boomberry-dac-overlay.dts | 43 ----- + .../boot/dts/overlays/boomberry-digi-overlay.dts | 39 ---- + .../arm/boot/dts/overlays/justboom-dac-overlay.dts | 43 +++++ + .../boot/dts/overlays/justboom-digi-overlay.dts | 39 ++++ + arch/arm/configs/bcm2709_defconfig | 4 +- + arch/arm/configs/bcmrpi_defconfig | 4 +- + sound/soc/bcm/Kconfig | 12 +- + sound/soc/bcm/Makefile | 8 +- + sound/soc/bcm/boomberry-dac.c | 162 ---------------- + sound/soc/bcm/boomberry-digi.c | 215 --------------------- + sound/soc/bcm/justboom-dac.c | 162 ++++++++++++++++ + sound/soc/bcm/justboom-digi.c | 215 +++++++++++++++++++++ + 14 files changed, 501 insertions(+), 501 deletions(-) + delete mode 100644 arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts + delete mode 100644 arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/justboom-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/justboom-digi-overlay.dts + delete mode 100644 sound/soc/bcm/boomberry-dac.c + delete mode 100644 sound/soc/bcm/boomberry-digi.c + create mode 100644 sound/soc/bcm/justboom-dac.c + create mode 100644 sound/soc/bcm/justboom-digi.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 14a7848fe029cf2ace6a1809c08446b58945a56a..0adb5b92c047cb7e12871cf75515f822924924cd 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -18,8 +18,6 @@ dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += boomberry-dac.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += boomberry-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo +@@ -43,6 +41,8 @@ dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += justboom-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += justboom-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 76f93e1e9123ef4361d3456df4c8297c8a1b2e3d..1516cc2e1616bb5e0cb519e05eee6776fe84e52a 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -238,32 +238,6 @@ Load: dtoverlay=bmp085_i2c-sensor + Params: + + +-Name: boomberry-dac +-Info: Configures the BoomBerry DAC HAT, Amp HAT, DAC Zero and Amp Zero audio +- cards +-Load: dtoverlay=boomberry-dac,= +-Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec +- Digital volume control. Enable with +- "dtoverlay=boomberry-dac,24db_digital_gain" +- (The default behaviour is that the Digital +- volume control is limited to a maximum of +- 0dB. ie. it can attenuate but not provide +- gain. For most users, this will be desired +- as it will prevent clipping. By appending +- the 24dB_digital_gain parameter, the Digital +- volume control will allow up to 24dB of +- gain. If this parameter is enabled, it is the +- responsibility of the user to ensure that +- the Digital volume control is set to a value +- that does not result in clipping/distortion!) +- +- +-Name: boomberry-digi +-Info: Configures the BoomBerry Digi HAT and Digi Zero audio cards +-Load: dtoverlay=boomberry-digi +-Params: +- +- + Name: dht11 + Info: Overlay for the DHT11/DHT21/DHT22 humidity/temperature sensors + Also sometimes found with the part number(s) AM230x. +@@ -543,6 +517,32 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec + that does not result in clipping/distortion!) + + ++Name: justboom-dac ++Info: Configures the JustBoom DAC HAT, Amp HAT, DAC Zero and Amp Zero audio ++ cards ++Load: dtoverlay=justboom-dac,= ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ "dtoverlay=justboom-dac,24db_digital_gain" ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24dB_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) ++ ++ ++Name: justboom-digi ++Info: Configures the JustBoom Digi HAT and Digi Zero audio cards ++Load: dtoverlay=justboom-digi ++Params: ++ ++ + Name: lirc-rpi + Info: Configures lirc-rpi (Linux Infrared Remote Control for Raspberry Pi) + Consult the module documentation for more details. +diff --git a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts +deleted file mode 100644 +index 725e8550f21d304b219d314acc2405d6e85ea8e5..0000000000000000000000000000000000000000 +--- a/arch/arm/boot/dts/overlays/boomberry-dac-overlay.dts ++++ /dev/null +@@ -1,43 +0,0 @@ +-// Definitions for BoomBerry DAC +-/dts-v1/; +-/plugin/; +- +-/ { +- compatible = "brcm,bcm2708"; +- +- fragment@0 { +- target = <&i2s>; +- __overlay__ { +- status = "okay"; +- }; +- }; +- +- fragment@1 { +- target = <&i2c1>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- +- pcm5122@4d { +- #sound-dai-cells = <0>; +- compatible = "ti,pcm5122"; +- reg = <0x4d>; +- status = "okay"; +- }; +- }; +- }; +- +- fragment@2 { +- target = <&sound>; +- frag2: __overlay__ { +- compatible = "boomberry,boomberry-dac"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +- +- __overrides__ { +- 24db_digital_gain = <&frag2>,"boomberry,24db_digital_gain?"; +- }; +-}; +diff --git a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts b/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts +deleted file mode 100644 +index a451f6ddbe2fc66e5cdb1e010551eb217b5abf99..0000000000000000000000000000000000000000 +--- a/arch/arm/boot/dts/overlays/boomberry-digi-overlay.dts ++++ /dev/null +@@ -1,39 +0,0 @@ +-// Definitions for BoomBerry Digi +-/dts-v1/; +-/plugin/; +- +-/ { +- compatible = "brcm,bcm2708"; +- +- fragment@0 { +- target = <&i2s>; +- __overlay__ { +- status = "okay"; +- }; +- }; +- +- fragment@1 { +- target = <&i2c1>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- +- wm8804@3b { +- #sound-dai-cells = <0>; +- compatible = "wlf,wm8804"; +- reg = <0x3b>; +- status = "okay"; +- }; +- }; +- }; +- +- fragment@2 { +- target = <&sound>; +- __overlay__ { +- compatible = "boomberry,boomberry-digi"; +- i2s-controller = <&i2s>; +- status = "okay"; +- }; +- }; +-}; +diff --git a/arch/arm/boot/dts/overlays/justboom-dac-overlay.dts b/arch/arm/boot/dts/overlays/justboom-dac-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..312632ad376d5b8c8ff1dbf31fa03d0d18181d94 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/justboom-dac-overlay.dts +@@ -0,0 +1,43 @@ ++// Definitions for JustBoom DAC ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4d { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4d>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ frag2: __overlay__ { ++ compatible = "justboom,justboom-dac"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++ ++ __overrides__ { ++ 24db_digital_gain = <&frag2>,"justboom,24db_digital_gain?"; ++ }; ++}; +diff --git a/arch/arm/boot/dts/overlays/justboom-digi-overlay.dts b/arch/arm/boot/dts/overlays/justboom-digi-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..cbbede9a541166ba257122918081982016e0b7eb +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/justboom-digi-overlay.dts +@@ -0,0 +1,39 @@ ++// Definitions for JustBoom Digi ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "justboom,justboom-digi"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index e32cafa2a6b5d26b9c025ac0873f9af2f3da4124..a8d7790b0524fd852bc80f5bcac2371503de5f5f 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -861,8 +861,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 59161e7d21e17e24171e1020cc0b95b64f39055e..af21699bae62dac47d9e3f1328cfb540e2856781 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -853,8 +853,8 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m + CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC=m +-CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m ++CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index a2e0921c310536ca313cdb37b5da4dab4c9b9551..fa11cd792824f21424a3b798336b676d33181a43 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -50,19 +50,19 @@ config SND_BCM2708_SOC_RPI_PROTO + help + Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731). + +-config SND_BCM2708_SOC_BOOMBERRY_DAC +- tristate "Support for BoomBerry DAC" ++config SND_BCM2708_SOC_JUSTBOOM_DAC ++ tristate "Support for JustBoom DAC" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S + select SND_SOC_PCM512x + help +- Say Y or M if you want to add support for BoomBerry DAC. ++ Say Y or M if you want to add support for JustBoom DAC. + +-config SND_BCM2708_SOC_BOOMBERRY_DIGI +- tristate "Support for BoomBerry Digi" ++config SND_BCM2708_SOC_JUSTBOOM_DIGI ++ tristate "Support for JustBoom Digi" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S + select SND_SOC_WM8804 + help +- Say Y or M if you want to add support for BoomBerry Digi. ++ Say Y or M if you want to add support for JustBoom Digi. + + config SND_BCM2708_SOC_IQAUDIO_DAC + tristate "Support for IQaudIO-DAC" +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index ee7342e6f90f6d12e1e5472df7294fe479b25407..a9448fdcd6bcc4e4cb96e985fbe758aea002ddd8 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -9,8 +9,8 @@ snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o + snd-soc-hifiberry-amp-objs := hifiberry_amp.o +-snd-soc-boomberry-dac-objs := boomberry-dac.o +-snd-soc-boomberry-digi-objs := boomberry-digi.o ++snd-soc-justboom-dac-objs := justboom-dac.o ++snd-soc-justboom-digi-objs := justboom-digi.o + snd-soc-rpi-dac-objs := rpi-dac.o + snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o +@@ -23,8 +23,8 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o +-obj-$(CONFIG_SND_BCM2708_SOC_BOOMBERRY_DAC) += snd-soc-boomberry-dac.o +-obj-$(CONFIG_SND_BCM2708_SOC_BOOMBERRY_DIGI) += snd-soc-boomberry-digi.o ++obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o ++obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o +diff --git a/sound/soc/bcm/boomberry-dac.c b/sound/soc/bcm/boomberry-dac.c +deleted file mode 100644 +index 8d39de24289d875cebd5455f28aafe3e24132ab5..0000000000000000000000000000000000000000 +--- a/sound/soc/bcm/boomberry-dac.c ++++ /dev/null +@@ -1,162 +0,0 @@ +-/* +- * ASoC Driver for BoomBerry DAC Raspberry Pi HAT Sound Card +- * +- * Author: Milan Neskovic +- * Copyright 2016 +- * based on code by Daniel Matuschek +- * based on code by Florian Meier +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License +- * version 2 as published by the Free Software Foundation. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * General Public License for more details. +- */ +- +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +- +-#include "../codecs/pcm512x.h" +- +-static bool digital_gain_0db_limit = true; +- +-static int snd_rpi_boomberry_dac_init(struct snd_soc_pcm_runtime *rtd) +-{ +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08); +- snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02); +- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); +- +- if (digital_gain_0db_limit) +- { +- int ret; +- struct snd_soc_card *card = rtd->card; +- +- ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207); +- if (ret < 0) +- dev_warn(card->dev, "Failed to set volume limit: %d\n", ret); +- } +- +- return 0; +-} +- +-static int snd_rpi_boomberry_dac_hw_params(struct snd_pcm_substream *substream, +- struct snd_pcm_hw_params *params) +-{ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_dai *cpu_dai = rtd->cpu_dai; +- /*return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);*/ +- unsigned int sample_bits = +- snd_pcm_format_physical_width(params_format(params)); +- return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2); +-} +- +-static int snd_rpi_boomberry_dac_startup(struct snd_pcm_substream *substream) { +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); +- return 0; +-} +- +-static void snd_rpi_boomberry_dac_shutdown(struct snd_pcm_substream *substream) { +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00); +-} +- +-/* machine stream operations */ +-static struct snd_soc_ops snd_rpi_boomberry_dac_ops = { +- .hw_params = snd_rpi_boomberry_dac_hw_params, +- .startup = snd_rpi_boomberry_dac_startup, +- .shutdown = snd_rpi_boomberry_dac_shutdown, +-}; +- +-static struct snd_soc_dai_link snd_rpi_boomberry_dac_dai[] = { +-{ +- .name = "BoomBerry DAC", +- .stream_name = "BoomBerry DAC HiFi", +- .cpu_dai_name = "bcm2708-i2s.0", +- .codec_dai_name = "pcm512x-hifi", +- .platform_name = "bcm2708-i2s.0", +- .codec_name = "pcm512x.1-004d", +- .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | +- SND_SOC_DAIFMT_CBS_CFS, +- .ops = &snd_rpi_boomberry_dac_ops, +- .init = snd_rpi_boomberry_dac_init, +-}, +-}; +- +-/* audio machine driver */ +-static struct snd_soc_card snd_rpi_boomberry_dac = { +- .name = "snd_rpi_boomberry_dac", +- .owner = THIS_MODULE, +- .dai_link = snd_rpi_boomberry_dac_dai, +- .num_links = ARRAY_SIZE(snd_rpi_boomberry_dac_dai), +-}; +- +-static int snd_rpi_boomberry_dac_probe(struct platform_device *pdev) +-{ +- int ret = 0; +- +- snd_rpi_boomberry_dac.dev = &pdev->dev; +- +- if (pdev->dev.of_node) { +- struct device_node *i2s_node; +- struct snd_soc_dai_link *dai = &snd_rpi_boomberry_dac_dai[0]; +- i2s_node = of_parse_phandle(pdev->dev.of_node, +- "i2s-controller", 0); +- +- if (i2s_node) { +- dai->cpu_dai_name = NULL; +- dai->cpu_of_node = i2s_node; +- dai->platform_name = NULL; +- dai->platform_of_node = i2s_node; +- } +- +- digital_gain_0db_limit = !of_property_read_bool( +- pdev->dev.of_node, "boomberry,24db_digital_gain"); +- } +- +- ret = snd_soc_register_card(&snd_rpi_boomberry_dac); +- if (ret) +- dev_err(&pdev->dev, +- "snd_soc_register_card() failed: %d\n", ret); +- +- return ret; +-} +- +-static int snd_rpi_boomberry_dac_remove(struct platform_device *pdev) +-{ +- return snd_soc_unregister_card(&snd_rpi_boomberry_dac); +-} +- +-static const struct of_device_id snd_rpi_boomberry_dac_of_match[] = { +- { .compatible = "boomberry,boomberry-dac", }, +- {}, +-}; +-MODULE_DEVICE_TABLE(of, snd_rpi_boomberry_dac_of_match); +- +-static struct platform_driver snd_rpi_boomberry_dac_driver = { +- .driver = { +- .name = "snd-rpi-boomberry-dac", +- .owner = THIS_MODULE, +- .of_match_table = snd_rpi_boomberry_dac_of_match, +- }, +- .probe = snd_rpi_boomberry_dac_probe, +- .remove = snd_rpi_boomberry_dac_remove, +-}; +- +-module_platform_driver(snd_rpi_boomberry_dac_driver); +- +-MODULE_AUTHOR("Milan Neskovic "); +-MODULE_DESCRIPTION("ASoC Driver for BoomBerry PI DAC HAT Sound Card"); +-MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/bcm/boomberry-digi.c b/sound/soc/bcm/boomberry-digi.c +deleted file mode 100644 +index 3d5b5ff26f9b10648d308d489693407e6e7e7ac7..0000000000000000000000000000000000000000 +--- a/sound/soc/bcm/boomberry-digi.c ++++ /dev/null +@@ -1,215 +0,0 @@ +-/* +- * ASoC Driver for BoomBerry Raspberry Pi Digi HAT Sound Card +- * +- * Author: Milan Neskovic +- * Copyright 2016 +- * based on code by Daniel Matuschek +- * based on code by Florian Meier +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License +- * version 2 as published by the Free Software Foundation. +- * +- * This program is distributed in the hope that it will be useful, but +- * WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * General Public License for more details. +- */ +- +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +- +-#include "../codecs/wm8804.h" +- +-static int snd_rpi_boomberry_digi_init(struct snd_soc_pcm_runtime *rtd) +-{ +- struct snd_soc_codec *codec = rtd->codec; +- +- /* enable TX output */ +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); +- +- return 0; +-} +- +-static int snd_rpi_boomberry_digi_startup(struct snd_pcm_substream *substream) { +- /* turn on digital output */ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); +- return 0; +-} +- +-static void snd_rpi_boomberry_digi_shutdown(struct snd_pcm_substream *substream) { +- /* turn off output */ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_codec *codec = rtd->codec; +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); +-} +- +-static int snd_rpi_boomberry_digi_hw_params(struct snd_pcm_substream *substream, +- struct snd_pcm_hw_params *params) +-{ +- struct snd_soc_pcm_runtime *rtd = substream->private_data; +- struct snd_soc_dai *codec_dai = rtd->codec_dai; +- struct snd_soc_codec *codec = rtd->codec; +- struct snd_soc_dai *cpu_dai = rtd->cpu_dai; +- +- int sysclk = 27000000; /* This is fixed on this board */ +- +- long mclk_freq=0; +- int mclk_div=1; +- int sampling_freq=1; +- +- int ret; +- +- int samplerate = params_rate(params); +- +- if (samplerate<=96000) { +- mclk_freq=samplerate*256; +- mclk_div=WM8804_MCLKDIV_256FS; +- } else { +- mclk_freq=samplerate*128; +- mclk_div=WM8804_MCLKDIV_128FS; +- } +- +- switch (samplerate) { +- case 32000: +- sampling_freq=0x03; +- break; +- case 44100: +- sampling_freq=0x00; +- break; +- case 48000: +- sampling_freq=0x02; +- break; +- case 88200: +- sampling_freq=0x08; +- break; +- case 96000: +- sampling_freq=0x0a; +- break; +- case 176400: +- sampling_freq=0x0c; +- break; +- case 192000: +- sampling_freq=0x0e; +- break; +- default: +- dev_err(codec->dev, +- "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", +- samplerate); +- } +- +- snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); +- snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); +- +- ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, +- sysclk, SND_SOC_CLOCK_OUT); +- if (ret < 0) { +- dev_err(codec->dev, +- "Failed to set WM8804 SYSCLK: %d\n", ret); +- return ret; +- } +- +- /* Enable TX output */ +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); +- +- /* Power on */ +- snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); +- +- /* set sampling frequency status bits */ +- snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); +- +- return snd_soc_dai_set_bclk_ratio(cpu_dai,64); +-} +- +-/* machine stream operations */ +-static struct snd_soc_ops snd_rpi_boomberry_digi_ops = { +- .hw_params = snd_rpi_boomberry_digi_hw_params, +- .startup = snd_rpi_boomberry_digi_startup, +- .shutdown = snd_rpi_boomberry_digi_shutdown, +-}; +- +-static struct snd_soc_dai_link snd_rpi_boomberry_digi_dai[] = { +-{ +- .name = "BoomBerry Digi", +- .stream_name = "BoomBerry Digi HiFi", +- .cpu_dai_name = "bcm2708-i2s.0", +- .codec_dai_name = "wm8804-spdif", +- .platform_name = "bcm2708-i2s.0", +- .codec_name = "wm8804.1-003b", +- .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | +- SND_SOC_DAIFMT_CBM_CFM, +- .ops = &snd_rpi_boomberry_digi_ops, +- .init = snd_rpi_boomberry_digi_init, +-}, +-}; +- +-/* audio machine driver */ +-static struct snd_soc_card snd_rpi_boomberry_digi = { +- .name = "snd_rpi_boomberry_digi", +- .owner = THIS_MODULE, +- .dai_link = snd_rpi_boomberry_digi_dai, +- .num_links = ARRAY_SIZE(snd_rpi_boomberry_digi_dai), +-}; +- +-static int snd_rpi_boomberry_digi_probe(struct platform_device *pdev) +-{ +- int ret = 0; +- +- snd_rpi_boomberry_digi.dev = &pdev->dev; +- +- if (pdev->dev.of_node) { +- struct device_node *i2s_node; +- struct snd_soc_dai_link *dai = &snd_rpi_boomberry_digi_dai[0]; +- i2s_node = of_parse_phandle(pdev->dev.of_node, +- "i2s-controller", 0); +- +- if (i2s_node) { +- dai->cpu_dai_name = NULL; +- dai->cpu_of_node = i2s_node; +- dai->platform_name = NULL; +- dai->platform_of_node = i2s_node; +- } +- } +- +- ret = snd_soc_register_card(&snd_rpi_boomberry_digi); +- if (ret) +- dev_err(&pdev->dev, +- "snd_soc_register_card() failed: %d\n", ret); +- +- return ret; +-} +- +-static int snd_rpi_boomberry_digi_remove(struct platform_device *pdev) +-{ +- return snd_soc_unregister_card(&snd_rpi_boomberry_digi); +-} +- +-static const struct of_device_id snd_rpi_boomberry_digi_of_match[] = { +- { .compatible = "boomberry,boomberry-digi", }, +- {}, +-}; +-MODULE_DEVICE_TABLE(of, snd_rpi_boomberry_digi_of_match); +- +-static struct platform_driver snd_rpi_boomberry_digi_driver = { +- .driver = { +- .name = "snd-rpi-boomberry-digi", +- .owner = THIS_MODULE, +- .of_match_table = snd_rpi_boomberry_digi_of_match, +- }, +- .probe = snd_rpi_boomberry_digi_probe, +- .remove = snd_rpi_boomberry_digi_remove, +-}; +- +-module_platform_driver(snd_rpi_boomberry_digi_driver); +- +-MODULE_AUTHOR("Milan Neskovic "); +-MODULE_DESCRIPTION("ASoC Driver for BoomBerry PI Digi HAT Sound Card"); +-MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/bcm/justboom-dac.c b/sound/soc/bcm/justboom-dac.c +new file mode 100644 +index 0000000000000000000000000000000000000000..8fd50dbe681508a2cfe8fdde1c9fedbe9a507fa7 +--- /dev/null ++++ b/sound/soc/bcm/justboom-dac.c +@@ -0,0 +1,162 @@ ++/* ++ * ASoC Driver for JustBoom DAC Raspberry Pi HAT Sound Card ++ * ++ * Author: Milan Neskovic ++ * Copyright 2016 ++ * based on code by Daniel Matuschek ++ * based on code by Florian Meier ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/pcm512x.h" ++ ++static bool digital_gain_0db_limit = true; ++ ++static int snd_rpi_justboom_dac_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08); ++ snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02); ++ snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); ++ ++ if (digital_gain_0db_limit) ++ { ++ int ret; ++ struct snd_soc_card *card = rtd->card; ++ ++ ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207); ++ if (ret < 0) ++ dev_warn(card->dev, "Failed to set volume limit: %d\n", ret); ++ } ++ ++ return 0; ++} ++ ++static int snd_rpi_justboom_dac_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ /*return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);*/ ++ unsigned int sample_bits = ++ snd_pcm_format_physical_width(params_format(params)); ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2); ++} ++ ++static int snd_rpi_justboom_dac_startup(struct snd_pcm_substream *substream) { ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); ++ return 0; ++} ++ ++static void snd_rpi_justboom_dac_shutdown(struct snd_pcm_substream *substream) { ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00); ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_rpi_justboom_dac_ops = { ++ .hw_params = snd_rpi_justboom_dac_hw_params, ++ .startup = snd_rpi_justboom_dac_startup, ++ .shutdown = snd_rpi_justboom_dac_shutdown, ++}; ++ ++static struct snd_soc_dai_link snd_rpi_justboom_dac_dai[] = { ++{ ++ .name = "JustBoom DAC", ++ .stream_name = "JustBoom DAC HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "pcm512x-hifi", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "pcm512x.1-004d", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBS_CFS, ++ .ops = &snd_rpi_justboom_dac_ops, ++ .init = snd_rpi_justboom_dac_init, ++}, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_rpi_justboom_dac = { ++ .name = "snd_rpi_justboom_dac", ++ .owner = THIS_MODULE, ++ .dai_link = snd_rpi_justboom_dac_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_justboom_dac_dai), ++}; ++ ++static int snd_rpi_justboom_dac_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_rpi_justboom_dac.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_justboom_dac_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ ++ digital_gain_0db_limit = !of_property_read_bool( ++ pdev->dev.of_node, "justboom,24db_digital_gain"); ++ } ++ ++ ret = snd_soc_register_card(&snd_rpi_justboom_dac); ++ if (ret) ++ dev_err(&pdev->dev, ++ "snd_soc_register_card() failed: %d\n", ret); ++ ++ return ret; ++} ++ ++static int snd_rpi_justboom_dac_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_rpi_justboom_dac); ++} ++ ++static const struct of_device_id snd_rpi_justboom_dac_of_match[] = { ++ { .compatible = "justboom,justboom-dac", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_rpi_justboom_dac_of_match); ++ ++static struct platform_driver snd_rpi_justboom_dac_driver = { ++ .driver = { ++ .name = "snd-rpi-justboom-dac", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_rpi_justboom_dac_of_match, ++ }, ++ .probe = snd_rpi_justboom_dac_probe, ++ .remove = snd_rpi_justboom_dac_remove, ++}; ++ ++module_platform_driver(snd_rpi_justboom_dac_driver); ++ ++MODULE_AUTHOR("Milan Neskovic "); ++MODULE_DESCRIPTION("ASoC Driver for JustBoom PI DAC HAT Sound Card"); ++MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/bcm/justboom-digi.c b/sound/soc/bcm/justboom-digi.c +new file mode 100644 +index 0000000000000000000000000000000000000000..91acb666380faa3c0deb2230f8a0f8bbec59417b +--- /dev/null ++++ b/sound/soc/bcm/justboom-digi.c +@@ -0,0 +1,215 @@ ++/* ++ * ASoC Driver for JustBoom Raspberry Pi Digi HAT Sound Card ++ * ++ * Author: Milan Neskovic ++ * Copyright 2016 ++ * based on code by Daniel Matuschek ++ * based on code by Florian Meier ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/wm8804.h" ++ ++static int snd_rpi_justboom_digi_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ ++ /* enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ return 0; ++} ++ ++static int snd_rpi_justboom_digi_startup(struct snd_pcm_substream *substream) { ++ /* turn on digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); ++ return 0; ++} ++ ++static void snd_rpi_justboom_digi_shutdown(struct snd_pcm_substream *substream) { ++ /* turn off output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); ++} ++ ++static int snd_rpi_justboom_digi_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ int sysclk = 27000000; /* This is fixed on this board */ ++ ++ long mclk_freq=0; ++ int mclk_div=1; ++ int sampling_freq=1; ++ ++ int ret; ++ ++ int samplerate = params_rate(params); ++ ++ if (samplerate<=96000) { ++ mclk_freq=samplerate*256; ++ mclk_div=WM8804_MCLKDIV_256FS; ++ } else { ++ mclk_freq=samplerate*128; ++ mclk_div=WM8804_MCLKDIV_128FS; ++ } ++ ++ switch (samplerate) { ++ case 32000: ++ sampling_freq=0x03; ++ break; ++ case 44100: ++ sampling_freq=0x00; ++ break; ++ case 48000: ++ sampling_freq=0x02; ++ break; ++ case 88200: ++ sampling_freq=0x08; ++ break; ++ case 96000: ++ sampling_freq=0x0a; ++ break; ++ case 176400: ++ sampling_freq=0x0c; ++ break; ++ case 192000: ++ sampling_freq=0x0e; ++ break; ++ default: ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", ++ samplerate); ++ } ++ ++ snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); ++ snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, ++ sysclk, SND_SOC_CLOCK_OUT); ++ if (ret < 0) { ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK: %d\n", ret); ++ return ret; ++ } ++ ++ /* Enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ /* Power on */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); ++ ++ /* set sampling frequency status bits */ ++ snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai,64); ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_rpi_justboom_digi_ops = { ++ .hw_params = snd_rpi_justboom_digi_hw_params, ++ .startup = snd_rpi_justboom_digi_startup, ++ .shutdown = snd_rpi_justboom_digi_shutdown, ++}; ++ ++static struct snd_soc_dai_link snd_rpi_justboom_digi_dai[] = { ++{ ++ .name = "JustBoom Digi", ++ .stream_name = "JustBoom Digi HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8804-spdif", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "wm8804.1-003b", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ .ops = &snd_rpi_justboom_digi_ops, ++ .init = snd_rpi_justboom_digi_init, ++}, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_rpi_justboom_digi = { ++ .name = "snd_rpi_justboom_digi", ++ .owner = THIS_MODULE, ++ .dai_link = snd_rpi_justboom_digi_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_justboom_digi_dai), ++}; ++ ++static int snd_rpi_justboom_digi_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_rpi_justboom_digi.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_rpi_justboom_digi_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ } ++ ++ ret = snd_soc_register_card(&snd_rpi_justboom_digi); ++ if (ret) ++ dev_err(&pdev->dev, ++ "snd_soc_register_card() failed: %d\n", ret); ++ ++ return ret; ++} ++ ++static int snd_rpi_justboom_digi_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_rpi_justboom_digi); ++} ++ ++static const struct of_device_id snd_rpi_justboom_digi_of_match[] = { ++ { .compatible = "justboom,justboom-digi", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_rpi_justboom_digi_of_match); ++ ++static struct platform_driver snd_rpi_justboom_digi_driver = { ++ .driver = { ++ .name = "snd-rpi-justboom-digi", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_rpi_justboom_digi_of_match, ++ }, ++ .probe = snd_rpi_justboom_digi_probe, ++ .remove = snd_rpi_justboom_digi_remove, ++}; ++ ++module_platform_driver(snd_rpi_justboom_digi_driver); ++ ++MODULE_AUTHOR("Milan Neskovic "); ++MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); ++MODULE_LICENSE("GPL v2"); + +From 67ebb0e0b421bc6ab803ca163502db158f2cf459 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <6by9@users.noreply.github.com> +Date: Wed, 25 May 2016 23:25:36 +0100 +Subject: [PATCH 361/398] BCM2835-V4L2: Correct handling for BGR24 vs RGB24. + +There was a bug in the GPU firmware that had reversed these +two formats. +Detect the old firmware, and reverse the formats if necessary. + +Signed-off-by: Dave Stevenson <6by9@users.noreply.github.com> +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 69 ++++++++++++++++++------- + drivers/media/platform/bcm2835/bcm2835-camera.h | 1 + + 2 files changed, 52 insertions(+), 18 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 1da6fcfb6b314fce8947df77bd4bb239bfc84c6d..a2cfff91331f27e5132017ecd487d3da921bc87e 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -115,7 +115,7 @@ static struct mmal_fmt formats[] = { + .name = "RGB24 (LE)", + .fourcc = V4L2_PIX_FMT_RGB24, + .flags = 0, +- .mmal = MMAL_ENCODING_BGR24, ++ .mmal = MMAL_ENCODING_RGB24, + .depth = 24, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 3, +@@ -187,7 +187,7 @@ static struct mmal_fmt formats[] = { + .name = "RGB24 (BE)", + .fourcc = V4L2_PIX_FMT_BGR24, + .flags = 0, +- .mmal = MMAL_ENCODING_RGB24, ++ .mmal = MMAL_ENCODING_BGR24, + .depth = 24, + .mmal_component = MMAL_COMPONENT_CAMERA, + .ybbp = 3, +@@ -1059,6 +1059,13 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, + else + camera_port->format.encoding = mfmt->mmal; + ++ if (dev->rgb_bgr_swapped) { ++ if (camera_port->format.encoding == MMAL_ENCODING_RGB24) ++ camera_port->format.encoding = MMAL_ENCODING_BGR24; ++ else if (camera_port->format.encoding == MMAL_ENCODING_BGR24) ++ camera_port->format.encoding = MMAL_ENCODING_RGB24; ++ } ++ + camera_port->format.encoding_variant = 0; + camera_port->es.video.width = f->fmt.pix.width; + camera_port->es.video.height = f->fmt.pix.height; +@@ -1569,12 +1576,17 @@ static int set_camera_parameters(struct vchiq_mmal_instance *instance, + return ret; + } + ++#define MAX_SUPPORTED_ENCODINGS 20 ++ + /* MMAL instance and component init */ + static int __init mmal_init(struct bm2835_mmal_dev *dev) + { + int ret; + struct mmal_es_format *format; + u32 bool_true = 1; ++ u32 supported_encodings[MAX_SUPPORTED_ENCODINGS]; ++ int param_size; ++ struct vchiq_mmal_component *camera; + + ret = vchiq_mmal_init(&dev->instance); + if (ret < 0) +@@ -1586,21 +1598,48 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + if (ret < 0) + goto unreg_mmal; + +- if (dev->component[MMAL_COMPONENT_CAMERA]->outputs < +- MMAL_CAMERA_PORT_COUNT) { ++ camera = dev->component[MMAL_COMPONENT_CAMERA]; ++ if (camera->outputs < MMAL_CAMERA_PORT_COUNT) { + ret = -EINVAL; + goto unreg_camera; + } + + ret = set_camera_parameters(dev->instance, +- dev->component[MMAL_COMPONENT_CAMERA], ++ camera, + dev); + if (ret < 0) + goto unreg_camera; + +- format = +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_PREVIEW].format; ++ /* There was an error in the firmware that meant the camera component ++ * produced BGR instead of RGB. ++ * This is now fixed, but in order to support the old firmwares, we ++ * have to check. ++ */ ++ dev->rgb_bgr_swapped = true; ++ param_size = sizeof(supported_encodings); ++ ret = vchiq_mmal_port_parameter_get(dev->instance, ++ &camera->output[MMAL_CAMERA_PORT_CAPTURE], ++ MMAL_PARAMETER_SUPPORTED_ENCODINGS, ++ &supported_encodings, ++ ¶m_size); ++ if (ret == 0) { ++ int i; ++ ++ for (i = 0; i < param_size/sizeof(u32); i++) { ++ if (supported_encodings[i] == MMAL_ENCODING_BGR24) { ++ /* Found BGR24 first - old firmware. */ ++ break; ++ } ++ if (supported_encodings[i] == MMAL_ENCODING_RGB24) { ++ /* Found RGB24 first ++ * new firmware, so use RGB24. ++ */ ++ dev->rgb_bgr_swapped = false; ++ break; ++ } ++ } ++ } ++ format = &camera->output[MMAL_CAMERA_PORT_PREVIEW].format; + + format->encoding = MMAL_ENCODING_OPAQUE; + format->encoding_variant = MMAL_ENCODING_I420; +@@ -1614,9 +1653,7 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + format->es->video.frame_rate.num = 0; /* Rely on fps_range */ + format->es->video.frame_rate.den = 1; + +- format = +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_VIDEO].format; ++ format = &camera->output[MMAL_CAMERA_PORT_VIDEO].format; + + format->encoding = MMAL_ENCODING_OPAQUE; + format->encoding_variant = MMAL_ENCODING_I420; +@@ -1631,14 +1668,11 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + format->es->video.frame_rate.den = 1; + + vchiq_mmal_port_parameter_set(dev->instance, +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_VIDEO], ++ &camera->output[MMAL_CAMERA_PORT_VIDEO], + MMAL_PARAMETER_NO_IMAGE_PADDING, + &bool_true, sizeof(bool_true)); + +- format = +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_CAPTURE].format; ++ format = &camera->output[MMAL_CAMERA_PORT_CAPTURE].format; + + format->encoding = MMAL_ENCODING_OPAQUE; + +@@ -1660,8 +1694,7 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) + dev->capture.enc_level = V4L2_MPEG_VIDEO_H264_LEVEL_4_0; + + vchiq_mmal_port_parameter_set(dev->instance, +- &dev->component[MMAL_COMPONENT_CAMERA]-> +- output[MMAL_CAMERA_PORT_CAPTURE], ++ &camera->output[MMAL_CAMERA_PORT_CAPTURE], + MMAL_PARAMETER_NO_IMAGE_PADDING, + &bool_true, sizeof(bool_true)); + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 13f426f5ecdffeab714d658a6f8b76e63af5fcdb..e6aeb7e7e381de65d6c6586205069a4c5cd33274 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.h ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.h +@@ -109,6 +109,7 @@ struct bm2835_mmal_dev { + unsigned int camera_num; + unsigned int max_width; + unsigned int max_height; ++ unsigned int rgb_bgr_swapped; + }; + + int bm2835_mmal_init_controls( + +From 046f7aef5b5c6c5251d5b7b1ed0c7e2670319da6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 3 Jun 2016 22:21:47 +0100 +Subject: [PATCH 362/398] BCM270X_DT: Add mcp23017 to the overlay Makefile + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 0adb5b92c047cb7e12871cf75515f822924924cd..c514bbfe7384f58d5db4e861d842bd772cc4e51a 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -44,6 +44,7 @@ dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += justboom-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += justboom-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp23017.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo + +From e65c8432e4bc232a93dfe1cca96f4ccd8bead88c Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 3 Jun 2016 23:01:01 +0100 +Subject: [PATCH 363/398] BCM270X_DT: Sort entries to placate check script + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index c514bbfe7384f58d5db4e861d842bd772cc4e51a..ed62846e18e4d3098169f05a1a8ba16caf1619aa 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -18,10 +18,10 @@ dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo + dtbo-$(RPI_DT_OVERLAYS) += enc28j60.dtbo + dtbo-$(RPI_DT_OVERLAYS) += gpio-ir.dtbo + dtbo-$(RPI_DT_OVERLAYS) += gpio-poweroff.dtbo +@@ -31,10 +31,10 @@ dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hifiberry-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo + dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-mux.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo + dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo +@@ -73,16 +73,16 @@ dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio-1bit.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdtweak.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi2-1cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi2-2cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi2-3cs.dtbo +-dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo + dtbo-$(RPI_DT_OVERLAYS) += tinylcd35.dtbo + dtbo-$(RPI_DT_OVERLAYS) += uart1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += vc4-kms-v3d.dtbo + +From ba143cfa2b2cac3ea6b50d11b173ebdbaa4b5c76 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sat, 4 Jun 2016 11:30:48 +0200 +Subject: [PATCH 364/398] gpio-ir overlay: gpio_pin shouldn't change pull + setting + +Signed-off-by: Matthias Reichl +--- + arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts +index a2d6bc79f4cd2604e6c65c000668cbb228327fe6..af5baf7ddc92be7a59ad3d5f9a9fefba915bed05 100644 +--- a/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts ++++ b/arch/arm/boot/dts/overlays/gpio-ir-overlay.dts +@@ -36,8 +36,7 @@ + __overrides__ { + // parameters + gpio_pin = <&gpio_ir>,"gpios:4", +- <&gpio_ir_pins>,"brcm,pins:0", +- <&gpio_ir_pins>,"brcm,pull:0"; // pin number ++ <&gpio_ir_pins>,"brcm,pins:0"; // pin number + gpio_pull = <&gpio_ir_pins>,"brcm,pull:0"; // pull-up/down state + + rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map + +From 885ba53dfb47105c09a418101affcdadead7ba09 Mon Sep 17 00:00:00 2001 +From: Eric Nelson +Date: Sat, 3 Oct 2015 08:18:50 -0700 +Subject: [PATCH 365/398] [media] rc-core: define a default timeout for drivers + +A default timeout value of 125 ms should work for all decoders. + +Declare a constant to help standardize its' use. + +Signed-off-by: Eric Nelson +Signed-off-by: Mauro Carvalho Chehab +--- + include/media/rc-core.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/media/rc-core.h b/include/media/rc-core.h +index ec921f6538c777db5d81deb655ecfdf6facc4b83..f6494709e230d0a34a5486ccb89236494a53edb7 100644 +--- a/include/media/rc-core.h ++++ b/include/media/rc-core.h +@@ -239,6 +239,7 @@ static inline void init_ir_raw_event(struct ir_raw_event *ev) + memset(ev, 0, sizeof(*ev)); + } + ++#define IR_DEFAULT_TIMEOUT MS_TO_NS(125) + #define IR_MAX_DURATION 500000000 /* 500 ms */ + #define US_TO_NS(usec) ((usec) * 1000) + #define MS_TO_US(msec) ((msec) * 1000) + +From d067ecc0fa76cb30de0a33a0876be1e66991b9c7 Mon Sep 17 00:00:00 2001 +From: Eric Nelson +Date: Wed, 23 Sep 2015 11:07:08 -0300 +Subject: [PATCH 366/398] [media] rc: gpio-ir-recv: add timeout on idle + +Many decoders require a trailing space (period without IR illumination) +to be delivered before completing a decode. + +Since the gpio-ir-recv driver only delivers events on gpio transitions, +a single IR symbol (caused by a quick touch on an IR remote) will not +be properly decoded without the use of a timer to flush the tail end +state of the IR receiver. + +This patch initializes and uses a timer and the timeout field of rcdev +to complete the stream and allow decode. + +The timeout can be overridden through the use of the LIRC_SET_REC_TIMEOUT +ioctl. + +Signed-off-by: Eric Nelson +Acked-by: Sean Young +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/rc/gpio-ir-recv.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c +index 7dbc9ca6d8852ba49b7c2693ca882068f0fc2bf1..f62e3f1f9d9dcc1987721b220547dfa388a1a1bc 100644 +--- a/drivers/media/rc/gpio-ir-recv.c ++++ b/drivers/media/rc/gpio-ir-recv.c +@@ -30,6 +30,7 @@ struct gpio_rc_dev { + struct rc_dev *rcdev; + int gpio_nr; + bool active_low; ++ struct timer_list flush_timer; + }; + + #ifdef CONFIG_OF +@@ -93,12 +94,26 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id) + if (rc < 0) + goto err_get_value; + ++ mod_timer(&gpio_dev->flush_timer, ++ jiffies + nsecs_to_jiffies(gpio_dev->rcdev->timeout)); ++ + ir_raw_event_handle(gpio_dev->rcdev); + + err_get_value: + return IRQ_HANDLED; + } + ++static void flush_timer(unsigned long arg) ++{ ++ struct gpio_rc_dev *gpio_dev = (struct gpio_rc_dev *)arg; ++ DEFINE_IR_RAW_EVENT(ev); ++ ++ ev.timeout = true; ++ ev.duration = gpio_dev->rcdev->timeout; ++ ir_raw_event_store(gpio_dev->rcdev, &ev); ++ ir_raw_event_handle(gpio_dev->rcdev); ++} ++ + static int gpio_ir_recv_probe(struct platform_device *pdev) + { + struct gpio_rc_dev *gpio_dev; +@@ -144,6 +159,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) + rcdev->input_id.version = 0x0100; + rcdev->dev.parent = &pdev->dev; + rcdev->driver_name = GPIO_IR_DRIVER_NAME; ++ rcdev->min_timeout = 0; ++ rcdev->timeout = IR_DEFAULT_TIMEOUT; ++ rcdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT; + if (pdata->allowed_protos) + rcdev->allowed_protocols = pdata->allowed_protos; + else +@@ -154,6 +172,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) + gpio_dev->gpio_nr = pdata->gpio_nr; + gpio_dev->active_low = pdata->active_low; + ++ setup_timer(&gpio_dev->flush_timer, flush_timer, ++ (unsigned long)gpio_dev); ++ + rc = gpio_request(pdata->gpio_nr, "gpio-ir-recv"); + if (rc < 0) + goto err_gpio_request; +@@ -196,6 +217,7 @@ static int gpio_ir_recv_remove(struct platform_device *pdev) + struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev); + + free_irq(gpio_to_irq(gpio_dev->gpio_nr), gpio_dev); ++ del_timer_sync(&gpio_dev->flush_timer); + rc_unregister_device(gpio_dev->rcdev); + gpio_free(gpio_dev->gpio_nr); + kfree(gpio_dev); + +From d08e4db32da4ddd74080512ca5b3ee1da87935db Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Thu, 19 Nov 2015 11:41:36 -0200 +Subject: [PATCH 367/398] smsir.h: remove a now duplicated definition + (IR_DEFAULT_TIMEOUT) + +This macro is now part of the core. Remove from Siano driver. + +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/common/siano/smsir.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/media/common/siano/smsir.h b/drivers/media/common/siano/smsir.h +index fc8b7925c53252c28b3ba46e4fca8bf961873c43..d9abd96ef48bf5e0a3f9bb9ccdf7f407669ddfd1 100644 +--- a/drivers/media/common/siano/smsir.h ++++ b/drivers/media/common/siano/smsir.h +@@ -30,8 +30,6 @@ along with this program. If not, see . + #include + #include + +-#define IR_DEFAULT_TIMEOUT 100 +- + struct smscore_device_t; + + struct ir_t { + +From fb3d7d9d61fa6533a3eb2a83918390b399c37640 Mon Sep 17 00:00:00 2001 +From: Nicolas Boullis +Date: Sat, 4 Jun 2016 00:57:06 +0200 +Subject: [PATCH 368/398] Implement a "wakeup-source" option for the i2c-rtc + DeviceTree overlay. + +See: https://github.com/raspberrypi/linux/pull/1511 +--- + arch/arm/boot/dts/overlays/README | 3 +++ + arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 1516cc2e1616bb5e0cb519e05eee6776fe84e52a..628cff3fc60a13b26b3f2f572573884df480c7bf 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -445,6 +445,9 @@ Params: ds1307 Select the DS1307 device + + trickle-resistor-ohms Resistor value for trickle charge (DS1339-only) + ++ wakeup-source Specify that the RTC can be used as a wakeup ++ source ++ + + Name: i2c0-bcm2708 + Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations +diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +index 40656474dfc16505433221a745c1d129c2737399..8b6f978155c02409eeb7c83353b8194fa3462435 100644 +--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +@@ -65,5 +65,9 @@ + pcf8523 = <&pcf8523>,"status"; + pcf8563 = <&pcf8563>,"status"; + trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0"; ++ wakeup-source = <&ds1339>,"wakeup-source?", ++ <&ds3231>,"wakeup-source?", ++ <&mcp7940x>,"wakeup-source?", ++ <&mcp7941x>,"wakeup-source?"; + }; + }; + +From 7f29fb93dd2c418cab07717ee242e96941f60d17 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 3 Jun 2016 21:56:40 +0100 +Subject: [PATCH 369/398] BCM270X_DT: Fix rpi-dac overlay + +The rpi-dac overlay is almost identical to the hifiberry-dac overlay - +the codec used is different but it also doesn't sit on the I2C bus. As +a result, when the overlays were modified for dynamic loading and it +was discovered that the hifiberry-dac overlay didn't work any more, the +the rpi-dac overlay was also broken. + +The failure was caused by the fact that outside a bus, device names are +constructed from the concatenation of the path elements leading to it, +so moving the codec instantiation inside /soc caused the device name +to get a "soc" added, breaking ALSA's naming. + +See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +index 1523eae9c39997aa68cfa583ada92a92395bb1e0..a442c8f0ec01b7503f32e070683a984e895f5668 100644 +--- a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts +@@ -13,7 +13,7 @@ + }; + + fragment@1 { +- target = <&soc>; ++ target-path = "/"; + __overlay__ { + pcm1794a-codec { + #sound-dai-cells = <0>; + +From 63102a32cd5e7453af86599d95297513470d6220 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 6 Jun 2016 09:23:37 +0100 +Subject: [PATCH 370/398] BCM270X_DT: Make i2c-gpio usable by other overlays + +Modify the i2c-gpio overlay to export symbol i2c-gpio for use by other +overlays. Export the alias as well for good measure. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts +index 2a2dc986770cfb036492ba8de19cbaff521c5fd5..b72b32e936774d901bc253b06e025c2dd48bdb1b 100644 +--- a/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts +@@ -19,6 +19,21 @@ + }; + }; + }; ++ ++ fragment@1 { ++ target-path = "/aliases"; ++ __overlay__ { ++ i2c_gpio = "/i2c@0"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "/__symbols__"; ++ __overlay__ { ++ i2c_gpio = "/i2c@0"; ++ }; ++ }; ++ + __overrides__ { + i2c_gpio_sda = <&i2c_gpio>,"gpios:4"; + i2c_gpio_scl = <&i2c_gpio>,"gpios:16"; + +From ecf7d9c349b80ef5a12b3511a8ee27048d1c6972 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:19:27 +0100 +Subject: [PATCH 371/398] brcmfmac: revise SDIO error message in + brcmf_sdio_drivestrengthinit + +The error message is given for something that is not an error here as +the drive strength configuration may not be applicable for specific +devices. Therefore the error message is rephrased and changed to a +debug message. + +[ Patch from Broadcom ] + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +index 818f7562f6b42d6eb7c1c454179a0722bc6ab5a0..fee5ff5168268553f25e49236ab2b2848e402c0a 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +@@ -3769,7 +3769,7 @@ brcmf_sdio_drivestrengthinit(struct brcmf_sdio_dev *sdiodev, + str_shift = 11; + break; + default: +- brcmf_err("No SDIO Drive strength init done for chip %s rev %d pmurev %d\n", ++ brcmf_dbg(INFO, "No SDIO driver strength init needed for chip %s rev %d pmurev %d\n", + ci->name, ci->chiprev, ci->pmurev); + break; + } + +From 27e19b05084085ba81db22ef5dc3a9b0731b116f Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:26:31 +0100 +Subject: [PATCH 372/398] brcmfmac: use ndev->needed_headroom to reserve + additional header space + +When using nmap tool with FMAC, the nmap packets were be dropped by kernel +because the size was too short. The kernel message showed like +"nmap: packet size is too short (42 <= 50)". It is caused by the packet +length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE() +and hard_header_len definition, we should use hard_header_len to reserve L2 +header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for +the additional headroom needed by hardware. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1357 + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/core.c b/drivers/net/wireless/brcm80211/brcmfmac/core.c +index b5ab98ee14455aea9774814128faa8b0177a0071..842d0786b076eccdb7cffc32921d32db71c8371b 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/core.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/core.c +@@ -696,7 +696,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked) + /* set appropriate operations */ + ndev->netdev_ops = &brcmf_netdev_ops_pri; + +- ndev->hard_header_len += drvr->hdrlen; ++ ndev->needed_headroom += drvr->hdrlen; + ndev->ethtool_ops = &brcmf_ethtool_ops; + + drvr->rxsz = ndev->mtu + ndev->hard_header_len + + +From 435aa4b8b9a3e4dc75b40d8352839e7ba2c55caf Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 6 Jun 2016 11:11:33 +0100 +Subject: [PATCH 373/398] brcmfmac: change rx_seq check log from error print to + debug print + +The bus rx sequence is not in order because that control and event +frames always cause immediate send, but data frames may be held +for glomming in firmware side. It is not actually an error as the +packets are still processed even if the RX sequence is not in order. +Therefore the error message is rephrased and changed to a debug +message. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1313 +--- + drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +index fee5ff5168268553f25e49236ab2b2848e402c0a..652fd12d734001e1e08d7b58834b5c87a92f30aa 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +@@ -1476,8 +1476,7 @@ static int brcmf_sdio_hdparse(struct brcmf_sdio *bus, u8 *header, + return -ENXIO; + } + if (rd->seq_num != rx_seq) { +- brcmf_err("seq %d: sequence number error, expect %d\n", +- rx_seq, rd->seq_num); ++ brcmf_dbg(SDIO, "seq %d, expected %d\n", rx_seq, rd->seq_num); + bus->sdcnt.rx_badseq++; + rd->seq_num = rx_seq; + } + +From d329ead5160a817c0138f6d4f9b1f27d622cccb7 Mon Sep 17 00:00:00 2001 +From: Erik Sejr +Date: Tue, 7 Jun 2016 20:58:17 -0400 +Subject: [PATCH 374/398] Add ads1015 overlay + +See: https://github.com/raspberrypi/linux/pull/1520 +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 22 ++++++ + arch/arm/boot/dts/overlays/ads1015-overlay.dts | 98 ++++++++++++++++++++++++++ + 3 files changed, 121 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/ads1015-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index ed62846e18e4d3098169f05a1a8ba16caf1619aa..e17bea26c888d805c3badd0ef48cc5021766b094 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + endif + + dtbo-$(RPI_DT_OVERLAYS) += adau1977-adc.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += ads1015.dtbo + dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 628cff3fc60a13b26b3f2f572573884df480c7bf..887431824c79792fa7b42ded78e60a2427806865 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -168,6 +168,28 @@ Load: dtoverlay=adau1977-adc + Params: + + ++Name: ads1015 ++Info: Overlay for activation of Texas Instruments ADS1015 ADC over I2C ++Load: dtoverlay=ads1015,= ++Params: addr I2C bus address of device. Set based on how the ++ addr pin is wired. (default=0x48 assumes addr ++ is pulled to GND) ++ cha_enable Enable virtual channel a. (default=true) ++ cha_cfg Set the configuration for virtual channel a. ++ (default=4 configures this channel for the ++ voltage at A0 with respect to GND) ++ cha_datarate Set the datarate (samples/sec) for this channel. ++ (default=4 sets 1600 sps) ++ cha_gain Set the gain of the Programmable Gain ++ Amplifier for this channel. (default=2 sets the ++ full scale of the channel to 2.048 Volts) ++ ++ Channel (ch) parameters can be set for each enabled channel. ++ A maximum of 4 channels can be enabled (letters a thru d). ++ For more information refer to the device datasheet at: ++ http://www.ti.com/lit/ds/symlink/ads1015.pdf ++ ++ + Name: ads7846 + Info: ADS7846 Touch controller + Load: dtoverlay=ads7846,= +diff --git a/arch/arm/boot/dts/overlays/ads1015-overlay.dts b/arch/arm/boot/dts/overlays/ads1015-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..02b9de46299bae8f22e1a665a482c0cb99cd30c9 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/ads1015-overlay.dts +@@ -0,0 +1,98 @@ ++/* ++ * 2016 - Erik Sejr ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ /* ----------- ADS1015 ------------ */ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ads1015: ads1015 { ++ compatible = "ti,ads1015"; ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x48>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "i2c_arm/ads1015"; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_a: channel_a { ++ reg = <4>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "i2c_arm/ads1015"; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_b: channel_b { ++ reg = <5>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "i2c_arm/ads1015"; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_c: channel_c { ++ reg = <6>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target-path = "i2c_arm/ads1015"; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ channel_d: channel_d { ++ reg = <7>; ++ ti,gain = <2>; ++ ti,datarate = <4>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ addr = <&ads1015>,"reg:0"; ++ cha_enable = <0>,"=1"; ++ cha_cfg = <&channel_a>,"reg:0"; ++ cha_gain = <&channel_a>,"ti,gain:0"; ++ cha_datarate = <&channel_a>,"ti,datarate:0"; ++ chb_enable = <0>,"=2"; ++ chb_cfg = <&channel_b>,"reg:0"; ++ chb_gain = <&channel_b>,"ti,gain:0"; ++ chb_datarate = <&channel_b>,"ti,datarate:0"; ++ chc_enable = <0>,"=3"; ++ chc_cfg = <&channel_c>,"reg:0"; ++ chc_gain = <&channel_c>,"ti,gain:0"; ++ chc_datarate = <&channel_c>,"ti,datarate:0"; ++ chd_enable = <0>,"=4"; ++ chd_cfg = <&channel_d>,"reg:0"; ++ chd_gain = <&channel_d>,"ti,gain:0"; ++ chd_datarate = <&channel_d>,"ti,datarate:0"; ++ }; ++ ++}; + +From 6bbb839100a4930f4d8f134cee30ab0cb6344ed3 Mon Sep 17 00:00:00 2001 +From: Michael Kaplan +Date: Wed, 8 Jun 2016 15:14:11 +0200 +Subject: [PATCH 375/398] Fixed MCP23017 section in overlay README + +Old description could have led to the misunderstanding that it is an +i2c port expander, but in fact it is a gpio expander. +--- + arch/arm/boot/dts/overlays/README | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 887431824c79792fa7b42ded78e60a2427806865..dcb6849b0bc0ca2c8cec3a80ae1ae4bd2c15ac1f 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -595,7 +595,7 @@ Params: gpio_out_pin GPIO for output (default "17") + + + Name: mcp23017 +-Info: Configures the MCP23017 I2C port expander ++Info: Configures the MCP23017 I2C GPIO expander + Load: dtoverlay=mcp23017,= + Params: gpiopin Gpio pin connected to the INTA output of the + MCP23017 (default: 4) + +From 60ded884d95b9b523646ef4a0e3af9b36ffabdc3 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:13 +0000 +Subject: [PATCH 376/398] Revert "bcm2835-dma: Fix up convert to DMA pool" + +This reverts commit ec2e48fda22c57cab56a4332d1a095f91c919493. +--- + drivers/dma/bcm2835-dma.c | 36 ++++++++++-------------------------- + 1 file changed, 10 insertions(+), 26 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index d26b6bdbcf1ab33ab92937b889a37e505c925311..6b87ce2bb3c9d30e54e0da4f76586d3f077f6aa9 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -488,17 +488,6 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + c->cyclic = true; + + return vchan_tx_prep(&c->vc, &d->vd, flags); +-error_cb: +- i--; +- for (; i >= 0; i--) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; +- +- dma_pool_free(c->cb_pool, cb_entry->cb, cb_entry->paddr); +- } +- +- kfree(d->cb_list); +- kfree(d); +- return NULL; + } + + static struct dma_async_tx_descriptor * +@@ -545,7 +534,6 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + if (!d) + return NULL; + +- d->c = c; + d->dir = direction; + + if (c->ch >= 8) /* LITE channel */ +@@ -565,21 +553,15 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + d->frames += len / max_size + 1; + } + +- d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); +- if (!d->cb_list) { ++ /* Allocate memory for control blocks */ ++ d->control_block_size = d->frames * sizeof(struct bcm2835_dma_cb); ++ d->control_block_base = dma_zalloc_coherent(chan->device->dev, ++ d->control_block_size, &d->control_block_base_phys, ++ GFP_NOWAIT); ++ if (!d->control_block_base) { + kfree(d); + return NULL; + } +- /* Allocate memory for control blocks */ +- for (i = 0; i < d->frames; i++) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; +- +- cb_entry->cb = dma_pool_zalloc(c->cb_pool, GFP_ATOMIC, +- &cb_entry->paddr); +- +- if (!cb_entry->cb) +- goto error_cb; +- } + + /* + * Iterate over all SG entries, create a control block +@@ -596,7 +578,7 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + + for (j = 0; j < len; j += max_size) { + struct bcm2835_dma_cb *control_block = +- d->cb_list[i + split_cnt].cb; ++ &d->control_block_base[i + split_cnt]; + + /* Setup addresses */ + if (d->dir == DMA_DEV_TO_MEM) { +@@ -638,7 +620,9 @@ bcm2835_dma_prep_slave_sg(struct dma_chan *chan, + if (i < sg_len - 1 || len - j > max_size) { + /* Next block is the next frame. */ + control_block->next = +- d->cb_list[i + split_cnt + 1].paddr; ++ d->control_block_base_phys + ++ sizeof(struct bcm2835_dma_cb) * ++ (i + split_cnt + 1); + } else { + /* Next block is empty. */ + control_block->next = 0; + +From 1e55d8affa4aa2946cfa325414a4c7673205de02 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:22 +0000 +Subject: [PATCH 377/398] Revert "bcm2835-dma: Limit cyclic transfers on lite + channels to 32k" + +This reverts commit 052c2005b6ecedc5abad86632f5781adda310aa7. +--- + drivers/dma/bcm2835-dma.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 6b87ce2bb3c9d30e54e0da4f76586d3f077f6aa9..5db0a95985b20a2086c65762ea8f125511f67471 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -144,12 +144,6 @@ struct bcm2835_desc { + */ + #define MAX_LITE_TRANSFER (SZ_64K - 4) + +-/* +- * Transfers larger than 32k cause issues with the bcm2708-i2s driver, +- * so limit transfer size to 32k as bcm2708-dmaengine did. +- */ +-#define MAX_CYCLIC_LITE_TRANSFER SZ_32K +- + static inline struct bcm2835_dmadev *to_bcm2835_dma_dev(struct dma_device *d) + { + return container_of(d, struct bcm2835_dmadev, ddev); +@@ -418,7 +412,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + d->c = c; + d->dir = direction; + if (c->ch >= 8) /* LITE channel */ +- max_size = MAX_CYCLIC_LITE_TRANSFER; ++ max_size = MAX_LITE_TRANSFER; + else + max_size = MAX_NORMAL_TRANSFER; + period_len = min(period_len, max_size); + +From 99ae20506cf88197199403319da3e87c814ca291 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:30 +0000 +Subject: [PATCH 378/398] Revert "dmaengine: bcm2835: Load driver early and + support legacy API" + +This reverts commit 6f56fff39c811953809b011f59c49a2122c4d173. +--- + drivers/dma/Kconfig | 2 +- + drivers/dma/bcm2835-dma.c | 30 ++++++------------------------ + 2 files changed, 7 insertions(+), 25 deletions(-) + +diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig +index 33e36b90cfeddc4e58e233c6e655a20102a7da45..b7a17b1c40e23c07d2bc0c7148eacbfafb00428e 100644 +--- a/drivers/dma/Kconfig ++++ b/drivers/dma/Kconfig +@@ -108,7 +108,7 @@ config COH901318 + + config DMA_BCM2835 + tristate "BCM2835 DMA engine support" +- depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709 ++ depends on ARCH_BCM2835 + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 5db0a95985b20a2086c65762ea8f125511f67471..696fb30b4f5a01cda9b98038b8e548368cea05f4 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -36,7 +36,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -787,10 +786,6 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + if (IS_ERR(base)) + return PTR_ERR(base); + +- rc = bcm_dmaman_probe(pdev, base, BCM2835_DMA_BULK_MASK); +- if (rc) +- dev_err(&pdev->dev, "Failed to initialize the legacy API\n"); +- + od->base = base; + + dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); +@@ -823,8 +818,11 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + goto err_no_dma; + } + +- /* Channel 0 is used by the legacy API */ +- chans_available &= ~BCM2835_DMA_BULK_MASK; ++ /* ++ * Do not use the FIQ and BULK channels, ++ * because they are used by the GPU. ++ */ ++ chans_available &= ~(BCM2835_DMA_FIQ_MASK | BCM2835_DMA_BULK_MASK); + + for (i = 0; i < pdev->num_resources; i++) { + irq = platform_get_irq(pdev, i); +@@ -868,7 +866,6 @@ static int bcm2835_dma_remove(struct platform_device *pdev) + { + struct bcm2835_dmadev *od = platform_get_drvdata(pdev); + +- bcm_dmaman_remove(pdev); + dma_async_device_unregister(&od->ddev); + bcm2835_dma_free(od); + +@@ -884,22 +881,7 @@ static struct platform_driver bcm2835_dma_driver = { + }, + }; + +-static int bcm2835_dma_init(void) +-{ +- return platform_driver_register(&bcm2835_dma_driver); +-} +- +-static void bcm2835_dma_exit(void) +-{ +- platform_driver_unregister(&bcm2835_dma_driver); +-} +- +-/* +- * Load after serial driver (arch_initcall) so we see the messages if it fails, +- * but before drivers (module_init) that need a DMA channel. +- */ +-subsys_initcall(bcm2835_dma_init); +-module_exit(bcm2835_dma_exit); ++module_platform_driver(bcm2835_dma_driver); + + MODULE_ALIAS("platform:bcm2835-dma"); + MODULE_DESCRIPTION("BCM2835 DMA engine driver"); + +From 333b3db9f8aab921341bf6b5e21a1bc6b42f1ea9 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 17:17:37 +0000 +Subject: [PATCH 379/398] Revert "dmaengine: bcm2835: Add slave dma support" + +This reverts commit 8a349301238aabb40c9da5ca8c8492b6b8d146f6. +--- + drivers/dma/bcm2835-dma.c | 206 ++++------------------------------------------ + 1 file changed, 14 insertions(+), 192 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 696fb30b4f5a01cda9b98038b8e548368cea05f4..2d72fe81243fbbcc92f52e1935ed48b6cbc23665 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -1,10 +1,11 @@ + /* + * BCM2835 DMA engine support + * ++ * This driver only supports cyclic DMA transfers ++ * as needed for the I2S module. ++ * + * Author: Florian Meier + * Copyright 2013 +- * Gellert Weisz +- * Copyright 2013-2014 + * + * Based on + * OMAP DMAengine support by Russell King +@@ -94,8 +95,6 @@ struct bcm2835_desc { + size_t size; + }; + +-#define BCM2835_DMA_WAIT_CYCLES 0 /* Slow down DMA transfers: 0-31 */ +- + #define BCM2835_DMA_CS 0x00 + #define BCM2835_DMA_ADDR 0x04 + #define BCM2835_DMA_SOURCE_AD 0x0c +@@ -112,16 +111,12 @@ struct bcm2835_desc { + #define BCM2835_DMA_RESET BIT(31) /* WO, self clearing */ + + #define BCM2835_DMA_INT_EN BIT(0) +-#define BCM2835_DMA_WAIT_RESP BIT(3) + #define BCM2835_DMA_D_INC BIT(4) +-#define BCM2835_DMA_D_WIDTH BIT(5) + #define BCM2835_DMA_D_DREQ BIT(6) + #define BCM2835_DMA_S_INC BIT(8) +-#define BCM2835_DMA_S_WIDTH BIT(9) + #define BCM2835_DMA_S_DREQ BIT(10) + + #define BCM2835_DMA_PER_MAP(x) ((x) << 16) +-#define BCM2835_DMA_WAITS(x) (((x) & 0x1f) << 21) + + #define BCM2835_DMA_DATA_TYPE_S8 1 + #define BCM2835_DMA_DATA_TYPE_S16 2 +@@ -135,14 +130,6 @@ struct bcm2835_desc { + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) + +-#define MAX_NORMAL_TRANSFER SZ_1G +-/* +- * Max length on a Lite channel is 65535 bytes. +- * DMA handles byte-enables on SDRAM reads and writes even on 128-bit accesses, +- * but byte-enables don't exist on peripheral addresses, so align to 32-bit. +- */ +-#define MAX_LITE_TRANSFER (SZ_64K - 4) +- + static inline struct bcm2835_dmadev *to_bcm2835_dma_dev(struct dma_device *d) + { + return container_of(d, struct bcm2835_dmadev, ddev); +@@ -239,19 +226,13 @@ static irqreturn_t bcm2835_dma_callback(int irq, void *data) + d = c->desc; + + if (d) { +- if (c->cyclic) { +- vchan_cyclic_callback(&d->vd); +- +- /* Keep the DMA engine running */ +- writel(BCM2835_DMA_ACTIVE, +- c->chan_base + BCM2835_DMA_CS); +- +- } else { +- vchan_cookie_complete(&c->desc->vd); +- bcm2835_dma_start_desc(c); +- } ++ /* TODO Only works for cyclic DMA */ ++ vchan_cyclic_callback(&d->vd); + } + ++ /* Keep the DMA engine running */ ++ writel(BCM2835_DMA_ACTIVE, c->chan_base + BCM2835_DMA_CS); ++ + spin_unlock_irqrestore(&c->vc.lock, flags); + + return IRQ_HANDLED; +@@ -358,6 +339,8 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); + unsigned long flags; + ++ c->cyclic = true; /* Nothing else is implemented */ ++ + spin_lock_irqsave(&c->vc.lock, flags); + if (vchan_issue_pending(&c->vc) && !c->desc) + bcm2835_dma_start_desc(c); +@@ -375,7 +358,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + struct bcm2835_desc *d; + dma_addr_t dev_addr; + unsigned int es, sync_type; +- unsigned int frame, max_size; ++ unsigned int frame; + int i; + + /* Grab configuration */ +@@ -410,12 +393,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + + d->c = c; + d->dir = direction; +- if (c->ch >= 8) /* LITE channel */ +- max_size = MAX_LITE_TRANSFER; +- else +- max_size = MAX_NORMAL_TRANSFER; +- period_len = min(period_len, max_size); +- d->frames = (buf_len - 1) / (period_len + 1); ++ d->frames = buf_len / period_len; + + d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); + if (!d->cb_list) { +@@ -463,171 +441,17 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + BCM2835_DMA_PER_MAP(c->dreq); + + /* Length of a frame */ +- if (frame != d->frames - 1) +- control_block->length = period_len; +- else +- control_block->length = buf_len - (d->frames - 1) * +- period_len; ++ control_block->length = period_len; + d->size += control_block->length; + + /* + * Next block is the next frame. +- * This function is called on cyclic DMA transfers. ++ * This DMA engine driver currently only supports cyclic DMA. + * Therefore, wrap around at number of frames. + */ + control_block->next = d->cb_list[((frame + 1) % d->frames)].paddr; + } + +- c->cyclic = true; +- +- return vchan_tx_prep(&c->vc, &d->vd, flags); +-} +- +-static struct dma_async_tx_descriptor * +-bcm2835_dma_prep_slave_sg(struct dma_chan *chan, +- struct scatterlist *sgl, +- unsigned int sg_len, +- enum dma_transfer_direction direction, +- unsigned long flags, void *context) +-{ +- struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); +- enum dma_slave_buswidth dev_width; +- struct bcm2835_desc *d; +- dma_addr_t dev_addr; +- struct scatterlist *sgent; +- unsigned int i, sync_type, split_cnt, max_size; +- +- if (!is_slave_direction(direction)) { +- dev_err(chan->device->dev, "direction not supported\n"); +- return NULL; +- } +- +- if (direction == DMA_DEV_TO_MEM) { +- dev_addr = c->cfg.src_addr; +- dev_width = c->cfg.src_addr_width; +- sync_type = BCM2835_DMA_S_DREQ; +- } else { +- dev_addr = c->cfg.dst_addr; +- dev_width = c->cfg.dst_addr_width; +- sync_type = BCM2835_DMA_D_DREQ; +- } +- +- /* Bus width translates to the element size (ES) */ +- switch (dev_width) { +- case DMA_SLAVE_BUSWIDTH_4_BYTES: +- break; +- default: +- dev_err(chan->device->dev, "buswidth not supported: %i\n", +- dev_width); +- return NULL; +- } +- +- /* Allocate and setup the descriptor. */ +- d = kzalloc(sizeof(*d), GFP_NOWAIT); +- if (!d) +- return NULL; +- +- d->dir = direction; +- +- if (c->ch >= 8) /* LITE channel */ +- max_size = MAX_LITE_TRANSFER; +- else +- max_size = MAX_NORMAL_TRANSFER; +- +- /* +- * Store the length of the SG list in d->frames +- * taking care to account for splitting up transfers +- * too large for a LITE channel +- */ +- d->frames = 0; +- for_each_sg(sgl, sgent, sg_len, i) { +- unsigned int len = sg_dma_len(sgent); +- +- d->frames += len / max_size + 1; +- } +- +- /* Allocate memory for control blocks */ +- d->control_block_size = d->frames * sizeof(struct bcm2835_dma_cb); +- d->control_block_base = dma_zalloc_coherent(chan->device->dev, +- d->control_block_size, &d->control_block_base_phys, +- GFP_NOWAIT); +- if (!d->control_block_base) { +- kfree(d); +- return NULL; +- } +- +- /* +- * Iterate over all SG entries, create a control block +- * for each frame and link them together. +- * Count the number of times an SG entry had to be split +- * as a result of using a LITE channel +- */ +- split_cnt = 0; +- +- for_each_sg(sgl, sgent, sg_len, i) { +- unsigned int j; +- dma_addr_t addr = sg_dma_address(sgent); +- unsigned int len = sg_dma_len(sgent); +- +- for (j = 0; j < len; j += max_size) { +- struct bcm2835_dma_cb *control_block = +- &d->control_block_base[i + split_cnt]; +- +- /* Setup addresses */ +- if (d->dir == DMA_DEV_TO_MEM) { +- control_block->info = BCM2835_DMA_D_INC | +- BCM2835_DMA_D_WIDTH | +- BCM2835_DMA_S_DREQ; +- control_block->src = dev_addr; +- control_block->dst = addr + (dma_addr_t)j; +- } else { +- control_block->info = BCM2835_DMA_S_INC | +- BCM2835_DMA_S_WIDTH | +- BCM2835_DMA_D_DREQ; +- control_block->src = addr + (dma_addr_t)j; +- control_block->dst = dev_addr; +- } +- +- /* Common part */ +- control_block->info |= +- BCM2835_DMA_WAITS(BCM2835_DMA_WAIT_CYCLES); +- control_block->info |= BCM2835_DMA_WAIT_RESP; +- +- /* Enable */ +- if (i == sg_len - 1 && len - j <= max_size) +- control_block->info |= BCM2835_DMA_INT_EN; +- +- /* Setup synchronization */ +- if (sync_type) +- control_block->info |= sync_type; +- +- /* Setup DREQ channel */ +- if (c->dreq) +- control_block->info |= +- BCM2835_DMA_PER_MAP(c->dreq); +- +- /* Length of a frame */ +- control_block->length = min(len - j, max_size); +- d->size += control_block->length; +- +- if (i < sg_len - 1 || len - j > max_size) { +- /* Next block is the next frame. */ +- control_block->next = +- d->control_block_base_phys + +- sizeof(struct bcm2835_dma_cb) * +- (i + split_cnt + 1); +- } else { +- /* Next block is empty. */ +- control_block->next = 0; +- } +- +- if (len - j > max_size) +- split_cnt++; +- } +- } +- +- c->cyclic = false; +- + return vchan_tx_prep(&c->vc, &d->vd, flags); + error_cb: + i--; +@@ -796,7 +620,6 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + od->ddev.device_tx_status = bcm2835_dma_tx_status; + od->ddev.device_issue_pending = bcm2835_dma_issue_pending; + od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; +- od->ddev.device_prep_slave_sg = bcm2835_dma_prep_slave_sg; + od->ddev.device_config = bcm2835_dma_slave_config; + od->ddev.device_terminate_all = bcm2835_dma_terminate_all; + od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); +@@ -886,5 +709,4 @@ module_platform_driver(bcm2835_dma_driver); + MODULE_ALIAS("platform:bcm2835-dma"); + MODULE_DESCRIPTION("BCM2835 DMA engine driver"); + MODULE_AUTHOR("Florian Meier "); +-MODULE_AUTHOR("Gellert Weisz "); + MODULE_LICENSE("GPL v2"); + +From e859859b01bd4279679400eb8d1590d6d544976d Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:56 -0700 +Subject: [PATCH 380/398] dmaengine: bcm2835: remove unnecessary masking of dma + channels + +The original patch contained 3 dma channels that were masked out. + +These - as far as research and discussions show - are a +artefacts remaining from the downstream legacy dma-api. + +Right now down-stream still includes a legacy api used only +in a single (downstream only) driver (bcm2708_fb) that requires +2D DMA for speedup (DMA-channel 0). +Formerly the sd-card support driver also was using this legacy +api (DMA-channel 2), but since has been moved over to use +dmaengine directly. + +The DMA-channel 3 is already masked out in the devicetree in +the default property "brcm,dma-channel-mask = <0x7f35>;" + +So we can remove the whole masking of DMA channels. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 2d72fe81243fbbcc92f52e1935ed48b6cbc23665..e4ca980049bab83ddbb58435c662e4a30321d4f8 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -123,9 +123,6 @@ struct bcm2835_desc { + #define BCM2835_DMA_DATA_TYPE_S32 4 + #define BCM2835_DMA_DATA_TYPE_S128 16 + +-#define BCM2835_DMA_BULK_MASK BIT(0) +-#define BCM2835_DMA_FIQ_MASK (BIT(2) | BIT(3)) +- + /* Valid only for channels 0 - 14, 15 has its own base address */ + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) +@@ -641,12 +638,6 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + goto err_no_dma; + } + +- /* +- * Do not use the FIQ and BULK channels, +- * because they are used by the GPU. +- */ +- chans_available &= ~(BCM2835_DMA_FIQ_MASK | BCM2835_DMA_BULK_MASK); +- + for (i = 0; i < pdev->num_resources; i++) { + irq = platform_get_irq(pdev, i); + if (irq < 0) + +From 37242a99d4883a11be75bc17f05857863a036966 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:57 -0700 +Subject: [PATCH 381/398] dmaengine: bcm2835: add additional defines for + DMA-registers + +Add additional defines describing the DMA registers +as well as adding some more documentation to those registers. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 57 ++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 49 insertions(+), 8 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index e4ca980049bab83ddbb58435c662e4a30321d4f8..a1d851aa5b182f9b0f4d6c2ab719b1ade2167c11 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -97,26 +97,67 @@ struct bcm2835_desc { + + #define BCM2835_DMA_CS 0x00 + #define BCM2835_DMA_ADDR 0x04 ++#define BCM2835_DMA_TI 0x08 + #define BCM2835_DMA_SOURCE_AD 0x0c + #define BCM2835_DMA_DEST_AD 0x10 +-#define BCM2835_DMA_NEXTCB 0x1C ++#define BCM2835_DMA_LEN 0x14 ++#define BCM2835_DMA_STRIDE 0x18 ++#define BCM2835_DMA_NEXTCB 0x1c ++#define BCM2835_DMA_DEBUG 0x20 + + /* DMA CS Control and Status bits */ +-#define BCM2835_DMA_ACTIVE BIT(0) +-#define BCM2835_DMA_INT BIT(2) ++#define BCM2835_DMA_ACTIVE BIT(0) /* activate the DMA */ ++#define BCM2835_DMA_END BIT(1) /* current CB has ended */ ++#define BCM2835_DMA_INT BIT(2) /* interrupt status */ ++#define BCM2835_DMA_DREQ BIT(3) /* DREQ state */ + #define BCM2835_DMA_ISPAUSED BIT(4) /* Pause requested or not active */ + #define BCM2835_DMA_ISHELD BIT(5) /* Is held by DREQ flow control */ +-#define BCM2835_DMA_ERR BIT(8) ++#define BCM2835_DMA_WAITING_FOR_WRITES BIT(6) /* waiting for last ++ * AXI-write to ack ++ */ ++#define BCM2835_DMA_ERR BIT(8) ++#define BCM2835_DMA_PRIORITY(x) ((x & 15) << 16) /* AXI priority */ ++#define BCM2835_DMA_PANIC_PRIORITY(x) ((x & 15) << 20) /* panic priority */ ++/* current value of TI.BCM2835_DMA_WAIT_RESP */ ++#define BCM2835_DMA_WAIT_FOR_WRITES BIT(28) ++#define BCM2835_DMA_DIS_DEBUG BIT(29) /* disable debug pause signal */ + #define BCM2835_DMA_ABORT BIT(30) /* Stop current CB, go to next, WO */ + #define BCM2835_DMA_RESET BIT(31) /* WO, self clearing */ + ++/* Transfer information bits - also bcm2835_cb.info field */ + #define BCM2835_DMA_INT_EN BIT(0) ++#define BCM2835_DMA_TDMODE BIT(1) /* 2D-Mode */ ++#define BCM2835_DMA_WAIT_RESP BIT(3) /* wait for AXI-write to be acked */ + #define BCM2835_DMA_D_INC BIT(4) +-#define BCM2835_DMA_D_DREQ BIT(6) ++#define BCM2835_DMA_D_WIDTH BIT(5) /* 128bit writes if set */ ++#define BCM2835_DMA_D_DREQ BIT(6) /* enable DREQ for destination */ ++#define BCM2835_DMA_D_IGNORE BIT(7) /* ignore destination writes */ + #define BCM2835_DMA_S_INC BIT(8) +-#define BCM2835_DMA_S_DREQ BIT(10) +- +-#define BCM2835_DMA_PER_MAP(x) ((x) << 16) ++#define BCM2835_DMA_S_WIDTH BIT(9) /* 128bit writes if set */ ++#define BCM2835_DMA_S_DREQ BIT(10) /* enable SREQ for source */ ++#define BCM2835_DMA_S_IGNORE BIT(11) /* ignore source reads - read 0 */ ++#define BCM2835_DMA_BURST_LENGTH(x) ((x & 15) << 12) ++#define BCM2835_DMA_PER_MAP(x) ((x & 31) << 16) /* REQ source */ ++#define BCM2835_DMA_WAIT(x) ((x & 31) << 21) /* add DMA-wait cycles */ ++#define BCM2835_DMA_NO_WIDE_BURSTS BIT(26) /* no 2 beat write bursts */ ++ ++/* debug register bits */ ++#define BCM2835_DMA_DEBUG_LAST_NOT_SET_ERR BIT(0) ++#define BCM2835_DMA_DEBUG_FIFO_ERR BIT(1) ++#define BCM2835_DMA_DEBUG_READ_ERR BIT(2) ++#define BCM2835_DMA_DEBUG_OUTSTANDING_WRITES_SHIFT 4 ++#define BCM2835_DMA_DEBUG_OUTSTANDING_WRITES_BITS 4 ++#define BCM2835_DMA_DEBUG_ID_SHIFT 16 ++#define BCM2835_DMA_DEBUG_ID_BITS 9 ++#define BCM2835_DMA_DEBUG_STATE_SHIFT 16 ++#define BCM2835_DMA_DEBUG_STATE_BITS 9 ++#define BCM2835_DMA_DEBUG_VERSION_SHIFT 25 ++#define BCM2835_DMA_DEBUG_VERSION_BITS 3 ++#define BCM2835_DMA_DEBUG_LITE BIT(28) ++ ++/* shared registers for all dma channels */ ++#define BCM2835_DMA_INT_STATUS 0xfe0 ++#define BCM2835_DMA_ENABLE 0xff0 + + #define BCM2835_DMA_DATA_TYPE_S8 1 + #define BCM2835_DMA_DATA_TYPE_S16 2 + +From c23d021f911db3da728d06d8f84160a131b62581 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:58 -0700 +Subject: [PATCH 382/398] dmaengine: bcm2835: move cyclic member from + bcm2835_chan into bcm2835_desc + +In preparation to consolidating code we move the cyclic member +into the bcm_2835_desc structure. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index a1d851aa5b182f9b0f4d6c2ab719b1ade2167c11..b3bc382fd1998324d6034e203afdd77a4d7ad168 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -73,7 +73,6 @@ struct bcm2835_chan { + struct list_head node; + + struct dma_slave_config cfg; +- bool cyclic; + unsigned int dreq; + + int ch; +@@ -93,6 +92,8 @@ struct bcm2835_desc { + + unsigned int frames; + size_t size; ++ ++ bool cyclic; + }; + + #define BCM2835_DMA_CS 0x00 +@@ -377,8 +378,6 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); + unsigned long flags; + +- c->cyclic = true; /* Nothing else is implemented */ +- + spin_lock_irqsave(&c->vc.lock, flags); + if (vchan_issue_pending(&c->vc) && !c->desc) + bcm2835_dma_start_desc(c); +@@ -432,6 +431,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + d->c = c; + d->dir = direction; + d->frames = buf_len / period_len; ++ d->cyclic = true; + + d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); + if (!d->cb_list) { + +From d55949164ae68340071839e5c7271f4559ff8ead Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:24:59 -0700 +Subject: [PATCH 383/398] dmaengine: bcm2835: move controlblock chain + generation into separate method + +In preparation of adding slave_sg functionality this patch moves the +generation/allocation of bcm2835_desc and the building of +the corresponding DMA-control-block chain from bcm2835_dma_prep_dma_cyclic +into the newly created method bcm2835_dma_create_cb_chain. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 294 +++++++++++++++++++++++++++++++--------------- + 1 file changed, 198 insertions(+), 96 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index b3bc382fd1998324d6034e203afdd77a4d7ad168..4db0e232fab8e3422d4c28a164ed67f0676981f2 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -88,12 +88,12 @@ struct bcm2835_desc { + struct virt_dma_desc vd; + enum dma_transfer_direction dir; + +- struct bcm2835_cb_entry *cb_list; +- + unsigned int frames; + size_t size; + + bool cyclic; ++ ++ struct bcm2835_cb_entry cb_list[]; + }; + + #define BCM2835_DMA_CS 0x00 +@@ -169,6 +169,13 @@ struct bcm2835_desc { + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) + ++/* how many frames of max_len size do we need to transfer len bytes */ ++static inline size_t bcm2835_dma_frames_for_length(size_t len, ++ size_t max_len) ++{ ++ return DIV_ROUND_UP(len, max_len); ++} ++ + static inline struct bcm2835_dmadev *to_bcm2835_dma_dev(struct dma_device *d) + { + return container_of(d, struct bcm2835_dmadev, ddev); +@@ -185,19 +192,161 @@ static inline struct bcm2835_desc *to_bcm2835_dma_desc( + return container_of(t, struct bcm2835_desc, vd.tx); + } + +-static void bcm2835_dma_desc_free(struct virt_dma_desc *vd) ++static void bcm2835_dma_free_cb_chain(struct bcm2835_desc *desc) + { +- struct bcm2835_desc *desc = container_of(vd, struct bcm2835_desc, vd); +- int i; ++ size_t i; + + for (i = 0; i < desc->frames; i++) + dma_pool_free(desc->c->cb_pool, desc->cb_list[i].cb, + desc->cb_list[i].paddr); + +- kfree(desc->cb_list); + kfree(desc); + } + ++static void bcm2835_dma_desc_free(struct virt_dma_desc *vd) ++{ ++ bcm2835_dma_free_cb_chain( ++ container_of(vd, struct bcm2835_desc, vd)); ++} ++ ++static void bcm2835_dma_create_cb_set_length( ++ struct bcm2835_chan *chan, ++ struct bcm2835_dma_cb *control_block, ++ size_t len, ++ size_t period_len, ++ size_t *total_len, ++ u32 finalextrainfo) ++{ ++ /* set the length */ ++ control_block->length = len; ++ ++ /* finished if we have no period_length */ ++ if (!period_len) ++ return; ++ ++ /* ++ * period_len means: that we need to generate ++ * transfers that are terminating at every ++ * multiple of period_len - this is typically ++ * used to set the interrupt flag in info ++ * which is required during cyclic transfers ++ */ ++ ++ /* have we filled in period_length yet? */ ++ if (*total_len + control_block->length < period_len) ++ return; ++ ++ /* calculate the length that remains to reach period_length */ ++ control_block->length = period_len - *total_len; ++ ++ /* reset total_length for next period */ ++ *total_len = 0; ++ ++ /* add extrainfo bits in info */ ++ control_block->info |= finalextrainfo; ++} ++ ++/** ++ * bcm2835_dma_create_cb_chain - create a control block and fills data in ++ * ++ * @chan: the @dma_chan for which we run this ++ * @direction: the direction in which we transfer ++ * @cyclic: it is a cyclic transfer ++ * @info: the default info bits to apply per controlblock ++ * @frames: number of controlblocks to allocate ++ * @src: the src address to assign (if the S_INC bit is set ++ * in @info, then it gets incremented) ++ * @dst: the dst address to assign (if the D_INC bit is set ++ * in @info, then it gets incremented) ++ * @buf_len: the full buffer length (may also be 0) ++ * @period_len: the period length when to apply @finalextrainfo ++ * in addition to the last transfer ++ * this will also break some control-blocks early ++ * @finalextrainfo: additional bits in last controlblock ++ * (or when period_len is reached in case of cyclic) ++ * @gfp: the GFP flag to use for allocation ++ */ ++static struct bcm2835_desc *bcm2835_dma_create_cb_chain( ++ struct dma_chan *chan, enum dma_transfer_direction direction, ++ bool cyclic, u32 info, u32 finalextrainfo, size_t frames, ++ dma_addr_t src, dma_addr_t dst, size_t buf_len, ++ size_t period_len, gfp_t gfp) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ size_t len = buf_len, total_len; ++ size_t frame; ++ struct bcm2835_desc *d; ++ struct bcm2835_cb_entry *cb_entry; ++ struct bcm2835_dma_cb *control_block; ++ ++ /* allocate and setup the descriptor. */ ++ d = kzalloc(sizeof(*d) + frames * sizeof(struct bcm2835_cb_entry), ++ gfp); ++ if (!d) ++ return NULL; ++ ++ d->c = c; ++ d->dir = direction; ++ d->cyclic = cyclic; ++ ++ /* ++ * Iterate over all frames, create a control block ++ * for each frame and link them together. ++ */ ++ for (frame = 0, total_len = 0; frame < frames; d->frames++, frame++) { ++ cb_entry = &d->cb_list[frame]; ++ cb_entry->cb = dma_pool_alloc(c->cb_pool, gfp, ++ &cb_entry->paddr); ++ if (!cb_entry->cb) ++ goto error_cb; ++ ++ /* fill in the control block */ ++ control_block = cb_entry->cb; ++ control_block->info = info; ++ control_block->src = src; ++ control_block->dst = dst; ++ control_block->stride = 0; ++ control_block->next = 0; ++ /* set up length in control_block if requested */ ++ if (buf_len) { ++ /* calculate length honoring period_length */ ++ bcm2835_dma_create_cb_set_length( ++ c, control_block, ++ len, period_len, &total_len, ++ cyclic ? finalextrainfo : 0); ++ ++ /* calculate new remaining length */ ++ len -= control_block->length; ++ } ++ ++ /* link this the last controlblock */ ++ if (frame) ++ d->cb_list[frame - 1].cb->next = cb_entry->paddr; ++ ++ /* update src and dst and length */ ++ if (src && (info & BCM2835_DMA_S_INC)) ++ src += control_block->length; ++ if (dst && (info & BCM2835_DMA_D_INC)) ++ dst += control_block->length; ++ ++ /* Length of total transfer */ ++ d->size += control_block->length; ++ } ++ ++ /* the last frame requires extra flags */ ++ d->cb_list[d->frames - 1].cb->info |= finalextrainfo; ++ ++ /* detect a size missmatch */ ++ if (buf_len && (d->size != buf_len)) ++ goto error_cb; ++ ++ return d; ++error_cb: ++ bcm2835_dma_free_cb_chain(d); ++ ++ return NULL; ++} ++ + static int bcm2835_dma_abort(void __iomem *chan_base) + { + unsigned long cs; +@@ -391,12 +540,11 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + unsigned long flags) + { + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); +- enum dma_slave_buswidth dev_width; + struct bcm2835_desc *d; +- dma_addr_t dev_addr; +- unsigned int es, sync_type; +- unsigned int frame; +- int i; ++ dma_addr_t src, dst; ++ u32 info = BCM2835_DMA_WAIT_RESP; ++ u32 extra = BCM2835_DMA_INT_EN; ++ size_t frames; + + /* Grab configuration */ + if (!is_slave_direction(direction)) { +@@ -404,104 +552,58 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + return NULL; + } + +- if (direction == DMA_DEV_TO_MEM) { +- dev_addr = c->cfg.src_addr; +- dev_width = c->cfg.src_addr_width; +- sync_type = BCM2835_DMA_S_DREQ; +- } else { +- dev_addr = c->cfg.dst_addr; +- dev_width = c->cfg.dst_addr_width; +- sync_type = BCM2835_DMA_D_DREQ; +- } +- +- /* Bus width translates to the element size (ES) */ +- switch (dev_width) { +- case DMA_SLAVE_BUSWIDTH_4_BYTES: +- es = BCM2835_DMA_DATA_TYPE_S32; +- break; +- default: ++ if (!buf_len) { ++ dev_err(chan->device->dev, ++ "%s: bad buffer length (= 0)\n", __func__); + return NULL; + } + +- /* Now allocate and setup the descriptor. */ +- d = kzalloc(sizeof(*d), GFP_NOWAIT); +- if (!d) +- return NULL; ++ /* ++ * warn if buf_len is not a multiple of period_len - this may leed ++ * to unexpected latencies for interrupts and thus audiable clicks ++ */ ++ if (buf_len % period_len) ++ dev_warn_once(chan->device->dev, ++ "%s: buffer_length (%zd) is not a multiple of period_len (%zd)\n", ++ __func__, buf_len, period_len); + +- d->c = c; +- d->dir = direction; +- d->frames = buf_len / period_len; +- d->cyclic = true; ++ /* Setup DREQ channel */ ++ if (c->dreq != 0) ++ info |= BCM2835_DMA_PER_MAP(c->dreq); + +- d->cb_list = kcalloc(d->frames, sizeof(*d->cb_list), GFP_KERNEL); +- if (!d->cb_list) { +- kfree(d); +- return NULL; ++ if (direction == DMA_DEV_TO_MEM) { ++ if (c->cfg.src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ src = c->cfg.src_addr; ++ dst = buf_addr; ++ info |= BCM2835_DMA_S_DREQ | BCM2835_DMA_D_INC; ++ } else { ++ if (c->cfg.dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ dst = c->cfg.dst_addr; ++ src = buf_addr; ++ info |= BCM2835_DMA_D_DREQ | BCM2835_DMA_S_INC; + } +- /* Allocate memory for control blocks */ +- for (i = 0; i < d->frames; i++) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; + +- cb_entry->cb = dma_pool_zalloc(c->cb_pool, GFP_ATOMIC, +- &cb_entry->paddr); +- if (!cb_entry->cb) +- goto error_cb; +- } ++ /* calculate number of frames */ ++ frames = DIV_ROUND_UP(buf_len, period_len); + + /* +- * Iterate over all frames, create a control block +- * for each frame and link them together. ++ * allocate the CB chain ++ * note that we need to use GFP_NOWAIT, as the ALSA i2s dmaengine ++ * implementation calls prep_dma_cyclic with interrupts disabled. + */ +- for (frame = 0; frame < d->frames; frame++) { +- struct bcm2835_dma_cb *control_block = d->cb_list[frame].cb; +- +- /* Setup adresses */ +- if (d->dir == DMA_DEV_TO_MEM) { +- control_block->info = BCM2835_DMA_D_INC; +- control_block->src = dev_addr; +- control_block->dst = buf_addr + frame * period_len; +- } else { +- control_block->info = BCM2835_DMA_S_INC; +- control_block->src = buf_addr + frame * period_len; +- control_block->dst = dev_addr; +- } +- +- /* Enable interrupt */ +- control_block->info |= BCM2835_DMA_INT_EN; +- +- /* Setup synchronization */ +- if (sync_type != 0) +- control_block->info |= sync_type; +- +- /* Setup DREQ channel */ +- if (c->dreq != 0) +- control_block->info |= +- BCM2835_DMA_PER_MAP(c->dreq); +- +- /* Length of a frame */ +- control_block->length = period_len; +- d->size += control_block->length; ++ d = bcm2835_dma_create_cb_chain(chan, direction, true, ++ info, extra, ++ frames, src, dst, buf_len, ++ period_len, GFP_NOWAIT); ++ if (!d) ++ return NULL; + +- /* +- * Next block is the next frame. +- * This DMA engine driver currently only supports cyclic DMA. +- * Therefore, wrap around at number of frames. +- */ +- control_block->next = d->cb_list[((frame + 1) % d->frames)].paddr; +- } ++ /* wrap around into a loop */ ++ d->cb_list[d->frames - 1].cb->next = d->cb_list[0].paddr; + + return vchan_tx_prep(&c->vc, &d->vd, flags); +-error_cb: +- i--; +- for (; i >= 0; i--) { +- struct bcm2835_cb_entry *cb_entry = &d->cb_list[i]; +- +- dma_pool_free(c->cb_pool, cb_entry->cb, cb_entry->paddr); +- } +- +- kfree(d->cb_list); +- kfree(d); +- return NULL; + } + + static int bcm2835_dma_slave_config(struct dma_chan *chan, + +From 2e5c815b44d0945a00e09aec7bff6c31b2ade42f Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:25:00 -0700 +Subject: [PATCH 384/398] dmaengine: bcm2835: limit max length based on channel + type + +The bcm2835 dma system has 2 basic types of dma-channels: +* "normal" channels +* "light" channels + +Lite channels are limited in several aspects: +* internal data-structure is 128 bit (not 256) +* does not support BCM2835_DMA_TDMODE (2D) +* DMA length register is limited to 16 bit. + so 0-65535 (not 0-65536 as mentioned in the official datasheet) +* BCM2835_DMA_S/D_IGNORE are not supported + +The detection of the type of mode is implemented by looking at +the LITE bit in the DEBUG register for each channel. +This allows automatic detection. + +Based on this the maximum block size is set to (64K - 4) or to 1G +and this limit is honored during generation of control block +chains. The effect is that when a LITE channel is used more +control blocks are used to do the same transfer (compared +to a normal channel). + +As there are several sources/target DREQS that are 32 bit wide +we need to have the transfer to be a multiple of 4 as this would +break the transfer otherwise. + +This is why the limit of (64K - 4) was chosen over the +alternative of (64K - 4K). + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 29 ++++++++++++++++++++++++++--- + 1 file changed, 26 insertions(+), 3 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 4db0e232fab8e3422d4c28a164ed67f0676981f2..59c5ef36d97059a4f988f083a64f084da02093cd 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -81,6 +81,8 @@ struct bcm2835_chan { + + void __iomem *chan_base; + int irq_number; ++ ++ bool is_lite_channel; + }; + + struct bcm2835_desc { +@@ -169,6 +171,16 @@ struct bcm2835_desc { + #define BCM2835_DMA_CHAN(n) ((n) << 8) /* Base address */ + #define BCM2835_DMA_CHANIO(base, n) ((base) + BCM2835_DMA_CHAN(n)) + ++/* the max dma length for different channels */ ++#define MAX_DMA_LEN SZ_1G ++#define MAX_LITE_DMA_LEN (SZ_64K - 4) ++ ++static inline size_t bcm2835_dma_max_frame_length(struct bcm2835_chan *c) ++{ ++ /* lite and normal channels have different max frame length */ ++ return c->is_lite_channel ? MAX_LITE_DMA_LEN : MAX_DMA_LEN; ++} ++ + /* how many frames of max_len size do we need to transfer len bytes */ + static inline size_t bcm2835_dma_frames_for_length(size_t len, + size_t max_len) +@@ -217,8 +229,10 @@ static void bcm2835_dma_create_cb_set_length( + size_t *total_len, + u32 finalextrainfo) + { +- /* set the length */ +- control_block->length = len; ++ size_t max_len = bcm2835_dma_max_frame_length(chan); ++ ++ /* set the length taking lite-channel limitations into account */ ++ control_block->length = min_t(u32, len, max_len); + + /* finished if we have no period_length */ + if (!period_len) +@@ -544,6 +558,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + dma_addr_t src, dst; + u32 info = BCM2835_DMA_WAIT_RESP; + u32 extra = BCM2835_DMA_INT_EN; ++ size_t max_len = bcm2835_dma_max_frame_length(c); + size_t frames; + + /* Grab configuration */ +@@ -586,7 +601,10 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + } + + /* calculate number of frames */ +- frames = DIV_ROUND_UP(buf_len, period_len); ++ frames = /* number of periods */ ++ DIV_ROUND_UP(buf_len, period_len) * ++ /* number of frames per period */ ++ bcm2835_dma_frames_for_length(period_len, max_len); + + /* + * allocate the CB chain +@@ -685,6 +703,11 @@ static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, int irq) + c->ch = chan_id; + c->irq_number = irq; + ++ /* check in DEBUG register if this is a LITE channel */ ++ if (readl(c->chan_base + BCM2835_DMA_DEBUG) & ++ BCM2835_DMA_DEBUG_LITE) ++ c->is_lite_channel = true; ++ + return 0; + } + + +From 7222acdfa135aca5e8c6494319152e1827e5c208 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:25:01 -0700 +Subject: [PATCH 385/398] dmaengine: bcm2835: add slave_sg support to + bcm2835-dma + +Add slave_sg support to bcm2835-dma using shared allocation +code for bcm2835_desc and DMA-control blocks already used by +dma_cyclic. + +Note that bcm2835_dma_callback had to get modified to support +both modes of operation (cyclic and non-cyclic). + +Tested using: +* Hifiberry I2S card (using cyclic DMA) +* fb_st7735r SPI-framebuffer (using slave_sg DMA via spi-bcm2835) +playing BigBuckBunny for audio and video. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 113 ++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 108 insertions(+), 5 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 59c5ef36d97059a4f988f083a64f084da02093cd..b46b12f66f387e0b87aa6d09192071b58da9e953 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -260,6 +260,23 @@ static void bcm2835_dma_create_cb_set_length( + control_block->info |= finalextrainfo; + } + ++static inline size_t bcm2835_dma_count_frames_for_sg( ++ struct bcm2835_chan *c, ++ struct scatterlist *sgl, ++ unsigned int sg_len) ++{ ++ size_t frames = 0; ++ struct scatterlist *sgent; ++ unsigned int i; ++ size_t plength = bcm2835_dma_max_frame_length(c); ++ ++ for_each_sg(sgl, sgent, sg_len, i) ++ frames += bcm2835_dma_frames_for_length( ++ sg_dma_len(sgent), plength); ++ ++ return frames; ++} ++ + /** + * bcm2835_dma_create_cb_chain - create a control block and fills data in + * +@@ -361,6 +378,32 @@ error_cb: + return NULL; + } + ++static void bcm2835_dma_fill_cb_chain_with_sg( ++ struct dma_chan *chan, ++ enum dma_transfer_direction direction, ++ struct bcm2835_cb_entry *cb, ++ struct scatterlist *sgl, ++ unsigned int sg_len) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ size_t max_len = bcm2835_dma_max_frame_length(c); ++ unsigned int i, len; ++ dma_addr_t addr; ++ struct scatterlist *sgent; ++ ++ for_each_sg(sgl, sgent, sg_len, i) { ++ for (addr = sg_dma_address(sgent), len = sg_dma_len(sgent); ++ len > 0; ++ addr += cb->cb->length, len -= cb->cb->length, cb++) { ++ if (direction == DMA_DEV_TO_MEM) ++ cb->cb->dst = addr; ++ else ++ cb->cb->src = addr; ++ cb->cb->length = min(len, max_len); ++ } ++ } ++} ++ + static int bcm2835_dma_abort(void __iomem *chan_base) + { + unsigned long cs; +@@ -428,13 +471,19 @@ static irqreturn_t bcm2835_dma_callback(int irq, void *data) + d = c->desc; + + if (d) { +- /* TODO Only works for cyclic DMA */ +- vchan_cyclic_callback(&d->vd); ++ if (d->cyclic) { ++ /* call the cyclic callback */ ++ vchan_cyclic_callback(&d->vd); ++ ++ /* Keep the DMA engine running */ ++ writel(BCM2835_DMA_ACTIVE, ++ c->chan_base + BCM2835_DMA_CS); ++ } else { ++ vchan_cookie_complete(&c->desc->vd); ++ bcm2835_dma_start_desc(c); ++ } + } + +- /* Keep the DMA engine running */ +- writel(BCM2835_DMA_ACTIVE, c->chan_base + BCM2835_DMA_CS); +- + spin_unlock_irqrestore(&c->vc.lock, flags); + + return IRQ_HANDLED; +@@ -548,6 +597,58 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + spin_unlock_irqrestore(&c->vc.lock, flags); + } + ++static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg( ++ struct dma_chan *chan, ++ struct scatterlist *sgl, unsigned int sg_len, ++ enum dma_transfer_direction direction, ++ unsigned long flags, void *context) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ struct bcm2835_desc *d; ++ dma_addr_t src = 0, dst = 0; ++ u32 info = BCM2835_DMA_WAIT_RESP; ++ u32 extra = BCM2835_DMA_INT_EN; ++ size_t frames; ++ ++ if (!is_slave_direction(direction)) { ++ dev_err(chan->device->dev, ++ "%s: bad direction?\n", __func__); ++ return NULL; ++ } ++ ++ if (c->dreq != 0) ++ info |= BCM2835_DMA_PER_MAP(c->dreq); ++ ++ if (direction == DMA_DEV_TO_MEM) { ++ if (c->cfg.src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ src = c->cfg.src_addr; ++ info |= BCM2835_DMA_S_DREQ | BCM2835_DMA_D_INC; ++ } else { ++ if (c->cfg.dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ++ return NULL; ++ dst = c->cfg.dst_addr; ++ info |= BCM2835_DMA_D_DREQ | BCM2835_DMA_S_INC; ++ } ++ ++ /* count frames in sg list */ ++ frames = bcm2835_dma_count_frames_for_sg(c, sgl, sg_len); ++ ++ /* allocate the CB chain */ ++ d = bcm2835_dma_create_cb_chain(chan, direction, false, ++ info, extra, ++ frames, src, dst, 0, 0, ++ GFP_KERNEL); ++ if (!d) ++ return NULL; ++ ++ /* fill in frames with scatterlist pointers */ ++ bcm2835_dma_fill_cb_chain_with_sg(chan, direction, d->cb_list, ++ sgl, sg_len); ++ ++ return vchan_tx_prep(&c->vc, &d->vd, flags); ++} ++ + static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( + struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, + size_t period_len, enum dma_transfer_direction direction, +@@ -778,11 +879,13 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); + dma_cap_set(DMA_PRIVATE, od->ddev.cap_mask); + dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask); ++ dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); + od->ddev.device_alloc_chan_resources = bcm2835_dma_alloc_chan_resources; + od->ddev.device_free_chan_resources = bcm2835_dma_free_chan_resources; + od->ddev.device_tx_status = bcm2835_dma_tx_status; + od->ddev.device_issue_pending = bcm2835_dma_issue_pending; + od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; ++ od->ddev.device_prep_slave_sg = bcm2835_dma_prep_slave_sg; + od->ddev.device_config = bcm2835_dma_slave_config; + od->ddev.device_terminate_all = bcm2835_dma_terminate_all; + od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); + +From 26a2ecaffc6566362240c6845fdbb3273fcaab1f Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Wed, 16 Mar 2016 12:25:02 -0700 +Subject: [PATCH 386/398] dmaengine: bcm2835: add dma_memcopy support to + bcm2835-dma + +Also added check for an error condition in bcm2835_dma_create_cb_chain +that showed up during development of this patch. + +Tested using dmatest for all enabled channels. + +Signed-off-by: Martin Sperl +Reviewed-by: Eric Anholt +Signed-off-by: Eric Anholt +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 36 +++++++++++++++++++++++++++++++++++- + 1 file changed, 35 insertions(+), 1 deletion(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index b46b12f66f387e0b87aa6d09192071b58da9e953..cc771cd35dd0c28829b6500421af686be865000b 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -310,6 +310,9 @@ static struct bcm2835_desc *bcm2835_dma_create_cb_chain( + struct bcm2835_cb_entry *cb_entry; + struct bcm2835_dma_cb *control_block; + ++ if (!frames) ++ return NULL; ++ + /* allocate and setup the descriptor. */ + d = kzalloc(sizeof(*d) + frames * sizeof(struct bcm2835_cb_entry), + gfp); +@@ -597,6 +600,34 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) + spin_unlock_irqrestore(&c->vc.lock, flags); + } + ++struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_memcpy( ++ struct dma_chan *chan, dma_addr_t dst, dma_addr_t src, ++ size_t len, unsigned long flags) ++{ ++ struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); ++ struct bcm2835_desc *d; ++ u32 info = BCM2835_DMA_D_INC | BCM2835_DMA_S_INC; ++ u32 extra = BCM2835_DMA_INT_EN | BCM2835_DMA_WAIT_RESP; ++ size_t max_len = bcm2835_dma_max_frame_length(c); ++ size_t frames; ++ ++ /* if src, dst or len is not given return with an error */ ++ if (!src || !dst || !len) ++ return NULL; ++ ++ /* calculate number of frames */ ++ frames = bcm2835_dma_frames_for_length(len, max_len); ++ ++ /* allocate the CB chain - this also fills in the pointers */ ++ d = bcm2835_dma_create_cb_chain(chan, DMA_MEM_TO_MEM, false, ++ info, extra, frames, ++ src, dst, len, 0, GFP_KERNEL); ++ if (!d) ++ return NULL; ++ ++ return vchan_tx_prep(&c->vc, &d->vd, flags); ++} ++ + static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg( + struct dma_chan *chan, + struct scatterlist *sgl, unsigned int sg_len, +@@ -880,17 +911,20 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + dma_cap_set(DMA_PRIVATE, od->ddev.cap_mask); + dma_cap_set(DMA_CYCLIC, od->ddev.cap_mask); + dma_cap_set(DMA_SLAVE, od->ddev.cap_mask); ++ dma_cap_set(DMA_MEMCPY, od->ddev.cap_mask); + od->ddev.device_alloc_chan_resources = bcm2835_dma_alloc_chan_resources; + od->ddev.device_free_chan_resources = bcm2835_dma_free_chan_resources; + od->ddev.device_tx_status = bcm2835_dma_tx_status; + od->ddev.device_issue_pending = bcm2835_dma_issue_pending; + od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; + od->ddev.device_prep_slave_sg = bcm2835_dma_prep_slave_sg; ++ od->ddev.device_prep_dma_memcpy = bcm2835_dma_prep_dma_memcpy; + od->ddev.device_config = bcm2835_dma_slave_config; + od->ddev.device_terminate_all = bcm2835_dma_terminate_all; + od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); + od->ddev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); +- od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); ++ od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV) | ++ BIT(DMA_MEM_TO_MEM); + od->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; + od->ddev.dev = &pdev->dev; + INIT_LIST_HEAD(&od->ddev.channels); + +From a07dd2eb9b2b125d7ece610326cc5715dc8766f0 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 11 Apr 2016 13:29:08 +0000 +Subject: [PATCH 387/398] dmaengine: bcm2835: use platform_get_irq_byname + +Use platform_get_irq_byname to allow for correct mapping of +interrupts to dma channels. + +The currently implemented device tree is unfortunately +implemented with the wrong assumption, that each dma-channel +has its own dma channel, but dma-irq 11 is handling +dma-channel 11-14 and dma-irq 12 is actually a "catch all" +interrupt. + +So here we use the byname variant and require that interrupts +are explicitly named via the interrupts-name property in the +device tree. + +The use of shared interrupts is also implemented. + +As a side-effect this means we can now use dma channels 12, 13 and 14 +in a correct manner - also testing shows that onl using +channels 11 to 14 for spi and i2s works perfectly (when playing +some video) + +Signed-off-by: Martin Sperl +Acked-by: Eric Anholt +Acked-by: Mark Rutland +Signed-off-by: Vinod Koul +--- + drivers/dma/bcm2835-dma.c | 77 ++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 63 insertions(+), 14 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index cc771cd35dd0c28829b6500421af686be865000b..974015193b93cdb398f1157b89b6e2cf5234354e 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -46,6 +46,9 @@ + + #include "virt-dma.h" + ++#define BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED 14 ++#define BCM2835_DMA_CHAN_NAME_SIZE 8 ++ + struct bcm2835_dmadev { + struct dma_device ddev; + spinlock_t lock; +@@ -81,6 +84,7 @@ struct bcm2835_chan { + + void __iomem *chan_base; + int irq_number; ++ unsigned int irq_flags; + + bool is_lite_channel; + }; +@@ -466,6 +470,15 @@ static irqreturn_t bcm2835_dma_callback(int irq, void *data) + struct bcm2835_desc *d; + unsigned long flags; + ++ /* check the shared interrupt */ ++ if (c->irq_flags & IRQF_SHARED) { ++ /* check if the interrupt is enabled */ ++ flags = readl(c->chan_base + BCM2835_DMA_CS); ++ /* if not set then we are not the reason for the irq */ ++ if (!(flags & BCM2835_DMA_INT)) ++ return IRQ_NONE; ++ } ++ + spin_lock_irqsave(&c->vc.lock, flags); + + /* Acknowledge interrupt */ +@@ -506,8 +519,8 @@ static int bcm2835_dma_alloc_chan_resources(struct dma_chan *chan) + return -ENOMEM; + } + +- return request_irq(c->irq_number, +- bcm2835_dma_callback, 0, "DMA IRQ", c); ++ return request_irq(c->irq_number, bcm2835_dma_callback, ++ c->irq_flags, "DMA IRQ", c); + } + + static void bcm2835_dma_free_chan_resources(struct dma_chan *chan) +@@ -819,7 +832,8 @@ static int bcm2835_dma_terminate_all(struct dma_chan *chan) + return 0; + } + +-static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, int irq) ++static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, ++ int irq, unsigned int irq_flags) + { + struct bcm2835_chan *c; + +@@ -834,6 +848,7 @@ static int bcm2835_dma_chan_init(struct bcm2835_dmadev *d, int chan_id, int irq) + c->chan_base = BCM2835_DMA_CHANIO(d->base, chan_id); + c->ch = chan_id; + c->irq_number = irq; ++ c->irq_flags = irq_flags; + + /* check in DEBUG register if this is a LITE channel */ + if (readl(c->chan_base + BCM2835_DMA_DEBUG) & +@@ -882,9 +897,11 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + struct resource *res; + void __iomem *base; + int rc; +- int i; +- int irq; ++ int i, j; ++ int irq[BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED + 1]; ++ int irq_flags; + uint32_t chans_available; ++ char chan_name[BCM2835_DMA_CHAN_NAME_SIZE]; + + if (!pdev->dev.dma_mask) + pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; +@@ -941,16 +958,48 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + goto err_no_dma; + } + +- for (i = 0; i < pdev->num_resources; i++) { +- irq = platform_get_irq(pdev, i); +- if (irq < 0) +- break; +- +- if (chans_available & (1 << i)) { +- rc = bcm2835_dma_chan_init(od, i, irq); +- if (rc) +- goto err_no_dma; ++ /* get irqs for each channel that we support */ ++ for (i = 0; i <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; i++) { ++ /* skip masked out channels */ ++ if (!(chans_available & (1 << i))) { ++ irq[i] = -1; ++ continue; + } ++ ++ /* get the named irq */ ++ snprintf(chan_name, sizeof(chan_name), "dma%i", i); ++ irq[i] = platform_get_irq_byname(pdev, chan_name); ++ if (irq[i] >= 0) ++ continue; ++ ++ /* legacy device tree case handling */ ++ dev_warn_once(&pdev->dev, ++ "missing interrupts-names property in device tree - legacy interpretation is used"); ++ /* ++ * in case of channel >= 11 ++ * use the 11th interrupt and that is shared ++ */ ++ irq[i] = platform_get_irq(pdev, i < 11 ? i : 11); ++ } ++ ++ /* get irqs for each channel */ ++ for (i = 0; i <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; i++) { ++ /* skip channels without irq */ ++ if (irq[i] < 0) ++ continue; ++ ++ /* check if there are other channels that also use this irq */ ++ irq_flags = 0; ++ for (j = 0; j <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; j++) ++ if ((i != j) && (irq[j] == irq[i])) { ++ irq_flags = IRQF_SHARED; ++ break; ++ } ++ ++ /* initialize the channel */ ++ rc = bcm2835_dma_chan_init(od, i, irq[i], irq_flags); ++ if (rc) ++ goto err_no_dma; + } + + dev_dbg(&pdev->dev, "Initialized %i DMA channels\n", i); + +From bdcbd59f7e252fbb7764349fe75ed75d459bf08e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= +Date: Sat, 3 Oct 2015 22:22:55 +0200 +Subject: [PATCH 388/398] dmaengine: bcm2835: Load driver early and support + legacy API +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Load driver early since at least bcm2708_fb doesn't support deferred +probing and even if it did, we don't want the video driver deferred. + +Support the legacy DMA API which is needed by bcm2708_fb +(but only using the dedicated dma channel 0). + +Signed-off-by: Noralf Trønnes +Signed-off-by: Martin Sperl +--- + drivers/dma/Kconfig | 2 +- + drivers/dma/bcm2835-dma.c | 27 ++++++++++++++++++++++++++- + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig +index b7a17b1c40e23c07d2bc0c7148eacbfafb00428e..33e36b90cfeddc4e58e233c6e655a20102a7da45 100644 +--- a/drivers/dma/Kconfig ++++ b/drivers/dma/Kconfig +@@ -108,7 +108,7 @@ config COH901318 + + config DMA_BCM2835 + tristate "BCM2835 DMA engine support" +- depends on ARCH_BCM2835 ++ depends on ARCH_BCM2835 || ARCH_BCM2708 || ARCH_BCM2709 + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 974015193b93cdb398f1157b89b6e2cf5234354e..2d7aba118640447854732384351601137b502839 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1021,6 +1022,14 @@ static int bcm2835_dma_probe(struct platform_device *pdev) + + dev_dbg(&pdev->dev, "Load BCM2835 DMA engine driver\n"); + ++ /* load the legacy api if bit 0 in the mask is cleared */ ++ if ((chans_available & BIT(0)) == 0) { ++ rc = bcm_dmaman_probe(pdev, base, BIT(0)); ++ if (rc) ++ dev_err(&pdev->dev, ++ "Failed to initialize the legacy API\n"); ++ } ++ + return 0; + + err_no_dma: +@@ -1032,6 +1041,7 @@ static int bcm2835_dma_remove(struct platform_device *pdev) + { + struct bcm2835_dmadev *od = platform_get_drvdata(pdev); + ++ bcm_dmaman_remove(pdev); + dma_async_device_unregister(&od->ddev); + bcm2835_dma_free(od); + +@@ -1047,7 +1057,22 @@ static struct platform_driver bcm2835_dma_driver = { + }, + }; + +-module_platform_driver(bcm2835_dma_driver); ++static int bcm2835_dma_init(void) ++{ ++ return platform_driver_register(&bcm2835_dma_driver); ++} ++ ++static void bcm2835_dma_exit(void) ++{ ++ platform_driver_unregister(&bcm2835_dma_driver); ++} ++ ++/* ++ * Load after serial driver (arch_initcall) so we see the messages if it fails, ++ * but before drivers (module_init) that need a DMA channel. ++ */ ++subsys_initcall(bcm2835_dma_init); ++module_exit(bcm2835_dma_exit); + + MODULE_ALIAS("platform:bcm2835-dma"); + MODULE_DESCRIPTION("BCM2835 DMA engine driver"); + +From 6930003ed820ad0fa21b85ed807ff5df004c188a Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 22 Apr 2016 16:13:59 +0000 +Subject: [PATCH 389/398] ARM: bcm270x: changed bcrm,dma-channel-mask to mask + out the used channel + +Dma channel0 is used by the legacy api - to avoid confilcts this +needs to get masked out in the device-tree instead of hardcoding it +in the driver. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index fa3f6b672a3d17373aa8bf0bbc27743f2631d53d..3bf78706af57fc2be08be2d6c441e6c1765e975d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -59,7 +59,7 @@ + <1 27>; + + #dma-cells = <1>; +- brcm,dma-channel-mask = <0x0f35>; ++ brcm,dma-channel-mask = <0x0f34>; + }; + + intc: interrupt-controller@7e00b200 { + +From 557731106df011a2b39a2021114663ac2ca73c5c Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Sat, 23 Apr 2016 14:07:03 +0000 +Subject: [PATCH 390/398] ARM: bcm2835: add interrupt-names and apply correct + mapping + +Add interrupt-names properties to dt and apply the correct +mapping between irq and dma channels. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 3bf78706af57fc2be08be2d6c441e6c1765e975d..6f3982eaac8d88d5826154b5474c93ccf5e99a3b 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -56,10 +56,32 @@ + <1 24>, + <1 25>, + <1 26>, +- <1 27>; ++ /* dma channel 11-14 share one irq */ ++ <1 27>, ++ <1 27>, ++ <1 27>, ++ <1 27>, ++ /* unused shared irq for all channels */ ++ <1 28>; ++ interrupt-names = "dma0", ++ "dma1", ++ "dma2", ++ "dma3", ++ "dma4", ++ "dma5", ++ "dma6", ++ "dma7", ++ "dma8", ++ "dma9", ++ "dma10", ++ "dma11", ++ "dma12", ++ "dma13", ++ "dma14", ++ "dma-shared-all"; + + #dma-cells = <1>; +- brcm,dma-channel-mask = <0x0f34>; ++ brcm,dma-channel-mask = <0x7f34>; + }; + + intc: interrupt-controller@7e00b200 { + +From c607f37771df9da9fcb63e7dca90db6b3d60c58b Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Sat, 23 Apr 2016 14:20:41 +0000 +Subject: [PATCH 391/398] ARM: bcm2835: make dma-channel-0 available for kms + setups + +Enable the use of dma-channel 0 when using the vc4-kms-v3d overlay. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index a4ca2cabd4cd19d3a82ad1135604dfa52784fb3f..4f1cc20f90dc6780f74e08ebee00e5a1a6062c85 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -119,6 +119,13 @@ + }; + }; + ++ fragment@15 { ++ target-path = "/soc/dma"; ++ __overlay__ { ++ brcm,dma-channel-mask = <0x7f35>; ++ }; ++ }; ++ + __overrides__ { + cma-256 = <0>,"+0-1-2-3-4"; + cma-192 = <0>,"-0+1-2-3-4"; + +From 0aa5d3ea6f0280a05c217d95e28e050ec90d4203 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Tue, 7 Jun 2016 19:37:10 +0200 +Subject: [PATCH 392/398] dmaengine: bcm2835: Fix cyclic DMA period splitting + +The code responsible for splitting periods into chunks that +can be handled by the DMA controller missed to update total_len, +the number of bytes processed in the current period, when there +are more chunks to follow. + +Therefore total_len was stuck at 0 and the code didn't work at all. +This resulted in a wrong control block layout and audio issues because +the cyclic DMA callback wasn't executing on period boundaries. + +Fix this by adding the missing total_len update. + +Signed-off-by: Matthias Reichl +Signed-off-by: Martin Sperl +Tested-by: Clive Messer +--- + drivers/dma/bcm2835-dma.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 2d7aba118640447854732384351601137b502839..ea58967594c5a2d712026f50307c2d4de7089e8d 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -252,8 +252,11 @@ static void bcm2835_dma_create_cb_set_length( + */ + + /* have we filled in period_length yet? */ +- if (*total_len + control_block->length < period_len) ++ if (*total_len + control_block->length < period_len) { ++ /* update number of bytes in this period so far */ ++ *total_len += control_block->length; + return; ++ } + + /* calculate the length that remains to reach period_length */ + control_block->length = period_len - *total_len; + +From 809acb204415f5098261856463849f241d5afad2 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Wed, 8 Jun 2016 13:09:56 +0200 +Subject: [PATCH 393/398] dmaengine: bcm2835: Avoid splitting periods into very + small chunks + +The current cyclic DMA period splitting implementation can generate +very small chunks at the end of each period. For example a 65536 byte +period will be split into a 65532 byte chunk and a 4 byte chunk on +the "lite" DMA channels. + +This increases pressure on the RAM controller as the DMA controller +needs to fetch two control blocks from RAM in quick succession and +could potentially cause latency issues if the RAM is tied up by other +devices. + +We can easily avoid these situations by distributing the remaining +length evenly between the last-but-one and the last chunk, making +sure that split chunks will be at least half the maximum length the +DMA controller can handle. + +This patch checks if the last chunk would be less than half of +the maximum DMA length and if yes distributes the max len+4...max_len*1.5 +bytes evenly between the last 2 chunks. This results in chunk sizes +between max_len/2 and max_len*0.75 bytes. + +Signed-off-by: Matthias Reichl +Signed-off-by: Martin Sperl +Tested-by: Clive Messer +--- + drivers/dma/bcm2835-dma.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index ea58967594c5a2d712026f50307c2d4de7089e8d..0173b912afb26b8f59e623a9055513df34cd3caa 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -253,6 +253,20 @@ static void bcm2835_dma_create_cb_set_length( + + /* have we filled in period_length yet? */ + if (*total_len + control_block->length < period_len) { ++ /* ++ * If the next control block is the last in the period ++ * and it's length would be less than half of max_len ++ * change it so that both control blocks are (almost) ++ * equally long. This avoids generating very short ++ * control blocks (worst case would be 4 bytes) which ++ * might be problematic. We also have to make sure the ++ * new length is a multiple of 4 bytes. ++ */ ++ if (*total_len + control_block->length + max_len / 2 > ++ period_len) { ++ control_block->length = ++ DIV_ROUND_UP(period_len - *total_len, 8) * 4; ++ } + /* update number of bytes in this period so far */ + *total_len += control_block->length; + return; + +From 75b5ee520e5fbe33124e335f1d343a79f43eeffb Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 3 Jun 2016 19:29:11 -0700 +Subject: [PATCH 394/398] dmaengine: bcm2835: Fix polling for completion of DMA + with interrupts masked. + +The tx_status hook is supposed to be safe to call from interrupt +context, but it wouldn't ever return completion for the last transfer, +meaning you couldn't poll for DMA completion with interrupts masked. + +This fixes IRQ handling for bcm2835's DSI1, which requires using the +DMA engine to write its registers due to a bug in the AXI bridge. + +Signed-off-by: Eric Anholt +--- + drivers/dma/bcm2835-dma.c | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c +index 0173b912afb26b8f59e623a9055513df34cd3caa..a98e2c2e6888f6351461c25f9f7d2a34330d0a76 100644 +--- a/drivers/dma/bcm2835-dma.c ++++ b/drivers/dma/bcm2835-dma.c +@@ -588,16 +588,16 @@ static enum dma_status bcm2835_dma_tx_status(struct dma_chan *chan, + struct virt_dma_desc *vd; + enum dma_status ret; + unsigned long flags; ++ u32 residue; + + ret = dma_cookie_status(chan, cookie, txstate); +- if (ret == DMA_COMPLETE || !txstate) ++ if (ret == DMA_COMPLETE) + return ret; + + spin_lock_irqsave(&c->vc.lock, flags); + vd = vchan_find_desc(&c->vc, cookie); + if (vd) { +- txstate->residue = +- bcm2835_dma_desc_size(to_bcm2835_dma_desc(&vd->tx)); ++ residue = bcm2835_dma_desc_size(to_bcm2835_dma_desc(&vd->tx)); + } else if (c->desc && c->desc->vd.tx.cookie == cookie) { + struct bcm2835_desc *d = c->desc; + dma_addr_t pos; +@@ -609,11 +609,25 @@ static enum dma_status bcm2835_dma_tx_status(struct dma_chan *chan, + else + pos = 0; + +- txstate->residue = bcm2835_dma_desc_size_pos(d, pos); ++ residue = bcm2835_dma_desc_size_pos(d, pos); ++ ++ /* ++ * If our non-cyclic transfer is done, then report ++ * complete and trigger the next tx now. This lets ++ * the dmaengine API be used synchronously from an IRQ ++ * handler. ++ */ ++ if (!d->cyclic && residue == 0) { ++ vchan_cookie_complete(&c->desc->vd); ++ bcm2835_dma_start_desc(c); ++ ret = dma_cookie_status(chan, cookie, txstate); ++ } + } else { +- txstate->residue = 0; ++ residue = 0; + } + ++ dma_set_residue(txstate, residue); ++ + spin_unlock_irqrestore(&c->vc.lock, flags); + + return ret; + +From 08b0c2bbcd0f2a8d01b8898bfd0b7859e26af558 Mon Sep 17 00:00:00 2001 +From: Thomas Kriechbaumer +Date: Fri, 3 Jun 2016 09:40:44 +0200 +Subject: [PATCH 395/398] BCM270X_DT: Add spi-rtc overlay on SPI0.0 + +Initial version only supports PCF2123 RTC. + +See: https://github.com/raspberrypi/linux/pull/1510 +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 +++++ + arch/arm/boot/dts/overlays/spi-rtc-overlay.dts | 33 ++++++++++++++++++++++++++ + 3 files changed, 40 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/spi-rtc-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index e17bea26c888d805c3badd0ef48cc5021766b094..f528bd4a33ca336716dc4859e5bb60bf70e6a831 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -78,6 +78,7 @@ dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo + dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi-rtc.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo + dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index dcb6849b0bc0ca2c8cec3a80ae1ae4bd2c15ac1f..3cc1588039d4a2359fd7a358b7d7410804d18f34 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -975,6 +975,12 @@ Load: dtoverlay=spi-gpio35-39 + Params: + + ++Name: spi-rtc ++Info: Adds support for a number of SPI Real Time Clock devices ++Load: dtoverlay=spi-rtc,= ++Params: pcf2123 Select the PCF2123 device ++ ++ + Name: spi1-1cs + Info: Enables spi1 with a single chip select (CS) line and associated spidev + dev node. The gpio pin number for the CS line and spidev device node +diff --git a/arch/arm/boot/dts/overlays/spi-rtc-overlay.dts b/arch/arm/boot/dts/overlays/spi-rtc-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..88d1800d63c9f6727b46d4e590c8e96c671c3755 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/spi-rtc-overlay.dts +@@ -0,0 +1,33 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&spidev0>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi0>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ rtc-pcf2123@0 { ++ compatible = "nxp,rtc-pcf2123"; ++ spi-max-frequency = <5000000>; ++ spi-cs-high = <1>; ++ reg = <0>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ pcf2123 = <0>, "=0=1"; ++ }; ++}; + +From 210d43c5cb2083c184b3d6d3a37dd6d774d11b20 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 15 Jun 2016 16:48:41 +0100 +Subject: [PATCH 396/398] rtc: Add SPI alias for pcf2123 driver + +Without this alias, Device Tree won't cause the driver +to be loaded. + +See: https://github.com/raspberrypi/linux/pull/1510 +--- + drivers/rtc/rtc-pcf2123.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c +index ea8a31c91641d46a7a5b44a2225a98e03c4317a3..7ba232ea770d89b0898694bdfdce475c26717226 100644 +--- a/drivers/rtc/rtc-pcf2123.c ++++ b/drivers/rtc/rtc-pcf2123.c +@@ -358,3 +358,4 @@ MODULE_AUTHOR("Chris Verges "); + MODULE_DESCRIPTION("NXP PCF2123 RTC driver"); + MODULE_LICENSE("GPL"); + MODULE_VERSION(DRV_VERSION); ++MODULE_ALIAS("spi:rtc-pcf2123"); + +From 324d251f545625cbaaf91dea5fc0f08b8e262978 Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Fri, 17 Jun 2016 12:03:39 +1000 +Subject: [PATCH 397/398] Added support for headphones, microphone and + bclk_ratio settings. + +This patch adds headphone and microphone capability to the Audio Injector sound card. The patch also sets the bit clock ratio for use in the bcm2835-i2s driver. The bcm2835-i2s can't handle an 8 kHz sample rate when the bit clock is at 12 MHz because its register is only 10 bits wide which can't represent the ch2 offset of 1508. For that reason, the rate constraint is added. +--- + sound/soc/bcm/audioinjector-pi-soundcard.c | 67 ++++++++++++++++++++++++++---- + 1 file changed, 58 insertions(+), 9 deletions(-) + +diff --git a/sound/soc/bcm/audioinjector-pi-soundcard.c b/sound/soc/bcm/audioinjector-pi-soundcard.c +index 39f29e26897226a413b4fa0a11a9bc160a485281..5ff0985e07efb96b95634a65995f09f7c68d9e99 100644 +--- a/sound/soc/bcm/audioinjector-pi-soundcard.c ++++ b/sound/soc/bcm/audioinjector-pi-soundcard.c +@@ -29,16 +29,56 @@ + + #include "../codecs/wm8731.h" + +-static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd) ++static const unsigned int bcm2835_rates_12000000[] = { ++ 32000, 44100, 48000, 96000, 88200, ++}; ++ ++static struct snd_pcm_hw_constraint_list bcm2835_constraints_12000000 = { ++ .list = bcm2835_rates_12000000, ++ .count = ARRAY_SIZE(bcm2835_rates_12000000), ++}; ++ ++static int snd_audioinjector_pi_soundcard_startup(struct snd_pcm_substream *substream) + { +- struct snd_soc_dapm_context *dapm = &rtd->card->dapm; ++ /* Setup constraints, because there is a 12 MHz XTAL on the board */ ++ snd_pcm_hw_constraint_list(substream->runtime, 0, ++ SNDRV_PCM_HW_PARAM_RATE, ++ &bcm2835_constraints_12000000); ++ return 0; ++} + +- // not connected +- snd_soc_dapm_nc_pin(dapm, "Mic Bias"); +- snd_soc_dapm_nc_pin(dapm, "MICIN"); +- snd_soc_dapm_nc_pin(dapm, "RHPOUT"); +- snd_soc_dapm_nc_pin(dapm, "LHPOUT"); ++static int snd_audioinjector_pi_soundcard_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ switch (params_rate(params)){ ++ case 8000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 1508); ++ case 32000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 378); ++ case 44100: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 274); ++ case 48000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 252); ++ case 88200: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 136); ++ case 96000: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 126); ++ default: ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 126); ++ } ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_audioinjector_pi_soundcard_ops = { ++ .startup = snd_audioinjector_pi_soundcard_startup, ++ .hw_params = snd_audioinjector_pi_soundcard_hw_params, ++}; + ++static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd) ++{ + return snd_soc_dai_set_sysclk(rtd->codec_dai, WM8731_SYSCLK_XTAL, 12000000, SND_SOC_CLOCK_IN); + } + +@@ -50,30 +90,39 @@ static struct snd_soc_dai_link audioinjector_pi_soundcard_dai[] = { + .codec_dai_name = "wm8731-hifi", + .platform_name = "bcm2835-i2s.0", + .codec_name = "wm8731.1-001a", ++ .ops = &snd_audioinjector_pi_soundcard_ops, + .init = audioinjector_pi_soundcard_dai_init, + .dai_fmt = SND_SOC_DAIFMT_CBM_CFM|SND_SOC_DAIFMT_I2S|SND_SOC_DAIFMT_NB_NF, + }, + }; + + static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = { ++ SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_SPK("Ext Spk", NULL), + SND_SOC_DAPM_LINE("Line In Jacks", NULL), ++ SND_SOC_DAPM_MIC("Microphone", NULL), + }; + +-/* Corgi machine connections to the codec pins */ + static const struct snd_soc_dapm_route audioinjector_audio_map[] = { ++ /* headphone connected to LHPOUT, RHPOUT */ ++ {"Headphone Jack", NULL, "LHPOUT"}, ++ {"Headphone Jack", NULL, "RHPOUT"}, ++ + /* speaker connected to LOUT, ROUT */ + {"Ext Spk", NULL, "ROUT"}, + {"Ext Spk", NULL, "LOUT"}, + + /* line inputs */ + {"Line In Jacks", NULL, "Line Input"}, ++ ++ /* mic is connected to Mic Jack, with WM8731 Mic Bias */ ++ {"Microphone", NULL, "Mic Bias"}, + }; + + static struct snd_soc_card snd_soc_audioinjector = { + .name = "audioinjector-pi-soundcard", + .dai_link = audioinjector_pi_soundcard_dai, +- .num_links = 1, ++ .num_links = ARRAY_SIZE(audioinjector_pi_soundcard_dai), + + .dapm_widgets = wm8731_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), + +From 505918ae7a5094cd5b4863f061766de5d541a60a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 21 Jun 2016 20:26:48 +0100 +Subject: [PATCH 398/398] Revert "videobuf2-v4l2: Verify planes array in buffer + dequeueing" + +This reverts commit ec797f4091efd796d0d1fa2ea61e372a3b3dfa20. +--- + drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c +index 6c441be8f893d8e931825b63b810d67ae67a2864..502984c724ff5efd14ef10250dd5d8e653468111 100644 +--- a/drivers/media/v4l2-core/videobuf2-v4l2.c ++++ b/drivers/media/v4l2-core/videobuf2-v4l2.c +@@ -67,11 +67,6 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer + return 0; + } + +-static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb) +-{ +- return __verify_planes_array(vb, pb); +-} +- + /** + * __verify_length() - Verify that the bytesused value for each plane fits in + * the plane length and that the data offset doesn't exceed the bytesused value. +@@ -437,7 +432,6 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb, + } + + static const struct vb2_buf_ops v4l2_buf_ops = { +- .verify_planes_array = __verify_planes_array_core, + .fill_user_buffer = __fill_v4l2_buffer, + .fill_vb2_buffer = __fill_vb2_buffer, + .set_timestamp = __set_timestamp,