[PATCH v5 13/17] clk: at91: add PMC usb clock

2013-10-17 Thread Boris BREZILLON
This patch adds new at91 usb clock implementation using common clk framework. This clock is used to clock usb ports (ohci, ehci and udc). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig | 11 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk

[PATCH] USB: ehci-atmel: add usb_clk for transition to CCF

2013-10-18 Thread Boris BREZILLON
/clock.c, but will be bypassed when moving to common clk framework. This patch adds support for usb clock retrieval and configuration only if CCF is enabled (CONFIG_COMMON_CLK). Signed-off-by: Boris BREZILLON --- drivers/usb/host/ehci-atmel.c | 16 +++- 1 file changed, 15 insertions

Re: [PATCH] USB: ehci-atmel: add usb_clk for transition to CCF

2013-10-18 Thread boris brezillon
Hello Nicolas, This patch should fix the bug you were seeing with USB device enumaration after moving to CCF. Tell me if this solves the issue (it worked for me). Best Regards, Boris On 18/10/2013 21:26, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides a USB clock

[PATCH v5 02/17] ARM: at91: add Kconfig options for common clk support

2013-11-12 Thread Boris BREZILLON
w clk implementation. These SoCs won't setup the register_clocks callback (clk registration is done using of_clk_init). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig| 21 + arch/arm/mach-at91/Kconfig.non_dt |6 ++ arc

[PATCH v5 01/17] ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h

2013-11-12 Thread Boris BREZILLON
This patch moves at91_pmc.h header from machine specific directory (arch/arm/mach-at91/include/mach/at91_pmc.h) to clk include directory (include/linux/clk/at91_pmc.h). We need this to avoid reference to machine specific headers in clk drivers. Signed-off-by: Boris BREZILLON Acked-by: Felipe

[PATCH v5 00/17] ARM: at91: move to common clk framework

2013-11-12 Thread Boris BREZILLON
of the system clock interfaces (no need to define a parent clock, system clock is a gate with no rate info) - change system, peripheral and programmable clk dt bindings (1 master node and multiple child nodes each defining a system/peripheral or prog clock) - fix bugs in sama5 dt definition

[PATCH v5 03/17] clk: at91: add PMC base support

2013-11-12 Thread Boris BREZILLON
matching the definitions in pmc_clk_ids). This patch copies at91_pmc_base (memory mapping) and at91sam9_idle (function) from arch/arm/mach-at91/clock.c (which is not compiled if COMMON_CLK_AT91 is enabled). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/Makefile |1

[PATCH v5 04/17] clk: at91: add PMC macro file for dt definitions

2013-11-12 Thread Boris BREZILLON
This patch adds a new macro file for PMC macros. This macro file includes the definitions of SR (status register) bit offsets and will be use to reference PMC irqs. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- include/dt-bindings/clk/at91.h | 22 ++ 1 file

[PATCH v5 06/17] clk: at91: add PMC pll clocks

2013-11-12 Thread Boris BREZILLON
Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/at91/Makefile |2 +- drivers/clk/at91/clk-pll.c| 540 + drivers/clk/at91/clk-plldiv.c | 137 +++ drivers/clk/at91/pmc.c| 21 ++ drivers/clk/at91/pmc.

[PATCH v5 07/17] clk: at91: add PMC master clock

2013-11-12 Thread Boris BREZILLON
checked during rate change to avoid over/underclocking. These characteristics are described in atmel's SoC datasheet in "Electrical Characteristics" paragraph. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/at91/Makefile |2 +- drivers/clk/at

[PATCH v5 05/17] clk: at91: add PMC main clock

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 main oscillator clock implementation using common clk framework. If rate is not provided during clock registration it is calculated using the slow clock (main clk parent in this case) rate and MCFR register. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre

[PATCH v5 08/17] clk: at91: add PMC system clocks

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 system clock implementation using common clk framework. Some peripherals need to enable a "system" clock in order to work properly. Each system clock is given an id based on the bit position in SCER/SCDR registers. Signed-off-by: Boris BREZILLON Acked-by: Nic

[PATCH v5 09/17] clk: at91: add PMC peripheral clocks

2013-11-12 Thread Boris BREZILLON
ed to define and reference peripheral clocks. Some new SoCs (at91sam9x5 and sama5d3) provide a new register (PCR) where you can configure the peripheral clock as a division of the master clock. This will help reducing the peripherals power comsumption. Signed-off-by: Boris BREZILLON Acked-by: Ni

[PATCH v5 10/17] clk: at91: add peripheral clk macros for peripheral clk dt bindings

2013-11-12 Thread Boris BREZILLON
This patch adds the peripheral divisors macros (for sam9x5 compatible IPs) which will be used by peripheral clk dt definitions. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- include/dt-bindings/clk/at91.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/include/dt

[PATCH v5 11/17] clk: at91: add PMC programmable clocks

2013-11-12 Thread Boris BREZILLON
(see atmel's datasheets). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/at91/Makefile |2 + drivers/clk/at91/clk-programmable.c | 368 +++ drivers/clk/at91/pmc.c | 15 ++ drivers/clk/at91/pmc.h |

[PATCH v5 12/17] clk: at91: add PMC utmi clock

2013-11-12 Thread Boris BREZILLON
This adds new at91 utmi clock implementation using common clk framework. This clock is a pll with a fixed factor (x40). It is used as a source for usb clock. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig |7 ++ drivers/clk/at91/Makefile |1

[PATCH v5 13/17] clk: at91: add PMC usb clock

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 usb clock implementation using common clk framework. This clock is used to clock usb ports (ohci, ehci and udc). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig | 11 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk

[PATCH v5 14/17] clk: at91: add PMC smd clock

2013-11-12 Thread Boris BREZILLON
This patch adds at91 smd (Soft Modem) clock implementation using common clk framework. Not used by any driver right now. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig |5 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk-smd.c | 173

[PATCH v5 15/17] dt: binding: add at91 clks dt bindings documentation

2013-11-12 Thread Boris BREZILLON
This patch adds new at91 clks dt bindings documentation. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- .../devicetree/bindings/clock/at91-clock.txt | 339 1 file changed, 339 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/at91

[PATCH v5 17/17] ARM: at91: add new compatible strings for pmc driver

2013-11-12 Thread Boris BREZILLON
). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/clock.c |5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 5f02aea..72b2579 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91

[PATCH v5 16/17] ARM: at91: move pit timer to common clk framework

2013-11-12 Thread Boris BREZILLON
Use device tree to get the source clock of the PIT (Periodic Interval Timer). If the clock is not found in device tree (or dt is not enabled) we'll try to get it using clk_lookup definitions. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam926x_t

Re: [PATCH v5 06/17] clk: at91: add PMC pll clocks

2013-11-28 Thread boris brezillon
Hi Mike, On 27/11/2013 22:48, Mike Turquette wrote: Quoting Boris BREZILLON (2013-11-12 13:57:19) +static const struct clk_ops pll_ops = { + .prepare = clk_pll_prepare, + .is_prepared = clk_pll_is_ready, + .disable = clk_pll_disable, + .is_enabled = clk_pll_is_ready

[PATCH v6 07/16] clk: at91: add PMC master clock

2013-11-28 Thread Boris BREZILLON
checked during rate change to avoid over/underclocking. These characteristics are described in atmel's SoC datasheet in "Electrical Characteristics" paragraph. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/at91/Makefile |2 +- drivers/clk/at

[PATCH v6 00/16] ARM: at91: move to common clk framework

2013-11-28 Thread Boris BREZILLON
er node and multiple child nodes each defining a system/peripheral or prog clock) - fix bugs in sama5 dt definition Boris BREZILLON (16): ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h ARM: at91: add Kconfig options for common clk support clk: at91: add PMC base support clk: a

[PATCH v6 06/16] clk: at91: add PMC pll clocks

2013-11-28 Thread Boris BREZILLON
Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/at91/Makefile |2 +- drivers/clk/at91/clk-pll.c| 537 + drivers/clk/at91/clk-plldiv.c | 135 +++ drivers/clk/at91/pmc.c| 21 ++ drivers/clk/at91/pmc.

[PATCH v6 05/16] clk: at91: add PMC main clock

2013-11-28 Thread Boris BREZILLON
This patch adds new at91 main oscillator clock implementation using common clk framework. If rate is not provided during clock registration it is calculated using the slow clock (main clk parent in this case) rate and MCFR register. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre

[PATCH v6 03/16] clk: at91: add PMC base support

2013-11-28 Thread Boris BREZILLON
matching the definitions in pmc_clk_ids). This patch copies at91_pmc_base (memory mapping) and at91sam9_idle (function) from arch/arm/mach-at91/clock.c (which is not compiled if COMMON_CLK_AT91 is enabled). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/Makefile |1

[PATCH v6 01/16] ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h

2013-11-28 Thread Boris BREZILLON
This patch moves at91_pmc.h header from machine specific directory (arch/arm/mach-at91/include/mach/at91_pmc.h) to clk include directory (include/linux/clk/at91_pmc.h). We need this to avoid reference to machine specific headers in clk drivers. Signed-off-by: Boris BREZILLON Acked-by: Felipe

[PATCH v6 08/16] clk: at91: add PMC system clocks

2013-11-28 Thread Boris BREZILLON
This patch adds new at91 system clock implementation using common clk framework. Some peripherals need to enable a "system" clock in order to work properly. Each system clock is given an id based on the bit position in SCER/SCDR registers. Signed-off-by: Boris BREZILLON Acked-by: Nic

[PATCH v6 09/16] clk: at91: add PMC peripheral clocks

2013-11-28 Thread Boris BREZILLON
ed to define and reference peripheral clocks. Some new SoCs (at91sam9x5 and sama5d3) provide a new register (PCR) where you can configure the peripheral clock as a division of the master clock. This will help reducing the peripherals power comsumption. Signed-off-by: Boris BREZILLON Acked-by: Ni

[PATCH v6 02/16] ARM: at91: add Kconfig options for common clk support

2013-11-28 Thread Boris BREZILLON
w clk implementation. These SoCs won't setup the register_clocks callback (clk registration is done using of_clk_init). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig| 21 + arch/arm/mach-at91/Kconfig.non_dt |6 ++ arc

[PATCH v6 11/16] clk: at91: add PMC utmi clock

2013-11-28 Thread Boris BREZILLON
This adds new at91 utmi clock implementation using common clk framework. This clock is a pll with a fixed factor (x40). It is used as a source for usb clock. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig |7 ++ drivers/clk/at91/Makefile |1

[PATCH v6 10/16] clk: at91: add PMC programmable clocks

2013-11-28 Thread Boris BREZILLON
(see atmel's datasheets). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/clk/at91/Makefile |2 + drivers/clk/at91/clk-programmable.c | 366 +++ drivers/clk/at91/pmc.c | 15 ++ drivers/clk/at91/pmc.h |

[PATCH v6 12/16] clk: at91: add PMC usb clock

2013-11-28 Thread Boris BREZILLON
This patch adds new at91 usb clock implementation using common clk framework. This clock is used to clock usb ports (ohci, ehci and udc). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig | 11 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk

[PATCH v6 15/16] ARM: at91: move pit timer to common clk framework

2013-11-28 Thread Boris BREZILLON
Use device tree to get the source clock of the PIT (Periodic Interval Timer). If the clock is not found in device tree (or dt is not enabled) we'll try to get it using clk_lookup definitions. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam926x_t

[PATCH v6 16/16] ARM: at91: add new compatible strings for pmc driver

2013-11-28 Thread Boris BREZILLON
). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/clock.c |5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 5f02aea..72b2579 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91

[PATCH v6 14/16] dt: binding: add at91 clks dt bindings documentation

2013-11-28 Thread Boris BREZILLON
This patch adds new at91 clks dt bindings documentation. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- .../devicetree/bindings/clock/at91-clock.txt | 339 1 file changed, 339 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/at91

[PATCH v6 13/16] clk: at91: add PMC smd clock

2013-11-28 Thread Boris BREZILLON
This patch adds at91 smd (Soft Modem) clock implementation using common clk framework. Not used by any driver right now. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/Kconfig |5 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk-smd.c | 171

[PATCH v6 04/16] clk: at91: add PMC macro file for dt definitions

2013-11-28 Thread Boris BREZILLON
This patch adds a new macro file for PMC macros. This macro file includes the definitions of SR (status register) bit offsets and will be use to reference PMC irqs. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- include/dt-bindings/clk/at91.h | 22 ++ 1 file

Re: [PATCH v6 00/16] ARM: at91: move to common clk framework

2013-12-02 Thread boris brezillon
Hi Mike, Le 01/12/2013 00:05, Mike Turquette a écrit : Quoting Boris BREZILLON (2013-11-28 04:36:24) Hello, This patch series is the 5th version of the at91 clk implementations using the Common Clk Framework. Oops, I just replied to v5 of this series. Thanks for the fixes. Which tree do you

Re: [PATCH v6 00/16] ARM: at91: move to common clk framework

2013-12-02 Thread boris brezillon
On 02/12/2013 12:43, boris brezillon wrote: Hi Mike, Le 01/12/2013 00:05, Mike Turquette a écrit : Quoting Boris BREZILLON (2013-11-28 04:36:24) Hello, This patch series is the 5th version of the at91 clk implementations using the Common Clk Framework. Oops, I just replied to v5 of this

[PATCH 3/3] usb: ohci-at91: use device managed clk retrieval

2013-12-03 Thread Boris BREZILLON
Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON Tested-by: Robert Nelson --- drivers/usb/host/ohci-at91.c | 32 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci

[PATCH 2/3] usb: ohci-at91: replace request_mem_region + ioremap by devm_request_and_ioremap

2013-12-03 Thread Boris BREZILLON
Replace the request_mem_region + ioremap calls by the devm_request_and_ioremap call which does the same things but with device managed resources. Signed-off-by: Boris BREZILLON Tested-by: Robert Nelson --- drivers/usb/host/ohci-at91.c | 24 +--- 1 file changed, 5

[PATCH 1/3] usb: ohci-at91: fix irq and iomem resource retrieval

2013-12-03 Thread Boris BREZILLON
-by: Boris BREZILLON Tested-by: Robert Nelson --- drivers/usb/host/ohci-at91.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 418444e..7aec6ca 100644 --- a/drivers/usb/host/ohci-at91.c

[PATCH 0/3] usb: ohci-at91: various fixes and improvements

2013-12-03 Thread Boris BREZILLON
, Boris Boris BREZILLON (3): usb: ohci-at91: fix irq and iomem resource retrieval usb: ohci-at91: replace request_mem_region + ioremap by devm_request_and_ioremap usb: ohci-at91: use device managed clk retrieval drivers/usb/host/ohci-at91.c | 75

Re: [PATCH 3/3] usb: ohci-at91: use device managed clk retrieval

2013-12-03 Thread boris brezillon
Hello Sergei, On 03/12/2013 19:01, Sergei Shtylyov wrote: Hello. On 12/03/2013 05:07 PM, Boris BREZILLON wrote: Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON Tested-by: Robert Nelson --- drivers/usb/host/ohci-at91.c | 32

[PATCH v2 1/4] usb: ohci-at91: fix irq and iomem resource retrieval

2013-12-03 Thread Boris BREZILLON
-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/usb/host/ohci-at91.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 418444e..7aec6ca 100644 --- a/drivers/usb/host/ohci-at91.c

linux-usb@vger.kernel.org

2013-12-03 Thread Boris BREZILLON
Make use of the dev variable instead of referencing the dev field of the pdev struct. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/usb/host/ohci-at91.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b

[PATCH v2 4/4] usb: ohci-at91: use device managed clk retrieval

2013-12-03 Thread Boris BREZILLON
Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/usb/host/ohci-at91.c | 30 +++--- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91

[PATCH v2 2/4] usb: ohci-at91: replace request_mem_region + ioremap by devm_request_and_ioremap

2013-12-03 Thread Boris BREZILLON
Replace the request_mem_region + ioremap calls by the devm_request_and_ioremap call which does the same things but with device managed resources. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- drivers/usb/host/ohci-at91.c | 24 +--- 1 file changed, 5

[PATCH v2 0/4] usb: ohci-at91: various fixes and improvements

2013-12-03 Thread Boris BREZILLON
, Boris Changes since v1: - split PATCH 3 in 2 different patches: one to remove references to &pdev->dev, the other to make use of devm_clk_get - replace forgotten &pdev->dev references in usb_hcd_at91_probe Boris BREZILLON (4): usb: ohci-at91: fix irq and iomem resource r

Re: [PATCH 3/3] usb: ohci-at91: use device managed clk retrieval

2013-12-04 Thread boris brezillon
Hello Alan, On 03/12/2013 16:32, Alan Stern wrote: On Tue, 3 Dec 2013, Nicolas Ferre wrote: On 03/12/2013 15:07, Boris BREZILLON : Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON Tested-by: Robert Nelson Acked-by: Nicolas Ferre Thanks Boris for these fixes

[PATCH v3] usb: ohci-at91: fix irq and iomem resource retrieval

2013-12-05 Thread Boris BREZILLON
-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- Changes since v2: - split the patch series to isolate the urgent fix provided by this patch Changes since v1: - none drivers/usb/host/ohci-at91.c | 19 +++ 1 file changed, 11 insertions(+), 8

[PATCH v3 0/3] usb: ohci-at91: various improvements

2013-12-05 Thread Boris BREZILLON
Hello, This patch series moves the different driver resources (clks and iomem) retrieval to the device managed versions (devm_ functions). Best Regards, Boris Changes since v2: - split urgent fix and resource retrieval improvements Boris BREZILLON (3): usb: ohci-at91: replace

[PATCH v3 1/3] usb: ohci-at91: replace request_mem_region + ioremap by devm_request_and_ioremap

2013-12-05 Thread Boris BREZILLON
Replace the request_mem_region + ioremap calls by the devm_request_and_ioremap call which does the same things but with device managed resources. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 24

linux-usb@vger.kernel.org

2013-12-05 Thread Boris BREZILLON
Make use of the dev variable instead of referencing the dev field of the pdev struct. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a

[PATCH v3 3/3] usb: ohci-at91: use device managed clk retrieval

2013-12-05 Thread Boris BREZILLON
Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 30 +++--- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b

[PATCH v4 0/3] usb: ohci-at91: various improvements

2013-12-08 Thread Boris BREZILLON
retrieval improvements Boris BREZILLON (3): usb: ohci-at91: replace request_mem_region + ioremap by devm_ioremap_resource usb: ohci-at91: use dev variable instead of &pdev->dev usb: ohci-at91: use device managed clk retrieval drivers/usb/host/ohci-at91.c

[PATCH v4 1/3] usb: ohci-at91: replace request_mem_region + ioremap by devm_ioremap_resource

2013-12-08 Thread Boris BREZILLON
Replace the request_mem_region + ioremap calls by the devm_ioremap_resource call which does the same things but with device managed resources. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 28

linux-usb@vger.kernel.org

2013-12-08 Thread Boris BREZILLON
Make use of the dev variable instead of referencing the dev field of the pdev struct. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a

[PATCH v4 3/3] usb: ohci-at91: use device managed clk retrieval

2013-12-08 Thread Boris BREZILLON
Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 30 +++--- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b

[PATCH v4] usb: ohci-at91: fix irq and iomem resource retrieval

2013-12-08 Thread Boris BREZILLON
mismatch. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern Reviewed-by: Tomasz Figa --- Changes since v3: - replace platform_get_resource call with IORESOURCE_IRQ argument by platform_get_irq Changes since v2: - split the patch series to isolate the urgent fix

Re: [PATCH v4 1/3] usb: ohci-at91: replace request_mem_region + ioremap by devm_ioremap_resource

2013-12-08 Thread boris brezillon
Hello, Le 08/12/2013 19:31, Sergei Shtylyov a écrit : Hello. On 12/08/2013 06:02 PM, Boris BREZILLON wrote: Replace the request_mem_region + ioremap calls by the devm_ioremap_resource call which does the same things but with device managed resources. Signed-off-by: Boris BREZILLON Acked

linux-usb@vger.kernel.org

2013-12-09 Thread Boris BREZILLON
Make use of the dev variable instead of referencing the dev field of the pdev struct. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a

[PATCH v5 1/3] usb: ohci-at91: replace request_mem_region + ioremap by devm_ioremap_resource

