- 05 6月, 2015 1 次提交
-
-
由 Uwe Kleine-König 提交于
Since commit 2893c379 ("clk: make strings in parent name arrays const") the name of parent clocks can be const. So add more const in several clock drivers. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: NHeiko Stuebner <heiko@sntech.de> Acked-by: NSylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 06 5月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Add missing static to local (file-scope only) symbols. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
-
- 13 4月, 2015 1 次提交
-
-
由 Uwe Kleine-König 提交于
The statement static const char *name[]; defines a modifiable array of pointers to constant chars. That is *name[0] = 'f'; is forbidden, but name[0] = "f"; is not. So marking an array that is defined as above with __initconst is wrong. Either an additional const must be added such that the whole definition reads: static const char *const name[] __initconst; or where this is not possible __initdata must be used. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NMichael Turquette <mturquette@linaro.org>
-
- 22 1月, 2015 3 次提交
-
-
由 Heiko Stuebner 提交于
The pclk supplying the watchdog is controlled via the SGRF register area. Currently we don't have any clock-type handling external clock bits like this one. Additionally the SGRF isn't even writable in every boot mode. But still the clock control is available and in the future someone might want to use it. Therefore define a simple clock for the time being so that the watchdog driver can read its rate. Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 huang lin 提交于
Process-Voltage-Temperatiure Monitor block on RK3288 has two clocks: PVTM_CORE and PVTM_GPU. Signed-off-by: NHuang Lin <hl@rock-chips.com> Signed-off-by: NDmitry Torokhov <dtor@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Kever Yang 提交于
Use the clock ID for usbphy480m_src so that we can find this clock node in dts. Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 18 1月, 2015 1 次提交
-
-
由 Heiko Stübner 提交于
Lockdep reported a possible deadlock between the cpuclk lock and for example the i2c driver. CPU0 CPU1 ---- ---- lock(clk_lock); local_irq_disable(); lock(&(&i2c->lock)->rlock); lock(clk_lock); <Interrupt> lock(&(&i2c->lock)->rlock); *** DEADLOCK *** The generic clock-types of the core ccf already use spin_lock_irqsave when touching clock registers, so do the same for the cpuclk. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NMichael Turquette <mturquette@linaro.org> [mturquette@linaro.org: removed initialization of "flags"]
-
- 01 1月, 2015 1 次提交
-
-
由 Roger Chen 提交于
modify CRU config for GMAC driver changes since v2: 1. remove SCLK_MAC_PLL Signed-off-by: NRoger Chen <roger.chen@rock-chips.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 31 12月, 2014 1 次提交
-
-
由 Doug Anderson 提交于
We've been seeing some crashes at resume time on rk3288-based systems. On some machines they simply never wake up from suspend. Symptoms include: - System clearly got to sleep OK. Power consumption is low, the PWM for the PWM regulator has stopped, and the "global_pwroff" output shows that the system is down. - When system tries to wake up power consumption goes up. - No kernel resume code (which was left in PMU SRAM) ran. We added some basic logging to this code (write to a location in SRAM right at resume time) and didn't see the logging run. It appears that we can fix the problem by slowing down APLL before we suspend. On the system I tested things seemed reliable if I disabled 1.8GHz and 1.7GHz. The Mask ROM itself tries to slow things down (which is why PLLs are in slow mode by the time we get to the kernel), but apparently it is crashing before it even gets there. We'll be super paranoid and not just go down to 1.6GHz but we'll match what the Mask ROM seems to be doing and go into slow mode. We'll also be safe and put all PLLs (not just APLL) into slow mode (well, except DPLL which is needed for SDRAM). We'll even put NPLL into slow mode which the Mask ROM didn't do (not that it's used for much important stuff at early resume time). Note that the old Rockchip reference code did something just like this, though they jammed it into pm.c instead of putting it in the syscore ops of the clock driver. Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 29 12月, 2014 2 次提交
-
-
由 Heiko Stuebner 提交于
Commit 0e5bdb3f (clk: rockchip: switch to using the new cpuclk type for armclk) didn't take into account that the divider used on rk3288 are of the (n+1) type. The rk3066 and rk3188 socs use more complex divider types making it necessary for the list-elements to be the real register-values to write. Therefore reduce divider values in the table accordingly so that they really are the values that should be written to the registers and match the dividers actually specified for the rk3288. Reported-by: NSonny Rao <sonnyrao@chromium.org> Fixes: 0e5bdb3f ("clk: rockchip: switch to using the new cpuclk type for armclk") Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NDoug Anderson <dianders@chromium.org> Cc: stable@vger.kernel.org
-
由 Heiko Stuebner 提交于
The bit locations indicating the locking status of the plls on rk3066 are shifted by one to the right when compared to the rk3188, bits [7:4] instead of [8:5] on the rk3188, thus indicating the locking state of the wrong pll or a completely different information in case of the gpll. The recently introduced pll init code exposed that problem on some rk3066 boards when it tried to bring the boot-pll value in line with the value from the rate table. Fix this by defining separate pll definitions for rk3066 with the correct locking indices. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Fixes: 2c14736c ("clk: rockchip: add clock driver for rk3188 and rk3066 clocks") Tested-by: NFUKAUMI Naoki <naobsd@gmail.com> Cc: stable@vger.kernel.org
-
- 21 12月, 2014 3 次提交
-
-
由 Romain Perier 提交于
Do not disable clock gate "hclk_emem_peri", otherwise EMAC clocks no longer work and it breaks ethernet on RK3066 and RK3188. It fixes a regression introduced by commit 78eaf609 ("clk: rockchip: disable unused clocks"). Signed-off-by: NRomain Perier <romain.perier@gmail.com> Fixes: 78eaf609 ("clk: rockchip: disable unused clocks") Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Julien CHAUVEAU 提交于
This patch adds CLK_IGNORE_UNUSED flag to hclk_usb_peri, hclk_usbotg0 and hclk_usbotg1 because these clocks must remain enabled to use the USB controllers in host mode. This fixes a regression introduced by commit 78eaf609 ("clk: rockchip: disable unused clocks"). Signed-off-by: NJulien CHAUVEAU <julien.chauveau@neo-technologies.fr> Fixes: 78eaf609 ("clk: rockchip: disable unused clocks") Reviewed-by: NRomain Perier <romain.perier@gmail.com> Tested-by: NRomain Perier <romain.perier@gmail.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Doug Anderson 提交于
We'd like to be able to set the clock rate of the sclk_uart clocks and actually be able to achieve clock rates greater than 24MHz. To do this we need to be able to pass rate changes upward. Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 28 11月, 2014 2 次提交
-
-
由 Alexandru M Stan 提交于
This patch adds the 2 physical clocks for the mmc (drive and sample). They're mostly there for the phase properties, but they also show the true clock (by dividing by RK3288_MMC_CLKGEN_DIV). The drive and sample phases are generated by dividing an upstream parent clock by 2, this allows us to adjust the phase by 90 deg. There's also an option to have up to 255 delay elements (40-80 picoseconds long). This driver uses those elements (under the assumption that they're 60 ps long) to generate approximate 22.5 degrees options. 67.5 (22.5*3) might be as high as 90 deg if the delay elements are as big as 80 ps, so a finer division (smaller than 22.5) was not picked because the phase might not be monotonic anymore. Suggested-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NAlexandru M Stan <amstan@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Sonny Rao 提交于
This exposes the clock that comes out of the i2s block which generally goes to the audio codec. Signed-off-by: NSonny Rao <sonnyrao@chromium.org> [removed CLK_SET_RATE_PARENT from original patch] Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 27 11月, 2014 1 次提交
-
-
由 Jeff Chen 提交于
The DMC clocks need to be turned off at runtime. Use the newly assigned clock IDs to export them. Signed-off-by: NJeff Chen <cym@rock-chips.com> [dianders: split into two patches; adjusted commit msg] Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 25 11月, 2014 4 次提交
-
-
由 Heiko Stuebner 提交于
Add the new flag to gpll and cpll on rk3188 and similar and to gpll, cpll and npll on rk3288. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NKever Yang <kever.yang@rock-chips.com> Tested-by: NKever Yang <kever.yang@rock-chips.com>
-
由 Heiko Stuebner 提交于
In some cases firmware brings up plls with different parameters than the ones noted in the rate table for the specific frequency. These firmware-selected parameters are worse than the tested ones in the pll rate tables but cannot be changed by a simple clk_set_rate call when the rate stays the same. Therefore add a ROCKCHIP_PLL_SYNC_RATE flag and implement an init callback that checks the runtime-parameters against the matching rate table entry and adjusts them to the table-ones if necessary. If no rate table is set or the current rate does not match any rate-table entry no changes are made. Being able to limit this adjustment to specific plls is necessary to not touch the ones supplying core components like the apll and dpll supplying the armcores and dram. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NKever Yang <kever.yang@rock-chips.com> Tested-by: NKever Yang <kever.yang@rock-chips.com>
-
由 Heiko Stuebner 提交于
In some cases we might need to access the data of the pll mux before the actual mux gets registered - like in the following patch adding an init-callback. Therefore populate pll_mux before registering the core pll-clock. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NKever Yang <kever.yang@rock-chips.com> Tested-by: NKever Yang <kever.yang@rock-chips.com>
-
由 Heiko Stuebner 提交于
This adds a flag parameter to plls that allows us to create special flags to tweak the behaviour of the plls if necessary. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NKever Yang <kever.yang@rock-chips.com> Tested-by: NKever Yang <kever.yang@rock-chips.com>
-
- 23 11月, 2014 2 次提交
-
-
由 Julien CHAUVEAU 提交于
The USB HSIC PHY clock divider is set in the register RK2928_CLKSEL_CON(11). Signed-off-by: NJulien CHAUVEAU <julien.chauveau@neo-technologies.fr> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Julien CHAUVEAU 提交于
In rk3188 clock branches, spdif_pre gate was set to RK2928_CLKGATE_CON(13) bit 13. This appears to be a copy-paste error because such a register does not exist. We correct it to RK2928_CLKGATE_CON(0) and find out that the rk3188 spdif clock is the same as the rk3066 spdif clock, so we move it to the common clock branches. Signed-off-by: NJulien CHAUVEAU <julien.chauveau@neo-technologies.fr> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 18 11月, 2014 2 次提交
-
-
由 Julien CHAUVEAU 提交于
The parent clock for hclk_lcdc1 was set to aclk_cpu instead of hclk_cpu. Signed-off-by: NJulien CHAUVEAU <julien.chauveau@neo-technologies.fr> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 James Hogan 提交于
Commit 79c6ab50 (clk: divider: add CLK_DIVIDER_READ_ONLY flag) in v3.16 introduced the CLK_DIVIDER_READ_ONLY flag which caused the recalc_rate() and round_rate() clock callbacks to be omitted. However using this flag has the unfortunate side effect of causing the clock recalculation code when a clock rate change is attempted to always treat it as a pass-through clock, i.e. with a fixed divide of 1, which may not be the case. Child clock rates are then recalculated using the wrong parent rate. Therefore instead of dropping the recalc_rate() and round_rate() callbacks, alter clk_divider_bestdiv() to always report the current divider as the best divider so that it is never altered. For me the read only clock was the system clock, which divided the PLL rate by 2, from which both the UART and the SPI clocks were divided. Initial setting of the UART rate set it correctly, but when the SPI clock was set, the other child clocks were miscalculated. The UART clock was recalculated using the PLL rate as the parent rate, resulting in a UART new_rate of double what it should be, and a UART which spewed forth garbage when the rate changes were propagated. Signed-off-by: NJames Hogan <james.hogan@imgtec.com> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Tomasz Figa <t.figa@samsung.com> Cc: Max Schwarz <max.schwarz@online.de> Cc: <stable@vger.kernel.org> # v3.16+ Acked-by: NHaojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: NMichael Turquette <mturquette@linaro.org>
-
- 16 11月, 2014 2 次提交
-
-
由 Kever Yang 提交于
According to rk3288 trm, the mux selector locate at bit[12:11] of CRU_CLKSEL13_CON shows: 2'b00: select HOST0 USB pll clock (clk_otgphy1) 2'b01: select HOST1 USB pll clock (clk_otgphy2) 2'b10: select OTG USB pll clock (clk_otgphy0) The clock map is in Fig. 3-4 CRU Clock Architecture Diagram 3 - clk_otgphy0 -> USB PHY OTG - clk_otgphy1 -> USB PHY host0 - clk_otgphy2 -> USB PHY host1 Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Kever Yang 提交于
According to rk3288 trm, the clk_usbphy480m_gate is located at bit 14 of CRU_CLKGATE5_CON register. Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 13 11月, 2014 1 次提交
-
-
由 Dmitry Torokhov 提交于
Currently there is no driver owning these clocks and they have to stay up for the system to function properly, so let's mark them as CLK_IGNORE_UNUSED. Without this patch we have trouble with suspend/resume and we have trouble turning the eDP back on if it ever idles off. Signed-off-by: NDmitry Torokhov <dtor@chromium.org> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Reviewed-by: NKever Yang <kever.yang@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 11 11月, 2014 1 次提交
-
-
由 Chris Zhong 提交于
save and restore some clks, which might be changed in suspend. Signed-off-by: NTony Xie <xxx@rock-chips.com> Signed-off-by: NChris Zhong <zyw@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 08 11月, 2014 1 次提交
-
-
由 Heiko Stübner 提交于
The arguments to COMPOSITE_FRAC for hsadc_frac were mangled, leaving out the the general clock flags argument. This results in strange effects, as only sometimes a zero-division is reported as the wrong register is read. Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 05 11月, 2014 1 次提交
-
-
由 Kever Yang 提交于
The rockchip clock driver use CLK_IGNORE_UNUSED flag to make sure all the clocks are available like default power on state. We have implement the clock manage in most of rockchip drivers, it is time to remove it for power save. Instead we add CLK_IGNORE_UNUSED for some clock nodes which should be on during boot or no module driver in kernel will initialize it. Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 30 10月, 2014 1 次提交
-
-
由 Kever Yang 提交于
dclk_vop0/1 is the source of HDMI TMDS clock in rk3288, usually we use 594MHz for clock source of dclk_vop0/1. HDMI CTS 7-9 require TMDS Clock jitter is lower than 0.25*Tbit: TMDS clock(MHz) CTS require jitter (ps) 297 84.2 148.5 168 74.25 336 27 1247 PLL BW and VCO frequency effects the jitter of PLL output clock, clock jitter is better if BW is lower or VCO frequency is higher. If PLL use default setting of RK3066_PLL_RATE( 594000000, 2, 198, 4), the TMDS Clock jitter is higher than 250ps, which means we can't pass the test when TMDS clock is 297MHz or 148.5MHz. If we use RK3066_PLL_RATE_BWADJ(594000000, 1, 198, 8, 1), the TMDS Clock jitter is about 60ps and we can pass all test case. So we need this patch to make hdmi si test pass. Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 20 10月, 2014 5 次提交
-
-
由 Kever Yang 提交于
The possible sources for the rk3288-gpu-clock also include the npll, making it the same list of sources as for uart0. This patch make a common source for uart0 pll src and sclk_gpu, so that gpu can get its clock from npll. Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Jianqun 提交于
Removing the CLK_SET_RATE_PARENT from i2s_clkout, to limit i2s0_clkout to select between its two parent without being able influence the core i2s clock. Tested on rk3288 board, suggested by Heiko. Signed-off-by: NJianqun <jay.xu@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Kever Yang 提交于
This patch add 400MHz and 500MHz to clock rate table for rk3288. Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Doug Anderson 提交于
We'd like to be able to call clk_set_rate() on aclk_cpu (a gate) at bootup. In order for this to have any effect we need its parent (aclk_cpu_pre) to percolate the rate change to _its_ parent (aclk_cpu_src). Add CLK_SET_RATE_PARENT to make this happen. Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Sonny Rao 提交于
The parent should be spdif_8ch_pre not spdif_8ch_src, which doesn't exist and looks to be a typo. The TRM also confirms this. Signed-off-by: NSonny Rao <sonnyrao@chromium.org> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 01 10月, 2014 2 次提交
-
-
由 Heiko Stübner 提交于
Add infrastructure to write the correct value to the restart register and register the restart notifier for both rk3188 (including rk3066) and rk3288. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Jianqun 提交于
The relation of i2s nodes as follows: i2s_src 0 0 594000000 0 i2s_frac 0 0 11289600 0 i2s_pre 0 0 11289600 0 sclk_i2s0 0 0 11289600 0 i2s0_clkout 0 0 11289600 0 hclk_i2s0 1 1 99000000 0 sclk_i2s0 is the master clock, when to set rate of sclk_i2s0, should allow to set its parent's rate, by add flag CLK_SET_RATE_PARENT for "i2s_frac", "i2s_pre", "i2s0_clkout" and "sclk_i2s0". Tested on rk3288 board using max98090, with command "aplay <music.wav>" Change-Id: I12faad082566532b65a7de8c0a6845e1c17870e6 Signed-off-by: NJianqun <jay.xu@rock-chips.com> Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
-
- 27 9月, 2014 1 次提交
-
-
由 Heiko Stuebner 提交于
This adds the necessary soc-specific divider values and switches the armclk to use the newly introduced cpuclk type. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org>
-