[PATCH v3] spi: spi-sun6i: implement DMA-based transfer mode

2020-10-22 Thread Alexander Kochetkov
From: Alexander Kochetkov DMA-based transfer will be enabled if data length is larger than FIFO size (64 bytes for A64). This greatly reduce number of interrupts for transferring data. For smaller data size PIO mode will be used. In PIO mode whole buffer will be loaded into FIFO. If driver

Re: [PATCH] spi: spi-sun6i: implement DMA-based transfer mode

2020-10-19 Thread Alexander Kochetkov
> 19 окт. 2020 г., в 11:21, Maxime Ripard написал(а): > > Hi! > > On Thu, Oct 15, 2020 at 06:47:40PM +0300, Alexander Kochetkov wrote: >> DMA-based transfer will be enabled if data length is larger than FIFO size >> (64 bytes for A64). This greatly redu

[PATCH v2] spi: spi-sun6i: enable autosuspend feature

2020-10-19 Thread Alexander Kochetkov
From: Alexander Kochetkov If SPI is used for periodic polling any sensor, significant delays sometimes appear. Switching on module clocks during resume lead to delays. Enabling autosuspend mode causes the controller to not suspend between SPI transfers and the delays disappear. The commit also

[PATCH v2] spi: spi-sun6i: implement DMA-based transfer mode

2020-10-19 Thread Alexander Kochetkov
From: Alexander Kochetkov DMA-based transfer will be enabled if data length is larger than FIFO size (64 bytes for A64). This greatly reduce number of interrupts for transferring data. For smaller data size PIO mode will be used. In PIO mode whole buffer will be loaded into FIFO. If driver

Re: [PATCH] spi: spi-sun6i: implement DMA-based transfer mode