2013-12-09 Thread Boris BREZILLON
Replace the request_mem_region + ioremap calls by the devm_ioremap_resource call which does the same things but with device managed resources. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 27

[PATCH v5 3/3] usb: ohci-at91: use device managed clk retrieval

2013-12-09 Thread Boris BREZILLON
Replace clk_get calls by devm_clk_get calls. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre Signed-off-by: Alan Stern --- drivers/usb/host/ohci-at91.c | 30 +++--- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b

[PATCH v5 0/3] usb: ohci-at91: various improvements

2013-12-09 Thread Boris BREZILLON
this function) Changes since v3: - replace devm_request_and_ioremap call by devm_ioremap_resource Changes since v2: - split urgent fix and resource retrieval improvements Boris BREZILLON (3): usb: ohci-at91: replace request_mem_region + ioremap by devm_ioremap_resource usb: ohci-at91: use

Re: [PATCH v4] usb: ohci-at91: fix irq and iomem resource retrieval

2013-12-17 Thread boris brezillon
platforms. Best Regards, Boris On 08/12/2013 15:59, Boris BREZILLON wrote: When using dt resources retrieval (interrupts and reg properties) there is no predefined order for these resources in the platform dev resources table. Retrieve resources using platform_get_resource and platform_get_irq

Re: [PATCH] usb: gadget: at91_udc: add usb_clk for transition to common clk framework

2013-08-12 Thread boris brezillon
Hello Nicolas, On 12/08/2013 15:52, Nicolas Ferre wrote: On 01/08/2013 08:18, Boris BREZILLON : The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz

Re: [PATCH] usb: gadget: at91_udc: add usb_clk for transition to common clk framework

2013-08-12 Thread boris brezillon
Hello Felipe On 12/08/2013 20:08, Felipe Balbi wrote: On Mon, Aug 12, 2013 at 03:52:01PM +0200, Nicolas Ferre wrote: On 01/08/2013 08:18, Boris BREZILLON : The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The

[PATCH v4 00/17] ARM: at91: move to common clk framework

2013-10-11 Thread Boris BREZILLON
interfaces (no need to define a parent clock, system clock is a gate with no rate info) - change system, peripheral and programmable clk dt bindings (1 master node and multiple child nodes each defining a system/peripheral or prog clock) - fix bugs in sama5 dt definition Boris BREZILLON (17

[PATCH v4 02/17] ARM: at91: add Kconfig options for common clk support

2013-10-11 Thread Boris BREZILLON
w clk implementation. These SoCs won't setup the register_clocks callback (clk registration is done using of_clk_init). Signed-off-by: Boris BREZILLON --- arch/arm/mach-at91/Kconfig| 21 + arch/arm/mach-at91/Kconfig.non_dt |6 ++ arch/arm/mach-at9

[PATCH v4 01/17] ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h

2013-10-11 Thread Boris BREZILLON
This patch moves at91_pmc.h header from machine specific directory (arch/arm/mach-at91/include/mach/at91_pmc.h) to clk include directory (include/linux/clk/at91_pmc.h). We need this to avoid reference to machine specific headers in clk drivers. Signed-off-by: Boris BREZILLON --- arch/arm/mach

[PATCH v4 03/17] clk: at91: add PMC base support

2013-10-11 Thread Boris BREZILLON
matching the definitions in pmc_clk_ids). This patch copies at91_pmc_base (memory mapping) and at91sam9_idle (function) from arch/arm/mach-at91/clock.c (which is not compiled if COMMON_CLK_AT91 is enabled). Signed-off-by: Boris BREZILLON --- drivers/clk/Makefile |1 + drivers/clk/at91

[PATCH v4 06/17] clk: at91: add PMC pll clocks

2013-10-11 Thread Boris BREZILLON
Signed-off-by: Boris BREZILLON --- drivers/clk/at91/Makefile |2 +- drivers/clk/at91/clk-pll.c| 545 + drivers/clk/at91/clk-plldiv.c | 137 +++ drivers/clk/at91/pmc.c| 21 ++ drivers/clk/at91/pmc.h| 11 + in

[PATCH v4 07/17] clk: at91: add PMC master clock

2013-10-11 Thread Boris BREZILLON
checked during rate change to avoid over/underclocking. These characteristics are described in atmel's SoC datasheet in "Electrical Characteristics" paragraph. Signed-off-by: Boris BREZILLON --- drivers/clk/at91/Makefile |2 +- drivers/clk/at91/clk-

[PATCH v4 04/17] clk: at91: add PMC macro file for dt definitions

2013-10-11 Thread Boris BREZILLON
This patch adds a new macro file for PMC macros. This macro file includes the definitions of SR (status register) bit offsets and will be use to reference PMC irqs. Signed-off-by: Boris BREZILLON --- include/dt-bindings/clk/at91.h | 22 ++ 1 file changed, 22 insertions

[PATCH v4 09/17] clk: at91: add PMC peripheral clocks

2013-10-11 Thread Boris BREZILLON
ed to define and reference peripheral clocks. Some new SoCs (at91sam9x5 and sama5d3) provide a new register (PCR) where you can configure the peripheral clock as a division of the master clock. This will help reducing the peripherals power comsumption. Signed-off-by: Boris BREZILLON --- drivers/clk

[PATCH v4 08/17] clk: at91: add PMC system clocks

2013-10-11 Thread Boris BREZILLON
This patch adds new at91 system clock implementation using common clk framework. Some peripherals need to enable a "system" clock in order to work properly. Each system clock is given an id based on the bit position in SCER/SCDR registers. Signed-off-by: Boris BREZILLON --- driver

[PATCH v4 10/17] clk: at91: add peripheral clk macros for peripheral clk dt bindings

2013-10-11 Thread Boris BREZILLON
This patch adds the peripheral divisors macros (for sam9x5 compatible IPs) which will be used by peripheral clk dt definitions. Signed-off-by: Boris BREZILLON --- include/dt-bindings/clk/at91.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/include/dt-bindings/clk/at91.h b/include

[PATCH v4 11/17] clk: at91: add PMC programmable clocks

2013-10-11 Thread Boris BREZILLON
(see atmel's datasheets). Signed-off-by: Boris BREZILLON --- drivers/clk/at91/Makefile |2 + drivers/clk/at91/clk-programmable.c | 423 +++ drivers/clk/at91/pmc.c | 15 ++ drivers/clk/at91/pmc.h |9 + 4 files ch

[PATCH v4 12/17] clk: at91: add PMC utmi clock

2013-10-11 Thread Boris BREZILLON
This adds new at91 utmi clock implementation using common clk framework. This clock is a pll with a fixed factor (x40). It is used as a source for usb clock. Signed-off-by: Boris BREZILLON --- arch/arm/mach-at91/Kconfig |7 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk

[PATCH v4 05/17] clk: at91: add PMC main clock

2013-10-11 Thread Boris BREZILLON
This patch adds new at91 main oscillator clock implementation using common clk framework. If rate is not provided during clock registration it is calculated using the slow clock (main clk parent in this case) rate and MCFR register. Signed-off-by: Boris BREZILLON --- drivers/clk/at91/Makefile

[PATCH v4 13/17] clk: at91: add PMC usb clock

2013-10-11 Thread Boris BREZILLON
This patch adds new at91 usb clock implementation using common clk framework. This clock is used to clock usb ports (ohci, ehci and udc). Signed-off-by: Boris BREZILLON --- arch/arm/mach-at91/Kconfig | 11 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk-usb.c | 400

[PATCH v4 14/17] clk: at91: add PMC smd clock

2013-10-11 Thread Boris BREZILLON
This patch adds at91 smd (Soft Modem) clock implementation using common clk framework. Not used by any driver right now. Signed-off-by: Boris BREZILLON --- arch/arm/mach-at91/Kconfig |5 ++ drivers/clk/at91/Makefile |1 + drivers/clk/at91/clk-smd.c | 173

[PATCH v4 15/17] clk: at91: add PMC clk device tree binding doc.

2013-10-11 Thread Boris BREZILLON
This patch adds new at91 clks dt bindings documentation. Signed-off-by: Boris BREZILLON --- .../devicetree/bindings/clock/at91-clock.txt | 328 1 file changed, 328 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/at91-clock.txt diff --git a

[PATCH v4 16/17] ARM: at91: move pit timer to common clk framework

2013-10-11 Thread Boris BREZILLON
Use device tree to get the source clock of the PIT (Periodic Interval Timer). If the clock is not found in device tree (or dt is not enabled) we'll try to get it using clk_lookup definitions. Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam926x_t

[PATCH v4 17/17] ARM: at91: add new compatible strings for pmc driver

2013-10-11 Thread Boris BREZILLON
). Signed-off-by: Boris BREZILLON Acked-by: Nicolas Ferre --- arch/arm/mach-at91/clock.c |5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 5f02aea..72b2579 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91

[RFC 01/50] ARM: at91: move arch/arm/mach-at91/include/mach/at91_pmc.h to include/linux/clk/at91.h

2013-06-07 Thread Boris BREZILLON
This patch moves at91_pmc.h header from machine specific directory (arch/arm/mach-at91/include/mach/at91_pmc.h) to clk include directory (include/linux/clk/at91.h). We need this to avoid reference to machine specific headers in clk drivers. Signed-off-by: Boris BREZILLON --- arch/arm/mach

Re: [RFC 00/50] ARM: at91: move to common clk framework

2013-06-07 Thread boris brezillon
On 07/06/2013 11:22, Nicolas Ferre wrote: On 07/06/2013 10:34, Boris BREZILLON : Hello, This patch series is a proposal to move at91 clock implementation to common clk framework. Before discussion begins I would like to give my kudos to you Boris! This is huge work and I thank you for it

[RFC PATCH 01/50] ARM: at91: move at91_pmc.h to include/linux/clk/at91.h

2013-06-07 Thread Boris BREZILLON
This patch moves at91_pmc.h header from machine specific directory (arch/arm/mach-at91/include/mach/at91_pmc.h) to clk include directory (include/linux/clk/at91.h). We need this to avoid reference to machine specific headers in clk drivers. Signed-off-by: Boris BREZILLON --- arch/arm/mach

[RESEND RFC PATCH 00/50] ARM: at91: move to common clk framework

2013-06-07 Thread Boris BREZILLON
using device tree. It compiles for other SoCs and both with and without dt support, but it has not been tested. The clocks rate/parent change has not been tested. Best Regards, Boris Boris BREZILLON (50): ARM: at91: move at91_pmc.h to include/linux/clk/at91.h ARM: at91: add PMC main clock ARM:

[RFC PATCH 32/50] usb: gadget: at91_udc: prepare clk before calling enable

2013-06-07 Thread Boris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON --- drivers/usb/gadget/at91_udc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/at91_udc.c b

[RFC PATCH 34/50] USB: ohci-at91: prepare clk before calling enable

2013-06-07 Thread Boris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON --- drivers/usb/host/ohci-at91.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers

[RFC PATCH 33/50] ehci-atmel.c: prepare clk before calling enable

2013-06-07 Thread Boris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON --- drivers/usb/host/ehci-atmel.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers

Re: [RFC 00/50] ARM: at91: move to common clk framework

2013-06-07 Thread boris brezillon
On 07/06/2013 12:14, Gregory CLEMENT wrote: On 06/07/2013 11:32 AM, boris brezillon wrote: On 07/06/2013 11:22, Nicolas Ferre wrote: On 07/06/2013 10:34, Boris BREZILLON : Hello, This patch series is a proposal to move at91 clock implementation to common clk framework. Before discussion

[PATCH 6/8] ehci-atmel.c: prepare clk before calling enable

2013-06-19 Thread Boris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON --- drivers/usb/host/ehci-atmel.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers

[PATCH 5/8] usb: gadget: at91_udc: prepare clk before calling enable

2013-06-19 Thread Boris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON --- drivers/usb/gadget/at91_udc.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/at91_udc.c b

[PATCH 7/8] USB: ohci-at91: prepare clk before calling enable

2013-06-19 Thread Boris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON --- drivers/usb/host/ohci-at91.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers

[PATCH v2 3/4] usb: gadget: at91_udc: prepare clk before calling enable

2013-06-25 Thread Boris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON --- drivers/usb/gadget/at91_udc.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/at91_udc.c b

  1   2   3   >