Since the client devices are allocated manually in this driver,
its 'dma_mask' will not be initialized before its probe start,
and this will cause the dma configure for the client devices to
give a warning message "DMA mask not set". So make 'dma_mask' to
point to its 'coherent_dma_mask' by default to avoid this warnning.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
/*
- * Copyright 2018 NXP
+ * Copyright 2018-2019 NXP
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
pdev->dev.parent = dev;
client_reg[i].pdata.of_node = of_node;
+ /* make child device 'dma_mask' to point to its
+ * coherent dma mask, otherwise later probe will
+ * print warning message: 'DMA mask not set'.
+ */
+ pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
+
ret = platform_device_add_data(pdev, &client_reg[i].pdata,
sizeof(client_reg[i].pdata));
if (!ret)