2020-10-19 Thread Alexander Kochetkov
Hi, Maxime! Thanks for reviewing patches! >> >> +static int sun6i_spi_prepare_dma(struct sun6i_spi *sspi, >> + struct spi_transfer *tfr) >> +{ >> +struct dma_async_tx_descriptor *rxdesc, *txdesc; >> +struct spi_master *master = sspi->master; >> + >> +rxdes

[PATCH] spi: rockchip: enable autosuspend feature

2020-10-16 Thread Alexander Kochetkov
If SPI is used for periodic polling any sensor, significant delays sometimes appear. Switching on module clocks during resume lead to delays. Enabling autosuspend mode causes the controller to not suspend between SPI transfers and the delays disappear. Signed-off-by: Alexander Kochetkov

[PATCH] spi: spi-sun6i: enable autosuspend feature

2020-10-16 Thread Alexander Kochetkov
If SPI is used for periodic polling any sensor, significant delays sometimes appear. Switching on module clocks during resume lead to delays. Enabling autosuspend mode causes the controller to not suspend between SPI transfers and the delays disappear. Signed-off-by: Alexander Kochetkov

[PATCH] spi: spi-sun6i: implement DMA-based transfer mode

2020-10-15 Thread Alexander Kochetkov
then it fallback for PIO mode. Tested on SOPINE (https://www.pine64.org/sopine/) Signed-off-by: Alexander Kochetkov --- drivers/spi/spi-sun6i.c | 171 +--- 1 file changed, 159 insertions(+), 12 deletions(-) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi

[PATCH] arm64: dts: allwinner: replace numerical constant with CCU_CLKX

2020-08-03 Thread Alexander Kochetkov
From: Alexander Kochetkov Signed-off-by: Alexander Kochetkov --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index

Re: [PATCH 2/2] mmc: dw_mmc-rockchip: fix transfer hangs on rk3188【请注意,邮件由linux-mmc-ow...@vger.kernel.org代发】

2019-03-21 Thread Alexander Kochetkov
size = mmc->max_req_size; > 21 марта 2019 г., в 5:31, Shawn Lin написал(а): > > + Caesar Wang > > On 2019/3/21 1:48, Alexander Kochetkov wrote: >> I've found that sometimes dw_mmc in my rk3188 based board stop transfer >> any data with error: >> kernel:

[PATCH 1/2] mmc: dw_mmc: add init_slot() hook to platform function table

2019-03-20 Thread Alexander Kochetkov
The init_slot() hook allow platform driver override slot defaults provided by generic dw_mmc driver. It's required to fix EDMA based transfer hangs observed on rockchip rk3188. Signed-off-by: Alexander Kochetkov --- drivers/mmc/host/dw_mmc.c |4 drivers/mmc/host/dw_mmc.h |2

[PATCH 2/2] mmc: dw_mmc-rockchip: fix transfer hangs on rk3188

2019-03-20 Thread Alexander Kochetkov
scatterlist for one transfer. I guess that all other rk3xxx chips that lacks FLUSHP also affected by the problem. So I made fix for all rk3xxx chips from rk2928 to rk3188. Signed-off-by: Alexander Kochetkov --- drivers/mmc/host/dw_mmc-rockchip.c | 19 +++ 1 file changed, 19

[PATCH 0/2] Fix eMMC hang on rk3188 and earlier

2019-03-20 Thread Alexander Kochetkov
Hello! I found, that sometimes dw_mmc driver stop transfer data to eMMC card on my rk3188 based board. One of tranfers hangs then doing EDMA transfer and controller gives HTO. And here is a fix. Alexander Kochetkov (2): mmc: dw_mmc: add init_slot() hook to platform function table mmc: dw_mmc

Re: [PATCH AUTOSEL for 3.18 34/63] ARM: dts: rockchip: disable arm-global-timer for rk3188

2018-03-04 Thread Alexander Kochetkov
рта 2018 г., в 1:33, Sasha Levin > написал(а): > > From: Alexander Kochetkov > > [ Upstream commit 500d0aa918a2ea6bb918fee8adcf27dc2912bcd1 ] > > The clocksource and the sched_clock provided by the arm_global_timer > are quite unstable because their rates depend on the

Re: [PATCH AUTOSEL for 4.4 062/115] ARM: dts: rockchip: disable arm-global-timer for rk3188

2018-03-04 Thread Alexander Kochetkov
рта 2018 г., в 1:31, Sasha Levin > написал(а): > > From: Alexander Kochetkov > > [ Upstream commit 500d0aa918a2ea6bb918fee8adcf27dc2912bcd1 ] > > The clocksource and the sched_clock provided by the arm_global_timer > are quite unstable because their rates depend on the

Re: [PATCH AUTOSEL for 4.9 124/219] ARM: dts: rockchip: disable arm-global-timer for rk3188

2018-03-04 Thread Alexander Kochetkov
; 4 марта 2018 г., в 1:29, Sasha Levin > написал(а): > > From: Alexander Kochetkov > > [ Upstream commit 500d0aa918a2ea6bb918fee8adcf27dc2912bcd1 ] > > The clocksource and the sched_clock provided by the arm_global_timer > are quite unstable because their rates depend on the

Re: [PATCH 1/2] clk: rename clk_core_get_boundaries() to clk_hw_get_boundaries() and expose

2017-12-29 Thread Alexander Kochetkov
> 29 дек. 2017 г., в 3:14, Stephen Boyd написал(а): > > I'm asking if the rate is capped on the consumer side with > clk_set_max_rate() or if it's capped on the clk provider side to > express a hardware constraint. I do that using clk_set_max_rate() at provider size inside clk-rk3188.c. > > So

Re: [PATCH 1/2] clk: rename clk_core_get_boundaries() to clk_hw_get_boundaries() and expose

2017-12-28 Thread Alexander Kochetkov
Initial thread here: https://www.spinics.net/lists/linux-clk/msg21682.html > 27 дек. 2017 г., в 4:06, Stephen Boyd написал(а): > > Are these limits the min/max limits that the parent clk can > output at? Or the min/max limits that software has constrained on > the clk? > Don’t know how to ans

Re: [PATCH 1/2] clk: rename clk_core_get_boundaries() to clk_hw_get_boundaries() and expose

2017-12-25 Thread Alexander Kochetkov
> 21 дек. 2017 г., в 23:07, Stephen Boyd написал(а): > > Can you convert to the determine_rate op instead of round_rate? > That function should tell you the min/max limits so that you > don't need to query that information from the core. I converted rockchip_fractional_approximation() to rockch

[PATCH 1/2] clk: rename clk_core_get_boundaries() to clk_hw_get_boundaries() and expose

2017-12-21 Thread Alexander Kochetkov
larger than one configured using clk_set_max_rate(). Signed-off-by: Alexander Kochetkov --- drivers/clk/clk.c| 14 -- include/linux/clk-provider.h |2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index c8d83ac.

[PATCH 0/2] Fix clock rate in the rockchip_fractional_approximation()

2017-12-21 Thread Alexander Kochetkov
proximation to fix up fractional clk's jitter"). Alexander Kochetkov (2): clk: rename clk_core_get_boundaries() to clk_hw_get_boundaries() and expose clk: rockchip: limit clock rate in the rockchip_fractional_approximation() drivers/clk/clk.c| 14 -- dri

[PATCH 2/2] clk: rockchip: limit clock rate in the rockchip_fractional_approximation()

2017-12-21 Thread Alexander Kochetkov
ecial approximation to fix up fractional clk's jitter"). Signed-off-by: Alexander Kochetkov --- drivers/clk/rockchip/clk.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c index 35dbd63..3c1fb0d 100644 --- a/drivers/clk

Re: [PATCH] net: arc_emac: fix arc_emac_rx() error paths

2017-12-19 Thread Alexander Kochetkov
> 19 дек. 2017 г., в 18:22, David Miller написал(а): > > From: Alexander Kochetkov > Date: Fri, 15 Dec 2017 20:20:06 +0300 > >> arc_emac_rx() has some issues found by code review. >> >> In case netdev_alloc_skb_ip_align() or dma_map_single() failure >>

[PATCH v2] net: arc_emac: fix arc_emac_rx() error paths

2017-12-19 Thread Alexander Kochetkov
not be provided to EMAC. Signed-off-by: Alexander Kochetkov --- Changes in v2: - Rebased against stable linux-4.14.y branch drivers/net/ethernet/arc/emac_main.c | 53 -- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/arc

[PATCH v2] net: arc_emac: restart stalled EMAC

2017-12-19 Thread Alexander Kochetkov
ake a broadcast storm. For example, running on PC 'ping' to some IP address triggers ARP-request storm. After some time (~10sec), EMAC on rk3188 will stall. Observed and tested on rk3188 radxarock. [1] https://en.wikipedia.org/wiki/Broadcast_radiation Signed-off-by: Alexander Kochetkov ---

[PATCH] net: arc_emac: fix arc_emac_rx() error paths

2017-12-15 Thread Alexander Kochetkov
not be provided to EMAC. Signed-off-by: Alexander Kochetkov --- drivers/net/ethernet/arc/emac_main.c | 53 -- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c index b2e0051

[PATCH] net: arc_emac: restart stalled EMAC

2017-12-15 Thread Alexander Kochetkov
ake a broadcast storm. For example, running on PC 'ping' to some IP address triggers ARP-request storm. After some time (~10sec), EMAC on rk3188 will stall. Observed and tested on rk3188 radxarock. [1] https://en.wikipedia.org/wiki/Broadcast_radiation Signed-off-by: Alexander Kochetkov -

Re: [PATCH v2 1/2] dmaengine: pl330: fix descriptor allocation fail

2017-10-16 Thread Alexander Kochetkov
, Alexander. > 4 окт. 2017 г., в 14:37, Alexander Kochetkov написал(а): > > If two concurrent threads call pl330_get_desc() when DMAC descriptor > pool is empty it is possible that allocation for one of threads will fail > with message: > > kernel: dma-pl330 20078000.dma-contr

[PATCH v2 1/2] dmaengine: pl330: fix descriptor allocation fail

2017-10-04 Thread Alexander Kochetkov
thread A will fail. Using on-stack pool for new descriptor allow avoid the issue described. The patch modify pl330_get_desc() to use on-stack pool for allocation new descriptors. Signed-off-by: Alexander Kochetkov --- drivers/dma/pl330.c | 39 --- 1 file changed

[PATCH v2 2/2] !!! FOR TESTING ONLY !!! dmaengine: pl330: add verbose message and set NR_DEFAULT_DESC to 1

2017-10-04 Thread Alexander Kochetkov
descriptor [1.344912] dma-pl330 20078000.dma-controller: pl330_get_desc:2458 Allocated one more descriptor --- rest of similar lines omitted --- Signed-off-by: Alexander Kochetkov --- drivers/dma/pl330.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b

[PATCH v2 0/2] dmaengine: pl330: fix descriptor allocation fail

2017-10-04 Thread Alexander Kochetkov
Here is the patch fixing descriptor allocation issue. Could someone with pl330 hardware test it and confirm that it doesn't brake current pl330 driver? I will be very grateful to you! Changes in v2: - removed wrappers add_desc(), pluck_desc() - fix code intendation Alexander Kochetk

Re: [PATCH] dmaengine: pl330: fix descriptor allocation fail

2017-09-26 Thread Alexander Kochetkov
Hello Vinod! Thanks for review! > 26 сент. 2017 г., в 20:37, Vinod Koul написал(а): > > Tested-by please... In order to test the patch the driver should be rebuild with NR_DEFAULT_DESC defined to 1 and with some trace code included. Is it OK if I provide second patch I used for testing with t

[PATCH] dmaengine: pl330: fix descriptor allocation fail

2017-09-08 Thread Alexander Kochetkov
described will nether happen. Signed-off-by: Alexander Kochetkov --- drivers/dma/pl330.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index f37f497..0e7f6c9 100644 --- a/drivers/dma/pl330.c

Re: [PATCH 0/2] Free running cyclic transfer implementation for pl330

2017-04-26 Thread Alexander Kochetkov
Hello! Just to let you know, that I got following test report from Stephen (thanks a lot!). The patch won’t work due to full cyclic transfer doesn’t fit into mcbufsz (256 bytes long). His application requested driver to do cyclic transfer with large number of cycles. pl330 microcode has restri

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-25 Thread Alexander Kochetkov
Hello David! > 25 апр. 2017 г., в 17:36, David Miller написал(а): > > So... what are we doing here? > > My understanding is that this should fix the same problem that commit > 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto > negotiation on startup") fixed and that this mic

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-21 Thread Alexander Kochetkov
> 21 апр. 2017 г., в 17:18, Roger Quadros написал(а): > > I think the following commit broke functionality with interrupt driven PHYs > 3c293f4e08b5 ("net: phy: Trigger state machine on state change and not > polling.") Probably this one[1] broke, according to Alexandre’s commit[2]. And it was

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-20 Thread Alexander Kochetkov
p MAC startup time for boards with Micrel PHY on 3~5 sec (auto-negotiation time[2]). Could you check that also? Regards, Alexander. [1] https://lkml.org/lkml/2017/4/20/357 [2] http://www.ieee802.org/3/af/public/jan02/brown_1_0102.pdf > 20 апр. 2017 г., в 14:00, Alexander Kochetkov > написал(а

Re: [PATCH] mmc: dw_mmc: hide clock message when card is resuming

2017-04-20 Thread Alexander Kochetkov
> 20 апр. 2017 г., в 13:06, Jaehoon Chung написал(а): > > I think you are not using the latest kernel. which version do you use? > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce69e2fea093b7fa3991c87849c4955cd47796c9 > > Could you check this? Commit ce69e2fe

[PATCH v2] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-20 Thread Alexander Kochetkov
phy_start_aneg() to phy_start(). Also the patch add call to phy_stop() to arc_emac_stop() to allow the PHY device to be fully suspended when the interface is unused. Signed-off-by: Alexander Kochetkov --- Changes in v2: - Updated commit message to clarify changes drivers/net/ethernet/arc

[PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-20 Thread Alexander Kochetkov
HY and it won't get it. Signed-off-by: Alexander Kochetkov Cc: stable # v4.9+ --- drivers/net/phy/phy.c | 40 include/linux/phy.h |1 + 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy

[PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-20 Thread Alexander Kochetkov
] and this one patch will get upstream instead of patch[2]. Could you please test it? Regards, Alexander. [1] http://patchwork.ozlabs.org/patch/743773/ [2] https://lkml.org/lkml/2017/3/30/517 Alexander Kochetkov (1): net: phy: fix auto-negotiation stall due to unavailable interrupt dri

Re: [PATCH] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-19 Thread Alexander Kochetkov
): > > On 04/19/2017 05:29 PM, Alexander Kochetkov wrote: > >> The patch replace phy_start_aneg() with phy_start(). phy_start() call > > Replaces. > >> phy_start_aneg() as a part of startup sequence and allow recover from >> error (PHY_HALTED) state. >

Re: [PATCH] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-19 Thread Alexander Kochetkov
> 19 апр. 2017 г., в 19:32, Florian Fainelli написал(а): > > http://patchwork.ozlabs.org/patch/743773/ > > Roger can you also test Alexander's patch? If MAC use phy_start_aneg() instead of phy_start() my patch will not work as expected. Roger, if patch don’t work for you please check what MAC

[PATCH] mmc: dw_mmc: hide clock message when card is resuming

2017-04-19 Thread Alexander Kochetkov
ce setup bus if active slots exist") Signed-off-by: Alexander Kochetkov --- drivers/mmc/host/dw_mmc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 73db085..faaf2c1 100644 --- a/drivers/mmc/host/dw_mmc.c ++

[PATCH] net: arc_emac: switch to phy_start()/phy_stop()

2017-04-19 Thread Alexander Kochetkov
The patch replace phy_start_aneg() with phy_start(). phy_start() call phy_start_aneg() as a part of startup sequence and allow recover from error (PHY_HALTED) state. Also added call phy_stop() to arc_emac_remove() to stop PHY state machine when MAC is down. Signed-off-by: Alexander Kochetkov

Re: [PATCH] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-19 Thread Alexander Kochetkov
Just found similar problem fixed in another PHY. See commit 99f81afc139c ("phy: micrel: Disable auto negotiation on startup») > 19 апр. 2017 г., в 16:46, Alexander Kochetkov > написал(а): > > The problem I fix related to SMSC LAN8710/LAN8720 PHY handled using > interru

[PATCH] net: phy: fix auto-negotiation stall due to unavailable interrupt

2017-04-19 Thread Alexander Kochetkov
interrupt. Signed-off-by: Alexander Kochetkov --- drivers/net/phy/phy.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 7cc1b7d..da8f03d 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1169,6 +1169,18

[PATCH 2/2] dmaengine: pl330: don't emit code for one iteration loop

2017-04-14 Thread Alexander Kochetkov
The patch remove one iteration outer loop in the _loop(). Removing loop saves 4 bytes of MicroCode buffer. This savings make sense for free-running cyclic transfer implementation. DMALP_0 0 ... DMALPENDA_0 bjmpto_9 Signed-off-by: Alexander Kochetkov --- drivers/dma/pl330.c |8

[PATCH 1/2] dmaengine: pl330: make cyclic transfer free runnable

2017-04-14 Thread Alexander Kochetkov
ntion. As a result, lost samples and clicks gone. Signed-off-by: Alexander Kochetkov --- drivers/dma/pl330.c | 192 +-- 1 file changed, 94 insertions(+), 98 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 7539f73..56a2377 1

[PATCH 0/2] Free running cyclic transfer implementation for pl330

2017-04-14 Thread Alexander Kochetkov
his. I would not like pl330 to be broken again Now I was asked about the series[1] again by guys from Rockchip, so I send rebased against 4.10.10 version. Hope, someone might test it and confirm that patches work fine. Regards, Alexander. Alexander Kochetkov (2): dmaengine: pl330: make cycl

Re: [PATCH v7 0/7] Implement clocksource for rockchip SoC using rockchip timer

2017-03-29 Thread Alexander Kochetkov
like clksrc-of»). What do you think? [1] https://lkml.org/lkml/2017/3/29/286 [2] https://lkml.org/lkml/2017/1/31/401 [3] https://lkml.org/lkml/2017/3/22/508 [4] https://lkml.org/lkml/2017/3/22/420 [5] https://lkml.org/lkml/2017/3/22/426 > 22 марта 2017 г., в 18:48, Alexander Kochetkov >

[PATCH] clk: rockchip: limit i2s0_pre max rate on rk3188

2017-03-24 Thread Alexander Kochetkov
is due to high i2s0_pre rate. Probably rk3188 has some sort of frequency restrictions imposed. Haven't found anything in the RK3188 TRM, so this is my assumption. Anyway, with the patch, all the issues gone. Signed-off-by: Alexander Kochetkov --- drivers/clk/rockchip/clk-rk3188.c |9 +

Re: [PATCH v7 5/7] clocksource/drivers/rockchip_timer: implement clocksource timer

2017-03-24 Thread Alexander Kochetkov
s://github.com/0day-ci/linux/commits/Alexander-Kochetkov/Implement-clocksource-for-rockchip-SoC-using-rockchip-timer/20170324-113008 > config: arm64-defconfig (attached as .config) > compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > reproduce: >wget > https://ra

Re: [PATCH] ARM: dts: rockchip: increase SD clock frequency on Radxa Rock

2017-03-22 Thread Alexander Kochetkov
> 22 марта 2017 г., в 20:04, Alexander Kochetkov > написал(а): > > Ok. Let leave as is for now. > > My radxa worked stable for a year with this settings. Ok, I not sure what my radxa worked stable with this settings. Hieko, thanks for catching that. Sorry for your time.

Re: [PATCH] ARM: dts: rockchip: increase SD clock frequency on Radxa Rock

2017-03-22 Thread Alexander Kochetkov
> 22 марта 2017 г., в 19:47, Heiko Stuebner написал(а): > > sorry, but I will not apply this patch at this time. > When testing on my radxarock with the card I always use upon entering the > rootfs everything explodes with -110 errors, while without that patch the > card > runs stable as far

Re: [PATCH] ARM: dts: rockchip: setup DMA-channels for mmc0 and emmc for rk3188

2017-03-22 Thread Alexander Kochetkov
Hello, Heiko! > 22 марта 2017 г., в 18:54, Heiko Stuebner написал(а): > > I've applied a slightly different variant in [0] with your commit message and > moved the dma properties to the mmc/emmc nodes in rk3xxx.dtsi - as the dma > channels are the same on both rk3188 and rk3066. Thank you! I ha

[PATCH v7 7/7] ARM: dts: rockchip: disable arm-global-timer for rk3188

2017-03-22 Thread Alexander Kochetkov
the stable rockchip clocksource. Let's disable the arm_global_timer in order to have the rockchip clocksource selected by default. Signed-off-by: Alexander Kochetkov Reviewed-by: Heiko Stuebner --- arch/arm/boot/dts/rk3188.dtsi |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm

[PATCH v7 5/7] clocksource/drivers/rockchip_timer: implement clocksource timer

2017-03-22 Thread Alexander Kochetkov
solve them 'clockevent' attribute should be added to the timer. rk3288 (and probably anything newer) is irrelevant to this patch, as it has the arch timer interface. This patch may be useful for Cortex-A9/A5 based parts. Signed-off-by: Alexander Kochetkov --- arch/arm/mach-rockchip/

[PATCH v7 2/7] dt-bindings: clarify compatible property for rockchip timers

2017-03-22 Thread Alexander Kochetkov
Make all properties description in form '"rockchip,-timer", "rockchip,rk3288-timer"' for all chips found in linux kernel. Suggested-by: Heiko Stübner Signed-off-by: Alexander Kochetkov Acked-by: Rob Herring Reviewed-by: Heiko Stuebner --- .../bindin

[PATCH v7 6/7] ARM: dts: rockchip: add timer entries to rk3188 SoC

2017-03-22 Thread Alexander Kochetkov
arm-global-timer clocksource and sched clock. It run at stable frequency 24MHz. Signed-off-by: Alexander Kochetkov Reviewed-by: Heiko Stuebner --- arch/arm/boot/dts/rk3188.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot

[PATCH v7 3/7] ARM: dts: rockchip: update compatible property for rk322x timer

2017-03-22 Thread Alexander Kochetkov
Property set to '"rockchip,rk3228-timer", "rockchip,rk3288-timer"' to match devicetree bindings. Signed-off-by: Alexander Kochetkov Suggested-by: Heiko Stübner Reviewed-by: Heiko Stuebner --- arch/arm/boot/dts/rk322x.dtsi |2 +- 1 file changed, 1 insertion(+

[PATCH v7 4/7] ARM: dts: rockchip: add clockevent attribute to rockchip timers

2017-03-22 Thread Alexander Kochetkov
because clock framework will try initialize them as clocksource. Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3036.dtsi|1 + arch/arm/boot/dts/rk322x.dtsi|1 + arch/arm/boot/dts/rk3288.dtsi|1 + arch/arm64/boot/dts/rockchip/rk3368.dtsi

[PATCH v7 0/7] Implement clocksource for rockchip SoC using rockchip timer

2017-03-22 Thread Alexander Kochetkov
rockchip.c. This series should be applied after the commit: https://lkml.org/lkml/2017/3/22/426 As without the commit, you will get linker error ("clkevt-probe.c:63: undefined reference to `__clkevt_of_table’") Regards, Alexander. Alexander Kochetkov (6): dt-bindings: clarify com

[PATCH v7 1/7] clocksource/drivers/clksrc-evt-probe: Describe with the DT both the clocksource and the clockevent

2017-03-22 Thread Alexander Kochetkov
approach, we allow a mechanism to clearly define a clocksource or a clockevent without aerobatics we can find around in some drivers: timer-sp804.c, arc-timer.c, dw_apb_timer_of.c, mps2-timer.c, renesas-ostm.c, time-efm32.c, time-lpc32xx.c. Signed-off-by: Daniel Lezcano Signed-off-b

[PATCH] vmlinux.lds: add __clkevt_of_table to kernel

2017-03-22 Thread Alexander Kochetkov
uot; Fixes: 0c8893c9095d ("clockevents: Add a clkevt-of mechanism like clksrc-of") Signed-off-by: Alexander Kochetkov --- include/asm-generic/vmlinux.lds.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 24

[PATCH] clockevents: fix syntax errors

2017-03-22 Thread Alexander Kochetkov
The patch fix syntax errors introduced by commit 0c8893c9095d ("clockevents: Add a clkevt-of mechanism like clksrc-of"). Fixes: 0c8893c9095d ("clockevents: Add a clkevt-of mechanism like clksrc-of") Signed-off-by: Alexander Kochetkov --- drivers/clocksource/clkevt-probe.

[PATCH] ARM: dts: rockchip: increase SD clock frequency on Radxa Rock

2017-03-21 Thread Alexander Kochetkov
fter patch: 'mmc_host mmc0: Bus speed (slot 0) = 9600Hz (slot req 5000Hz, actual 4800HZ div = 1)' Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3188-radxarock.dts |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch

[PATCH] ARM: dts: rockchip: setup DMA-channels for mmc0 and emmc for rk3188

2017-03-21 Thread Alexander Kochetkov
). Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3188.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi index 44da3d42..de786f8 100644 --- a/arch/arm/boot/dts/rk3188.dtsi +++ b/arch/arm/boot/dts/rk3188

Re: [PATCH v6 0/5] Implement clocksource for rockchip SoC using rockchip timer

2017-03-20 Thread Alexander Kochetkov
/scm/linux/kernel/git/next/linux-next.git/commit/drivers/clocksource?id=376bc27150f180d9f5eddec6a14117780177589d Regards, Alexander. > 31 янв. 2017 г., в 15:43, Alexander Kochetkov > написал(а): > > From: Alexander Kochetkov > > Hello, Daniel, Heiko. > > Here is t

[PATCH v6 2/5] ARM: dts: rockchip: update compatible property for rk322x timer

2017-01-31 Thread Alexander Kochetkov
Property set to '"rockchip,rk3228-timer", "rockchip,rk3288-timer"' to match devicetree bindings. Signed-off-by: Alexander Kochetkov Suggested-by: Heiko Stübner --- arch/arm/boot/dts/rk322x.dtsi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v6 4/5] ARM: dts: rockchip: add timer entries to rk3188 SoC

2017-01-31 Thread Alexander Kochetkov
arm-global-timer clocksource and sched clock. It run at stable frequency 24MHz. Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3188.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi index 31f81b2

[PATCH v6 5/5] ARM: dts: rockchip: disable arm-global-timer for rk3188

2017-01-31 Thread Alexander Kochetkov
the stable rockchip clocksource. Let's disable the arm_global_timer in order to have the rockchip clocksource selected by default. Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3188.dtsi |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arc

[PATCH v6 3/5] clocksource/drivers/rockchip_timer: implement clocksource timer

2017-01-31 Thread Alexander Kochetkov
may be useful for Cortex-A9/A5 based parts. Signed-off-by: Alexander Kochetkov --- drivers/clocksource/Kconfig |1 + drivers/clocksource/rockchip_timer.c | 218 -- 2 files changed, 158 insertions(+), 61 deletions(-) diff --git a/drivers/clocksource

[PATCH v6 0/5] Implement clocksource for rockchip SoC using rockchip timer

2017-01-31 Thread Alexander Kochetkov
From: Alexander Kochetkov Hello, Daniel, Heiko. Here is try 6 :) Thanks a lot for helping me to bring the code into kernel! This patch series contain: - devicetree bindings clarification for rockchip timers - dts files fixes for rk3228-evb, rk3229-evb and rk3188 - implementation of clocksource

