Driver fix for newest Linux

22 views
Skip to first unread message

Christoph Rüthing

unread,
Feb 27, 2017, 3:50:17 PM2/27/17
to ReconOS
Dear ReconOS users,

many of you were using a newer Linux kernel together with ReconOS and encountered some issues regarding the interrupt numbers (e.g. the SortDemo simply freezed and did not work correctly). Therefore, I implemented a quick fix in the driver module. It now reads the address and interrupt numbers of the ReconOS components from the device tree instead of using hard-coded values.

If you update your repository and recompile the driver module you will get into trouble, since the device tree you are using probably does not include the ReconOS components (correctly). Therefore, I want to inform you that you need to add these components as follows (as also noted in the commit message and in the getting started in https://github.com/ReconOS/reconos.github.io/blob/develop/gettingstarted/tutorial/index.md). The diff shows the necessary changes for the default device tree shipped with the Linux kernel. The device tree used in U-Boot does not need to be adjusted, since U-Boot does not care about the ReconOS components.
--- a/arch/arm/boot/dts/zynq-zed.dts
+++ b/arch/arm/boot/dts/zynq-zed.dts
@@ -31,7 +31,7 @@
        };

        chosen {
-               bootargs = "";
+               bootargs = "console=ttyPS0,115200 root=/dev/nfs rw nfsroot=<<hostip>>:<<path>>,tcp,nfsvers=3 ip=<<boardip>>:::255.255.255.0:reconos:eth0:off earlyprintk";
                stdout-path = "serial0:115200n8";
        };

@@ -42,6 +42,27 @@
                view-port = <0x0170>;
                drv-vbus;
        };
+
+       amba: amba {
+               reconos_osif: reconos_osif@75a00000 {
+                       compatible = "upb,reconos-osif-3.1";
+                       reg = <0x75a00000 0x10000>;
+               };
+
+               reconos_osif_intc: reconos_osif_intc@7b400000 {
+                       compatible = "upb,reconos-osif-intc-3.1";
+                       reg = <0x7b400000 0x10000>;
+                       interrup-parent = <&intc>;
+                       interrupts = <0 58 4>;
+               };
+
+               reconos_proc_control: reconos_proc_control@6fe00000 {
+                       compatible = "upb,reconos-control-3.1";
+                       reg = <0x6fe00000 0x10000>;
+                       interrupt-parent = <&intc>;
+                       interrupts = <0 59 4>;
+               };
+       };
 };

 &clkc {

Note, that this fix is just a quick solution for the problems many of you had. It is not a very nice solution, since we are searching manually for the ReconOS components in the device tree. I'm currently also working on a better solution in the develop_ic branch, but there are some more changes in ReconOS' hardware cores involved and it is not yet finished.

Hopefully, this change does not break anything for you and helps you in using the newest Linux kernel. If you encounter any issues, feel free to reply.

Yours,
Christoph
Reply all
Reply to author
Forward
0 new messages