Thread (1 message) 1 message, 1 author, 2012-03-07

[PATCH 1/9 v2] ARM: at91: usb ohci add dt support

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2012-03-07 10:33:52
Also in: linux-devicetree

On 09:34 Wed 07 Mar     , Russell King - ARM Linux wrote:
On Wed, Mar 07, 2012 at 10:15:38AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
+static u64 at91_ohci_dma_mask = DMA_BIT_MASK(32);
+
+static int __devinit ohci_at91_of_init(struct platform_device *pdev)
+{
+	struct device_node *np = pdev->dev.of_node;
+	int i, ret, gpio;
+	enum of_gpio_flags flags;
+	struct at91_usbh_data	*pdata;
+	u32 ports;
+
+	if (!np)
+		return 0;
+
+	/* Right now device-tree probed devices don't get dma_mask set.
+	 * Since shared usb code relies on it, set it here for now.
+	 * Once we have dma capability bindings this can go away.
+	 */
+	if (!pdev->dev.dma_mask)
+		pdev->dev.dma_mask = &at91_ohci_dma_mask;
That sounds like a rather big omission from DT - what's happening to
address this (before we end up with lots of drivers with this).  Pretty
much any device which does DMA needs both this and the coherent DMA mask
set properly.

We really don't want this kind of workaround scattered in every driver
which has been converted to DT.
Tegra do it also
I do yet found a good generic way in DT

Today only usb need I do plan to drop it for 3.5 can we have for 3.4

Best Regards,
J.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help