i patched it manually and it worked
do you think it makes sense to add this patch to your repo? ...i can make the size of the reg in uio.dtsi more flexible...
1.) Extend Makefile in /
Code: Select all
tmp/%.tree/system.dts: tmp/%.hwdef $(DTREE_DIR)
mkdir -p $(@D)
$(HSI) -source scripts/devicetree.tcl -tclargs $* $(PROC) $(DTREE_DIR)
patch $@ patches/devicetree.patch
cp patches/uio.dtsi tmp/$(NAME).tree
patch $@ patches/devicetree_uio.patch
2.) add uio.dtsi file to /patches (0x1000 should be changed accordingly):
Code: Select all
/ {
uio0: uio@40000000 {
compatible = "generic-uio";
reg = <0x40000000 0x1000>;
};
};
3.) add devicetree_uio.patch file to /patches:
Code: Select all
--- system.dts 2015-05-23 19:57:00.000000000 +0200
+++ system_new.dts 2015-05-24 18:34:00.000000000 +0200
@@ -7,6 +7,7 @@
/dts-v1/;
/include/ "zynq-7000.dtsi"
+/include/ "uio.dtsi"
/ {
cpus {
cpu@0 {
4.) add uio_pdrv_genirq.of_id=generic-uio to kernel boot arguments in /scripts/devicetree.tcl
Code: Select all
set boot_args {console=ttyPS0,115200 root=/dev/mmcblk0p2 ro rootfstype=ext4 earlyprintk rootwait uio_pdrv_genirq.of_id=generic-uio}
5.) call the following command to rebuild the device tree (can be done quicker by running the command @pavel posted):
$ make Name=red_pitaya_0_92 all
6.) copy boot.bin, devicetree.dtb, uImage to the sd card
7.) reboot red pitaya
8.) check if /dev/uio0 is there:
$ ls /dev/uio0
@pavel: my uio.dtsi file looks a bit different than your pl.dtsi file.... what is amba_pl?
@pavel: i saw your correctly modified the offset in the blink example
Code: Select all
*(uint32_t *)(ptr + 0x30) ^= (1 << 3);