Re: How to (get a struct device* to) map a DMA buffer for McBSP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I had exactly the same problem. It looks like the struct omap_mcbsp array was
intended to be accessible

>From include/plat/mcbsp.h
extern struct omap_mcbsp **mcbsp_ptr;

I couldn't get access to mcbsp_ptr in an out of tree module. So I added this

arch/arm/plat-omap/include/plat/mcbsp.h
+struct omap_mcbsp* omap_mcbsp_get_mcbsp_ptr(u8 id);

arch/arm/plat-omap/mcbsp.c
+struct omap_mcbsp* omap_mcbsp_get_mcbsp_ptr(u8 id)
+{
+	if (!omap_mcbsp_check_valid_id(id))
+		return NULL;
+
+	return id_to_mcbsp_ptr(id);
+}
+EXPORT_SYMBOL(omap_mcbsp_get_mcbsp_ptr);
+

This was to could get access to .phys_base and .dma_rx_sync for my own DMA ops.

Is there a better way?


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux