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