From mboxrd@z Thu Jan 1 00:00:00 1970 From: nicolas.ferre@atmel.com (Nicolas Ferre) Date: Wed, 18 Mar 2015 12:16:22 +0100 Subject: [PATCH 1/5] USB: ehci-atmel: rework clk handling In-Reply-To: References: Message-ID: <55095E86.1060201@atmel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Le 17/03/2015 20:01, Alan Stern a ?crit : > On Tue, 17 Mar 2015, Boris Brezillon wrote: > >> The EHCI IP only needs the UTMI/UPLL (uclk) and the peripheral (iclk) >> clocks to work properly. Remove the useless system clock (fclk). >> >> Avoid calling set_rate on the fixed rate UTMI/IPLL clock and remove >> useless IS_ENABLED(CONFIG_COMMON_CLK) tests (all at91 platforms have been >> moved to the CCF). >> >> This patch also fixes a bug introduced by 3440ef1 (ARM: at91/dt: fix USB >> high-speed clock to select UTMI), which was leaving the usb clock >> uninitialized and preventing the OHCI driver from setting the usb clock >> rate to 48MHz. >> This bug was caused by several things: >> 1/ usb clock drivers set the CLK_SET_RATE_GATE flag, which means the rate >> cannot be changed once the clock is prepared >> 2/ The EHCI driver was retrieving and preparing/enabling the uhpck >> clock which was in turn preparing its parent clock (the usb clock), >> thus preventing any rate change because of 1/ >> >> Signed-off-by: Boris Brezillon > > Acked-by: Alan Stern Acked-by: Nicolas Ferre and: Fixes: 3440ef169100 ("ARM: at91/dt: fix USB high-speed clock to select UTMI") Alan, Greg, Can you please take this patch (only this patch 1/5 of the series) as a fix for the 4.0-rc? It would solve the issue that we see on at91sam9x5/at91sam9n12. I'll take care of the rest of the series for 4.1. If you want me to take it of to re-send the patch, tell me. Thanks, bye, -- Nicolas Ferre From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Ferre Subject: Re: [PATCH 1/5] USB: ehci-atmel: rework clk handling Date: Wed, 18 Mar 2015 12:16:22 +0100 Message-ID: <55095E86.1060201@atmel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alan Stern , Greg Kroah-Hartman Cc: Boris Brezillon , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Felipe Balbi , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Douglas Gilbert , Robert Nelson List-Id: devicetree@vger.kernel.org Le 17/03/2015 20:01, Alan Stern a =E9crit : > On Tue, 17 Mar 2015, Boris Brezillon wrote: >=20 >> The EHCI IP only needs the UTMI/UPLL (uclk) and the peripheral (iclk= ) >> clocks to work properly. Remove the useless system clock (fclk). >> >> Avoid calling set_rate on the fixed rate UTMI/IPLL clock and remove >> useless IS_ENABLED(CONFIG_COMMON_CLK) tests (all at91 platforms have= been >> moved to the CCF). >> >> This patch also fixes a bug introduced by 3440ef1 (ARM: at91/dt: fix= USB >> high-speed clock to select UTMI), which was leaving the usb clock >> uninitialized and preventing the OHCI driver from setting the usb cl= ock >> rate to 48MHz. >> This bug was caused by several things: >> 1/ usb clock drivers set the CLK_SET_RATE_GATE flag, which means the= rate >> cannot be changed once the clock is prepared >> 2/ The EHCI driver was retrieving and preparing/enabling the uhpck >> clock which was in turn preparing its parent clock (the usb clock= ), >> thus preventing any rate change because of 1/ >> >> Signed-off-by: Boris Brezillon >=20 > Acked-by: Alan Stern Acked-by: Nicolas Ferre and: =46ixes: 3440ef169100 ("ARM: at91/dt: fix USB high-speed clock to selec= t UTMI") Alan, Greg, Can you please take this patch (only this patch 1/5 of the series) as a= fix=20 for the 4.0-rc? It would solve the issue that we see on at91sam9x5/at91= sam9n12. I'll take care of the rest of the series for 4.1. If you want me to take it of to re-send the patch, tell me. Thanks, bye, --=20 Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756031AbbCRLQe (ORCPT ); Wed, 18 Mar 2015 07:16:34 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:33707 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754850AbbCRLQb (ORCPT ); Wed, 18 Mar 2015 07:16:31 -0400 Message-ID: <55095E86.1060201@atmel.com> Date: Wed, 18 Mar 2015 12:16:22 +0100 From: Nicolas Ferre Organization: atmel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Alan Stern , Greg Kroah-Hartman CC: Boris Brezillon , "Jean-Christophe Plagniol-Villard" , Alexandre Belloni , Felipe Balbi , , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , , , , Douglas Gilbert , Robert Nelson Subject: Re: [PATCH 1/5] USB: ehci-atmel: rework clk handling References: In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 17/03/2015 20:01, Alan Stern a écrit : > On Tue, 17 Mar 2015, Boris Brezillon wrote: > >> The EHCI IP only needs the UTMI/UPLL (uclk) and the peripheral (iclk) >> clocks to work properly. Remove the useless system clock (fclk). >> >> Avoid calling set_rate on the fixed rate UTMI/IPLL clock and remove >> useless IS_ENABLED(CONFIG_COMMON_CLK) tests (all at91 platforms have been >> moved to the CCF). >> >> This patch also fixes a bug introduced by 3440ef1 (ARM: at91/dt: fix USB >> high-speed clock to select UTMI), which was leaving the usb clock >> uninitialized and preventing the OHCI driver from setting the usb clock >> rate to 48MHz. >> This bug was caused by several things: >> 1/ usb clock drivers set the CLK_SET_RATE_GATE flag, which means the rate >> cannot be changed once the clock is prepared >> 2/ The EHCI driver was retrieving and preparing/enabling the uhpck >> clock which was in turn preparing its parent clock (the usb clock), >> thus preventing any rate change because of 1/ >> >> Signed-off-by: Boris Brezillon > > Acked-by: Alan Stern Acked-by: Nicolas Ferre and: Fixes: 3440ef169100 ("ARM: at91/dt: fix USB high-speed clock to select UTMI") Alan, Greg, Can you please take this patch (only this patch 1/5 of the series) as a fix for the 4.0-rc? It would solve the issue that we see on at91sam9x5/at91sam9n12. I'll take care of the rest of the series for 4.1. If you want me to take it of to re-send the patch, tell me. Thanks, bye, -- Nicolas Ferre