diff options
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/base.c | 7 | ||||
-rw-r--r-- | drivers/of/fdt.c | 15 | ||||
-rw-r--r-- | drivers/of/of_mdio.c | 8 | ||||
-rw-r--r-- | drivers/of/platform.c | 4 |
4 files changed, 24 insertions, 10 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 8368d96ae7b4..b9864806e9b8 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -227,7 +227,8 @@ static int __of_node_add(struct device_node *np) | |||
227 | np->kobj.kset = of_kset; | 227 | np->kobj.kset = of_kset; |
228 | if (!np->parent) { | 228 | if (!np->parent) { |
229 | /* Nodes without parents are new top level trees */ | 229 | /* Nodes without parents are new top level trees */ |
230 | rc = kobject_add(&np->kobj, NULL, safe_name(&of_kset->kobj, "base")); | 230 | rc = kobject_add(&np->kobj, NULL, "%s", |
231 | safe_name(&of_kset->kobj, "base")); | ||
231 | } else { | 232 | } else { |
232 | name = safe_name(&np->parent->kobj, kbasename(np->full_name)); | 233 | name = safe_name(&np->parent->kobj, kbasename(np->full_name)); |
233 | if (!name || !name[0]) | 234 | if (!name || !name[0]) |
@@ -1960,9 +1961,9 @@ int of_attach_node(struct device_node *np) | |||
1960 | 1961 | ||
1961 | raw_spin_lock_irqsave(&devtree_lock, flags); | 1962 | raw_spin_lock_irqsave(&devtree_lock, flags); |
1962 | np->sibling = np->parent->child; | 1963 | np->sibling = np->parent->child; |
1963 | np->allnext = of_allnodes; | 1964 | np->allnext = np->parent->allnext; |
1965 | np->parent->allnext = np; | ||
1964 | np->parent->child = np; | 1966 | np->parent->child = np; |
1965 | of_allnodes = np; | ||
1966 | of_node_clear_flag(np, OF_DETACHED); | 1967 | of_node_clear_flag(np, OF_DETACHED); |
1967 | raw_spin_unlock_irqrestore(&devtree_lock, flags); | 1968 | raw_spin_unlock_irqrestore(&devtree_lock, flags); |
1968 | 1969 | ||
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index c4cddf0cd96d..b777d8f46bd5 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -880,6 +880,21 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) | |||
880 | const u64 phys_offset = __pa(PAGE_OFFSET); | 880 | const u64 phys_offset = __pa(PAGE_OFFSET); |
881 | base &= PAGE_MASK; | 881 | base &= PAGE_MASK; |
882 | size &= PAGE_MASK; | 882 | size &= PAGE_MASK; |
883 | |||
884 | if (sizeof(phys_addr_t) < sizeof(u64)) { | ||
885 | if (base > ULONG_MAX) { | ||
886 | pr_warning("Ignoring memory block 0x%llx - 0x%llx\n", | ||
887 | base, base + size); | ||
888 | return; | ||
889 | } | ||
890 | |||
891 | if (base + size > ULONG_MAX) { | ||
892 | pr_warning("Ignoring memory range 0x%lx - 0x%llx\n", | ||
893 | ULONG_MAX, base + size); | ||
894 | size = ULONG_MAX - base; | ||
895 | } | ||
896 | } | ||
897 | |||
883 | if (base + size < phys_offset) { | 898 | if (base + size < phys_offset) { |
884 | pr_warning("Ignoring memory block 0x%llx - 0x%llx\n", | 899 | pr_warning("Ignoring memory block 0x%llx - 0x%llx\n", |
885 | base, base + size); | 900 | base, base + size); |
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index fb4a59830648..a3bf2122a8d5 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c | |||
@@ -323,11 +323,13 @@ int of_phy_register_fixed_link(struct device_node *np) | |||
323 | fixed_link_node = of_get_child_by_name(np, "fixed-link"); | 323 | fixed_link_node = of_get_child_by_name(np, "fixed-link"); |
324 | if (fixed_link_node) { | 324 | if (fixed_link_node) { |
325 | status.link = 1; | 325 | status.link = 1; |
326 | status.duplex = of_property_read_bool(np, "full-duplex"); | 326 | status.duplex = of_property_read_bool(fixed_link_node, |
327 | "full-duplex"); | ||
327 | if (of_property_read_u32(fixed_link_node, "speed", &status.speed)) | 328 | if (of_property_read_u32(fixed_link_node, "speed", &status.speed)) |
328 | return -EINVAL; | 329 | return -EINVAL; |
329 | status.pause = of_property_read_bool(np, "pause"); | 330 | status.pause = of_property_read_bool(fixed_link_node, "pause"); |
330 | status.asym_pause = of_property_read_bool(np, "asym-pause"); | 331 | status.asym_pause = of_property_read_bool(fixed_link_node, |
332 | "asym-pause"); | ||
331 | of_node_put(fixed_link_node); | 333 | of_node_put(fixed_link_node); |
332 | return fixed_phy_register(PHY_POLL, &status, np); | 334 | return fixed_phy_register(PHY_POLL, &status, np); |
333 | } | 335 | } |
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 6c48d73a7fd7..500436f9be7f 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -166,10 +166,6 @@ static void of_dma_configure(struct platform_device *pdev) | |||
166 | int ret; | 166 | int ret; |
167 | struct device *dev = &pdev->dev; | 167 | struct device *dev = &pdev->dev; |
168 | 168 | ||
169 | #if defined(CONFIG_MICROBLAZE) | ||
170 | pdev->archdata.dma_mask = 0xffffffffUL; | ||
171 | #endif | ||
172 | |||
173 | /* | 169 | /* |
174 | * Set default dma-mask to 32 bit. Drivers are expected to setup | 170 | * Set default dma-mask to 32 bit. Drivers are expected to setup |
175 | * the correct supported dma_mask. | 171 | * the correct supported dma_mask. |