summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'imx-common-clk' of git://git.pengutronix.de/git/imx/linux-2.6 ↵Arnd Bergmann2012-05-1146-8147/+3796
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into next/clock Sascha Hauer <s.hauer@pengutronix.de> writes: ARM i.MX common clock framework support Same as with Shawns series this one depends on: git://git.linaro.org/people/mturquette/linux.git clk-next http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm.git clkdev * tag 'imx-common-clk' of git://git.pengutronix.de/git/imx/linux-2.6: (34 commits) ARM i.MX: remove now unused clock files ARM: i.MX6: implement clocks using common clock framework ARM i.MX35: implement clocks using common clock framework ARM i.MX5: implement clocks using common clock framework ARM i.MX31: implement clocks using common clock framework ARM i.MX27: implement clocks using common clock framework ARM i.MX21: implement clocks using common clock framework ARM i.MX1: implement clocks using common clock framework ARM i.MX25: implement clocks using common clock framework ARM: imx: add common clock support for clk busy ARM: imx: add common clock support for pfd ARM i.MX: Add common clock support for 2bit gate ARM: imx: add common clock support for pllv3 ARM i.MX: Add common clock support for pllv2 ARM i.MX: Add common clock support for pllv1 ARM i.MX: prepare for common clock framework ARM i.MX3: Make ccm base address a variable ARM i.MX timer: request correct clock ARM i.MX5: prepare gpc_dvfs_clk rtc: imx dryice: Add missing clk_prepare ... Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * ARM i.MX: remove now unused clock filesSascha Hauer2012-05-098-7958/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: i.MX6: implement clocks using common clock frameworkShawn Guo2012-05-093-1/+441
| | | | | | | | | | | | Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM i.MX35: implement clocks using common clock frameworkSascha Hauer2012-05-093-1/+280
| | | | | | | | | | | | | | This patch also adds the SPDIF baud clock mux and dividers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM i.MX5: implement clocks using common clock frameworkSascha Hauer2012-05-093-1/+468
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM i.MX31: implement clocks using common clock frameworkSascha Hauer2012-05-023-1/+184
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM i.MX27: implement clocks using common clock frameworkSascha Hauer2012-05-023-1/+292
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM i.MX21: implement clocks using common clock frameworkSascha Hauer2012-05-023-1/+188
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM i.MX1: implement clocks using common clock frameworkSascha Hauer2012-05-023-1/+117
| | | | | | | | | | | | | | | | This also changes the DMA clkdev lookup to use the imx-dma driver name and "ahb" as connection ID to request the hclk dma clock. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM i.MX25: implement clocks using common clock frameworkSascha Hauer2012-05-023-1/+250
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * ARM: imx: add common clock support for clk busyShawn Guo2012-05-023-1/+198
| | | | | | | | | | Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: imx: add common clock support for pfdShawn Guo2012-05-023-1/+152
| | | | | | | | Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
| * ARM i.MX: Add common clock support for 2bit gateSascha Hauer2012-05-023-1/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This gate consists of two bits: 0b00: clk disabled 0b01: clk enabled in run mode and disabled in sleep mode 0b11: clk enabled Currently only disabled and enabled are supported. As it's unlikely that we find something like this in another SoC create a i.MX specific clk helper for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: imx: add common clock support for pllv3Shawn Guo2012-05-023-1/+433
| | | | | | | | | | | | This PLL is found on i.MX6 SoCs Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
| * ARM i.MX: Add common clock support for pllv2Sascha Hauer2012-05-023-1/+253
| | | | | | | | | | | | This PLL is found on i.MX51 and i.MX53 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX: Add common clock support for pllv1Sascha Hauer2012-05-023-1/+69
| | | | | | | | | | | | | | The pllv1 is found on i.MX1, i.M25, i.MX27, i.MX31 and i.MX35. Currently only reading the rate is supported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX: prepare for common clock frameworkSascha Hauer2012-04-253-0/+59
| | | | | | | | | | | | | | - Add necessary #ifdefs for CONFIG_COMMON_CLOCK - Add a global spinlock to protect the CCM registers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX3: Make ccm base address a variableSascha Hauer2012-04-253-42/+47
| | | | | | | | | | | | | | Instead of having a cpu_is_* in each ccm register access it is more efficient to make it a variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX timer: request correct clockSascha Hauer2012-04-251-0/+14
| | | | | | | | | | | | | | | | | | | | | | We used to pass the timer clock directly to mxc_timer_init. We should instead request the correct clock. This is an intermediate step: For now we request the clock in the timer code when NULL is passed as clock. Also, the gpt on some i.MX have an additional ipg clock which can be gated. Request and enable this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX5: prepare gpc_dvfs_clkSascha Hauer2012-04-251-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rtc: imx dryice: Add missing clk_prepareSascha Hauer2012-04-251-3/+3
| | | | | | | | | | | | prepare the clock before enabling it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * dmaengine i.MX ipu: clk_prepare/unprepare clockSascha Hauer2012-04-251-3/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * media mx3 camera: prepare clk before enabling itSascha Hauer2012-04-251-2/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * watchdog imx2: prepare clk before enabling itSascha Hauer2012-04-251-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * w1 i.MX: prepare/unprepare clockSascha Hauer2012-04-251-2/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB ehci mxc: sanitize clock handlingSascha Hauer2012-04-251-32/+24
| | | | | | | | | | | | | | | | Every i.MX ehci controller has a ahb and a ipg clock, so request it on every SoC. Do not make a special case for the usb phy clock of the i.MX51. Just request it but make it optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * USB ehci mxc: prepare/unprepare clockSascha Hauer2012-04-251-9/+9
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd mxc_nand: prepare/unprepare clockSascha Hauer2012-04-251-3/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial i.MX: do not depend on grouped clocksSascha Hauer2012-04-251-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current i.MX clock support groups together unrelated clocks to a single clock which is then used by the driver. This can't be accomplished with the generic clock framework so we instead request the individual clocks in the driver. For i.MX there are generally three different clocks: ipg: bus clock (needed to access registers) ahb: dma relevant clock, sometimes referred to as hclk in the datasheet per: bit clock, pixel clock This patch changes the driver to request the individual clocks. Currently all clk_get will get the same clock until the SoCs are converted to the generic clock framework Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mmc sdhc i.MX: do not depend on grouped clocksSascha Hauer2012-04-251-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current i.MX clock support groups together unrelated clocks to a single clock which is then used by the driver. This can't be accomplished with the generic clock framework so we instead request the individual clocks in the driver. For i.MX there are generally three different clocks: ipg: bus clock (needed to access registers) ahb: dma relevant clock, sometimes referred to as hclk in the datasheet per: bit clock, pixel clock This patch changes the driver to request the individual clocks. Currently all clk_get will get the same clock until the SoCs are converted to the generic clock framework Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mmc mxcmmc: do not depend on grouped clocksSascha Hauer2012-04-251-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current i.MX clock support groups together unrelated clocks to a single clock which is then used by the driver. This can't be accomplished with the generic clock framework so we instead request the individual clocks in the driver. For i.MX there are generally three different clocks: ipg: bus clock (needed to access registers) ahb: dma relevant clock, sometimes referred to as hclk in the datasheet per: bit clock, pixel clock This patch changes the driver to request the individual clocks. Currently all clk_get will get the same clock until the SoCs are converted to the generic clock framework Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net fec: do not depend on grouped clocksSascha Hauer2012-04-251-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current i.MX clock support groups together unrelated clocks to a single clock which is then used by the driver. This can't be accomplished with the generic clock framework so we instead request the individual clocks in the driver. For i.MX there are generally three different clocks: ipg: bus clock (needed to access registers) ahb: dma relevant clock, sometimes referred to as hclk in the datasheet per: bit clock, pixel clock This patch changes the driver to request the individual clocks. Currently all clk_get will get the same clock until the SoCs are converted to the generic clock framework Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video imxfb: do not depend on grouped clocksSascha Hauer2012-04-251-15/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current i.MX clock support groups together unrelated clocks to a single clock which is then used by the driver. This can't be accomplished with the generic clock framework so we instead request the individual clocks in the driver. For i.MX there are generally three different clocks: ipg: bus clock (needed to access registers) ahb: dma relevant clock, sometimes referred to as hclk in the datasheet per: bit clock, pixel clock This patch changes the driver to request the individual clocks. Currently all clk_get will get the same clock until the SoCs are converted to the generic clock framework Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * spi i.MX: do not depend on grouped clocksSascha Hauer2012-04-251-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current i.MX clock support groups together unrelated clocks to a single clock which is then used by the driver. This can't be accomplished with the generic clock framework so we instead request the individual clocks in the driver. For i.MX there are generally three different clocks: ipg: bus clock (needed to access registers) ahb: dma relevant clock, sometimes referred to as hclk in the datasheet per: bit clock, pixel clock This patch changes the driver to request the individual clocks. Currently all clk_get will get the same clock until the SoCs are converted to the generic clock framework Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * dmaengine i.MX SDMA: do not depend on grouped clocksSascha Hauer2012-04-251-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current i.MX clock support groups together unrelated clocks to a single clock which is then used by the driver. This can't be accomplished with the generic clock framework so we instead request the individual clocks in the driver. For i.MX there are generally three different clocks: ipg: bus clock (needed to access registers) ahb: dma relevant clock, sometimes referred to as hclk in the datasheet per: bit clock, pixel clock This patch changes the driver to request the individual clocks. Currently all clk_get will get the same clock until the SoCs are converted to the generic clock framework Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'depends/rmk/clkdev' into next/clockArnd Bergmann2012-05-114-10/+171
|\ \ | | | | | | | | | | | | | | | | | | * depends/rmk/clkdev: CLKDEV: provide helpers for common clock framework ARM: 7392/1: CLKDEV: Optimize clk_find() ARM: 7376/1: clkdev: Implement managed clk_get()
| * | CLKDEV: provide helpers for common clock frameworkRussell King2012-05-022-6/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The common clock framework allocates clocks dynamically. Provide a set of helpers to streamline the clkdev registration of the clock lookups to avoid repetitive code sequences. Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | ARM: 7392/1: CLKDEV: Optimize clk_find()viresh kumar2012-04-191-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clk_find must return as soon as it gets the correct clock. Currently it check all clocks until it found a lookup with both dev_id and con_id matching. If only one of them is passed, then we don't actually need to wait for both of them to match. We can quit as soon as the requested id (dev_id or con_id) matches. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | ARM: 7376/1: clkdev: Implement managed clk_get()Mark Brown2012-04-193-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | Allow clk API users to simplify their cleanup paths by providing a managed version of clk_get() and clk_put(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | Merge branch 'depends/clk/clk-next' into next/clockArnd Bergmann2012-05-1112-323/+537
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mike Turquette <mturquette@ti.com> has asked me to take the clock changes through the arm-soc tree while there are still so many inderdependencies, so this is the entire branch. * depends/clk/clk-next: (30 commits) clk: add a fixed factor clock clk: mux: assign init data clk: remove COMMON_CLK_DISABLE_UNUSED clk: prevent spurious parent rate propagation MAINTAINERS: add entry for common clk framework clk: clk_set_rate() must fail if CLK_SET_RATE_GATE is set and clk is enabled clk: Use a separate struct for holding init data. clk: constify parent name arrays in macros clk: remove trailing whitespace from clk.h clk: select CLKDEV_LOOKUP for COMMON_CLK clk: Don't set clk->new_rate twice clk: clk-private: Add DEFINE_CLK macro clk: clk-gate: Create clk_gate_endisable() clk: Fix typo in comment clk: propagate round_rate for CLK_SET_RATE_PARENT case clk: pass parent_rate into .set_rate clk: always pass parent_rate into .round_rate clk: basic: improve parent_names & return errors clk: core: copy parent_names & return error codes clk: Constify parent name arrays ... Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | clk: add a fixed factor clockSascha Hauer2012-05-084-1/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having fixed factors/dividers in hardware is a common pattern, so add a basic clock type doing this. It basically describes a fixed factor clock using a nominator and a denominator. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> [mturquette@linaro.org: constify parent_names in static init macro] [mturquette@linaro.org: copy/paste bug from mux in static init macro] [mturquette@linaro.org: fix error handling in clk_register_fixed_factor] [mturquette@linaro.org: improve division accuracy; thanks to Saravana] Signed-off-by: Mike Turquette <mturquette@linaro.org>
| * | clk: mux: assign init dataMike Turquette2012-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The original conversion to struct clk_hw_init failed to add the pointer assignment in clk_register_mux. Signed-off-by: Mike Turquette <mturquette@linaro.org> Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: remove COMMON_CLK_DISABLE_UNUSEDMike Turquette2012-05-082-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | Exposing this option generates confusion and incorrect behavior for single-image builds across platforms. Enable this behavior permanently. Signed-off-by: Mike Turquette <mturquette@linaro.org> Acked-by: Saravana Kannan <skannan@codeaurora.org>
| * | clk: prevent spurious parent rate propagationMike Turquette2012-05-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch 'clk: always pass parent_rate into .round_rate' made a subtle change to the semantics of .round_rate. It is now expected for the parent's rate to always be passed in, simplifying the implemenation of various .round_rate callback definitions. However the patch also introduced a bug in clk_calc_new_rates whereby a clock without the CLK_SET_RATE_PARENT flag set could still propagate a rate change up to a parent clock if the the .round_rate callback modified the &best_parent_rate value in any way. This patch fixes the issue at the framework level (in clk_calc_new_rates) by specifically handling the case where the CLK_SET_RATE_PARENT flag is not set. Signed-off-by: Mike Turquette <mturquette@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | MAINTAINERS: add entry for common clk frameworkMike Turquette2012-05-061-0/+10
| | | | | | | | | | | | Signed-off-by: Mike Turquette <mturquette@linaro.org>
| * | clk: clk_set_rate() must fail if CLK_SET_RATE_GATE is set and clk is enabledViresh Kumar2012-05-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This is well documented but isn't implemented. clk_set_rate() must check if flags have CLK_SET_RATE_GATE bit set and is enabled too. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
| * | clk: Use a separate struct for holding init data.Saravana Kannan2012-05-017-74/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a struct clk_init_data to hold all data that needs to be passed from the platfrom specific driver to the common clock framework during clock registration. Add a pointer to this struct inside clk_hw. This has several advantages: * Completely hides struct clk from many clock platform drivers and static clock initialization code that don't care for static initialization of the struct clks. * For platforms that want to do complete static initialization, it removed the need to directly mess with the struct clk's fields while still allowing to statically allocate struct clk. This keeps the code more future proof even if they include clk-private.h. * Simplifies the generic clk_register() function and allows adding optional fields in the future without modifying the function signature. * Simplifies the static initialization of clocks on all platforms by removing the need for forward delcarations or convoluted macros. Signed-off-by: Saravana Kannan <skannan@codeaurora.org> [mturquette@linaro.org: kept DEFINE_CLK_* macros and __clk_init] Signed-off-by: Mike Turquette <mturquette@linaro.org> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Jeremy Kerr <jeremy.kerr@canonical.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Arnd Bergman <arnd.bergmann@linaro.org> Cc: Paul Walmsley <paul@pwsan.com> Cc: Shawn Guo <shawn.guo@freescale.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Jamie Iles <jamie@jamieiles.com> Cc: Richard Zhao <richard.zhao@linaro.org> Cc: Saravana Kannan <skannan@codeaurora.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Amit Kucheria <amit.kucheria@linaro.org> Cc: Deepak Saxena <dsaxena@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca>
| * | clk: constify parent name arrays in macrosRajendra Nayak2012-05-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | parent name array is now expected to be const char *, make the relevent changes in the clk macros which define default clock types. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
| * | clk: remove trailing whitespace from clk.hRob Herring2012-04-241-2/+2
| | | | | | | | | | | | | | | | | | Remove trailing whitespace from 2 lines. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
| * | clk: select CLKDEV_LOOKUP for COMMON_CLKRob Herring2012-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | Using the common clock infrastructure without the common clkdev code makes little sense, so select CLKDEV_LOOKUP for COMMON_CLK. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
OpenPOWER on IntegriCloud