Lines Matching refs:db

149 static bool tegra_hsp_doorbell_can_ring(struct tegra_hsp_doorbell *db)  in tegra_hsp_doorbell_can_ring()  argument
153 value = tegra_hsp_channel_readl(&db->channel, HSP_DB_ENABLE); in tegra_hsp_doorbell_can_ring()
173 struct tegra_hsp_doorbell *db; in tegra_hsp_doorbell_get() local
177 db = __tegra_hsp_doorbell_get(hsp, master); in tegra_hsp_doorbell_get()
180 return db; in tegra_hsp_doorbell_get()
186 struct tegra_hsp_doorbell *db; in tegra_hsp_doorbell_irq() local
189 db = tegra_hsp_doorbell_get(hsp, TEGRA_HSP_DB_MASTER_CCPLEX); in tegra_hsp_doorbell_irq()
190 if (!db) in tegra_hsp_doorbell_irq()
193 value = tegra_hsp_channel_readl(&db->channel, HSP_DB_PENDING); in tegra_hsp_doorbell_irq()
194 tegra_hsp_channel_writel(&db->channel, value, HSP_DB_PENDING); in tegra_hsp_doorbell_irq()
199 struct tegra_hsp_doorbell *db; in tegra_hsp_doorbell_irq() local
201 db = __tegra_hsp_doorbell_get(hsp, master); in tegra_hsp_doorbell_irq()
213 if (db && db->channel.chan) in tegra_hsp_doorbell_irq()
214 mbox_chan_received_data(db->channel.chan, NULL); in tegra_hsp_doorbell_irq()
273 struct tegra_hsp_doorbell *db; in tegra_hsp_doorbell_create() local
277 db = devm_kzalloc(hsp->dev, sizeof(*db), GFP_KERNEL); in tegra_hsp_doorbell_create()
278 if (!db) in tegra_hsp_doorbell_create()
284 db->channel.regs = hsp->regs + offset; in tegra_hsp_doorbell_create()
285 db->channel.hsp = hsp; in tegra_hsp_doorbell_create()
287 db->name = devm_kstrdup_const(hsp->dev, name, GFP_KERNEL); in tegra_hsp_doorbell_create()
288 db->master = master; in tegra_hsp_doorbell_create()
289 db->index = index; in tegra_hsp_doorbell_create()
292 list_add_tail(&db->list, &hsp->doorbells); in tegra_hsp_doorbell_create()
295 return &db->channel; in tegra_hsp_doorbell_create()
300 struct tegra_hsp_doorbell *db = chan->con_priv; in tegra_hsp_doorbell_send_data() local
302 tegra_hsp_channel_writel(&db->channel, 1, HSP_DB_TRIGGER); in tegra_hsp_doorbell_send_data()
309 struct tegra_hsp_doorbell *db = chan->con_priv; in tegra_hsp_doorbell_startup() local
310 struct tegra_hsp *hsp = db->channel.hsp; in tegra_hsp_doorbell_startup()
315 if (db->master >= chan->mbox->num_chans) { in tegra_hsp_doorbell_startup()
318 db->master); in tegra_hsp_doorbell_startup()
331 if (tegra_is_silicon() && !tegra_hsp_doorbell_can_ring(db)) in tegra_hsp_doorbell_startup()
337 value |= BIT(db->master); in tegra_hsp_doorbell_startup()
347 struct tegra_hsp_doorbell *db = chan->con_priv; in tegra_hsp_doorbell_shutdown() local
348 struct tegra_hsp *hsp = db->channel.hsp; in tegra_hsp_doorbell_shutdown()
360 value &= ~BIT(db->master); in tegra_hsp_doorbell_shutdown()
586 struct tegra_hsp_doorbell *db; in tegra_hsp_db_xlate() local
594 db = tegra_hsp_doorbell_get(hsp, master); in tegra_hsp_db_xlate()
595 if (db) in tegra_hsp_db_xlate()
596 channel = &db->channel; in tegra_hsp_db_xlate()
607 chan->con_priv = db; in tegra_hsp_db_xlate()
882 struct tegra_hsp_doorbell *db; in tegra_hsp_resume() local
884 list_for_each_entry(db, &hsp->doorbells, list) { in tegra_hsp_resume()
885 if (db->channel.chan) in tegra_hsp_resume()
886 tegra_hsp_doorbell_startup(db->channel.chan); in tegra_hsp_resume()