mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
sparc32, leon: APBUART driver must use archdata to get IRQ number
See Commit id1636f8ac2b
(sparc/of: Move of_device fields into struct pdev_archdata), this patch is similar to19e4875fb2
(of/sparc: fix build regression from of_device changes) Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
97c278e31c
commit
10544f128c
1 changed files with 5 additions and 7 deletions
|
@ -555,10 +555,9 @@ static struct uart_driver grlib_apbuart_driver = {
|
|||
|
||||
static int __devinit apbuart_probe(struct platform_device *op)
|
||||
{
|
||||
int i = -1;
|
||||
int i;
|
||||
struct uart_port *port = NULL;
|
||||
|
||||
i = 0;
|
||||
for (i = 0; i < grlib_apbuart_port_nr; i++) {
|
||||
if (op->dev.of_node == grlib_apbuart_nodes[i])
|
||||
break;
|
||||
|
@ -566,6 +565,7 @@ static int __devinit apbuart_probe(struct platform_device *op)
|
|||
|
||||
port = &grlib_apbuart_ports[i];
|
||||
port->dev = &op->dev;
|
||||
port->irq = op->archdata.irqs[0];
|
||||
|
||||
uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port);
|
||||
|
||||
|
@ -615,7 +615,7 @@ static int grlib_apbuart_configure(void)
|
|||
freq_khz = *prop;
|
||||
|
||||
for_each_matching_node(np, apbuart_match) {
|
||||
const int *irqs, *ampopts;
|
||||
const int *ampopts;
|
||||
const struct amba_prom_registers *regs;
|
||||
struct uart_port *port;
|
||||
unsigned long addr;
|
||||
|
@ -623,11 +623,9 @@ static int grlib_apbuart_configure(void)
|
|||
ampopts = of_get_property(np, "ampopts", NULL);
|
||||
if (ampopts && (*ampopts == 0))
|
||||
continue; /* Ignore if used by another OS instance */
|
||||
|
||||
irqs = of_get_property(np, "interrupts", NULL);
|
||||
regs = of_get_property(np, "reg", NULL);
|
||||
|
||||
if (!irqs || !regs)
|
||||
if (!regs)
|
||||
continue;
|
||||
|
||||
grlib_apbuart_nodes[line] = np;
|
||||
|
@ -638,7 +636,7 @@ static int grlib_apbuart_configure(void)
|
|||
|
||||
port->mapbase = addr;
|
||||
port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
|
||||
port->irq = *irqs;
|
||||
port->irq = 0;
|
||||
port->iotype = UPIO_MEM;
|
||||
port->ops = &grlib_apbuart_ops;
|
||||
port->flags = UPF_BOOT_AUTOCONF;
|
||||
|
|
Loading…
Reference in a new issue