Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 745112d6 authored by Monika Singh's avatar Monika Singh
Browse files

Migrate mpq demux and TSPP driver from kernel 4.9 to 4.14



This change migrates all the relevant files consisting of the mpq
demux driver, its plugins, including the addition of TSPPv1 HW driver.

The snapshot is taken as of msm-4.9,
'commit 7b86834562b1ef2b3b466
("Migrate mpq demux driver from kernel 4.4 to 4.9")'.

In addition, introduce a few code changes to fix warnings,
typos and other style issues.

Change-Id: I115c400d2ae46eb7221723af630d4747de3e482d
Signed-off-by: default avatarMonika Singh <monising@codeaurora.org>
parent 1f668377
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
* Demux

Demux is responsible for demuxing the transport stream contents
to respective elementary streams

Required properties:
- compatible : Should be "qcom,demux"

Example:

        demux {
                compatible = "qcom,demux";
        };
+83 −0
Original line number Diff line number Diff line
* TSPP ( QTI Transport Stream Packet Processor )

Hardware driver for QTI TSIF 12seg wrapper core, which consists of a TSPP, a
BAM (Bus access manager, used for DMA) and two TSIF inputs.

The TSPP driver is responsible for:
 - TSPP/TSIF hardware configuration (using SPS driver to configure BAM hardware)
 - TSIF GPIO/Clocks configuration
 - Memory resource management
 - Handling TSIF/TSPP interrupts and BAM events
 - TSPP Power management

Required properties:
- compatible : Should be "qcom,msm_tspp"
- reg : Specifies the base physical addresses and sizes of TSIF, TSPP & BAM registers.
- reg-names : Specifies the register names of TSIF, TSPP & BAM base registers.
- interrupts : Specifies the interrupts associated with TSIF 12 seg core.
- interrupt-names: Specifies interrupt names for TSIF, TSPP & BAM interrupts.
- clock-names: Specifies the clock names used for interface & reference clocks.
- clocks: GCC_TSIF_AHB_CLK clock for interface clock & GCC_TSIF_REF_CLK clock for reference clock.
- qcom, msm_bus,name: Should be "tsif"
- qcom, msm_bus,num_cases: Depends on the use cases for bus scaling
- qcom, msm_bus,num_paths: The paths for source and destination ports
- qcom, msm_bus,vectors: Vectors for bus topology.
- pinctrl-names: Names for the TSIF mode configuration to specify which TSIF interface is active.
- qcom,smmu-s1-bypass : Boolean flag to bypass SMMU stage 1 translation.
- iommus : A list of phandle and IOMMU specifier pairs that describe the IOMMU master interfaces of the device.

Example:

        tspp: msm_tspp@0x8880000 {
                compatible = "qcom,msm_tspp";
                reg = <0x088a7000 0x200>, /* MSM_TSIF0_PHYS */
                      <0x088a8000 0x200>, /* MSM_TSIF1_PHYS */
                      <0x088a9000 0x1000>, /* MSM_TSPP_PHYS  */
                      <0x08884000 0x23000>; /* MSM_TSPP_BAM_PHYS */
                reg-names = "MSM_TSIF0_PHYS",
                        "MSM_TSIF1_PHYS",
                        "MSM_TSPP_PHYS",
                        "MSM_TSPP_BAM_PHYS";
                interrupts = <0 121 0>, /* TSIF_TSPP_IRQ */
                        <0 119 0>, /* TSIF0_IRQ */
                        <0 120 0>, /* TSIF1_IRQ */
                        <0 122 0>; /* TSIF_BAM_IRQ */
                interrupt-names = "TSIF_TSPP_IRQ",
                        "TSIF0_IRQ",
                        "TSIF1_IRQ",
                        "TSIF_BAM_IRQ";

                clock-names = "iface_clk", "ref_clk";
                clocks = <&clock_gcc GCC_TSIF_AHB_CLK>,
                        <&clock_gcc GCC_TSIF_REF_CLK>;

                qcom,msm-bus,name = "tsif";
                qcom,msm-bus,num-cases = <2>;
                qcom,msm-bus,num-paths = <1>;
                qcom,msm-bus,vectors-KBps =
                                <82 512 0 0>, /* No vote */
                                <82 512 12288 24576>;
                                /* Max. bandwidth, 2xTSIF, each max of 96Mbps */

                pinctrl-names = "disabled",
                        "tsif0-mode1", "tsif0-mode2",
                        "tsif1-mode1", "tsif1-mode2",
                        "dual-tsif-mode1", "dual-tsif-mode2";

                pinctrl-0 = <>;                         /* disabled */
                pinctrl-1 = <&tsif0_signals_active>;    /* tsif0-mode1 */
                pinctrl-2 = <&tsif0_signals_active
                        &tsif0_sync_active>;            /* tsif0-mode2 */
                pinctrl-3 = <&tsif1_signals_active>;    /* tsif1-mode1 */
                pinctrl-4 = <&tsif1_signals_active
                        &tsif1_sync_active>;            /* tsif1-mode2 */
                pinctrl-5 = <&tsif0_signals_active
                        &tsif1_signals_active>;         /* dual-tsif-mode1 */
                pinctrl-6 = <&tsif0_signals_active
                        &tsif0_sync_active
                        &tsif1_signals_active
                        &tsif1_sync_active>;            /* dual-tsif-mode2 */

                qcom,smmu-s1-bypass;
                iommus = <&apps_smmu 0x20 0x0f>;
    };
+2 −0
Original line number Diff line number Diff line
@@ -16,3 +16,5 @@ menuconfig SPECTRA_CAMERA
source "drivers/media/platform/msm/vidc/Kconfig"
source "drivers/media/platform/msm/sde/Kconfig"
source "drivers/media/platform/msm/npu/Kconfig"
source "drivers/media/platform/msm/dvb/Kconfig"
source "drivers/media/platform/msm/broadcast/Kconfig"
+3 −1
Original line number Diff line number Diff line
@@ -6,3 +6,5 @@ obj-y += sde/
obj-$(CONFIG_MSM_NPU) += npu/
obj-$(CONFIG_MSM_VIDC_V4L2) += vidc/
obj-$(CONFIG_SPECTRA_CAMERA) += camera/
obj-$(CONFIG_TSPP) += broadcast/
obj-$(CONFIG_DVB_MPQ) += dvb/
+14 −0
Original line number Diff line number Diff line
#
# MSM Broadcast subsystem drivers
#

config TSPP
	depends on ARCH_QCOM
	tristate "TSPP (Transport Stream Packet Processor) Support"
	---help---
	Transport Stream Packet Processor v1 is used to offload the
	processing of MPEG transport streams from the main processor.
	It is used to process incoming transport streams from TSIF
	to supports use-cases such as transport stream live play
	and recording.
	This can also be compiled as a loadable module.
Loading