Re: [linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 2/2] arch: arm64: dts: add overlay dts file

2019-10-15 Thread Quanyang Wang



On 10/15/19 11:27 PM, Bruce Ashfield wrote:

On Mon, Oct 14, 2019 at 6:19 AM Quanyang Wang
 wrote:


On 10/14/19 6:00 PM, Michal Simek wrote:

On 14. 10. 19 11:34, Quanyang Wang wrote:

On 10/14/19 3:58 PM, Michal Simek wrote:

On 14. 10. 19 9:55, Quanyang Wang wrote:

On 10/14/19 2:05 PM, Michal Simek wrote:

On 13. 10. 19 15:33, quanyang.w...@windriver.com wrote:

From: MengLi 

Add overlay dts file for updating FPGA bitstream file on
zynqmp platform.

Signed-off-by: Meng Li 
Signed-off-by: Quanyang Wang 
---
arch/arm64/boot/dts/xilinx/Makefile|  1 +
.../dts/xilinx/zynqmp-zcu102-fpga-update.dts   | 18
++
2 files changed, 19 insertions(+)
create mode 100644
arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts

diff --git a/arch/arm64/boot/dts/xilinx/Makefile
b/arch/arm64/boot/dts/xilinx/Makefile
index bec4746fe721..d56c449988d0 100644
--- a/arch/arm64/boot/dts/xilinx/Makefile
+++ b/arch/arm64/boot/dts/xilinx/Makefile
@@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu100-revC.dtb
dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-revA.dtb
dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-revB.dtb
dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-rev1.0.dtb
+dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-fpga-update.dtb
dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu104-revA.dtb
dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu104-revC.dtb
dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu106-revA.dtb
diff --git
a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts
b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts
new file mode 100644
index ..f1e1506b6210
--- /dev/null
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts
@@ -0,0 +1,18 @@
+// overlay dts file.
+/dts-v1/;
+/plugin/;
+
+/ {
+fragment@0 {
+target-path = "/fpga-full";
+#address-cells = <1>;
+#size-cells = <1>;
+
+__overlay__ {
+#address-cells = <2>;
+#size-cells = <2>;
+
+firmware-name = "system.bit.bin";
+};
+};
+};


I understand what you want to do but not sure why you think that
this is
the best way how to do it.

Hi Michal,

This patch is based on the url:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841847/Solution+ZynqMP+PL+Programming#x-Programming+the+PL+through+Linux


"FPGA programming using Device Tree Overlay (DTO)".

We will describe how to programming FPGA by using 2 methods in README
for our customer:

one is FPGA programming using sysfs attributes



And the other is FPGA programming using Device Tree Overlay (DTO)



This patch is used for the second method.

Is there any better way to do it?


It is not about that using fragments is incorrect. It is about reasons
to include this dts file to Linux source code. Because this fragment is
just doing programming without anything else. It means it is coupled
with also description what it is in DT which is missing here.
It means this is just part A (with system.bit.bin generic name - which
is not fully accurate) and part B is missing.
In part B there should be what you are including with clock/reset and IP
part.
That's why my question remains if make even sense to merge part A
without any details about part B.

Hi Michal,

The target for this patch is to just simply test the FPGA programming
function. So it changes nothing.

It seems to be improper to add such a dts file to kernel source.

I will transform the dts file to a text description in README or make it
to be a more detailed and integral dts file in a V2 patch.

ok. let's see where you want to add this readme. If this targets
"Documentation" folder then not a problem at all.

Hi Michal,

Sorry for making you confuse. The README which I said about is not in
kernel source but in WRLinux project.

I mean that maybe I can just describe how to test FPGA programming in
some place of our own Product Document

Just confirming that I'll drop this patch from my pending queue, since
either this is going to be in documentation or somewhere else in the
dts.


Hi Bruce,

Yes, please drop this patch.

Thanks,

Quanyang



Cheers,

Bruce


instead of adding a dts file to kernel source since it's just a simple
testcase.

Thanks,

Quanyang


M




--
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 2/2] arch: arm64: dts: add overlay dts file

2019-10-15 Thread Bruce Ashfield
On Mon, Oct 14, 2019 at 6:19 AM Quanyang Wang
 wrote:
>
>
> On 10/14/19 6:00 PM, Michal Simek wrote:
> > On 14. 10. 19 11:34, Quanyang Wang wrote:
> >> On 10/14/19 3:58 PM, Michal Simek wrote:
> >>> On 14. 10. 19 9:55, Quanyang Wang wrote:
>  On 10/14/19 2:05 PM, Michal Simek wrote:
> > On 13. 10. 19 15:33, quanyang.w...@windriver.com wrote:
> >> From: MengLi 
> >>
> >> Add overlay dts file for updating FPGA bitstream file on
> >> zynqmp platform.
> >>
> >> Signed-off-by: Meng Li 
> >> Signed-off-by: Quanyang Wang 
> >> ---
> >>arch/arm64/boot/dts/xilinx/Makefile|  1 +
> >>.../dts/xilinx/zynqmp-zcu102-fpga-update.dts   | 18
> >> ++
> >>2 files changed, 19 insertions(+)
> >>create mode 100644
> >> arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts
> >>
> >> diff --git a/arch/arm64/boot/dts/xilinx/Makefile
> >> b/arch/arm64/boot/dts/xilinx/Makefile
> >> index bec4746fe721..d56c449988d0 100644
> >> --- a/arch/arm64/boot/dts/xilinx/Makefile
> >> +++ b/arch/arm64/boot/dts/xilinx/Makefile
> >> @@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu100-revC.dtb
> >>dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-revA.dtb
> >>dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-revB.dtb
> >>dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-rev1.0.dtb
> >> +dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu102-fpga-update.dtb
> >>dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu104-revA.dtb
> >>dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu104-revC.dtb
> >>dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu106-revA.dtb
> >> diff --git
> >> a/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts
> >> b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts
> >> new file mode 100644
> >> index ..f1e1506b6210
> >> --- /dev/null
> >> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-fpga-update.dts
> >> @@ -0,0 +1,18 @@
> >> +// overlay dts file.
> >> +/dts-v1/;
> >> +/plugin/;
> >> +
> >> +/ {
> >> +fragment@0 {
> >> +target-path = "/fpga-full";
> >> +#address-cells = <1>;
> >> +#size-cells = <1>;
> >> +
> >> +__overlay__ {
> >> +#address-cells = <2>;
> >> +#size-cells = <2>;
> >> +
> >> +firmware-name = "system.bit.bin";
> >> +};
> >> +};
> >> +};
> >>
> > I understand what you want to do but not sure why you think that
> > this is
> > the best way how to do it.
>  Hi Michal,
> 
>  This patch is based on the url:
> 
>  https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841847/Solution+ZynqMP+PL+Programming#x-Programming+the+PL+through+Linux
> 
> 
>  "FPGA programming using Device Tree Overlay (DTO)".
> 
>  We will describe how to programming FPGA by using 2 methods in README
>  for our customer:
> 
>  one is FPGA programming using sysfs attributes
>  
> 
> 
>  And the other is FPGA programming using Device Tree Overlay (DTO)
>  
> 
> 
>  This patch is used for the second method.
> 
>  Is there any better way to do it?
> 
> >>> It is not about that using fragments is incorrect. It is about reasons
> >>> to include this dts file to Linux source code. Because this fragment is
> >>> just doing programming without anything else. It means it is coupled
> >>> with also description what it is in DT which is missing here.
> >>> It means this is just part A (with system.bit.bin generic name - which
> >>> is not fully accurate) and part B is missing.
> >>> In part B there should be what you are including with clock/reset and IP
> >>> part.
> >>> That's why my question remains if make even sense to merge part A
> >>> without any details about part B.
> >> Hi Michal,
> >>
> >> The target for this patch is to just simply test the FPGA programming
> >> function. So it changes nothing.
> >>
> >> It seems to be improper to add such a dts file to kernel source.
> >>
> >> I will transform the dts file to a text description in README or make it
> >> to be a more detailed and integral dts file in a V2 patch.
> > ok. let's see where you want to add this readme. If this targets
> > "Documentation" folder then not a problem at all.
>
> Hi Michal,
>
> Sorry for making you confuse. The README which I said about is not in
> kernel source but in WRLinux project.
>
> I mean that maybe I can just describe how to test FPGA programming in
> some place of our own Product Document

Just 

[linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 0/1] xilinx-zynqmp: fix calltrace

2019-10-15 Thread quanyang.wang
From: Quanyang Wang 

Hi Bruce, Michal,

This patch fixes a calltrace when enable CONFIG_TRACING kernel option.

Would you please help review and merge these patches to linux-yocto
v5.2/standard/xlnx-soc branch?

Quanyang Wang (1):
  dma: xilinx: dpdma: alloc xilinx_dpdma_tx_desc using GFP_ATOMIC

 drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 1/1] dma: xilinx: dpdma: alloc xilinx_dpdma_tx_desc using GFP_ATOMIC

2019-10-15 Thread quanyang.wang
From: Quanyang Wang 

The function xilinx_dpdma_chan_alloc_tx_desc can be called
from atomic context, hence use GFP_ATOMIC instead of GFP_KERNEL,
or else it will cause the calltrace as below:

BUG: sleeping function called from invalid context at mm/slab.h:418
in_atomic(): 1, irqs_disabled(): 128, pid: 416, name: alsa-sink-(null 
Preemption disabled at:
[] snd_pcm_stream_lock_irq+0x40/0x50
CPU: 2 PID: 416 Comm: alsa-sink-(null Tainted: G O 5.2.17-yocto-standard #1
Hardware name: ZynqMP ZCU102 Rev1.0 (DT) Call trace:
dump_backtrace+0x0/0x138
show_stack+0x24/0x30
dump_stack+0x94/0xbc
___might_sleep+0x14c/0x178
__might_sleep+0x58/0x90
kmem_cache_alloc_trace+0x1a4/0x300
xilinx_dpdma_chan_alloc_tx_desc.isra.0+0x24/0x40
xilinx_dpdma_prep_dma_cyclic+0xc0/0x208
snd_dmaengine_pcm_trigger+0xf8/0x198
soc_pcm_trigger+0xb4/0x128
snd_pcm_do_start+0x48/0x58
snd_pcm_action_single+0x4c/0xa0
snd_pcm_action+0x78/0x90
snd_pcm_action_lock_irq+0x3c/0x60
snd_pcm_common_ioctl+0x4ac/0x10c8
snd_pcm_ioctl+0x48/0x68
do_vfs_ioctl+0x6d4/0x968
ksys_ioctl+0x84/0xb8
__arm64_sys_ioctl+0x28/0x38
el0_svc_common.constprop.0+0x74/0x180
el0_svc_handler+0x70/0x90
el0_svc+0x8/0xc

Signed-off-by: Quanyang Wang 
---
 drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/xilinx/xilinx_dpdma.c 
b/drivers/dma/xilinx/xilinx_dpdma.c
index 1ea509e00742..89ade893f51c 100644
--- a/drivers/dma/xilinx/xilinx_dpdma.c
+++ b/drivers/dma/xilinx/xilinx_dpdma.c
@@ -797,7 +797,7 @@ xilinx_dpdma_chan_alloc_tx_desc(struct xilinx_dpdma_chan 
*chan)
 {
struct xilinx_dpdma_tx_desc *tx_desc;
 
-   tx_desc = kzalloc(sizeof(*tx_desc), GFP_KERNEL);
+   tx_desc = kzalloc(sizeof(*tx_desc), GFP_ATOMIC);
if (!tx_desc)
return NULL;
 
-- 
2.17.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 1/1] xilinx-zynqmp: delete obsolete kernel options

2019-10-15 Thread quanyang.wang
From: Quanyang Wang 

These kernel options have been removed frome kernel, so
delete them from xilinx-zynqmp.cfg.

Signed-off-by: Quanyang Wang 
---
 bsp/xilinx-zynqmp/xilinx-zynqmp.cfg | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/bsp/xilinx-zynqmp/xilinx-zynqmp.cfg 
b/bsp/xilinx-zynqmp/xilinx-zynqmp.cfg
index 0560739c..fe8ae24d 100644
--- a/bsp/xilinx-zynqmp/xilinx-zynqmp.cfg
+++ b/bsp/xilinx-zynqmp/xilinx-zynqmp.cfg
@@ -35,9 +35,8 @@ CONFIG_NETDEVICES=y
 CONFIG_OF=y
 CONFIG_OF_MDIO=y
 CONFIG_ETHERNET=y
-CONFIG_NET_CADENCE=y
+CONFIG_NET_VENDOR_CADENCE=y
 CONFIG_MACB=y
-CONFIG_MACB_EXT_BD=y
 CONFIG_XILINX_EMACLITE=y
 CONFIG_XILINX_AXI_EMAC=y
 
@@ -71,7 +70,6 @@ CONFIG_SPI_XILINX=y
 CONFIG_SPI_ZYNQMP_GQSPI=y
 
 CONFIG_GPIOLIB=y
-CONFIG_GPIO_DEVRES=y
 CONFIG_OF_GPIO=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_XILINX=y
@@ -101,7 +99,6 @@ CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_SDHCI_OF_ARASAN=y
 
 CONFIG_EDAC=y
-CONFIG_EDAC_MM_EDAC=y
 CONFIG_EDAC_SYNOPSYS=y
 CONFIG_EDAC_ZYNQMP_OCM=y
 
@@ -129,7 +126,6 @@ CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_SI570=y
 CONFIG_COMMON_CLK_SI5324=y
 CONFIG_COMMON_CLK_ZYNQMP=y
-CONFIG_CLKSRC_OF=y
 CONFIG_IOMMU_API=y
 CONFIG_IOMMU_SUPPORT=y
 CONFIG_OF_IOMMU=y
@@ -141,7 +137,6 @@ CONFIG_REMOTEPROC=m
 CONFIG_ZYNQMP_R5_REMOTEPROC=m
 
 CONFIG_STAGING=y
-CONFIG_SOC_XILINX_ZYNQMP=y
 CONFIG_ZYNQMP_PM_DOMAINS=y
 CONFIG_PM_GENERIC_DOMAINS=y
 CONFIG_IRQCHIP=y
-- 
2.17.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel-cache master/yocto-5.2][PATCH 0/1] xilinx-zynqmp: delete obsolete kernel options

2019-10-15 Thread quanyang.wang
From: Quanyang Wang 

Hi Bruce, Michal,

This patch is to delete some obsolete kernel options. Now delete them
or else yocto will throw out build warning infos.

Could you please merge this patch into yocto-kernel-cache, branch is master and 
yocto-5.2?

Thanks,
Quanyang

Quanyang Wang (1):
  xilinx-zynqmp: delete obsolete kernel options

 bsp/xilinx-zynqmp/xilinx-zynqmp.cfg | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

-- 
2.17.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto