powerpc: DMA coherent allocations broken for CONFIG_NOT_COHERENT_CACHE

Sean MacLennan smaclennan at pikatech.com
Thu May 28 15:00:00 EST 2009


On Wed, 27 May 2009 21:42:18 -0600
Grant Likely <grant.likely at secretlab.ca> wrote:

> Make your driver use a platform device or an of_platform device.  It's
> not at all hard.

Here is my first shot.... any other fields that I need to fill in so I
don't have any gotchas?

/* This must exist */
static void warp_device_release(struct device *dev) {}

static struct platform_device warp_device = {
	.name = "warp-device",
	.id = 0,
	.num_resources = 0,
	.dev = {
		.coherent_dma_mask = ~0ULL,
		.release = warp_device_release,
	},
};


	platform_device_register(&warp_device);

Cheers,
   Sean



More information about the Linuxppc-dev mailing list