Re: [PATCH v5 06/16] ufs: core: mcq: Configure resource regions

From: Bart Van Assche
Date: Fri Nov 25 2022 - 20:10:35 EST


On 11/22/22 20:10, Asutosh Das wrote:
+/* Resources */
+static const struct ufshcd_res_info ufs_res_info[RES_MAX] = {
+ {.name = "ufs_mem",},
+ {.name = "mcq",},
+ /* Submission Queue DAO */
+ {.name = "mcq_sqd",},
+ /* Submission Queue Interrupt Status */
+ {.name = "mcq_sqis",},
+ /* Completion Queue DAO */
+ {.name = "mcq_cqd",},
+ /* Completion Queue Interrupt Status */
+ {.name = "mcq_cqis",},
+ /* MCQ vendor specific */
+ {.name = "mcq_vs",},
+};

Which names to associate with nodes in the device tree for UFS MCQ resources has not been standardized. Additionally, the UFS driver is also used on platforms that do not support the device tree (e.g. Intel x86 platforms). So I don't think that the platform_get_resource_byname() calls should occur in the UFS driver core. How about moving the code that queries device tree nodes into the Qualcomm driver until a second user of this code is added? If a second user of this code appears this code could e.g. become a kernel module shared by both UFS host controller drivers.

Thanks,

Bart.