qcom_scm.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. /*
  2. * Qualcomm SCM driver
  3. *
  4. * Copyright (c) 2010,2015, The Linux Foundation. All rights reserved.
  5. * Copyright (C) 2015 Linaro Ltd.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 and
  9. * only version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #include <linux/platform_device.h>
  18. #include <linux/init.h>
  19. #include <linux/cpumask.h>
  20. #include <linux/export.h>
  21. #include <linux/dma-direct.h>
  22. #include <linux/dma-mapping.h>
  23. #include <linux/module.h>
  24. #include <linux/types.h>
  25. #include <linux/qcom_scm.h>
  26. #include <linux/of.h>
  27. #include <linux/of_address.h>
  28. #include <linux/of_platform.h>
  29. #include <linux/clk.h>
  30. #include <linux/reset-controller.h>
  31. #include "qcom_scm.h"
  32. static bool download_mode = IS_ENABLED(CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT);
  33. module_param(download_mode, bool, 0);
  34. #define SCM_HAS_CORE_CLK BIT(0)
  35. #define SCM_HAS_IFACE_CLK BIT(1)
  36. #define SCM_HAS_BUS_CLK BIT(2)
  37. struct qcom_scm {
  38. struct device *dev;
  39. struct clk *core_clk;
  40. struct clk *iface_clk;
  41. struct clk *bus_clk;
  42. struct reset_controller_dev reset;
  43. u64 dload_mode_addr;
  44. };
  45. struct qcom_scm_current_perm_info {
  46. __le32 vmid;
  47. __le32 perm;
  48. __le64 ctx;
  49. __le32 ctx_size;
  50. __le32 unused;
  51. };
  52. struct qcom_scm_mem_map_info {
  53. __le64 mem_addr;
  54. __le64 mem_size;
  55. };
  56. static struct qcom_scm *__scm;
  57. static int qcom_scm_clk_enable(void)
  58. {
  59. int ret;
  60. ret = clk_prepare_enable(__scm->core_clk);
  61. if (ret)
  62. goto bail;
  63. ret = clk_prepare_enable(__scm->iface_clk);
  64. if (ret)
  65. goto disable_core;
  66. ret = clk_prepare_enable(__scm->bus_clk);
  67. if (ret)
  68. goto disable_iface;
  69. return 0;
  70. disable_iface:
  71. clk_disable_unprepare(__scm->iface_clk);
  72. disable_core:
  73. clk_disable_unprepare(__scm->core_clk);
  74. bail:
  75. return ret;
  76. }
  77. static void qcom_scm_clk_disable(void)
  78. {
  79. clk_disable_unprepare(__scm->core_clk);
  80. clk_disable_unprepare(__scm->iface_clk);
  81. clk_disable_unprepare(__scm->bus_clk);
  82. }
  83. /**
  84. * qcom_scm_set_cold_boot_addr() - Set the cold boot address for cpus
  85. * @entry: Entry point function for the cpus
  86. * @cpus: The cpumask of cpus that will use the entry point
  87. *
  88. * Set the cold boot address of the cpus. Any cpu outside the supported
  89. * range would be removed from the cpu present mask.
  90. */
  91. int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
  92. {
  93. return __qcom_scm_set_cold_boot_addr(entry, cpus);
  94. }
  95. EXPORT_SYMBOL(qcom_scm_set_cold_boot_addr);
  96. /**
  97. * qcom_scm_set_warm_boot_addr() - Set the warm boot address for cpus
  98. * @entry: Entry point function for the cpus
  99. * @cpus: The cpumask of cpus that will use the entry point
  100. *
  101. * Set the Linux entry point for the SCM to transfer control to when coming
  102. * out of a power down. CPU power down may be executed on cpuidle or hotplug.
  103. */
  104. int qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus)
  105. {
  106. return __qcom_scm_set_warm_boot_addr(__scm->dev, entry, cpus);
  107. }
  108. EXPORT_SYMBOL(qcom_scm_set_warm_boot_addr);
  109. /**
  110. * qcom_scm_cpu_power_down() - Power down the cpu
  111. * @flags - Flags to flush cache
  112. *
  113. * This is an end point to power down cpu. If there was a pending interrupt,
  114. * the control would return from this function, otherwise, the cpu jumps to the
  115. * warm boot entry point set for this cpu upon reset.
  116. */
  117. void qcom_scm_cpu_power_down(u32 flags)
  118. {
  119. __qcom_scm_cpu_power_down(flags);
  120. }
  121. EXPORT_SYMBOL(qcom_scm_cpu_power_down);
  122. /**
  123. * qcom_scm_hdcp_available() - Check if secure environment supports HDCP.
  124. *
  125. * Return true if HDCP is supported, false if not.
  126. */
  127. bool qcom_scm_hdcp_available(void)
  128. {
  129. int ret = qcom_scm_clk_enable();
  130. if (ret)
  131. return ret;
  132. ret = __qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_HDCP,
  133. QCOM_SCM_CMD_HDCP);
  134. qcom_scm_clk_disable();
  135. return ret > 0 ? true : false;
  136. }
  137. EXPORT_SYMBOL(qcom_scm_hdcp_available);
  138. /**
  139. * qcom_scm_hdcp_req() - Send HDCP request.
  140. * @req: HDCP request array
  141. * @req_cnt: HDCP request array count
  142. * @resp: response buffer passed to SCM
  143. *
  144. * Write HDCP register(s) through SCM.
  145. */
  146. int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp)
  147. {
  148. int ret = qcom_scm_clk_enable();
  149. if (ret)
  150. return ret;
  151. ret = __qcom_scm_hdcp_req(__scm->dev, req, req_cnt, resp);
  152. qcom_scm_clk_disable();
  153. return ret;
  154. }
  155. EXPORT_SYMBOL(qcom_scm_hdcp_req);
  156. /**
  157. * qcom_scm_pas_supported() - Check if the peripheral authentication service is
  158. * available for the given peripherial
  159. * @peripheral: peripheral id
  160. *
  161. * Returns true if PAS is supported for this peripheral, otherwise false.
  162. */
  163. bool qcom_scm_pas_supported(u32 peripheral)
  164. {
  165. int ret;
  166. ret = __qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_PIL,
  167. QCOM_SCM_PAS_IS_SUPPORTED_CMD);
  168. if (ret <= 0)
  169. return false;
  170. return __qcom_scm_pas_supported(__scm->dev, peripheral);
  171. }
  172. EXPORT_SYMBOL(qcom_scm_pas_supported);
  173. /**
  174. * qcom_scm_pas_init_image() - Initialize peripheral authentication service
  175. * state machine for a given peripheral, using the
  176. * metadata
  177. * @peripheral: peripheral id
  178. * @metadata: pointer to memory containing ELF header, program header table
  179. * and optional blob of data used for authenticating the metadata
  180. * and the rest of the firmware
  181. * @size: size of the metadata
  182. *
  183. * Returns 0 on success.
  184. */
  185. int qcom_scm_pas_init_image(u32 peripheral, const void *metadata, size_t size)
  186. {
  187. dma_addr_t mdata_phys;
  188. void *mdata_buf;
  189. int ret;
  190. /*
  191. * During the scm call memory protection will be enabled for the meta
  192. * data blob, so make sure it's physically contiguous, 4K aligned and
  193. * non-cachable to avoid XPU violations.
  194. */
  195. mdata_buf = dma_alloc_coherent(__scm->dev, size, &mdata_phys,
  196. GFP_KERNEL);
  197. if (!mdata_buf) {
  198. dev_err(__scm->dev, "Allocation of metadata buffer failed.\n");
  199. return -ENOMEM;
  200. }
  201. memcpy(mdata_buf, metadata, size);
  202. ret = qcom_scm_clk_enable();
  203. if (ret)
  204. goto free_metadata;
  205. ret = __qcom_scm_pas_init_image(__scm->dev, peripheral, mdata_phys);
  206. qcom_scm_clk_disable();
  207. free_metadata:
  208. dma_free_coherent(__scm->dev, size, mdata_buf, mdata_phys);
  209. return ret;
  210. }
  211. EXPORT_SYMBOL(qcom_scm_pas_init_image);
  212. /**
  213. * qcom_scm_pas_mem_setup() - Prepare the memory related to a given peripheral
  214. * for firmware loading
  215. * @peripheral: peripheral id
  216. * @addr: start address of memory area to prepare
  217. * @size: size of the memory area to prepare
  218. *
  219. * Returns 0 on success.
  220. */
  221. int qcom_scm_pas_mem_setup(u32 peripheral, phys_addr_t addr, phys_addr_t size)
  222. {
  223. int ret;
  224. ret = qcom_scm_clk_enable();
  225. if (ret)
  226. return ret;
  227. ret = __qcom_scm_pas_mem_setup(__scm->dev, peripheral, addr, size);
  228. qcom_scm_clk_disable();
  229. return ret;
  230. }
  231. EXPORT_SYMBOL(qcom_scm_pas_mem_setup);
  232. /**
  233. * qcom_scm_pas_auth_and_reset() - Authenticate the given peripheral firmware
  234. * and reset the remote processor
  235. * @peripheral: peripheral id
  236. *
  237. * Return 0 on success.
  238. */
  239. int qcom_scm_pas_auth_and_reset(u32 peripheral)
  240. {
  241. int ret;
  242. ret = qcom_scm_clk_enable();
  243. if (ret)
  244. return ret;
  245. ret = __qcom_scm_pas_auth_and_reset(__scm->dev, peripheral);
  246. qcom_scm_clk_disable();
  247. return ret;
  248. }
  249. EXPORT_SYMBOL(qcom_scm_pas_auth_and_reset);
  250. /**
  251. * qcom_scm_pas_shutdown() - Shut down the remote processor
  252. * @peripheral: peripheral id
  253. *
  254. * Returns 0 on success.
  255. */
  256. int qcom_scm_pas_shutdown(u32 peripheral)
  257. {
  258. int ret;
  259. ret = qcom_scm_clk_enable();
  260. if (ret)
  261. return ret;
  262. ret = __qcom_scm_pas_shutdown(__scm->dev, peripheral);
  263. qcom_scm_clk_disable();
  264. return ret;
  265. }
  266. EXPORT_SYMBOL(qcom_scm_pas_shutdown);
  267. static int qcom_scm_pas_reset_assert(struct reset_controller_dev *rcdev,
  268. unsigned long idx)
  269. {
  270. if (idx != 0)
  271. return -EINVAL;
  272. return __qcom_scm_pas_mss_reset(__scm->dev, 1);
  273. }
  274. static int qcom_scm_pas_reset_deassert(struct reset_controller_dev *rcdev,
  275. unsigned long idx)
  276. {
  277. if (idx != 0)
  278. return -EINVAL;
  279. return __qcom_scm_pas_mss_reset(__scm->dev, 0);
  280. }
  281. static const struct reset_control_ops qcom_scm_pas_reset_ops = {
  282. .assert = qcom_scm_pas_reset_assert,
  283. .deassert = qcom_scm_pas_reset_deassert,
  284. };
  285. int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare)
  286. {
  287. return __qcom_scm_restore_sec_cfg(__scm->dev, device_id, spare);
  288. }
  289. EXPORT_SYMBOL(qcom_scm_restore_sec_cfg);
  290. int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size)
  291. {
  292. return __qcom_scm_iommu_secure_ptbl_size(__scm->dev, spare, size);
  293. }
  294. EXPORT_SYMBOL(qcom_scm_iommu_secure_ptbl_size);
  295. int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare)
  296. {
  297. return __qcom_scm_iommu_secure_ptbl_init(__scm->dev, addr, size, spare);
  298. }
  299. EXPORT_SYMBOL(qcom_scm_iommu_secure_ptbl_init);
  300. int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val)
  301. {
  302. return __qcom_scm_io_readl(__scm->dev, addr, val);
  303. }
  304. EXPORT_SYMBOL(qcom_scm_io_readl);
  305. int qcom_scm_io_writel(phys_addr_t addr, unsigned int val)
  306. {
  307. return __qcom_scm_io_writel(__scm->dev, addr, val);
  308. }
  309. EXPORT_SYMBOL(qcom_scm_io_writel);
  310. static void qcom_scm_set_download_mode(bool enable)
  311. {
  312. bool avail;
  313. int ret = 0;
  314. avail = __qcom_scm_is_call_available(__scm->dev,
  315. QCOM_SCM_SVC_BOOT,
  316. QCOM_SCM_SET_DLOAD_MODE);
  317. if (avail) {
  318. ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
  319. } else if (__scm->dload_mode_addr) {
  320. ret = __qcom_scm_io_writel(__scm->dev, __scm->dload_mode_addr,
  321. enable ? QCOM_SCM_SET_DLOAD_MODE : 0);
  322. } else {
  323. dev_err(__scm->dev,
  324. "No available mechanism for setting download mode\n");
  325. }
  326. if (ret)
  327. dev_err(__scm->dev, "failed to set download mode: %d\n", ret);
  328. }
  329. static int qcom_scm_find_dload_address(struct device *dev, u64 *addr)
  330. {
  331. struct device_node *tcsr;
  332. struct device_node *np = dev->of_node;
  333. struct resource res;
  334. u32 offset;
  335. int ret;
  336. tcsr = of_parse_phandle(np, "qcom,dload-mode", 0);
  337. if (!tcsr)
  338. return 0;
  339. ret = of_address_to_resource(tcsr, 0, &res);
  340. of_node_put(tcsr);
  341. if (ret)
  342. return ret;
  343. ret = of_property_read_u32_index(np, "qcom,dload-mode", 1, &offset);
  344. if (ret < 0)
  345. return ret;
  346. *addr = res.start + offset;
  347. return 0;
  348. }
  349. /**
  350. * qcom_scm_is_available() - Checks if SCM is available
  351. */
  352. bool qcom_scm_is_available(void)
  353. {
  354. return !!__scm;
  355. }
  356. EXPORT_SYMBOL(qcom_scm_is_available);
  357. int qcom_scm_set_remote_state(u32 state, u32 id)
  358. {
  359. return __qcom_scm_set_remote_state(__scm->dev, state, id);
  360. }
  361. EXPORT_SYMBOL(qcom_scm_set_remote_state);
  362. /**
  363. * qcom_scm_assign_mem() - Make a secure call to reassign memory ownership
  364. * @mem_addr: mem region whose ownership need to be reassigned
  365. * @mem_sz: size of the region.
  366. * @srcvm: vmid for current set of owners, each set bit in
  367. * flag indicate a unique owner
  368. * @newvm: array having new owners and corrsponding permission
  369. * flags
  370. * @dest_cnt: number of owners in next set.
  371. *
  372. * Return negative errno on failure, 0 on success, with @srcvm updated.
  373. */
  374. int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz,
  375. unsigned int *srcvm,
  376. struct qcom_scm_vmperm *newvm, int dest_cnt)
  377. {
  378. struct qcom_scm_current_perm_info *destvm;
  379. struct qcom_scm_mem_map_info *mem_to_map;
  380. phys_addr_t mem_to_map_phys;
  381. phys_addr_t dest_phys;
  382. phys_addr_t ptr_phys;
  383. dma_addr_t ptr_dma;
  384. size_t mem_to_map_sz;
  385. size_t dest_sz;
  386. size_t src_sz;
  387. size_t ptr_sz;
  388. int next_vm;
  389. __le32 *src;
  390. void *ptr;
  391. int ret;
  392. int len;
  393. int i;
  394. src_sz = hweight_long(*srcvm) * sizeof(*src);
  395. mem_to_map_sz = sizeof(*mem_to_map);
  396. dest_sz = dest_cnt * sizeof(*destvm);
  397. ptr_sz = ALIGN(src_sz, SZ_64) + ALIGN(mem_to_map_sz, SZ_64) +
  398. ALIGN(dest_sz, SZ_64);
  399. ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_dma, GFP_KERNEL);
  400. if (!ptr)
  401. return -ENOMEM;
  402. ptr_phys = dma_to_phys(__scm->dev, ptr_dma);
  403. /* Fill source vmid detail */
  404. src = ptr;
  405. len = hweight_long(*srcvm);
  406. for (i = 0; i < len; i++) {
  407. src[i] = cpu_to_le32(ffs(*srcvm) - 1);
  408. *srcvm ^= 1 << (ffs(*srcvm) - 1);
  409. }
  410. /* Fill details of mem buff to map */
  411. mem_to_map = ptr + ALIGN(src_sz, SZ_64);
  412. mem_to_map_phys = ptr_phys + ALIGN(src_sz, SZ_64);
  413. mem_to_map[0].mem_addr = cpu_to_le64(mem_addr);
  414. mem_to_map[0].mem_size = cpu_to_le64(mem_sz);
  415. next_vm = 0;
  416. /* Fill details of next vmid detail */
  417. destvm = ptr + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(src_sz, SZ_64);
  418. dest_phys = ptr_phys + ALIGN(mem_to_map_sz, SZ_64) + ALIGN(src_sz, SZ_64);
  419. for (i = 0; i < dest_cnt; i++) {
  420. destvm[i].vmid = cpu_to_le32(newvm[i].vmid);
  421. destvm[i].perm = cpu_to_le32(newvm[i].perm);
  422. destvm[i].ctx = 0;
  423. destvm[i].ctx_size = 0;
  424. next_vm |= BIT(newvm[i].vmid);
  425. }
  426. ret = __qcom_scm_assign_mem(__scm->dev, mem_to_map_phys, mem_to_map_sz,
  427. ptr_phys, src_sz, dest_phys, dest_sz);
  428. dma_free_coherent(__scm->dev, ptr_sz, ptr, ptr_dma);
  429. if (ret) {
  430. dev_err(__scm->dev,
  431. "Assign memory protection call failed %d.\n", ret);
  432. return -EINVAL;
  433. }
  434. *srcvm = next_vm;
  435. return 0;
  436. }
  437. EXPORT_SYMBOL(qcom_scm_assign_mem);
  438. static int qcom_scm_probe(struct platform_device *pdev)
  439. {
  440. struct qcom_scm *scm;
  441. unsigned long clks;
  442. int ret;
  443. scm = devm_kzalloc(&pdev->dev, sizeof(*scm), GFP_KERNEL);
  444. if (!scm)
  445. return -ENOMEM;
  446. ret = qcom_scm_find_dload_address(&pdev->dev, &scm->dload_mode_addr);
  447. if (ret < 0)
  448. return ret;
  449. clks = (unsigned long)of_device_get_match_data(&pdev->dev);
  450. if (clks & SCM_HAS_CORE_CLK) {
  451. scm->core_clk = devm_clk_get(&pdev->dev, "core");
  452. if (IS_ERR(scm->core_clk)) {
  453. if (PTR_ERR(scm->core_clk) != -EPROBE_DEFER)
  454. dev_err(&pdev->dev,
  455. "failed to acquire core clk\n");
  456. return PTR_ERR(scm->core_clk);
  457. }
  458. }
  459. if (clks & SCM_HAS_IFACE_CLK) {
  460. scm->iface_clk = devm_clk_get(&pdev->dev, "iface");
  461. if (IS_ERR(scm->iface_clk)) {
  462. if (PTR_ERR(scm->iface_clk) != -EPROBE_DEFER)
  463. dev_err(&pdev->dev,
  464. "failed to acquire iface clk\n");
  465. return PTR_ERR(scm->iface_clk);
  466. }
  467. }
  468. if (clks & SCM_HAS_BUS_CLK) {
  469. scm->bus_clk = devm_clk_get(&pdev->dev, "bus");
  470. if (IS_ERR(scm->bus_clk)) {
  471. if (PTR_ERR(scm->bus_clk) != -EPROBE_DEFER)
  472. dev_err(&pdev->dev,
  473. "failed to acquire bus clk\n");
  474. return PTR_ERR(scm->bus_clk);
  475. }
  476. }
  477. scm->reset.ops = &qcom_scm_pas_reset_ops;
  478. scm->reset.nr_resets = 1;
  479. scm->reset.of_node = pdev->dev.of_node;
  480. ret = devm_reset_controller_register(&pdev->dev, &scm->reset);
  481. if (ret)
  482. return ret;
  483. /* vote for max clk rate for highest performance */
  484. ret = clk_set_rate(scm->core_clk, INT_MAX);
  485. if (ret)
  486. return ret;
  487. __scm = scm;
  488. __scm->dev = &pdev->dev;
  489. __qcom_scm_init();
  490. /*
  491. * If requested enable "download mode", from this point on warmboot
  492. * will cause the the boot stages to enter download mode, unless
  493. * disabled below by a clean shutdown/reboot.
  494. */
  495. if (download_mode)
  496. qcom_scm_set_download_mode(true);
  497. return 0;
  498. }
  499. static void qcom_scm_shutdown(struct platform_device *pdev)
  500. {
  501. /* Clean shutdown, disable download mode to allow normal restart */
  502. if (download_mode)
  503. qcom_scm_set_download_mode(false);
  504. }
  505. static const struct of_device_id qcom_scm_dt_match[] = {
  506. { .compatible = "qcom,scm-apq8064",
  507. /* FIXME: This should have .data = (void *) SCM_HAS_CORE_CLK */
  508. },
  509. { .compatible = "qcom,scm-msm8660",
  510. .data = (void *) SCM_HAS_CORE_CLK,
  511. },
  512. { .compatible = "qcom,scm-msm8960",
  513. .data = (void *) SCM_HAS_CORE_CLK,
  514. },
  515. { .compatible = "qcom,scm-msm8996",
  516. .data = NULL, /* no clocks */
  517. },
  518. { .compatible = "qcom,scm-ipq4019",
  519. .data = NULL, /* no clocks */
  520. },
  521. { .compatible = "qcom,scm",
  522. .data = (void *)(SCM_HAS_CORE_CLK
  523. | SCM_HAS_IFACE_CLK
  524. | SCM_HAS_BUS_CLK),
  525. },
  526. {}
  527. };
  528. static struct platform_driver qcom_scm_driver = {
  529. .driver = {
  530. .name = "qcom_scm",
  531. .of_match_table = qcom_scm_dt_match,
  532. },
  533. .probe = qcom_scm_probe,
  534. .shutdown = qcom_scm_shutdown,
  535. };
  536. static int __init qcom_scm_init(void)
  537. {
  538. return platform_driver_register(&qcom_scm_driver);
  539. }
  540. subsys_initcall(qcom_scm_init);