[PATCH] media: media-request: Fix crash if memory allocation fails

2020-06-21 Thread Tuomas Tynkkynen
-by: syzbot+6bed2d543cf7e48b8...@syzkaller.appspotmail.com Cc: sta...@vger.kernel.org Signed-off-by: Tuomas Tynkkynen --- drivers/media/mc/mc-request.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/media/mc/mc-request.c b/drivers/media

[PATCH] usbnet: smsc95xx: Fix use-after-free after removal

2020-06-21 Thread Tuomas Tynkkynen
use by the concurrently running workqueue callback. Thus switch to using cancel_delayed_work_sync() to ensure the work callback really is no longer active. Reported-by: syzbot+29dc7d4ae19b703ff...@syzkaller.appspotmail.com Signed-off-by: Tuomas Tynkkynen --- Compile tested only. --- drivers/net

[PATCH 2/7] staging: vc04_services: Drop 'connection' field from SERVICE_CREATION_T

2018-10-04 Thread Tuomas Tynkkynen
The connection field of SERVICE_CREATION_T is assigned to but its value is never read. Drop the field and the resulting no longer needed code from bcm2835-audio and bcm2835-camera. Signed-off-by: Tuomas Tynkkynen --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 --- drivers

[PATCH 7/7] staging: vc04_services: Drop no longer needed headers

2018-10-04 Thread Tuomas Tynkkynen
Previously, connection.h was only required for the definition of VCHI_CONNECTION_T, but now all usages of it are gone. Remove this unused header. After connection.h is gone, message.h and vchi_cfg_internal.h are no longer referenced by anything either. Drop them as well. Signed-off-by: Tuomas

[PATCH 5/7] staging: vc04_services: Drop VCHI_SERVICE_INIT and SERVICE_INFO_T

2018-10-04 Thread Tuomas Tynkkynen
These types are not used anywhere, remove them. Signed-off-by: Tuomas Tynkkynen --- drivers/staging/vc04_services/interface/vchi/vchi.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi

[PATCH 0/7] staging: vc04_services: Some dead code removal

2018-10-04 Thread Tuomas Tynkkynen
fine. Tuomas Tynkkynen (7): staging: vc04_services: Drop pointless stub functions staging: vc04_services: Drop 'connection' field from SERVICE_CREATION_T staging: vc04_services: Drop trivially unused fields from SERVICE_CREATION_T staging: vc04_services: Drop declaration of v

[PATCH 1/7] staging: vc04_services: Drop pointless stub functions

2018-10-04 Thread Tuomas Tynkkynen
These functions do nothing besides returning NULL and are unused. Just drop them. Signed-off-by: Tuomas Tynkkynen --- .../vc04_services/interface/vchi/vchi.h | 11 .../interface/vchiq_arm/vchiq_shim.c | 27 --- 2 files changed, 38 deletions(-) diff --git

[PATCH 3/7] staging: vc04_services: Drop trivially unused fields from SERVICE_CREATION_T

2018-10-04 Thread Tuomas Tynkkynen
These fields are only initialized with constants and never read. Drop them. Signed-off-by: Tuomas Tynkkynen --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 5 - .../staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 5 - drivers/staging/vc04_services/interface/vchi/vchi.h

[PATCH 4/7] staging: vc04_services: Drop declaration of vchi_crc_control()

2018-10-04 Thread Tuomas Tynkkynen
There is no definition for this unused function, so drop its prototype. Signed-off-by: Tuomas Tynkkynen --- drivers/staging/vc04_services/interface/vchi/vchi.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging

[PATCH 6/7] staging: vc04_services: Drop unused parameters from vchi_connect()

2018-10-04 Thread Tuomas Tynkkynen
Remove two parameters which are never used and all where all callers just pass in dummy values anyway. Signed-off-by: Tuomas Tynkkynen --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- .../staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- drivers/staging/vc04_services

[PATCH] staging: vc04_services: Remove unused vchiq_genversion script

2018-09-21 Thread Tuomas Tynkkynen
As far as I can tell, this has never been used. Signed-off-by: Tuomas Tynkkynen --- .../interface/vchiq_arm/vchiq_genversion | 88 -- 1 file changed, 88 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_genversion diff --git

[PATCH v2] ARM: dts: imx6qdl-wandboard: Add stdout-path

2018-08-20 Thread Tuomas Tynkkynen
Setting a stdout-path in the .dtb is convenient because then the user gets a serial console on the RS-232 connector without any extra effort of figuring out the relevant 'console=' boot parameter. Reviewed-by: Fabio Estevam Signed-off-by: Tuomas Tynkkynen --- v2: Make subject line

[PATCH] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3

2018-08-19 Thread Tuomas Tynkkynen
Setting GPIO 21 high seems to be required to enable power to USB ports on the WNDR3400v3. As there is already similar code for WNR3500L, make the existing USB power GPIO code generic and use that. Signed-off-by: Tuomas Tynkkynen --- arch/mips/bcm47xx/workarounds.c | 8 +--- 1 file changed

Re: AArch64 boot failure on Hikey960 on latest master after "arm64: insn: Don't fallback on nosync path for general insn patching"

2018-08-16 Thread Tuomas Tynkkynen
Hi, On 08/16/2018 08:57 PM, John Stultz wrote: On Thu, Aug 16, 2018 at 3:22 AM, Will Deacon wrote: Hi Tuomas, [+John] ... Out of interest -- do you know if Hikey960 is used by any boot-testing farms? The patch above has been in linux-next for ages, but we didn't see any complaints until it

Re: AArch64 boot failure on Hikey960 on latest master after "arm64: insn: Don't fallback on nosync path for general insn patching"

2018-08-16 Thread Tuomas Tynkkynen
Hi, On 08/16/2018 01:22 PM, Will Deacon wrote: Hi Tuomas, [+John] On Thu, Aug 16, 2018 at 02:38:51AM +0300, Tuomas Tynkkynen wrote: Booting Linus's master of today with the usual arm64 defconfig fails for me on the Hikey960 board. I've bisected it down t

AArch64 boot failure on Hikey960 on latest master after "arm64: insn: Don't fallback on nosync path for general insn patching"

2018-08-15 Thread Tuomas Tynkkynen
Hello, Booting Linus's master of today with the usual arm64 defconfig fails for me on the Hikey960 board. I've bisected it down to: commit 693350a7998018391852c48f68956cf0f855b2b9 (HEAD, refs/bisect/bad) Author: Will Deacon Date: Tue Jun 19 17:55:28 2018 +0100 arm64: insn: Don't fallback

[PATCH] ARM: dts: imx6: Add stdout-path to Wandboard

2018-08-14 Thread Tuomas Tynkkynen
Setting a stdout-path in the .dtb is convenient because then the user gets a serial console on the RS-232 connector without any extra effort of figuring out the relevant 'console=' boot parameter. Signed-off-by: Tuomas Tynkkynen --- Tested on a Wandboard Quad with mainline U-Bo

[PATCH 1/2] ARM: dts: sunxi: Don't use cd-inverted in sun8i-r40-bananapi-m2-ultra

2018-08-07 Thread Tuomas Tynkkynen
Another user of cd-inverted seems to have crept in. Switch it away from cd-inverted to be consistent with other sunxi boards. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/boot

[PATCH 2/2] arm64: dts: sunxi: Don't use cd-inverted in sun50i-a64-pinebook

2018-08-07 Thread Tuomas Tynkkynen
Another user of cd-inverted seems to have crept in. Switch it away from cd-inverted to be consistent with other sunxi boards. Signed-off-by: Tuomas Tynkkynen --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch

[PATCH 2/2] staging: bcm2835-audio: Don't leak workqueue if open fails

2018-07-12 Thread Tuomas Tynkkynen
Currently, if bcm2835_audio_open() fails partway, the allocated workqueue is leaked. Avoid that. While at it, propagate the return value of bcm2835_audio_open_connection() on failure instead of returning -1. Signed-off-by: Tuomas Tynkkynen --- .../staging/vc04_services/bcm2835-audio/bcm2835

[PATCH 1/2] staging: bcm2835-audio: Check if workqueue allocation failed

2018-07-12 Thread Tuomas Tynkkynen
rid of the rather pointless one-line function my_workqueue_init(). Signed-off-by: Tuomas Tynkkynen --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c| 111 ++--- 1 file changed, 50 insertions(+), 61 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835

[PATCH] ARM: dts: sunxi: Change sun7i-a20-olimex-som204-evb to not use cd-inverted

2018-04-10 Thread Tuomas Tynkkynen
d-inverted. Switch it away from using cd-inverted to be consistent with rest of the sunxi boards. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/sun7i-a20-olimex-som204-evb.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/sun7i-a20-olimex-som204-

[PATCH] ARM: multi_v7_defconfig: Enable serial console on RPi 3

2018-02-06 Thread Tuomas Tynkkynen
The Raspberry Pi 3 uses the 8250-based auxilary UART of the BCM2837 SoC as the primary serial console of the board, so enable it in the multiplatform defconfig. Signed-off-by: Tuomas Tynkkynen --- arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch

Re: [PATCH 1/2] ARM: dts: sunxi: Switch MMC nodes away from cd-inverted property

2018-02-01 Thread Tuomas Tynkkynen
Hi Maxime, On Thu, 2018-01-04 at 16:03 +0100, Maxime Ripard wrote: > On Fri, Dec 22, 2017 at 10:57:37PM +0200, Tuomas Tynkkynen wrote: > > Using the cd-inverted property is not useful when GPIOs are used as > > card > > detects since the polarity can be specified with the u

[PATCH] mmc: Don't reference Linux-specific OF_GPIO_ACTIVE_LOW flag in DT binding

2017-12-22 Thread Tuomas Tynkkynen
OF_GPIO_ACTIVE_LOW is a Linux implementation detail. The binding document should be referring to GPIO_ACTIVE_LOW found in include/dt-bindings/gpio/gpio.h. Signed-off-by: Tuomas Tynkkynen --- Documentation/devicetree/bindings/mmc/mmc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 1/2] ARM: dts: sunxi: Switch MMC nodes away from cd-inverted property

2017-12-22 Thread Tuomas Tynkkynen
Using the cd-inverted property is not useful when GPIOs are used as card detects since the polarity can be specified with the usual GPIO_ACTIVE_(HIGH|LOW) GPIO flags. It has also caused confusion for U-Boot developers, so migrate all sunxi boards away from cd-inverted. Signed-off-by: Tuomas

[PATCH 2/2] arm64: dts: sunxi: Switch MMC nodes away from cd-inverted property

2017-12-22 Thread Tuomas Tynkkynen
Using the cd-inverted property is not useful when GPIOs are used as card detects since the polarity can be specified with the usual GPIO_ACTIVE_(HIGH|LOW) GPIO flags. It has also caused confusion for U-Boot developers, so migrate all sunxi boards away from cd-inverted. Signed-off-by: Tuomas

[PATCH] ARM: dts: sun7i: Enable HDMI on pcDuino3 Nano

2017-12-15 Thread Tuomas Tynkkynen
The board has a regular-sized HDMI connector, so enable the display the pipeline and HDMI output for it. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20

[PATCH] 9p: Fix missing commas in mount options

2017-11-19 Thread Tuomas Tynkkynen
org # 4.13+ Fixes: c4fac9100456 ("9p: Implement show_options") Signed-off-by: Tuomas Tynkkynen --- net/9p/client.c | 2 +- net/9p/trans_fd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/9p/client.c b/net/9p/client.c index 4674235b0d9b..b2583ee2fbe9

