powerpc/dma: use the generic direct mapping bypass
Now that we've switched all the powerpc nommu and swiotlb methods to use the generic dma_direct_* calls we can remove these ops vectors entirely and rely on the common direct mapping bypass that avoids indirect function calls entirely. This also allows to remove a whole lot of boilerplate code related to setting up these operations. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
461db2bdbf
commit
68005b67d1
@@ -411,55 +411,6 @@ out:
|
||||
return !!(srr1 & 0x2);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCMCIA
|
||||
static int pcmcia_notify(struct notifier_block *nb, unsigned long action,
|
||||
void *data)
|
||||
{
|
||||
struct device *dev = data;
|
||||
struct device *parent;
|
||||
struct pcmcia_device *pdev = to_pcmcia_dev(dev);
|
||||
|
||||
/* We are only intereted in device addition */
|
||||
if (action != BUS_NOTIFY_ADD_DEVICE)
|
||||
return 0;
|
||||
|
||||
parent = pdev->socket->dev.parent;
|
||||
|
||||
/* We know electra_cf devices will always have of_node set, since
|
||||
* electra_cf is an of_platform driver.
|
||||
*/
|
||||
if (!parent->of_node)
|
||||
return 0;
|
||||
|
||||
if (!of_device_is_compatible(parent->of_node, "electra-cf"))
|
||||
return 0;
|
||||
|
||||
/* We use the direct ops for localbus */
|
||||
dev->dma_ops = &dma_nommu_ops;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct notifier_block pcmcia_notifier = {
|
||||
.notifier_call = pcmcia_notify,
|
||||
};
|
||||
|
||||
static inline void pasemi_pcmcia_init(void)
|
||||
{
|
||||
extern struct bus_type pcmcia_bus_type;
|
||||
|
||||
bus_register_notifier(&pcmcia_bus_type, &pcmcia_notifier);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void pasemi_pcmcia_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static const struct of_device_id pasemi_bus_ids[] = {
|
||||
/* Unfortunately needed for legacy firmwares */
|
||||
{ .type = "localbus", },
|
||||
@@ -472,8 +423,6 @@ static const struct of_device_id pasemi_bus_ids[] = {
|
||||
|
||||
static int __init pasemi_publish_devices(void)
|
||||
{
|
||||
pasemi_pcmcia_init();
|
||||
|
||||
/* Publish OF platform devices for SDC and other non-PCI devices */
|
||||
of_platform_bus_probe(NULL, pasemi_bus_ids, NULL);
|
||||
|
||||
|
Reference in New Issue
Block a user