Source
x
* The thread name is retrieved from 'current' global variable if 'thread_name'
/*
* pti.c - PTI driver for cJTAG data extration
*
* Copyright (C) Intel 2010
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* The PTI (Parallel Trace Interface) driver directs trace data routed from
* various parts in the system out through the Intel Penwell PTI port and
* out of the mobile device for analysis with a debugging tool
* (Lauterbach, Fido). This is part of a solution for the MIPI P1149.7,
* compact JTAG, standard.
*/
/* 128 channel ids / u8 bit size */
/* 128 channel ids / u8 bit size */
/* 128 channel ids / u8 bit size */
/* modem master ID address */
/* control master ID address */
/* console master ID address */
/* base OS master ID address */
/* base App master ID address */
/* PTI control frame maximum size */
/* 8Kb buffer for user space copy */
/* offset to first OS write addr */
/* address length */
struct pti_tty {
struct pti_masterchannel *mc;
};
struct pti_dev {
struct tty_port port[PTITTY_MINOR_NUM];
unsigned long pti_addr;
unsigned long aperture_base;
void __iomem *pti_ioaddr;
u8 ia_app[MAX_APP_IDS];
u8 ia_os[MAX_OS_IDS];
u8 ia_modem[MAX_MODEM_IDS];
};
/*
* This protects access to ia_app, ia_os, and ia_modem,
* which keeps track of channels allocated in
* an aperture write id.
*/
static DEFINE_MUTEX(alloclock);
static const struct pci_device_id pci_ids[] = {
{PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x82B)},
{0}
};
static struct tty_driver *pti_tty_driver;
static struct pti_dev *drv_data;
static unsigned int pti_console_channel;
static unsigned int pti_control_channel;
/**
* pti_write_to_aperture()- The private write function to PTI HW.
*