Lines Matching refs:smsdev
91 struct smssdio_device *smsdev; in smssdio_sendrequest() local
93 smsdev = context; in smssdio_sendrequest()
95 sdio_claim_host(smsdev->func); in smssdio_sendrequest()
98 while (size >= smsdev->func->cur_blksize) { in smssdio_sendrequest()
99 ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA, in smssdio_sendrequest()
100 buffer, smsdev->func->cur_blksize); in smssdio_sendrequest()
104 buffer += smsdev->func->cur_blksize; in smssdio_sendrequest()
105 size -= smsdev->func->cur_blksize; in smssdio_sendrequest()
109 ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA, in smssdio_sendrequest()
114 sdio_release_host(smsdev->func); in smssdio_sendrequest()
127 struct smssdio_device *smsdev; in smssdio_interrupt() local
132 smsdev = sdio_get_drvdata(func); in smssdio_interrupt()
144 if (smsdev->split_cb == NULL) { in smssdio_interrupt()
145 cb = smscore_getbuffer(smsdev->coredev); in smssdio_interrupt()
151 ret = sdio_memcpy_fromio(smsdev->func, in smssdio_interrupt()
163 smsdev->split_cb = cb; in smssdio_interrupt()
167 if (hdr->msg_length > smsdev->func->cur_blksize) in smssdio_interrupt()
168 size = hdr->msg_length - smsdev->func->cur_blksize; in smssdio_interrupt()
172 cb = smsdev->split_cb; in smssdio_interrupt()
177 smsdev->split_cb = NULL; in smssdio_interrupt()
186 BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE); in smssdio_interrupt()
191 ret = sdio_memcpy_fromio(smsdev->func, in smssdio_interrupt()
196 smscore_putbuffer(smsdev->coredev, cb); in smssdio_interrupt()
210 ret = sdio_memcpy_fromio(smsdev->func, in smssdio_interrupt()
212 smsdev->func->cur_blksize); in smssdio_interrupt()
214 smscore_putbuffer(smsdev->coredev, cb); in smssdio_interrupt()
220 buffer += smsdev->func->cur_blksize; in smssdio_interrupt()
221 if (size > smsdev->func->cur_blksize) in smssdio_interrupt()
222 size -= smsdev->func->cur_blksize; in smssdio_interrupt()
233 smscore_onresponse(smsdev->coredev, cb); in smssdio_interrupt()
242 struct smssdio_device *smsdev; in smssdio_probe() local
247 smsdev = kzalloc(sizeof(struct smssdio_device), GFP_KERNEL); in smssdio_probe()
248 if (!smsdev) in smssdio_probe()
251 smsdev->func = func; in smssdio_probe()
258 params.context = smsdev; in smssdio_probe()
277 ret = smscore_register_device(¶ms, &smsdev->coredev, GFP_DMA, NULL); in smssdio_probe()
281 smscore_set_board_id(smsdev->coredev, board_id); in smssdio_probe()
297 sdio_set_drvdata(func, smsdev); in smssdio_probe()
301 ret = smscore_start_device(smsdev->coredev); in smssdio_probe()
314 smscore_unregister_device(smsdev->coredev); in smssdio_probe()
316 kfree(smsdev); in smssdio_probe()
323 struct smssdio_device *smsdev; in smssdio_remove() local
325 smsdev = sdio_get_drvdata(func); in smssdio_remove()
328 if (smsdev->split_cb) in smssdio_remove()
329 smscore_putbuffer(smsdev->coredev, smsdev->split_cb); in smssdio_remove()
331 smscore_unregister_device(smsdev->coredev); in smssdio_remove()
338 kfree(smsdev); in smssdio_remove()