lkml.org 
[lkml]   [2014]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] tty: serial: Add driver for MEN's 16z135 High Speed UART.
Date
Thu, 17 Apr 2014 11:44:54 +0200 от Johannes Thumshirn <johannes.thumshirn@men.de>:
> Add driver for MEN's 16z135 High Speed UART.
>
> The 16z135 is a memory mapped UART Core on an MCB FPGA and has 1024 byte
> deep FIFO buffers for the RX and TX path. It also has configurable FIFO
> fill level IRQs and data copied to and from the hardware has to be
> acknowledged.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@men.de>
> ---
...
> +static int men_z135_probe(struct mcb_device *mdev,
> + const struct mcb_device_id *id)
> +{
> + struct men_z135_port *uart;
> + struct resource *mem;
> + struct device *dev;
> + int err;
> +
> + dev = &mdev->dev;
> +
> + uart = devm_kzalloc(dev, sizeof(struct men_z135_port), GFP_KERNEL);
> + if (!uart)
> + return -ENOMEM;
> +
> + uart->rxbuf = (unsigned char *)__get_free_page(GFP_KERNEL);
> + if (!uart->rxbuf)
> + return -ENOMEM;
> +
> + mem = &mdev->mem;
> +
> + mcb_set_drvdata(mdev, uart);
> +
> + uart->port.uartclk = MEN_Z135_BASECLK * 16;
> + uart->port.fifosize = MEN_Z135_FIFO_SIZE;
> + uart->port.iotype = UPIO_MEM;
> + uart->port.ops = &men_z135_ops;
> + uart->port.irq = mcb_get_irq(mdev);
> + uart->port.iotype = UPIO_MEM;
> + uart->port.flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP;
> + uart->port.line = line++;

So, every time a module is loaded/unloaded and loaded again,
you increase the line number?

---

\
 
 \ /
  Last update: 2014-04-17 13:21    [W:0.049 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site