[PATCH v6 1/5] dt-bindings: clarify compatible property for rockchip timers

2017-01-31 Thread Alexander Kochetkov
Make all properties description in form '"rockchip,-timer", "rockchip,rk3288-timer"' for all chips found in linux kernel. Suggested-by: Heiko Stübner Signed-off-by: Alexander Kochetkov Acked-by: Rob Herring --- .../bindings/timer/rockchip,rk-timer.txt

Re: [PATCH v5 5/8] clocksource/drivers/rockchip_timer: split bc_timer into rk_timer and rk_clock_event_device

2017-01-30 Thread Alexander Kochetkov
> 30 янв. 2017 г., в 16:12, Daniel Lezcano > написал(а): > > I don't get the point of these changes. The patch does not explain why they > are > needed. I’d like to extract timer API from current implementation. And to make code more readable I’d like to introduce 'struct rk_timer’ what can

Re: [PATCH v5 3/8] ARM: dts: rockchip: add timer entries to rk3188 SoC

2017-01-30 Thread Alexander Kochetkov
> 30 янв. 2017 г., в 15:04, Daniel Lezcano > написал(а): > > There is no case when the rockchip timer is used for the clockevent. The is already timer entry for rk3228 in the DT. And it act as clockevent. I guess it work as backup, but I cannot test it also. In order to not break DT compatibil

Re: [PATCH v5 3/8] ARM: dts: rockchip: add timer entries to rk3188 SoC

2017-01-30 Thread Alexander Kochetkov
> 30 янв. 2017 г., в 14:04, Daniel Lezcano > написал(а): > > t is up to the RTC to wake up the system from suspend and there is no > idle state stopping the local timers on these SoCs. So, the rockchip timers > won't be ever used on the rk3188, right ? No rockchip timers where used on rk3188 b

Re: [PATCH] clockevents: Add a clkevt-of mechanism like clksrc-of

2017-01-30 Thread Alexander Kochetkov
> 25 янв. 2017 г., в 15:21, Daniel Lezcano > написал(а): > > Hopefully, that can help to do some housework in the directory, perhaps > split the drivers in to entities, for example: > - clksrc-rockchip.c > - clkevt-rockchip.c > > Also, it gives the possibility to declare clocksourc

Re: [PATCH v4 0/9] Implement clocksource for rockchip SoC using rockchip timer

2017-01-26 Thread Alexander Kochetkov
apply the patches without the tag. Let me know is all ok with series now? Or may be I have to do something else? Regards, Alexander. > 23 янв. 2017 г., в 20:57, Daniel Lezcano > написал(а): > > On Mon, Jan 23, 2017 at 08:24:47PM +0300, Alexander Kochetkov wrote: >> Heiko, D

Re: [PATCH v5 5/8] clocksource/drivers/rockchip_timer: split bc_timer into rk_timer and rk_clock_event_device

2017-01-24 Thread Alexander Kochetkov
> 24 янв. 2017 г., в 18:02, Heiko Stübner написал(а): > > Please don't add Reviewed-by tags without explicit mention of them by > reviewers. (Also it's spelled wrong). > > I haven't looked that deeply into the driver itself and the changes made to > feel comfortable with a "Reviewed-by". Tha

[PATCH v5 0/8] Implement clocksource for rockchip SoC using rockchip timer

2017-01-24 Thread Alexander Kochetkov
patch/9443977/ https://patchwork.kernel.org/patch/9443991/ Alexander Kochetkov (8): dt-bindings: clarify compatible property for rockchip timers ARM: dts: rockchip: update compatible property for rk322x timer ARM: dts: rockchip: add timer entries to rk3188 SoC ARM: dts: rockchip: disable arm-glo

[PATCH v5 4/8] ARM: dts: rockchip: disable arm-global-timer for rk3188

2017-01-24 Thread Alexander Kochetkov
at the same time. Because arm-global-timer looks like a better candidate for the kernel: it has higher frequency and rating. Disabling arm-global-timer doesn't leave kernel without clockevents as there is another clockevent provider (smp-twd). Signed-off-by: Alexander Kochetkov Reviwed-by:

