Re: [PATCH 1/2 v6] clk/axs10x: Add I2S PLL clock driver
Hi, @Stephen: Is this version ok? The DT bindings were already acked by Vineet and Alexey. @Rob: Is this version ok? You already acked the previous version[1], see the version log for differences. Please see also if [2] is ok. [1] https://marc.info/?l=devicetree&m=146056894500509&w=2 [2] https://marc.info/?l=devicetree&m=146126139521541&w=2 On 21-04-2016 18:55, Jose Abreu wrote: > Adding device tree mailing list and Rob Herring. > > On 21-04-2016 18:19, Jose Abreu wrote: >> The ARC SDP I2S clock can be programmed using a >> specific PLL. >> >> This patch has the goal of adding a clock driver >> that programs this PLL. >> >> At this moment the rate values are hardcoded in >> a table but in the future it would be ideal to >> use a function which determines the PLL values >> given the desired rate. >> >> Signed-off-by: Jose Abreu >> --- >> >> Changes v5 -> v6: >> * Use parent clock to determine PLL input rate instead of using hardcoded >> values >> * Documentation update (added 'clocks' field) >> >> Changes v4 -> v5: >> * Documentation update (as suggested by Alexey Brodkin) >> * Changed compatible string to "snps,axs10x-i2s-pll-clock" (as suggested by >> Alexey Brodkin) >> >> Changes v3 -> v4: >> * Added binding document (as suggested by Stephen Boyd) >> * Minor code style fixes (as suggested by Stephen Boyd) >> * Use ioremap (as suggested by Stephen Boyd) >> * Implement round_rate (as suggested by Stephen Boyd) >> * Change to platform driver (as suggested by Stephen Boyd) >> * Use {readl/writel}_relaxed (as suggested by Vineet Gupta) >> >> Changes v2 -> v3: >> * Implemented recalc_rate >> >> Changes v1 -> v2: >> * Renamed folder to axs10x (as suggested by Alexey Brodkin) >> * Added more supported rates >> >> .../bindings/clock/axs10x-i2s-pll-clock.txt| 25 +++ >> drivers/clk/Makefile | 1 + >> drivers/clk/axs10x/Makefile| 1 + >> drivers/clk/axs10x/i2s_pll_clock.c | 228 >> + >> 4 files changed, 255 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/clock/axs10x-i2s-pll-clock.txt >> create mode 100644 drivers/clk/axs10x/Makefile >> create mode 100644 drivers/clk/axs10x/i2s_pll_clock.c >> >> diff --git >> a/Documentation/devicetree/bindings/clock/axs10x-i2s-pll-clock.txt >> b/Documentation/devicetree/bindings/clock/axs10x-i2s-pll-clock.txt >> new file mode 100644 >> index 000..5ffc8df >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/clock/axs10x-i2s-pll-clock.txt >> @@ -0,0 +1,25 @@ >> +Binding for the AXS10X I2S PLL clock >> + >> +This binding uses the common clock binding[1]. >> + >> +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt >> + >> +Required properties: >> +- compatible: shall be "snps,axs10x-i2s-pll-clock" >> +- reg : address and length of the I2S PLL register set. >> +- clocks: shall be the input parent clock phandle for the PLL. >> +- #clock-cells: from common clock binding; Should always be set to 0. >> + >> +Example: >> +pll_clock: pll_clock { >> +compatible = "fixed-clock"; >> +clock-frequency = <2700>; >> +#clock-cells = <0>; >> +}; >> + >> +i2s_clock@100a0 { >> +compatible = "snps,axs10x-i2s-pll-clock"; >> +reg = <0x100a0 0x10>; >> +clocks = <&pll_clock>; >> +#clock-cells = <0>; >> +}; >> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile >> index 46869d6..2ca62dc6 100644 >> --- a/drivers/clk/Makefile >> +++ b/drivers/clk/Makefile >> @@ -84,3 +84,4 @@ obj-$(CONFIG_X86) += x86/ >> obj-$(CONFIG_ARCH_ZX) += zte/ >> obj-$(CONFIG_ARCH_ZYNQ) += zynq/ >> obj-$(CONFIG_H8300) += h8300/ >> +obj-$(CONFIG_ARC_PLAT_AXS10X) += axs10x/ >> diff --git a/drivers/clk/axs10x/Makefile b/drivers/clk/axs10x/Makefile >> new file mode 100644 >> index 000..01996b8 >> --- /dev/null >> +++ b/drivers/clk/axs10x/Makefile >> @@ -0,0 +1 @@ >> +obj-y += i2s_pll_clock.o >> diff --git a/drivers/clk/axs10x/i2s_pll_clock.c >> b/drivers/clk/axs10x/i2s_pll_clock.c >> new file mode 100644 >> index 000..411310d >> --- /dev/null >> +++ b/drivers/clk/axs10x/i2s_pll_clock.c >> @@ -0,0 +1,228 @@ >> +/* >> + * Synopsys AXS10X SDP I2S PLL clock driver >> + * >> + * Copyright (C) 2016 Synopsys >> + * >> + * This file is licensed under the terms of the GNU General Public >> + * License version 2. This program is licensed "as is" without any >> + * warranty of any kind, whether express or implied. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +/* PLL registers addresses */ >> +#define PLL_IDIV_REG0x0 >> +#define PLL_FBDIV_REG 0x4 >> +#define PLL_ODIV0_REG 0x8 >> +#define PLL_ODIV1_REG 0xC >> + >> +struct i2s_pll_cfg { >> +unsigned int rate; >> +unsigned
Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT
I wonder if there are any thoughts about this question. Please treat this as a polite reminder to take a look to this problem. Regards, Lada On Fri, 2016-04-22 at 16:25 +0300, Lada Trimasova wrote: I have a question about user-space perf handling error numbers. The problem is that PMU interrupts are not supported in arc700 architecture and it is impossible to evaluate `perf record` command. In our perf implementation we set PERF_PMU_CAP_NO_INTERRUPT flag so core perf infrastructure knows we don't have interrupts. Kernel `sys_perf_event_open` handler checks if PMU interrupts are supported and returns ENOTSUPP (524) error code. I'd expect that perf implementation checks the return value of syscalls and gives the user understandable error message. But now I see: ->8--- # perf record ls The sys_perf_event_open() syscall returned with 524 (Unknown error 524) for event (cycles:ppp). /bin/dmesg may provide additional information. No CONFIG_PERF_EVENTS=y kernel support configured? ->8--- As you can see the root cause of this error message is not obvious. CONFIG_PERF_EVENTS is selected but still there's a problem while existing suggestion barely makes any sense. So probably there could be a way to determine if CONFIG_PERF_EVENTS was selected or not. I am not sure about the correct way of solving this problem. Maybe I should add some checks of syscalls return values and give user a warning when not PMU interrupts are available. Any suggestions are appreciated. Regards, Lada Trimasova.em ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH 02/23] arc: select GPIOLIB directly
On Fri, Apr 22, 2016 at 7:16 AM, Vineet Gupta wrote: > On Wednesday 20 April 2016 02:28 PM, Linus Walleij wrote: >> Instead of indirectly selecting GPIOLIB via the >> ARCH_REQUIRE_GPIOLIB symbol, just select GPIOLIB. >> >> Cc: Michael Büsch >> Cc: Vineet Gupta >> Cc: linux-snps-arc@lists.infradead.org >> Signed-off-by: Linus Walleij >> --- >> Various arch maintainers: > > It would be nice to get the cover latter as well to get more context. The > whole > series didn't seem to be CCed to lkml either. Sorry for that. > Anyhow I found some reference on > linux-gpio patchworks and seems like a nice cleanup. > > So for arch/arc/* > > Acked-by: Vineet Gupta Thanks, patch applied to the GPIO tree with your ACK. Yours, Linus Walleij ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT
On Friday 22 April 2016 06:56 PM, Lada Trimasova wrote: > I have a question about user-space perf handling error numbers. > The problem is that PMU interrupts are not supported in arc700 > architecture and it is impossible to evaluate `perf record` command. > In our perf implementation we set PERF_PMU_CAP_NO_INTERRUPT flag so > core perf infrastructure knows we don't have interrupts. > > Kernel `sys_perf_event_open` handler checks if PMU interrupts are > supported and returns ENOTSUPP (524) error code. > I'd expect that perf implementation checks the return value of syscalls > and gives the user understandable error message. > But now I see: > ->8--- > # perf record ls > The sys_perf_event_open() syscall returned with 524 (Unknown error 524) > for event (cycles:ppp). I think what we have now is sufficient - but u seem to want a prettier failure output. Anyhow, this print is coming from util/evsel.c: perf_evsel__open_strerror() At the very least you want another entry in switch case for ENOTSUPP and then check if event was sampling one ( evsel->attr.sample_period) - use that as a hint for saying sampling events not supported. But this will print the same even if CONFIG_PERF_EVENTS=n. To really fix this you would want to change the error code returned by SYSCALL_DEFINE5(perf_event_open for PERF_PMU_CAP_NO_INTERRUPT to say -EOPNOTSUPP and use the sample_period to say this was for samplign events! However this is an ABI change and might not be acceptable as some existing scripts etc might break. > /bin/dmesg may provide additional information. > No CONFIG_PERF_EVENTS=y kernel support configured? > ->8--- > > As you can see the root cause of this error message is not obvious. > CONFIG_PERF_EVENTS is selected but still there's a problem while > existing suggestion barely makes any sense. > So probably there could be a way to determine if CONFIG_PERF_EVENTS was > selected or not. > > I am not sure about the correct way of solving this problem. Maybe I > should add some checks of syscalls return values and give user > a warning when not PMU interrupts are available. > Any suggestions are appreciated. > > Regards, > Lada Trimasova. > ___ > linux-snps-arc mailing list > linux-snps-arc@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-snps-arc ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[GIT PULL] drm: Add support of ARC PGU display controller
Hi Dave, This is DRM driver for ARC PGU - simple bitstreamer used on Synopsys ARC SDP boards (both AXS101 and AXS103). Those sources are from v6 series floated to mailing list here https://lists.freedesktop.org/archives/dri-devel/2016-April/105156.html and based on top of today's drm-next branch. Best regards, Alexey The following changes since commit 027b3f8ba9277410c3191d72d1ed2c6146d8a668: drm/modes: stop handling framebuffer special (2016-04-22 10:47:16 +1000) are available in the git repository at: https://github.com/foss-for-synopsys-dwc-arc-processors/linux.git topic-arcpgu-v6 for you to fetch changes up to b8c1eca1e089e8f4247b19b73955c875bf7b18ae: arc: axs10x - add support of ARC PGU (2016-04-26 18:26:54 +0300) Alexey Brodkin (3): drm: Add DT bindings documentation for ARC PGU display controller MAINTAINERS: Add maintainer for ARC PGU display controller arc: axs10x - add support of ARC PGU Carlos Palminha (1): drm: Add support of ARC PGU display controller Documentation/devicetree/bindings/display/snps,arcpgu.txt | 35 +++ MAINTAINERS | 6 ++ arch/arc/boot/dts/axs10x_mb.dtsi | 61 drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/arc/Kconfig | 10 ++ drivers/gpu/drm/arc/Makefile | 2 + drivers/gpu/drm/arc/arcpgu.h | 50 ++ drivers/gpu/drm/arc/arcpgu_crtc.c | 257 +++ drivers/gpu/drm/arc/arcpgu_drv.c | 282 drivers/gpu/drm/arc/arcpgu_hdmi.c | 201 + drivers/gpu/drm/arc/arcpgu_regs.h | 40 12 files changed, 947 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/snps,arcpgu.txt create mode 100644 drivers/gpu/drm/arc/Kconfig create mode 100644 drivers/gpu/drm/arc/Makefile create mode 100644 drivers/gpu/drm/arc/arcpgu.h create mode 100644 drivers/gpu/drm/arc/arcpgu_crtc.c create mode 100644 drivers/gpu/drm/arc/arcpgu_drv.c create mode 100644 drivers/gpu/drm/arc/arcpgu_hdmi.c create mode 100644 drivers/gpu/drm/arc/arcpgu_regs.h ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH 0/2] ARC: enable per-device dma and reserved memory in DT
This tiny series enbles support of generic per-device coherent dma memory and ability to specify reserved memory regions to be used in those per-device mappings. In particular this allowed us to move frame-buffer memory out of IOC aperture. Cc: linux-ker...@vger.kernel.org Alexey Brodkin (2): ARC: support generic per-device coherent dma mem ARC: add support for reserved memory defined by device tree arch/arc/Kconfig | 2 ++ arch/arc/mm/init.c | 4 2 files changed, 6 insertions(+) -- 2.5.5 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH 2/2] ARC: add support for reserved memory defined by device tree
Enable reserved memory initialization from device tree. Signed-off-by: Alexey Brodkin Cc: Grant Likely Cc: Marek Szyprowski Cc: linux-ker...@vger.kernel.org --- arch/arc/Kconfig | 1 + arch/arc/mm/init.c | 4 2 files changed, 5 insertions(+) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 61d69e6..33c1fc7 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -35,6 +35,7 @@ config ARC select NO_BOOTMEM select OF select OF_EARLY_FLATTREE + select OF_RESERVED_MEM select PERF_USE_VMALLOC select HAVE_DEBUG_STACKOVERFLOW select HAVE_GENERIC_DMA_COHERENT diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index 7d2c4fb..5487d0b 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -13,6 +13,7 @@ #ifdef CONFIG_BLK_DEV_INITRD #include #endif +#include #include #include #include @@ -136,6 +137,9 @@ void __init setup_arch_memory(void) memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); #endif + early_init_fdt_reserve_self(); + early_init_fdt_scan_reserved_mem(); + memblock_dump_all(); /*- node/zones setup --*/ -- 2.5.5 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH 1/2] ARC: support generic per-device coherent dma mem
Signed-off-by: Alexey Brodkin Cc: linux-ker...@vger.kernel.org --- arch/arc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 208aae0..61d69e6 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -37,6 +37,7 @@ config ARC select OF_EARLY_FLATTREE select PERF_USE_VMALLOC select HAVE_DEBUG_STACKOVERFLOW + select HAVE_GENERIC_DMA_COHERENT config MIGHT_HAVE_PCI bool -- 2.5.5 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [GIT PULL] drm: Add support of ARC PGU display controller
On 27 April 2016 at 01:28, Alexey Brodkin wrote: > Hi Dave, > > This is DRM driver for ARC PGU - simple bitstreamer used on > Synopsys ARC SDP boards (both AXS101 and AXS103). Hi Alexey, I've pulled this tree into drm-next now, it seems to at least build here, Thanks, Dave. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc