Lines Matching refs:mc
51 struct pti_masterchannel *mc;
85 * @mc: The 'aperture'. It's part of a write address that holds
99 static void pti_write_to_aperture(struct pti_masterchannel *mc,
114 aperture = drv_data->pti_ioaddr + (mc->master << 15)
115 + (mc->channel << 8);
143 * @mc: The master / channel structure on which the function
157 static void pti_control_frame_built_and_sent(struct pti_masterchannel *mc,
187 snprintf(control_frame, CONTROL_FRAME_LEN, control_format, mc->master,
188 mc->channel, thread_name_p);
196 * @mc: The 'aperture'. It's part of a write address that holds
206 static void pti_write_full_frame_to_aperture(struct pti_masterchannel *mc,
210 pti_control_frame_built_and_sent(mc, NULL);
211 pti_write_to_aperture(mc, (u8 *)buf, len);
238 struct pti_masterchannel *mc;
241 mc = kmalloc(sizeof(struct pti_masterchannel), GFP_KERNEL);
242 if (mc == NULL)
250 kfree(mc);
263 mc->master = base_id;
264 mc->channel = ((i & 0xf)<<3) + j;
266 pti_control_frame_built_and_sent(mc, thread_name);
267 return mc;
299 struct pti_masterchannel *mc;
306 mc = get_id(drv_data->ia_app, MAX_APP_IDS,
311 mc = get_id(drv_data->ia_os, MAX_OS_IDS,
316 mc = get_id(drv_data->ia_modem, MAX_MODEM_IDS,
320 mc = NULL;
324 return mc;
333 * @mc: master, channel apeture ID address to be released. This
336 void pti_release_masterchannel(struct pti_masterchannel *mc)
342 if (mc) {
343 master = mc->master;
344 channel = mc->channel;
357 kfree(mc);
368 * @mc: Master, channel aperture ID address to write to.
375 void pti_writedata(struct pti_masterchannel *mc, u8 *buf, int count)
382 if ((mc != NULL) && (buf != NULL) && (count > 0))
383 pti_write_to_aperture(mc, buf, count);
465 pti_tty_data->mc = pti_request_masterchannel(0, NULL);
467 pti_tty_data->mc = pti_request_masterchannel(2, NULL);
469 if (pti_tty_data->mc == NULL) {
490 pti_release_masterchannel(pti_tty_data->mc);
511 if ((pti_tty_data != NULL) && (pti_tty_data->mc != NULL)) {
512 pti_write_to_aperture(pti_tty_data->mc, (u8 *)buf, len);
517 * and the mc address is not there.
547 struct pti_masterchannel *mc;
555 mc = pti_request_masterchannel(0, NULL);
556 if (mc == NULL)
558 filp->private_data = mc;
603 struct pti_masterchannel *mc;
610 mc = filp->private_data;
630 pti_write_to_aperture(mc, kbuf, size);
671 static struct pti_masterchannel mc = {.master = CONSOLE_ID,
674 mc.channel = pti_console_channel;
677 pti_write_full_frame_to_aperture(&mc, buf, len);