Re: [PATCH v2 3/3] scsi: ufs: rockchip: init support for UFS

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

 



On 8/7/24 8:52 PM, Shawn Lin wrote:
RK3576 contains a UFS controller, add init support fot it.
					^^^^	     ^^^
                                        initial      for

Again a very short patch description. What is "RK3576"? Please explain.

+config SCSI_UFS_ROCKCHIP
+	tristate "Rockchip specific hooks to UFS controller platform driver"

A better description would be: "Rockchip UFS host controller driver"

+#include "ufshcd-dwc.h"

No, you should not include the ufshcd-dwc.h header file. That is a header file for the Designware UFS host controller.

+	reset_control_assert(host->rst);
+	udelay(1);
+	reset_control_deassert(host->rst);

Why udelay() instead of usleep_range()?

+static int ufs_rockchip_device_reset(struct ufs_hba *hba)
+{
+	struct ufs_rockchip_host *host = ufshcd_get_variant(hba);
+
+	if (!host->rst_gpio)
+		return -EOPNOTSUPP;
+
+	gpiod_set_value_cansleep(host->rst_gpio, 0);
+	udelay(20);
+
+	gpiod_set_value_cansleep(host->rst_gpio, 1);
+	udelay(20);
+
+	return 0;
+}

Same question here: why udelay() instead of usleep_range()?

Thanks,

Bart.




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux