[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87io254ucw.fsf@free-electrons.com>
Date: Wed, 03 Feb 2016 17:43:59 +0100
From: Gregory CLEMENT <gregory.clement@...e-electrons.com>
To: Marcin Wojtas <mw@...ihalf.com>
Cc: Jason Cooper <jason@...edaemon.net>, Andrew Lunn <andrew@...n.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
arm@...nel.org, Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Jonathan Corbet <corbet@....net>,
Mark Rutland <mark.rutland@....com>,
"devicetree\@vger.kernel.org" <devicetree@...r.kernel.org>,
linux-ide@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Nadav Haklai <nadavh@...vell.com>,
Hans de Goede <hdegoede@...hat.com>,
linux-serial@...r.kernel.org, Jiri Slaby <jslaby@...e.com>,
Tejun Heo <tj@...nel.org>, Wilson Ding <dingwei@...vell.com>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
"linux-arm-kernel\@lists.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 01/10] serial: mvebu-uart: initial support for Armada-3700 serial port
Hi Marcin,
On mer., févr. 03 2016, Marcin Wojtas <mw@...ihalf.com> wrote:
> Hi Gregory
>
>> +
>> +static int mvebu_uart_startup(struct uart_port *port)
>> +{
>> + int ret;
>> +
>> + writel(CTRL_TXFIFO_RST | CTRL_RXFIFO_RST,
>> + port->membase + UART_CTRL);
>> + udelay(1);
>> + writel(CTRL_RX_INT, port->membase + UART_CTRL);
>> +
>> + ret = request_irq(port->irq, mvebu_uart_isr, port->irqflags, "serial",
>> + port);
>> + if (ret) {
>> + dev_err(port->dev, "failed to request irq\n");
>> + return ret;
>> + }
>> +
>> + return 0;
>> +}
>> +
>
>> +static int mvebu_uart_probe(struct platform_device *pdev)
>> +{
>> + struct resource *reg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + struct resource *irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>> + struct uart_port *port;
>> + struct mvebu_uart_data *data;
>> + int ret;
>> +
>> + if (!reg || !irq) {
>> + dev_err(&pdev->dev, "no registers/irq defined\n");
>> + return -EINVAL;
>> + }
>> +
>> + port = &mvebu_uart_ports[0];
>> +
>> + spin_lock_init(&port->lock);
>> +
>> + port->dev = &pdev->dev;
>> + port->type = PORT_MVEBU;
>> + port->ops = &mvebu_uart_ops;
>> + port->regshift = 0;
>> +
>> + port->fifosize = 32;
>> + port->iotype = UPIO_MEM32;
>> + port->flags = UPF_FIXED_PORT;
>> + port->line = 0; /* single port: force line number to 0 */
>> +
>> + port->irq = irq->start;
>> + port->irqflags = 0;
>
> Please use port->irqflags = IRQF_SHARED;
> As ubuntu opens multiple consoles A3700 can't boot to it (only to
> buildroot with single console).
But this irq is not shared, this looks like a hack hidding the real
issue.
Gregory
>
> Best regards,
> Marcin
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Powered by blists - more mailing lists