misc: pti: Remove driver for deprecated platform
Subsystems (3)
PATCH 1/1 misc: pti: Remove driver for deprecated platform
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago.
There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit 05f4434bc130 ("ASoC: Intel: remove mfld_machine") also in align with this theory.
Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely.
--- Documentation/driver-api/pti_intel_mid.rst | 108 --- drivers/misc/Kconfig | 13 - drivers/misc/Makefile | 1 - drivers/misc/pti.c | 978 --------------------- drivers/tty/Makefile | 2 - drivers/tty/n_tracerouter.c | 235 ----- drivers/tty/n_tracesink.c | 230 ----- drivers/tty/n_tracesink.h | 26 - include/linux/intel-pti.h | 35 - 9 files changed, 1628 deletions(-) delete mode 100644 Documentation/driver-api/pti_intel_mid.rst delete mode 100644 drivers/misc/pti.c delete mode 100644 drivers/tty/n_tracerouter.c delete mode 100644 drivers/tty/n_tracesink.c delete mode 100644 drivers/tty/n_tracesink.h delete mode 100644 include/linux/intel-pti.h
Documentation/driver-api/pti_intel_mid.rst deleted +0 -108
@@ -1,108 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 - -============= -Intel MID PTI -============= - -The Intel MID PTI project is HW implemented in Intel Atom -system-on-a-chip designs based on the Parallel Trace -Interface for MIPI P1149.7 cJTAG standard. The kernel solution -for this platform involves the following files:: - - ./include/linux/pti.h - ./drivers/.../n_tracesink.h - ./drivers/.../n_tracerouter.c - ./drivers/.../n_tracesink.c - ./drivers/.../pti.c - -pti.c is the driver that enables various debugging features -popular on platforms from certain mobile manufacturers. -n_tracerouter.c and n_tracesink.c allow extra system information to -be collected and routed to the pti driver, such as trace -debugging data from a modem. Although n_tracerouter -and n_tracesink are a part of the complete PTI solution, -these two line disciplines can work separately from -pti.c and route any data stream from one /dev/tty node -to another /dev/tty node via kernel-space. This provides -a stable, reliable connection that will not break unless -the user-space application shuts down (plus avoids -kernel->user->kernel context switch overheads of routing -data). - -An example debugging usage for this driver system: - - * Hook /dev/ttyPTI0 to syslogd. Opening this port will also start - a console device to further capture debugging messages to PTI. - * Hook /dev/ttyPTI1 to modem debugging data to write to PTI HW. - This is where n_tracerouter and n_tracesink are used. - * Hook /dev/pti to a user-level debugging application for writing - to PTI HW. - * `Use mipi_` Kernel Driver API in other device drivers for - debugging to PTI by first requesting a PTI write address via - mipi_request_masterchannel(1). - -Below is example pseudo-code on how a 'privileged' application -can hook up n_tracerouter and n_tracesink to any tty on -a system. 'Privileged' means the application has enough -privileges to successfully manipulate the ldisc drivers -but is not just blindly executing as 'root'. Keep in mind -the use of ioctl(,TIOCSETD,) is not specific to the n_tracerouter -and n_tracesink line discpline drivers but is a generic -operation for a program to use a line discpline driver -on a tty port other than the default n_tty: - -.. code-block:: c - - /////////// To hook up n_tracerouter and n_tracesink ///////// - - // Note that n_tracerouter depends on n_tracesink. - #include <errno.h> - #define ONE_TTY "/dev/ttyOne" - #define TWO_TTY "/dev/ttyTwo" - - // needed global to hand onto ldisc connection - static int g_fd_source = -1; - static int g_fd_sink = -1; - - // these two vars used to grab LDISC values from loaded ldisc drivers - // in OS. Look at /proc/tty/ldiscs to get the right numbers from - // the ldiscs loaded in the system. - int source_ldisc_num, sink_ldisc_num = -1; - int retval; - - g_fd_source = open(ONE_TTY, O_RDWR); // must be R/W - g_fd_sink = open(TWO_TTY, O_RDWR); // must be R/W - - if (g_fd_source <= 0) || (g_fd_sink <= 0) { - // doubt you'll want to use these exact error lines of code - printf("Error on open(). errno: %d\n",errno); - return errno; - } - - retval = ioctl(g_fd_sink, TIOCSETD, &sink_ldisc_num); - if (retval < 0) { - printf("Error on ioctl(). errno: %d\n", errno); - return errno; - } - - retval = ioctl(g_fd_source, TIOCSETD, &source_ldisc_num); - if (retval < 0) { - printf("Error on ioctl(). errno: %d\n", errno); - return errno; - } - - /////////// To disconnect n_tracerouter and n_tracesink //////// - - // First make sure data through the ldiscs has stopped. - - // Second, disconnect ldiscs. This provides a - // little cleaner shutdown on tty stack. - sink_ldisc_num = 0; - source_ldisc_num = 0; - ioctl(g_fd_uart, TIOCSETD, &sink_ldisc_num); - ioctl(g_fd_gadget, TIOCSETD, &source_ldisc_num); - - // Three, program closes connection, and cleanup: - close(g_fd_uart); - close(g_fd_gadget); - g_fd_uart = g_fd_gadget = NULL;
drivers/misc/Kconfig +0 -13
@@ -112,19 +112,6 @@ config PHANTOM If you choose to build module, its name will be phantom. If unsure, say N here. -config INTEL_MID_PTI - tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" - depends on PCI && TTY && (X86_INTEL_MID || COMPILE_TEST) - help - The PTI (Parallel Trace Interface) driver directs - trace data routed from various parts in the system out - through an Intel Penwell PTI port and out of the mobile - device for analysis with a debugging tool (Lauterbach or Fido). - - You should select this driver if the target kernel is meant for - an Intel Atom (non-netbook) mobile device containing a MIPI - P1149.7 standard implementation. - config TIFM_CORE tristate "TI Flash Media interface support" depends on PCI
drivers/misc/Makefile +0 -1
@@ -8,7 +8,6 @@ obj-$(CONFIG_IBMVMC) += ibmvmc.o obj-$(CONFIG_AD525X_DPOT) += ad525x_dpot.o obj-$(CONFIG_AD525X_DPOT_I2C) += ad525x_dpot-i2c.o obj-$(CONFIG_AD525X_DPOT_SPI) += ad525x_dpot-spi.o -obj-$(CONFIG_INTEL_MID_PTI) += pti.o obj-$(CONFIG_ATMEL_SSC) += atmel-ssc.o obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib.o obj-$(CONFIG_DUMMY_IRQ) += dummy-irq.o
drivers/misc/pti.c deleted +0 -978
978 lines not on this page · raw message
drivers/tty/Makefile +0 -2
@@ -9,8 +9,6 @@ obj-$(CONFIG_AUDIT) += tty_audit.o obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o obj-$(CONFIG_N_HDLC) += n_hdlc.o obj-$(CONFIG_N_GSM) += n_gsm.o -obj-$(CONFIG_TRACE_ROUTER) += n_tracerouter.o -obj-$(CONFIG_TRACE_SINK) += n_tracesink.o obj-$(CONFIG_R3964) += n_r3964.o obj-y += vt/
drivers/tty/n_tracerouter.c deleted +0 -235
235 lines not on this page · raw message
drivers/tty/n_tracesink.c deleted +0 -230
230 lines not on this page · raw message
drivers/tty/n_tracesink.h deleted +0 -26
@@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* n_tracesink.h - Kernel driver API to route trace data in kernel space. -* -* Copyright (C) Intel 2011 -* -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* -* 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. -* -* This header file is used by n_tracerouter to be able to send the -* data of it's tty port to the tty port this module sits. This -* mechanism can also be used independent of the PTI module. -* -*/ - -#ifndef N_TRACESINK_H_ -#define N_TRACESINK_H_ - -void n_tracesink_datadrain (u8 *buf,int count); - -#endif
include/linux/intel-pti.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* -* Copyright (C) Intel 2011 -* -* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* -* 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. -* -* This header file will allow other parts of the OS to use the -* interface to write out it's contents for debugging a mobile system. -*/ - -#ifndef LINUX_INTEL_PTI_H_ -#define LINUX_INTEL_PTI_H_ - -/* offset for last dword of any PTI message. Part of MIPI P1149.7 */ -#define PTI_LASTDWORD_DTS 0x30 - -/* basic structure used as a write address to the PTI HW */ -struct pti_masterchannel { -u8 master; -u8 channel; -}; - -/* the following functions are defined in misc/pti.c */ -void pti_writedata (struct pti_masterchannel *mc,u8 *buf,int count); -struct pti_masterchannel *pti_request_masterchannel (u8 type, -const char *thread_name); -void pti_release_masterchannel (struct pti_masterchannel *mc); - -#endif /* LINUX_INTEL_PTI_H_ */
Signature · 1 line
2.29.2
Greg Kroah-Hartman
maintainerQuoted 10 lines · Andy Shevchenko
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago.
There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit
05f4434bc130("ASoC: Intel: removemfld_machine") also in align with this theory.
Quoted 6 lines
Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely.
Cc Alexander Shishkin <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>Acked-by Linus Walleij <[email protected]>
Nice, I'll gladly take patches to remove code, especially tty line disciplines! :)
thanks,
greg k-h
Quoted 11 lines · Andy Shevchenko
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago.
There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit
05f4434bc130("ASoC: Intel: removemfld_machine") also in align with this theory.
Quoted 6 lines
Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely.
Cc Alexander Shishkin <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>Acked-by Linus Walleij <[email protected]>
Does this mean drivers/sfi/ can get killed off along with arch/x86/platforms/{intel-mid,sfi}, or are there still other machines using that?
Arnd
Quoted 20 lines · Arnd Bergmann
Quoted 11 lines · Andy Shevchenko
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago.
There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit
05f4434bc130("ASoC: Intel: removemfld_machine") also in align with this theory.Quoted 6 lines
Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely.
Cc Alexander Shishkin <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>Acked-by Linus Walleij <[email protected]>
Quoted 5 lines
Acked-by Arnd Bergmann <[email protected]>Does this mean
drivers/sfi/can get killed off along witharch/x86/platforms/{intel-mid,sfi}, or are there still other machines using that?
Yes, but it's hard to get Len's attention on it.
FWIW, look at [1].
[1]: https://gitlab.com/andy-shev/next/-/tree/topic/mid-removal
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 10 lines · Andy Shevchenko
Intel Moorestown and Medfield are quite old Intel Atom based 32-bit platforms, which were in limited use in some Android phones, tablets and consumer electronics more than eight years ago.
There are no bugs or problems ever reported outside from Intel for breaking any of that platforms for years. It seems no real users exists who run more or less fresh kernel on it. The commit
05f4434bc130("ASoC: Intel: removemfld_machine") also in align with this theory.
Quoted 6 lines
Due to above and to reduce a burden of supporting outdated drivers we remove the support of outdated platforms completely.
Cc Alexander Shishkin <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>Acked-by Linus Walleij <[email protected]>
FWIW,
Regards,
--
Alex