Thu, 17 Apr 2014 11:44:54 +0200 от Johannes Thumshirn 
<johannes.thumsh...@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.thumsh...@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?

---

Reply via email to