#define PIN_BPSEND_ACK RK2818_PIN_PE0\r
#define PIN_APSEND_ACK RK2818_PIN_PF7\r
\r
-#define MAX_SPI_LEN 768 //the bytes of spi write or read one time\r
-#define TRUE 1\r
-#define FALSE 0\r
+#define MAX_SPI_LEN 512 //the bytes of spi write or read one time\r
+\r
\r
static int spi_dpram_write_buf(struct spi_dpram *dpram, unsigned short int addr, unsigned char *buf, unsigned int len)\r
{ \r
container_of(work, struct spi_fpga_port, dpram.spi_dpram_irq_work);\r
\r
unsigned short int mbox = port->dpram.read_irq(&port->dpram);\r
- unsigned int ptr;\r
- unsigned int len;\r
- //int i,ret;\r
-\r
+ unsigned int ptr,len;\r
+ int i;\r
+ char temp,*p;\r
+ printk("Enter::%s,mbox=%d\n",__FUNCTION__,mbox);\r
//gNumRecInt = mbox & 0x1fff;\r
//if(gNumRecInt - gNumLastRecInt !=1)\r
//if(++gNumLastRecInt > (1<<12))\r
{ \r
//RAM0\r
ptr = port->dpram.read_ptr(&port->dpram,SPI_DPRAM_PTR0_BPWRITE_APREAD);\r
- len = ptr;\r
+ if(ptr%2)\r
+ len = ptr+1;\r
+ else\r
+ len = ptr; \r
port->dpram.read_dpram(&port->dpram, SPI_DPRAM_BPWRITE_START, port->dpram.prx, len);\r
- port->dpram.rec_len += len; \r
- printk("%s:ram0:len=%d\n",__FUNCTION__,len); \r
+ port->dpram.rec_len += ptr; \r
+ printk("%s:ram0:ptr=%d,len=%d\n",__FUNCTION__,ptr,len); \r
//send ack\r
//if(++gNumSendAck > (1<<12))\r
//gNumSendAck = 0;\r
//port->dpram.write_ack(&port->dpram, (MAILBOX_APSEND_ACK | MAILBOX_RAM0 | gNumSendAck));\r
\r
+ p = port->dpram.prx;\r
+ for(i=0;i<(len>>1);i++)\r
+ {\r
+ temp = *(p+(i<<1));\r
+ *(p+(i<<1))= *(p+(i<<1)+1);\r
+ *(p+(i<<1)+1) = temp;\r
+ }\r
+\r
+ for(i=0;i<ptr;i++)\r
+ printk("%s:prx[%d]=0x%x\n",__FUNCTION__,i,*p++); \r
+ \r
//wake up ap to read data\r
wake_up_interruptible(&port->dpram.recq);\r
+\r
+ mutex_lock(&port->dpram.rec_lock);\r
+\r
+ //allow bp write ram0 again\r
+ port->dpram.write_ack(&port->dpram, (MAILBOX_APSEND_ACK | MAILBOX_RAM0));\r
\r
//printk("%s:r_irq=0x%x,s_ack=0x%x\n",__FUNCTION__,mbox, (MAILBOX_APSEND_ACK | MAILBOX_RAM0 | gNumSendAck));\r
}\r
{\r
//RAM2\r
ptr = port->dpram.read_ptr(&port->dpram,SPI_DPRAM_PTR2_BPWRITE_APREAD);\r
- len = ptr;\r
+ if(ptr%2)\r
+ len = ptr+1;\r
+ else\r
+ len = ptr; \r
port->dpram.read_dpram(&port->dpram, SPI_DPRAM_LOG_BPWRITE_START, port->dpram.prx, len);\r
- port->dpram.rec_len += len; \r
- printk("%s:ram2:len=%d\n",__FUNCTION__,len); \r
+ port->dpram.rec_len += ptr; \r
+ printk("%s:ram2:ptr=%d,len=%d\n",__FUNCTION__,ptr,len); \r
//if(++gNumSendAck > (1<<12))\r
//gNumSendAck = 0;\r
//port->dpram.write_ack(&port->dpram, (MAILBOX_APSEND_ACK | MAILBOX_RAM2 | gNumSendAck));\r
+\r
+ p = port->dpram.prx;\r
+ for(i=0;i<(len>>1);i++)\r
+ {\r
+ temp = *(p+(i<<1));\r
+ *(p+(i<<1))= *(p+(i<<1)+1);\r
+ *(p+(i<<1)+1) = temp;\r
+ }\r
\r
//wake up ap to read data\r
wake_up_interruptible(&port->dpram.recq);\r
+\r
+ mutex_lock(&port->dpram.rec_lock);\r
+\r
+ //allow bp write ram0 again\r
+ port->dpram.write_ack(&port->dpram, (MAILBOX_APSEND_ACK | MAILBOX_RAM2));\r
\r
//printk("%s:r_irq=0x%x,s_ack=0x%x\n",__FUNCTION__, mbox, (MAILBOX_APSEND_ACK | MAILBOX_RAM2 | gNumSendAck));\r
}\r
-\r
-\r
\r
}\r
\r
int spi_dpram_handle_ack(struct spi_device *spi)\r
{\r
struct spi_fpga_port *port = spi_get_drvdata(spi);\r
- \r
+ printk("Enter::%s,LINE=%d\n",__FUNCTION__,__LINE__);\r
//clear ack interrupt\r
port->dpram.read_ack(&port->dpram);\r
\r
return 0;\r
}\r
\r
-\r
+int gRecCount = 0;\r
static ssize_t dpr_read (struct file *filp, char __user *buffer, size_t count, loff_t *ppos)\r
{\r
- //int ret;\r
+ int ret=0; \r
struct spi_fpga_port *port = filp->private_data;\r
- printk("%s:line=%d,port=0x%x\n",__FUNCTION__,__LINE__,(int)port);\r
+\r
+ down_interruptible(&port->dpram.rec_sem);\r
\r
+ printk("%s, port=0x%x , count=%d, port->dpram.rec_len=%d \n",__FUNCTION__, (int)port, count, port->dpram.rec_len); \r
+ \r
+ //printk("%s:CURRENT_TASK=0x%x\n",__FUNCTION__,current); \r
while(port->dpram.rec_len == 0)\r
{\r
if( filp->f_flags&O_NONBLOCK )\r
printk("%s:NO data in dpram!\n",__FUNCTION__);\r
return -ERESTARTSYS; \r
}\r
+\r
+ gRecCount = port->dpram.rec_len;\r
}\r
\r
/*read data from buffer*/\r
- if(copy_to_user((char*)buffer, (char *)port->dpram.prx, port->dpram.rec_len))\r
- {\r
- printk("%s:copy_to_user err!\n",__FUNCTION__);\r
- return -EFAULT;\r
- }\r
-\r
- count = port->dpram.rec_len;\r
- port->dpram.rec_len = 0;\r
+ if(port->dpram.rec_len >=count){ \r
+ if(copy_to_user((char*)buffer, (char *)(port->dpram.prx + gRecCount - port->dpram.rec_len), count))\r
+ {\r
+ printk("%s:copy_to_user err!\n",__FUNCTION__);\r
+ return -EFAULT;\r
+ }\r
+ ret = count; \r
+ }else{ \r
+ if(copy_to_user((char*)buffer, (char *)(port->dpram.prx + gRecCount - port->dpram.rec_len), port->dpram.rec_len))\r
+ {\r
+ printk("%s:copy_to_user err!\n",__FUNCTION__);\r
+ return -EFAULT;\r
+ }\r
+ ret = port->dpram.rec_len; \r
+ }\r
\r
- //allow bp write ram0 again\r
- port->dpram.write_ack(&port->dpram, (MAILBOX_APSEND_ACK | MAILBOX_RAM0));\r
+ #if 1\r
+ int i;\r
+ char *p = buffer;\r
+ for(i=0;i<ret;i++)\r
+ {\r
+ printk("dpr_read, prx[%d]=0x%x\n", i, *p++); \r
+ }\r
+ #endif\r
\r
- return count;\r
+ if(port->dpram.rec_len >= count){ \r
+ port->dpram.rec_len -= count; \r
+ }else{ \r
+ port->dpram.rec_len = 0; \r
+ }\r
+ \r
+ if(port->dpram.rec_len == 0){ \r
+ printk("port->dpram.rec_len to 0 \n"); \r
+ mutex_unlock(&port->dpram.rec_lock); \r
+ } \r
+ \r
+ up(&port->dpram.rec_sem);\r
+\r
+ return ret;\r
}\r
\r
\r
temp = *(p+(i<<1));\r
*(p+(i<<1))= *(p+(i<<1)+1);\r
*(p+(i<<1)+1) = temp;\r
- p=p+2;\r
}\r
\r
#if 1\r
gNumSendInt = 0;\r
\r
//send irq to bp after ap write data to dpram\r
- port->dpram.write_irq(&port->dpram, MAILBOX_APSEND_IRQ); \r
+ port->dpram.write_irq(&port->dpram, MAILBOX_APSEND_IRQ | MAILBOX_RAM1); \r
\r
return count;\r
\r
port = filp->private_data;\r
printk("%s:line=%d\n",__FUNCTION__,__LINE__);\r
\r
+#if 1\r
+ poll_wait(filp, &port->dpram.recq, wait);\r
+ poll_wait(filp, &port->dpram.sendq, wait);\r
+\r
+ if(port->dpram.rec_len >0)\r
+ {\r
+ mask |= POLLIN|POLLRDNORM;\r
+ DBG("%s:exsram_poll_____1\n",__FUNCTION__);\r
+ }\r
+ \r
+ if(port->dpram.apwrite_en == TRUE)\r
+ {\r
+ mask |= POLLOUT|POLLWRNORM;\r
+ DBG("%s:exsram_poll_____2\n",__FUNCTION__);\r
+ }\r
+#endif\r
+\r
return mask;\r
}\r
\r
//init the struct spi_dpram\r
init_waitqueue_head(&port->dpram.recq);\r
init_waitqueue_head(&port->dpram.sendq);\r
+ mutex_init(&port->dpram.rec_lock);\r
+ mutex_init(&port->dpram.send_lock);\r
+ init_MUTEX(&port->dpram.rec_sem);\r
+ init_MUTEX(&port->dpram.send_sem);\r
+ spin_lock_init(&port->dpram.spin_rec_lock);\r
+ spin_lock_init(&port->dpram.spin_send_lock);\r
port->dpram.rec_len = 0;\r
port->dpram.send_len = 0;\r
port->dpram.apwrite_en = TRUE;\r
#include <linux/init.h>\r
#include <linux/kernel.h>\r
#include <linux/mutex.h>\r
+#include <linux/seq_file.h>\r
#include <linux/serial_reg.h>\r
#include <linux/circ_buf.h>\r
#include <linux/gfp.h>\r
\r
#define UART_NR 1 /* Number of UARTs this driver can handle */\r
\r
-#define UART_XMIT_SIZE (PAGE_SIZE<<1)\r
+#define UART_XMIT_SIZE PAGE_SIZE\r
#define WAKEUP_CHARS 1024\r
\r
#define circ_empty(circ) ((circ)->head == (circ)->tail)\r
int index = port->uart.index;\r
int reg = 0, stat = 0;\r
int i;\r
-\r
- for(i=len+2;i>1;i--)\r
- buf[i] = buf[i-2];\r
+ unsigned char tx_buf[SPI_UART_FIFO_LEN+2];\r
+ \r
+ memcpy(tx_buf + 2, buf, len);\r
reg = ((((reg) | ICE_SEL_UART) & ICE_SEL_WRITE) | ICE_SEL_UART_CH(index));\r
- buf[0] = reg & 0xff;\r
- buf[1] = 0;\r
+ tx_buf[0] = reg & 0xff;\r
+ tx_buf[1] = 0;\r
\r
- stat = spi_write(port->spi, buf, len+2);\r
+ stat = spi_write(port->spi, tx_buf, len+2);\r
if(stat)\r
printk("%s:spi_write err!!!\n\n\n",__FUNCTION__); \r
- DBG("%s:reg=0x%x,buf=0x%x,len=0x%x\n",__FUNCTION__,reg&0xff,(int)buf,len);\r
+ DBG("%s:reg=0x%x,buf=0x%x,len=0x%x\n",__FUNCTION__,reg&0xff,(int)tx_buf,len);\r
return 0;\r
}\r
\r
* Beware: the lock ordering is critical.\r
*/\r
mutex_lock(&uart->open_lock);\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
spi = port->spi;\r
\r
port->spi = NULL;\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
if (uart->opened)\r
tty_hangup(uart->tty);\r
mutex_unlock(&uart->open_lock);\r
while (count-- >0 )\r
{\r
flag = TTY_NORMAL;\r
+ uart->icount.rx++;\r
ch = buf[num++];\r
tty_insert_flip_char(tty, ch, flag);\r
//printk("%c,",ch);\r
}\r
//printk("\n");\r
- tty_flip_buffer_push(tty); \r
}\r
+\r
+ tty_flip_buffer_push(tty); \r
+ \r
#else \r
//printk("rx:");\r
while (--max_count >0 )\r
uart->xmit.buf = (unsigned char *)page;\r
circ_clear(&uart->xmit);\r
\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
\r
/*\r
* Clear the FIFO buffers and disable them.\r
DBG("%s:LINE=%d,uart->ier=0x%x\n",__FUNCTION__,__LINE__,uart->ier);\r
/* Kick the IRQ handler once while we're still holding the host lock */\r
//spi_uart_handle_irq(port->spi);\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
return 0;\r
\r
//err1:\r
struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart);\r
DBG("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
#if 1\r
spi_uart_stop_rx(uart);\r
\r
UART_FCR_CLEAR_XMIT, SEL_UART);\r
spi_out(port, UART_FCR, 0, SEL_UART);\r
#endif\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
\r
//skip:\r
/* Free the transmit buffer page. */\r
\r
#if 1\r
if ( !(uart->ier & UART_IER_THRI)) {\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
DBG("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
/*Note:ICE65L08 output a 'Transmitter holding register interrupt' after 1us*/\r
printk("s,");\r
spi_uart_start_tx(uart);\r
- // spi_uart_handle_irq(port->spi);\r
- //mutex_unlock(&port->spi_lock); \r
+ //spi_uart_handle_irq(port->spi);\r
+ mutex_unlock(&port->spi_lock); \r
} \r
#endif \r
\r
printk("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
uart->x_char = ch;\r
if (ch && !(uart->ier & UART_IER_THRI)) {\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
spi_uart_start_tx(uart);\r
printk("%s:UART_IER=0x%x\n",__FUNCTION__,uart->ier);\r
spi_uart_handle_irq(port->spi);\r
- //mutex_unlock(&port->spi_lock); \r
+ mutex_unlock(&port->spi_lock); \r
}\r
}\r
\r
if (!I_IXOFF(tty) && !(tty->termios->c_cflag & CRTSCTS))\r
return;\r
printk("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
if (I_IXOFF(tty)) {\r
uart->x_char = STOP_CHAR(tty);\r
spi_uart_start_tx(uart);\r
spi_uart_clear_mctrl(uart, TIOCM_RTS);\r
\r
spi_uart_handle_irq(port->spi);\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
}\r
\r
static void spi_uart_unthrottle(struct tty_struct *tty)\r
printk("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
if (!I_IXOFF(tty) && !(tty->termios->c_cflag & CRTSCTS))\r
return;\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
if (I_IXOFF(tty)) {\r
if (uart->x_char) {\r
uart->x_char = 0;\r
spi_uart_set_mctrl(uart, TIOCM_RTS);\r
\r
spi_uart_handle_irq(port->spi);\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
}\r
\r
static void spi_uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios)\r
{\r
struct spi_uart *uart = tty->driver_data;\r
- //struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart);\r
+ struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart);\r
unsigned int cflag = tty->termios->c_cflag;\r
unsigned int mask = TIOCM_DTR;\r
DBG("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
RELEVANT_IFLAG(tty->termios->c_iflag ^ old_termios->c_iflag) == 0)\r
return;\r
\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
spi_uart_change_speed(uart, tty->termios, old_termios);\r
\r
/* Handle transition to B0 status */\r
spi_uart_stop_tx(uart);\r
}\r
}\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
\r
}\r
\r
struct spi_uart *uart = tty->driver_data;\r
struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart); \r
DBG("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
if (break_state == -1)\r
uart->lcr |= UART_LCR_SBC;\r
else\r
uart->lcr &= ~UART_LCR_SBC;\r
spi_out(port, UART_LCR, uart->lcr, SEL_UART);\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
return 0;\r
}\r
\r
static int spi_uart_tiocmget(struct tty_struct *tty, struct file *file)\r
{\r
struct spi_uart *uart = tty->driver_data;\r
- //struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart);\r
+ struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart);\r
int result;\r
DBG("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
result = uart->mctrl | spi_uart_get_mctrl(uart);\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
return result;\r
}\r
\r
unsigned int set, unsigned int clear)\r
{\r
struct spi_uart *uart = tty->driver_data;\r
- //struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart);\r
+ struct spi_fpga_port *port = container_of(uart, struct spi_fpga_port, uart);\r
DBG("%s:LINE=%d\n",__FUNCTION__,__LINE__);\r
- //mutex_lock(&port->spi_lock);\r
+ mutex_lock(&port->spi_lock);\r
spi_uart_update_mctrl(uart, set, clear);\r
- //mutex_unlock(&port->spi_lock);\r
+ mutex_unlock(&port->spi_lock);\r
\r
return 0;\r
}\r
\r
-#if 0\r
-static int spi_uart_read_proc(char *page, char **start, off_t off,\r
- int count, int *eof, void *data)\r
+static int spi_uart_proc_show(struct seq_file *m, void *v)\r
{\r
- int i, len = 0;\r
- off_t begin = 0;\r
- DBG("%s:LINE=%d************************\n",__FUNCTION__,__LINE__);\r
- len += sprintf(page, "serinfo:1.0 driver%s%s revision:%s\n",\r
+ int i;\r
+\r
+ seq_printf(m, "serinfo:1.0 driver%s%s revision:%s\n",\r
"", "", "");\r
- for (i = 0; i < UART_NR && len < PAGE_SIZE - 96; i++) {\r
- struct spi_uart *uart = spi_uart_port_get(i);\r
- if (uart) {\r
- len += sprintf(page+len, "%d: uart:SPI", i);\r
+ for (i = 0; i < UART_NR; i++) {\r
+ struct spi_uart *port = spi_uart_port_get(i);\r
+ if (port) {\r
+ seq_printf(m, "%d: uart:SPI", i);\r
if(capable(CAP_SYS_ADMIN)) {\r
- len += sprintf(page + len, " tx:%d rx:%d",\r
- uart->icount.tx, uart->icount.rx);\r
- if (uart->icount.frame)\r
- len += sprintf(page + len, " fe:%d",\r
- uart->icount.frame);\r
- if (uart->icount.parity)\r
- len += sprintf(page + len, " pe:%d",\r
- uart->icount.parity);\r
- if (uart->icount.brk)\r
- len += sprintf(page + len, " brk:%d",\r
- uart->icount.brk);\r
- if (uart->icount.overrun)\r
- len += sprintf(page + len, " oe:%d",\r
- uart->icount.overrun);\r
- if (uart->icount.cts)\r
- len += sprintf(page + len, " cts:%d",\r
- uart->icount.cts);\r
- if (uart->icount.dsr)\r
- len += sprintf(page + len, " dsr:%d",\r
- uart->icount.dsr);\r
- if (uart->icount.rng)\r
- len += sprintf(page + len, " rng:%d",\r
- uart->icount.rng);\r
- if (uart->icount.dcd)\r
- len += sprintf(page + len, " dcd:%d",\r
- uart->icount.dcd);\r
+ seq_printf(m, " tx:%d rx:%d",\r
+ port->icount.tx, port->icount.rx);\r
+ if (port->icount.frame)\r
+ seq_printf(m, " fe:%d",\r
+ port->icount.frame);\r
+ if (port->icount.parity)\r
+ seq_printf(m, " pe:%d",\r
+ port->icount.parity);\r
+ if (port->icount.brk)\r
+ seq_printf(m, " brk:%d",\r
+ port->icount.brk);\r
+ if (port->icount.overrun)\r
+ seq_printf(m, " oe:%d",\r
+ port->icount.overrun);\r
+ if (port->icount.cts)\r
+ seq_printf(m, " cts:%d",\r
+ port->icount.cts);\r
+ if (port->icount.dsr)\r
+ seq_printf(m, " dsr:%d",\r
+ port->icount.dsr);\r
+ if (port->icount.rng)\r
+ seq_printf(m, " rng:%d",\r
+ port->icount.rng);\r
+ if (port->icount.dcd)\r
+ seq_printf(m, " dcd:%d",\r
+ port->icount.dcd);\r
}\r
- strcat(page, "\n");\r
- len++;\r
- spi_uart_port_put(uart);\r
- }\r
-\r
- if (len + begin > off + count)\r
- goto done;\r
- if (len + begin < off) {\r
- begin += len;\r
- len = 0;\r
+ spi_uart_port_put(port);\r
+ seq_putc(m, '\n');\r
}\r
}\r
- *eof = 1;\r
+ return 0;\r
+}\r
\r
-done:\r
- if (off >= len + begin)\r
- return 0;\r
- *start = page + (off - begin);\r
- return (count < begin + len - off) ? count : (begin + len - off);\r
+static int spi_uart_proc_open(struct inode *inode, struct file *file)\r
+{\r
+ return single_open(file, spi_uart_proc_show, NULL);\r
}\r
-#endif\r
+\r
+static const struct file_operations spi_uart_proc_fops = {\r
+ .owner = THIS_MODULE,\r
+ .open = spi_uart_proc_open,\r
+ .read = seq_read,\r
+ .llseek = seq_lseek,\r
+ .release = single_release,\r
+};\r
\r
static const struct tty_operations spi_uart_ops = {\r
.open = spi_uart_open,\r
.break_ctl = spi_uart_break_ctl,\r
.tiocmget = spi_uart_tiocmget,\r
.tiocmset = spi_uart_tiocmset,\r
- //.read_proc = spi_uart_read_proc,\r
+ .proc_fops = &spi_uart_proc_fops,\r
};\r
\r
\r