if (port->membase)
return 0;
- if (port->flags & UPF_IOREMAP) {
+ if (port->dev->of_node || (port->flags & UPF_IOREMAP)) {
port->membase = ioremap_nocache(port->mapbase, sport->reg_size);
if (unlikely(!port->membase)) {
dev_err(port->dev, "can't remap port#%d\n", port->line);
{
struct sci_port *sport = to_sci_port(port);
- if (port->flags & UPF_IOREMAP) {
+ if (port->dev->of_node || (port->flags & UPF_IOREMAP)) {
iounmap(port->membase);
port->membase = NULL;
}
}
port->type = p->type;
- port->flags = UPF_FIXED_PORT | p->flags;
+ port->flags = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
port->regshift = p->regshift;
/*
*dev_id = id;
- p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
p->type = SCI_OF_TYPE(match->data);
p->regtype = SCI_OF_REGTYPE(match->data);