Re: [PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-10-23 Thread Tuomas Tynkkynen
Hi Al, On Fri, 2017-10-20 at 21:11 +0100, Al Viro wrote: > On Tue, Sep 26, 2017 at 04:10:14PM +0300, Tuomas Tynkkynen wrote: > > Hi Al, > > > > On Wed, 2017-09-06 at 17:59 +0300, Tuomas Tynkkynen wrote: > > > These two patches fix two hard-to-hit (but really an

Re: [PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-10-20 Thread Tuomas Tynkkynen
Al, Linus Can one of you please pick these patches? They've been on the list for a month now, with an ack from Latchesar Ionkov. Thanks! Tuomas On Wed, 2017-09-06 at 17:59 +0300, Tuomas Tynkkynen wrote: > These two patches fix two hard-to-hit (but really annoying) bugs in > 9p. >

Changing the ARM variant reported by 'uname -m'

2017-10-18 Thread Tuomas Tynkkynen
Hi, For our distro (NixOS), I've experimented with building packages for ARMv6 on ARMv7 hardware. This has generally worked fine, except that some build scripts (in coreutils, for example) notice that `uname -m` returns 'armv7l' and thus decide to e.g. add some ARMv7-specific gcc flags, which

[PATCH] arm64: defconfig: Enable Tegra PCI controller

2017-10-18 Thread Tuomas Tynkkynen
The driver has supported the 64-bit Tegra210 for a while now, so enable it in the defconfig. Signed-off-by: Tuomas Tynkkynen --- I didn't personally test this but got a report from our distro users that it works. arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --

Re: [PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-09-26 Thread Tuomas Tynkkynen
Hi Al, On Wed, 2017-09-06 at 17:59 +0300, Tuomas Tynkkynen wrote: > These two patches fix two hard-to-hit (but really annoying) bugs in > 9p. > The first one was posted earlier in February (with one R-b), the > second > is a new one. > > Both of these have had soaking

[PATCH 0/2] 9p: Fixes for hard-to-hit bugs

2017-09-06 Thread Tuomas Tynkkynen
These two patches fix two hard-to-hit (but really annoying) bugs in 9p. The first one was posted earlier in February (with one R-b), the second is a new one. Both of these have had soaking in NixOS distribution kernels for a couple of months with no ill effects. Tuomas Tynkkynen (2): fs/9p

[PATCH 1/2] fs/9p: Compare qid.path in v9fs_test_inode

2017-09-06 Thread Tuomas Tynkkynen
he can now accidentally locate a completely wrong inode from the same inode hash bucket if the other fields (qid.type and qid.version) match. Fixes: fd2421f54423 ("fs/9p: When doing inode lookup compare qid details and inode mode bits.") Cc: sta...@vger.kernel.org Reviewed-by: Latchesar Ionkov S

[PATCH 2/2] net/9p: Switch to wait_event_killable()

2017-09-06 Thread Tuomas Tynkkynen
the stat(). In practice, hitting the problem is rare and needs a really slow/bogged down 9p server. Cc: sta...@vger.kernel.org Signed-off-by: Tuomas Tynkkynen --- net/9p/client.c | 3 +-- net/9p/trans_virtio.c | 13 ++--- net/9p/trans_xen.c| 4 ++-- 3 files changed, 9 in

[PATCH] soc/tegra: Fix bad of_node_put() in powergate init

2017-07-28 Thread Tuomas Tynkkynen
ented" but then only at the very end of the docstring the crucial part "Decrements the refcount of prev" is mentioned.) Fixes: a38045121bf42 ("soc/tegra: pmc: Add generic PM domain support") Signed-off-by: Tuomas Tynkkynen --- Compile tested only (backtrace received via a d

9p and EINTR?

2017-03-24 Thread Tuomas Tynkkynen
Hi fsdevel, Some users of our distro (NixOS) ran into some 9p funkiness again... Eventually it was traced down to many 9p filesystem calls getting interrupted by signals (here, it was bash receiving SIGCHLDs from background jobs exiting) and returning with -EINTR. E.g. stat() manpage doesn't list

Re: [PATCH] fs/9p: Compare qid.path in v9fs_test_inode

2017-03-08 Thread Tuomas Tynkkynen
On Wed, 22 Feb 2017 02:06:29 +0200 Tuomas Tynkkynen wrote: > Commit fd2421f54423 ("fs/9p: When doing inode lookup compare qid details > and inode mode bits.") transformed v9fs_qid_iget() to use iget5_locked() > instead of iget_locked(). However, the test() callback is not che

[PATCH] fs/9p: Compare qid.path in v9fs_test_inode

2017-02-21 Thread Tuomas Tynkkynen
he can now accidentally locate a completely wrong inode from the same inode hash bucket if the other fields (qid.type and qid.version) match. Fixes: fd2421f54423 ("fs/9p: When doing inode lookup compare qid details and inode mode bits.") Cc: sta...@vger.kernel.org Signed-off-by: Tuomas Tynkkynen

Re: [V9fs-developer] 9pfs hangs since 4.7

2017-01-09 Thread Tuomas Tynkkynen
On Sat, 7 Jan 2017 17:19:10 + Al Viro wrote: > On Sat, Jan 07, 2017 at 04:10:45PM +0100, Greg Kurz wrote: > > > virtqueue_push(), but pdu freeing is delayed until v9fs_flush() gets woken > > > up. In the meanwhile, another request arrives into the slot of freed by > > > that virtqueue_push()

Re: 9pfs hangs since 4.7

2017-01-04 Thread Tuomas Tynkkynen
On Wed, 4 Jan 2017 01:47:53 + Al Viro wrote: > On Wed, Jan 04, 2017 at 01:34:50AM +0200, Tuomas Tynkkynen wrote: > > > I got these logs from the server & client with 9p tracepoints enabled: > > > > https://gist.githubusercontent.com/dezgeg/02447100

Re: 9pfs hangs since 4.7

2017-01-03 Thread Tuomas Tynkkynen
On Mon, 2 Jan 2017 16:23:09 + Al Viro wrote: > > What I'd like to see is a log of 9p traffic in those; to hell with the > payloads, just the type and tag of from each message [...] Thanks for the suggestions. With the following patch to QEMU: diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index

Re: 9pfs hangs since 4.7

2017-01-02 Thread Tuomas Tynkkynen
directory handling update from Al Viro. Al, do you have any ideas about this problem with 9pfs I've been observing (quoted below in full)? Many thanks in advance! On Thu, 24 Nov 2016 21:50:23 +0200 Tuomas Tynkkynen wrote: > Hi fsdevel, > > I have been observing hangs when runn

Re: 9pfs hangs since 4.7

2016-12-02 Thread Tuomas Tynkkynen
On Tue, 29 Nov 2016 10:39:39 -0600 Eric Van Hensbergen wrote: > Any idea of what xfstests is doing at this point in time? I'd be a > bit worried about some sort of loop in the namespace since it seems to > be in path traversal. Could also be some sort of resource leak or > fragmentation, I'll a

9pfs hangs since 4.7

2016-11-24 Thread Tuomas Tynkkynen
Hi fsdevel, I have been observing hangs when running xfstests generic/224. Curiously enough, the test is *not* causing problems on the FS under test (I've tried both ext4 and f2fs) but instead it's causing the 9pfs that I'm using as the root filesystem to crap out. How it shows up is that the tes

[PATCH RESEND 2/2] ARM: multi_v7_defconfig: Enable ARM_IMX6Q_CPUFREQ

2016-07-11 Thread Tuomas Tynkkynen
The Wandboard Quad can make use of the cpufreq support provided by the driver. Enable it and its dependency, REGULATOR_ANATOP, by default. Signed-off-by: Tuomas Tynkkynen --- Resent for the i.MX maintainers to apply. arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions

[PATCH RESEND 1/2] ARM: multi_v7_defconfig: Enable AHCI_IMX

2016-07-11 Thread Tuomas Tynkkynen
The Wandboard Quad comes with a SATA port. Enable the IMX SATA driver by default to make it easy to have the root filesystem on it. Signed-off-by: Tuomas Tynkkynen --- Resent for the i.MX maintainers to apply. arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 2/2] ARM: multi_v7_defconfig: Enable ARM_IMX6Q_CPUFREQ

2016-06-20 Thread Tuomas Tynkkynen
The Wandboard Quad can make use of the cpufreq support provided by the driver. Enable it and its dependency, REGULATOR_ANATOP, by default. Signed-off-by: Tuomas Tynkkynen --- arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs

[PATCH 1/2] ARM: multi_v7_defconfig: Enable AHCI_IMX

2016-06-20 Thread Tuomas Tynkkynen
The Wandboard Quad comes with a SATA port. Enable the IMX SATA driver by default to make it easy to have the root filesystem on it. Signed-off-by: Tuomas Tynkkynen --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b

Re: [PATCH v3 1/2] usb: host: ehci-tegra: Grab the correct UTMI pads reset

2016-05-05 Thread Tuomas Tynkkynen
On 05/04/2016 06:26 PM, Thierry Reding wrote: On Wed, May 04, 2016 at 07:57:10AM -0700, Greg Kroah-Hartman wrote: On Wed, May 04, 2016 at 04:39:59PM +0200, Thierry Reding wrote: From: Thierry Reding There are three EHCI controllers on Tegra SoCs, each with its own reset line. However, the fir

Re: [PATCH v8 15/18] cpufreq: Add cpufreq driver for Tegra124

2015-03-03 Thread Tuomas Tynkkynen
On 03/03/2015 01:33 PM, Mikko Perttunen wrote: On 03/02/2015 10:49 AM, Paul Bolle wrote: On Sun, 2015-03-01 at 14:44 +0200, Mikko Perttunen wrote: [...] +static struct platform_driver tegra124_cpufreq_platdrv = { +.driver = { +.name= "cpufreq-tegra124", +.owner= TH

Re: [PATCH v7 01/16] clk: tegra: Add binding for the Tegra124 DFLL clocksource

2015-02-15 Thread Tuomas Tynkkynen
On 02/13/2015 12:42 AM, Thierry Reding wrote: On Thu, Jan 08, 2015 at 03:22:04PM +0200, Mikko Perttunen wrote: From: Tuomas Tynkkynen The DFLL is the main clocksource for the fast CPU cluster on Tegra124 and also provides automatic CPU rail voltage scaling as well. The DFLL is a separate IP

[PATCH v4 03/16] clk: tegra: Add closed loop support for the DFLL

2014-08-20 Thread Tuomas Tynkkynen
) and make a decision to either lower or raise the DFLL supply voltage. The DFLL module can then autonomously change the supply voltage by communicating with an off-chip PMIC via either I2C or PWM signals. This driver currently supports only I2C. Signed-off-by: Tuomas Tynkkynen --- v4: - Use

[PATCH v4 00/16] Tegra124 CL-DVFS / DFLL clocksource, plus cpufreq

2014-08-20 Thread Tuomas Tynkkynen
eries has been tested on the Jetson TK1 (Rev C). Porting this to the Venice2 should be simple, though do note that it does not have active cooling. Thanks, Tuomas Paul Walmsley (1): clk: tegra: Add DFLL DVCO reset control for Tegra124 Tuomas Tynkkynen (15): clk: tegra: Add binding for the Teg

[PATCH v4 05/16] clk: tegra: Add DFLL DVCO reset control for Tegra124

2014-08-20 Thread Tuomas Tynkkynen
block will complete. Thanks to Aleksandr Frid for identifying this and saving hours of debugging time. Signed-off-by: Paul Walmsley [ttynkkynen: ported to tegra124 from tegra114] Signed-off-by: Tuomas Tynkkynen --- drivers/clk/tegra/clk-tegra124.c | 47

[PATCH v4 04/16] clk: tegra: Add functions for parsing CVB tables

2014-08-20 Thread Tuomas Tynkkynen
utility functions to parse the Tegra-specific tables and export the voltage-frequency pairs to the generic OPP framework for other drivers to use. Signed-off-by: Tuomas Tynkkynen --- arch/arm/mach-tegra/Kconfig | 1 + drivers/clk/tegra/cvb.c | 133

[PATCH v4 09/16] ARM: tegra: Add the DFLL to Tegra124 device tree

2014-08-20 Thread Tuomas Tynkkynen
The DFLL clocksource is a separate IP block from the usual clock-and-reset controller, so it gets its own device tree node. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/tegra124.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/boot/dts/tegra124

[PATCH v4 07/16] clk: tegra: Save/restore CCLKG_BURST_POLICY on suspend

2014-08-20 Thread Tuomas Tynkkynen
Save and restore this register since the LP1 restore assembly routines fiddle with it. Otherwise the CPU would keep running on PLLX after resume from suspend even when DFLL was the original clocksource. Signed-off-by: Tuomas Tynkkynen --- drivers/clk/tegra/clk-tegra124.c | 14 ++ 1

[PATCH v4 14/16] ARM: tegra: Add entries for cpufreq on Tegra124

2014-08-20 Thread Tuomas Tynkkynen
The Tegra124 cpufreq driver relies on certain clocks being present in the /cpus/cpu@0 node. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/tegra124.dtsi | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts

[PATCH v4 11/16] cpufreq: tegra124: Add device tree bindings

2014-08-20 Thread Tuomas Tynkkynen
The cpufreq driver for Tegra124 will be a different one than the old Tegra20 cpufreq driver (tegra-cpufreq), which does not use the device tree. Signed-off-by: Tuomas Tynkkynen --- v3: vdd-cpu-supply property added --- .../bindings/cpufreq/tegra124-cpufreq.txt | 44

[PATCH v4 08/16] clk: tegra: Add the DFLL as a possible parent of the cclk_g clock

2014-08-20 Thread Tuomas Tynkkynen
The DFLL clocksource was missing from the list of possible parents for the fast CPU cluster. Add it to the list. Signed-off-by: Tuomas Tynkkynen --- drivers/clk/tegra/clk-tegra-super-gen4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/tegra/clk-tegra-super

[PATCH v4 16/16] ARM: tegra: enable Tegra124 cpufreq driver by default

2014-08-20 Thread Tuomas Tynkkynen
The Tegra124 cpufreq driver depends on CONFIG_GENERIC_CPUFREQ_CPU0, so enable it to get the Tegra driver to build by default. Signed-off-by: Tuomas Tynkkynen --- v4: New patch --- arch/arm/configs/tegra_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs

[PATCH v4 15/16] ARM: tegra: Add CPU regulator to the Jetson TK1 device tree

2014-08-20 Thread Tuomas Tynkkynen
Add the CPU voltage regulator for the cpufreq driver. Signed-off-by: Tuomas Tynkkynen --- v3: New patch --- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts

[PATCH v4 12/16] cpufreq: tegra: Rename tegra-cpufreq to tegra20-cpufreq

2014-08-20 Thread Tuomas Tynkkynen
The Tegra124 will use a different driver for frequency scaling, so rename the old driver (which handles only Tegra20) appropriately. Signed-off-by: Tuomas Tynkkynen --- v3: New patch --- drivers/cpufreq/Kconfig.arm| 6 +++--- drivers/cpufreq/Makefile

[PATCH v4 13/16] cpufreq: Add cpufreq driver for Tegra124

2014-08-20 Thread Tuomas Tynkkynen
cpufreq operations. This driver also relies on the DFLL driver to fill the OPP table for the CPU0 device, so that the cpufreq-cpu0 driver knows what frequencies to use. Signed-off-by: Tuomas Tynkkynen --- v4: - check for get_cpu_device() return value - add comment why an extra platform driver

[PATCH v4 06/16] clk: tegra: Add Tegra124 DFLL clocksource platform driver

2014-08-20 Thread Tuomas Tynkkynen
Add basic platform driver support for the fast CPU cluster DFLL clocksource found on Tegra124 SoCs. This small driver selects the appropriate Tegra124-specific characterization data and integration code. It relies on the DFLL common code to do most of the work. Signed-off-by: Tuomas Tynkkynen

[PATCH v4 10/16] ARM: tegra: Enable the DFLL on the Jetson TK1

2014-08-20 Thread Tuomas Tynkkynen
Add the board-specific properties of the DFLL for the Jetson TK1 board. On this board, the DFLL will take control of the sd0 regulator on the on-board AS3722 PMIC. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 8 +++- 1 file changed, 7 insertions(+), 1

[PATCH v4 02/16] clk: tegra: Add library for the DFLL clock source (open-loop mode)

2014-08-20 Thread Tuomas Tynkkynen
Signed-off-by: Tuomas Tynkkynen --- v4: Use correct accessor function for the DFLL_OUTPUT_CFG register v3: Fix incorrect order of arguments to dfll_scale_dvco_rate call --- drivers/clk/tegra/Makefile |1 + drivers/clk/tegra/clk-dfll.c | 1090 ++ drivers

[PATCH v4 01/16] clk: tegra: Add binding for the Tegra124 DFLL clocksource

2014-08-20 Thread Tuomas Tynkkynen
The DFLL is the main clocksource for the fast CPU cluster on Tegra124 and also provides automatic CPU rail voltage scaling as well. The DFLL is a separate IP block from the usual Tegra124 clock-and-reset controller, so it gets its own node in the device tree. Signed-off-by: Tuomas Tynkkynen

Re: [PATCH v3 03/15] clk: tegra: Add closed loop support for the DFLL

2014-08-19 Thread Tuomas Tynkkynen
On 19/08/14 07:36, Vince Hsu wrote: > Hi, > > On 08/19/2014 11:33 AM, Tuomas Tynkkynen wrote: [...] >> +dfll_writel(td, val, DFLL_OUTPUT_CFG); >> +dfll_wmb(td); > Sorry that I forgot to mention this in v2's comment. Could you squash the > change below

Re: [PATCH v3 13/15] cpufreq: Add cpufreq driver for Tegra124

2014-08-19 Thread Tuomas Tynkkynen
On 19/08/14 08:55, Viresh Kumar wrote: > On 19 August 2014 09:03, Tuomas Tynkkynen wrote: >> - use 'select GENERIC_CPUFREQ_CPU0', not depends > > Bad :( > > It *has* to be a depends here, its not optional. That was outcome of the > chat we had last time

[PATCH v3 09/15] ARM: tegra: Add the DFLL to Tegra124 device tree

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen The DFLL clocksource is a separate IP block from the usual clock-and-reset controller, so it gets its own device tree node. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/tegra124.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a

[PATCH v3 04/15] clk: tegra: Add functions for parsing CVB tables

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen Tegra CVB tables encode the relationship between operating voltage and optimal frequency as a function of the so-called speedo value. The speedo value is written to the on-chip fuses at the factory, which allows the voltage-frequency operating points to be calculated on an

[PATCH v3 01/15] clk: tegra: Add binding for the Tegra124 DFLL clocksource

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen The DFLL is the main clocksource for the fast CPU cluster on Tegra124 and also provides automatic CPU rail voltage scaling as well. The DFLL is a separate IP block from the usual Tegra124 clock-and-reset controller, so it gets its own node in the device tree. Signed-off

[PATCH v3 10/15] ARM: tegra: Enable the DFLL on the Jetson TK1

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen Add the board-specific properties of the DFLL for the Jetson TK1 board. On this board, the DFLL will take control of the sd0 regulator on the on-board AS3722 PMIC. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 8 +++- 1 file changed

[PATCH v3 06/15] clk: tegra: Add Tegra124 DFLL clocksource platform driver

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen Add basic platform driver support for the fast CPU cluster DFLL clocksource found on Tegra124 SoCs. This small driver selects the appropriate Tegra124-specific characterization data and integration code. It relies on the DFLL common code to do most of the work. Signed-off

[PATCH v3 03/15] clk: tegra: Add closed loop support for the DFLL

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen With closed loop support, the clock rate of the DFLL can be adjusted. The oscillator itself in the DFLL is a free-running oscillator whose rate is directly determined the supply voltage. However, the DFLL module contains logic to compare the DFLL output rate to a fixed

[PATCH v3 00/15] Tegra124 CL-DVFS / DFLL clocksource, plus cpufreq

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen v3 changes: - Fix incorrect order of arguments to dfll_scale_dvco_rate - Fix accidental commas at end-of-statement to semicolons - Some cpufreq changes: - rename cpufreq-tegra to cpufreq-tegra20 - have separate Kconfig entries for Tegra20/Tegra124 support - use

[PATCH v3 12/15] cpufreq: tegra: Rename tegra-cpufreq to tegra20-cpufreq

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen The Tegra124 will use a different driver for frequency scaling, so rename the old driver (which handles only Tegra20) appropriately. Signed-off-by: Tuomas Tynkkynen --- v3: New patch --- drivers/cpufreq/Kconfig.arm| 6 +++--- drivers/cpufreq

[PATCH v3 05/15] clk: tegra: Add DFLL DVCO reset control for Tegra124

2014-08-18 Thread Tuomas Tynkkynen
block will complete. Thanks to Aleksandr Frid for identifying this and saving hours of debugging time. Signed-off-by: Paul Walmsley [ttynkkynen: ported to tegra124 from tegra114] Signed-off-by: Tuomas Tynkkynen --- drivers/clk/tegra/clk-tegra124.c | 47

[PATCH v3 15/15] ARM: tegra: Add CPU regulator to the Jetson TK1 device tree

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen Add the CPU voltage regulator for the cpufreq driver. Signed-off-by: Tuomas Tynkkynen --- v3: New patch --- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts

[PATCH v3 02/15] clk: tegra: Add library for the DFLL clock source (open-loop mode)

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen Add shared code to support the Tegra DFLL clocksource in open-loop mode. This root clocksource is present on the Tegra124 SoCs. The DFLL is the intended primary clock source for the fast CPU cluster. This code is very closely based on a patch by Paul Walmsley from

[PATCH v3 08/15] clk: tegra: Add the DFLL as a possible parent of the cclk_g clock

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen The DFLL clocksource was missing from the list of possible parents for the fast CPU cluster. Add it to the list. Signed-off-by: Tuomas Tynkkynen --- drivers/clk/tegra/clk-tegra-super-gen4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v3 13/15] cpufreq: Add cpufreq driver for Tegra124

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen Add a new cpufreq driver for Tegra124. Instead of using the PLLX as the CPU clocksource, switch immediately to the DFLL. It allows the use of higher clock rates, and will automatically scale the CPU voltage as well. Besides the CPU clocksource switch, we let the cpufreq

[PATCH v3 11/15] cpufreq: tegra124: Add device tree bindings

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen The cpufreq driver for Tegra124 will be a different one than the old Tegra20 cpufreq driver (tegra-cpufreq), which does not use the device tree. Signed-off-by: Tuomas Tynkkynen --- v3: vdd-cpu-supply property added --- .../bindings/cpufreq/tegra124-cpufreq.txt

[PATCH v3 07/15] clk: tegra: Save/restore CCLKG_BURST_POLICY on suspend

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen Save and restore this register since the LP1 restore assembly routines fiddle with it. Otherwise the CPU would keep running on PLLX after resume from suspend even when DFLL was the original clocksource. Signed-off-by: Tuomas Tynkkynen --- drivers/clk/tegra/clk-tegra124

[PATCH v3 14/15] ARM: tegra: Add entries for cpufreq on Tegra124

2014-08-18 Thread Tuomas Tynkkynen
From: Tuomas Tynkkynen The Tegra124 cpufreq driver relies on certain clocks being present in the /cpus/cpu@0 node. Signed-off-by: Tuomas Tynkkynen --- arch/arm/boot/dts/tegra124.dtsi | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124

Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-18 Thread Tuomas Tynkkynen
On 17/08/14 18:28, Grant Likely wrote: > On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen > wrote: [...] >> +EXPORT_SYMBOL(of_match_machine); > > Too wordy... > > return of_match_node(matches, of_allnodes); > > :-) > > It could be a static inlin

Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-08 Thread Tuomas Tynkkynen
On 08/08/14 12:41, Thierry Reding wrote: > >> +const struct of_device_id *of_match_machine(const struct of_device_id >> *matches) >> +{ >> +const struct of_device_id *match; >> +struct device_node *root; >> + >> +root = of_find_node_by_path("/"); >> +if (!root) >> +r

[PATCH 3/3] cpuidle: big.LITTLE: Use of_match_machine

2014-08-07 Thread Tuomas Tynkkynen
Use the new helper function, also fixing a device_node refcount leak. Signed-off-by: Tuomas Tynkkynen --- Compile tested only. drivers/cpuidle/cpuidle-big_little.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle

[PATCH 1/3] of: Add of_match_machine helper

2014-08-07 Thread Tuomas Tynkkynen
Add of_match_machine function to test the device tree root for an of_match array. This can be useful when testing SoC versions at runtime, for example. Signed-off-by: Tuomas Tynkkynen --- drivers/of/base.c | 21 + include/linux/of.h | 3 +++ 2 files changed, 24 insertions

[PATCH 2/3] soc/tegra: Use of_match_machine in soc_is_tegra()

2014-08-07 Thread Tuomas Tynkkynen
Use the new helper function, also fixing a device_node refcount leak. Signed-off-by: Tuomas Tynkkynen --- drivers/soc/tegra/common.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/soc/tegra/common.c b/drivers/soc/tegra/common.c index a71cb74..f6571f5 100644

[PATCH 0/3] Introduce of_match_machine() helper

2014-08-07 Thread Tuomas Tynkkynen
add a helper to the OF core. Tuomas Tynkkynen (3): of: Add of_match_machine helper soc/tegra: Use of_match_machine in soc_is_tegra() cpuidle: big.LITTLE: Use of_match_machine drivers/cpuidle/cpuidle-big_little.c | 6 +- drivers/of/base.c| 21 + driver

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Tuomas Tynkkynen
On 23/07/14 19:50, Viresh Kumar wrote: > On 23 July 2014 17:27, Tuomas Tynkkynen wrote: >> The platform device is required for the deferred probe that can happen if the >> DFLL driver hasn't initialized yet, and module_init() callbacks don't seem to >> respect -EP

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Tuomas Tynkkynen
On 23/07/14 10:09, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Mon, Jul 21, 2014 at 06:39:00PM +0300, Tuomas Tynkkynen wrote: > [...] >> diff --git a/drivers/cpufreq/tegra124-cpufreq.c >> b/drivers/cpufreq/tegra124-cpufreq.c > [...] >> +stati

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Tuomas Tynkkynen
On 23/07/14 07:44, Viresh Kumar wrote: > On 21 July 2014 21:09, Tuomas Tynkkynen wrote: > >> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm >> index 7364a53..df3c73e 100644 >> --- a/drivers/cpufreq/Kconfig.arm >> +++ b/drivers/cpufreq/K

[PATCH] PCI/AER: Forward declare struct pci_dev to avoid warning

2014-07-21 Thread Tuomas Tynkkynen
38:44: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] Signed-off-by: Tuomas Tynkkynen --- include/linux/aer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/aer.h b/include/linux/aer.h index 4dbaa70..d9ec8dd 1

[PATCH v2 07/16] clk: tegra: Add DFLL DVCO reset control for Tegra124

2014-07-21 Thread Tuomas Tynkkynen
block will complete. Thanks to Aleksandr Frid for identifying this and saving hours of debugging time. Signed-off-by: Paul Walmsley [ttynkkynen: ported to tegra124 from tegra114] Signed-off-by: Tuomas Tynkkynen --- v2 changes: - none drivers/clk/tegra/clk-tegra124.c | 47

  1   2   3   >