Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259150
b: refs/heads/master
c: 314b02f
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Jul 8, 2011
1 parent 9dfdda0 commit 3329ec9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a77ce8167cc1d0370fcb1d79b367d62e050cb2b0
refs/heads/master: 314b02f503c2c219fde0fcf6f086fda415f8a847
28 changes: 4 additions & 24 deletions trunk/arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,29 +709,9 @@ void ppc_printk_progress(char *s, unsigned short hex)
pr_info("%s\n", s);
}

static int ppc_dflt_bus_notify(struct notifier_block *nb,
unsigned long action, void *data)
void arch_setup_pdev_archdata(struct platform_device *pdev)
{
struct device *dev = data;

/* We are only intereted in device addition */
if (action != BUS_NOTIFY_ADD_DEVICE)
return 0;

set_dma_ops(dev, &dma_direct_ops);

return NOTIFY_DONE;
}

static struct notifier_block ppc_dflt_plat_bus_notifier = {
.notifier_call = ppc_dflt_bus_notify,
.priority = INT_MAX,
};

static int __init setup_bus_notifier(void)
{
bus_register_notifier(&platform_bus_type, &ppc_dflt_plat_bus_notifier);
return 0;
pdev->archdata.dma_mask = DMA_BIT_MASK(32);
pdev->dev.dma_mask = &pdev->archdata.dma_mask;
set_dma_ops(&pdev->dev, &dma_direct_ops);
}

arch_initcall(setup_bus_notifier);
4 changes: 2 additions & 2 deletions trunk/drivers/of/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
}

dev->dev.of_node = of_node_get(np);
#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
#if defined(CONFIG_MICROBLAZE)
dev->dev.dma_mask = &dev->archdata.dma_mask;
#endif
dev->dev.parent = parent;
Expand Down Expand Up @@ -189,7 +189,7 @@ struct platform_device *of_platform_device_create(struct device_node *np,
if (!dev)
return NULL;

#if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
#if defined(CONFIG_MICROBLAZE)
dev->archdata.dma_mask = 0xffffffffUL;
#endif
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
Expand Down

0 comments on commit 3329ec9

Please sign in to comment.