From: Tom Knot Date: Thu, 14 Jun 2018 09:22:02 +0000 (+0200) Subject: Added debug prints for line discipline X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=a11c9d91b7021c95f7951613bdb9703142a930b5;p=graphit%2Funipi-kernel.git Added debug prints for line discipline --- diff --git a/modules/unipi/Makefile b/modules/unipi/Makefile index e201691..a545188 100644 --- a/modules/unipi/Makefile +++ b/modules/unipi/Makefile @@ -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 diff --git a/modules/unipi/src/unipi_common.h b/modules/unipi/src/unipi_common.h index d1121f8..a98a246 100644 --- a/modules/unipi/src/unipi_common.h +++ b/modules/unipi/src/unipi_common.h @@ -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 #endif diff --git a/modules/unipi/src/unipi_uart.c b/modules/unipi/src/unipi_uart.c index 8c05b50..ed363c7 100644 --- a/modules/unipi/src/unipi_uart.c +++ b/modules/unipi/src/unipi_uart.c @@ -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); } diff --git a/version.txt b/version.txt index d195d5a..91bb6e5 100644 --- a/version.txt +++ b/version.txt @@ -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