1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
6 #include <linux/delay.h>
7 #include <linux/interrupt.h>
9 #include <linux/mailbox_controller.h>
11 #include <linux/of_device.h>
12 #include <linux/platform_device.h>
14 #include <linux/slab.h>
16 #include <soc/tegra/fuse.h>
18 #include <dt-bindings/mailbox/tegra186-hsp.h>
22 #define HSP_INT_IE(x) (0x100 + ((x) * 4))
23 #define HSP_INT_IV 0x300
24 #define HSP_INT_IR 0x304
26 #define HSP_INT_EMPTY_SHIFT 0
27 #define HSP_INT_EMPTY_MASK 0xff
28 #define HSP_INT_FULL_SHIFT 8
29 #define HSP_INT_FULL_MASK 0xff
31 #define HSP_INT_DIMENSIONING 0x380
32 #define HSP_nSM_SHIFT 0
33 #define HSP_nSS_SHIFT 4
34 #define HSP_nAS_SHIFT 8
35 #define HSP_nDB_SHIFT 12
36 #define HSP_nSI_SHIFT 16
37 #define HSP_nINT_MASK 0xf
39 #define HSP_DB_TRIGGER 0x0
40 #define HSP_DB_ENABLE 0x4
41 #define HSP_DB_RAW 0x8
42 #define HSP_DB_PENDING 0xc
44 #define HSP_SM_SHRD_MBOX 0x0
45 #define HSP_SM_SHRD_MBOX_FULL BIT(31)
46 #define HSP_SM_SHRD_MBOX_FULL_INT_IE 0x04
47 #define HSP_SM_SHRD_MBOX_EMPTY_INT_IE 0x08
49 #define HSP_DB_CCPLEX 1
53 struct tegra_hsp_channel;
56 struct tegra_hsp_channel {
57 struct tegra_hsp *hsp;
58 struct mbox_chan *chan;
62 struct tegra_hsp_doorbell {
63 struct tegra_hsp_channel channel;
64 struct list_head list;
70 struct tegra_hsp_mailbox {
71 struct tegra_hsp_channel channel;
76 struct tegra_hsp_db_map {
82 struct tegra_hsp_soc {
83 const struct tegra_hsp_db_map *map;
89 const struct tegra_hsp_soc *soc;
90 struct mbox_controller mbox_db;
91 struct mbox_controller mbox_sm;
93 unsigned int doorbell_irq;
94 unsigned int *shared_irqs;
95 unsigned int shared_irq;
103 struct lock_class_key lock_key;
105 struct list_head doorbells;
106 struct tegra_hsp_mailbox *mailboxes;
111 static inline u32 tegra_hsp_readl(struct tegra_hsp *hsp, unsigned int offset)
113 return readl(hsp->regs + offset);
116 static inline void tegra_hsp_writel(struct tegra_hsp *hsp, u32 value,
119 writel(value, hsp->regs + offset);
122 static inline u32 tegra_hsp_channel_readl(struct tegra_hsp_channel *channel,
125 return readl(channel->regs + offset);
128 static inline void tegra_hsp_channel_writel(struct tegra_hsp_channel *channel,
129 u32 value, unsigned int offset)
131 writel(value, channel->regs + offset);
134 static bool tegra_hsp_doorbell_can_ring(struct tegra_hsp_doorbell *db)
138 value = tegra_hsp_channel_readl(&db->channel, HSP_DB_ENABLE);
140 return (value & BIT(TEGRA_HSP_DB_MASTER_CCPLEX)) != 0;
143 static struct tegra_hsp_doorbell *
144 __tegra_hsp_doorbell_get(struct tegra_hsp *hsp, unsigned int master)
146 struct tegra_hsp_doorbell *entry;
148 list_for_each_entry(entry, &hsp->doorbells, list)
149 if (entry->master == master)
155 static struct tegra_hsp_doorbell *
156 tegra_hsp_doorbell_get(struct tegra_hsp *hsp, unsigned int master)
158 struct tegra_hsp_doorbell *db;
161 spin_lock_irqsave(&hsp->lock, flags);
162 db = __tegra_hsp_doorbell_get(hsp, master);
163 spin_unlock_irqrestore(&hsp->lock, flags);
168 static irqreturn_t tegra_hsp_doorbell_irq(int irq, void *data)
170 struct tegra_hsp *hsp = data;
171 struct tegra_hsp_doorbell *db;
172 unsigned long master, value;
174 db = tegra_hsp_doorbell_get(hsp, TEGRA_HSP_DB_MASTER_CCPLEX);
178 value = tegra_hsp_channel_readl(&db->channel, HSP_DB_PENDING);
179 tegra_hsp_channel_writel(&db->channel, value, HSP_DB_PENDING);
181 spin_lock(&hsp->lock);
183 for_each_set_bit(master, &value, hsp->mbox_db.num_chans) {
184 struct tegra_hsp_doorbell *db;
186 db = __tegra_hsp_doorbell_get(hsp, master);
188 * Depending on the bootloader chain, the CCPLEX doorbell will
189 * have some doorbells enabled, which means that requesting an
190 * interrupt will immediately fire.
192 * In that case, db->channel.chan will still be NULL here and
193 * cause a crash if not properly guarded.
195 * It remains to be seen if ignoring the doorbell in that case
196 * is the correct solution.
198 if (db && db->channel.chan)
199 mbox_chan_received_data(db->channel.chan, NULL);
202 spin_unlock(&hsp->lock);
207 static irqreturn_t tegra_hsp_shared_irq(int irq, void *data)
209 struct tegra_hsp *hsp = data;
210 unsigned long bit, mask;
214 status = tegra_hsp_readl(hsp, HSP_INT_IR) & hsp->mask;
216 /* process EMPTY interrupts first */
217 mask = (status >> HSP_INT_EMPTY_SHIFT) & HSP_INT_EMPTY_MASK;
219 for_each_set_bit(bit, &mask, hsp->num_sm) {
220 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[bit];
224 * Disable EMPTY interrupts until data is sent with
225 * the next message. These interrupts are level-
226 * triggered, so if we kept them enabled they would
227 * constantly trigger until we next write data into
230 spin_lock(&hsp->lock);
232 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index);
233 tegra_hsp_writel(hsp, hsp->mask,
234 HSP_INT_IE(hsp->shared_irq));
236 spin_unlock(&hsp->lock);
238 mbox_chan_txdone(mb->channel.chan, 0);
242 /* process FULL interrupts */
243 mask = (status >> HSP_INT_FULL_SHIFT) & HSP_INT_FULL_MASK;
245 for_each_set_bit(bit, &mask, hsp->num_sm) {
246 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[bit];
249 value = tegra_hsp_channel_readl(&mb->channel,
251 value &= ~HSP_SM_SHRD_MBOX_FULL;
252 msg = (void *)(unsigned long)value;
253 mbox_chan_received_data(mb->channel.chan, msg);
256 * Need to clear all bits here since some producers,
257 * such as TCU, depend on fields in the register
258 * getting cleared by the consumer.
260 * The mailbox API doesn't give the consumers a way
261 * of doing that explicitly, so we have to make sure
262 * we cover all possible cases.
264 tegra_hsp_channel_writel(&mb->channel, 0x0,
272 static struct tegra_hsp_channel *
273 tegra_hsp_doorbell_create(struct tegra_hsp *hsp, const char *name,
274 unsigned int master, unsigned int index)
276 struct tegra_hsp_doorbell *db;
280 db = devm_kzalloc(hsp->dev, sizeof(*db), GFP_KERNEL);
282 return ERR_PTR(-ENOMEM);
284 offset = (1 + (hsp->num_sm / 2) + hsp->num_ss + hsp->num_as) * SZ_64K;
285 offset += index * 0x100;
287 db->channel.regs = hsp->regs + offset;
288 db->channel.hsp = hsp;
290 db->name = devm_kstrdup_const(hsp->dev, name, GFP_KERNEL);
294 spin_lock_irqsave(&hsp->lock, flags);
295 list_add_tail(&db->list, &hsp->doorbells);
296 spin_unlock_irqrestore(&hsp->lock, flags);
301 static int tegra_hsp_doorbell_send_data(struct mbox_chan *chan, void *data)
303 struct tegra_hsp_doorbell *db = chan->con_priv;
305 tegra_hsp_channel_writel(&db->channel, 1, HSP_DB_TRIGGER);
310 static int tegra_hsp_doorbell_startup(struct mbox_chan *chan)
312 struct tegra_hsp_doorbell *db = chan->con_priv;
313 struct tegra_hsp *hsp = db->channel.hsp;
314 struct tegra_hsp_doorbell *ccplex;
318 if (db->master >= chan->mbox->num_chans) {
319 dev_err(chan->mbox->dev,
320 "invalid master ID %u for HSP channel\n",
325 ccplex = tegra_hsp_doorbell_get(hsp, TEGRA_HSP_DB_MASTER_CCPLEX);
330 * On simulation platforms the BPMP hasn't had a chance yet to mark
331 * the doorbell as ringable by the CCPLEX, so we want to skip extra
334 if (tegra_is_silicon() && !tegra_hsp_doorbell_can_ring(db))
337 spin_lock_irqsave(&hsp->lock, flags);
339 value = tegra_hsp_channel_readl(&ccplex->channel, HSP_DB_ENABLE);
340 value |= BIT(db->master);
341 tegra_hsp_channel_writel(&ccplex->channel, value, HSP_DB_ENABLE);
343 spin_unlock_irqrestore(&hsp->lock, flags);
348 static void tegra_hsp_doorbell_shutdown(struct mbox_chan *chan)
350 struct tegra_hsp_doorbell *db = chan->con_priv;
351 struct tegra_hsp *hsp = db->channel.hsp;
352 struct tegra_hsp_doorbell *ccplex;
356 ccplex = tegra_hsp_doorbell_get(hsp, TEGRA_HSP_DB_MASTER_CCPLEX);
360 spin_lock_irqsave(&hsp->lock, flags);
362 value = tegra_hsp_channel_readl(&ccplex->channel, HSP_DB_ENABLE);
363 value &= ~BIT(db->master);
364 tegra_hsp_channel_writel(&ccplex->channel, value, HSP_DB_ENABLE);
366 spin_unlock_irqrestore(&hsp->lock, flags);
369 static const struct mbox_chan_ops tegra_hsp_db_ops = {
370 .send_data = tegra_hsp_doorbell_send_data,
371 .startup = tegra_hsp_doorbell_startup,
372 .shutdown = tegra_hsp_doorbell_shutdown,
375 static int tegra_hsp_mailbox_send_data(struct mbox_chan *chan, void *data)
377 struct tegra_hsp_mailbox *mb = chan->con_priv;
378 struct tegra_hsp *hsp = mb->channel.hsp;
382 if (WARN_ON(!mb->producer))
385 /* copy data and mark mailbox full */
386 value = (u32)(unsigned long)data;
387 value |= HSP_SM_SHRD_MBOX_FULL;
389 tegra_hsp_channel_writel(&mb->channel, value, HSP_SM_SHRD_MBOX);
391 /* enable EMPTY interrupt for the shared mailbox */
392 spin_lock_irqsave(&hsp->lock, flags);
394 hsp->mask |= BIT(HSP_INT_EMPTY_SHIFT + mb->index);
395 tegra_hsp_writel(hsp, hsp->mask, HSP_INT_IE(hsp->shared_irq));
397 spin_unlock_irqrestore(&hsp->lock, flags);
402 static int tegra_hsp_mailbox_flush(struct mbox_chan *chan,
403 unsigned long timeout)
405 struct tegra_hsp_mailbox *mb = chan->con_priv;
406 struct tegra_hsp_channel *ch = &mb->channel;
409 timeout = jiffies + msecs_to_jiffies(timeout);
411 while (time_before(jiffies, timeout)) {
412 value = tegra_hsp_channel_readl(ch, HSP_SM_SHRD_MBOX);
413 if ((value & HSP_SM_SHRD_MBOX_FULL) == 0) {
414 mbox_chan_txdone(chan, 0);
416 /* Wait until channel is empty */
417 if (chan->active_req != NULL)
429 static int tegra_hsp_mailbox_startup(struct mbox_chan *chan)
431 struct tegra_hsp_mailbox *mb = chan->con_priv;
432 struct tegra_hsp_channel *ch = &mb->channel;
433 struct tegra_hsp *hsp = mb->channel.hsp;
436 chan->txdone_method = TXDONE_BY_IRQ;
439 * Shared mailboxes start out as consumers by default. FULL and EMPTY
440 * interrupts are coalesced at the same shared interrupt.
442 * Keep EMPTY interrupts disabled at startup and only enable them when
443 * the mailbox is actually full. This is required because the FULL and
444 * EMPTY interrupts are level-triggered, so keeping EMPTY interrupts
445 * enabled all the time would cause an interrupt storm while mailboxes
449 spin_lock_irqsave(&hsp->lock, flags);
452 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index);
454 hsp->mask |= BIT(HSP_INT_FULL_SHIFT + mb->index);
456 tegra_hsp_writel(hsp, hsp->mask, HSP_INT_IE(hsp->shared_irq));
458 spin_unlock_irqrestore(&hsp->lock, flags);
460 if (hsp->soc->has_per_mb_ie) {
462 tegra_hsp_channel_writel(ch, 0x0,
463 HSP_SM_SHRD_MBOX_EMPTY_INT_IE);
465 tegra_hsp_channel_writel(ch, 0x1,
466 HSP_SM_SHRD_MBOX_FULL_INT_IE);
472 static void tegra_hsp_mailbox_shutdown(struct mbox_chan *chan)
474 struct tegra_hsp_mailbox *mb = chan->con_priv;
475 struct tegra_hsp_channel *ch = &mb->channel;
476 struct tegra_hsp *hsp = mb->channel.hsp;
479 if (hsp->soc->has_per_mb_ie) {
481 tegra_hsp_channel_writel(ch, 0x0,
482 HSP_SM_SHRD_MBOX_EMPTY_INT_IE);
484 tegra_hsp_channel_writel(ch, 0x0,
485 HSP_SM_SHRD_MBOX_FULL_INT_IE);
488 spin_lock_irqsave(&hsp->lock, flags);
491 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index);
493 hsp->mask &= ~BIT(HSP_INT_FULL_SHIFT + mb->index);
495 tegra_hsp_writel(hsp, hsp->mask, HSP_INT_IE(hsp->shared_irq));
497 spin_unlock_irqrestore(&hsp->lock, flags);
500 static const struct mbox_chan_ops tegra_hsp_sm_ops = {
501 .send_data = tegra_hsp_mailbox_send_data,
502 .flush = tegra_hsp_mailbox_flush,
503 .startup = tegra_hsp_mailbox_startup,
504 .shutdown = tegra_hsp_mailbox_shutdown,
507 static struct mbox_chan *tegra_hsp_db_xlate(struct mbox_controller *mbox,
508 const struct of_phandle_args *args)
510 struct tegra_hsp *hsp = container_of(mbox, struct tegra_hsp, mbox_db);
511 unsigned int type = args->args[0], master = args->args[1];
512 struct tegra_hsp_channel *channel = ERR_PTR(-ENODEV);
513 struct tegra_hsp_doorbell *db;
514 struct mbox_chan *chan;
518 if (type != TEGRA_HSP_MBOX_TYPE_DB || !hsp->doorbell_irq)
519 return ERR_PTR(-ENODEV);
521 db = tegra_hsp_doorbell_get(hsp, master);
523 channel = &db->channel;
526 return ERR_CAST(channel);
528 spin_lock_irqsave(&hsp->lock, flags);
530 for (i = 0; i < mbox->num_chans; i++) {
531 chan = &mbox->chans[i];
532 if (!chan->con_priv) {
533 channel->chan = chan;
541 spin_unlock_irqrestore(&hsp->lock, flags);
543 return chan ?: ERR_PTR(-EBUSY);
546 static struct mbox_chan *tegra_hsp_sm_xlate(struct mbox_controller *mbox,
547 const struct of_phandle_args *args)
549 struct tegra_hsp *hsp = container_of(mbox, struct tegra_hsp, mbox_sm);
550 unsigned int type = args->args[0], index;
551 struct tegra_hsp_mailbox *mb;
553 index = args->args[1] & TEGRA_HSP_SM_MASK;
555 if (type != TEGRA_HSP_MBOX_TYPE_SM || !hsp->shared_irqs ||
556 index >= hsp->num_sm)
557 return ERR_PTR(-ENODEV);
559 mb = &hsp->mailboxes[index];
561 if ((args->args[1] & TEGRA_HSP_SM_FLAG_TX) == 0)
562 mb->producer = false;
566 return mb->channel.chan;
569 static int tegra_hsp_add_doorbells(struct tegra_hsp *hsp)
571 const struct tegra_hsp_db_map *map = hsp->soc->map;
572 struct tegra_hsp_channel *channel;
575 channel = tegra_hsp_doorbell_create(hsp, map->name,
576 map->master, map->index);
578 return PTR_ERR(channel);
586 static int tegra_hsp_add_mailboxes(struct tegra_hsp *hsp, struct device *dev)
590 hsp->mailboxes = devm_kcalloc(dev, hsp->num_sm, sizeof(*hsp->mailboxes),
595 for (i = 0; i < hsp->num_sm; i++) {
596 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i];
600 mb->channel.hsp = hsp;
601 mb->channel.regs = hsp->regs + SZ_64K + i * SZ_32K;
602 mb->channel.chan = &hsp->mbox_sm.chans[i];
603 mb->channel.chan->con_priv = mb;
609 static int tegra_hsp_request_shared_irq(struct tegra_hsp *hsp)
611 unsigned int i, irq = 0;
614 for (i = 0; i < hsp->num_si; i++) {
615 irq = hsp->shared_irqs[i];
619 err = devm_request_irq(hsp->dev, irq, tegra_hsp_shared_irq, 0,
620 dev_name(hsp->dev), hsp);
622 dev_err(hsp->dev, "failed to request interrupt: %d\n",
629 /* disable all interrupts */
630 tegra_hsp_writel(hsp, 0, HSP_INT_IE(hsp->shared_irq));
632 dev_dbg(hsp->dev, "interrupt requested: %u\n", irq);
637 if (i == hsp->num_si) {
638 dev_err(hsp->dev, "failed to find available interrupt\n");
645 static int tegra_hsp_probe(struct platform_device *pdev)
647 struct tegra_hsp *hsp;
648 struct resource *res;
653 hsp = devm_kzalloc(&pdev->dev, sizeof(*hsp), GFP_KERNEL);
657 hsp->dev = &pdev->dev;
658 hsp->soc = of_device_get_match_data(&pdev->dev);
659 INIT_LIST_HEAD(&hsp->doorbells);
660 spin_lock_init(&hsp->lock);
662 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
663 hsp->regs = devm_ioremap_resource(&pdev->dev, res);
664 if (IS_ERR(hsp->regs))
665 return PTR_ERR(hsp->regs);
667 value = tegra_hsp_readl(hsp, HSP_INT_DIMENSIONING);
668 hsp->num_sm = (value >> HSP_nSM_SHIFT) & HSP_nINT_MASK;
669 hsp->num_ss = (value >> HSP_nSS_SHIFT) & HSP_nINT_MASK;
670 hsp->num_as = (value >> HSP_nAS_SHIFT) & HSP_nINT_MASK;
671 hsp->num_db = (value >> HSP_nDB_SHIFT) & HSP_nINT_MASK;
672 hsp->num_si = (value >> HSP_nSI_SHIFT) & HSP_nINT_MASK;
674 err = platform_get_irq_byname_optional(pdev, "doorbell");
676 hsp->doorbell_irq = err;
678 if (hsp->num_si > 0) {
679 unsigned int count = 0;
681 hsp->shared_irqs = devm_kcalloc(&pdev->dev, hsp->num_si,
682 sizeof(*hsp->shared_irqs),
684 if (!hsp->shared_irqs)
687 for (i = 0; i < hsp->num_si; i++) {
690 name = kasprintf(GFP_KERNEL, "shared%u", i);
694 err = platform_get_irq_byname_optional(pdev, name);
696 hsp->shared_irqs[i] = err;
704 devm_kfree(&pdev->dev, hsp->shared_irqs);
705 hsp->shared_irqs = NULL;
709 /* setup the doorbell controller */
710 hsp->mbox_db.of_xlate = tegra_hsp_db_xlate;
711 hsp->mbox_db.num_chans = 32;
712 hsp->mbox_db.dev = &pdev->dev;
713 hsp->mbox_db.ops = &tegra_hsp_db_ops;
715 hsp->mbox_db.chans = devm_kcalloc(&pdev->dev, hsp->mbox_db.num_chans,
716 sizeof(*hsp->mbox_db.chans),
718 if (!hsp->mbox_db.chans)
721 if (hsp->doorbell_irq) {
722 err = tegra_hsp_add_doorbells(hsp);
724 dev_err(&pdev->dev, "failed to add doorbells: %d\n",
730 err = devm_mbox_controller_register(&pdev->dev, &hsp->mbox_db);
732 dev_err(&pdev->dev, "failed to register doorbell mailbox: %d\n",
737 /* setup the shared mailbox controller */
738 hsp->mbox_sm.of_xlate = tegra_hsp_sm_xlate;
739 hsp->mbox_sm.num_chans = hsp->num_sm;
740 hsp->mbox_sm.dev = &pdev->dev;
741 hsp->mbox_sm.ops = &tegra_hsp_sm_ops;
743 hsp->mbox_sm.chans = devm_kcalloc(&pdev->dev, hsp->mbox_sm.num_chans,
744 sizeof(*hsp->mbox_sm.chans),
746 if (!hsp->mbox_sm.chans)
749 if (hsp->shared_irqs) {
750 err = tegra_hsp_add_mailboxes(hsp, &pdev->dev);
752 dev_err(&pdev->dev, "failed to add mailboxes: %d\n",
758 err = devm_mbox_controller_register(&pdev->dev, &hsp->mbox_sm);
760 dev_err(&pdev->dev, "failed to register shared mailbox: %d\n",
765 platform_set_drvdata(pdev, hsp);
767 if (hsp->doorbell_irq) {
768 err = devm_request_irq(&pdev->dev, hsp->doorbell_irq,
769 tegra_hsp_doorbell_irq, IRQF_NO_SUSPEND,
770 dev_name(&pdev->dev), hsp);
773 "failed to request doorbell IRQ#%u: %d\n",
774 hsp->doorbell_irq, err);
779 if (hsp->shared_irqs) {
780 err = tegra_hsp_request_shared_irq(hsp);
785 lockdep_register_key(&hsp->lock_key);
786 lockdep_set_class(&hsp->lock, &hsp->lock_key);
791 static int tegra_hsp_remove(struct platform_device *pdev)
793 struct tegra_hsp *hsp = platform_get_drvdata(pdev);
795 lockdep_unregister_key(&hsp->lock_key);
800 static int __maybe_unused tegra_hsp_resume(struct device *dev)
802 struct tegra_hsp *hsp = dev_get_drvdata(dev);
804 struct tegra_hsp_doorbell *db;
806 list_for_each_entry(db, &hsp->doorbells, list) {
807 if (db && db->channel.chan)
808 tegra_hsp_doorbell_startup(db->channel.chan);
811 if (hsp->mailboxes) {
812 for (i = 0; i < hsp->num_sm; i++) {
813 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i];
815 if (mb->channel.chan->cl)
816 tegra_hsp_mailbox_startup(mb->channel.chan);
823 static const struct dev_pm_ops tegra_hsp_pm_ops = {
824 .resume_noirq = tegra_hsp_resume,
827 static const struct tegra_hsp_db_map tegra186_hsp_db_map[] = {
828 { "ccplex", TEGRA_HSP_DB_MASTER_CCPLEX, HSP_DB_CCPLEX, },
829 { "bpmp", TEGRA_HSP_DB_MASTER_BPMP, HSP_DB_BPMP, },
833 static const struct tegra_hsp_soc tegra186_hsp_soc = {
834 .map = tegra186_hsp_db_map,
835 .has_per_mb_ie = false,
838 static const struct tegra_hsp_soc tegra194_hsp_soc = {
839 .map = tegra186_hsp_db_map,
840 .has_per_mb_ie = true,
843 static const struct of_device_id tegra_hsp_match[] = {
844 { .compatible = "nvidia,tegra186-hsp", .data = &tegra186_hsp_soc },
845 { .compatible = "nvidia,tegra194-hsp", .data = &tegra194_hsp_soc },
849 static struct platform_driver tegra_hsp_driver = {
852 .of_match_table = tegra_hsp_match,
853 .pm = &tegra_hsp_pm_ops,
855 .probe = tegra_hsp_probe,
856 .remove = tegra_hsp_remove,
859 static int __init tegra_hsp_init(void)
861 return platform_driver_register(&tegra_hsp_driver);
863 core_initcall(tegra_hsp_init);