sparc32, leon: Stop adding vendor and device id to prom ambapp path components
These extra fields before the @ are not handled in of_node_name_eq,
making commit b3e46d1a05
break node name
comparisons for ambapp path components, thereby making LEON systems
unable to boot.
As there is no need for the tacked on vendor and device ID fields in the
path component, resolve this situation by removing them.
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
548f0b9a5f
Коммит
e2b9fc2dd6
|
@ -132,12 +132,13 @@ static void __init ebus_path_component(struct device_node *dp, char *tmp_buf)
|
||||||
regs->which_io, regs->phys_addr);
|
regs->which_io, regs->phys_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "name:vendor:device@irq,addrlo" */
|
/* "name@irq,addrlo" */
|
||||||
static void __init ambapp_path_component(struct device_node *dp, char *tmp_buf)
|
static void __init ambapp_path_component(struct device_node *dp, char *tmp_buf)
|
||||||
{
|
{
|
||||||
const char *name = of_get_property(dp, "name", NULL);
|
const char *name = of_get_property(dp, "name", NULL);
|
||||||
struct amba_prom_registers *regs;
|
struct amba_prom_registers *regs;
|
||||||
unsigned int *intr, *device, *vendor, reg0;
|
unsigned int *intr;
|
||||||
|
unsigned int reg0;
|
||||||
struct property *prop;
|
struct property *prop;
|
||||||
int interrupt = 0;
|
int interrupt = 0;
|
||||||
|
|
||||||
|
@ -159,18 +160,7 @@ static void __init ambapp_path_component(struct device_node *dp, char *tmp_buf)
|
||||||
else
|
else
|
||||||
intr = prop->value;
|
intr = prop->value;
|
||||||
|
|
||||||
prop = of_find_property(dp, "vendor", NULL);
|
sprintf(tmp_buf, "%s@%x,%x", name, *intr, reg0);
|
||||||
if (!prop)
|
|
||||||
return;
|
|
||||||
vendor = prop->value;
|
|
||||||
prop = of_find_property(dp, "device", NULL);
|
|
||||||
if (!prop)
|
|
||||||
return;
|
|
||||||
device = prop->value;
|
|
||||||
|
|
||||||
sprintf(tmp_buf, "%s:%d:%d@%x,%x",
|
|
||||||
name, *vendor, *device,
|
|
||||||
*intr, reg0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init __build_path_component(struct device_node *dp, char *tmp_buf)
|
static void __init __build_path_component(struct device_node *dp, char *tmp_buf)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче