ufshcd-pci.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Universal Flash Storage Host controller PCI glue driver
  4. *
  5. * Copyright (C) 2011-2013 Samsung India Software Operations
  6. *
  7. * Authors:
  8. * Santosh Yaraganavi <[email protected]>
  9. * Vinayak Holikatti <[email protected]>
  10. */
  11. #include <ufs/ufshcd.h>
  12. #include <linux/delay.h>
  13. #include <linux/module.h>
  14. #include <linux/pci.h>
  15. #include <linux/pm_runtime.h>
  16. #include <linux/pm_qos.h>
  17. #include <linux/debugfs.h>
  18. #include <linux/uuid.h>
  19. #include <linux/acpi.h>
  20. #include <linux/gpio/consumer.h>
  21. struct ufs_host {
  22. void (*late_init)(struct ufs_hba *hba);
  23. };
  24. enum intel_ufs_dsm_func_id {
  25. INTEL_DSM_FNS = 0,
  26. INTEL_DSM_RESET = 1,
  27. };
  28. struct intel_host {
  29. struct ufs_host ufs_host;
  30. u32 dsm_fns;
  31. u32 active_ltr;
  32. u32 idle_ltr;
  33. struct dentry *debugfs_root;
  34. struct gpio_desc *reset_gpio;
  35. };
  36. static const guid_t intel_dsm_guid =
  37. GUID_INIT(0x1A4832A0, 0x7D03, 0x43CA,
  38. 0xB0, 0x20, 0xF6, 0xDC, 0xD1, 0x2A, 0x19, 0x50);
  39. static bool __intel_dsm_supported(struct intel_host *host,
  40. enum intel_ufs_dsm_func_id fn)
  41. {
  42. return fn < 32 && fn >= 0 && (host->dsm_fns & (1u << fn));
  43. }
  44. #define INTEL_DSM_SUPPORTED(host, name) \
  45. __intel_dsm_supported(host, INTEL_DSM_##name)
  46. static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
  47. unsigned int fn, u32 *result)
  48. {
  49. union acpi_object *obj;
  50. int err = 0;
  51. size_t len;
  52. obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL);
  53. if (!obj)
  54. return -EOPNOTSUPP;
  55. if (obj->type != ACPI_TYPE_BUFFER || obj->buffer.length < 1) {
  56. err = -EINVAL;
  57. goto out;
  58. }
  59. len = min_t(size_t, obj->buffer.length, 4);
  60. *result = 0;
  61. memcpy(result, obj->buffer.pointer, len);
  62. out:
  63. ACPI_FREE(obj);
  64. return err;
  65. }
  66. static int intel_dsm(struct intel_host *intel_host, struct device *dev,
  67. unsigned int fn, u32 *result)
  68. {
  69. if (!__intel_dsm_supported(intel_host, fn))
  70. return -EOPNOTSUPP;
  71. return __intel_dsm(intel_host, dev, fn, result);
  72. }
  73. static void intel_dsm_init(struct intel_host *intel_host, struct device *dev)
  74. {
  75. int err;
  76. err = __intel_dsm(intel_host, dev, INTEL_DSM_FNS, &intel_host->dsm_fns);
  77. dev_dbg(dev, "DSM fns %#x, error %d\n", intel_host->dsm_fns, err);
  78. }
  79. static int ufs_intel_hce_enable_notify(struct ufs_hba *hba,
  80. enum ufs_notify_change_status status)
  81. {
  82. /* Cannot enable ICE until after HC enable */
  83. if (status == POST_CHANGE && hba->caps & UFSHCD_CAP_CRYPTO) {
  84. u32 hce = ufshcd_readl(hba, REG_CONTROLLER_ENABLE);
  85. hce |= CRYPTO_GENERAL_ENABLE;
  86. ufshcd_writel(hba, hce, REG_CONTROLLER_ENABLE);
  87. }
  88. return 0;
  89. }
  90. static int ufs_intel_disable_lcc(struct ufs_hba *hba)
  91. {
  92. u32 attr = UIC_ARG_MIB(PA_LOCAL_TX_LCC_ENABLE);
  93. u32 lcc_enable = 0;
  94. ufshcd_dme_get(hba, attr, &lcc_enable);
  95. if (lcc_enable)
  96. ufshcd_disable_host_tx_lcc(hba);
  97. return 0;
  98. }
  99. static int ufs_intel_link_startup_notify(struct ufs_hba *hba,
  100. enum ufs_notify_change_status status)
  101. {
  102. int err = 0;
  103. switch (status) {
  104. case PRE_CHANGE:
  105. err = ufs_intel_disable_lcc(hba);
  106. break;
  107. case POST_CHANGE:
  108. break;
  109. default:
  110. break;
  111. }
  112. return err;
  113. }
  114. static int ufs_intel_set_lanes(struct ufs_hba *hba, u32 lanes)
  115. {
  116. struct ufs_pa_layer_attr pwr_info = hba->pwr_info;
  117. int ret;
  118. pwr_info.lane_rx = lanes;
  119. pwr_info.lane_tx = lanes;
  120. ret = ufshcd_config_pwr_mode(hba, &pwr_info);
  121. if (ret)
  122. dev_err(hba->dev, "%s: Setting %u lanes, err = %d\n",
  123. __func__, lanes, ret);
  124. return ret;
  125. }
  126. static int ufs_intel_lkf_pwr_change_notify(struct ufs_hba *hba,
  127. enum ufs_notify_change_status status,
  128. struct ufs_pa_layer_attr *dev_max_params,
  129. struct ufs_pa_layer_attr *dev_req_params)
  130. {
  131. int err = 0;
  132. switch (status) {
  133. case PRE_CHANGE:
  134. if (ufshcd_is_hs_mode(dev_max_params) &&
  135. (hba->pwr_info.lane_rx != 2 || hba->pwr_info.lane_tx != 2))
  136. ufs_intel_set_lanes(hba, 2);
  137. memcpy(dev_req_params, dev_max_params, sizeof(*dev_req_params));
  138. break;
  139. case POST_CHANGE:
  140. if (ufshcd_is_hs_mode(dev_req_params)) {
  141. u32 peer_granularity;
  142. usleep_range(1000, 1250);
  143. err = ufshcd_dme_peer_get(hba, UIC_ARG_MIB(PA_GRANULARITY),
  144. &peer_granularity);
  145. }
  146. break;
  147. default:
  148. break;
  149. }
  150. return err;
  151. }
  152. static int ufs_intel_lkf_apply_dev_quirks(struct ufs_hba *hba)
  153. {
  154. u32 granularity, peer_granularity;
  155. u32 pa_tactivate, peer_pa_tactivate;
  156. int ret;
  157. ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_GRANULARITY), &granularity);
  158. if (ret)
  159. goto out;
  160. ret = ufshcd_dme_peer_get(hba, UIC_ARG_MIB(PA_GRANULARITY), &peer_granularity);
  161. if (ret)
  162. goto out;
  163. ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_TACTIVATE), &pa_tactivate);
  164. if (ret)
  165. goto out;
  166. ret = ufshcd_dme_peer_get(hba, UIC_ARG_MIB(PA_TACTIVATE), &peer_pa_tactivate);
  167. if (ret)
  168. goto out;
  169. if (granularity == peer_granularity) {
  170. u32 new_peer_pa_tactivate = pa_tactivate + 2;
  171. ret = ufshcd_dme_peer_set(hba, UIC_ARG_MIB(PA_TACTIVATE), new_peer_pa_tactivate);
  172. }
  173. out:
  174. return ret;
  175. }
  176. #define INTEL_ACTIVELTR 0x804
  177. #define INTEL_IDLELTR 0x808
  178. #define INTEL_LTR_REQ BIT(15)
  179. #define INTEL_LTR_SCALE_MASK GENMASK(11, 10)
  180. #define INTEL_LTR_SCALE_1US (2 << 10)
  181. #define INTEL_LTR_SCALE_32US (3 << 10)
  182. #define INTEL_LTR_VALUE_MASK GENMASK(9, 0)
  183. static void intel_cache_ltr(struct ufs_hba *hba)
  184. {
  185. struct intel_host *host = ufshcd_get_variant(hba);
  186. host->active_ltr = readl(hba->mmio_base + INTEL_ACTIVELTR);
  187. host->idle_ltr = readl(hba->mmio_base + INTEL_IDLELTR);
  188. }
  189. static void intel_ltr_set(struct device *dev, s32 val)
  190. {
  191. struct ufs_hba *hba = dev_get_drvdata(dev);
  192. struct intel_host *host = ufshcd_get_variant(hba);
  193. u32 ltr;
  194. pm_runtime_get_sync(dev);
  195. /*
  196. * Program latency tolerance (LTR) accordingly what has been asked
  197. * by the PM QoS layer or disable it in case we were passed
  198. * negative value or PM_QOS_LATENCY_ANY.
  199. */
  200. ltr = readl(hba->mmio_base + INTEL_ACTIVELTR);
  201. if (val == PM_QOS_LATENCY_ANY || val < 0) {
  202. ltr &= ~INTEL_LTR_REQ;
  203. } else {
  204. ltr |= INTEL_LTR_REQ;
  205. ltr &= ~INTEL_LTR_SCALE_MASK;
  206. ltr &= ~INTEL_LTR_VALUE_MASK;
  207. if (val > INTEL_LTR_VALUE_MASK) {
  208. val >>= 5;
  209. if (val > INTEL_LTR_VALUE_MASK)
  210. val = INTEL_LTR_VALUE_MASK;
  211. ltr |= INTEL_LTR_SCALE_32US | val;
  212. } else {
  213. ltr |= INTEL_LTR_SCALE_1US | val;
  214. }
  215. }
  216. if (ltr == host->active_ltr)
  217. goto out;
  218. writel(ltr, hba->mmio_base + INTEL_ACTIVELTR);
  219. writel(ltr, hba->mmio_base + INTEL_IDLELTR);
  220. /* Cache the values into intel_host structure */
  221. intel_cache_ltr(hba);
  222. out:
  223. pm_runtime_put(dev);
  224. }
  225. static void intel_ltr_expose(struct device *dev)
  226. {
  227. dev->power.set_latency_tolerance = intel_ltr_set;
  228. dev_pm_qos_expose_latency_tolerance(dev);
  229. }
  230. static void intel_ltr_hide(struct device *dev)
  231. {
  232. dev_pm_qos_hide_latency_tolerance(dev);
  233. dev->power.set_latency_tolerance = NULL;
  234. }
  235. static void intel_add_debugfs(struct ufs_hba *hba)
  236. {
  237. struct dentry *dir = debugfs_create_dir(dev_name(hba->dev), NULL);
  238. struct intel_host *host = ufshcd_get_variant(hba);
  239. intel_cache_ltr(hba);
  240. host->debugfs_root = dir;
  241. debugfs_create_x32("active_ltr", 0444, dir, &host->active_ltr);
  242. debugfs_create_x32("idle_ltr", 0444, dir, &host->idle_ltr);
  243. }
  244. static void intel_remove_debugfs(struct ufs_hba *hba)
  245. {
  246. struct intel_host *host = ufshcd_get_variant(hba);
  247. debugfs_remove_recursive(host->debugfs_root);
  248. }
  249. static int ufs_intel_device_reset(struct ufs_hba *hba)
  250. {
  251. struct intel_host *host = ufshcd_get_variant(hba);
  252. if (INTEL_DSM_SUPPORTED(host, RESET)) {
  253. u32 result = 0;
  254. int err;
  255. err = intel_dsm(host, hba->dev, INTEL_DSM_RESET, &result);
  256. if (!err && !result)
  257. err = -EIO;
  258. if (err)
  259. dev_err(hba->dev, "%s: DSM error %d result %u\n",
  260. __func__, err, result);
  261. return err;
  262. }
  263. if (!host->reset_gpio)
  264. return -EOPNOTSUPP;
  265. gpiod_set_value_cansleep(host->reset_gpio, 1);
  266. usleep_range(10, 15);
  267. gpiod_set_value_cansleep(host->reset_gpio, 0);
  268. usleep_range(10, 15);
  269. return 0;
  270. }
  271. static struct gpio_desc *ufs_intel_get_reset_gpio(struct device *dev)
  272. {
  273. /* GPIO in _DSD has active low setting */
  274. return devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
  275. }
  276. static int ufs_intel_common_init(struct ufs_hba *hba)
  277. {
  278. struct intel_host *host;
  279. hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
  280. host = devm_kzalloc(hba->dev, sizeof(*host), GFP_KERNEL);
  281. if (!host)
  282. return -ENOMEM;
  283. ufshcd_set_variant(hba, host);
  284. intel_dsm_init(host, hba->dev);
  285. if (INTEL_DSM_SUPPORTED(host, RESET)) {
  286. if (hba->vops->device_reset)
  287. hba->caps |= UFSHCD_CAP_DEEPSLEEP;
  288. } else {
  289. if (hba->vops->device_reset)
  290. host->reset_gpio = ufs_intel_get_reset_gpio(hba->dev);
  291. if (IS_ERR(host->reset_gpio)) {
  292. dev_err(hba->dev, "%s: failed to get reset GPIO, error %ld\n",
  293. __func__, PTR_ERR(host->reset_gpio));
  294. host->reset_gpio = NULL;
  295. }
  296. if (host->reset_gpio) {
  297. gpiod_set_value_cansleep(host->reset_gpio, 0);
  298. hba->caps |= UFSHCD_CAP_DEEPSLEEP;
  299. }
  300. }
  301. intel_ltr_expose(hba->dev);
  302. intel_add_debugfs(hba);
  303. return 0;
  304. }
  305. static void ufs_intel_common_exit(struct ufs_hba *hba)
  306. {
  307. intel_remove_debugfs(hba);
  308. intel_ltr_hide(hba->dev);
  309. }
  310. static int ufs_intel_resume(struct ufs_hba *hba, enum ufs_pm_op op)
  311. {
  312. if (ufshcd_is_link_hibern8(hba)) {
  313. int ret = ufshcd_uic_hibern8_exit(hba);
  314. if (!ret) {
  315. ufshcd_set_link_active(hba);
  316. } else {
  317. dev_err(hba->dev, "%s: hibern8 exit failed %d\n",
  318. __func__, ret);
  319. /*
  320. * Force reset and restore. Any other actions can lead
  321. * to an unrecoverable state.
  322. */
  323. ufshcd_set_link_off(hba);
  324. }
  325. }
  326. return 0;
  327. }
  328. static int ufs_intel_ehl_init(struct ufs_hba *hba)
  329. {
  330. hba->quirks |= UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8;
  331. return ufs_intel_common_init(hba);
  332. }
  333. static void ufs_intel_lkf_late_init(struct ufs_hba *hba)
  334. {
  335. /* LKF always needs a full reset, so set PM accordingly */
  336. if (hba->caps & UFSHCD_CAP_DEEPSLEEP) {
  337. hba->spm_lvl = UFS_PM_LVL_6;
  338. hba->rpm_lvl = UFS_PM_LVL_6;
  339. } else {
  340. hba->spm_lvl = UFS_PM_LVL_5;
  341. hba->rpm_lvl = UFS_PM_LVL_5;
  342. }
  343. }
  344. static int ufs_intel_lkf_init(struct ufs_hba *hba)
  345. {
  346. struct ufs_host *ufs_host;
  347. int err;
  348. hba->nop_out_timeout = 200;
  349. hba->quirks |= UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8;
  350. hba->caps |= UFSHCD_CAP_CRYPTO;
  351. err = ufs_intel_common_init(hba);
  352. ufs_host = ufshcd_get_variant(hba);
  353. ufs_host->late_init = ufs_intel_lkf_late_init;
  354. return err;
  355. }
  356. static int ufs_intel_adl_init(struct ufs_hba *hba)
  357. {
  358. hba->nop_out_timeout = 200;
  359. hba->quirks |= UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8;
  360. hba->caps |= UFSHCD_CAP_WB_EN;
  361. return ufs_intel_common_init(hba);
  362. }
  363. static int ufs_intel_mtl_init(struct ufs_hba *hba)
  364. {
  365. hba->caps |= UFSHCD_CAP_CRYPTO | UFSHCD_CAP_WB_EN;
  366. return ufs_intel_common_init(hba);
  367. }
  368. static struct ufs_hba_variant_ops ufs_intel_cnl_hba_vops = {
  369. .name = "intel-pci",
  370. .init = ufs_intel_common_init,
  371. .exit = ufs_intel_common_exit,
  372. .link_startup_notify = ufs_intel_link_startup_notify,
  373. .resume = ufs_intel_resume,
  374. };
  375. static struct ufs_hba_variant_ops ufs_intel_ehl_hba_vops = {
  376. .name = "intel-pci",
  377. .init = ufs_intel_ehl_init,
  378. .exit = ufs_intel_common_exit,
  379. .link_startup_notify = ufs_intel_link_startup_notify,
  380. .resume = ufs_intel_resume,
  381. };
  382. static struct ufs_hba_variant_ops ufs_intel_lkf_hba_vops = {
  383. .name = "intel-pci",
  384. .init = ufs_intel_lkf_init,
  385. .exit = ufs_intel_common_exit,
  386. .hce_enable_notify = ufs_intel_hce_enable_notify,
  387. .link_startup_notify = ufs_intel_link_startup_notify,
  388. .pwr_change_notify = ufs_intel_lkf_pwr_change_notify,
  389. .apply_dev_quirks = ufs_intel_lkf_apply_dev_quirks,
  390. .resume = ufs_intel_resume,
  391. .device_reset = ufs_intel_device_reset,
  392. };
  393. static struct ufs_hba_variant_ops ufs_intel_adl_hba_vops = {
  394. .name = "intel-pci",
  395. .init = ufs_intel_adl_init,
  396. .exit = ufs_intel_common_exit,
  397. .link_startup_notify = ufs_intel_link_startup_notify,
  398. .resume = ufs_intel_resume,
  399. .device_reset = ufs_intel_device_reset,
  400. };
  401. static struct ufs_hba_variant_ops ufs_intel_mtl_hba_vops = {
  402. .name = "intel-pci",
  403. .init = ufs_intel_mtl_init,
  404. .exit = ufs_intel_common_exit,
  405. .hce_enable_notify = ufs_intel_hce_enable_notify,
  406. .link_startup_notify = ufs_intel_link_startup_notify,
  407. .resume = ufs_intel_resume,
  408. .device_reset = ufs_intel_device_reset,
  409. };
  410. #ifdef CONFIG_PM_SLEEP
  411. static int ufshcd_pci_restore(struct device *dev)
  412. {
  413. struct ufs_hba *hba = dev_get_drvdata(dev);
  414. /* Force a full reset and restore */
  415. ufshcd_set_link_off(hba);
  416. return ufshcd_system_resume(dev);
  417. }
  418. #endif
  419. /**
  420. * ufshcd_pci_shutdown - main function to put the controller in reset state
  421. * @pdev: pointer to PCI device handle
  422. */
  423. static void ufshcd_pci_shutdown(struct pci_dev *pdev)
  424. {
  425. ufshcd_shutdown((struct ufs_hba *)pci_get_drvdata(pdev));
  426. }
  427. /**
  428. * ufshcd_pci_remove - de-allocate PCI/SCSI host and host memory space
  429. * data structure memory
  430. * @pdev: pointer to PCI handle
  431. */
  432. static void ufshcd_pci_remove(struct pci_dev *pdev)
  433. {
  434. struct ufs_hba *hba = pci_get_drvdata(pdev);
  435. pm_runtime_forbid(&pdev->dev);
  436. pm_runtime_get_noresume(&pdev->dev);
  437. ufshcd_remove(hba);
  438. ufshcd_dealloc_host(hba);
  439. }
  440. /**
  441. * ufshcd_pci_probe - probe routine of the driver
  442. * @pdev: pointer to PCI device handle
  443. * @id: PCI device id
  444. *
  445. * Returns 0 on success, non-zero value on failure
  446. */
  447. static int
  448. ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  449. {
  450. struct ufs_host *ufs_host;
  451. struct ufs_hba *hba;
  452. void __iomem *mmio_base;
  453. int err;
  454. err = pcim_enable_device(pdev);
  455. if (err) {
  456. dev_err(&pdev->dev, "pcim_enable_device failed\n");
  457. return err;
  458. }
  459. pci_set_master(pdev);
  460. err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
  461. if (err < 0) {
  462. dev_err(&pdev->dev, "request and iomap failed\n");
  463. return err;
  464. }
  465. mmio_base = pcim_iomap_table(pdev)[0];
  466. err = ufshcd_alloc_host(&pdev->dev, &hba);
  467. if (err) {
  468. dev_err(&pdev->dev, "Allocation failed\n");
  469. return err;
  470. }
  471. hba->vops = (struct ufs_hba_variant_ops *)id->driver_data;
  472. err = ufshcd_init(hba, mmio_base, pdev->irq);
  473. if (err) {
  474. dev_err(&pdev->dev, "Initialization failed\n");
  475. ufshcd_dealloc_host(hba);
  476. return err;
  477. }
  478. ufs_host = ufshcd_get_variant(hba);
  479. if (ufs_host && ufs_host->late_init)
  480. ufs_host->late_init(hba);
  481. pm_runtime_put_noidle(&pdev->dev);
  482. pm_runtime_allow(&pdev->dev);
  483. return 0;
  484. }
  485. static const struct dev_pm_ops ufshcd_pci_pm_ops = {
  486. SET_RUNTIME_PM_OPS(ufshcd_runtime_suspend, ufshcd_runtime_resume, NULL)
  487. #ifdef CONFIG_PM_SLEEP
  488. .suspend = ufshcd_system_suspend,
  489. .resume = ufshcd_system_resume,
  490. .freeze = ufshcd_system_suspend,
  491. .thaw = ufshcd_system_resume,
  492. .poweroff = ufshcd_system_suspend,
  493. .restore = ufshcd_pci_restore,
  494. .prepare = ufshcd_suspend_prepare,
  495. .complete = ufshcd_resume_complete,
  496. #endif
  497. };
  498. static const struct pci_device_id ufshcd_pci_tbl[] = {
  499. { PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
  500. { PCI_VDEVICE(INTEL, 0x9DFA), (kernel_ulong_t)&ufs_intel_cnl_hba_vops },
  501. { PCI_VDEVICE(INTEL, 0x4B41), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },
  502. { PCI_VDEVICE(INTEL, 0x4B43), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },
  503. { PCI_VDEVICE(INTEL, 0x98FA), (kernel_ulong_t)&ufs_intel_lkf_hba_vops },
  504. { PCI_VDEVICE(INTEL, 0x51FF), (kernel_ulong_t)&ufs_intel_adl_hba_vops },
  505. { PCI_VDEVICE(INTEL, 0x54FF), (kernel_ulong_t)&ufs_intel_adl_hba_vops },
  506. { PCI_VDEVICE(INTEL, 0x7E47), (kernel_ulong_t)&ufs_intel_mtl_hba_vops },
  507. { PCI_VDEVICE(INTEL, 0xA847), (kernel_ulong_t)&ufs_intel_mtl_hba_vops },
  508. { } /* terminate list */
  509. };
  510. MODULE_DEVICE_TABLE(pci, ufshcd_pci_tbl);
  511. static struct pci_driver ufshcd_pci_driver = {
  512. .name = UFSHCD,
  513. .id_table = ufshcd_pci_tbl,
  514. .probe = ufshcd_pci_probe,
  515. .remove = ufshcd_pci_remove,
  516. .shutdown = ufshcd_pci_shutdown,
  517. .driver = {
  518. .pm = &ufshcd_pci_pm_ops
  519. },
  520. };
  521. module_pci_driver(ufshcd_pci_driver);
  522. MODULE_AUTHOR("Santosh Yaragnavi <[email protected]>");
  523. MODULE_AUTHOR("Vinayak Holikatti <[email protected]>");
  524. MODULE_DESCRIPTION("UFS host controller PCI glue driver");
  525. MODULE_LICENSE("GPL");