smsm.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2015, Sony Mobile Communications Inc.
  4. * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
  5. */
  6. #include <linux/interrupt.h>
  7. #include <linux/mfd/syscon.h>
  8. #include <linux/module.h>
  9. #include <linux/of_irq.h>
  10. #include <linux/platform_device.h>
  11. #include <linux/spinlock.h>
  12. #include <linux/regmap.h>
  13. #include <linux/soc/qcom/smem.h>
  14. #include <linux/soc/qcom/smem_state.h>
  15. /*
  16. * This driver implements the Qualcomm Shared Memory State Machine, a mechanism
  17. * for communicating single bit state information to remote processors.
  18. *
  19. * The implementation is based on two sections of shared memory; the first
  20. * holding the state bits and the second holding a matrix of subscription bits.
  21. *
  22. * The state bits are structured in entries of 32 bits, each belonging to one
  23. * system in the SoC. The entry belonging to the local system is considered
  24. * read-write, while the rest should be considered read-only.
  25. *
  26. * The subscription matrix consists of N bitmaps per entry, denoting interest
  27. * in updates of the entry for each of the N hosts. Upon updating a state bit
  28. * each host's subscription bitmap should be queried and the remote system
  29. * should be interrupted if they request so.
  30. *
  31. * The subscription matrix is laid out in entry-major order:
  32. * entry0: [host0 ... hostN]
  33. * .
  34. * .
  35. * entryM: [host0 ... hostN]
  36. *
  37. * A third, optional, shared memory region might contain information regarding
  38. * the number of entries in the state bitmap as well as number of columns in
  39. * the subscription matrix.
  40. */
  41. /*
  42. * Shared memory identifiers, used to acquire handles to respective memory
  43. * region.
  44. */
  45. #define SMEM_SMSM_SHARED_STATE 85
  46. #define SMEM_SMSM_CPU_INTR_MASK 333
  47. #define SMEM_SMSM_SIZE_INFO 419
  48. /*
  49. * Default sizes, in case SMEM_SMSM_SIZE_INFO is not found.
  50. */
  51. #define SMSM_DEFAULT_NUM_ENTRIES 8
  52. #define SMSM_DEFAULT_NUM_HOSTS 3
  53. struct smsm_entry;
  54. struct smsm_host;
  55. /**
  56. * struct qcom_smsm - smsm driver context
  57. * @dev: smsm device pointer
  58. * @local_host: column in the subscription matrix representing this system
  59. * @num_hosts: number of columns in the subscription matrix
  60. * @num_entries: number of entries in the state map and rows in the subscription
  61. * matrix
  62. * @local_state: pointer to the local processor's state bits
  63. * @subscription: pointer to local processor's row in subscription matrix
  64. * @state: smem state handle
  65. * @lock: spinlock for read-modify-write of the outgoing state
  66. * @entries: context for each of the entries
  67. * @hosts: context for each of the hosts
  68. */
  69. struct qcom_smsm {
  70. struct device *dev;
  71. u32 local_host;
  72. u32 num_hosts;
  73. u32 num_entries;
  74. u32 *local_state;
  75. u32 *subscription;
  76. struct qcom_smem_state *state;
  77. spinlock_t lock;
  78. struct smsm_entry *entries;
  79. struct smsm_host *hosts;
  80. };
  81. /**
  82. * struct smsm_entry - per remote processor entry context
  83. * @smsm: back-reference to driver context
  84. * @domain: IRQ domain for this entry, if representing a remote system
  85. * @irq_enabled: bitmap of which state bits IRQs are enabled
  86. * @irq_rising: bitmap tracking if rising bits should be propagated
  87. * @irq_falling: bitmap tracking if falling bits should be propagated
  88. * @last_value: snapshot of state bits last time the interrupts where propagated
  89. * @remote_state: pointer to this entry's state bits
  90. * @subscription: pointer to a row in the subscription matrix representing this
  91. * entry
  92. */
  93. struct smsm_entry {
  94. struct qcom_smsm *smsm;
  95. struct irq_domain *domain;
  96. DECLARE_BITMAP(irq_enabled, 32);
  97. DECLARE_BITMAP(irq_rising, 32);
  98. DECLARE_BITMAP(irq_falling, 32);
  99. unsigned long last_value;
  100. u32 *remote_state;
  101. u32 *subscription;
  102. };
  103. /**
  104. * struct smsm_host - representation of a remote host
  105. * @ipc_regmap: regmap for outgoing interrupt
  106. * @ipc_offset: offset in @ipc_regmap for outgoing interrupt
  107. * @ipc_bit: bit in @ipc_regmap + @ipc_offset for outgoing interrupt
  108. */
  109. struct smsm_host {
  110. struct regmap *ipc_regmap;
  111. int ipc_offset;
  112. int ipc_bit;
  113. };
  114. /**
  115. * smsm_update_bits() - change bit in outgoing entry and inform subscribers
  116. * @data: smsm context pointer
  117. * @mask: value mask
  118. * @value: new value
  119. *
  120. * Used to set and clear the bits in the outgoing/local entry and inform
  121. * subscribers about the change.
  122. */
  123. static int smsm_update_bits(void *data, u32 mask, u32 value)
  124. {
  125. struct qcom_smsm *smsm = data;
  126. struct smsm_host *hostp;
  127. unsigned long flags;
  128. u32 changes;
  129. u32 host;
  130. u32 orig;
  131. u32 val;
  132. spin_lock_irqsave(&smsm->lock, flags);
  133. /* Update the entry */
  134. val = orig = readl(smsm->local_state);
  135. val &= ~mask;
  136. val |= value;
  137. /* Don't signal if we didn't change the value */
  138. changes = val ^ orig;
  139. if (!changes) {
  140. spin_unlock_irqrestore(&smsm->lock, flags);
  141. goto done;
  142. }
  143. /* Write out the new value */
  144. writel(val, smsm->local_state);
  145. spin_unlock_irqrestore(&smsm->lock, flags);
  146. /* Make sure the value update is ordered before any kicks */
  147. wmb();
  148. /* Iterate over all hosts to check whom wants a kick */
  149. for (host = 0; host < smsm->num_hosts; host++) {
  150. hostp = &smsm->hosts[host];
  151. val = readl(smsm->subscription + host);
  152. if (val & changes && hostp->ipc_regmap) {
  153. regmap_write(hostp->ipc_regmap,
  154. hostp->ipc_offset,
  155. BIT(hostp->ipc_bit));
  156. }
  157. }
  158. done:
  159. return 0;
  160. }
  161. static const struct qcom_smem_state_ops smsm_state_ops = {
  162. .update_bits = smsm_update_bits,
  163. };
  164. /**
  165. * smsm_intr() - cascading IRQ handler for SMSM
  166. * @irq: unused
  167. * @data: entry related to this IRQ
  168. *
  169. * This function cascades an incoming interrupt from a remote system, based on
  170. * the state bits and configuration.
  171. */
  172. static irqreturn_t smsm_intr(int irq, void *data)
  173. {
  174. struct smsm_entry *entry = data;
  175. unsigned i;
  176. int irq_pin;
  177. u32 changed;
  178. u32 val;
  179. val = readl(entry->remote_state);
  180. changed = val ^ xchg(&entry->last_value, val);
  181. for_each_set_bit(i, entry->irq_enabled, 32) {
  182. if (!(changed & BIT(i)))
  183. continue;
  184. if (val & BIT(i)) {
  185. if (test_bit(i, entry->irq_rising)) {
  186. irq_pin = irq_find_mapping(entry->domain, i);
  187. handle_nested_irq(irq_pin);
  188. }
  189. } else {
  190. if (test_bit(i, entry->irq_falling)) {
  191. irq_pin = irq_find_mapping(entry->domain, i);
  192. handle_nested_irq(irq_pin);
  193. }
  194. }
  195. }
  196. return IRQ_HANDLED;
  197. }
  198. /**
  199. * smsm_mask_irq() - un-subscribe from cascades of IRQs of a certain staus bit
  200. * @irqd: IRQ handle to be masked
  201. *
  202. * This un-subscribes the local CPU from interrupts upon changes to the defines
  203. * status bit. The bit is also cleared from cascading.
  204. */
  205. static void smsm_mask_irq(struct irq_data *irqd)
  206. {
  207. struct smsm_entry *entry = irq_data_get_irq_chip_data(irqd);
  208. irq_hw_number_t irq = irqd_to_hwirq(irqd);
  209. struct qcom_smsm *smsm = entry->smsm;
  210. u32 val;
  211. if (entry->subscription) {
  212. val = readl(entry->subscription + smsm->local_host);
  213. val &= ~BIT(irq);
  214. writel(val, entry->subscription + smsm->local_host);
  215. }
  216. clear_bit(irq, entry->irq_enabled);
  217. }
  218. /**
  219. * smsm_unmask_irq() - subscribe to cascades of IRQs of a certain status bit
  220. * @irqd: IRQ handle to be unmasked
  221. *
  222. * This subscribes the local CPU to interrupts upon changes to the defined
  223. * status bit. The bit is also marked for cascading.
  224. */
  225. static void smsm_unmask_irq(struct irq_data *irqd)
  226. {
  227. struct smsm_entry *entry = irq_data_get_irq_chip_data(irqd);
  228. irq_hw_number_t irq = irqd_to_hwirq(irqd);
  229. struct qcom_smsm *smsm = entry->smsm;
  230. u32 val;
  231. /* Make sure our last cached state is up-to-date */
  232. if (readl(entry->remote_state) & BIT(irq))
  233. set_bit(irq, &entry->last_value);
  234. else
  235. clear_bit(irq, &entry->last_value);
  236. set_bit(irq, entry->irq_enabled);
  237. if (entry->subscription) {
  238. val = readl(entry->subscription + smsm->local_host);
  239. val |= BIT(irq);
  240. writel(val, entry->subscription + smsm->local_host);
  241. }
  242. }
  243. /**
  244. * smsm_set_irq_type() - updates the requested IRQ type for the cascading
  245. * @irqd: consumer interrupt handle
  246. * @type: requested flags
  247. */
  248. static int smsm_set_irq_type(struct irq_data *irqd, unsigned int type)
  249. {
  250. struct smsm_entry *entry = irq_data_get_irq_chip_data(irqd);
  251. irq_hw_number_t irq = irqd_to_hwirq(irqd);
  252. if (!(type & IRQ_TYPE_EDGE_BOTH))
  253. return -EINVAL;
  254. if (type & IRQ_TYPE_EDGE_RISING)
  255. set_bit(irq, entry->irq_rising);
  256. else
  257. clear_bit(irq, entry->irq_rising);
  258. if (type & IRQ_TYPE_EDGE_FALLING)
  259. set_bit(irq, entry->irq_falling);
  260. else
  261. clear_bit(irq, entry->irq_falling);
  262. return 0;
  263. }
  264. static int smsm_get_irqchip_state(struct irq_data *irqd,
  265. enum irqchip_irq_state which, bool *state)
  266. {
  267. struct smsm_entry *entry = irq_data_get_irq_chip_data(irqd);
  268. irq_hw_number_t irq = irqd_to_hwirq(irqd);
  269. u32 val;
  270. if (which != IRQCHIP_STATE_LINE_LEVEL)
  271. return -EINVAL;
  272. val = readl(entry->remote_state);
  273. *state = !!(val & BIT(irq));
  274. return 0;
  275. }
  276. static struct irq_chip smsm_irq_chip = {
  277. .name = "smsm",
  278. .irq_mask = smsm_mask_irq,
  279. .irq_unmask = smsm_unmask_irq,
  280. .irq_set_type = smsm_set_irq_type,
  281. .irq_get_irqchip_state = smsm_get_irqchip_state,
  282. };
  283. /**
  284. * smsm_irq_map() - sets up a mapping for a cascaded IRQ
  285. * @d: IRQ domain representing an entry
  286. * @irq: IRQ to set up
  287. * @hw: unused
  288. */
  289. static int smsm_irq_map(struct irq_domain *d,
  290. unsigned int irq,
  291. irq_hw_number_t hw)
  292. {
  293. struct smsm_entry *entry = d->host_data;
  294. irq_set_chip_and_handler(irq, &smsm_irq_chip, handle_level_irq);
  295. irq_set_chip_data(irq, entry);
  296. irq_set_nested_thread(irq, 1);
  297. return 0;
  298. }
  299. static const struct irq_domain_ops smsm_irq_ops = {
  300. .map = smsm_irq_map,
  301. .xlate = irq_domain_xlate_twocell,
  302. };
  303. /**
  304. * smsm_parse_ipc() - parses a qcom,ipc-%d device tree property
  305. * @smsm: smsm driver context
  306. * @host_id: index of the remote host to be resolved
  307. *
  308. * Parses device tree to acquire the information needed for sending the
  309. * outgoing interrupts to a remote host - identified by @host_id.
  310. */
  311. static int smsm_parse_ipc(struct qcom_smsm *smsm, unsigned host_id)
  312. {
  313. struct device_node *syscon;
  314. struct device_node *node = smsm->dev->of_node;
  315. struct smsm_host *host = &smsm->hosts[host_id];
  316. char key[16];
  317. int ret;
  318. snprintf(key, sizeof(key), "qcom,ipc-%d", host_id);
  319. syscon = of_parse_phandle(node, key, 0);
  320. if (!syscon)
  321. return 0;
  322. host->ipc_regmap = syscon_node_to_regmap(syscon);
  323. of_node_put(syscon);
  324. if (IS_ERR(host->ipc_regmap))
  325. return PTR_ERR(host->ipc_regmap);
  326. ret = of_property_read_u32_index(node, key, 1, &host->ipc_offset);
  327. if (ret < 0) {
  328. dev_err(smsm->dev, "no offset in %s\n", key);
  329. return -EINVAL;
  330. }
  331. ret = of_property_read_u32_index(node, key, 2, &host->ipc_bit);
  332. if (ret < 0) {
  333. dev_err(smsm->dev, "no bit in %s\n", key);
  334. return -EINVAL;
  335. }
  336. return 0;
  337. }
  338. /**
  339. * smsm_inbound_entry() - parse DT and set up an entry representing a remote system
  340. * @smsm: smsm driver context
  341. * @entry: entry context to be set up
  342. * @node: dt node containing the entry's properties
  343. */
  344. static int smsm_inbound_entry(struct qcom_smsm *smsm,
  345. struct smsm_entry *entry,
  346. struct device_node *node)
  347. {
  348. int ret;
  349. int irq;
  350. irq = irq_of_parse_and_map(node, 0);
  351. if (!irq) {
  352. dev_err(smsm->dev, "failed to parse smsm interrupt\n");
  353. return -EINVAL;
  354. }
  355. ret = devm_request_threaded_irq(smsm->dev, irq,
  356. NULL, smsm_intr,
  357. IRQF_ONESHOT,
  358. "smsm", (void *)entry);
  359. if (ret) {
  360. dev_err(smsm->dev, "failed to request interrupt\n");
  361. return ret;
  362. }
  363. entry->domain = irq_domain_add_linear(node, 32, &smsm_irq_ops, entry);
  364. if (!entry->domain) {
  365. dev_err(smsm->dev, "failed to add irq_domain\n");
  366. return -ENOMEM;
  367. }
  368. return 0;
  369. }
  370. /**
  371. * smsm_get_size_info() - parse the optional memory segment for sizes
  372. * @smsm: smsm driver context
  373. *
  374. * Attempt to acquire the number of hosts and entries from the optional shared
  375. * memory location. Not being able to find this segment should indicate that
  376. * we're on a older system where these values was hard coded to
  377. * SMSM_DEFAULT_NUM_ENTRIES and SMSM_DEFAULT_NUM_HOSTS.
  378. *
  379. * Returns 0 on success, negative errno on failure.
  380. */
  381. static int smsm_get_size_info(struct qcom_smsm *smsm)
  382. {
  383. size_t size;
  384. struct {
  385. u32 num_hosts;
  386. u32 num_entries;
  387. u32 reserved0;
  388. u32 reserved1;
  389. } *info;
  390. info = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_SMSM_SIZE_INFO, &size);
  391. if (IS_ERR(info) && PTR_ERR(info) != -ENOENT) {
  392. if (PTR_ERR(info) != -EPROBE_DEFER)
  393. dev_err(smsm->dev, "unable to retrieve smsm size info\n");
  394. return PTR_ERR(info);
  395. } else if (IS_ERR(info) || size != sizeof(*info)) {
  396. dev_warn(smsm->dev, "no smsm size info, using defaults\n");
  397. smsm->num_entries = SMSM_DEFAULT_NUM_ENTRIES;
  398. smsm->num_hosts = SMSM_DEFAULT_NUM_HOSTS;
  399. return 0;
  400. }
  401. smsm->num_entries = info->num_entries;
  402. smsm->num_hosts = info->num_hosts;
  403. dev_dbg(smsm->dev,
  404. "found custom size of smsm: %d entries %d hosts\n",
  405. smsm->num_entries, smsm->num_hosts);
  406. return 0;
  407. }
  408. static int qcom_smsm_probe(struct platform_device *pdev)
  409. {
  410. struct device_node *local_node;
  411. struct device_node *node;
  412. struct smsm_entry *entry;
  413. struct qcom_smsm *smsm;
  414. u32 *intr_mask;
  415. size_t size;
  416. u32 *states;
  417. u32 id;
  418. int ret;
  419. smsm = devm_kzalloc(&pdev->dev, sizeof(*smsm), GFP_KERNEL);
  420. if (!smsm)
  421. return -ENOMEM;
  422. smsm->dev = &pdev->dev;
  423. spin_lock_init(&smsm->lock);
  424. ret = smsm_get_size_info(smsm);
  425. if (ret)
  426. return ret;
  427. smsm->entries = devm_kcalloc(&pdev->dev,
  428. smsm->num_entries,
  429. sizeof(struct smsm_entry),
  430. GFP_KERNEL);
  431. if (!smsm->entries)
  432. return -ENOMEM;
  433. smsm->hosts = devm_kcalloc(&pdev->dev,
  434. smsm->num_hosts,
  435. sizeof(struct smsm_host),
  436. GFP_KERNEL);
  437. if (!smsm->hosts)
  438. return -ENOMEM;
  439. for_each_child_of_node(pdev->dev.of_node, local_node) {
  440. if (of_find_property(local_node, "#qcom,smem-state-cells", NULL))
  441. break;
  442. }
  443. if (!local_node) {
  444. dev_err(&pdev->dev, "no state entry\n");
  445. return -EINVAL;
  446. }
  447. of_property_read_u32(pdev->dev.of_node,
  448. "qcom,local-host",
  449. &smsm->local_host);
  450. /* Parse the host properties */
  451. for (id = 0; id < smsm->num_hosts; id++) {
  452. ret = smsm_parse_ipc(smsm, id);
  453. if (ret < 0)
  454. goto out_put;
  455. }
  456. /* Acquire the main SMSM state vector */
  457. ret = qcom_smem_alloc(QCOM_SMEM_HOST_ANY, SMEM_SMSM_SHARED_STATE,
  458. smsm->num_entries * sizeof(u32));
  459. if (ret < 0 && ret != -EEXIST) {
  460. dev_err(&pdev->dev, "unable to allocate shared state entry\n");
  461. goto out_put;
  462. }
  463. states = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_SMSM_SHARED_STATE, NULL);
  464. if (IS_ERR(states)) {
  465. dev_err(&pdev->dev, "Unable to acquire shared state entry\n");
  466. ret = PTR_ERR(states);
  467. goto out_put;
  468. }
  469. /* Acquire the list of interrupt mask vectors */
  470. size = smsm->num_entries * smsm->num_hosts * sizeof(u32);
  471. ret = qcom_smem_alloc(QCOM_SMEM_HOST_ANY, SMEM_SMSM_CPU_INTR_MASK, size);
  472. if (ret < 0 && ret != -EEXIST) {
  473. dev_err(&pdev->dev, "unable to allocate smsm interrupt mask\n");
  474. goto out_put;
  475. }
  476. intr_mask = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_SMSM_CPU_INTR_MASK, NULL);
  477. if (IS_ERR(intr_mask)) {
  478. dev_err(&pdev->dev, "unable to acquire shared memory interrupt mask\n");
  479. ret = PTR_ERR(intr_mask);
  480. goto out_put;
  481. }
  482. /* Setup the reference to the local state bits */
  483. smsm->local_state = states + smsm->local_host;
  484. smsm->subscription = intr_mask + smsm->local_host * smsm->num_hosts;
  485. /* Register the outgoing state */
  486. smsm->state = qcom_smem_state_register(local_node, &smsm_state_ops, smsm);
  487. if (IS_ERR(smsm->state)) {
  488. dev_err(smsm->dev, "failed to register qcom_smem_state\n");
  489. ret = PTR_ERR(smsm->state);
  490. goto out_put;
  491. }
  492. /* Register handlers for remote processor entries of interest. */
  493. for_each_available_child_of_node(pdev->dev.of_node, node) {
  494. if (!of_property_read_bool(node, "interrupt-controller"))
  495. continue;
  496. ret = of_property_read_u32(node, "reg", &id);
  497. if (ret || id >= smsm->num_entries) {
  498. dev_err(&pdev->dev, "invalid reg of entry\n");
  499. if (!ret)
  500. ret = -EINVAL;
  501. goto unwind_interfaces;
  502. }
  503. entry = &smsm->entries[id];
  504. entry->smsm = smsm;
  505. entry->remote_state = states + id;
  506. /* Setup subscription pointers and unsubscribe to any kicks */
  507. entry->subscription = intr_mask + id * smsm->num_hosts;
  508. writel(0, entry->subscription + smsm->local_host);
  509. ret = smsm_inbound_entry(smsm, entry, node);
  510. if (ret < 0)
  511. goto unwind_interfaces;
  512. }
  513. platform_set_drvdata(pdev, smsm);
  514. of_node_put(local_node);
  515. return 0;
  516. unwind_interfaces:
  517. of_node_put(node);
  518. for (id = 0; id < smsm->num_entries; id++)
  519. if (smsm->entries[id].domain)
  520. irq_domain_remove(smsm->entries[id].domain);
  521. qcom_smem_state_unregister(smsm->state);
  522. out_put:
  523. of_node_put(local_node);
  524. return ret;
  525. }
  526. static int qcom_smsm_remove(struct platform_device *pdev)
  527. {
  528. struct qcom_smsm *smsm = platform_get_drvdata(pdev);
  529. unsigned id;
  530. for (id = 0; id < smsm->num_entries; id++)
  531. if (smsm->entries[id].domain)
  532. irq_domain_remove(smsm->entries[id].domain);
  533. qcom_smem_state_unregister(smsm->state);
  534. return 0;
  535. }
  536. static const struct of_device_id qcom_smsm_of_match[] = {
  537. { .compatible = "qcom,smsm" },
  538. {}
  539. };
  540. MODULE_DEVICE_TABLE(of, qcom_smsm_of_match);
  541. static struct platform_driver qcom_smsm_driver = {
  542. .probe = qcom_smsm_probe,
  543. .remove = qcom_smsm_remove,
  544. .driver = {
  545. .name = "qcom-smsm",
  546. .of_match_table = qcom_smsm_of_match,
  547. },
  548. };
  549. module_platform_driver(qcom_smsm_driver);
  550. MODULE_DESCRIPTION("Qualcomm Shared Memory State Machine driver");
  551. MODULE_LICENSE("GPL v2");