Thread (16 messages) 16 messages, 5 authors, 2009-05-28

Re: powerpc: DMA coherent allocations broken for CONFIG_NOT_COHERENT_CACHE

From: Sean MacLennan <hidden>
Date: 2009-05-28 05:00:02

On Wed, 27 May 2009 21:42:18 -0600
Grant Likely [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help