Added debug prints for line discipline
authorTom Knot <tomasknot@gmail.com>
Thu, 14 Jun 2018 09:22:02 +0000 (11:22 +0200)
committerTom Knot <tomasknot@gmail.com>
Thu, 14 Jun 2018 09:22:02 +0000 (11:22 +0200)
modules/unipi/Makefile
modules/unipi/src/unipi_common.h
modules/unipi/src/unipi_uart.c
version.txt

index e201691a23016aeb5fc58eb23a3f44a9b36602d7..a545188b3388518199c839460060386d92a0258a 100644 (file)
@@ -3,7 +3,7 @@
 # if necessary.
  
 SYMLINK_DIR_PATH = /run/kernel/neuron_spi
-LINUX_DIR_PATH = /root/bokula/linux/
+LINUX_DIR_PATH = /root/linux/4_9_14/linux/
 SRC_DIR_PATH = $(PWD)/src
 BIN_DIR_PATH = $(PWD)/bin
 
index d1121f8d0982f3a4d1839459f5d3a5e00f67ecb7..a98a24635ebc69070c66514b5b592738b5dce440 100644 (file)
@@ -47,7 +47,7 @@
  * Definitions *
  ***************/
 
-#define NEURONSPI_SCHED_REQUIRED 0 // Older kernels do not require sched/types to be specifically imported
+#define NEURONSPI_SCHED_REQUIRED 1 // Older kernels do not require sched/types to be specifically imported
 #if NEURONSPI_SCHED_REQUIRED > 0
        #include <uapi/linux/sched/types.h>
 #endif
index 8c05b50d0177eb9cb7a87a549e72f65313cfbedb..ed363c76397eee26fff01c3e787280cf1de56b36 100644 (file)
@@ -119,15 +119,17 @@ int       neuronspi_uart_ioctl (struct uart_port *port, unsigned int ioctl_code, unsig
                printk(KERN_INFO "NEURONSPI: IOCTL 0x5480\n");
 //#endif
                write_length = neuronspi_spi_compose_single_register_write(NEURONSPI_UART_TIMEOUT_REGISTER, &inp_buf, &outp_buf, (ioctl_arg * 1000000) / n_port->baud);
+               printk(KERN_INFO "NEURONSPI: val_upper: %x, val_lower: %x", outp_buf[10], outp_buf[11]);
                neuronspi_spi_send_message(spi, inp_buf, outp_buf, write_length, n_spi->ideal_frequency, 25, 1, 0);
+
                kfree(inp_buf);
                kfree(outp_buf);
                return 0;
        }
        case 0x5481: {
-//#if NEURONSPI_DETAILED_DEBUG > 0
+#if NEURONSPI_DETAILED_DEBUG > 0
                printk(KERN_INFO "NEURONSPI: IOCTL 0x5481\n");
-//#endif
+#endif
                write_length = neuronspi_spi_compose_single_register_write(NEURONSPI_UART_TIMEOUT_REGISTER, &inp_buf, &outp_buf, ioctl_arg);
                neuronspi_spi_send_message(spi, inp_buf, outp_buf, write_length, n_spi->ideal_frequency, 25, 1, 0);
                kfree(inp_buf);
@@ -163,10 +165,10 @@ void neuronspi_uart_set_termios(struct uart_port *port, struct ktermios *termios
                }
        }
        if (old && termios && old->c_line != termios->c_line) {
-               printk(KERN_INFO "NEURONSPI: Line Discipline change/n");
+               printk(KERN_INFO "NEURONSPI: Line Discipline change\n");
                if (termios->c_line == N_PROFIBUS_FDL) {
 #if NEURONSPI_DETAILED_DEBUG > 0
-                       printk(KERN_INFO "NEURONSPI: Line Discipline change/n");
+                       printk(KERN_INFO "NEURONSPI: Line Discipline change\n");
 #endif
                        neuronspi_uart_set_ldisc(port, termios);
                }
index d195d5a6021308e686bd88b705aec55631f1064b..91bb6e5ae0e9613a761349bdd4104b9520ab2a90 100644 (file)
@@ -1 +1 @@
-Repository:neuron-kernel ActiveBranch:[master] PrecedingRelease:v.0.10 PrecedingRevision:39(2b8571a) LatestCommit:Thu Jun 14 10:53:36 CEST 2018
+Repository:neuron-kernel ActiveBranch:[master] PrecedingRelease:v.0.10 PrecedingRevision:40(31707cd) LatestCommit:Thu Jun 14 11:22:02 CEST 2018