• Home
  • Raw
  • Download

Lines Matching refs:mdrv

42 	struct mic_driver *mdrv = g_drv;  in mic_notify_host()  local
43 struct mic_bootparam __iomem *bootparam = mdrv->dp; in mic_notify_host()
46 dev_dbg(mdrv->dev, "%s %d system_state %d\n", in mic_notify_host()
48 mic_send_intr(&mdrv->mdev, ioread8(&bootparam->c2h_shutdown_db)); in mic_notify_host()
54 struct mic_driver *mdrv = g_drv; in mic_panic_event() local
55 struct mic_bootparam __iomem *bootparam = mdrv->dp; in mic_panic_event()
69 struct mic_driver *mdrv = g_drv; in mic_shutdown_isr() local
70 struct mic_bootparam __iomem *bootparam = mdrv->dp; in mic_shutdown_isr()
81 struct mic_driver *mdrv = g_drv; in mic_shutdown_init() local
82 struct mic_bootparam __iomem *bootparam = mdrv->dp; in mic_shutdown_init()
87 "Shutdown", mdrv, shutdown_db); in mic_shutdown_init()
97 struct mic_driver *mdrv = g_drv; in mic_shutdown_uninit() local
98 struct mic_bootparam __iomem *bootparam = mdrv->dp; in mic_shutdown_uninit()
101 mic_free_card_irq(shutdown_cookie, mdrv); in mic_shutdown_uninit()
106 struct mic_driver *mdrv = g_drv; in mic_dp_init() local
107 struct mic_device *mdev = &mdrv->mdev; in mic_dp_init()
112 lo = mic_read_spad(&mdrv->mdev, MIC_DPLO_SPAD); in mic_dp_init()
113 hi = mic_read_spad(&mdrv->mdev, MIC_DPHI_SPAD); in mic_dp_init()
116 mdrv->dp = mic_card_map(mdev, dp_dma_addr, MIC_DP_SIZE); in mic_dp_init()
117 if (!mdrv->dp) { in mic_dp_init()
118 dev_err(mdrv->dev, "Cannot remap Aperture BAR\n"); in mic_dp_init()
121 bootparam = mdrv->dp; in mic_dp_init()
124 dev_err(mdrv->dev, "bootparam magic mismatch 0x%x\n", magic); in mic_dp_init()
160 struct mic_driver *mdrv = g_drv; in mic_request_card_irq() local
162 rc = request_threaded_irq(mic_db_to_irq(mdrv, index), handler, in mic_request_card_irq()
165 dev_err(mdrv->dev, "request_threaded_irq failed rc = %d\n", rc); in mic_request_card_irq()
168 mdrv->irq_info.irq_usage_count[index]++; in mic_request_card_irq()
187 struct mic_driver *mdrv = g_drv; in mic_free_card_irq() local
190 free_irq(mic_db_to_irq(mdrv, index), data); in mic_free_card_irq()
191 mdrv->irq_info.irq_usage_count[index]--; in mic_free_card_irq()
203 struct mic_driver *mdrv = g_drv; in mic_next_card_db() local
205 for (i = 0; i < mdrv->intr_info.num_intr; i++) { in mic_next_card_db()
206 if (mdrv->irq_info.irq_usage_count[i] < in mic_next_card_db()
207 mdrv->irq_info.irq_usage_count[index]) in mic_next_card_db()
221 struct mic_driver *mdrv = g_drv; in mic_init_irq() local
223 mdrv->irq_info.irq_usage_count = kzalloc((sizeof(u32) * in mic_init_irq()
224 mdrv->intr_info.num_intr), in mic_init_irq()
226 if (!mdrv->irq_info.irq_usage_count) in mic_init_irq()
238 struct mic_driver *mdrv = g_drv; in mic_uninit_irq() local
240 kfree(mdrv->irq_info.irq_usage_count); in mic_uninit_irq()
248 int __init mic_driver_init(struct mic_driver *mdrv) in mic_driver_init() argument
252 g_drv = mdrv; in mic_driver_init()
258 if (!try_module_get(mdrv->dev->driver->owner)) { in mic_driver_init()
271 rc = mic_devices_init(mdrv); in mic_driver_init()
274 mic_create_card_debug_dir(mdrv); in mic_driver_init()
285 module_put(mdrv->dev->driver->owner); in mic_driver_init()
294 void mic_driver_uninit(struct mic_driver *mdrv) in mic_driver_uninit() argument
296 mic_delete_card_debug_dir(mdrv); in mic_driver_uninit()
297 mic_devices_uninit(mdrv); in mic_driver_uninit()
307 module_put(mdrv->dev->driver->owner); in mic_driver_uninit()