.hub_control = uhci_hub_control,
};
+static const u64 dma_mask_32 = DMA_BIT_MASK(32);
+static const u64 dma_mask_64 = DMA_BIT_MASK(64);
+
static int uhci_hcd_platform_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
+ const u64 *dma_mask_ptr;
struct usb_hcd *hcd;
struct uhci_hcd *uhci;
struct resource *res;
* Since shared usb code relies on it, set it here for now.
* Once we have dma capability bindings this can go away.
*/
- ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+ dma_mask_ptr = (u64 *)of_device_get_match_data(&pdev->dev);
+ if (!dma_mask_ptr)
+ dma_mask_ptr = &dma_mask_32;
+
+ ret = dma_coerce_mask_and_coherent(&pdev->dev, *dma_mask_ptr);
if (ret)
return ret;
}
if (of_device_is_compatible(np, "aspeed,ast2400-uhci") ||
of_device_is_compatible(np, "aspeed,ast2500-uhci") ||
- of_device_is_compatible(np, "aspeed,ast2600-uhci")) {
+ of_device_is_compatible(np, "aspeed,ast2600-uhci") ||
+ of_device_is_compatible(np, "aspeed,ast2700-uhci")) {
uhci->is_aspeed = 1;
dev_info(&pdev->dev,
"Enabled Aspeed implementation workarounds\n");
static const struct of_device_id platform_uhci_ids[] = {
{ .compatible = "generic-uhci", },
{ .compatible = "platform-uhci", },
+ { .compatible = "aspeed,ast2700-uhci", .data = &dma_mask_64},
{}
};
MODULE_DEVICE_TABLE(of, platform_uhci_ids);