[PATCH v5 2/8] ARM: dts: rockchip: update compatible property for rk322x timer

2017-01-24 Thread Alexander Kochetkov
Property set to '"rockchip,rk3228-timer", "rockchip,rk3288-timer"' to match devicetree bindings. Signed-off-by: Alexander Kochetkov Suggested-by: Heiko Stübner --- arch/arm/boot/dts/rk322x.dtsi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v5 5/8] clocksource/drivers/rockchip_timer: split bc_timer into rk_timer and rk_clock_event_device

2017-01-24 Thread Alexander Kochetkov
commit. This is refactoring step without functional changes. Signed-off-by: Alexander Kochetkov Reviwed-by: Heiko Stübner --- drivers/clocksource/rockchip_timer.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/clocksource

[PATCH v5 6/8] clocksource/drivers/rockchip_timer: low level routines take rk_timer as parameter

2017-01-24 Thread Alexander Kochetkov
Pass rk_timer instead of clock_event_device to low lever timer routines. So that code could be reused by clocksource implementation. Drop rk_base() and rk_ctrl(). This is refactoring step without functional changes. Signed-off-by: Alexander Kochetkov Reviwed-by: Heiko Stübner --- drivers

[PATCH v5 8/8] clocksource/drivers/rockchip_timer: implement clocksource timer

2017-01-24 Thread Alexander Kochetkov
may be usefull for Cortex-A9/A5 based parts. Signed-off-by: Alexander Kochetkov Reviwed-by: Heiko Stübner --- drivers/clocksource/rockchip_timer.c | 137 +- 1 file changed, 117 insertions(+), 20 deletions(-) diff --git a/drivers/clocksource/rockchip_timer.c b

[PATCH v5 7/8] clocksource/drivers/rockchip_timer: move TIMER_INT_UNMASK out of rk_timer_enable()

2017-01-24 Thread Alexander Kochetkov
This allow to enable timer without enabling interrupts from it. As that mode will be used in clocksource implementation. This is refactoring step without functional changes. Signed-off-by: Alexander Kochetkov Reviwed-by: Heiko Stübner --- drivers/clocksource/rockchip_timer.c |8

[PATCH v5 3/8] ARM: dts: rockchip: add timer entries to rk3188 SoC

2017-01-24 Thread Alexander Kochetkov
arm-global-timer clocksource and sched clock. It run at stable frequency 24MHz. Signed-off-by: Alexander Kochetkov Reviwed-by: Heiko Stübner --- arch/arm/boot/dts/rk3188.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts

[PATCH v5 1/8] dt-bindings: clarify compatible property for rockchip timers

2017-01-24 Thread Alexander Kochetkov
Make all properties description in form '"rockchip,-timer", "rockchip,rk3288-timer"' for all chips found in linux kernel. Suggested-by: Heiko Stübner Signed-off-by: Alexander Kochetkov Acked-by: Rob Herring --- .../bindings/timer/rockchip,rk-timer.txt

Re: [PATCH v4 0/9] Implement clocksource for rockchip SoC using rockchip timer

2017-01-23 Thread Alexander Kochetkov
ag, 23. Januar 2017, 15:47:44 CET schrieb Daniel Lezcano: >> On Wed, Dec 21, 2016 at 05:21:05PM +0300, Alexander Kochetkov wrote: >>> Hello Heiko, Daniel! >>> >>> Are there any reasons why the patches [1][2] are not applied yet into >>> kernel? How can I hel

Re: [PATCH v4 6/9] clocksource/drivers/rockchip_timer: split bc_timer into rk_timer and rk_clock_event_device

2017-01-23 Thread Alexander Kochetkov
Daniel, thanks for reviewing patches! > 23 янв. 2017 г., в 19:26, Daniel Lezcano > написал(а): > > On Tue, Nov 29, 2016 at 07:14:49PM +0300, Alexander Kochetkov wrote: >> The patch move ce field out of struct bc_timer into struct >> rk_clock_event_device and rename s

Re: [PATCH v4 2/9] ARM: dts: rockchip: update compatible property for rk3228 timer

2017-01-23 Thread Alexander Kochetkov
Hello Daniel! : > + > +&timer { > + compatible = "rockchip,rk3228-timer", "rockchip,rk3288-timer"; > +}; > 23 янв. 2017 г., в 18:40, Daniel Lezcano > написал(а): > > I'm not sure this is correct, to which timer &timer will refer ? > >timer { >compatible = "arm,armv

Re: [PATCH v4 0/9] Implement clocksource for rockchip SoC using rockchip timer

2016-12-21 Thread Alexander Kochetkov
rockchip SoC using rockchip timer [2] http://lists.infradead.org/pipermail/linux-rockchip/2016-December/013308.html > 29 нояб. 2016 г., в 19:14, Alexander Kochetkov > написал(а): > > Hello, > > This patch series contain: > - devicetree bindings clarification for rockchip

Re: [PATCH] dt-bindings: document how to setup rockchip timers as clocksource

2016-11-30 Thread Alexander Kochetkov
> 1 дек. 2016 г., в 0:30, Rob Herring написал(а): > > 1st and 2nd are ambiguous. Plus this is an OS implementation detail that > doesn't belong in the binding. > >> +If you want to bind specific timer as clockevent (i.e. one from alive >> subsystem) >> +and specific timer as clocksource, you

[PATCH v4 1/9] dt-bindings: clarify compatible property for rockchip timers

2016-11-29 Thread Alexander Kochetkov
Make all properties description in form '"rockchip,-timer", "rockchip,rk3288-timer"' for all chips found in linux kernel. Suggested-by: Heiko Stübner Signed-off-by: Alexander Kochetkov --- .../bindings/timer/rockchip,rk-timer.txt | 12 +---

[PATCH v4 9/9] clocksource/drivers/rockchip_timer: implement clocksource timer

2016-11-29 Thread Alexander Kochetkov
may be usefull for Cortex-A9/A5 based parts. Signed-off-by: Alexander Kochetkov --- drivers/clocksource/rockchip_timer.c | 137 +- 1 file changed, 117 insertions(+), 20 deletions(-) diff --git a/drivers/clocksource/rockchip_timer.c b/drivers/clocksource

[PATCH v4 2/9] ARM: dts: rockchip: update compatible property for rk3228 timer

2016-11-29 Thread Alexander Kochetkov
Property set to '"rockchip,rk3228-timer", "rockchip,rk3288-timer"' to match devicetree bindings. Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3228-evb.dts |4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/rk3228-evb.dts b/ar

[PATCH v4 3/9] ARM: dts: rockchip: update compatible property for rk3229 timer

2016-11-29 Thread Alexander Kochetkov
Property set to '"rockchip,rk3229-timer", "rockchip,rk3288-timer"' to match devicetree bindings. Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3229-evb.dts |4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/ar

[PATCH v4 4/9] ARM: dts: rockchip: add timer entries to rk3188 SoC

2016-11-29 Thread Alexander Kochetkov
arm-global-timer clocksource and sched clock. It run at stable frequency 24MHz. Signed-off-by: Alexander Kochetkov --- arch/arm/boot/dts/rk3188.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi index 31f81b2

  1   2   3   >