Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx
* Peter Hurley | 2014-09-23 13:03:51 [-0400]: >readline() does this; it 'saves' the caller's termios, sets termios >for non-canonical reads, reads one char, and 'restores' the caller's >termios. interresting, thanks. I guess I would need to opimize this a little so the baudrate isn't going to 0 and back to the requested baudrate. >The tty core calls the driver's wait_until_sent() method before changing >the termios (if TCSADRAIN is used for tcsetattr(), which I think for readline() >it does). The interresting difference is that when I take the yocto RFS and chroot into from Debian then I don't this problem. Not sure if this is really readline or something else… >But DMA is cheating if the UART driver's tx_empty() method is saying the >transmitter is empty while TX DMA is still running. This shouldn't be the case. But I will check this once I able to. After TX-DMA is done, "xmit->tail" is updated and port.icount.tx is incremented. At this time the TX FIFO is still full (up to 64 bytes) and I set UART_IER_THRI to wait until TX FIFO is empty so I can disable runtime-pm. Therefore I would assume LSR does not say BOTH_EMPTY until the FIFO is empty. >Regards, >Peter Hurley Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx
* Frans Klaver | 2014-09-22 11:28:54 [+0200]: > >Wow, thanks for your work here. This does indeed sound hard to trap. > >I guess then we'd still have to answer the question why the yocto build >calls set_termios() so often, but that's not on you then. Did you notice >it even changing settings? We might want to fix this even if the kernel >should be able to cope. Yeah. I don't care if this is yocto's fault or not. If it is possible to stop the DMA transfer from userland with whatever method then it needs to be fixed in kernel so that this does happen. >Thanks again, >Frans Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] tty: omap-serial: pull out calculation from baud_is_mode16
To determine the correct divisor, we need to know the difference between the desired baud rate and the actual baud rate. The calculation for this difference is implemented twice within omap_serial_baud_is_mode16(). Pull out the calculation for easier maintenance. While at it, remove the CamelCasing from the variable names. Signed-off-by: Frans Klaver --- drivers/tty/serial/omap-serial.c | 42 +++- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index e454b7c..18c30ca 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -239,6 +239,26 @@ static void serial_omap_enable_wakeup(struct uart_omap_port *up, bool enable) } /* + * Calculate the absolute difference between the desired and actual baud + * rate for the given mode. + */ +static inline int calculate_baud_abs_diff(struct uart_port *port, + unsigned int baud, unsigned int mode) +{ + unsigned int n = port->uartclk / (mode * baud); + int abs_diff; + + if (n == 0) + n = 1; + + abs_diff = baud - (port->uartclk / (mode * n)); + if (abs_diff < 0) + abs_diff = -abs_diff; + + return abs_diff; +} + +/* * serial_omap_baud_is_mode16 - check if baud rate is MODE16X * @port: uart port info * @baud: baudrate for which mode needs to be determined @@ -252,24 +272,10 @@ static void serial_omap_enable_wakeup(struct uart_omap_port *up, bool enable) static bool serial_omap_baud_is_mode16(struct uart_port *port, unsigned int baud) { - unsigned int n13 = port->uartclk / (13 * baud); - unsigned int n16 = port->uartclk / (16 * baud); - int baudAbsDiff13; - int baudAbsDiff16; - - if (n13 == 0) - n13 = 1; - if (n16 == 0) - n16 = 1; - - baudAbsDiff13 = baud - (port->uartclk / (13 * n13)); - baudAbsDiff16 = baud - (port->uartclk / (16 * n16)); - if (baudAbsDiff13 < 0) - baudAbsDiff13 = -baudAbsDiff13; - if (baudAbsDiff16 < 0) - baudAbsDiff16 = -baudAbsDiff16; - - return (baudAbsDiff13 >= baudAbsDiff16); + int abs_diff_13 = calculate_baud_abs_diff(port, baud, 13); + int abs_diff_16 = calculate_baud_abs_diff(port, baud, 16); + + return (abs_diff_13 >= abs_diff_16); } /* -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 0/2]
On Tue, Sep 23, 2014 at 11:58 PM, Greg Kroah-Hartman wrote: > So both would be needed to be backported to stable kernels? Why not > just do the fix first, then the cleanup afterward, to make backporting > easier? Sure thing. I read something about cleaning up first, then actually changing stuff, but it doesn't really make sense to move bugs around before fixing them, unless fixing them requires moving them around. Anyway, here's the respin. v1..v2: - swapped fix and cleanup to ease backporting Frans Klaver (2): tty: omap-serial: fix division by zero tty: omap-serial: pull out calculation from baud_is_mode16 drivers/tty/serial/omap-serial.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] tty: omap-serial: fix division by zero
If the chosen baud rate is large enough (e.g. 3.5 megabaud), the calculated n values in serial_omap_is_baud_mode16() may become 0. This causes a division by zero when calculating the difference between calculated and desired baud rates. To prevent this, cap the n13 and n16 values on 1. Division by zero in kernel. [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (Ldiv0+0x8/0x10) [] (Ldiv0) from [] (serial_omap_baud_is_mode16+0x4c/0x68) [] (serial_omap_baud_is_mode16) from [] (serial_omap_set_termios+0x90/0x8d8) [] (serial_omap_set_termios) from [] (uart_change_speed+0xa4/0xa8) [] (uart_change_speed) from [] (uart_set_termios+0xa0/0x1fc) [] (uart_set_termios) from [] (tty_set_termios+0x248/0x2c0) [] (tty_set_termios) from [] (set_termios+0x248/0x29c) [] (set_termios) from [] (tty_mode_ioctl+0x1c8/0x4e8) [] (tty_mode_ioctl) from [] (tty_ioctl+0xa94/0xb18) [] (tty_ioctl) from [] (do_vfs_ioctl+0x4a0/0x560) [] (do_vfs_ioctl) from [] (SyS_ioctl+0x4c/0x74) [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x30) Signed-off-by: Frans Klaver --- drivers/tty/serial/omap-serial.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index d017cec..e454b7c 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -254,8 +254,16 @@ serial_omap_baud_is_mode16(struct uart_port *port, unsigned int baud) { unsigned int n13 = port->uartclk / (13 * baud); unsigned int n16 = port->uartclk / (16 * baud); - int baudAbsDiff13 = baud - (port->uartclk / (13 * n13)); - int baudAbsDiff16 = baud - (port->uartclk / (16 * n16)); + int baudAbsDiff13; + int baudAbsDiff16; + + if (n13 == 0) + n13 = 1; + if (n16 == 0) + n16 = 1; + + baudAbsDiff13 = baud - (port->uartclk / (13 * n13)); + baudAbsDiff16 = baud - (port->uartclk / (16 * n16)); if (baudAbsDiff13 < 0) baudAbsDiff13 = -baudAbsDiff13; if (baudAbsDiff16 < 0) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 1/2] usb: rename phy to usb_phy in HCD
On Fri, Sep 05, 2014 at 01:42:09AM +0400, Sergei Shtylyov wrote: > From: Antoine Tenart > > The USB PHY member of the HCD structure is renamed to 'usb_phy' and > modifications are done in all drivers accessing it. > This is in preparation to adding the generic PHY support. > > Signed-off-by: Antoine Tenart > [Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects > caused by patch reordering, updated changelog.] > Signed-off-by: Sergei Shtylyov > Acked-by: Alan Stern > Acked-by: Felipe Balbi > > --- > Changes in version 5: > - imported the patch from Antoine Tenart's series; > - added missing 'drivers/usb/misc/lvstest.c' file; > - resolved rejects caused by patch reordering; > - refreshed patch; > - updated changelog. > > drivers/usb/chipidea/host.c |2 +- > drivers/usb/core/hcd.c| 20 ++-- > drivers/usb/core/hub.c|8 > drivers/usb/host/ehci-fsl.c | 16 > drivers/usb/host/ehci-hub.c |2 +- > drivers/usb/host/ehci-msm.c |4 ++-- > drivers/usb/host/ehci-tegra.c | 16 > drivers/usb/host/ohci-omap.c | 20 ++-- > drivers/usb/misc/lvstest.c|8 > include/linux/usb/hcd.h |2 +- > 10 files changed, 49 insertions(+), 49 deletions(-) This doesn't apply to my tree at all anymore, can you refresh it and resend? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] MAINTAINERS: omap_hsmmc: remove myself from MAINTAINERS
On 17 September 2014 19:20, Balaji T K wrote: > As I won't be able to maintain omap_hsmmc driver > > Signed-off-by: Balaji T K Sorry to see you go Balaji. Thanks for all your support! Patch applied for next. Kind regards Uffe > --- > MAINTAINERS | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 5e7866a..b296e43 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -6540,10 +6540,9 @@ S: Maintained > F: drivers/mmc/host/omap.c > > OMAP HS MMC SUPPORT > -M: Balaji T K > L: linux-...@vger.kernel.org > L: linux-omap@vger.kernel.org > -S: Maintained > +S: Orphan > F: drivers/mmc/host/omap_hsmmc.c > > OMAP RANDOM NUMBER GENERATOR SUPPORT > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] tty: omap-serial: fix division by zero
On Wed, Sep 24, 2014 at 09:55:21AM +0200, Frans Klaver wrote: > If the chosen baud rate is large enough (e.g. 3.5 megabaud), the > calculated n values in serial_omap_is_baud_mode16() may become 0. This > causes a division by zero when calculating the difference between > calculated and desired baud rates. To prevent this, cap the n13 and n16 > values on 1. > > Division by zero in kernel. > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (Ldiv0+0x8/0x10) > [] (Ldiv0) from [] (serial_omap_baud_is_mode16+0x4c/0x68) > [] (serial_omap_baud_is_mode16) from [] > (serial_omap_set_termios+0x90/0x8d8) > [] (serial_omap_set_termios) from [] > (uart_change_speed+0xa4/0xa8) > [] (uart_change_speed) from [] > (uart_set_termios+0xa0/0x1fc) > [] (uart_set_termios) from [] > (tty_set_termios+0x248/0x2c0) > [] (tty_set_termios) from [] (set_termios+0x248/0x29c) > [] (set_termios) from [] (tty_mode_ioctl+0x1c8/0x4e8) > [] (tty_mode_ioctl) from [] (tty_ioctl+0xa94/0xb18) > [] (tty_ioctl) from [] (do_vfs_ioctl+0x4a0/0x560) > [] (do_vfs_ioctl) from [] (SyS_ioctl+0x4c/0x74) > [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x30) > > Signed-off-by: Frans Klaver > --- > drivers/tty/serial/omap-serial.c | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) Should this go to the stable kernel trees as well? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] tty: omap-serial: fix division by zero
On Wed, Sep 24, 2014 at 01:08:52AM -0700, Greg Kroah-Hartman wrote: > On Wed, Sep 24, 2014 at 09:55:21AM +0200, Frans Klaver wrote: > > If the chosen baud rate is large enough (e.g. 3.5 megabaud), the > > calculated n values in serial_omap_is_baud_mode16() may become 0. This > > causes a division by zero when calculating the difference between > > calculated and desired baud rates. To prevent this, cap the n13 and n16 > > values on 1. > > > > Division by zero in kernel. > > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > > [] (show_stack) from [] (Ldiv0+0x8/0x10) > > [] (Ldiv0) from [] > > (serial_omap_baud_is_mode16+0x4c/0x68) > > [] (serial_omap_baud_is_mode16) from [] > > (serial_omap_set_termios+0x90/0x8d8) > > [] (serial_omap_set_termios) from [] > > (uart_change_speed+0xa4/0xa8) > > [] (uart_change_speed) from [] > > (uart_set_termios+0xa0/0x1fc) > > [] (uart_set_termios) from [] > > (tty_set_termios+0x248/0x2c0) > > [] (tty_set_termios) from [] (set_termios+0x248/0x29c) > > [] (set_termios) from [] (tty_mode_ioctl+0x1c8/0x4e8) > > [] (tty_mode_ioctl) from [] (tty_ioctl+0xa94/0xb18) > > [] (tty_ioctl) from [] (do_vfs_ioctl+0x4a0/0x560) > > [] (do_vfs_ioctl) from [] (SyS_ioctl+0x4c/0x74) > > [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x30) > > > > Signed-off-by: Frans Klaver > > --- > > drivers/tty/serial/omap-serial.c | 12 ++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > Should this go to the stable kernel trees as well? It's been there for a while. Introduced in 5fe2123647c1508 "OMAP/serial: Support 1Mbaud and similar baudrates that require Mode16 instead of Mode13" (v3.9). It's probably a good idea to do so. stable@... needs a cc? Frans -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/6] unshare and simplify omap_hsmmc platform struct
On 22 September 2014 13:55, Andreas Fenkart wrote: > mmci and omap_hsmmc share very little fields in the platform mmci? Should be omap right? I noticed the similar typo for one of the patches as well. Kind regards Uffe > struct. unsharing significantly simplifies the omap_hsmmc driver > > Andreas Fenkart (6): > omap_hsmmc: unshare platform data struct with mmci driver > omap_hsmmc: remove unused callbacks from platform data struct > omap_hsmmc: remove unused fields in platform_data > omap_hsmmc: remove unused get_context_loss_count callback > omap_hsmmc: remove un-initialized callbacks from platform data > omap_hsmmc: remove un-initialized get_cover_state callback > > arch/arm/mach-omap2/hsmmc.c| 61 ++ > arch/arm/mach-omap2/hsmmc.h| 10 -- > arch/arm/mach-omap2/mmc.h | 6 +- > .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 6 +- > arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 +- > drivers/mmc/host/omap_hsmmc.c | 133 > +++-- > include/linux/platform_data/hsmmc-omap.h | 103 > 7 files changed, 142 insertions(+), 183 deletions(-) > create mode 100644 include/linux/platform_data/hsmmc-omap.h > > -- > 2.1.0 > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/26] ARM: OMAP2+: PRCM cleanups for 3.18 merge window
On 09/19/2014 08:27 PM, Paul Walmsley wrote: On Fri, 19 Sep 2014, Paul Walmsley wrote: However, I saw the following crash at boot on 37xxevm during one of the boot test. Ran thirty more boot tests afterwards on that board and it did not recur. It seems unlikely that the problem is related to this series, but looks like we may have some intermittent boot failure or race on 37xx :-( ... [4.892211] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa318034 [4.900299] Internal error: : 1028 [#1] SMP ARM [4.905090] Modules linked in: [4.908325] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.17.0-rc5-12866-g0164b2d #1 [4.916320] task: c0835db0 ti: c082a000 task.ti: c082a000 [4.922027] PC is at omap2_gp_timer_set_next_event+0x24/0x78 [4.928009] LR is at clockevents_program_event+0xc0/0x148 [4.933715] pc : []lr : []psr: 0193 [4.933715] sp : c082bed8 ip : fp : [4.945800] r10: r9 : 24101100 r8 : c0839080 [4.951324] r7 : 0001 r6 : 237bc339 r5 : 009f r4 : 3d9759e7 [4.958190] r3 : fa318034 r2 : c08cb920 r1 : 0003 r0 : fec1 [4.965087] Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [4.972900] Control: 10c5387d Table: 80004019 DAC: 0015 [4.978942] Process swapper/0 (pid: 0, stack limit = 0xc082a248) [4.985290] Stack: (0xc082bed8 to 0xc082c000) [4.989868] bec0: 237bc339 0001 [4.998504] bee0: 0001 24101100 0001 cfc7d6c8 0001 cfc7da50 cfc7d720 c00a4780 [5.007141] bf00: c00962b0 cfc7d720 c0096180 0001 0001 c08256c8 [5.015777] bf20: c082a000 c08256c8 c00962b0 237b4c04 0001 0002 a193 [5.024414] bf40: 00989680 24101100 0001 cfc7da50 c108cc78 [5.033020] bf60: c00962b0 0002 0001 c108cc78 c00a56f0 [5.041656] bf80: 0002 237b4c04 0001 c08c8ce8 c082a000 c08c8ce8 [5.050292] bfa0: c08329dc c0832978 cfc7f0f8 c0072808 c0559928 c08270f0 c08caf40 c080fdc0 [5.058929] bfc0: c07c3b74 c07c35f0 c080fdc0 [5.067535] bfe0: c08cb154 c0832968 c080fdbc c083763c 80004059 80008074 [5.076171] [] (omap2_gp_timer_set_next_event) from [] (clockevents_program_event+0xc0/0x148) [5.087005] [] (clockevents_program_event) from [] (tick_program_event+0x44/0x54) [5.096771] [] (tick_program_event) from [] (__hrtimer_start_range_ns+0x3c0/0x4a0) [5.106597] [] (__hrtimer_start_range_ns) from [] (hrtimer_start_range_ns+0x24/0x2c) [5.116577] [] (hrtimer_start_range_ns) from [] (tick_nohz_idle_exit+0x140/0x1ec) [5.126342] [] (tick_nohz_idle_exit) from [] (cpu_startup_entry+0xf4/0x2d0) [5.135528] [] (cpu_startup_entry) from [] (start_kernel+0x340/0x3a8) [5.144165] [] (start_kernel) from [<80008074>] (0x80008074) [5.151031] Code: 13a0c000 0a04 ee07cfba e592301c (e5931000) [5.157470] ---[ end trace f92de024d996d904 ]--- [5.162353] Kernel panic - not syncing: Attempted to kill the idle task! [5.169433] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! Actually it just occurred to me that if something broke *wait_target_ready(), we'd expect to see intermittent failures like this, and this series touches *wait_target_ready(). So it might be worth taking a look at that with a magnifying glass to make sure that it's working. I think this is probably something else, and most likely more hideous. The clock source timers are only enabled once during a boot, and they are never idled after that. This error happens almost 5 seconds after the initial module enable...? -Tero -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] tty: omap-serial: fix division by zero
On Wed, Sep 24, 2014 at 10:41:11AM +0200, Frans Klaver wrote: > On Wed, Sep 24, 2014 at 01:08:52AM -0700, Greg Kroah-Hartman wrote: > > On Wed, Sep 24, 2014 at 09:55:21AM +0200, Frans Klaver wrote: > > > If the chosen baud rate is large enough (e.g. 3.5 megabaud), the > > > calculated n values in serial_omap_is_baud_mode16() may become 0. This > > > causes a division by zero when calculating the difference between > > > calculated and desired baud rates. To prevent this, cap the n13 and n16 > > > values on 1. > > > > > > Division by zero in kernel. > > > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > > > [] (show_stack) from [] (Ldiv0+0x8/0x10) > > > [] (Ldiv0) from [] > > > (serial_omap_baud_is_mode16+0x4c/0x68) > > > [] (serial_omap_baud_is_mode16) from [] > > > (serial_omap_set_termios+0x90/0x8d8) > > > [] (serial_omap_set_termios) from [] > > > (uart_change_speed+0xa4/0xa8) > > > [] (uart_change_speed) from [] > > > (uart_set_termios+0xa0/0x1fc) > > > [] (uart_set_termios) from [] > > > (tty_set_termios+0x248/0x2c0) > > > [] (tty_set_termios) from [] (set_termios+0x248/0x29c) > > > [] (set_termios) from [] (tty_mode_ioctl+0x1c8/0x4e8) > > > [] (tty_mode_ioctl) from [] (tty_ioctl+0xa94/0xb18) > > > [] (tty_ioctl) from [] (do_vfs_ioctl+0x4a0/0x560) > > > [] (do_vfs_ioctl) from [] (SyS_ioctl+0x4c/0x74) > > > [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x30) > > > > > > Signed-off-by: Frans Klaver > > > --- > > > drivers/tty/serial/omap-serial.c | 12 ++-- > > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > Should this go to the stable kernel trees as well? > > It's been there for a while. Introduced in 5fe2123647c1508 "OMAP/serial: > Support 1Mbaud and similar baudrates that require Mode16 instead of > Mode13" (v3.9). It's probably a good idea to do so. stable@... needs a > cc? And would it be enough to just resend this particular patch in that case? -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/5] clk: Remove .owner field for driver
There is no need to init .owner field. Based on the patch from Peter Griffin "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: Kiran Padwal --- drivers/clk/clk-axi-clkgen.c |1 - drivers/clk/clk-max77686.c |1 - drivers/clk/clk-max77802.c |1 - drivers/clk/clk-palmas.c |1 - drivers/clk/clk-twl6040.c|1 - drivers/clk/clk-wm831x.c |1 - drivers/clk/qcom/mmcc-apq8084.c |1 - drivers/clk/qcom/mmcc-msm8960.c |1 - drivers/clk/qcom/mmcc-msm8974.c |1 - drivers/clk/samsung/clk-s3c2410-dclk.c |1 - drivers/clk/sunxi/clk-sun6i-apb0-gates.c |1 - drivers/clk/sunxi/clk-sun6i-apb0.c |1 - drivers/clk/sunxi/clk-sun6i-ar100.c |1 - drivers/clk/sunxi/clk-sun8i-apb0.c |1 - drivers/clk/ti/clk-dra7-atl.c|1 - 15 files changed, 15 deletions(-) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index 1127ee4..e619285 100644 --- a/drivers/clk/clk-axi-clkgen.c +++ b/drivers/clk/clk-axi-clkgen.c @@ -544,7 +544,6 @@ static int axi_clkgen_remove(struct platform_device *pdev) static struct platform_driver axi_clkgen_driver = { .driver = { .name = "adi-axi-clkgen", - .owner = THIS_MODULE, .of_match_table = axi_clkgen_ids, }, .probe = axi_clkgen_probe, diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c index ed0beb4..86cdb3a 100644 --- a/drivers/clk/clk-max77686.c +++ b/drivers/clk/clk-max77686.c @@ -73,7 +73,6 @@ MODULE_DEVICE_TABLE(platform, max77686_clk_id); static struct platform_driver max77686_clk_driver = { .driver = { .name = "max77686-clk", - .owner = THIS_MODULE, }, .probe = max77686_clk_probe, .remove = max77686_clk_remove, diff --git a/drivers/clk/clk-max77802.c b/drivers/clk/clk-max77802.c index 8e480c5..0729dc7 100644 --- a/drivers/clk/clk-max77802.c +++ b/drivers/clk/clk-max77802.c @@ -84,7 +84,6 @@ MODULE_DEVICE_TABLE(platform, max77802_clk_id); static struct platform_driver max77802_clk_driver = { .driver = { .name = "max77802-clk", - .owner = THIS_MODULE, }, .probe = max77802_clk_probe, .remove = max77802_clk_remove, diff --git a/drivers/clk/clk-palmas.c b/drivers/clk/clk-palmas.c index 781630e..8d45992 100644 --- a/drivers/clk/clk-palmas.c +++ b/drivers/clk/clk-palmas.c @@ -292,7 +292,6 @@ static int palmas_clks_remove(struct platform_device *pdev) static struct platform_driver palmas_clks_driver = { .driver = { .name = "palmas-clk", - .owner = THIS_MODULE, .of_match_table = palmas_clks_of_match, }, .probe = palmas_clks_probe, diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c index 1ada79a..4a75513 100644 --- a/drivers/clk/clk-twl6040.c +++ b/drivers/clk/clk-twl6040.c @@ -112,7 +112,6 @@ static int twl6040_clk_remove(struct platform_device *pdev) static struct platform_driver twl6040_clk_driver = { .driver = { .name = "twl6040-clk", - .owner = THIS_MODULE, }, .probe = twl6040_clk_probe, .remove = twl6040_clk_remove, diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c index b131041..ef67719 100644 --- a/drivers/clk/clk-wm831x.c +++ b/drivers/clk/clk-wm831x.c @@ -395,7 +395,6 @@ static struct platform_driver wm831x_clk_driver = { .probe = wm831x_clk_probe, .driver = { .name = "wm831x-clk", - .owner = THIS_MODULE, }, }; diff --git a/drivers/clk/qcom/mmcc-apq8084.c b/drivers/clk/qcom/mmcc-apq8084.c index 751eea3..dab988a 100644 --- a/drivers/clk/qcom/mmcc-apq8084.c +++ b/drivers/clk/qcom/mmcc-apq8084.c @@ -3341,7 +3341,6 @@ static struct platform_driver mmcc_apq8084_driver = { .remove = mmcc_apq8084_remove, .driver = { .name = "mmcc-apq8084", - .owner = THIS_MODULE, .of_match_table = mmcc_apq8084_match_table, }, }; diff --git a/drivers/clk/qcom/mmcc-msm8960.c b/drivers/clk/qcom/mmcc-msm8960.c index 2e80a21..68da36c 100644 --- a/drivers/clk/qcom/mmcc-msm8960.c +++ b/drivers/clk/qcom/mmcc-msm8960.c @@ -2679,7 +2679,6 @@ static struct platform_driver mmcc_msm8960_driver = { .remove = mmcc_msm8960_remove, .driver = { .name = "mmcc-msm8960", - .owner = THIS_MODULE, .of_match_table = mmcc_msm8960_match_table, }, }; diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8
[PATCH v5 0/7] Enable L2 cache support on Exynos4210/4x12 SoCs
This is an updated patchset, which intends to add support for L2 cache on Exynos4 SoCs on boards running under secure firmware, which requires certain initialization steps to be done with help of firmware, as selected registers are writable only from secure mode. First four patches extend existing support for secure write in L2C driver to account for design of secure firmware running on Exynos. Namely: 1) direct read access to certain registers is needed on Exynos, because secure firmware calls set several registers at once, 2) not all boards are running secure firmware, so .write_sec callback needs to be installed in Exynos firmware ops initialization code, 3) write access to {DATA,TAG}_LATENCY_CTRL registers fron non-secure world is not allowed and so must use l2c_write_sec as well, 4) on certain boards, default value of prefetch register is incorrect and must be overridden at L2C initialization. For boards running with firmware that provides access to individual L2C registers this series should introduce no functional changes. However since the driver is widely used on other platforms I'd like to kindly ask any interested people for testing. Further three patches add implementation of .write_sec and .configure callbacks for Exynos secure firmware and necessary DT nodes to enable L2 cache. Changes in this version tested on Exynos4412-based TRATS2 and OdroidU3+ boards (both with secure firmware). There should be no functional change for Exynos boards running without secure firmware. I do not have access to affected non-Exynos boards, so I could not test on them. Depends on: - [PATCH v3 0/5] Firmware-assisted suspend/resume of Exynos SoCs (https://lkml.org/lkml/2014/8/26/445) Changelog: Changes since v4: (https://lkml.org/lkml/2014/8/26/461) - rewrote the code accessing l2x0_saved_regs from assembly code - added comment and reworked unconditional call to SMC_CMD_L2X0INVALL Changes since v3: (https://lkml.org/lkml/2014/7/17/600) - fixed issues with references to initdata on resume path by creating a copy of affected structure (pointed out by Russell King), - fixed unnecessary full reconfiguration of L2C controller on resume (configuration is already determined after initialization, so the only thing to do is to push those values to the controller), - rebased on next-20140717 tag of linux-next tree and last versions of dependencies. Changes since v2: (https://lkml.org/lkml/2014/6/25/416) - refactored L2C driver to use commit-like interface and make it no longer depend on availability of writes to individual registers, - moved L2C resume to assembly code, because doing it later makes some systems unstable - this is also needed for deeper cpuidle modes, - dropped unnecessary patch hacking around the .write_sec interface, - dropped patch making the driver use l2c_write_sec() for LATENCY_CTRL registers as Exynos is no longer affected and I'm not aware of any reports that this is also needed on other platforms (can be applied separately if it turns out to be so), - rebased onto next-20140717 tag of linux-next tree. Changes since v1: (https://www.mail-archive.com/linux-omap@vger.kernel.org/msg106323.html) - rebased onto for-next branch of linux-samsung tree, - changed argument order of outer_cache.write_sec() callback to match l2c_write_sec() function in cache-l2x0.c, - added support of overriding of prefetch settings to work around incorrect default settings on certain Exynos4x12-based boards, - added call to firmware to invalidate whole L2 cache before setting enable bit in L2C control register (required by Exynos secure firmware). Patch summary: Tomasz Figa (7): ARM: l2c: Refactor the driver to use commit-like interface ARM: l2c: Add interface to ask hypervisor to configure L2C ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL ARM: l2c: Add support for overriding prefetch settings ARM: EXYNOS: Add .write_sec outer cache callback for L2C-310 ARM: EXYNOS: Add support for non-secure L2X0 resume ARM: dts: exynos4: Add nodes for L2 cache controller Documentation/devicetree/bindings/arm/l2cc.txt | 10 + arch/arm/boot/dts/exynos4210.dtsi | 9 + arch/arm/boot/dts/exynos4x12.dtsi | 14 ++ arch/arm/include/asm/outercache.h | 3 + arch/arm/kernel/irq.c | 3 +- arch/arm/mach-exynos/firmware.c| 50 + arch/arm/mach-exynos/sleep.S | 46 + arch/arm/mm/cache-l2x0.c | 255 - 8 files changed, 294 insertions(+), 96 deletions(-) -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 5/7] ARM: EXYNOS: Add .write_sec outer cache callback for L2C-310
From: Tomasz Figa Exynos4 SoCs equipped with an L2C-310 cache controller and running under secure firmware require certain registers of aforementioned IP to be accessed only from secure mode. This means that SMC calls are required for certain register writes. To handle this, an implementation of .write_sec and .configure callbacks is provided by this patch. Signed-off-by: Tomasz Figa [added comment and reworked unconditional call to SMC_CMD_L2X0INVALL] Signed-off-by: Marek Szyprowski --- arch/arm/mach-exynos/firmware.c | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index f5e626d55951..e6a052c593f2 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -120,6 +121,43 @@ static const struct firmware_ops exynos_firmware_ops = { .resume = exynos_resume, }; +static void exynos_l2_write_sec(unsigned long val, unsigned reg) +{ + static int l2cache_enabled; + + switch (reg) { + case L2X0_CTRL: + if (val & L2X0_CTRL_EN) { + /* +* Before the cache can be enabled, due to firmware +* design, SMC_CMD_L2X0INVALL must be called. +*/ + if (!l2cache_enabled) { + exynos_smc(SMC_CMD_L2X0INVALL, 0, 0, 0); + l2cache_enabled = 1; + } + } else { + l2cache_enabled = 0; + } + exynos_smc(SMC_CMD_L2X0CTRL, val, 0, 0); + break; + + case L2X0_DEBUG_CTRL: + exynos_smc(SMC_CMD_L2X0DEBUG, val, 0, 0); + break; + + default: + WARN_ONCE(1, "%s: ignoring write to reg 0x%x\n", __func__, reg); + } +} + +static void exynos_l2_configure(const struct l2x0_regs *regs) +{ + exynos_smc(SMC_CMD_L2X0SETUP1, regs->tag_latency, regs->data_latency, + regs->prefetch_ctrl); + exynos_smc(SMC_CMD_L2X0SETUP2, regs->pwr_ctrl, regs->aux_ctrl, 0); +} + void __init exynos_firmware_init(void) { struct device_node *nd; @@ -139,4 +177,16 @@ void __init exynos_firmware_init(void) pr_info("Running under secure firmware.\n"); register_firmware_ops(&exynos_firmware_ops); + + /* +* Exynos 4 SoCs (based on Cortex A9 and equipped with L2C-310), +* running under secure firmware, require certain registers of L2 +* cache controller to be written in secure mode. Here .write_sec +* callback is provided to perform necessary SMC calls. +*/ + if (IS_ENABLED(CONFIG_CACHE_L2X0) + && read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) { + outer_cache.write_sec = exynos_l2_write_sec; + outer_cache.configure = exynos_l2_configure; + } } -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 7/7] ARM: dts: exynos4: Add nodes for L2 cache controller
From: Tomasz Figa This patch adds device tree nodes for L2 cache controller present on Exynos4 SoCs. Signed-off-by: Tomasz Figa Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4210.dtsi | 9 + arch/arm/boot/dts/exynos4x12.dtsi | 14 ++ 2 files changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index b31315fc0afa..3b8e094144e6 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi @@ -64,6 +64,15 @@ reg = <0x10023CA0 0x20>; }; + l2c: l2-cache-controller@10502000 { + compatible = "arm,pl310-cache"; + reg = <0x10502000 0x1000>; + cache-unified; + cache-level = <2>; + arm,tag-latency = <2 2 1>; + arm,data-latency = <2 2 1>; + }; + gic: interrupt-controller@1049 { cpu-offset = <0x8000>; }; diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index 771412e7c06c..6ee773921559 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi @@ -54,6 +54,20 @@ reg = <0x10023CA0 0x20>; }; + l2c: l2-cache-controller@10502000 { + compatible = "arm,pl310-cache"; + reg = <0x10502000 0x1000>; + cache-unified; + cache-level = <2>; + arm,tag-latency = <2 2 1>; + arm,data-latency = <3 2 1>; + arm,double-linefill = <1>; + arm,double-linefill-incr = <0>; + arm,double-linefill-wrap = <1>; + arm,prefetch-drop = <1>; + arm,prefetch-offset = <7>; + }; + clock: clock-controller@1003 { compatible = "samsung,exynos4412-clock"; reg = <0x1003 0x2>; -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 6/7] ARM: EXYNOS: Add support for non-secure L2X0 resume
From: Tomasz Figa On Exynos SoCs it is necessary to resume operation of L2C early in assembly code, because otherwise certain systems will crash. This patch adds necessary code to non-secure resume handler. Signed-off-by: Tomasz Figa [rewrote the code accessing l2x0_saved_regs] Sigend-off-by: Marek Szyprowski --- arch/arm/mach-exynos/sleep.S | 46 1 file changed, 46 insertions(+) diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S index e3c373082bbe..31d25834b9c4 100644 --- a/arch/arm/mach-exynos/sleep.S +++ b/arch/arm/mach-exynos/sleep.S @@ -16,6 +16,8 @@ */ #include +#include +#include #include "smc.h" #define CPU_MASK 0xff00 @@ -74,6 +76,45 @@ ENTRY(exynos_cpu_resume_ns) mov r0, #SMC_CMD_C15RESUME dsb smc #0 +#ifdef CONFIG_CACHE_L2X0 + adr r0, 1f + ldr r2, [r0] + add r0, r2, r0 + + /* Check that the address has been initialised. */ + ldr r1, [r0, #L2X0_R_PHY_BASE] + teq r1, #0 + beq skip_l2x0 + + /* Check if controller has been enabled. */ + ldr r2, [r1, #L2X0_CTRL] + tst r2, #0x1 + bne skip_l2x0 + + ldr r1, [r0, #L2X0_R_TAG_LATENCY] + ldr r2, [r0, #L2X0_R_DATA_LATENCY] + ldr r3, [r0, #L2X0_R_PREFETCH_CTRL] + mov r0, #SMC_CMD_L2X0SETUP1 + smc #0 + + /* Reload saved regs pointer because smc corrupts registers. */ + adr r0, 1f + ldr r2, [r0] + add r0, r2, r0 + + ldr r1, [r0, #L2X0_R_PWR_CTRL] + ldr r2, [r0, #L2X0_R_AUX_CTRL] + mov r0, #SMC_CMD_L2X0SETUP2 + smc #0 + + mov r0, #SMC_CMD_L2X0INVALL + smc #0 + + mov r1, #1 + mov r0, #SMC_CMD_L2X0CTRL + smc #0 +skip_l2x0: +#endif /* CONFIG_CACHE_L2X0 */ skip_cp15: b cpu_resume ENDPROC(exynos_cpu_resume_ns) @@ -83,3 +124,8 @@ cp15_save_diag: .globl cp15_save_power cp15_save_power: .long 0 @ cp15 power control + +#ifdef CONFIG_CACHE_L2X0 + .align +1: .long l2x0_saved_regs - . +#endif /* CONFIG_CACHE_L2X0 */ -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 4/7] ARM: l2c: Add support for overriding prefetch settings
From: Tomasz Figa Firmware on certain boards (e.g. ODROID-U3) can leave incorrect L2C prefetch settings configured in registers leading to crashes if L2C is enabled without overriding them. This patch introduces bindings to enable prefetch settings to be specified from DT and necessary support in the driver. Signed-off-by: Tomasz Figa Signed-off-by: Marek Szyprowski --- Documentation/devicetree/bindings/arm/l2cc.txt | 10 +++ arch/arm/mm/cache-l2x0.c | 39 ++ 2 files changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt index af527ee111c2..3443d2d76788 100644 --- a/Documentation/devicetree/bindings/arm/l2cc.txt +++ b/Documentation/devicetree/bindings/arm/l2cc.txt @@ -47,6 +47,16 @@ Optional properties: - cache-id-part: cache id part number to be used if it is not present on hardware - wt-override: If present then L2 is forced to Write through mode +- arm,double-linefill : Override double linefill enable setting. Enable if + non-zero, disable if zero. +- arm,double-linefill-incr : Override double linefill on INCR read. Enable + if non-zero, disable if zero. +- arm,double-linefill-wrap : Override double linefill on WRAP read. Enable + if non-zero, disable if zero. +- arm,prefetch-drop : Override prefetch drop enable setting. Enable if non-zero, + disable if zero. +- arm,prefetch-offset : Override prefetch offset value. Valid values are + 0-7, 15, 23, and 31. Example: diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 84c6c55ab896..af90a6ff6b49 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -1059,6 +1059,8 @@ static void __init l2c310_of_parse(const struct device_node *np, u32 data[3] = { 0, 0, 0 }; u32 tag[3] = { 0, 0, 0 }; u32 filter[2] = { 0, 0 }; + u32 prefetch; + u32 val; of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag)); if (tag[0] && tag[1] && tag[2]) @@ -1083,6 +1085,43 @@ static void __init l2c310_of_parse(const struct device_node *np, l2x0_saved_regs.filter_start = (filter[0] & ~(SZ_1M - 1)) | L310_ADDR_FILTER_EN; } + + prefetch = l2x0_saved_regs.prefetch_ctrl; + + if (!of_property_read_u32(np, "arm,double-linefill", &val)) { + if (val) + prefetch |= L310_PREFETCH_CTRL_DBL_LINEFILL; + else + prefetch &= ~L310_PREFETCH_CTRL_DBL_LINEFILL; + } + + if (!of_property_read_u32(np, "arm,double-linefill-incr", &val)) { + if (val) + prefetch |= L310_PREFETCH_CTRL_DBL_LINEFILL_INCR; + else + prefetch &= ~L310_PREFETCH_CTRL_DBL_LINEFILL_INCR; + } + + if (!of_property_read_u32(np, "arm,double-linefill-wrap", &val)) { + if (!val) + prefetch |= L310_PREFETCH_CTRL_DBL_LINEFILL_WRAP; + else + prefetch &= ~L310_PREFETCH_CTRL_DBL_LINEFILL_WRAP; + } + + if (!of_property_read_u32(np, "arm,prefetch-drop", &val)) { + if (val) + prefetch |= L310_PREFETCH_CTRL_PREFETCH_DROP; + else + prefetch &= ~L310_PREFETCH_CTRL_PREFETCH_DROP; + } + + if (!of_property_read_u32(np, "arm,prefetch-offset", &val)) { + prefetch &= ~L310_PREFETCH_CTRL_OFFSET_MASK; + prefetch |= val & L310_PREFETCH_CTRL_OFFSET_MASK; + } + + l2x0_saved_regs.prefetch_ctrl = prefetch; } static const struct l2c_init_data of_l2c310_data __initconst = { -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 1/7] ARM: l2c: Refactor the driver to use commit-like interface
From: Tomasz Figa Certain implementations of secure hypervisors (namely the one found on Samsung Exynos-based boards) do not provide access to individual L2C registers. This makes the .write_sec()-based interface insufficient and provoking ugly hacks. This patch is first step to make the driver not rely on availability of writes to individual registers. This is achieved by refactoring the driver to use a commit-like operation scheme: all register values are prepared first and stored in an instance of l2x0_regs struct and then a single callback is responsible to flush those values to the hardware. Signed-off-by: Tomasz Figa Signed-off-by: Marek Szyprowski --- arch/arm/mm/cache-l2x0.c | 210 ++- 1 file changed, 115 insertions(+), 95 deletions(-) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 5f2c988a06ac..b0735634f12c 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -40,12 +40,14 @@ struct l2c_init_data { void (*enable)(void __iomem *, u32, unsigned); void (*fixup)(void __iomem *, u32, struct outer_cache_fns *); void (*save)(void __iomem *); + void (*configure)(void __iomem *); struct outer_cache_fns outer_cache; }; #define CACHE_LINE_SIZE32 static void __iomem *l2x0_base; +static const struct l2c_init_data *l2x0_data; static DEFINE_RAW_SPINLOCK(l2x0_lock); static u32 l2x0_way_mask; /* Bitmask of active ways */ static u32 l2x0_size; @@ -105,6 +107,14 @@ static inline void l2c_unlock(void __iomem *base, unsigned num) } } +static void l2c_configure(void __iomem *base) +{ + if (l2x0_data->configure) + l2x0_data->configure(base); + + l2c_write_sec(l2x0_saved_regs.aux_ctrl, base, L2X0_AUX_CTRL); +} + /* * Enable the L2 cache controller. This function must only be * called when the cache controller is known to be disabled. @@ -113,7 +123,12 @@ static void l2c_enable(void __iomem *base, u32 aux, unsigned num_lock) { unsigned long flags; - l2c_write_sec(aux, base, L2X0_AUX_CTRL); + /* Do not touch the controller if already enabled. */ + if (readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN) + return; + + l2x0_saved_regs.aux_ctrl = aux; + l2c_configure(base); l2c_unlock(base, num_lock); @@ -207,6 +222,11 @@ static void l2c_save(void __iomem *base) l2x0_saved_regs.aux_ctrl = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); } +static void l2c_resume(void) +{ + l2c_enable(l2x0_base, l2x0_saved_regs.aux_ctrl, l2x0_data->num_lock); +} + /* * L2C-210 specific code. * @@ -287,14 +307,6 @@ static void l2c210_sync(void) __l2c210_cache_sync(l2x0_base); } -static void l2c210_resume(void) -{ - void __iomem *base = l2x0_base; - - if (!(readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN)) - l2c_enable(base, l2x0_saved_regs.aux_ctrl, 1); -} - static const struct l2c_init_data l2c210_data __initconst = { .type = "L2C-210", .way_size_0 = SZ_8K, @@ -308,7 +320,7 @@ static const struct l2c_init_data l2c210_data __initconst = { .flush_all = l2c210_flush_all, .disable = l2c_disable, .sync = l2c210_sync, - .resume = l2c210_resume, + .resume = l2c_resume, }, }; @@ -465,7 +477,7 @@ static const struct l2c_init_data l2c220_data = { .flush_all = l2c220_flush_all, .disable = l2c_disable, .sync = l2c220_sync, - .resume = l2c210_resume, + .resume = l2c_resume, }, }; @@ -614,39 +626,29 @@ static void __init l2c310_save(void __iomem *base) L310_POWER_CTRL); } -static void l2c310_resume(void) +static void l2c310_configure(void __iomem *base) { - void __iomem *base = l2x0_base; + unsigned revision; - if (!(readl_relaxed(base + L2X0_CTRL) & L2X0_CTRL_EN)) { - unsigned revision; - - /* restore pl310 setup */ - writel_relaxed(l2x0_saved_regs.tag_latency, - base + L310_TAG_LATENCY_CTRL); - writel_relaxed(l2x0_saved_regs.data_latency, - base + L310_DATA_LATENCY_CTRL); - writel_relaxed(l2x0_saved_regs.filter_end, - base + L310_ADDR_FILTER_END); - writel_relaxed(l2x0_saved_regs.filter_start, - base + L310_ADDR_FILTER_START); - - revision = readl_relaxed(base + L2X0_CACHE_ID) & - L2X0_CACHE_ID_RTL_MASK; - - if (revision >= L310_CACHE_ID_RTL_R2P0) - l2c_write_sec(l2x0_saved_regs.prefetch_ctrl, base, - L310_PREFETCH_CTRL); - if (revision >= L310_CACH
[PATCH v5 3/7] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL
From: Tomasz Figa Certain platforms (i.e. Exynos) might need to set .write_sec callback from firmware initialization which is happenning in .init_early callback of machine descriptor. However current code will overwrite the pointer with whatever is present in machine descriptor, even though it can be already set earlier. This patch fixes this by making the assignment conditional, depending on whether current .write_sec callback is NULL. Signed-off-by: Tomasz Figa Signed-off-by: Marek Szyprowski --- arch/arm/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 5c4d38e32a51..015152a780df 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -125,7 +125,8 @@ void __init init_IRQ(void) if (IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_CACHE_L2X0) && (machine_desc->l2c_aux_mask || machine_desc->l2c_aux_val)) { - outer_cache.write_sec = machine_desc->l2c_write_sec; + if (!outer_cache.write_sec) + outer_cache.write_sec = machine_desc->l2c_write_sec; ret = l2x0_of_init(machine_desc->l2c_aux_val, machine_desc->l2c_aux_mask); if (ret) -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 2/7] ARM: l2c: Add interface to ask hypervisor to configure L2C
From: Tomasz Figa Because certain secure hypervisor do not allow writes to individual L2C registers, but rather expect set of parameters to be passed as argument to secure monitor calls, there is a need to provide an interface for the L2C driver to ask the firmware to configure the hardware according to specified parameters. This patch adds such. Signed-off-by: Tomasz Figa Signed-off-by: Marek Szyprowski --- arch/arm/include/asm/outercache.h | 3 +++ arch/arm/mm/cache-l2x0.c | 6 ++ 2 files changed, 9 insertions(+) diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h index 891a56b35bcf..563b92fc2f41 100644 --- a/arch/arm/include/asm/outercache.h +++ b/arch/arm/include/asm/outercache.h @@ -23,6 +23,8 @@ #include +struct l2x0_regs; + struct outer_cache_fns { void (*inv_range)(unsigned long, unsigned long); void (*clean_range)(unsigned long, unsigned long); @@ -36,6 +38,7 @@ struct outer_cache_fns { /* This is an ARM L2C thing */ void (*write_sec)(unsigned long, unsigned); + void (*configure)(const struct l2x0_regs *); }; extern struct outer_cache_fns outer_cache; diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index b0735634f12c..84c6c55ab896 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -109,6 +109,11 @@ static inline void l2c_unlock(void __iomem *base, unsigned num) static void l2c_configure(void __iomem *base) { + if (outer_cache.configure) { + outer_cache.configure(&l2x0_saved_regs); + return; + } + if (l2x0_data->configure) l2x0_data->configure(base); @@ -909,6 +914,7 @@ static int __init __l2c_init(const struct l2c_init_data *data, fns = data->outer_cache; fns.write_sec = outer_cache.write_sec; + fns.configure = outer_cache.configure; if (data->fixup) data->fixup(l2x0_base, cache_id, &fns); -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 4/7] ARM: l2c: Add support for overriding prefetch settings
On Wed, Sep 24, 2014 at 12:05:38PM +0100, Marek Szyprowski wrote: > From: Tomasz Figa > > Firmware on certain boards (e.g. ODROID-U3) can leave incorrect L2C prefetch > settings configured in registers leading to crashes if L2C is enabled > without overriding them. This patch introduces bindings to enable > prefetch settings to be specified from DT and necessary support in the > driver. > > Signed-off-by: Tomasz Figa > Signed-off-by: Marek Szyprowski > --- > Documentation/devicetree/bindings/arm/l2cc.txt | 10 +++ > arch/arm/mm/cache-l2x0.c | 39 > ++ > 2 files changed, 49 insertions(+) > > diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt > b/Documentation/devicetree/bindings/arm/l2cc.txt > index af527ee111c2..3443d2d76788 100644 > --- a/Documentation/devicetree/bindings/arm/l2cc.txt > +++ b/Documentation/devicetree/bindings/arm/l2cc.txt > @@ -47,6 +47,16 @@ Optional properties: > - cache-id-part: cache id part number to be used if it is not present >on hardware > - wt-override: If present then L2 is forced to Write through mode > +- arm,double-linefill : Override double linefill enable setting. Enable if > + non-zero, disable if zero. > +- arm,double-linefill-incr : Override double linefill on INCR read. Enable > + if non-zero, disable if zero. > +- arm,double-linefill-wrap : Override double linefill on WRAP read. Enable > + if non-zero, disable if zero. > +- arm,prefetch-drop : Override prefetch drop enable setting. Enable if > non-zero, > + disable if zero. I'm not too keen on tristate properties. Is this level of flexibility really required? What exact overrides do you need for boards you know of? Why do these cause crashes if not overridden? Mark. > +- arm,prefetch-offset : Override prefetch offset value. Valid values are > + 0-7, 15, 23, and 31. > > Example: > > diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c > index 84c6c55ab896..af90a6ff6b49 100644 > --- a/arch/arm/mm/cache-l2x0.c > +++ b/arch/arm/mm/cache-l2x0.c > @@ -1059,6 +1059,8 @@ static void __init l2c310_of_parse(const struct > device_node *np, > u32 data[3] = { 0, 0, 0 }; > u32 tag[3] = { 0, 0, 0 }; > u32 filter[2] = { 0, 0 }; > + u32 prefetch; > + u32 val; > > of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag)); > if (tag[0] && tag[1] && tag[2]) > @@ -1083,6 +1085,43 @@ static void __init l2c310_of_parse(const struct > device_node *np, > l2x0_saved_regs.filter_start = (filter[0] & ~(SZ_1M - 1)) > | L310_ADDR_FILTER_EN; > } > + > + prefetch = l2x0_saved_regs.prefetch_ctrl; > + > + if (!of_property_read_u32(np, "arm,double-linefill", &val)) { > + if (val) > + prefetch |= L310_PREFETCH_CTRL_DBL_LINEFILL; > + else > + prefetch &= ~L310_PREFETCH_CTRL_DBL_LINEFILL; > + } > + > + if (!of_property_read_u32(np, "arm,double-linefill-incr", &val)) { > + if (val) > + prefetch |= L310_PREFETCH_CTRL_DBL_LINEFILL_INCR; > + else > + prefetch &= ~L310_PREFETCH_CTRL_DBL_LINEFILL_INCR; > + } > + > + if (!of_property_read_u32(np, "arm,double-linefill-wrap", &val)) { > + if (!val) > + prefetch |= L310_PREFETCH_CTRL_DBL_LINEFILL_WRAP; > + else > + prefetch &= ~L310_PREFETCH_CTRL_DBL_LINEFILL_WRAP; > + } > + > + if (!of_property_read_u32(np, "arm,prefetch-drop", &val)) { > + if (val) > + prefetch |= L310_PREFETCH_CTRL_PREFETCH_DROP; > + else > + prefetch &= ~L310_PREFETCH_CTRL_PREFETCH_DROP; > + } > + > + if (!of_property_read_u32(np, "arm,prefetch-offset", &val)) { > + prefetch &= ~L310_PREFETCH_CTRL_OFFSET_MASK; > + prefetch |= val & L310_PREFETCH_CTRL_OFFSET_MASK; > + } > + > + l2x0_saved_regs.prefetch_ctrl = prefetch; > } > > static const struct l2c_init_data of_l2c310_data __initconst = { > -- > 1.9.2 > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 4/7] ARM: l2c: Add support for overriding prefetch settings
On 24.09.2014 13:14, Mark Rutland wrote: > On Wed, Sep 24, 2014 at 12:05:38PM +0100, Marek Szyprowski wrote: >> From: Tomasz Figa >> >> Firmware on certain boards (e.g. ODROID-U3) can leave incorrect L2C prefetch >> settings configured in registers leading to crashes if L2C is enabled >> without overriding them. This patch introduces bindings to enable >> prefetch settings to be specified from DT and necessary support in the >> driver. >> >> Signed-off-by: Tomasz Figa >> Signed-off-by: Marek Szyprowski >> --- >> Documentation/devicetree/bindings/arm/l2cc.txt | 10 +++ >> arch/arm/mm/cache-l2x0.c | 39 >> ++ >> 2 files changed, 49 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt >> b/Documentation/devicetree/bindings/arm/l2cc.txt >> index af527ee111c2..3443d2d76788 100644 >> --- a/Documentation/devicetree/bindings/arm/l2cc.txt >> +++ b/Documentation/devicetree/bindings/arm/l2cc.txt >> @@ -47,6 +47,16 @@ Optional properties: >> - cache-id-part: cache id part number to be used if it is not present >>on hardware >> - wt-override: If present then L2 is forced to Write through mode >> +- arm,double-linefill : Override double linefill enable setting. Enable if >> + non-zero, disable if zero. >> +- arm,double-linefill-incr : Override double linefill on INCR read. Enable >> + if non-zero, disable if zero. >> +- arm,double-linefill-wrap : Override double linefill on WRAP read. Enable >> + if non-zero, disable if zero. >> +- arm,prefetch-drop : Override prefetch drop enable setting. Enable if >> non-zero, >> + disable if zero. > > I'm not too keen on tristate properties. Is this level of flexibility > really required? > > What exact overrides do you need for boards you know of? Why do these > cause crashes if not overridden? Well, this is all thanks to broken firmware, which doesn't initialize those values properly on certain systems and they must be overridden. On the other side, there are systems with firmware that does it correctly and for those the boot defaults should be preferred. I don't see any other reasonable option of handling this. As for why they cause crashes, I'm not an expert if it is about L2C internals, so I can't really tell, but apparently the cache can work correctly only on certain settings. Best regards, Tomasz -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] USB: Remove .owner field for driver
There is no need to init .owner field. Based on the patch from Peter Griffin "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: Kiran Padwal --- drivers/usb/dwc3/dwc3-keystone.c |1 - drivers/usb/dwc3/dwc3-qcom.c |1 - drivers/usb/phy/phy-msm-usb.c|1 - 3 files changed, 3 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-keystone.c b/drivers/usb/dwc3/dwc3-keystone.c index 1fad161..7ec8495 100644 --- a/drivers/usb/dwc3/dwc3-keystone.c +++ b/drivers/usb/dwc3/dwc3-keystone.c @@ -189,7 +189,6 @@ static struct platform_driver kdwc3_driver = { .remove = kdwc3_remove, .driver = { .name = "keystone-dwc3", - .owner = THIS_MODULE, .of_match_table = kdwc3_of_match, }, }; diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 611f8e7..8c2e8ee 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -118,7 +118,6 @@ static struct platform_driver dwc3_qcom_driver = { .remove = dwc3_qcom_remove, .driver = { .name = "qcom-dwc3", - .owner = THIS_MODULE, .of_match_table = of_dwc3_match, }, }; diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 7bb48af..7843ef7 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -1841,7 +1841,6 @@ static struct platform_driver msm_otg_driver = { .remove = msm_otg_remove, .driver = { .name = DRIVER_NAME, - .owner = THIS_MODULE, .pm = &msm_otg_dev_pm_ops, .of_match_table = msm_otg_dt_match, }, -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] mfd: ti_am335x_tscadc: Update logic in CTRL register for 5-wire TS
On Thu, 04 Sep 2014, Sebastian Andrzej Siewior wrote: > From: Jeff Lance > > The logic in AFE_Pen_Ctrl bitmask in the CTRL register is different for five > wire versus four or eight wire touschscreens. This patch should fix this for > five-wire touch screens. There should be no change needed here for four and > eight wire tousch screens. > > Signed-off-by: Jeff Lance > [bigeasy: keep the change mfd only] > Signed-off-by: Sebastian Andrzej Siewior > --- > I've been looking at moving this piece and the idle mode setting into the > TSC driver. Kinda odd that I have to patch within the MFD driver for this > TSC related change. > Anyone disagrees? > > drivers/mfd/ti_am335x_tscadc.c | 30 +- > include/linux/mfd/ti_am335x_tscadc.h | 1 + > 2 files changed, 18 insertions(+), 13 deletions(-) I hope this has been fully tested. Looks like it could work though, so applied, thanks. > diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c > index dd4bf5816221..6c9cfb8c1d01 100644 > --- a/drivers/mfd/ti_am335x_tscadc.c > +++ b/drivers/mfd/ti_am335x_tscadc.c > @@ -241,18 +241,20 @@ static int ti_tscadc_probe(struct platform_device > *pdev) > tscadc_writel(tscadc, REG_CLKDIV, tscadc->clk_div); > > /* Set the control register bits */ > - ctrl = CNTRLREG_STEPCONFIGWRT | > - CNTRLREG_STEPID; > - if (tsc_wires > 0) > - ctrl |= CNTRLREG_4WIRE | CNTRLREG_TSCENB; > + ctrl = CNTRLREG_STEPCONFIGWRT | CNTRLREG_STEPID; > tscadc_writel(tscadc, REG_CTRL, ctrl); > > /* Set register bits for Idle Config Mode */ > - if (tsc_wires > 0) > + if (tsc_wires > 0) { > + tscadc->tsc_wires = tsc_wires; > + if (tsc_wires == 5) > + ctrl |= CNTRLREG_5WIRE | CNTRLREG_TSCENB; > + else > + ctrl |= CNTRLREG_4WIRE | CNTRLREG_TSCENB; > tscadc_idle_config(tscadc); > + } > > /* Enable the TSC module enable bit */ > - ctrl = tscadc_readl(tscadc, REG_CTRL); > ctrl |= CNTRLREG_TSCSSENB; > tscadc_writel(tscadc, REG_CTRL, ctrl); > > @@ -324,21 +326,23 @@ static int tscadc_suspend(struct device *dev) > static int tscadc_resume(struct device *dev) > { > struct ti_tscadc_dev*tscadc_dev = dev_get_drvdata(dev); > - unsigned int restore, ctrl; > + u32 ctrl; > > pm_runtime_get_sync(dev); > > /* context restore */ > ctrl = CNTRLREG_STEPCONFIGWRT | CNTRLREG_STEPID; > - if (tscadc_dev->tsc_cell != -1) > - ctrl |= CNTRLREG_TSCENB | CNTRLREG_4WIRE; > tscadc_writel(tscadc_dev, REG_CTRL, ctrl); > > - if (tscadc_dev->tsc_cell != -1) > + if (tscadc_dev->tsc_cell != -1) { > + if (tscadc_dev->tsc_wires == 5) > + ctrl |= CNTRLREG_5WIRE | CNTRLREG_TSCENB; > + else > + ctrl |= CNTRLREG_4WIRE | CNTRLREG_TSCENB; > tscadc_idle_config(tscadc_dev); > - restore = tscadc_readl(tscadc_dev, REG_CTRL); > - tscadc_writel(tscadc_dev, REG_CTRL, > - (restore | CNTRLREG_TSCSSENB)); > + } > + ctrl |= CNTRLREG_TSCSSENB; > + tscadc_writel(tscadc_dev, REG_CTRL, ctrl); > > tscadc_writel(tscadc_dev, REG_CLKDIV, tscadc_dev->clk_div); > > diff --git a/include/linux/mfd/ti_am335x_tscadc.h > b/include/linux/mfd/ti_am335x_tscadc.h > index fb96c84dada5..e2e70053470e 100644 > --- a/include/linux/mfd/ti_am335x_tscadc.h > +++ b/include/linux/mfd/ti_am335x_tscadc.h > @@ -155,6 +155,7 @@ struct ti_tscadc_dev { > void __iomem *tscadc_base; > int irq; > int used_cells; /* 1-2 */ > + int tsc_wires; > int tsc_cell; /* -1 if not used */ > int adc_cell; /* -1 if not used */ > struct mfd_cell cells[TSCADC_CELLS]; -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 4/7] ARM: l2c: Add support for overriding prefetch settings
On Wed, Sep 24, 2014 at 12:19:45PM +0100, Tomasz Figa wrote: > On 24.09.2014 13:14, Mark Rutland wrote: > > On Wed, Sep 24, 2014 at 12:05:38PM +0100, Marek Szyprowski wrote: > >> From: Tomasz Figa > >> > >> Firmware on certain boards (e.g. ODROID-U3) can leave incorrect L2C > >> prefetch > >> settings configured in registers leading to crashes if L2C is enabled > >> without overriding them. This patch introduces bindings to enable > >> prefetch settings to be specified from DT and necessary support in the > >> driver. > >> > >> Signed-off-by: Tomasz Figa > >> Signed-off-by: Marek Szyprowski > >> --- > >> Documentation/devicetree/bindings/arm/l2cc.txt | 10 +++ > >> arch/arm/mm/cache-l2x0.c | 39 > >> ++ > >> 2 files changed, 49 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt > >> b/Documentation/devicetree/bindings/arm/l2cc.txt > >> index af527ee111c2..3443d2d76788 100644 > >> --- a/Documentation/devicetree/bindings/arm/l2cc.txt > >> +++ b/Documentation/devicetree/bindings/arm/l2cc.txt > >> @@ -47,6 +47,16 @@ Optional properties: > >> - cache-id-part: cache id part number to be used if it is not present > >>on hardware > >> - wt-override: If present then L2 is forced to Write through mode > >> +- arm,double-linefill : Override double linefill enable setting. Enable if > >> + non-zero, disable if zero. > >> +- arm,double-linefill-incr : Override double linefill on INCR read. Enable > >> + if non-zero, disable if zero. > >> +- arm,double-linefill-wrap : Override double linefill on WRAP read. Enable > >> + if non-zero, disable if zero. > >> +- arm,prefetch-drop : Override prefetch drop enable setting. Enable if > >> non-zero, > >> + disable if zero. > > > > I'm not too keen on tristate properties. Is this level of flexibility > > really required? > > > > What exact overrides do you need for boards you know of? Why do these > > cause crashes if not overridden? > > Well, this is all thanks to broken firmware, which doesn't initialize > those values properly on certain systems and they must be overridden. On > the other side, there are systems with firmware that does it correctly > and for those the boot defaults should be preferred. I don't see any > other reasonable option of handling this. With the lack of warnings for present but empty properties, I can forsee people placing empty properties (as the names make them sound like booleans which enable features). Surely for enabling/disabling options we should only need to override one-way, disabling a feature that causes breakage for some reason? Otherwise we can keep the reset value (which might be sub-optimal). Perhaps a simple warning is sufficient if the property exists but is empty. > As for why they cause crashes, I'm not an expert if it is about L2C > internals, so I can't really tell, but apparently the cache can work > correctly only on certain settings. Likewise, I'm no expert on the l2x0 family. It would be nice to know if this justs masks an issue elsewhere in Linux, is required for some reason by the interconnect, etc. I guess we don't have enough information to figure that out. Mark. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL 2/5] omap soc changes for v3.18 merge window
On 22:07-20140923, Olof Johansson wrote: > On Thu, Sep 11, 2014 at 04:28:55PM -0700, Tony Lindgren wrote: > > The following changes since commit d7eb67f7fef9c046f27a975118da2324de65a90c: > > > > Merge branch 'pull/v3.18/powerdomain-fixes' of > > https://github.com/nmenon/linux-2.6-playground into > > omap-for-v3.18/fixes-not-urgent (2014-09-08 15:04:24 -0700) > > > > are available in the git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap > > tags/soc-for-v3.18 > > > > for you to fetch changes up to 377fb3f5d9a34b2913939e0620c1c585b5913bab: > > > > ARM: OMAP5+: Reuse OMAP4 PM code for OMAP5 and DRA7 (2014-09-09 19:13:41 > > -0700) > > > > > > SoC related changes for omaps for v3.18 merge window: > > > > - PM changes to make the code easier to use on newer SoCs > > - PM changes for newer SoCs suspend and resume and wake-up events > > - Minor clean-up to remove dead Kconfig options > > > > Note that these have a dependency to the fixes-v3.18-not-urgent > > tag and is based on a commit in that series. > > Merged. Note that this also has a fresh conflict with the latest fixes, > so please check that I resolved it correctly. > Looks fine to me.. also, Used a couple of out of tree patches for testing and all looks good from test perspective: am335x-evm: Boot PASS: http://slexy.org/raw/s21ul7EaiK am335x-sk: Boot PASS: http://slexy.org/raw/s2xxG7b5t7 am3517-evm: Boot PASS: http://slexy.org/raw/s21we13Ebk am37x-evm: Boot PASS: http://slexy.org/raw/s209iOnepY am43xx-epos: Boot PASS: http://slexy.org/raw/s28GrriVvz am5728-evm: Boot PASS: http://slexy.org/raw/s2wRllyrn2 BeagleBoard-XM: Boot PASS: http://slexy.org/raw/s2JPCJPebZ beagleboard-vanilla: Boot PASS: http://slexy.org/raw/s2n4Pum58s beaglebone-black: Boot PASS: http://slexy.org/raw/s20yDlR4eu craneboard: Boot PASS: http://slexy.org/raw/s21DECJfEs dra72x-evm: Boot PASS: http://slexy.org/raw/s2WgDuVxXj dra7xx-evm: Boot PASS: http://slexy.org/raw/s2wOi9Okyk OMAP3430-Labrador(LDP): Boot PASS: http://slexy.org/raw/s20qOiwY38 n900: Boot PASS: http://slexy.org/raw/s2j6hBxA2b omap5-evm: Boot PASS: http://slexy.org/raw/s20Of1TCt4 pandaboard-es: Boot PASS: http://slexy.org/raw/s20P0IWXJX pandaboard-vanilla: Boot PASS: http://slexy.org/raw/s20QWs7BP9 sdp2430: Boot PASS: http://slexy.org/raw/s2fXgpekEa sdp3430: Boot PASS: http://slexy.org/raw/s21GW1utPn -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL 2/5] omap soc changes for v3.18 merge window
* Nishanth Menon [140924 08:24]: > On 22:07-20140923, Olof Johansson wrote: > > On Thu, Sep 11, 2014 at 04:28:55PM -0700, Tony Lindgren wrote: > > > The following changes since commit > > > d7eb67f7fef9c046f27a975118da2324de65a90c: > > > > > > Merge branch 'pull/v3.18/powerdomain-fixes' of > > > https://github.com/nmenon/linux-2.6-playground into > > > omap-for-v3.18/fixes-not-urgent (2014-09-08 15:04:24 -0700) > > > > > > are available in the git repository at: > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap > > > tags/soc-for-v3.18 > > > > > > for you to fetch changes up to 377fb3f5d9a34b2913939e0620c1c585b5913bab: > > > > > > ARM: OMAP5+: Reuse OMAP4 PM code for OMAP5 and DRA7 (2014-09-09 > > > 19:13:41 -0700) > > > > > > > > > SoC related changes for omaps for v3.18 merge window: > > > > > > - PM changes to make the code easier to use on newer SoCs > > > - PM changes for newer SoCs suspend and resume and wake-up events > > > - Minor clean-up to remove dead Kconfig options > > > > > > Note that these have a dependency to the fixes-v3.18-not-urgent > > > tag and is based on a commit in that series. > > > > Merged. Note that this also has a fresh conflict with the latest fixes, > > so please check that I resolved it correctly. > > > > Looks fine to me.. also, Used a couple of out of tree patches for > testing and all looks good from test perspective: > > am335x-evm: Boot PASS: http://slexy.org/raw/s21ul7EaiK > am335x-sk: Boot PASS: http://slexy.org/raw/s2xxG7b5t7 > am3517-evm: Boot PASS: http://slexy.org/raw/s21we13Ebk > am37x-evm: Boot PASS: http://slexy.org/raw/s209iOnepY > am43xx-epos: Boot PASS: http://slexy.org/raw/s28GrriVvz > am5728-evm: Boot PASS: http://slexy.org/raw/s2wRllyrn2 > BeagleBoard-XM: Boot PASS: http://slexy.org/raw/s2JPCJPebZ > beagleboard-vanilla: Boot PASS: http://slexy.org/raw/s2n4Pum58s > beaglebone-black: Boot PASS: http://slexy.org/raw/s20yDlR4eu > craneboard: Boot PASS: http://slexy.org/raw/s21DECJfEs > dra72x-evm: Boot PASS: http://slexy.org/raw/s2WgDuVxXj > dra7xx-evm: Boot PASS: http://slexy.org/raw/s2wOi9Okyk > OMAP3430-Labrador(LDP): Boot PASS: http://slexy.org/raw/s20qOiwY38 > n900: Boot PASS: http://slexy.org/raw/s2j6hBxA2b > omap5-evm: Boot PASS: http://slexy.org/raw/s20Of1TCt4 > pandaboard-es: Boot PASS: http://slexy.org/raw/s20P0IWXJX > pandaboard-vanilla: Boot PASS: http://slexy.org/raw/s20QWs7BP9 > sdp2430: Boot PASS: http://slexy.org/raw/s2fXgpekEa > sdp3430: Boot PASS: http://slexy.org/raw/s21GW1utPn OK thanks looks good to me also. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 00/27] add pm_runtime_last_busy_and_autosuspend() helper
This patch series adds a simple macro pm_runtime_last_busy_and_autosuspend() which invokes pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() sequentially. Then we do a tree wide update of current patterns which are present. As evident from log below this pattern is frequent in the kernel. This series can be found at git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git topic/pm_runtime_last_busy_and_autosuspend Fengguang's kbuild has tested it so it shouldn't break things for anyone. Barring one patch (explictyly mentioned in its changelog) rest are simple replacements. If all are okay, this should be merged thru PM tree as it depends on macro addition. Subhransu S. Prusty (1): PM: Add helper pm_runtime_last_busy_and_autosuspend() Vinod Koul (26): dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper drm/i915: use pm_runtime_last_busy_and_autosuspend helper drm/nouveau: use pm_runtime_last_busy_and_autosuspend helper drm/radeon: use pm_runtime_last_busy_and_autosuspend helper vga_switcheroo: use pm_runtime_last_busy_and_autosuspend helper i2c: designware: use pm_runtime_last_busy_and_autosuspend helper i2c: omap: use pm_runtime_last_busy_and_autosuspend helper i2c: qup: use pm_runtime_last_busy_and_autosuspend helper mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper mei: use pm_runtime_last_busy_and_autosuspend helper mmc: use pm_runtime_last_busy_and_autosuspend helper mmc: mmci: use pm_runtime_last_busy_and_autosuspend helper mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper mmc: sdhci-pxav3: use pm_runtime_last_busy_and_autosuspend helper mmc: sdhci: use pm_runtime_last_busy_and_autosuspend helper NFC: trf7970a: use pm_runtime_last_busy_and_autosuspend helper pm2301-charger: use pm_runtime_last_busy_and_autosuspend helper spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper spi: orion: use pm_runtime_last_busy_and_autosuspend helper spi: ti-qspi: use pm_runtime_last_busy_and_autosuspend helper spi: core: use pm_runtime_last_busy_and_autosuspend helper tty: serial: omap: use pm_runtime_last_busy_and_autosuspend helper usb: musb: omap2430: use pm_runtime_last_busy_and_autosuspend helper video: fbdev: use pm_runtime_last_busy_and_autosuspend helper Documentation/power/runtime_pm.txt |4 ++ drivers/dma/ste_dma40.c | 30 - drivers/extcon/extcon-arizona.c |6 +-- drivers/gpu/drm/i915/intel_pm.c |3 +- drivers/gpu/drm/nouveau/nouveau_connector.c |3 +- drivers/gpu/drm/nouveau/nouveau_drm.c |9 +--- drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++ drivers/gpu/drm/radeon/radeon_drv.c |5 +- drivers/gpu/drm/radeon/radeon_kms.c |6 +-- drivers/gpu/vga/vga_switcheroo.c|7 +-- drivers/i2c/busses/i2c-designware-core.c|3 +- drivers/i2c/busses/i2c-omap.c |6 +-- drivers/i2c/busses/i2c-qup.c|3 +- drivers/mfd/ab8500-gpadc.c |6 +-- drivers/mfd/arizona-irq.c |3 +- drivers/misc/mei/client.c | 12 ++ drivers/mmc/core/core.c |3 +- drivers/mmc/host/mmci.c | 12 ++ drivers/mmc/host/omap_hsmmc.c | 19 ++--- drivers/mmc/host/sdhci-pxav3.c |6 +-- drivers/mmc/host/sdhci.c|3 +- drivers/nfc/trf7970a.c |3 +- drivers/power/pm2301_charger.c |3 +- drivers/spi/spi-omap2-mcspi.c |9 +--- drivers/spi/spi-orion.c |3 +- drivers/spi/spi-ti-qspi.c |5 +- drivers/spi/spi.c |6 +-- drivers/tty/serial/omap-serial.c| 60 +-- drivers/usb/musb/omap2430.c |6 +-- drivers/video/fbdev/auo_k190x.c |9 +--- include/linux/pm_runtime.h |6 +++ 31 files changed, 97 insertions(+), 177 deletions(-) Thanks -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 09/27] i2c: omap: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul --- drivers/i2c/busses/i2c-omap.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 0dffb0e..8a7de50 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -661,8 +661,7 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) dev->set_mpu_wkup_lat(dev->dev, -1); out: - pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + pm_runtime_last_busy_and_autosuspend(dev->dev); return r; } @@ -1253,8 +1252,7 @@ omap_i2c_probe(struct platform_device *pdev) dev_info(dev->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr, major, minor, dev->speed); - pm_runtime_mark_last_busy(dev->dev); - pm_runtime_put_autosuspend(dev->dev); + pm_runtime_last_busy_and_autosuspend(dev->dev); return 0; -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 26/27] usb: musb: omap2430: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul --- drivers/usb/musb/omap2430.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index d369bf1..17c6c49 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -293,8 +293,7 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue) musb->xceiv->last_event = USB_EVENT_NONE; if (musb->gadget_driver) { omap2430_musb_set_vbus(musb, 0); - pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + pm_runtime_last_busy_and_autosuspend(dev); } if (data->interface_type == MUSB_INTERFACE_UTMI) @@ -321,8 +320,7 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work) pm_runtime_get_sync(dev); omap_musb_set_mailbox(glue); - pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); + pm_runtime_last_busy_and_autosuspend(dev); } static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci) -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 16/27] mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code This patch also changes return value from macro rather than 0 always! Signed-off-by: Vinod Koul --- drivers/mmc/host/omap_hsmmc.c | 19 --- 1 files changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 9656726..2a2affc 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1823,10 +1823,7 @@ static int omap_hsmmc_disable_fclk(struct mmc_host *mmc) { struct omap_hsmmc_host *host = mmc_priv(mmc); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); - - return 0; + return pm_runtime_last_busy_and_autosuspend(host->dev); } static const struct mmc_host_ops omap_hsmmc_ops = { @@ -1877,10 +1874,7 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data) seq_printf(s, "CAPA:\t\t0x%08x\n", OMAP_HSMMC_READ(host->base, CAPA)); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); - - return 0; + return pm_runtime_last_busy_and_autosuspend(host->dev); } static int omap_hsmmc_regs_open(struct inode *inode, struct file *file) @@ -2258,10 +2252,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) } omap_hsmmc_debugfs(mmc); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); - - return 0; + return pm_runtime_last_busy_and_autosuspend(host->dev); err_slot_name: mmc_remove_host(mmc); @@ -2386,9 +2377,7 @@ static int omap_hsmmc_resume(struct device *dev) !(host->mmc->pm_flags & MMC_PM_WAKE_SDIO_IRQ)) enable_irq(host->wake_irq); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); - return 0; + return pm_runtime_last_busy_and_autosuspend(host->dev); } #else -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 1/2] usb: rename phy to usb_phy in HCD
hello. On 09/24/2014 09:11 AM, Greg KH wrote: From: Antoine Tenart The USB PHY member of the HCD structure is renamed to 'usb_phy' and modifications are done in all drivers accessing it. This is in preparation to adding the generic PHY support. Signed-off-by: Antoine Tenart [Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects caused by patch reordering, updated changelog.] Signed-off-by: Sergei Shtylyov Acked-by: Alan Stern Acked-by: Felipe Balbi --- Changes in version 5: - imported the patch from Antoine Tenart's series; - added missing 'drivers/usb/misc/lvstest.c' file; - resolved rejects caused by patch reordering; - refreshed patch; - updated changelog. drivers/usb/chipidea/host.c |2 +- drivers/usb/core/hcd.c| 20 ++-- drivers/usb/core/hub.c|8 drivers/usb/host/ehci-fsl.c | 16 drivers/usb/host/ehci-hub.c |2 +- drivers/usb/host/ehci-msm.c |4 ++-- drivers/usb/host/ehci-tegra.c | 16 drivers/usb/host/ohci-omap.c | 20 ++-- drivers/usb/misc/lvstest.c|8 include/linux/usb/hcd.h |2 +- 10 files changed, 49 insertions(+), 49 deletions(-) This doesn't apply to my tree at all anymore, Well, I'm seeing only a minor reject in the first file, easily fixable. can you refresh it and resend? OK, will re-post now. thanks, greg k-h WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 0/2] Add generic PHY support to USB HCD
Hello. This patchset is against the usb-next' branch of Greg KH's 'usb.git' repo. Here I add support for the generic PHY to the 'struct usb_hcd' (having to rename the existing 'phy' field to 'usb_phy' beforehand). This was mainly intended to be used with the PCI OHCI/EHCI drivers and also xHCI driver; however there are several more dependent patchsets now posted to 'linux-usb'. [1/2] usb: rename phy to usb_phy in HCD [2/2] usb: hcd: add generic PHY support WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 1/2] usb: rename phy to usb_phy in HCD
From: Antoine Tenart The USB PHY member of the HCD structure is renamed to 'usb_phy' and modifications are done in all drivers accessing it. This is in preparation to adding the generic PHY support. Signed-off-by: Antoine Tenart [Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects, updated changelog.] Signed-off-by: Sergei Shtylyov Acked-by: Alan Stern --- Changes in version 6: - resolved reject, refreshed the patch. Changes in version 5: - imported the patch from Antoine Tenart's series; - added missing 'drivers/usb/misc/lvstest.c' file; - resolved rejects caused by patch reordering; - refreshed patch; - updated changelog. drivers/usb/chipidea/host.c |2 +- drivers/usb/core/hcd.c| 20 ++-- drivers/usb/core/hub.c|8 drivers/usb/host/ehci-fsl.c | 16 drivers/usb/host/ehci-hub.c |2 +- drivers/usb/host/ehci-msm.c |4 ++-- drivers/usb/host/ehci-tegra.c | 16 drivers/usb/host/ohci-omap.c | 20 ++-- drivers/usb/misc/lvstest.c|8 include/linux/usb/hcd.h |2 +- 10 files changed, 49 insertions(+), 49 deletions(-) Index: usb/drivers/usb/chipidea/host.c === --- usb.orig/drivers/usb/chipidea/host.c +++ usb/drivers/usb/chipidea/host.c @@ -59,7 +59,7 @@ static int host_start(struct ci_hdrc *ci hcd->has_tt = 1; hcd->power_budget = ci->platdata->power_budget; - hcd->phy = ci->transceiver; + hcd->usb_phy = ci->transceiver; hcd->tpl_support = ci->platdata->tpl_support; ehci = hcd_to_ehci(hcd); Index: usb/drivers/usb/core/hcd.c === --- usb.orig/drivers/usb/core/hcd.c +++ usb/drivers/usb/core/hcd.c @@ -2627,7 +2627,7 @@ int usb_add_hcd(struct usb_hcd *hcd, int retval; struct usb_device *rhdev; - if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->phy) { + if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->usb_phy) { struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, 0); if (IS_ERR(phy)) { @@ -2640,7 +2640,7 @@ int usb_add_hcd(struct usb_hcd *hcd, usb_put_phy(phy); return retval; } - hcd->phy = phy; + hcd->usb_phy = phy; hcd->remove_phy = 1; } } @@ -2788,10 +2788,10 @@ err_allocate_root_hub: err_register_bus: hcd_buffer_destroy(hcd); err_remove_phy: - if (hcd->remove_phy && hcd->phy) { - usb_phy_shutdown(hcd->phy); - usb_put_phy(hcd->phy); - hcd->phy = NULL; + if (hcd->remove_phy && hcd->usb_phy) { + usb_phy_shutdown(hcd->usb_phy); + usb_put_phy(hcd->usb_phy); + hcd->usb_phy = NULL; } return retval; } @@ -2864,10 +2864,10 @@ void usb_remove_hcd(struct usb_hcd *hcd) usb_deregister_bus(&hcd->self); hcd_buffer_destroy(hcd); - if (hcd->remove_phy && hcd->phy) { - usb_phy_shutdown(hcd->phy); - usb_put_phy(hcd->phy); - hcd->phy = NULL; + if (hcd->remove_phy && hcd->usb_phy) { + usb_phy_shutdown(hcd->usb_phy); + usb_put_phy(hcd->usb_phy); + hcd->usb_phy = NULL; } usb_put_invalidate_rhdev(hcd); Index: usb/drivers/usb/core/hub.c === --- usb.orig/drivers/usb/core/hub.c +++ usb/drivers/usb/core/hub.c @@ -4467,8 +4467,8 @@ hub_port_init (struct usb_hub *hub, stru if (retval) goto fail; - if (hcd->phy && !hdev->parent) - usb_phy_notify_connect(hcd->phy, udev->speed); + if (hcd->usb_phy && !hdev->parent) + usb_phy_notify_connect(hcd->usb_phy, udev->speed); /* * Some superspeed devices have finished the link training process @@ -4626,9 +4626,9 @@ static void hub_port_connect(struct usb_ /* Disconnect any existing devices under this port */ if (udev) { - if (hcd->phy && !hdev->parent && + if (hcd->usb_phy && !hdev->parent && !(portstatus & USB_PORT_STAT_CONNECTION)) - usb_phy_notify_disconnect(hcd->phy, udev->speed); + usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); usb_disconnect(&port_dev->child); } Index: usb/drivers/usb/host/ehci-fsl.c === --- usb.orig/drivers/usb/host/ehci-fsl.c +++ usb/drivers/usb/host/ehci-fsl.c @@ -136,15 +136,15 @@ static int usb_hcd_fsl_probe(const struc if (pdata->operating_mode == FSL_USB2_DR_OTG) { s
Re: [PATCH v6 1/2] usb: rename phy to usb_phy in HCD
On Wed, Sep 24, 2014 at 11:05:50PM +0400, Sergei Shtylyov wrote: > From: Antoine Tenart > > The USB PHY member of the HCD structure is renamed to 'usb_phy' and > modifications are done in all drivers accessing it. > This is in preparation to adding the generic PHY support. > > Signed-off-by: Antoine Tenart > [Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects, > updated changelog.] > Signed-off-by: Sergei Shtylyov > Acked-by: Alan Stern Acked-by: Felipe Balbi -- balbi signature.asc Description: Digital signature
Re: [PATCH v6 1/2] usb: rename phy to usb_phy in HCD
Hello. On 09/24/2014 11:28 PM, Felipe Balbi wrote: From: Antoine Tenart The USB PHY member of the HCD structure is renamed to 'usb_phy' and modifications are done in all drivers accessing it. This is in preparation to adding the generic PHY support. Signed-off-by: Antoine Tenart [Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects, updated changelog.] Signed-off-by: Sergei Shtylyov Acked-by: Alan Stern Acked-by: Felipe Balbi Sorry, forgot to collect your ACK from the previous posting. :-/ WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6 1/2] usb: rename phy to usb_phy in HCD
On Wed, Sep 24, 2014 at 11:31:11PM +0400, Sergei Shtylyov wrote: > Hello. > > On 09/24/2014 11:28 PM, Felipe Balbi wrote: > > >>From: Antoine Tenart > > >>The USB PHY member of the HCD structure is renamed to 'usb_phy' and > >>modifications are done in all drivers accessing it. > >>This is in preparation to adding the generic PHY support. > > >>Signed-off-by: Antoine Tenart > >>[Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects, > >>updated changelog.] > >>Signed-off-by: Sergei Shtylyov > >>Acked-by: Alan Stern > > >Acked-by: Felipe Balbi > >Sorry, forgot to collect your ACK from the previous posting. :-/ don't worry ;-) -- balbi signature.asc Description: Digital signature
Re: [PATCH 00/27] add pm_runtime_last_busy_and_autosuspend() helper
On Wednesday, September 24, 2014 09:44:50 PM Vinod Koul wrote: > This patch series adds a simple macro pm_runtime_last_busy_and_autosuspend() > which invokes pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() > sequentially. Then we do a tree wide update of current patterns which are > present. As evident from log below this pattern is frequent in the > kernel. > > This series can be found at > git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git > topic/pm_runtime_last_busy_and_autosuspend > > Fengguang's kbuild has tested it so it shouldn't break things for anyone. > Barring one patch (explictyly mentioned in its changelog) rest are simple > replacements. > > If all are okay, this should be merged thru PM tree as it depends on macro > addition. > > Subhransu S. Prusty (1): > PM: Add helper pm_runtime_last_busy_and_autosuspend() > > Vinod Koul (26): > dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper > extcon: arizona: use pm_runtime_last_busy_and_autosuspend helper > drm/i915: use pm_runtime_last_busy_and_autosuspend helper > drm/nouveau: use pm_runtime_last_busy_and_autosuspend helper > drm/radeon: use pm_runtime_last_busy_and_autosuspend helper > vga_switcheroo: use pm_runtime_last_busy_and_autosuspend helper > i2c: designware: use pm_runtime_last_busy_and_autosuspend helper > i2c: omap: use pm_runtime_last_busy_and_autosuspend helper > i2c: qup: use pm_runtime_last_busy_and_autosuspend helper > mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper > mfd: arizona: use pm_runtime_last_busy_and_autosuspend helper > mei: use pm_runtime_last_busy_and_autosuspend helper > mmc: use pm_runtime_last_busy_and_autosuspend helper > mmc: mmci: use pm_runtime_last_busy_and_autosuspend helper > mmc: omap_hsmmc: use pm_runtime_last_busy_and_autosuspend helper > mmc: sdhci-pxav3: use pm_runtime_last_busy_and_autosuspend helper > mmc: sdhci: use pm_runtime_last_busy_and_autosuspend helper > NFC: trf7970a: use pm_runtime_last_busy_and_autosuspend helper > pm2301-charger: use pm_runtime_last_busy_and_autosuspend helper > spi: omap2-mcspi: use pm_runtime_last_busy_and_autosuspend helper > spi: orion: use pm_runtime_last_busy_and_autosuspend helper > spi: ti-qspi: use pm_runtime_last_busy_and_autosuspend helper > spi: core: use pm_runtime_last_busy_and_autosuspend helper > tty: serial: omap: use pm_runtime_last_busy_and_autosuspend helper > usb: musb: omap2430: use pm_runtime_last_busy_and_autosuspend helper > video: fbdev: use pm_runtime_last_busy_and_autosuspend helper > > Documentation/power/runtime_pm.txt |4 ++ > drivers/dma/ste_dma40.c | 30 - > drivers/extcon/extcon-arizona.c |6 +-- > drivers/gpu/drm/i915/intel_pm.c |3 +- > drivers/gpu/drm/nouveau/nouveau_connector.c |3 +- > drivers/gpu/drm/nouveau/nouveau_drm.c |9 +--- > drivers/gpu/drm/radeon/radeon_connectors.c | 15 ++ > drivers/gpu/drm/radeon/radeon_drv.c |5 +- > drivers/gpu/drm/radeon/radeon_kms.c |6 +-- > drivers/gpu/vga/vga_switcheroo.c|7 +-- > drivers/i2c/busses/i2c-designware-core.c|3 +- > drivers/i2c/busses/i2c-omap.c |6 +-- > drivers/i2c/busses/i2c-qup.c|3 +- > drivers/mfd/ab8500-gpadc.c |6 +-- > drivers/mfd/arizona-irq.c |3 +- > drivers/misc/mei/client.c | 12 ++ > drivers/mmc/core/core.c |3 +- > drivers/mmc/host/mmci.c | 12 ++ > drivers/mmc/host/omap_hsmmc.c | 19 ++--- > drivers/mmc/host/sdhci-pxav3.c |6 +-- > drivers/mmc/host/sdhci.c|3 +- > drivers/nfc/trf7970a.c |3 +- > drivers/power/pm2301_charger.c |3 +- > drivers/spi/spi-omap2-mcspi.c |9 +--- > drivers/spi/spi-orion.c |3 +- > drivers/spi/spi-ti-qspi.c |5 +- > drivers/spi/spi.c |6 +-- > drivers/tty/serial/omap-serial.c| 60 > +-- > drivers/usb/musb/omap2430.c |6 +-- > drivers/video/fbdev/auo_k190x.c |9 +--- > include/linux/pm_runtime.h |6 +++ > 31 files changed, 97 insertions(+), 177 deletions(-) OK, I guess this is as good as it gets. What tree would you like it go through? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 4/7] ARM: l2c: Add support for overriding prefetch settings
On Wed, Sep 24, 2014 at 01:10:51PM +0100, Mark Rutland wrote: > On Wed, Sep 24, 2014 at 12:19:45PM +0100, Tomasz Figa wrote: > > On 24.09.2014 13:14, Mark Rutland wrote: > > > I'm not too keen on tristate properties. Is this level of flexibility > > > really required? I would say that we need a way to enable _and_ disable these features, because: 1. When we converted the L2 code to DT, no one thought about creating a full and proper DT specification for the L2 code. So, we have the situation today where platform code (and firmware code) enables or disables these features depending on platform knowledge. 2. If we are going to specify these options as a boolean-enable value, this implies that the lack of the boolean disables the option. We have pre-existing DT files which do not contain this option, but the platform may rely on the feature being enabled. This is precisely the kind of mess that happens when incomplete DT bindings are accepted. DT bindings for any device should be _full_ bindings from the start, and not a half-hearted attempt at the job. As much as we don't like tristate properties, we only have ourselves to blame for them becoming a necessity in cases like this. > With the lack of warnings for present but empty properties, I can forsee > people placing empty properties (as the names make them sound like > booleans which enable features). > > Surely for enabling/disabling options we should only need to override > one-way, disabling a feature that causes breakage for some reason? > Otherwise we can keep the reset value (which might be sub-optimal). What if enabling prefetching on an existing platform causes a failure? That's a regression on a previously working DT file, and needing a DT update to resolve. The obvious alternative is we have two properties per feature - one boolean to enable, and one boolean to disable the feature. We already have a number of negative properties because of exactly the same problem I mention above (where the driver has assumed defaults for one platform which are not appropriate for all platforms.) > > As for why they cause crashes, I'm not an expert if it is about L2C > > internals, so I can't really tell, but apparently the cache can work > > correctly only on certain settings. > > Likewise, I'm no expert on the l2x0 family. It would be nice to know if > this justs masks an issue elsewhere in Linux, is required for some > reason by the interconnect, etc. I guess we don't have enough > information to figure that out. No, it would be nice to have some errata information... -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html