Lines Matching refs:mhu
119 struct platform_mhu *mhu; in platform_mhu_probe() local
126 mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); in platform_mhu_probe()
127 if (!mhu) in platform_mhu_probe()
130 mhu->base = devm_platform_ioremap_resource(pdev, 0); in platform_mhu_probe()
131 if (IS_ERR(mhu->base)) { in platform_mhu_probe()
133 return PTR_ERR(mhu->base); in platform_mhu_probe()
137 mhu->chan[i].con_priv = &mhu->mlink[i]; in platform_mhu_probe()
138 mhu->mlink[i].irq = platform_get_irq(pdev, i); in platform_mhu_probe()
139 if (mhu->mlink[i].irq < 0) in platform_mhu_probe()
140 return mhu->mlink[i].irq; in platform_mhu_probe()
141 mhu->mlink[i].rx_reg = mhu->base + platform_mhu_reg[i]; in platform_mhu_probe()
142 mhu->mlink[i].tx_reg = mhu->mlink[i].rx_reg + TX_REG_OFFSET; in platform_mhu_probe()
145 mhu->mbox.dev = dev; in platform_mhu_probe()
146 mhu->mbox.chans = &mhu->chan[0]; in platform_mhu_probe()
147 mhu->mbox.num_chans = MHU_CHANS; in platform_mhu_probe()
148 mhu->mbox.ops = &platform_mhu_ops; in platform_mhu_probe()
149 mhu->mbox.txdone_irq = false; in platform_mhu_probe()
150 mhu->mbox.txdone_poll = true; in platform_mhu_probe()
151 mhu->mbox.txpoll_period = 1; in platform_mhu_probe()
153 platform_set_drvdata(pdev, mhu); in platform_mhu_probe()
155 err = devm_mbox_controller_register(dev, &mhu->mbox); in platform_mhu_probe()