diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-10-12 08:08:13 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-10-12 08:08:28 +0200 |
commit | 8d2818603e51c29e2cc2f95706270d9967e6a7ed (patch) | |
tree | e5ed86cd7ef1cefd4dce42d9045327df225f1311 /target/arm/solidrun-imx6/patches | |
parent | a83ec3eae9b5de021a31c0de456b51784ff1dd7c (diff) |
update to latest xbian kernel patch
Diffstat (limited to 'target/arm/solidrun-imx6/patches')
-rw-r--r-- | target/arm/solidrun-imx6/patches/4.1.10/0001-xbian.patch | 30579 |
1 files changed, 25842 insertions, 4737 deletions
diff --git a/target/arm/solidrun-imx6/patches/4.1.10/0001-xbian.patch b/target/arm/solidrun-imx6/patches/4.1.10/0001-xbian.patch index d2ea38153..68b82758b 100644 --- a/target/arm/solidrun-imx6/patches/4.1.10/0001-xbian.patch +++ b/target/arm/solidrun-imx6/patches/4.1.10/0001-xbian.patch @@ -1,6 +1,31 @@ -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6dl.dtsi linux-4.1.10/arch/arm/boot/dts/imx6dl.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6dl.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6dl.dtsi 2015-10-10 16:41:04.845313887 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6dl-cm-fx6.dts xbian-sources-kernel/arch/arm/boot/dts/imx6dl-cm-fx6.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6dl-cm-fx6.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6dl-cm-fx6.dts 2015-10-11 19:49:25.503432136 +0200 +@@ -0,0 +1,21 @@ ++/* ++ * Copyright 2015 CompuLab Ltd. ++ * ++ * Author: Valentin Raevsky <valentin@compulab.co.il> ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/dts-v1/; ++#include "imx6dl.dtsi" ++#include "imx6qdl-cm-fx6.dtsi" ++ ++/ { ++ model = "CompuLab CM-FX6"; ++ compatible = "compulab,cm-fx6", "fsl,imx6dl"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6dl.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6dl.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6dl.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6dl.dtsi 2015-10-11 19:49:25.503432136 +0200 @@ -30,7 +30,7 @@ /* kHz uV */ 996000 1250000 @@ -157,9 +182,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6dl.dtsi linux-4.1.10/arch/arm/ -&vpu { - compatible = "fsl,imx6dl-vpu", "cnm,coda960"; -}; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6dl-hummingboard2.dts linux-4.1.10/arch/arm/boot/dts/imx6dl-hummingboard2.dts ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6dl-hummingboard2.dts 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/boot/dts/imx6dl-hummingboard2.dts 2015-10-10 16:41:04.965313892 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6dl-hummingboard2.dts xbian-sources-kernel/arch/arm/boot/dts/imx6dl-hummingboard2.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6dl-hummingboard2.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6dl-hummingboard2.dts 2015-10-11 19:49:25.503432136 +0200 @@ -0,0 +1,52 @@ +/* + * Device Tree file for SolidRun HummingBoard2 @@ -213,9 +238,971 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6dl-hummingboard2.dts linux-4.1 + model = "SolidRun HummingBoard2 Solo/DualLite"; + compatible = "solidrun,hummingboard2/dl", "fsl,imx6dl"; +}; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi linux-4.1.10/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2015-10-10 16:41:04.965313892 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6dl-sbc-fx6.dts xbian-sources-kernel/arch/arm/boot/dts/imx6dl-sbc-fx6.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6dl-sbc-fx6.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6dl-sbc-fx6.dts 2015-10-11 19:49:25.503432136 +0200 +@@ -0,0 +1,23 @@ ++/* ++* Copyright 2015 CompuLab Ltd. ++* ++* Author: Valentin Raevsky <valentin@compulab.co.il> ++* ++* The code contained herein is licensed under the GNU General Public ++* License. You may obtain a copy of the GNU General Public License ++* Version 2 or later at the following locations: ++* ++* http://www.opensource.org/licenses/gpl-license.html ++* http://www.gnu.org/copyleft/gpl.html ++*/ ++ ++/dts-v1/; ++#include "imx6dl.dtsi" ++#include "imx6qdl-cm-fx6.dtsi" ++#include "imx6qdl-sb-fx6x.dtsi" ++#include "imx6qdl-sb-fx6.dtsi" ++ ++/ { ++ model = "CompuLab CM-FX6 on SBC-FX6"; ++ compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6dl"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts xbian-sources-kernel/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts 2015-10-11 19:49:25.503432136 +0200 +@@ -0,0 +1,23 @@ ++/* ++* Copyright 2015 CompuLab Ltd. ++* ++* Author: Valentin Raevsky <valentin@compulab.co.il> ++* ++* The code contained herein is licensed under the GNU General Public ++* License. You may obtain a copy of the GNU General Public License ++* Version 2 or later at the following locations: ++* ++* http://www.opensource.org/licenses/gpl-license.html ++* http://www.gnu.org/copyleft/gpl.html ++*/ ++ ++/dts-v1/; ++#include "imx6dl.dtsi" ++#include "imx6qdl-cm-fx6.dtsi" ++#include "imx6qdl-sb-fx6x.dtsi" ++#include "imx6qdl-sb-fx6m.dtsi" ++ ++/ { ++ model = "CompuLab CM-FX6 on SBC-FX6m"; ++ compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6dl"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6dl-vero.dts xbian-sources-kernel/arch/arm/boot/dts/imx6dl-vero.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6dl-vero.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6dl-vero.dts 2015-10-11 19:49:25.503432136 +0200 +@@ -0,0 +1,51 @@ ++/* ++ * Copyright (C) 2014 Russell King ++ * Copyright (C) 2015 Sam Nazarko ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License. ++ * ++ * This file 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. ++ * ++ * Or, alternatively ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++/dts-v1/; ++ ++#include "imx6dl.dtsi" ++#include "imx6qdl-vero.dtsi" ++ ++/ { ++ model = "OSMC Vero Rev 1.0"; ++ compatible = "osmc,vero1", "fsl,imx6dl"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6q-cm-fx6.dts xbian-sources-kernel/arch/arm/boot/dts/imx6q-cm-fx6.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6q-cm-fx6.dts 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6q-cm-fx6.dts 2015-10-11 19:49:25.507431871 +0200 +@@ -1,5 +1,5 @@ + /* +- * Copyright 2013 CompuLab Ltd. ++ * Copyright 2014 CompuLab Ltd. + * + * Author: Valentin Raevsky <valentin@compulab.co.il> + * +@@ -13,95 +13,9 @@ + + /dts-v1/; + #include "imx6q.dtsi" ++#include "imx6q-cm-fx6.dtsi" + + / { + model = "CompuLab CM-FX6"; + compatible = "compulab,cm-fx6", "fsl,imx6q"; +- +- memory { +- reg = <0x10000000 0x80000000>; +- }; +- +- leds { +- compatible = "gpio-leds"; +- +- heartbeat-led { +- label = "Heartbeat"; +- gpios = <&gpio2 31 0>; +- linux,default-trigger = "heartbeat"; +- }; +- }; +-}; +- +-&fec { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_enet>; +- phy-mode = "rgmii"; +- status = "okay"; +-}; +- +-&gpmi { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_gpmi_nand>; +- status = "okay"; +-}; +- +-&iomuxc { +- imx6q-cm-fx6 { +- pinctrl_enet: enetgrp { +- fsl,pins = < +- MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 +- MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 +- MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 +- MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 +- MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 +- MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 +- MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 +- MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 +- MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 +- MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 +- MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 +- MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 +- MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 +- MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 +- MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 +- MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 +- >; +- }; +- +- pinctrl_gpmi_nand: gpminandgrp { +- fsl,pins = < +- MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 +- MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 +- MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 +- MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 +- MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 +- MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 +- MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 +- MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 +- MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 +- MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 +- MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 +- MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 +- MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 +- MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 +- MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 +- MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 +- MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 +- >; +- }; +- +- pinctrl_uart4: uart4grp { +- fsl,pins = < +- MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 +- MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 +- >; +- }; +- }; +-}; +- +-&uart4 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_uart4>; +- status = "okay"; + }; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6q-cm-fx6.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6q-cm-fx6.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6q-cm-fx6.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6q-cm-fx6.dtsi 2015-10-11 19:49:25.507431871 +0200 +@@ -0,0 +1,95 @@ ++/* ++ * Copyright 2014 CompuLab Ltd. ++ * ++ * Author: Valentin Raevsky <valentin@compulab.co.il> ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++#include "imx6qdl-cm-fx6.dtsi" ++ ++/ { ++ regulators { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ reg_sata_ldo_en: sata_ldo_en { ++ compatible = "regulator-fixed"; ++ regulator-name = "cm_fx6_sata_ldo_en"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio2 16 0>; ++ startup-delay-us = <100>; ++ enable-active-high; ++ }; ++ ++ reg_sata_phy_slp: sata_phy_slp { ++ compatible = "regulator-fixed"; ++ regulator-name = "cm_fx6_sata_phy_slp"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio3 23 0>; ++ startup-delay-us = <100>; ++ enable-active-high; ++ vin-supply = <®_sata_ldo_en>; ++ }; ++ ++ reg_sata_nrstdly: sata_nrstdly { ++ compatible = "regulator-fixed"; ++ regulator-name = "cm_fx6_sata_nrstdly"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio6 6 0>; ++ startup-delay-us = <100>; ++ enable-active-high; ++ vin-supply = <®_sata_phy_slp>; ++ }; ++ ++ reg_sata_pwren: sata_pwren { ++ compatible = "regulator-fixed"; ++ regulator-name = "cm_fx6_sata_pwren"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio1 28 0>; ++ startup-delay-us = <100>; ++ enable-active-high; ++ vin-supply = <®_sata_nrstdly>; ++ }; ++ ++ reg_sata_nstandby1: sata_nstandby1 { ++ compatible = "regulator-fixed"; ++ regulator-name = "cm_fx6_sata_nstandby1"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio3 20 0>; ++ startup-delay-us = <100>; ++ enable-active-high; ++ vin-supply = <®_sata_pwren>; ++ }; ++ ++ reg_sata_nstandby2: sata_nstandby2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "cm_fx6_sata_nstandby2"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio5 2 0>; ++ startup-delay-us = <100>; ++ enable-active-high; ++ regulator-boot-on; ++ vin-supply = <®_sata_nstandby1>; ++ }; ++ ++ }; ++ ++}; ++ ++/* sata */ ++&sata { ++ status = "okay"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi 2015-10-11 19:49:25.507431871 +0200 +@@ -0,0 +1,643 @@ ++/* ++ * Copyright 2014 CompuLab Ltd. ++ * ++ * Author: Valentin Raevsky <valentin@compulab.co.il> ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++#define MX6QDL_GPR1 0x04 0x04 0x000 0x0 0x0 ++#define MX6QDL_GPR6 0x18 0x18 0x000 0x0 0x0 ++#define MX6QDL_GPR7 0x1c 0x1c 0x000 0x0 0x0 ++ ++/ { ++ memory { ++ reg = <0x10000000 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ heartbeat-led { ++ label = "Heartbeat"; ++ gpios = <&gpio2 31 0>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; ++ ++ regulators { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ reg_3p3v: 3p3v { ++ compatible = "regulator-fixed"; ++ regulator-name = "3P3V"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ }; ++ ++ /* regulator for usb otg */ ++ reg_usb_otg_vbus: usb_otg_vbus { ++ compatible = "regulator-fixed"; ++ regulator-name = "usb_otg_vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ gpio = <&gpio3 22 0>; ++ enable-active-high; ++ }; ++ ++ /* regulator1 for pcie power-on-gpio */ ++ pcie_power_on_gpio: regulator-pcie-power-on-gpio { ++ compatible = "regulator-fixed"; ++ regulator-name = "regulator-pcie-power-on-gpio"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio2 24 0>; ++ enable-active-high; ++ }; ++ ++ /* regulator for usb hub1 */ ++ reg_usb_h1_vbus: usb_h1_vbus { ++ compatible = "regulator-fixed"; ++ regulator-name = "usb_h1_vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ gpio = <&gpio7 8 0>; ++ enable-active-high; ++ }; ++ ++ /* regulator1 for wifi/bt */ ++ awnh387_npoweron: regulator-awnh387-npoweron { ++ compatible = "regulator-fixed"; ++ regulator-name = "regulator-awnh387-npoweron"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio7 12 0>; ++ enable-active-high; ++ }; ++ ++ /* regulator2 for wifi/bt */ ++ awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { ++ compatible = "regulator-fixed"; ++ regulator-name = "regulator-awnh387-wifi-nreset"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio6 16 0>; ++ startup-delay-us = <10000>; ++ }; ++ ++ tsc2046reg: tsc2046-reg { ++ compatible = "regulator-fixed"; ++ regulator-name = "tsc2046-reg"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ ++ }; ++ ++ aliases { ++ mxcfb0 = &mxcfb1; ++ mxcfb1 = &mxcfb2; ++ mxcfb2 = &mxcfb3; ++ mxcfb3 = &mxcfb4; ++ }; ++ ++ sound { ++ compatible = "fsl,imx-audio-wm8731"; ++ model = "wm8731-audio"; ++ ssi-controller = <&ssi2>; ++ src-port = <2>; ++ ext-port = <4>; ++ audio-codec = <&codec>; ++ audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; ++ }; ++ ++ sound-hdmi { ++ compatible = "fsl,imx-audio-hdmi"; ++ model = "imx-audio-hdmi"; ++ hdmi-controller = <&hdmi_audio>; ++ }; ++ ++ sound-spdif { ++ compatible = "fsl,imx-audio-spdif"; ++ model = "imx-spdif"; ++ spdif-controller = <&spdif>; ++ spdif-out; ++ spdif-in; ++ }; ++ ++ mxcfb1: fb@0 { ++ compatible = "fsl,mxc_sdc_fb"; ++ disp_dev = "hdmi"; ++ interface_pix_fmt = "RGB24"; ++ mode_str ="1920x1080M@60"; ++ default_bpp = <32>; ++ int_clk = <0>; ++ late_init = <0>; ++ status = "disabled"; ++ }; ++ ++ mxcfb2: fb@1 { ++ compatible = "fsl,mxc_sdc_fb"; ++ disp_dev = "lcd"; ++ interface_pix_fmt = "RGB24"; ++ mode_str ="1920x1080M@60"; ++ default_bpp = <32>; ++ int_clk = <0>; ++ late_init = <0>; ++ status = "disabled"; ++ }; ++ ++ mxcfb3: fb@2 { ++ compatible = "fsl,mxc_sdc_fb"; ++ disp_dev = "ldb"; ++ interface_pix_fmt = "RGB666"; ++ mode_str ="1366x768M-18@60"; ++ default_bpp = <16>; ++ int_clk = <0>; ++ late_init = <0>; ++ status = "disabled"; ++ }; ++ ++ mxcfb4: fb@3 { ++ compatible = "fsl,mxc_sdc_fb"; ++ disp_dev = "ldb"; ++ interface_pix_fmt = "RGB666"; ++ mode_str ="1280x800M-18@60"; ++ default_bpp = <16>; ++ int_clk = <0>; ++ late_init = <0>; ++ status = "disabled"; ++ }; ++ ++ lcd@0 { ++ compatible = "fsl,lcd"; ++ ipu_id = <0>; ++ disp_id = <0>; ++ default_ifmt = "RGB24"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_ipu1_lcd>; ++ status = "okay"; ++ }; ++ ++ v4l2_out { ++ compatible = "fsl,mxc_v4l2_output"; ++ status = "okay"; ++ }; ++ ++ restart_poweroff { ++ compatible = "fsl,snvs-poweroff"; ++ }; ++}; ++ ++&iomuxc { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_hog>; ++ ++ hog { ++ pinctrl_hog: hoggrp { ++ fsl,pins = < ++ MX6QDL_GPR1 0x48400005 ++ /* ipu3 QoS */ ++ MX6QDL_GPR6 0x007f007f ++ MX6QDL_GPR7 0x007f007f ++ /* SATA PWR */ ++ MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 ++ MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000 ++ MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000 ++ MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 ++ /* SATA CTRL */ ++ MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 ++ MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 ++ MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000 ++ MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 ++ /* POWER_BUTTON */ ++ MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 ++ >; ++ }; ++ }; ++ ++ imx6q-cm-fx6 { ++ /* pins for eth0 */ ++ pinctrl_enet: enetgrp { ++ fsl,pins = < ++ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 ++ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 ++ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 ++ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 ++ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 ++ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 ++ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 ++ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 ++ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 ++ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 ++ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 ++ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 ++ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 ++ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 ++ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 ++ >; ++ }; ++ ++ pinctrl_ipu1_lcd: ipu1grp-lcd { ++ fsl,pins = < ++ MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38 ++ MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x38 ++ MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x38 ++ MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x38 ++ MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04 0x80000028 ++ MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x38 ++ MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x38 ++ MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x38 ++ MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x38 ++ MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x38 ++ MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x38 ++ MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x38 ++ MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x38 ++ MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x38 ++ MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x38 ++ MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x38 ++ MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x38 ++ MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x38 ++ MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x38 ++ MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x38 ++ MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x38 ++ MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x38 ++ MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x38 ++ MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 0x38 ++ MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 0x38 ++ MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 0x38 ++ MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0x38 ++ MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0x38 ++ MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0x38 ++ >; ++ }; ++ ++ /* pins for spi */ ++ pinctrl_ecspi1: ecspi1grp { ++ fsl,pins = < ++ MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 ++ MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 ++ MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 ++ MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 ++ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 ++ >; ++ }; ++ ++ /* pins for nand */ ++ pinctrl_gpmi_nand: gpminandgrp { ++ fsl,pins = < ++ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 ++ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 ++ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 ++ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 ++ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 ++ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 ++ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 ++ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 ++ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 ++ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 ++ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 ++ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 ++ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 ++ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 ++ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 ++ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 ++ MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 ++ >; ++ }; ++ ++ /* pins for i2c2 */ ++ pinctrl_i2c2: i2c2grp { ++ fsl,pins = < ++ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 ++ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 ++ >; ++ }; ++ ++ /* pins for i2c3 */ ++ pinctrl_i2c3: i2c3grp { ++ fsl,pins = < ++ MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 ++ MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 ++ >; ++ }; ++ ++ /* pins for console */ ++ pinctrl_uart4: uart4grp { ++ fsl,pins = < ++ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 ++ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 ++ >; ++ }; ++ ++ /* pins for usb hub1 */ ++ pinctrl_usbh1: usbh1grp { ++ fsl,pins = < ++ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 ++ >; ++ }; ++ ++ /* pins for usb otg */ ++ pinctrl_usbotg: usbotggrp { ++ fsl,pins = < ++ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 ++ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 ++ >; ++ }; ++ ++ /* pins for wifi/bt */ ++ pinctrl_usdhc1: usdhc1grp { ++ fsl,pins = < ++ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 ++ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 ++ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 ++ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 ++ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 ++ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 ++ >; ++ }; ++ ++ /* pins for wifi/bt */ ++ pinctrl_mrvl1: mrvl1grp { ++ fsl,pins = < ++ /* WIFI_PWR_RST */ ++ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 ++ MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000 ++ >; ++ }; ++ ++ /* pins for tsc2046 pendown */ ++ pinctrl_tsc2046: tsc2046grp { ++ fsl,pins = < ++ /* tsc2046 PENDOWN */ ++ MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x80000000 ++ >; ++ }; ++ ++ /* pins for pcie */ ++ pinctrl_pcie: pciegrp { ++ fsl,pins = < ++ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 ++ MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 ++ >; ++ }; ++ ++ /* pins for spdif */ ++ pinctrl_spdif: spdifgrp { ++ fsl,pins = < ++ MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 ++ MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 ++ >; ++ }; ++ ++ /* pins for audmux */ ++ pinctrl_audmux: audmuxgrp { ++ fsl,pins = < ++ MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 ++ MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 ++ MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 ++ MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 ++ MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 ++ /* master mode pin */ ++ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 ++ >; ++ }; ++ ++ pinctrl_hdmi_hdcp: hdmihdcpgrp { ++ fsl,pins = < ++ MX6QDL_PAD_KEY_COL3__HDMI_TX_DDC_SCL 0x4001b8b1 ++ MX6QDL_PAD_KEY_ROW3__HDMI_TX_DDC_SDA 0x4001b8b1 ++ >; ++ }; ++ ++ pinctrl_pwm3_1: pwm3grp-1 { ++ fsl,pins = < ++ MX6QDL_PAD_SD4_DAT1__PWM3_OUT 0x1b0b1 ++ >; ++ }; ++ ++ pinctrl_flexcan1_1: flexcan1grp-1 { ++ fsl,pins = < ++ MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x80000000 ++ MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX 0x80000000 ++ >; ++ }; ++ }; ++}; ++ ++&cpu0 { ++ operating-points = < ++ /* kHz uV */ ++ 1248000 1300000 ++ 1200000 1275000 ++ 1128000 1275000 ++ 996000 1250000 ++ 852000 1250000 ++ 792000 1150000 ++ 396000 975000 ++ >; ++ fsl,soc-operating-points = < ++ /* ARM kHz SOC-PU uV */ ++ 1248000 1300000 ++ 1200000 1275000 ++ 1128000 1275000 ++ 996000 1250000 ++ 852000 1250000 ++ 792000 1175000 ++ 396000 1175000 ++ >; ++}; ++ ++/* spi */ ++&ecspi1 { ++ fsl,spi-num-chipselects = <2>; ++ cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_ecspi1>; ++ status = "okay"; ++ ++ flash: m25p80@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "st,m25px16", "st,m25p"; ++ spi-max-frequency = <20000000>; ++ reg = <0>; ++ ++ partition@0 { ++ label = "uboot"; ++ reg = <0x0 0xc0000>; ++ }; ++ ++ partition@c0000 { ++ label = "uboot environment"; ++ reg = <0xc0000 0x40000>; ++ }; ++ ++ partition@100000 { ++ label = "reserved"; ++ reg = <0x100000 0x100000>; ++ }; ++ }; ++ ++ /* touch controller */ ++ touch: tsc2046@1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_tsc2046>; ++ ++ compatible = "ti,tsc2046"; ++ vcc-supply = <&tsc2046reg>; ++ ++ reg = <1>; /* CS1 */ ++ spi-max-frequency = <1500000>; ++ ++ interrupt-parent = <&gpio2>; ++ interrupts = <15 0>; ++ pendown-gpio = <&gpio2 15 0>; ++ ++ ti,x-min = /bits/ 16 <0x0>; ++ ti,x-max = /bits/ 16 <0x0fff>; ++ ti,y-min = /bits/ 16 <0x0>; ++ ti,y-max = /bits/ 16 <0x0fff>; ++ ++ ti,x-plate-ohms = /bits/ 16 <180>; ++ ti,pressure-max = /bits/ 16 <255>; ++ ++ ti,debounce-max = /bits/ 16 <30>; ++ ti,debounce-tol = /bits/ 16 <10>; ++ ti,debounce-rep = /bits/ 16 <1>; ++ ++ linux,wakeup; ++ }; ++}; ++ ++/* eth0 */ ++&fec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_enet>; ++ phy-mode = "rgmii"; ++ status = "okay"; ++}; ++ ++/* nand */ ++&gpmi { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_gpmi_nand>; ++ status = "okay"; ++ ++ partition@0 { ++ label = "linux"; ++ reg = <0x0 0x800000>; ++ }; ++ ++ partition@800000 { ++ label = "rootfs"; ++ reg = < 0x800000 0x0>; ++ }; ++}; ++ ++/* i2c3 */ ++&i2c3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c3>; ++ status = "okay"; ++ ++ eeprom@50 { ++ compatible = "at24,24c02"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++ ++ codec: wm8731@1a { ++ compatible = "wlf,wm8731"; ++ reg = <0x1a>; ++ clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>; ++ clock-names = "pll4", "imx-ssi.1", "cko", "cko2"; ++ AVDD-supply = <®_3p3v>; ++ HPVDD-supply = <®_3p3v>; ++ DCVDD-supply = <®_3p3v>; ++ DBVDD-supply = <®_3p3v>; ++ }; ++}; ++ ++&pcie { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_pcie>; ++ reset-gpio = <&gpio1 26 0>; ++ vdd-supply = <&pcie_power_on_gpio>; ++ status = "okay"; ++}; ++ ++/* console */ ++&uart4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart4>; ++ status = "okay"; ++}; ++ ++/* usb otg */ ++&usbotg { ++ vbus-supply = <®_usb_otg_vbus>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usbotg>; ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++/* usb hub1 */ ++&usbh1 { ++ vbus-supply = <®_usb_h1_vbus>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usbh1>; ++ status = "okay"; ++}; ++ ++/* wifi/bt */ ++&usdhc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_mrvl1>; ++ non-removable; ++ vmmc-supply = <&awnh387_npoweron>; ++ vmmc_aux-supply = <&awnh387_wifi_nreset>; ++ status = "okay"; ++}; ++ ++&ssi2 { ++ fsl,mode = "i2s-master"; ++ status = "okay"; ++}; ++ ++&hdmi_core { ++ ipu_id = <0>; ++ disp_id = <1>; ++ status = "okay"; ++}; ++ ++&hdmi_video { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_hdmi_hdcp>; ++ fsl,hdcp; ++ status = "okay"; ++}; ++ ++&hdmi_audio { ++ status = "okay"; ++}; ++ ++&spdif { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_spdif>; ++ status = "okay"; ++}; ++ ++&audmux { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_audmux>; ++ status = "okay"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2015-10-11 19:49:25.507431871 +0200 @@ -45,11 +45,22 @@ #include <dt-bindings/gpio/gpio.h> @@ -329,6 +1316,15 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi linux-4.1.10/ }; &i2c3 { +@@ -207,7 +260,7 @@ + + pinctrl_cubox_i_usdhc2_aux: cubox-i-usdhc2-aux { + fsl,pins = < +- MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071 ++ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x13071 + MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071 + >; + }; @@ -228,6 +281,28 @@ MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x17059 >; @@ -384,9 +1380,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi linux-4.1.10/ + dcic_mux = "dcic-lvds1"; + status = "okay"; }; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm/boot/dts/imx6qdl.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6qdl.dtsi 2015-10-10 16:41:04.965313892 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl.dtsi 2015-10-11 19:49:25.511431606 +0200 @@ -14,6 +14,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> @@ -583,7 +1579,25 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; reg_arm: regulator-vddcore@140 { -@@ -647,6 +730,7 @@ +@@ -597,6 +680,8 @@ + anatop-min-bit-val = <1>; + anatop-min-voltage = <725000>; + anatop-max-voltage = <1450000>; ++ regulator-allow-bypass; ++ linux,phandle = <®_arm>; + }; + + reg_pu: regulator-vddpu@140 { +@@ -631,6 +716,8 @@ + anatop-min-bit-val = <1>; + anatop-min-voltage = <725000>; + anatop-max-voltage = <1450000>; ++ regulator-allow-bypass; ++ linux,phandle = <®_soc>; + }; + }; + +@@ -647,6 +734,7 @@ reg = <0x020c9000 0x1000>; interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX6QDL_CLK_USBPHY1>; @@ -591,7 +1605,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm fsl,anatop = <&anatop>; }; -@@ -655,9 +739,15 @@ +@@ -655,9 +743,15 @@ reg = <0x020ca000 0x1000>; interrupts = <0 45 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX6QDL_CLK_USBPHY2>; @@ -607,7 +1621,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm snvs@020cc000 { compatible = "fsl,sec-v4.0-mon", "simple-bus"; #address-cells = <1>; -@@ -704,14 +794,12 @@ +@@ -704,14 +798,12 @@ interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>, <0 90 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&intc>; @@ -627,7 +1641,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; gpr: iomuxc-gpr@020e0000 { -@@ -736,22 +824,6 @@ +@@ -736,22 +828,6 @@ #size-cells = <0>; reg = <0>; status = "disabled"; @@ -650,7 +1664,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; lvds-channel@1 { -@@ -759,22 +831,6 @@ +@@ -759,22 +835,6 @@ #size-cells = <0>; reg = <1>; status = "disabled"; @@ -673,7 +1687,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; }; -@@ -788,32 +844,26 @@ +@@ -788,32 +848,26 @@ <&clks IMX6QDL_CLK_HDMI_ISFR>; clock-names = "iahb", "isfr"; status = "disabled"; @@ -716,7 +1730,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; sdma: sdma@020ec000 { -@@ -824,6 +874,7 @@ +@@ -824,6 +878,7 @@ <&clks IMX6QDL_CLK_SDMA>; clock-names = "ipg", "ahb"; #dma-cells = <3>; @@ -724,7 +1738,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin"; }; }; -@@ -835,10 +886,30 @@ +@@ -835,10 +890,30 @@ reg = <0x02100000 0x100000>; ranges; @@ -759,7 +1773,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; aipstz@0217c000 { /* AIPSTZ2 */ -@@ -852,6 +923,7 @@ +@@ -852,6 +927,7 @@ clocks = <&clks IMX6QDL_CLK_USBOH3>; fsl,usbphy = <&usbphy1>; fsl,usbmisc = <&usbmisc 0>; @@ -767,7 +1781,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm status = "disabled"; }; -@@ -903,14 +975,21 @@ +@@ -903,14 +979,22 @@ <&clks IMX6QDL_CLK_ENET>, <&clks IMX6QDL_CLK_ENET_REF>; clock-names = "ipg", "ahb", "ptp"; @@ -775,6 +1789,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm + phy-mode = "rgmii"; + fsl,magic-packet; + status = "okay"; ++ local-mac-address = [FF FF FF FF FF FF]; }; - mlb@0218c000 { @@ -791,7 +1806,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; usdhc1: usdhc@02190000 { -@@ -995,6 +1074,11 @@ +@@ -995,6 +1079,11 @@ reg = <0x021ac000 0x4000>; }; @@ -803,7 +1818,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm mmdc0: mmdc@021b0000 { /* MMDC0 */ compatible = "fsl,imx6q-mmdc"; reg = <0x021b0000 0x4000>; -@@ -1011,9 +1095,15 @@ +@@ -1011,9 +1100,15 @@ clocks = <&clks IMX6QDL_CLK_EIM_SLOW>; }; @@ -821,7 +1836,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; tzasc@021d0000 { /* TZASC1 */ -@@ -1034,39 +1124,38 @@ +@@ -1034,39 +1129,38 @@ mipi_csi: mipi@021dc000 { reg = <0x021dc000 0x4000>; @@ -881,7 +1896,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; uart2: serial@021e8000 { -@@ -1127,67 +1216,14 @@ +@@ -1127,67 +1221,14 @@ <0 5 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX6QDL_CLK_IPU1>, <&clks IMX6QDL_CLK_IPU1_DI0>, @@ -956,9 +1971,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl.dtsi linux-4.1.10/arch/arm }; }; }; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi 2015-10-10 16:41:04.969313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi 2015-10-11 19:49:25.507431871 +0200 @@ -0,0 +1,686 @@ +/* + * Device Tree file for SolidRun HummingBoard2 @@ -1464,7 +2479,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi linux-4 + + pinctrl_hummingboard2_usdhc2_aux: hummingboard2-usdhc2-aux { + fsl,pins = < -+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071 ++ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x13071 + MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071 + >; + }; @@ -1646,9 +2661,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi linux-4 + pinctrl-0 = <&pinctrl_hummingboard2_uart3>; + status = "okay"; +}; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi 2015-10-10 16:41:04.969313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi 2015-10-11 19:49:25.507431871 +0200 @@ -43,8 +43,11 @@ #include "imx6qdl-microsom-ar8035.dtsi" @@ -1785,7 +2800,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. status = "okay"; }; -@@ -132,19 +209,41 @@ +@@ -132,21 +209,45 @@ pinctrl-0 = <&pinctrl_hummingboard_i2c1>; status = "okay"; @@ -1815,6 +2830,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. compatible = "nxp,pcf8523"; reg = <0x68>; + nxp,12p5_pf; ++ status = "disabled"; }; /* Pro baseboard model */ @@ -1828,8 +2844,11 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. - reg = <0x0a>; VDDA-supply = <®_3p3v>; VDDIO-supply = <®_3p3v>; ++ status = "disabled"; }; -@@ -155,10 +254,47 @@ + }; + +@@ -155,10 +256,47 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_hummingboard_i2c2>; status = "okay"; @@ -1877,7 +2896,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. pinctrl_hummingboard_flexcan1: hummingboard-flexcan1 { fsl,pins = < MX6QDL_PAD_SD3_CLK__FLEXCAN1_RX 0x80000000 -@@ -192,6 +328,19 @@ +@@ -192,6 +330,19 @@ >; }; @@ -1897,7 +2916,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. pinctrl_hummingboard_pwm1: pwm1grp { fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b1>; }; -@@ -219,16 +368,21 @@ +@@ -219,16 +370,21 @@ * Similar to pinctrl_usbotg_2, but we want it * pulled down for a fixed host connection. */ @@ -1915,12 +2934,13 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. + pinctrl_hummingboard_usdhc2_aux: hummingboard-usdhc2-aux { fsl,pins = < - MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071 +- MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071 ++ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x13071 + MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071 >; }; -@@ -242,9 +396,73 @@ +@@ -242,9 +398,73 @@ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059 >; }; @@ -1994,7 +3014,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_hummingboard_pwm1>; -@@ -256,10 +474,28 @@ +@@ -256,10 +476,28 @@ status = "okay"; }; @@ -2023,7 +3043,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. }; &ssi1 { -@@ -282,12 +518,56 @@ +@@ -282,12 +520,56 @@ }; &usdhc2 { @@ -2082,9 +3102,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi linux-4. + dcic_mux = "dcic-lvds1"; + status = "okay"; +}; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-microsom.dtsi linux-4.1.10/arch/arm/boot/dts/imx6qdl-microsom.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-microsom.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6qdl-microsom.dtsi 2015-10-10 16:41:04.969313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-microsom.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-microsom.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-microsom.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-microsom.dtsi 2015-10-11 19:49:25.507431871 +0200 @@ -39,15 +39,98 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. @@ -2208,9 +3228,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-microsom.dtsi linux-4.1.10 + vmmc-supply = <®_brcm>; + status = "okay"; +}; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-sabresd.dtsi linux-4.1.10/arch/arm/boot/dts/imx6qdl-sabresd.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-sabresd.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6qdl-sabresd.dtsi 2015-10-10 16:41:04.969313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-sabresd.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sabresd.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-sabresd.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sabresd.dtsi 2015-10-11 19:49:25.507431871 +0200 @@ -57,6 +57,13 @@ enable-active-high; }; @@ -2284,9 +3304,991 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6qdl-sabresd.dtsi linux-4.1.10/ &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm1>; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6q.dtsi linux-4.1.10/arch/arm/boot/dts/imx6q.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6q.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6q.dtsi 2015-10-10 16:41:04.969313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi 2015-10-11 19:49:25.507431871 +0200 +@@ -0,0 +1,116 @@ ++/* ++ * Copyright 2014 CompuLab Ltd. ++ * ++ * Author: Valentin Raevsky <valentin@compulab.co.il> ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/ { ++ backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm3 0 5000000>; ++ brightness-levels = <0 4 8 16 32 64 128 255>; ++ default-brightness-level = <7>; ++ }; ++ ++ i2cmux { ++ compatible = "i2c-mux-gpio"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mux-gpios = <&gpio1 2 0>; ++ i2c-parent = <&i2c1>; ++ ++ i2c@0 { ++ reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ pca9555@26 { ++ compatible = "nxp,pca9555"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ reg = <0x26>; ++ }; ++ ++ hx8526@4a { ++ compatible = "himax,himax_ts"; ++ reg = <0x4a>; ++ gpio_intr = <&gpio1 4 0>; ++ }; ++ ++ eeprom@50 { ++ compatible = "at24,24c02"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++ ++ }; ++ ++ i2c@1 { ++ reg = <1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ dvi: edid@50 { ++ compatible = "fsl,imx6-hdmi-i2c"; ++ reg = <0x50>; ++ }; ++ }; ++ ++ }; ++}; ++ ++&i2c1 { ++ status = "okay"; ++}; ++ ++&usdhc3 { ++ wp-gpios = <&gpio7 0 0>; ++ cd-gpios = <&gpio7 1 0>; ++ status = "okay"; ++}; ++ ++&pwm3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_pwm3_1>; ++ status = "okay"; ++}; ++ ++&mxcfb1 { ++ status = "okay"; ++}; ++ ++&mxcfb2 { ++ mode_str ="KD050C-WVGA"; ++ status = "okay"; ++}; ++ ++&mxcfb3 { ++ status = "okay"; ++}; ++ ++&mxcfb4 { ++ status = "okay"; ++}; ++ ++&ldb { ++ ipu_id = <1>; ++ disp_id = <0>; ++ ext_ref = <1>; ++ mode = "sep0"; ++ sec_ipu_id = <1>; ++ sec_disp_id = <1>; ++ status = "okay"; ++}; ++ ++&flexcan1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_flexcan1_1>; ++ status = "okay"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi 2015-10-11 19:49:25.507431871 +0200 +@@ -0,0 +1,114 @@ ++/* ++ * Copyright 2014 CompuLab Ltd. ++ * ++ * Author: Valentin Raevsky <valentin@compulab.co.il> ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/ { ++ iomux_uart2: pinmux@20E0924 { ++ compatible = "pinctrl-single"; ++ reg = <0x20E0000 0x924>; /* Single register */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-single,register-width = <32>; ++ pinctrl-single,function-mask = <0x4>; ++ }; ++ ++ eth@pcie { ++ compatible = "intel,i211"; ++ local-mac-address = [FF FF FF FF FF FF]; ++ status = "okay"; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ power { ++ label = "Power Button"; ++ gpios = <&gpio1 29 1>; ++ linux,code = <116>; /* KEY_POWER */ ++ gpio-key,wakeup; ++ }; ++ }; ++ ++ i2cmux { ++ compatible = "i2c-mux-gpio"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mux-gpios = <&gpio1 2 0>; ++ i2c-parent = <&i2c1>; ++ ++ i2c@0 { ++ reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ eeprom@50 { ++ compatible = "at24,24c02"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++ ++ rtc@56 { ++ compatible = "emmicro,em3027"; ++ reg = <0x56>; ++ }; ++ }; ++ ++ i2c@1 { ++ reg = <1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ dvi: edid@50 { ++ compatible = "fsl,imx6-hdmi-i2c"; ++ reg = <0x50>; ++ }; ++ }; ++ }; ++}; ++ ++&iomuxc { ++ imx6q-sbc-fx6m { ++ /* pins for uart2 */ ++ pinctrl_uart2: uart2grp { ++ fsl,pins = < ++ MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1 ++ MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1 ++ MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1 ++ MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1 ++ >; ++ }; ++ }; ++}; ++ ++&i2c1 { ++ status = "okay"; ++}; ++ ++&usdhc3 { ++ non-removable; ++ status = "okay"; ++}; ++ ++/* rear serial console */ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart2>; ++ fsl,uart-has-rtscts; ++ status = "okay"; ++}; ++ ++&mxcfb1 { ++ status = "okay"; ++}; ++ ++&mxcfb2 { ++ status = "okay"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi 2015-10-11 19:49:25.507431871 +0200 +@@ -0,0 +1,110 @@ ++/* ++ * Copyright 2014 CompuLab Ltd. ++ * ++ * Author: Valentin Raevsky <valentin@compulab.co.il> ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/ { ++ regulators { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* regulator for mmc */ ++ reg_3p3v: 3p3v { ++ compatible = "regulator-fixed"; ++ regulator-name = "3P3V"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ }; ++ }; ++ ++}; ++ ++&iomuxc { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_hog>, <&pinctrl_dvi0>; ++ ++ imx6q-sb-fx6x { ++ /* pins for i2c1 */ ++ pinctrl_i2c1: i2c1grp { ++ fsl,pins = < ++ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 ++ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 ++ >; ++ }; ++ ++ /* pins for mmc */ ++ pinctrl_usdhc3: usdhc3grp { ++ fsl,pins = < ++ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 ++ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 ++ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 ++ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 ++ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 ++ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 ++ MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000 ++ MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000 ++ >; ++ }; ++ ++ pinctrl_usdhc3_100mhz: usdhc3grp-100mhz { /* 100Mhz */ ++ fsl,pins = < ++ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9 ++ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9 ++ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9 ++ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9 ++ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9 ++ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9 ++ >; ++ }; ++ ++ pinctrl_usdhc3_200mhz: usdhc3grp-200mhz { /* 200Mhz */ ++ fsl,pins = < ++ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9 ++ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9 ++ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9 ++ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9 ++ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9 ++ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9 ++ >; ++ }; ++ ++ /* pins for dvi/ts */ ++ pinctrl_dvi0: dvi0grp { ++ fsl,pins = < ++ /* DVI_DDC_SEL */ ++ MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000 ++ /* SB-FX6 Himax TS PENDOWN or SB-FX6m DVI HPD */ ++ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000 ++ >; ++ }; ++ }; ++}; ++ ++/* i2c1 */ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c1>; ++ status = "disabled"; ++}; ++ ++/* mmc */ ++&usdhc3 { ++ pinctrl-names = "default", "state_100mhz", "state_200mhz"; ++ pinctrl-0 = <&pinctrl_usdhc3>; ++ pinctrl-1 = <&pinctrl_usdhc3_100mhz>; ++ pinctrl-2 = <&pinctrl_usdhc3_200mhz>; ++ no-1-8-v; ++ keep-power-in-suspend; ++ vmmc-supply = <®_3p3v>; ++ status = "disabled"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-vero.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-vero.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-vero.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-vero.dtsi 2015-10-11 19:49:25.511431606 +0200 +@@ -0,0 +1,355 @@ ++/* ++ * Copyright (C) 2014 Russell King ++ * Copyright (C) 2015 Sam Nazarko ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License. ++ * ++ * This file 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. ++ * ++ * Or, alternatively ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++#include "imx6qdl-verosom.dtsi" ++#include "imx6qdl-verosom-ar8035.dtsi" ++#include <dt-bindings/input/input.h> ++#include <dt-bindings/gpio/gpio.h> ++ ++/ { ++ chosen { ++ bootargs = "quiet console=ttymxc0,115200 rw root=/dev/mmcblk0p2"; ++ }; ++ ++ aliases { ++ mmc0 = &usdhc2; ++ mmc1 = &usdhc1; ++ mxcfb0 = &mxcfb1; ++ }; ++ ++ ir_recv: ir-receiver { ++ compatible = "gpio-ir-receiver"; ++ gpios = <&gpio3 9 1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_ir>; ++ linux,rc-map-name = "rc-rc6-mce"; ++ }; ++ ++ pwmleds { ++ compatible = "pwm-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_pwm1>; ++ ++ front { ++ active-low; ++ label = "imx6:red:front"; ++ max-brightness = <248>; ++ pwms = <&pwm1 0 50000>; ++ }; ++ }; ++ ++ regulators { ++ compatible = "simple-bus"; ++ ++ reg_3p3v: 3p3v { ++ compatible = "regulator-fixed"; ++ regulator-name = "3P3V"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ }; ++ ++ reg_usbh1_vbus: usb-h1-vbus { ++ compatible = "regulator-fixed"; ++ regulator-boot-on; ++ regulator-always-on; ++ enable-active-high; ++ gpio = <&gpio1 0 0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_usbh1_vbus>; ++ regulator-name = "usb_h1_vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ }; ++ ++ reg_usbotg_vbus: usb-otg-vbus { ++ compatible = "regulator-fixed"; ++ regulator-boot-on; ++ regulator-always-on; ++ enable-active-high; ++ gpio = <&gpio3 22 0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_usbotg_vbus>; ++ regulator-name = "usb_otg_vbus"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ }; ++ }; ++ ++ sound-spdif { ++ compatible = "fsl,imx-audio-spdif"; ++ model = "imx-spdif"; ++ spdif-controller = <&spdif>; ++ spdif-out; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ pinctrl-0 = <&pinctrl_gpio_key>; ++ pinctrl-names = "default"; ++ ++ button_0 { ++ label = "Button 0"; ++ gpios = <&gpio3 8 GPIO_ACTIVE_LOW>; ++ linux,code = <BTN_0>; ++ }; ++ }; ++ ++ sound-hdmi { ++ compatible = "fsl,imx6q-audio-hdmi", ++ "fsl,imx-audio-hdmi"; ++ model = "imx-audio-hdmi"; ++ hdmi-controller = <&hdmi_audio>; ++ }; ++ ++ mxcfb1: fb@0 { ++ compatible = "fsl,mxc_sdc_fb"; ++ disp_dev = "hdmi"; ++ interface_pix_fmt = "RGB24"; ++ mode_str ="1920x1080M@60"; ++ default_bpp = <32>; ++ int_clk = <0>; ++ late_init = <0>; ++ status = "okay"; ++ }; ++}; ++ ++&hdmi_core { ++ ipu_id = <0>; ++ disp_id = <0>; ++ status = "okay"; ++}; ++ ++&hdmi_video { ++ fsl,phy_reg_vlev = <0x0294>; ++ fsl,phy_reg_cksymtx = <0x800d>; ++ status = "okay"; ++}; ++ ++&hdmi_audio { ++ status = "okay"; ++}; ++ ++&hdmi_cec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_hdmi>; ++ status = "okay"; ++}; ++ ++&i2c2 { ++ clock-frequency = <100000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_i2c2>; ++ ++ status = "okay"; ++ ++ ddc: imx6_hdmi_i2c@50 { ++ compatible = "fsl,imx6-hdmi-i2c"; ++ reg = <0x50>; ++ }; ++}; ++ ++&i2c3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_i2c3>; ++ ++ status = "okay"; ++ ++ rtc: pcf8523@68 { ++ compatible = "nxp,pcf8523"; ++ reg = <0x68>; ++ }; ++}; ++ ++&iomuxc { ++ vero { ++ pinctrl_vero_hdmi: vero-hdmi { ++ fsl,pins = < ++ MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0 ++ >; ++ }; ++ ++ pinctrl_vero_i2c2: vero-i2c2 { ++ fsl,pins = < ++ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 ++ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 ++ >; ++ }; ++ ++ pinctrl_vero_i2c3: vero-i2c3 { ++ fsl,pins = < ++ MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1 ++ MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1 ++ >; ++ }; ++ ++ pinctrl_vero_ir: vero-ir { ++ fsl,pins = < ++ MX6QDL_PAD_EIM_DA9__GPIO3_IO09 0x80000000 ++ >; ++ }; ++ ++ pinctrl_vero_pwm1: vero-pwm1-front-led { ++ fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b0>; ++ }; ++ ++ pinctrl_vero_spdif: vero-spdif { ++ fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; ++ }; ++ ++ pinctrl_vero_usbh1: vero-usbh1 { ++ fsl,pins = <MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0>; ++ }; ++ ++ pinctrl_vero_usbh1_vbus: vero-usbh1-vbus { ++ fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>; ++ }; ++ ++ pinctrl_vero_usbotg: vero-usbotg { ++ /* ++ * The vero pulls ID low, but as it's pointless ++ * leaving it as a pull-up, even if it is just 10uA. ++ */ ++ fsl,pins = < ++ MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059 ++ MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0 ++ >; ++ }; ++ ++ pinctrl_vero_usbotg_vbus: vero-usbotg-vbus { ++ fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x4001b0b0>; ++ }; ++ ++ pinctrl_vero_usdhc2_aux: vero-usdhc2-aux { ++ fsl,pins = < ++ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071 ++ MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071 ++ >; ++ }; ++ ++ pinctrl_vero_usdhc2: vero-usdhc2 { ++ fsl,pins = < ++ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059 ++ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059 ++ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059 ++ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059 ++ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059 ++ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059 ++ >; ++ }; ++ ++ pinctrl_gpio_key: gpio-key { ++ fsl,pins = < ++ MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x17059 ++ >; ++ }; ++ ++ pinctrl_vero_usdhc2_100mhz: vero-usdhc2-100mhz { ++ fsl,pins = < ++ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x170b9 ++ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x100b9 ++ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x170b9 ++ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x170b9 ++ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x170b9 ++ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x130b9 ++ >; ++ }; ++ ++ pinctrl_vero_usdhc2_200mhz: vero-usdhc2-200mhz { ++ fsl,pins = < ++ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x170f9 ++ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x100f9 ++ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x170f9 ++ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x170f9 ++ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x170f9 ++ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x130f9 ++ >; ++ }; ++ }; ++}; ++ ++&pwm1 { ++ status = "okay"; ++}; ++ ++&spdif { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_spdif>; ++ status = "okay"; ++}; ++ ++&usbh1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_usbh1>; ++ vbus-supply = <®_usbh1_vbus>; ++ status = "okay"; ++}; ++ ++&usbotg { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_vero_usbotg>; ++ vbus-supply = <®_usbotg_vbus>; ++ status = "okay"; ++}; ++ ++&usdhc2 { ++ pinctrl-names = "default", "state_100mhz", "state_200mhz"; ++ pinctrl-0 = <&pinctrl_vero_usdhc2_aux &pinctrl_vero_usdhc2>; ++ pinctrl-1 = <&pinctrl_vero_usdhc2_aux &pinctrl_vero_usdhc2_100mhz>; ++ pinctrl-2 = <&pinctrl_vero_usdhc2_aux &pinctrl_vero_usdhc2_200mhz>; ++ vmmc-supply = <®_3p3v>; ++ cd-gpios = <&gpio1 4 0>; ++ status = "okay"; ++ no-1-8-v; ++}; ++ ++&dcic1 { ++ dcic_id = <0>; ++ dcic_mux = "dcic-hdmi"; ++ status = "okay"; ++}; ++ ++&dcic2 { ++ dcic_id = <1>; ++ dcic_mux = "dcic-lvds1"; ++ status = "disabled"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-verosom-ar8035.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-verosom-ar8035.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-verosom-ar8035.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-verosom-ar8035.dtsi 2015-10-11 19:49:25.511431606 +0200 +@@ -0,0 +1,101 @@ ++/* ++ * Copyright (C) 2013,2014 Russell King ++ * Copyright (C) 2015 Sam Nazarko ++ * ++ * This describes the hookup for an AR8035 to the iMX6 on the Vero ++ * SOM. ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License. ++ * ++ * This file 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. ++ * ++ * Or, alternatively ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++&fec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_verosom_enet_ar8035>; ++ phy-mode = "rgmii"; ++ phy-reset-duration = <2>; ++ phy-reset-gpios = <&gpio4 15 0>; ++ status = "okay"; ++}; ++ ++&iomuxc { ++ enet { ++ pinctrl_verosom_enet_ar8035: verosom-enet-ar8035 { ++ fsl,pins = < ++ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b8b0 ++ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 ++ /* AR8035 reset */ ++ MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0 ++ /* AR8035 interrupt */ ++ MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x80000000 ++ /* GPIO16 -> AR8035 25MHz */ ++ MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0xc0000000 ++ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x80000000 ++ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030 ++ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030 ++ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030 ++ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030 ++ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b030 ++ /* AR8035 CLK_25M --> ENET_REF_CLK (V22) */ ++ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x0a0b1 ++ /* AR8035 pin strapping: IO voltage: pull up */ ++ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030 ++ /* AR8035 pin strapping: PHYADDR#0: pull down */ ++ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x13030 ++ /* AR8035 pin strapping: PHYADDR#1: pull down */ ++ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x13030 ++ /* AR8035 pin strapping: MODE#1: pull up */ ++ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030 ++ /* AR8035 pin strapping: MODE#3: pull up */ ++ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030 ++ /* AR8035 pin strapping: MODE#0: pull down */ ++ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x13030 ++ ++ /* ++ * As the RMII pins are also connected to RGMII ++ * so that an AR8030 can be placed, set these ++ * to high-z with the same pulls as above. ++ * Use the GPIO settings to avoid changing the ++ * input select registers. ++ */ ++ MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x03000 ++ MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x03000 ++ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x03000 ++ >; ++ }; ++ }; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6qdl-verosom.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-verosom.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6qdl-verosom.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6qdl-verosom.dtsi 2015-10-11 19:49:25.511431606 +0200 +@@ -0,0 +1,162 @@ ++/* ++ * Copyright (C) 2013,2014 Russell King ++ * Copyright (C) 2015 Sam Nazarko ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License. ++ * ++ * This file 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. ++ * ++ * Or, alternatively ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++#include <dt-bindings/gpio/gpio.h> ++/ { ++ clk_sdio: sdio-clock { ++ compatible = "gpio-gate-clock"; ++ #clock-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_verosom_brcm_osc>; ++ enable-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ regulators { ++ compatible = "simple-bus"; ++ ++ reg_brcm: brcm-reg { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpio = <&gpio3 19 0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_verosom_brcm_reg>; ++ regulator-name = "brcm_reg"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us = <200000>; ++ }; ++ }; ++ ++ usdhc1_pwrseq: usdhc1_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&gpio5 26 GPIO_ACTIVE_LOW>, ++ <&gpio6 0 GPIO_ACTIVE_LOW>; ++ clocks = <&clk_sdio>; ++ clock-names = "ext_clock"; ++ }; ++}; ++ ++&iomuxc { ++ verosom { ++ pinctrl_verosom_brcm_bt: verosom-brcm-bt { ++ fsl,pins = < ++ MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00 0x40013070 ++ MX6QDL_PAD_CSI0_DAT15__GPIO6_IO01 0x40013070 ++ MX6QDL_PAD_CSI0_DAT18__GPIO6_IO04 0x40013070 ++ >; ++ }; ++ ++ pinctrl_verosom_brcm_osc: verosom-brcm-osc { ++ fsl,pins = < ++ MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x40013070 ++ >; ++ }; ++ ++ pinctrl_verosom_brcm_reg: verosom-brcm-reg { ++ fsl,pins = < ++ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x40013070 ++ >; ++ }; ++ ++ pinctrl_verosom_brcm_wifi: verosom-brcm-wifi { ++ fsl,pins = < ++ MX6QDL_PAD_GPIO_8__XTALOSC_REF_CLK_32K 0x1b0b0 ++ MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20 0x40013070 ++ MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x40013070 ++ MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27 0x40013070 ++ >; ++ }; ++ ++ pinctrl_verosom_uart1: verosom-uart1 { ++ fsl,pins = < ++ MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1 ++ MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1 ++ >; ++ }; ++ ++ pinctrl_verosom_uart4: verosom-uart4 { ++ fsl,pins = < ++ MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1 ++ MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1 ++ MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1 ++ MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1 ++ >; ++ }; ++ ++ pinctrl_verosom_usdhc1: verosom-usdhc1 { ++ fsl,pins = < ++ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059 ++ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059 ++ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059 ++ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059 ++ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059 ++ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059 ++ >; ++ }; ++ }; ++}; ++ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_verosom_uart1>; ++ status = "okay"; ++}; ++ ++/* UART4 - Connected to optional BRCM Wifi/BT/FM */ ++&uart4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_verosom_brcm_bt &pinctrl_verosom_uart4>; ++ fsl,uart-has-rtscts; ++ status = "okay"; ++}; ++ ++/* USDHC1 - Connected to optional BRCM Wifi/BT/FM */ ++&usdhc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_verosom_brcm_wifi &pinctrl_verosom_usdhc1>; ++ bus-width = <4>; ++ mmc-pwrseq = <&usdhc1_pwrseq>; ++ keep-power-in-suspend; ++ non-removable; ++ vmmc-supply = <®_brcm>; ++ status = "okay"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6q.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6q.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6q.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6q.dtsi 2015-10-11 19:49:25.507431871 +0200 @@ -14,6 +14,7 @@ / { @@ -2593,9 +4595,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6q.dtsi linux-4.1.10/arch/arm/b + "ldb_di0_div_7", "ldb_di1_div_7", + "ldb_di0_div_sel", "ldb_di1_div_sel"; }; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6q-hummingboard2.dts linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard2.dts ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6q-hummingboard2.dts 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard2.dts 2015-10-10 16:41:04.973313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard2.dts xbian-sources-kernel/arch/arm/boot/dts/imx6q-hummingboard2.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard2.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6q-hummingboard2.dts 2015-10-11 19:49:25.507431871 +0200 @@ -0,0 +1,60 @@ +/* + * Device Tree file for SolidRun HummingBoard2 @@ -2657,9 +4659,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6q-hummingboard2.dts linux-4.1. + fsl,transmit-atten-16ths = <9>; + fsl,no-spread-spectrum; +}; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6q-hummingboard.dts linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard.dts ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6q-hummingboard.dts 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard.dts 2015-10-10 16:41:04.973313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard.dts xbian-sources-kernel/arch/arm/boot/dts/imx6q-hummingboard.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6q-hummingboard.dts 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6q-hummingboard.dts 2015-10-11 19:49:25.507431871 +0200 @@ -48,6 +48,10 @@ / { model = "SolidRun HummingBoard Dual/Quad"; @@ -2671,7 +4673,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6q-hummingboard.dts linux-4.1.1 }; &sata { -@@ -57,3 +61,7 @@ +@@ -57,3 +61,11 @@ fsl,transmit-atten-16ths = <9>; fsl,receive-eq-mdB = <3000>; }; @@ -2679,9 +4681,77 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6q-hummingboard.dts linux-4.1.1 +&sgtl5000 { + status = "okay"; +}; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6sl.dtsi linux-4.1.10/arch/arm/boot/dts/imx6sl.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6sl.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6sl.dtsi 2015-10-10 16:41:04.973313893 +0200 ++ ++&rtc { ++ status = "okay"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6q-sbc-fx6.dts xbian-sources-kernel/arch/arm/boot/dts/imx6q-sbc-fx6.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6q-sbc-fx6.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6q-sbc-fx6.dts 2015-10-11 19:49:25.507431871 +0200 +@@ -0,0 +1,23 @@ ++/* ++* Copyright 2014 CompuLab Ltd. ++* ++* Author: Valentin Raevsky <valentin@compulab.co.il> ++* ++* The code contained herein is licensed under the GNU General Public ++* License. You may obtain a copy of the GNU General Public License ++* Version 2 or later at the following locations: ++* ++* http://www.opensource.org/licenses/gpl-license.html ++* http://www.gnu.org/copyleft/gpl.html ++*/ ++ ++/dts-v1/; ++#include "imx6q.dtsi" ++#include "imx6q-cm-fx6.dtsi" ++#include "imx6qdl-sb-fx6x.dtsi" ++#include "imx6qdl-sb-fx6.dtsi" ++ ++/ { ++ model = "CompuLab CM-FX6 on SBC-FX6"; ++ compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6q-sbc-fx6m.dts xbian-sources-kernel/arch/arm/boot/dts/imx6q-sbc-fx6m.dts +--- linux-4.1.10/arch/arm/boot/dts/imx6q-sbc-fx6m.dts 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6q-sbc-fx6m.dts 2015-10-11 19:49:25.507431871 +0200 +@@ -0,0 +1,33 @@ ++/* ++* Copyright 2014 CompuLab Ltd. ++* ++* Author: Valentin Raevsky <valentin@compulab.co.il> ++* ++* The code contained herein is licensed under the GNU General Public ++* License. You may obtain a copy of the GNU General Public License ++* Version 2 or later at the following locations: ++* ++* http://www.opensource.org/licenses/gpl-license.html ++* http://www.gnu.org/copyleft/gpl.html ++*/ ++ ++/dts-v1/; ++#include "imx6q.dtsi" ++#include "imx6q-cm-fx6.dtsi" ++#include "imx6qdl-sb-fx6x.dtsi" ++#include "imx6qdl-sb-fx6m.dtsi" ++ ++/ { ++ model = "CompuLab CM-FX6 on SBC-FX6m"; ++ compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q"; ++ ++ aliases { ++ mmc0 = &usdhc3; ++ }; ++}; ++ ++&hdmi_core { ++ ipu_id = <1>; ++ disp_id = <0>; ++ status = "okay"; ++}; +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6sl.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6sl.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6sl.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6sl.dtsi 2015-10-11 19:49:25.511431606 +0200 @@ -457,20 +457,21 @@ anatop-min-bit-val = <4>; anatop-min-voltage = <800000>; @@ -2732,9 +4802,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6sl.dtsi linux-4.1.10/arch/arm/ fsl,anatop = <&anatop>; }; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6sx.dtsi linux-4.1.10/arch/arm/boot/dts/imx6sx.dtsi ---- linux-4.1.10.orig/arch/arm/boot/dts/imx6sx.dtsi 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/imx6sx.dtsi 2015-10-10 16:41:04.973313893 +0200 +diff -Nur linux-4.1.10/arch/arm/boot/dts/imx6sx.dtsi xbian-sources-kernel/arch/arm/boot/dts/imx6sx.dtsi +--- linux-4.1.10/arch/arm/boot/dts/imx6sx.dtsi 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/imx6sx.dtsi 2015-10-11 19:49:25.511431606 +0200 @@ -556,20 +556,21 @@ anatop-min-bit-val = <4>; anatop-min-voltage = <800000>; @@ -2785,10 +4855,18 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/imx6sx.dtsi linux-4.1.10/arch/arm/ fsl,anatop = <&anatop>; }; -diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/Makefile linux-4.1.10/arch/arm/boot/dts/Makefile ---- linux-4.1.10.orig/arch/arm/boot/dts/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/boot/dts/Makefile 2015-10-10 16:41:04.973313893 +0200 -@@ -264,6 +264,7 @@ +diff -Nur linux-4.1.10/arch/arm/boot/dts/Makefile xbian-sources-kernel/arch/arm/boot/dts/Makefile +--- linux-4.1.10/arch/arm/boot/dts/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/boot/dts/Makefile 2015-10-11 19:49:25.479433727 +0200 +@@ -256,6 +256,7 @@ + dtb-$(CONFIG_SOC_IMX6Q) += \ + imx6dl-aristainetos_4.dtb \ + imx6dl-aristainetos_7.dtb \ ++ imx6dl-cm-fx6.dtb \ + imx6dl-cubox-i.dtb \ + imx6dl-dfi-fs700-m60.dtb \ + imx6dl-gw51xx.dtb \ +@@ -264,6 +265,7 @@ imx6dl-gw54xx.dtb \ imx6dl-gw552x.dtb \ imx6dl-hummingboard.dtb \ @@ -2796,7 +4874,16 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/Makefile linux-4.1.10/arch/arm/boo imx6dl-nitrogen6x.dtb \ imx6dl-phytec-pbab01.dtb \ imx6dl-rex-basic.dtb \ -@@ -290,6 +291,7 @@ +@@ -275,6 +277,8 @@ + imx6dl-tx6u-801x.dtb \ + imx6dl-tx6u-811x.dtb \ + imx6dl-udoo.dtb \ ++ imx6dl-sbc-fx6.dtb \ ++ imx6dl-sbc-fx6m.dtb \ + imx6dl-wandboard.dtb \ + imx6dl-wandboard-revb1.dtb \ + imx6q-arm2.dtb \ +@@ -290,12 +294,20 @@ imx6q-gw54xx.dtb \ imx6q-gw552x.dtb \ imx6q-hummingboard.dtb \ @@ -2804,9 +4891,479 @@ diff -Nur linux-4.1.10.orig/arch/arm/boot/dts/Makefile linux-4.1.10/arch/arm/boo imx6q-nitrogen6x.dtb \ imx6q-phytec-pbab01.dtb \ imx6q-rex-pro.dtb \ -diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_base_defconfig linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_base_defconfig ---- linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_base_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_base_defconfig 2015-10-10 16:41:04.981313892 +0200 + imx6q-sabreauto.dtb \ + imx6q-sabrelite.dtb \ + imx6q-sabresd.dtb \ ++ imx6q-sabresd-ldo.dtb \ ++ imx6q-sabresd-enetirq.dtb \ ++ imx6q-sabresd-uart.dtb \ ++ imx6q-sabresd-hdcp.dtb \ ++ imx6q-sabresd-ldo.dtb \ ++ imx6q-sbc-fx6.dtb \ ++ imx6q-sbc-fx6m.dtb \ + imx6q-sbc6x.dtb \ + imx6q-tbs2910.dtb \ + imx6q-tx6q-1010.dtb \ +@@ -305,7 +317,8 @@ + imx6q-tx6q-1110.dtb \ + imx6q-udoo.dtb \ + imx6q-wandboard.dtb \ +- imx6q-wandboard-revb1.dtb ++ imx6q-wandboard-revb1.dtb \ ++ imx6dl-vero.dtb + dtb-$(CONFIG_SOC_IMX6SL) += \ + imx6sl-evk.dtb \ + imx6sl-warp.dtb +diff -Nur linux-4.1.10/arch/arm/configs/cm_fx6_defconfig xbian-sources-kernel/arch/arm/configs/cm_fx6_defconfig +--- linux-4.1.10/arch/arm/configs/cm_fx6_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/configs/cm_fx6_defconfig 2015-10-11 19:49:25.575427364 +0200 +@@ -0,0 +1,443 @@ ++CONFIG_LOCALVERSION="-cm-fx6" ++CONFIG_KERNEL_LZO=y ++CONFIG_SYSVIPC=y ++CONFIG_NO_HZ=y ++CONFIG_HIGH_RES_TIMERS=y ++CONFIG_IKCONFIG=y ++CONFIG_IKCONFIG_PROC=y ++CONFIG_LOG_BUF_SHIFT=18 ++CONFIG_CGROUPS=y ++CONFIG_RELAY=y ++CONFIG_BLK_DEV_INITRD=y ++CONFIG_EXPERT=y ++CONFIG_PERF_EVENTS=y ++# CONFIG_SLUB_DEBUG is not set ++# CONFIG_COMPAT_BRK is not set ++CONFIG_MODULES=y ++CONFIG_MODULE_UNLOAD=y ++CONFIG_MODVERSIONS=y ++CONFIG_MODULE_SRCVERSION_ALL=y ++# CONFIG_BLK_DEV_BSG is not set ++CONFIG_GPIO_PCA953X=y ++CONFIG_ARCH_MXC=y ++CONFIG_MXC_DEBUG_BOARD=y ++CONFIG_MACH_IMX51_DT=y ++CONFIG_MACH_EUKREA_CPUIMX51SD=y ++CONFIG_SOC_IMX53=y ++CONFIG_SOC_IMX6Q=y ++CONFIG_SOC_IMX6SL=y ++CONFIG_SOC_IMX6SX=y ++CONFIG_SOC_VF610=y ++# CONFIG_SWP_EMULATE is not set ++CONFIG_PCI=y ++CONFIG_PCI_IMX6=y ++CONFIG_SMP=y ++CONFIG_VMSPLIT_2G=y ++CONFIG_PREEMPT=y ++CONFIG_AEABI=y ++CONFIG_HIGHMEM=y ++CONFIG_CMA=y ++CONFIG_CMDLINE="console=ttymxc3,115200 root=/dev/mmcblk0p1 rootwait" ++CONFIG_CPU_FREQ=y ++CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y ++CONFIG_CPU_FREQ_GOV_POWERSAVE=y ++CONFIG_CPU_FREQ_GOV_USERSPACE=y ++CONFIG_CPU_FREQ_GOV_ONDEMAND=y ++CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y ++CONFIG_ARM_IMX6Q_CPUFREQ=y ++CONFIG_CPU_IDLE=y ++CONFIG_VFP=y ++CONFIG_NEON=y ++CONFIG_BINFMT_MISC=m ++CONFIG_PM_RUNTIME=y ++CONFIG_PM_DEBUG=y ++CONFIG_PM_TEST_SUSPEND=y ++CONFIG_NET=y ++CONFIG_PACKET=y ++CONFIG_UNIX=y ++CONFIG_INET=y ++CONFIG_IP_PNP=y ++CONFIG_IP_PNP_DHCP=y ++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set ++# CONFIG_INET_XFRM_MODE_TUNNEL is not set ++# CONFIG_INET_XFRM_MODE_BEET is not set ++# CONFIG_INET_LRO is not set ++CONFIG_IPV6=y ++CONFIG_NETFILTER=y ++CONFIG_NETFILTER_DEBUG=y ++CONFIG_NF_CONNTRACK=m ++CONFIG_NF_CONNTRACK_FTP=m ++CONFIG_NF_CONNTRACK_TFTP=m ++CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m ++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m ++CONFIG_NETFILTER_XT_TARGET_CONNMARK=m ++CONFIG_NETFILTER_XT_TARGET_DSCP=m ++CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m ++CONFIG_NETFILTER_XT_TARGET_LED=m ++CONFIG_NETFILTER_XT_TARGET_MARK=m ++CONFIG_NETFILTER_XT_TARGET_NFLOG=m ++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m ++CONFIG_NETFILTER_XT_TARGET_NOTRACK=m ++CONFIG_NETFILTER_XT_TARGET_TEE=m ++CONFIG_NETFILTER_XT_TARGET_TRACE=m ++CONFIG_NETFILTER_XT_TARGET_TCPMSS=m ++CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m ++CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m ++CONFIG_NETFILTER_XT_MATCH_CLUSTER=m ++CONFIG_NETFILTER_XT_MATCH_COMMENT=m ++CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m ++CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m ++CONFIG_NETFILTER_XT_MATCH_CONNMARK=m ++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m ++CONFIG_NETFILTER_XT_MATCH_CPU=m ++CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m ++CONFIG_NETFILTER_XT_MATCH_DSCP=m ++CONFIG_NETFILTER_XT_MATCH_ESP=m ++CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m ++CONFIG_NETFILTER_XT_MATCH_HELPER=m ++CONFIG_NETFILTER_XT_MATCH_IPRANGE=m ++CONFIG_NETFILTER_XT_MATCH_LENGTH=m ++CONFIG_NETFILTER_XT_MATCH_LIMIT=m ++CONFIG_NETFILTER_XT_MATCH_MAC=m ++CONFIG_NETFILTER_XT_MATCH_MARK=m ++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m ++CONFIG_NETFILTER_XT_MATCH_OSF=m ++CONFIG_NETFILTER_XT_MATCH_OWNER=m ++CONFIG_NETFILTER_XT_MATCH_POLICY=m ++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m ++CONFIG_NETFILTER_XT_MATCH_QUOTA=m ++CONFIG_NETFILTER_XT_MATCH_RATEEST=m ++CONFIG_NETFILTER_XT_MATCH_REALM=m ++CONFIG_NETFILTER_XT_MATCH_RECENT=m ++CONFIG_NETFILTER_XT_MATCH_STATE=m ++CONFIG_NETFILTER_XT_MATCH_STATISTIC=m ++CONFIG_NETFILTER_XT_MATCH_STRING=m ++CONFIG_NETFILTER_XT_MATCH_TCPMSS=m ++CONFIG_NETFILTER_XT_MATCH_TIME=m ++CONFIG_NETFILTER_XT_MATCH_U32=m ++CONFIG_NF_CONNTRACK_IPV4=m ++CONFIG_IP_NF_IPTABLES=y ++CONFIG_IP_NF_MATCH_AH=m ++CONFIG_IP_NF_MATCH_ECN=m ++CONFIG_IP_NF_MATCH_RPFILTER=m ++CONFIG_IP_NF_MATCH_TTL=m ++CONFIG_IP_NF_FILTER=y ++CONFIG_IP_NF_TARGET_REJECT=y ++CONFIG_IP_NF_TARGET_ULOG=m ++CONFIG_NF_NAT_IPV4=m ++CONFIG_IP_NF_TARGET_MASQUERADE=m ++CONFIG_IP_NF_TARGET_NETMAP=m ++CONFIG_IP_NF_TARGET_REDIRECT=m ++CONFIG_IP_NF_MANGLE=m ++CONFIG_IP_NF_TARGET_ECN=m ++CONFIG_IP_NF_TARGET_TTL=m ++CONFIG_IP_NF_RAW=m ++CONFIG_IP_NF_ARPTABLES=m ++CONFIG_IP_NF_ARPFILTER=m ++CONFIG_IP_NF_ARP_MANGLE=m ++CONFIG_VLAN_8021Q=m ++CONFIG_VLAN_8021Q_GVRP=y ++CONFIG_CAN=y ++CONFIG_CAN_FLEXCAN=y ++CONFIG_BT=m ++CONFIG_BT_MRVL=m ++CONFIG_BT_MRVL_SDIO=m ++CONFIG_CFG80211=y ++CONFIG_CFG80211_WEXT=y ++CONFIG_MAC80211=y ++CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y ++# CONFIG_STANDALONE is not set ++CONFIG_IMX_WEIM=y ++CONFIG_CONNECTOR=y ++CONFIG_MTD=y ++CONFIG_MTD_CMDLINE_PARTS=y ++CONFIG_MTD_BLOCK=y ++CONFIG_MTD_CFI=y ++CONFIG_MTD_JEDECPROBE=y ++CONFIG_MTD_CFI_INTELEXT=y ++CONFIG_MTD_CFI_AMDSTD=y ++CONFIG_MTD_CFI_STAA=y ++CONFIG_MTD_PHYSMAP_OF=y ++CONFIG_MTD_DATAFLASH=y ++CONFIG_MTD_SST25L=y ++CONFIG_MTD_NAND=y ++CONFIG_MTD_NAND_GPMI_NAND=y ++CONFIG_MTD_NAND_MXC=y ++CONFIG_MTD_UBI=y ++CONFIG_BLK_DEV_LOOP=y ++CONFIG_BLK_DEV_RAM=y ++CONFIG_BLK_DEV_RAM_SIZE=65536 ++CONFIG_EEPROM_AT24=y ++CONFIG_EEPROM_AT25=y ++# CONFIG_SCSI_PROC_FS is not set ++CONFIG_BLK_DEV_SD=y ++CONFIG_SCSI_MULTI_LUN=y ++CONFIG_SCSI_CONSTANTS=y ++CONFIG_SCSI_LOGGING=y ++CONFIG_SCSI_SCAN_ASYNC=y ++# CONFIG_SCSI_LOWLEVEL is not set ++CONFIG_ATA=y ++CONFIG_SATA_AHCI=y ++CONFIG_SATA_AHCI_PLATFORM=y ++CONFIG_AHCI_IMX=y ++CONFIG_PATA_IMX=y ++CONFIG_NETDEVICES=y ++CONFIG_TUN=m ++# CONFIG_NET_VENDOR_BROADCOM is not set ++CONFIG_CS89x0=y ++CONFIG_CS89x0_PLATFORM=y ++# CONFIG_NET_VENDOR_FARADAY is not set ++CONFIG_IGB=m ++# CONFIG_NET_VENDOR_MARVELL is not set ++# CONFIG_NET_VENDOR_MICREL is not set ++# CONFIG_NET_VENDOR_MICROCHIP is not set ++# CONFIG_NET_VENDOR_NATSEMI is not set ++# CONFIG_NET_VENDOR_SEEQ is not set ++CONFIG_SMC91X=y ++CONFIG_SMC911X=y ++CONFIG_SMSC911X=y ++# CONFIG_NET_VENDOR_STMICRO is not set ++CONFIG_ATH_CARDS=y ++CONFIG_ATH6KL=m ++CONFIG_ATH6KL_SDIO=m ++CONFIG_MWIFIEX=m ++CONFIG_MWIFIEX_SDIO=m ++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set ++CONFIG_INPUT_EVDEV=y ++CONFIG_INPUT_EVBUG=m ++CONFIG_KEYBOARD_GPIO=y ++CONFIG_KEYBOARD_IMX=y ++CONFIG_MOUSE_PS2=m ++CONFIG_MOUSE_PS2_ELANTECH=y ++CONFIG_INPUT_TOUCHSCREEN=y ++CONFIG_TOUCHSCREEN_EGALAX=y ++CONFIG_TOUCHSCREEN_ELAN=y ++CONFIG_TOUCHSCREEN_MAX11801=y ++CONFIG_TOUCHSCREEN_MC13783=y ++CONFIG_INPUT_MISC=y ++CONFIG_INPUT_MMA8450=y ++CONFIG_INPUT_ISL29023=y ++CONFIG_SERIO_SERPORT=m ++# CONFIG_LEGACY_PTYS is not set ++# CONFIG_DEVKMEM is not set ++CONFIG_SERIAL_IMX=y ++CONFIG_SERIAL_IMX_CONSOLE=y ++CONFIG_SERIAL_FSL_LPUART=y ++CONFIG_SERIAL_FSL_LPUART_CONSOLE=y ++CONFIG_FSL_OTP=y ++# CONFIG_I2C_COMPAT is not set ++CONFIG_I2C_CHARDEV=y ++CONFIG_I2C_MUX_GPIO=y ++CONFIG_I2C_MUX_PCA954x=y ++# CONFIG_I2C_HELPER_AUTO is not set ++CONFIG_I2C_ALGOPCF=m ++CONFIG_I2C_ALGOPCA=m ++CONFIG_I2C_IMX=y ++CONFIG_SPI=y ++CONFIG_SPI_IMX=y ++CONFIG_GPIO_SYSFS=y ++CONFIG_POWER_SUPPLY=y ++CONFIG_SABRESD_MAX8903=y ++CONFIG_IMX6_USB_CHARGER=y ++CONFIG_SENSORS_MAX17135=y ++CONFIG_SENSORS_MAG3110=y ++CONFIG_THERMAL=y ++CONFIG_CPU_THERMAL=y ++CONFIG_IMX_THERMAL=y ++CONFIG_DEVICE_THERMAL=y ++CONFIG_WATCHDOG=y ++CONFIG_IMX2_WDT=y ++CONFIG_MFD_DA9052_I2C=y ++CONFIG_MFD_MC13XXX_SPI=y ++CONFIG_MFD_MC13XXX_I2C=y ++CONFIG_MFD_MAX17135=y ++CONFIG_MFD_SI476X_CORE=y ++CONFIG_REGULATOR=y ++CONFIG_REGULATOR_FIXED_VOLTAGE=y ++CONFIG_REGULATOR_ANATOP=y ++CONFIG_REGULATOR_DA9052=y ++CONFIG_REGULATOR_MAX17135=y ++CONFIG_REGULATOR_MC13783=y ++CONFIG_REGULATOR_MC13892=y ++CONFIG_REGULATOR_PFUZE100=y ++CONFIG_MEDIA_SUPPORT=y ++CONFIG_MEDIA_CAMERA_SUPPORT=y ++CONFIG_MEDIA_RADIO_SUPPORT=y ++CONFIG_MEDIA_USB_SUPPORT=y ++CONFIG_USB_VIDEO_CLASS=m ++CONFIG_V4L_PLATFORM_DRIVERS=y ++CONFIG_VIDEO_MXC_OUTPUT=y ++CONFIG_VIDEO_MXC_CAPTURE=m ++CONFIG_MXC_CAMERA_OV5640=m ++CONFIG_MXC_CAMERA_OV5642=m ++CONFIG_MXC_CAMERA_OV5640_MIPI=m ++CONFIG_MXC_TVIN_ADV7180=m ++CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m ++CONFIG_VIDEO_MXC_IPU_OUTPUT=y ++CONFIG_VIDEO_MXC_PXP_V4L2=y ++CONFIG_VIDEO_MXC_CSI_CAMERA=m ++CONFIG_SOC_CAMERA=y ++CONFIG_VIDEO_MX3=y ++CONFIG_RADIO_SI476X=y ++CONFIG_SOC_CAMERA_OV2640=y ++CONFIG_DRM=y ++CONFIG_DRM_VIVANTE=y ++CONFIG_FB_MXS=y ++CONFIG_BACKLIGHT_LCD_SUPPORT=y ++CONFIG_LCD_CLASS_DEVICE=y ++CONFIG_LCD_L4F00242T03=y ++CONFIG_LCD_PLATFORM=y ++CONFIG_BACKLIGHT_CLASS_DEVICE=y ++CONFIG_BACKLIGHT_PWM=y ++CONFIG_FB_MXC_SYNC_PANEL=y ++CONFIG_FB_MXC_LDB=y ++CONFIG_FB_MXC_MIPI_DSI=y ++CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y ++CONFIG_FB_MXC_HDMI=y ++CONFIG_FB_MXC_EINK_PANEL=y ++CONFIG_FB_MXS_SII902X=y ++CONFIG_HANNSTAR_CABC=y ++CONFIG_FRAMEBUFFER_CONSOLE=y ++CONFIG_LOGO=y ++CONFIG_SOUND=y ++CONFIG_SND=y ++CONFIG_SND_USB_AUDIO=m ++CONFIG_SND_SOC=y ++CONFIG_SND_SOC_FSL_ASRC=y ++CONFIG_SND_SOC_FSL_SAI=y ++CONFIG_SND_SOC_FSL_SSI=y ++CONFIG_SND_SOC_FSL_ESAI=y ++CONFIG_SND_SOC_IMX_AUDMUX=y ++CONFIG_SND_IMX_SOC=y ++CONFIG_SND_SOC_IMX_SPDIF=y ++CONFIG_SND_SOC_IMX_HDMI=y ++CONFIG_SND_SOC_CS42XX8_I2C=y ++CONFIG_USB=y ++CONFIG_USB_OTG=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_MXC=y ++CONFIG_USB_EHCI_HCD_PLATFORM=y ++CONFIG_USB_STORAGE=y ++CONFIG_USB_CHIPIDEA=y ++CONFIG_USB_CHIPIDEA_UDC=y ++CONFIG_USB_CHIPIDEA_HOST=y ++CONFIG_NOP_USB_XCEIV=y ++CONFIG_USB_MXS_PHY=y ++CONFIG_USB_GADGET=y ++CONFIG_USB_FSL_USB2=y ++CONFIG_USB_ZERO=m ++CONFIG_USB_AUDIO=m ++CONFIG_USB_ETH=m ++CONFIG_USB_MASS_STORAGE=m ++CONFIG_USB_G_SERIAL=m ++CONFIG_MMC=y ++CONFIG_MMC_UNSAFE_RESUME=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_PLTFM=y ++CONFIG_MMC_SDHCI_ESDHC_IMX=y ++CONFIG_MXC_IPU=y ++CONFIG_MXC_GPU_VIV=y ++CONFIG_MXC_MIPI_CSI2=y ++CONFIG_MXC_MLB150=m ++CONFIG_NEW_LEDS=y ++CONFIG_LEDS_CLASS=y ++CONFIG_LEDS_GPIO=y ++CONFIG_LEDS_TRIGGERS=y ++CONFIG_LEDS_TRIGGER_GPIO=y ++CONFIG_RTC_CLASS=y ++CONFIG_RTC_INTF_DEV_UIE_EMUL=y ++CONFIG_RTC_DRV_EM3027=y ++CONFIG_RTC_DRV_MC13XXX=y ++CONFIG_RTC_DRV_MXC=y ++CONFIG_RTC_DRV_SNVS=y ++CONFIG_DMADEVICES=y ++CONFIG_MXC_PXP_V2=y ++CONFIG_IMX_SDMA=y ++CONFIG_MXS_DMA=y ++CONFIG_STAGING=y ++CONFIG_DRM_IMX=y ++CONFIG_DRM_IMX_FB_HELPER=y ++CONFIG_DRM_IMX_PARALLEL_DISPLAY=y ++CONFIG_DRM_IMX_LDB=y ++CONFIG_DRM_IMX_IPUV3_CORE=y ++CONFIG_DRM_IMX_IPUV3=y ++CONFIG_DRM_IMX_HDMI=y ++# CONFIG_IOMMU_SUPPORT is not set ++CONFIG_PWM=y ++CONFIG_PWM_IMX=y ++CONFIG_EXT2_FS=y ++CONFIG_EXT2_FS_XATTR=y ++CONFIG_EXT2_FS_POSIX_ACL=y ++CONFIG_EXT2_FS_SECURITY=y ++CONFIG_EXT3_FS=y ++CONFIG_EXT3_FS_POSIX_ACL=y ++CONFIG_EXT3_FS_SECURITY=y ++CONFIG_EXT4_FS=y ++CONFIG_EXT4_FS_POSIX_ACL=y ++CONFIG_EXT4_FS_SECURITY=y ++CONFIG_QUOTA=y ++CONFIG_QUOTA_NETLINK_INTERFACE=y ++# CONFIG_PRINT_QUOTA_WARNING is not set ++CONFIG_AUTOFS4_FS=y ++CONFIG_FUSE_FS=y ++CONFIG_ISO9660_FS=m ++CONFIG_JOLIET=y ++CONFIG_ZISOFS=y ++CONFIG_UDF_FS=m ++CONFIG_MSDOS_FS=m ++CONFIG_VFAT_FS=y ++CONFIG_TMPFS=y ++CONFIG_JFFS2_FS=y ++CONFIG_UBIFS_FS=y ++CONFIG_NFS_FS=y ++CONFIG_NFS_V3_ACL=y ++CONFIG_NFS_V4=y ++CONFIG_ROOT_NFS=y ++CONFIG_NLS_DEFAULT="cp437" ++CONFIG_NLS_CODEPAGE_437=y ++CONFIG_NLS_ASCII=y ++CONFIG_NLS_ISO8859_1=y ++CONFIG_NLS_ISO8859_15=m ++CONFIG_NLS_UTF8=y ++CONFIG_MAGIC_SYSRQ=y ++# CONFIG_SCHED_DEBUG is not set ++# CONFIG_DEBUG_BUGVERBOSE is not set ++# CONFIG_FTRACE is not set ++CONFIG_SECURITYFS=y ++CONFIG_CRYPTO_USER=y ++CONFIG_CRYPTO_TEST=m ++CONFIG_CRYPTO_GCM=y ++CONFIG_CRYPTO_CBC=y ++CONFIG_CRYPTO_CTS=y ++CONFIG_CRYPTO_ECB=y ++CONFIG_CRYPTO_LRW=y ++CONFIG_CRYPTO_XTS=y ++CONFIG_CRYPTO_MD4=y ++CONFIG_CRYPTO_MD5=y ++CONFIG_CRYPTO_MICHAEL_MIC=y ++CONFIG_CRYPTO_RMD128=y ++CONFIG_CRYPTO_RMD160=y ++CONFIG_CRYPTO_RMD256=y ++CONFIG_CRYPTO_RMD320=y ++CONFIG_CRYPTO_SHA1=y ++CONFIG_CRYPTO_SHA256=y ++CONFIG_CRYPTO_SHA512=y ++CONFIG_CRYPTO_TGR192=y ++CONFIG_CRYPTO_WP512=y ++CONFIG_CRYPTO_BLOWFISH=y ++CONFIG_CRYPTO_CAMELLIA=y ++CONFIG_CRYPTO_DES=y ++CONFIG_CRYPTO_TWOFISH=y ++# CONFIG_CRYPTO_ANSI_CPRNG is not set ++CONFIG_CRYPTO_DEV_FSL_CAAM=y ++CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y ++CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y ++CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y ++CONFIG_CRC_CCITT=m ++CONFIG_CRC_T10DIF=y ++CONFIG_CRC7=m ++CONFIG_LIBCRC32C=m ++CONFIG_FONTS=y ++CONFIG_FONT_8x8=y ++CONFIG_FONT_8x16=y +diff -Nur linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_base_defconfig xbian-sources-kernel/arch/arm/configs/imx_v7_cbi_hb_base_defconfig +--- linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_base_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/configs/imx_v7_cbi_hb_base_defconfig 2015-10-11 19:49:25.579427099 +0200 @@ -0,0 +1,367 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_LZO=y @@ -3175,9 +5732,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_base_defconfig linux- +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_IR_GPIO_CIR=m -diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_defconfig linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_defconfig ---- linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_defconfig 2015-10-10 16:41:04.985313893 +0200 +diff -Nur linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_defconfig xbian-sources-kernel/arch/arm/configs/imx_v7_cbi_hb_defconfig +--- linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/configs/imx_v7_cbi_hb_defconfig 2015-10-11 19:49:25.579427099 +0200 @@ -0,0 +1,5139 @@ +# +# Automatically generated make config: don't edit @@ -8318,9 +10875,6259 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_defconfig linux-4.1.1 +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_PROC_DEVICETREE=y + -diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_defconfig linux-4.1.10/arch/arm/configs/imx_v7_defconfig ---- linux-4.1.10.orig/arch/arm/configs/imx_v7_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/configs/imx_v7_defconfig 2015-10-10 16:41:04.985313893 +0200 +diff -Nur linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_xbian_defconfig xbian-sources-kernel/arch/arm/configs/imx_v7_cbi_hb_xbian_defconfig +--- linux-4.1.10/arch/arm/configs/imx_v7_cbi_hb_xbian_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/configs/imx_v7_cbi_hb_xbian_defconfig 2015-10-11 19:49:25.579427099 +0200 +@@ -0,0 +1,6246 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# Linux/arm 4.1.7 Kernel Configuration ++# ++CONFIG_ARM=y ++CONFIG_ARM_HAS_SG_CHAIN=y ++CONFIG_MIGHT_HAVE_PCI=y ++CONFIG_SYS_SUPPORTS_APM_EMULATION=y ++CONFIG_HAVE_PROC_CPU=y ++CONFIG_STACKTRACE_SUPPORT=y ++CONFIG_LOCKDEP_SUPPORT=y ++CONFIG_TRACE_IRQFLAGS_SUPPORT=y ++CONFIG_RWSEM_XCHGADD_ALGORITHM=y ++CONFIG_GENERIC_HWEIGHT=y ++CONFIG_GENERIC_CALIBRATE_DELAY=y ++CONFIG_ZONE_DMA=y ++CONFIG_NEED_DMA_MAP_STATE=y ++CONFIG_ARCH_SUPPORTS_UPROBES=y ++CONFIG_VECTORS_BASE=0xffff0000 ++CONFIG_ARM_PATCH_PHYS_VIRT=y ++CONFIG_GENERIC_BUG=y ++CONFIG_PGTABLE_LEVELS=2 ++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" ++CONFIG_IRQ_WORK=y ++CONFIG_BUILDTIME_EXTABLE_SORT=y ++ ++# ++# General setup ++# ++CONFIG_INIT_ENV_ARG_LIMIT=32 ++CONFIG_CROSS_COMPILE="" ++# CONFIG_COMPILE_TEST is not set ++CONFIG_LOCALVERSION="" ++# CONFIG_LOCALVERSION_AUTO is not set ++CONFIG_HAVE_KERNEL_GZIP=y ++CONFIG_HAVE_KERNEL_LZMA=y ++CONFIG_HAVE_KERNEL_XZ=y ++CONFIG_HAVE_KERNEL_LZO=y ++CONFIG_HAVE_KERNEL_LZ4=y ++CONFIG_KERNEL_GZIP=y ++# CONFIG_KERNEL_LZMA is not set ++# CONFIG_KERNEL_XZ is not set ++# CONFIG_KERNEL_LZO is not set ++# CONFIG_KERNEL_LZ4 is not set ++CONFIG_DEFAULT_HOSTNAME="(none)" ++CONFIG_SWAP=y ++CONFIG_SYSVIPC=y ++CONFIG_SYSVIPC_SYSCTL=y ++CONFIG_POSIX_MQUEUE=y ++CONFIG_POSIX_MQUEUE_SYSCTL=y ++CONFIG_CROSS_MEMORY_ATTACH=y ++CONFIG_FHANDLE=y ++CONFIG_USELIB=y ++CONFIG_AUDIT=y ++CONFIG_HAVE_ARCH_AUDITSYSCALL=y ++CONFIG_AUDITSYSCALL=y ++CONFIG_AUDIT_WATCH=y ++CONFIG_AUDIT_TREE=y ++ ++# ++# IRQ subsystem ++# ++CONFIG_GENERIC_IRQ_PROBE=y ++CONFIG_GENERIC_IRQ_SHOW=y ++CONFIG_GENERIC_IRQ_SHOW_LEVEL=y ++CONFIG_HARDIRQS_SW_RESEND=y ++CONFIG_GENERIC_IRQ_CHIP=y ++CONFIG_IRQ_DOMAIN=y ++CONFIG_IRQ_DOMAIN_HIERARCHY=y ++CONFIG_HANDLE_DOMAIN_IRQ=y ++# CONFIG_IRQ_DOMAIN_DEBUG is not set ++CONFIG_IRQ_FORCED_THREADING=y ++CONFIG_SPARSE_IRQ=y ++CONFIG_GENERIC_TIME_VSYSCALL=y ++CONFIG_GENERIC_CLOCKEVENTS=y ++CONFIG_ARCH_HAS_TICK_BROADCAST=y ++CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y ++ ++# ++# Timers subsystem ++# ++CONFIG_TICK_ONESHOT=y ++CONFIG_NO_HZ_COMMON=y ++# CONFIG_HZ_PERIODIC is not set ++CONFIG_NO_HZ_IDLE=y ++# CONFIG_NO_HZ_FULL is not set ++# CONFIG_NO_HZ is not set ++CONFIG_HIGH_RES_TIMERS=y ++ ++# ++# CPU/Task time and stats accounting ++# ++# CONFIG_TICK_CPU_ACCOUNTING is not set ++# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set ++CONFIG_IRQ_TIME_ACCOUNTING=y ++CONFIG_BSD_PROCESS_ACCT=y ++CONFIG_BSD_PROCESS_ACCT_V3=y ++# CONFIG_TASKSTATS is not set ++ ++# ++# RCU Subsystem ++# ++CONFIG_TREE_RCU=y ++CONFIG_SRCU=y ++# CONFIG_TASKS_RCU is not set ++CONFIG_RCU_STALL_COMMON=y ++# CONFIG_RCU_USER_QS is not set ++CONFIG_RCU_FANOUT=32 ++CONFIG_RCU_FANOUT_LEAF=16 ++# CONFIG_RCU_FANOUT_EXACT is not set ++# CONFIG_RCU_FAST_NO_HZ is not set ++# CONFIG_TREE_RCU_TRACE is not set ++CONFIG_RCU_KTHREAD_PRIO=0 ++# CONFIG_RCU_NOCB_CPU is not set ++# CONFIG_RCU_EXPEDITE_BOOT is not set ++CONFIG_BUILD_BIN2C=y ++CONFIG_IKCONFIG=y ++CONFIG_IKCONFIG_PROC=y ++CONFIG_LOG_BUF_SHIFT=21 ++CONFIG_LOG_CPU_MAX_BUF_SHIFT=13 ++CONFIG_GENERIC_SCHED_CLOCK=y ++CONFIG_CGROUPS=y ++# CONFIG_CGROUP_DEBUG is not set ++# CONFIG_CGROUP_FREEZER is not set ++CONFIG_CGROUP_DEVICE=y ++# CONFIG_CPUSETS is not set ++# CONFIG_CGROUP_CPUACCT is not set ++CONFIG_PAGE_COUNTER=y ++CONFIG_MEMCG=y ++CONFIG_MEMCG_SWAP=y ++# CONFIG_MEMCG_SWAP_ENABLED is not set ++CONFIG_MEMCG_KMEM=y ++# CONFIG_CGROUP_PERF is not set ++# CONFIG_CGROUP_SCHED is not set ++# CONFIG_BLK_CGROUP is not set ++# CONFIG_CHECKPOINT_RESTORE is not set ++CONFIG_NAMESPACES=y ++CONFIG_UTS_NS=y ++CONFIG_IPC_NS=y ++CONFIG_USER_NS=y ++CONFIG_PID_NS=y ++CONFIG_NET_NS=y ++# CONFIG_SCHED_AUTOGROUP is not set ++# CONFIG_SYSFS_DEPRECATED is not set ++CONFIG_RELAY=y ++CONFIG_BLK_DEV_INITRD=y ++CONFIG_INITRAMFS_SOURCE="" ++CONFIG_RD_GZIP=y ++# CONFIG_RD_BZIP2 is not set ++# CONFIG_RD_LZMA is not set ++# CONFIG_RD_XZ is not set ++CONFIG_RD_LZO=y ++CONFIG_RD_LZ4=y ++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set ++CONFIG_SYSCTL=y ++CONFIG_ANON_INODES=y ++CONFIG_HAVE_UID16=y ++CONFIG_BPF=y ++CONFIG_EXPERT=y ++# CONFIG_UID16 is not set ++CONFIG_MULTIUSER=y ++CONFIG_SGETMASK_SYSCALL=y ++CONFIG_SYSFS_SYSCALL=y ++CONFIG_SYSCTL_SYSCALL=y ++CONFIG_KALLSYMS=y ++CONFIG_KALLSYMS_ALL=y ++CONFIG_PRINTK=y ++CONFIG_BUG=y ++CONFIG_ELF_CORE=y ++CONFIG_BASE_FULL=y ++CONFIG_FUTEX=y ++CONFIG_EPOLL=y ++CONFIG_SIGNALFD=y ++CONFIG_TIMERFD=y ++CONFIG_EVENTFD=y ++# CONFIG_BPF_SYSCALL is not set ++CONFIG_SHMEM=y ++CONFIG_AIO=y ++CONFIG_ADVISE_SYSCALLS=y ++CONFIG_PCI_QUIRKS=y ++# CONFIG_EMBEDDED is not set ++CONFIG_HAVE_PERF_EVENTS=y ++CONFIG_PERF_USE_VMALLOC=y ++ ++# ++# Kernel Performance Events And Counters ++# ++CONFIG_PERF_EVENTS=y ++# CONFIG_DEBUG_PERF_USE_VMALLOC is not set ++CONFIG_VM_EVENT_COUNTERS=y ++# CONFIG_SLUB_DEBUG is not set ++# CONFIG_COMPAT_BRK is not set ++# CONFIG_SLAB is not set ++CONFIG_SLUB=y ++# CONFIG_SLOB is not set ++# CONFIG_SLUB_CPU_PARTIAL is not set ++# CONFIG_SYSTEM_TRUSTED_KEYRING is not set ++# CONFIG_PROFILING is not set ++CONFIG_HAVE_OPROFILE=y ++# CONFIG_KPROBES is not set ++# CONFIG_JUMP_LABEL is not set ++# CONFIG_UPROBES is not set ++# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set ++CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y ++CONFIG_ARCH_USE_BUILTIN_BSWAP=y ++CONFIG_HAVE_KPROBES=y ++CONFIG_HAVE_KRETPROBES=y ++CONFIG_HAVE_ARCH_TRACEHOOK=y ++CONFIG_HAVE_DMA_ATTRS=y ++CONFIG_HAVE_DMA_CONTIGUOUS=y ++CONFIG_GENERIC_SMP_IDLE_THREAD=y ++CONFIG_GENERIC_IDLE_POLL_SETUP=y ++CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y ++CONFIG_HAVE_CLK=y ++CONFIG_HAVE_DMA_API_DEBUG=y ++CONFIG_HAVE_HW_BREAKPOINT=y ++CONFIG_HAVE_PERF_REGS=y ++CONFIG_HAVE_PERF_USER_STACK_DUMP=y ++CONFIG_HAVE_ARCH_JUMP_LABEL=y ++CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y ++CONFIG_HAVE_ARCH_SECCOMP_FILTER=y ++CONFIG_HAVE_CC_STACKPROTECTOR=y ++CONFIG_CC_STACKPROTECTOR=y ++# CONFIG_CC_STACKPROTECTOR_NONE is not set ++CONFIG_CC_STACKPROTECTOR_REGULAR=y ++# CONFIG_CC_STACKPROTECTOR_STRONG is not set ++CONFIG_HAVE_CONTEXT_TRACKING=y ++CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y ++CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y ++CONFIG_HAVE_MOD_ARCH_SPECIFIC=y ++CONFIG_MODULES_USE_ELF_REL=y ++CONFIG_ARCH_HAS_ELF_RANDOMIZE=y ++CONFIG_CLONE_BACKWARDS=y ++CONFIG_OLD_SIGSUSPEND3=y ++CONFIG_OLD_SIGACTION=y ++ ++# ++# GCOV-based kernel profiling ++# ++# CONFIG_GCOV_KERNEL is not set ++CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y ++CONFIG_HAVE_GENERIC_DMA_COHERENT=y ++CONFIG_RT_MUTEXES=y ++CONFIG_BASE_SMALL=0 ++CONFIG_MODULES=y ++# CONFIG_MODULE_FORCE_LOAD is not set ++CONFIG_MODULE_UNLOAD=y ++# CONFIG_MODULE_FORCE_UNLOAD is not set ++CONFIG_MODVERSIONS=y ++CONFIG_MODULE_SRCVERSION_ALL=y ++# CONFIG_MODULE_SIG is not set ++# CONFIG_MODULE_COMPRESS is not set ++CONFIG_STOP_MACHINE=y ++CONFIG_BLOCK=y ++CONFIG_LBDAF=y ++CONFIG_BLK_DEV_BSG=y ++CONFIG_BLK_DEV_BSGLIB=y ++# CONFIG_BLK_DEV_INTEGRITY is not set ++# CONFIG_BLK_CMDLINE_PARSER is not set ++ ++# ++# Partition Types ++# ++CONFIG_PARTITION_ADVANCED=y ++# CONFIG_ACORN_PARTITION is not set ++# CONFIG_AIX_PARTITION is not set ++# CONFIG_OSF_PARTITION is not set ++# CONFIG_AMIGA_PARTITION is not set ++# CONFIG_ATARI_PARTITION is not set ++CONFIG_MAC_PARTITION=y ++CONFIG_MSDOS_PARTITION=y ++CONFIG_BSD_DISKLABEL=y ++CONFIG_MINIX_SUBPARTITION=y ++CONFIG_SOLARIS_X86_PARTITION=y ++CONFIG_UNIXWARE_DISKLABEL=y ++CONFIG_LDM_PARTITION=y ++# CONFIG_LDM_DEBUG is not set ++# CONFIG_SGI_PARTITION is not set ++# CONFIG_ULTRIX_PARTITION is not set ++CONFIG_SUN_PARTITION=y ++CONFIG_KARMA_PARTITION=y ++CONFIG_EFI_PARTITION=y ++# CONFIG_SYSV68_PARTITION is not set ++# CONFIG_CMDLINE_PARTITION is not set ++ ++# ++# IO Schedulers ++# ++CONFIG_IOSCHED_NOOP=y ++CONFIG_IOSCHED_DEADLINE=y ++CONFIG_IOSCHED_CFQ=y ++CONFIG_IOSCHED_BFQ=y ++# CONFIG_CGROUP_BFQIO is not set ++# CONFIG_DEFAULT_DEADLINE is not set ++# CONFIG_DEFAULT_CFQ is not set ++CONFIG_DEFAULT_BFQ=y ++# CONFIG_DEFAULT_NOOP is not set ++CONFIG_DEFAULT_IOSCHED="bfq" ++CONFIG_PADATA=y ++CONFIG_INLINE_SPIN_UNLOCK_IRQ=y ++CONFIG_INLINE_READ_UNLOCK=y ++CONFIG_INLINE_READ_UNLOCK_IRQ=y ++CONFIG_INLINE_WRITE_UNLOCK=y ++CONFIG_INLINE_WRITE_UNLOCK_IRQ=y ++CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y ++CONFIG_MUTEX_SPIN_ON_OWNER=y ++CONFIG_RWSEM_SPIN_ON_OWNER=y ++CONFIG_LOCK_SPIN_ON_OWNER=y ++CONFIG_FREEZER=y ++ ++# ++# System Type ++# ++CONFIG_MMU=y ++CONFIG_ARCH_MULTIPLATFORM=y ++# CONFIG_ARCH_REALVIEW is not set ++# CONFIG_ARCH_VERSATILE is not set ++# CONFIG_ARCH_CLPS711X is not set ++# CONFIG_ARCH_GEMINI is not set ++# CONFIG_ARCH_EBSA110 is not set ++# CONFIG_ARCH_EP93XX is not set ++# CONFIG_ARCH_FOOTBRIDGE is not set ++# CONFIG_ARCH_NETX is not set ++# CONFIG_ARCH_IOP13XX is not set ++# CONFIG_ARCH_IOP32X is not set ++# CONFIG_ARCH_IOP33X is not set ++# CONFIG_ARCH_IXP4XX is not set ++# CONFIG_ARCH_DOVE is not set ++# CONFIG_ARCH_MV78XX0 is not set ++# CONFIG_ARCH_ORION5X is not set ++# CONFIG_ARCH_MMP is not set ++# CONFIG_ARCH_KS8695 is not set ++# CONFIG_ARCH_W90X900 is not set ++# CONFIG_ARCH_LPC32XX is not set ++# CONFIG_ARCH_PXA is not set ++# CONFIG_ARCH_SHMOBILE_LEGACY is not set ++# CONFIG_ARCH_RPC is not set ++# CONFIG_ARCH_SA1100 is not set ++# CONFIG_ARCH_S3C24XX is not set ++# CONFIG_ARCH_S3C64XX is not set ++# CONFIG_ARCH_DAVINCI is not set ++# CONFIG_ARCH_OMAP1 is not set ++ ++# ++# Multiple platform selection ++# ++ ++# ++# CPU Core family selection ++# ++# CONFIG_ARCH_MULTI_V6 is not set ++CONFIG_ARCH_MULTI_V7=y ++CONFIG_ARCH_MULTI_V6_V7=y ++# CONFIG_ARCH_MULTI_CPU_AUTO is not set ++# CONFIG_ARCH_VIRT is not set ++# CONFIG_ARCH_MVEBU is not set ++# CONFIG_ARCH_ALPINE is not set ++# CONFIG_ARCH_AT91 is not set ++# CONFIG_ARCH_BCM is not set ++# CONFIG_ARCH_BERLIN is not set ++# CONFIG_ARCH_DIGICOLOR is not set ++# CONFIG_ARCH_HIGHBANK is not set ++# CONFIG_ARCH_HISI is not set ++# CONFIG_ARCH_KEYSTONE is not set ++# CONFIG_ARCH_MESON is not set ++CONFIG_ARCH_MXC=y ++CONFIG_HAVE_IMX_ANATOP=y ++CONFIG_HAVE_IMX_GPC=y ++CONFIG_HAVE_IMX_MMDC=y ++CONFIG_HAVE_IMX_SRC=y ++ ++# ++# Device tree only ++# ++# CONFIG_SOC_IMX50 is not set ++# CONFIG_SOC_IMX51 is not set ++# CONFIG_SOC_IMX53 is not set ++CONFIG_SOC_IMX6=y ++CONFIG_SOC_IMX6Q=y ++CONFIG_SOC_IMX6SL=y ++# CONFIG_SOC_IMX6SX is not set ++# CONFIG_SOC_VF610 is not set ++# CONFIG_SOC_LS1021A is not set ++# CONFIG_ARCH_MEDIATEK is not set ++ ++# ++# TI OMAP/AM/DM/DRA Family ++# ++# CONFIG_ARCH_OMAP3 is not set ++# CONFIG_ARCH_OMAP4 is not set ++# CONFIG_SOC_OMAP5 is not set ++# CONFIG_SOC_AM33XX is not set ++# CONFIG_SOC_AM43XX is not set ++# CONFIG_SOC_DRA7XX is not set ++# CONFIG_ARCH_QCOM is not set ++# CONFIG_ARCH_ROCKCHIP is not set ++# CONFIG_ARCH_SOCFPGA is not set ++# CONFIG_PLAT_SPEAR is not set ++# CONFIG_ARCH_STI is not set ++# CONFIG_ARCH_S5PV210 is not set ++# CONFIG_ARCH_EXYNOS is not set ++# CONFIG_ARCH_SHMOBILE_MULTI is not set ++# CONFIG_ARCH_SUNXI is not set ++# CONFIG_ARCH_SIRF is not set ++# CONFIG_ARCH_TEGRA is not set ++# CONFIG_ARCH_U8500 is not set ++# CONFIG_ARCH_VEXPRESS is not set ++# CONFIG_ARCH_WM8850 is not set ++# CONFIG_ARCH_ZYNQ is not set ++ ++# ++# Processor Type ++# ++CONFIG_CPU_V7=y ++CONFIG_CPU_32v6K=y ++CONFIG_CPU_32v7=y ++CONFIG_CPU_ABRT_EV7=y ++CONFIG_CPU_PABRT_V7=y ++CONFIG_CPU_CACHE_V7=y ++CONFIG_CPU_CACHE_VIPT=y ++CONFIG_CPU_COPY_V6=y ++CONFIG_CPU_TLB_V7=y ++CONFIG_CPU_HAS_ASID=y ++CONFIG_CPU_CP15=y ++CONFIG_CPU_CP15_MMU=y ++ ++# ++# Processor Features ++# ++# CONFIG_ARM_LPAE is not set ++# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set ++CONFIG_ARM_THUMB=y ++CONFIG_ARM_THUMBEE=y ++CONFIG_ARM_VIRT_EXT=y ++CONFIG_SWP_EMULATE=y ++# CONFIG_CPU_ICACHE_DISABLE is not set ++# CONFIG_CPU_BPREDICT_DISABLE is not set ++CONFIG_KUSER_HELPERS=y ++CONFIG_VDSO=y ++CONFIG_OUTER_CACHE=y ++CONFIG_OUTER_CACHE_SYNC=y ++CONFIG_MIGHT_HAVE_CACHE_L2X0=y ++CONFIG_CACHE_L2X0=y ++# CONFIG_PL310_ERRATA_588369 is not set ++# CONFIG_PL310_ERRATA_727915 is not set ++# CONFIG_PL310_ERRATA_753970 is not set ++CONFIG_PL310_ERRATA_769419=y ++CONFIG_ARM_L1_CACHE_SHIFT_6=y ++CONFIG_ARM_L1_CACHE_SHIFT=6 ++CONFIG_ARM_DMA_MEM_BUFFERABLE=y ++# CONFIG_ARM_KERNMEM_PERMS is not set ++CONFIG_MULTI_IRQ_HANDLER=y ++# CONFIG_ARM_ERRATA_430973 is not set ++# CONFIG_ARM_ERRATA_643719 is not set ++# CONFIG_ARM_ERRATA_720789 is not set ++CONFIG_ARM_ERRATA_754322=y ++# CONFIG_ARM_ERRATA_754327 is not set ++CONFIG_ARM_ERRATA_764369=y ++CONFIG_ARM_ERRATA_775420=y ++# CONFIG_ARM_ERRATA_798181 is not set ++# CONFIG_ARM_ERRATA_773022 is not set ++ ++# ++# Bus support ++# ++CONFIG_PCI=y ++CONFIG_PCI_DOMAINS=y ++CONFIG_PCI_DOMAINS_GENERIC=y ++CONFIG_PCI_SYSCALL=y ++# CONFIG_PCI_MSI is not set ++# CONFIG_PCI_DEBUG is not set ++# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set ++# CONFIG_PCI_STUB is not set ++# CONFIG_PCI_IOV is not set ++# CONFIG_PCI_PRI is not set ++# CONFIG_PCI_PASID is not set ++ ++# ++# PCI host controller drivers ++# ++CONFIG_PCIE_DW=y ++CONFIG_PCI_IMX6=y ++# CONFIG_PCI_HOST_GENERIC is not set ++# CONFIG_PCI_LAYERSCAPE is not set ++# CONFIG_PCIE_IPROC is not set ++CONFIG_PCIEPORTBUS=y ++CONFIG_PCIEAER=y ++# CONFIG_PCIE_ECRC is not set ++# CONFIG_PCIEAER_INJECT is not set ++CONFIG_PCIEASPM=y ++# CONFIG_PCIEASPM_DEBUG is not set ++# CONFIG_PCIEASPM_DEFAULT is not set ++# CONFIG_PCIEASPM_POWERSAVE is not set ++CONFIG_PCIEASPM_PERFORMANCE=y ++CONFIG_PCIE_PME=y ++# CONFIG_PCCARD is not set ++ ++# ++# Kernel Features ++# ++CONFIG_HAVE_SMP=y ++CONFIG_SMP=y ++CONFIG_SMP_ON_UP=y ++CONFIG_ARM_CPU_TOPOLOGY=y ++# CONFIG_SCHED_MC is not set ++# CONFIG_SCHED_SMT is not set ++CONFIG_HAVE_ARM_SCU=y ++# CONFIG_HAVE_ARM_ARCH_TIMER is not set ++CONFIG_HAVE_ARM_TWD=y ++# CONFIG_MCPM is not set ++# CONFIG_BIG_LITTLE is not set ++# CONFIG_VMSPLIT_3G is not set ++CONFIG_VMSPLIT_2G=y ++# CONFIG_VMSPLIT_1G is not set ++CONFIG_PAGE_OFFSET=0x80000000 ++CONFIG_NR_CPUS=4 ++CONFIG_HOTPLUG_CPU=y ++# CONFIG_ARM_PSCI is not set ++CONFIG_ARCH_NR_GPIO=0 ++# CONFIG_PREEMPT_NONE is not set ++CONFIG_PREEMPT_VOLUNTARY=y ++# CONFIG_PREEMPT is not set ++CONFIG_HZ_FIXED=0 ++# CONFIG_HZ_100 is not set ++# CONFIG_HZ_200 is not set ++# CONFIG_HZ_250 is not set ++# CONFIG_HZ_300 is not set ++CONFIG_HZ_500=y ++# CONFIG_HZ_1000 is not set ++CONFIG_HZ=500 ++CONFIG_SCHED_HRTICK=y ++CONFIG_THUMB2_KERNEL=y ++CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11=y ++CONFIG_ARM_ASM_UNIFIED=y ++CONFIG_AEABI=y ++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set ++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set ++CONFIG_HAVE_ARCH_PFN_VALID=y ++CONFIG_HIGHMEM=y ++# CONFIG_HIGHPTE is not set ++CONFIG_HW_PERF_EVENTS=y ++CONFIG_ARCH_WANT_GENERAL_HUGETLB=y ++CONFIG_FLATMEM=y ++CONFIG_FLAT_NODE_MEM_MAP=y ++CONFIG_HAVE_MEMBLOCK=y ++CONFIG_NO_BOOTMEM=y ++CONFIG_MEMORY_ISOLATION=y ++# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set ++CONFIG_PAGEFLAGS_EXTENDED=y ++CONFIG_SPLIT_PTLOCK_CPUS=4 ++CONFIG_COMPACTION=y ++CONFIG_MIGRATION=y ++# CONFIG_PHYS_ADDR_T_64BIT is not set ++CONFIG_ZONE_DMA_FLAG=1 ++CONFIG_BOUNCE=y ++# CONFIG_KSM is not set ++CONFIG_DEFAULT_MMAP_MIN_ADDR=8192 ++CONFIG_CLEANCACHE=y ++CONFIG_FRONTSWAP=y ++CONFIG_CMA=y ++# CONFIG_CMA_DEBUG is not set ++# CONFIG_CMA_DEBUGFS is not set ++CONFIG_CMA_AREAS=7 ++CONFIG_ZSWAP=y ++CONFIG_ZPOOL=y ++CONFIG_ZBUD=y ++# CONFIG_ZSMALLOC is not set ++CONFIG_FORCE_MAX_ZONEORDER=14 ++CONFIG_ALIGNMENT_TRAP=y ++# CONFIG_UACCESS_WITH_MEMCPY is not set ++# CONFIG_SECCOMP is not set ++CONFIG_SWIOTLB=y ++CONFIG_IOMMU_HELPER=y ++# CONFIG_XEN is not set ++ ++# ++# Boot options ++# ++CONFIG_USE_OF=y ++CONFIG_ATAGS=y ++# CONFIG_DEPRECATED_PARAM_STRUCT is not set ++CONFIG_ZBOOT_ROM_TEXT=0 ++CONFIG_ZBOOT_ROM_BSS=0 ++# CONFIG_ARM_APPENDED_DTB is not set ++CONFIG_CMDLINE="console=ttymxc0,115200" ++# CONFIG_CMDLINE_FROM_BOOTLOADER is not set ++CONFIG_CMDLINE_EXTEND=y ++# CONFIG_CMDLINE_FORCE is not set ++CONFIG_KEXEC=y ++# CONFIG_ATAGS_PROC is not set ++# CONFIG_CRASH_DUMP is not set ++CONFIG_AUTO_ZRELADDR=y ++ ++# ++# CPU Power Management ++# ++ ++# ++# CPU Frequency scaling ++# ++CONFIG_CPU_FREQ=y ++CONFIG_CPU_FREQ_GOV_COMMON=y ++CONFIG_CPU_FREQ_STAT=y ++CONFIG_CPU_FREQ_STAT_DETAILS=y ++CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y ++# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set ++# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set ++# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set ++# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set ++CONFIG_CPU_FREQ_GOV_PERFORMANCE=y ++CONFIG_CPU_FREQ_GOV_POWERSAVE=y ++CONFIG_CPU_FREQ_GOV_USERSPACE=y ++CONFIG_CPU_FREQ_GOV_ONDEMAND=y ++CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y ++ ++# ++# CPU frequency scaling drivers ++# ++# CONFIG_CPUFREQ_DT is not set ++CONFIG_ARM_IMX6Q_CPUFREQ=y ++# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set ++# CONFIG_QORIQ_CPUFREQ is not set ++ ++# ++# CPU Idle ++# ++CONFIG_CPU_IDLE=y ++CONFIG_CPU_IDLE_GOV_LADDER=y ++CONFIG_CPU_IDLE_GOV_MENU=y ++CONFIG_DT_IDLE_STATES=y ++ ++# ++# ARM CPU Idle Drivers ++# ++CONFIG_ARM_CPUIDLE=y ++# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set ++ ++# ++# Floating point emulation ++# ++ ++# ++# At least one emulation must be selected ++# ++CONFIG_VFP=y ++CONFIG_VFPv3=y ++CONFIG_NEON=y ++CONFIG_KERNEL_MODE_NEON=y ++ ++# ++# Userspace binary formats ++# ++CONFIG_BINFMT_ELF=y ++CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y ++CONFIG_BINFMT_SCRIPT=y ++# CONFIG_HAVE_AOUT is not set ++CONFIG_BINFMT_MISC=m ++CONFIG_COREDUMP=y ++ ++# ++# Power management options ++# ++CONFIG_SUSPEND=y ++CONFIG_SUSPEND_FREEZER=y ++# CONFIG_HIBERNATION is not set ++CONFIG_PM_SLEEP=y ++CONFIG_PM_SLEEP_SMP=y ++# CONFIG_PM_AUTOSLEEP is not set ++CONFIG_PM_WAKELOCKS=y ++CONFIG_PM_WAKELOCKS_LIMIT=0 ++CONFIG_PM_WAKELOCKS_GC=y ++CONFIG_PM=y ++CONFIG_PM_DEBUG=y ++CONFIG_PM_ADVANCED_DEBUG=y ++# CONFIG_PM_TEST_SUSPEND is not set ++CONFIG_PM_SLEEP_DEBUG=y ++# CONFIG_APM_EMULATION is not set ++CONFIG_PM_OPP=y ++CONFIG_PM_CLK=y ++CONFIG_PM_GENERIC_DOMAINS=y ++# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set ++CONFIG_PM_GENERIC_DOMAINS_SLEEP=y ++CONFIG_PM_GENERIC_DOMAINS_OF=y ++CONFIG_CPU_PM=y ++CONFIG_ARCH_SUSPEND_POSSIBLE=y ++CONFIG_ARM_CPU_SUSPEND=y ++CONFIG_ARCH_HIBERNATION_POSSIBLE=y ++CONFIG_NET=y ++ ++# ++# Networking options ++# ++CONFIG_PACKET=y ++CONFIG_PACKET_DIAG=y ++CONFIG_UNIX=y ++CONFIG_UNIX_DIAG=y ++CONFIG_XFRM=y ++CONFIG_XFRM_ALGO=y ++CONFIG_XFRM_USER=y ++CONFIG_XFRM_SUB_POLICY=y ++CONFIG_XFRM_MIGRATE=y ++CONFIG_XFRM_STATISTICS=y ++CONFIG_XFRM_IPCOMP=m ++CONFIG_NET_KEY=y ++CONFIG_NET_KEY_MIGRATE=y ++CONFIG_INET=y ++CONFIG_IP_MULTICAST=y ++CONFIG_IP_ADVANCED_ROUTER=y ++# CONFIG_IP_FIB_TRIE_STATS is not set ++CONFIG_IP_MULTIPLE_TABLES=y ++CONFIG_IP_ROUTE_MULTIPATH=y ++CONFIG_IP_ROUTE_VERBOSE=y ++CONFIG_IP_ROUTE_CLASSID=y ++CONFIG_IP_PNP=y ++CONFIG_IP_PNP_DHCP=y ++CONFIG_IP_PNP_BOOTP=y ++# CONFIG_IP_PNP_RARP is not set ++CONFIG_NET_IPIP=m ++# CONFIG_NET_IPGRE_DEMUX is not set ++CONFIG_NET_IP_TUNNEL=m ++CONFIG_IP_MROUTE=y ++# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set ++# CONFIG_IP_PIMSM_V1 is not set ++# CONFIG_IP_PIMSM_V2 is not set ++CONFIG_SYN_COOKIES=y ++CONFIG_NET_IPVTI=m ++CONFIG_NET_UDP_TUNNEL=m ++# CONFIG_NET_FOU is not set ++# CONFIG_NET_FOU_IP_TUNNELS is not set ++# CONFIG_GENEVE is not set ++CONFIG_INET_AH=m ++CONFIG_INET_ESP=m ++CONFIG_INET_IPCOMP=m ++CONFIG_INET_XFRM_TUNNEL=m ++CONFIG_INET_TUNNEL=m ++CONFIG_INET_XFRM_MODE_TRANSPORT=m ++CONFIG_INET_XFRM_MODE_TUNNEL=m ++CONFIG_INET_XFRM_MODE_BEET=m ++CONFIG_INET_LRO=m ++CONFIG_INET_DIAG=y ++CONFIG_INET_TCP_DIAG=y ++CONFIG_INET_UDP_DIAG=m ++CONFIG_TCP_CONG_ADVANCED=y ++CONFIG_TCP_CONG_BIC=m ++CONFIG_TCP_CONG_CUBIC=m ++CONFIG_TCP_CONG_WESTWOOD=m ++CONFIG_TCP_CONG_HTCP=m ++CONFIG_TCP_CONG_HSTCP=m ++CONFIG_TCP_CONG_HYBLA=m ++CONFIG_TCP_CONG_VEGAS=y ++CONFIG_TCP_CONG_SCALABLE=m ++CONFIG_TCP_CONG_LP=m ++CONFIG_TCP_CONG_VENO=m ++CONFIG_TCP_CONG_YEAH=y ++CONFIG_TCP_CONG_ILLINOIS=m ++CONFIG_TCP_CONG_DCTCP=m ++CONFIG_DEFAULT_VEGAS=y ++# CONFIG_DEFAULT_RENO is not set ++CONFIG_DEFAULT_TCP_CONG="vegas" ++CONFIG_TCP_MD5SIG=y ++CONFIG_IPV6=m ++CONFIG_IPV6_ROUTER_PREF=y ++CONFIG_IPV6_ROUTE_INFO=y ++CONFIG_IPV6_OPTIMISTIC_DAD=y ++CONFIG_INET6_AH=m ++CONFIG_INET6_ESP=m ++CONFIG_INET6_IPCOMP=m ++CONFIG_IPV6_MIP6=m ++CONFIG_INET6_XFRM_TUNNEL=m ++CONFIG_INET6_TUNNEL=m ++CONFIG_INET6_XFRM_MODE_TRANSPORT=m ++CONFIG_INET6_XFRM_MODE_TUNNEL=m ++CONFIG_INET6_XFRM_MODE_BEET=m ++CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m ++CONFIG_IPV6_VTI=m ++CONFIG_IPV6_SIT=m ++CONFIG_IPV6_SIT_6RD=y ++CONFIG_IPV6_NDISC_NODETYPE=y ++CONFIG_IPV6_TUNNEL=m ++CONFIG_IPV6_GRE=m ++CONFIG_IPV6_MULTIPLE_TABLES=y ++CONFIG_IPV6_SUBTREES=y ++CONFIG_IPV6_MROUTE=y ++CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y ++CONFIG_IPV6_PIMSM_V2=y ++CONFIG_NETWORK_SECMARK=y ++CONFIG_NET_PTP_CLASSIFY=y ++# CONFIG_NETWORK_PHY_TIMESTAMPING is not set ++CONFIG_NETFILTER=y ++# CONFIG_NETFILTER_DEBUG is not set ++CONFIG_NETFILTER_ADVANCED=y ++CONFIG_BRIDGE_NETFILTER=m ++ ++# ++# Core Netfilter Configuration ++# ++CONFIG_NETFILTER_NETLINK=m ++CONFIG_NETFILTER_NETLINK_ACCT=m ++CONFIG_NETFILTER_NETLINK_QUEUE=m ++CONFIG_NETFILTER_NETLINK_LOG=m ++CONFIG_NF_CONNTRACK=m ++CONFIG_NF_LOG_COMMON=m ++CONFIG_NF_CONNTRACK_MARK=y ++CONFIG_NF_CONNTRACK_SECMARK=y ++CONFIG_NF_CONNTRACK_ZONES=y ++CONFIG_NF_CONNTRACK_PROCFS=y ++CONFIG_NF_CONNTRACK_EVENTS=y ++CONFIG_NF_CONNTRACK_TIMEOUT=y ++CONFIG_NF_CONNTRACK_TIMESTAMP=y ++CONFIG_NF_CONNTRACK_LABELS=y ++CONFIG_NF_CT_PROTO_DCCP=m ++CONFIG_NF_CT_PROTO_GRE=m ++CONFIG_NF_CT_PROTO_SCTP=m ++CONFIG_NF_CT_PROTO_UDPLITE=m ++CONFIG_NF_CONNTRACK_AMANDA=m ++CONFIG_NF_CONNTRACK_FTP=m ++CONFIG_NF_CONNTRACK_H323=m ++CONFIG_NF_CONNTRACK_IRC=m ++CONFIG_NF_CONNTRACK_BROADCAST=m ++CONFIG_NF_CONNTRACK_NETBIOS_NS=m ++CONFIG_NF_CONNTRACK_SNMP=m ++CONFIG_NF_CONNTRACK_PPTP=m ++CONFIG_NF_CONNTRACK_SANE=m ++CONFIG_NF_CONNTRACK_SIP=m ++CONFIG_NF_CONNTRACK_TFTP=m ++CONFIG_NF_CT_NETLINK=m ++CONFIG_NF_CT_NETLINK_TIMEOUT=m ++CONFIG_NF_CT_NETLINK_HELPER=m ++CONFIG_NETFILTER_NETLINK_QUEUE_CT=y ++CONFIG_NF_NAT=m ++CONFIG_NF_NAT_NEEDED=y ++CONFIG_NF_NAT_PROTO_DCCP=m ++CONFIG_NF_NAT_PROTO_UDPLITE=m ++CONFIG_NF_NAT_PROTO_SCTP=m ++CONFIG_NF_NAT_AMANDA=m ++CONFIG_NF_NAT_FTP=m ++CONFIG_NF_NAT_IRC=m ++CONFIG_NF_NAT_SIP=m ++CONFIG_NF_NAT_TFTP=m ++CONFIG_NF_NAT_REDIRECT=m ++CONFIG_NETFILTER_SYNPROXY=m ++CONFIG_NF_TABLES=m ++CONFIG_NF_TABLES_INET=m ++CONFIG_NFT_EXTHDR=m ++CONFIG_NFT_META=m ++CONFIG_NFT_CT=m ++CONFIG_NFT_RBTREE=m ++CONFIG_NFT_HASH=m ++CONFIG_NFT_COUNTER=m ++CONFIG_NFT_LOG=m ++CONFIG_NFT_LIMIT=m ++# CONFIG_NFT_MASQ is not set ++# CONFIG_NFT_REDIR is not set ++CONFIG_NFT_NAT=m ++CONFIG_NFT_QUEUE=m ++CONFIG_NFT_REJECT=m ++CONFIG_NFT_REJECT_INET=m ++CONFIG_NFT_COMPAT=m ++CONFIG_NETFILTER_XTABLES=m ++ ++# ++# Xtables combined modules ++# ++CONFIG_NETFILTER_XT_MARK=m ++CONFIG_NETFILTER_XT_CONNMARK=m ++CONFIG_NETFILTER_XT_SET=m ++ ++# ++# Xtables targets ++# ++# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set ++CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m ++CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m ++CONFIG_NETFILTER_XT_TARGET_CONNMARK=m ++CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m ++CONFIG_NETFILTER_XT_TARGET_CT=m ++CONFIG_NETFILTER_XT_TARGET_DSCP=m ++CONFIG_NETFILTER_XT_TARGET_HL=m ++CONFIG_NETFILTER_XT_TARGET_HMARK=m ++CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m ++CONFIG_NETFILTER_XT_TARGET_LED=m ++CONFIG_NETFILTER_XT_TARGET_LOG=m ++CONFIG_NETFILTER_XT_TARGET_MARK=m ++CONFIG_NETFILTER_XT_NAT=m ++CONFIG_NETFILTER_XT_TARGET_NETMAP=m ++CONFIG_NETFILTER_XT_TARGET_NFLOG=m ++CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m ++CONFIG_NETFILTER_XT_TARGET_NOTRACK=m ++CONFIG_NETFILTER_XT_TARGET_RATEEST=m ++CONFIG_NETFILTER_XT_TARGET_REDIRECT=m ++CONFIG_NETFILTER_XT_TARGET_TEE=m ++CONFIG_NETFILTER_XT_TARGET_TPROXY=m ++CONFIG_NETFILTER_XT_TARGET_TRACE=m ++CONFIG_NETFILTER_XT_TARGET_SECMARK=m ++CONFIG_NETFILTER_XT_TARGET_TCPMSS=m ++CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m ++ ++# ++# Xtables matches ++# ++CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m ++CONFIG_NETFILTER_XT_MATCH_BPF=m ++CONFIG_NETFILTER_XT_MATCH_CGROUP=m ++CONFIG_NETFILTER_XT_MATCH_CLUSTER=m ++CONFIG_NETFILTER_XT_MATCH_COMMENT=m ++CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m ++CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m ++CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m ++CONFIG_NETFILTER_XT_MATCH_CONNMARK=m ++CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m ++CONFIG_NETFILTER_XT_MATCH_CPU=m ++CONFIG_NETFILTER_XT_MATCH_DCCP=m ++CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m ++CONFIG_NETFILTER_XT_MATCH_DSCP=m ++CONFIG_NETFILTER_XT_MATCH_ECN=m ++CONFIG_NETFILTER_XT_MATCH_ESP=m ++CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m ++CONFIG_NETFILTER_XT_MATCH_HELPER=m ++CONFIG_NETFILTER_XT_MATCH_HL=m ++CONFIG_NETFILTER_XT_MATCH_IPCOMP=m ++CONFIG_NETFILTER_XT_MATCH_IPRANGE=m ++CONFIG_NETFILTER_XT_MATCH_IPVS=m ++CONFIG_NETFILTER_XT_MATCH_L2TP=m ++CONFIG_NETFILTER_XT_MATCH_LENGTH=m ++CONFIG_NETFILTER_XT_MATCH_LIMIT=m ++CONFIG_NETFILTER_XT_MATCH_MAC=m ++CONFIG_NETFILTER_XT_MATCH_MARK=m ++CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m ++CONFIG_NETFILTER_XT_MATCH_NFACCT=m ++CONFIG_NETFILTER_XT_MATCH_OSF=m ++CONFIG_NETFILTER_XT_MATCH_OWNER=m ++CONFIG_NETFILTER_XT_MATCH_POLICY=m ++CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m ++CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m ++CONFIG_NETFILTER_XT_MATCH_QUOTA=m ++CONFIG_NETFILTER_XT_MATCH_RATEEST=m ++CONFIG_NETFILTER_XT_MATCH_REALM=m ++CONFIG_NETFILTER_XT_MATCH_RECENT=m ++CONFIG_NETFILTER_XT_MATCH_SCTP=m ++CONFIG_NETFILTER_XT_MATCH_SOCKET=m ++CONFIG_NETFILTER_XT_MATCH_STATE=m ++CONFIG_NETFILTER_XT_MATCH_STATISTIC=m ++CONFIG_NETFILTER_XT_MATCH_STRING=m ++CONFIG_NETFILTER_XT_MATCH_TCPMSS=m ++CONFIG_NETFILTER_XT_MATCH_TIME=m ++CONFIG_NETFILTER_XT_MATCH_U32=m ++CONFIG_IP_SET=m ++CONFIG_IP_SET_MAX=256 ++CONFIG_IP_SET_BITMAP_IP=m ++CONFIG_IP_SET_BITMAP_IPMAC=m ++CONFIG_IP_SET_BITMAP_PORT=m ++CONFIG_IP_SET_HASH_IP=m ++# CONFIG_IP_SET_HASH_IPMARK is not set ++CONFIG_IP_SET_HASH_IPPORT=m ++CONFIG_IP_SET_HASH_IPPORTIP=m ++CONFIG_IP_SET_HASH_IPPORTNET=m ++# CONFIG_IP_SET_HASH_MAC is not set ++CONFIG_IP_SET_HASH_NETPORTNET=m ++CONFIG_IP_SET_HASH_NET=m ++CONFIG_IP_SET_HASH_NETNET=m ++CONFIG_IP_SET_HASH_NETPORT=m ++CONFIG_IP_SET_HASH_NETIFACE=m ++CONFIG_IP_SET_LIST_SET=m ++CONFIG_IP_VS=m ++CONFIG_IP_VS_IPV6=y ++# CONFIG_IP_VS_DEBUG is not set ++CONFIG_IP_VS_TAB_BITS=12 ++ ++# ++# IPVS transport protocol load balancing support ++# ++CONFIG_IP_VS_PROTO_TCP=y ++CONFIG_IP_VS_PROTO_UDP=y ++CONFIG_IP_VS_PROTO_AH_ESP=y ++CONFIG_IP_VS_PROTO_ESP=y ++CONFIG_IP_VS_PROTO_AH=y ++CONFIG_IP_VS_PROTO_SCTP=y ++ ++# ++# IPVS scheduler ++# ++CONFIG_IP_VS_RR=m ++CONFIG_IP_VS_WRR=m ++CONFIG_IP_VS_LC=m ++CONFIG_IP_VS_WLC=m ++# CONFIG_IP_VS_FO is not set ++CONFIG_IP_VS_LBLC=m ++CONFIG_IP_VS_LBLCR=m ++CONFIG_IP_VS_DH=m ++CONFIG_IP_VS_SH=m ++CONFIG_IP_VS_SED=m ++CONFIG_IP_VS_NQ=m ++ ++# ++# IPVS SH scheduler ++# ++CONFIG_IP_VS_SH_TAB_BITS=8 ++ ++# ++# IPVS application helper ++# ++# CONFIG_IP_VS_FTP is not set ++CONFIG_IP_VS_NFCT=y ++# CONFIG_IP_VS_PE_SIP is not set ++ ++# ++# IP: Netfilter Configuration ++# ++CONFIG_NF_DEFRAG_IPV4=m ++CONFIG_NF_CONNTRACK_IPV4=m ++CONFIG_NF_CONNTRACK_PROC_COMPAT=y ++CONFIG_NF_TABLES_IPV4=m ++CONFIG_NFT_CHAIN_ROUTE_IPV4=m ++CONFIG_NFT_REJECT_IPV4=m ++CONFIG_NF_TABLES_ARP=m ++# CONFIG_NF_LOG_ARP is not set ++CONFIG_NF_LOG_IPV4=m ++CONFIG_NF_REJECT_IPV4=m ++CONFIG_NF_NAT_IPV4=m ++CONFIG_NFT_CHAIN_NAT_IPV4=m ++CONFIG_NF_NAT_MASQUERADE_IPV4=m ++CONFIG_NF_NAT_SNMP_BASIC=m ++CONFIG_NF_NAT_PROTO_GRE=m ++CONFIG_NF_NAT_PPTP=m ++CONFIG_NF_NAT_H323=m ++CONFIG_IP_NF_IPTABLES=m ++CONFIG_IP_NF_MATCH_AH=m ++CONFIG_IP_NF_MATCH_ECN=m ++CONFIG_IP_NF_MATCH_RPFILTER=m ++CONFIG_IP_NF_MATCH_TTL=m ++CONFIG_IP_NF_FILTER=m ++CONFIG_IP_NF_TARGET_REJECT=m ++CONFIG_IP_NF_TARGET_SYNPROXY=m ++CONFIG_IP_NF_NAT=m ++CONFIG_IP_NF_TARGET_MASQUERADE=m ++CONFIG_IP_NF_TARGET_NETMAP=m ++CONFIG_IP_NF_TARGET_REDIRECT=m ++CONFIG_IP_NF_MANGLE=m ++CONFIG_IP_NF_TARGET_CLUSTERIP=m ++CONFIG_IP_NF_TARGET_ECN=m ++CONFIG_IP_NF_TARGET_TTL=m ++CONFIG_IP_NF_RAW=m ++CONFIG_IP_NF_ARPTABLES=m ++CONFIG_IP_NF_ARPFILTER=m ++CONFIG_IP_NF_ARP_MANGLE=m ++ ++# ++# IPv6: Netfilter Configuration ++# ++CONFIG_NF_DEFRAG_IPV6=m ++CONFIG_NF_CONNTRACK_IPV6=m ++CONFIG_NF_TABLES_IPV6=m ++CONFIG_NFT_CHAIN_ROUTE_IPV6=m ++CONFIG_NFT_REJECT_IPV6=m ++CONFIG_NF_REJECT_IPV6=m ++CONFIG_NF_LOG_IPV6=m ++CONFIG_NF_NAT_IPV6=m ++CONFIG_NFT_CHAIN_NAT_IPV6=m ++CONFIG_NF_NAT_MASQUERADE_IPV6=m ++CONFIG_IP6_NF_IPTABLES=m ++CONFIG_IP6_NF_MATCH_AH=m ++CONFIG_IP6_NF_MATCH_EUI64=m ++CONFIG_IP6_NF_MATCH_FRAG=m ++CONFIG_IP6_NF_MATCH_OPTS=m ++CONFIG_IP6_NF_MATCH_HL=m ++CONFIG_IP6_NF_MATCH_IPV6HEADER=m ++CONFIG_IP6_NF_MATCH_MH=m ++CONFIG_IP6_NF_MATCH_RPFILTER=m ++CONFIG_IP6_NF_MATCH_RT=m ++CONFIG_IP6_NF_TARGET_HL=m ++CONFIG_IP6_NF_FILTER=m ++CONFIG_IP6_NF_TARGET_REJECT=m ++CONFIG_IP6_NF_TARGET_SYNPROXY=m ++CONFIG_IP6_NF_MANGLE=m ++CONFIG_IP6_NF_RAW=m ++CONFIG_IP6_NF_NAT=m ++CONFIG_IP6_NF_TARGET_MASQUERADE=m ++CONFIG_IP6_NF_TARGET_NPT=m ++CONFIG_NF_TABLES_BRIDGE=m ++# CONFIG_NFT_BRIDGE_META is not set ++# CONFIG_NFT_BRIDGE_REJECT is not set ++# CONFIG_NF_LOG_BRIDGE is not set ++CONFIG_BRIDGE_NF_EBTABLES=m ++CONFIG_BRIDGE_EBT_BROUTE=m ++CONFIG_BRIDGE_EBT_T_FILTER=m ++CONFIG_BRIDGE_EBT_T_NAT=m ++CONFIG_BRIDGE_EBT_802_3=m ++CONFIG_BRIDGE_EBT_AMONG=m ++CONFIG_BRIDGE_EBT_ARP=m ++CONFIG_BRIDGE_EBT_IP=m ++CONFIG_BRIDGE_EBT_IP6=m ++CONFIG_BRIDGE_EBT_LIMIT=m ++CONFIG_BRIDGE_EBT_MARK=m ++CONFIG_BRIDGE_EBT_PKTTYPE=m ++CONFIG_BRIDGE_EBT_STP=m ++CONFIG_BRIDGE_EBT_VLAN=m ++CONFIG_BRIDGE_EBT_ARPREPLY=m ++CONFIG_BRIDGE_EBT_DNAT=m ++CONFIG_BRIDGE_EBT_MARK_T=m ++CONFIG_BRIDGE_EBT_REDIRECT=m ++CONFIG_BRIDGE_EBT_SNAT=m ++CONFIG_BRIDGE_EBT_LOG=m ++CONFIG_BRIDGE_EBT_NFLOG=m ++CONFIG_IP_DCCP=m ++CONFIG_INET_DCCP_DIAG=m ++ ++# ++# DCCP CCIDs Configuration ++# ++# CONFIG_IP_DCCP_CCID2_DEBUG is not set ++CONFIG_IP_DCCP_CCID3=y ++# CONFIG_IP_DCCP_CCID3_DEBUG is not set ++CONFIG_IP_DCCP_TFRC_LIB=y ++ ++# ++# DCCP Kernel Hacking ++# ++# CONFIG_IP_DCCP_DEBUG is not set ++CONFIG_IP_SCTP=m ++CONFIG_SCTP_DBG_OBJCNT=y ++CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y ++# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set ++# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set ++CONFIG_SCTP_COOKIE_HMAC_MD5=y ++CONFIG_SCTP_COOKIE_HMAC_SHA1=y ++CONFIG_RDS=m ++# CONFIG_RDS_TCP is not set ++# CONFIG_RDS_DEBUG is not set ++CONFIG_TIPC=m ++CONFIG_TIPC_MEDIA_UDP=y ++# CONFIG_ATM is not set ++CONFIG_L2TP=m ++# CONFIG_L2TP_DEBUGFS is not set ++# CONFIG_L2TP_V3 is not set ++CONFIG_STP=m ++CONFIG_BRIDGE=m ++CONFIG_BRIDGE_IGMP_SNOOPING=y ++CONFIG_BRIDGE_VLAN_FILTERING=y ++CONFIG_HAVE_NET_DSA=y ++CONFIG_VLAN_8021Q=m ++# CONFIG_VLAN_8021Q_GVRP is not set ++# CONFIG_VLAN_8021Q_MVRP is not set ++# CONFIG_DECNET is not set ++CONFIG_LLC=m ++CONFIG_LLC2=m ++# CONFIG_IPX is not set ++CONFIG_ATALK=m ++CONFIG_DEV_APPLETALK=m ++CONFIG_IPDDP=m ++CONFIG_IPDDP_ENCAP=y ++# CONFIG_X25 is not set ++# CONFIG_LAPB is not set ++# CONFIG_PHONET is not set ++# CONFIG_6LOWPAN is not set ++# CONFIG_IEEE802154 is not set ++CONFIG_NET_SCHED=y ++ ++# ++# Queueing/Scheduling ++# ++CONFIG_NET_SCH_CBQ=y ++CONFIG_NET_SCH_HTB=y ++CONFIG_NET_SCH_HFSC=m ++CONFIG_NET_SCH_PRIO=y ++CONFIG_NET_SCH_MULTIQ=m ++CONFIG_NET_SCH_RED=m ++CONFIG_NET_SCH_SFB=m ++CONFIG_NET_SCH_SFQ=y ++CONFIG_NET_SCH_TEQL=m ++CONFIG_NET_SCH_TBF=m ++CONFIG_NET_SCH_GRED=m ++CONFIG_NET_SCH_DSMARK=m ++CONFIG_NET_SCH_NETEM=m ++CONFIG_NET_SCH_DRR=m ++CONFIG_NET_SCH_MQPRIO=m ++CONFIG_NET_SCH_CHOKE=m ++CONFIG_NET_SCH_QFQ=y ++CONFIG_NET_SCH_CODEL=m ++CONFIG_NET_SCH_FQ_CODEL=m ++CONFIG_NET_SCH_FQ=m ++CONFIG_NET_SCH_HHF=m ++CONFIG_NET_SCH_PIE=m ++CONFIG_NET_SCH_INGRESS=m ++CONFIG_NET_SCH_PLUG=m ++ ++# ++# Classification ++# ++CONFIG_NET_CLS=y ++CONFIG_NET_CLS_BASIC=m ++CONFIG_NET_CLS_TCINDEX=m ++CONFIG_NET_CLS_ROUTE4=m ++CONFIG_NET_CLS_FW=m ++CONFIG_NET_CLS_U32=m ++CONFIG_CLS_U32_PERF=y ++CONFIG_CLS_U32_MARK=y ++CONFIG_NET_CLS_RSVP=m ++CONFIG_NET_CLS_RSVP6=m ++CONFIG_NET_CLS_FLOW=m ++CONFIG_NET_CLS_CGROUP=m ++CONFIG_NET_CLS_BPF=m ++CONFIG_NET_EMATCH=y ++CONFIG_NET_EMATCH_STACK=32 ++CONFIG_NET_EMATCH_CMP=m ++CONFIG_NET_EMATCH_NBYTE=m ++CONFIG_NET_EMATCH_U32=m ++CONFIG_NET_EMATCH_META=m ++CONFIG_NET_EMATCH_TEXT=m ++# CONFIG_NET_EMATCH_CANID is not set ++CONFIG_NET_EMATCH_IPSET=m ++CONFIG_NET_CLS_ACT=y ++CONFIG_NET_ACT_POLICE=m ++CONFIG_NET_ACT_GACT=m ++CONFIG_GACT_PROB=y ++CONFIG_NET_ACT_MIRRED=m ++CONFIG_NET_ACT_IPT=m ++CONFIG_NET_ACT_NAT=m ++CONFIG_NET_ACT_PEDIT=m ++CONFIG_NET_ACT_SIMP=m ++CONFIG_NET_ACT_SKBEDIT=m ++CONFIG_NET_ACT_CSUM=m ++# CONFIG_NET_ACT_VLAN is not set ++# CONFIG_NET_ACT_BPF is not set ++# CONFIG_NET_ACT_CONNMARK is not set ++CONFIG_NET_CLS_IND=y ++CONFIG_NET_SCH_FIFO=y ++# CONFIG_DCB is not set ++CONFIG_DNS_RESOLVER=y ++# CONFIG_BATMAN_ADV is not set ++CONFIG_OPENVSWITCH=m ++CONFIG_OPENVSWITCH_VXLAN=m ++# CONFIG_VSOCKETS is not set ++CONFIG_NETLINK_MMAP=y ++CONFIG_NETLINK_DIAG=m ++CONFIG_MPLS=y ++CONFIG_NET_MPLS_GSO=m ++# CONFIG_MPLS_ROUTING is not set ++# CONFIG_HSR is not set ++# CONFIG_NET_SWITCHDEV is not set ++CONFIG_RPS=y ++CONFIG_RFS_ACCEL=y ++CONFIG_XPS=y ++CONFIG_CGROUP_NET_PRIO=y ++CONFIG_CGROUP_NET_CLASSID=y ++CONFIG_NET_RX_BUSY_POLL=y ++CONFIG_BQL=y ++# CONFIG_BPF_JIT is not set ++CONFIG_NET_FLOW_LIMIT=y ++ ++# ++# Network testing ++# ++# CONFIG_NET_PKTGEN is not set ++# CONFIG_HAMRADIO is not set ++CONFIG_CAN=m ++CONFIG_CAN_RAW=m ++CONFIG_CAN_BCM=m ++CONFIG_CAN_GW=m ++ ++# ++# CAN Device Drivers ++# ++# CONFIG_CAN_VCAN is not set ++# CONFIG_CAN_SLCAN is not set ++CONFIG_CAN_DEV=m ++CONFIG_CAN_CALC_BITTIMING=y ++# CONFIG_CAN_LEDS is not set ++# CONFIG_CAN_TI_HECC is not set ++CONFIG_CAN_FLEXCAN=m ++# CONFIG_CAN_GRCAN is not set ++# CONFIG_CAN_RCAR is not set ++# CONFIG_CAN_SJA1000 is not set ++# CONFIG_CAN_C_CAN is not set ++# CONFIG_CAN_M_CAN is not set ++# CONFIG_CAN_CC770 is not set ++ ++# ++# CAN SPI interfaces ++# ++# CONFIG_CAN_MCP251X is not set ++ ++# ++# CAN USB interfaces ++# ++CONFIG_CAN_EMS_USB=m ++CONFIG_CAN_ESD_USB2=m ++CONFIG_CAN_GS_USB=m ++CONFIG_CAN_KVASER_USB=m ++CONFIG_CAN_PEAK_USB=m ++CONFIG_CAN_8DEV_USB=m ++# CONFIG_CAN_SOFTING is not set ++# CONFIG_CAN_DEBUG_DEVICES is not set ++CONFIG_IRDA=m ++ ++# ++# IrDA protocols ++# ++CONFIG_IRLAN=m ++CONFIG_IRNET=m ++CONFIG_IRCOMM=m ++CONFIG_IRDA_ULTRA=y ++ ++# ++# IrDA options ++# ++# CONFIG_IRDA_CACHE_LAST_LSAP is not set ++CONFIG_IRDA_FAST_RR=y ++# CONFIG_IRDA_DEBUG is not set ++ ++# ++# Infrared-port device drivers ++# ++ ++# ++# SIR device drivers ++# ++CONFIG_IRTTY_SIR=m ++ ++# ++# Dongle support ++# ++CONFIG_DONGLE=y ++CONFIG_ESI_DONGLE=m ++CONFIG_ACTISYS_DONGLE=m ++CONFIG_TEKRAM_DONGLE=m ++CONFIG_TOIM3232_DONGLE=m ++CONFIG_LITELINK_DONGLE=m ++CONFIG_MA600_DONGLE=m ++CONFIG_GIRBIL_DONGLE=m ++CONFIG_MCP2120_DONGLE=m ++CONFIG_OLD_BELKIN_DONGLE=m ++CONFIG_ACT200L_DONGLE=m ++CONFIG_KINGSUN_DONGLE=m ++CONFIG_KSDAZZLE_DONGLE=m ++CONFIG_KS959_DONGLE=m ++ ++# ++# FIR device drivers ++# ++CONFIG_USB_IRDA=m ++CONFIG_SIGMATEL_FIR=m ++CONFIG_VLSI_FIR=m ++CONFIG_MCS_FIR=m ++CONFIG_BT=y ++CONFIG_BT_BREDR=y ++CONFIG_BT_RFCOMM=y ++CONFIG_BT_RFCOMM_TTY=y ++CONFIG_BT_BNEP=y ++CONFIG_BT_BNEP_MC_FILTER=y ++CONFIG_BT_BNEP_PROTO_FILTER=y ++CONFIG_BT_CMTP=m ++CONFIG_BT_HIDP=m ++CONFIG_BT_LE=y ++# CONFIG_BT_SELFTEST is not set ++CONFIG_BT_DEBUGFS=y ++ ++# ++# Bluetooth device drivers ++# ++CONFIG_BT_INTEL=m ++CONFIG_BT_BCM=m ++CONFIG_BT_RTL=m ++CONFIG_BT_HCIBTUSB=m ++CONFIG_BT_HCIBTUSB_BCM=y ++CONFIG_BT_HCIBTUSB_RTL=y ++CONFIG_BT_HCIBTSDIO=y ++CONFIG_BT_HCIUART=y ++CONFIG_BT_HCIUART_H4=y ++CONFIG_BT_HCIUART_BCSP=y ++CONFIG_BT_HCIUART_ATH3K=y ++CONFIG_BT_HCIUART_LL=y ++CONFIG_BT_HCIUART_3WIRE=y ++# CONFIG_BT_HCIUART_INTEL is not set ++# CONFIG_BT_HCIUART_BCM is not set ++CONFIG_BT_HCIBCM203X=m ++CONFIG_BT_HCIBPA10X=m ++CONFIG_BT_HCIBFUSB=m ++CONFIG_BT_HCIVHCI=m ++CONFIG_BT_MRVL=m ++CONFIG_BT_MRVL_SDIO=m ++CONFIG_BT_ATH3K=m ++# CONFIG_BT_WILINK is not set ++CONFIG_AF_RXRPC=m ++# CONFIG_AF_RXRPC_DEBUG is not set ++# CONFIG_RXKAD is not set ++CONFIG_FIB_RULES=y ++CONFIG_WIRELESS=y ++CONFIG_WIRELESS_EXT=y ++CONFIG_WEXT_CORE=y ++CONFIG_WEXT_PROC=y ++CONFIG_WEXT_SPY=y ++CONFIG_WEXT_PRIV=y ++CONFIG_CFG80211=m ++# CONFIG_NL80211_TESTMODE is not set ++# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set ++# CONFIG_CFG80211_REG_DEBUG is not set ++# CONFIG_CFG80211_CERTIFICATION_ONUS is not set ++# CONFIG_CFG80211_DEFAULT_PS is not set ++# CONFIG_CFG80211_DEBUGFS is not set ++# CONFIG_CFG80211_INTERNAL_REGDB is not set ++CONFIG_CFG80211_WEXT=y ++CONFIG_CFG80211_WEXT_EXPORT=y ++CONFIG_LIB80211=m ++CONFIG_LIB80211_CRYPT_WEP=m ++CONFIG_LIB80211_CRYPT_CCMP=m ++CONFIG_LIB80211_CRYPT_TKIP=m ++# CONFIG_LIB80211_DEBUG is not set ++CONFIG_MAC80211=m ++CONFIG_MAC80211_HAS_RC=y ++CONFIG_MAC80211_RC_MINSTREL=y ++CONFIG_MAC80211_RC_MINSTREL_HT=y ++CONFIG_MAC80211_RC_MINSTREL_VHT=y ++CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y ++CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" ++CONFIG_MAC80211_MESH=y ++CONFIG_MAC80211_LEDS=y ++# CONFIG_MAC80211_DEBUGFS is not set ++# CONFIG_MAC80211_MESSAGE_TRACING is not set ++CONFIG_MAC80211_DEBUG_MENU=y ++# CONFIG_MAC80211_NOINLINE is not set ++# CONFIG_MAC80211_VERBOSE_DEBUG is not set ++# CONFIG_MAC80211_MLME_DEBUG is not set ++# CONFIG_MAC80211_STA_DEBUG is not set ++# CONFIG_MAC80211_HT_DEBUG is not set ++# CONFIG_MAC80211_OCB_DEBUG is not set ++# CONFIG_MAC80211_IBSS_DEBUG is not set ++# CONFIG_MAC80211_PS_DEBUG is not set ++# CONFIG_MAC80211_MPL_DEBUG is not set ++# CONFIG_MAC80211_MPATH_DEBUG is not set ++# CONFIG_MAC80211_MHWMP_DEBUG is not set ++# CONFIG_MAC80211_MESH_SYNC_DEBUG is not set ++# CONFIG_MAC80211_MESH_CSA_DEBUG is not set ++# CONFIG_MAC80211_MESH_PS_DEBUG is not set ++# CONFIG_MAC80211_TDLS_DEBUG is not set ++# CONFIG_WIMAX is not set ++CONFIG_RFKILL=y ++CONFIG_RFKILL_LEDS=y ++CONFIG_RFKILL_INPUT=y ++CONFIG_RFKILL_REGULATOR=y ++CONFIG_RFKILL_GPIO=y ++# CONFIG_NET_9P is not set ++CONFIG_CAIF=m ++# CONFIG_CAIF_DEBUG is not set ++CONFIG_CAIF_NETDEV=m ++CONFIG_CAIF_USB=m ++CONFIG_CEPH_LIB=m ++# CONFIG_CEPH_LIB_PRETTYDEBUG is not set ++CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y ++CONFIG_NFC=m ++# CONFIG_NFC_DIGITAL is not set ++# CONFIG_NFC_NCI is not set ++# CONFIG_NFC_HCI is not set ++ ++# ++# Near Field Communication (NFC) devices ++# ++# CONFIG_NFC_PN533 is not set ++# CONFIG_NFC_SIM is not set ++CONFIG_HAVE_BPF_JIT=y ++ ++# ++# Device Drivers ++# ++ ++# ++# Generic Driver Options ++# ++CONFIG_UEVENT_HELPER=y ++CONFIG_UEVENT_HELPER_PATH="" ++CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y ++# CONFIG_STANDALONE is not set ++# CONFIG_PREVENT_FIRMWARE_BUILD is not set ++CONFIG_FW_LOADER=y ++CONFIG_FIRMWARE_IN_KERNEL=y ++CONFIG_EXTRA_FIRMWARE="" ++CONFIG_FW_LOADER_USER_HELPER=y ++CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y ++CONFIG_WANT_DEV_COREDUMP=y ++CONFIG_ALLOW_DEV_COREDUMP=y ++CONFIG_DEV_COREDUMP=y ++# CONFIG_DEBUG_DRIVER is not set ++# CONFIG_DEBUG_DEVRES is not set ++# CONFIG_SYS_HYPERVISOR is not set ++# CONFIG_GENERIC_CPU_DEVICES is not set ++CONFIG_SOC_BUS=y ++CONFIG_REGMAP=y ++CONFIG_REGMAP_I2C=y ++CONFIG_REGMAP_SPI=y ++CONFIG_REGMAP_MMIO=y ++CONFIG_REGMAP_IRQ=y ++CONFIG_DMA_SHARED_BUFFER=y ++# CONFIG_FENCE_TRACE is not set ++CONFIG_DMA_CMA=y ++ ++# ++# Default contiguous memory area size: ++# ++CONFIG_CMA_SIZE_MBYTES=288 ++CONFIG_CMA_SIZE_SEL_MBYTES=y ++# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set ++# CONFIG_CMA_SIZE_SEL_MIN is not set ++# CONFIG_CMA_SIZE_SEL_MAX is not set ++CONFIG_CMA_ALIGNMENT=8 ++ ++# ++# Bus devices ++# ++CONFIG_ARM_CCI=y ++CONFIG_ARM_CCI400_COMMON=y ++CONFIG_ARM_CCI400_PMU=y ++CONFIG_ARM_CCN=y ++# CONFIG_BRCMSTB_GISB_ARB is not set ++CONFIG_IMX_WEIM=y ++# CONFIG_VEXPRESS_CONFIG is not set ++CONFIG_CONNECTOR=y ++CONFIG_PROC_EVENTS=y ++CONFIG_MTD=y ++# CONFIG_MTD_TESTS is not set ++# CONFIG_MTD_REDBOOT_PARTS is not set ++CONFIG_MTD_CMDLINE_PARTS=y ++# CONFIG_MTD_AFS_PARTS is not set ++CONFIG_MTD_OF_PARTS=y ++# CONFIG_MTD_AR7_PARTS is not set ++ ++# ++# User Modules And Translation Layers ++# ++CONFIG_MTD_BLKDEVS=y ++CONFIG_MTD_BLOCK=y ++# CONFIG_FTL is not set ++# CONFIG_NFTL is not set ++# CONFIG_INFTL is not set ++# CONFIG_RFD_FTL is not set ++# CONFIG_SSFDC is not set ++# CONFIG_SM_FTL is not set ++# CONFIG_MTD_OOPS is not set ++# CONFIG_MTD_SWAP is not set ++# CONFIG_MTD_PARTITIONED_MASTER is not set ++ ++# ++# RAM/ROM/Flash chip drivers ++# ++CONFIG_MTD_CFI=y ++CONFIG_MTD_JEDECPROBE=y ++CONFIG_MTD_GEN_PROBE=y ++# CONFIG_MTD_CFI_ADV_OPTIONS is not set ++CONFIG_MTD_MAP_BANK_WIDTH_1=y ++CONFIG_MTD_MAP_BANK_WIDTH_2=y ++CONFIG_MTD_MAP_BANK_WIDTH_4=y ++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set ++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set ++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set ++CONFIG_MTD_CFI_I1=y ++CONFIG_MTD_CFI_I2=y ++# CONFIG_MTD_CFI_I4 is not set ++# CONFIG_MTD_CFI_I8 is not set ++CONFIG_MTD_CFI_INTELEXT=y ++CONFIG_MTD_CFI_AMDSTD=y ++CONFIG_MTD_CFI_STAA=y ++CONFIG_MTD_CFI_UTIL=y ++# CONFIG_MTD_RAM is not set ++# CONFIG_MTD_ROM is not set ++# CONFIG_MTD_ABSENT is not set ++ ++# ++# Mapping drivers for chip access ++# ++# CONFIG_MTD_COMPLEX_MAPPINGS is not set ++# CONFIG_MTD_PHYSMAP is not set ++CONFIG_MTD_PHYSMAP_OF=y ++# CONFIG_MTD_IMPA7 is not set ++# CONFIG_MTD_INTEL_VR_NOR is not set ++# CONFIG_MTD_PLATRAM is not set ++ ++# ++# Self-contained MTD device drivers ++# ++# CONFIG_MTD_PMC551 is not set ++CONFIG_MTD_DATAFLASH=y ++# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set ++# CONFIG_MTD_DATAFLASH_OTP is not set ++# CONFIG_MTD_M25P80 is not set ++CONFIG_MTD_SST25L=y ++# CONFIG_MTD_SLRAM is not set ++# CONFIG_MTD_PHRAM is not set ++# CONFIG_MTD_MTDRAM is not set ++# CONFIG_MTD_BLOCK2MTD is not set ++ ++# ++# Disk-On-Chip Device Drivers ++# ++# CONFIG_MTD_DOCG3 is not set ++CONFIG_MTD_NAND_ECC=y ++# CONFIG_MTD_NAND_ECC_SMC is not set ++CONFIG_MTD_NAND=y ++# CONFIG_MTD_NAND_ECC_BCH is not set ++# CONFIG_MTD_SM_COMMON is not set ++# CONFIG_MTD_NAND_DENALI is not set ++# CONFIG_MTD_NAND_GPIO is not set ++# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set ++CONFIG_MTD_NAND_IDS=y ++# CONFIG_MTD_NAND_RICOH is not set ++# CONFIG_MTD_NAND_DISKONCHIP is not set ++# CONFIG_MTD_NAND_DOCG4 is not set ++# CONFIG_MTD_NAND_CAFE is not set ++# CONFIG_MTD_NAND_NANDSIM is not set ++# CONFIG_MTD_NAND_GPMI_NAND is not set ++# CONFIG_MTD_NAND_PLATFORM is not set ++CONFIG_MTD_NAND_MXC=y ++# CONFIG_MTD_NAND_HISI504 is not set ++# CONFIG_MTD_ONENAND is not set ++ ++# ++# LPDDR & LPDDR2 PCM memory drivers ++# ++# CONFIG_MTD_LPDDR is not set ++# CONFIG_MTD_LPDDR2_NVM is not set ++CONFIG_MTD_SPI_NOR=m ++CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y ++CONFIG_SPI_FSL_QUADSPI=m ++CONFIG_MTD_UBI=y ++CONFIG_MTD_UBI_WL_THRESHOLD=4096 ++CONFIG_MTD_UBI_BEB_LIMIT=20 ++# CONFIG_MTD_UBI_FASTMAP is not set ++# CONFIG_MTD_UBI_GLUEBI is not set ++# CONFIG_MTD_UBI_BLOCK is not set ++CONFIG_DTC=y ++CONFIG_OF=y ++ ++# ++# Device Tree and Open Firmware support ++# ++# CONFIG_OF_UNITTEST is not set ++CONFIG_OF_FLATTREE=y ++CONFIG_OF_EARLY_FLATTREE=y ++CONFIG_OF_ADDRESS=y ++CONFIG_OF_ADDRESS_PCI=y ++CONFIG_OF_IRQ=y ++CONFIG_OF_NET=y ++CONFIG_OF_MDIO=y ++CONFIG_OF_PCI=y ++CONFIG_OF_PCI_IRQ=y ++CONFIG_OF_MTD=y ++CONFIG_OF_RESERVED_MEM=y ++# CONFIG_OF_OVERLAY is not set ++CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y ++# CONFIG_PARPORT is not set ++CONFIG_BLK_DEV=y ++# CONFIG_BLK_DEV_NULL_BLK is not set ++# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set ++# CONFIG_BLK_CPQ_CISS_DA is not set ++# CONFIG_BLK_DEV_DAC960 is not set ++# CONFIG_BLK_DEV_UMEM is not set ++# CONFIG_BLK_DEV_COW_COMMON is not set ++CONFIG_BLK_DEV_LOOP=m ++CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 ++CONFIG_BLK_DEV_CRYPTOLOOP=m ++# CONFIG_BLK_DEV_DRBD is not set ++# CONFIG_BLK_DEV_NBD is not set ++# CONFIG_BLK_DEV_NVME is not set ++# CONFIG_BLK_DEV_SX8 is not set ++CONFIG_BLK_DEV_RAM=m ++CONFIG_BLK_DEV_RAM_COUNT=16 ++CONFIG_BLK_DEV_RAM_SIZE=65536 ++# CONFIG_BLK_DEV_PMEM is not set ++# CONFIG_CDROM_PKTCDVD is not set ++# CONFIG_ATA_OVER_ETH is not set ++CONFIG_MG_DISK=y ++CONFIG_MG_DISK_RES=0 ++# CONFIG_BLK_DEV_RBD is not set ++# CONFIG_BLK_DEV_RSXX is not set ++ ++# ++# Misc devices ++# ++# CONFIG_SENSORS_LIS3LV02D is not set ++# CONFIG_AD525X_DPOT is not set ++# CONFIG_DUMMY_IRQ is not set ++# CONFIG_PHANTOM is not set ++# CONFIG_SGI_IOC4 is not set ++CONFIG_TIFM_CORE=y ++CONFIG_TIFM_7XX1=y ++# CONFIG_ICS932S401 is not set ++CONFIG_ENCLOSURE_SERVICES=y ++# CONFIG_HP_ILO is not set ++# CONFIG_APDS9802ALS is not set ++# CONFIG_ISL29003 is not set ++# CONFIG_ISL29020 is not set ++# CONFIG_SENSORS_TSL2550 is not set ++# CONFIG_SENSORS_BH1780 is not set ++# CONFIG_SENSORS_BH1770 is not set ++# CONFIG_SENSORS_APDS990X is not set ++# CONFIG_HMC6352 is not set ++# CONFIG_DS1682 is not set ++# CONFIG_TI_DAC7512 is not set ++# CONFIG_BMP085_I2C is not set ++# CONFIG_BMP085_SPI is not set ++# CONFIG_USB_SWITCH_FSA9480 is not set ++# CONFIG_LATTICE_ECP3_CONFIG is not set ++CONFIG_SRAM=y ++# CONFIG_C2PORT is not set ++ ++# ++# EEPROM support ++# ++CONFIG_EEPROM_AT24=y ++CONFIG_EEPROM_AT25=y ++# CONFIG_EEPROM_LEGACY is not set ++CONFIG_EEPROM_MAX6875=y ++CONFIG_EEPROM_93CX6=m ++# CONFIG_EEPROM_93XX46 is not set ++CONFIG_CB710_CORE=y ++# CONFIG_CB710_DEBUG is not set ++CONFIG_CB710_DEBUG_ASSUMPTIONS=y ++ ++# ++# Texas Instruments shared transport line discipline ++# ++CONFIG_TI_ST=m ++# CONFIG_SENSORS_LIS3_SPI is not set ++# CONFIG_SENSORS_LIS3_I2C is not set ++ ++# ++# Altera FPGA firmware download module ++# ++CONFIG_ALTERA_STAPL=m ++ ++# ++# Intel MIC Bus Driver ++# ++ ++# ++# Intel MIC Host Driver ++# ++ ++# ++# Intel MIC Card Driver ++# ++CONFIG_ECHO=m ++# CONFIG_CXL_BASE is not set ++CONFIG_HAVE_IDE=y ++# CONFIG_IDE is not set ++ ++# ++# SCSI device support ++# ++CONFIG_SCSI_MOD=y ++# CONFIG_RAID_ATTRS is not set ++CONFIG_SCSI=y ++CONFIG_SCSI_DMA=y ++CONFIG_SCSI_NETLINK=y ++# CONFIG_SCSI_MQ_DEFAULT is not set ++# CONFIG_SCSI_PROC_FS is not set ++ ++# ++# SCSI support type (disk, tape, CD-ROM) ++# ++CONFIG_BLK_DEV_SD=y ++# CONFIG_CHR_DEV_ST is not set ++# CONFIG_CHR_DEV_OSST is not set ++CONFIG_BLK_DEV_SR=y ++CONFIG_BLK_DEV_SR_VENDOR=y ++CONFIG_CHR_DEV_SG=y ++CONFIG_CHR_DEV_SCH=y ++CONFIG_SCSI_ENCLOSURE=y ++# CONFIG_SCSI_CONSTANTS is not set ++CONFIG_SCSI_LOGGING=y ++CONFIG_SCSI_SCAN_ASYNC=y ++ ++# ++# SCSI Transports ++# ++# CONFIG_SCSI_SPI_ATTRS is not set ++CONFIG_SCSI_FC_ATTRS=m ++CONFIG_SCSI_ISCSI_ATTRS=m ++# CONFIG_SCSI_SAS_ATTRS is not set ++# CONFIG_SCSI_SAS_LIBSAS is not set ++# CONFIG_SCSI_SRP_ATTRS is not set ++CONFIG_SCSI_LOWLEVEL=y ++CONFIG_ISCSI_TCP=m ++CONFIG_ISCSI_BOOT_SYSFS=m ++# CONFIG_SCSI_CXGB3_ISCSI is not set ++# CONFIG_SCSI_CXGB4_ISCSI is not set ++# CONFIG_SCSI_BNX2_ISCSI is not set ++# CONFIG_SCSI_BNX2X_FCOE is not set ++# CONFIG_BE2ISCSI is not set ++# CONFIG_BLK_DEV_3W_XXXX_RAID is not set ++# CONFIG_SCSI_HPSA is not set ++# CONFIG_SCSI_3W_9XXX is not set ++# CONFIG_SCSI_3W_SAS is not set ++# CONFIG_SCSI_ACARD is not set ++# CONFIG_SCSI_AACRAID is not set ++# CONFIG_SCSI_AIC7XXX is not set ++# CONFIG_SCSI_AIC79XX is not set ++# CONFIG_SCSI_AIC94XX is not set ++# CONFIG_SCSI_MVSAS is not set ++# CONFIG_SCSI_MVUMI is not set ++# CONFIG_SCSI_ARCMSR is not set ++# CONFIG_SCSI_ESAS2R is not set ++# CONFIG_MEGARAID_NEWGEN is not set ++# CONFIG_MEGARAID_LEGACY is not set ++# CONFIG_MEGARAID_SAS is not set ++# CONFIG_SCSI_MPT2SAS is not set ++# CONFIG_SCSI_MPT3SAS is not set ++CONFIG_SCSI_UFSHCD=m ++# CONFIG_SCSI_UFSHCD_PCI is not set ++CONFIG_SCSI_UFSHCD_PLATFORM=m ++# CONFIG_SCSI_HPTIOP is not set ++CONFIG_LIBFC=m ++CONFIG_LIBFCOE=m ++# CONFIG_FCOE is not set ++# CONFIG_SCSI_DMX3191D is not set ++# CONFIG_SCSI_FUTURE_DOMAIN is not set ++# CONFIG_SCSI_IPS is not set ++# CONFIG_SCSI_INITIO is not set ++# CONFIG_SCSI_INIA100 is not set ++# CONFIG_SCSI_STEX is not set ++# CONFIG_SCSI_SYM53C8XX_2 is not set ++# CONFIG_SCSI_IPR is not set ++# CONFIG_SCSI_QLOGIC_1280 is not set ++# CONFIG_SCSI_QLA_FC is not set ++# CONFIG_SCSI_QLA_ISCSI is not set ++# CONFIG_SCSI_LPFC is not set ++# CONFIG_SCSI_DC395x is not set ++# CONFIG_SCSI_AM53C974 is not set ++# CONFIG_SCSI_NSP32 is not set ++# CONFIG_SCSI_WD719X is not set ++# CONFIG_SCSI_DEBUG is not set ++# CONFIG_SCSI_PMCRAID is not set ++# CONFIG_SCSI_PM8001 is not set ++# CONFIG_SCSI_BFA_FC is not set ++# CONFIG_SCSI_CHELSIO_FCOE is not set ++CONFIG_SCSI_DH=m ++CONFIG_SCSI_DH_RDAC=m ++CONFIG_SCSI_DH_HP_SW=m ++CONFIG_SCSI_DH_EMC=m ++CONFIG_SCSI_DH_ALUA=m ++CONFIG_SCSI_OSD_INITIATOR=m ++# CONFIG_SCSI_OSD_ULD is not set ++CONFIG_SCSI_OSD_DPRINT_SENSE=1 ++# CONFIG_SCSI_OSD_DEBUG is not set ++CONFIG_ATA=y ++# CONFIG_ATA_NONSTANDARD is not set ++# CONFIG_ATA_VERBOSE_ERROR is not set ++CONFIG_SATA_PMP=y ++ ++# ++# Controllers with non-SFF native interface ++# ++# CONFIG_SATA_AHCI is not set ++CONFIG_SATA_AHCI_PLATFORM=y ++CONFIG_AHCI_IMX=y ++# CONFIG_SATA_INIC162X is not set ++# CONFIG_SATA_ACARD_AHCI is not set ++# CONFIG_SATA_SIL24 is not set ++CONFIG_ATA_SFF=y ++ ++# ++# SFF controllers with custom DMA interface ++# ++# CONFIG_PDC_ADMA is not set ++# CONFIG_SATA_QSTOR is not set ++# CONFIG_SATA_SX4 is not set ++CONFIG_ATA_BMDMA=y ++ ++# ++# SATA SFF controllers with BMDMA ++# ++# CONFIG_ATA_PIIX is not set ++# CONFIG_SATA_MV is not set ++# CONFIG_SATA_NV is not set ++# CONFIG_SATA_PROMISE is not set ++# CONFIG_SATA_SIL is not set ++# CONFIG_SATA_SIS is not set ++# CONFIG_SATA_SVW is not set ++# CONFIG_SATA_ULI is not set ++# CONFIG_SATA_VIA is not set ++# CONFIG_SATA_VITESSE is not set ++ ++# ++# PATA SFF controllers with BMDMA ++# ++# CONFIG_PATA_ALI is not set ++# CONFIG_PATA_AMD is not set ++# CONFIG_PATA_ARTOP is not set ++# CONFIG_PATA_ATIIXP is not set ++# CONFIG_PATA_ATP867X is not set ++# CONFIG_PATA_CMD64X is not set ++# CONFIG_PATA_CYPRESS is not set ++# CONFIG_PATA_EFAR is not set ++# CONFIG_PATA_HPT366 is not set ++# CONFIG_PATA_HPT37X is not set ++# CONFIG_PATA_HPT3X2N is not set ++# CONFIG_PATA_HPT3X3 is not set ++CONFIG_PATA_IMX=y ++# CONFIG_PATA_IT8213 is not set ++# CONFIG_PATA_IT821X is not set ++# CONFIG_PATA_JMICRON is not set ++# CONFIG_PATA_MARVELL is not set ++# CONFIG_PATA_NETCELL is not set ++# CONFIG_PATA_NINJA32 is not set ++# CONFIG_PATA_NS87415 is not set ++# CONFIG_PATA_OLDPIIX is not set ++# CONFIG_PATA_OPTIDMA is not set ++# CONFIG_PATA_PDC2027X is not set ++# CONFIG_PATA_PDC_OLD is not set ++# CONFIG_PATA_RADISYS is not set ++# CONFIG_PATA_RDC is not set ++# CONFIG_PATA_SCH is not set ++# CONFIG_PATA_SERVERWORKS is not set ++# CONFIG_PATA_SIL680 is not set ++# CONFIG_PATA_SIS is not set ++# CONFIG_PATA_TOSHIBA is not set ++# CONFIG_PATA_TRIFLEX is not set ++# CONFIG_PATA_VIA is not set ++# CONFIG_PATA_WINBOND is not set ++ ++# ++# PIO-only SFF controllers ++# ++# CONFIG_PATA_CMD640_PCI is not set ++# CONFIG_PATA_MPIIX is not set ++# CONFIG_PATA_NS87410 is not set ++# CONFIG_PATA_OPTI is not set ++# CONFIG_PATA_PLATFORM is not set ++# CONFIG_PATA_RZ1000 is not set ++ ++# ++# Generic fallback / legacy drivers ++# ++# CONFIG_ATA_GENERIC is not set ++# CONFIG_PATA_LEGACY is not set ++CONFIG_MD=y ++CONFIG_BLK_DEV_MD=y ++CONFIG_MD_AUTODETECT=y ++CONFIG_MD_LINEAR=y ++CONFIG_MD_RAID0=y ++CONFIG_MD_RAID1=y ++CONFIG_MD_RAID10=y ++CONFIG_MD_RAID456=m ++CONFIG_MD_MULTIPATH=m ++CONFIG_MD_FAULTY=m ++CONFIG_BCACHE=m ++# CONFIG_BCACHE_DEBUG is not set ++# CONFIG_BCACHE_CLOSURES_DEBUG is not set ++CONFIG_BLK_DEV_DM_BUILTIN=y ++CONFIG_BLK_DEV_DM=m ++# CONFIG_DM_MQ_DEFAULT is not set ++# CONFIG_DM_DEBUG is not set ++CONFIG_DM_BUFIO=m ++CONFIG_DM_BIO_PRISON=m ++CONFIG_DM_PERSISTENT_DATA=m ++# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set ++CONFIG_DM_CRYPT=m ++CONFIG_DM_SNAPSHOT=m ++CONFIG_DM_THIN_PROVISIONING=m ++CONFIG_DM_CACHE=m ++CONFIG_DM_CACHE_MQ=m ++CONFIG_DM_CACHE_CLEANER=m ++# CONFIG_DM_ERA is not set ++CONFIG_DM_MIRROR=m ++CONFIG_DM_LOG_USERSPACE=m ++CONFIG_DM_RAID=m ++CONFIG_DM_ZERO=m ++CONFIG_DM_MULTIPATH=m ++CONFIG_DM_MULTIPATH_QL=m ++CONFIG_DM_MULTIPATH_ST=m ++CONFIG_DM_DELAY=m ++CONFIG_DM_UEVENT=y ++CONFIG_DM_FLAKEY=m ++CONFIG_DM_VERITY=m ++# CONFIG_DM_SWITCH is not set ++# CONFIG_DM_LOG_WRITES is not set ++# CONFIG_TARGET_CORE is not set ++# CONFIG_FUSION is not set ++ ++# ++# IEEE 1394 (FireWire) support ++# ++# CONFIG_FIREWIRE is not set ++# CONFIG_FIREWIRE_NOSY is not set ++CONFIG_NETDEVICES=y ++CONFIG_MII=y ++CONFIG_NET_CORE=y ++CONFIG_BONDING=m ++CONFIG_DUMMY=m ++# CONFIG_EQUALIZER is not set ++# CONFIG_NET_FC is not set ++# CONFIG_IFB is not set ++CONFIG_NET_TEAM=m ++CONFIG_NET_TEAM_MODE_BROADCAST=m ++CONFIG_NET_TEAM_MODE_ROUNDROBIN=m ++CONFIG_NET_TEAM_MODE_RANDOM=m ++CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m ++CONFIG_NET_TEAM_MODE_LOADBALANCE=m ++CONFIG_MACVLAN=m ++CONFIG_MACVTAP=m ++CONFIG_IPVLAN=m ++CONFIG_VXLAN=m ++CONFIG_NETCONSOLE=m ++CONFIG_NETCONSOLE_DYNAMIC=y ++CONFIG_NETPOLL=y ++CONFIG_NET_POLL_CONTROLLER=y ++CONFIG_TUN=m ++CONFIG_VETH=m ++CONFIG_NLMON=m ++# CONFIG_ARCNET is not set ++ ++# ++# CAIF transport drivers ++# ++# CONFIG_CAIF_TTY is not set ++# CONFIG_CAIF_SPI_SLAVE is not set ++# CONFIG_CAIF_HSI is not set ++# CONFIG_CAIF_VIRTIO is not set ++ ++# ++# Distributed Switch Architecture drivers ++# ++# CONFIG_NET_DSA_MV88E6XXX is not set ++# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set ++CONFIG_ETHERNET=y ++CONFIG_MDIO=y ++CONFIG_NET_VENDOR_3COM=y ++# CONFIG_VORTEX is not set ++# CONFIG_TYPHOON is not set ++CONFIG_NET_VENDOR_ADAPTEC=y ++# CONFIG_ADAPTEC_STARFIRE is not set ++CONFIG_NET_VENDOR_AGERE=y ++CONFIG_ET131X=m ++CONFIG_NET_VENDOR_ALTEON=y ++# CONFIG_ACENIC is not set ++# CONFIG_ALTERA_TSE is not set ++CONFIG_NET_VENDOR_AMD=y ++# CONFIG_AMD8111_ETH is not set ++# CONFIG_PCNET32 is not set ++CONFIG_NET_VENDOR_ARC=y ++# CONFIG_ARC_EMAC is not set ++# CONFIG_EMAC_ROCKCHIP is not set ++CONFIG_NET_VENDOR_ATHEROS=y ++CONFIG_ATL2=y ++CONFIG_ATL1=y ++CONFIG_ATL1E=y ++CONFIG_ATL1C=y ++CONFIG_ALX=y ++# CONFIG_NET_CADENCE is not set ++# CONFIG_NET_VENDOR_BROADCOM is not set ++CONFIG_NET_VENDOR_BROCADE=y ++# CONFIG_BNA is not set ++CONFIG_NET_VENDOR_CHELSIO=y ++# CONFIG_CHELSIO_T1 is not set ++# CONFIG_CHELSIO_T3 is not set ++# CONFIG_CHELSIO_T4 is not set ++# CONFIG_CHELSIO_T4VF is not set ++# CONFIG_NET_VENDOR_CIRRUS is not set ++CONFIG_NET_VENDOR_CISCO=y ++# CONFIG_ENIC is not set ++# CONFIG_DM9000 is not set ++# CONFIG_DNET is not set ++CONFIG_NET_VENDOR_DEC=y ++# CONFIG_NET_TULIP is not set ++CONFIG_NET_VENDOR_DLINK=y ++# CONFIG_DL2K is not set ++# CONFIG_SUNDANCE is not set ++CONFIG_NET_VENDOR_EMULEX=y ++# CONFIG_BE2NET is not set ++CONFIG_NET_VENDOR_EXAR=y ++# CONFIG_S2IO is not set ++# CONFIG_VXGE is not set ++# CONFIG_NET_VENDOR_FARADAY is not set ++CONFIG_NET_VENDOR_FREESCALE=y ++CONFIG_FEC=y ++# CONFIG_FSL_PQ_MDIO is not set ++# CONFIG_FSL_XGMAC_MDIO is not set ++CONFIG_NET_VENDOR_HISILICON=y ++# CONFIG_HIX5HD2_GMAC is not set ++# CONFIG_HIP04_ETH is not set ++CONFIG_NET_VENDOR_HP=y ++# CONFIG_HP100 is not set ++# CONFIG_NET_VENDOR_INTEL is not set ++# CONFIG_IP1000 is not set ++# CONFIG_JME is not set ++# CONFIG_NET_VENDOR_MARVELL is not set ++CONFIG_NET_VENDOR_MELLANOX=y ++# CONFIG_MLX4_EN is not set ++# CONFIG_MLX4_CORE is not set ++# CONFIG_MLX5_CORE is not set ++# CONFIG_NET_VENDOR_MICREL is not set ++# CONFIG_NET_VENDOR_MICROCHIP is not set ++CONFIG_NET_VENDOR_MYRI=y ++# CONFIG_MYRI10GE is not set ++# CONFIG_FEALNX is not set ++# CONFIG_NET_VENDOR_NATSEMI is not set ++CONFIG_NET_VENDOR_NVIDIA=y ++# CONFIG_FORCEDETH is not set ++CONFIG_NET_VENDOR_OKI=y ++# CONFIG_ETHOC is not set ++CONFIG_NET_PACKET_ENGINE=y ++# CONFIG_HAMACHI is not set ++# CONFIG_YELLOWFIN is not set ++CONFIG_NET_VENDOR_QLOGIC=y ++# CONFIG_QLA3XXX is not set ++# CONFIG_QLCNIC is not set ++# CONFIG_QLGE is not set ++# CONFIG_NETXEN_NIC is not set ++CONFIG_NET_VENDOR_QUALCOMM=y ++# CONFIG_QCA7000 is not set ++CONFIG_NET_VENDOR_REALTEK=y ++# CONFIG_8139CP is not set ++# CONFIG_8139TOO is not set ++# CONFIG_R8169 is not set ++CONFIG_NET_VENDOR_RDC=y ++# CONFIG_R6040 is not set ++CONFIG_NET_VENDOR_ROCKER=y ++CONFIG_NET_VENDOR_SAMSUNG=y ++# CONFIG_SXGBE_ETH is not set ++# CONFIG_NET_VENDOR_SEEQ is not set ++CONFIG_NET_VENDOR_SILAN=y ++# CONFIG_SC92031 is not set ++CONFIG_NET_VENDOR_SIS=y ++# CONFIG_SIS900 is not set ++# CONFIG_SIS190 is not set ++# CONFIG_SFC is not set ++# CONFIG_NET_VENDOR_SMSC is not set ++# CONFIG_NET_VENDOR_STMICRO is not set ++CONFIG_NET_VENDOR_SUN=y ++# CONFIG_HAPPYMEAL is not set ++# CONFIG_SUNGEM is not set ++# CONFIG_CASSINI is not set ++# CONFIG_NIU is not set ++CONFIG_NET_VENDOR_TEHUTI=y ++# CONFIG_TEHUTI is not set ++CONFIG_NET_VENDOR_TI=y ++# CONFIG_TI_CPSW_ALE is not set ++# CONFIG_TLAN is not set ++CONFIG_NET_VENDOR_VIA=y ++# CONFIG_VIA_RHINE is not set ++# CONFIG_VIA_VELOCITY is not set ++# CONFIG_NET_VENDOR_WIZNET is not set ++# CONFIG_FDDI is not set ++# CONFIG_HIPPI is not set ++CONFIG_PHYLIB=y ++ ++# ++# MII PHY device drivers ++# ++CONFIG_AT803X_PHY=y ++# CONFIG_AMD_PHY is not set ++# CONFIG_MARVELL_PHY is not set ++# CONFIG_DAVICOM_PHY is not set ++# CONFIG_QSEMI_PHY is not set ++# CONFIG_LXT_PHY is not set ++# CONFIG_CICADA_PHY is not set ++# CONFIG_VITESSE_PHY is not set ++# CONFIG_SMSC_PHY is not set ++CONFIG_BROADCOM_PHY=y ++CONFIG_BCM7XXX_PHY=m ++CONFIG_BCM87XX_PHY=y ++# CONFIG_ICPLUS_PHY is not set ++# CONFIG_REALTEK_PHY is not set ++# CONFIG_NATIONAL_PHY is not set ++# CONFIG_STE10XP is not set ++# CONFIG_LSI_ET1011C_PHY is not set ++CONFIG_MICREL_PHY=m ++CONFIG_FIXED_PHY=y ++CONFIG_MDIO_BITBANG=m ++CONFIG_MDIO_GPIO=m ++CONFIG_MDIO_BUS_MUX=m ++CONFIG_MDIO_BUS_MUX_GPIO=m ++CONFIG_MDIO_BUS_MUX_MMIOREG=m ++CONFIG_MDIO_BCM_UNIMAC=m ++# CONFIG_MICREL_KS8995MA is not set ++CONFIG_PPP=m ++CONFIG_PPP_BSDCOMP=m ++CONFIG_PPP_DEFLATE=m ++CONFIG_PPP_FILTER=y ++CONFIG_PPP_MPPE=m ++CONFIG_PPP_MULTILINK=y ++CONFIG_PPPOE=m ++CONFIG_PPPOL2TP=m ++CONFIG_PPP_ASYNC=m ++CONFIG_PPP_SYNC_TTY=m ++CONFIG_SLIP=m ++CONFIG_SLHC=m ++CONFIG_SLIP_COMPRESSED=y ++CONFIG_SLIP_SMART=y ++CONFIG_SLIP_MODE_SLIP6=y ++CONFIG_USB_NET_DRIVERS=y ++CONFIG_USB_CATC=m ++CONFIG_USB_KAWETH=m ++CONFIG_USB_PEGASUS=m ++CONFIG_USB_RTL8150=m ++CONFIG_USB_RTL8152=m ++CONFIG_USB_USBNET=m ++CONFIG_USB_NET_AX8817X=m ++CONFIG_USB_NET_AX88179_178A=m ++CONFIG_USB_NET_CDCETHER=m ++CONFIG_USB_NET_CDC_EEM=m ++CONFIG_USB_NET_CDC_NCM=m ++CONFIG_USB_NET_HUAWEI_CDC_NCM=m ++CONFIG_USB_NET_CDC_MBIM=m ++CONFIG_USB_NET_DM9601=m ++CONFIG_USB_NET_SR9700=m ++CONFIG_USB_NET_SR9800=m ++CONFIG_USB_NET_SMSC75XX=m ++CONFIG_USB_NET_SMSC95XX=m ++CONFIG_USB_NET_GL620A=m ++CONFIG_USB_NET_NET1080=m ++CONFIG_USB_NET_PLUSB=m ++CONFIG_USB_NET_MCS7830=m ++CONFIG_USB_NET_RNDIS_HOST=m ++CONFIG_USB_NET_CDC_SUBSET=m ++# CONFIG_USB_ALI_M5632 is not set ++# CONFIG_USB_AN2720 is not set ++CONFIG_USB_BELKIN=y ++CONFIG_USB_ARMLINUX=y ++# CONFIG_USB_EPSON2888 is not set ++# CONFIG_USB_KC2190 is not set ++CONFIG_USB_NET_ZAURUS=m ++CONFIG_USB_NET_CX82310_ETH=m ++CONFIG_USB_NET_KALMIA=m ++CONFIG_USB_NET_QMI_WWAN=m ++CONFIG_USB_HSO=m ++CONFIG_USB_NET_INT51X1=m ++CONFIG_USB_IPHETH=m ++CONFIG_USB_SIERRA_NET=m ++CONFIG_USB_VL600=m ++CONFIG_WLAN=y ++CONFIG_LIBERTAS_THINFIRM=m ++# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set ++CONFIG_LIBERTAS_THINFIRM_USB=m ++CONFIG_ATMEL=m ++CONFIG_PCI_ATMEL=m ++CONFIG_AT76C50X_USB=m ++CONFIG_PRISM54=m ++CONFIG_USB_ZD1201=m ++CONFIG_USB_NET_RNDIS_WLAN=m ++CONFIG_RTL8180=m ++CONFIG_RTL8187=m ++CONFIG_RTL8187_LEDS=y ++CONFIG_ADM8211=m ++# CONFIG_MAC80211_HWSIM is not set ++CONFIG_MWL8K=m ++CONFIG_ATH_COMMON=m ++CONFIG_ATH_CARDS=m ++# CONFIG_ATH_DEBUG is not set ++CONFIG_ATH5K=m ++# CONFIG_ATH5K_DEBUG is not set ++CONFIG_ATH5K_PCI=y ++CONFIG_ATH9K_HW=m ++CONFIG_ATH9K_COMMON=m ++CONFIG_ATH9K_BTCOEX_SUPPORT=y ++CONFIG_ATH9K=m ++CONFIG_ATH9K_PCI=y ++CONFIG_ATH9K_AHB=y ++# CONFIG_ATH9K_DEBUGFS is not set ++# CONFIG_ATH9K_DYNACK is not set ++CONFIG_ATH9K_WOW=y ++CONFIG_ATH9K_RFKILL=y ++CONFIG_ATH9K_CHANNEL_CONTEXT=y ++CONFIG_ATH9K_PCOEM=y ++CONFIG_ATH9K_HTC=m ++# CONFIG_ATH9K_HTC_DEBUGFS is not set ++CONFIG_CARL9170=m ++CONFIG_CARL9170_LEDS=y ++CONFIG_CARL9170_WPC=y ++CONFIG_CARL9170_HWRNG=y ++CONFIG_ATH6KL=m ++CONFIG_ATH6KL_SDIO=m ++CONFIG_ATH6KL_USB=m ++# CONFIG_ATH6KL_DEBUG is not set ++CONFIG_AR5523=m ++CONFIG_WIL6210=m ++CONFIG_WIL6210_ISR_COR=y ++CONFIG_ATH10K=m ++CONFIG_ATH10K_PCI=m ++# CONFIG_ATH10K_DEBUG is not set ++# CONFIG_ATH10K_DEBUGFS is not set ++CONFIG_WCN36XX=m ++# CONFIG_WCN36XX_DEBUGFS is not set ++CONFIG_B43=m ++CONFIG_B43_BCMA=y ++CONFIG_B43_SSB=y ++CONFIG_B43_BUSES_BCMA_AND_SSB=y ++# CONFIG_B43_BUSES_BCMA is not set ++# CONFIG_B43_BUSES_SSB is not set ++CONFIG_B43_PCI_AUTOSELECT=y ++CONFIG_B43_PCICORE_AUTOSELECT=y ++CONFIG_B43_SDIO=y ++CONFIG_B43_BCMA_PIO=y ++CONFIG_B43_PIO=y ++CONFIG_B43_PHY_G=y ++CONFIG_B43_PHY_N=y ++CONFIG_B43_PHY_LP=y ++CONFIG_B43_PHY_HT=y ++CONFIG_B43_LEDS=y ++CONFIG_B43_HWRNG=y ++# CONFIG_B43_DEBUG is not set ++CONFIG_B43LEGACY=m ++CONFIG_B43LEGACY_PCI_AUTOSELECT=y ++CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y ++CONFIG_B43LEGACY_LEDS=y ++CONFIG_B43LEGACY_HWRNG=y ++# CONFIG_B43LEGACY_DEBUG is not set ++CONFIG_B43LEGACY_DMA=y ++CONFIG_B43LEGACY_PIO=y ++CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y ++# CONFIG_B43LEGACY_DMA_MODE is not set ++# CONFIG_B43LEGACY_PIO_MODE is not set ++CONFIG_BRCMUTIL=m ++CONFIG_BRCMSMAC=m ++CONFIG_BRCMFMAC=m ++CONFIG_BRCMFMAC_PROTO_BCDC=y ++CONFIG_BRCMFMAC_PROTO_MSGBUF=y ++CONFIG_BRCMFMAC_SDIO=y ++# CONFIG_BRCMFMAC_USB is not set ++CONFIG_BRCMFMAC_PCIE=y ++# CONFIG_BRCM_TRACING is not set ++# CONFIG_BRCMDBG is not set ++CONFIG_HOSTAP=m ++CONFIG_HOSTAP_FIRMWARE=y ++CONFIG_HOSTAP_FIRMWARE_NVRAM=y ++CONFIG_HOSTAP_PLX=m ++CONFIG_HOSTAP_PCI=m ++CONFIG_IPW2100=m ++CONFIG_IPW2100_MONITOR=y ++# CONFIG_IPW2100_DEBUG is not set ++CONFIG_IPW2200=m ++CONFIG_IPW2200_MONITOR=y ++CONFIG_IPW2200_RADIOTAP=y ++CONFIG_IPW2200_PROMISCUOUS=y ++CONFIG_IPW2200_QOS=y ++CONFIG_IPW2200_DEBUG=y ++CONFIG_LIBIPW=m ++# CONFIG_LIBIPW_DEBUG is not set ++CONFIG_IWLWIFI=m ++CONFIG_IWLWIFI_LEDS=y ++CONFIG_IWLDVM=m ++CONFIG_IWLMVM=m ++CONFIG_IWLWIFI_OPMODE_MODULAR=y ++CONFIG_IWLWIFI_BCAST_FILTERING=y ++CONFIG_IWLWIFI_UAPSD=y ++ ++# ++# Debugging Options ++# ++# CONFIG_IWLWIFI_DEBUG is not set ++CONFIG_IWLEGACY=m ++CONFIG_IWL4965=m ++CONFIG_IWL3945=m ++ ++# ++# iwl3945 / iwl4965 Debugging Options ++# ++# CONFIG_IWLEGACY_DEBUG is not set ++CONFIG_LIBERTAS=m ++CONFIG_LIBERTAS_USB=m ++CONFIG_LIBERTAS_SDIO=m ++CONFIG_LIBERTAS_SPI=m ++# CONFIG_LIBERTAS_DEBUG is not set ++CONFIG_LIBERTAS_MESH=y ++CONFIG_HERMES=m ++CONFIG_HERMES_PRISM=y ++CONFIG_HERMES_CACHE_FW_ON_INIT=y ++CONFIG_PLX_HERMES=m ++CONFIG_TMD_HERMES=m ++CONFIG_NORTEL_HERMES=m ++CONFIG_PCI_HERMES=m ++CONFIG_ORINOCO_USB=m ++CONFIG_P54_COMMON=m ++CONFIG_P54_USB=m ++CONFIG_P54_PCI=m ++CONFIG_P54_SPI=m ++CONFIG_P54_SPI_DEFAULT_EEPROM=y ++CONFIG_P54_LEDS=y ++CONFIG_RT2X00=m ++CONFIG_RT2400PCI=m ++CONFIG_RT2500PCI=m ++CONFIG_RT61PCI=m ++CONFIG_RT2800PCI=m ++CONFIG_RT2800PCI_RT33XX=y ++CONFIG_RT2800PCI_RT35XX=y ++CONFIG_RT2800PCI_RT53XX=y ++CONFIG_RT2800PCI_RT3290=y ++CONFIG_RT2500USB=m ++CONFIG_RT73USB=m ++CONFIG_RT2800USB=m ++CONFIG_RT2800USB_RT33XX=y ++CONFIG_RT2800USB_RT35XX=y ++CONFIG_RT2800USB_RT3573=y ++CONFIG_RT2800USB_RT53XX=y ++CONFIG_RT2800USB_RT55XX=y ++CONFIG_RT2800USB_UNKNOWN=y ++CONFIG_RT2800_LIB=m ++CONFIG_RT2800_LIB_MMIO=m ++CONFIG_RT2X00_LIB_MMIO=m ++CONFIG_RT2X00_LIB_PCI=m ++CONFIG_RT2X00_LIB_USB=m ++CONFIG_RT2X00_LIB=m ++CONFIG_RT2X00_LIB_FIRMWARE=y ++CONFIG_RT2X00_LIB_CRYPTO=y ++CONFIG_RT2X00_LIB_LEDS=y ++# CONFIG_RT2X00_DEBUG is not set ++CONFIG_RTL_CARDS=m ++CONFIG_RTL8192CE=m ++CONFIG_RTL8192SE=m ++CONFIG_RTL8192DE=m ++CONFIG_RTL8723AE=m ++CONFIG_RTL8723BE=m ++CONFIG_RTL8188EE=m ++CONFIG_RTL8192EE=m ++CONFIG_RTL8821AE=m ++CONFIG_RTL8192CU=m ++CONFIG_RTLWIFI=m ++CONFIG_RTLWIFI_PCI=m ++CONFIG_RTLWIFI_USB=m ++CONFIG_RTLWIFI_DEBUG=y ++CONFIG_RTL8192C_COMMON=m ++CONFIG_RTL8723_COMMON=m ++CONFIG_RTLBTCOEXIST=m ++CONFIG_WL_TI=y ++CONFIG_WL1251=m ++CONFIG_WL1251_SPI=m ++CONFIG_WL1251_SDIO=m ++CONFIG_WL12XX=m ++CONFIG_WL18XX=m ++CONFIG_WLCORE=m ++CONFIG_WLCORE_SPI=m ++CONFIG_WLCORE_SDIO=m ++CONFIG_WILINK_PLATFORM_DATA=y ++CONFIG_ZD1211RW=m ++# CONFIG_ZD1211RW_DEBUG is not set ++CONFIG_MWIFIEX=m ++CONFIG_MWIFIEX_SDIO=m ++CONFIG_MWIFIEX_PCIE=m ++CONFIG_MWIFIEX_USB=m ++CONFIG_CW1200=m ++CONFIG_CW1200_WLAN_SDIO=m ++CONFIG_CW1200_WLAN_SPI=m ++CONFIG_RSI_91X=m ++CONFIG_RSI_DEBUGFS=y ++CONFIG_RSI_SDIO=m ++CONFIG_RSI_USB=m ++ ++# ++# Enable WiMAX (Networking options) to see the WiMAX drivers ++# ++CONFIG_WAN=y ++CONFIG_HDLC=m ++CONFIG_HDLC_RAW=m ++CONFIG_HDLC_RAW_ETH=m ++CONFIG_HDLC_CISCO=m ++CONFIG_HDLC_FR=m ++CONFIG_HDLC_PPP=m ++ ++# ++# X.25/LAPB support is disabled ++# ++# CONFIG_PCI200SYN is not set ++CONFIG_WANXL=m ++# CONFIG_WANXL_BUILD_FIRMWARE is not set ++CONFIG_PC300TOO=m ++CONFIG_FARSYNC=m ++CONFIG_DSCC4=m ++# CONFIG_DSCC4_PCISYNC is not set ++# CONFIG_DSCC4_PCI_RST is not set ++# CONFIG_DLCI is not set ++# CONFIG_VMXNET3 is not set ++CONFIG_ISDN=y ++CONFIG_ISDN_I4L=m ++# CONFIG_ISDN_PPP is not set ++# CONFIG_ISDN_AUDIO is not set ++ ++# ++# ISDN feature submodules ++# ++# CONFIG_ISDN_DIVERSION is not set ++ ++# ++# ISDN4Linux hardware drivers ++# ++ ++# ++# Passive cards ++# ++# CONFIG_ISDN_DRV_HISAX is not set ++ ++# ++# Active cards ++# ++CONFIG_ISDN_CAPI=m ++CONFIG_CAPI_TRACE=y ++# CONFIG_ISDN_CAPI_CAPI20 is not set ++# CONFIG_ISDN_CAPI_CAPIDRV is not set ++ ++# ++# CAPI hardware drivers ++# ++# CONFIG_CAPI_AVM is not set ++# CONFIG_CAPI_EICON is not set ++CONFIG_ISDN_DRV_GIGASET=m ++CONFIG_GIGASET_CAPI=y ++# CONFIG_GIGASET_I4L is not set ++# CONFIG_GIGASET_DUMMYLL is not set ++# CONFIG_GIGASET_BASE is not set ++# CONFIG_GIGASET_M105 is not set ++# CONFIG_GIGASET_M101 is not set ++# CONFIG_GIGASET_DEBUG is not set ++CONFIG_HYSDN=m ++CONFIG_HYSDN_CAPI=y ++CONFIG_MISDN=m ++CONFIG_MISDN_DSP=m ++CONFIG_MISDN_L1OIP=m ++ ++# ++# mISDN hardware drivers ++# ++CONFIG_MISDN_HFCPCI=m ++CONFIG_MISDN_HFCMULTI=m ++CONFIG_MISDN_HFCUSB=m ++CONFIG_MISDN_AVMFRITZ=m ++CONFIG_MISDN_SPEEDFAX=m ++CONFIG_MISDN_INFINEON=m ++CONFIG_MISDN_W6692=m ++CONFIG_MISDN_NETJET=m ++CONFIG_MISDN_IPAC=m ++CONFIG_MISDN_ISAR=m ++CONFIG_ISDN_HDLC=m ++ ++# ++# Input device support ++# ++CONFIG_INPUT=y ++CONFIG_INPUT_FF_MEMLESS=y ++CONFIG_INPUT_POLLDEV=y ++CONFIG_INPUT_SPARSEKMAP=y ++CONFIG_INPUT_MATRIXKMAP=y ++ ++# ++# Userland interfaces ++# ++CONFIG_INPUT_MOUSEDEV=y ++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set ++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 ++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 ++CONFIG_INPUT_JOYDEV=m ++CONFIG_INPUT_EVDEV=y ++CONFIG_INPUT_EVBUG=m ++ ++# ++# Input Device Drivers ++# ++CONFIG_INPUT_KEYBOARD=y ++# CONFIG_KEYBOARD_ADP5588 is not set ++# CONFIG_KEYBOARD_ADP5589 is not set ++CONFIG_KEYBOARD_ATKBD=y ++# CONFIG_KEYBOARD_QT1070 is not set ++# CONFIG_KEYBOARD_QT2160 is not set ++# CONFIG_KEYBOARD_LKKBD is not set ++CONFIG_KEYBOARD_GPIO=y ++CONFIG_KEYBOARD_GPIO_POLLED=y ++CONFIG_KEYBOARD_TCA6416=m ++CONFIG_KEYBOARD_TCA8418=m ++CONFIG_KEYBOARD_MATRIX=m ++# CONFIG_KEYBOARD_LM8323 is not set ++# CONFIG_KEYBOARD_LM8333 is not set ++# CONFIG_KEYBOARD_MAX7359 is not set ++# CONFIG_KEYBOARD_MCS is not set ++# CONFIG_KEYBOARD_MPR121 is not set ++CONFIG_KEYBOARD_IMX=y ++# CONFIG_KEYBOARD_NEWTON is not set ++# CONFIG_KEYBOARD_OPENCORES is not set ++# CONFIG_KEYBOARD_SAMSUNG is not set ++# CONFIG_KEYBOARD_STOWAWAY is not set ++# CONFIG_KEYBOARD_SUNKBD is not set ++# CONFIG_KEYBOARD_OMAP4 is not set ++CONFIG_KEYBOARD_XTKBD=m ++# CONFIG_KEYBOARD_CAP11XX is not set ++# CONFIG_KEYBOARD_BCM is not set ++CONFIG_INPUT_MOUSE=y ++CONFIG_MOUSE_PS2=m ++CONFIG_MOUSE_PS2_ALPS=y ++CONFIG_MOUSE_PS2_LOGIPS2PP=y ++CONFIG_MOUSE_PS2_SYNAPTICS=y ++CONFIG_MOUSE_PS2_CYPRESS=y ++CONFIG_MOUSE_PS2_TRACKPOINT=y ++CONFIG_MOUSE_PS2_ELANTECH=y ++# CONFIG_MOUSE_PS2_SENTELIC is not set ++# CONFIG_MOUSE_PS2_TOUCHKIT is not set ++CONFIG_MOUSE_PS2_FOCALTECH=y ++CONFIG_MOUSE_SERIAL=m ++CONFIG_MOUSE_APPLETOUCH=m ++CONFIG_MOUSE_BCM5974=m ++CONFIG_MOUSE_CYAPA=m ++CONFIG_MOUSE_ELAN_I2C=m ++CONFIG_MOUSE_ELAN_I2C_I2C=y ++# CONFIG_MOUSE_ELAN_I2C_SMBUS is not set ++CONFIG_MOUSE_VSXXXAA=m ++CONFIG_MOUSE_GPIO=m ++CONFIG_MOUSE_SYNAPTICS_I2C=m ++CONFIG_MOUSE_SYNAPTICS_USB=m ++CONFIG_INPUT_JOYSTICK=y ++CONFIG_JOYSTICK_ANALOG=m ++CONFIG_JOYSTICK_A3D=m ++CONFIG_JOYSTICK_ADI=m ++CONFIG_JOYSTICK_COBRA=m ++CONFIG_JOYSTICK_GF2K=m ++CONFIG_JOYSTICK_GRIP=m ++CONFIG_JOYSTICK_GRIP_MP=m ++CONFIG_JOYSTICK_GUILLEMOT=m ++CONFIG_JOYSTICK_INTERACT=m ++CONFIG_JOYSTICK_SIDEWINDER=m ++CONFIG_JOYSTICK_TMDC=m ++CONFIG_JOYSTICK_IFORCE=m ++CONFIG_JOYSTICK_IFORCE_USB=y ++CONFIG_JOYSTICK_IFORCE_232=y ++CONFIG_JOYSTICK_WARRIOR=m ++CONFIG_JOYSTICK_MAGELLAN=m ++CONFIG_JOYSTICK_SPACEORB=m ++CONFIG_JOYSTICK_SPACEBALL=m ++CONFIG_JOYSTICK_STINGER=m ++CONFIG_JOYSTICK_TWIDJOY=m ++CONFIG_JOYSTICK_ZHENHUA=m ++CONFIG_JOYSTICK_AS5011=m ++CONFIG_JOYSTICK_JOYDUMP=m ++CONFIG_JOYSTICK_XPAD=m ++CONFIG_JOYSTICK_XPAD_FF=y ++CONFIG_JOYSTICK_XPAD_LEDS=y ++# CONFIG_INPUT_TABLET is not set ++CONFIG_INPUT_TOUCHSCREEN=y ++CONFIG_OF_TOUCHSCREEN=y ++# CONFIG_TOUCHSCREEN_ADS7846 is not set ++# CONFIG_TOUCHSCREEN_AD7877 is not set ++# CONFIG_TOUCHSCREEN_AD7879 is not set ++# CONFIG_TOUCHSCREEN_AR1021_I2C is not set ++# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set ++# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set ++# CONFIG_TOUCHSCREEN_BU21013 is not set ++# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set ++# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set ++# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set ++# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set ++# CONFIG_TOUCHSCREEN_DA9052 is not set ++# CONFIG_TOUCHSCREEN_DYNAPRO is not set ++# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set ++CONFIG_TOUCHSCREEN_EETI=m ++CONFIG_TOUCHSCREEN_EGALAX=m ++CONFIG_TOUCHSCREEN_FUJITSU=m ++# CONFIG_TOUCHSCREEN_GOODIX is not set ++CONFIG_TOUCHSCREEN_ILI210X=m ++CONFIG_TOUCHSCREEN_GUNZE=m ++CONFIG_TOUCHSCREEN_ELAN=m ++CONFIG_TOUCHSCREEN_ELO=m ++CONFIG_TOUCHSCREEN_WACOM_W8001=m ++CONFIG_TOUCHSCREEN_WACOM_I2C=m ++CONFIG_TOUCHSCREEN_MAX11801=m ++CONFIG_TOUCHSCREEN_MCS5000=m ++CONFIG_TOUCHSCREEN_MMS114=m ++CONFIG_TOUCHSCREEN_MTOUCH=m ++CONFIG_TOUCHSCREEN_INEXIO=m ++CONFIG_TOUCHSCREEN_MK712=m ++CONFIG_TOUCHSCREEN_PENMOUNT=m ++CONFIG_TOUCHSCREEN_EDT_FT5X06=m ++CONFIG_TOUCHSCREEN_TOUCHRIGHT=m ++CONFIG_TOUCHSCREEN_TOUCHWIN=m ++CONFIG_TOUCHSCREEN_PIXCIR=m ++CONFIG_TOUCHSCREEN_WM97XX=m ++CONFIG_TOUCHSCREEN_WM9705=y ++CONFIG_TOUCHSCREEN_WM9712=y ++CONFIG_TOUCHSCREEN_WM9713=y ++CONFIG_TOUCHSCREEN_USB_COMPOSITE=m ++CONFIG_TOUCHSCREEN_MC13783=m ++CONFIG_TOUCHSCREEN_USB_EGALAX=y ++CONFIG_TOUCHSCREEN_USB_PANJIT=y ++CONFIG_TOUCHSCREEN_USB_3M=y ++CONFIG_TOUCHSCREEN_USB_ITM=y ++CONFIG_TOUCHSCREEN_USB_ETURBO=y ++CONFIG_TOUCHSCREEN_USB_GUNZE=y ++CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y ++CONFIG_TOUCHSCREEN_USB_IRTOUCH=y ++CONFIG_TOUCHSCREEN_USB_IDEALTEK=y ++CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y ++CONFIG_TOUCHSCREEN_USB_GOTOP=y ++CONFIG_TOUCHSCREEN_USB_JASTEC=y ++CONFIG_TOUCHSCREEN_USB_ELO=y ++CONFIG_TOUCHSCREEN_USB_E2I=y ++CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y ++CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y ++CONFIG_TOUCHSCREEN_USB_NEXIO=y ++CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y ++CONFIG_TOUCHSCREEN_TOUCHIT213=m ++CONFIG_TOUCHSCREEN_TSC_SERIO=m ++CONFIG_TOUCHSCREEN_TSC2005=m ++CONFIG_TOUCHSCREEN_TSC2007=m ++CONFIG_TOUCHSCREEN_ST1232=m ++CONFIG_TOUCHSCREEN_SUR40=m ++# CONFIG_TOUCHSCREEN_SX8654 is not set ++CONFIG_TOUCHSCREEN_TPS6507X=m ++CONFIG_TOUCHSCREEN_ZFORCE=m ++CONFIG_INPUT_MISC=y ++CONFIG_INPUT_AD714X=m ++CONFIG_INPUT_AD714X_I2C=m ++CONFIG_INPUT_AD714X_SPI=m ++CONFIG_INPUT_BMA150=m ++# CONFIG_INPUT_E3X0_BUTTON is not set ++CONFIG_INPUT_MC13783_PWRBUTTON=m ++CONFIG_INPUT_MMA8450=y ++CONFIG_INPUT_MPU3050=m ++CONFIG_INPUT_GP2A=m ++CONFIG_INPUT_GPIO_BEEPER=m ++CONFIG_INPUT_GPIO_TILT_POLLED=m ++CONFIG_INPUT_ATI_REMOTE2=m ++CONFIG_INPUT_KEYSPAN_REMOTE=m ++CONFIG_INPUT_KXTJ9=m ++CONFIG_INPUT_KXTJ9_POLLED_MODE=y ++CONFIG_INPUT_POWERMATE=m ++CONFIG_INPUT_YEALINK=m ++CONFIG_INPUT_CM109=m ++# CONFIG_INPUT_REGULATOR_HAPTIC is not set ++CONFIG_INPUT_UINPUT=m ++CONFIG_INPUT_PCF8574=m ++CONFIG_INPUT_PWM_BEEPER=m ++CONFIG_INPUT_GPIO_ROTARY_ENCODER=m ++CONFIG_INPUT_DA9052_ONKEY=m ++CONFIG_INPUT_ADXL34X=m ++CONFIG_INPUT_ADXL34X_I2C=m ++CONFIG_INPUT_ADXL34X_SPI=m ++CONFIG_INPUT_IMS_PCU=m ++CONFIG_INPUT_CMA3000=m ++CONFIG_INPUT_CMA3000_I2C=m ++CONFIG_INPUT_SOC_BUTTON_ARRAY=m ++CONFIG_INPUT_DRV260X_HAPTICS=m ++CONFIG_INPUT_DRV2667_HAPTICS=m ++ ++# ++# Hardware I/O ports ++# ++CONFIG_SERIO=y ++CONFIG_SERIO_SERPORT=m ++# CONFIG_SERIO_PCIPS2 is not set ++CONFIG_SERIO_LIBPS2=y ++CONFIG_SERIO_RAW=m ++# CONFIG_SERIO_ALTERA_PS2 is not set ++# CONFIG_SERIO_PS2MULT is not set ++# CONFIG_SERIO_ARC_PS2 is not set ++# CONFIG_SERIO_APBPS2 is not set ++CONFIG_GAMEPORT=m ++# CONFIG_GAMEPORT_NS558 is not set ++# CONFIG_GAMEPORT_L4 is not set ++# CONFIG_GAMEPORT_EMU10K1 is not set ++# CONFIG_GAMEPORT_FM801 is not set ++ ++# ++# Character devices ++# ++CONFIG_TTY=y ++CONFIG_VT=y ++CONFIG_CONSOLE_TRANSLATIONS=y ++CONFIG_VT_CONSOLE=y ++CONFIG_VT_CONSOLE_SLEEP=y ++CONFIG_HW_CONSOLE=y ++CONFIG_VT_HW_CONSOLE_BINDING=y ++CONFIG_UNIX98_PTYS=y ++CONFIG_DEVPTS_MULTIPLE_INSTANCES=y ++CONFIG_LEGACY_PTYS=y ++CONFIG_LEGACY_PTY_COUNT=256 ++# CONFIG_SERIAL_NONSTANDARD is not set ++# CONFIG_NOZOMI is not set ++# CONFIG_N_GSM is not set ++# CONFIG_TRACE_SINK is not set ++CONFIG_DEVMEM=y ++# CONFIG_DEVKMEM is not set ++ ++# ++# Serial drivers ++# ++CONFIG_SERIAL_EARLYCON=y ++CONFIG_SERIAL_8250=m ++CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y ++CONFIG_SERIAL_8250_DMA=y ++CONFIG_SERIAL_8250_PCI=m ++CONFIG_SERIAL_8250_NR_UARTS=4 ++CONFIG_SERIAL_8250_RUNTIME_UARTS=4 ++# CONFIG_SERIAL_8250_EXTENDED is not set ++# CONFIG_SERIAL_8250_DW is not set ++# CONFIG_SERIAL_8250_EM is not set ++ ++# ++# Non-8250 serial port support ++# ++CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST=y ++# CONFIG_SERIAL_MAX3100 is not set ++# CONFIG_SERIAL_MAX310X is not set ++CONFIG_SERIAL_IMX=y ++CONFIG_SERIAL_IMX_CONSOLE=y ++CONFIG_SERIAL_CORE=y ++CONFIG_SERIAL_CORE_CONSOLE=y ++# CONFIG_SERIAL_JSM is not set ++# CONFIG_SERIAL_OF_PLATFORM is not set ++# CONFIG_SERIAL_SCCNXP is not set ++# CONFIG_SERIAL_SC16IS7XX is not set ++# CONFIG_SERIAL_BCM63XX is not set ++# CONFIG_SERIAL_ALTERA_JTAGUART is not set ++# CONFIG_SERIAL_ALTERA_UART is not set ++# CONFIG_SERIAL_IFX6X60 is not set ++# CONFIG_SERIAL_XILINX_PS_UART is not set ++# CONFIG_SERIAL_ARC is not set ++# CONFIG_SERIAL_RP2 is not set ++CONFIG_SERIAL_FSL_LPUART=m ++# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set ++# CONFIG_SERIAL_ST_ASC is not set ++CONFIG_TTY_PRINTK=m ++# CONFIG_HVC_DCC is not set ++# CONFIG_IPMI_HANDLER is not set ++CONFIG_HW_RANDOM=y ++CONFIG_HW_RANDOM_TIMERIOMEM=m ++# CONFIG_R3964 is not set ++# CONFIG_APPLICOM is not set ++CONFIG_RAW_DRIVER=m ++CONFIG_MAX_RAW_DEVS=256 ++# CONFIG_TCG_TPM is not set ++CONFIG_DEVPORT=y ++# CONFIG_XILLYBUS is not set ++ ++# ++# I2C support ++# ++CONFIG_I2C=y ++CONFIG_I2C_BOARDINFO=y ++CONFIG_I2C_COMPAT=y ++CONFIG_I2C_CHARDEV=y ++CONFIG_I2C_MUX=y ++ ++# ++# Multiplexer I2C Chip support ++# ++CONFIG_I2C_ARB_GPIO_CHALLENGE=y ++CONFIG_I2C_MUX_GPIO=y ++CONFIG_I2C_MUX_PCA9541=y ++CONFIG_I2C_MUX_PCA954x=y ++CONFIG_I2C_MUX_PINCTRL=y ++CONFIG_I2C_HELPER_AUTO=y ++CONFIG_I2C_ALGOBIT=y ++ ++# ++# I2C Hardware Bus support ++# ++ ++# ++# PC SMBus host controller drivers ++# ++# CONFIG_I2C_ALI1535 is not set ++# CONFIG_I2C_ALI1563 is not set ++# CONFIG_I2C_ALI15X3 is not set ++# CONFIG_I2C_AMD756 is not set ++# CONFIG_I2C_AMD8111 is not set ++# CONFIG_I2C_I801 is not set ++# CONFIG_I2C_ISCH is not set ++# CONFIG_I2C_PIIX4 is not set ++# CONFIG_I2C_NFORCE2 is not set ++# CONFIG_I2C_SIS5595 is not set ++# CONFIG_I2C_SIS630 is not set ++# CONFIG_I2C_SIS96X is not set ++# CONFIG_I2C_VIA is not set ++# CONFIG_I2C_VIAPRO is not set ++ ++# ++# I2C system bus drivers (mostly embedded / system-on-chip) ++# ++# CONFIG_I2C_CBUS_GPIO is not set ++CONFIG_I2C_DESIGNWARE_CORE=m ++CONFIG_I2C_DESIGNWARE_PLATFORM=m ++# CONFIG_I2C_DESIGNWARE_PCI is not set ++CONFIG_I2C_GPIO=y ++CONFIG_I2C_IMX=y ++CONFIG_I2C_OCORES=y ++# CONFIG_I2C_PCA_PLATFORM is not set ++# CONFIG_I2C_PXA_PCI is not set ++# CONFIG_I2C_RK3X is not set ++# CONFIG_I2C_SIMTEC is not set ++# CONFIG_I2C_XILINX is not set ++ ++# ++# External I2C/SMBus adapter drivers ++# ++# CONFIG_I2C_DIOLAN_U2C is not set ++# CONFIG_I2C_PARPORT_LIGHT is not set ++# CONFIG_I2C_ROBOTFUZZ_OSIF is not set ++# CONFIG_I2C_TAOS_EVM is not set ++# CONFIG_I2C_TINY_USB is not set ++ ++# ++# Other I2C/SMBus bus drivers ++# ++# CONFIG_I2C_STUB is not set ++CONFIG_I2C_SLAVE=y ++CONFIG_I2C_SLAVE_EEPROM=m ++# CONFIG_I2C_DEBUG_CORE is not set ++# CONFIG_I2C_DEBUG_ALGO is not set ++# CONFIG_I2C_DEBUG_BUS is not set ++CONFIG_SPI=y ++# CONFIG_SPI_DEBUG is not set ++CONFIG_SPI_MASTER=y ++ ++# ++# SPI Master Controller Drivers ++# ++# CONFIG_SPI_ALTERA is not set ++CONFIG_SPI_BITBANG=m ++# CONFIG_SPI_CADENCE is not set ++CONFIG_SPI_GPIO=m ++CONFIG_SPI_IMX=m ++# CONFIG_SPI_FSL_SPI is not set ++# CONFIG_SPI_OC_TINY is not set ++# CONFIG_SPI_PXA2XX is not set ++# CONFIG_SPI_PXA2XX_PCI is not set ++# CONFIG_SPI_ROCKCHIP is not set ++# CONFIG_SPI_SC18IS602 is not set ++# CONFIG_SPI_XCOMM is not set ++# CONFIG_SPI_XILINX is not set ++# CONFIG_SPI_DESIGNWARE is not set ++ ++# ++# SPI Protocol Masters ++# ++CONFIG_SPI_SPIDEV=y ++# CONFIG_SPI_TLE62X0 is not set ++# CONFIG_SPMI is not set ++# CONFIG_HSI is not set ++ ++# ++# PPS support ++# ++CONFIG_PPS=y ++# CONFIG_PPS_DEBUG is not set ++# CONFIG_NTP_PPS is not set ++ ++# ++# PPS clients support ++# ++# CONFIG_PPS_CLIENT_KTIMER is not set ++CONFIG_PPS_CLIENT_LDISC=y ++CONFIG_PPS_CLIENT_GPIO=y ++ ++# ++# PPS generators support ++# ++ ++# ++# PTP clock support ++# ++CONFIG_PTP_1588_CLOCK=y ++ ++# ++# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. ++# ++CONFIG_PINCTRL=y ++ ++# ++# Pin controllers ++# ++CONFIG_PINMUX=y ++CONFIG_PINCONF=y ++CONFIG_GENERIC_PINCONF=y ++# CONFIG_DEBUG_PINCTRL is not set ++# CONFIG_PINCTRL_AMD is not set ++CONFIG_PINCTRL_SINGLE=y ++CONFIG_PINCTRL_IMX=y ++CONFIG_PINCTRL_IMX6Q=y ++CONFIG_PINCTRL_IMX6SL=y ++CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y ++CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y ++CONFIG_ARCH_REQUIRE_GPIOLIB=y ++CONFIG_GPIOLIB=y ++CONFIG_GPIO_DEVRES=y ++CONFIG_OF_GPIO=y ++CONFIG_GPIOLIB_IRQCHIP=y ++# CONFIG_DEBUG_GPIO is not set ++CONFIG_GPIO_SYSFS=y ++CONFIG_GPIO_GENERIC=y ++ ++# ++# Memory mapped GPIO drivers ++# ++CONFIG_GPIO_74XX_MMIO=y ++# CONFIG_GPIO_ALTERA is not set ++# CONFIG_GPIO_DWAPB is not set ++# CONFIG_GPIO_EM is not set ++CONFIG_GPIO_GENERIC_PLATFORM=y ++# CONFIG_GPIO_GRGPIO is not set ++CONFIG_GPIO_MXC=y ++# CONFIG_GPIO_SCH311X is not set ++CONFIG_GPIO_SYSCON=y ++# CONFIG_GPIO_VX855 is not set ++# CONFIG_GPIO_ZEVIO is not set ++ ++# ++# I2C GPIO expanders ++# ++CONFIG_GPIO_ADP5588=m ++CONFIG_GPIO_ADNP=m ++# CONFIG_GPIO_MAX7300 is not set ++# CONFIG_GPIO_MAX732X is not set ++CONFIG_GPIO_PCA953X=y ++CONFIG_GPIO_PCA953X_IRQ=y ++CONFIG_GPIO_PCF857X=m ++CONFIG_GPIO_SX150X=y ++ ++# ++# MFD GPIO expanders ++# ++# CONFIG_GPIO_DA9052 is not set ++ ++# ++# PCI GPIO expanders ++# ++# CONFIG_GPIO_AMD8111 is not set ++# CONFIG_GPIO_BT8XX is not set ++# CONFIG_GPIO_ML_IOH is not set ++# CONFIG_GPIO_RDC321X is not set ++ ++# ++# SPI GPIO expanders ++# ++CONFIG_GPIO_74X164=y ++# CONFIG_GPIO_MAX7301 is not set ++CONFIG_GPIO_MCP23S08=y ++CONFIG_GPIO_MC33880=y ++ ++# ++# USB GPIO expanders ++# ++CONFIG_W1=y ++CONFIG_W1_CON=y ++ ++# ++# 1-wire Bus Masters ++# ++CONFIG_W1_MASTER_MATROX=m ++CONFIG_W1_MASTER_DS2490=m ++CONFIG_W1_MASTER_DS2482=m ++CONFIG_W1_MASTER_MXC=m ++CONFIG_W1_MASTER_DS1WM=m ++CONFIG_W1_MASTER_GPIO=m ++ ++# ++# 1-wire Slaves ++# ++CONFIG_W1_SLAVE_THERM=m ++CONFIG_W1_SLAVE_SMEM=m ++CONFIG_W1_SLAVE_DS2408=m ++CONFIG_W1_SLAVE_DS2408_READBACK=y ++CONFIG_W1_SLAVE_DS2413=m ++CONFIG_W1_SLAVE_DS2406=m ++CONFIG_W1_SLAVE_DS2423=m ++CONFIG_W1_SLAVE_DS2431=m ++CONFIG_W1_SLAVE_DS2433=m ++CONFIG_W1_SLAVE_DS2433_CRC=y ++CONFIG_W1_SLAVE_DS2760=m ++CONFIG_W1_SLAVE_DS2780=m ++CONFIG_W1_SLAVE_DS2781=m ++CONFIG_W1_SLAVE_DS28E04=m ++CONFIG_W1_SLAVE_BQ27000=m ++CONFIG_POWER_SUPPLY=y ++# CONFIG_POWER_SUPPLY_DEBUG is not set ++# CONFIG_PDA_POWER is not set ++# CONFIG_GENERIC_ADC_BATTERY is not set ++CONFIG_TEST_POWER=m ++# CONFIG_BATTERY_DS2760 is not set ++# CONFIG_BATTERY_DS2780 is not set ++# CONFIG_BATTERY_DS2781 is not set ++# CONFIG_BATTERY_DS2782 is not set ++# CONFIG_BATTERY_SBS is not set ++# CONFIG_BATTERY_BQ27x00 is not set ++# CONFIG_BATTERY_DA9052 is not set ++# CONFIG_BATTERY_MAX17040 is not set ++# CONFIG_BATTERY_MAX17042 is not set ++# CONFIG_CHARGER_ISP1704 is not set ++# CONFIG_CHARGER_MAX8903 is not set ++# CONFIG_CHARGER_LP8727 is not set ++CONFIG_CHARGER_GPIO=m ++# CONFIG_CHARGER_MANAGER is not set ++# CONFIG_CHARGER_BQ2415X is not set ++# CONFIG_CHARGER_BQ24190 is not set ++# CONFIG_CHARGER_BQ24735 is not set ++# CONFIG_CHARGER_SMB347 is not set ++# CONFIG_BATTERY_GAUGE_LTC2941 is not set ++CONFIG_POWER_RESET=y ++# CONFIG_POWER_RESET_BRCMSTB is not set ++CONFIG_POWER_RESET_GPIO=y ++CONFIG_POWER_RESET_GPIO_RESTART=y ++CONFIG_POWER_RESET_IMX=y ++CONFIG_POWER_RESET_LTC2952=y ++CONFIG_POWER_RESET_RESTART=y ++CONFIG_POWER_RESET_VERSATILE=y ++# CONFIG_POWER_RESET_SNVS is not set ++CONFIG_POWER_RESET_SYSCON=y ++# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set ++CONFIG_POWER_AVS=y ++CONFIG_HWMON=y ++# CONFIG_HWMON_VID is not set ++# CONFIG_HWMON_DEBUG_CHIP is not set ++ ++# ++# Native drivers ++# ++# CONFIG_SENSORS_AD7314 is not set ++# CONFIG_SENSORS_AD7414 is not set ++# CONFIG_SENSORS_AD7418 is not set ++# CONFIG_SENSORS_ADM1021 is not set ++# CONFIG_SENSORS_ADM1025 is not set ++# CONFIG_SENSORS_ADM1026 is not set ++# CONFIG_SENSORS_ADM1029 is not set ++# CONFIG_SENSORS_ADM1031 is not set ++# CONFIG_SENSORS_ADM9240 is not set ++# CONFIG_SENSORS_ADT7310 is not set ++# CONFIG_SENSORS_ADT7410 is not set ++# CONFIG_SENSORS_ADT7411 is not set ++# CONFIG_SENSORS_ADT7462 is not set ++# CONFIG_SENSORS_ADT7470 is not set ++# CONFIG_SENSORS_ADT7475 is not set ++# CONFIG_SENSORS_ASC7621 is not set ++# CONFIG_SENSORS_ATXP1 is not set ++# CONFIG_SENSORS_DS620 is not set ++# CONFIG_SENSORS_DS1621 is not set ++# CONFIG_SENSORS_DA9052_ADC is not set ++# CONFIG_SENSORS_I5K_AMB is not set ++# CONFIG_SENSORS_F71805F is not set ++# CONFIG_SENSORS_F71882FG is not set ++# CONFIG_SENSORS_F75375S is not set ++CONFIG_SENSORS_MC13783_ADC=y ++# CONFIG_SENSORS_GL518SM is not set ++# CONFIG_SENSORS_GL520SM is not set ++# CONFIG_SENSORS_G760A is not set ++# CONFIG_SENSORS_G762 is not set ++# CONFIG_SENSORS_GPIO_FAN is not set ++# CONFIG_SENSORS_HIH6130 is not set ++# CONFIG_SENSORS_IIO_HWMON is not set ++# CONFIG_SENSORS_IT87 is not set ++# CONFIG_SENSORS_JC42 is not set ++# CONFIG_SENSORS_POWR1220 is not set ++# CONFIG_SENSORS_LINEAGE is not set ++# CONFIG_SENSORS_LTC2945 is not set ++# CONFIG_SENSORS_LTC4151 is not set ++# CONFIG_SENSORS_LTC4215 is not set ++# CONFIG_SENSORS_LTC4222 is not set ++# CONFIG_SENSORS_LTC4245 is not set ++# CONFIG_SENSORS_LTC4260 is not set ++# CONFIG_SENSORS_LTC4261 is not set ++CONFIG_SENSORS_MAX1111=y ++CONFIG_SENSORS_MAX16065=y ++CONFIG_SENSORS_MAX1619=y ++CONFIG_SENSORS_MAX1668=y ++# CONFIG_SENSORS_MAX197 is not set ++# CONFIG_SENSORS_MAX6639 is not set ++# CONFIG_SENSORS_MAX6642 is not set ++# CONFIG_SENSORS_MAX6650 is not set ++# CONFIG_SENSORS_MAX6697 is not set ++# CONFIG_SENSORS_HTU21 is not set ++# CONFIG_SENSORS_MCP3021 is not set ++# CONFIG_SENSORS_ADCXX is not set ++# CONFIG_SENSORS_LM63 is not set ++# CONFIG_SENSORS_LM70 is not set ++# CONFIG_SENSORS_LM73 is not set ++# CONFIG_SENSORS_LM75 is not set ++# CONFIG_SENSORS_LM77 is not set ++# CONFIG_SENSORS_LM78 is not set ++# CONFIG_SENSORS_LM80 is not set ++# CONFIG_SENSORS_LM83 is not set ++# CONFIG_SENSORS_LM85 is not set ++# CONFIG_SENSORS_LM87 is not set ++# CONFIG_SENSORS_LM90 is not set ++# CONFIG_SENSORS_LM92 is not set ++# CONFIG_SENSORS_LM93 is not set ++# CONFIG_SENSORS_LM95234 is not set ++# CONFIG_SENSORS_LM95241 is not set ++# CONFIG_SENSORS_LM95245 is not set ++# CONFIG_SENSORS_PC87360 is not set ++# CONFIG_SENSORS_PC87427 is not set ++# CONFIG_SENSORS_NTC_THERMISTOR is not set ++# CONFIG_SENSORS_NCT6683 is not set ++# CONFIG_SENSORS_NCT6775 is not set ++# CONFIG_SENSORS_NCT7802 is not set ++# CONFIG_SENSORS_NCT7904 is not set ++# CONFIG_SENSORS_PCF8591 is not set ++# CONFIG_PMBUS is not set ++CONFIG_SENSORS_PWM_FAN=y ++# CONFIG_SENSORS_SHT15 is not set ++# CONFIG_SENSORS_SHT21 is not set ++# CONFIG_SENSORS_SHTC1 is not set ++# CONFIG_SENSORS_SIS5595 is not set ++# CONFIG_SENSORS_DME1737 is not set ++# CONFIG_SENSORS_EMC1403 is not set ++# CONFIG_SENSORS_EMC2103 is not set ++# CONFIG_SENSORS_EMC6W201 is not set ++# CONFIG_SENSORS_SMSC47M1 is not set ++# CONFIG_SENSORS_SMSC47M192 is not set ++# CONFIG_SENSORS_SMSC47B397 is not set ++# CONFIG_SENSORS_SCH56XX_COMMON is not set ++# CONFIG_SENSORS_SCH5627 is not set ++# CONFIG_SENSORS_SCH5636 is not set ++# CONFIG_SENSORS_SMM665 is not set ++# CONFIG_SENSORS_ADC128D818 is not set ++# CONFIG_SENSORS_ADS1015 is not set ++# CONFIG_SENSORS_ADS7828 is not set ++# CONFIG_SENSORS_ADS7871 is not set ++# CONFIG_SENSORS_AMC6821 is not set ++# CONFIG_SENSORS_INA209 is not set ++# CONFIG_SENSORS_INA2XX is not set ++# CONFIG_SENSORS_THMC50 is not set ++# CONFIG_SENSORS_TMP102 is not set ++# CONFIG_SENSORS_TMP103 is not set ++# CONFIG_SENSORS_TMP401 is not set ++# CONFIG_SENSORS_TMP421 is not set ++# CONFIG_SENSORS_VIA686A is not set ++# CONFIG_SENSORS_VT1211 is not set ++# CONFIG_SENSORS_VT8231 is not set ++# CONFIG_SENSORS_W83781D is not set ++# CONFIG_SENSORS_W83791D is not set ++# CONFIG_SENSORS_W83792D is not set ++# CONFIG_SENSORS_W83793 is not set ++# CONFIG_SENSORS_W83795 is not set ++# CONFIG_SENSORS_W83L785TS is not set ++# CONFIG_SENSORS_W83L786NG is not set ++# CONFIG_SENSORS_W83627HF is not set ++# CONFIG_SENSORS_W83627EHF is not set ++CONFIG_THERMAL=y ++CONFIG_THERMAL_HWMON=y ++CONFIG_THERMAL_OF=y ++CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y ++# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set ++# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set ++CONFIG_THERMAL_GOV_FAIR_SHARE=y ++CONFIG_THERMAL_GOV_STEP_WISE=y ++# CONFIG_THERMAL_GOV_BANG_BANG is not set ++CONFIG_THERMAL_GOV_USER_SPACE=y ++CONFIG_CPU_THERMAL=y ++CONFIG_CLOCK_THERMAL=y ++# CONFIG_THERMAL_EMULATION is not set ++CONFIG_IMX_THERMAL=y ++ ++# ++# Texas Instruments thermal drivers ++# ++CONFIG_WATCHDOG=y ++CONFIG_WATCHDOG_CORE=y ++# CONFIG_WATCHDOG_NOWAYOUT is not set ++ ++# ++# Watchdog Device Drivers ++# ++CONFIG_SOFT_WATCHDOG=m ++# CONFIG_DA9052_WATCHDOG is not set ++CONFIG_GPIO_WATCHDOG=m ++# CONFIG_XILINX_WATCHDOG is not set ++# CONFIG_CADENCE_WATCHDOG is not set ++# CONFIG_DW_WATCHDOG is not set ++# CONFIG_MAX63XX_WATCHDOG is not set ++CONFIG_IMX2_WDT=y ++# CONFIG_ALIM7101_WDT is not set ++# CONFIG_I6300ESB_WDT is not set ++# CONFIG_MEN_A21_WDT is not set ++ ++# ++# PCI-based Watchdog Cards ++# ++# CONFIG_PCIPCWATCHDOG is not set ++# CONFIG_WDTPCI is not set ++ ++# ++# USB-based Watchdog Cards ++# ++# CONFIG_USBPCWATCHDOG is not set ++CONFIG_SSB_POSSIBLE=y ++ ++# ++# Sonics Silicon Backplane ++# ++CONFIG_SSB=y ++CONFIG_SSB_SPROM=y ++CONFIG_SSB_BLOCKIO=y ++CONFIG_SSB_PCIHOST_POSSIBLE=y ++CONFIG_SSB_PCIHOST=y ++CONFIG_SSB_B43_PCI_BRIDGE=y ++CONFIG_SSB_SDIOHOST_POSSIBLE=y ++CONFIG_SSB_SDIOHOST=y ++# CONFIG_SSB_SILENT is not set ++# CONFIG_SSB_DEBUG is not set ++CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y ++CONFIG_SSB_DRIVER_PCICORE=y ++# CONFIG_SSB_DRIVER_GPIO is not set ++CONFIG_BCMA_POSSIBLE=y ++ ++# ++# Broadcom specific AMBA ++# ++CONFIG_BCMA=m ++CONFIG_BCMA_BLOCKIO=y ++CONFIG_BCMA_HOST_PCI_POSSIBLE=y ++# CONFIG_BCMA_HOST_PCI is not set ++# CONFIG_BCMA_HOST_SOC is not set ++CONFIG_BCMA_DRIVER_PCI=y ++# CONFIG_BCMA_DRIVER_GMAC_CMN is not set ++# CONFIG_BCMA_DRIVER_GPIO is not set ++# CONFIG_BCMA_DEBUG is not set ++ ++# ++# Multifunction device drivers ++# ++CONFIG_MFD_CORE=y ++# CONFIG_MFD_AS3711 is not set ++# CONFIG_MFD_AS3722 is not set ++# CONFIG_PMIC_ADP5520 is not set ++# CONFIG_MFD_AAT2870_CORE is not set ++# CONFIG_MFD_ATMEL_HLCDC is not set ++# CONFIG_MFD_BCM590XX is not set ++# CONFIG_MFD_AXP20X is not set ++# CONFIG_MFD_CROS_EC is not set ++# CONFIG_MFD_ASIC3 is not set ++# CONFIG_PMIC_DA903X is not set ++CONFIG_PMIC_DA9052=y ++CONFIG_MFD_DA9052_SPI=y ++CONFIG_MFD_DA9052_I2C=y ++# CONFIG_MFD_DA9055 is not set ++# CONFIG_MFD_DA9063 is not set ++# CONFIG_MFD_DA9150 is not set ++CONFIG_MFD_MXC_HDMI=y ++# CONFIG_MFD_DLN2 is not set ++CONFIG_MFD_MC13XXX=y ++CONFIG_MFD_MC13XXX_SPI=y ++CONFIG_MFD_MC13XXX_I2C=y ++# CONFIG_MFD_HI6421_PMIC is not set ++# CONFIG_HTC_EGPIO is not set ++# CONFIG_HTC_PASIC3 is not set ++# CONFIG_HTC_I2CPLD is not set ++# CONFIG_LPC_ICH is not set ++# CONFIG_LPC_SCH is not set ++# CONFIG_INTEL_SOC_PMIC is not set ++# CONFIG_MFD_JANZ_CMODIO is not set ++# CONFIG_MFD_KEMPLD is not set ++# CONFIG_MFD_88PM800 is not set ++# CONFIG_MFD_88PM805 is not set ++# CONFIG_MFD_88PM860X is not set ++# CONFIG_MFD_MAX14577 is not set ++# CONFIG_MFD_MAX77686 is not set ++# CONFIG_MFD_MAX77693 is not set ++# CONFIG_MFD_MAX77843 is not set ++# CONFIG_MFD_MAX8907 is not set ++# CONFIG_MFD_MAX8925 is not set ++# CONFIG_MFD_MAX8997 is not set ++# CONFIG_MFD_MAX8998 is not set ++# CONFIG_MFD_MT6397 is not set ++# CONFIG_MFD_MENF21BMC is not set ++# CONFIG_EZX_PCAP is not set ++# CONFIG_MFD_VIPERBOARD is not set ++# CONFIG_MFD_RETU is not set ++# CONFIG_MFD_PCF50633 is not set ++# CONFIG_UCB1400_CORE is not set ++# CONFIG_MFD_PM8921_CORE is not set ++# CONFIG_MFD_RDC321X is not set ++# CONFIG_MFD_RTSX_PCI is not set ++# CONFIG_MFD_RT5033 is not set ++# CONFIG_MFD_RTSX_USB is not set ++# CONFIG_MFD_RC5T583 is not set ++# CONFIG_MFD_RK808 is not set ++# CONFIG_MFD_RN5T618 is not set ++# CONFIG_MFD_SEC_CORE is not set ++CONFIG_MFD_SI476X_CORE=y ++# CONFIG_MFD_SM501 is not set ++# CONFIG_MFD_SKY81452 is not set ++# CONFIG_MFD_SMSC is not set ++# CONFIG_ABX500_CORE is not set ++# CONFIG_MFD_STMPE is not set ++CONFIG_MFD_SYSCON=y ++# CONFIG_MFD_TI_AM335X_TSCADC is not set ++# CONFIG_MFD_LP3943 is not set ++# CONFIG_MFD_LP8788 is not set ++# CONFIG_MFD_PALMAS is not set ++# CONFIG_TPS6105X is not set ++# CONFIG_TPS65010 is not set ++# CONFIG_TPS6507X is not set ++# CONFIG_MFD_TPS65090 is not set ++# CONFIG_MFD_TPS65217 is not set ++# CONFIG_MFD_TPS65218 is not set ++# CONFIG_MFD_TPS6586X is not set ++# CONFIG_MFD_TPS65910 is not set ++# CONFIG_MFD_TPS65912 is not set ++# CONFIG_MFD_TPS65912_I2C is not set ++# CONFIG_MFD_TPS65912_SPI is not set ++# CONFIG_MFD_TPS80031 is not set ++# CONFIG_TWL4030_CORE is not set ++# CONFIG_TWL6040_CORE is not set ++CONFIG_MFD_WL1273_CORE=m ++# CONFIG_MFD_LM3533 is not set ++# CONFIG_MFD_TC3589X is not set ++# CONFIG_MFD_TMIO is not set ++# CONFIG_MFD_T7L66XB is not set ++# CONFIG_MFD_TC6387XB is not set ++# CONFIG_MFD_TC6393XB is not set ++# CONFIG_MFD_VX855 is not set ++# CONFIG_MFD_ARIZONA_I2C is not set ++# CONFIG_MFD_ARIZONA_SPI is not set ++# CONFIG_MFD_WM8400 is not set ++# CONFIG_MFD_WM831X_I2C is not set ++# CONFIG_MFD_WM831X_SPI is not set ++# CONFIG_MFD_WM8350_I2C is not set ++# CONFIG_MFD_WM8994 is not set ++CONFIG_REGULATOR=y ++# CONFIG_REGULATOR_DEBUG is not set ++CONFIG_REGULATOR_FIXED_VOLTAGE=y ++CONFIG_REGULATOR_VIRTUAL_CONSUMER=y ++CONFIG_REGULATOR_USERSPACE_CONSUMER=m ++# CONFIG_REGULATOR_ACT8865 is not set ++# CONFIG_REGULATOR_AD5398 is not set ++CONFIG_REGULATOR_ANATOP=y ++# CONFIG_REGULATOR_DA9052 is not set ++# CONFIG_REGULATOR_DA9210 is not set ++# CONFIG_REGULATOR_DA9211 is not set ++# CONFIG_REGULATOR_FAN53555 is not set ++CONFIG_REGULATOR_GPIO=y ++# CONFIG_REGULATOR_ISL9305 is not set ++# CONFIG_REGULATOR_ISL6271A is not set ++# CONFIG_REGULATOR_LP3971 is not set ++# CONFIG_REGULATOR_LP3972 is not set ++# CONFIG_REGULATOR_LP872X is not set ++# CONFIG_REGULATOR_LP8755 is not set ++# CONFIG_REGULATOR_LTC3589 is not set ++# CONFIG_REGULATOR_MAX1586 is not set ++# CONFIG_REGULATOR_MAX8649 is not set ++# CONFIG_REGULATOR_MAX8660 is not set ++# CONFIG_REGULATOR_MAX8952 is not set ++# CONFIG_REGULATOR_MAX8973 is not set ++CONFIG_REGULATOR_MC13XXX_CORE=y ++CONFIG_REGULATOR_MC13783=y ++CONFIG_REGULATOR_MC13892=y ++CONFIG_REGULATOR_PFUZE100=y ++CONFIG_REGULATOR_PWM=y ++# CONFIG_REGULATOR_TPS51632 is not set ++# CONFIG_REGULATOR_TPS62360 is not set ++# CONFIG_REGULATOR_TPS65023 is not set ++# CONFIG_REGULATOR_TPS6507X is not set ++# CONFIG_REGULATOR_TPS6524X is not set ++CONFIG_MEDIA_SUPPORT=m ++ ++# ++# Multimedia core support ++# ++CONFIG_MEDIA_CAMERA_SUPPORT=y ++CONFIG_MEDIA_ANALOG_TV_SUPPORT=y ++CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y ++CONFIG_MEDIA_RADIO_SUPPORT=y ++CONFIG_MEDIA_SDR_SUPPORT=y ++CONFIG_MEDIA_RC_SUPPORT=y ++CONFIG_MEDIA_CONTROLLER=y ++CONFIG_VIDEO_DEV=m ++CONFIG_VIDEO_V4L2_SUBDEV_API=y ++CONFIG_VIDEO_V4L2=m ++# CONFIG_VIDEO_ADV_DEBUG is not set ++# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set ++CONFIG_VIDEO_TUNER=m ++CONFIG_V4L2_MEM2MEM_DEV=m ++CONFIG_VIDEOBUF_GEN=m ++CONFIG_VIDEOBUF_DMA_SG=m ++CONFIG_VIDEOBUF_VMALLOC=m ++CONFIG_VIDEOBUF_DVB=m ++CONFIG_VIDEOBUF2_CORE=m ++CONFIG_VIDEOBUF2_MEMOPS=m ++CONFIG_VIDEOBUF2_DMA_CONTIG=m ++CONFIG_VIDEOBUF2_VMALLOC=m ++CONFIG_VIDEOBUF2_DMA_SG=m ++CONFIG_VIDEOBUF2_DVB=m ++CONFIG_DVB_CORE=m ++CONFIG_DVB_NET=y ++CONFIG_TTPCI_EEPROM=m ++CONFIG_DVB_MAX_ADAPTERS=8 ++# CONFIG_DVB_DYNAMIC_MINORS is not set ++ ++# ++# Media drivers ++# ++CONFIG_RC_CORE=m ++CONFIG_RC_MAP=m ++CONFIG_RC_DECODERS=y ++CONFIG_LIRC=m ++CONFIG_IR_LIRC_CODEC=m ++CONFIG_IR_NEC_DECODER=m ++CONFIG_IR_RC5_DECODER=m ++CONFIG_IR_RC6_DECODER=m ++CONFIG_IR_JVC_DECODER=m ++CONFIG_IR_SONY_DECODER=m ++CONFIG_IR_SANYO_DECODER=m ++CONFIG_IR_SHARP_DECODER=m ++CONFIG_IR_MCE_KBD_DECODER=m ++CONFIG_IR_XMP_DECODER=m ++CONFIG_RC_DEVICES=y ++CONFIG_RC_ATI_REMOTE=m ++CONFIG_IR_HIX5HD2=m ++CONFIG_IR_IMON=m ++CONFIG_IR_MCEUSB=m ++CONFIG_IR_REDRAT3=m ++CONFIG_IR_STREAMZAP=m ++CONFIG_IR_IGORPLUGUSB=m ++CONFIG_IR_IGUANA=m ++CONFIG_IR_TTUSBIR=m ++CONFIG_RC_LOOPBACK=m ++CONFIG_IR_GPIO_CIR=m ++CONFIG_MEDIA_USB_SUPPORT=y ++ ++# ++# Webcam devices ++# ++CONFIG_USB_VIDEO_CLASS=m ++CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y ++CONFIG_USB_GSPCA=m ++CONFIG_USB_M5602=m ++CONFIG_USB_STV06XX=m ++CONFIG_USB_GL860=m ++CONFIG_USB_GSPCA_BENQ=m ++CONFIG_USB_GSPCA_CONEX=m ++CONFIG_USB_GSPCA_CPIA1=m ++CONFIG_USB_GSPCA_DTCS033=m ++CONFIG_USB_GSPCA_ETOMS=m ++CONFIG_USB_GSPCA_FINEPIX=m ++CONFIG_USB_GSPCA_JEILINJ=m ++CONFIG_USB_GSPCA_JL2005BCD=m ++CONFIG_USB_GSPCA_KINECT=m ++CONFIG_USB_GSPCA_KONICA=m ++CONFIG_USB_GSPCA_MARS=m ++CONFIG_USB_GSPCA_MR97310A=m ++CONFIG_USB_GSPCA_NW80X=m ++CONFIG_USB_GSPCA_OV519=m ++CONFIG_USB_GSPCA_OV534=m ++CONFIG_USB_GSPCA_OV534_9=m ++CONFIG_USB_GSPCA_PAC207=m ++CONFIG_USB_GSPCA_PAC7302=m ++CONFIG_USB_GSPCA_PAC7311=m ++CONFIG_USB_GSPCA_SE401=m ++CONFIG_USB_GSPCA_SN9C2028=m ++CONFIG_USB_GSPCA_SN9C20X=m ++CONFIG_USB_GSPCA_SONIXB=m ++CONFIG_USB_GSPCA_SONIXJ=m ++CONFIG_USB_GSPCA_SPCA500=m ++CONFIG_USB_GSPCA_SPCA501=m ++CONFIG_USB_GSPCA_SPCA505=m ++CONFIG_USB_GSPCA_SPCA506=m ++CONFIG_USB_GSPCA_SPCA508=m ++CONFIG_USB_GSPCA_SPCA561=m ++CONFIG_USB_GSPCA_SPCA1528=m ++CONFIG_USB_GSPCA_SQ905=m ++CONFIG_USB_GSPCA_SQ905C=m ++CONFIG_USB_GSPCA_SQ930X=m ++CONFIG_USB_GSPCA_STK014=m ++CONFIG_USB_GSPCA_STK1135=m ++CONFIG_USB_GSPCA_STV0680=m ++CONFIG_USB_GSPCA_SUNPLUS=m ++CONFIG_USB_GSPCA_T613=m ++CONFIG_USB_GSPCA_TOPRO=m ++# CONFIG_USB_GSPCA_TOUPTEK is not set ++CONFIG_USB_GSPCA_TV8532=m ++CONFIG_USB_GSPCA_VC032X=m ++CONFIG_USB_GSPCA_VICAM=m ++CONFIG_USB_GSPCA_XIRLINK_CIT=m ++CONFIG_USB_GSPCA_ZC3XX=m ++CONFIG_USB_PWC=m ++# CONFIG_USB_PWC_DEBUG is not set ++CONFIG_USB_PWC_INPUT_EVDEV=y ++CONFIG_VIDEO_CPIA2=m ++CONFIG_USB_ZR364XX=m ++CONFIG_USB_STKWEBCAM=m ++CONFIG_USB_S2255=m ++CONFIG_VIDEO_USBTV=m ++ ++# ++# Analog TV USB devices ++# ++CONFIG_VIDEO_PVRUSB2=m ++CONFIG_VIDEO_PVRUSB2_SYSFS=y ++CONFIG_VIDEO_PVRUSB2_DVB=y ++# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set ++CONFIG_VIDEO_HDPVR=m ++CONFIG_VIDEO_USBVISION=m ++CONFIG_VIDEO_STK1160_COMMON=m ++CONFIG_VIDEO_STK1160_AC97=y ++CONFIG_VIDEO_STK1160=m ++CONFIG_VIDEO_GO7007=m ++CONFIG_VIDEO_GO7007_USB=m ++CONFIG_VIDEO_GO7007_LOADER=m ++CONFIG_VIDEO_GO7007_USB_S2250_BOARD=m ++ ++# ++# Analog/digital TV USB devices ++# ++CONFIG_VIDEO_AU0828=m ++CONFIG_VIDEO_AU0828_V4L2=y ++CONFIG_VIDEO_AU0828_RC=y ++CONFIG_VIDEO_CX231XX=m ++CONFIG_VIDEO_CX231XX_RC=y ++CONFIG_VIDEO_CX231XX_ALSA=m ++CONFIG_VIDEO_CX231XX_DVB=m ++CONFIG_VIDEO_TM6000=m ++CONFIG_VIDEO_TM6000_ALSA=m ++CONFIG_VIDEO_TM6000_DVB=m ++ ++# ++# Digital TV USB devices ++# ++CONFIG_DVB_USB=m ++# CONFIG_DVB_USB_DEBUG is not set ++CONFIG_DVB_USB_A800=m ++CONFIG_DVB_USB_DIBUSB_MB=m ++CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y ++CONFIG_DVB_USB_DIBUSB_MC=m ++CONFIG_DVB_USB_DIB0700=m ++CONFIG_DVB_USB_UMT_010=m ++CONFIG_DVB_USB_CXUSB=m ++CONFIG_DVB_USB_M920X=m ++CONFIG_DVB_USB_DIGITV=m ++CONFIG_DVB_USB_VP7045=m ++CONFIG_DVB_USB_VP702X=m ++CONFIG_DVB_USB_GP8PSK=m ++CONFIG_DVB_USB_NOVA_T_USB2=m ++CONFIG_DVB_USB_TTUSB2=m ++CONFIG_DVB_USB_DTT200U=m ++CONFIG_DVB_USB_OPERA1=m ++CONFIG_DVB_USB_AF9005=m ++CONFIG_DVB_USB_AF9005_REMOTE=m ++CONFIG_DVB_USB_PCTV452E=m ++CONFIG_DVB_USB_DW2102=m ++CONFIG_DVB_USB_CINERGY_T2=m ++CONFIG_DVB_USB_DTV5100=m ++CONFIG_DVB_USB_FRIIO=m ++CONFIG_DVB_USB_AZ6027=m ++CONFIG_DVB_USB_TECHNISAT_USB2=m ++CONFIG_DVB_USB_V2=m ++CONFIG_DVB_USB_AF9015=m ++CONFIG_DVB_USB_AF9035=m ++CONFIG_DVB_USB_ANYSEE=m ++CONFIG_DVB_USB_AU6610=m ++CONFIG_DVB_USB_AZ6007=m ++CONFIG_DVB_USB_CE6230=m ++CONFIG_DVB_USB_EC168=m ++CONFIG_DVB_USB_GL861=m ++CONFIG_DVB_USB_LME2510=m ++CONFIG_DVB_USB_MXL111SF=m ++CONFIG_DVB_USB_RTL28XXU=m ++CONFIG_DVB_USB_DVBSKY=m ++CONFIG_DVB_TTUSB_BUDGET=m ++CONFIG_DVB_TTUSB_DEC=m ++CONFIG_SMS_USB_DRV=m ++CONFIG_DVB_B2C2_FLEXCOP_USB=m ++# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set ++CONFIG_DVB_AS102=m ++ ++# ++# Webcam, TV (analog/digital) USB devices ++# ++CONFIG_VIDEO_EM28XX=m ++CONFIG_VIDEO_EM28XX_V4L2=m ++CONFIG_VIDEO_EM28XX_ALSA=m ++CONFIG_VIDEO_EM28XX_DVB=m ++CONFIG_VIDEO_EM28XX_RC=m ++ ++# ++# Software defined radio USB devices ++# ++CONFIG_USB_AIRSPY=m ++CONFIG_USB_HACKRF=m ++CONFIG_USB_MSI2500=m ++CONFIG_MEDIA_PCI_SUPPORT=y ++ ++# ++# Media capture support ++# ++ ++# ++# Media capture/analog TV support ++# ++CONFIG_VIDEO_IVTV=m ++CONFIG_VIDEO_IVTV_ALSA=m ++CONFIG_VIDEO_FB_IVTV=m ++CONFIG_VIDEO_HEXIUM_GEMINI=m ++CONFIG_VIDEO_HEXIUM_ORION=m ++CONFIG_VIDEO_MXB=m ++CONFIG_VIDEO_SOLO6X10=m ++CONFIG_VIDEO_TW68=m ++ ++# ++# Media capture/analog/hybrid TV support ++# ++CONFIG_VIDEO_CX18=m ++CONFIG_VIDEO_CX18_ALSA=m ++CONFIG_VIDEO_CX23885=m ++CONFIG_MEDIA_ALTERA_CI=m ++CONFIG_VIDEO_CX25821=m ++CONFIG_VIDEO_CX25821_ALSA=m ++CONFIG_VIDEO_CX88=m ++CONFIG_VIDEO_CX88_ALSA=m ++CONFIG_VIDEO_CX88_BLACKBIRD=m ++CONFIG_VIDEO_CX88_DVB=m ++CONFIG_VIDEO_CX88_ENABLE_VP3054=y ++CONFIG_VIDEO_CX88_VP3054=m ++CONFIG_VIDEO_CX88_MPEG=m ++# CONFIG_VIDEO_BT848 is not set ++CONFIG_VIDEO_SAA7134=m ++CONFIG_VIDEO_SAA7134_ALSA=m ++CONFIG_VIDEO_SAA7134_RC=y ++CONFIG_VIDEO_SAA7134_DVB=m ++CONFIG_VIDEO_SAA7134_GO7007=m ++CONFIG_VIDEO_SAA7164=m ++ ++# ++# Media digital TV PCI Adapters ++# ++CONFIG_DVB_AV7110_IR=y ++CONFIG_DVB_AV7110=m ++CONFIG_DVB_AV7110_OSD=y ++CONFIG_DVB_BUDGET_CORE=m ++CONFIG_DVB_BUDGET=m ++CONFIG_DVB_BUDGET_CI=m ++CONFIG_DVB_BUDGET_AV=m ++CONFIG_DVB_BUDGET_PATCH=m ++CONFIG_DVB_B2C2_FLEXCOP_PCI=m ++# CONFIG_DVB_B2C2_FLEXCOP_PCI_DEBUG is not set ++CONFIG_DVB_PLUTO2=m ++CONFIG_DVB_DM1105=m ++CONFIG_DVB_PT1=m ++CONFIG_DVB_PT3=m ++CONFIG_MANTIS_CORE=m ++CONFIG_DVB_MANTIS=m ++CONFIG_DVB_HOPPER=m ++CONFIG_DVB_NGENE=m ++CONFIG_DVB_DDBRIDGE=m ++CONFIG_DVB_SMIPCIE=m ++CONFIG_V4L_PLATFORM_DRIVERS=y ++# CONFIG_VIDEO_CAFE_CCIC is not set ++# CONFIG_VIDEO_MXC_OUTPUT is not set ++# CONFIG_VIDEO_MXC_CAPTURE is not set ++CONFIG_SOC_CAMERA=m ++CONFIG_SOC_CAMERA_PLATFORM=m ++# CONFIG_VIDEO_XILINX is not set ++CONFIG_V4L_MEM2MEM_DRIVERS=y ++# CONFIG_VIDEO_CODA is not set ++CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m ++CONFIG_VIDEO_SH_VEU=m ++# CONFIG_V4L_TEST_DRIVERS is not set ++ ++# ++# Supported MMC/SDIO adapters ++# ++CONFIG_SMS_SDIO_DRV=m ++CONFIG_RADIO_ADAPTERS=y ++CONFIG_RADIO_TEA575X=m ++# CONFIG_RADIO_SI470X is not set ++CONFIG_RADIO_SI4713=m ++CONFIG_USB_SI4713=m ++CONFIG_PLATFORM_SI4713=m ++CONFIG_I2C_SI4713=m ++CONFIG_RADIO_SI476X=m ++CONFIG_USB_MR800=m ++CONFIG_USB_DSBR=m ++CONFIG_RADIO_MAXIRADIO=m ++CONFIG_RADIO_SHARK=m ++CONFIG_RADIO_SHARK2=m ++CONFIG_USB_KEENE=m ++CONFIG_USB_RAREMONO=m ++CONFIG_USB_MA901=m ++CONFIG_RADIO_TEA5764=m ++CONFIG_RADIO_SAA7706H=m ++CONFIG_RADIO_TEF6862=m ++CONFIG_RADIO_WL1273=m ++ ++# ++# Texas Instruments WL128x FM driver (ST based) ++# ++CONFIG_RADIO_WL128X=m ++CONFIG_MEDIA_COMMON_OPTIONS=y ++ ++# ++# common driver options ++# ++CONFIG_VIDEO_CX2341X=m ++CONFIG_VIDEO_TVEEPROM=m ++CONFIG_CYPRESS_FIRMWARE=m ++CONFIG_DVB_B2C2_FLEXCOP=m ++CONFIG_VIDEO_SAA7146=m ++CONFIG_VIDEO_SAA7146_VV=m ++CONFIG_SMS_SIANO_MDTV=m ++CONFIG_SMS_SIANO_RC=y ++# CONFIG_SMS_SIANO_DEBUGFS is not set ++ ++# ++# Media ancillary drivers (tuners, sensors, i2c, frontends) ++# ++# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set ++CONFIG_MEDIA_ATTACH=y ++CONFIG_VIDEO_IR_I2C=m ++ ++# ++# Encoders, decoders, sensors and other helper chips ++# ++ ++# ++# Audio decoders, processors and mixers ++# ++CONFIG_VIDEO_TVAUDIO=m ++CONFIG_VIDEO_TDA7432=m ++CONFIG_VIDEO_TDA9840=m ++CONFIG_VIDEO_TEA6415C=m ++CONFIG_VIDEO_TEA6420=m ++CONFIG_VIDEO_MSP3400=m ++CONFIG_VIDEO_CS5345=m ++CONFIG_VIDEO_CS53L32A=m ++CONFIG_VIDEO_TLV320AIC23B=m ++CONFIG_VIDEO_UDA1342=m ++CONFIG_VIDEO_WM8775=m ++CONFIG_VIDEO_WM8739=m ++CONFIG_VIDEO_VP27SMPX=m ++CONFIG_VIDEO_SONY_BTF_MPX=m ++ ++# ++# RDS decoders ++# ++CONFIG_VIDEO_SAA6588=m ++ ++# ++# Video decoders ++# ++CONFIG_VIDEO_ADV7180=m ++CONFIG_VIDEO_ADV7183=m ++CONFIG_VIDEO_ADV7604=m ++CONFIG_VIDEO_ADV7842=m ++CONFIG_VIDEO_BT819=m ++CONFIG_VIDEO_BT856=m ++CONFIG_VIDEO_BT866=m ++CONFIG_VIDEO_KS0127=m ++CONFIG_VIDEO_ML86V7667=m ++CONFIG_VIDEO_SAA7110=m ++CONFIG_VIDEO_SAA711X=m ++CONFIG_VIDEO_TVP514X=m ++CONFIG_VIDEO_TVP5150=m ++CONFIG_VIDEO_TVP7002=m ++CONFIG_VIDEO_TW2804=m ++CONFIG_VIDEO_TW9903=m ++CONFIG_VIDEO_TW9906=m ++CONFIG_VIDEO_VPX3220=m ++ ++# ++# Video and audio decoders ++# ++CONFIG_VIDEO_SAA717X=m ++CONFIG_VIDEO_CX25840=m ++ ++# ++# Video encoders ++# ++CONFIG_VIDEO_SAA7127=m ++CONFIG_VIDEO_SAA7185=m ++CONFIG_VIDEO_ADV7170=m ++CONFIG_VIDEO_ADV7175=m ++CONFIG_VIDEO_ADV7343=m ++CONFIG_VIDEO_ADV7393=m ++CONFIG_VIDEO_ADV7511=m ++CONFIG_VIDEO_AD9389B=m ++CONFIG_VIDEO_AK881X=m ++CONFIG_VIDEO_THS8200=m ++ ++# ++# Camera sensor devices ++# ++CONFIG_VIDEO_APTINA_PLL=m ++CONFIG_VIDEO_SMIAPP_PLL=m ++CONFIG_VIDEO_OV2659=m ++CONFIG_VIDEO_OV7640=m ++CONFIG_VIDEO_OV7670=m ++CONFIG_VIDEO_OV9650=m ++CONFIG_VIDEO_VS6624=m ++CONFIG_VIDEO_MT9M032=m ++CONFIG_VIDEO_MT9P031=m ++CONFIG_VIDEO_MT9T001=m ++CONFIG_VIDEO_MT9V011=m ++CONFIG_VIDEO_MT9V032=m ++CONFIG_VIDEO_SR030PC30=m ++CONFIG_VIDEO_NOON010PC30=m ++CONFIG_VIDEO_M5MOLS=m ++CONFIG_VIDEO_S5K6AA=m ++CONFIG_VIDEO_S5K6A3=m ++CONFIG_VIDEO_S5K4ECGX=m ++CONFIG_VIDEO_S5K5BAF=m ++CONFIG_VIDEO_SMIAPP=m ++CONFIG_VIDEO_S5C73M3=m ++ ++# ++# Flash devices ++# ++CONFIG_VIDEO_ADP1653=m ++CONFIG_VIDEO_AS3645A=m ++CONFIG_VIDEO_LM3560=m ++CONFIG_VIDEO_LM3646=m ++ ++# ++# Video improvement chips ++# ++CONFIG_VIDEO_UPD64031A=m ++CONFIG_VIDEO_UPD64083=m ++ ++# ++# Audio/Video compression chips ++# ++CONFIG_VIDEO_SAA6752HS=m ++ ++# ++# Miscellaneous helper chips ++# ++CONFIG_VIDEO_THS7303=m ++CONFIG_VIDEO_M52790=m ++ ++# ++# Sensors used on soc_camera driver ++# ++ ++# ++# soc_camera sensor drivers ++# ++CONFIG_SOC_CAMERA_IMX074=m ++CONFIG_SOC_CAMERA_MT9M001=m ++CONFIG_SOC_CAMERA_MT9M111=m ++CONFIG_SOC_CAMERA_MT9T031=m ++CONFIG_SOC_CAMERA_MT9T112=m ++CONFIG_SOC_CAMERA_MT9V022=m ++CONFIG_SOC_CAMERA_OV2640=m ++CONFIG_SOC_CAMERA_OV5642=m ++CONFIG_SOC_CAMERA_OV6650=m ++CONFIG_SOC_CAMERA_OV772X=m ++CONFIG_SOC_CAMERA_OV9640=m ++CONFIG_SOC_CAMERA_OV9740=m ++CONFIG_SOC_CAMERA_RJ54N1=m ++CONFIG_SOC_CAMERA_TW9910=m ++CONFIG_MEDIA_TUNER=m ++ ++# ++# Customize TV tuners ++# ++CONFIG_MEDIA_TUNER_SIMPLE=m ++CONFIG_MEDIA_TUNER_TDA8290=m ++CONFIG_MEDIA_TUNER_TDA827X=m ++CONFIG_MEDIA_TUNER_TDA18271=m ++CONFIG_MEDIA_TUNER_TDA9887=m ++CONFIG_MEDIA_TUNER_TEA5761=m ++CONFIG_MEDIA_TUNER_TEA5767=m ++CONFIG_MEDIA_TUNER_MSI001=m ++CONFIG_MEDIA_TUNER_MT20XX=m ++CONFIG_MEDIA_TUNER_MT2060=m ++CONFIG_MEDIA_TUNER_MT2063=m ++CONFIG_MEDIA_TUNER_MT2266=m ++CONFIG_MEDIA_TUNER_MT2131=m ++CONFIG_MEDIA_TUNER_QT1010=m ++CONFIG_MEDIA_TUNER_XC2028=m ++CONFIG_MEDIA_TUNER_XC5000=m ++CONFIG_MEDIA_TUNER_XC4000=m ++CONFIG_MEDIA_TUNER_MXL5005S=m ++CONFIG_MEDIA_TUNER_MXL5007T=m ++CONFIG_MEDIA_TUNER_MC44S803=m ++CONFIG_MEDIA_TUNER_MAX2165=m ++CONFIG_MEDIA_TUNER_TDA18218=m ++CONFIG_MEDIA_TUNER_FC0011=m ++CONFIG_MEDIA_TUNER_FC0012=m ++CONFIG_MEDIA_TUNER_FC0013=m ++CONFIG_MEDIA_TUNER_TDA18212=m ++CONFIG_MEDIA_TUNER_E4000=m ++CONFIG_MEDIA_TUNER_FC2580=m ++CONFIG_MEDIA_TUNER_M88RS6000T=m ++CONFIG_MEDIA_TUNER_TUA9001=m ++CONFIG_MEDIA_TUNER_SI2157=m ++CONFIG_MEDIA_TUNER_IT913X=m ++CONFIG_MEDIA_TUNER_R820T=m ++CONFIG_MEDIA_TUNER_MXL301RF=m ++CONFIG_MEDIA_TUNER_QM1D1C0042=m ++ ++# ++# Customise DVB Frontends ++# ++ ++# ++# Multistandard (satellite) frontends ++# ++CONFIG_DVB_STB0899=m ++CONFIG_DVB_STB6100=m ++CONFIG_DVB_STV090x=m ++CONFIG_DVB_STV6110x=m ++CONFIG_DVB_M88DS3103=m ++ ++# ++# Multistandard (cable + terrestrial) frontends ++# ++CONFIG_DVB_DRXK=m ++CONFIG_DVB_TDA18271C2DD=m ++CONFIG_DVB_SI2165=m ++ ++# ++# DVB-S (satellite) frontends ++# ++CONFIG_DVB_CX24110=m ++CONFIG_DVB_CX24123=m ++CONFIG_DVB_MT312=m ++CONFIG_DVB_ZL10036=m ++CONFIG_DVB_ZL10039=m ++CONFIG_DVB_S5H1420=m ++CONFIG_DVB_STV0288=m ++CONFIG_DVB_STB6000=m ++CONFIG_DVB_STV0299=m ++CONFIG_DVB_STV6110=m ++CONFIG_DVB_STV0900=m ++CONFIG_DVB_TDA8083=m ++CONFIG_DVB_TDA10086=m ++CONFIG_DVB_TDA8261=m ++CONFIG_DVB_VES1X93=m ++CONFIG_DVB_TUNER_ITD1000=m ++CONFIG_DVB_TUNER_CX24113=m ++CONFIG_DVB_TDA826X=m ++CONFIG_DVB_TUA6100=m ++CONFIG_DVB_CX24116=m ++CONFIG_DVB_CX24117=m ++CONFIG_DVB_SI21XX=m ++CONFIG_DVB_TS2020=m ++CONFIG_DVB_DS3000=m ++CONFIG_DVB_MB86A16=m ++CONFIG_DVB_TDA10071=m ++ ++# ++# DVB-T (terrestrial) frontends ++# ++CONFIG_DVB_SP8870=m ++CONFIG_DVB_SP887X=m ++CONFIG_DVB_CX22700=m ++CONFIG_DVB_CX22702=m ++CONFIG_DVB_S5H1432=m ++CONFIG_DVB_DRXD=m ++CONFIG_DVB_L64781=m ++CONFIG_DVB_TDA1004X=m ++CONFIG_DVB_NXT6000=m ++CONFIG_DVB_MT352=m ++CONFIG_DVB_ZL10353=m ++CONFIG_DVB_DIB3000MB=m ++CONFIG_DVB_DIB3000MC=m ++CONFIG_DVB_DIB7000M=m ++CONFIG_DVB_DIB7000P=m ++CONFIG_DVB_DIB9000=m ++CONFIG_DVB_TDA10048=m ++CONFIG_DVB_AF9013=m ++CONFIG_DVB_EC100=m ++CONFIG_DVB_HD29L2=m ++CONFIG_DVB_STV0367=m ++CONFIG_DVB_CXD2820R=m ++CONFIG_DVB_RTL2830=m ++CONFIG_DVB_RTL2832=m ++CONFIG_DVB_RTL2832_SDR=m ++CONFIG_DVB_SI2168=m ++CONFIG_DVB_AS102_FE=m ++ ++# ++# DVB-C (cable) frontends ++# ++CONFIG_DVB_VES1820=m ++CONFIG_DVB_TDA10021=m ++CONFIG_DVB_TDA10023=m ++CONFIG_DVB_STV0297=m ++ ++# ++# ATSC (North American/Korean Terrestrial/Cable DTV) frontends ++# ++CONFIG_DVB_NXT200X=m ++CONFIG_DVB_OR51211=m ++CONFIG_DVB_OR51132=m ++CONFIG_DVB_BCM3510=m ++CONFIG_DVB_LGDT330X=m ++CONFIG_DVB_LGDT3305=m ++CONFIG_DVB_LGDT3306A=m ++CONFIG_DVB_LG2160=m ++CONFIG_DVB_S5H1409=m ++CONFIG_DVB_AU8522=m ++CONFIG_DVB_AU8522_DTV=m ++CONFIG_DVB_AU8522_V4L=m ++CONFIG_DVB_S5H1411=m ++ ++# ++# ISDB-T (terrestrial) frontends ++# ++CONFIG_DVB_S921=m ++CONFIG_DVB_DIB8000=m ++CONFIG_DVB_MB86A20S=m ++ ++# ++# ISDB-S (satellite) & ISDB-T (terrestrial) frontends ++# ++CONFIG_DVB_TC90522=m ++ ++# ++# Digital terrestrial only tuners/PLL ++# ++CONFIG_DVB_PLL=m ++CONFIG_DVB_TUNER_DIB0070=m ++CONFIG_DVB_TUNER_DIB0090=m ++ ++# ++# SEC control devices for DVB-S ++# ++CONFIG_DVB_DRX39XYJ=m ++CONFIG_DVB_LNBP21=m ++CONFIG_DVB_LNBP22=m ++CONFIG_DVB_ISL6405=m ++CONFIG_DVB_ISL6421=m ++CONFIG_DVB_ISL6423=m ++CONFIG_DVB_A8293=m ++CONFIG_DVB_SP2=m ++CONFIG_DVB_LGS8GL5=m ++CONFIG_DVB_LGS8GXX=m ++CONFIG_DVB_ATBM8830=m ++CONFIG_DVB_TDA665x=m ++CONFIG_DVB_IX2505V=m ++CONFIG_DVB_M88RS2000=m ++CONFIG_DVB_AF9033=m ++ ++# ++# Tools to develop new frontends ++# ++CONFIG_DVB_DUMMY_FE=m ++ ++# ++# Graphics support ++# ++# CONFIG_VGA_ARB is not set ++# CONFIG_IMX_IPUV3_CORE is not set ++ ++# ++# Direct Rendering Manager ++# ++CONFIG_DRM=m ++# CONFIG_DRM_PTN3460 is not set ++# CONFIG_DRM_PS8622 is not set ++# CONFIG_DRM_TDFX is not set ++# CONFIG_DRM_R128 is not set ++# CONFIG_DRM_RADEON is not set ++# CONFIG_DRM_NOUVEAU is not set ++# CONFIG_DRM_MGA is not set ++# CONFIG_DRM_VIA is not set ++# CONFIG_DRM_SAVAGE is not set ++# CONFIG_DRM_VGEM is not set ++# CONFIG_DRM_EXYNOS is not set ++# CONFIG_DRM_VMWGFX is not set ++# CONFIG_DRM_UDL is not set ++# CONFIG_DRM_AST is not set ++# CONFIG_DRM_MGAG200 is not set ++# CONFIG_DRM_CIRRUS_QEMU is not set ++# CONFIG_DRM_ARMADA is not set ++# CONFIG_DRM_TILCDC is not set ++# CONFIG_DRM_QXL is not set ++# CONFIG_DRM_BOCHS is not set ++# CONFIG_DRM_STI is not set ++CONFIG_DRM_VIVANTE=m ++ ++# ++# Frame buffer Devices ++# ++CONFIG_FB=y ++CONFIG_FIRMWARE_EDID=y ++CONFIG_FB_CMDLINE=y ++# CONFIG_FB_DDC is not set ++# CONFIG_FB_BOOT_VESA_SUPPORT is not set ++CONFIG_FB_CFB_FILLRECT=y ++CONFIG_FB_CFB_COPYAREA=y ++CONFIG_FB_CFB_IMAGEBLIT=y ++# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set ++CONFIG_FB_SYS_FILLRECT=m ++CONFIG_FB_SYS_COPYAREA=m ++CONFIG_FB_SYS_IMAGEBLIT=m ++# CONFIG_FB_FOREIGN_ENDIAN is not set ++CONFIG_FB_SYS_FOPS=m ++CONFIG_FB_DEFERRED_IO=y ++# CONFIG_FB_SVGALIB is not set ++# CONFIG_FB_MACMODES is not set ++# CONFIG_FB_BACKLIGHT is not set ++CONFIG_FB_MODE_HELPERS=y ++CONFIG_FB_TILEBLITTING=y ++ ++# ++# Frame buffer hardware drivers ++# ++# CONFIG_FB_CIRRUS is not set ++# CONFIG_FB_PM2 is not set ++# CONFIG_FB_IMX is not set ++# CONFIG_FB_CYBER2000 is not set ++# CONFIG_FB_ASILIANT is not set ++# CONFIG_FB_IMSTT is not set ++# CONFIG_FB_UVESA is not set ++# CONFIG_FB_OPENCORES is not set ++# CONFIG_FB_S1D13XXX is not set ++# CONFIG_FB_NVIDIA is not set ++# CONFIG_FB_RIVA is not set ++# CONFIG_FB_I740 is not set ++# CONFIG_FB_MATROX is not set ++# CONFIG_FB_RADEON is not set ++# CONFIG_FB_ATY128 is not set ++# CONFIG_FB_ATY is not set ++# CONFIG_FB_S3 is not set ++# CONFIG_FB_SAVAGE is not set ++# CONFIG_FB_SIS is not set ++# CONFIG_FB_NEOMAGIC is not set ++# CONFIG_FB_KYRO is not set ++# CONFIG_FB_3DFX is not set ++# CONFIG_FB_VOODOO1 is not set ++# CONFIG_FB_VT8623 is not set ++# CONFIG_FB_TRIDENT is not set ++# CONFIG_FB_ARK is not set ++# CONFIG_FB_PM3 is not set ++# CONFIG_FB_CARMINE is not set ++# CONFIG_FB_SMSCUFX is not set ++CONFIG_FB_UDL=m ++# CONFIG_FB_VIRTUAL is not set ++# CONFIG_FB_METRONOME is not set ++# CONFIG_FB_MB862XX is not set ++# CONFIG_FB_BROADSHEET is not set ++# CONFIG_FB_AUO_K190X is not set ++# CONFIG_FB_MXS is not set ++# CONFIG_FB_SIMPLE is not set ++# CONFIG_FB_SSD1307 is not set ++CONFIG_FB_MXC=y ++CONFIG_FB_MXC_SYNC_PANEL=y ++CONFIG_FB_MXC_LDB=y ++CONFIG_FB_MXC_MIPI_DSI=y ++CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y ++CONFIG_FB_MXC_HDMI=y ++CONFIG_FB_MXC_DCIC=y ++CONFIG_FB_MXC_EDID=y ++CONFIG_BACKLIGHT_LCD_SUPPORT=y ++CONFIG_LCD_CLASS_DEVICE=y ++CONFIG_LCD_L4F00242T03=m ++CONFIG_LCD_LMS283GF05=m ++CONFIG_LCD_LTV350QV=m ++CONFIG_LCD_ILI922X=m ++CONFIG_LCD_ILI9320=m ++CONFIG_LCD_TDO24M=m ++CONFIG_LCD_VGG2432A4=m ++CONFIG_LCD_PLATFORM=y ++CONFIG_LCD_S6E63M0=m ++CONFIG_LCD_LD9040=m ++CONFIG_LCD_AMS369FG06=m ++CONFIG_LCD_LMS501KF03=m ++CONFIG_LCD_HX8357=m ++CONFIG_BACKLIGHT_CLASS_DEVICE=y ++CONFIG_BACKLIGHT_GENERIC=y ++CONFIG_BACKLIGHT_PWM=y ++CONFIG_BACKLIGHT_DA9052=m ++CONFIG_BACKLIGHT_ADP8860=m ++CONFIG_BACKLIGHT_ADP8870=m ++CONFIG_BACKLIGHT_LM3630A=m ++CONFIG_BACKLIGHT_LM3639=m ++CONFIG_BACKLIGHT_LP855X=m ++CONFIG_BACKLIGHT_GPIO=m ++CONFIG_BACKLIGHT_LV5207LP=m ++CONFIG_BACKLIGHT_BD6107=m ++# CONFIG_VGASTATE is not set ++CONFIG_VIDEOMODE_HELPERS=y ++CONFIG_HDMI=y ++ ++# ++# Console display driver support ++# ++CONFIG_DUMMY_CONSOLE=y ++CONFIG_FRAMEBUFFER_CONSOLE=y ++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y ++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set ++# CONFIG_LOGO is not set ++CONFIG_SOUND=y ++CONFIG_SOUND_OSS_CORE=y ++# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set ++CONFIG_SND=y ++CONFIG_SND_TIMER=y ++CONFIG_SND_PCM=y ++CONFIG_SND_DMAENGINE_PCM=y ++CONFIG_SND_HWDEP=m ++CONFIG_SND_RAWMIDI=m ++CONFIG_SND_COMPRESS_OFFLOAD=y ++CONFIG_SND_JACK=y ++# CONFIG_SND_SEQUENCER is not set ++CONFIG_SND_OSSEMUL=y ++CONFIG_SND_MIXER_OSS=m ++# CONFIG_SND_PCM_OSS is not set ++CONFIG_SND_HRTIMER=y ++# CONFIG_SND_DYNAMIC_MINORS is not set ++# CONFIG_SND_SUPPORT_OLD_API is not set ++# CONFIG_SND_VERBOSE_PROCFS is not set ++# CONFIG_SND_VERBOSE_PRINTK is not set ++# CONFIG_SND_DEBUG is not set ++CONFIG_SND_VMASTER=y ++# CONFIG_SND_RAWMIDI_SEQ is not set ++# CONFIG_SND_OPL3_LIB_SEQ is not set ++# CONFIG_SND_OPL4_LIB_SEQ is not set ++# CONFIG_SND_SBAWE_SEQ is not set ++# CONFIG_SND_EMU10K1_SEQ is not set ++CONFIG_SND_MPU401_UART=m ++CONFIG_SND_AC97_CODEC=m ++CONFIG_SND_DRIVERS=y ++CONFIG_SND_DUMMY=m ++CONFIG_SND_ALOOP=m ++CONFIG_SND_MTPAV=m ++CONFIG_SND_SERIAL_U16550=m ++CONFIG_SND_MPU401=m ++# CONFIG_SND_AC97_POWER_SAVE is not set ++# CONFIG_SND_PCI is not set ++ ++# ++# HD-Audio ++# ++CONFIG_SND_ARM=y ++CONFIG_SND_SPI=y ++CONFIG_SND_USB=y ++CONFIG_SND_USB_AUDIO=m ++CONFIG_SND_USB_UA101=m ++CONFIG_SND_USB_CAIAQ=m ++CONFIG_SND_USB_CAIAQ_INPUT=y ++CONFIG_SND_USB_6FIRE=m ++CONFIG_SND_USB_HIFACE=m ++CONFIG_SND_BCD2000=m ++# CONFIG_SND_USB_POD is not set ++# CONFIG_SND_USB_PODHD is not set ++# CONFIG_SND_USB_TONEPORT is not set ++# CONFIG_SND_USB_VARIAX is not set ++CONFIG_SND_SOC=y ++CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y ++# CONFIG_SND_ATMEL_SOC is not set ++# CONFIG_SND_DESIGNWARE_I2S is not set ++ ++# ++# SoC Audio for Freescale CPUs ++# ++ ++# ++# Common SoC Audio options for Freescale CPUs: ++# ++# CONFIG_SND_SOC_FSL_ASRC is not set ++CONFIG_SND_SOC_FSL_SAI=y ++CONFIG_SND_SOC_FSL_SSI=y ++CONFIG_SND_SOC_FSL_SPDIF=y ++CONFIG_SND_SOC_FSL_ESAI=y ++CONFIG_SND_SOC_FSL_HDMI=y ++CONFIG_SND_SOC_FSL_UTILS=y ++CONFIG_SND_SOC_IMX_PCM_DMA=y ++CONFIG_SND_SOC_IMX_HDMI_DMA=y ++CONFIG_SND_SOC_IMX_AUDMUX=y ++CONFIG_SND_IMX_SOC=y ++ ++# ++# SoC Audio support for Freescale i.MX boards: ++# ++# CONFIG_SND_SOC_EUKREA_TLV320 is not set ++# CONFIG_SND_SOC_IMX_WM8962 is not set ++# CONFIG_SND_SOC_IMX_ES8328 is not set ++CONFIG_SND_SOC_IMX_SGTL5000=y ++CONFIG_SND_SOC_IMX_SPDIF=y ++# CONFIG_SND_SOC_IMX_MC13783 is not set ++CONFIG_SND_SOC_IMX_HDMI=y ++CONFIG_SND_SOC_FSL_ASOC_CARD=m ++# CONFIG_SND_SOC_QCOM is not set ++# CONFIG_SND_SOC_XTFPGA_I2S is not set ++CONFIG_SND_SOC_I2C_AND_SPI=y ++ ++# ++# CODEC drivers ++# ++# CONFIG_SND_SOC_ADAU1701 is not set ++# CONFIG_SND_SOC_AK4104 is not set ++# CONFIG_SND_SOC_AK4554 is not set ++# CONFIG_SND_SOC_AK4642 is not set ++# CONFIG_SND_SOC_AK5386 is not set ++# CONFIG_SND_SOC_ALC5623 is not set ++# CONFIG_SND_SOC_CS35L32 is not set ++# CONFIG_SND_SOC_CS42L51_I2C is not set ++# CONFIG_SND_SOC_CS42L52 is not set ++# CONFIG_SND_SOC_CS42L56 is not set ++# CONFIG_SND_SOC_CS42L73 is not set ++# CONFIG_SND_SOC_CS4265 is not set ++# CONFIG_SND_SOC_CS4270 is not set ++# CONFIG_SND_SOC_CS4271_I2C is not set ++# CONFIG_SND_SOC_CS4271_SPI is not set ++# CONFIG_SND_SOC_CS42XX8_I2C is not set ++CONFIG_SND_SOC_HDMI_CODEC=y ++# CONFIG_SND_SOC_ES8328 is not set ++# CONFIG_SND_SOC_PCM1681 is not set ++# CONFIG_SND_SOC_PCM1792A is not set ++# CONFIG_SND_SOC_PCM512x_I2C is not set ++# CONFIG_SND_SOC_PCM512x_SPI is not set ++# CONFIG_SND_SOC_RT5631 is not set ++# CONFIG_SND_SOC_RT5677_SPI is not set ++CONFIG_SND_SOC_SGTL5000=y ++CONFIG_SND_SOC_SI476X=m ++# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set ++CONFIG_SND_SOC_SPDIF=y ++# CONFIG_SND_SOC_SSM2602_SPI is not set ++# CONFIG_SND_SOC_SSM2602_I2C is not set ++# CONFIG_SND_SOC_SSM4567 is not set ++# CONFIG_SND_SOC_STA32X is not set ++# CONFIG_SND_SOC_STA350 is not set ++# CONFIG_SND_SOC_TAS2552 is not set ++# CONFIG_SND_SOC_TAS5086 is not set ++# CONFIG_SND_SOC_TFA9879 is not set ++# CONFIG_SND_SOC_TLV320AIC23_I2C is not set ++# CONFIG_SND_SOC_TLV320AIC23_SPI is not set ++# CONFIG_SND_SOC_TLV320AIC31XX is not set ++# CONFIG_SND_SOC_TLV320AIC3X is not set ++# CONFIG_SND_SOC_TS3A227E is not set ++# CONFIG_SND_SOC_WM8510 is not set ++# CONFIG_SND_SOC_WM8523 is not set ++# CONFIG_SND_SOC_WM8580 is not set ++# CONFIG_SND_SOC_WM8711 is not set ++# CONFIG_SND_SOC_WM8728 is not set ++# CONFIG_SND_SOC_WM8731 is not set ++# CONFIG_SND_SOC_WM8737 is not set ++# CONFIG_SND_SOC_WM8741 is not set ++# CONFIG_SND_SOC_WM8750 is not set ++# CONFIG_SND_SOC_WM8753 is not set ++# CONFIG_SND_SOC_WM8770 is not set ++# CONFIG_SND_SOC_WM8776 is not set ++# CONFIG_SND_SOC_WM8804_I2C is not set ++# CONFIG_SND_SOC_WM8804_SPI is not set ++# CONFIG_SND_SOC_WM8903 is not set ++# CONFIG_SND_SOC_WM8962 is not set ++# CONFIG_SND_SOC_WM8978 is not set ++# CONFIG_SND_SOC_TPA6130A2 is not set ++# CONFIG_SND_SIMPLE_CARD is not set ++# CONFIG_SOUND_PRIME is not set ++CONFIG_AC97_BUS=m ++ ++# ++# HID support ++# ++CONFIG_HID=y ++CONFIG_HID_BATTERY_STRENGTH=y ++CONFIG_HIDRAW=y ++CONFIG_UHID=m ++CONFIG_HID_GENERIC=y ++ ++# ++# Special HID drivers ++# ++CONFIG_HID_A4TECH=m ++CONFIG_HID_ACRUX=m ++CONFIG_HID_ACRUX_FF=y ++CONFIG_HID_APPLE=m ++CONFIG_HID_APPLEIR=m ++CONFIG_HID_AUREAL=m ++CONFIG_HID_BELKIN=m ++# CONFIG_HID_BETOP_FF is not set ++CONFIG_HID_CHERRY=m ++CONFIG_HID_CHICONY=m ++CONFIG_HID_PRODIKEYS=m ++CONFIG_HID_CP2112=m ++CONFIG_HID_CYPRESS=m ++CONFIG_HID_DRAGONRISE=m ++CONFIG_DRAGONRISE_FF=y ++CONFIG_HID_EMS_FF=m ++CONFIG_HID_ELECOM=m ++CONFIG_HID_ELO=m ++CONFIG_HID_EZKEY=m ++CONFIG_HID_HOLTEK=m ++CONFIG_HOLTEK_FF=y ++CONFIG_HID_GT683R=m ++CONFIG_HID_KEYTOUCH=m ++CONFIG_HID_KYE=m ++CONFIG_HID_UCLOGIC=m ++CONFIG_HID_WALTOP=m ++CONFIG_HID_GYRATION=m ++CONFIG_HID_ICADE=m ++CONFIG_HID_TWINHAN=m ++CONFIG_HID_KENSINGTON=m ++CONFIG_HID_LCPOWER=m ++CONFIG_HID_LENOVO=m ++CONFIG_HID_LOGITECH=m ++CONFIG_HID_LOGITECH_DJ=m ++CONFIG_HID_LOGITECH_HIDPP=m ++CONFIG_LOGITECH_FF=y ++CONFIG_LOGIRUMBLEPAD2_FF=y ++CONFIG_LOGIG940_FF=y ++CONFIG_LOGIWHEELS_FF=y ++CONFIG_HID_MAGICMOUSE=m ++CONFIG_HID_MICROSOFT=m ++CONFIG_HID_MONTEREY=m ++CONFIG_HID_MULTITOUCH=m ++CONFIG_HID_NTRIG=m ++CONFIG_HID_ORTEK=m ++CONFIG_HID_PANTHERLORD=m ++CONFIG_PANTHERLORD_FF=y ++CONFIG_HID_PENMOUNT=m ++CONFIG_HID_PETALYNX=m ++CONFIG_HID_PICOLCD=m ++CONFIG_HID_PICOLCD_FB=y ++CONFIG_HID_PICOLCD_BACKLIGHT=y ++CONFIG_HID_PICOLCD_LCD=y ++CONFIG_HID_PICOLCD_LEDS=y ++CONFIG_HID_PICOLCD_CIR=y ++CONFIG_HID_PLANTRONICS=m ++CONFIG_HID_PRIMAX=m ++CONFIG_HID_ROCCAT=m ++CONFIG_HID_SAITEK=m ++CONFIG_HID_SAMSUNG=m ++CONFIG_HID_SONY=m ++CONFIG_SONY_FF=y ++CONFIG_HID_SPEEDLINK=m ++CONFIG_HID_STEELSERIES=m ++CONFIG_HID_SUNPLUS=m ++CONFIG_HID_RMI=m ++CONFIG_HID_GREENASIA=m ++CONFIG_GREENASIA_FF=y ++CONFIG_HID_SMARTJOYPLUS=m ++CONFIG_SMARTJOYPLUS_FF=y ++CONFIG_HID_TIVO=m ++CONFIG_HID_TOPSEED=m ++CONFIG_HID_THINGM=m ++CONFIG_HID_THRUSTMASTER=m ++CONFIG_THRUSTMASTER_FF=y ++CONFIG_HID_WACOM=m ++CONFIG_HID_WIIMOTE=m ++CONFIG_HID_XINMO=m ++CONFIG_HID_ZEROPLUS=m ++CONFIG_ZEROPLUS_FF=y ++CONFIG_HID_ZYDACRON=m ++CONFIG_HID_SENSOR_HUB=m ++# CONFIG_HID_SENSOR_CUSTOM_SENSOR is not set ++ ++# ++# USB HID support ++# ++CONFIG_USB_HID=y ++CONFIG_HID_PID=y ++CONFIG_USB_HIDDEV=y ++ ++# ++# I2C HID support ++# ++CONFIG_I2C_HID=m ++CONFIG_USB_OHCI_LITTLE_ENDIAN=y ++CONFIG_USB_SUPPORT=y ++CONFIG_USB_COMMON=y ++CONFIG_USB_ARCH_HAS_HCD=y ++CONFIG_USB=y ++# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set ++ ++# ++# Miscellaneous USB options ++# ++CONFIG_USB_DEFAULT_PERSIST=y ++# CONFIG_USB_DYNAMIC_MINORS is not set ++CONFIG_USB_OTG=y ++# CONFIG_USB_OTG_WHITELIST is not set ++# CONFIG_USB_OTG_BLACKLIST_HUB is not set ++CONFIG_USB_OTG_FSM=y ++# CONFIG_USB_MON is not set ++# CONFIG_USB_WUSB_CBAF is not set ++ ++# ++# USB Host Controller Drivers ++# ++# CONFIG_USB_C67X00_HCD is not set ++# CONFIG_USB_XHCI_HCD is not set ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_ROOT_HUB_TT=y ++CONFIG_USB_EHCI_TT_NEWSCHED=y ++CONFIG_USB_FSL_MPH_DR_OF=m ++CONFIG_USB_EHCI_PCI=y ++# CONFIG_USB_EHCI_MXC is not set ++CONFIG_USB_EHCI_HCD_PLATFORM=y ++# CONFIG_USB_OXU210HP_HCD is not set ++# CONFIG_USB_ISP116X_HCD is not set ++# CONFIG_USB_ISP1362_HCD is not set ++# CONFIG_USB_FUSBH200_HCD is not set ++# CONFIG_USB_FOTG210_HCD is not set ++# CONFIG_USB_MAX3421_HCD is not set ++# CONFIG_USB_OHCI_HCD is not set ++# CONFIG_USB_UHCI_HCD is not set ++# CONFIG_USB_SL811_HCD is not set ++# CONFIG_USB_R8A66597_HCD is not set ++# CONFIG_USB_IMX21_HCD is not set ++# CONFIG_USB_HCD_BCMA is not set ++# CONFIG_USB_HCD_SSB is not set ++# CONFIG_USB_HCD_TEST_MODE is not set ++ ++# ++# USB Device Class drivers ++# ++CONFIG_USB_ACM=m ++CONFIG_USB_PRINTER=m ++CONFIG_USB_WDM=m ++# CONFIG_USB_TMC is not set ++ ++# ++# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ++# ++ ++# ++# also be needed; see USB_STORAGE Help for more info ++# ++CONFIG_USB_STORAGE=y ++# CONFIG_USB_STORAGE_DEBUG is not set ++CONFIG_USB_STORAGE_REALTEK=y ++CONFIG_REALTEK_AUTOPM=y ++CONFIG_USB_STORAGE_DATAFAB=y ++CONFIG_USB_STORAGE_FREECOM=y ++CONFIG_USB_STORAGE_ISD200=y ++CONFIG_USB_STORAGE_USBAT=y ++CONFIG_USB_STORAGE_SDDR09=y ++CONFIG_USB_STORAGE_SDDR55=y ++CONFIG_USB_STORAGE_JUMPSHOT=y ++CONFIG_USB_STORAGE_ALAUDA=y ++CONFIG_USB_STORAGE_ONETOUCH=y ++CONFIG_USB_STORAGE_KARMA=y ++CONFIG_USB_STORAGE_CYPRESS_ATACB=y ++CONFIG_USB_STORAGE_ENE_UB6250=y ++CONFIG_USB_UAS=y ++ ++# ++# USB Imaging devices ++# ++# CONFIG_USB_MDC800 is not set ++# CONFIG_USB_MICROTEK is not set ++CONFIG_USBIP_CORE=m ++CONFIG_USBIP_VHCI_HCD=m ++CONFIG_USBIP_HOST=m ++# CONFIG_USBIP_DEBUG is not set ++CONFIG_USB_MUSB_HDRC=m ++CONFIG_USB_MUSB_HOST=y ++# CONFIG_USB_MUSB_GADGET is not set ++# CONFIG_USB_MUSB_DUAL_ROLE is not set ++ ++# ++# Platform Glue Layer ++# ++CONFIG_MUSB_PIO_ONLY=y ++CONFIG_USB_DWC3=m ++CONFIG_USB_DWC3_HOST=y ++# CONFIG_USB_DWC3_GADGET is not set ++# CONFIG_USB_DWC3_DUAL_ROLE is not set ++ ++# ++# Platform Glue Driver Support ++# ++CONFIG_USB_DWC3_PCI=m ++ ++# ++# Debugging features ++# ++# CONFIG_USB_DWC3_DEBUG is not set ++CONFIG_USB_DWC2=m ++CONFIG_USB_DWC2_HOST=y ++ ++# ++# Gadget/Dual-role mode requires USB Gadget support to be enabled ++# ++# CONFIG_USB_DWC2_PERIPHERAL is not set ++# CONFIG_USB_DWC2_DUAL_ROLE is not set ++CONFIG_USB_DWC2_PLATFORM=m ++CONFIG_USB_DWC2_PCI=m ++# CONFIG_USB_DWC2_DEBUG is not set ++# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set ++CONFIG_USB_CHIPIDEA=y ++CONFIG_USB_CHIPIDEA_OF=y ++CONFIG_USB_CHIPIDEA_PCI=y ++# CONFIG_USB_CHIPIDEA_UDC is not set ++CONFIG_USB_CHIPIDEA_HOST=y ++# CONFIG_USB_CHIPIDEA_DEBUG is not set ++# CONFIG_USB_ISP1760 is not set ++ ++# ++# USB port drivers ++# ++CONFIG_USB_SERIAL=y ++# CONFIG_USB_SERIAL_CONSOLE is not set ++# CONFIG_USB_SERIAL_GENERIC is not set ++# CONFIG_USB_SERIAL_SIMPLE is not set ++# CONFIG_USB_SERIAL_AIRCABLE is not set ++# CONFIG_USB_SERIAL_ARK3116 is not set ++# CONFIG_USB_SERIAL_BELKIN is not set ++# CONFIG_USB_SERIAL_CH341 is not set ++# CONFIG_USB_SERIAL_WHITEHEAT is not set ++# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set ++# CONFIG_USB_SERIAL_CP210X is not set ++# CONFIG_USB_SERIAL_CYPRESS_M8 is not set ++# CONFIG_USB_SERIAL_EMPEG is not set ++# CONFIG_USB_SERIAL_FTDI_SIO is not set ++# CONFIG_USB_SERIAL_VISOR is not set ++# CONFIG_USB_SERIAL_IPAQ is not set ++# CONFIG_USB_SERIAL_IR is not set ++# CONFIG_USB_SERIAL_EDGEPORT is not set ++# CONFIG_USB_SERIAL_EDGEPORT_TI is not set ++# CONFIG_USB_SERIAL_F81232 is not set ++# CONFIG_USB_SERIAL_GARMIN is not set ++# CONFIG_USB_SERIAL_IPW is not set ++# CONFIG_USB_SERIAL_IUU is not set ++# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set ++# CONFIG_USB_SERIAL_KEYSPAN is not set ++# CONFIG_USB_SERIAL_KLSI is not set ++# CONFIG_USB_SERIAL_KOBIL_SCT is not set ++# CONFIG_USB_SERIAL_MCT_U232 is not set ++# CONFIG_USB_SERIAL_METRO is not set ++# CONFIG_USB_SERIAL_MOS7720 is not set ++# CONFIG_USB_SERIAL_MOS7840 is not set ++# CONFIG_USB_SERIAL_MXUPORT is not set ++# CONFIG_USB_SERIAL_NAVMAN is not set ++# CONFIG_USB_SERIAL_PL2303 is not set ++# CONFIG_USB_SERIAL_OTI6858 is not set ++# CONFIG_USB_SERIAL_QCAUX is not set ++# CONFIG_USB_SERIAL_QUALCOMM is not set ++# CONFIG_USB_SERIAL_SPCP8X5 is not set ++# CONFIG_USB_SERIAL_SAFE is not set ++# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set ++# CONFIG_USB_SERIAL_SYMBOL is not set ++# CONFIG_USB_SERIAL_TI is not set ++# CONFIG_USB_SERIAL_CYBERJACK is not set ++# CONFIG_USB_SERIAL_XIRCOM is not set ++# CONFIG_USB_SERIAL_OPTION is not set ++# CONFIG_USB_SERIAL_OMNINET is not set ++# CONFIG_USB_SERIAL_OPTICON is not set ++# CONFIG_USB_SERIAL_XSENS_MT is not set ++# CONFIG_USB_SERIAL_WISHBONE is not set ++# CONFIG_USB_SERIAL_SSU100 is not set ++# CONFIG_USB_SERIAL_QT2 is not set ++# CONFIG_USB_SERIAL_DEBUG is not set ++ ++# ++# USB Miscellaneous drivers ++# ++CONFIG_USB_EMI62=m ++CONFIG_USB_EMI26=m ++# CONFIG_USB_ADUTUX is not set ++CONFIG_USB_SEVSEG=m ++CONFIG_USB_RIO500=m ++CONFIG_USB_LEGOTOWER=m ++CONFIG_USB_LCD=m ++CONFIG_USB_LED=m ++CONFIG_USB_CYPRESS_CY7C63=m ++CONFIG_USB_CYTHERM=m ++# CONFIG_USB_IDMOUSE is not set ++# CONFIG_USB_FTDI_ELAN is not set ++CONFIG_USB_APPLEDISPLAY=m ++CONFIG_USB_SISUSBVGA=m ++CONFIG_USB_SISUSBVGA_CON=y ++CONFIG_USB_LD=m ++CONFIG_USB_TRANCEVIBRATOR=m ++# CONFIG_USB_IOWARRIOR is not set ++# CONFIG_USB_TEST is not set ++# CONFIG_USB_EHSET_TEST_FIXTURE is not set ++CONFIG_USB_ISIGHTFW=m ++# CONFIG_USB_YUREX is not set ++# CONFIG_USB_EZUSB_FX2 is not set ++# CONFIG_USB_HSIC_USB3503 is not set ++# CONFIG_USB_LINK_LAYER_TEST is not set ++# CONFIG_USB_CHAOSKEY is not set ++ ++# ++# USB Physical Layer drivers ++# ++CONFIG_USB_PHY=y ++CONFIG_NOP_USB_XCEIV=y ++CONFIG_AM335X_CONTROL_USB=m ++CONFIG_AM335X_PHY_USB=m ++CONFIG_USB_GPIO_VBUS=m ++CONFIG_USB_ISP1301=m ++CONFIG_USB_MXS_PHY=y ++# CONFIG_USB_ULPI is not set ++CONFIG_USB_GADGET=y ++# CONFIG_USB_GADGET_DEBUG is not set ++# CONFIG_USB_GADGET_DEBUG_FILES is not set ++# CONFIG_USB_GADGET_DEBUG_FS is not set ++CONFIG_USB_GADGET_VBUS_DRAW=2 ++CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 ++ ++# ++# USB Peripheral Controller ++# ++CONFIG_USB_FSL_USB2=m ++# CONFIG_USB_FUSB300 is not set ++# CONFIG_USB_FOTG210_UDC is not set ++# CONFIG_USB_GR_UDC is not set ++# CONFIG_USB_R8A66597 is not set ++# CONFIG_USB_PXA27X is not set ++# CONFIG_USB_MV_UDC is not set ++# CONFIG_USB_MV_U3D is not set ++# CONFIG_USB_M66592 is not set ++# CONFIG_USB_BDC_UDC is not set ++# CONFIG_USB_AMD5536UDC is not set ++# CONFIG_USB_NET2272 is not set ++# CONFIG_USB_NET2280 is not set ++# CONFIG_USB_GOKU is not set ++# CONFIG_USB_EG20T is not set ++# CONFIG_USB_GADGET_XILINX is not set ++# CONFIG_USB_DUMMY_HCD is not set ++CONFIG_USB_LIBCOMPOSITE=m ++CONFIG_USB_F_ACM=m ++CONFIG_USB_F_SS_LB=m ++CONFIG_USB_U_SERIAL=m ++CONFIG_USB_U_ETHER=m ++CONFIG_USB_F_SERIAL=m ++CONFIG_USB_F_OBEX=m ++CONFIG_USB_F_NCM=m ++CONFIG_USB_F_ECM=m ++CONFIG_USB_F_EEM=m ++CONFIG_USB_F_SUBSET=m ++CONFIG_USB_F_RNDIS=m ++CONFIG_USB_F_MASS_STORAGE=m ++CONFIG_USB_F_FS=m ++CONFIG_USB_F_UAC1=m ++CONFIG_USB_F_UAC2=m ++CONFIG_USB_F_UVC=m ++CONFIG_USB_F_MIDI=m ++CONFIG_USB_F_HID=m ++CONFIG_USB_F_PRINTER=m ++CONFIG_USB_CONFIGFS=m ++CONFIG_USB_CONFIGFS_SERIAL=y ++CONFIG_USB_CONFIGFS_ACM=y ++CONFIG_USB_CONFIGFS_OBEX=y ++CONFIG_USB_CONFIGFS_NCM=y ++CONFIG_USB_CONFIGFS_ECM=y ++CONFIG_USB_CONFIGFS_ECM_SUBSET=y ++CONFIG_USB_CONFIGFS_RNDIS=y ++CONFIG_USB_CONFIGFS_EEM=y ++CONFIG_USB_CONFIGFS_MASS_STORAGE=y ++CONFIG_USB_CONFIGFS_F_LB_SS=y ++CONFIG_USB_CONFIGFS_F_FS=y ++CONFIG_USB_CONFIGFS_F_UAC1=y ++CONFIG_USB_CONFIGFS_F_UAC2=y ++CONFIG_USB_CONFIGFS_F_MIDI=y ++CONFIG_USB_CONFIGFS_F_HID=y ++# CONFIG_USB_CONFIGFS_F_UVC is not set ++# CONFIG_USB_CONFIGFS_F_PRINTER is not set ++CONFIG_USB_ZERO=m ++CONFIG_USB_ZERO_HNPTEST=y ++# CONFIG_USB_AUDIO is not set ++CONFIG_USB_ETH=m ++CONFIG_USB_ETH_RNDIS=y ++CONFIG_USB_ETH_EEM=y ++CONFIG_USB_G_NCM=m ++CONFIG_USB_GADGETFS=m ++CONFIG_USB_FUNCTIONFS=m ++CONFIG_USB_FUNCTIONFS_ETH=y ++CONFIG_USB_FUNCTIONFS_RNDIS=y ++CONFIG_USB_FUNCTIONFS_GENERIC=y ++CONFIG_USB_MASS_STORAGE=m ++CONFIG_USB_G_SERIAL=m ++CONFIG_USB_MIDI_GADGET=m ++CONFIG_USB_G_PRINTER=m ++CONFIG_USB_CDC_COMPOSITE=m ++CONFIG_USB_G_ACM_MS=m ++CONFIG_USB_G_MULTI=m ++CONFIG_USB_G_MULTI_RNDIS=y ++CONFIG_USB_G_MULTI_CDC=y ++# CONFIG_USB_G_HID is not set ++CONFIG_USB_G_DBGP=m ++# CONFIG_USB_G_DBGP_PRINTK is not set ++CONFIG_USB_G_DBGP_SERIAL=y ++CONFIG_USB_G_WEBCAM=m ++CONFIG_USB_LED_TRIG=y ++# CONFIG_UWB is not set ++CONFIG_MMC=y ++# CONFIG_MMC_DEBUG is not set ++# CONFIG_MMC_CLKGATE is not set ++ ++# ++# MMC/SD/SDIO Card Drivers ++# ++CONFIG_MMC_BLOCK=y ++CONFIG_MMC_BLOCK_MINORS=8 ++CONFIG_MMC_BLOCK_BOUNCE=y ++CONFIG_SDIO_UART=m ++# CONFIG_MMC_TEST is not set ++ ++# ++# MMC/SD/SDIO Host Controller Drivers ++# ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_IO_ACCESSORS=y ++# CONFIG_MMC_SDHCI_PCI is not set ++CONFIG_MMC_SDHCI_PLTFM=y ++CONFIG_MMC_SDHCI_OF_ARASAN=m ++CONFIG_MMC_SDHCI_ESDHC_IMX=y ++# CONFIG_MMC_SDHCI_F_SDH30 is not set ++CONFIG_MMC_MXC=y ++CONFIG_MMC_TIFM_SD=m ++CONFIG_MMC_CB710=m ++# CONFIG_MMC_VIA_SDMMC is not set ++CONFIG_MMC_DW=y ++CONFIG_MMC_DW_IDMAC=y ++CONFIG_MMC_DW_PLTFM=y ++CONFIG_MMC_DW_EXYNOS=y ++# CONFIG_MMC_DW_K3 is not set ++# CONFIG_MMC_DW_PCI is not set ++CONFIG_MMC_VUB300=m ++CONFIG_MMC_USHC=y ++CONFIG_MMC_USDHI6ROL0=m ++CONFIG_MMC_TOSHIBA_PCI=m ++# CONFIG_MEMSTICK is not set ++CONFIG_NEW_LEDS=y ++CONFIG_LEDS_CLASS=m ++# CONFIG_LEDS_CLASS_FLASH is not set ++ ++# ++# LED drivers ++# ++# CONFIG_LEDS_LM3530 is not set ++# CONFIG_LEDS_LM3642 is not set ++# CONFIG_LEDS_PCA9532 is not set ++CONFIG_LEDS_GPIO=m ++# CONFIG_LEDS_LP3944 is not set ++# CONFIG_LEDS_LP5521 is not set ++# CONFIG_LEDS_LP5523 is not set ++# CONFIG_LEDS_LP5562 is not set ++# CONFIG_LEDS_LP8501 is not set ++# CONFIG_LEDS_LP8860 is not set ++# CONFIG_LEDS_PCA955X is not set ++# CONFIG_LEDS_PCA963X is not set ++# CONFIG_LEDS_DA9052 is not set ++# CONFIG_LEDS_DAC124S085 is not set ++CONFIG_LEDS_PWM=m ++CONFIG_LEDS_REGULATOR=m ++# CONFIG_LEDS_BD2802 is not set ++# CONFIG_LEDS_LT3593 is not set ++# CONFIG_LEDS_MC13783 is not set ++# CONFIG_LEDS_TCA6507 is not set ++# CONFIG_LEDS_LM355x is not set ++ ++# ++# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) ++# ++# CONFIG_LEDS_BLINKM is not set ++# CONFIG_LEDS_PM8941_WLED is not set ++ ++# ++# LED Triggers ++# ++CONFIG_LEDS_TRIGGERS=y ++CONFIG_LEDS_TRIGGER_TIMER=m ++CONFIG_LEDS_TRIGGER_ONESHOT=m ++CONFIG_LEDS_TRIGGER_HEARTBEAT=y ++CONFIG_LEDS_TRIGGER_BACKLIGHT=m ++CONFIG_LEDS_TRIGGER_CPU=y ++CONFIG_LEDS_TRIGGER_GPIO=m ++CONFIG_LEDS_TRIGGER_DEFAULT_ON=y ++ ++# ++# iptables trigger is under Netfilter config (LED target) ++# ++CONFIG_LEDS_TRIGGER_TRANSIENT=m ++CONFIG_LEDS_TRIGGER_CAMERA=m ++# CONFIG_ACCESSIBILITY is not set ++# CONFIG_INFINIBAND is not set ++# CONFIG_EDAC is not set ++CONFIG_RTC_LIB=y ++CONFIG_RTC_CLASS=y ++CONFIG_RTC_HCTOSYS=y ++# CONFIG_RTC_SYSTOHC is not set ++CONFIG_RTC_HCTOSYS_DEVICE="rtc0" ++# CONFIG_RTC_DEBUG is not set ++ ++# ++# RTC interfaces ++# ++CONFIG_RTC_INTF_SYSFS=y ++CONFIG_RTC_INTF_PROC=y ++CONFIG_RTC_INTF_DEV=y ++CONFIG_RTC_INTF_DEV_UIE_EMUL=y ++# CONFIG_RTC_DRV_TEST is not set ++ ++# ++# I2C RTC drivers ++# ++# CONFIG_RTC_DRV_ABB5ZES3 is not set ++# CONFIG_RTC_DRV_ABX80X is not set ++# CONFIG_RTC_DRV_DS1307 is not set ++# CONFIG_RTC_DRV_DS1374 is not set ++# CONFIG_RTC_DRV_DS1672 is not set ++# CONFIG_RTC_DRV_DS3232 is not set ++# CONFIG_RTC_DRV_HYM8563 is not set ++# CONFIG_RTC_DRV_MAX6900 is not set ++# CONFIG_RTC_DRV_RS5C372 is not set ++# CONFIG_RTC_DRV_ISL1208 is not set ++# CONFIG_RTC_DRV_ISL12022 is not set ++# CONFIG_RTC_DRV_ISL12057 is not set ++# CONFIG_RTC_DRV_X1205 is not set ++# CONFIG_RTC_DRV_PCF2127 is not set ++CONFIG_RTC_DRV_PCF8523=y ++# CONFIG_RTC_DRV_PCF8563 is not set ++# CONFIG_RTC_DRV_PCF85063 is not set ++# CONFIG_RTC_DRV_PCF8583 is not set ++# CONFIG_RTC_DRV_M41T80 is not set ++# CONFIG_RTC_DRV_BQ32K is not set ++# CONFIG_RTC_DRV_S35390A is not set ++# CONFIG_RTC_DRV_FM3130 is not set ++# CONFIG_RTC_DRV_RX8581 is not set ++# CONFIG_RTC_DRV_RX8025 is not set ++# CONFIG_RTC_DRV_EM3027 is not set ++# CONFIG_RTC_DRV_RV3029C2 is not set ++ ++# ++# SPI RTC drivers ++# ++# CONFIG_RTC_DRV_M41T93 is not set ++# CONFIG_RTC_DRV_M41T94 is not set ++# CONFIG_RTC_DRV_DS1305 is not set ++# CONFIG_RTC_DRV_DS1343 is not set ++# CONFIG_RTC_DRV_DS1347 is not set ++# CONFIG_RTC_DRV_DS1390 is not set ++# CONFIG_RTC_DRV_MAX6902 is not set ++# CONFIG_RTC_DRV_R9701 is not set ++# CONFIG_RTC_DRV_RS5C348 is not set ++# CONFIG_RTC_DRV_DS3234 is not set ++# CONFIG_RTC_DRV_PCF2123 is not set ++# CONFIG_RTC_DRV_RX4581 is not set ++# CONFIG_RTC_DRV_MCP795 is not set ++ ++# ++# Platform RTC drivers ++# ++# CONFIG_RTC_DRV_CMOS is not set ++# CONFIG_RTC_DRV_DS1286 is not set ++# CONFIG_RTC_DRV_DS1511 is not set ++# CONFIG_RTC_DRV_DS1553 is not set ++# CONFIG_RTC_DRV_DS1685_FAMILY is not set ++# CONFIG_RTC_DRV_DS1742 is not set ++# CONFIG_RTC_DRV_DS2404 is not set ++# CONFIG_RTC_DRV_DA9052 is not set ++# CONFIG_RTC_DRV_STK17TA8 is not set ++# CONFIG_RTC_DRV_M48T86 is not set ++# CONFIG_RTC_DRV_M48T35 is not set ++# CONFIG_RTC_DRV_M48T59 is not set ++# CONFIG_RTC_DRV_MSM6242 is not set ++# CONFIG_RTC_DRV_BQ4802 is not set ++# CONFIG_RTC_DRV_RP5C01 is not set ++# CONFIG_RTC_DRV_V3020 is not set ++ ++# ++# on-CPU RTC drivers ++# ++CONFIG_RTC_DRV_IMXDI=y ++CONFIG_RTC_DRV_MC13XXX=y ++CONFIG_RTC_DRV_MXC=y ++CONFIG_RTC_DRV_SNVS=y ++# CONFIG_RTC_DRV_XGENE is not set ++ ++# ++# HID Sensor RTC drivers ++# ++# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set ++CONFIG_DMADEVICES=y ++# CONFIG_DMADEVICES_DEBUG is not set ++ ++# ++# DMA Devices ++# ++CONFIG_DW_DMAC_CORE=m ++CONFIG_DW_DMAC=m ++CONFIG_DW_DMAC_PCI=m ++# CONFIG_HSU_DMA_PCI is not set ++# CONFIG_MX3_IPU is not set ++CONFIG_IMX_SDMA=y ++# CONFIG_IMX_DMA is not set ++CONFIG_MXS_DMA=y ++CONFIG_FSL_EDMA=m ++# CONFIG_NBPFAXI_DMA is not set ++CONFIG_DMA_ENGINE=y ++CONFIG_DMA_VIRTUAL_CHANNELS=m ++CONFIG_DMA_OF=y ++ ++# ++# DMA Clients ++# ++CONFIG_ASYNC_TX_DMA=y ++# CONFIG_DMATEST is not set ++# CONFIG_AUXDISPLAY is not set ++# CONFIG_UIO is not set ++# CONFIG_VIRT_DRIVERS is not set ++ ++# ++# Virtio drivers ++# ++# CONFIG_VIRTIO_PCI is not set ++# CONFIG_VIRTIO_MMIO is not set ++ ++# ++# Microsoft Hyper-V guest support ++# ++CONFIG_STAGING=y ++CONFIG_PRISM2_USB=m ++CONFIG_COMEDI=m ++# CONFIG_COMEDI_DEBUG is not set ++CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048 ++CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480 ++# CONFIG_COMEDI_MISC_DRIVERS is not set ++# CONFIG_COMEDI_ISA_DRIVERS is not set ++# CONFIG_COMEDI_PCI_DRIVERS is not set ++# CONFIG_COMEDI_USB_DRIVERS is not set ++# CONFIG_COMEDI_8255 is not set ++# CONFIG_COMEDI_KCOMEDILIB is not set ++CONFIG_RTL8192U=m ++CONFIG_RTLLIB=m ++CONFIG_RTLLIB_CRYPTO_CCMP=m ++CONFIG_RTLLIB_CRYPTO_TKIP=m ++CONFIG_RTLLIB_CRYPTO_WEP=m ++CONFIG_RTL8192E=m ++CONFIG_R8712U=m ++CONFIG_R8188EU=m ++CONFIG_88EU_AP_MODE=y ++CONFIG_R8723AU=m ++CONFIG_8723AU_AP_MODE=y ++CONFIG_8723AU_BT_COEXIST=y ++CONFIG_RTS5208=m ++# CONFIG_VT6655 is not set ++# CONFIG_VT6656 is not set ++ ++# ++# IIO staging drivers ++# ++ ++# ++# Accelerometers ++# ++# CONFIG_ADIS16201 is not set ++# CONFIG_ADIS16203 is not set ++# CONFIG_ADIS16204 is not set ++# CONFIG_ADIS16209 is not set ++# CONFIG_ADIS16220 is not set ++# CONFIG_ADIS16240 is not set ++# CONFIG_LIS3L02DQ is not set ++# CONFIG_SCA3000 is not set ++ ++# ++# Analog to digital converters ++# ++# CONFIG_AD7606 is not set ++# CONFIG_AD7780 is not set ++# CONFIG_AD7816 is not set ++# CONFIG_AD7192 is not set ++# CONFIG_AD7280 is not set ++ ++# ++# Analog digital bi-direction converters ++# ++# CONFIG_ADT7316 is not set ++ ++# ++# Capacitance to digital converters ++# ++# CONFIG_AD7150 is not set ++# CONFIG_AD7152 is not set ++# CONFIG_AD7746 is not set ++ ++# ++# Direct Digital Synthesis ++# ++# CONFIG_AD9832 is not set ++# CONFIG_AD9834 is not set ++ ++# ++# Digital gyroscope sensors ++# ++# CONFIG_ADIS16060 is not set ++ ++# ++# Network Analyzer, Impedance Converters ++# ++# CONFIG_AD5933 is not set ++ ++# ++# Light sensors ++# ++# CONFIG_SENSORS_ISL29018 is not set ++# CONFIG_SENSORS_ISL29028 is not set ++# CONFIG_TSL2583 is not set ++# CONFIG_TSL2x7x is not set ++ ++# ++# Magnetometer sensors ++# ++# CONFIG_SENSORS_HMC5843_I2C is not set ++# CONFIG_SENSORS_HMC5843_SPI is not set ++ ++# ++# Active energy metering IC ++# ++# CONFIG_ADE7753 is not set ++# CONFIG_ADE7754 is not set ++# CONFIG_ADE7758 is not set ++# CONFIG_ADE7759 is not set ++# CONFIG_ADE7854 is not set ++ ++# ++# Resolver to digital converters ++# ++# CONFIG_AD2S90 is not set ++# CONFIG_AD2S1200 is not set ++# CONFIG_AD2S1210 is not set ++ ++# ++# Triggers - standalone ++# ++CONFIG_IIO_PERIODIC_RTC_TRIGGER=m ++# CONFIG_IIO_SIMPLE_DUMMY is not set ++# CONFIG_FB_SM7XX is not set ++# CONFIG_FB_SM750 is not set ++# CONFIG_FB_XGI is not set ++CONFIG_FT1000=m ++CONFIG_FT1000_USB=m ++ ++# ++# Speakup console speech ++# ++CONFIG_SPEAKUP=m ++CONFIG_SPEAKUP_SYNTH_ACNTSA=m ++CONFIG_SPEAKUP_SYNTH_APOLLO=m ++CONFIG_SPEAKUP_SYNTH_AUDPTR=m ++CONFIG_SPEAKUP_SYNTH_BNS=m ++CONFIG_SPEAKUP_SYNTH_DECTLK=m ++CONFIG_SPEAKUP_SYNTH_DECEXT=m ++CONFIG_SPEAKUP_SYNTH_LTLK=m ++CONFIG_SPEAKUP_SYNTH_SOFT=m ++CONFIG_SPEAKUP_SYNTH_SPKOUT=m ++CONFIG_SPEAKUP_SYNTH_TXPRT=m ++CONFIG_SPEAKUP_SYNTH_DUMMY=m ++CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m ++CONFIG_STAGING_MEDIA=y ++CONFIG_I2C_BCM2048=m ++CONFIG_DVB_CXD2099=m ++CONFIG_VIDEO_DT3155=m ++CONFIG_DT3155_CCIR=y ++CONFIG_DT3155_STREAMING=y ++CONFIG_DVB_MN88472=m ++CONFIG_DVB_MN88473=m ++CONFIG_LIRC_STAGING=y ++CONFIG_LIRC_BT829=m ++CONFIG_LIRC_IMON=m ++CONFIG_LIRC_SASEM=m ++CONFIG_LIRC_SERIAL=m ++CONFIG_LIRC_SERIAL_TRANSMITTER=y ++CONFIG_LIRC_SIR=m ++CONFIG_LIRC_ZILOG=m ++ ++# ++# Android ++# ++CONFIG_USB_WPAN_HCD=m ++CONFIG_WIMAX_GDM72XX=m ++CONFIG_WIMAX_GDM72XX_QOS=y ++CONFIG_WIMAX_GDM72XX_K_MODE=y ++CONFIG_WIMAX_GDM72XX_WIMAX2=y ++CONFIG_WIMAX_GDM72XX_USB=y ++# CONFIG_WIMAX_GDM72XX_SDIO is not set ++CONFIG_WIMAX_GDM72XX_USB_PM=y ++CONFIG_LTE_GDM724X=m ++CONFIG_MTD_SPINAND_MT29F=m ++# CONFIG_MTD_SPINAND_ONDIEECC is not set ++# CONFIG_LUSTRE_FS is not set ++CONFIG_DGNC=m ++CONFIG_DGAP=m ++# CONFIG_GS_FPGABOOT is not set ++# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set ++# CONFIG_FB_TFT is not set ++# CONFIG_I2O is not set ++# CONFIG_CHROME_PLATFORMS is not set ++CONFIG_CLKDEV_LOOKUP=y ++CONFIG_HAVE_CLK_PREPARE=y ++CONFIG_COMMON_CLK=y ++ ++# ++# Common Clock Framework ++# ++# CONFIG_COMMON_CLK_SI5351 is not set ++# CONFIG_COMMON_CLK_SI570 is not set ++# CONFIG_CLK_QORIQ is not set ++# CONFIG_COMMON_CLK_PWM is not set ++# CONFIG_COMMON_CLK_PXA is not set ++# CONFIG_COMMON_CLK_CDCE706 is not set ++ ++# ++# Hardware Spinlock drivers ++# ++ ++# ++# Clock Source drivers ++# ++CONFIG_CLKSRC_OF=y ++CONFIG_CLKSRC_MMIO=y ++# CONFIG_ATMEL_PIT is not set ++# CONFIG_SH_TIMER_CMT is not set ++# CONFIG_SH_TIMER_MTU2 is not set ++# CONFIG_SH_TIMER_TMU is not set ++# CONFIG_EM_TIMER_STI is not set ++# CONFIG_MAILBOX is not set ++CONFIG_IOMMU_SUPPORT=y ++ ++# ++# Generic IOMMU Pagetable Support ++# ++# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set ++# CONFIG_ARM_SMMU is not set ++ ++# ++# Remoteproc drivers ++# ++# CONFIG_STE_MODEM_RPROC is not set ++ ++# ++# Rpmsg drivers ++# ++ ++# ++# SOC (System On Chip) specific Drivers ++# ++# CONFIG_SOC_TI is not set ++CONFIG_PM_DEVFREQ=y ++ ++# ++# DEVFREQ Governors ++# ++CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m ++CONFIG_DEVFREQ_GOV_PERFORMANCE=m ++CONFIG_DEVFREQ_GOV_POWERSAVE=m ++CONFIG_DEVFREQ_GOV_USERSPACE=m ++ ++# ++# DEVFREQ Drivers ++# ++# CONFIG_PM_DEVFREQ_EVENT is not set ++CONFIG_EXTCON=m ++ ++# ++# Extcon Device Drivers ++# ++CONFIG_EXTCON_ADC_JACK=m ++CONFIG_EXTCON_GPIO=m ++CONFIG_EXTCON_RT8973A=m ++CONFIG_EXTCON_SM5502=m ++# CONFIG_EXTCON_USB_GPIO is not set ++# CONFIG_MEMORY is not set ++CONFIG_IIO=m ++CONFIG_IIO_BUFFER=y ++# CONFIG_IIO_BUFFER_CB is not set ++CONFIG_IIO_KFIFO_BUF=m ++CONFIG_IIO_TRIGGERED_BUFFER=m ++CONFIG_IIO_TRIGGER=y ++CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 ++ ++# ++# Accelerometers ++# ++# CONFIG_BMA180 is not set ++# CONFIG_BMC150_ACCEL is not set ++# CONFIG_HID_SENSOR_ACCEL_3D is not set ++# CONFIG_IIO_ST_ACCEL_3AXIS is not set ++# CONFIG_KXSD9 is not set ++# CONFIG_MMA8452 is not set ++# CONFIG_KXCJK1013 is not set ++# CONFIG_MMA9551 is not set ++# CONFIG_MMA9553 is not set ++ ++# ++# Analog to digital converters ++# ++# CONFIG_AD7266 is not set ++# CONFIG_AD7291 is not set ++# CONFIG_AD7298 is not set ++# CONFIG_AD7476 is not set ++# CONFIG_AD7791 is not set ++# CONFIG_AD7793 is not set ++# CONFIG_AD7887 is not set ++# CONFIG_AD7923 is not set ++# CONFIG_AD799X is not set ++# CONFIG_CC10001_ADC is not set ++# CONFIG_MAX1027 is not set ++# CONFIG_MAX1363 is not set ++# CONFIG_MCP320X is not set ++# CONFIG_MCP3422 is not set ++# CONFIG_NAU7802 is not set ++# CONFIG_TI_ADC081C is not set ++# CONFIG_TI_ADC128S052 is not set ++# CONFIG_VF610_ADC is not set ++ ++# ++# Amplifiers ++# ++# CONFIG_AD8366 is not set ++ ++# ++# Hid Sensor IIO Common ++# ++CONFIG_HID_SENSOR_IIO_COMMON=m ++CONFIG_HID_SENSOR_IIO_TRIGGER=m ++ ++# ++# SSP Sensor Common ++# ++# CONFIG_IIO_SSP_SENSORHUB is not set ++ ++# ++# Digital to analog converters ++# ++# CONFIG_AD5064 is not set ++# CONFIG_AD5360 is not set ++# CONFIG_AD5380 is not set ++# CONFIG_AD5421 is not set ++# CONFIG_AD5446 is not set ++# CONFIG_AD5449 is not set ++# CONFIG_AD5504 is not set ++# CONFIG_AD5624R_SPI is not set ++# CONFIG_AD5686 is not set ++# CONFIG_AD5755 is not set ++# CONFIG_AD5764 is not set ++# CONFIG_AD5791 is not set ++# CONFIG_AD7303 is not set ++# CONFIG_MAX517 is not set ++# CONFIG_MAX5821 is not set ++# CONFIG_MCP4725 is not set ++# CONFIG_MCP4922 is not set ++ ++# ++# Frequency Synthesizers DDS/PLL ++# ++ ++# ++# Clock Generator/Distribution ++# ++# CONFIG_AD9523 is not set ++ ++# ++# Phase-Locked Loop (PLL) frequency synthesizers ++# ++# CONFIG_ADF4350 is not set ++ ++# ++# Digital gyroscope sensors ++# ++# CONFIG_ADIS16080 is not set ++# CONFIG_ADIS16130 is not set ++# CONFIG_ADIS16136 is not set ++# CONFIG_ADIS16260 is not set ++# CONFIG_ADXRS450 is not set ++# CONFIG_BMG160 is not set ++CONFIG_HID_SENSOR_GYRO_3D=m ++# CONFIG_IIO_ST_GYRO_3AXIS is not set ++# CONFIG_ITG3200 is not set ++ ++# ++# Humidity sensors ++# ++CONFIG_DHT11=m ++# CONFIG_SI7005 is not set ++# CONFIG_SI7020 is not set ++ ++# ++# Inertial measurement units ++# ++# CONFIG_ADIS16400 is not set ++# CONFIG_ADIS16480 is not set ++# CONFIG_KMX61 is not set ++# CONFIG_INV_MPU6050_IIO is not set ++ ++# ++# Light sensors ++# ++# CONFIG_ADJD_S311 is not set ++# CONFIG_AL3320A is not set ++# CONFIG_APDS9300 is not set ++# CONFIG_CM32181 is not set ++# CONFIG_CM3232 is not set ++# CONFIG_CM3323 is not set ++# CONFIG_CM36651 is not set ++# CONFIG_GP2AP020A00F is not set ++# CONFIG_ISL29125 is not set ++# CONFIG_HID_SENSOR_ALS is not set ++# CONFIG_HID_SENSOR_PROX is not set ++# CONFIG_JSA1212 is not set ++# CONFIG_LTR501 is not set ++# CONFIG_TCS3414 is not set ++# CONFIG_TCS3472 is not set ++# CONFIG_SENSORS_TSL2563 is not set ++# CONFIG_TSL4531 is not set ++# CONFIG_VCNL4000 is not set ++ ++# ++# Magnetometer sensors ++# ++# CONFIG_AK8975 is not set ++# CONFIG_AK09911 is not set ++# CONFIG_MAG3110 is not set ++# CONFIG_HID_SENSOR_MAGNETOMETER_3D is not set ++# CONFIG_IIO_ST_MAGN_3AXIS is not set ++ ++# ++# Inclinometer sensors ++# ++# CONFIG_HID_SENSOR_INCLINOMETER_3D is not set ++# CONFIG_HID_SENSOR_DEVICE_ROTATION is not set ++ ++# ++# Triggers - standalone ++# ++CONFIG_IIO_INTERRUPT_TRIGGER=m ++CONFIG_IIO_SYSFS_TRIGGER=m ++ ++# ++# Pressure sensors ++# ++# CONFIG_BMP280 is not set ++# CONFIG_HID_SENSOR_PRESS is not set ++# CONFIG_MPL115 is not set ++# CONFIG_MPL3115 is not set ++# CONFIG_MS5611 is not set ++# CONFIG_IIO_ST_PRESS is not set ++# CONFIG_T5403 is not set ++ ++# ++# Lightning sensors ++# ++# CONFIG_AS3935 is not set ++ ++# ++# Proximity sensors ++# ++# CONFIG_SX9500 is not set ++ ++# ++# Temperature sensors ++# ++# CONFIG_MLX90614 is not set ++# CONFIG_TMP006 is not set ++# CONFIG_VME_BUS is not set ++CONFIG_PWM=y ++CONFIG_PWM_SYSFS=y ++CONFIG_PWM_FSL_FTM=y ++CONFIG_PWM_IMX=y ++CONFIG_PWM_PCA9685=y ++CONFIG_IRQCHIP=y ++CONFIG_ARM_GIC=y ++# CONFIG_IPACK_BUS is not set ++CONFIG_ARCH_HAS_RESET_CONTROLLER=y ++CONFIG_RESET_CONTROLLER=y ++# CONFIG_FMC is not set ++ ++# ++# PHY Subsystem ++# ++CONFIG_GENERIC_PHY=y ++# CONFIG_BCM_KONA_USB2_PHY is not set ++# CONFIG_PHY_SAMSUNG_USB2 is not set ++CONFIG_POWERCAP=y ++# CONFIG_MCB is not set ++CONFIG_RAS=y ++# CONFIG_THUNDERBOLT is not set ++ ++# ++# Android ++# ++# CONFIG_ANDROID is not set ++ ++# ++# MXC support drivers ++# ++CONFIG_MXC_IPU=y ++ ++# ++# Vivante GPU support ++# ++CONFIG_MXC_GPU_VIV=y ++CONFIG_MXC_IPU_V3_FSL=y ++ ++# ++# MXC Asynchronous Sample Rate Converter support ++# ++# CONFIG_MXC_ASRC is not set ++ ++# ++# MXC VPU(Video Processing Unit) support ++# ++CONFIG_MXC_VPU=y ++# CONFIG_MXC_VPU_DEBUG is not set ++# CONFIG_MX6_VPU_352M is not set ++ ++# ++# MXC HDMI CEC (Consumer Electronics Control) support ++# ++CONFIG_MXC_HDMI_CEC=y ++ ++# ++# MXC MIPI Support ++# ++CONFIG_MXC_MIPI_CSI2=m ++ ++# ++# MXC Media Local Bus Driver ++# ++CONFIG_MXC_MLB=y ++CONFIG_MXC_MLB150=m ++ ++# ++# Firmware Drivers ++# ++# CONFIG_FIRMWARE_MEMMAP is not set ++ ++# ++# File systems ++# ++CONFIG_DCACHE_WORD_ACCESS=y ++# CONFIG_EXT2_FS is not set ++# CONFIG_EXT3_FS is not set ++CONFIG_EXT4_FS=y ++CONFIG_EXT4_USE_FOR_EXT23=y ++CONFIG_EXT4_FS_POSIX_ACL=y ++CONFIG_EXT4_FS_SECURITY=y ++# CONFIG_EXT4_ENCRYPTION is not set ++# CONFIG_EXT4_DEBUG is not set ++CONFIG_JBD2=y ++# CONFIG_JBD2_DEBUG is not set ++CONFIG_FS_MBCACHE=y ++CONFIG_REISERFS_FS=m ++# CONFIG_REISERFS_CHECK is not set ++# CONFIG_REISERFS_PROC_INFO is not set ++CONFIG_REISERFS_FS_XATTR=y ++CONFIG_REISERFS_FS_POSIX_ACL=y ++# CONFIG_REISERFS_FS_SECURITY is not set ++CONFIG_JFS_FS=m ++CONFIG_JFS_POSIX_ACL=y ++CONFIG_JFS_SECURITY=y ++# CONFIG_JFS_DEBUG is not set ++# CONFIG_JFS_STATISTICS is not set ++CONFIG_XFS_FS=m ++CONFIG_XFS_QUOTA=y ++CONFIG_XFS_POSIX_ACL=y ++# CONFIG_XFS_RT is not set ++# CONFIG_XFS_WARN is not set ++# CONFIG_XFS_DEBUG is not set ++# CONFIG_GFS2_FS is not set ++# CONFIG_OCFS2_FS is not set ++CONFIG_BTRFS_FS=y ++CONFIG_BTRFS_FS_POSIX_ACL=y ++# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set ++# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set ++# CONFIG_BTRFS_DEBUG is not set ++# CONFIG_BTRFS_ASSERT is not set ++# CONFIG_NILFS2_FS is not set ++CONFIG_F2FS_FS=m ++CONFIG_F2FS_STAT_FS=y ++CONFIG_F2FS_FS_XATTR=y ++CONFIG_F2FS_FS_POSIX_ACL=y ++# CONFIG_F2FS_FS_SECURITY is not set ++# CONFIG_F2FS_CHECK_FS is not set ++CONFIG_FS_POSIX_ACL=y ++CONFIG_EXPORTFS=y ++CONFIG_FILE_LOCKING=y ++CONFIG_FSNOTIFY=y ++CONFIG_DNOTIFY=y ++CONFIG_INOTIFY_USER=y ++CONFIG_FANOTIFY=y ++# CONFIG_QUOTA is not set ++# CONFIG_QUOTA_NETLINK_INTERFACE is not set ++CONFIG_QUOTACTL=y ++CONFIG_AUTOFS4_FS=y ++CONFIG_FUSE_FS=y ++CONFIG_CUSE=y ++CONFIG_OVERLAY_FS=y ++ ++# ++# Caches ++# ++CONFIG_FSCACHE=m ++# CONFIG_FSCACHE_STATS is not set ++# CONFIG_FSCACHE_HISTOGRAM is not set ++# CONFIG_FSCACHE_DEBUG is not set ++# CONFIG_FSCACHE_OBJECT_LIST is not set ++CONFIG_CACHEFILES=m ++# CONFIG_CACHEFILES_DEBUG is not set ++# CONFIG_CACHEFILES_HISTOGRAM is not set ++ ++# ++# CD-ROM/DVD Filesystems ++# ++CONFIG_ISO9660_FS=y ++CONFIG_JOLIET=y ++CONFIG_ZISOFS=y ++CONFIG_UDF_FS=y ++CONFIG_UDF_NLS=y ++ ++# ++# DOS/FAT/NT Filesystems ++# ++CONFIG_FAT_FS=y ++CONFIG_MSDOS_FS=y ++CONFIG_VFAT_FS=y ++CONFIG_FAT_DEFAULT_CODEPAGE=437 ++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" ++CONFIG_NTFS_FS=m ++# CONFIG_NTFS_DEBUG is not set ++CONFIG_NTFS_RW=y ++ ++# ++# Pseudo filesystems ++# ++CONFIG_PROC_FS=y ++CONFIG_PROC_SYSCTL=y ++CONFIG_PROC_PAGE_MONITOR=y ++CONFIG_KERNFS=y ++CONFIG_SYSFS=y ++CONFIG_TMPFS=y ++CONFIG_TMPFS_POSIX_ACL=y ++CONFIG_TMPFS_XATTR=y ++# CONFIG_HUGETLB_PAGE is not set ++CONFIG_CONFIGFS_FS=y ++CONFIG_MISC_FILESYSTEMS=y ++# CONFIG_ADFS_FS is not set ++# CONFIG_AFFS_FS is not set ++# CONFIG_ECRYPT_FS is not set ++CONFIG_HFS_FS=m ++CONFIG_HFSPLUS_FS=m ++# CONFIG_HFSPLUS_FS_POSIX_ACL is not set ++# CONFIG_BEFS_FS is not set ++# CONFIG_BFS_FS is not set ++# CONFIG_EFS_FS is not set ++CONFIG_JFFS2_FS=m ++CONFIG_JFFS2_FS_DEBUG=0 ++CONFIG_JFFS2_FS_WRITEBUFFER=y ++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set ++# CONFIG_JFFS2_SUMMARY is not set ++# CONFIG_JFFS2_FS_XATTR is not set ++# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set ++CONFIG_JFFS2_ZLIB=y ++# CONFIG_JFFS2_LZO is not set ++CONFIG_JFFS2_RTIME=y ++# CONFIG_JFFS2_RUBIN is not set ++CONFIG_UBIFS_FS=m ++# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set ++CONFIG_UBIFS_FS_LZO=y ++CONFIG_UBIFS_FS_ZLIB=y ++CONFIG_LOGFS=m ++# CONFIG_CRAMFS is not set ++CONFIG_SQUASHFS=m ++CONFIG_SQUASHFS_FILE_CACHE=y ++# CONFIG_SQUASHFS_FILE_DIRECT is not set ++CONFIG_SQUASHFS_DECOMP_SINGLE=y ++# CONFIG_SQUASHFS_DECOMP_MULTI is not set ++# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set ++CONFIG_SQUASHFS_XATTR=y ++CONFIG_SQUASHFS_ZLIB=y ++# CONFIG_SQUASHFS_LZ4 is not set ++# CONFIG_SQUASHFS_LZO is not set ++# CONFIG_SQUASHFS_XZ is not set ++# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set ++# CONFIG_SQUASHFS_EMBEDDED is not set ++CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 ++# CONFIG_VXFS_FS is not set ++# CONFIG_MINIX_FS is not set ++# CONFIG_OMFS_FS is not set ++# CONFIG_HPFS_FS is not set ++# CONFIG_QNX4FS_FS is not set ++# CONFIG_QNX6FS_FS is not set ++# CONFIG_ROMFS_FS is not set ++# CONFIG_PSTORE is not set ++CONFIG_SYSV_FS=m ++# CONFIG_UFS_FS is not set ++CONFIG_NETWORK_FILESYSTEMS=y ++CONFIG_NFS_FS=y ++CONFIG_NFS_V2=y ++CONFIG_NFS_V3=y ++CONFIG_NFS_V3_ACL=y ++CONFIG_NFS_V4=y ++# CONFIG_NFS_SWAP is not set ++CONFIG_NFS_V4_1=y ++CONFIG_NFS_V4_2=y ++CONFIG_PNFS_FILE_LAYOUT=y ++CONFIG_PNFS_BLOCK=m ++CONFIG_PNFS_FLEXFILE_LAYOUT=m ++CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" ++CONFIG_NFS_V4_1_MIGRATION=y ++CONFIG_ROOT_NFS=y ++# CONFIG_NFS_USE_LEGACY_DNS is not set ++CONFIG_NFS_USE_KERNEL_DNS=y ++CONFIG_NFS_DEBUG=y ++CONFIG_NFSD=m ++CONFIG_NFSD_V2_ACL=y ++CONFIG_NFSD_V3=y ++CONFIG_NFSD_V3_ACL=y ++CONFIG_NFSD_V4=y ++# CONFIG_NFSD_PNFS is not set ++# CONFIG_NFSD_FAULT_INJECTION is not set ++CONFIG_GRACE_PERIOD=y ++CONFIG_LOCKD=y ++CONFIG_LOCKD_V4=y ++CONFIG_NFS_ACL_SUPPORT=y ++CONFIG_NFS_COMMON=y ++CONFIG_SUNRPC=y ++CONFIG_SUNRPC_GSS=y ++CONFIG_SUNRPC_BACKCHANNEL=y ++CONFIG_RPCSEC_GSS_KRB5=m ++CONFIG_SUNRPC_DEBUG=y ++# CONFIG_CEPH_FS is not set ++CONFIG_CIFS=m ++# CONFIG_CIFS_STATS is not set ++CONFIG_CIFS_WEAK_PW_HASH=y ++# CONFIG_CIFS_UPCALL is not set ++CONFIG_CIFS_XATTR=y ++CONFIG_CIFS_POSIX=y ++CONFIG_CIFS_ACL=y ++# CONFIG_CIFS_DEBUG is not set ++CONFIG_CIFS_DFS_UPCALL=y ++CONFIG_CIFS_SMB2=y ++CONFIG_CIFS_FSCACHE=y ++CONFIG_NCP_FS=m ++# CONFIG_NCPFS_PACKET_SIGNING is not set ++# CONFIG_NCPFS_IOCTL_LOCKING is not set ++# CONFIG_NCPFS_STRONG is not set ++# CONFIG_NCPFS_NFS_NS is not set ++# CONFIG_NCPFS_OS2_NS is not set ++# CONFIG_NCPFS_SMALLDOS is not set ++# CONFIG_NCPFS_NLS is not set ++# CONFIG_NCPFS_EXTRAS is not set ++# CONFIG_CODA_FS is not set ++# CONFIG_AFS_FS is not set ++CONFIG_NLS=y ++CONFIG_NLS_DEFAULT="utf8" ++CONFIG_NLS_CODEPAGE_437=y ++CONFIG_NLS_CODEPAGE_737=m ++CONFIG_NLS_CODEPAGE_775=m ++CONFIG_NLS_CODEPAGE_850=y ++CONFIG_NLS_CODEPAGE_852=y ++CONFIG_NLS_CODEPAGE_855=m ++CONFIG_NLS_CODEPAGE_857=m ++CONFIG_NLS_CODEPAGE_860=m ++CONFIG_NLS_CODEPAGE_861=m ++CONFIG_NLS_CODEPAGE_862=m ++CONFIG_NLS_CODEPAGE_863=m ++CONFIG_NLS_CODEPAGE_864=m ++CONFIG_NLS_CODEPAGE_865=m ++CONFIG_NLS_CODEPAGE_866=m ++CONFIG_NLS_CODEPAGE_869=m ++CONFIG_NLS_CODEPAGE_936=m ++CONFIG_NLS_CODEPAGE_950=m ++CONFIG_NLS_CODEPAGE_932=m ++CONFIG_NLS_CODEPAGE_949=m ++CONFIG_NLS_CODEPAGE_874=m ++CONFIG_NLS_ISO8859_8=m ++CONFIG_NLS_CODEPAGE_1250=m ++CONFIG_NLS_CODEPAGE_1251=m ++CONFIG_NLS_ASCII=y ++CONFIG_NLS_ISO8859_1=y ++CONFIG_NLS_ISO8859_2=y ++CONFIG_NLS_ISO8859_3=m ++CONFIG_NLS_ISO8859_4=m ++CONFIG_NLS_ISO8859_5=m ++CONFIG_NLS_ISO8859_6=m ++CONFIG_NLS_ISO8859_7=m ++CONFIG_NLS_ISO8859_9=m ++CONFIG_NLS_ISO8859_13=m ++CONFIG_NLS_ISO8859_14=m ++CONFIG_NLS_ISO8859_15=y ++CONFIG_NLS_KOI8_R=m ++CONFIG_NLS_KOI8_U=m ++CONFIG_NLS_MAC_ROMAN=m ++CONFIG_NLS_MAC_CELTIC=m ++CONFIG_NLS_MAC_CENTEURO=m ++CONFIG_NLS_MAC_CROATIAN=m ++CONFIG_NLS_MAC_CYRILLIC=m ++CONFIG_NLS_MAC_GAELIC=m ++CONFIG_NLS_MAC_GREEK=m ++CONFIG_NLS_MAC_ICELAND=m ++CONFIG_NLS_MAC_INUIT=m ++CONFIG_NLS_MAC_ROMANIAN=m ++CONFIG_NLS_MAC_TURKISH=m ++CONFIG_NLS_UTF8=y ++# CONFIG_DLM is not set ++ ++# ++# Kernel hacking ++# ++ ++# ++# printk and dmesg options ++# ++CONFIG_PRINTK_TIME=y ++CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 ++# CONFIG_BOOT_PRINTK_DELAY is not set ++CONFIG_DYNAMIC_DEBUG=y ++ ++# ++# Compile-time checks and compiler options ++# ++# CONFIG_DEBUG_INFO is not set ++CONFIG_ENABLE_WARN_DEPRECATED=y ++# CONFIG_ENABLE_MUST_CHECK is not set ++CONFIG_FRAME_WARN=1024 ++CONFIG_STRIP_ASM_SYMS=y ++# CONFIG_READABLE_ASM is not set ++# CONFIG_UNUSED_SYMBOLS is not set ++# CONFIG_PAGE_OWNER is not set ++CONFIG_DEBUG_FS=y ++# CONFIG_HEADERS_CHECK is not set ++# CONFIG_DEBUG_SECTION_MISMATCH is not set ++# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set ++CONFIG_MAGIC_SYSRQ=y ++CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 ++CONFIG_DEBUG_KERNEL=y ++ ++# ++# Memory Debugging ++# ++# CONFIG_PAGE_EXTENSION is not set ++# CONFIG_DEBUG_PAGEALLOC is not set ++# CONFIG_DEBUG_OBJECTS is not set ++# CONFIG_SLUB_STATS is not set ++CONFIG_HAVE_DEBUG_KMEMLEAK=y ++# CONFIG_DEBUG_KMEMLEAK is not set ++# CONFIG_DEBUG_STACK_USAGE is not set ++# CONFIG_DEBUG_VM is not set ++# CONFIG_DEBUG_MEMORY_INIT is not set ++# CONFIG_DEBUG_PER_CPU_MAPS is not set ++# CONFIG_DEBUG_HIGHMEM is not set ++# CONFIG_DEBUG_SHIRQ is not set ++ ++# ++# Debug Lockups and Hangs ++# ++# CONFIG_LOCKUP_DETECTOR is not set ++# CONFIG_DETECT_HUNG_TASK is not set ++CONFIG_PANIC_ON_OOPS=y ++CONFIG_PANIC_ON_OOPS_VALUE=1 ++CONFIG_PANIC_TIMEOUT=60 ++# CONFIG_SCHED_DEBUG is not set ++# CONFIG_SCHEDSTATS is not set ++# CONFIG_SCHED_STACK_END_CHECK is not set ++# CONFIG_DEBUG_TIMEKEEPING is not set ++# CONFIG_TIMER_STATS is not set ++ ++# ++# Lock Debugging (spinlocks, mutexes, etc...) ++# ++# CONFIG_DEBUG_RT_MUTEXES is not set ++# CONFIG_DEBUG_SPINLOCK is not set ++# CONFIG_DEBUG_MUTEXES is not set ++# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set ++# CONFIG_DEBUG_LOCK_ALLOC is not set ++# CONFIG_PROVE_LOCKING is not set ++# CONFIG_LOCK_STAT is not set ++# CONFIG_DEBUG_ATOMIC_SLEEP is not set ++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set ++# CONFIG_LOCK_TORTURE_TEST is not set ++# CONFIG_STACKTRACE is not set ++# CONFIG_DEBUG_KOBJECT is not set ++# CONFIG_DEBUG_BUGVERBOSE is not set ++# CONFIG_DEBUG_LIST is not set ++# CONFIG_DEBUG_PI_LIST is not set ++# CONFIG_DEBUG_SG is not set ++# CONFIG_DEBUG_NOTIFIERS is not set ++# CONFIG_DEBUG_CREDENTIALS is not set ++ ++# ++# RCU Debugging ++# ++# CONFIG_PROVE_RCU is not set ++# CONFIG_SPARSE_RCU_POINTER is not set ++# CONFIG_TORTURE_TEST is not set ++# CONFIG_RCU_TORTURE_TEST is not set ++CONFIG_RCU_CPU_STALL_TIMEOUT=21 ++# CONFIG_RCU_CPU_STALL_INFO is not set ++# CONFIG_RCU_TRACE is not set ++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set ++# CONFIG_NOTIFIER_ERROR_INJECTION is not set ++# CONFIG_FAULT_INJECTION is not set ++CONFIG_HAVE_FUNCTION_TRACER=y ++CONFIG_HAVE_DYNAMIC_FTRACE=y ++CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y ++CONFIG_HAVE_SYSCALL_TRACEPOINTS=y ++CONFIG_HAVE_C_RECORDMCOUNT=y ++CONFIG_TRACING_SUPPORT=y ++# CONFIG_FTRACE is not set ++ ++# ++# Runtime Testing ++# ++# CONFIG_LKDTM is not set ++# CONFIG_TEST_LIST_SORT is not set ++# CONFIG_BACKTRACE_SELF_TEST is not set ++# CONFIG_RBTREE_TEST is not set ++# CONFIG_INTERVAL_TREE_TEST is not set ++# CONFIG_PERCPU_TEST is not set ++# CONFIG_ATOMIC64_SELFTEST is not set ++# CONFIG_ASYNC_RAID6_TEST is not set ++# CONFIG_TEST_HEXDUMP is not set ++# CONFIG_TEST_STRING_HELPERS is not set ++# CONFIG_TEST_KSTRTOX is not set ++# CONFIG_TEST_RHASHTABLE is not set ++# CONFIG_DMA_API_DEBUG is not set ++# CONFIG_TEST_LKM is not set ++# CONFIG_TEST_USER_COPY is not set ++# CONFIG_TEST_BPF is not set ++# CONFIG_TEST_FIRMWARE is not set ++# CONFIG_TEST_UDELAY is not set ++# CONFIG_MEMTEST is not set ++# CONFIG_SAMPLES is not set ++CONFIG_HAVE_ARCH_KGDB=y ++# CONFIG_KGDB is not set ++# CONFIG_ARM_PTDUMP is not set ++# CONFIG_STRICT_DEVMEM is not set ++CONFIG_ARM_UNWIND=y ++# CONFIG_DEBUG_USER is not set ++# CONFIG_DEBUG_LL is not set ++CONFIG_DEBUG_IMX_UART_PORT=1 ++CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" ++# CONFIG_DEBUG_UART_8250 is not set ++# CONFIG_DEBUG_UART_BCM63XX is not set ++CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" ++# CONFIG_PID_IN_CONTEXTIDR is not set ++# CONFIG_DEBUG_SET_MODULE_RONX is not set ++# CONFIG_CORESIGHT is not set ++ ++# ++# Security options ++# ++CONFIG_KEYS=y ++# CONFIG_PERSISTENT_KEYRINGS is not set ++# CONFIG_BIG_KEYS is not set ++# CONFIG_ENCRYPTED_KEYS is not set ++# CONFIG_SECURITY_DMESG_RESTRICT is not set ++# CONFIG_SECURITY is not set ++# CONFIG_SECURITYFS is not set ++CONFIG_DEFAULT_SECURITY_DAC=y ++CONFIG_DEFAULT_SECURITY="" ++CONFIG_XOR_BLOCKS=y ++CONFIG_ASYNC_CORE=m ++CONFIG_ASYNC_MEMCPY=m ++CONFIG_ASYNC_XOR=m ++CONFIG_ASYNC_PQ=m ++CONFIG_ASYNC_RAID6_RECOV=m ++CONFIG_CRYPTO=y ++ ++# ++# Crypto core or helper ++# ++CONFIG_CRYPTO_ALGAPI=y ++CONFIG_CRYPTO_ALGAPI2=y ++CONFIG_CRYPTO_AEAD=y ++CONFIG_CRYPTO_AEAD2=y ++CONFIG_CRYPTO_BLKCIPHER=y ++CONFIG_CRYPTO_BLKCIPHER2=y ++CONFIG_CRYPTO_HASH=y ++CONFIG_CRYPTO_HASH2=y ++CONFIG_CRYPTO_RNG=y ++CONFIG_CRYPTO_RNG2=y ++CONFIG_CRYPTO_PCOMP=y ++CONFIG_CRYPTO_PCOMP2=y ++CONFIG_CRYPTO_MANAGER=y ++CONFIG_CRYPTO_MANAGER2=y ++CONFIG_CRYPTO_USER=y ++CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y ++CONFIG_CRYPTO_GF128MUL=y ++CONFIG_CRYPTO_NULL=y ++CONFIG_CRYPTO_PCRYPT=y ++CONFIG_CRYPTO_WORKQUEUE=y ++CONFIG_CRYPTO_CRYPTD=y ++# CONFIG_CRYPTO_MCRYPTD is not set ++CONFIG_CRYPTO_AUTHENC=y ++# CONFIG_CRYPTO_TEST is not set ++ ++# ++# Authenticated Encryption with Associated Data ++# ++CONFIG_CRYPTO_CCM=y ++CONFIG_CRYPTO_GCM=y ++CONFIG_CRYPTO_SEQIV=y ++ ++# ++# Block modes ++# ++CONFIG_CRYPTO_CBC=y ++CONFIG_CRYPTO_CTR=y ++CONFIG_CRYPTO_CTS=y ++CONFIG_CRYPTO_ECB=y ++CONFIG_CRYPTO_LRW=y ++CONFIG_CRYPTO_PCBC=y ++CONFIG_CRYPTO_XTS=y ++ ++# ++# Hash modes ++# ++CONFIG_CRYPTO_CMAC=y ++CONFIG_CRYPTO_HMAC=y ++CONFIG_CRYPTO_XCBC=y ++CONFIG_CRYPTO_VMAC=y ++ ++# ++# Digest ++# ++CONFIG_CRYPTO_CRC32C=y ++CONFIG_CRYPTO_CRC32=y ++CONFIG_CRYPTO_CRCT10DIF=y ++CONFIG_CRYPTO_GHASH=y ++CONFIG_CRYPTO_MD4=y ++CONFIG_CRYPTO_MD5=y ++CONFIG_CRYPTO_MICHAEL_MIC=y ++CONFIG_CRYPTO_RMD128=m ++CONFIG_CRYPTO_RMD160=m ++CONFIG_CRYPTO_RMD256=m ++CONFIG_CRYPTO_RMD320=m ++CONFIG_CRYPTO_SHA1=y ++CONFIG_CRYPTO_SHA256=y ++CONFIG_CRYPTO_SHA512=y ++CONFIG_CRYPTO_TGR192=m ++CONFIG_CRYPTO_WP512=m ++ ++# ++# Ciphers ++# ++CONFIG_CRYPTO_AES=y ++CONFIG_CRYPTO_ANUBIS=m ++CONFIG_CRYPTO_ARC4=y ++CONFIG_CRYPTO_BLOWFISH=m ++CONFIG_CRYPTO_BLOWFISH_COMMON=m ++CONFIG_CRYPTO_CAMELLIA=m ++CONFIG_CRYPTO_CAST_COMMON=m ++CONFIG_CRYPTO_CAST5=m ++CONFIG_CRYPTO_CAST6=m ++CONFIG_CRYPTO_DES=y ++CONFIG_CRYPTO_FCRYPT=m ++CONFIG_CRYPTO_KHAZAD=m ++CONFIG_CRYPTO_SALSA20=m ++CONFIG_CRYPTO_SEED=m ++CONFIG_CRYPTO_SERPENT=m ++CONFIG_CRYPTO_TEA=y ++CONFIG_CRYPTO_TWOFISH=y ++CONFIG_CRYPTO_TWOFISH_COMMON=y ++ ++# ++# Compression ++# ++CONFIG_CRYPTO_DEFLATE=y ++CONFIG_CRYPTO_ZLIB=y ++CONFIG_CRYPTO_LZO=y ++CONFIG_CRYPTO_LZ4=y ++CONFIG_CRYPTO_LZ4HC=y ++ ++# ++# Random Number Generation ++# ++CONFIG_CRYPTO_ANSI_CPRNG=y ++# CONFIG_CRYPTO_DRBG_MENU is not set ++CONFIG_CRYPTO_USER_API=m ++CONFIG_CRYPTO_USER_API_HASH=m ++CONFIG_CRYPTO_USER_API_SKCIPHER=m ++# CONFIG_CRYPTO_USER_API_RNG is not set ++CONFIG_CRYPTO_HW=y ++# CONFIG_CRYPTO_DEV_HIFN_795X is not set ++CONFIG_CRYPTO_DEV_FSL_CAAM=y ++CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 ++# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set ++CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=m ++CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=m ++CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y ++# CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST is not set ++CONFIG_CRYPTO_DEV_FSL_CAAM_SM=m ++CONFIG_CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE=7 ++# CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST is not set ++# CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO is not set ++# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set ++# CONFIG_CRYPTO_DEV_SAHARA is not set ++# CONFIG_ASYMMETRIC_KEY_TYPE is not set ++# CONFIG_ARM_CRYPTO is not set ++# CONFIG_BINARY_PRINTF is not set ++ ++# ++# Library routines ++# ++CONFIG_RAID6_PQ=y ++CONFIG_BITREVERSE=y ++CONFIG_HAVE_ARCH_BITREVERSE=y ++CONFIG_RATIONAL=y ++CONFIG_GENERIC_STRNCPY_FROM_USER=y ++CONFIG_GENERIC_STRNLEN_USER=y ++CONFIG_GENERIC_NET_UTILS=y ++CONFIG_GENERIC_PCI_IOMAP=y ++CONFIG_GENERIC_IO=y ++CONFIG_STMP_DEVICE=y ++CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y ++CONFIG_CRC_CCITT=y ++CONFIG_CRC16=y ++CONFIG_CRC_T10DIF=y ++CONFIG_CRC_ITU_T=y ++CONFIG_CRC32=y ++# CONFIG_CRC32_SELFTEST is not set ++CONFIG_CRC32_SLICEBY8=y ++# CONFIG_CRC32_SLICEBY4 is not set ++# CONFIG_CRC32_SARWATE is not set ++# CONFIG_CRC32_BIT is not set ++CONFIG_CRC7=m ++CONFIG_LIBCRC32C=y ++CONFIG_CRC8=y ++CONFIG_AUDIT_GENERIC=y ++# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set ++# CONFIG_RANDOM32_SELFTEST is not set ++CONFIG_ZLIB_INFLATE=y ++CONFIG_ZLIB_DEFLATE=y ++CONFIG_LZO_COMPRESS=y ++CONFIG_LZO_DECOMPRESS=y ++CONFIG_LZ4_COMPRESS=y ++CONFIG_LZ4HC_COMPRESS=y ++CONFIG_LZ4_DECOMPRESS=y ++CONFIG_XZ_DEC=y ++# CONFIG_XZ_DEC_X86 is not set ++# CONFIG_XZ_DEC_POWERPC is not set ++# CONFIG_XZ_DEC_IA64 is not set ++CONFIG_XZ_DEC_ARM=y ++CONFIG_XZ_DEC_ARMTHUMB=y ++# CONFIG_XZ_DEC_SPARC is not set ++CONFIG_XZ_DEC_BCJ=y ++# CONFIG_XZ_DEC_TEST is not set ++CONFIG_DECOMPRESS_GZIP=y ++CONFIG_DECOMPRESS_LZO=y ++CONFIG_DECOMPRESS_LZ4=y ++CONFIG_GENERIC_ALLOCATOR=y ++CONFIG_TEXTSEARCH=y ++CONFIG_TEXTSEARCH_KMP=m ++CONFIG_TEXTSEARCH_BM=m ++CONFIG_TEXTSEARCH_FSM=m ++CONFIG_BTREE=y ++CONFIG_ASSOCIATIVE_ARRAY=y ++CONFIG_HAS_IOMEM=y ++CONFIG_HAS_IOPORT_MAP=y ++CONFIG_HAS_DMA=y ++CONFIG_CPU_RMAP=y ++CONFIG_DQL=y ++CONFIG_GLOB=y ++# CONFIG_GLOB_SELFTEST is not set ++CONFIG_NLATTR=y ++CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y ++CONFIG_AVERAGE=y ++CONFIG_CORDIC=m ++# CONFIG_DDR is not set ++CONFIG_LIBFDT=y ++CONFIG_OID_REGISTRY=y ++CONFIG_FONT_SUPPORT=y ++# CONFIG_FONTS is not set ++CONFIG_FONT_8x8=y ++CONFIG_FONT_8x16=y ++CONFIG_ARCH_HAS_SG_CHAIN=y ++# CONFIG_VIRTUALIZATION is not set +diff -Nur linux-4.1.10/arch/arm/configs/imx_v7_defconfig xbian-sources-kernel/arch/arm/configs/imx_v7_defconfig +--- linux-4.1.10/arch/arm/configs/imx_v7_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/configs/imx_v7_defconfig 2015-10-11 19:49:25.579427099 +0200 @@ -0,0 +1,414 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y @@ -8736,9 +17543,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_defconfig linux-4.1.10/arch/ +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y -diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/arch/arm/configs/imx_v7_mfg_defconfig ---- linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/configs/imx_v7_mfg_defconfig 2015-10-10 16:41:04.985313893 +0200 +diff -Nur linux-4.1.10/arch/arm/configs/imx_v7_mfg_defconfig xbian-sources-kernel/arch/arm/configs/imx_v7_mfg_defconfig +--- linux-4.1.10/arch/arm/configs/imx_v7_mfg_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/configs/imx_v7_mfg_defconfig 2015-10-11 19:49:25.579427099 +0200 @@ -0,0 +1,332 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_LZO=y @@ -9072,9 +17879,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y -diff -Nur linux-4.1.10.orig/arch/arm/include/asm/glue-cache.h linux-4.1.10/arch/arm/include/asm/glue-cache.h ---- linux-4.1.10.orig/arch/arm/include/asm/glue-cache.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/include/asm/glue-cache.h 2015-10-10 16:41:04.985313893 +0200 +diff -Nur linux-4.1.10/arch/arm/include/asm/glue-cache.h xbian-sources-kernel/arch/arm/include/asm/glue-cache.h +--- linux-4.1.10/arch/arm/include/asm/glue-cache.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/include/asm/glue-cache.h 2015-10-11 19:49:25.595426038 +0200 @@ -102,19 +102,19 @@ #endif @@ -9103,9 +17910,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/include/asm/glue-cache.h linux-4.1.10/arch/ #endif #if defined(CONFIG_CPU_V7M) -diff -Nur linux-4.1.10.orig/arch/arm/Kconfig linux-4.1.10/arch/arm/Kconfig ---- linux-4.1.10.orig/arch/arm/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/Kconfig 2015-10-10 16:41:05.233313895 +0200 +diff -Nur linux-4.1.10/arch/arm/Kconfig xbian-sources-kernel/arch/arm/Kconfig +--- linux-4.1.10/arch/arm/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/Kconfig 2015-10-11 19:49:25.475433992 +0200 @@ -1689,6 +1689,7 @@ range 11 64 if ARCH_SHMOBILE_LEGACY default "12" if SOC_AM33XX @@ -9114,9 +17921,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/Kconfig linux-4.1.10/arch/arm/Kconfig default "11" help The kernel memory allocator divides physically contiguous memory -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/busfreq_ddr3.c linux-4.1.10/arch/arm/mach-imx/busfreq_ddr3.c ---- linux-4.1.10.orig/arch/arm/mach-imx/busfreq_ddr3.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/mach-imx/busfreq_ddr3.c 2015-10-10 16:41:25.125309040 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/busfreq_ddr3.c xbian-sources-kernel/arch/arm/mach-imx/busfreq_ddr3.c +--- linux-4.1.10/arch/arm/mach-imx/busfreq_ddr3.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/mach-imx/busfreq_ddr3.c 2015-10-11 19:49:25.687419940 +0200 @@ -0,0 +1,519 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -9637,9 +18444,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/busfreq_ddr3.c linux-4.1.10/arch/a + + return 0; +} -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/busfreq-imx6.c linux-4.1.10/arch/arm/mach-imx/busfreq-imx6.c ---- linux-4.1.10.orig/arch/arm/mach-imx/busfreq-imx6.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/mach-imx/busfreq-imx6.c 2015-10-10 16:41:25.125309040 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/busfreq-imx6.c xbian-sources-kernel/arch/arm/mach-imx/busfreq-imx6.c +--- linux-4.1.10/arch/arm/mach-imx/busfreq-imx6.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/mach-imx/busfreq-imx6.c 2015-10-11 19:49:25.687419940 +0200 @@ -0,0 +1,994 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -10635,9 +19442,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/busfreq-imx6.c linux-4.1.10/arch/a +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("BusFreq driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/busfreq_lpddr2.c linux-4.1.10/arch/arm/mach-imx/busfreq_lpddr2.c ---- linux-4.1.10.orig/arch/arm/mach-imx/busfreq_lpddr2.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/mach-imx/busfreq_lpddr2.c 2015-10-10 16:41:25.125309040 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/busfreq_lpddr2.c xbian-sources-kernel/arch/arm/mach-imx/busfreq_lpddr2.c +--- linux-4.1.10/arch/arm/mach-imx/busfreq_lpddr2.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/mach-imx/busfreq_lpddr2.c 2015-10-11 19:49:25.691419675 +0200 @@ -0,0 +1,183 @@ +/* + * Copyright (C) 2011-2015 Freescale Semiconductor, Inc. All Rights Reserved. @@ -10822,9 +19629,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/busfreq_lpddr2.c linux-4.1.10/arch + + return 0; +} -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk.h linux-4.1.10/arch/arm/mach-imx/clk.h ---- linux-4.1.10.orig/arch/arm/mach-imx/clk.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk.h 2015-10-10 16:41:25.129309291 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk.h xbian-sources-kernel/arch/arm/mach-imx/clk.h +--- linux-4.1.10/arch/arm/mach-imx/clk.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk.h 2015-10-11 19:49:25.691419675 +0200 @@ -55,6 +55,34 @@ shift, 0, &imx_ccm_lock, share_count); } @@ -10876,9 +19683,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk.h linux-4.1.10/arch/arm/mach-i static inline struct clk *imx_clk_fixed_factor(const char *name, const char *parent, unsigned int mult, unsigned int div) { -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx1.c linux-4.1.10/arch/arm/mach-imx/clk-imx1.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx1.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx1.c 2015-10-10 16:41:25.129309291 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx1.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx1.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx1.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx1.c 2015-10-11 19:49:25.691419675 +0200 @@ -75,7 +75,8 @@ int __init mx1_clocks_init(unsigned long fref) @@ -10898,9 +19705,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx1.c linux-4.1.10/arch/arm/m return 0; } -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx21.c linux-4.1.10/arch/arm/mach-imx/clk-imx21.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx21.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx21.c 2015-10-10 16:41:25.129309291 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx21.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx21.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx21.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx21.c 2015-10-11 19:49:25.691419675 +0200 @@ -153,7 +153,7 @@ clk_register_clkdev(clk[IMX21_CLK_I2C_GATE], NULL, "imx21-i2c.0"); clk_register_clkdev(clk[IMX21_CLK_OWIRE_GATE], NULL, "mxc_w1.0"); @@ -10910,9 +19717,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx21.c linux-4.1.10/arch/arm/ return 0; } -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx27.c linux-4.1.10/arch/arm/mach-imx/clk-imx27.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx27.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx27.c 2015-10-10 16:41:25.129309291 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx27.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx27.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx27.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx27.c 2015-10-11 19:49:25.691419675 +0200 @@ -229,7 +229,7 @@ clk_register_clkdev(clk[IMX27_CLK_EMMA_AHB_GATE], "ahb", "m2m-emmaprp.0"); clk_register_clkdev(clk[IMX27_CLK_EMMA_IPG_GATE], "ipg", "m2m-emmaprp.0"); @@ -10922,9 +19729,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx27.c linux-4.1.10/arch/arm/ return 0; } -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx31.c linux-4.1.10/arch/arm/mach-imx/clk-imx31.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx31.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx31.c 2015-10-10 16:41:25.129309291 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx31.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx31.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx31.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx31.c 2015-10-11 19:49:25.691419675 +0200 @@ -50,9 +50,12 @@ int __init mx31_clocks_init(unsigned long fref) @@ -10948,9 +19755,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx31.c linux-4.1.10/arch/arm/ return 0; } -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx35.c linux-4.1.10/arch/arm/mach-imx/clk-imx35.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx35.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx35.c 2015-10-10 16:41:25.129309291 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx35.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx35.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx35.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx35.c 2015-10-11 19:49:25.691419675 +0200 @@ -71,11 +71,14 @@ int __init mx35_clocks_init(void) @@ -10976,9 +19783,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx35.c linux-4.1.10/arch/arm/ #endif return 0; -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6q.c linux-4.1.10/arch/arm/mach-imx/clk-imx6q.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6q.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx6q.c 2015-10-10 16:41:25.133309588 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx6q.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx6q.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx6q.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx6q.c 2015-10-11 19:49:25.691419675 +0200 @@ -24,7 +24,6 @@ #include "clk.h" #include "common.h" @@ -11301,9 +20108,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6q.c linux-4.1.10/arch/arm/ + } } CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init); -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6sl.c linux-4.1.10/arch/arm/mach-imx/clk-imx6sl.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6sl.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx6sl.c 2015-10-10 16:41:25.133309588 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx6sl.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx6sl.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx6sl.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx6sl.c 2015-10-11 19:49:25.691419675 +0200 @@ -288,9 +288,6 @@ WARN_ON(!base); ccm_base = base; @@ -11323,9 +20130,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6sl.c linux-4.1.10/arch/arm - imx6q_set_lpm(WAIT_CLOCKED); } CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init); -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6sx.c linux-4.1.10/arch/arm/mach-imx/clk-imx6sx.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6sx.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-imx6sx.c 2015-10-10 16:41:25.133309588 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-imx6sx.c xbian-sources-kernel/arch/arm/mach-imx/clk-imx6sx.c +--- linux-4.1.10/arch/arm/mach-imx/clk-imx6sx.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-imx6sx.c 2015-10-11 19:49:25.691419675 +0200 @@ -268,8 +268,6 @@ base = of_iomap(np, 0); WARN_ON(!base); @@ -11344,9 +20151,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-imx6sx.c linux-4.1.10/arch/arm - imx6q_set_lpm(WAIT_CLOCKED); } CLK_OF_DECLARE(imx6sx, "fsl,imx6sx-ccm", imx6sx_clocks_init); -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-pllv3.c linux-4.1.10/arch/arm/mach-imx/clk-pllv3.c ---- linux-4.1.10.orig/arch/arm/mach-imx/clk-pllv3.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/clk-pllv3.c 2015-10-10 16:41:25.133309588 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/clk-pllv3.c xbian-sources-kernel/arch/arm/mach-imx/clk-pllv3.c +--- linux-4.1.10/arch/arm/mach-imx/clk-pllv3.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/clk-pllv3.c 2015-10-11 19:49:25.691419675 +0200 @@ -23,6 +23,7 @@ #define PLL_DENOM_OFFSET 0x20 @@ -11399,9 +20206,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/clk-pllv3.c linux-4.1.10/arch/arm/ } static const struct clk_ops clk_pllv3_av_ops = { -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/common.h linux-4.1.10/arch/arm/mach-imx/common.h ---- linux-4.1.10.orig/arch/arm/mach-imx/common.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/common.h 2015-10-10 16:41:25.133309588 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/common.h xbian-sources-kernel/arch/arm/mach-imx/common.h +--- linux-4.1.10/arch/arm/mach-imx/common.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/common.h 2015-10-11 19:49:25.691419675 +0200 @@ -44,7 +44,7 @@ void imx31_soc_init(void); void imx35_soc_init(void); @@ -11462,9 +20269,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/common.h linux-4.1.10/arch/arm/mac #ifdef CONFIG_PM void imx51_pm_init(void); -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/common-imx6.c linux-4.1.10/arch/arm/mach-imx/common-imx6.c ---- linux-4.1.10.orig/arch/arm/mach-imx/common-imx6.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/mach-imx/common-imx6.c 2015-10-10 16:41:25.137309900 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/common-imx6.c xbian-sources-kernel/arch/arm/mach-imx/common-imx6.c +--- linux-4.1.10/arch/arm/mach-imx/common-imx6.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/mach-imx/common-imx6.c 2015-10-11 19:49:25.691419675 +0200 @@ -0,0 +1,96 @@ +/* + * Copyright 2011-2015 Freescale Semiconductor, Inc. @@ -11562,9 +20369,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/common-imx6.c linux-4.1.10/arch/ar + } +} + -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6q.c linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6q.c ---- linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6q.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6q.c 2015-10-10 16:41:25.137309900 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6q.c xbian-sources-kernel/arch/arm/mach-imx/cpuidle-imx6q.c +--- linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6q.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/cpuidle-imx6q.c 2015-10-11 19:49:25.691419675 +0200 @@ -27,9 +27,9 @@ */ if (!spin_trylock(&master_lock)) @@ -11577,9 +20384,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6q.c linux-4.1.10/arch/ spin_unlock(&master_lock); goto done; } -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6sl.c linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sl.c ---- linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6sl.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sl.c 2015-10-10 16:41:25.137309900 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sl.c xbian-sources-kernel/arch/arm/mach-imx/cpuidle-imx6sl.c +--- linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sl.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/cpuidle-imx6sl.c 2015-10-11 19:49:25.691419675 +0200 @@ -16,7 +16,7 @@ static int imx6sl_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) @@ -11598,9 +20405,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6sl.c linux-4.1.10/arch return index; } -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6sx.c linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sx.c ---- linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6sx.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sx.c 2015-10-10 16:41:25.137309900 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sx.c xbian-sources-kernel/arch/arm/mach-imx/cpuidle-imx6sx.c +--- linux-4.1.10/arch/arm/mach-imx/cpuidle-imx6sx.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/cpuidle-imx6sx.c 2015-10-11 19:49:25.691419675 +0200 @@ -25,7 +25,7 @@ static int imx6sx_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) @@ -11619,9 +20426,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/cpuidle-imx6sx.c linux-4.1.10/arch return index; } -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/ddr3_freq_imx6.S linux-4.1.10/arch/arm/mach-imx/ddr3_freq_imx6.S ---- linux-4.1.10.orig/arch/arm/mach-imx/ddr3_freq_imx6.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/mach-imx/ddr3_freq_imx6.S 2015-10-10 16:41:25.137309900 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/ddr3_freq_imx6.S xbian-sources-kernel/arch/arm/mach-imx/ddr3_freq_imx6.S +--- linux-4.1.10/arch/arm/mach-imx/ddr3_freq_imx6.S 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/mach-imx/ddr3_freq_imx6.S 2015-10-11 19:49:25.691419675 +0200 @@ -0,0 +1,893 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -12516,17 +21323,10 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/ddr3_freq_imx6.S linux-4.1.10/arch +ENTRY(mx6_do_ddr_freq_change) + .word mx6_ddr3_freq_change + .size mx6_ddr3_freq_change, . - mx6_ddr3_freq_change -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/Kconfig linux-4.1.10/arch/arm/mach-imx/Kconfig ---- linux-4.1.10.orig/arch/arm/mach-imx/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/Kconfig 2015-10-10 16:41:28.701314199 +0200 -@@ -1,5 +1,6 @@ - menuconfig ARCH_MXC - bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 -+ select ARCH_HAS_RESET_CONTROLLER - select ARCH_REQUIRE_GPIOLIB - select ARM_CPU_SUSPEND if PM - select CLKSRC_MMIO -@@ -8,6 +9,7 @@ +diff -Nur linux-4.1.10/arch/arm/mach-imx/Kconfig xbian-sources-kernel/arch/arm/mach-imx/Kconfig +--- linux-4.1.10/arch/arm/mach-imx/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/Kconfig 2015-10-11 19:49:25.687419940 +0200 +@@ -8,6 +8,7 @@ select PM_OPP if PM select SOC_BUS select SRAM @@ -12534,17 +21334,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/Kconfig linux-4.1.10/arch/arm/mach help Support for Freescale MXC/iMX-based family of processors -@@ -58,7 +60,6 @@ - - config HAVE_IMX_SRC - def_bool y if SMP -- select ARCH_HAS_RESET_CONTROLLER - - config IMX_HAVE_IOMUX_V1 - bool -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/lpddr2_freq_imx6.S linux-4.1.10/arch/arm/mach-imx/lpddr2_freq_imx6.S ---- linux-4.1.10.orig/arch/arm/mach-imx/lpddr2_freq_imx6.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/arch/arm/mach-imx/lpddr2_freq_imx6.S 2015-10-10 16:41:28.701314199 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/lpddr2_freq_imx6.S xbian-sources-kernel/arch/arm/mach-imx/lpddr2_freq_imx6.S +--- linux-4.1.10/arch/arm/mach-imx/lpddr2_freq_imx6.S 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/arch/arm/mach-imx/lpddr2_freq_imx6.S 2015-10-11 19:49:25.695419410 +0200 @@ -0,0 +1,484 @@ +/* + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -13030,9 +21822,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/lpddr2_freq_imx6.S linux-4.1.10/ar +ENTRY(mx6_lpddr2_do_iram) + .word mx6_lpddr2_freq_change + .size mx6_lpddr2_freq_change, . - mx6_lpddr2_freq_change -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6q.c linux-4.1.10/arch/arm/mach-imx/mach-imx6q.c ---- linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6q.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/mach-imx6q.c 2015-10-10 16:41:28.701314199 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/mach-imx6q.c xbian-sources-kernel/arch/arm/mach-imx/mach-imx6q.c +--- linux-4.1.10/arch/arm/mach-imx/mach-imx6q.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/mach-imx6q.c 2015-10-11 19:49:25.695419410 +0200 @@ -31,6 +31,9 @@ #include <linux/micrel_phy.h> #include <linux/mfd/syscon.h> @@ -13161,7 +21953,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6q.c linux-4.1.10/arch/arm return 0; } -@@ -262,25 +328,46 @@ +@@ -262,9 +328,24 @@ } } @@ -13186,9 +21978,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6q.c linux-4.1.10/arch/arm imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", imx_get_soc_revision()); - -+ mxc_arch_reset_init_dt(); - parent = imx_soc_device_init(); +@@ -273,14 +354,19 @@ if (parent == NULL) pr_warn("failed to initialize soc device\n"); @@ -13210,7 +22000,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6q.c linux-4.1.10/arch/arm } #define OCOTP_CFG3 0x440 -@@ -330,6 +417,12 @@ +@@ -330,6 +416,12 @@ if (dev_pm_opp_disable(cpu_dev, 852000000)) pr_warn("failed to disable 852 MHz OPP\n"); } @@ -13223,7 +22013,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6q.c linux-4.1.10/arch/arm iounmap(base); put_node: of_node_put(np); -@@ -393,6 +486,7 @@ +@@ -393,6 +485,7 @@ imx_init_l2cache(); imx_src_init(); irqchip_init(); @@ -13231,15 +22021,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6q.c linux-4.1.10/arch/arm } static const char * const imx6q_dt_compat[] __initconst = { -@@ -408,4 +502,5 @@ - .init_machine = imx6q_init_machine, - .init_late = imx6q_init_late, - .dt_compat = imx6q_dt_compat, -+ .restart = mxc_restart, - MACHINE_END -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6sl.c linux-4.1.10/arch/arm/mach-imx/mach-imx6sl.c ---- linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6sl.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/mach-imx6sl.c 2015-10-10 16:41:28.701314199 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/mach-imx6sl.c xbian-sources-kernel/arch/arm/mach-imx/mach-imx6sl.c +--- linux-4.1.10/arch/arm/mach-imx/mach-imx6sl.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/mach-imx6sl.c 2015-10-11 19:49:25.695419410 +0200 @@ -48,6 +48,8 @@ { struct device *parent; @@ -13263,9 +22047,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6sl.c linux-4.1.10/arch/ar .dt_compat = imx6sl_dt_compat, + .restart = mxc_restart, MACHINE_END -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6sx.c linux-4.1.10/arch/arm/mach-imx/mach-imx6sx.c ---- linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6sx.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/mach-imx6sx.c 2015-10-10 16:41:28.705314126 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/mach-imx6sx.c xbian-sources-kernel/arch/arm/mach-imx/mach-imx6sx.c +--- linux-4.1.10/arch/arm/mach-imx/mach-imx6sx.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/mach-imx6sx.c 2015-10-11 19:49:25.695419410 +0200 @@ -12,12 +12,135 @@ #include <linux/regmap.h> #include <linux/mfd/syscon.h> @@ -13429,9 +22213,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/mach-imx6sx.c linux-4.1.10/arch/ar } static void __init imx6sx_init_late(void) -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/Makefile linux-4.1.10/arch/arm/mach-imx/Makefile ---- linux-4.1.10.orig/arch/arm/mach-imx/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/Makefile 2015-10-10 16:41:28.705314126 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/Makefile xbian-sources-kernel/arch/arm/mach-imx/Makefile +--- linux-4.1.10/arch/arm/mach-imx/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/Makefile 2015-10-11 19:49:25.687419940 +0200 @@ -28,6 +28,14 @@ obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o @@ -13460,9 +22244,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/Makefile linux-4.1.10/arch/arm/mac ifeq ($(CONFIG_SUSPEND),y) AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/pm-imx6.c linux-4.1.10/arch/arm/mach-imx/pm-imx6.c ---- linux-4.1.10.orig/arch/arm/mach-imx/pm-imx6.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/pm-imx6.c 2015-10-10 16:41:28.705314126 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/pm-imx6.c xbian-sources-kernel/arch/arm/mach-imx/pm-imx6.c +--- linux-4.1.10/arch/arm/mach-imx/pm-imx6.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/pm-imx6.c 2015-10-11 19:49:25.699419145 +0200 @@ -89,6 +89,7 @@ struct imx6_pm_socdata { @@ -13616,9 +22400,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/pm-imx6.c linux-4.1.10/arch/arm/ma void __init imx6q_pm_init(void) { imx6_pm_common_init(&imx6q_pm_data); -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/src.c linux-4.1.10/arch/arm/mach-imx/src.c ---- linux-4.1.10.orig/arch/arm/mach-imx/src.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/src.c 2015-10-10 16:41:28.705314126 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/src.c xbian-sources-kernel/arch/arm/mach-imx/src.c +--- linux-4.1.10/arch/arm/mach-imx/src.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/src.c 2015-10-11 19:49:25.699419145 +0200 @@ -1,5 +1,5 @@ /* - * Copyright 2011 Freescale Semiconductor, Inc. @@ -13669,9 +22453,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/src.c linux-4.1.10/arch/arm/mach-i val &= ~(1 << BP_SRC_SCR_WARM_RESET_ENABLE); writel_relaxed(val, src_base + SRC_SCR); spin_unlock(&scr_lock); -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/system.c linux-4.1.10/arch/arm/mach-imx/system.c ---- linux-4.1.10.orig/arch/arm/mach-imx/system.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/system.c 2015-10-10 16:41:28.705314126 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/system.c xbian-sources-kernel/arch/arm/mach-imx/system.c +--- linux-4.1.10/arch/arm/mach-imx/system.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/system.c 2015-10-11 19:49:25.699419145 +0200 @@ -34,6 +34,7 @@ static void __iomem *wdog_base; @@ -13740,9 +22524,9 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/system.c linux-4.1.10/arch/arm/mac #ifdef CONFIG_CACHE_L2X0 void __init imx_init_l2cache(void) { -diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/time.c linux-4.1.10/arch/arm/mach-imx/time.c ---- linux-4.1.10.orig/arch/arm/mach-imx/time.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mach-imx/time.c 2015-10-10 16:41:28.709314238 +0200 +diff -Nur linux-4.1.10/arch/arm/mach-imx/time.c xbian-sources-kernel/arch/arm/mach-imx/time.c +--- linux-4.1.10/arch/arm/mach-imx/time.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mach-imx/time.c 2015-10-11 19:49:25.699419145 +0200 @@ -28,6 +28,7 @@ #include <linux/delay.h> #include <linux/err.h> @@ -14046,18 +22830,18 @@ diff -Nur linux-4.1.10.orig/arch/arm/mach-imx/time.c linux-4.1.10/arch/arm/mach- } CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt); CLOCKSOURCE_OF_DECLARE(mx25_timer, "fsl,imx25-gpt", mxc_timer_init_dt); -diff -Nur linux-4.1.10.orig/arch/arm/mm/cache-v7.S linux-4.1.10/arch/arm/mm/cache-v7.S ---- linux-4.1.10.orig/arch/arm/mm/cache-v7.S 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/arch/arm/mm/cache-v7.S 2015-10-10 16:41:41.873314826 +0200 +diff -Nur linux-4.1.10/arch/arm/mm/cache-v7.S xbian-sources-kernel/arch/arm/mm/cache-v7.S +--- linux-4.1.10/arch/arm/mm/cache-v7.S 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/arch/arm/mm/cache-v7.S 2015-10-11 19:49:25.915404828 +0200 @@ -446,3 +446,5 @@ @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) define_cache_functions v7 + + .long v7_dma_flush_range -diff -Nur linux-4.1.10.orig/block/bfq-cgroup.c linux-4.1.10/block/bfq-cgroup.c ---- linux-4.1.10.orig/block/bfq-cgroup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/block/bfq-cgroup.c 2015-10-10 16:41:42.089314835 +0200 +diff -Nur linux-4.1.10/block/bfq-cgroup.c xbian-sources-kernel/block/bfq-cgroup.c +--- linux-4.1.10/block/bfq-cgroup.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/block/bfq-cgroup.c 2015-10-11 19:49:27.315312034 +0200 @@ -0,0 +1,936 @@ +/* + * BFQ: CGROUPS support. @@ -14995,9 +23779,9 @@ diff -Nur linux-4.1.10.orig/block/bfq-cgroup.c linux-4.1.10/block/bfq-cgroup.c + return bfqg; +} +#endif -diff -Nur linux-4.1.10.orig/block/bfq.h linux-4.1.10/block/bfq.h ---- linux-4.1.10.orig/block/bfq.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/block/bfq.h 2015-10-10 16:41:42.093314836 +0200 +diff -Nur linux-4.1.10/block/bfq.h xbian-sources-kernel/block/bfq.h +--- linux-4.1.10/block/bfq.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/block/bfq.h 2015-10-11 19:49:27.315312034 +0200 @@ -0,0 +1,811 @@ +/* + * BFQ-v7r7 for 4.0.0: data structures and common functions prototypes. @@ -15810,9 +24594,9 @@ diff -Nur linux-4.1.10.orig/block/bfq.h linux-4.1.10/block/bfq.h +static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq); + +#endif /* _BFQ_H */ -diff -Nur linux-4.1.10.orig/block/bfq-ioc.c linux-4.1.10/block/bfq-ioc.c ---- linux-4.1.10.orig/block/bfq-ioc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/block/bfq-ioc.c 2015-10-10 16:41:42.093314836 +0200 +diff -Nur linux-4.1.10/block/bfq-ioc.c xbian-sources-kernel/block/bfq-ioc.c +--- linux-4.1.10/block/bfq-ioc.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/block/bfq-ioc.c 2015-10-11 19:49:27.315312034 +0200 @@ -0,0 +1,36 @@ +/* + * BFQ: I/O context handling. @@ -15850,9 +24634,9 @@ diff -Nur linux-4.1.10.orig/block/bfq-ioc.c linux-4.1.10/block/bfq-ioc.c + return icq_to_bic(ioc_lookup_icq(ioc, bfqd->queue)); + return NULL; +} -diff -Nur linux-4.1.10.orig/block/bfq-iosched.c linux-4.1.10/block/bfq-iosched.c ---- linux-4.1.10.orig/block/bfq-iosched.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/block/bfq-iosched.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/block/bfq-iosched.c xbian-sources-kernel/block/bfq-iosched.c +--- linux-4.1.10/block/bfq-iosched.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/block/bfq-iosched.c 2015-10-11 19:49:27.315312034 +0200 @@ -0,0 +1,4223 @@ +/* + * Budget Fair Queueing (BFQ) disk scheduler. @@ -20077,9 +28861,9 @@ diff -Nur linux-4.1.10.orig/block/bfq-iosched.c linux-4.1.10/block/bfq-iosched.c + +MODULE_AUTHOR("Fabio Checconi, Paolo Valente"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/block/bfq-sched.c linux-4.1.10/block/bfq-sched.c ---- linux-4.1.10.orig/block/bfq-sched.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/block/bfq-sched.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/block/bfq-sched.c xbian-sources-kernel/block/bfq-sched.c +--- linux-4.1.10/block/bfq-sched.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/block/bfq-sched.c 2015-10-11 19:49:27.315312034 +0200 @@ -0,0 +1,1186 @@ +/* + * BFQ: Hierarchical B-WF2Q+ scheduler. @@ -21267,9 +30051,9 @@ diff -Nur linux-4.1.10.orig/block/bfq-sched.c linux-4.1.10/block/bfq-sched.c + if (bfqq->wr_coeff > 1) + bfqd->wr_busy_queues++; +} -diff -Nur linux-4.1.10.orig/block/Kconfig.iosched linux-4.1.10/block/Kconfig.iosched ---- linux-4.1.10.orig/block/Kconfig.iosched 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/block/Kconfig.iosched 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/block/Kconfig.iosched xbian-sources-kernel/block/Kconfig.iosched +--- linux-4.1.10/block/Kconfig.iosched 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/block/Kconfig.iosched 2015-10-11 19:49:27.315312034 +0200 @@ -39,6 +39,27 @@ ---help--- Enable group IO scheduling in CFQ. @@ -21323,9 +30107,9 @@ diff -Nur linux-4.1.10.orig/block/Kconfig.iosched linux-4.1.10/block/Kconfig.ios default "noop" if DEFAULT_NOOP endmenu -diff -Nur linux-4.1.10.orig/block/Makefile linux-4.1.10/block/Makefile ---- linux-4.1.10.orig/block/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/block/Makefile 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/block/Makefile xbian-sources-kernel/block/Makefile +--- linux-4.1.10/block/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/block/Makefile 2015-10-11 19:49:27.315312034 +0200 @@ -18,6 +18,7 @@ obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o @@ -21334,37 +30118,238 @@ diff -Nur linux-4.1.10.orig/block/Makefile linux-4.1.10/block/Makefile obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o obj-$(CONFIG_BLK_CMDLINE_PARSER) += cmdline-parser.o -diff -Nur linux-4.1.10.orig/Documentation/devicetree/bindings/mmc/mmc.txt linux-4.1.10/Documentation/devicetree/bindings/mmc/mmc.txt ---- linux-4.1.10.orig/Documentation/devicetree/bindings/mmc/mmc.txt 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/Documentation/devicetree/bindings/mmc/mmc.txt 2015-10-10 16:41:42.101314834 +0200 -@@ -5,6 +5,8 @@ - Interpreted by the OF core: - - reg: Registers location and length. - - interrupts: Interrupts used by the MMC controller. -+- clocks: Clocks needed for the host controller, if any. -+- clock-names: Goes with clocks above. - - Card detection: - If no property below is supplied, host native card detect is used. -@@ -43,6 +45,15 @@ - - dsr: Value the card's (optional) Driver Stage Register (DSR) should be - programmed with. Valid range: [0 .. 0xffff]. - -+Card power and reset control: -+The following properties can be specified for cases where the MMC -+peripheral needs additional reset, regulator and clock lines. It is for -+example common for WiFi/BT adapters to have these separate from the main -+MMC bus: -+ - card-reset-gpios: Specify GPIOs for card reset (reset active low) -+ - card-external-vcc-supply: Regulator to drive (independent) card VCC -+ - clock with name "card_ext_clock": External clock provided to the card -+ - *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line - polarity properties, we have to fix the meaning of the "normal" and "inverted" - line levels. We choose to follow the SDHCI standard, which specifies both those -diff -Nur linux-4.1.10.orig/Documentation/devicetree/bindings/vendor-prefixes.txt linux-4.1.10/Documentation/devicetree/bindings/vendor-prefixes.txt ---- linux-4.1.10.orig/Documentation/devicetree/bindings/vendor-prefixes.txt 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/Documentation/devicetree/bindings/vendor-prefixes.txt 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/Documentation/devicetree/bindings/fb/fsl_ipuv3_fb.txt xbian-sources-kernel/Documentation/devicetree/bindings/fb/fsl_ipuv3_fb.txt +--- linux-4.1.10/Documentation/devicetree/bindings/fb/fsl_ipuv3_fb.txt 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/Documentation/devicetree/bindings/fb/fsl_ipuv3_fb.txt 2015-10-11 19:49:25.087459709 +0200 +@@ -0,0 +1,118 @@ ++* FSL IPUv3 Display/FB ++ ++The FSL IPUv3 is Image Processing Unit version 3, a part of video and graphics ++subsystem in an application processor. The goal of the IPU is to provide ++comprehensive support for the flow of data from an image sensor or/and to a ++display device. ++ ++Two IPU units are on the imx6q SOC while only one IPU unit on the imx6dl SOC. ++Each IPU unit has two display interfaces. ++ ++Required properties for IPU: ++- bypass_reset :Bypass reset to avoid display channel being. ++ stopped by probe since it may start to work in bootloader: 0 or 1. ++- compatible : should be "fsl,imx6q-ipu". ++- reg : the register address range. ++- interrupts : the error and sync interrupts request. ++- clocks : the clock sources that it depends on. ++- clock-names: the related clock names. ++- resets : IPU reset specifier. See reset.txt and fsl,imx-src.txt in ++ Documentation/devicetree/bindings/reset/ for details. ++ ++Required properties for fb: ++- compatible : should be "fsl,mxc_sdc_fb". ++- disp_dev : display device: "ldb", "lcd", "hdmi", "mipi_dsi", "adv739x". ++- mode_str : video mode string: "LDB-XGA" or "LDB-1080P60" for ldb, ++ "CLAA-WVGA" for lcd, "TRULY-WVGA" for TRULY mipi_dsi lcd panel, ++ "1920x1080M@60" for hdmi, "BT656-NTSC" or "BT656-PAL" for adv739x. ++- default_bpp : default bits per pixel: 8/16/24/32 ++- int_clk : use internal clock as pixel clock: 0 or 1 ++- late_init : to avoid display channel being re-initialized ++ as we've probably setup the channel in bootloader: 0 or 1 ++- interface_pix_fmt : display interface pixel format as below: ++ RGB666 IPU_PIX_FMT_RGB666 ++ RGB565 IPU_PIX_FMT_RGB565 ++ RGB24 IPU_PIX_FMT_RGB24 ++ BGR24 IPU_PIX_FMT_BGR24 ++ GBR24 IPU_PIX_FMT_GBR24 ++ YUV444 IPU_PIX_FMT_YUV444 ++ YUYV IPU_PIX_FMT_YUYV ++ UYVY IPU_PIX_FMT_UYVY ++ YVYV IPU_PIX_FMT_YVYU ++ VYUY IPU_PIX_FMT_VYUY ++ ++Required properties for display: ++- compatible : should be "fsl,lcd" for lcd panel ++- reg : the register address range if necessary to have. ++- interrupts : the error and sync interrupts if necessary to have. ++- clocks : the clock sources that it depends on if necessary to have. ++- clock-names: the related clock names if necessary to have. ++- ipu_id : ipu id for the first display device: 0 or 1 ++- disp_id : display interface id for the first display interface: 0 or 1 ++- default_ifmt : save as above display interface pixel format for lcd ++- pinctrl-names : should be "default" ++- pinctrl-0 : should be pinctrl_ipu1_1 or pinctrl_ipu2_1, which depends on the ++ IPU connected. ++- gpr : the mux controller for the display engine's display interfaces and the display encoder ++ (only valid for mipi dsi now). ++- disp-power-on-supply : the regulator to control display panel's power. ++ (only valid for mipi dsi now). ++- resets : the gpio pin to reset the display device(only valid for mipi display panel now). ++- lcd_panel : the video mode name for the display device(only valid for mipi display panel now). ++- dev_id : the display engine's identity within the system, which intends to replace ipu_id ++ (only valid for mipi dsi now). ++ ++Example for IPU: ++ ipu1: ipu@02400000 { ++ compatible = "fsl,imx6q-ipu"; ++ reg = <0x02400000 0x400000>; ++ interrupts = <0 6 0x4 0 5 0x4>; ++ clocks = <&clks 130>, <&clks 131>, <&clks 132>, ++ <&clks 39>, <&clks 40>, ++ <&clks 135>, <&clks 136>; ++ clock-names = "bus", "di0", "di1", ++ "di0_sel", "di1_sel", ++ "ldb_di0", "ldb_di1"; ++ resets = <&src 2>; ++ bypass_reset = <0>; ++ }; ++ ++Example for fb: ++ fb0 { ++ compatible = "fsl,mxc_sdc_fb"; ++ disp_dev = "ldb"; ++ interface_pix_fmt = "RGB666"; ++ mode_str ="LDB-XGA"; ++ default_bpp = <16>; ++ int_clk = <0>; ++ late_init = <0>; ++ status = "okay"; ++ }; ++ ++Example for mipi dsi display: ++ mipi_dsi: mipi@021e0000 { ++ compatible = "fsl,imx6q-mipi-dsi"; ++ reg = <0x021e0000 0x4000>; ++ interrupts = <0 102 0x04>; ++ gpr = <&gpr>; ++ clocks = <&clks 138>, <&clks 204>; ++ clock-names = "mipi_pllref_clk", "mipi_cfg_clk"; ++ dev_id = <0>; ++ disp_id = <0>; ++ lcd_panel = "TRULY-WVGA"; ++ disp-power-on-supply = <®_mipi_dsi_pwr_on> ++ resets = <&mipi_dsi_reset>; ++ status = "okay"; ++ }; ++ ++Example for adv739x CVBS output: ++ fb0 { ++ compatible = "fsl,mxc_sdc_fb"; ++ disp_dev = "adv739x"; ++ interface_pix_fmt = "BT656"; ++ mode_str ="BT656-NTSC"; ++ default_bpp = <16>; ++ int_clk = <0>; ++ late_init = <0>; ++ status = "okay"; ++ }; +diff -Nur linux-4.1.10/Documentation/devicetree/bindings/regulator/ltc3676.txt xbian-sources-kernel/Documentation/devicetree/bindings/regulator/ltc3676.txt +--- linux-4.1.10/Documentation/devicetree/bindings/regulator/ltc3676.txt 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/Documentation/devicetree/bindings/regulator/ltc3676.txt 2015-10-11 19:49:25.151455467 +0200 +@@ -0,0 +1,103 @@ ++Linear Technology LTC3676 8-output regulators ++ ++Required properties: ++- compatible: "lltc,ltc3676" ++- reg: I2C slave address ++ ++Required child node: ++- regulators: Contains eight regulator child nodes sw1, sw2, sw3, sw4, ++ ldo1, ldo2, ldo3, and ldo4, specifying the initialization data as ++ documented in Documentation/devicetree/bindings/regulator/regulator.txt. ++ ++Each regulator is defined using the standard binding for regulators. The ++nodes for sw1, sw2, sw3, sw4, ldo1, ldo2 and ldo4 additionally need to specify ++the resistor values of their external feedback voltage dividers: ++ ++Required properties (not on ldo3): ++- lltc,fb-voltage-divider: An array of two integers containing the resistor ++ values R1 and R2 of the feedback voltage divider in ohms. ++ ++Regulators sw1, sw2, sw3, sw4 can regulate the feedback reference from: ++412.5mV to 800mV in 12.5 mV steps. The output voltage thus ranges between ++0.4125 * (1 + R1/R2) V and 0.8 * (1 + R1/R2) V. ++ ++Regulators ldo1, ldo2, and ldo4 have a fixed 0.725 V reference and thus output ++0.725 * (1 + R1/R2) V. The ldo3 regulator is fixed to 1.8 V. The ldo1 standby ++regulator can not be disabled and thus should have the regulator-always-on ++property set. ++ ++Example: ++ ++ ltc3676: pmic@3c { ++ compatible = "lltc,ltc3676"; ++ reg = <0x3c>; ++ ++ regulators { ++ sw1_reg: sw1 { ++ regulator-min-microvolt = <674400>; ++ regulator-max-microvolt = <1308000>; ++ lltc,fb-voltage-divider = <127000 200000>; ++ regulator-ramp-delay = <7000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ sw2_reg: sw2 { ++ regulator-min-microvolt = <1033310>; ++ regulator-max-microvolt = <200400>; ++ lltc,fb-voltage-divider = <301000 200000>; ++ regulator-ramp-delay = <7000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ sw3_reg: sw3 { ++ regulator-min-microvolt = <674400>; ++ regulator-max-microvolt = <130800>; ++ lltc,fb-voltage-divider = <127000 200000>; ++ regulator-ramp-delay = <7000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ sw4_reg: sw4 { ++ regulator-min-microvolt = <868310>; ++ regulator-max-microvolt = <168400>; ++ lltc,fb-voltage-divider = <221000 200000>; ++ regulator-ramp-delay = <7000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ /* unused */ ++ ldo1_reg: ldo1 { ++ regulator-min-microvolt = <0>; ++ regulator-max-microvolt = <0>; ++ lltc,fb-voltage-divider = <0 0>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo2_reg: ldo2 { ++ regulator-min-microvolt = <2490375>; ++ regulator-max-microvolt = <2490375>; ++ lltc,fb-voltage-divider = <487000 200000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo3_reg: ldo3 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ }; ++ ++ ldo4_reg: ldo4 { ++ regulator-min-microvolt = <3023250>; ++ regulator-max-microvolt = <3023250>; ++ lltc,fb-voltage-divider = <634000 200000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ }; ++ }; +diff -Nur linux-4.1.10/Documentation/devicetree/bindings/vendor-prefixes.txt xbian-sources-kernel/Documentation/devicetree/bindings/vendor-prefixes.txt +--- linux-4.1.10/Documentation/devicetree/bindings/vendor-prefixes.txt 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/Documentation/devicetree/bindings/vendor-prefixes.txt 2015-10-11 19:49:25.163454672 +0200 @@ -201,6 +201,7 @@ variscite Variscite Ltd. via VIA Technologies, Inc. @@ -21373,9 +30358,44 @@ diff -Nur linux-4.1.10.orig/Documentation/devicetree/bindings/vendor-prefixes.tx voipac Voipac Technologies s.r.o. winbond Winbond Electronics corp. wlf Wolfson Microelectronics -diff -Nur linux-4.1.10.orig/drivers/bluetooth/bt3c_cs.c linux-4.1.10/drivers/bluetooth/bt3c_cs.c ---- linux-4.1.10.orig/drivers/bluetooth/bt3c_cs.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/bt3c_cs.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/Documentation/tda1997x xbian-sources-kernel/Documentation/tda1997x +--- linux-4.1.10/Documentation/tda1997x 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/Documentation/tda1997x 2015-10-11 19:49:25.303445392 +0200 +@@ -0,0 +1,31 @@ ++The NXP TDA19971/19972 are HDMI receiver devices that decode HDMI ++input signals and present a configurable parallel video output bus and ++audio output bus. The internal video bus is 36bits while the output bus ++differs per device. These devices offer High Definition (HD) video resolutions ++up to 1080p50/60 or WUXGA and HD audio formats up to 8 channels such as DTS HD ++and Dolby True HD. The chips optionally include an HDCP 1.4 engine with ++pre-programmed keys stored into an internal NV memory. Additionally the chips ++also supports several HDMI 1.4b options such as 3D formats up to 1080p50/60, ++Deep Colors up to 36bpp and extended colorimetry. ++ ++The TDA19971 has one HDMI input (HDMI-A) and 24bit output bus and the TDA19972 ++has two HDMI inputs (HDMI-A/B) and a 36bit video output bus. ++ ++Driver Details: ++--------------- ++ ++The chips respond to two i2c slave addresses, the first allows access to ++HDMI input, audio, and video status and configuration and the second allows ++access to CEC. ++ ++The tda1997x-core driver attaches to the i2c slave that controls the device. ++It also manages the 2nd i2c slave for CEC. The platform data structure ++provides details about the desired video output bus configuration and the ++desired audio output bus configuration. An ASoC codec driver is also provided ++however this is merely a skeleton driver as the audio output format cannot ++be changed and is dependent upon the HDMI input signal. A separate platform ++specific device video driver can interact with the core to obtain information ++about the video data format which is dependent upon the HDMI input signal. A ++separate platform specific ASoC SoC DAI driver can interact with the core ++to obtain information about the audio data format which is dependent upon ++the HDMI input signal. +diff -Nur linux-4.1.10/drivers/bluetooth/bt3c_cs.c xbian-sources-kernel/drivers/bluetooth/bt3c_cs.c +--- linux-4.1.10/drivers/bluetooth/bt3c_cs.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/bt3c_cs.c 2015-10-11 19:49:27.551296392 +0200 @@ -202,9 +202,8 @@ /* Send frame */ len = bt3c_write(iobase, 256, skb->data, skb->len); @@ -21387,9 +30407,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/bt3c_cs.c linux-4.1.10/drivers/blu kfree_skb(skb); -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btbcm.c linux-4.1.10/drivers/bluetooth/btbcm.c ---- linux-4.1.10.orig/drivers/bluetooth/btbcm.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/btbcm.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btbcm.c xbian-sources-kernel/drivers/bluetooth/btbcm.c +--- linux-4.1.10/drivers/bluetooth/btbcm.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/btbcm.c 2015-10-11 19:49:27.551296392 +0200 @@ -33,6 +33,7 @@ #define VERSION "0.1" @@ -21604,9 +30624,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btbcm.c linux-4.1.10/drivers/bluet /* Reset */ err = btbcm_reset(hdev); -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btbcm.h linux-4.1.10/drivers/bluetooth/btbcm.h ---- linux-4.1.10.orig/drivers/bluetooth/btbcm.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/btbcm.h 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btbcm.h xbian-sources-kernel/drivers/bluetooth/btbcm.h +--- linux-4.1.10/drivers/bluetooth/btbcm.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/btbcm.h 2015-10-11 19:49:27.551296392 +0200 @@ -21,15 +21,61 @@ * */ @@ -21696,9 +30716,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btbcm.h linux-4.1.10/drivers/bluet +} #endif -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btintel.c linux-4.1.10/drivers/bluetooth/btintel.c ---- linux-4.1.10.orig/drivers/bluetooth/btintel.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/btintel.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btintel.c xbian-sources-kernel/drivers/bluetooth/btintel.c +--- linux-4.1.10/drivers/bluetooth/btintel.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/btintel.c 2015-10-11 19:49:27.551296392 +0200 @@ -53,12 +53,6 @@ } @@ -21712,9 +30732,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btintel.c linux-4.1.10/drivers/blu /* For some Intel based controllers, the default Bluetooth device * address 00:03:19:9E:8B:00 can be found. These controllers are -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btmrvl_sdio.c linux-4.1.10/drivers/bluetooth/btmrvl_sdio.c ---- linux-4.1.10.orig/drivers/bluetooth/btmrvl_sdio.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/btmrvl_sdio.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btmrvl_sdio.c xbian-sources-kernel/drivers/bluetooth/btmrvl_sdio.c +--- linux-4.1.10/drivers/bluetooth/btmrvl_sdio.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/btmrvl_sdio.c 2015-10-11 19:49:27.551296392 +0200 @@ -1217,7 +1217,7 @@ unsigned int reg, reg_start, reg_end; enum rdwr_status stat; @@ -21724,9 +30744,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btmrvl_sdio.c linux-4.1.10/drivers u32 memory_size, fw_dump_len = 0; /* dump sdio register first */ -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btrtl.c linux-4.1.10/drivers/bluetooth/btrtl.c ---- linux-4.1.10.orig/drivers/bluetooth/btrtl.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/bluetooth/btrtl.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btrtl.c xbian-sources-kernel/drivers/bluetooth/btrtl.c +--- linux-4.1.10/drivers/bluetooth/btrtl.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/bluetooth/btrtl.c 2015-10-11 19:49:27.551296392 +0200 @@ -0,0 +1,390 @@ +/* + * Bluetooth support for Realtek devices @@ -22118,9 +31138,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btrtl.c linux-4.1.10/drivers/bluet +MODULE_DESCRIPTION("Bluetooth support for Realtek devices ver " VERSION); +MODULE_VERSION(VERSION); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btrtl.h linux-4.1.10/drivers/bluetooth/btrtl.h ---- linux-4.1.10.orig/drivers/bluetooth/btrtl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/bluetooth/btrtl.h 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btrtl.h xbian-sources-kernel/drivers/bluetooth/btrtl.h +--- linux-4.1.10/drivers/bluetooth/btrtl.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/bluetooth/btrtl.h 2015-10-11 19:49:27.551296392 +0200 @@ -0,0 +1,52 @@ +/* + * Bluetooth support for Realtek devices @@ -22174,9 +31194,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btrtl.h linux-4.1.10/drivers/bluet +} + +#endif -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btusb.c linux-4.1.10/drivers/bluetooth/btusb.c ---- linux-4.1.10.orig/drivers/bluetooth/btusb.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/btusb.c 2015-10-10 16:41:42.101314834 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btusb.c xbian-sources-kernel/drivers/bluetooth/btusb.c +--- linux-4.1.10/drivers/bluetooth/btusb.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/btusb.c 2015-10-11 19:49:27.555296127 +0200 @@ -31,13 +31,14 @@ #include "btintel.h" @@ -22828,9 +31848,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btusb.c linux-4.1.10/drivers/bluet return 0; } -diff -Nur linux-4.1.10.orig/drivers/bluetooth/btwilink.c linux-4.1.10/drivers/bluetooth/btwilink.c ---- linux-4.1.10.orig/drivers/bluetooth/btwilink.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/btwilink.c 2015-10-10 16:41:42.105314832 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/btwilink.c xbian-sources-kernel/drivers/bluetooth/btwilink.c +--- linux-4.1.10/drivers/bluetooth/btwilink.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/btwilink.c 2015-10-11 19:49:27.555296127 +0200 @@ -22,7 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * @@ -22840,9 +31860,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/btwilink.c linux-4.1.10/drivers/bl #include <linux/platform_device.h> #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_ath.c linux-4.1.10/drivers/bluetooth/hci_ath.c ---- linux-4.1.10.orig/drivers/bluetooth/hci_ath.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/hci_ath.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/hci_ath.c xbian-sources-kernel/drivers/bluetooth/hci_ath.c +--- linux-4.1.10/drivers/bluetooth/hci_ath.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/hci_ath.c 2015-10-11 19:49:27.555296127 +0200 @@ -192,6 +192,7 @@ if (IS_ERR(ath->rx_skb)) { int err = PTR_ERR(ath->rx_skb); @@ -22851,9 +31871,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_ath.c linux-4.1.10/drivers/blu return err; } -diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_bcm.c linux-4.1.10/drivers/bluetooth/hci_bcm.c ---- linux-4.1.10.orig/drivers/bluetooth/hci_bcm.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/hci_bcm.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/hci_bcm.c xbian-sources-kernel/drivers/bluetooth/hci_bcm.c +--- linux-4.1.10/drivers/bluetooth/hci_bcm.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/hci_bcm.c 2015-10-11 19:49:27.555296127 +0200 @@ -24,6 +24,7 @@ #include <linux/kernel.h> #include <linux/errno.h> @@ -23004,9 +32024,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_bcm.c linux-4.1.10/drivers/blu .recv = bcm_recv, .enqueue = bcm_enqueue, .dequeue = bcm_dequeue, -diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_bcsp.c linux-4.1.10/drivers/bluetooth/hci_bcsp.c ---- linux-4.1.10.orig/drivers/bluetooth/hci_bcsp.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/hci_bcsp.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/hci_bcsp.c xbian-sources-kernel/drivers/bluetooth/hci_bcsp.c +--- linux-4.1.10/drivers/bluetooth/hci_bcsp.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/hci_bcsp.c 2015-10-11 19:49:27.555296127 +0200 @@ -47,8 +47,8 @@ #include "hci_uart.h" @@ -23075,9 +32095,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_bcsp.c linux-4.1.10/drivers/bl bcsp->rx_skb->data[0] & 0x07, bcsp->rxseq_txack); kfree_skb(bcsp->rx_skb); -diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_h4.c linux-4.1.10/drivers/bluetooth/hci_h4.c ---- linux-4.1.10.orig/drivers/bluetooth/hci_h4.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/hci_h4.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/hci_h4.c xbian-sources-kernel/drivers/bluetooth/hci_h4.c +--- linux-4.1.10/drivers/bluetooth/hci_h4.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/hci_h4.c 2015-10-11 19:49:27.555296127 +0200 @@ -133,6 +133,7 @@ if (IS_ERR(h4->rx_skb)) { int err = PTR_ERR(h4->rx_skb); @@ -23086,9 +32106,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_h4.c linux-4.1.10/drivers/blue return err; } -diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_ldisc.c linux-4.1.10/drivers/bluetooth/hci_ldisc.c ---- linux-4.1.10.orig/drivers/bluetooth/hci_ldisc.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/hci_ldisc.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/hci_ldisc.c xbian-sources-kernel/drivers/bluetooth/hci_ldisc.c +--- linux-4.1.10/drivers/bluetooth/hci_ldisc.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/hci_ldisc.c 2015-10-11 19:49:27.555296127 +0200 @@ -40,6 +40,7 @@ #include <linux/signal.h> #include <linux/ioctl.h> @@ -23231,9 +32251,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_ldisc.c linux-4.1.10/drivers/b if (hu->proto->setup) return hu->proto->setup(hu); -diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_uart.h linux-4.1.10/drivers/bluetooth/hci_uart.h ---- linux-4.1.10.orig/drivers/bluetooth/hci_uart.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/hci_uart.h 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/hci_uart.h xbian-sources-kernel/drivers/bluetooth/hci_uart.h +--- linux-4.1.10/drivers/bluetooth/hci_uart.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/hci_uart.h 2015-10-11 19:49:27.555296127 +0200 @@ -58,10 +58,13 @@ struct hci_uart_proto { unsigned int id; @@ -23270,9 +32290,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_uart.h linux-4.1.10/drivers/bl #ifdef CONFIG_BT_HCIUART_H4 int h4_init(void); -diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_vhci.c linux-4.1.10/drivers/bluetooth/hci_vhci.c ---- linux-4.1.10.orig/drivers/bluetooth/hci_vhci.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/hci_vhci.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/hci_vhci.c xbian-sources-kernel/drivers/bluetooth/hci_vhci.c +--- linux-4.1.10/drivers/bluetooth/hci_vhci.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/hci_vhci.c 2015-10-11 19:49:27.555296127 +0200 @@ -366,7 +366,7 @@ .llseek = no_llseek, }; @@ -23282,9 +32302,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/hci_vhci.c linux-4.1.10/drivers/bl .name = "vhci", .fops = &vhci_fops, .minor = VHCI_MINOR, -diff -Nur linux-4.1.10.orig/drivers/bluetooth/Kconfig linux-4.1.10/drivers/bluetooth/Kconfig ---- linux-4.1.10.orig/drivers/bluetooth/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/Kconfig 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/Kconfig xbian-sources-kernel/drivers/bluetooth/Kconfig +--- linux-4.1.10/drivers/bluetooth/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/Kconfig 2015-10-11 19:49:27.551296392 +0200 @@ -9,6 +9,10 @@ tristate select FW_LOADER @@ -23314,9 +32334,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/Kconfig linux-4.1.10/drivers/bluet config BT_HCIBTSDIO tristate "HCI SDIO driver" depends on MMC -diff -Nur linux-4.1.10.orig/drivers/bluetooth/Makefile linux-4.1.10/drivers/bluetooth/Makefile ---- linux-4.1.10.orig/drivers/bluetooth/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/bluetooth/Makefile 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/bluetooth/Makefile xbian-sources-kernel/drivers/bluetooth/Makefile +--- linux-4.1.10/drivers/bluetooth/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/bluetooth/Makefile 2015-10-11 19:49:27.551296392 +0200 @@ -21,6 +21,7 @@ obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o obj-$(CONFIG_BT_WILINK) += btwilink.o @@ -23325,9 +32345,9 @@ diff -Nur linux-4.1.10.orig/drivers/bluetooth/Makefile linux-4.1.10/drivers/blue btmrvl-y := btmrvl_main.o btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o -diff -Nur linux-4.1.10.orig/drivers/char/frandom.c linux-4.1.10/drivers/char/frandom.c ---- linux-4.1.10.orig/drivers/char/frandom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/char/frandom.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/char/frandom.c xbian-sources-kernel/drivers/char/frandom.c +--- linux-4.1.10/drivers/char/frandom.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/char/frandom.c 2015-10-11 19:49:27.563295596 +0200 @@ -0,0 +1,415 @@ +/* +** frandom.c @@ -23744,9 +32764,9 @@ diff -Nur linux-4.1.10.orig/drivers/char/frandom.c linux-4.1.10/drivers/char/fra +module_exit(frandom_cleanup_module); + +EXPORT_SYMBOL(erandom_get_random_bytes); -diff -Nur linux-4.1.10.orig/drivers/char/Makefile linux-4.1.10/drivers/char/Makefile ---- linux-4.1.10.orig/drivers/char/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/char/Makefile 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/char/Makefile xbian-sources-kernel/drivers/char/Makefile +--- linux-4.1.10/drivers/char/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/char/Makefile 2015-10-11 19:49:27.559295861 +0200 @@ -2,6 +2,7 @@ # Makefile for the kernel character device drivers. # @@ -23755,9 +32775,9 @@ diff -Nur linux-4.1.10.orig/drivers/char/Makefile linux-4.1.10/drivers/char/Make obj-y += mem.o random.o obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o obj-y += misc.o -diff -Nur linux-4.1.10.orig/drivers/cpufreq/imx6q-cpufreq.c linux-4.1.10/drivers/cpufreq/imx6q-cpufreq.c ---- linux-4.1.10.orig/drivers/cpufreq/imx6q-cpufreq.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/cpufreq/imx6q-cpufreq.c 2015-10-10 16:41:42.209314836 +0200 +diff -Nur linux-4.1.10/drivers/cpufreq/imx6q-cpufreq.c xbian-sources-kernel/drivers/cpufreq/imx6q-cpufreq.c +--- linux-4.1.10/drivers/cpufreq/imx6q-cpufreq.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/cpufreq/imx6q-cpufreq.c 2015-10-11 19:49:27.647290029 +0200 @@ -20,6 +20,8 @@ #define PU_SOC_VOLTAGE_HIGH 1275000 #define FREQ_1P2_GHZ 1200000000 @@ -23767,7 +32787,76 @@ diff -Nur linux-4.1.10.orig/drivers/cpufreq/imx6q-cpufreq.c linux-4.1.10/drivers static struct regulator *arm_reg; static struct regulator *pu_reg; static struct regulator *soc_reg; -@@ -251,6 +253,10 @@ +@@ -44,6 +46,7 @@ + unsigned long freq_hz, volt, volt_old; + unsigned int old_freq, new_freq; + int ret; ++ int tol = 25000; /* 25mv tollerance */ + + new_freq = freq_table[index].frequency; + freq_hz = new_freq * 1000; +@@ -61,25 +64,25 @@ + rcu_read_unlock(); + volt_old = regulator_get_voltage(arm_reg); + +- dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld mV\n", ++ dev_dbg(cpu_dev, "%u MHz, %ld mV --> %u MHz, %ld/%d mV\n", + old_freq / 1000, volt_old / 1000, +- new_freq / 1000, volt / 1000); ++ new_freq / 1000, volt / 1000, imx6_soc_volt[index] / 1000); + + /* scaling up? scale voltage before frequency */ + if (new_freq > old_freq) { + if (!IS_ERR(pu_reg)) { +- ret = regulator_set_voltage_tol(pu_reg, imx6_soc_volt[index], 0); ++ ret = regulator_set_voltage_tol(pu_reg, imx6_soc_volt[index], tol); + if (ret) { + dev_err(cpu_dev, "failed to scale vddpu up: %d\n", ret); + return ret; + } + } +- ret = regulator_set_voltage_tol(soc_reg, imx6_soc_volt[index], 0); ++ ret = regulator_set_voltage_tol(soc_reg, imx6_soc_volt[index], tol); + if (ret) { + dev_err(cpu_dev, "failed to scale vddsoc up: %d\n", ret); + return ret; + } +- ret = regulator_set_voltage_tol(arm_reg, volt, 0); ++ ret = regulator_set_voltage_tol(arm_reg, volt, tol); + if (ret) { + dev_err(cpu_dev, + "failed to scale vddarm up: %d\n", ret); +@@ -107,25 +110,25 @@ + ret = clk_set_rate(arm_clk, new_freq * 1000); + if (ret) { + dev_err(cpu_dev, "failed to set clock rate: %d\n", ret); +- regulator_set_voltage_tol(arm_reg, volt_old, 0); ++ regulator_set_voltage_tol(arm_reg, volt_old, tol); + return ret; + } + + /* scaling down? scale voltage after frequency */ + if (new_freq < old_freq) { +- ret = regulator_set_voltage_tol(arm_reg, volt, 0); ++ ret = regulator_set_voltage_tol(arm_reg, volt, tol); + if (ret) { + dev_warn(cpu_dev, + "failed to scale vddarm down: %d\n", ret); + ret = 0; + } +- ret = regulator_set_voltage_tol(soc_reg, imx6_soc_volt[index], 0); ++ ret = regulator_set_voltage_tol(soc_reg, imx6_soc_volt[index], tol); + if (ret) { + dev_warn(cpu_dev, "failed to scale vddsoc down: %d\n", ret); + ret = 0; + } + if (!IS_ERR(pu_reg)) { +- ret = regulator_set_voltage_tol(pu_reg, imx6_soc_volt[index], 0); ++ ret = regulator_set_voltage_tol(pu_reg, imx6_soc_volt[index], tol); + if (ret) { + dev_warn(cpu_dev, "failed to scale vddpu down: %d\n", ret); + ret = 0; +@@ -251,6 +254,10 @@ unsigned long volt = be32_to_cpup(val++); if (freq_table[j].frequency == freq) { imx6_soc_volt[soc_opp_count++] = volt; @@ -23778,9 +32867,9 @@ diff -Nur linux-4.1.10.orig/drivers/cpufreq/imx6q-cpufreq.c linux-4.1.10/drivers break; } } -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamalg.c linux-4.1.10/drivers/crypto/caam/caamalg.c ---- linux-4.1.10.orig/drivers/crypto/caam/caamalg.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/caamalg.c 2015-10-10 16:41:42.217314835 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/caamalg.c xbian-sources-kernel/drivers/crypto/caam/caamalg.c +--- linux-4.1.10/drivers/crypto/caam/caamalg.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/caamalg.c 2015-10-11 19:49:27.655289498 +0200 @@ -1,7 +1,7 @@ /* * caam - Freescale FSL CAAM support for crypto API @@ -27596,9 +36685,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamalg.c linux-4.1.10/drivers/c return err; } -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/crypto/caam/caamhash.c ---- linux-4.1.10.orig/drivers/crypto/caam/caamhash.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/caamhash.c 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/caamhash.c xbian-sources-kernel/drivers/crypto/caam/caamhash.c +--- linux-4.1.10/drivers/crypto/caam/caamhash.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/caamhash.c 2015-10-11 19:49:27.655289498 +0200 @@ -1,7 +1,7 @@ /* * caam - Freescale FSL CAAM support for ahash functions of crypto API @@ -28311,7 +37400,62 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, next_buf, *next_buflen, 1); #endif -@@ -1006,7 +1238,7 @@ +@@ -919,7 +1151,7 @@ + sec4_sg_bytes = sec4_sg_src_index * sizeof(struct sec4_sg_entry); + + /* allocate space for base edesc and hw desc commands, link tables */ +- edesc = kmalloc(sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN + ++ edesc = kzalloc(sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN + + sec4_sg_bytes, GFP_DMA | flags); + if (!edesc) { + dev_err(jrdev, "could not allocate extended descriptor\n"); +@@ -933,37 +1165,29 @@ + edesc->sec4_sg_bytes = sec4_sg_bytes; + edesc->sec4_sg = (void *)edesc + sizeof(struct ahash_edesc) + + DESC_JOB_IO_LEN; ++ edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, ++ sec4_sg_bytes, DMA_TO_DEVICE); + edesc->src_nents = 0; + +- ret = ctx_map_to_sec4_sg(desc, jrdev, state, ctx->ctx_len, +- edesc->sec4_sg, DMA_TO_DEVICE); +- if (ret) +- return ret; ++ ctx_map_to_sec4_sg(desc, jrdev, state, ctx->ctx_len, edesc->sec4_sg, ++ DMA_TO_DEVICE); + + state->buf_dma = try_buf_map_to_sec4_sg(jrdev, edesc->sec4_sg + 1, + buf, state->buf_dma, buflen, + last_buflen); + (edesc->sec4_sg + sec4_sg_src_index - 1)->len |= SEC4_SG_LEN_FIN; + +- edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, +- sec4_sg_bytes, DMA_TO_DEVICE); +- if (dma_mapping_error(jrdev, edesc->sec4_sg_dma)) { +- dev_err(jrdev, "unable to map S/G table\n"); +- return -ENOMEM; +- } +- + append_seq_in_ptr(desc, edesc->sec4_sg_dma, ctx->ctx_len + buflen, + LDST_SGF); + + edesc->dst_dma = map_seq_out_ptr_result(desc, jrdev, req->result, + digestsize); +- if (dma_mapping_error(jrdev, edesc->dst_dma)) { +- dev_err(jrdev, "unable to map dst\n"); +- return -ENOMEM; +- } ++ ++ dma_sync_single_for_device(jrdev, edesc->sec4_sg_dma, sec4_sg_bytes, ++ DMA_TO_DEVICE); + + #ifdef DEBUG +- print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", ++ print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", + DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); + #endif + +@@ -1006,7 +1230,7 @@ sizeof(struct sec4_sg_entry); /* allocate space for base edesc and hw desc commands, link tables */ @@ -28320,7 +37464,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ sec4_sg_bytes, GFP_DMA | flags); if (!edesc) { dev_err(jrdev, "could not allocate extended descriptor\n"); -@@ -1022,11 +1254,11 @@ +@@ -1022,11 +1246,11 @@ edesc->sec4_sg_bytes = sec4_sg_bytes; edesc->sec4_sg = (void *)edesc + sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN; @@ -28336,7 +37480,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ state->buf_dma = try_buf_map_to_sec4_sg(jrdev, edesc->sec4_sg + 1, buf, state->buf_dma, buflen, -@@ -1035,25 +1267,17 @@ +@@ -1035,25 +1259,17 @@ src_map_to_sec4_sg(jrdev, req->src, src_nents, edesc->sec4_sg + sec4_sg_src_index, chained); @@ -28366,7 +37510,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); #endif -@@ -1092,7 +1316,7 @@ +@@ -1092,7 +1308,7 @@ sec4_sg_bytes = src_nents * sizeof(struct sec4_sg_entry); /* allocate space for base edesc and hw desc commands, link tables */ @@ -28375,7 +37519,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DESC_JOB_IO_LEN, GFP_DMA | flags); if (!edesc) { dev_err(jrdev, "could not allocate extended descriptor\n"); -@@ -1100,6 +1324,8 @@ +@@ -1100,6 +1316,8 @@ } edesc->sec4_sg = (void *)edesc + sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN; @@ -28384,7 +37528,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ edesc->sec4_sg_bytes = sec4_sg_bytes; edesc->src_nents = src_nents; edesc->chained = chained; -@@ -1110,12 +1336,6 @@ +@@ -1110,12 +1328,6 @@ if (src_nents) { sg_to_sec4_sg_last(req->src, src_nents, edesc->sec4_sg, 0); @@ -28397,7 +37541,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ src_dma = edesc->sec4_sg_dma; options = LDST_SGF; } else { -@@ -1124,15 +1344,14 @@ +@@ -1124,15 +1336,14 @@ } append_seq_in_ptr(desc, src_dma, req->nbytes, options); @@ -28417,7 +37561,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); #endif -@@ -1166,7 +1385,7 @@ +@@ -1166,7 +1377,7 @@ int sh_len; /* allocate space for base edesc and hw desc commands, link tables */ @@ -28426,7 +37570,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ GFP_DMA | flags); if (!edesc) { dev_err(jrdev, "could not allocate extended descriptor\n"); -@@ -1179,23 +1398,17 @@ +@@ -1179,23 +1390,17 @@ init_job_desc_shared(desc, ptr, sh_len, HDR_SHARE_DEFER | HDR_REVERSE); state->buf_dma = dma_map_single(jrdev, buf, buflen, DMA_TO_DEVICE); @@ -28453,7 +37597,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); #endif -@@ -1246,7 +1459,7 @@ +@@ -1246,7 +1451,7 @@ * allocate space for base edesc and hw desc commands, * link tables */ @@ -28462,7 +37606,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ sec4_sg_bytes, GFP_DMA | flags); if (!edesc) { dev_err(jrdev, -@@ -1259,7 +1472,9 @@ +@@ -1259,7 +1464,9 @@ edesc->sec4_sg_bytes = sec4_sg_bytes; edesc->sec4_sg = (void *)edesc + sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN; @@ -28473,7 +37617,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ state->buf_dma = buf_map_to_sec4_sg(jrdev, edesc->sec4_sg, buf, *buflen); -@@ -1277,22 +1492,14 @@ +@@ -1277,22 +1484,14 @@ init_job_desc_shared(desc, ptr, sh_len, HDR_SHARE_DEFER | HDR_REVERSE); @@ -28500,7 +37644,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); #endif -@@ -1315,9 +1522,9 @@ +@@ -1315,9 +1514,9 @@ *next_buflen = 0; } #ifdef DEBUG @@ -28512,7 +37656,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, next_buf, *next_buflen, 1); #endif -@@ -1353,7 +1560,7 @@ +@@ -1353,7 +1552,7 @@ sizeof(struct sec4_sg_entry); /* allocate space for base edesc and hw desc commands, link tables */ @@ -28521,7 +37665,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ sec4_sg_bytes, GFP_DMA | flags); if (!edesc) { dev_err(jrdev, "could not allocate extended descriptor\n"); -@@ -1369,6 +1576,8 @@ +@@ -1369,6 +1568,8 @@ edesc->sec4_sg_bytes = sec4_sg_bytes; edesc->sec4_sg = (void *)edesc + sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN; @@ -28530,7 +37674,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ state->buf_dma = try_buf_map_to_sec4_sg(jrdev, edesc->sec4_sg, buf, state->buf_dma, buflen, -@@ -1377,25 +1586,17 @@ +@@ -1377,25 +1578,17 @@ src_map_to_sec4_sg(jrdev, req->src, src_nents, edesc->sec4_sg + 1, chained); @@ -28560,7 +37704,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); #endif -@@ -1448,7 +1649,7 @@ +@@ -1448,7 +1641,7 @@ * allocate space for base edesc and hw desc commands, * link tables */ @@ -28569,7 +37713,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ sec4_sg_bytes, GFP_DMA | flags); if (!edesc) { dev_err(jrdev, -@@ -1461,19 +1662,13 @@ +@@ -1461,19 +1654,13 @@ edesc->sec4_sg_bytes = sec4_sg_bytes; edesc->sec4_sg = (void *)edesc + sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN; @@ -28592,7 +37736,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ src_dma = edesc->sec4_sg_dma; options = LDST_SGF; } else { -@@ -1492,12 +1687,12 @@ +@@ -1492,12 +1679,12 @@ append_seq_in_ptr(desc, src_dma, to_hash, options); @@ -28609,7 +37753,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); #endif -@@ -1522,7 +1717,7 @@ +@@ -1522,7 +1709,7 @@ req->nbytes, 0); } #ifdef DEBUG @@ -28618,7 +37762,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ DUMP_PREFIX_ADDRESS, 16, 4, next_buf, *next_buflen, 1); #endif -@@ -1736,10 +1931,33 @@ +@@ -1736,10 +1923,33 @@ .alg_type = OP_ALG_ALGSEL_MD5, .alg_op = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC, }, @@ -28652,7 +37796,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ int alg_type; int alg_op; struct ahash_alg ahash_alg; -@@ -1756,6 +1974,7 @@ +@@ -1756,6 +1966,7 @@ struct caam_hash_alg *caam_hash = container_of(alg, struct caam_hash_alg, ahash_alg); struct caam_hash_ctx *ctx = crypto_tfm_ctx(tfm); @@ -28660,7 +37804,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ /* Sizes for MDHA running digests: MD5, SHA1, 224, 256, 384, 512 */ static const u8 runninglen[] = { HASH_MSG_LEN + MD5_DIGEST_SIZE, HASH_MSG_LEN + SHA1_DIGEST_SIZE, -@@ -1763,17 +1982,15 @@ +@@ -1763,17 +1974,15 @@ HASH_MSG_LEN + SHA256_DIGEST_SIZE, HASH_MSG_LEN + 64, HASH_MSG_LEN + SHA512_DIGEST_SIZE }; @@ -28682,7 +37826,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ /* copy descriptor header template value */ ctx->alg_type = OP_TYPE_CLASS2_ALG | caam_hash->alg_type; ctx->alg_op = OP_TYPE_CLASS2_ALG | caam_hash->alg_op; -@@ -1789,6 +2006,39 @@ +@@ -1789,6 +1998,39 @@ return ret; } @@ -28722,7 +37866,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ static void caam_hash_cra_exit(struct crypto_tfm *tfm) { struct caam_hash_ctx *ctx = crypto_tfm_ctx(tfm); -@@ -1816,35 +2066,57 @@ +@@ -1816,35 +2058,57 @@ !dma_mapping_error(ctx->jrdev, ctx->sh_desc_finup_dma)) dma_unmap_single(ctx->jrdev, ctx->sh_desc_finup_dma, desc_bytes(ctx->sh_desc_finup), DMA_TO_DEVICE); @@ -28749,18 +37893,18 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ + pdev = of_find_device_by_node(dev_node); + if (!pdev) { + of_node_put(dev_node); -+ return; + return; + } -+ + +- list_for_each_entry_safe(t_alg, n, &hash_list, entry) { + ctrldev = &pdev->dev; + priv = dev_get_drvdata(ctrldev); + + if (!priv->hash_list.next) { + of_node_put(dev_node); - return; ++ return; + } - -- list_for_each_entry_safe(t_alg, n, &hash_list, entry) { ++ + list_for_each_entry_safe(t_alg, n, &priv->hash_list, entry) { crypto_unregister_ahash(&t_alg->ahash_alg); list_del(&t_alg->entry); @@ -28787,7 +37931,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ return ERR_PTR(-ENOMEM); } -@@ -1864,7 +2136,11 @@ +@@ -1864,7 +2128,11 @@ template->driver_name); } alg->cra_module = THIS_MODULE; @@ -28800,7 +37944,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ alg->cra_exit = caam_hash_cra_exit; alg->cra_ctxsize = sizeof(struct caam_hash_ctx); alg->cra_priority = CAAM_CRA_PRIORITY; -@@ -1875,6 +2151,7 @@ +@@ -1875,6 +2143,7 @@ t_alg->alg_type = template->alg_type; t_alg->alg_op = template->alg_op; @@ -28808,7 +37952,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ return t_alg; } -@@ -1884,8 +2161,9 @@ +@@ -1884,8 +2153,9 @@ struct device_node *dev_node; struct platform_device *pdev; struct device *ctrldev; @@ -28820,7 +37964,7 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0"); if (!dev_node) { -@@ -1899,60 +2177,68 @@ +@@ -1899,60 +2169,68 @@ of_node_put(dev_node); return -ENODEV; } @@ -28910,9 +38054,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamhash.c linux-4.1.10/drivers/ return err; } -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caam_keyblob.c linux-4.1.10/drivers/crypto/caam/caam_keyblob.c ---- linux-4.1.10.orig/drivers/crypto/caam/caam_keyblob.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/caam_keyblob.c 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/caam_keyblob.c xbian-sources-kernel/drivers/crypto/caam/caam_keyblob.c +--- linux-4.1.10/drivers/crypto/caam/caam_keyblob.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/caam_keyblob.c 2015-10-11 19:49:27.655289498 +0200 @@ -0,0 +1,687 @@ +/* + * Key blob driver based on CAAM hardware @@ -29601,9 +38745,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caam_keyblob.c linux-4.1.10/driv +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_DESCRIPTION("FSL CAAM Secure Memory / Keystore"); +MODULE_AUTHOR("Freescale Semiconductor - NMSG/MAD"); -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caam_keyblob.h linux-4.1.10/drivers/crypto/caam/caam_keyblob.h ---- linux-4.1.10.orig/drivers/crypto/caam/caam_keyblob.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/caam_keyblob.h 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/caam_keyblob.h xbian-sources-kernel/drivers/crypto/caam/caam_keyblob.h +--- linux-4.1.10/drivers/crypto/caam/caam_keyblob.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/caam_keyblob.h 2015-10-11 19:49:27.655289498 +0200 @@ -0,0 +1,45 @@ +/* + * CAAM public-level include definitions for the key blob @@ -29650,9 +38794,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caam_keyblob.h linux-4.1.10/driv +#endif + +#endif /* CAAM_KEYBLOB_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamrng.c linux-4.1.10/drivers/crypto/caam/caamrng.c ---- linux-4.1.10.orig/drivers/crypto/caam/caamrng.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/caamrng.c 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/caamrng.c xbian-sources-kernel/drivers/crypto/caam/caamrng.c +--- linux-4.1.10/drivers/crypto/caam/caamrng.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/caamrng.c 2015-10-11 19:49:27.655289498 +0200 @@ -1,7 +1,7 @@ /* * caam - Freescale FSL CAAM support for hw_random @@ -29909,9 +39053,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/caamrng.c linux-4.1.10/drivers/c return hwrng_register(&caam_rng); } -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/compat.h linux-4.1.10/drivers/crypto/caam/compat.h ---- linux-4.1.10.orig/drivers/crypto/caam/compat.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/compat.h 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/compat.h xbian-sources-kernel/drivers/crypto/caam/compat.h +--- linux-4.1.10/drivers/crypto/caam/compat.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/compat.h 2015-10-11 19:49:27.655289498 +0200 @@ -14,6 +14,8 @@ #include <linux/hash.h> #include <linux/hw_random.h> @@ -29939,9 +39083,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/compat.h linux-4.1.10/drivers/cr #include <crypto/des.h> #include <crypto/sha.h> #include <crypto/md5.h> -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/ctrl.c linux-4.1.10/drivers/crypto/caam/ctrl.c ---- linux-4.1.10.orig/drivers/crypto/caam/ctrl.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/ctrl.c 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/ctrl.c xbian-sources-kernel/drivers/crypto/caam/ctrl.c +--- linux-4.1.10/drivers/crypto/caam/ctrl.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/ctrl.c 2015-10-11 19:49:27.655289498 +0200 @@ -1,405 +1,260 @@ -/* * CAAM control-plane driver backend +/* @@ -30919,9 +40063,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/ctrl.c linux-4.1.10/drivers/cryp .of_match_table = caam_match, }, .probe = caam_probe, -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/ctrl.h linux-4.1.10/drivers/crypto/caam/ctrl.h ---- linux-4.1.10.orig/drivers/crypto/caam/ctrl.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/ctrl.h 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/ctrl.h xbian-sources-kernel/drivers/crypto/caam/ctrl.h +--- linux-4.1.10/drivers/crypto/caam/ctrl.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/ctrl.h 2015-10-11 19:49:27.655289498 +0200 @@ -8,6 +8,6 @@ #define CTRL_H @@ -30930,9 +40074,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/ctrl.h linux-4.1.10/drivers/cryp +int caam_get_era(u64 caam_id); #endif /* CTRL_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/desc_constr.h linux-4.1.10/drivers/crypto/caam/desc_constr.h ---- linux-4.1.10.orig/drivers/crypto/caam/desc_constr.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/desc_constr.h 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/desc_constr.h xbian-sources-kernel/drivers/crypto/caam/desc_constr.h +--- linux-4.1.10/drivers/crypto/caam/desc_constr.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/desc_constr.h 2015-10-11 19:49:27.655289498 +0200 @@ -10,7 +10,6 @@ #define CAAM_CMD_SZ sizeof(u32) #define CAAM_PTR_SZ sizeof(dma_addr_t) @@ -31133,9 +40277,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/desc_constr.h linux-4.1.10/drive - APPEND_MATH_IMM_u64(LSHIFT, desc, dest, src0, src1, data) -#define append_math_rshift_imm_u64(desc, dest, src0, src1, data) \ - APPEND_MATH_IMM_u64(RSHIFT, desc, dest, src0, src1, data) -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/desc.h linux-4.1.10/drivers/crypto/caam/desc.h ---- linux-4.1.10.orig/drivers/crypto/caam/desc.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/desc.h 2015-10-10 16:41:42.221314836 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/desc.h xbian-sources-kernel/drivers/crypto/caam/desc.h +--- linux-4.1.10/drivers/crypto/caam/desc.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/desc.h 2015-10-11 19:49:27.655289498 +0200 @@ -2,19 +2,35 @@ * CAAM descriptor composition header * Definitions to support CAAM descriptor instruction generation @@ -31333,9 +40477,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/desc.h linux-4.1.10/drivers/cryp -#define FD_CMD_REPLACE_JOB_DESC 0x20000000 #endif /* DESC_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/error.c linux-4.1.10/drivers/crypto/caam/error.c ---- linux-4.1.10.orig/drivers/crypto/caam/error.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/error.c 2015-10-10 16:41:42.225314837 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/error.c xbian-sources-kernel/drivers/crypto/caam/error.c +--- linux-4.1.10/drivers/crypto/caam/error.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/error.c 2015-10-11 19:49:27.655289498 +0200 @@ -11,243 +11,264 @@ #include "jr.h" #include "error.h" @@ -31793,9 +40937,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/error.c linux-4.1.10/drivers/cry + return outstr; } EXPORT_SYMBOL(caam_jr_strstatus); -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/error.h linux-4.1.10/drivers/crypto/caam/error.h ---- linux-4.1.10.orig/drivers/crypto/caam/error.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/error.h 2015-10-10 16:41:42.225314837 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/error.h xbian-sources-kernel/drivers/crypto/caam/error.h +--- linux-4.1.10/drivers/crypto/caam/error.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/error.h 2015-10-11 19:49:27.655289498 +0200 @@ -7,5 +7,5 @@ #ifndef CAAM_ERROR_H #define CAAM_ERROR_H @@ -31803,9 +40947,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/error.h linux-4.1.10/drivers/cry -void caam_jr_strstatus(struct device *jrdev, u32 status); +extern char *caam_jr_strstatus(char *outstr, u32 status); #endif /* CAAM_ERROR_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/intern.h linux-4.1.10/drivers/crypto/caam/intern.h ---- linux-4.1.10.orig/drivers/crypto/caam/intern.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/intern.h 2015-10-10 16:41:42.245314837 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/intern.h xbian-sources-kernel/drivers/crypto/caam/intern.h +--- linux-4.1.10/drivers/crypto/caam/intern.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/intern.h 2015-10-11 19:49:27.655289498 +0200 @@ -2,13 +2,19 @@ * CAAM/SEC 4.x driver backend * Private/internal definitions between modules @@ -31903,9 +41047,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/intern.h linux-4.1.10/drivers/cr /* * debugfs entries for developer view into driver/device * variables at runtime. -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/jr.c linux-4.1.10/drivers/crypto/caam/jr.c ---- linux-4.1.10.orig/drivers/crypto/caam/jr.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/jr.c 2015-10-10 16:41:42.245314837 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/jr.c xbian-sources-kernel/drivers/crypto/caam/jr.c +--- linux-4.1.10/drivers/crypto/caam/jr.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/jr.c 2015-10-11 19:49:27.655289498 +0200 @@ -2,125 +2,15 @@ * CAAM/SEC 4.x transport/backend driver * JobR backend functionality @@ -32527,9 +41671,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/jr.c linux-4.1.10/drivers/crypto -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("FSL CAAM JR request backend"); -MODULE_AUTHOR("Freescale Semiconductor - NMG/STC"); -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/jr.h linux-4.1.10/drivers/crypto/caam/jr.h ---- linux-4.1.10.orig/drivers/crypto/caam/jr.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/jr.h 2015-10-10 16:41:42.245314837 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/jr.h xbian-sources-kernel/drivers/crypto/caam/jr.h +--- linux-4.1.10/drivers/crypto/caam/jr.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/jr.h 2015-10-11 19:49:27.655289498 +0200 @@ -1,18 +1,22 @@ /* * CAAM public-level include definitions for the JobR backend @@ -32556,9 +41700,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/jr.h linux-4.1.10/drivers/crypto +extern int caam_jr_shutdown(struct device *dev); +extern struct device *caam_get_jrdev(void); #endif /* JR_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/Kconfig linux-4.1.10/drivers/crypto/caam/Kconfig ---- linux-4.1.10.orig/drivers/crypto/caam/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/Kconfig 2015-10-10 16:41:42.245314837 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/Kconfig xbian-sources-kernel/drivers/crypto/caam/Kconfig +--- linux-4.1.10/drivers/crypto/caam/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/Kconfig 2015-10-11 19:49:27.655289498 +0200 @@ -1,32 +1,19 @@ config CRYPTO_DEV_FSL_CAAM tristate "Freescale CAAM-Multicore driver backend" @@ -32706,9 +41850,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/Kconfig linux-4.1.10/drivers/cry + will be called caam_keyblob. + + -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/key_gen.c linux-4.1.10/drivers/crypto/caam/key_gen.c ---- linux-4.1.10.orig/drivers/crypto/caam/key_gen.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/key_gen.c 2015-10-10 16:41:42.245314837 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/key_gen.c xbian-sources-kernel/drivers/crypto/caam/key_gen.c +--- linux-4.1.10/drivers/crypto/caam/key_gen.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/key_gen.c 2015-10-11 19:49:27.655289498 +0200 @@ -1,7 +1,7 @@ /* * CAAM/SEC 4.x functions for handling key-generation jobs @@ -32797,9 +41941,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/key_gen.c linux-4.1.10/drivers/c dma_unmap_single(jrdev, dma_addr_out, split_key_pad_len, DMA_FROM_DEVICE); out_unmap_in: -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/Makefile linux-4.1.10/drivers/crypto/caam/Makefile ---- linux-4.1.10.orig/drivers/crypto/caam/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/Makefile 2015-10-10 16:41:42.249314838 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/Makefile xbian-sources-kernel/drivers/crypto/caam/Makefile +--- linux-4.1.10/drivers/crypto/caam/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/Makefile 2015-10-11 19:49:27.655289498 +0200 @@ -1,15 +1,14 @@ # # Makefile for the CAAM backend and dependent components @@ -32821,9 +41965,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/Makefile linux-4.1.10/drivers/cr -caam-objs := ctrl.o -caam_jr-objs := jr.o key_gen.o error.o +caam-objs := ctrl.o jr.o error.o key_gen.o -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/pdb.h linux-4.1.10/drivers/crypto/caam/pdb.h ---- linux-4.1.10.orig/drivers/crypto/caam/pdb.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/pdb.h 2015-10-10 16:41:42.249314838 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/pdb.h xbian-sources-kernel/drivers/crypto/caam/pdb.h +--- linux-4.1.10/drivers/crypto/caam/pdb.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/pdb.h 2015-10-11 19:49:27.659289233 +0200 @@ -44,7 +44,6 @@ #define PDBOPTS_ESP_IPHDRSRC 0x08 /* IP header comes from PDB (encap) */ #define PDBOPTS_ESP_INCIPHDR 0x04 /* Prepend IP header to output frame */ @@ -32832,9 +41976,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/pdb.h linux-4.1.10/drivers/crypt #define PDBOPTS_ESP_TUNNEL 0x01 /* tunnel mode next-header byte */ #define PDBOPTS_ESP_IPV6 0x02 /* ip header version is V6 */ #define PDBOPTS_ESP_DIFFSERV 0x40 /* copy TOS/TC from inner iphdr */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/regs.h linux-4.1.10/drivers/crypto/caam/regs.h ---- linux-4.1.10.orig/drivers/crypto/caam/regs.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/regs.h 2015-10-10 16:41:42.249314838 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/regs.h xbian-sources-kernel/drivers/crypto/caam/regs.h +--- linux-4.1.10/drivers/crypto/caam/regs.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/regs.h 2015-10-11 19:49:27.659289233 +0200 @@ -1,7 +1,7 @@ /* * CAAM hardware register-level view @@ -33398,9 +42542,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/regs.h linux-4.1.10/drivers/cryp +}; + #endif /* REGS_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/secvio.c linux-4.1.10/drivers/crypto/caam/secvio.c ---- linux-4.1.10.orig/drivers/crypto/caam/secvio.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/secvio.c 2015-10-10 16:41:42.249314838 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/secvio.c xbian-sources-kernel/drivers/crypto/caam/secvio.c +--- linux-4.1.10/drivers/crypto/caam/secvio.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/secvio.c 2015-10-11 19:49:27.659289233 +0200 @@ -0,0 +1,290 @@ + +/* @@ -33692,9 +42836,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/secvio.c linux-4.1.10/drivers/cr +MODULE_DESCRIPTION("FSL SNVS Security Violation Handler"); +MODULE_AUTHOR("Freescale Semiconductor - MCU"); + -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/secvio.h linux-4.1.10/drivers/crypto/caam/secvio.h ---- linux-4.1.10.orig/drivers/crypto/caam/secvio.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/secvio.h 2015-10-10 16:41:42.253314839 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/secvio.h xbian-sources-kernel/drivers/crypto/caam/secvio.h +--- linux-4.1.10/drivers/crypto/caam/secvio.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/secvio.h 2015-10-11 19:49:27.659289233 +0200 @@ -0,0 +1,66 @@ + +/* @@ -33762,9 +42906,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/secvio.h linux-4.1.10/drivers/cr +}; + +#endif /* SECVIO_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sg_sw_sec4.h linux-4.1.10/drivers/crypto/caam/sg_sw_sec4.h ---- linux-4.1.10.orig/drivers/crypto/caam/sg_sw_sec4.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/crypto/caam/sg_sw_sec4.h 2015-10-10 16:41:42.253314839 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/sg_sw_sec4.h xbian-sources-kernel/drivers/crypto/caam/sg_sw_sec4.h +--- linux-4.1.10/drivers/crypto/caam/sg_sw_sec4.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/crypto/caam/sg_sw_sec4.h 2015-10-11 19:49:27.659289233 +0200 @@ -1,7 +1,7 @@ /* * CAAM/SEC 4.x functions for using scatterlists in caam driver @@ -33851,9 +42995,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sg_sw_sec4.h linux-4.1.10/driver + if (end - sg_index) + sg_copy(dest + cpy_index, current_sg, end - sg_index); +} -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sm.h linux-4.1.10/drivers/crypto/caam/sm.h ---- linux-4.1.10.orig/drivers/crypto/caam/sm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/sm.h 2015-10-10 16:41:42.253314839 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/sm.h xbian-sources-kernel/drivers/crypto/caam/sm.h +--- linux-4.1.10/drivers/crypto/caam/sm.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/sm.h 2015-10-11 19:49:27.659289233 +0200 @@ -0,0 +1,88 @@ + +/* @@ -33943,9 +43087,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sm.h linux-4.1.10/drivers/crypto +}; + +#endif /* SM_H */ -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sm_store.c linux-4.1.10/drivers/crypto/caam/sm_store.c ---- linux-4.1.10.orig/drivers/crypto/caam/sm_store.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/sm_store.c 2015-10-10 16:41:42.253314839 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/sm_store.c xbian-sources-kernel/drivers/crypto/caam/sm_store.c +--- linux-4.1.10/drivers/crypto/caam/sm_store.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/sm_store.c 2015-10-11 19:49:27.659289233 +0200 @@ -0,0 +1,896 @@ + +/* @@ -34843,9 +43987,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sm_store.c linux-4.1.10/drivers/ +MODULE_DESCRIPTION("FSL CAAM Secure Memory / Keystore"); +MODULE_AUTHOR("Freescale Semiconductor - NMSG/MAD"); +#endif -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sm_test.c linux-4.1.10/drivers/crypto/caam/sm_test.c ---- linux-4.1.10.orig/drivers/crypto/caam/sm_test.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/sm_test.c 2015-10-10 16:41:42.257314838 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/sm_test.c xbian-sources-kernel/drivers/crypto/caam/sm_test.c +--- linux-4.1.10/drivers/crypto/caam/sm_test.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/sm_test.c 2015-10-11 19:49:27.659289233 +0200 @@ -0,0 +1,844 @@ +/* + * Secure Memory / Keystore Exemplification Module @@ -35691,9 +44835,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/sm_test.c linux-4.1.10/drivers/c +MODULE_DESCRIPTION("FSL CAAM Keystore Usage Example"); +MODULE_AUTHOR("Freescale Semiconductor - NMSG/MAD"); +#endif -diff -Nur linux-4.1.10.orig/drivers/crypto/caam/snvsregs.h linux-4.1.10/drivers/crypto/caam/snvsregs.h ---- linux-4.1.10.orig/drivers/crypto/caam/snvsregs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/crypto/caam/snvsregs.h 2015-10-10 16:41:42.257314838 +0200 +diff -Nur linux-4.1.10/drivers/crypto/caam/snvsregs.h xbian-sources-kernel/drivers/crypto/caam/snvsregs.h +--- linux-4.1.10/drivers/crypto/caam/snvsregs.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/crypto/caam/snvsregs.h 2015-10-11 19:49:27.659289233 +0200 @@ -0,0 +1,237 @@ +/* + * SNVS hardware register-level view @@ -35932,9 +45076,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/snvsregs.h linux-4.1.10/drivers/ +}; + +#endif /* SNVSREGS_H */ -diff -Nur linux-4.1.10.orig/drivers/dma/imx-sdma.c linux-4.1.10/drivers/dma/imx-sdma.c ---- linux-4.1.10.orig/drivers/dma/imx-sdma.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/dma/imx-sdma.c 2015-10-10 16:41:42.257314838 +0200 +diff -Nur linux-4.1.10/drivers/dma/imx-sdma.c xbian-sources-kernel/drivers/dma/imx-sdma.c +--- linux-4.1.10/drivers/dma/imx-sdma.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/dma/imx-sdma.c 2015-10-11 19:49:27.679287908 +0200 @@ -29,6 +29,7 @@ #include <linux/semaphore.h> #include <linux/spinlock.h> @@ -36576,18 +45720,18 @@ diff -Nur linux-4.1.10.orig/drivers/dma/imx-sdma.c linux-4.1.10/drivers/dma/imx- MODULE_AUTHOR("Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>"); MODULE_DESCRIPTION("i.MX SDMA driver"); -diff -Nur linux-4.1.10.orig/drivers/gpu/drm/Kconfig linux-4.1.10/drivers/gpu/drm/Kconfig ---- linux-4.1.10.orig/drivers/gpu/drm/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/gpu/drm/Kconfig 2015-10-10 16:41:42.257314838 +0200 +diff -Nur linux-4.1.10/drivers/gpu/drm/Kconfig xbian-sources-kernel/drivers/gpu/drm/Kconfig +--- linux-4.1.10/drivers/gpu/drm/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/gpu/drm/Kconfig 2015-10-11 19:49:27.755282870 +0200 @@ -217,3 +217,5 @@ source "drivers/gpu/drm/amd/amdkfd/Kconfig" source "drivers/gpu/drm/imx/Kconfig" + +source "drivers/gpu/drm/vivante/Kconfig" -diff -Nur linux-4.1.10.orig/drivers/gpu/drm/Makefile linux-4.1.10/drivers/gpu/drm/Makefile ---- linux-4.1.10.orig/drivers/gpu/drm/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/gpu/drm/Makefile 2015-10-10 16:41:42.257314838 +0200 +diff -Nur linux-4.1.10/drivers/gpu/drm/Makefile xbian-sources-kernel/drivers/gpu/drm/Makefile +--- linux-4.1.10/drivers/gpu/drm/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/gpu/drm/Makefile 2015-10-11 19:49:27.755282870 +0200 @@ -67,6 +67,7 @@ obj-$(CONFIG_DRM_TEGRA) += tegra/ obj-$(CONFIG_DRM_STI) += sti/ @@ -36596,9 +45740,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/drm/Makefile linux-4.1.10/drivers/gpu/dr obj-y += i2c/ obj-y += panel/ obj-y += bridge/ -diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/Kconfig linux-4.1.10/drivers/gpu/drm/vivante/Kconfig ---- linux-4.1.10.orig/drivers/gpu/drm/vivante/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/drm/vivante/Kconfig 2015-10-10 16:41:42.257314838 +0200 +diff -Nur linux-4.1.10/drivers/gpu/drm/vivante/Kconfig xbian-sources-kernel/drivers/gpu/drm/vivante/Kconfig +--- linux-4.1.10/drivers/gpu/drm/vivante/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/drm/vivante/Kconfig 2015-10-11 19:49:27.959269349 +0200 @@ -0,0 +1,6 @@ +config DRM_VIVANTE + tristate "Vivante GCCore" @@ -36606,9 +45750,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/Kconfig linux-4.1.10/drivers + help + Choose this option if you have a Vivante graphics card. + If M is selected, the module will be called vivante. -diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/Makefile linux-4.1.10/drivers/gpu/drm/vivante/Makefile ---- linux-4.1.10.orig/drivers/gpu/drm/vivante/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/drm/vivante/Makefile 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/drm/vivante/Makefile xbian-sources-kernel/drivers/gpu/drm/vivante/Makefile +--- linux-4.1.10/drivers/gpu/drm/vivante/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/drm/vivante/Makefile 2015-10-11 19:49:27.959269349 +0200 @@ -0,0 +1,29 @@ +############################################################################## +# @@ -36639,9 +45783,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/Makefile linux-4.1.10/driver +vivante-y := vivante_drv.o + +obj-$(CONFIG_DRM_VIVANTE) += vivante.o -diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/vivante_drv.c linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.c ---- linux-4.1.10.orig/drivers/gpu/drm/vivante/vivante_drv.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.c 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.c xbian-sources-kernel/drivers/gpu/drm/vivante/vivante_drv.c +--- linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/drm/vivante/vivante_drv.c 2015-10-11 19:49:27.959269349 +0200 @@ -0,0 +1,112 @@ +/**************************************************************************** +* @@ -36755,9 +45899,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/vivante_drv.c linux-4.1.10/d +MODULE_AUTHOR(DRIVER_AUTHOR); +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_LICENSE("GPL and additional rights"); -diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/vivante_drv.h linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.h ---- linux-4.1.10.orig/drivers/gpu/drm/vivante/vivante_drv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.h 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.h xbian-sources-kernel/drivers/gpu/drm/vivante/vivante_drv.h +--- linux-4.1.10/drivers/gpu/drm/vivante/vivante_drv.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/drm/vivante/vivante_drv.h 2015-10-11 19:49:27.959269349 +0200 @@ -0,0 +1,69 @@ +/**************************************************************************** +* @@ -36828,9 +45972,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/drm/vivante/vivante_drv.h linux-4.1.10/d +#define DRIVER_PATCHLEVEL 0 + +#endif -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h linux-4.1.10/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h ---- linux-4.1.10.orig/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h xbian-sources-kernel/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h +--- linux-4.1.10/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/allocator/default/gc_hal_kernel_allocator_array.h 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,34 @@ +/**************************************************************************** +* @@ -36866,9 +46010,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/allocator/default/gc_hal_kernel_ +}; + + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h ---- linux-4.1.10.orig/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h xbian-sources-kernel/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h +--- linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_array.h 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,45 @@ +/**************************************************************************** +* @@ -36915,9 +46059,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/allocator/freescale/gc_hal_kerne +}; + + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c ---- linux-4.1.10.orig/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c xbian-sources-kernel/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c +--- linux-4.1.10/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/allocator/freescale/gc_hal_kernel_allocator_cma.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,386 @@ +/**************************************************************************** +* @@ -37305,9 +46449,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/allocator/freescale/gc_hal_kerne + return status; +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_context.c linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.c ---- linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_context.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.c 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.c xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_context.c +--- linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_context.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,2252 @@ +/**************************************************************************** +* @@ -39561,9 +48705,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_context.c lin + return status; +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_context.h linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.h ---- linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_context.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.h 2015-10-10 16:41:42.281314835 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.h xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_context.h +--- linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_context.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_context.h 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,178 @@ +/**************************************************************************** +* @@ -39743,9 +48887,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_context.h lin + +#endif /* __gc_hal_kernel_context_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c ---- linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c 2015-10-10 16:41:42.293314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c +--- linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,7719 @@ +/**************************************************************************** +* @@ -47466,9 +56610,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.c li +} + + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h ---- linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h 2015-10-10 16:41:42.293314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h +--- linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,160 @@ +/**************************************************************************** +* @@ -47630,9 +56774,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_hardware.h li + +#endif /* __gc_hal_kernel_hardware_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c ---- linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c 2015-10-10 16:41:42.293314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c +--- linux-4.1.10/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,679 @@ +/**************************************************************************** +* @@ -48313,9 +57457,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/arch/gc_hal_kernel_recorder.c li +} + + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c ---- linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c 2015-10-10 16:41:42.293314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c +--- linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,932 @@ +/**************************************************************************** +* @@ -49249,9 +58393,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_co + +#endif /* gcdENABLE_VG */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h ---- linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h 2015-10-10 16:41:42.293314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h +--- linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_command_vg.h 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,319 @@ +/**************************************************************************** +* @@ -49572,9 +58716,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_co + +#endif /* __gc_hal_kernel_hardware_command_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c ---- linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c 2015-10-10 16:41:42.297314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c +--- linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,2119 @@ +/**************************************************************************** +* @@ -51695,9 +60839,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg +} +#endif /* gcdENABLE_VG */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h ---- linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h 2015-10-10 16:41:42.297314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h +--- linux-4.1.10/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg.h 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,74 @@ +/**************************************************************************** +* @@ -51773,9 +60917,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/archvg/gc_hal_kernel_hardware_vg + +#endif /* __gc_hal_kernel_hardware_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/config linux-4.1.10/drivers/gpu/galcore/config ---- linux-4.1.10.orig/drivers/gpu/galcore/config 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/config 2015-10-10 16:41:42.297314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/config xbian-sources-kernel/drivers/gpu/galcore/config +--- linux-4.1.10/drivers/gpu/galcore/config 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/config 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,35 @@ +############################################################################## +# @@ -51812,9 +60956,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/config linux-4.1.10/drivers/gpu/ +BANK_CHANNEL_BIT ?= 12 +PLATFORM ?= freescale/gc_hal_kernel_platform_imx6q14 +DEBUG ?= 0 -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_allocator.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_allocator.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.c 2015-10-10 16:41:42.297314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_allocator.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_allocator.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,884 @@ +/**************************************************************************** +* @@ -52700,9 +61844,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_allocator.c linux- + return gcvSTATUS_OK; +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_allocator.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_allocator.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.h 2015-10-10 16:41:42.297314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_allocator.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_allocator.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_allocator.h 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,400 @@ +/**************************************************************************** +* @@ -53104,9 +62248,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_allocator.h linux- + +*/ +#endif -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.c 2015-10-10 16:41:42.297314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel.c 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,4244 @@ +/**************************************************************************** +* @@ -57352,9 +66496,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel.c linux-4.1.10/dri +***** Test Code **************************************************************** +*******************************************************************************/ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_command.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_command.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command.c 2015-10-10 16:41:42.301314840 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_command.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_command.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,3075 @@ +/**************************************************************************** +* @@ -60431,9 +69575,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_command.c linux-4. + *In = in; + return gcvSTATUS_OK; +} -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_command_vg.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command_vg.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_command_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command_vg.c 2015-10-10 16:41:42.469314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command_vg.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_command_vg.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_command_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_command_vg.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,3678 @@ +/**************************************************************************** +* @@ -64113,9 +73257,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_command_vg.c linux +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_db.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_db.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_db.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_db.c 2015-10-10 16:41:42.473314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_db.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_db.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_db.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_db.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,1758 @@ +/**************************************************************************** +* @@ -65875,9 +75019,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_db.c linux-4.1.10/ + gcmkFOOTER(); + return status; +} -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debug.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debug.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.c 2015-10-10 16:41:42.473314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debug.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debug.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,2766 @@ +/**************************************************************************** +* @@ -68645,9 +77789,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debug.c linux-4.1. + gckOS_WriteToRingBuffer(buffer, (gctUINT32)(payload - buffer)); +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debugfs.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debugfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.c 2015-10-10 16:41:42.473314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debugfs.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debugfs.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,1137 @@ +/**************************************************************************** +* @@ -69786,9 +78930,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debugfs.c linux-4. + gcmkDEBUGFS_PRINT ( _GetArgumentSize ( Message ) , Message ) ; + return _debugfs_res; +} -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debugfs.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debugfs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.h 2015-10-10 16:41:42.473314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debugfs.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debugfs.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debugfs.h 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,135 @@ +/**************************************************************************** +* @@ -69925,9 +79069,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debugfs.h linux-4. +#endif + + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debug.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.h 2015-10-10 16:41:42.473314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debug.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_debug.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_debug.h 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,103 @@ +/**************************************************************************** +* @@ -70032,9 +79176,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_debug.h linux-4.1. +#endif + +#endif /* __gc_hal_kernel_debug_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_device.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_device.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.c 2015-10-10 16:41:42.477314843 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_device.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_device.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,1938 @@ +/**************************************************************************** +* @@ -71974,9 +81118,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_device.c linux-4.1 + gcmkFOOTER(); + return status; +} -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_device.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_device.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.h 2015-10-10 16:41:42.477314843 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_device.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_device.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_device.h 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,185 @@ +/**************************************************************************** +* @@ -72163,9 +81307,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_device.h linux-4.1 + ); + +#endif /* __gc_hal_kernel_device_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_event.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_event.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_event.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_event.c 2015-10-10 16:41:42.477314843 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_event.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_event.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_event.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_event.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,2859 @@ +/**************************************************************************** +* @@ -75026,9 +84170,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_event.c linux-4.1. + return gcvSTATUS_OK; +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.h 2015-10-10 16:41:42.477314843 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel.h 2015-10-11 19:49:27.967268819 +0200 @@ -0,0 +1,1353 @@ +/**************************************************************************** +* @@ -76383,9 +85527,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel.h linux-4.1.10/dri +#endif + +#endif /* __gc_hal_kernel_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c 2015-10-10 16:41:42.477314843 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,858 @@ +/**************************************************************************** +* @@ -77245,9 +86389,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_interrupt_vg.c lin +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_iommu.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_iommu.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_iommu.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_iommu.c 2015-10-10 16:41:42.477314843 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_iommu.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_iommu.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_iommu.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_iommu.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,202 @@ +/**************************************************************************** +* @@ -77451,9 +86595,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_iommu.c linux-4.1. + return gcvSTATUS_OK; +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_linux.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_linux.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.c 2015-10-10 16:41:42.477314843 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_linux.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_linux.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,487 @@ +/**************************************************************************** +* @@ -77942,9 +87086,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_linux.c linux-4.1. + gcmkFOOTER_ARG("Settings->signal=%d", Settings->signal); + return gcvSTATUS_OK; +} -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_linux.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_linux.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.h 2015-10-10 16:41:42.481314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_linux.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_linux.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_linux.h 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,364 @@ +/**************************************************************************** +* @@ -78310,9 +87454,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_linux.h linux-4.1. +#endif + +#endif /* __gc_hal_kernel_linux_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_math.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_math.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_math.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_math.c 2015-10-10 16:41:42.481314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_math.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_math.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_math.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_math.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,32 @@ +/**************************************************************************** +* @@ -78346,9 +87490,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_math.c linux-4.1.1 + if(Y ==0) {return 0;} + else {return X % Y;} +} -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_mmu.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_mmu.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu.c 2015-10-10 16:41:42.481314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_mmu.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_mmu.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,2260 @@ +/**************************************************************************** +* @@ -80610,9 +89754,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_mmu.c linux-4.1.10 +****************************** T E S T C O D E ****************************** +******************************************************************************/ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c 2015-10-10 16:41:42.481314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c 2015-10-11 19:49:27.971268553 +0200 @@ -0,0 +1,522 @@ +/**************************************************************************** +* @@ -81136,9 +90280,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_mmu_vg.c linux-4.1 +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_os.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_os.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.c 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_os.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_os.c 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,8062 @@ +/**************************************************************************** +* @@ -89202,9 +98346,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_os.c linux-4.1.10/ + + return gcvSTATUS_OK; +} -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_os.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_os.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.h 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_os.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_os.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_os.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,88 @@ +/**************************************************************************** +* @@ -89294,9 +98438,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_os.h linux-4.1.10/ +DRIVER_ARGS; + +#endif /* __gc_hal_kernel_os_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_platform.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_platform.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_platform.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_platform.h 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_platform.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_platform.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_platform.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_platform.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,270 @@ +/**************************************************************************** +* @@ -89568,9 +98712,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_platform.h linux-4 + ); + +#endif -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_power.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_power.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_power.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_power.c 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_power.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_power.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_power.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_power.c 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,347 @@ +/**************************************************************************** +* @@ -89919,9 +99063,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_power.c linux-4.1. + return gcvSTATUS_OK; +} +#endif -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_precomp.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_precomp.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_precomp.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_precomp.h 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_precomp.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_precomp.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_precomp.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_precomp.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,29 @@ +/**************************************************************************** +* @@ -89952,9 +99096,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_precomp.h linux-4. +#include "gc_hal_kernel.h" + +#endif /* __gc_hal_kernel_precomp_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_probe.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_probe.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_probe.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_probe.c 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_probe.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_probe.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_probe.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_probe.c 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,1252 @@ +/**************************************************************************** +* @@ -91208,9 +100352,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_probe.c linux-4.1. + +module_init(gpu_init); +module_exit(gpu_exit); -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_sync.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_sync.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.c 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_sync.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_sync.c 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,177 @@ +/**************************************************************************** +* @@ -91389,9 +100533,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_sync.c linux-4.1.1 +} + +#endif -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_sync.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_sync.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.h 2015-10-10 16:41:42.485314845 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_sync.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_sync.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_sync.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,72 @@ +/**************************************************************************** +* @@ -91465,9 +100609,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_sync.h linux-4.1.1 + ); + +#endif /* __gc_hal_kernel_sync_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_vg.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.c 2015-10-10 16:41:42.489314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_vg.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_vg.c 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,831 @@ +/**************************************************************************** +* @@ -92300,9 +101444,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_vg.c linux-4.1.10/ +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_vg.h linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.h ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.h 2015-10-10 16:41:42.489314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.h xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_vg.h +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_vg.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,85 @@ +/**************************************************************************** +* @@ -92389,9 +101533,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_vg.h linux-4.1.10/ +}; + +#endif /* __gc_hal_kernel_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_video_memory.c linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_video_memory.c ---- linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_video_memory.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_video_memory.c 2015-10-10 16:41:42.489314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_video_memory.c xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_video_memory.c +--- linux-4.1.10/drivers/gpu/galcore/gc_hal_kernel_video_memory.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/gc_hal_kernel_video_memory.c 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,2734 @@ +/**************************************************************************** +* @@ -95127,14 +104271,14 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/gc_hal_kernel_video_memory.c lin + return status; +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/aqHal.h linux-4.1.10/drivers/gpu/galcore/inc/aqHal.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/aqHal.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/aqHal.h 2015-10-10 16:41:42.489314844 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/aqHal.h xbian-sources-kernel/drivers/gpu/galcore/inc/aqHal.h +--- linux-4.1.10/drivers/gpu/galcore/inc/aqHal.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/aqHal.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1 @@ +#include "HAL/gc_hal.h" -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_base.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_base.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_base.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_base.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_base.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_base.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_base.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_base.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,5538 @@ +/**************************************************************************** +* @@ -100674,9 +109818,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_base.h linux-4.1.10/d +#endif + +#endif /* __gc_hal_base_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_driver.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_driver.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_driver.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_driver.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,1064 @@ +/**************************************************************************** +* @@ -101742,9 +110886,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_driver.h linux-4.1.10 +#endif + +#endif /* __gc_hal_driver_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_driver_vg.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver_vg.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_driver_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver_vg.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver_vg.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_driver_vg.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_driver_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_driver_vg.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,265 @@ +/**************************************************************************** +* @@ -102011,9 +111155,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_driver_vg.h linux-4.1 +#endif + +#endif /* __gc_hal_driver_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_dump.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_dump.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_dump.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_dump.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_dump.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_dump.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_dump.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_dump.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,89 @@ +/**************************************************************************** +* @@ -102104,9 +111248,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_dump.h linux-4.1.10/d + +#endif /* __gc_hal_dump_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_eglplatform.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_eglplatform.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_eglplatform.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_eglplatform.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,651 @@ +/**************************************************************************** +* @@ -102759,9 +111903,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_eglplatform.h linux-4 + +#endif /* __gc_hal_eglplatform_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,280 @@ +/**************************************************************************** +* @@ -103043,9 +112187,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_eglplatform_type.h li +#endif + +#endif /* __gc_hal_eglplatform_type_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_engine.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_engine.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_engine.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_engine.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,2587 @@ +/**************************************************************************** +* @@ -105634,9 +114778,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_engine.h linux-4.1.10 + +#endif /* gcdENABLE_3D */ +#endif /* __gc_hal_engine_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_engine_vg.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine_vg.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_engine_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine_vg.h 2015-10-10 16:41:42.493314842 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine_vg.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_engine_vg.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_engine_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_engine_vg.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,1215 @@ +/**************************************************************************** +* @@ -106853,9 +115997,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_engine_vg.h linux-4.1 +#endif + +#endif /* __gc_hal_vg_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_enum.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_enum.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_enum.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_enum.h 2015-10-10 16:41:42.497314840 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_enum.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_enum.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_enum.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_enum.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,1605 @@ +/**************************************************************************** +* @@ -108462,9 +117606,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_enum.h linux-4.1.10/d +#endif + +#endif /* __gc_hal_enum_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal.h 2015-10-10 16:41:42.497314840 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal.h 2015-10-11 19:49:27.975268288 +0200 @@ -0,0 +1,2677 @@ +/**************************************************************************** +* @@ -111143,9 +120287,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal.h linux-4.1.10/driver +#endif + +#endif /* __gc_hal_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h 2015-10-10 16:41:42.497314840 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,218 @@ +/**************************************************************************** +* @@ -111365,9 +120509,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_kernel_buffer.h linux +#endif + +#endif /* __gc_hal_kernel_buffer_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_mem.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_mem.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_mem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_mem.h 2015-10-10 16:41:42.497314840 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_mem.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_mem.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_mem.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_mem.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,530 @@ +/**************************************************************************** +* @@ -111899,9 +121043,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_mem.h linux-4.1.10/dr + +#endif /* (gcdENABLE_3D || gcdENABLE_VG) */ +#endif /* __gc_hal_mem_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_options.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_options.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_options.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_options.h 2015-10-10 16:41:42.497314840 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_options.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_options.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_options.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_options.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,1194 @@ +/**************************************************************************** +* @@ -113097,9 +122241,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_options.h linux-4.1.1 +#endif + +#endif /* __gc_hal_options_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_profiler.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_profiler.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_profiler.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_profiler.h 2015-10-10 16:41:42.497314840 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_profiler.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_profiler.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_profiler.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_profiler.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,585 @@ +/**************************************************************************** +* @@ -113686,9 +122830,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_profiler.h linux-4.1. +#endif + +#endif /* __gc_hal_profiler_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_raster.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_raster.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_raster.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_raster.h 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_raster.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_raster.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_raster.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_raster.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,1038 @@ +/**************************************************************************** +* @@ -114728,9 +123872,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_raster.h linux-4.1.10 +#endif + +#endif /* __gc_hal_raster_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_rename.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_rename.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_rename.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_rename.h 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_rename.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_rename.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_rename.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_rename.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,243 @@ +/**************************************************************************** +* @@ -114975,9 +124119,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_rename.h linux-4.1.10 +#endif + +#endif /* __gc_hal_rename_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_statistics.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_statistics.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_statistics.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_statistics.h 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_statistics.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_statistics.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_statistics.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_statistics.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,99 @@ +/**************************************************************************** +* @@ -115078,9 +124222,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_statistics.h linux-4. + +#endif /*__gc_hal_statistics_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_types.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_types.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_types.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_types.h 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_types.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_types.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_types.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_types.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,911 @@ +/**************************************************************************** +* @@ -115993,9 +125137,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_types.h linux-4.1.10/ +#endif + +#endif /* __gc_hal_types_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_version.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_version.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_version.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_version.h 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_version.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_version.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_version.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_version.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,39 @@ +/**************************************************************************** +* @@ -116036,9 +125180,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_version.h linux-4.1.1 +#define gcvVERSION_TIME __TIME__ + +#endif /* __gc_hal_version_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_vg.h linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_vg.h ---- linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_vg.h 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_vg.h xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_vg.h +--- linux-4.1.10/drivers/gpu/galcore/inc/gc_hal_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/inc/gc_hal_vg.h 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,863 @@ +/**************************************************************************** +* @@ -116903,9 +126047,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/inc/gc_hal_vg.h linux-4.1.10/dri +#endif + +#endif /* __gc_hal_h_ */ -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/Kbuild linux-4.1.10/drivers/gpu/galcore/Kbuild ---- linux-4.1.10.orig/drivers/gpu/galcore/Kbuild 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/Kbuild 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/Kbuild xbian-sources-kernel/drivers/gpu/galcore/Kbuild +--- linux-4.1.10/drivers/gpu/galcore/Kbuild 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/Kbuild 2015-10-11 19:49:27.963269084 +0200 @@ -0,0 +1,233 @@ +############################################################################## +# @@ -117140,9 +126284,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/Kbuild linux-4.1.10/drivers/gpu/ +galcore-objs := $(OBJS) + +endif -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c ---- linux-4.1.10.orig/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c xbian-sources-kernel/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c +--- linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.c 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,693 @@ +/**************************************************************************** +* @@ -117837,9 +126981,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/platform/freescale/gc_hal_kernel + *Operations = &platformOperations; +} + -diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config ---- linux-4.1.10.orig/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config xbian-sources-kernel/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config +--- linux-4.1.10/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/gpu/galcore/platform/freescale/gc_hal_kernel_platform_imx6q14.config 2015-10-11 19:49:27.979268023 +0200 @@ -0,0 +1,15 @@ +EXTRA_CFLAGS += -DgcdDEFAULT_CONTIGUOUS_SIZE=134217728 + @@ -117856,9 +127000,9 @@ diff -Nur linux-4.1.10.orig/drivers/gpu/galcore/platform/freescale/gc_hal_kernel +EXTRA_CFLAGS += -DLINUX_CMA_FSL=1 +ALLOCATOR_ARRAY_H_LOCATION := $(OS_KERNEL_DIR)/allocator/freescale +CUSTOMER_ALLOCATOR_OBJS := $(ALLOCATOR_ARRAY_H_LOCATION)/gc_hal_kernel_allocator_cma.o -diff -Nur linux-4.1.10.orig/drivers/Kconfig linux-4.1.10/drivers/Kconfig ---- linux-4.1.10.orig/drivers/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/Kconfig 2015-10-10 16:41:42.501314841 +0200 +diff -Nur linux-4.1.10/drivers/Kconfig xbian-sources-kernel/drivers/Kconfig +--- linux-4.1.10/drivers/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/Kconfig 2015-10-11 19:49:27.343310178 +0200 @@ -182,4 +182,6 @@ source "drivers/android/Kconfig" @@ -117866,17 +127010,1620 @@ diff -Nur linux-4.1.10.orig/drivers/Kconfig linux-4.1.10/drivers/Kconfig +source "drivers/mxc/Kconfig" + endmenu -diff -Nur linux-4.1.10.orig/drivers/Makefile linux-4.1.10/drivers/Makefile ---- linux-4.1.10.orig/drivers/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/Makefile 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/Makefile xbian-sources-kernel/drivers/Makefile +--- linux-4.1.10/drivers/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/Makefile 2015-10-11 19:49:27.343310178 +0200 @@ -165,3 +165,4 @@ obj-$(CONFIG_THUNDERBOLT) += thunderbolt/ obj-$(CONFIG_CORESIGHT) += hwtracing/coresight/ obj-$(CONFIG_ANDROID) += android/ +obj-y += mxc/ -diff -Nur linux-4.1.10.orig/drivers/media/platform/Kconfig linux-4.1.10/drivers/media/platform/Kconfig ---- linux-4.1.10.orig/drivers/media/platform/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/media/platform/Kconfig 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/pci/Kconfig xbian-sources-kernel/drivers/media/pci/Kconfig +--- linux-4.1.10/drivers/media/pci/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/pci/Kconfig 2015-10-11 19:49:28.419238859 +0200 +@@ -12,6 +12,7 @@ + comment "Media capture support" + source "drivers/media/pci/meye/Kconfig" + source "drivers/media/pci/sta2x11/Kconfig" ++source "drivers/media/pci/tw6869/Kconfig" + endif + + if MEDIA_ANALOG_TV_SUPPORT +diff -Nur linux-4.1.10/drivers/media/pci/Makefile xbian-sources-kernel/drivers/media/pci/Makefile +--- linux-4.1.10/drivers/media/pci/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/pci/Makefile 2015-10-11 19:49:28.419238859 +0200 +@@ -27,3 +27,4 @@ + obj-$(CONFIG_VIDEO_MEYE) += meye/ + obj-$(CONFIG_STA2X11_VIP) += sta2x11/ + obj-$(CONFIG_VIDEO_SOLO6X10) += solo6x10/ ++obj-$(CONFIG_VIDEO_TW6869) += tw6869/ +diff -Nur linux-4.1.10/drivers/media/pci/tw6869/Kconfig xbian-sources-kernel/drivers/media/pci/tw6869/Kconfig +--- linux-4.1.10/drivers/media/pci/tw6869/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/pci/tw6869/Kconfig 2015-10-11 19:49:28.467235678 +0200 +@@ -0,0 +1,9 @@ ++config VIDEO_TW6869 ++ tristate "Techwell tw6869 Video For Linux" ++ depends on VIDEO_DEV && PCI && VIDEO_V4L2 ++ select VIDEOBUF2_DMA_CONTIG ++ ---help--- ++ Support for Techwell tw6869 based frame grabber boards. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called tw6869. +diff -Nur linux-4.1.10/drivers/media/pci/tw6869/Makefile xbian-sources-kernel/drivers/media/pci/tw6869/Makefile +--- linux-4.1.10/drivers/media/pci/tw6869/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/pci/tw6869/Makefile 2015-10-11 19:49:28.467235678 +0200 +@@ -0,0 +1 @@ ++obj-$(CONFIG_VIDEO_TW6869) += tw6869.o +diff -Nur linux-4.1.10/drivers/media/pci/tw6869/tw6869.c xbian-sources-kernel/drivers/media/pci/tw6869/tw6869.c +--- linux-4.1.10/drivers/media/pci/tw6869/tw6869.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/pci/tw6869/tw6869.c 2015-10-11 19:49:28.467235678 +0200 +@@ -0,0 +1,1439 @@ ++/* ++ * Copyright 2015 www.starterkit.ru <info@starterkit.ru> ++ * ++ * Based on: ++ * Driver for Intersil|Techwell TW6869 based DVR cards ++ * (c) 2011-12 liran <jli11@intersil.com> [Intersil|Techwell China] ++ * ++ * V4L2 PCI Skeleton Driver ++ * Copyright 2014 Cisco Systems, Inc. and/or its affiliates. ++ * All rights reserved. ++ * ++ * This program is free software; you may redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; version 2 of the License. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#include <linux/types.h> ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/init.h> ++#include <linux/kmod.h> ++#include <linux/mutex.h> ++#include <linux/pci.h> ++#include <linux/interrupt.h> ++#include <linux/delay.h> ++#include <linux/videodev2.h> ++ ++#include <media/v4l2-device.h> ++#include <media/v4l2-dev.h> ++#include <media/v4l2-ioctl.h> ++#include <media/v4l2-ctrls.h> ++#include <media/v4l2-event.h> ++#include <media/videobuf2-dma-contig.h> ++ ++#include <sound/core.h> ++#include <sound/initval.h> ++#include <sound/pcm.h> ++#include <sound/control.h> ++ ++#include "tw6869.h" ++ ++MODULE_DESCRIPTION("tw6869/65 media bridge driver"); ++MODULE_AUTHOR("starterkit <info@starterkit.ru>"); ++MODULE_LICENSE("GPL"); ++MODULE_VERSION("0.3.2"); ++ ++static const struct pci_device_id tw6869_pci_tbl[] = { ++ {PCI_DEVICE(PCI_VENDOR_ID_TECHWELL, PCI_DEVICE_ID_6869)}, ++ { 0, } ++}; ++ ++struct tw6869_buf { ++ struct vb2_buffer vb; ++ struct list_head list; ++ dma_addr_t dma; ++}; ++ ++/** ++ * struct tw6869_vch - instance of one video channel ++ * @dev: parent device ++ * @vdev: video channel (v4l2 video device) ++ * @id: DMA id (0...7) ++ * @p_buf: DMA P-buffer ++ * @b_buf: DMA B-buffer ++ * @pb: P-buffer | B-buffer ping-pong state ++ * @mlock: the main serialization lock ++ * @queue: queue maintained by videobuf2 layer ++ * @buf_list: list of buffer in use ++ * @lock: spinlock controlling access to channel ++ * @hdl: handler for control framework ++ * @format: pixel format ++ * @std: video standard (e.g. PAL/NTSC) ++ * @input: input line for video signal ++ * @sequence: sequence number of acquired buffer ++ * @dcount: number of dropped frames ++ * @fps: current frame rate ++ */ ++struct tw6869_vch { ++ struct tw6869_dev *dev; ++ struct video_device vdev; ++ ++ unsigned int id; ++ struct tw6869_buf *p_buf; ++ struct tw6869_buf *b_buf; ++ unsigned int pb; ++ ++ struct mutex mlock; ++ struct vb2_queue queue; ++ struct list_head buf_list; ++ spinlock_t lock; ++ ++ struct v4l2_ctrl_handler hdl; ++ struct v4l2_pix_format format; ++ v4l2_std_id std; ++ unsigned int input; ++ ++ unsigned int sequence; ++ unsigned int dcount; ++ unsigned int fps; ++}; ++ ++/** ++ * struct tw6869_ach - instance of one audio channel ++ * @dev: parent device ++ * @ss: audio channel (pcm substream) ++ * @id: DMA id (8...15) ++ * @p_buf: DMA P-buffer ++ * @b_buf: DMA B-buffer ++ * @pb: P-buffer | B-buffer ping-pong state ++ * @buf: split an contiguous buffer into chunks ++ * @buf_list: chunk list ++ * @lock: spinlock controlling access to channel ++ * @ptr: PCM buffer pointer ++ */ ++struct tw6869_ach { ++ struct tw6869_dev *dev; ++ struct snd_pcm_substream *ss; ++ ++ unsigned int id; ++ struct tw6869_buf *p_buf; ++ struct tw6869_buf *b_buf; ++ unsigned int pb; ++ ++ struct tw6869_buf buf[TW_APAGE_MAX]; ++ struct list_head buf_list; ++ spinlock_t lock; ++ ++ dma_addr_t ptr; ++}; ++ ++/** ++ * struct tw6869_dev - instance of device ++ * @pdev: PCI device ++ * @mmio: hardware base address ++ * @rlock: spinlock controlling access to registers ++ * @ch_max: channels used ++ * @id_err: DMA error counters ++ * @v4l2_dev: device registered in v4l2 layer ++ * @alloc_ctx: context for videobuf2 ++ * @vch: array of video channel instance ++ * @snd_card: device registered in ALSA layer ++ * @ach: array of audio channel instance ++ */ ++struct tw6869_dev { ++ struct pci_dev *pdev; ++ unsigned char __iomem *mmio; ++ spinlock_t rlock; ++ ++ unsigned int ch_max; ++ unsigned int id_err[2 * TW_CH_MAX]; ++ ++ struct v4l2_device v4l2_dev; ++ struct vb2_alloc_ctx *alloc_ctx; ++ struct tw6869_vch vch[TW_CH_MAX]; ++ ++ struct snd_card *snd_card; ++ struct tw6869_ach ach[TW_CH_MAX]; ++}; ++ ++/**********************************************************************/ ++ ++static inline void tw_write(struct tw6869_dev *dev, unsigned int reg, ++ unsigned int val) ++{ ++ iowrite32(val, dev->mmio + reg); ++} ++ ++static inline unsigned int tw_read(struct tw6869_dev *dev, ++ unsigned int reg) ++{ ++ return ioread32(dev->mmio + reg); ++} ++ ++static inline void tw_write_mask(struct tw6869_dev *dev, ++ unsigned int reg, unsigned int val, unsigned int mask) ++{ ++ unsigned int v = tw_read(dev, reg); ++ ++ v = (v & ~mask) | (val & mask); ++ tw_write(dev, reg, v); ++} ++ ++static inline void tw_clear(struct tw6869_dev *dev, ++ unsigned int reg, unsigned int val) ++{ ++ tw_write_mask(dev, reg, 0, val); ++} ++ ++static inline void tw_set(struct tw6869_dev *dev, ++ unsigned int reg, unsigned int val) ++{ ++ tw_write_mask(dev, reg, val, val); ++} ++ ++static inline unsigned int tw_id_is_on(struct tw6869_dev *dev, ++ unsigned int id) ++{ ++ unsigned int e = tw_read(dev, R32_DMA_CHANNEL_ENABLE); ++ unsigned int c = tw_read(dev, R32_DMA_CMD); ++ ++ return (c & BIT(31)) && (c & e & BIT_ID(id)); ++} ++ ++static inline unsigned int tw_id_is_off(struct tw6869_dev *dev, ++ unsigned int id) ++{ ++ unsigned int e = tw_read(dev, R32_DMA_CHANNEL_ENABLE); ++ unsigned int c = tw_read(dev, R32_DMA_CMD); ++ ++ return !((c | e) & BIT_ID(id)); ++} ++ ++static inline void tw_id_on(struct tw6869_dev *dev, unsigned int id) ++{ ++ int c = 3; ++ ++ while (!tw_id_is_on(dev, id) && c--) { ++ tw_set(dev, R32_DMA_CMD, BIT(31) | BIT_ID(id)); ++ tw_set(dev, R32_DMA_CHANNEL_ENABLE, BIT_ID(id)); ++ } ++} ++ ++static inline void tw_id_off(struct tw6869_dev *dev, unsigned int id) ++{ ++ int c = 3; ++ ++ while (!tw_id_is_off(dev, id) && c--) { ++ tw_clear(dev, R32_DMA_CMD, BIT_ID(id)); ++ tw_clear(dev, R32_DMA_CHANNEL_ENABLE, BIT_ID(id)); ++ } ++ ++ if (!tw_read(dev, R32_DMA_CHANNEL_ENABLE)) ++ tw_write(dev, R32_DMA_CMD, 0); ++} ++ ++static void tw6869_id_dma_cmd(struct tw6869_dev *dev, ++ unsigned int id, ++ unsigned int cmd) ++{ ++ switch (cmd) { ++ case TW_DMA_ON: ++ dev->id_err[ID2ID(id)] = 0; ++ tw_id_on(dev, id); ++ dev_info(&dev->pdev->dev, "DMA %u ON\n", id); ++ break; ++ case TW_DMA_OFF: ++ tw_id_off(dev, id); ++ dev_info(&dev->pdev->dev, "DMA %u OFF\n", id); ++ break; ++ case TW_DMA_RST: ++ if (tw_id_is_on(dev, id)) { ++ tw_id_off(dev, id); ++ if (++dev->id_err[ID2ID(id)] > TW_DMA_ERR_MAX) { ++ dev_err(&dev->pdev->dev, "DMA %u forced OFF\n", id); ++ break; ++ } ++ tw_id_on(dev, id); ++ dev_info(&dev->pdev->dev, "DMA %u RST\n", id); ++ } else { ++ dev_info(&dev->pdev->dev, "DMA %u spurious RST\n", id); ++ } ++ break; ++ default: ++ dev_err(&dev->pdev->dev, "DMA %u unknown cmd %u\n", id, cmd); ++ } ++} ++ ++static unsigned int tw6869_virq(struct tw6869_dev *dev, ++ unsigned int id, ++ unsigned int pb, ++ unsigned int err) ++{ ++ struct tw6869_vch *vch = &dev->vch[ID2CH(id)]; ++ struct tw6869_buf *done = NULL; ++ struct tw6869_buf *next = NULL; ++ ++ spin_lock(&vch->lock); ++ if (!vb2_is_streaming(&vch->queue) || !vch->p_buf || !vch->b_buf) { ++ spin_unlock(&vch->lock); ++ return TW_DMA_OFF; ++ } ++ ++ if (err || (vch->pb != pb)) { ++ vch->pb = 0; ++ spin_unlock(&vch->lock); ++ return TW_DMA_RST; ++ } ++ ++ if (!list_empty(&vch->buf_list)) { ++ next = list_first_entry(&vch->buf_list, struct tw6869_buf, list); ++ list_del(&next->list); ++ if (pb) { ++ done = vch->b_buf; ++ vch->b_buf = next; ++ } else { ++ done = vch->p_buf; ++ vch->p_buf = next; ++ } ++ } ++ vch->pb = !pb; ++ spin_unlock(&vch->lock); ++ ++ if (done && next) { ++ tw_write(dev, pb ? R32_DMA_B_ADDR(id) : R32_DMA_P_ADDR(id), next->dma); ++ v4l2_get_timestamp(&done->vb.v4l2_buf.timestamp); ++ done->vb.v4l2_buf.sequence = vch->sequence++; ++ vb2_buffer_done(&done->vb, VB2_BUF_STATE_DONE); ++ } else { ++ dev_info(&dev->pdev->dev, "vch%u NOBUF seq=%u dcount=%u\n", ++ ID2CH(id), vch->sequence, ++vch->dcount); ++ } ++ return 0; ++} ++ ++static unsigned int tw6869_airq(struct tw6869_dev *dev, ++ unsigned int id, ++ unsigned int pb) ++{ ++ struct tw6869_ach *ach = &dev->ach[ID2CH(id)]; ++ struct tw6869_buf *done = NULL; ++ struct tw6869_buf *next = NULL; ++ ++ spin_lock(&ach->lock); ++ if (!ach->ss || !ach->p_buf || !ach->b_buf) { ++ spin_unlock(&ach->lock); ++ return TW_DMA_OFF; ++ } ++ ++ if (ach->pb != pb) { ++ ach->pb = 0; ++ spin_unlock(&ach->lock); ++ return TW_DMA_RST; ++ } ++ ++ if (!list_empty(&ach->buf_list)) { ++ next = list_first_entry(&ach->buf_list, struct tw6869_buf, list); ++ list_move_tail(&next->list, &ach->buf_list); ++ if (pb) { ++ done = ach->p_buf; ++ ach->b_buf = next; ++ } else { ++ done = ach->b_buf; ++ ach->p_buf = next; ++ } ++ } ++ ach->pb = !pb; ++ spin_unlock(&ach->lock); ++ ++ if (done && next) { ++ tw_write(dev, pb ? R32_DMA_B_ADDR(id) : R32_DMA_P_ADDR(id), next->dma); ++ ach->ptr = done->dma - ach->buf[0].dma; ++ snd_pcm_period_elapsed(ach->ss); ++ } else { ++ return TW_DMA_OFF; ++ } ++ return 0; ++} ++ ++static irqreturn_t tw6869_irq(int irq, void *dev_id) ++{ ++ struct tw6869_dev *dev = dev_id; ++ unsigned int int_sts, fifo_sts, pb_sts, dma_en, id; ++ ++ int_sts = tw_read(dev, R32_INT_STATUS); ++ fifo_sts = tw_read(dev, R32_FIFO_STATUS); ++ pb_sts = tw_read(dev, R32_PB_STATUS); ++ dma_en = tw_read(dev, R32_DMA_CHANNEL_ENABLE); ++ dma_en &= tw_read(dev, R32_DMA_CMD); ++ ++ for (id = 0; id < (2 * TW_CH_MAX); id++) { ++ unsigned int verr = fifo_sts & TW_VERR(id); ++ ++ if ((dma_en & BIT(id)) && ((int_sts & BIT(id)) || verr)) { ++ unsigned int pb = !!(pb_sts & BIT(id)); ++ unsigned int cmd = (BIT(id) & TW_VID) ? ++ tw6869_virq(dev, id, pb, verr) : ++ tw6869_airq(dev, id, pb); ++ ++ if (cmd) { ++ spin_lock(&dev->rlock); ++ tw6869_id_dma_cmd(dev, id, cmd); ++ spin_unlock(&dev->rlock); ++ } else { ++ dev->id_err[id] = 0; ++ } ++ } ++ } ++ return IRQ_HANDLED; ++} ++ ++/**********************************************************************/ ++ ++static inline struct tw6869_buf *to_tw6869_buf(struct vb2_buffer *vb2) ++{ ++ return container_of(vb2, struct tw6869_buf, vb); ++} ++ ++static int to_tw6869_pixformat(unsigned int pixelformat) ++{ ++ int ret; ++ ++ switch (pixelformat) { ++ case V4L2_PIX_FMT_YUYV: ++ ret = TW_FMT_YUYV; ++ break; ++ case V4L2_PIX_FMT_UYVY: ++ ret = TW_FMT_UYVY; ++ break; ++ case V4L2_PIX_FMT_RGB565: ++ ret = TW_FMT_RGB565; ++ break; ++ default: ++ ret = -EINVAL; ++ } ++ return ret; ++} ++ ++static unsigned int tw6869_fields_map(v4l2_std_id std, unsigned int rate) ++{ ++ unsigned int map[15] = { ++ 0x00000000, 0x00000001, 0x00004001, 0x00104001, 0x00404041, ++ 0x01041041, 0x01104411, 0x01111111, 0x04444445, 0x04511445, ++ 0x05145145, 0x05151515, 0x05515455, 0x05551555, 0x05555555 ++ }; ++ unsigned int std_625_50[26] = { ++ 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, ++ 8, 8, 9, 10, 10, 11, 11, 12, 13, 13, 14, 14, 0 ++ }; ++ unsigned int std_525_60[31] = { ++ 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, ++ 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 0, 0 ++ }; ++ unsigned int i = (std & V4L2_STD_625_50) ? ++ std_625_50[(rate > 25) ? 25 : rate] : ++ std_525_60[(rate > 30) ? 30 : rate]; ++ ++ return map[i]; ++} ++ ++static void tw6869_fill_pix_format(struct tw6869_vch *vch, ++ struct v4l2_pix_format *pix) ++{ ++ pix->width = 720; ++ pix->height = (vch->std & V4L2_STD_625_50) ? 576 : 480; ++ pix->field = V4L2_FIELD_INTERLACED_BT; ++ pix->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ pix->bytesperline = pix->width * 2; ++ pix->sizeimage = pix->bytesperline * pix->height; ++ pix->priv = 0; ++} ++ ++static void tw6869_vch_hw_cfg(struct tw6869_vch *vch) ++{ ++ struct tw6869_dev *dev = vch->dev; ++ struct v4l2_pix_format *pix = &vch->format; ++ unsigned int cfg; ++ ++ if (vch->std & V4L2_STD_625_50) ++ tw_set(dev, R32_VIDEO_CONTROL1, BIT_CH(vch->id) << 13); ++ else ++ tw_clear(dev, R32_VIDEO_CONTROL1, BIT_CH(vch->id) << 13); ++ ++ cfg = tw6869_fields_map(vch->std, vch->fps) << 1; ++ cfg |= cfg << 1; ++ if (cfg > 0) ++ cfg |= BIT(31); ++ tw_write(dev, R32_VIDEO_FIELD_CTRL(vch->id), cfg); ++ ++ /* Analog mux input0, no drop, enable master */ ++ cfg = ((vch->input & 0x0) << 30) | ++ BIT(27) | (ID2SC(vch->id) << 25) | ++ ((to_tw6869_pixformat(pix->pixelformat) & 0x7) << 20); ++ tw_write(dev, R32_DMA_CHANNEL_CONFIG(vch->id), cfg); ++ ++ cfg = (((pix->height >> 1) & 0x3FF) << 22) | ++ ((pix->bytesperline & 0x7FF) << 11) | ++ (pix->bytesperline & 0x7FF); ++ tw_write(dev, R32_DMA_WHP(vch->id), cfg); ++ ++ tw_write(dev, R32_DMA_P_ADDR(vch->id), vch->p_buf->dma); ++ tw_write(dev, R32_DMA_B_ADDR(vch->id), vch->b_buf->dma); ++} ++ ++/* ++ * Videobuf2 Operations ++ */ ++static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, ++ unsigned int *nbuffers, unsigned int *nplanes, ++ unsigned int sizes[], void *alloc_ctxs[]) ++{ ++ struct tw6869_vch *vch = vb2_get_drv_priv(vq); ++ struct tw6869_dev *dev = vch->dev; ++ ++ if (vq->num_buffers + *nbuffers < TW_FRAME_MAX) ++ *nbuffers = TW_FRAME_MAX - vq->num_buffers; ++ ++ if (fmt && fmt->fmt.pix.sizeimage < vch->format.sizeimage) ++ return -EINVAL; ++ ++ *nplanes = 1; ++ sizes[0] = fmt ? fmt->fmt.pix.sizeimage : vch->format.sizeimage; ++ alloc_ctxs[0] = dev->alloc_ctx; ++ return 0; ++} ++ ++static int buffer_init(struct vb2_buffer *vb) ++{ ++ struct tw6869_buf *buf = to_tw6869_buf(vb); ++ ++ buf->dma = vb2_dma_contig_plane_dma_addr(vb, 0); ++ INIT_LIST_HEAD(&buf->list); ++ { /* pass the buffer physical address */ ++ unsigned int *cpu = vb2_plane_vaddr(vb, 0); ++ *cpu = buf->dma; ++ } ++ return 0; ++} ++ ++static int buffer_prepare(struct vb2_buffer *vb) ++{ ++ struct tw6869_vch *vch = vb2_get_drv_priv(vb->vb2_queue); ++ unsigned long size = vch->format.sizeimage; ++ ++ if (vb2_plane_size(vb, 0) < size) { ++ v4l2_err(&vch->dev->v4l2_dev, "buffer too small (%lu < %lu)\n", ++ vb2_plane_size(vb, 0), size); ++ return -EINVAL; ++ } ++ ++ vb2_set_plane_payload(vb, 0, size); ++ return 0; ++} ++ ++static void buffer_queue(struct vb2_buffer *vb) ++{ ++ struct tw6869_vch *vch = vb2_get_drv_priv(vb->vb2_queue); ++ struct tw6869_buf *buf = to_tw6869_buf(vb); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&vch->lock, flags); ++ list_add_tail(&buf->list, &vch->buf_list); ++ spin_unlock_irqrestore(&vch->lock, flags); ++} ++ ++static int start_streaming(struct vb2_queue *vq, unsigned int count) ++{ ++ struct tw6869_vch *vch = vb2_get_drv_priv(vq); ++ struct tw6869_dev *dev = vch->dev; ++ unsigned long flags; ++ ++ if (count < 2) ++ return -ENOBUFS; ++ ++ spin_lock_irqsave(&vch->lock, flags); ++ vch->p_buf = list_first_entry(&vch->buf_list, struct tw6869_buf, list); ++ list_del(&vch->p_buf->list); ++ ++ vch->b_buf = list_first_entry(&vch->buf_list, struct tw6869_buf, list); ++ list_del(&vch->b_buf->list); ++ ++ vch->sequence = 0; ++ vch->dcount = 0; ++ vch->pb = 0; ++ spin_unlock_irqrestore(&vch->lock, flags); ++ ++ spin_lock_irqsave(&dev->rlock, flags); ++ tw6869_vch_hw_cfg(vch); ++ tw6869_id_dma_cmd(dev, vch->id, TW_DMA_ON); ++ spin_unlock_irqrestore(&dev->rlock, flags); ++ ++ return 0; ++} ++ ++static int stop_streaming(struct vb2_queue *vq) ++{ ++ struct tw6869_vch *vch = vb2_get_drv_priv(vq); ++ struct tw6869_dev *dev = vch->dev; ++ struct tw6869_buf *buf, *node; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev->rlock, flags); ++ tw6869_id_dma_cmd(dev, vch->id, TW_DMA_OFF); ++ spin_unlock_irqrestore(&dev->rlock, flags); ++ ++ spin_lock_irqsave(&vch->lock, flags); ++ if (vch->p_buf) { ++ buf = vch->p_buf; ++ vch->p_buf = NULL; ++ vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR); ++ } ++ ++ if (vch->b_buf) { ++ buf = vch->b_buf; ++ vch->b_buf = NULL; ++ vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR); ++ } ++ ++ list_for_each_entry_safe(buf, node, &vch->buf_list, list) { ++ vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR); ++ list_del(&buf->list); ++ } ++ spin_unlock_irqrestore(&vch->lock, flags); ++ ++ return 0; ++} ++ ++static struct vb2_ops tw6869_qops = { ++ .queue_setup = queue_setup, ++ .buf_init = buffer_init, ++ .buf_prepare = buffer_prepare, ++ .buf_queue = buffer_queue, ++ .start_streaming = start_streaming, ++ .stop_streaming = stop_streaming, ++ .wait_prepare = vb2_ops_wait_prepare, ++ .wait_finish = vb2_ops_wait_finish, ++}; ++ ++static int tw6869_querycap(struct file *file, void *priv, ++ struct v4l2_capability *cap) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ struct tw6869_dev *dev = vch->dev; ++ ++ strlcpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver)); ++ snprintf(cap->card, sizeof(cap->card), "tw6869 vch%u", ID2CH(vch->id)); ++ snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", ++ pci_name(dev->pdev)); ++ cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | ++ V4L2_CAP_STREAMING; ++ cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; ++ return 0; ++} ++ ++static int tw6869_try_fmt_vid_cap(struct file *file, void *priv, ++ struct v4l2_format *f) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ struct v4l2_pix_format *pix = &f->fmt.pix; ++ int ret; ++ ++ ret = to_tw6869_pixformat(pix->pixelformat); ++ if (ret < 0) ++ return ret; ++ ++ tw6869_fill_pix_format(vch, pix); ++ return 0; ++} ++ ++static int tw6869_s_fmt_vid_cap(struct file *file, void *priv, ++ struct v4l2_format *f) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ int ret; ++ ++ ret = tw6869_try_fmt_vid_cap(file, priv, f); ++ if (ret) ++ return ret; ++ ++ if (vb2_is_busy(&vch->queue)) ++ return -EBUSY; ++ ++ vch->format = f->fmt.pix; ++ return 0; ++} ++ ++static int tw6869_g_fmt_vid_cap(struct file *file, void *priv, ++ struct v4l2_format *f) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ ++ f->fmt.pix = vch->format; ++ return 0; ++} ++ ++static int tw6869_enum_fmt_vid_cap(struct file *file, void *priv, ++ struct v4l2_fmtdesc *f) ++{ ++ if (f->index > 2) ++ return -EINVAL; ++ ++ switch (f->index) { ++ case 1: ++ strcpy(f->description, "4:2:2, packed, YUYV"); ++ f->pixelformat = V4L2_PIX_FMT_YUYV; ++ break; ++ case 2: ++ strcpy(f->description, "16 bpp RGB, le"); ++ f->pixelformat = V4L2_PIX_FMT_RGB565; ++ break; ++ default: ++ strcpy(f->description, "4:2:2, packed, UYVY"); ++ f->pixelformat = V4L2_PIX_FMT_UYVY; ++ } ++ f->flags = 0; ++ return 0; ++} ++ ++static int tw6869_enum_framesizes(struct file *file, void *priv, ++ struct v4l2_frmsizeenum *fsize) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ ++ if (fsize->index != 0) ++ return -EINVAL; ++ ++ fsize->discrete.width = vch->format.width; ++ fsize->discrete.height = vch->format.height; ++ ++ return 0; ++} ++ ++static int tw6869_querystd(struct file *file, void *priv, v4l2_std_id *std) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ struct tw6869_dev *dev = vch->dev; ++ unsigned int std_now; ++ char *std_str; ++ ++ std_now = (tw_read(dev, R8_STANDARD_SEL(vch->id)) & 0x70) >> 4; ++ ++ switch (std_now) { ++ case TW_STD_PAL_M: ++ std_str = "PAL (M)"; ++ *std = V4L2_STD_525_60; ++ break; ++ case TW_STD_PAL_60: ++ std_str = "PAL 60"; ++ *std = V4L2_STD_525_60; ++ break; ++ case TW_STD_NTSC_M: ++ std_str = "NTSC (M)"; ++ *std = V4L2_STD_525_60; ++ break; ++ case TW_STD_NTSC_443: ++ std_str = "NTSC 4.43"; ++ *std = V4L2_STD_525_60; ++ break; ++ case TW_STD_PAL: ++ std_str = "PAL (B,D,G,H,I)"; ++ *std = V4L2_STD_625_50; ++ break; ++ case TW_STD_PAL_CN: ++ std_str = "PAL (CN)"; ++ *std = V4L2_STD_625_50; ++ break; ++ case TW_STD_SECAM: ++ std_str = "SECAM"; ++ *std = V4L2_STD_625_50; ++ break; ++ default: ++ std_str = "Not valid"; ++ *std = 0; ++ } ++ v4l2_info(&dev->v4l2_dev, "vch%u std %s\n", ID2CH(vch->id), std_str); ++ return 0; ++} ++ ++static int tw6869_s_std(struct file *file, void *priv, v4l2_std_id std) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ v4l2_std_id new_std = (std & V4L2_STD_625_50) ? ++ V4L2_STD_625_50 : V4L2_STD_525_60; ++ ++ if (new_std == vch->std) ++ return 0; ++ ++ if (vb2_is_busy(&vch->queue)) ++ return -EBUSY; ++ ++ vch->std = new_std; ++ vch->fps = (new_std & V4L2_STD_625_50) ? 25 : 30; ++ tw6869_fill_pix_format(vch, &vch->format); ++ return 0; ++} ++ ++static int tw6869_g_std(struct file *file, void *priv, v4l2_std_id *std) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ v4l2_std_id new_std = 0; ++ ++ tw6869_querystd(file, priv, &new_std); ++ if (new_std) ++ tw6869_s_std(file, priv, new_std); ++ ++ vch->fps = (vch->std & V4L2_STD_625_50) ? 25 : 30; ++ *std = vch->std; ++ return 0; ++} ++ ++/* SK-TW6869: only input0 is available */ ++static int tw6869_enum_input(struct file *file, void *priv, ++ struct v4l2_input *i) ++{ ++ if (i->index >= TW_VIN_MAX) ++ return -EINVAL; ++ ++ i->type = V4L2_INPUT_TYPE_CAMERA; ++ i->std = V4L2_STD_ALL; ++ sprintf(i->name, "Camera %d", i->index); ++ return 0; ++} ++ ++static int tw6869_s_input(struct file *file, void *priv, unsigned int i) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ ++ vch->input = i; ++ return 0; ++} ++ ++static int tw6869_g_input(struct file *file, void *priv, unsigned int *i) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ ++ *i = vch->input; ++ return 0; ++} ++ ++static int tw6869_g_parm(struct file *file, void *priv, ++ struct v4l2_streamparm *sp) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ struct v4l2_captureparm *cp = &sp->parm.capture; ++ ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = 1; ++ cp->timeperframe.denominator = vch->fps; ++ return 0; ++} ++ ++static int tw6869_s_parm(struct file *file, void *priv, ++ struct v4l2_streamparm *sp) ++{ ++ struct tw6869_vch *vch = video_drvdata(file); ++ unsigned int denominator = sp->parm.capture.timeperframe.denominator; ++ unsigned int numerator = sp->parm.capture.timeperframe.numerator; ++ unsigned int fps; ++ ++ fps = (!numerator || !denominator) ? 0 : denominator / numerator; ++ if (vch->std & V4L2_STD_625_50) ++ fps = (!fps || fps > 25) ? 25 : fps; ++ else ++ fps = (!fps || fps > 30) ? 30 : fps; ++ ++ vch->fps = fps; ++ v4l2_info(&vch->dev->v4l2_dev, ++ "vch%u fps %u\n", ID2CH(vch->id), vch->fps); ++ ++ return tw6869_g_parm(file, priv, sp); ++} ++ ++/* The control handler */ ++static int tw6869_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct tw6869_vch *vch = ++ container_of(ctrl->handler, struct tw6869_vch, hdl); ++ struct tw6869_dev *dev = vch->dev; ++ unsigned int id = vch->id; ++ int ret = 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ tw_write(dev, R8_BRIGHT_CTRL(id), ctrl->val); ++ break; ++ case V4L2_CID_CONTRAST: ++ tw_write(dev, R8_CONTRAST_CTRL(id), ctrl->val); ++ break; ++ case V4L2_CID_SATURATION: ++ tw_write(dev, R8_SAT_U_CTRL(id), ctrl->val); ++ tw_write(dev, R8_SAT_V_CTRL(id), ctrl->val); ++ break; ++ case V4L2_CID_HUE: ++ tw_write(dev, R8_HUE_CTRL(id), ctrl->val); ++ break; ++ default: ++ ret = -EINVAL; ++ } ++ return ret; ++} ++ ++/* ++ * File operations for the device ++ */ ++static const struct v4l2_ctrl_ops tw6869_ctrl_ops = { ++ .s_ctrl = tw6869_s_ctrl, ++}; ++ ++static const struct v4l2_ioctl_ops tw6869_ioctl_ops = { ++ .vidioc_querycap = tw6869_querycap, ++ .vidioc_try_fmt_vid_cap = tw6869_try_fmt_vid_cap, ++ .vidioc_s_fmt_vid_cap = tw6869_s_fmt_vid_cap, ++ .vidioc_g_fmt_vid_cap = tw6869_g_fmt_vid_cap, ++ .vidioc_enum_fmt_vid_cap = tw6869_enum_fmt_vid_cap, ++ .vidioc_enum_framesizes = tw6869_enum_framesizes, ++ ++ .vidioc_querystd = tw6869_querystd, ++ .vidioc_s_std = tw6869_s_std, ++ .vidioc_g_std = tw6869_g_std, ++ ++ .vidioc_enum_input = tw6869_enum_input, ++ .vidioc_s_input = tw6869_s_input, ++ .vidioc_g_input = tw6869_g_input, ++ ++ .vidioc_g_parm = tw6869_g_parm, ++ .vidioc_s_parm = tw6869_s_parm, ++ ++ .vidioc_reqbufs = vb2_ioctl_reqbufs, ++ .vidioc_create_bufs = vb2_ioctl_create_bufs, ++ .vidioc_querybuf = vb2_ioctl_querybuf, ++ .vidioc_qbuf = vb2_ioctl_qbuf, ++ .vidioc_dqbuf = vb2_ioctl_dqbuf, ++ .vidioc_expbuf = vb2_ioctl_expbuf, ++ .vidioc_streamon = vb2_ioctl_streamon, ++ .vidioc_streamoff = vb2_ioctl_streamoff, ++ ++ .vidioc_log_status = v4l2_ctrl_log_status, ++ .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, ++ .vidioc_unsubscribe_event = v4l2_event_unsubscribe, ++}; ++ ++static const struct v4l2_file_operations tw6869_fops = { ++ .owner = THIS_MODULE, ++ .open = v4l2_fh_open, ++ .release = vb2_fop_release, ++ .unlocked_ioctl = video_ioctl2, ++ .read = vb2_fop_read, ++ .mmap = vb2_fop_mmap, ++ .poll = vb2_fop_poll, ++}; ++ ++static int tw6869_vch_register(struct tw6869_vch *vch) ++{ ++ struct tw6869_dev *dev = vch->dev; ++ struct v4l2_ctrl_handler *hdl = &vch->hdl; ++ struct vb2_queue *q = &vch->queue; ++ struct video_device *vdev = &vch->vdev; ++ int ret = 0; ++ ++ /* Add the controls */ ++ v4l2_ctrl_handler_init(hdl, 4); ++ v4l2_ctrl_new_std(hdl, &tw6869_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, -128, 127, 1, 0); ++ v4l2_ctrl_new_std(hdl, &tw6869_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 255, 1, 100); ++ v4l2_ctrl_new_std(hdl, &tw6869_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 255, 1, 128); ++ v4l2_ctrl_new_std(hdl, &tw6869_ctrl_ops, ++ V4L2_CID_HUE, -128, 127, 1, 0); ++ if (hdl->error) { ++ ret = hdl->error; ++ return ret; ++ } ++ ++ /* Fill in the initial format-related settings */ ++ vch->std = V4L2_STD_525_60; ++ vch->fps = 30; ++ vch->format.pixelformat = V4L2_PIX_FMT_UYVY; ++ tw6869_fill_pix_format(vch, &vch->format); ++ ++ mutex_init(&vch->mlock); ++ ++ /* Initialize the vb2 queue */ ++ q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ q->io_modes = VB2_MMAP | VB2_DMABUF | VB2_READ; ++ q->drv_priv = vch; ++ q->buf_struct_size = sizeof(struct tw6869_buf); ++ q->ops = &tw6869_qops; ++ q->mem_ops = &vb2_dma_contig_memops; ++ q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; ++ q->lock = &vch->mlock; ++ q->gfp_flags = __GFP_DMA32; ++ ret = vb2_queue_init(q); ++ if (ret) ++ goto free_hdl; ++ ++ spin_lock_init(&vch->lock); ++ INIT_LIST_HEAD(&vch->buf_list); ++ ++ /* Initialize the video_device structure */ ++ strlcpy(vdev->name, KBUILD_MODNAME, sizeof(vdev->name)); ++ vdev->release = video_device_release_empty; ++ vdev->fops = &tw6869_fops, ++ vdev->ioctl_ops = &tw6869_ioctl_ops, ++ vdev->lock = &vch->mlock; ++ vdev->queue = q; ++ vdev->v4l2_dev = &dev->v4l2_dev; ++ vdev->ctrl_handler = hdl; ++ vdev->tvnorms = V4L2_STD_ALL; ++ video_set_drvdata(vdev, vch); ++ ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1); ++ if (!ret) ++ return 0; ++ ++free_hdl: ++ v4l2_ctrl_handler_free(hdl); ++ return ret; ++} ++ ++static void tw6869_video_unregister(struct tw6869_dev *dev) ++{ ++ unsigned int i; ++ ++ /* Reset and disable all DMA channels */ ++ tw_write(dev, R32_DMA_CMD, 0); ++ tw_write(dev, R32_DMA_CHANNEL_ENABLE, 0); ++ ++ if (!dev->alloc_ctx) ++ return; ++ ++ if (dev->ch_max > TW_CH_MAX) ++ dev->ch_max = TW_CH_MAX; ++ ++ for (i = 0; i < dev->ch_max; i++) { ++ struct tw6869_vch *vch = &dev->vch[ID2CH(i)]; ++ video_unregister_device(&vch->vdev); ++ v4l2_ctrl_handler_free(&vch->hdl); ++ } ++ ++ v4l2_device_unregister(&dev->v4l2_dev); ++ vb2_dma_contig_cleanup_ctx(dev->alloc_ctx); ++ dev->alloc_ctx = NULL; ++} ++ ++static int tw6869_video_register(struct tw6869_dev *dev) ++{ ++ struct pci_dev *pdev = dev->pdev; ++ unsigned int i; ++ int ret; ++ ++ /* Initialize the top-level structure */ ++ ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); ++ if (ret) ++ return ret; ++ ++ dev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev); ++ if (IS_ERR(dev->alloc_ctx)) { ++ ret = PTR_ERR(dev->alloc_ctx); ++ v4l2_err(&dev->v4l2_dev, "can't allocate buffer context\n"); ++ v4l2_device_unregister(&dev->v4l2_dev); ++ dev->alloc_ctx = NULL; ++ return ret; ++ } ++ ++ for (i = 0; i < TW_CH_MAX; i++) { ++ struct tw6869_vch *vch = &dev->vch[ID2CH(i)]; ++ vch->dev = dev; ++ vch->id = i; ++ ret = tw6869_vch_register(vch); ++ if (ret) { ++ dev->ch_max = i; ++ tw6869_video_unregister(dev); ++ return ret; ++ } ++ dev_info(&pdev->dev, "vch%i registered as %s\n", ++ vch->id, ++ video_device_node_name(&vch->vdev)); ++ } ++ return 0; ++} ++ ++/**********************************************************************/ ++ ++static int tw6869_pcm_hw_params(struct snd_pcm_substream *ss, ++ struct snd_pcm_hw_params *hw_params) ++{ ++ return snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw_params)); ++} ++ ++static int tw6869_pcm_hw_free(struct snd_pcm_substream *ss) ++{ ++ return snd_pcm_lib_free_pages(ss); ++} ++ ++static const struct snd_pcm_hardware tw6869_capture_hw = { ++ .info = (SNDRV_PCM_INFO_MMAP | ++ SNDRV_PCM_INFO_INTERLEAVED | ++ SNDRV_PCM_INFO_BLOCK_TRANSFER | ++ SNDRV_PCM_INFO_MMAP_VALID), ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ .rates = SNDRV_PCM_RATE_48000, ++ .rate_min = 48000, ++ .rate_max = 48000, ++ .channels_min = 1, ++ .channels_max = 1, ++ .buffer_bytes_max = TW_PAGE_SIZE * TW_APAGE_MAX, ++ .period_bytes_min = TW_PAGE_SIZE, ++ .period_bytes_max = TW_PAGE_SIZE, ++ .periods_min = 2, ++ .periods_max = TW_APAGE_MAX, ++}; ++ ++static int tw6869_pcm_open(struct snd_pcm_substream *ss) ++{ ++ struct tw6869_dev *dev = snd_pcm_substream_chip(ss); ++ struct tw6869_ach *ach = &dev->ach[ID2CH(ss->number)]; ++ struct snd_pcm_runtime *rt = ss->runtime; ++ int ret; ++ ++ rt->hw = tw6869_capture_hw; ++ ret = snd_pcm_hw_constraint_integer(rt, SNDRV_PCM_HW_PARAM_PERIODS); ++ if (ret < 0) ++ return ret; ++ ++ ach->ss = ss; ++ return 0; ++} ++ ++static int tw6869_pcm_close(struct snd_pcm_substream *ss) ++{ ++ struct tw6869_dev *dev = snd_pcm_substream_chip(ss); ++ struct tw6869_ach *ach = &dev->ach[ID2CH(ss->number)]; ++ ++ ach->ss = NULL; ++ return 0; ++} ++ ++static int tw6869_pcm_prepare(struct snd_pcm_substream *ss) ++{ ++ struct tw6869_dev *dev = snd_pcm_substream_chip(ss); ++ struct tw6869_ach *ach = &dev->ach[ID2CH(ss->number)]; ++ struct snd_pcm_runtime *rt = ss->runtime; ++ unsigned int period = snd_pcm_lib_period_bytes(ss); ++ unsigned long flags; ++ unsigned int i; ++ ++ spin_lock_irqsave(&ach->lock, flags); ++ ach->p_buf = NULL; ++ ach->b_buf = NULL; ++ ++ if ((period != TW_PAGE_SIZE) || ++ (rt->periods < 2) || ++ (rt->periods > TW_APAGE_MAX)) { ++ spin_unlock_irqrestore(&ach->lock, flags); ++ return -EINVAL; ++ } ++ ++ INIT_LIST_HEAD(&ach->buf_list); ++ for (i = 0; i < rt->periods; i++) { ++ ach->buf[i].dma = rt->dma_addr + period * i; ++ INIT_LIST_HEAD(&ach->buf[i].list); ++ list_add_tail(&ach->buf[i].list, &ach->buf_list); ++ } ++ ++ ach->p_buf = list_first_entry(&ach->buf_list, struct tw6869_buf, list); ++ list_move_tail(&ach->p_buf->list, &ach->buf_list); ++ ++ ach->b_buf = list_first_entry(&ach->buf_list, struct tw6869_buf, list); ++ list_move_tail(&ach->b_buf->list, &ach->buf_list); ++ ++ ach->ptr = 0; ++ ach->pb = 0; ++ spin_unlock_irqrestore(&ach->lock, flags); ++ ++ return 0; ++} ++ ++static void tw6869_ach_hw_cfg(struct tw6869_ach *ach) ++{ ++ struct tw6869_dev *dev = ach->dev; ++ ++ tw_write(dev, R32_DMA_P_ADDR(ach->id), ach->p_buf->dma); ++ tw_write(dev, R32_DMA_B_ADDR(ach->id), ach->b_buf->dma); ++} ++ ++static int tw6869_pcm_trigger(struct snd_pcm_substream *ss, int cmd) ++{ ++ struct tw6869_dev *dev = snd_pcm_substream_chip(ss); ++ struct tw6869_ach *ach = &dev->ach[ID2CH(ss->number)]; ++ unsigned long flags; ++ int ret = 0; ++ ++ switch (cmd) { ++ case SNDRV_PCM_TRIGGER_START: ++ if (ach->p_buf && ach->b_buf) { ++ spin_lock_irqsave(&dev->rlock, flags); ++ tw6869_ach_hw_cfg(ach); ++ tw6869_id_dma_cmd(dev, ach->id, TW_DMA_ON); ++ spin_unlock_irqrestore(&dev->rlock, flags); ++ } else { ++ ret = -EIO; ++ } ++ break; ++ case SNDRV_PCM_TRIGGER_STOP: ++ spin_lock_irqsave(&dev->rlock, flags); ++ tw6869_id_dma_cmd(dev, ach->id, TW_DMA_OFF); ++ spin_unlock_irqrestore(&dev->rlock, flags); ++ ++ spin_lock_irqsave(&ach->lock, flags); ++ ach->p_buf = NULL; ++ ach->b_buf = NULL; ++ spin_unlock_irqrestore(&ach->lock, flags); ++ break; ++ default: ++ ret = -EINVAL; ++ } ++ return ret; ++} ++ ++static snd_pcm_uframes_t tw6869_pcm_pointer(struct snd_pcm_substream *ss) ++{ ++ struct tw6869_dev *dev = snd_pcm_substream_chip(ss); ++ struct tw6869_ach *ach = &dev->ach[ID2CH(ss->number)]; ++ ++ return bytes_to_frames(ss->runtime, ach->ptr); ++} ++ ++static struct snd_pcm_ops tw6869_pcm_ops = { ++ .open = tw6869_pcm_open, ++ .close = tw6869_pcm_close, ++ .ioctl = snd_pcm_lib_ioctl, ++ .hw_params = tw6869_pcm_hw_params, ++ .hw_free = tw6869_pcm_hw_free, ++ .prepare = tw6869_pcm_prepare, ++ .trigger = tw6869_pcm_trigger, ++ .pointer = tw6869_pcm_pointer, ++}; ++ ++static int tw6869_snd_pcm_init(struct tw6869_dev *dev) ++{ ++ struct snd_card *card = dev->snd_card; ++ struct snd_pcm *pcm; ++ struct snd_pcm_substream *ss; ++ int ret; ++ ++ ret = snd_pcm_new(card, card->driver, 0, 0, TW_CH_MAX, &pcm); ++ if (ret < 0) ++ return ret; ++ ++ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &tw6869_pcm_ops); ++ snd_pcm_chip(pcm) = dev; ++ pcm->info_flags = 0; ++ strcpy(pcm->name, card->shortname); ++ ++ ss = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; ++ while (ss && (ss->next != ss)) { ++ struct tw6869_ach *ach = &dev->ach[ID2CH(ss->number)]; ++ ach->dev = dev; ++ ach->id = ID2CH(ss->number) + TW_CH_MAX; ++ spin_lock_init(&ach->lock); ++ sprintf(ss->name, "vch%u audio", ID2CH(ss->number)); ++ ss = ss->next; ++ } ++ ++ return snd_pcm_lib_preallocate_pages_for_all(pcm, ++ SNDRV_DMA_TYPE_DEV, ++ snd_dma_pci_data(dev->pdev), ++ TW_APAGE_MAX * TW_PAGE_SIZE, ++ TW_APAGE_MAX * TW_PAGE_SIZE); ++} ++ ++static void tw6869_audio_unregister(struct tw6869_dev *dev) ++{ ++ /* Reset and disable audio DMA */ ++ tw_clear(dev, R32_DMA_CMD, TW_AID); ++ tw_clear(dev, R32_DMA_CHANNEL_ENABLE, TW_AID); ++ ++ if (!dev->snd_card) ++ return; ++ ++ snd_card_free(dev->snd_card); ++ dev->snd_card = NULL; ++} ++ ++/* TODO: mixer controls */ ++static int tw6869_audio_register(struct tw6869_dev *dev) ++{ ++ struct pci_dev *pdev = dev->pdev; ++ static struct snd_device_ops ops = { NULL }; ++ struct snd_card *card; ++ int ret; ++ ++ ret = snd_card_create(SNDRV_DEFAULT_IDX1, KBUILD_MODNAME, ++ THIS_MODULE, 0, &card); ++ if (ret < 0) ++ return ret; ++ ++ dev->snd_card = card; ++ ++ strcpy(card->driver, KBUILD_MODNAME); ++ strcpy(card->shortname, KBUILD_MODNAME); ++ sprintf(card->longname, "%s on %s IRQ %d", card->shortname, ++ pci_name(pdev), pdev->irq); ++ ++ ret = snd_device_new(card, SNDRV_DEV_LOWLEVEL, dev, &ops); ++ if (ret < 0) ++ goto snd_error; ++ ++ snd_card_set_dev(card, &pdev->dev); ++ ++ ret = tw6869_snd_pcm_init(dev); ++ if (ret < 0) ++ goto snd_error; ++ ++ ret = snd_card_register(card); ++ if (!ret) ++ return 0; ++ ++snd_error: ++ snd_card_free(card); ++ dev->snd_card = NULL; ++ return ret; ++} ++ ++/**********************************************************************/ ++ ++static void tw6869_reset(struct tw6869_dev *dev) ++{ ++ /* Software Reset */ ++ tw_write(dev, R32_SYS_SOFT_RST, 0x01); ++ tw_write(dev, R32_SYS_SOFT_RST, 0x0F); ++ ++ /* Reset Internal audio and video decoders */ ++ tw_write(dev, R8_AVSRST(0), 0x1F); ++ tw_write(dev, R8_AVSRST(4), 0x1F); ++ ++ /* Reset all DMA channels */ ++ tw_write(dev, R32_DMA_CMD, 0); ++ ++ /* Disable all DMA channels */ ++ tw_write(dev, R32_DMA_CHANNEL_ENABLE, 0); ++ ++ /* Enable DMA FIFO overflow and pointer check */ ++ tw_write(dev, R32_DMA_CONFIG, 0x00FFFF04); ++ ++ /* Minimum time span for DMA interrupting host (default: 0x00098968) */ ++ tw_write(dev, R32_DMA_TIMER_INTERVAL, 0x00098968); ++ ++ /* DMA timeout (default: 0x140C8584) */ ++ tw_write(dev, R32_DMA_CHANNEL_TIMEOUT, 0x140C8584); ++ ++ /* Frame mode DMA */ ++ tw_write(dev, R32_PHASE_REF, 0xAAAA144D); ++ ++ /* Show blue background if no signal */ ++ tw_write(dev, R8_MISC_CONTROL1(0), 0xE7); ++ tw_write(dev, R8_MISC_CONTROL1(4), 0xE7); ++ ++ /* Audio DMA 4096 bytes, sampling frequency reference 48 kHz */ ++ tw_write(dev, R32_AUDIO_CONTROL1, 0x80000001 | (0x0A2C << 5)); ++ tw_write(dev, R32_AUDIO_CONTROL2, 0x0A2C2AAA); ++} ++ ++static int tw6869_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ++{ ++ struct tw6869_dev *dev; ++ int ret; ++ ++ /* Allocate a new instance */ ++ dev = devm_kzalloc(&pdev->dev, sizeof(struct tw6869_dev), GFP_KERNEL); ++ if (!dev) ++ return -ENOMEM; ++ ++ ret = pci_enable_device(pdev); ++ if (ret) ++ return ret; ++ ++ pci_set_master(pdev); ++ ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); ++ if (ret) { ++ dev_err(&pdev->dev, "no suitable DMA available\n"); ++ goto disable_pci; ++ } ++ ++ ret = pci_request_regions(pdev, KBUILD_MODNAME); ++ if (ret) ++ goto disable_pci; ++ ++ dev->mmio = pci_iomap(pdev, 0, 0); ++ if (!dev->mmio) { ++ ret = -EIO; ++ goto release_regs; ++ } ++ ++ tw6869_reset(dev); ++ ++ ret = devm_request_irq(&pdev->dev, pdev->irq, ++ tw6869_irq, IRQF_SHARED, KBUILD_MODNAME, dev); ++ if (ret) { ++ dev_err(&pdev->dev, "request_irq failed\n"); ++ goto unmap_regs; ++ } ++ ++ dev->pdev = pdev; ++ dev->ch_max = TW_CH_MAX; ++ spin_lock_init(&dev->rlock); ++ ++ ret = tw6869_video_register(dev); ++ if (ret) ++ goto unmap_regs; ++ ++ ret = tw6869_audio_register(dev); ++ if (ret) ++ goto video_unreg; ++ ++ dev_info(&pdev->dev, "driver loaded\n"); ++ return 0; ++ ++video_unreg: ++ tw6869_video_unregister(dev); ++unmap_regs: ++ pci_iounmap(pdev, dev->mmio); ++release_regs: ++ pci_release_regions(pdev); ++disable_pci: ++ pci_disable_device(pdev); ++ return ret; ++} ++ ++static void tw6869_remove(struct pci_dev *pdev) ++{ ++ struct v4l2_device *v4l2_dev = pci_get_drvdata(pdev); ++ struct tw6869_dev *dev = ++ container_of(v4l2_dev, struct tw6869_dev, v4l2_dev); ++ ++ tw6869_audio_unregister(dev); ++ tw6869_video_unregister(dev); ++ pci_iounmap(pdev, dev->mmio); ++ pci_release_regions(pdev); ++ pci_disable_device(pdev); ++} ++ ++/* TODO: PM */ ++static struct pci_driver tw6869_driver = { ++ .name = KBUILD_MODNAME, ++ .probe = tw6869_probe, ++ .remove = tw6869_remove, ++ .id_table = tw6869_pci_tbl, ++}; ++ ++module_pci_driver(tw6869_driver); +diff -Nur linux-4.1.10/drivers/media/pci/tw6869/tw6869.h xbian-sources-kernel/drivers/media/pci/tw6869/tw6869.h +--- linux-4.1.10/drivers/media/pci/tw6869/tw6869.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/pci/tw6869/tw6869.h 2015-10-11 19:49:28.467235678 +0200 +@@ -0,0 +1,119 @@ ++/* ++ * Copyright 2015 www.starterkit.ru <info@starterkit.ru> ++ * ++ * Based on: ++ * tw686x common header file ++ * Copyright 2009-10 liran <jlee@techwellinc.com.cn> [Techwell China] ++ * ++ * This program is free software; you may redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; version 2 of the License. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef __TW6869_H ++#define __TW6869_H ++ ++#define PCI_VENDOR_ID_TECHWELL 0x1797 ++#define PCI_DEVICE_ID_6869 0x6869 ++ ++#define TW_CH_MAX 8 ++#define TW_VIN_MAX 4 ++#define TW_FRAME_MAX 4 ++#define TW_APAGE_MAX 16 ++#define TW_DMA_ERR_MAX 5 ++#define TW_PAGE_SIZE 4096 ++ ++#define TW_VID 0x00FF ++#define TW_AID 0xFF00 ++#define TW_CH_0to3 0x0F ++#define TW_CH_4to7 0xF0 ++ ++#define ID2ID(id) ((id) & 0xF) ++#define ID2CH(id) ((id) & 0x7) ++#define ID2SC(id) ((id) & 0x3) ++ ++#define BIT_ID(id) BIT((id) & 0xF) ++#define BIT_CH(id) BIT((id) & 0x7) ++#define BIT_SC(id) BIT((id) & 0x3) ++ ++#define IS_VID(id) (BIT_ID(id) & TW_VID) ++#define IS_CH03(id) (BIT_CH(id) & TW_CH_0to3) ++ ++#define TW_FIFO_ERR(id) ((BIT(24) | BIT(16)) << ID2CH(id)) ++#define TW_PARS_ERR(id) ((BIT(8) | BIT(0)) << ID2CH(id)) ++#define TW_VERR(id) (IS_VID(id) ? TW_FIFO_ERR(id) : 0) ++ ++#define TW_DMA_ON 1 ++#define TW_DMA_OFF 2 ++#define TW_DMA_RST 3 ++ ++#define TW_STD_NTSC_M 0 ++#define TW_STD_PAL 1 ++#define TW_STD_SECAM 2 ++#define TW_STD_NTSC_443 3 ++#define TW_STD_PAL_M 4 ++#define TW_STD_PAL_CN 5 ++#define TW_STD_PAL_60 6 ++ ++#define TW_FMT_UYVY 0 ++#define TW_FMT_RGB565 5 ++#define TW_FMT_YUYV 6 ++ ++/** ++ * Register definitions ++ */ ++#define R32_INT_STATUS 0x000 /* 0x00 */ ++#define R32_PB_STATUS 0x004 /* 0x01 */ ++#define R32_DMA_CMD 0x008 /* 0x02 */ ++#define R32_FIFO_STATUS 0x00C /* 0x03 */ ++#define R32_VIDEO_CHANNEL_ID 0x010 /* 0x04 */ ++#define R32_VIDEO_PARSER_STATUS 0x014 /* 0x05 */ ++#define R32_SYS_SOFT_RST 0x018 /* 0x06 */ ++#define R32_DMA_CHANNEL_ENABLE 0x028 /* 0x0a */ ++#define R32_DMA_CONFIG 0x02C /* 0x0b */ ++#define R32_DMA_TIMER_INTERVAL 0x030 /* 0x0c */ ++#define R32_DMA_CHANNEL_TIMEOUT 0x034 /* 0x0d */ ++#define R32_DMA_CHANNEL_CONFIG(id) (0x040 + ID2CH(id) * 0x04) /* 0x10 */ ++#define R32_VIDEO_CONTROL1 0x0A8 /* 0x2A */ ++#define R32_VIDEO_CONTROL2 0x0AC /* 0x2B */ ++#define R32_AUDIO_CONTROL1 0x0B0 /* 0x2C */ ++#define R32_AUDIO_CONTROL2 0x0B4 /* 0x2D */ ++#define R32_PHASE_REF 0x0B8 /* 0x2E */ ++#define R32_VIDEO_FIELD_CTRL(id) (0x0E4 + ID2CH(id) * 0x04) /* 0x39 */ ++#define R32_DMA_P_ADDR(id) (IS_VID(id) ? (0x200 + ID2CH(id) * 0x20) : (0x060 + ID2CH(id) * 0x08)) ++#define R32_DMA_B_ADDR(id) (IS_VID(id) ? (0x208 + ID2CH(id) * 0x20) : (0x064 + ID2CH(id) * 0x08)) ++#define R32_DMA_WHP(id) (0x204 + ID2CH(id) * 0x20) /* 0x81 */ ++ ++/* 0x100, 0x200 */ ++#define R8_VIDEO_STATUS(id) ((IS_CH03(id) ? 0x400 : 0x800) + ID2SC(id) * 0x40) ++/* 0x101, 0x201 */ ++#define R8_BRIGHT_CTRL(id) ((IS_CH03(id) ? 0x404 : 0x804) + ID2SC(id) * 0x40) ++/* 0x102, 0x202 */ ++#define R8_CONTRAST_CTRL(id) ((IS_CH03(id) ? 0x408 : 0x808) + ID2SC(id) * 0x40) ++/* 0x104, 0x204 */ ++#define R8_SAT_U_CTRL(id) ((IS_CH03(id) ? 0x410 : 0x810) + ID2SC(id) * 0x40) ++/* 0x105, 0x205 */ ++#define R8_SAT_V_CTRL(id) ((IS_CH03(id) ? 0x414 : 0x814) + ID2SC(id) * 0x40) ++/* 0x106, 0x206 */ ++#define R8_HUE_CTRL(id) ((IS_CH03(id) ? 0x418 : 0x818) + ID2SC(id) * 0x40) ++/* 0x10E, 0x20E */ ++#define R8_STANDARD_SEL(id) ((IS_CH03(id) ? 0x438 : 0x838) + ID2SC(id) * 0x40) ++/* 0x180, 0x280 */ ++#define R8_AVSRST(id) (IS_CH03(id) ? 0x600 : 0xA00) ++/* 0x18F, 0x28F */ ++#define R8_VERTICAL_CONTROL1(id) (IS_CH03(id) ? 0x63C : 0xA3C) ++/* 0x196, 0x296 */ ++#define R8_MISC_CONTROL1(id) (IS_CH03(id) ? 0x658 : 0xA58) ++/* 0x1D0, 0x2D0 */ ++#define R8_AIGAIN_CTRL(id) ((IS_CH03(id) ? 0x740 : 0xB40) + ID2SC(id) * 0x04) ++ ++#endif /* __TW6869_H */ +diff -Nur linux-4.1.10/drivers/media/platform/Kconfig xbian-sources-kernel/drivers/media/platform/Kconfig +--- linux-4.1.10/drivers/media/platform/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/platform/Kconfig 2015-10-11 19:49:28.471235413 +0200 @@ -114,6 +114,22 @@ To compile this driver as a module, choose M here: the module will be called s3c-camif. @@ -117900,22 +128647,20 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/Kconfig linux-4.1.10/drivers/ source "drivers/media/platform/soc_camera/Kconfig" source "drivers/media/platform/exynos4-is/Kconfig" source "drivers/media/platform/s5p-tv/Kconfig" -diff -Nur linux-4.1.10.orig/drivers/media/platform/Makefile linux-4.1.10/drivers/media/platform/Makefile ---- linux-4.1.10.orig/drivers/media/platform/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/media/platform/Makefile 2015-10-10 16:41:42.533314845 +0200 -@@ -50,4 +50,9 @@ +diff -Nur linux-4.1.10/drivers/media/platform/Makefile xbian-sources-kernel/drivers/media/platform/Makefile +--- linux-4.1.10/drivers/media/platform/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/platform/Makefile 2015-10-11 19:49:28.471235413 +0200 +@@ -50,4 +50,7 @@ obj-$(CONFIG_VIDEO_XILINX) += xilinx/ -+obj-$(CONFIG_VIDEO_V4L2_INT_DEVICE) += v4l2-int-device.o -+ +obj-y += mxc/capture/ +obj-y += mxc/output/ + ccflags-y += -I$(srctree)/drivers/media/i2c -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/adv7180.c linux-4.1.10/drivers/media/platform/mxc/capture/adv7180.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/adv7180.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/adv7180.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/adv7180.c xbian-sources-kernel/drivers/media/platform/mxc/capture/adv7180.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/adv7180.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/adv7180.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,1344 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -119261,9 +130006,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/adv7180.c linux-4 +MODULE_AUTHOR("Freescale Semiconductor"); +MODULE_DESCRIPTION("Anolog Device ADV7180 video decoder driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/csi_v4l2_capture.c linux-4.1.10/drivers/media/platform/mxc/capture/csi_v4l2_capture.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/csi_v4l2_capture.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/csi_v4l2_capture.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/csi_v4l2_capture.c xbian-sources-kernel/drivers/media/platform/mxc/capture/csi_v4l2_capture.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/csi_v4l2_capture.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/csi_v4l2_capture.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,2047 @@ +/* + * Copyright 2009-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -121312,9 +132057,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/csi_v4l2_capture. +MODULE_DESCRIPTION("V4L2 capture driver for Mx25 based cameras"); +MODULE_LICENSE("GPL"); +MODULE_SUPPORTED_DEVICE("video"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/fsl_csi.c linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/fsl_csi.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.c xbian-sources-kernel/drivers/media/platform/mxc/capture/fsl_csi.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/fsl_csi.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,302 @@ +/* + * Copyright 2009-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -121618,9 +132363,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/fsl_csi.c linux-4 +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("fsl CSI driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/fsl_csi.h linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.h ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/fsl_csi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.h 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.h xbian-sources-kernel/drivers/media/platform/mxc/capture/fsl_csi.h +--- linux-4.1.10/drivers/media/platform/mxc/capture/fsl_csi.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/fsl_csi.h 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,198 @@ +/* + * Copyright 2009-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -121820,9 +132565,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/fsl_csi.h linux-4 +void csi_mclk_disable(void); +void csi_dmareq_rff_enable(void); +void csi_dmareq_rff_disable(void); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c linux-4.1.10/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,493 @@ + +/* @@ -122317,10 +133062,10 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_bg_overlay_sd +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("IPU PRP VF SDC Backgroud Driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_csi_enc.c linux-4.1.10/drivers/media/platform/mxc/capture/ipu_csi_enc.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_csi_enc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_csi_enc.c 2015-10-10 16:41:42.533314845 +0200 -@@ -0,0 +1,371 @@ +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_csi_enc.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_csi_enc.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_csi_enc.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_csi_enc.c 2015-10-11 19:49:28.483234617 +0200 +@@ -0,0 +1,384 @@ +/* + * Copyright 2009-2014 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -122392,6 +133137,12 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_csi_enc.c lin + u32 pixel_fmt; + int err = 0, sensor_protocol = 0; + dma_addr_t dummy = cam->dummy_frame.buffer.m.offset; ++#ifdef CONFIG_MXC_MIPI_CSI2 ++ void *mipi_csi2_info; ++ int ipu_id; ++ int csi_id; ++#endif ++ struct v4l2_format cam_fmt; + + CAMERA_TRACE("In csi_enc_setup\n"); + if (!cam) { @@ -122428,7 +133179,14 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_csi_enc.c lin + else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_YUV422P) + pixel_fmt = IPU_PIX_FMT_YUV422P; + else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_UYVY) -+ pixel_fmt = IPU_PIX_FMT_UYVY; ++ { ++ cam_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ vidioc_int_g_fmt_cap(cam->sensor, &cam_fmt); ++ if (cam_fmt.fmt.pix.pixelformat == IPU_PIX_FMT_GENERIC_16) ++ pixel_fmt = cam_fmt.fmt.pix.pixelformat; ++ else ++ pixel_fmt = IPU_PIX_FMT_UYVY; ++ } + else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_YUYV) + pixel_fmt = IPU_PIX_FMT_YUYV; + else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_NV12) @@ -122692,9 +133450,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_csi_enc.c lin +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("CSI ENC Driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c linux-4.1.10/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,580 @@ +/* + * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -123276,9 +134034,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_fg_overlay_sd +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("IPU PRP VF SDC Driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_enc.c linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_enc.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_enc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_enc.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_enc.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_enc.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_enc.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_enc.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,538 @@ +/* + * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -123818,9 +134576,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_enc.c lin +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("IPU PRP ENC Driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_sw.h linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_sw.h ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_sw.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_sw.h 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_sw.h xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_sw.h +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_sw.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_sw.h 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,43 @@ +/* + * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -123865,9 +134623,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_sw.h linu +int prp_still_deselect(void *private); + +#endif -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,472 @@ +/* + * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -124341,9 +135099,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("IPU PRP VF SDC Backgroud Driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,528 @@ +/* + * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -124873,9 +135631,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("IPU PRP VF SDC Driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_still.c linux-4.1.10/drivers/media/platform/mxc/capture/ipu_still.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_still.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ipu_still.c 2015-10-10 16:41:42.533314845 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ipu_still.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_still.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ipu_still.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ipu_still.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,269 @@ +/* + * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -125146,10 +135904,10 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ipu_still.c linux +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("IPU PRP STILL IMAGE Driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/Kconfig linux-4.1.10/drivers/media/platform/mxc/capture/Kconfig ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/Kconfig 2015-10-10 16:41:42.533314845 +0200 -@@ -0,0 +1,92 @@ +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/Kconfig xbian-sources-kernel/drivers/media/platform/mxc/capture/Kconfig +--- linux-4.1.10/drivers/media/platform/mxc/capture/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/Kconfig 2015-10-11 19:49:28.483234617 +0200 +@@ -0,0 +1,106 @@ +if VIDEO_MXC_CAPTURE + +menu "MXC Camera/V4L2 PRP Features support" @@ -125164,6 +135922,12 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/Kconfig linux-4.1 + ---help--- + This is the video4linux2 capture driver based on CSI module. + ++config MXC_TVIN_TDA1997X ++ tristate "NXP TDA1997x HDMI Receiver Input support" ++ depends on I2C ++ ---help--- ++ If you plan to use the NXP tda1997x/tdf1997x HDMI reciever with your i ++ +config MXC_CAMERA_OV5640 + tristate "OmniVision ov5640 camera support" + depends on !VIDEO_MXC_EMMA_CAMERA && I2C @@ -125188,6 +135952,14 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/Kconfig linux-4.1 + ---help--- + If you plan to use the ov5647 Camera with mipi interface in your MXC system, say Y here. + ++config MXC_HDMI_CSI2_TC358743 ++ tristate "Toshiba tc358743 Hdmi to CSI 2 bridge" ++ depends on !VIDEO_MXC_EMMA_CAMERA && I2C ++ select MXC_MIPI_CSI2 if ARCH_MX6Q ++ select MXC_CAMERA_SENSOR_CLK ++ ---help--- ++ Toshina HDMI to MIPI-CSI2 bridge ++ +config MXC_TVIN_ADV7180 + tristate "Analog Device adv7180 TV Decoder Input support" + depends on !VIDEO_MXC_EMMA_CAMERA && I2C @@ -125242,10 +136014,10 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/Kconfig linux-4.1 +endmenu + +endif -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/Makefile linux-4.1.10/drivers/media/platform/mxc/capture/Makefile ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/Makefile 2015-10-10 16:41:42.533314845 +0200 -@@ -0,0 +1,24 @@ +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/Makefile xbian-sources-kernel/drivers/media/platform/mxc/capture/Makefile +--- linux-4.1.10/drivers/media/platform/mxc/capture/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/Makefile 2015-10-11 19:49:28.483234617 +0200 +@@ -0,0 +1,32 @@ +obj-$(CONFIG_VIDEO_MXC_CSI_CAMERA) += fsl_csi.o csi_v4l2_capture.o + +ifeq ($(CONFIG_VIDEO_MXC_IPU_CAMERA),y) @@ -125268,12 +136040,20 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/Makefile linux-4. +ov5647_camera_mipi-objs := ov5647_mipi.o +obj-$(CONFIG_MXC_CAMERA_OV5647_MIPI) += ov5647_camera_mipi.o + ++tc358743_h2c_bridge-objs := tc358743_h2c.o ++obj-$(CONFIG_MXC_HDMI_CSI2_TC358743) += tc358743_h2c_bridge.o ++ +adv7180_tvin-objs := adv7180.o +obj-$(CONFIG_MXC_TVIN_ADV7180) += adv7180_tvin.o -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c 2015-10-10 16:41:42.533314845 +0200 -@@ -0,0 +1,3328 @@ ++ ++obj-$(CONFIG_VIDEO_V4L2_INT_DEVICE) += v4l2-int-device.o ++ ++tda1997x-video-objs := tda1997x.o ++obj-$(CONFIG_MXC_TVIN_TDA1997X) += tda1997x-video.o +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c xbian-sources-kernel/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c 2015-10-11 19:49:28.483234617 +0200 +@@ -0,0 +1,3384 @@ +/* + * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -125318,9 +136098,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. +#include <linux/regmap.h> +#include <media/v4l2-chip-ident.h> +#include <media/v4l2-ioctl.h> -+#include <media/v4l2-int-device.h> ++#include <media/v4l2-device.h> ++#include "v4l2-int-device.h" +#include <linux/fsl_devices.h> -+#include <uapi/linux/mxc_v4l2.h> +#include "mxc_v4l2_capture.h" +#include "../v4l2-extra.h" +#include "ipu_prp_sw.h" @@ -126662,9 +137442,14 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. +// csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE; +// break; + default: -+ csi_param.clk_mode = (ifparm.u.bt656.clock_curr == 0) ? -+ IPU_CSI_CLK_MODE_CCIR656_INTERLACED : -+ IPU_CSI_CLK_MODE_GATED_CLK; ++ if (ifparm.u.bt656.clock_curr == 0) { ++ csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED; ++ /*protocol bt656 use 27Mhz pixel clock */ ++ csi_param.mclk = 27000000; ++ } else if (ifparm.u.bt656.clock_curr == 1) { ++ csi_param.clk_mode = IPU_CSI_CLK_MODE_GATED_CLK; ++ } else ++ csi_param.clk_mode = IPU_CSI_CLK_MODE_GATED_CLK; + } + + csi_param.pixclk_pol = ifparm.u.bt656.latch_clk_inv; @@ -126848,7 +137633,6 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + /* Get new values. */ + setup_ifparm(cam, 0); + -+ +exit: + if (cam->overlay_on == true) + start_preview(cam); @@ -126869,17 +137653,26 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. +static int mxc_v4l2_s_std(cam_data *cam, v4l2_std_id e) +{ + pr_debug("%s: %Lx\n", __func__, e); -+ if (e == V4L2_STD_PAL) { ++ switch (e) { ++ case V4L2_STD_PAL: + pr_debug(" Setting standard to PAL %Lx\n", V4L2_STD_PAL); + cam->standard.id = V4L2_STD_PAL; + video_index = TV_PAL; -+ } else if (e == V4L2_STD_NTSC) { ++ break; ++ case V4L2_STD_NTSC: + pr_debug(" Setting standard to NTSC %Lx\n", + V4L2_STD_NTSC); + /* Get rid of the white dot line in NTSC signal input */ + cam->standard.id = V4L2_STD_NTSC; + video_index = TV_NTSC; -+ } else { ++ break; ++ case V4L2_STD_UNKNOWN: ++ case V4L2_STD_ALL: ++ /* auto-detect don't report an error */ ++ cam->standard.id = V4L2_STD_ALL; ++ video_index = TV_NOT_LOCKED; ++ break; ++ default: + cam->standard.id = V4L2_STD_ALL; + video_index = TV_NOT_LOCKED; + pr_err("ERROR: unrecognized std! %Lx (PAL=%Lx, NTSC=%Lx\n", @@ -126956,7 +137749,8 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + pr_debug("%s\n", __func__); + + if (!wait_event_interruptible_timeout(cam->enc_queue, -+ cam->enc_counter != 0, 50 * HZ)) { ++ cam->enc_counter != 0, ++ 50 * HZ)) { + pr_err("ERROR: v4l2 capture: mxc_v4l_dqueue timeout " + "enc_counter %x\n", + cam->enc_counter); @@ -127071,7 +137865,8 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + + sensor = cam->sensor->priv; + if (!sensor) { -+ pr_err("%s: Internal error, sensor_data is not found!\n", __func__); ++ pr_err("%s: Internal error, sensor_data is not found!\n", ++ __func__); + return -EBADF; + } + pr_debug("%s: %s ipu%d/csi%d\n", __func__, dev->name, @@ -127170,13 +137965,15 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + } + + if (!cam->sensor) { -+ pr_err("%s: Internal error, camera is not found!\n", __func__); ++ pr_err("%s: Internal error, camera is not found!\n", ++ __func__); + return -EBADF; + } + + sensor = cam->sensor->priv; + if (!sensor) { -+ pr_err("%s: Internal error, sensor_data is not found!\n", __func__); ++ pr_err("%s: Internal error, sensor_data is not found!\n", ++ __func__); + return -EBADF; + } + @@ -127824,6 +138621,17 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + } + break; + } ++ case VIDIOC_ENUM_FRAMEINTERVALS: { ++ struct v4l2_frmivalenum *fival = arg; ++ if (cam->sensor) { ++ retval = vidioc_int_enum_frameintervals(cam->sensor, ++ fival); ++ } else { ++ pr_err("ERROR: v4l2 capture: slave not found!\n"); ++ retval = -ENODEV; ++ } ++ break; ++ } + case VIDIOC_DBG_G_CHIP_IDENT: { + struct v4l2_dbg_chip_ident *p = arg; + p->ident = V4L2_IDENT_NONE; @@ -127950,7 +138758,7 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + .open = mxc_v4l_open, + .release = mxc_v4l_close, + .read = mxc_v4l_read, -+// .ioctl = mxc_v4l_ioctl, ++ .unlocked_ioctl = mxc_v4l_ioctl, + .mmap = mxc_mmap, + .poll = mxc_poll, +}; @@ -128066,6 +138874,7 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + struct device_node *np = pdev->dev.of_node; + int ipu_id, csi_id, mclk_source, mipi_camera, def_input; + int ret = 0; ++ struct v4l2_device *v4l2_dev; + static int camera_id; + + pr_debug("%s\n", __func__); @@ -128130,6 +138939,21 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + dev_set_drvdata(&pdev->dev, (void *)cam); + cam->video_dev->minor = -1; + ++ v4l2_dev = kzalloc(sizeof(*v4l2_dev), GFP_KERNEL); ++ if (!v4l2_dev) { ++ dev_err(&pdev->dev, "failed to allocate v4l2_dev structure\n"); ++ video_device_release(cam->video_dev); ++ return -ENOMEM; ++ } ++ ++ if (v4l2_device_register(&pdev->dev, v4l2_dev) < 0) { ++ dev_err(&pdev->dev, "register v4l2 device failed\n"); ++ video_device_release(cam->video_dev); ++ kfree(v4l2_dev); ++ return -ENODEV; ++ } ++ cam->video_dev->v4l2_dev = v4l2_dev; ++ + init_waitqueue_head(&cam->enc_queue); + init_waitqueue_head(&cam->still_queue); + @@ -128246,6 +139070,8 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + */ +static int mxc_v4l2_probe(struct platform_device *pdev) +{ ++ int err; ++ + /* Create cam and initialize it. */ + cam_data *cam = kmalloc(sizeof(cam_data), GFP_KERNEL); + if (cam == NULL) { @@ -128253,7 +139079,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + return -1; + } + -+ init_camera_struct(cam, pdev); ++ err = init_camera_struct(cam, pdev); ++ if (err) ++ return err; + pdev->dev.release = camera_platform_release; + + /* Set up the v4l2 device and register it*/ @@ -128262,14 +139090,17 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + + /* register v4l video device */ + if (video_register_device(cam->video_dev, VFL_TYPE_GRABBER, video_nr) -+ == -1) { ++ < 0) { + kfree(cam); + cam = NULL; + pr_err("ERROR: v4l2 capture: video_register_device failed\n"); + return -1; + } -+ pr_debug(" Video device registered: %s #%d\n", -+ cam->video_dev->name, cam->video_dev->minor); ++ ++ pr_info("V4L2 device '%s' on IPU%d_CSI%d registered as %s\n", ++ cam->video_dev->name, ++ cam->ipu_id + 1, cam->csi, ++ video_device_node_name(cam->video_dev)); + + if (device_create_file(&cam->video_dev->dev, + &dev_attr_fsl_v4l2_capture_property)) @@ -128306,6 +139137,7 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + "-- setting ops to NULL\n"); + return -EBUSY; + } else { ++ struct v4l2_device *v4l2_dev = cam->video_dev->v4l2_dev; + device_remove_file(&cam->video_dev->dev, + &dev_attr_fsl_v4l2_capture_property); + device_remove_file(&cam->video_dev->dev, @@ -128326,6 +139158,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + + mxc_free_frame_buf(cam); + kfree(cam); ++ ++ v4l2_device_unregister(v4l2_dev); ++ kfree(v4l2_dev); + } + + pr_info("V4L2 unregistering video\n"); @@ -128468,7 +139303,8 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + cam->all_sensors[cam->sensor_index] = slave; + cam->sensor_index++; + } else { -+ pr_err("ERROR: v4l2 capture: slave number exceeds the maximum.\n"); ++ pr_err("ERROR: v4l2 capture: slave number exceeds " ++ "the maximum.\n"); + return -1; + } + @@ -128602,9 +139438,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. +MODULE_DESCRIPTION("V4L2 capture driver for Mxc based cameras"); +MODULE_LICENSE("GPL"); +MODULE_SUPPORTED_DEVICE("video"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h 2015-10-10 16:41:42.537314846 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h xbian-sources-kernel/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h +--- linux-4.1.10/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/mxc_v4l2_capture.h 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,355 @@ +/* + * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -128646,7 +139482,7 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. +#include <linux/mipi_csi2.h> + +#include <media/v4l2-dev.h> -+#include <media/v4l2-int-device.h> ++#include "v4l2-int-device.h" + + +#define FRAME_NUM 10 @@ -128961,9 +139797,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/mxc_v4l2_capture. + return 0; +} +#endif /* __MXC_V4L2_CAPTURE_H__ */ -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5640.c linux-4.1.10/drivers/media/platform/mxc/capture/ov5640.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5640.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ov5640.c 2015-10-10 16:41:42.537314846 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ov5640.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5640.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ov5640.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5640.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,1959 @@ +/* + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -130924,9 +141760,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5640.c linux-4. +MODULE_LICENSE("GPL"); +MODULE_VERSION("1.0"); +MODULE_ALIAS("CSI"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5640_mipi.c linux-4.1.10/drivers/media/platform/mxc/capture/ov5640_mipi.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5640_mipi.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ov5640_mipi.c 2015-10-10 16:41:42.537314846 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ov5640_mipi.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5640_mipi.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ov5640_mipi.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5640_mipi.c 2015-10-11 19:49:28.483234617 +0200 @@ -0,0 +1,2193 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -133121,9 +143957,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5640_mipi.c lin +MODULE_LICENSE("GPL"); +MODULE_VERSION("1.0"); +MODULE_ALIAS("CSI"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5642.c linux-4.1.10/drivers/media/platform/mxc/capture/ov5642.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5642.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ov5642.c 2015-10-10 16:41:42.545314843 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ov5642.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5642.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ov5642.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5642.c 2015-10-11 19:49:28.487234352 +0200 @@ -0,0 +1,6294 @@ +/* + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -139419,10 +150255,10 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5642.c linux-4. +MODULE_LICENSE("GPL"); +MODULE_VERSION("1.0"); +MODULE_ALIAS("CSI"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5647_mipi.c linux-4.1.10/drivers/media/platform/mxc/capture/ov5647_mipi.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5647_mipi.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/capture/ov5647_mipi.c 2015-10-10 16:41:42.549314841 +0200 -@@ -0,0 +1,3781 @@ +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/ov5647_mipi.c xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5647_mipi.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/ov5647_mipi.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/ov5647_mipi.c 2015-10-11 19:49:28.487234352 +0200 +@@ -0,0 +1,3780 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -139458,7 +150294,6 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5647_mipi.c lin +#include <linux/fsl_devices.h> +#include <linux/mipi_csi2.h> +#include <media/v4l2-chip-ident.h> -+#include <media/v4l2-int-device.h> +#include "mxc_v4l2_capture.h" + +#define OV5647_VOLTAGE_ANALOG 2800000 @@ -143204,23 +154039,4646 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5647_mipi.c lin +MODULE_LICENSE("GPL"); +MODULE_VERSION("1.0"); +MODULE_ALIAS("CSI"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/output/Kconfig linux-4.1.10/drivers/media/platform/mxc/output/Kconfig ---- linux-4.1.10.orig/drivers/media/platform/mxc/output/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/output/Kconfig 2015-10-10 16:41:42.549314841 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/tc358743_h2c.c xbian-sources-kernel/drivers/media/platform/mxc/capture/tc358743_h2c.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/tc358743_h2c.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/tc358743_h2c.c 2015-10-11 19:49:28.487234352 +0200 +@@ -0,0 +1,3674 @@ ++/* ++ * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved. ++ * Copyright (C) 2014 Boundary Devices ++ */ ++ ++/* ++ * Modifyed by: Edison Fernández <edison.fernandez@ridgerun.com> ++ * Added support to use it with Nitrogen6x ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ ++ * 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. ++ ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ */ ++ ++#include <linux/module.h> ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/ctype.h> ++#include <linux/types.h> ++#include <linux/delay.h> ++#include <linux/device.h> ++#include <linux/clk.h> ++#include <linux/i2c.h> ++#include <linux/of_gpio.h> ++#include <linux/regulator/consumer.h> ++#include <linux/fsl_devices.h> ++#include <linux/mutex.h> ++#include <linux/mipi_csi2.h> ++#include <media/v4l2-chip-ident.h> ++#include "v4l2-int-device.h" ++#include <sound/core.h> ++#include <sound/pcm.h> ++#include <sound/soc.h> ++#include <sound/jack.h> ++#include <sound/soc-dapm.h> ++#include <asm/mach-types.h> ++//#include <mach/audmux.h> ++#include <linux/slab.h> ++#include "mxc_v4l2_capture.h" ++ ++#define CODEC_CLOCK 16500000 ++/* SSI clock sources */ ++#define IMX_SSP_SYS_CLK 0 ++ ++#define MIN_FPS 30 ++#define MAX_FPS 60 ++#define DEFAULT_FPS 60 ++ ++#define TC358743_XCLK_MIN 27000000 ++#define TC358743_XCLK_MAX 42000000 ++ ++#define TC358743_CHIP_ID_HIGH_BYTE 0x0 ++#define TC358743_CHIP_ID_LOW_BYTE 0x0 ++#define TC3587430_HDMI_DETECT 0x0f //0x10 ++ ++#define TC_VOLTAGE_DIGITAL_IO 1800000 ++#define TC_VOLTAGE_DIGITAL_CORE 1500000 ++#define TC_VOLTAGE_DIGITAL_GPO 1500000 ++#define TC_VOLTAGE_ANALOG 2800000 ++ ++#define MAX_COLORBAR tc358743_mode_INIT6 ++#define IS_COLORBAR(a) (a <= MAX_COLORBAR) ++ ++enum tc358743_mode { ++ tc358743_mode_INIT, ++ tc358743_mode_INIT1, ++ tc358743_mode_INIT2, ++ tc358743_mode_INIT3, ++ tc358743_mode_INIT4, ++ tc358743_mode_INIT5, ++ tc358743_mode_INIT6, ++ tc358743_mode_480P_720_480, ++ tc358743_mode_720P_60_1280_720, ++ tc358743_mode_480P_640_480, ++ tc358743_mode_1080P_1920_1080, ++ tc358743_mode_720P_1280_720, ++ tc358743_mode_1024x768, ++ tc358743_mode_MAX, ++}; ++ ++enum tc358743_frame_rate { ++ tc358743_60_fps, ++ tc358743_30_fps, ++ tc358743_max_fps ++}; ++ ++struct reg_value { ++ u16 u16RegAddr; ++ u32 u32Val; ++ u32 u32Mask; ++ u8 u8Length; ++ u32 u32Delay_ms; ++}; ++ ++struct tc358743_mode_info { ++ const char *name; ++ enum tc358743_mode mode; ++ u32 width; ++ u32 height; ++ u32 vformat; ++ u32 fps; ++ u32 lanes; ++ u32 freq; ++ const struct reg_value *init_data_ptr; ++ u32 init_data_size; ++ __u32 flags; ++}; ++ ++/*! ++ * Maintains the information on the current state of the sensor. ++ */ ++struct tc_data { ++ struct sensor_data sensor; ++ struct delayed_work det_work; ++ struct mutex access_lock; ++ int det_work_enable; ++ int det_work_timeout; ++ int det_changed; ++#define REGULATOR_IO 0 ++#define REGULATOR_CORE 1 ++#define REGULATOR_GPO 2 ++#define REGULATOR_ANALOG 3 ++#define REGULATOR_CNT 4 ++ struct regulator *regulator[REGULATOR_CNT]; ++#ifdef CONFIG_TC358743_AUDIO ++ struct platform_device *snd_device; ++#endif ++ u32 lock; ++ u32 bounce; ++ enum tc358743_mode mode; ++ u32 fps; ++ u32 audio; ++ int pwn_gpio; ++ int rst_gpio; ++ u16 hpd_active; ++ int edid_initialized; ++}; ++ ++static struct tc_data *g_td; ++ ++ ++#define DET_WORK_TIMEOUT_DEFAULT 100 ++#define DET_WORK_TIMEOUT_DEFERRED 2000 ++#define MAX_BOUNCE 5 ++ ++static void tc_standby(struct tc_data *td, s32 standby) ++{ ++ if (gpio_is_valid(td->pwn_gpio)) ++ gpio_set_value(td->pwn_gpio, standby ? 1 : 0); ++ pr_debug("tc_standby: powerdown=%x, power_gp=0x%x\n", standby, td->pwn_gpio); ++ msleep(2); ++} ++ ++static void tc_reset(struct tc_data *td) ++{ ++ /* camera reset */ ++ gpio_set_value(td->rst_gpio, 1); ++ ++ /* camera power dowmn */ ++ if (gpio_is_valid(td->pwn_gpio)) { ++ gpio_set_value(td->pwn_gpio, 1); ++ msleep(5); ++ ++ gpio_set_value(td->pwn_gpio, 0); ++ } ++ msleep(5); ++ ++ gpio_set_value(td->rst_gpio, 0); ++ msleep(1); ++ ++ gpio_set_value(td->rst_gpio, 1); ++ msleep(20); ++ ++ if (gpio_is_valid(td->pwn_gpio)) ++ gpio_set_value(td->pwn_gpio, 1); ++} ++ ++static void tc_io_init(void) ++{ ++ return tc_reset(g_td); ++} ++ ++const char * const sregulator[REGULATOR_CNT] = { ++ [REGULATOR_IO] = "DOVDD", ++ [REGULATOR_CORE] = "DVDD", ++ [REGULATOR_GPO] = "DGPO", ++ [REGULATOR_ANALOG] = "AVDD", ++}; ++ ++static const int voltages[REGULATOR_CNT] = { ++ [REGULATOR_IO] = TC_VOLTAGE_DIGITAL_IO, ++ [REGULATOR_CORE] = TC_VOLTAGE_DIGITAL_CORE, ++ [REGULATOR_GPO] = TC_VOLTAGE_DIGITAL_GPO, ++ [REGULATOR_ANALOG] = TC_VOLTAGE_ANALOG, ++}; ++ ++static int tc_regulator_init(struct tc_data *td, struct device *dev) ++{ ++ int i; ++ int ret = 0; ++ ++ for (i = 0; i < REGULATOR_CNT; i++) { ++ td->regulator[i] = devm_regulator_get(dev, sregulator[i]); ++ if (!IS_ERR(td->regulator[i])) { ++ regulator_set_voltage(td->regulator[i], ++ voltages[i], voltages[i]); ++ } else { ++ pr_err("%s:%s devm_regulator_get failed\n", __func__, sregulator[i]); ++ td->regulator[i] = NULL; ++ } ++ } ++ return ret; ++} ++ ++static void det_work_enable(struct tc_data *td, int enable) ++{ ++ td->det_work_enable = enable; ++ td->det_work_timeout = DET_WORK_TIMEOUT_DEFERRED; ++ if (enable) ++ schedule_delayed_work(&td->det_work, msecs_to_jiffies(10)); ++ pr_debug("%s: %d %d\n", __func__, td->det_work_enable, td->det_work_timeout); ++} ++ ++static const u8 cHDMIEDID[256] = { ++ /* FIXME! This is the edid that my ASUS HDMI monitor returns */ ++ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //0 - header[8] - fixed pattern ++ 0x04, 0x69, //8 - manufacturer_name[2] ++ 0xf3, 0x24, //10 - product_code[2] ++ 0xd6, 0x12, 0x00, 0x00, //12 - serial_number[4] ++ 0x16, //16 - week ++ 0x16, //17 - year 22+1990=2012 ++ 0x01, //18 - version ++ 0x03, //19 - revision ++ 0x80, //20 - video_input_definition(digital input) ++ 0x34, //21 - max_size_horizontal 52cm ++ 0x1d, //22 - max_size_vertical 29cm ++ 0x78, //23 - gamma ++ 0x3a, //24 - feature_support (RGB 4:4:4 + YCrCb 4:4:4 + YCrCb 4:2:2) ++ 0xc7, 0x20, 0xa4, 0x55, 0x49, 0x99, 0x27, 0x13, 0x50, 0x54, //25 - color_characteristics[10] ++ 0xbf, 0xef, 0x00, //35 - established_timings[3] ++ 0x71, 0x4f, 0x81, 0x40, 0x81, 0x80, 0x95, 0x00, 0xb3, 0x00, 0xd1, 0xc0, 0x01, 0x01, 0x01, 0x01, //38 - standard_timings[8] ++/* 1080P */ ++ 0x02, 0x3a, //54(0) - descriptor[0], 0x3a02 = 148.50 MHz ++ 0x80, //56(2) h - active 0x780 (1920) ++ 0x18, //57(3) h - blank 0x118 (280) ++ 0x71, //58(4) ++ 0x38, //59(5) v - active 0x438 (1080) ++ 0x2d, //60(6) v - blank 0x02d(45) ++ 0x40, //61(7) ++ 0x58, //62(8) - h sync offset(0x58) ++ 0x2c, //63(9) - h sync width(0x2c) ++ 0x45, //64(10) - v sync offset(0x4), v sync width(0x5) ++ 0x00, //65(11) ++ 0x09, //66(12) - h display size (0x209) 521 mm ++ 0x25, //67(13) - v display size (0x125) 293 mm ++ 0x21, //68(14) ++ 0x00, //69(15) - h border pixels ++ 0x00, //70(16) - v border pixels ++ 0x1e, //71(17) - no stereo, digital separate, hsync+, vsync+ ++ 0x00, 0x00, 0x00, 0xff, 0x00, //72 - descriptor[1] ++ 0x43, 0x36, 0x4c, 0x4d, 0x54, 0x46, 0x30, 0x30, 0x34, 0x38, 0x32, 0x32, 0x0a, //"C6LMTF004822\n" ++ 0x00, 0x00, 0x00, 0xfd, 0x00, //90 - descriptor[2] ++ 0x37, 0x4b, 0x1e, 0x55, 0x10, 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, ++ 0x00, 0x00, 0x00, 0xfc, 0x00, //108 - descriptor[3] ++ 0x41, 0x53, 0x55, 0x53, 0x20, 0x56, 0x48, 0x32, 0x34, 0x32, 0x48, 0x0a, 0x20, //"ASUS VH242H\n " ++ 0x01, //126 - extension_flag ++ 0x68, //127 - checksum ++ ++ 0x02, //0 - cea-861 extension ++ 0x03, //1 - rev 3 ++ 0x22, //2 - detailed timings at offset 34 ++ 0x71, //3 - # of detailed timing descriptor ++ 0x4f, 0x01, 0x02, 0x03, 0x11, 0x12, //4 ++ 0x13, 0x04, 0x14, 0x05, 0x0e, 0x0f, //10 ++ 0x1d, 0x1e, 0x1f, 0x10, 0x23, 0x09, //16 ++ 0x07, 0x01, 0x83, 0x01, 0x00, 0x00, //22 ++ 0x65, 0x03, 0x0c, 0x00, 0x10, 0x00, //28 ++/* 720x480@59.94 27000000/858/525 = 59.94 Hz */ ++ 0x8c, 0x0a, //34 - descriptor[0] - 0x0a8c - 27 Mhz ++ 0xd0, //h - active 0x2d0 (720) ++ 0x8a, //h - blank 0x8a(138) ++ 0x20, ++ 0xe0, //v - active 0x1e0 (480) ++ 0x2d, //v - blank 0x2d (45) ++ 0x10, ++ 0x10, 0x3e, 0x96, 0x00, 0x09, 0x25, 0x21, 0x00, 0x00, 0x18, ++/* 1280x720@60 74250000/1650/750 = 60 Hz*/ ++ 0x01, 0x1d, //52 - 0x1d01 74.25MHz ++ 0x00, //h - active (0x500)1280 ++ 0x72, //h - blank (0x172)370 ++ 0x51, ++ 0xd0, //v active 0x2d0(720) ++ 0x1e, //v blank 0x1e(30) ++ 0x20, ++ 0x6e, 0x28, 0x55, 0x00, 0x09, 0x25, 0x21, 0x00, 0x00, 0x1e, ++/* 1280x720@50 74250000/1980/750 = 50 Hz */ ++ 0x01, 0x1d, //70 - 0x1d01 74.25MHz ++ 0x00, //h - active (0x500)1280 ++ 0xbc, //h - blank (0x2bc)700 ++ 0x52, ++ 0xd0, //v active 0x2d0 (720) ++ 0x1e, //v blank 0x1e(30) ++ 0x20, ++ 0xb8, 0x28, 0x55, 0x40, 0x09, 0x25, 0x21, 0x00, 0x00, 0x1e, ++/* 720x576@50 27000000/864/625 = 50 Hz */ ++ 0x8c, 0x0a, //88 0x0a8c - 27 Mhz ++ 0xd0, //h - active 0x2d0(720) ++ 0x90, //h - blank 0x90(144) ++ 0x20, ++ 0x40, //v active 0x240(576) ++ 0x31, //v blanking 0x31(49) ++ 0x20, ++ 0x0c, 0x40, 0x55, 0x00, 0x09, 0x25, 0x21, 0x00, 0x00, 0x18, ++/* done */ ++ 0x00, 0x00, 0x00, 0x00, 0x00, //106 ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, //124 ++ 0x00, //126 - extension_flag ++ 0x73, //127 - checksum ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_2lane_30fps_720P_1280_720_125MHz[] = { ++ {0x0006, 0x00000040, 0x00000000, 2, 0}, ++ {0x0014, 0x00000000, 0x00000000, 2, 0}, ++ {0x0016, 0x000005ff, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x0000402d, 0x00000000, 2, 0}, ++ {0x0022, 0x00000213, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00000e00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000001, 0x00000000, 4, 0}, ++ {0x0218, 0x00000801, 0x00000000, 4, 0}, ++ {0x021c, 0x00000001, 0x00000000, 4, 0}, ++ {0x0220, 0x00000001, 0x00000000, 4, 0}, ++ {0x0224, 0x00004800, 0x00000000, 4, 0}, ++ {0x0228, 0x00000005, 0x00000000, 4, 0}, ++ {0x022c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, //non-continuous clock ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa300be82, 0x00000000, 4, 0}, ++// HDMI Interrupt Mask ++ {0x8502, 0x00000001, 0x00000000, 1, 0}, ++ {0x8512, 0x000000fe, 0x00000000, 1, 0}, ++ {0x8514, 0x00000000, 0x00000000, 1, 0}, ++ {0x8515, 0x00000000, 0x00000000, 1, 0}, ++ {0x8516, 0x00000000, 0x00000000, 1, 0}, ++// HDMI Audio ++ {0x8531, 0x00000001, 0x00000000, 1, 0}, ++ {0x8630, 0x000000b0, 0x00000000, 1, 0}, ++ {0x8631, 0x0000001e, 0x00000000, 1, 0}, ++ {0x8632, 0x00000004, 0x00000000, 1, 0}, ++ {0x8670, 0x00000001, 0x00000000, 1, 0}, ++// HDMI PHY ++ {0x8532, 0x00000080, 0x00000000, 1, 0}, ++ {0x8536, 0x00000040, 0x00000000, 1, 0}, ++ {0x853f, 0x0000000a, 0x00000000, 1, 0}, ++// HDMI System ++ {0x8545, 0x00000031, 0x00000000, 1, 0}, ++ {0x8546, 0x0000002d, 0x00000000, 1, 0}, ++// HDCP Setting ++ {0x85d1, 0x00000001, 0x00000000, 1, 0}, ++ {0x8560, 0x00000024, 0x00000000, 1, 0}, ++ {0x8563, 0x00000011, 0x00000000, 1, 0}, ++ {0x8564, 0x0000000f, 0x00000000, 1, 0}, ++// Video settings ++ {0x8573, 0x00000081, 0x00000000, 1, 0}, ++ {0x8571, 0x00000002, 0x00000000, 1, 0}, ++// HDMI Audio In Setting ++ {0x8600, 0x00000000, 0x00000000, 1, 0}, ++ {0x8602, 0x000000f3, 0x00000000, 1, 0}, ++ {0x8603, 0x00000002, 0x00000000, 1, 0}, ++ {0x8604, 0x0000000c, 0x00000000, 1, 0}, ++ {0x8606, 0x00000005, 0x00000000, 1, 0}, ++ {0x8607, 0x00000000, 0x00000000, 1, 0}, ++ {0x8620, 0x00000022, 0x00000000, 1, 0}, ++ {0x8640, 0x00000001, 0x00000000, 1, 0}, ++ {0x8641, 0x00000065, 0x00000000, 1, 0}, ++ {0x8642, 0x00000007, 0x00000000, 1, 0}, ++// {0x8651, 0x00000003, 0x00000000, 1, 0}, // Inverted LRCK polarity - (Sony) format ++ {0x8652, 0x00000002, 0x00000000, 1, 0}, // Left-justified I2S (Phillips) format ++// {0x8652, 0x00000000, 0x00000000, 1, 0}, // Right-justified (Sony) format ++ {0x8665, 0x00000010, 0x00000000, 1, 0}, ++// InfoFrame Extraction ++ {0x8709, 0x000000ff, 0x00000000, 1, 0}, ++ {0x870b, 0x0000002c, 0x00000000, 1, 0}, ++ {0x870c, 0x00000053, 0x00000000, 1, 0}, ++ {0x870d, 0x00000001, 0x00000000, 1, 0}, ++ {0x870e, 0x00000030, 0x00000000, 1, 0}, ++ {0x9007, 0x00000010, 0x00000000, 1, 0}, ++ {0x854a, 0x00000001, 0x00000000, 1, 0}, ++// Output Control ++ {0x0004, 0x00000cf7, 0x00000000, 2, 0}, ++ }; ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_1024x768_60fps_125MHz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0014, 0x0000ffff, 0x00000000, 2, 0}, ++ {0x0016, 0x000005ff, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x0000405c, 0x00000000, 2, 0}, /* Input divide 5(4+1), Feedback divide 92(0x5c+1)*/ ++ {0x0022, 0x00000613, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00000d00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000001, 0x00000000, 4, 0}, ++ {0x0218, 0x00000701, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000001, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000005, 0x00000000, 4, 0}, ++ {0x022c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa300be86, 0x00000000, 4, 0}, ++// HDMI Interrupt Mask ++ {0x8502, 0x00000001, 0x00000000, 1, 0}, ++ {0x8512, 0x000000fe, 0x00000000, 1, 0}, ++ {0x8514, 0x00000000, 0x00000000, 1, 0}, ++ {0x8515, 0x00000000, 0x00000000, 1, 0}, ++ {0x8516, 0x00000000, 0x00000000, 1, 0}, ++// HDMI Audio ++ {0x8531, 0x00000001, 0x00000000, 1, 0}, ++ {0x8630, 0x00041eb0, 0x00000000, 1, 0}, ++ {0x8670, 0x00000001, 0x00000000, 1, 0}, ++// HDMI PHY ++ {0x8532, 0x00000080, 0x00000000, 1, 0}, ++ {0x8536, 0x00000040, 0x00000000, 1, 0}, ++ {0x853f, 0x0000000a, 0x00000000, 1, 0}, ++// HDMI System ++ {0x8545, 0x00000031, 0x00000000, 1, 0}, ++ {0x8546, 0x0000002d, 0x00000000, 1, 0}, ++// HDCP Setting ++ {0x85d1, 0x00000001, 0x00000000, 1, 0}, ++ {0x8560, 0x00000024, 0x00000000, 1, 0}, ++ {0x8563, 0x00000011, 0x00000000, 1, 0}, ++ {0x8564, 0x0000000f, 0x00000000, 1, 0}, ++// RGB --> YUV Conversion ++// {0x8574, 0x00000000, 0x00000000, 1, 0}, ++ {0x8573, 0x00000081, 0x00000000, 1, 0}, ++ {0x8571, 0x00000002, 0x00000000, 1, 0}, ++// HDMI Audio In Setting ++ {0x8600, 0x00000000, 0x00000000, 1, 0}, ++ {0x8602, 0x000000f3, 0x00000000, 1, 0}, ++ {0x8603, 0x00000002, 0x00000000, 1, 0}, ++ {0x8604, 0x0000000c, 0x00000000, 1, 0}, ++ {0x8606, 0x00000005, 0x00000000, 1, 0}, ++ {0x8607, 0x00000000, 0x00000000, 1, 0}, ++ {0x8620, 0x00000022, 0x00000000, 1, 0}, ++ {0x8640, 0x00000001, 0x00000000, 1, 0}, ++ {0x8641, 0x00000065, 0x00000000, 1, 0}, ++ {0x8642, 0x00000007, 0x00000000, 1, 0}, ++ {0x8652, 0x00000002, 0x00000000, 1, 0}, ++ {0x8665, 0x00000010, 0x00000000, 1, 0}, ++// InfoFrame Extraction ++ {0x8709, 0x000000ff, 0x00000000, 1, 0}, ++ {0x870b, 0x0000002c, 0x00000000, 1, 0}, ++ {0x870c, 0x00000053, 0x00000000, 1, 0}, ++ {0x870d, 0x00000001, 0x00000000, 1, 0}, ++ {0x870e, 0x00000030, 0x00000000, 1, 0}, ++ {0x9007, 0x00000010, 0x00000000, 1, 0}, ++ {0x854a, 0x00000001, 0x00000000, 1, 0}, ++// Output Control ++ {0x0004, 0x00000cf7, 0x00000000, 2, 0}, ++ ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_720P_60fps_1280_720_133Mhz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0014, 0x0000ffff, 0x00000000, 2, 0}, ++ {0x0016, 0x000005ff, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x00004062, 0x00000000, 2, 0}, ++ {0x0022, 0x00000613, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00000d00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000001, 0x00000000, 4, 0}, ++ {0x0218, 0x00000701, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000001, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000005, 0x00000000, 4, 0}, ++ {0x022c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa300be86, 0x00000000, 4, 0}, ++// HDMI Interrupt Mask ++ {0x8502, 0x00000001, 0x00000000, 1, 0}, ++ {0x8512, 0x000000fe, 0x00000000, 1, 0}, ++ {0x8514, 0x00000000, 0x00000000, 1, 0}, ++ {0x8515, 0x00000000, 0x00000000, 1, 0}, ++ {0x8516, 0x00000000, 0x00000000, 1, 0}, ++// HDMI Audio ++ {0x8531, 0x00000001, 0x00000000, 1, 0}, ++ {0x8630, 0x00041eb0, 0x00000000, 1, 0}, ++ {0x8670, 0x00000001, 0x00000000, 1, 0}, ++// HDMI PHY ++ {0x8532, 0x00000080, 0x00000000, 1, 0}, ++ {0x8536, 0x00000040, 0x00000000, 1, 0}, ++ {0x853f, 0x0000000a, 0x00000000, 1, 0}, ++// HDMI System ++ {0x8545, 0x00000031, 0x00000000, 1, 0}, ++ {0x8546, 0x0000002d, 0x00000000, 1, 0}, ++// HDCP Setting ++ {0x85d1, 0x00000001, 0x00000000, 1, 0}, ++ {0x8560, 0x00000024, 0x00000000, 1, 0}, ++ {0x8563, 0x00000011, 0x00000000, 1, 0}, ++ {0x8564, 0x0000000f, 0x00000000, 1, 0}, ++// RGB --> YUV Conversion ++// {0x8574, 0x00000000, 0x00000000, 1, 0}, ++ {0x8573, 0x00000081, 0x00000000, 1, 0}, ++ {0x8571, 0x00000002, 0x00000000, 1, 0}, ++// HDMI Audio In Setting ++ {0x8600, 0x00000000, 0x00000000, 1, 0}, ++ {0x8602, 0x000000f3, 0x00000000, 1, 0}, ++ {0x8603, 0x00000002, 0x00000000, 1, 0}, ++ {0x8604, 0x0000000c, 0x00000000, 1, 0}, ++ {0x8606, 0x00000005, 0x00000000, 1, 0}, ++ {0x8607, 0x00000000, 0x00000000, 1, 0}, ++ {0x8620, 0x00000022, 0x00000000, 1, 0}, ++ {0x8640, 0x00000001, 0x00000000, 1, 0}, ++ {0x8641, 0x00000065, 0x00000000, 1, 0}, ++ {0x8642, 0x00000007, 0x00000000, 1, 0}, ++ {0x8652, 0x00000002, 0x00000000, 1, 0}, ++ {0x8665, 0x00000010, 0x00000000, 1, 0}, ++// InfoFrame Extraction ++ {0x8709, 0x000000ff, 0x00000000, 1, 0}, ++ {0x870b, 0x0000002c, 0x00000000, 1, 0}, ++ {0x870c, 0x00000053, 0x00000000, 1, 0}, ++ {0x870d, 0x00000001, 0x00000000, 1, 0}, ++ {0x870e, 0x00000030, 0x00000000, 1, 0}, ++ {0x9007, 0x00000010, 0x00000000, 1, 0}, ++ {0x854a, 0x00000001, 0x00000000, 1, 0}, ++// Output Control ++ {0x0004, 0x00000cf7, 0x00000000, 2, 0}, ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_2lane_color_bar_1280_720_125MHz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x0000405c, 0x00000000, 2, 0}, ++ {0x0022, 0x00000613, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00000e00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000001, 0x00000000, 4, 0}, ++ {0x0218, 0x00000801, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000001, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000006, 0x00000000, 4, 0}, ++ {0x022c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0234, 0x00000007, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, //non-continuous clock ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa30080a2, 0x00000000, 4, 0}, ++// 1280x720 colorbar ++ {0x000a, 0x00000a00, 0x00000000, 2, 0}, ++ {0x7080, 0x00000082, 0x00000000, 2, 0}, ++// 128 pixel black - repeat 128 times ++ {0x7000, 0x0000007f, 0x00000000, 2, (1<<24)|(128<<16)}, ++// 128 pixel blue - repeat 64 times ++ {0x7000, 0x000000ff, 0x00000000, 2, 0}, ++ {0x7000, 0x00000000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel red - repeat 64 times ++ {0x7000, 0x00000000, 0x00000000, 2, 0}, ++ {0x7000, 0x000000ff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel pink - repeat 64 times ++ {0x7000, 0x00007fff, 0x00000000, 2, 0}, ++ {0x7000, 0x00007fff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel green - repeat 64 times ++ {0x7000, 0x00007f00, 0x00000000, 2, 0}, ++ {0x7000, 0x00007f00, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel light blue - repeat 64 times ++ {0x7000, 0x0000c0ff, 0x00000000, 2, 0}, ++ {0x7000, 0x0000c000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel yellow - repeat 64 times ++ {0x7000, 0x0000ff00, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ffff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel white - repeat 64 times ++ {0x7000, 0x0000ff7f, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ff7f, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 720 lines ++ {0x7090, 0x000002cf, 0x00000000, 2, 0}, ++ {0x7092, 0x00000580, 0x00000000, 2, 0}, ++ {0x7094, 0x00000010, 0x00000000, 2, 0}, ++ {0x7080, 0x00000083, 0x00000000, 2, 0}, ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_color_bar_1280_720_125MHz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x0000405c, 0x00000000, 2, 0}, ++ {0x0022, 0x00000613, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00000e00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000001, 0x00000000, 4, 0}, ++ {0x0218, 0x00000801, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000001, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000006, 0x00000000, 4, 0}, ++ {0x022c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001F, 0x00000000, 4, 0}, //{0x0234, 0x00000007, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, //non-continuous clock ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa30080a6, 0x00000000, 4, 0}, //{0x0500, 0xa30080a2, 0x00000000, 4, 0}, ++// 1280x720 colorbar ++ {0x000a, 0x00000a00, 0x00000000, 2, 0}, ++ {0x7080, 0x00000082, 0x00000000, 2, 0}, ++// 128 pixel black - repeat 128 times ++ {0x7000, 0x0000007f, 0x00000000, 2, (1<<24)|(128<<16)}, ++// 128 pixel blue - repeat 64 times ++ {0x7000, 0x000000ff, 0x00000000, 2, 0}, ++ {0x7000, 0x00000000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel red - repeat 64 times ++ {0x7000, 0x00000000, 0x00000000, 2, 0}, ++ {0x7000, 0x000000ff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel pink - repeat 64 times ++ {0x7000, 0x00007fff, 0x00000000, 2, 0}, ++ {0x7000, 0x00007fff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel green - repeat 64 times ++ {0x7000, 0x00007f00, 0x00000000, 2, 0}, ++ {0x7000, 0x00007f00, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel light blue - repeat 64 times ++ {0x7000, 0x0000c0ff, 0x00000000, 2, 0}, ++ {0x7000, 0x0000c000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel yellow - repeat 64 times ++ {0x7000, 0x0000ff00, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ffff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel white - repeat 64 times ++ {0x7000, 0x0000ff7f, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ff7f, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 720 lines ++ {0x7090, 0x000002cf, 0x00000000, 2, 0}, ++ {0x7092, 0x00000300, 0x00000000, 2, 0}, //{0x7092, 0x00000580, 0x00000000, 2, 0}, ++ {0x7094, 0x00000010, 0x00000000, 2, 0}, ++ {0x7080, 0x00000083, 0x00000000, 2, 0}, ++}; ++ ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_color_bar_1024_720_200MHz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x00004050, 0x00000000, 2, 0}, ++ {0x0022, 0x00000213, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00001800, 0x00000000, 4, 0}, ++ {0x0214, 0x00000002, 0x00000000, 4, 0}, ++ {0x0218, 0x00001102, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000003, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000007, 0x00000000, 4, 0}, ++ {0x022c, 0x00000001, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, //non-continuous clock ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa30080a6, 0x00000000, 4, 0}, ++// 1280x720 colorbar ++ {0x000a, 0x00000800, 0x00000000, 2, 0}, ++ {0x7080, 0x00000082, 0x00000000, 2, 0}, ++// 128 pixel black - repeat 128 times ++ {0x7000, 0x0000007f, 0x00000000, 2, (1<<24)|(128<<16)}, ++// 128 pixel blue - repeat 64 times ++ {0x7000, 0x000000ff, 0x00000000, 2, 0}, ++ {0x7000, 0x00000000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel red - repeat 64 times ++ {0x7000, 0x00000000, 0x00000000, 2, 0}, ++ {0x7000, 0x000000ff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel pink - repeat 64 times ++ {0x7000, 0x00007fff, 0x00000000, 2, 0}, ++ {0x7000, 0x00007fff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel green - repeat 64 times ++ {0x7000, 0x00007f00, 0x00000000, 2, 0}, ++ {0x7000, 0x00007f00, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel light blue - repeat 64 times ++ {0x7000, 0x0000c0ff, 0x00000000, 2, 0}, ++ {0x7000, 0x0000c000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel yellow - repeat 64 times ++ {0x7000, 0x0000ff00, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ffff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel white - repeat 64 times ++ {0x7000, 0x0000ff7f, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ff7f, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 720 lines ++ {0x0020, 0x0000406f, 0x00000000, 2, 100}, ++ {0x7090, 0x000002cf, 0x00000000, 2, 0}, ++ {0x7092, 0x00000540, 0x00000000, 2, 0}, ++ {0x7094, 0x00000010, 0x00000000, 2, 0}, ++ {0x7080, 0x00000083, 0x00000000, 2, 0}, ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_color_bar_1280_720_300MHz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x000080c7, 0x00000000, 2, 0}, ++ {0x0022, 0x00000213, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00001e00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000003, 0x00000000, 4, 0}, ++ {0x0218, 0x00001402, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000003, 0x00000000, 4, 0}, ++ {0x0224, 0x00004a00, 0x00000000, 4, 0}, ++ {0x0228, 0x00000008, 0x00000000, 4, 0}, ++ {0x022c, 0x00000002, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, //non-continuous clock ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa30080a6, 0x00000000, 4, 0}, ++// 1280x720 colorbar ++ {0x000a, 0x00000a00, 0x00000000, 2, 0}, ++ {0x7080, 0x00000082, 0x00000000, 2, 0}, ++// 128 pixel black - repeat 128 times ++ {0x7000, 0x0000007f, 0x00000000, 2, (1<<24)|(128<<16)}, ++// 128 pixel blue - repeat 64 times ++ {0x7000, 0x000000ff, 0x00000000, 2, 0}, ++ {0x7000, 0x00000000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel red - repeat 64 times ++ {0x7000, 0x00000000, 0x00000000, 2, 0}, ++ {0x7000, 0x000000ff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel pink - repeat 64 times ++ {0x7000, 0x00007fff, 0x00000000, 2, 0}, ++ {0x7000, 0x00007fff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel green - repeat 64 times ++ {0x7000, 0x00007f00, 0x00000000, 2, 0}, ++ {0x7000, 0x00007f00, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel light blue - repeat 64 times ++ {0x7000, 0x0000c0ff, 0x00000000, 2, 0}, ++ {0x7000, 0x0000c000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel yellow - repeat 64 times ++ {0x7000, 0x0000ff00, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ffff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel white - repeat 64 times ++ {0x7000, 0x0000ff7f, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ff7f, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 720 lines ++ {0x7090, 0x000002cf, 0x00000000, 2, 0}, ++ {0x7092, 0x000006b8, 0x00000000, 2, 0}, ++ {0x7094, 0x00000010, 0x00000000, 2, 0}, ++ {0x7080, 0x00000083, 0x00000000, 2, 0}, ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_color_bar_1920_1023_300MHz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x000080c7, 0x00000000, 2, 0}, ++ {0x0022, 0x00000213, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00001e00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000003, 0x00000000, 4, 0}, ++ {0x0218, 0x00001402, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000003, 0x00000000, 4, 0}, ++ {0x0224, 0x00004a00, 0x00000000, 4, 0}, ++ {0x0228, 0x00000008, 0x00000000, 4, 0}, ++ {0x022c, 0x00000002, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, //non-continuous clock ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa30080a6, 0x00000000, 4, 0}, ++// 1920x1023 colorbar ++ {0x000a, 0x00000f00, 0x00000000, 2, 0}, ++ {0x7080, 0x00000082, 0x00000000, 2, 0}, ++// 128 pixel black - repeat 128 times ++ {0x7000, 0x0000007f, 0x00000000, 2, (1<<24)|(128<<16)}, ++// 128 pixel blue - repeat 64 times ++ {0x7000, 0x000000ff, 0x00000000, 2, 0}, ++ {0x7000, 0x00000000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel red - repeat 64 times ++ {0x7000, 0x00000000, 0x00000000, 2, 0}, ++ {0x7000, 0x000000ff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel pink - repeat 64 times ++ {0x7000, 0x00007fff, 0x00000000, 2, 0}, ++ {0x7000, 0x00007fff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel green - repeat 64 times ++ {0x7000, 0x00007f00, 0x00000000, 2, 0}, ++ {0x7000, 0x00007f00, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel light blue - repeat 64 times ++ {0x7000, 0x0000c0ff, 0x00000000, 2, 0}, ++ {0x7000, 0x0000c000, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel yellow - repeat 64 times ++ {0x7000, 0x0000ff00, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ffff, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 128 pixel white - repeat 64 times ++ {0x7000, 0x0000ff7f, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ff7f, 0x00000000, 2, (2<<24)|(64<<16)}, ++// 1023 lines ++ {0x7090, 0x000003fe, 0x00000000, 2, 0}, ++ {0x7092, 0x000004d8, 0x00000000, 2, 0}, ++ {0x7094, 0x0000002d, 0x00000000, 2, 0}, ++ {0x7080, 0x00000083, 0x00000000, 2, 0}, ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_2lane_color_bar_640_480_174MHz[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x00008073, 0x00000000, 2, 0}, ++ {0x0022, 0x00000213, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++// {0x014c, 0x00000000, 0x00000000, 4, 0}, ++// {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00001200, 0x00000000, 4, 0}, ++ {0x0214, 0x00000002, 0x00000000, 4, 0}, ++ {0x0218, 0x00000b02, 0x00000000, 4, 0}, ++ {0x021c, 0x00000001, 0x00000000, 4, 0}, ++ {0x0220, 0x00000103, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000008, 0x00000000, 4, 0}, ++ {0x022c, 0x00000002, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000000, 0x00000000, 4, 0}, ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xA3008082, 0x00000000, 4, 0}, ++// 640x480 colorbar ++ {0x000a, 0x00000500, 0x00000000, 2, 0}, ++ {0x7080, 0x00000082, 0x00000000, 2, 0}, ++// 80 pixel black - repeate 80 times ++ {0x7000, 0x0000007f, 0x00000000, 2, (1<<24)|(80<<16)}, ++// 80 pixel blue - repeate 40 times ++ {0x7000, 0x000000ff, 0x00000000, 2, 0}, ++ {0x7000, 0x00000000, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel red - repeate 40 times ++ {0x7000, 0x00000000, 0x00000000, 2, 0}, ++ {0x7000, 0x000000ff, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel pink - repeate 40 times ++ {0x7000, 0x00007fff, 0x00000000, 2, 0}, ++ {0x7000, 0x00007fff, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel green - repeate 40 times ++ {0x7000, 0x00007f00, 0x00000000, 2, 0}, ++ {0x7000, 0x00007f00, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel light blue - repeate 40 times ++ {0x7000, 0x0000c0ff, 0x00000000, 2, 0}, ++ {0x7000, 0x0000c000, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel yellow - repeate 40 times ++ {0x7000, 0x0000ff00, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ffff, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel white - repeate 40 times ++ {0x7000, 0x0000ff7f, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ff7f, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 480 lines ++ {0x7090, 0x000001df, 0x00000000, 2, 0}, ++ {0x7092, 0x00000898, 0x00000000, 2, 0}, ++ {0x7094, 0x00000285, 0x00000000, 2, 0}, ++ {0x7080, 0x00000083, 0x00000000, 2, 0}, ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_2lane_color_bar_640_480_108MHz_cont[] = { ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x0000404F, 0x00000000, 2, 0}, ++ {0x0022, 0x00000613, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00001800, 0x00000000, 4, 0}, ++ {0x0214, 0x00000002, 0x00000000, 4, 0}, ++ {0x0218, 0x00001102, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000003, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000007, 0x00000000, 4, 0}, ++ {0x022c, 0x00000001, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xA30080A2, 0x00000000, 4, 0}, ++// 640x480 colorbar ++ {0x000a, 0x00000500, 0x00000000, 2, 0}, ++ {0x7080, 0x00000082, 0x00000000, 2, 0}, ++// 80 pixel black - repeate 80 times ++ {0x7000, 0x0000007f, 0x00000000, 2, (1<<24)|(80<<16)}, ++// 80 pixel blue - repeate 40 times ++ {0x7000, 0x000000ff, 0x00000000, 2, 0}, ++ {0x7000, 0x00000000, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel red - repeate 40 times ++ {0x7000, 0x00000000, 0x00000000, 2, 0}, ++ {0x7000, 0x000000ff, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel pink - repeate 40 times ++ {0x7000, 0x00007fff, 0x00000000, 2, 0}, ++ {0x7000, 0x00007fff, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel green - repeate 40 times ++ {0x7000, 0x00007f00, 0x00000000, 2, 0}, ++ {0x7000, 0x00007f00, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel light blue - repeate 40 times ++ {0x7000, 0x0000c0ff, 0x00000000, 2, 0}, ++ {0x7000, 0x0000c000, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel yellow - repeate 40 times ++ {0x7000, 0x0000ff00, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ffff, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 80 pixel white - repeate 40 times ++ {0x7000, 0x0000ff7f, 0x00000000, 2, 0}, ++ {0x7000, 0x0000ff7f, 0x00000000, 2, (2<<24)|(40<<16)}, ++// 480 lines ++ {0x7090, 0x000001df, 0x00000000, 2, 0}, ++ {0x7092, 0x00000700, 0x00000000, 2, 0}, ++ {0x7094, 0x00000010, 0x00000000, 2, 0}, ++ {0x7080, 0x00000083, 0x00000000, 2, 0}, ++}; ++ ++//480p RGB2YUV442 ++static const struct reg_value tc358743_setting_YUV422_2lane_60fps_640_480_125Mhz[] = { ++ {0x0006, 0x00000040, 0x00000000, 2, 0}, ++// {0x000a, 0x000005a0, 0x00000000, 2, 0}, ++// {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++ {0x0014, 0x00000000, 0x00000000, 2, 0}, ++ {0x0016, 0x000005ff, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x0000405c, 0x00000000, 2, 0}, ++ {0x0022, 0x00000613, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00000d00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000001, 0x00000000, 4, 0}, ++ {0x0218, 0x00000701, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000001, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000005, 0x00000000, 4, 0}, ++ {0x022c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xA30080A2, 0x00000000, 4, 0}, ++// HDMI Interrupt Mask ++ {0x8502, 0x00000001, 0x00000000, 1, 0}, ++ {0x8512, 0x000000fe, 0x00000000, 1, 0}, ++ {0x8514, 0x00000000, 0x00000000, 1, 0}, ++ {0x8515, 0x00000000, 0x00000000, 1, 0}, ++ {0x8516, 0x00000000, 0x00000000, 1, 0}, ++// HDMI Audio ++ {0x8531, 0x00000001, 0x00000000, 1, 0}, ++ {0x8630, 0x00041eb0, 0x00000000, 1, 0}, ++ {0x8670, 0x00000001, 0x00000000, 1, 0}, ++// HDMI PHY ++ {0x8532, 0x00000080, 0x00000000, 1, 0}, ++ {0x8536, 0x00000040, 0x00000000, 1, 0}, ++ {0x853f, 0x0000000a, 0x00000000, 1, 0}, ++// HDMI System ++ {0x8545, 0x00000031, 0x00000000, 1, 0}, ++ {0x8546, 0x0000002d, 0x00000000, 1, 0}, ++// HDCP Setting ++ {0x85d1, 0x00000001, 0x00000000, 1, 0}, ++ {0x8560, 0x00000024, 0x00000000, 1, 0}, ++ {0x8563, 0x00000011, 0x00000000, 1, 0}, ++ {0x8564, 0x0000000f, 0x00000000, 1, 0}, ++// RGB --> YUV Conversion ++ {0x8573, 0x00000081, 0x00000000, 1, 0}, ++ {0x8571, 0x00000002, 0x00000000, 1, 0}, ++// HDMI Audio In Setting ++ {0x8600, 0x00000000, 0x00000000, 1, 0}, ++ {0x8602, 0x000000f3, 0x00000000, 1, 0}, ++ {0x8603, 0x00000002, 0x00000000, 1, 0}, ++ {0x8604, 0x0000000c, 0x00000000, 1, 0}, ++ {0x8606, 0x00000005, 0x00000000, 1, 0}, ++ {0x8607, 0x00000000, 0x00000000, 1, 0}, ++ {0x8620, 0x00000022, 0x00000000, 1, 0}, ++ {0x8640, 0x00000001, 0x00000000, 1, 0}, ++ {0x8641, 0x00000065, 0x00000000, 1, 0}, ++ {0x8642, 0x00000007, 0x00000000, 1, 0}, ++ {0x8652, 0x00000002, 0x00000000, 1, 0}, ++ {0x8665, 0x00000010, 0x00000000, 1, 0}, ++// InfoFrame Extraction ++ {0x8709, 0x000000ff, 0x00000000, 1, 0}, ++ {0x870b, 0x0000002c, 0x00000000, 1, 0}, ++ {0x870c, 0x00000053, 0x00000000, 1, 0}, ++ {0x870d, 0x00000001, 0x00000000, 1, 0}, ++ {0x870e, 0x00000030, 0x00000000, 1, 0}, ++ {0x9007, 0x00000010, 0x00000000, 1, 0}, ++ {0x854a, 0x00000001, 0x00000000, 1, 0}, ++// Output Control ++ {0x0004, 0x00000cf7, 0x00000000, 2, 0}, ++ }; ++ ++//480p RGB2YUV442 ++static const struct reg_value tc358743_setting_YUV422_2lane_60fps_720_480_125Mhz[] = { ++ {0x0006, 0x00000040, 0x00000000, 2, 0}, ++ {0x000a, 0x000005a0, 0x00000000, 2, 0}, ++// {0x0010, 0x0000001e, 0x00000000, 2, 0}, ++ {0x0014, 0x00000000, 0x00000000, 2, 0}, ++ {0x0016, 0x000005ff, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x0000405b, 0x00000000, 2, 0}, ++ {0x0022, 0x00000613, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00000d00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000001, 0x00000000, 4, 0}, ++ {0x0218, 0x00000701, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000001, 0x00000000, 4, 0}, ++ {0x0224, 0x00004000, 0x00000000, 4, 0}, ++ {0x0228, 0x00000005, 0x00000000, 4, 0}, ++ {0x022c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xA30080A2, 0x00000000, 4, 0}, ++// HDMI Interrupt Mask ++ {0x8502, 0x00000001, 0x00000000, 1, 0}, ++ {0x8512, 0x000000fe, 0x00000000, 1, 0}, ++ {0x8514, 0x00000000, 0x00000000, 1, 0}, ++ {0x8515, 0x00000000, 0x00000000, 1, 0}, ++ {0x8516, 0x00000000, 0x00000000, 1, 0}, ++// HDMI Audio ++ {0x8531, 0x00000001, 0x00000000, 1, 0}, ++ {0x8630, 0x00041eb0, 0x00000000, 1, 0}, ++ {0x8670, 0x00000001, 0x00000000, 1, 0}, ++// HDMI PHY ++ {0x8532, 0x00000080, 0x00000000, 1, 0}, ++ {0x8536, 0x00000040, 0x00000000, 1, 0}, ++ {0x853f, 0x0000000a, 0x00000000, 1, 0}, ++// HDMI System ++ {0x8545, 0x00000031, 0x00000000, 1, 0}, ++ {0x8546, 0x0000002d, 0x00000000, 1, 0}, ++// HDCP Setting ++ {0x85d1, 0x00000001, 0x00000000, 1, 0}, ++ {0x8560, 0x00000024, 0x00000000, 1, 0}, ++ {0x8563, 0x00000011, 0x00000000, 1, 0}, ++ {0x8564, 0x0000000f, 0x00000000, 1, 0}, ++// RGB --> YUV Conversion ++ {0x8573, 0x00000081, 0x00000000, 1, 0}, ++ {0x8571, 0x00000002, 0x00000000, 1, 0}, ++// HDMI Audio In Setting ++ {0x8600, 0x00000000, 0x00000000, 1, 0}, ++ {0x8602, 0x000000f3, 0x00000000, 1, 0}, ++ {0x8603, 0x00000002, 0x00000000, 1, 0}, ++ {0x8604, 0x0000000c, 0x00000000, 1, 0}, ++ {0x8606, 0x00000005, 0x00000000, 1, 0}, ++ {0x8607, 0x00000000, 0x00000000, 1, 0}, ++ {0x8620, 0x00000022, 0x00000000, 1, 0}, ++ {0x8640, 0x00000001, 0x00000000, 1, 0}, ++ {0x8641, 0x00000065, 0x00000000, 1, 0}, ++ {0x8642, 0x00000007, 0x00000000, 1, 0}, ++ {0x8652, 0x00000002, 0x00000000, 1, 0}, ++ {0x8665, 0x00000010, 0x00000000, 1, 0}, ++// InfoFrame Extraction ++ {0x8709, 0x000000ff, 0x00000000, 1, 0}, ++ {0x870b, 0x0000002c, 0x00000000, 1, 0}, ++ {0x870c, 0x00000053, 0x00000000, 1, 0}, ++ {0x870d, 0x00000001, 0x00000000, 1, 0}, ++ {0x870e, 0x00000030, 0x00000000, 1, 0}, ++ {0x9007, 0x00000010, 0x00000000, 1, 0}, ++ {0x854a, 0x00000001, 0x00000000, 1, 0}, ++// Output Control ++ {0x0004, 0x00000cf7, 0x00000000, 2, 0}, ++ }; ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_1080P_60fps_1920_1080_300MHz[] = { ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, ++ {0x0006, 0x00000000, 0x00000000, 2, 0}, ++ {0x0014, 0x00000000, 0x00000000, 2, 0}, ++ {0x0016, 0x000005ff, 0x00000000, 2, 0}, ++// Program CSI Tx PLL ++ {0x0020, 0x000080c7, 0x00000000, 2, 0}, ++ {0x0022, 0x00000213, 0x00000000, 2, 0}, ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00001e00, 0x00000000, 4, 0}, ++ {0x0214, 0x00000003, 0x00000000, 4, 0}, ++ {0x0218, 0x00001402, 0x00000000, 4, 0}, ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, ++ {0x0220, 0x00000003, 0x00000000, 4, 0}, ++ {0x0224, 0x00004a00, 0x00000000, 4, 0}, ++ {0x0228, 0x00000008, 0x00000000, 4, 0}, ++ {0x022c, 0x00000002, 0x00000000, 4, 0}, ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, ++ {0x0500, 0xa30080a6, 0x00000000, 4, 0}, ++// HDMI Interrupt Mask ++ {0x8502, 0x00000001, 0x00000000, 1, 0}, ++ {0x8512, 0x000000fe, 0x00000000, 1, 0}, ++ {0x8514, 0x00000000, 0x00000000, 1, 0}, ++ {0x8515, 0x00000000, 0x00000000, 1, 0}, ++ {0x8516, 0x00000000, 0x00000000, 1, 0}, ++// HDMI Audio ++ {0x8531, 0x00000001, 0x00000000, 1, 0}, ++ {0x8630, 0x00041eb0, 0x00000000, 1, 0}, ++ {0x8670, 0x00000001, 0x00000000, 1, 0}, ++// HDMI PHY ++ {0x8532, 0x00000080, 0x00000000, 1, 0}, ++ {0x8536, 0x00000040, 0x00000000, 1, 0}, ++ {0x853f, 0x0000000a, 0x00000000, 1, 0}, ++// HDMI System ++ {0x8545, 0x00000031, 0x00000000, 1, 0}, ++ {0x8546, 0x0000002d, 0x00000000, 1, 0}, ++// HDCP Setting ++ {0x85d1, 0x00000001, 0x00000000, 1, 0}, ++ {0x8560, 0x00000024, 0x00000000, 1, 0}, ++ {0x8563, 0x00000011, 0x00000000, 1, 0}, ++ {0x8564, 0x0000000f, 0x00000000, 1, 0}, ++// RGB --> YUV Conversion ++ {0x8571, 0x00000002, 0x00000000, 1, 0}, ++ {0x8573, 0x00000081, 0x00000000, 1, 0}, ++ {0x8576, 0x00000060, 0x00000000, 1, 0}, ++// HDMI Audio In Setting ++ {0x8600, 0x00000000, 0x00000000, 1, 0}, ++ {0x8602, 0x000000f3, 0x00000000, 1, 0}, ++ {0x8603, 0x00000002, 0x00000000, 1, 0}, ++ {0x8604, 0x0000000c, 0x00000000, 1, 0}, ++ {0x8606, 0x00000005, 0x00000000, 1, 0}, ++ {0x8607, 0x00000000, 0x00000000, 1, 0}, ++ {0x8620, 0x00000022, 0x00000000, 1, 0}, ++ {0x8640, 0x00000001, 0x00000000, 1, 0}, ++ {0x8641, 0x00000065, 0x00000000, 1, 0}, ++ {0x8642, 0x00000007, 0x00000000, 1, 0}, ++ {0x8652, 0x00000002, 0x00000000, 1, 0}, ++ {0x8665, 0x00000010, 0x00000000, 1, 0}, ++// InfoFrame Extraction ++ {0x8709, 0x000000ff, 0x00000000, 1, 0}, ++ {0x870b, 0x0000002c, 0x00000000, 1, 0}, ++ {0x870c, 0x00000053, 0x00000000, 1, 0}, ++ {0x870d, 0x00000001, 0x00000000, 1, 0}, ++ {0x870e, 0x00000030, 0x00000000, 1, 0}, ++ {0x9007, 0x00000010, 0x00000000, 1, 0}, ++ {0x854a, 0x00000001, 0x00000000, 1, 0}, ++// Output Control ++ {0x0004, 0x00000cf7, 0x00000000, 2, 0}, ++}; ++ ++static const struct reg_value tc358743_setting_YUV422_4lane_1080P_30fps_1920_1080_300MHz[] = { ++ {0x0004, 0x00000084, 0x00000000, 2, 0}, // Internal Generated output pattern,Do not send InfoFrame data out to CSI2,Audio output to CSI2-TX i/f,I2C address index increments on every data byte transfer, disable audio and video TX buffers ++ {0x0006, 0x000001f8, 0x00000000, 2, 0}, // FIFO level = 1f8 = 504 ++ {0x0014, 0x00000000, 0x00000000, 2, 0}, // Clear interrupt status bits ++ {0x0016, 0x000005ff, 0x00000000, 2, 0}, // Mask audio mute, CSI-TX, and the other interrups ++// Program CSI Tx PLL ++ //{0x0020, 0x000080c7, 0x00000000, 2, 0}, // Input divider setting = 0x8 -> Division ratio = (PRD3..0) + 1 = 9, Feedback divider setting = 0xc7 -> Division ratio = (FBD8...0) + 1 = 200 ++ {0x0020, 0x000080c7, 0x00000000, 2, 0}, // Input divider setting = 0x8 -> Division ratio = (PRD3..0) + 1 = 9, Feedback divider setting = 0xc7 -> Division ratio = (FBD8...0) + 1 = 200 ++ {0x0022, 0x00000213, 0x00000000, 2, 0}, // HSCK frequency = 500MHz – 1GHz HSCK frequency, Loop bandwidth setting = 50% of maximum loop bandwidth (default), REFCLK toggling –> normal operation, REFCLK stops -> no oscillation, Bypass clock = normal operation, clocks switched off (output LOW), PLL Reset normal operation, PLL Enable = PLL on ++// CSI Tx PHY (32-bit Registers) ++ {0x0140, 0x00000000, 0x00000000, 4, 0}, // Clock Lane DPHY Control: Bypass Lane Enable from PPI Layer enable. ++ {0x0144, 0x00000000, 0x00000000, 4, 0}, // Data Lane 0 DPHY Control: Bypass Lane Enable from PPI Layer enable. ++ {0x0148, 0x00000000, 0x00000000, 4, 0}, // Data Lane 1 DPHY Control: Bypass Lane Enable from PPI Layer enable. ++ {0x014c, 0x00000000, 0x00000000, 4, 0}, // Data Lane 2 DPHY Control: Bypass Lane Enable from PPI Layer enable. ++ {0x0150, 0x00000000, 0x00000000, 4, 0}, // Data Lane 3 DPHY Control: Bypass Lane Enable from PPI Layer enable. ++// CSI Tx PPI (32-bit Registers) ++ {0x0210, 0x00001e00, 0x00000000, 4, 0}, // LINEINITCNT: Line Initialization Wait Counter = 0x1e00 = 7680 ++ {0x0214, 0x00000003, 0x00000000, 4, 0}, // LPTXTIMECNT: SYSLPTX Timing Generation Counter = 3 ++ {0x0218, 0x00001402, 0x00000000, 4, 0}, // TCLK_HEADERCNT: TCLK_ZERO Counter = 0x14 = 20, TCLK_PREPARE Counter = 0x02 = 2 ++ {0x021c, 0x00000000, 0x00000000, 4, 0}, // TCLK_TRAILCNT: TCLK_TRAIL Counter = 0 ++ {0x0220, 0x00000003, 0x00000000, 4, 0}, // THS_HEADERCNT: THS_ZERO Counter = 0, THS_PREPARE Counter = 3 ++ {0x0224, 0x00004a00, 0x00000000, 4, 0}, // TWAKEUP: TWAKEUP Counter = 0x4a00 = 18944 ++ {0x0228, 0x00000008, 0x00000000, 4, 0}, // TCLK_POSTCNT: TCLK_POST Counter = 8 ++ {0x022c, 0x00000002, 0x00000000, 4, 0}, // THS_TRAILCNT: THS_TRAIL Counter = 2 ++ {0x0234, 0x0000001f, 0x00000000, 4, 0}, // HSTXVREGEN: Enable voltage regulators for lanes and clk ++ {0x0238, 0x00000001, 0x00000000, 4, 0}, // TXOPTIONCNTRL: Set Continuous Clock Mode ++ {0x0204, 0x00000001, 0x00000000, 4, 0}, // PPI STARTCNTRL: start PPI function ++ {0x0518, 0x00000001, 0x00000000, 4, 0}, // CSI_START: start ++ {0x0500, 0xa30080a6, 0x00000000, 4, 0}, // CSI Configuration Register: set register 0x040C with data 0x80a6 (CSI MOde, Disables the HTX_TO timer, High-Speed data transfer is performed to Tx, DSCClk Stays in HS mode when Data Lane goes to LP, 4 Data Lanes,The EOT packet is automatically granted at the end of HS transfer then is transmitted) ++// HDMI Interrupt Mask ++ {0x8502, 0x00000001, 0x00000000, 1, 0}, // SYSTEM INTERRUPT: clear DDC power change detection interrupt ++ {0x8512, 0x000000fe, 0x00000000, 1, 0}, // SYS INTERRUPT MASK: DDC power change detection interrupt not masked ++ {0x8514, 0x00000000, 0x00000000, 1, 0}, // PACKET INTERRUPT MASK: unmask all ++ {0x8515, 0x00000000, 0x00000000, 1, 0}, // CBIT INTERRUPT MASK: unmask all ++ {0x8516, 0x00000000, 0x00000000, 1, 0}, // AUDIO INTERRUPT MASK: unmask all ++// HDMI Audio ++ {0x8531, 0x00000001, 0x00000000, 1, 0}, // PHY CONTROL0: 27MHz, DDC5V detection operation. ++ {0x8630, 0x00041eb0, 0x00000000, 1, 0}, // Audio FS Lock Detect Control: for 27MHz ++ {0x8670, 0x00000001, 0x00000000, 1, 0}, ++// HDMI PHY ++ {0x8532, 0x00000080, 0x00000000, 1, 0}, // ++ {0x8536, 0x00000040, 0x00000000, 1, 0}, // ++ {0x853f, 0x0000000a, 0x00000000, 1, 0}, // ++// HDMI System ++ {0x8545, 0x00000031, 0x00000000, 1, 0}, // ANA CONTROL: PLL charge pump setting for Audio = normal, DAC/PLL power ON/OFF setting for Audio = ON ++ {0x8546, 0x0000002d, 0x00000000, 1, 0}, // AVMUTE CONTROL: AVM_CTL = 0x2d ++// HDCP Setting ++ {0x85d1, 0x00000001, 0x00000000, 1, 0}, // ++ {0x8560, 0x00000024, 0x00000000, 1, 0}, // HDCP MODE: HDCP automatic reset when DVI⇔HDMI switched = on, HDCP Line Rekey timing switch = 7clk mode (Data island delay ON), Bcaps[5] KSVINFO_READY(0x8840[5]) auto clear mode = Auto clear using AKSV write ++ {0x8563, 0x00000011, 0x00000000, 1, 0}, // ++ {0x8564, 0x0000000f, 0x00000000, 1, 0}, // ++// RGB --> YUV Conversion ++ {0x8571, 0x00000002, 0x00000000, 1, 0}, // ++ {0x8573, 0x000000c1, 0x00000000, 1, 0}, // VOUT SET2 REGISTER: 422 fixed output, Video Output 422 conversion mode selection 000: During 444 input, 3tap filter; during 422 input, simple decimation, Enable RGB888 to YUV422 Conversion (Fixed Color output) ++ {0x8574, 0x00000008, 0x00000000, 1, 0}, // VOUT SET3 REGISTER (VOUT_SET3): Follow register bit 0x8573[7] setting ++ {0x8576, 0x00000060, 0x00000000, 1, 0}, // VOUT_COLOR: Output Color = 601 YCbCr Limited, Input Pixel Repetition judgment = automatic, Input Pixel Repetition HOST setting = no repetition ++// HDMI Audio In Setting ++ {0x8600, 0x00000000, 0x00000000, 1, 0}, ++ {0x8602, 0x000000f3, 0x00000000, 1, 0}, ++ {0x8603, 0x00000002, 0x00000000, 1, 0}, ++ {0x8604, 0x0000000c, 0x00000000, 1, 0}, ++ {0x8606, 0x00000005, 0x00000000, 1, 0}, ++ {0x8607, 0x00000000, 0x00000000, 1, 0}, ++ {0x8620, 0x00000022, 0x00000000, 1, 0}, ++ {0x8640, 0x00000001, 0x00000000, 1, 0}, ++ {0x8641, 0x00000065, 0x00000000, 1, 0}, ++ {0x8642, 0x00000007, 0x00000000, 1, 0}, ++ {0x8652, 0x00000002, 0x00000000, 1, 0}, ++ {0x8665, 0x00000010, 0x00000000, 1, 0}, ++// InfoFrame Extraction ++ {0x8709, 0x000000ff, 0x00000000, 1, 0}, // PACKET INTERRUPT MODE: all enable ++ {0x870b, 0x0000002c, 0x00000000, 1, 0}, // NO PACKET LIMIT: NO_ACP_LIMIT = 0x2, NO_AVI_LIMIT = 0xC ++ {0x870c, 0x00000053, 0x00000000, 1, 0}, // When VS receive interrupt is detected, VS storage register automatic clear, When ACP receive interrupt is detected, ACP storage register automatic clear, When AVI receive interrupt occurs, judge input video signal with RGB and no Repetition, When AVI receive interrupt is detected, AVI storage register automatic clear. ++ {0x870d, 0x00000001, 0x00000000, 1, 0}, // ERROR PACKET LIMIT: Packet continuing receive error occurrence detection threshold = 1 ++ {0x870e, 0x00000030, 0x00000000, 1, 0}, // NO PACKET LIMIT: ++ {0x9007, 0x00000010, 0x00000000, 1, 0}, // ++ {0x854a, 0x00000001, 0x00000000, 1, 0}, // Initialization completed flag ++// Output Control ++ {0x0004, 0x00000cf7, 0x00000000, 2, 0}, // Configuration Control Register: Power Island Normal, I2S/TDM clock are free running, Enable 2 Audio channels, Audio channel number Auto detect by HW, I2S/TDM Data no delay, Select YCbCr422 8-bit (HDMI YCbCr422 12-bit data format), Send InfoFrame data out to CSI2, Audio output to I2S i/f (valid for 2 channel only), I2C address index increments on every data byte transfer, Audio and Video tx buffres enable. ++}; ++ ++/* list of image formats supported by TCM825X sensor */ ++static const struct v4l2_fmtdesc tc358743_formats[] = { ++ { ++ .description = "RGB888 (RGB24)", ++ .pixelformat = V4L2_PIX_FMT_RGB24, /* 24 RGB-8-8-8 */ ++ .flags = MIPI_DT_RGB888 // 0x24 ++ }, ++ { ++ .description = "RAW12 (Y/CbCr 4:2:0)", ++ .pixelformat = V4L2_PIX_FMT_UYVY, /* 12 Y/CbCr 4:2:0 */ ++ .flags = MIPI_DT_RAW12 // 0x2c ++ }, ++ { ++ .description = "YUV 4:2:2 8-bit", ++ .pixelformat = V4L2_PIX_FMT_YUYV, /* 8 8-bit color */ ++ .flags = MIPI_DT_YUV422 // 0x1e /* UYVY... */ ++ }, ++}; ++ ++ ++static const struct tc358743_mode_info tc358743_mode_info_data[2][tc358743_mode_MAX] = { ++/* Color bar test settings */ ++ [1][tc358743_mode_INIT] = ++ {"cb640x480-108MHz@30", tc358743_mode_INIT, 640, 480, ++ 6, 1, 2, 108, ++ tc358743_setting_YUV422_2lane_color_bar_640_480_108MHz_cont, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_color_bar_640_480_108MHz_cont), ++ MIPI_DT_YUV422 ++ }, ++ [0][tc358743_mode_INIT] = ++ {"cb640x480-108MHz@60", tc358743_mode_INIT, 640, 480, ++ 6, 1, 2, 108, ++ tc358743_setting_YUV422_2lane_color_bar_640_480_108MHz_cont, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_color_bar_640_480_108MHz_cont), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_INIT4] = ++ {"cb640x480-174Mhz@30", tc358743_mode_INIT4, 640, 480, ++ 6, 1, 2, 174, ++ tc358743_setting_YUV422_2lane_color_bar_640_480_174MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_color_bar_640_480_174MHz), ++ MIPI_DT_YUV422 ++ }, ++ [0][tc358743_mode_INIT4] = ++ {"cb640x480-174MHz@60", tc358743_mode_INIT4, 640, 480, ++ 6, 1, 2, 174, ++ tc358743_setting_YUV422_2lane_color_bar_640_480_174MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_color_bar_640_480_174MHz), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_INIT3] = ++ {"cb1024x720-4lane@30", tc358743_mode_INIT3, 1024, 720, ++ 6, 1, 4, 300, ++ tc358743_setting_YUV422_4lane_color_bar_1024_720_200MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1024_720_200MHz), ++ MIPI_DT_YUV422 ++ }, ++ [0][tc358743_mode_INIT3] = ++ {"cb1024x720-4lane@60", tc358743_mode_INIT3, 1024, 720, ++ 6, 1, 4, 300, ++ tc358743_setting_YUV422_4lane_color_bar_1024_720_200MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1024_720_200MHz), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_INIT1] = ++ {"cb1280x720-2lane@30", tc358743_mode_INIT1, 1280, 720, ++ 12, 0, 2, 125, ++ tc358743_setting_YUV422_2lane_color_bar_1280_720_125MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_color_bar_1280_720_125MHz), ++ MIPI_DT_YUV422 ++ }, ++ [0][tc358743_mode_INIT1] = ++ {"cb1280x720-2lane@60", tc358743_mode_INIT1, 1280, 720, ++ 12, 0, 2, 125, ++ tc358743_setting_YUV422_2lane_color_bar_1280_720_125MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_color_bar_1280_720_125MHz), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_INIT2] = ++ {"cb1280x720-4lane-125MHz@30", tc358743_mode_INIT2, 1280, 720, ++ 12, 0, 4, 125, ++ tc358743_setting_YUV422_4lane_color_bar_1280_720_125MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1280_720_125MHz), ++ MIPI_DT_YUV422 ++ }, ++ [0][tc358743_mode_INIT2] = ++ {"cb1280x720-4lane-125MHz@60", tc358743_mode_INIT2, 1280, 720, ++ 12, 0, 4, 125, ++ tc358743_setting_YUV422_4lane_color_bar_1280_720_125MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1280_720_125MHz), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_INIT5] = ++ {"cb1280x720-4lane-300MHz@30", tc358743_mode_INIT5, 1280, 720, ++ 12, 0, 4, 300, ++ tc358743_setting_YUV422_4lane_color_bar_1280_720_300MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1280_720_300MHz), ++ MIPI_DT_YUV422 ++ }, ++ [0][tc358743_mode_INIT5] = ++ {"cb1280x720-4lane-300MHz@60", tc358743_mode_INIT5, 1280, 720, ++ 12, 0, 4, 300, ++ tc358743_setting_YUV422_4lane_color_bar_1280_720_300MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1280_720_300MHz), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_INIT6] = ++ {"cb1920x1023@30", tc358743_mode_INIT6, 1920, 1023, ++ 15, 0, 4, 300, ++ tc358743_setting_YUV422_4lane_color_bar_1920_1023_300MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1920_1023_300MHz), ++ MIPI_DT_YUV422 ++ }, ++ [0][tc358743_mode_INIT6] = ++ {"cb1920x1023@60", tc358743_mode_INIT6, 1920, 1023, ++ 15, 0, 4, 300, ++ tc358743_setting_YUV422_4lane_color_bar_1920_1023_300MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_color_bar_1920_1023_300MHz), ++ MIPI_DT_YUV422 ++ }, ++/* Input settings */ ++ [tc358743_60_fps][tc358743_mode_480P_640_480] = ++ {"640x480@60", tc358743_mode_480P_640_480, 640, 480, ++ 1, (0x02)<<8|(0x00), 2, 125, ++ tc358743_setting_YUV422_2lane_60fps_640_480_125Mhz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_60fps_640_480_125Mhz), ++ MIPI_DT_YUV422, ++ }, ++ [1][tc358743_mode_480P_720_480] = ++ {"720x480@30", tc358743_mode_480P_720_480, 720, 480, ++ 6, (0x02)<<8|(0x00), 2, 125, ++ tc358743_setting_YUV422_2lane_60fps_720_480_125Mhz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_60fps_720_480_125Mhz), ++ MIPI_DT_YUV422, ++ }, ++ [tc358743_60_fps][tc358743_mode_480P_720_480] = ++ {"720x480@60", tc358743_mode_480P_720_480, 720, 480, ++ 6, (0x02)<<8|(0x00), 2, 125, ++ tc358743_setting_YUV422_2lane_60fps_720_480_125Mhz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_60fps_720_480_125Mhz), ++ MIPI_DT_YUV422, ++ }, ++ [tc358743_60_fps][tc358743_mode_1024x768] = ++ {"1024x768@60", tc358743_mode_1024x768, 1024, 768, ++ 16, 60, 4, 125, ++ tc358743_setting_YUV422_4lane_1024x768_60fps_125MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_1024x768_60fps_125MHz), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_720P_1280_720] = ++ {"1280x720-2lane@30", tc358743_mode_720P_1280_720, 1280, 720, ++ 12, (0x3e)<<8|(0x3c), 2, 125, ++ tc358743_setting_YUV422_2lane_30fps_720P_1280_720_125MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_30fps_720P_1280_720_125MHz), ++ MIPI_DT_YUV422, ++ }, ++ [0][tc358743_mode_720P_1280_720] = ++ {"1280x720-2lane@60", tc358743_mode_720P_1280_720, 1280, 720, ++ 12, (0x3e)<<8|(0x3c), 2, 125, ++ tc358743_setting_YUV422_2lane_30fps_720P_1280_720_125MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_2lane_30fps_720P_1280_720_125MHz), ++ MIPI_DT_YUV422, ++ }, ++ [1][tc358743_mode_720P_60_1280_720] = ++ {"1280x720-4lane-133Mhz@30", tc358743_mode_720P_60_1280_720, 1280, 720, ++ 12, 0, 4, 133, ++ tc358743_setting_YUV422_4lane_720P_60fps_1280_720_133Mhz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_720P_60fps_1280_720_133Mhz), ++ MIPI_DT_YUV422 ++ }, ++ [tc358743_60_fps][tc358743_mode_720P_60_1280_720] = ++ {"1280x720-4lane@60", tc358743_mode_720P_60_1280_720, 1280, 720, ++ 12, 0, 4, 133, ++ tc358743_setting_YUV422_4lane_720P_60fps_1280_720_133Mhz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_720P_60fps_1280_720_133Mhz), ++ MIPI_DT_YUV422 ++ }, ++ [1][tc358743_mode_1080P_1920_1080] = ++ {"1920x1080@30", tc358743_mode_1080P_1920_1080, 1920, 1080, ++ 15, 0xa, 4, 300, ++ tc358743_setting_YUV422_4lane_1080P_30fps_1920_1080_300MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_1080P_30fps_1920_1080_300MHz), ++ MIPI_DT_YUV422 ++ }, ++ [tc358743_60_fps][tc358743_mode_1080P_1920_1080] = ++ {"1920x1080@60", tc358743_mode_1080P_1920_1080, 1920, 1080, ++ 15, 0x0b, 4, 300, ++ tc358743_setting_YUV422_4lane_1080P_60fps_1920_1080_300MHz, ++ ARRAY_SIZE(tc358743_setting_YUV422_4lane_1080P_60fps_1920_1080_300MHz), ++ MIPI_DT_YUV422 ++ }, ++}; ++ ++static int tc358743_probe(struct i2c_client *adapter, ++ const struct i2c_device_id *device_id); ++static int tc358743_remove(struct i2c_client *client); ++ ++static const struct i2c_device_id tc358743_id[] = { ++ {"tc358743_mipi", 0}, ++ {}, ++}; ++ ++MODULE_DEVICE_TABLE(i2c, tc358743_id); ++ ++static struct i2c_driver tc358743_i2c_driver = { ++ .driver = { ++ .owner = THIS_MODULE, ++ .name = "tc358743_mipi", ++ }, ++ .probe = tc358743_probe, ++ .remove = tc358743_remove, ++ .id_table = tc358743_id, ++}; ++ ++struct _reg_size ++{ ++ u16 startaddr, endaddr; ++ int size; ++}; ++ ++static const struct _reg_size tc358743_read_reg_size[] = ++{ ++ {0x0000, 0x005a, 2}, ++ {0x0140, 0x0150, 4}, ++ {0x0204, 0x0238, 4}, ++ {0x040c, 0x0418, 4}, ++ {0x044c, 0x0454, 4}, ++ {0x0500, 0x0518, 4}, ++ {0x0600, 0x06cc, 4}, ++ {0x7000, 0x7100, 2}, ++ {0x8500, 0x8bff, 1}, ++ {0x8c00, 0x8fff, 4}, ++ {0x9000, 0x90ff, 1}, ++ {0x9100, 0x92ff, 1}, ++ {0, 0, 0}, ++}; ++ ++int get_reg_size(u16 reg, int len) ++{ ++ const struct _reg_size *p = tc358743_read_reg_size; ++ int size; ++ ++#if 0 //later #ifndef DEBUG ++ if (len) ++ return len; ++#endif ++ while (p->size) { ++ if ((p->startaddr <= reg) && (reg <= p->endaddr)) { ++ size = p->size; ++ if (len && (size != len)) { ++ pr_err("%s:reg len error:reg=%x %d instead of %d\n", ++ __func__, reg, len, size); ++ return 0; ++ } ++ if (reg % size) { ++ pr_err("%s:cannot read from the middle of a register, reg(%x) size(%d)\n", ++ __func__, reg, size); ++ return 0; ++ } ++ return size; ++ } ++ p++; ++ } ++ pr_err("%s:reg=%x size is not defined\n",__func__, reg); ++ return 0; ++} ++ ++static s32 tc358743_read_reg(struct sensor_data *sensor, u16 reg, void *rxbuf) ++{ ++ struct i2c_client *client = sensor->i2c_client; ++ struct i2c_msg msgs[2]; ++ u8 txbuf[2]; ++ int ret; ++ int size = get_reg_size(reg, 0); ++ ++ if (!size) ++ return -EINVAL; ++ ++ txbuf[0] = reg >> 8; ++ txbuf[1] = reg & 0xff; ++ msgs[0].addr = client->addr; ++ msgs[0].flags = 0; ++ msgs[0].len = 2; ++ msgs[0].buf = txbuf; ++ ++ msgs[1].addr = client->addr; ++ msgs[1].flags = I2C_M_RD; ++ msgs[1].len = size; ++ msgs[1].buf = rxbuf; ++ ++ ret = i2c_transfer(client->adapter, msgs, 2); ++ if (ret < 0) { ++ pr_err("%s:reg=%x ret=%d\n", __func__, reg, ret); ++ return ret; ++ } ++// pr_debug("%s:reg=%x,val=%x\n", __func__, reg, ((char *)rxbuf)[0]); ++ return 0; ++} ++ ++static s32 tc358743_read_reg_val(struct sensor_data *sensor, u16 reg) ++{ ++ u32 val = 0; ++ tc358743_read_reg(sensor, reg, &val); ++ return val; ++} ++ ++static s32 tc358743_read_reg_val16(struct sensor_data *sensor, u16 reg) ++{ ++#if 0 ++ struct i2c_client *client = sensor->i2c_client; ++ struct i2c_msg msgs[3]; ++ u8 txbuf[4]; ++ u8 rxbuf1[4]; ++ u8 rxbuf2[4]; ++ int ret; ++ int size = get_reg_size(reg, 0); ++ ++ if (size != 1) ++ return -EINVAL; ++ ++ txbuf[0] = reg >> 8; ++ txbuf[1] = reg & 0xff; ++ msgs[0].addr = client->addr; ++ msgs[0].flags = 0; ++ msgs[0].len = 2; ++ msgs[0].buf = txbuf; ++ ++ msgs[1].addr = client->addr; ++ msgs[1].flags = I2C_M_RD; ++ msgs[1].len = size; ++ msgs[1].buf = rxbuf1; ++ ++ msgs[2].addr = client->addr; ++ msgs[2].flags = I2C_M_RD; ++ msgs[2].len = size; ++ msgs[2].buf = rxbuf2; ++ ++ ret = i2c_transfer(client->adapter, msgs, 3); ++ if (ret < 0) { ++ pr_err("%s:reg=%x ret=%d\n", __func__, reg, ret); ++ return ret; ++ } ++// pr_debug("%s:reg=%x,val=%x\n", __func__, reg, ((char *)rxbuf)[0]); ++ return rxbuf1[0] | (rxbuf2[0] << 8); ++#else ++ u32 val1 = 0; ++ u32 val2 = 0; ++ tc358743_read_reg(sensor, reg, &val1); ++ tc358743_read_reg(sensor, reg+1, &val2); ++ return val1 | (val2 << 8); ++ ++#endif ++} ++ ++static s32 tc358743_write_reg(struct sensor_data *sensor, u16 reg, u32 val, int len) ++{ ++ int ret; ++ int i = 0; ++ u32 data = val; ++ u8 au8Buf[6] = {0}; ++ int size = get_reg_size(reg, len); ++ ++ if (!size) ++ return -EINVAL; ++ ++ au8Buf[i++] = reg >> 8; ++ au8Buf[i++] = reg & 0xff; ++ while (size-- > 0) { ++ au8Buf[i++] = (u8)data; ++ data >>= 8; ++ } ++ ++ ret = i2c_master_send(sensor->i2c_client, au8Buf, i); ++ if (ret < 0) { ++ pr_err("%s:write reg error(%d):reg=%x,val=%x\n", ++ __func__, ret, reg, val); ++ return ret; ++ } ++ if ((reg < 0x7000) || (reg >= 0x7100)) { ++ if (0) pr_debug("%s:reg=%x,val=%x 8543=%02x\n", __func__, reg, val, tc358743_read_reg_val(sensor, 0x8543)); ++ } ++ return 0; ++} ++ ++static void tc358743_software_reset(struct sensor_data *sensor) ++{ ++ int freq = sensor->mclk / 10000; ++ tc358743_write_reg(sensor, 0x7080, 0, 2); ++ tc358743_write_reg(sensor, 0x0002, 0x0f00, 2); ++ msleep(100); ++ tc358743_write_reg(sensor, 0x0002, 0x0000, 2); ++ msleep(1000); ++ tc358743_write_reg(sensor, 0x0004, 0x0004, 2); /* autoinc */ ++ pr_debug("%s:freq=%d\n", __func__, freq); ++ tc358743_write_reg(sensor, 0x8540, freq, 1); ++ tc358743_write_reg(sensor, 0x8541, freq >> 8, 1); ++} ++ ++static void tc358743_enable_edid(struct sensor_data *sensor) ++{ ++ pr_debug("Activate EDID\n"); ++ // EDID ++ tc358743_write_reg(sensor, 0x85c7, 0x01, 1); // EDID MODE REGISTER: nternal EDID-RAM & DDC2B mode ++ tc358743_write_reg(sensor, 0x85ca, 0x00, 1); ++ tc358743_write_reg(sensor, 0x85cb, 0x01, 1); // 0x85cb:0x85ca - EDID Length = 0x01:00 (Size = 0x100 = 256) ++ tc358743_write_reg(sensor, 0x8543, 0x36, 1); // DDC CONTROL: DDC_ACK output terminal H active, DDC5V_active detect delay 200ms ++ tc358743_write_reg(sensor, 0x854a, 0x01, 1); // mark init done ++ if (0) pr_debug("%s: c7=%02x ca=%02x cb=%02x 43=%02x 4a=%02x\n", __func__, ++ tc358743_read_reg_val(sensor, 0x85c7), ++ tc358743_read_reg_val(sensor, 0x85ca), ++ tc358743_read_reg_val(sensor, 0x85cb), ++ tc358743_read_reg_val(sensor, 0x8543), ++ tc358743_read_reg_val(sensor, 0x854a)); ++} ++ ++static int tc358743_write_edid(struct sensor_data *sensor, const u8 *edid, int len) ++{ ++ int i = 0, off = 0; ++ u8 au8Buf[16+2] = {0}; ++ int size = 0; ++ int checksum = 0; ++ u16 reg; ++ ++ reg = 0x8C00; ++ off = 0; ++ size = ARRAY_SIZE(au8Buf) - 2; ++ pr_debug("Write EDID: %d (%d)\n", len, size); ++ while (len > 0) { ++ i = 0; ++ au8Buf[i++] = (reg >> 8) & 0xff; ++ au8Buf[i++] = reg & 0xff; ++ if (size > len) ++ size = len; ++ while (i < size + 2) { ++ u8 byte = edid[off++]; ++ if ((off & 0x7f) == 0) { ++ checksum &= 0xff; ++ if (checksum != byte) { ++ pr_info("%schecksum=%x, byte=%x\n", __func__, checksum, byte); ++ byte = checksum; ++ checksum = 0; ++ } ++ } else { ++ checksum -= byte; ++ } ++ au8Buf[i++] = byte; ++ } ++ ++ if (i2c_master_send(sensor->i2c_client, au8Buf, i) < 0) { ++ pr_err("%s:write reg error:reg=%x,val=%x\n", ++ __func__, reg, off); ++ return -1; ++ } ++ len -= (u8)size; ++ reg += (u16)size; ++ } ++ tc358743_enable_edid(sensor); ++ return 0; ++} ++ ++static s32 power_control(struct tc_data *td, int on) ++{ ++ struct sensor_data *sensor = &td->sensor; ++ int i; ++ int ret = 0; ++ ++ pr_debug("%s: %d\n", __func__, on); ++ if (sensor->on != on) { ++ if (on) { ++ for (i = 0; i < REGULATOR_CNT; i++) { ++ if (td->regulator[i]) { ++ ret = regulator_enable(td->regulator[i]); ++ if (ret) { ++ pr_err("%s:regulator_enable failed(%d)\n", ++ __func__, ret); ++ on = 0; /* power all off */ ++ break; ++ } ++ } ++ } ++ } ++ tc_standby(td, on ? 0 : 1); ++ sensor->on = on; ++ if (!on) { ++ for (i = REGULATOR_CNT - 1; i >= 0; i--) { ++ if (td->regulator[i]) ++ regulator_disable(td->regulator[i]); ++ } ++ } ++ } ++ return ret; ++} ++ ++static int tc358743_toggle_hpd(struct sensor_data *sensor, int active) ++{ ++ int ret = 0; ++ if (active) { ++ ret += tc358743_write_reg(sensor, 0x8544, 0x00, 1); ++ mdelay(500); ++ ret += tc358743_write_reg(sensor, 0x8544, 0x10, 1); ++ } else { ++ ret += tc358743_write_reg(sensor, 0x8544, 0x10, 1); ++ mdelay(500); ++ ret += tc358743_write_reg(sensor, 0x8544, 0x00, 1); ++ } ++ return ret; ++} ++ ++static int get_format_index(enum tc358743_frame_rate frame_rate, enum tc358743_mode mode) ++{ ++ int ifmt; ++ u32 flags = tc358743_mode_info_data[frame_rate][mode].flags; ++ ++ for (ifmt = 0; ifmt < ARRAY_SIZE(tc358743_formats); ifmt++) { ++ if (flags == tc358743_formats[ifmt].flags) ++ return ifmt; ++ } ++ return -1; ++} ++ ++static int get_pixelformat(enum tc358743_frame_rate frame_rate, enum tc358743_mode mode) ++{ ++ int ifmt = get_format_index(frame_rate, mode); ++ ++ if (ifmt < 0) { ++ pr_debug("%s: unsupported format, %d, %d\n", __func__, frame_rate, mode); ++ return 0; ++ } ++ pr_debug("%s: %s (%x, %x)\n", __func__, ++ tc358743_formats[ifmt].description, ++ tc358743_formats[ifmt].pixelformat, ++ tc358743_formats[ifmt].flags); ++ return tc358743_formats[ifmt].pixelformat; ++} ++ ++int set_frame_rate_mode(struct tc_data *td, ++ enum tc358743_frame_rate frame_rate, enum tc358743_mode mode) ++{ ++ struct sensor_data *sensor = &td->sensor; ++ const struct reg_value *pModeSetting = NULL; ++ s32 i = 0; ++ s32 iModeSettingArySize = 0; ++ register u32 RepeateLines = 0; ++ register int RepeateTimes = 0; ++ register u32 Delay_ms = 0; ++ register u16 RegAddr = 0; ++ register u32 Mask = 0; ++ register u32 Val = 0; ++ u8 Length; ++ int retval = 0; ++ ++ pModeSetting = ++ tc358743_mode_info_data[frame_rate][mode].init_data_ptr; ++ iModeSettingArySize = ++ tc358743_mode_info_data[frame_rate][mode].init_data_size; ++ ++ sensor->pix.pixelformat = get_pixelformat(frame_rate, mode); ++ sensor->pix.width = ++ tc358743_mode_info_data[frame_rate][mode].width; ++ sensor->pix.height = ++ tc358743_mode_info_data[frame_rate][mode].height; ++ pr_debug("%s: Set %d regs from %p for frs %d mode %d with width %d height %d\n", __func__, ++ iModeSettingArySize, ++ pModeSetting, ++ frame_rate, ++ mode, ++ sensor->pix.width, ++ sensor->pix.height); ++ for (i = 0; i < iModeSettingArySize; ++i) { ++ pModeSetting = tc358743_mode_info_data[frame_rate][mode].init_data_ptr + i; ++ ++ Delay_ms = pModeSetting->u32Delay_ms & (0xffff); ++ RegAddr = pModeSetting->u16RegAddr; ++ Val = pModeSetting->u32Val; ++ Mask = pModeSetting->u32Mask; ++ Length = pModeSetting->u8Length; ++ if (Mask) { ++ u32 RegVal = 0; ++ ++ retval = tc358743_read_reg(sensor, RegAddr, &RegVal); ++ if (retval < 0) { ++ pr_err("%s: read failed, reg=0x%x\n", __func__, RegAddr); ++ return retval; ++ } ++ RegVal &= ~(u8)Mask; ++ Val &= Mask; ++ Val |= RegVal; ++ } ++ ++ retval = tc358743_write_reg(sensor, RegAddr, Val, Length); ++ if (retval < 0) { ++ pr_err("%s: write failed, reg=0x%x\n", __func__, RegAddr); ++ return retval; ++ } ++ if (Delay_ms) ++ msleep(Delay_ms); ++ ++ if (0 != ((pModeSetting->u32Delay_ms>>16) & (0xff))) { ++ if (!RepeateTimes) { ++ RepeateTimes = (pModeSetting->u32Delay_ms>>16) & (0xff); ++ RepeateLines = (pModeSetting->u32Delay_ms>>24) & (0xff); ++ } ++ if (--RepeateTimes > 0) { ++ i -= RepeateLines; ++ } ++ } ++ } ++ tc358743_enable_edid(sensor); ++ if (!td->edid_initialized) { ++ retval = tc358743_write_edid(sensor, cHDMIEDID, ARRAY_SIZE(cHDMIEDID)); ++ if (retval) ++ pr_err("%s: Fail to write EDID(%d) to tc35874!\n", __func__, retval); ++ else ++ td->edid_initialized = 1; ++ } ++ ++ return retval; ++} ++ ++void mipi_csi2_swreset(struct mipi_csi2_info *info); ++#include "../../../../mxc/mipi/mxc_mipi_csi2.h" ++ ++int mipi_reset(void *mipi_csi2_info, ++ enum tc358743_frame_rate frame_rate, ++ enum tc358743_mode mode) ++{ ++ int lanes = tc358743_mode_info_data[frame_rate][mode].lanes; ++ ++ if (!lanes) ++ lanes = 4; ++ ++ pr_debug("%s: mipi_csi2_info:\n" ++ "mipi_en: %d\n" ++ "datatype: %d\n" ++ "dphy_clk: %p\n" ++ "pixel_clk: %p\n" ++ "mipi_csi2_base:%p\n" ++ "pdev: %p\n" ++ , __func__, ++ ((struct mipi_csi2_info *)mipi_csi2_info)->mipi_en, ++ ((struct mipi_csi2_info *)mipi_csi2_info)->datatype, ++ ((struct mipi_csi2_info *)mipi_csi2_info)->dphy_clk, ++ ((struct mipi_csi2_info *)mipi_csi2_info)->pixel_clk, ++ ((struct mipi_csi2_info *)mipi_csi2_info)->mipi_csi2_base, ++ ((struct mipi_csi2_info *)mipi_csi2_info)->pdev ++ ); ++ if (mipi_csi2_get_status(mipi_csi2_info)) { ++ mipi_csi2_disable(mipi_csi2_info); ++ msleep(1); ++ } ++ mipi_csi2_enable(mipi_csi2_info); ++ ++ if (!mipi_csi2_get_status(mipi_csi2_info)) { ++ pr_err("Can not enable mipi csi2 driver!\n"); ++ return -1; ++ } ++ lanes = mipi_csi2_set_lanes(mipi_csi2_info, lanes); ++ pr_debug("Now Using %d lanes\n", lanes); ++ ++ mipi_csi2_reset(mipi_csi2_info); ++ mipi_csi2_set_datatype(mipi_csi2_info, tc358743_mode_info_data[frame_rate][mode].flags); ++ return 0; ++} ++ ++int mipi_wait(void *mipi_csi2_info) ++{ ++ unsigned i = 0; ++ unsigned j; ++ u32 mipi_reg; ++ u32 mipi_reg_test[10]; ++ ++ /* wait for mipi sensor ready */ ++ for (;;) { ++ mipi_reg = mipi_csi2_dphy_status(mipi_csi2_info); ++ mipi_reg_test[i++] = mipi_reg; ++ if (mipi_reg != 0x200) ++ break; ++ if (i >= 10) { ++ pr_err("mipi csi2 can not receive sensor clk!\n"); ++ return -1; ++ } ++ msleep(10); ++ } ++ ++ for (j = 0; j < i; j++) { ++ pr_debug("%d mipi csi2 dphy status %x\n", j, mipi_reg_test[j]); ++ } ++ ++ i = 0; ++ ++ /* wait for mipi stable */ ++ for (;;) { ++ mipi_reg = mipi_csi2_get_error1(mipi_csi2_info); ++ mipi_reg_test[i++] = mipi_reg; ++ if (!mipi_reg) ++ break; ++ if (i >= 10) { ++ pr_err("mipi csi2 can not reveive data correctly!\n"); ++ return -1; ++ } ++ msleep(10); ++ } ++ ++ for (j = 0; j < i; j++) { ++ pr_debug("%d mipi csi2 err1 %x\n", j, mipi_reg_test[j]); ++ } ++ return 0; ++} ++ ++static int tc358743_init_mode(struct tc_data *td, ++ enum tc358743_frame_rate frame_rate, ++ enum tc358743_mode mode) ++{ ++ struct sensor_data *sensor = &td->sensor; ++ int retval = 0; ++ void *mipi_csi2_info; ++ ++ pr_debug("%s rate: %d mode: %d\n", __func__, frame_rate, mode); ++ if ((mode >= tc358743_mode_MAX || mode < 0) ++ && (mode != tc358743_mode_INIT)) { ++ pr_debug("%s Wrong tc358743 mode detected! %d. Set mode 0\n", __func__, mode); ++ mode = 0; ++ } ++ /* initial mipi dphy */ ++ tc358743_toggle_hpd(sensor, 0); ++ tc358743_software_reset(sensor); ++ ++ mipi_csi2_info = mipi_csi2_get_info(); ++ pr_debug("%s rate: %d mode: %d, info %p\n", __func__, frame_rate, mode, mipi_csi2_info); ++ ++ if (!mipi_csi2_info) { ++ pr_err("Fail to get mipi_csi2_info!\n"); ++ return -1; ++ } ++ retval = mipi_reset(mipi_csi2_info, frame_rate, tc358743_mode_INIT); ++ if (retval) ++ return retval; ++ retval = set_frame_rate_mode(td, frame_rate, tc358743_mode_INIT); ++ if (retval) ++ return retval; ++ retval = mipi_wait(mipi_csi2_info); ++ ++ if (mode != tc358743_mode_INIT) { ++ tc358743_software_reset(sensor); ++ retval = mipi_reset(mipi_csi2_info, frame_rate, mode); ++ if (retval) ++ return retval; ++ retval = set_frame_rate_mode(td, frame_rate, mode); ++ if (retval) ++ return retval; ++ retval = mipi_wait(mipi_csi2_info); ++ } ++ if (td->hpd_active) ++ tc358743_toggle_hpd(sensor, td->hpd_active); ++ return retval; ++} ++ ++static int tc358743_minit(struct tc_data *td) ++{ ++ struct sensor_data *sensor = &td->sensor; ++ int ret; ++ enum tc358743_frame_rate frame_rate = tc358743_60_fps; ++ u32 tgt_fps = sensor->streamcap.timeperframe.denominator / ++ sensor->streamcap.timeperframe.numerator; ++ ++ if (tgt_fps == 60) ++ frame_rate = tc358743_60_fps; ++ else if (tgt_fps == 30) ++ frame_rate = tc358743_30_fps; ++ ++ pr_debug("%s: capture mode: %d fps: %d\n", __func__, ++ sensor->streamcap.capturemode, tgt_fps); ++ ++ ret = tc358743_init_mode(td, frame_rate, sensor->streamcap.capturemode); ++ if (ret) ++ pr_err("%s: Fail to init tc35874!\n", __func__); ++ return ret; ++} ++ ++static int tc358743_reset(struct tc_data *td) ++{ ++ int loop = 0; ++ int ret; ++ ++ det_work_enable(td, 0); ++ for (;;) { ++ pr_debug("%s: RESET\n", __func__); ++ power_control(td, 0); ++ mdelay(100); ++ power_control(td, 1); ++ mdelay(1000); ++ ++ ret = tc358743_minit(td); ++ if (!ret) ++ break; ++ if (loop++ >= 3) { ++ pr_err("%s:failed(%d)\n", __func__, ret); ++ break; ++ } ++ } ++ det_work_enable(td, 1); ++ return ret; ++} ++ ++/* --------------- IOCTL functions from v4l2_int_ioctl_desc --------------- */ ++ ++static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p) ++{ ++ struct tc_data *td = s->priv; ++ struct sensor_data *sensor = &td->sensor; ++ ++ pr_debug("%s\n", __func__); ++ ++ memset(p, 0, sizeof(*p)); ++ p->u.bt656.clock_curr = TC358743_XCLK_MIN; //sensor->mclk; ++ pr_debug("%s: clock_curr=mclk=%d\n", __func__, sensor->mclk); ++ p->if_type = V4L2_IF_TYPE_BT656; ++ p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT; ++ p->u.bt656.clock_min = TC358743_XCLK_MIN; ++ p->u.bt656.clock_max = TC358743_XCLK_MAX; ++ ++ return 0; ++} ++ ++/*! ++ * ioctl_s_power - V4L2 sensor interface handler for VIDIOC_S_POWER ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @on: indicates power mode (on or off) ++ * ++ * Turns the power on or off, depending on the value of on and returns the ++ * appropriate error code. ++ */ ++static int ioctl_s_power(struct v4l2_int_device *s, int on) ++{ ++ struct tc_data *td = s->priv; ++ int ret; ++ ++ mutex_lock(&td->access_lock); ++ if (on && !td->mode) { ++ ret = tc358743_reset(td); ++ } else { ++ ret = power_control(td, on); ++ } ++ mutex_unlock(&td->access_lock); ++ return ret; ++} ++ ++/*! ++ * ioctl_g_parm - V4L2 sensor interface handler for VIDIOC_G_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_G_PARM ioctl structure ++ * ++ * Returns the sensor's video CAPTURE parameters. ++ */ ++static int ioctl_g_parm(struct v4l2_int_device *s, struct v4l2_streamparm *a) ++{ ++ struct tc_data *td = s->priv; ++ struct sensor_data *sensor = &td->sensor; ++ struct v4l2_captureparm *cparm = &a->parm.capture; ++ int ret = 0; ++ ++ pr_debug("%s type: %x\n", __func__, a->type); ++ switch (a->type) { ++ /* This is the only case currently handled. */ ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ memset(a, 0, sizeof(*a)); ++ a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ cparm->capability = sensor->streamcap.capability; ++ cparm->timeperframe = sensor->streamcap.timeperframe; ++ cparm->capturemode = sensor->streamcap.capturemode; ++ cparm->extendedmode = sensor->streamcap.extendedmode; ++ ret = 0; ++ break; ++ ++ /* These are all the possible cases. */ ++ case V4L2_BUF_TYPE_VIDEO_OUTPUT: ++ case V4L2_BUF_TYPE_VIDEO_OVERLAY: ++ case V4L2_BUF_TYPE_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_VBI_OUTPUT: ++ case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: ++ ret = -EINVAL; ++ break; ++ ++ default: ++ pr_debug(" type is unknown - %d\n", a->type); ++ ret = -EINVAL; ++ break; ++ } ++ pr_debug("%s done %d\n", __func__, ret); ++ return ret; ++} ++ ++/*! ++ * ioctl_s_parm - V4L2 sensor interface handler for VIDIOC_S_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_S_PARM ioctl structure ++ * ++ * Configures the sensor to use the input parameters, if possible. If ++ * not possible, reverts to the old parameters and returns the ++ * appropriate error code. ++ */ ++static int ioctl_s_parm(struct v4l2_int_device *s, struct v4l2_streamparm *a) ++{ ++ struct tc_data *td = s->priv; ++ struct sensor_data *sensor = &td->sensor; ++ struct v4l2_fract *timeperframe = &a->parm.capture.timeperframe; ++ u32 tgt_fps; /* target frames per secound */ ++ enum tc358743_frame_rate frame_rate = tc358743_60_fps, frame_rate_now = tc358743_60_fps; ++ enum tc358743_mode mode; ++ int ret = 0; ++ ++ pr_debug("%s\n", __func__); ++ mutex_lock(&td->access_lock); ++ det_work_enable(td, 0); ++ /* Make sure power on */ ++ power_control(td, 1); ++ ++ switch (a->type) { ++ /* This is the only case currently handled. */ ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ /* Check that the new frame rate is allowed. */ ++ if ((timeperframe->numerator == 0) || ++ (timeperframe->denominator == 0)) { ++ timeperframe->denominator = DEFAULT_FPS; ++ timeperframe->numerator = 1; ++ } ++ ++ tgt_fps = timeperframe->denominator / ++ timeperframe->numerator; ++ ++ if (tgt_fps > MAX_FPS) { ++ timeperframe->denominator = MAX_FPS; ++ timeperframe->numerator = 1; ++ } else if (tgt_fps < MIN_FPS) { ++ timeperframe->denominator = MIN_FPS; ++ timeperframe->numerator = 1; ++ } ++ ++ /* Actual frame rate we use */ ++ tgt_fps = timeperframe->denominator / ++ timeperframe->numerator; ++ ++ if (tgt_fps == 60) ++ frame_rate = tc358743_60_fps; ++ else if (tgt_fps == 30) ++ frame_rate = tc358743_30_fps; ++ else { ++ pr_err(" The camera frame rate is not supported!\n"); ++ ret = -EINVAL; ++ break; ++ } ++ ++ if ((u32)a->parm.capture.capturemode >= tc358743_mode_MAX) { ++ a->parm.capture.capturemode = 0; ++ pr_debug("%s: Force mode: %d \n", __func__, ++ (u32)a->parm.capture.capturemode); ++ } ++ ++ tgt_fps = sensor->streamcap.timeperframe.denominator / ++ sensor->streamcap.timeperframe.numerator; ++ ++ if (tgt_fps == 60) ++ frame_rate_now = tc358743_60_fps; ++ else if (tgt_fps == 30) ++ frame_rate_now = tc358743_30_fps; ++ ++ mode = td->mode; ++ if (IS_COLORBAR(mode)) { ++ mode = (u32)a->parm.capture.capturemode; ++ } else { ++ a->parm.capture.capturemode = mode; ++ frame_rate = td->fps; ++ timeperframe->denominator = (frame_rate == tc358743_60_fps) ? 60 : 30; ++ timeperframe->numerator = 1; ++ } ++ ++ if (frame_rate_now != frame_rate || ++ sensor->streamcap.capturemode != mode || ++ sensor->streamcap.extendedmode != (u32)a->parm.capture.extendedmode) { ++ ++ if (mode != tc358743_mode_INIT) { ++ sensor->streamcap.capturemode = mode; ++ sensor->streamcap.timeperframe = *timeperframe; ++ sensor->streamcap.extendedmode = ++ (u32)a->parm.capture.extendedmode; ++ pr_debug("%s: capture mode: %d\n", __func__, ++ mode); ++ ret = tc358743_init_mode(td, frame_rate, mode); ++ } else { ++ a->parm.capture.capturemode = sensor->streamcap.capturemode; ++ *timeperframe = sensor->streamcap.timeperframe; ++ a->parm.capture.extendedmode = sensor->streamcap.extendedmode; ++ } ++ } else { ++ pr_debug("%s: Keep current settings\n", __func__); ++ } ++ break; ++ ++ /* These are all the possible cases. */ ++ case V4L2_BUF_TYPE_VIDEO_OUTPUT: ++ case V4L2_BUF_TYPE_VIDEO_OVERLAY: ++ case V4L2_BUF_TYPE_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_VBI_OUTPUT: ++ case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: ++ pr_debug(" type is not " \ ++ "V4L2_BUF_TYPE_VIDEO_CAPTURE but %d\n", ++ a->type); ++ ret = -EINVAL; ++ break; ++ ++ default: ++ pr_debug(" type is unknown - %d\n", a->type); ++ ret = -EINVAL; ++ break; ++ } ++ ++ det_work_enable(td, 1); ++ mutex_unlock(&td->access_lock); ++ return ret; ++} ++ ++/*! ++ * ioctl_g_ctrl - V4L2 sensor interface handler for VIDIOC_G_CTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @vc: standard V4L2 VIDIOC_G_CTRL ioctl structure ++ * ++ * If the requested control is supported, returns the control's current ++ * value from the video_control[] array. Otherwise, returns -EINVAL ++ * if the control is not supported. ++ */ ++static int ioctl_g_ctrl(struct v4l2_int_device *s, struct v4l2_control *vc) ++{ ++ struct tc_data *td = s->priv; ++ struct sensor_data *sensor = &td->sensor; ++ int ret = 0; ++ ++ pr_debug("%s\n", __func__); ++ switch (vc->id) { ++ case V4L2_CID_BRIGHTNESS: ++ vc->value = sensor->brightness; ++ break; ++ case V4L2_CID_HUE: ++ vc->value = sensor->hue; ++ break; ++ case V4L2_CID_CONTRAST: ++ vc->value = sensor->contrast; ++ break; ++ case V4L2_CID_SATURATION: ++ vc->value = sensor->saturation; ++ break; ++ case V4L2_CID_RED_BALANCE: ++ vc->value = sensor->red; ++ break; ++ case V4L2_CID_BLUE_BALANCE: ++ vc->value = sensor->blue; ++ break; ++ case V4L2_CID_EXPOSURE: ++ vc->value = sensor->ae_mode; ++ break; ++ default: ++ ret = -EINVAL; ++ } ++ ++ return ret; ++} ++ ++/*! ++ * ioctl_s_ctrl - V4L2 sensor interface handler for VIDIOC_S_CTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @vc: standard V4L2 VIDIOC_S_CTRL ioctl structure ++ * ++ * If the requested control is supported, sets the control's current ++ * value in HW (and updates the video_control[] array). Otherwise, ++ * returns -EINVAL if the control is not supported. ++ */ ++static int ioctl_s_ctrl(struct v4l2_int_device *s, struct v4l2_control *vc) ++{ ++ int retval = 0; ++ ++ pr_debug("In tc358743:ioctl_s_ctrl %d\n", ++ vc->id); ++ ++ switch (vc->id) { ++ case V4L2_CID_BRIGHTNESS: ++ break; ++ case V4L2_CID_CONTRAST: ++ break; ++ case V4L2_CID_SATURATION: ++ break; ++ case V4L2_CID_HUE: ++ break; ++ case V4L2_CID_AUTO_WHITE_BALANCE: ++ break; ++ case V4L2_CID_DO_WHITE_BALANCE: ++ break; ++ case V4L2_CID_RED_BALANCE: ++ break; ++ case V4L2_CID_BLUE_BALANCE: ++ break; ++ case V4L2_CID_GAMMA: ++ break; ++ case V4L2_CID_EXPOSURE: ++ break; ++ case V4L2_CID_AUTOGAIN: ++ break; ++ case V4L2_CID_GAIN: ++ break; ++ case V4L2_CID_HFLIP: ++ break; ++ case V4L2_CID_VFLIP: ++ break; ++ default: ++ retval = -EPERM; ++ break; ++ } ++ ++ return retval; ++} ++ ++/*! ++ * ioctl_enum_framesizes - V4L2 sensor interface handler for ++ * VIDIOC_ENUM_FRAMESIZES ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @fsize: standard V4L2 VIDIOC_ENUM_FRAMESIZES ioctl structure ++ * ++ * Return 0 if successful, otherwise -EINVAL. ++ */ ++static int ioctl_enum_framesizes(struct v4l2_int_device *s, ++ struct v4l2_frmsizeenum *fsize) ++{ ++ struct tc_data *td = s->priv; ++ enum tc358743_mode query_mode= fsize->index; ++ enum tc358743_mode mode = td->mode; ++ ++ if (IS_COLORBAR(mode)) { ++ if (query_mode > MAX_COLORBAR) ++ return -EINVAL; ++ mode = query_mode; ++ } else { ++ if (query_mode) ++ return -EINVAL; ++ } ++ pr_debug("%s, mode: %d\n", __func__, mode); ++ ++ fsize->pixel_format = get_pixelformat(0, mode); ++ fsize->discrete.width = ++ tc358743_mode_info_data[0][mode].width; ++ fsize->discrete.height = ++ tc358743_mode_info_data[0][mode].height; ++ pr_debug("%s %d:%d format: %x\n", __func__, fsize->discrete.width, fsize->discrete.height, fsize->pixel_format); ++ return 0; ++} ++ ++/*! ++ * ioctl_g_chip_ident - V4L2 sensor interface handler for ++ * VIDIOC_DBG_G_CHIP_IDENT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @id: pointer to int ++ * ++ * Return 0. ++ */ ++static int ioctl_g_chip_ident(struct v4l2_int_device *s, int *id) ++{ ++ ((struct v4l2_dbg_chip_ident *)id)->match.type = ++ V4L2_CHIP_MATCH_I2C_DRIVER; ++ strcpy(((struct v4l2_dbg_chip_ident *)id)->match.name, ++ "tc358743_mipi"); ++ ++ return 0; ++} ++ ++/*! ++ * ioctl_init - V4L2 sensor interface handler for VIDIOC_INT_INIT ++ * @s: pointer to standard V4L2 device structure ++ */ ++static int ioctl_init(struct v4l2_int_device *s) ++{ ++ pr_debug("%s\n", __func__); ++ return 0; ++} ++ ++/*! ++ * ioctl_enum_fmt_cap - V4L2 sensor interface handler for VIDIOC_ENUM_FMT ++ * @s: pointer to standard V4L2 device structure ++ * @fmt: pointer to standard V4L2 fmt description structure ++ * ++ * Return 0. ++ */ ++static int ioctl_enum_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_fmtdesc *fmt) ++{ ++ struct tc_data *td = s->priv; ++ struct sensor_data *sensor = &td->sensor; ++ int index = fmt->index; ++ ++ if (!index) ++ index = sensor->streamcap.capturemode; ++ pr_debug("%s, INDEX: %d\n", __func__, index); ++ if (index >= tc358743_mode_MAX) ++ return -EINVAL; ++ ++ fmt->pixelformat = get_pixelformat(0, index); ++ ++ pr_debug("%s: format: %x\n", __func__, fmt->pixelformat); ++ return 0; ++} ++ ++static int ioctl_try_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_format *f) ++{ ++ struct tc_data *td = s->priv; ++ struct sensor_data *sensor = &td->sensor; ++ u32 tgt_fps; /* target frames per secound */ ++ enum tc358743_frame_rate frame_rate; ++// enum image_size isize; ++ int ret = 0; ++ struct v4l2_pix_format *pix = &f->fmt.pix; ++ int mode; ++ ++ pr_debug("%s\n", __func__); ++ ++ mutex_lock(&td->access_lock); ++ tgt_fps = sensor->streamcap.timeperframe.denominator / ++ sensor->streamcap.timeperframe.numerator; ++ ++ if (tgt_fps == 60) { ++ frame_rate = tc358743_60_fps; ++ } else if (tgt_fps == 30) { ++ frame_rate = tc358743_30_fps; ++ } else { ++ pr_debug("%s: %d fps (%d,%d) is not supported\n", __func__, tgt_fps, sensor->streamcap.timeperframe.denominator,sensor->streamcap.timeperframe.numerator); ++ ret = -EINVAL; ++ goto out; ++ } ++ mode = sensor->streamcap.capturemode; ++ sensor->pix.pixelformat = get_pixelformat(frame_rate, mode); ++ sensor->pix.width = pix->width = tc358743_mode_info_data[frame_rate][mode].width; ++ sensor->pix.height = pix->height = tc358743_mode_info_data[frame_rate][mode].height; ++ pr_debug("%s: %dx%d\n", __func__, sensor->pix.width, sensor->pix.height); ++ ++ pix->pixelformat = sensor->pix.pixelformat; ++ pix->field = V4L2_FIELD_NONE; ++ pix->bytesperline = pix->width * 4; ++ pix->sizeimage = pix->bytesperline * pix->height; ++ pix->priv = 0; ++ ++ switch (pix->pixelformat) { ++ case V4L2_PIX_FMT_UYVY: ++ default: ++ pix->colorspace = V4L2_COLORSPACE_SRGB; ++ break; ++ } ++ ++ { ++ pr_debug("SYS_STATUS: 0x%x\n", tc358743_read_reg_val(sensor, 0x8520)); ++ pr_debug("VI_STATUS0: 0x%x\n", tc358743_read_reg_val(sensor, 0x8521)); ++ pr_debug("VI_STATUS1: 0x%x\n", tc358743_read_reg_val(sensor, 0x8522)); ++ pr_debug("VI_STATUS2: 0x%x\n", tc358743_read_reg_val(sensor, 0x8525)); ++ pr_debug("VI_STATUS3: 0x%x\n", tc358743_read_reg_val(sensor, 0x8528)); ++ pr_debug("%s %d:%d format: %x\n", __func__, pix->width, pix->height, pix->pixelformat); ++ } ++out: ++ mutex_unlock(&td->access_lock); ++ return ret; ++} ++ ++/*! ++ * ioctl_g_fmt_cap - V4L2 sensor interface handler for ioctl_g_fmt_cap ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 v4l2_format structure ++ * ++ * Returns the sensor's current pixel format in the v4l2_format ++ * parameter. ++ */ ++static int ioctl_g_fmt_cap(struct v4l2_int_device *s, struct v4l2_format *f) ++{ ++ struct tc_data *td = s->priv; ++ struct sensor_data *sensor = &td->sensor; ++ int mode = sensor->streamcap.capturemode; ++ ++ sensor->pix.pixelformat = get_pixelformat(0, mode); ++ sensor->pix.width = tc358743_mode_info_data[0][mode].width; ++ sensor->pix.height = tc358743_mode_info_data[0][mode].height; ++ ++ switch (f->type) { ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ f->fmt.pix = sensor->pix; ++ pr_debug("%s: %dx%d\n", __func__, sensor->pix.width, sensor->pix.height); ++ break; ++ ++ case V4L2_BUF_TYPE_SENSOR: ++ pr_debug("%s: left=%d, top=%d, %dx%d\n", __func__, ++ sensor->spix.left, sensor->spix.top, ++ sensor->spix.swidth, sensor->spix.sheight); ++ f->fmt.spix = sensor->spix; ++ break; ++ ++ case V4L2_BUF_TYPE_PRIVATE: ++ pr_debug("%s: private\n", __func__); ++ break; ++ ++ default: ++ f->fmt.pix = sensor->pix; ++ pr_debug("%s: type=%d, %dx%d\n", __func__, f->type, sensor->pix.width, sensor->pix.height); ++ break; ++ } ++ return 0; ++} ++ ++/*! ++ * ioctl_dev_init - V4L2 sensor interface handler for vidioc_int_dev_init_num ++ * @s: pointer to standard V4L2 device structure ++ * ++ * Initialise the device when slave attaches to the master. ++ */ ++static int ioctl_dev_init(struct v4l2_int_device *s) ++{ ++ struct tc_data *td = s->priv; ++ ++ if (td->det_changed) { ++ mutex_lock(&td->access_lock); ++ td->det_changed = 0; ++ pr_debug("%s\n", __func__); ++ tc358743_minit(td); ++ mutex_unlock(&td->access_lock); ++ } ++ pr_debug("%s\n", __func__); ++ return 0; ++} ++ ++/*! ++ * ioctl_dev_exit - V4L2 sensor interface handler for vidioc_int_dev_exit_num ++ * @s: pointer to standard V4L2 device structure ++ * ++ * Delinitialise the device when slave detaches to the master. ++ */ ++static int ioctl_dev_exit(struct v4l2_int_device *s) ++{ ++ void *mipi_csi2_info; ++ ++ mipi_csi2_info = mipi_csi2_get_info(); ++ ++ /* disable mipi csi2 */ ++ if (mipi_csi2_info) ++ if (mipi_csi2_get_status(mipi_csi2_info)) ++ mipi_csi2_disable(mipi_csi2_info); ++ ++ return 0; ++} ++ ++/*! ++ * This structure defines all the ioctls for this module and links them to the ++ * enumeration. ++ */ ++static struct v4l2_int_ioctl_desc tc358743_ioctl_desc[] = { ++ {vidioc_int_dev_init_num, (v4l2_int_ioctl_func*) ioctl_dev_init}, ++ {vidioc_int_dev_exit_num, ioctl_dev_exit}, ++ {vidioc_int_s_power_num, (v4l2_int_ioctl_func*) ioctl_s_power}, ++ {vidioc_int_g_ifparm_num, (v4l2_int_ioctl_func*) ioctl_g_ifparm}, ++ {vidioc_int_init_num, (v4l2_int_ioctl_func*) ioctl_init}, ++ {vidioc_int_enum_fmt_cap_num, ++ (v4l2_int_ioctl_func *) ioctl_enum_fmt_cap}, ++ {vidioc_int_try_fmt_cap_num, ++ (v4l2_int_ioctl_func *)ioctl_try_fmt_cap}, ++ {vidioc_int_g_fmt_cap_num, (v4l2_int_ioctl_func *) ioctl_g_fmt_cap}, ++ {vidioc_int_g_parm_num, (v4l2_int_ioctl_func *) ioctl_g_parm}, ++ {vidioc_int_s_parm_num, (v4l2_int_ioctl_func *) ioctl_s_parm}, ++ {vidioc_int_g_ctrl_num, (v4l2_int_ioctl_func *) ioctl_g_ctrl}, ++ {vidioc_int_s_ctrl_num, (v4l2_int_ioctl_func *) ioctl_s_ctrl}, ++ {vidioc_int_enum_framesizes_num, ++ (v4l2_int_ioctl_func *) ioctl_enum_framesizes}, ++ {vidioc_int_g_chip_ident_num, ++ (v4l2_int_ioctl_func *) ioctl_g_chip_ident}, ++}; ++ ++static struct v4l2_int_slave tc358743_slave = { ++ .ioctls = tc358743_ioctl_desc, ++ .num_ioctls = ARRAY_SIZE(tc358743_ioctl_desc), ++}; ++ ++static struct v4l2_int_device tc358743_int_device = { ++ .module = THIS_MODULE, ++ .name = "tc358743", ++ .type = v4l2_int_type_slave, ++ .u = { ++ .slave = &tc358743_slave, ++ }, ++}; ++ ++ ++#ifdef CONFIG_TC358743_AUDIO ++struct imx_ssi { ++ struct platform_device *ac97_dev; ++ ++ struct snd_soc_dai *imx_ac97; ++ struct clk *clk; ++ void __iomem *base; ++ int irq; ++ int fiq_enable; ++ unsigned int offset; ++ ++ unsigned int flags; ++ ++ void (*ac97_reset) (struct snd_ac97 *ac97); ++ void (*ac97_warm_reset)(struct snd_ac97 *ac97); ++ ++ struct imx_pcm_dma_params dma_params_rx; ++ struct imx_pcm_dma_params dma_params_tx; ++ ++ int enabled; ++ ++ struct platform_device *soc_platform_pdev; ++ struct platform_device *soc_platform_pdev_fiq; ++}; ++#define SSI_SCR 0x10 ++#define SSI_SRCR 0x20 ++#define SSI_STCCR 0x24 ++#define SSI_SRCCR 0x28 ++#define SSI_SCR_I2S_MODE_NORM (0 << 5) ++#define SSI_SCR_I2S_MODE_MSTR (1 << 5) ++#define SSI_SCR_I2S_MODE_SLAVE (2 << 5) ++#define SSI_I2S_MODE_MASK (3 << 5) ++#define SSI_SCR_SYN (1 << 4) ++#define SSI_SRCR_RSHFD (1 << 4) ++#define SSI_SRCR_RSCKP (1 << 3) ++#define SSI_SRCR_RFSI (1 << 2) ++#define SSI_SRCR_REFS (1 << 0) ++#define SSI_STCCR_WL(x) ((((x) - 2) >> 1) << 13) ++#define SSI_STCCR_WL_MASK (0xf << 13) ++#define SSI_SRCCR_WL(x) ((((x) - 2) >> 1) << 13) ++#define SSI_SRCCR_WL_MASK (0xf << 13) ++/* Audio setup */ ++ ++static int imxpac_tc358743_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ int ret; ++ ++ ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_IF | ++ SND_SOC_DAIFMT_CBM_CFM); ++ if (ret) { ++ pr_err("%s: failed set cpu dai format\n", __func__); ++ return ret; ++ } ++ ++ ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM); ++ if (ret) { ++ pr_err("%s: failed set codec dai format\n", __func__); ++ return ret; ++ } ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, 0, ++ CODEC_CLOCK, SND_SOC_CLOCK_OUT); ++ if (ret) { ++ pr_err("%s: failed setting codec sysclk\n", __func__); ++ return ret; ++ } ++ snd_soc_dai_set_tdm_slot(cpu_dai, 0xffffffc, 0xffffffc, 2, 0); ++ ++ ret = snd_soc_dai_set_sysclk(cpu_dai, IMX_SSP_SYS_CLK, 0, ++ SND_SOC_CLOCK_IN); ++ if (ret) { ++ pr_err("can't set CPU system clock IMX_SSP_SYS_CLK\n"); ++ return ret; ++ } ++#if 1 ++// clear SSI_SRCR_RXBIT0 and SSI_SRCR_RSHFD in order to push Right-justified MSB data fro ++ { ++ struct imx_ssi *ssi = snd_soc_dai_get_drvdata(cpu_dai); ++ u32 scr = 0, srcr = 0, stccr = 0, srccr = 0; ++ ++ pr_debug("%s: base %p\n", __func__, (void *)ssi->base); ++ scr = readl(ssi->base + SSI_SCR); ++ pr_debug("%s: SSI_SCR before: %p\n", __func__, (void *)scr); ++ writel(scr, ssi->base + SSI_SCR); ++ pr_debug("%s: SSI_SCR after: %p\n", __func__, (void *)scr); ++ ++ srcr = readl(ssi->base + SSI_SRCR); ++ pr_debug("%s: SSI_SRCR before: %p\n", __func__, (void *)srcr); ++ writel(srcr, ssi->base + SSI_SRCR); ++ pr_debug("%s: SSI_SRCR after: %p\n", __func__, (void *)srcr); ++ ++ stccr = readl(ssi->base + SSI_STCCR); ++ pr_debug("%s: SSI_STCCR before: %p\n", __func__, (void *)stccr); ++ stccr &= ~SSI_STCCR_WL_MASK; ++ stccr |= SSI_STCCR_WL(16); ++ writel(stccr, ssi->base + SSI_STCCR); ++ pr_debug("%s: SSI_STCCR after: %p\n", __func__, (void *)stccr); ++ ++ srccr = readl(ssi->base + SSI_SRCCR); ++ pr_debug("%s: SSI_SRCCR before: %p\n", __func__, (void *)srccr); ++ srccr &= ~SSI_SRCCR_WL_MASK; ++ srccr |= SSI_SRCCR_WL(16); ++ writel(srccr, ssi->base + SSI_SRCCR); ++ pr_debug("%s: SSI_SRCCR after: %p\n", __func__, (void *)srccr); ++ } ++#endif ++ return 0; ++} ++ ++ ++ ++/* imx_3stack card dapm widgets */ ++static const struct snd_soc_dapm_widget imx_3stack_dapm_widgets_a[] = { ++}; ++ ++ ++ ++static const struct snd_kcontrol_new tc358743_machine_controls_a[] = { ++}; ++ ++/* imx_3stack machine connections to the codec pins */ ++static const struct snd_soc_dapm_route audio_map_a[] = { ++}; ++ ++static int imx_3stack_tc358743_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ int ret; ++ ++ const struct snd_soc_dapm_widget *imx_3stack_dapm_widgets; ++ int imx_3stack_dapm_widgets_size; ++ const struct snd_kcontrol_new *tc358743_machine_controls; ++ int tc358743_machine_controls_size; ++ const struct snd_soc_dapm_route *audio_map; ++ int audio_map_size; ++ int gpio_num = -1; ++ char *gpio_name; ++ ++ pr_debug("%s started\n", __func__); ++ ++ imx_3stack_dapm_widgets = imx_3stack_dapm_widgets_a; ++ imx_3stack_dapm_widgets_size = ARRAY_SIZE(imx_3stack_dapm_widgets_a); ++ tc358743_machine_controls = tc358743_machine_controls_a; ++ tc358743_machine_controls_size = ARRAY_SIZE(tc358743_machine_controls_a); ++ audio_map = audio_map_a; ++ audio_map_size = ARRAY_SIZE(audio_map_a); ++ gpio_num = -1; //card_a_gpio_num; ++ gpio_name = NULL; ++ ++ ret = snd_soc_add_controls(codec, tc358743_machine_controls, ++ tc358743_machine_controls_size); ++ if (ret) { ++ pr_err("%s: snd_soc_add_controls failed. err = %d\n", __func__, ret); ++ return ret; ++ } ++ /* Add imx_3stack specific widgets */ ++ snd_soc_dapm_new_controls(&codec->dapm, imx_3stack_dapm_widgets, ++ imx_3stack_dapm_widgets_size); ++ ++ /* Set up imx_3stack specific audio path audio_map */ ++ snd_soc_dapm_add_routes(&codec->dapm, audio_map, audio_map_size); ++ snd_soc_dapm_sync(&codec->dapm); ++ return 0; ++} ++ ++ ++static struct snd_soc_ops imxpac_tc358743_snd_ops = { ++ .hw_params = imxpac_tc358743_hw_params, ++}; ++ ++static struct snd_soc_dai_link imxpac_tc358743_dai = { ++ .name = "tc358743", ++ .stream_name = "TC358743", ++ .codec_dai_name = "tc358743-hifi", ++ .platform_name = "imx-pcm-audio.2", ++ .codec_name = "tc358743_mipi.1-000f", ++ .cpu_dai_name = "imx-ssi.2", ++ .init = imx_3stack_tc358743_init, ++ .ops = &imxpac_tc358743_snd_ops, ++}; ++ ++static struct snd_soc_card imxpac_tc358743 = { ++ .name = "cpuimx-audio_hdmi_in", ++ .dai_link = &imxpac_tc358743_dai, ++ .num_links = 1, ++}; ++ ++static int imx_audmux_config(int slave, int master) ++{ ++ unsigned int ptcr, pdcr; ++ slave = slave - 1; ++ master = master - 1; ++ ++ /* SSI0 mastered by port 5 */ ++ ptcr = MXC_AUDMUX_V2_PTCR_SYN | ++ MXC_AUDMUX_V2_PTCR_TFSDIR | ++ MXC_AUDMUX_V2_PTCR_TFSEL(master | 0x8) | ++ MXC_AUDMUX_V2_PTCR_TCLKDIR | ++ MXC_AUDMUX_V2_PTCR_RFSDIR | ++ MXC_AUDMUX_V2_PTCR_RFSEL(master | 0x8) | ++ MXC_AUDMUX_V2_PTCR_RCLKDIR | ++ MXC_AUDMUX_V2_PTCR_RCSEL(master | 0x8) | ++ MXC_AUDMUX_V2_PTCR_TCSEL(master | 0x8); ++ pdcr = MXC_AUDMUX_V2_PDCR_RXDSEL(master); ++ mxc_audmux_v2_configure_port(slave, ptcr, pdcr); ++ ++ ptcr = MXC_AUDMUX_V2_PTCR_SYN; ++ pdcr = MXC_AUDMUX_V2_PDCR_RXDSEL(master); ++ mxc_audmux_v2_configure_port(master, ptcr, pdcr); ++ return 0; ++} ++ ++static int __devinit imx_tc358743_probe(struct platform_device *pdev) ++{ ++ struct mxc_audio_platform_data *plat = pdev->dev.platform_data; ++ int ret = 0; ++ ++ ++ imx_audmux_config(plat->src_port, plat->ext_port); ++ ++ ret = -EINVAL; ++ if (plat->init && plat->init()) ++ return ret; ++ ++ printk("%s %d %s\n",__func__,__LINE__,pdev->name); ++ return 0; ++} ++ ++static int imx_tc358743_remove(struct platform_device *pdev) ++{ ++ struct mxc_audio_platform_data *plat = pdev->dev.platform_data; ++ ++ if (plat->finit) ++ plat->finit(); ++ ++ return 0; ++} ++ ++static struct platform_driver imx_tc358743_audio1_driver = { ++ .probe = imx_tc358743_probe, ++ .remove = imx_tc358743_remove, ++ .driver = { ++ .name = "imx-tc358743", ++ }, ++}; ++ ++ ++/* Codec setup */ ++static int tc358743_codec_probe(struct snd_soc_codec *codec) ++{ ++ return 0; ++} ++ ++static int tc358743_codec_remove(struct snd_soc_codec *codec) ++{ ++ return 0; ++} ++ ++static int tc358743_codec_suspend(struct snd_soc_codec *codec, pm_message_t state) ++{ ++// tc358743_set_bias_level(codec, SND_SOC_BIAS_OFF); ++ return 0; ++} ++ ++static int tc358743_codec_resume(struct snd_soc_codec *codec) ++{ ++// tc358743_set_bias_level(codec, SND_SOC_BIAS_STANDBY); ++ return 0; ++} ++ ++static int tc358743_set_bias_level(struct snd_soc_codec *codec, ++ enum snd_soc_bias_level level) ++{ ++ return 0; ++} ++ ++static const u8 tc358743_reg[0] = { ++}; ++ ++static struct snd_soc_codec_driver soc_codec_dev_tc358743 = { ++ .set_bias_level = tc358743_set_bias_level, ++ .reg_cache_size = ARRAY_SIZE(tc358743_reg), ++ .reg_word_size = sizeof(u8), ++ .reg_cache_default = tc358743_reg, ++ .probe = tc358743_codec_probe, ++ .remove = tc358743_codec_remove, ++ .suspend = tc358743_codec_suspend, ++ .resume = tc358743_codec_resume, ++}; ++ ++#define AIC3X_RATES SNDRV_PCM_RATE_8000_96000 ++#define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ ++ SNDRV_PCM_FMTBIT_S24_LE) ++ ++static int tc358743_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params, ++ struct snd_soc_dai *dai) ++{ ++ return 0; ++} ++ ++static int tc358743_mute(struct snd_soc_dai *dai, int mute) ++{ ++ return 0; ++} ++ ++static int tc358743_set_dai_sysclk(struct snd_soc_dai *codec_dai, ++ int clk_id, unsigned int freq, int dir) ++{ ++ return 0; ++} ++ ++static int tc358743_set_dai_fmt(struct snd_soc_dai *codec_dai, ++ unsigned int fmt) ++{ ++ return 0; ++} ++ ++static struct snd_soc_dai_ops tc358743_dai_ops = { ++ .hw_params = tc358743_hw_params, ++ .digital_mute = tc358743_mute, ++ .set_sysclk = tc358743_set_dai_sysclk, ++ .set_fmt = tc358743_set_dai_fmt, ++}; ++ ++static struct snd_soc_dai_driver tc358743_dai = { ++ .name = "tc358743-hifi", ++ .capture = { ++ .stream_name = "Capture", ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = AIC3X_RATES, ++ .formats = AIC3X_FORMATS,}, ++ .ops = &tc358743_dai_ops, ++ .symmetric_rates = 1, ++}; ++ ++#endif ++ ++struct tc_mode_list { ++ const char *name; ++ enum tc358743_mode mode; ++}; ++ ++static const struct tc_mode_list tc358743_mode_list[] = ++{ ++ {"None", 0}, /* 0 */ ++ {"VGA", tc358743_mode_480P_640_480}, /* 1 */ ++ {"240p/480i", 0}, /* 2 */ ++ {"288p/576i", 0}, /* 3 */ ++ {"W240p/480i", 0}, /* 4 */ ++ {"W288p/576i", 0}, /* 5 */ ++ {"480p", 0}, /* 6 */ ++ {"576p", 0}, /* 7 */ ++ {"W480p", tc358743_mode_480P_720_480}, /* 8 */ ++ {"W576p", 0}, /* 9 */ ++ {"WW480p", 0}, /* 10 */ ++ {"WW576p", 0}, /* 11 */ ++ {"720p", tc358743_mode_720P_60_1280_720}, /* 12 */ ++ {"1035i", 0}, /* 13 */ ++ {"1080i", 0}, /* 14 */ ++ {"1080p", tc358743_mode_1080P_1920_1080}, /* 15 */ ++}; ++ ++static char tc358743_fps_list[tc358743_max_fps+1] = ++{ ++[tc358743_60_fps] = 60, ++[tc358743_30_fps] = 30, ++[tc358743_max_fps] = 0 ++}; ++ ++static int tc358743_audio_list[16] = ++{ ++ 44100, ++ 0, ++ 48000, ++ 32000, ++ 22050, ++ 384000, ++ 24000, ++ 352800, ++ 88200, ++ 768000, ++ 96000, ++ 705600, ++ 176400, ++ 0, ++ 192000, ++ 0 ++}; ++ ++static char str_on[80]; ++static void report_netlink(struct tc_data *td) ++{ ++ struct sensor_data *sensor = &td->sensor; ++ char *envp[2]; ++ envp[0] = &str_on[0]; ++ envp[1] = NULL; ++ sprintf(envp[0], "HDMI RX: %d (%s) %d %d", ++ td->mode, ++ tc358743_mode_info_data[td->fps][td->mode].name, ++ tc358743_fps_list[td->fps], tc358743_audio_list[td->audio]); ++ kobject_uevent_env(&(sensor->i2c_client->dev.kobj), KOBJ_CHANGE, envp); ++ td->det_work_timeout = DET_WORK_TIMEOUT_DEFAULT; ++ pr_debug("%s: HDMI RX (%d) mode: %s fps: %d (%d, %d) audio: %d\n", ++ __func__, td->mode, ++ tc358743_mode_info_data[td->fps][td->mode].name, td->fps, td->bounce, ++ td->det_work_timeout, tc358743_audio_list[td->audio]); ++} ++ ++static void tc_det_worker(struct work_struct *work) ++{ ++ struct tc_data *td = container_of(work, struct tc_data, det_work.work); ++ struct sensor_data *sensor = &td->sensor; ++ int ret; ++ u32 u32val, u852f; ++ enum tc358743_mode mode = tc358743_mode_INIT; ++ ++ ++ if (!td->det_work_enable) ++ return; ++ mutex_lock(&td->access_lock); ++ ++ if (!td->det_work_enable) { ++ goto out2; ++ } ++ u32val = 0; ++ ret = tc358743_read_reg(sensor, 0x8621, &u32val); ++ if (ret >= 0) { ++ if (td->audio != (((unsigned char)u32val) & 0x0f)) { ++ td->audio = ((unsigned char)u32val) & 0x0f; ++ report_netlink(td); ++ } ++ } ++ u852f = 0; ++ ret = tc358743_read_reg(sensor, 0x852f, &u852f); ++ if (ret < 0) { ++ pr_err("%s: Error reading lock\n", __func__); ++ td->det_work_timeout = DET_WORK_TIMEOUT_DEFERRED; ++ goto out; ++ } ++// pr_info("%s: 852f=%x\n", __func__, u32val); ++ if (u852f & TC3587430_HDMI_DETECT) { ++ pr_info("%s: hdmi detect %x\n", __func__, u852f); ++ td->lock = u852f & TC3587430_HDMI_DETECT; ++ u32val = 0; ++ ret = tc358743_read_reg(sensor, 0x8521, &u32val); ++ if (ret < 0) { ++ pr_err("%s: Error reading mode\n", __func__); ++ } ++ pr_info("%s: detect 8521=%x\n", __func__, u32val); ++ u32val &= 0x0f; ++ td->fps = tc358743_60_fps; ++ if (!u32val) { ++ int hsize, vsize; ++ ++ hsize = tc358743_read_reg_val16(sensor, 0x8582); ++ vsize = tc358743_read_reg_val16(sensor, 0x8588); ++ pr_info("%s: detect hsize=%d, vsize=%d\n", __func__, hsize, vsize); ++ if ((hsize == 1024) && (vsize == 768)) ++ mode = tc358743_mode_1024x768; ++ } else { ++ mode = tc358743_mode_list[u32val].mode; ++ if (td->mode != mode) ++ pr_debug("%s: %s detected\n", __func__, tc358743_mode_list[u32val].name); ++ if (u852f >= 0xe) ++ td->fps = ((u852f & 0x0f) > 0xa)? tc358743_60_fps: tc358743_30_fps; ++ } ++ } else { ++ if (td->lock) ++ td->lock = 0; ++ u32val = 0; ++ ret = tc358743_read_reg(sensor, 0x8521, &u32val); ++ if (ret < 0) { ++ pr_err("%s: Error reading mode\n", __func__); ++ } ++// pr_info("%s: 8521=%x\n", __func__, u32val); ++ } ++ if (td->mode != mode) { ++ td->det_work_timeout = DET_WORK_TIMEOUT_DEFAULT; ++ td->bounce = MAX_BOUNCE; ++ pr_debug("%s: HDMI RX (%d != %d) mode: %s fps: %d (%d, %d)\n", ++ __func__, td->mode, mode, ++ tc358743_mode_info_data[td->fps][mode].name, ++ td->fps, td->bounce, td->det_work_timeout); ++ td->mode = mode; ++ sensor->streamcap.capturemode = mode; ++ sensor->spix.swidth = tc358743_mode_info_data[td->fps][mode].width; ++ sensor->spix.sheight = tc358743_mode_info_data[td->fps][mode].height; ++ td->det_changed = 1; ++ } else if (td->bounce) { ++ td->bounce--; ++ td->det_work_timeout = DET_WORK_TIMEOUT_DEFAULT; ++ ++ if (!td->bounce) { ++ u32val = 0; ++ ret = tc358743_read_reg(sensor, 0x8621, &u32val); ++ if (ret >= 0) { ++ td->audio = ((unsigned char)u32val) & 0x0f; ++ report_netlink(td); ++ } ++ if (td->mode) { ++ td->det_work_timeout = DET_WORK_TIMEOUT_DEFERRED; ++ goto out2; ++ } ++ } ++ } else if (td->mode && !td->bounce) { ++ goto out2; ++ } ++out: ++ schedule_delayed_work(&td->det_work, msecs_to_jiffies(td->det_work_timeout)); ++out2: ++ mutex_unlock(&td->access_lock); ++} ++ ++static irqreturn_t tc358743_detect_handler(int irq, void *data) ++{ ++ struct tc_data *td = data; ++ struct sensor_data *sensor = &td->sensor; ++ ++ pr_debug("%s: IRQ %d\n", __func__, sensor->i2c_client->irq); ++ schedule_delayed_work(&td->det_work, msecs_to_jiffies(10)); ++ return IRQ_HANDLED; ++} ++ ++ ++/*! ++ * tc358743 I2C probe function ++ * ++ * @param adapter struct i2c_adapter * ++ * @return Error code indicating success or failure ++ */ ++#define DUMP_LENGTH 256 ++static u16 regoffs = 0; ++ ++static ssize_t tc358743_show_regdump(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct tc_data *td = g_td; ++ struct sensor_data *sensor = &td->sensor; ++ int i, len = 0; ++ int retval; ++ ++ if (!td) ++ return len; ++ mutex_lock(&td->access_lock); ++ for (i=0; i<DUMP_LENGTH; ) { ++ u32 u32val = 0; ++ int reg = regoffs+i; ++ int size = get_reg_size(reg, 0); ++ ++ retval = tc358743_read_reg(sensor, reg, &u32val); ++ if (retval < 0) { ++ u32val = 0xff; ++ retval = 1; ++ } ++ if (!(i & 0xf)) ++ len += sprintf(buf+len, "\n%04X:", reg); ++ if (size == 1) ++ len += sprintf(buf+len, " %02X", u32val&0xff); ++ else if (size == 2) ++ len += sprintf(buf+len, " %04X", u32val&0xffff); ++ else ++ len += sprintf(buf+len, " %08X", u32val); ++ i += size; ++ } ++ mutex_unlock(&td->access_lock); ++ len += sprintf(buf+len, "\n"); ++ return len; ++} ++ ++static DEVICE_ATTR(regdump, S_IRUGO, tc358743_show_regdump, NULL); ++ ++static ssize_t tc358743_store_regoffs(struct device *device, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ u32 val; ++ int retval; ++ retval = sscanf(buf, "%x", &val); ++ if (1 == retval) ++ regoffs = (u16)val; ++ return count; ++} ++ ++static ssize_t tc358743_show_regoffs(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ int len = 0; ++ ++ len += sprintf(buf+len, "0x%04X\n", regoffs); ++ return len; ++} ++ ++static DEVICE_ATTR(regoffs, S_IRUGO|S_IWUSR, tc358743_show_regoffs, tc358743_store_regoffs); ++ ++static ssize_t tc358743_store_hpd(struct device *device, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ struct tc_data *td = g_td; ++ u32 val; ++ int retval; ++ retval = sscanf(buf, "%d", &val); ++ if (1 == retval) ++ td->hpd_active = (u16)val; ++ return count; ++} ++ ++static ssize_t tc358743_show_hpd(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct tc_data *td = g_td; ++ int len = 0; ++ ++ len += sprintf(buf+len, "%d\n", td->hpd_active); ++ return len; ++} ++ ++static DEVICE_ATTR(hpd, S_IRUGO|S_IWUSR, tc358743_show_hpd, tc358743_store_hpd); ++ ++static ssize_t tc358743_show_hdmirx(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct tc_data *td = g_td; ++ int len = 0; ++ ++ len += sprintf(buf+len, "%d\n", td->mode); ++ return len; ++} ++ ++static DEVICE_ATTR(hdmirx, S_IRUGO, tc358743_show_hdmirx, NULL); ++ ++static ssize_t tc358743_show_fps(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct tc_data *td = g_td; ++ int len = 0; ++ ++ len += sprintf(buf+len, "%d\n", tc358743_fps_list[td->fps]); ++ return len; ++} ++ ++static DEVICE_ATTR(fps, S_IRUGO, tc358743_show_fps, NULL); ++ ++#ifdef CONFIG_TC358743_AUDIO ++static ssize_t tc358743_show_audio(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct tc_data *td = g_td; ++ int len = 0; ++ ++ len += sprintf(buf+len, "%d\n", tc358743_audio_list[td->audio]); ++ return len; ++} ++ ++static DEVICE_ATTR(audio, S_IRUGO, tc358743_show_audio, NULL); ++#endif ++ ++static int tc358743_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct device *dev = &client->dev; ++ int retval; ++ struct tc_data *td; ++ struct sensor_data *sensor; ++ u8 chip_id_high; ++ u32 u32val; ++ int mode = tc358743_mode_INIT; ++ ++ td = kzalloc(sizeof(*td), GFP_KERNEL); ++ if (!td) ++ return -ENOMEM; ++ td->hpd_active = 1; ++ td->det_work_timeout = DET_WORK_TIMEOUT_DEFAULT; ++ td->audio = 2; ++ mutex_init(&td->access_lock); ++ mutex_lock(&td->access_lock); ++ sensor = &td->sensor; ++ ++ /* request power down pin */ ++ td->pwn_gpio = of_get_named_gpio(dev->of_node, "pwn-gpios", 0); ++ if (!gpio_is_valid(td->pwn_gpio)) { ++ dev_warn(dev, "no sensor pwdn pin available"); ++ } else { ++ retval = devm_gpio_request_one(dev, td->pwn_gpio, GPIOF_OUT_INIT_HIGH, ++ "tc_mipi_pwdn"); ++ if (retval < 0) { ++ dev_warn(dev, "request of pwn_gpio failed"); ++ return retval; ++ } ++ } ++ /* request reset pin */ ++ td->rst_gpio = of_get_named_gpio(dev->of_node, "rst-gpios", 0); ++ if (!gpio_is_valid(td->rst_gpio)) { ++ dev_warn(dev, "no sensor reset pin available"); ++ return -EINVAL; ++ } ++ retval = devm_gpio_request_one(dev, td->rst_gpio, GPIOF_OUT_INIT_HIGH, ++ "tc_mipi_reset"); ++ if (retval < 0) { ++ dev_warn(dev, "request of tc_mipi_reset failed"); ++ return retval; ++ } ++ ++ /* Set initial values for the sensor struct. */ ++ sensor->mipi_camera = 1; ++ sensor->virtual_channel = 0; ++ sensor->sensor_clk = devm_clk_get(dev, "csi_mclk"); ++ ++ retval = of_property_read_u32(dev->of_node, "mclk", ++ &(sensor->mclk)); ++ if (retval) { ++ dev_err(dev, "mclk missing or invalid\n"); ++ return retval; ++ } ++ ++ retval = of_property_read_u32(dev->of_node, "mclk_source", ++ (u32 *) &(sensor->mclk_source)); ++ if (retval) { ++ dev_err(dev, "mclk_source missing or invalid\n"); ++ return retval; ++ } ++ ++ retval = of_property_read_u32(dev->of_node, "ipu_id", ++ &sensor->ipu_id); ++ if (retval) { ++ dev_err(dev, "ipu_id missing or invalid\n"); ++ return retval; ++ } ++ ++ retval = of_property_read_u32(dev->of_node, "csi_id", ++ &(sensor->csi)); ++ if (retval) { ++ dev_err(dev, "csi id missing or invalid\n"); ++ return retval; ++ } ++ if ((unsigned)sensor->ipu_id || (unsigned)sensor->csi) { ++ dev_err(dev, "invalid ipu/csi\n"); ++ return -EINVAL; ++ } ++ ++ if (!IS_ERR(sensor->sensor_clk)) ++ clk_prepare_enable(sensor->sensor_clk); ++ ++ sensor->io_init = tc_io_init; ++ sensor->i2c_client = client; ++ sensor->streamcap.capability = V4L2_MODE_HIGHQUALITY | ++ V4L2_CAP_TIMEPERFRAME; ++ sensor->streamcap.capturemode = mode; ++ sensor->streamcap.timeperframe.denominator = DEFAULT_FPS; ++ sensor->streamcap.timeperframe.numerator = 1; ++ ++ sensor->pix.pixelformat = get_pixelformat(0, mode); ++ sensor->pix.width = tc358743_mode_info_data[0][mode].width; ++ sensor->pix.height = tc358743_mode_info_data[0][mode].height; ++ pr_debug("%s: format: %x, capture mode: %d fps: %d width: %d height: %d\n", ++ __func__, sensor->pix.pixelformat, mode, ++ sensor->streamcap.timeperframe.denominator * ++ sensor->streamcap.timeperframe.numerator, ++ sensor->pix.width, ++ sensor->pix.height); ++ ++ tc_regulator_init(td, dev); ++ power_control(td, 1); ++ tc_reset(td); ++ ++ u32val = 0; ++ retval = tc358743_read_reg(sensor, TC358743_CHIP_ID_HIGH_BYTE, &u32val); ++ if (retval < 0) { ++ pr_err("%s:cannot find camera\n", __func__); ++ retval = -ENODEV; ++ goto err4; ++ } ++ chip_id_high = (u8)u32val; ++ ++ tc358743_int_device.priv = td; ++ if (!g_td) ++ g_td = td; ++ ++#ifdef CONFIG_TC358743_AUDIO ++ retval = device_create_file(&client->dev, &dev_attr_audio); ++#endif ++ retval = device_create_file(&client->dev, &dev_attr_fps); ++ retval = device_create_file(&client->dev, &dev_attr_hdmirx); ++ retval = device_create_file(&client->dev, &dev_attr_hpd); ++ retval = device_create_file(&client->dev, &dev_attr_regoffs); ++ retval = device_create_file(&client->dev, &dev_attr_regdump); ++ ++ if (retval) { ++ pr_err("%s: create bin file failed, error=%d\n", ++ __func__, retval); ++ goto err4; ++ } ++ ++#ifdef CONFIG_TC358743_AUDIO ++/* Audio setup */ ++ retval = snd_soc_register_codec(&client->dev, ++ &soc_codec_dev_tc358743, &tc358743_dai, 1); ++ if (retval) { ++ pr_err("%s: register failed, error=%d\n", ++ __func__, retval); ++ goto err4; ++ } ++ ++ retval = platform_driver_register(&imx_tc358743_audio1_driver); ++ if (retval) { ++ pr_err("%s: Platform driver register failed, error=%d\n", ++ __func__, retval); ++ goto err4; ++ } ++ ++ td->snd_device = platform_device_alloc("soc-audio", 5); ++ if (!td->snd_device) { ++ pr_err("%s: Platform device allocation failed, error=%d\n", ++ __func__, retval); ++ goto err4; ++ } ++ ++ platform_set_drvdata(td->snd_device, &imxpac_tc358743); ++ retval = platform_device_add(td->snd_device); ++ ++ if (retval) { ++ pr_err("%s: Platform device add failed, error=%d\n", ++ __func__, retval); ++ platform_device_put(td->snd_device); ++ goto err4; ++ } ++#endif ++ ++#if 1 ++ INIT_DELAYED_WORK(&td->det_work, tc_det_worker); ++ if (sensor->i2c_client->irq) { ++ retval = request_irq(sensor->i2c_client->irq, tc358743_detect_handler, ++ IRQF_SHARED | IRQF_TRIGGER_FALLING, ++ "tc358743_det", td); ++ if (retval < 0) ++ dev_warn(&sensor->i2c_client->dev, ++ "cound not request det irq %d\n", ++ sensor->i2c_client->irq); ++ } ++ ++ schedule_delayed_work(&td->det_work, msecs_to_jiffies(td->det_work_timeout)); ++#endif ++ retval = tc358743_reset(td); ++ if (retval) ++ goto err4; ++ ++ i2c_set_clientdata(client, td); ++ mutex_unlock(&td->access_lock); ++ retval = v4l2_int_device_register(&tc358743_int_device); ++ mutex_lock(&td->access_lock); ++ if (retval) { ++ pr_err("%s: v4l2_int_device_register failed, error=%d\n", ++ __func__, retval); ++ goto err4; ++ } ++ power_control(td, 0); ++ mutex_unlock(&td->access_lock); ++ pr_debug("%s: finished, error=%d\n", __func__, retval); ++ return retval; ++ ++err4: ++ power_control(td, 0); ++ mutex_unlock(&td->access_lock); ++ pr_err("%s: failed, error=%d\n", __func__, retval); ++ if (g_td == td) ++ g_td = NULL; ++ mutex_destroy(&td->access_lock); ++ kfree(td); ++ return retval; ++} ++ ++/*! ++ * tc358743 I2C detach function ++ * ++ * @param client struct i2c_client * ++ * @return Error code indicating success or failure ++ */ ++static int tc358743_remove(struct i2c_client *client) ++{ ++ int i; ++ struct tc_data *td = i2c_get_clientdata(client); ++ struct sensor_data *sensor = &td->sensor; ++ ++ // Stop delayed work ++ cancel_delayed_work_sync(&td->det_work); ++ mutex_lock(&td->access_lock); ++ ++ power_control(td, 0); ++ // Remove IRQ ++ if (sensor->i2c_client->irq) { ++ free_irq(sensor->i2c_client->irq, sensor); ++ } ++ ++#ifdef CONFIG_TC358743_AUDIO ++/* Audio breakdown */ ++ snd_soc_unregister_codec(&client->dev); ++ platform_driver_unregister(&imx_tc358743_audio1_driver); ++ platform_device_unregister(td->snd_device); ++#endif ++ /*Remove sysfs entries*/ ++#ifdef CONFIG_TC358743_AUDIO ++ device_remove_file(&client->dev, &dev_attr_audio); ++#endif ++ device_remove_file(&client->dev, &dev_attr_fps); ++ device_remove_file(&client->dev, &dev_attr_hdmirx); ++ device_remove_file(&client->dev, &dev_attr_hpd); ++ device_remove_file(&client->dev, &dev_attr_regoffs); ++ device_remove_file(&client->dev, &dev_attr_regdump); ++ ++ mutex_unlock(&td->access_lock); ++ v4l2_int_device_unregister(&tc358743_int_device); ++ ++ for (i = REGULATOR_CNT - 1; i >= 0; i--) { ++ if (td->regulator[i]) { ++ regulator_disable(td->regulator[i]); ++ } ++ } ++ mutex_destroy(&td->access_lock); ++ if (g_td == td) ++ g_td = NULL; ++ kfree(td); ++ return 0; ++} ++ ++/*! ++ * tc358743 init function ++ * Called by insmod tc358743_camera.ko. ++ * ++ * @return Error code indicating success or failure ++ */ ++static __init int tc358743_init(void) ++{ ++ int err; ++ ++ err = i2c_add_driver(&tc358743_i2c_driver); ++ if (err != 0) ++ pr_err("%s:driver registration failed, error=%d\n", ++ __func__, err); ++ ++ return err; ++} ++ ++/*! ++ * tc358743 cleanup function ++ * Called on rmmod tc358743_camera.ko ++ * ++ * @return Error code indicating success or failure ++ */ ++static void __exit tc358743_clean(void) ++{ ++ i2c_del_driver(&tc358743_i2c_driver); ++} ++ ++module_init(tc358743_init); ++module_exit(tc358743_clean); ++ ++MODULE_AUTHOR("Panasonic Avionics Corp."); ++MODULE_DESCRIPTION("Toshiba TC358743 HDMI-to-CSI2 Bridge MIPI Input Driver"); ++MODULE_LICENSE("GPL"); ++MODULE_VERSION("1.0"); ++MODULE_ALIAS("CSI"); +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/tda1997x.c xbian-sources-kernel/drivers/media/platform/mxc/capture/tda1997x.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/tda1997x.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/tda1997x.c 2015-10-11 19:49:28.487234352 +0200 +@@ -0,0 +1,451 @@ ++/* ++ * tda1997x.c -- MXC video capture driver for i.MX boards with ++ * tda1997x HDMI receiver ++ * ++ * Copyright (C) 2013 Gateworks Corporation ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++/* The tda1997x-core driver manages the i2c interface with the device. ++ * This driver merely calls into that driver for current video parameters ++ * when necessary. The platform data for the core driver contains the ++ * video output bus configuration that configures the video port ++ * mapping between the tda1997x and a i.MX6 CSI parallel bus for 8bit ++ * bt656 with embedded syncs as this is the only video format compatible ++ * between the tda1997x and the i.MX6 CSI. ++ * ++ * see <linux/include/mfd/tda1997x-core.h> for details ++ */ ++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ++ ++#include <linux/init.h> ++#include <linux/delay.h> ++#include <linux/device.h> ++#include <linux/fsl_devices.h> ++#include <linux/mfd/core.h> ++#include <linux/mfd/syscon.h> ++#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> ++#include <linux/mfd/tda1997x-core.h> ++#include <linux/module.h> ++#include <linux/of_device.h> ++#include <linux/platform_device.h> ++#include <linux/regmap.h> ++#include <linux/types.h> ++#include <linux/videodev2.h> ++#include <linux/workqueue.h> ++ ++#include <media/v4l2-chip-ident.h> ++ ++#include "v4l2-int-device.h" ++#include "mxc_v4l2_capture.h" ++ ++/*! ++ * Maintains the information on the current state of the sensor. ++ */ ++struct sensor { ++ struct sensor_data sen; ++ tda1997x_videofmt_t vidfmt; ++} tda1997x_data; ++ ++/*********************************************************************** ++ * mxc_v4l2_capture interface. ++ ***********************************************************************/ ++ ++/*********************************************************************** ++ * IOCTL Functions from v4l2_int_ioctl_desc. ++ ***********************************************************************/ ++ ++/*! ++ * ioctl_g_ifparm - V4L2 sensor interface handler for vidioc_int_g_ifparm_num ++ * s: pointer to standard V4L2 device structure ++ * p: pointer to standard V4L2 vidioc_int_g_ifparm_num ioctl structure ++ * ++ * Gets slave interface parameters. ++ * Calculates the required xclk value to support the requested ++ * clock parameters in p. This value is returned in the p ++ * parameter. ++ * ++ * vidioc_int_g_ifparm returns platform-specific information about the ++ * interface settings used by the sensor. ++ * ++ * Called on open. ++ */ ++static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p) ++{ ++ struct sensor *sensor = s->priv; ++ tda1997x_vidout_fmt_t fmt; ++ ++ if (s == NULL) { ++ pr_err(" ERROR!! no slave device set!\n"); ++ return -ENODEV; ++ } ++ ++ if (tda1997x_get_vidout_fmt(&fmt)) ++ return -ENODEV; ++ pr_debug("%s: %dx%d%c@%dfps\n", __func__, fmt.width, fmt.height, ++ fmt.interlaced?'i':'p', fmt.fps); ++ ++ /* Initialize structure to 0s then set any non-0 values. */ ++ memset(p, 0, sizeof(*p)); ++ p->if_type = V4L2_IF_TYPE_BT656; /* This is the only possibility. */ ++ ++ if (sensor->vidfmt == VIDEOFMT_422_SMP) { /* YCbCr 4:2:2 semi-planar */ ++ p->u.bt656.nobt_vs_inv = 0; ++ p->u.bt656.nobt_hs_inv = 1; ++ p->u.bt656.bt_sync_correct = 1; ++ p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_16BIT; ++ p->u.bt656.clock_curr = -1; /* gated clock mode */ ++ } else if (sensor->vidfmt == VIDEOFMT_422_CCIR) { /* YCbCr 4:2:2 CCIR656 */ ++ p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT; ++ p->u.bt656.clock_curr = (fmt.interlaced)?0:1; ++ } ++ ++ return 0; ++} ++ ++/*! ++ * Sets the device power. ++ * ++ * s pointer to the device device ++ * on if 1, power is to be turned on. 0 means power is to be turned off ++ * ++ * ioctl_s_power - V4L2 sensor interface handler for vidioc_int_s_power_num ++ * @s: pointer to standard V4L2 device structure ++ * @on: power state to which device is to be set ++ * ++ * Sets devices power state to requrested state, if possible. ++ * This is called on open, close, suspend and resume. ++static int ioctl_s_power(struct v4l2_int_device *s, int on) ++{ ++ struct sensor *sensor = s->priv; ++ ++ if (on && !sensor->sen.on) { ++ } else if (!on && sensor->sen.on) { ++ } ++ ++ sensor->sen.on = on; ++ ++ return 0; ++} ++ */ ++ ++/*! ++ * ioctl_g_parm - V4L2 sensor interface handler for VIDIOC_G_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_G_PARM ioctl structure ++ * ++ * Returns the sensor's video CAPTURE parameters. ++ */ ++static int ioctl_g_parm(struct v4l2_int_device *s, struct v4l2_streamparm *a) ++{ ++ struct sensor *sensor = s->priv; ++ struct v4l2_captureparm *cparm = &a->parm.capture; ++ ++ switch (a->type) { ++ /* These are all the possible cases. */ ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ pr_debug(" type is V4L2_BUF_TYPE_VIDEO_CAPTURE\n"); ++ memset(a, 0, sizeof(*a)); ++ a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ cparm->capability = sensor->sen.streamcap.capability; ++ cparm->timeperframe = sensor->sen.streamcap.timeperframe; ++ cparm->capturemode = sensor->sen.streamcap.capturemode; ++ break; ++ ++ case V4L2_BUF_TYPE_VIDEO_OUTPUT: ++ case V4L2_BUF_TYPE_VIDEO_OVERLAY: ++ case V4L2_BUF_TYPE_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_VBI_OUTPUT: ++ case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: ++ break; ++ ++ default: ++ pr_debug("ioctl_g_parm:type is unknown %d\n", a->type); ++ break; ++ } ++ ++ return 0; ++} ++ ++/*! ++ * ioctl_s_parm - V4L2 sensor interface handler for VIDIOC_S_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_S_PARM ioctl structure ++ * ++ * Configures the sensor to use the input parameters, if possible. If ++ * not possible, reverts to the old parameters and returns the ++ * appropriate error code. ++ * ++ * This driver cannot change these settings. ++ */ ++static int ioctl_s_parm(struct v4l2_int_device *s, struct v4l2_streamparm *a) ++{ ++ switch (a->type) { ++ /* These are all the possible cases. */ ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ case V4L2_BUF_TYPE_VIDEO_OUTPUT: ++ case V4L2_BUF_TYPE_VIDEO_OVERLAY: ++ case V4L2_BUF_TYPE_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_VBI_OUTPUT: ++ case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: ++ case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: ++ break; ++ ++ default: ++ pr_debug(" type is unknown - %d\n", a->type); ++ break; ++ } ++ ++ return 0; ++} ++ ++/*! ++ * ioctl_g_fmt_cap - V4L2 sensor interface handler for ioctl_g_fmt_cap ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 v4l2_format structure ++ * ++ * Returns the sensor's current pixel format in the v4l2_format ++ * parameter. ++ */ ++static int ioctl_g_fmt_cap(struct v4l2_int_device *s, struct v4l2_format *f) ++{ ++ struct sensor *sensor = s->priv; ++ tda1997x_vidout_fmt_t fmt; ++ ++ if (tda1997x_get_vidout_fmt(&fmt)) ++ return -ENODEV; ++ ++ pr_debug("%s: %dx%d%c@%dfps\n", __func__, fmt.width, fmt.height, ++ fmt.interlaced?'i':'p', fmt.fps); ++ sensor->sen.pix.height = fmt.height; ++ sensor->sen.pix.width = fmt.width; ++ sensor->sen.streamcap.timeperframe.denominator = fmt.fps; ++ sensor->sen.streamcap.timeperframe.numerator = 1; ++ switch (f->type) { ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ pr_debug(" Returning size of %dx%d\n", ++ sensor->sen.pix.width, sensor->sen.pix.height); ++ f->fmt.pix = sensor->sen.pix; ++ pr_debug(" Returning format of %s\n", (char*)&f->fmt.pix.pixelformat); ++ break; ++ ++ case V4L2_BUF_TYPE_PRIVATE: { ++ } ++ break; ++ ++ default: ++ f->fmt.pix = sensor->sen.pix; ++ break; ++ } ++ ++ return 0; ++} ++ ++/*! ++ * ioctl_enum_framesizes - V4L2 sensor interface handler for ++ * VIDIOC_ENUM_FRAMESIZES ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @fsize: standard V4L2 VIDIOC_ENUM_FRAMESIZES ioctl structure ++ * ++ * Return 0 if successful, otherwise -EINVAL. ++ */ ++static int ioctl_enum_framesizes(struct v4l2_int_device *s, ++ struct v4l2_frmsizeenum *fsize) ++{ ++ struct sensor *sensor = s->priv; ++ tda1997x_vidout_fmt_t fmt; ++ ++ if (fsize->index >= 1) ++ return -EINVAL; ++ ++ if (tda1997x_get_vidout_fmt(&fmt)) ++ return -ENODEV; ++ ++ pr_debug("%s: %dx%d%c@%dfps\n", __func__, fmt.height, fmt.width, ++ fmt.interlaced?'i':'p', fmt.fps); ++ sensor->sen.pix.height = fmt.height; ++ sensor->sen.pix.width = fmt.width; ++ fsize->discrete.width = sensor->sen.pix.width; ++ fsize->discrete.height = sensor->sen.pix.height; ++ ++ return 0; ++} ++ ++/*! ++ * ioctl_g_chip_ident - V4L2 sensor interface handler for ++ * VIDIOC_DBG_G_CHIP_IDENT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @id: pointer to int ++ * ++ * Return 0. ++ */ ++static int ioctl_g_chip_ident(struct v4l2_int_device *s, int *id) ++{ ++ struct sensor *sensor = s->priv; ++ ((struct v4l2_dbg_chip_ident *)id)->match.type = ++ V4L2_CHIP_MATCH_I2C_DRIVER; ++ if (sensor->vidfmt == VIDEOFMT_422_SMP) { /* YCbCr 4:2:2 semi-planar */ ++ strcpy(((struct v4l2_dbg_chip_ident *)id)->match.name, ++ "tda1997x_decoder_yuv422"); ++ } else ++ strcpy(((struct v4l2_dbg_chip_ident *)id)->match.name, ++ "tda1997x_decoder_bt656"); ++ ((struct v4l2_dbg_chip_ident *)id)->ident = V4L2_IDENT_TDA19971; ++ ++ return 0; ++} ++ ++/*! ++ * This structure defines all the ioctls for this module. ++ */ ++static struct v4l2_int_ioctl_desc tda1997x_ioctl_desc[] = { ++ ++/* {vidioc_int_s_power_num, (v4l2_int_ioctl_func*)ioctl_s_power}, */ ++ {vidioc_int_g_ifparm_num, (v4l2_int_ioctl_func*)ioctl_g_ifparm}, ++ {vidioc_int_g_fmt_cap_num, (v4l2_int_ioctl_func*)ioctl_g_fmt_cap}, ++ /*! ++ * If the requested format is supported, configures the HW to use that ++ * format, returns error code if format not supported or HW can't be ++ * correctly configured. ++ */ ++ {vidioc_int_g_parm_num, (v4l2_int_ioctl_func*)ioctl_g_parm}, ++ {vidioc_int_s_parm_num, (v4l2_int_ioctl_func*)ioctl_s_parm}, ++ {vidioc_int_enum_framesizes_num, ++ (v4l2_int_ioctl_func *) ioctl_enum_framesizes}, ++ {vidioc_int_g_chip_ident_num, ++ (v4l2_int_ioctl_func *)ioctl_g_chip_ident}, ++}; ++ ++static struct v4l2_int_slave tda1997x_slave = { ++ .ioctls = tda1997x_ioctl_desc, ++ .num_ioctls = ARRAY_SIZE(tda1997x_ioctl_desc), ++}; ++ ++static struct v4l2_int_device tda1997x_int_device = { ++ .module = THIS_MODULE, ++ .name = "tda1997x-video", ++ .type = v4l2_int_type_slave, ++ .u = { ++ .slave = &tda1997x_slave, ++ }, ++}; ++ ++static int tda1997x_video_probe(struct platform_device *pdev) ++{ ++ struct sensor *sens = &tda1997x_data; ++ struct pinctrl *pinctrl; ++ struct device *dev = &pdev->dev; ++ struct regmap *gpr; ++ tda1997x_vidout_fmt_t fmt; ++ int ret; ++ ++ dev_dbg(dev, "%s\n", __func__); ++ ++ /* pinctrl */ ++ pinctrl = devm_pinctrl_get_select_default(dev); ++ if (IS_ERR(pinctrl)) { ++ dev_err(dev, "setup pinctrl failed\n"); ++ return PTR_ERR(pinctrl); ++ } ++ ++ /* Set initial values for the sensor struct. */ ++ memset(sens, 0, sizeof(tda1997x_data)); ++ if (tda1997x_get_vidout_fmt(&fmt)) ++ return -ENODEV; ++ sens->vidfmt = fmt.sensor_vidfmt; ++ sens->sen.streamcap.timeperframe.denominator = 0; ++ sens->sen.streamcap.timeperframe.numerator = 0; ++ sens->sen.pix.width = 0; ++ sens->sen.pix.height = 0; ++ if (sens->vidfmt == VIDEOFMT_422_SMP) ++ sens->sen.pix.pixelformat = IPU_PIX_FMT_GENERIC_16; ++ else ++ sens->sen.pix.pixelformat = V4L2_PIX_FMT_UYVY; ++ sens->sen.on = true; ++ ++ ret = of_property_read_u32(dev->of_node, "csi_id", ++ &(sens->sen.csi)); ++ if (ret) { ++ dev_err(dev, "csi_id invalid\n"); ++ return ret; ++ } ++ ++ ret = of_property_read_u32(dev->of_node, "ipu_id", ++ &(sens->sen.ipu_id)); ++ if (ret) { ++ dev_err(dev, "ipu_id invalid\n"); ++ return ret; ++ } ++ ++ gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); ++ if (!IS_ERR(gpr)) { ++ if (of_machine_is_compatible("fsl,imx6q")) { ++ int mask = sens->sen.csi ? (1 << 20) : (1 << 19); ++ ++ regmap_update_bits(gpr, IOMUXC_GPR1, mask, mask); ++ } else if (of_machine_is_compatible("fsl,imx6dl")) { ++ int mask = sens->sen.csi ? (7 << 3) : (7 << 0); ++ int val = sens->sen.csi ? (4 << 3) : (4 << 0); ++ ++ regmap_update_bits(gpr, IOMUXC_GPR13, mask, val); ++ } ++ } else { ++ pr_err("%s: failed to find fsl,imx6q-iomux-gpr regmap\n", ++ __func__); ++ } ++ ++ dev_dbg(dev, "IPU%d_CSI%d\n", sens->sen.ipu_id + 1, sens->sen.csi); ++ dev_dbg(dev, "type is %d (expect %d)\n", ++ tda1997x_int_device.type, v4l2_int_type_slave); ++ dev_dbg(dev, "num ioctls is %d\n", ++ tda1997x_int_device.u.slave->num_ioctls); ++ ++ /* This function attaches this structure to the /dev/video<n> device */ ++ tda1997x_int_device.priv = sens; ++ ret = v4l2_int_device_register(&tda1997x_int_device); ++ ++ return ret; ++} ++ ++static int tda1997x_video_remove(struct platform_device *pdev) ++{ ++ v4l2_int_device_unregister(&tda1997x_int_device); ++ ++ return 0; ++} ++ ++static const struct of_device_id tda1997x_video_driver_ids[] = { ++ { .compatible = "fsl,imx-tda1997x-video", }, ++ { /* sentinel */ } ++}; ++ ++static struct platform_driver tda1997x_video_driver = { ++ .driver = { ++ .owner = THIS_MODULE, ++ .name = "imx-tda1997x-video", ++ .of_match_table = tda1997x_video_driver_ids, ++ }, ++ .probe = tda1997x_video_probe, ++ .remove = tda1997x_video_remove, ++}; ++module_platform_driver(tda1997x_video_driver); ++ ++MODULE_AUTHOR("Tim Harvey <tharvey@gateworks.com>"); ++MODULE_DESCRIPTION("TDA1997X hdmi receiver MXC video capture driver"); ++MODULE_LICENSE("GPL"); ++MODULE_ALIAS("platform:imx-tda1997x-video"); +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/v4l2-int-device.c xbian-sources-kernel/drivers/media/platform/mxc/capture/v4l2-int-device.c +--- linux-4.1.10/drivers/media/platform/mxc/capture/v4l2-int-device.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/v4l2-int-device.c 2015-10-11 19:49:28.487234352 +0200 +@@ -0,0 +1,165 @@ ++/* ++ * drivers/media/video/v4l2-int-device.c ++ * ++ * V4L2 internal ioctl interface. ++ * ++ * Copyright 2005-2014 Freescale Semiconductor, Inc. ++ * Copyright (C) 2007 Nokia Corporation. ++ * ++ * Contact: Sakari Ailus <sakari.ailus@nokia.com> ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/list.h> ++#include <linux/sort.h> ++#include <linux/string.h> ++#include <linux/module.h> ++ ++#include "v4l2-int-device.h" ++ ++static DEFINE_MUTEX(mutex); ++static LIST_HEAD(int_list); ++ ++void v4l2_int_device_try_attach_all(void) ++{ ++ struct v4l2_int_device *m, *s; ++ ++ list_for_each_entry(m, &int_list, head) { ++ if (m->type != v4l2_int_type_master) ++ continue; ++ ++ list_for_each_entry(s, &int_list, head) { ++ if (s->type != v4l2_int_type_slave) ++ continue; ++ ++ /* Slave is connected? */ ++ if (s->u.slave->master) ++ continue; ++ ++ /* Slave wants to attach to master? */ ++ if (s->u.slave->attach_to[0] != 0 ++ && strncmp(m->name, s->u.slave->attach_to, ++ V4L2NAMESIZE)) ++ continue; ++ ++ if (!try_module_get(m->module)) ++ continue; ++ ++ s->u.slave->master = m; ++ if (m->u.master->attach(s)) { ++ s->u.slave->master = NULL; ++ module_put(m->module); ++ continue; ++ } ++ } ++ } ++} ++EXPORT_SYMBOL_GPL(v4l2_int_device_try_attach_all); ++ ++static int ioctl_sort_cmp(const void *a, const void *b) ++{ ++ const struct v4l2_int_ioctl_desc *d1 = a, *d2 = b; ++ ++ if (d1->num > d2->num) ++ return 1; ++ ++ if (d1->num < d2->num) ++ return -1; ++ ++ return 0; ++} ++ ++int v4l2_int_device_register(struct v4l2_int_device *d) ++{ ++ if (d->type == v4l2_int_type_slave) ++ sort(d->u.slave->ioctls, d->u.slave->num_ioctls, ++ sizeof(struct v4l2_int_ioctl_desc), ++ &ioctl_sort_cmp, NULL); ++ mutex_lock(&mutex); ++ list_add(&d->head, &int_list); ++ v4l2_int_device_try_attach_all(); ++ mutex_unlock(&mutex); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(v4l2_int_device_register); ++ ++void v4l2_int_device_unregister(struct v4l2_int_device *d) ++{ ++ mutex_lock(&mutex); ++ list_del(&d->head); ++ if (d->type == v4l2_int_type_slave ++ && d->u.slave->master != NULL) { ++ d->u.slave->master->u.master->detach(d); ++ module_put(d->u.slave->master->module); ++ d->u.slave->master = NULL; ++ } ++ mutex_unlock(&mutex); ++} ++EXPORT_SYMBOL_GPL(v4l2_int_device_unregister); ++ ++/* Adapted from search_extable in extable.c. */ ++static v4l2_int_ioctl_func *find_ioctl(struct v4l2_int_slave *slave, int cmd, ++ v4l2_int_ioctl_func *no_such_ioctl) ++{ ++ const struct v4l2_int_ioctl_desc *first = slave->ioctls; ++ const struct v4l2_int_ioctl_desc *last = ++ first + slave->num_ioctls - 1; ++ ++ while (first <= last) { ++ const struct v4l2_int_ioctl_desc *mid; ++ ++ mid = (last - first) / 2 + first; ++ ++ if (mid->num < cmd) ++ first = mid + 1; ++ else if (mid->num > cmd) ++ last = mid - 1; ++ else ++ return mid->func; ++ } ++ ++ return no_such_ioctl; ++} ++ ++static int no_such_ioctl_0(struct v4l2_int_device *d) ++{ ++ return -ENOIOCTLCMD; ++} ++ ++int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd) ++{ ++ return ((v4l2_int_ioctl_func_0 *) ++ find_ioctl(d->u.slave, cmd, ++ (v4l2_int_ioctl_func *)no_such_ioctl_0))(d); ++} ++EXPORT_SYMBOL_GPL(v4l2_int_ioctl_0); ++ ++static int no_such_ioctl_1(struct v4l2_int_device *d, void *arg) ++{ ++ return -ENOIOCTLCMD; ++} ++ ++int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg) ++{ ++ return ((v4l2_int_ioctl_func_1 *) ++ find_ioctl(d->u.slave, cmd, ++ (v4l2_int_ioctl_func *)no_such_ioctl_1))(d, arg); ++} ++EXPORT_SYMBOL_GPL(v4l2_int_ioctl_1); ++ ++MODULE_LICENSE("GPL"); +diff -Nur linux-4.1.10/drivers/media/platform/mxc/capture/v4l2-int-device.h xbian-sources-kernel/drivers/media/platform/mxc/capture/v4l2-int-device.h +--- linux-4.1.10/drivers/media/platform/mxc/capture/v4l2-int-device.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/capture/v4l2-int-device.h 2015-10-11 19:49:28.487234352 +0200 +@@ -0,0 +1,317 @@ ++/* ++ * include/media/v4l2-int-device.h ++ * ++ * V4L2 internal ioctl interface. ++ * ++ * Copyright 2005-2014 Freescale Semiconductor, Inc. ++ * Copyright (C) 2007 Nokia Corporation. ++ * ++ * Contact: Sakari Ailus <sakari.ailus@nokia.com> ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#ifndef V4L2_INT_DEVICE_H ++#define V4L2_INT_DEVICE_H ++ ++#include <media/v4l2-common.h> ++ ++#define V4L2NAMESIZE 32 ++ ++/* ++ * ++ * The internal V4L2 device interface core. ++ * ++ */ ++ ++enum v4l2_int_type { ++ v4l2_int_type_master = 1, ++ v4l2_int_type_slave ++}; ++ ++struct module; ++ ++struct v4l2_int_device; ++ ++struct v4l2_int_master { ++ int (*attach)(struct v4l2_int_device *slave); ++ void (*detach)(struct v4l2_int_device *slave); ++}; ++ ++typedef int (v4l2_int_ioctl_func)(struct v4l2_int_device *); ++typedef int (v4l2_int_ioctl_func_0)(struct v4l2_int_device *); ++typedef int (v4l2_int_ioctl_func_1)(struct v4l2_int_device *, void *); ++ ++struct v4l2_int_ioctl_desc { ++ int num; ++ v4l2_int_ioctl_func *func; ++}; ++ ++struct v4l2_int_slave { ++ /* Don't touch master. */ ++ struct v4l2_int_device *master; ++ ++ char attach_to[V4L2NAMESIZE]; ++ ++ int num_ioctls; ++ struct v4l2_int_ioctl_desc *ioctls; ++}; ++ ++struct v4l2_int_device { ++ /* Don't touch head. */ ++ struct list_head head; ++ ++ struct module *module; ++ ++ char name[V4L2NAMESIZE]; ++ ++ enum v4l2_int_type type; ++ union { ++ struct v4l2_int_master *master; ++ struct v4l2_int_slave *slave; ++ } u; ++ ++ void *priv; ++}; ++ ++void v4l2_int_device_try_attach_all(void); ++ ++int v4l2_int_device_register(struct v4l2_int_device *d); ++void v4l2_int_device_unregister(struct v4l2_int_device *d); ++ ++int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd); ++int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg); ++ ++/* ++ * ++ * Types and definitions for IOCTL commands. ++ * ++ */ ++ ++enum v4l2_power { ++ V4L2_POWER_OFF = 0, ++ V4L2_POWER_ON, ++ V4L2_POWER_STANDBY, ++}; ++ ++/* Slave interface type. */ ++enum v4l2_if_type { ++ /* ++ * Parallel 8-, 10- or 12-bit interface, used by for example ++ * on certain image sensors. ++ */ ++ V4L2_IF_TYPE_BT656, ++ V4L2_IF_TYPE_BT1120_PROGRESSIVE_DDR, ++ V4L2_IF_TYPE_BT1120_PROGRESSIVE_SDR, ++ V4L2_IF_TYPE_BT1120_INTERLACED_DDR, ++ V4L2_IF_TYPE_BT1120_INTERLACED_SDR, ++ V4L2_IF_TYPE_BT656_PROGRESSIVE, ++ V4L2_IF_TYPE_BT656_INTERLACED, ++}; ++ ++enum v4l2_if_type_bt656_mode { ++ /* ++ * Modes without Bt synchronisation codes. Separate ++ * synchronisation signal lines are used. ++ */ ++ V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT, ++ V4L2_IF_TYPE_BT656_MODE_NOBT_10BIT, ++ V4L2_IF_TYPE_BT656_MODE_NOBT_12BIT, ++ /* ++ * Use Bt synchronisation codes. The vertical and horizontal ++ * synchronisation is done based on synchronisation codes. ++ */ ++ V4L2_IF_TYPE_BT656_MODE_BT_8BIT, ++ V4L2_IF_TYPE_BT656_MODE_BT_10BIT, ++}; ++ ++struct v4l2_if_type_bt656 { ++ /* ++ * 0: Frame begins when vsync is high. ++ * 1: Frame begins when vsync changes from low to high. ++ */ ++ unsigned frame_start_on_rising_vs:1; ++ /* Use Bt synchronisation codes for sync correction. */ ++ unsigned bt_sync_correct:1; ++ /* Swap every two adjacent image data elements. */ ++ unsigned swap:1; ++ /* Inverted latch clock polarity from slave. */ ++ unsigned latch_clk_inv:1; ++ /* Hs polarity. 0 is active high, 1 active low. */ ++ unsigned nobt_hs_inv:1; ++ /* Vs polarity. 0 is active high, 1 active low. */ ++ unsigned nobt_vs_inv:1; ++ enum v4l2_if_type_bt656_mode mode; ++ /* Minimum accepted bus clock for slave (in Hz). */ ++ u32 clock_min; ++ /* Maximum accepted bus clock for slave. */ ++ u32 clock_max; ++ /* ++ * Current wish of the slave. May only change in response to ++ * ioctls that affect image capture. ++ */ ++ u32 clock_curr; ++}; ++ ++struct v4l2_ifparm { ++ enum v4l2_if_type if_type; ++ union { ++ struct v4l2_if_type_bt656 bt656; ++ } u; ++}; ++ ++/* IOCTL command numbers. */ ++enum v4l2_int_ioctl_num { ++ /* ++ * ++ * "Proper" V4L ioctls, as in struct video_device. ++ * ++ */ ++ vidioc_int_enum_fmt_cap_num = 1, ++ vidioc_int_g_fmt_cap_num, ++ vidioc_int_s_fmt_cap_num, ++ vidioc_int_try_fmt_cap_num, ++ vidioc_int_queryctrl_num, ++ vidioc_int_g_ctrl_num, ++ vidioc_int_s_ctrl_num, ++ vidioc_int_cropcap_num, ++ vidioc_int_g_crop_num, ++ vidioc_int_s_crop_num, ++ vidioc_int_g_parm_num, ++ vidioc_int_s_parm_num, ++ vidioc_int_querystd_num, ++ vidioc_int_s_std_num, ++ vidioc_int_s_video_routing_num, ++ vidioc_int_send_command_num, ++ ++ /* ++ * ++ * Strictly internal ioctls. ++ * ++ */ ++ /* Initialise the device when slave attaches to the master. */ ++ vidioc_int_dev_init_num = 1000, ++ /* Delinitialise the device at slave detach. */ ++ vidioc_int_dev_exit_num, ++ /* Set device power state. */ ++ vidioc_int_s_power_num, ++ /* ++ * Get slave private data, e.g. platform-specific slave ++ * configuration used by the master. ++ */ ++ vidioc_int_g_priv_num, ++ /* Get slave interface parameters. */ ++ vidioc_int_g_ifparm_num, ++ /* Does the slave need to be reset after VIDIOC_DQBUF? */ ++ vidioc_int_g_needs_reset_num, ++ vidioc_int_enum_framesizes_num, ++ vidioc_int_enum_frameintervals_num, ++ ++ /* ++ * ++ * VIDIOC_INT_* ioctls. ++ * ++ */ ++ /* VIDIOC_INT_RESET */ ++ vidioc_int_reset_num, ++ /* VIDIOC_INT_INIT */ ++ vidioc_int_init_num, ++ /* VIDIOC_DBG_G_CHIP_IDENT */ ++ vidioc_int_g_chip_ident_num, ++ ++ /* ++ * ++ * Start of private ioctls. ++ * ++ */ ++ vidioc_int_priv_start_num = 2000, ++}; ++ ++/* ++ * ++ * IOCTL wrapper functions for better type checking. ++ * ++ */ ++ ++#define V4L2_INT_WRAPPER_0(name) \ ++ static inline int vidioc_int_##name(struct v4l2_int_device *d) \ ++ { \ ++ return v4l2_int_ioctl_0(d, vidioc_int_##name##_num); \ ++ } \ ++ \ ++ static inline struct v4l2_int_ioctl_desc \ ++ vidioc_int_##name##_cb(int (*func) \ ++ (struct v4l2_int_device *)) \ ++ { \ ++ struct v4l2_int_ioctl_desc desc; \ ++ \ ++ desc.num = vidioc_int_##name##_num; \ ++ desc.func = (v4l2_int_ioctl_func *)func; \ ++ \ ++ return desc; \ ++ } ++ ++#define V4L2_INT_WRAPPER_1(name, arg_type, asterisk) \ ++ static inline int vidioc_int_##name(struct v4l2_int_device *d, \ ++ arg_type asterisk arg) \ ++ { \ ++ return v4l2_int_ioctl_1(d, vidioc_int_##name##_num, \ ++ (void *)(unsigned long)arg); \ ++ } \ ++ \ ++ static inline struct v4l2_int_ioctl_desc \ ++ vidioc_int_##name##_cb(int (*func) \ ++ (struct v4l2_int_device *, \ ++ arg_type asterisk)) \ ++ { \ ++ struct v4l2_int_ioctl_desc desc; \ ++ \ ++ desc.num = vidioc_int_##name##_num; \ ++ desc.func = (v4l2_int_ioctl_func *)func; \ ++ \ ++ return desc; \ ++ } ++ ++V4L2_INT_WRAPPER_1(enum_fmt_cap, struct v4l2_fmtdesc, *); ++V4L2_INT_WRAPPER_1(g_fmt_cap, struct v4l2_format, *); ++V4L2_INT_WRAPPER_1(s_fmt_cap, struct v4l2_format, *); ++V4L2_INT_WRAPPER_1(try_fmt_cap, struct v4l2_format, *); ++V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *); ++V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *); ++V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *); ++V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *); ++V4L2_INT_WRAPPER_1(g_crop, struct v4l2_crop, *); ++V4L2_INT_WRAPPER_1(s_crop, struct v4l2_crop, *); ++V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *); ++V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *); ++V4L2_INT_WRAPPER_1(querystd, v4l2_std_id, *); ++V4L2_INT_WRAPPER_1(s_std, v4l2_std_id, *); ++V4L2_INT_WRAPPER_1(s_video_routing, struct v4l2_routing, *); ++V4L2_INT_WRAPPER_1(send_command, struct v4l2_send_command_control, *); ++ ++V4L2_INT_WRAPPER_0(dev_init); ++V4L2_INT_WRAPPER_0(dev_exit); ++V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, /*dummy arg*/); ++V4L2_INT_WRAPPER_1(g_priv, void, *); ++V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *); ++V4L2_INT_WRAPPER_1(g_needs_reset, void, *); ++V4L2_INT_WRAPPER_1(enum_framesizes, struct v4l2_frmsizeenum, *); ++V4L2_INT_WRAPPER_1(enum_frameintervals, struct v4l2_frmivalenum, *); ++ ++V4L2_INT_WRAPPER_0(reset); ++V4L2_INT_WRAPPER_0(init); ++V4L2_INT_WRAPPER_1(g_chip_ident, int, *); ++ ++#endif +diff -Nur linux-4.1.10/drivers/media/platform/mxc/output/Kconfig xbian-sources-kernel/drivers/media/platform/mxc/output/Kconfig +--- linux-4.1.10/drivers/media/platform/mxc/output/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/output/Kconfig 2015-10-11 19:49:28.487234352 +0200 @@ -0,0 +1,5 @@ +config VIDEO_MXC_IPU_OUTPUT + tristate "IPU v4l2 output support" + depends on VIDEO_MXC_OUTPUT && MXC_IPU + ---help--- + This is the video4linux2 driver for IPU post processing video output. -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/output/Makefile linux-4.1.10/drivers/media/platform/mxc/output/Makefile ---- linux-4.1.10.orig/drivers/media/platform/mxc/output/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/output/Makefile 2015-10-10 16:41:42.549314841 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/output/Makefile xbian-sources-kernel/drivers/media/platform/mxc/output/Makefile +--- linux-4.1.10/drivers/media/platform/mxc/output/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/output/Makefile 2015-10-11 19:49:28.487234352 +0200 @@ -0,0 +1 @@ +obj-$(CONFIG_VIDEO_MXC_IPU_OUTPUT) += mxc_vout.o -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/output/mxc_vout.c linux-4.1.10/drivers/media/platform/mxc/output/mxc_vout.c ---- linux-4.1.10.orig/drivers/media/platform/mxc/output/mxc_vout.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/output/mxc_vout.c 2015-10-10 16:41:42.549314841 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/output/mxc_vout.c xbian-sources-kernel/drivers/media/platform/mxc/output/mxc_vout.c +--- linux-4.1.10/drivers/media/platform/mxc/output/mxc_vout.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/output/mxc_vout.c 2015-10-11 19:49:28.487234352 +0200 @@ -0,0 +1,2265 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -145487,9 +160945,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/output/mxc_vout.c linux-4 +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("V4L2-driver for MXC video output"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/v4l2-extra.h linux-4.1.10/drivers/media/platform/mxc/v4l2-extra.h ---- linux-4.1.10.orig/drivers/media/platform/mxc/v4l2-extra.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/mxc/v4l2-extra.h 2015-10-10 16:41:42.549314841 +0200 +diff -Nur linux-4.1.10/drivers/media/platform/mxc/v4l2-extra.h xbian-sources-kernel/drivers/media/platform/mxc/v4l2-extra.h +--- linux-4.1.10/drivers/media/platform/mxc/v4l2-extra.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/media/platform/mxc/v4l2-extra.h 2015-10-11 19:49:28.487234352 +0200 @@ -0,0 +1,11 @@ +/* +struct v4l2_send_command_control { @@ -145502,177 +160960,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/v4l2-extra.h linux-4.1.10 + +#define VIDIOC_SEND_COMMAND _IOWR('V', 92, struct v4l2_send_command_control) + -diff -Nur linux-4.1.10.orig/drivers/media/platform/v4l2-int-device.c linux-4.1.10/drivers/media/platform/v4l2-int-device.c ---- linux-4.1.10.orig/drivers/media/platform/v4l2-int-device.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/media/platform/v4l2-int-device.c 2015-10-10 16:41:42.549314841 +0200 -@@ -0,0 +1,164 @@ -+/* -+ * drivers/media/video/v4l2-int-device.c -+ * -+ * V4L2 internal ioctl interface. -+ * -+ * Copyright (C) 2007 Nokia Corporation. -+ * -+ * Contact: Sakari Ailus <sakari.ailus@nokia.com> -+ * -+ * 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. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -+ * 02110-1301 USA -+ */ -+ -+#include <linux/kernel.h> -+#include <linux/list.h> -+#include <linux/sort.h> -+#include <linux/string.h> -+#include <linux/module.h> -+ -+#include <media/v4l2-int-device.h> -+ -+static DEFINE_MUTEX(mutex); -+static LIST_HEAD(int_list); -+ -+void v4l2_int_device_try_attach_all(void) -+{ -+ struct v4l2_int_device *m, *s; -+ -+ list_for_each_entry(m, &int_list, head) { -+ if (m->type != v4l2_int_type_master) -+ continue; -+ -+ list_for_each_entry(s, &int_list, head) { -+ if (s->type != v4l2_int_type_slave) -+ continue; -+ -+ /* Slave is connected? */ -+ if (s->u.slave->master) -+ continue; -+ -+ /* Slave wants to attach to master? */ -+ if (s->u.slave->attach_to[0] != 0 -+ && strncmp(m->name, s->u.slave->attach_to, -+ V4L2NAMESIZE)) -+ continue; -+ -+ if (!try_module_get(m->module)) -+ continue; -+ -+ s->u.slave->master = m; -+ if (m->u.master->attach(s)) { -+ s->u.slave->master = NULL; -+ module_put(m->module); -+ continue; -+ } -+ } -+ } -+} -+EXPORT_SYMBOL_GPL(v4l2_int_device_try_attach_all); -+ -+static int ioctl_sort_cmp(const void *a, const void *b) -+{ -+ const struct v4l2_int_ioctl_desc *d1 = a, *d2 = b; -+ -+ if (d1->num > d2->num) -+ return 1; -+ -+ if (d1->num < d2->num) -+ return -1; -+ -+ return 0; -+} -+ -+int v4l2_int_device_register(struct v4l2_int_device *d) -+{ -+ if (d->type == v4l2_int_type_slave) -+ sort(d->u.slave->ioctls, d->u.slave->num_ioctls, -+ sizeof(struct v4l2_int_ioctl_desc), -+ &ioctl_sort_cmp, NULL); -+ mutex_lock(&mutex); -+ list_add(&d->head, &int_list); -+ v4l2_int_device_try_attach_all(); -+ mutex_unlock(&mutex); -+ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(v4l2_int_device_register); -+ -+void v4l2_int_device_unregister(struct v4l2_int_device *d) -+{ -+ mutex_lock(&mutex); -+ list_del(&d->head); -+ if (d->type == v4l2_int_type_slave -+ && d->u.slave->master != NULL) { -+ d->u.slave->master->u.master->detach(d); -+ module_put(d->u.slave->master->module); -+ d->u.slave->master = NULL; -+ } -+ mutex_unlock(&mutex); -+} -+EXPORT_SYMBOL_GPL(v4l2_int_device_unregister); -+ -+/* Adapted from search_extable in extable.c. */ -+static v4l2_int_ioctl_func *find_ioctl(struct v4l2_int_slave *slave, int cmd, -+ v4l2_int_ioctl_func *no_such_ioctl) -+{ -+ const struct v4l2_int_ioctl_desc *first = slave->ioctls; -+ const struct v4l2_int_ioctl_desc *last = -+ first + slave->num_ioctls - 1; -+ -+ while (first <= last) { -+ const struct v4l2_int_ioctl_desc *mid; -+ -+ mid = (last - first) / 2 + first; -+ -+ if (mid->num < cmd) -+ first = mid + 1; -+ else if (mid->num > cmd) -+ last = mid - 1; -+ else -+ return mid->func; -+ } -+ -+ return no_such_ioctl; -+} -+ -+static int no_such_ioctl_0(struct v4l2_int_device *d) -+{ -+ return -ENOIOCTLCMD; -+} -+ -+int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd) -+{ -+ return ((v4l2_int_ioctl_func_0 *) -+ find_ioctl(d->u.slave, cmd, -+ (v4l2_int_ioctl_func *)no_such_ioctl_0))(d); -+} -+EXPORT_SYMBOL_GPL(v4l2_int_ioctl_0); -+ -+static int no_such_ioctl_1(struct v4l2_int_device *d, void *arg) -+{ -+ return -ENOIOCTLCMD; -+} -+ -+int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg) -+{ -+ return ((v4l2_int_ioctl_func_1 *) -+ find_ioctl(d->u.slave, cmd, -+ (v4l2_int_ioctl_func *)no_such_ioctl_1))(d, arg); -+} -+EXPORT_SYMBOL_GPL(v4l2_int_ioctl_1); -+ -+MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/Kconfig linux-4.1.10/drivers/media/v4l2-core/Kconfig ---- linux-4.1.10.orig/drivers/media/v4l2-core/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/media/v4l2-core/Kconfig 2015-10-10 16:41:42.549314841 +0200 +diff -Nur linux-4.1.10/drivers/media/v4l2-core/Kconfig xbian-sources-kernel/drivers/media/v4l2-core/Kconfig +--- linux-4.1.10/drivers/media/v4l2-core/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/v4l2-core/Kconfig 2015-10-11 19:49:28.639224277 +0200 @@ -44,6 +44,10 @@ tristate depends on VIDEOBUF2_CORE @@ -145684,9 +160974,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/Kconfig linux-4.1.10/drivers # Used by drivers that need Videobuf modules config VIDEOBUF_GEN tristate -diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/Makefile linux-4.1.10/drivers/media/v4l2-core/Makefile ---- linux-4.1.10.orig/drivers/media/v4l2-core/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/media/v4l2-core/Makefile 2015-10-10 16:41:42.641314846 +0200 +diff -Nur linux-4.1.10/drivers/media/v4l2-core/Makefile xbian-sources-kernel/drivers/media/v4l2-core/Makefile +--- linux-4.1.10/drivers/media/v4l2-core/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/v4l2-core/Makefile 2015-10-11 19:49:28.639224277 +0200 @@ -21,6 +21,7 @@ obj-$(CONFIG_VIDEO_TUNER) += tuner.o @@ -145695,9 +160985,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/Makefile linux-4.1.10/driver obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o -diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-compat-ioctl32.c linux-4.1.10/drivers/media/v4l2-core/v4l2-compat-ioctl32.c ---- linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-compat-ioctl32.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/media/v4l2-core/v4l2-compat-ioctl32.c 2015-10-10 16:41:42.641314846 +0200 +diff -Nur linux-4.1.10/drivers/media/v4l2-core/v4l2-compat-ioctl32.c xbian-sources-kernel/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +--- linux-4.1.10/drivers/media/v4l2-core/v4l2-compat-ioctl32.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/v4l2-core/v4l2-compat-ioctl32.c 2015-10-11 19:49:28.639224277 +0200 @@ -251,7 +251,8 @@ static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) @@ -146031,9 +161321,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-compat-ioctl32.c linux- return ret; } EXPORT_SYMBOL_GPL(v4l2_compat_ioctl32); -diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-dev.c linux-4.1.10/drivers/media/v4l2-core/v4l2-dev.c ---- linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-dev.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/media/v4l2-core/v4l2-dev.c 2015-10-10 16:41:42.641314846 +0200 +diff -Nur linux-4.1.10/drivers/media/v4l2-core/v4l2-dev.c xbian-sources-kernel/drivers/media/v4l2-core/v4l2-dev.c +--- linux-4.1.10/drivers/media/v4l2-core/v4l2-dev.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/v4l2-core/v4l2-dev.c 2015-10-11 19:49:28.639224277 +0200 @@ -563,6 +563,7 @@ set_bit(_IOC_NR(VIDIOC_DBG_G_REGISTER), valid_ioctls); set_bit(_IOC_NR(VIDIOC_DBG_S_REGISTER), valid_ioctls); @@ -146042,9 +161332,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-dev.c linux-4.1.10/driv /* yes, really vidioc_subscribe_event */ SET_VALID_IOCTL(ops, VIDIOC_DQEVENT, vidioc_subscribe_event); SET_VALID_IOCTL(ops, VIDIOC_SUBSCRIBE_EVENT, vidioc_subscribe_event); -diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-ioctl.c linux-4.1.10/drivers/media/v4l2-core/v4l2-ioctl.c ---- linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-ioctl.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/media/v4l2-core/v4l2-ioctl.c 2015-10-10 16:41:42.641314846 +0200 +diff -Nur linux-4.1.10/drivers/media/v4l2-core/v4l2-ioctl.c xbian-sources-kernel/drivers/media/v4l2-core/v4l2-ioctl.c +--- linux-4.1.10/drivers/media/v4l2-core/v4l2-ioctl.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/media/v4l2-core/v4l2-ioctl.c 2015-10-11 19:49:28.643224012 +0200 @@ -26,6 +26,7 @@ #include <media/v4l2-fh.h> #include <media/v4l2-event.h> @@ -146101,9 +161391,9 @@ diff -Nur linux-4.1.10.orig/drivers/media/v4l2-core/v4l2-ioctl.c linux-4.1.10/dr IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO), IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO), IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0), -diff -Nur linux-4.1.10.orig/drivers/mfd/Kconfig linux-4.1.10/drivers/mfd/Kconfig ---- linux-4.1.10.orig/drivers/mfd/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/mfd/Kconfig 2015-10-10 16:41:42.641314846 +0200 +diff -Nur linux-4.1.10/drivers/mfd/Kconfig xbian-sources-kernel/drivers/mfd/Kconfig +--- linux-4.1.10/drivers/mfd/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mfd/Kconfig 2015-10-11 19:49:28.659222952 +0200 @@ -207,6 +207,13 @@ Additional drivers must be enabled in order to use the specific features of the device. @@ -146118,18 +161408,33 @@ diff -Nur linux-4.1.10.orig/drivers/mfd/Kconfig linux-4.1.10/drivers/mfd/Kconfig config MFD_DLN2 tristate "Diolan DLN2 support" select MFD_CORE -diff -Nur linux-4.1.10.orig/drivers/mfd/Makefile linux-4.1.10/drivers/mfd/Makefile ---- linux-4.1.10.orig/drivers/mfd/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/mfd/Makefile 2015-10-10 16:41:42.641314846 +0200 -@@ -185,3 +185,4 @@ +@@ -1466,5 +1473,13 @@ + System Registers are the platform configuration block + on the ARM Ltd. Versatile Express board. + ++config MFD_TDA1997X ++ tristate "TDA1997X HDMI Receiver Core" ++ select MFD_CORE ++ depends on I2C=y ++ help ++ This is the core driver for the TDA1997X HDMI Reciver. This MFD ++ driver connects with video and audio drivers for HDMI Input. ++ + endmenu + endif +diff -Nur linux-4.1.10/drivers/mfd/Makefile xbian-sources-kernel/drivers/mfd/Makefile +--- linux-4.1.10/drivers/mfd/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mfd/Makefile 2015-10-11 19:49:28.659222952 +0200 +@@ -185,3 +185,5 @@ intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o obj-$(CONFIG_MFD_MT6397) += mt6397-core.o +obj-$(CONFIG_MFD_MXC_HDMI) += mxc-hdmi-core.o -diff -Nur linux-4.1.10.orig/drivers/mfd/mxc-hdmi-core.c linux-4.1.10/drivers/mfd/mxc-hdmi-core.c ---- linux-4.1.10.orig/drivers/mfd/mxc-hdmi-core.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mfd/mxc-hdmi-core.c 2015-10-10 16:41:42.641314846 +0200 -@@ -0,0 +1,782 @@ ++obj-$(CONFIG_MFD_TDA1997X) += tda1997x-core.o +diff -Nur linux-4.1.10/drivers/mfd/mxc-hdmi-core.c xbian-sources-kernel/drivers/mfd/mxc-hdmi-core.c +--- linux-4.1.10/drivers/mfd/mxc-hdmi-core.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mfd/mxc-hdmi-core.c 2015-10-11 19:49:28.667222422 +0200 +@@ -0,0 +1,795 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. + * @@ -146213,6 +161518,9 @@ diff -Nur linux-4.1.10.orig/drivers/mfd/mxc-hdmi-core.c linux-4.1.10/drivers/mfd +static unsigned int hdmi_abort_state; +static spinlock_t hdmi_audio_lock, hdmi_blank_state_lock, hdmi_cable_state_lock; + ++static unsigned int cts_n_prev = 0; ++static unsigned int cts_prev = 0; ++ +void hdmi_set_dvi_mode(unsigned int state) +{ + if (state) { @@ -146468,6 +161776,11 @@ diff -Nur linux-4.1.10.orig/drivers/mfd/mxc-hdmi-core.c linux-4.1.10/drivers/mfd +{ + u8 val; + ++ if (cts_n_prev == value || (cts_n_prev && !check_hdmi_state())) ++ return; ++ ++ cts_n_prev = value; ++ + if (!hdmi_dma_running) { + hdmi_writeb(value & 0xff, HDMI_AUD_N1); + hdmi_writeb(0, HDMI_AUD_N2); @@ -146488,6 +161801,11 @@ diff -Nur linux-4.1.10.orig/drivers/mfd/mxc-hdmi-core.c linux-4.1.10/drivers/mfd +{ + u8 val; + ++ if (cts_prev == cts || (cts_prev && !check_hdmi_state())) ++ return; ++ ++ cts_prev = cts; ++ + if (!hdmi_dma_running) { + hdmi_writeb(cts & 0xff, HDMI_AUD_CTS1); + hdmi_writeb(0, HDMI_AUD_CTS2); @@ -146912,211 +162230,4731 @@ diff -Nur linux-4.1.10.orig/drivers/mfd/mxc-hdmi-core.c linux-4.1.10/drivers/mfd +MODULE_DESCRIPTION("Core driver for Freescale i.Mx on-chip HDMI"); +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/misc/sram.c linux-4.1.10/drivers/misc/sram.c ---- linux-4.1.10.orig/drivers/misc/sram.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/misc/sram.c 2015-10-10 16:41:42.641314846 +0200 -@@ -17,6 +17,7 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -+#define DEBUG - - #include <linux/kernel.h> - #include <linux/init.h> -diff -Nur linux-4.1.10.orig/drivers/mmc/core/core.c linux-4.1.10/drivers/mmc/core/core.c ---- linux-4.1.10.orig/drivers/mmc/core/core.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/mmc/core/core.c 2015-10-10 16:41:42.645314847 +0200 -@@ -13,11 +13,13 @@ - #include <linux/module.h> - #include <linux/init.h> - #include <linux/interrupt.h> +diff -Nur linux-4.1.10/drivers/mfd/tda1997x-core.c xbian-sources-kernel/drivers/mfd/tda1997x-core.c +--- linux-4.1.10/drivers/mfd/tda1997x-core.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mfd/tda1997x-core.c 2015-10-11 19:49:28.671222156 +0200 +@@ -0,0 +1,4605 @@ ++/* ++ * Copyright (C) 2013 Gateworks Corporation ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * TODO ++ * - add gpio reset pin ++ * - add gpio pwrdn pin ++ * - document devicetree bindings ++ * - unload/reload module interrupts never fire (something not getting reset) ++ */ ++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/device.h> ++#include <linux/err.h> ++#include <linux/gpio.h> ++#include <linux/io.h> +#include <linux/clk.h> - #include <linux/completion.h> - #include <linux/device.h> - #include <linux/delay.h> - #include <linux/pagemap.h> - #include <linux/err.h> -+#include <linux/gpio/consumer.h> - #include <linux/leds.h> - #include <linux/scatterlist.h> - #include <linux/log2.h> -@@ -1553,8 +1555,8 @@ - goto power_cycle; - } - -- /* Keep clock gated for at least 5 ms */ -- mmc_delay(5); -+ /* Keep clock gated for at least 10 ms, though spec only says 5 ms */ -+ mmc_delay(10); - host->ios.clock = clock; - mmc_set_ios(host); - -@@ -1603,6 +1605,43 @@ - mmc_host_clk_release(host); - } - -+static void mmc_card_power_up(struct mmc_host *host) ++#include <linux/spinlock.h> ++#include <linux/irq.h> ++#include <linux/interrupt.h> ++#include <linux/of_device.h> ++#include <linux/i2c.h> ++#include <linux/sysfs.h> ++#include <linux/delay.h> ++#include <linux/regulator/consumer.h> ++#include <linux/fsl_devices.h> ++#include <linux/workqueue.h> ++#include <linux/timer.h> ++#include <linux/mfd/tda1997x-core.h> ++#include <linux/time.h> ++ ++#include <drm/drm_edid.h> ++#include <drm/drm_crtc.h> ++ ++/* Voltage regulators */ ++#define TDA1997X_VOLTAGE_DIGITAL_IO 3300000 ++#define TDA1997X_VOLTAGE_DIGITAL_CORE 1800000 ++#define TDA1997X_VOLTAGE_ANALOG 1800000 ++ ++static struct regulator *dvddio_regulator; ++static struct regulator *dvdd_regulator; ++static struct regulator *avdd_regulator; ++ ++/* Page 0x00 */ ++#define REG_VERSION 0x0000 ++#define REG_INPUT_SEL 0x0001 ++#define REG_SERVICE_MODE 0x0002 ++#define REG_HPD_MAN_CTRL 0x0003 ++#define REG_RT_MAN_CTRL 0x0004 ++#define REG_STANDBY_SOFT_RST 0x000A ++#define REG_HDMI_SOFT_RST 0x000B ++#define REG_HDMI_INFO_RST 0x000C ++#define REG_INT_FLG_CLR_TOP 0x000E ++#define REG_INT_FLG_CLR_SUS 0x000F ++#define REG_INT_FLG_CLR_DDC 0x0010 ++#define REG_INT_FLG_CLR_RATE 0x0011 ++#define REG_INT_FLG_CLR_MODE 0x0012 ++#define REG_INT_FLG_CLR_INFO 0x0013 ++#define REG_INT_FLG_CLR_AUDIO 0x0014 ++#define REG_INT_FLG_CLR_HDCP 0x0015 ++#define REG_INT_FLG_CLR_AFE 0x0016 ++#define REG_INT_MASK_TOP 0x0017 ++#define REG_INT_MASK_SUS 0x0018 ++#define REG_INT_MASK_DDC 0x0019 ++#define REG_INT_MASK_RATE 0x001A ++#define REG_INT_MASK_MODE 0x001B ++#define REG_INT_MASK_INFO 0x001C ++#define REG_INT_MASK_AUDIO 0x001D ++#define REG_INT_MASK_HDCP 0x001E ++#define REG_INT_MASK_AFE 0x001F ++#define REG_DETECT_5V 0x0020 ++#define REG_SUS_STATUS 0x0021 ++#define REG_V_PER 0x0022 ++#define REG_H_PER 0x0025 ++#define REG_HS_WIDTH 0x0027 ++#define REG_FMT_H_TOT 0x0029 ++#define REG_FMT_H_ACT 0x002b ++#define REG_FMT_H_FRONT 0x002d ++#define REG_FMT_H_SYNC 0x002f ++#define REG_FMT_H_BACK 0x0031 ++#define REG_FMT_V_TOT 0x0033 ++#define REG_FMT_V_ACT 0x0035 ++#define REG_FMT_V_FRONT_F1 0x0037 ++#define REG_FMT_V_FRONT_F2 0x0038 ++#define REG_FMT_V_SYNC 0x0039 ++#define REG_FMT_V_BACK_F1 0x003a ++#define REG_FMT_V_BACK_F2 0x003b ++#define REG_FMT_DE_ACT 0x003c ++#define REG_RATE_CTRL 0x0040 ++#define REG_CLK_MIN_RATE 0x0043 ++#define REG_CLK_MAX_RATE 0x0046 ++#define REG_CLK_A_STATUS 0x0049 ++#define REG_CLK_A_RATE 0x004A ++#define REG_DRIFT_CLK_A_REG 0x004D ++#define REG_CLK_B_STATUS 0x004E ++#define REG_CLK_B_RATE 0x004F ++#define REG_DRIFT_CLK_B_REG 0x0052 ++#define REG_HDCP_CTRL 0x0060 ++#define REG_HDCP_KDS 0x0061 ++#define REG_HDCP_BCAPS 0x0063 ++#define REG_HDCP_KEY_CTRL 0x0064 ++#define REG_INFO_CTRL 0x0076 ++#define REG_INFO_EXCEED 0x0077 ++#define REG_PIX_REPEAT 0x007B ++#define REG_AUDIO_PATH 0x007C ++#define REG_AUDIO_SEL 0x007D ++#define REG_AUDIO_OUT_ENABLE 0x007E ++#define REG_AUDIO_OUT_HIZ 0x007F ++#define REG_VDP_CTRL 0x0080 ++#define REG_VHREF_CTRL 0x00A0 ++#define REG_PXCNT_PR 0x00A2 ++#define REG_PXCNT_NPIX 0x00A4 ++#define REG_LCNT_PR 0x00A6 ++#define REG_LCNT_NLIN 0x00A8 ++#define REG_HREF_S 0x00AA ++#define REG_HREF_E 0x00AC ++#define REG_HS_S 0x00AE ++#define REG_HS_E 0x00B0 ++#define REG_VREF_F1_S 0x00B2 ++#define REG_VREF_F1_WIDTH 0x00B4 ++#define REG_VREF_F2_S 0x00B5 ++#define REG_VREF_F2_WIDTH 0x00B7 ++#define REG_VS_F1_LINE_S 0x00B8 ++#define REG_VS_F1_LINE_WIDTH 0x00BA ++#define REG_VS_F2_LINE_S 0x00BB ++#define REG_VS_F2_LINE_WIDTH 0x00BD ++#define REG_VS_F1_PIX_S 0x00BE ++#define REG_VS_F1_PIX_E 0x00C0 ++#define REG_VS_F2_PIX_S 0x00C2 ++#define REG_VS_F2_PIX_E 0x00C4 ++#define REG_FREF_F1_S 0x00C6 ++#define REG_FREF_F2_S 0x00C8 ++#define REG_FDW_S 0x00ca ++#define REG_FDW_E 0x00cc ++#define REG_BLK_GY 0x00da ++#define REG_BLK_BU 0x00dc ++#define REG_BLK_RV 0x00de ++#define REG_FILTERS_CTRL 0x00e0 ++#define REG_DITHERING_CTRL 0x00E9 ++#define REG_OF_CTRL 0x00EA ++#define REG_CLKOUT_CTRL 0x00EB ++#define REG_HS_HREF_SEL 0x00EC ++#define REG_VS_VREF_SEL 0x00ED ++#define REG_DE_FREF_SEL 0x00EE ++#define REG_VP35_32_CTRL 0x00EF ++#define REG_VP31_28_CTRL 0x00F0 ++#define REG_VP27_24_CTRL 0x00F1 ++#define REG_VP23_20_CTRL 0x00F2 ++#define REG_VP19_16_CTRL 0x00F3 ++#define REG_VP15_12_CTRL 0x00F4 ++#define REG_VP11_08_CTRL 0x00F5 ++#define REG_VP07_04_CTRL 0x00F6 ++#define REG_VP03_00_CTRL 0x00F7 ++#define REG_CURPAGE_00H 0xFF ++#define MASK_VPER 0x3fffff ++#define MASK_HPER 0x0fff ++#define MASK_HSWIDTH 0x03ff ++ ++/* Page 0x01 */ ++#define REG_HDMI_FLAGS 0x0100 ++#define REG_DEEP_COLOR_MODE 0x0101 ++#define REG_AUDIO_FLAGS 0x0108 ++#define REG_AUDIO_FREQ 0x0109 ++#define REG_ACP_PACKET_TYPE 0x0141 ++#define REG_ISRC1_PACKET_TYPE 0x0161 ++#define REG_ISRC2_PACKET_TYPE 0x0181 ++#define REG_GBD_PACKET_TYPE 0x01a1 ++#define ISRC_PACKET_HDR_LEN 3 ++#define ISRC_PACKET_DAT_LEN 16 ++#define GDB_PACKET_HDR_LEN 3 ++#define GDB_PACKET_DAT_LEN 28 ++#define ACP_PACKET_HDR_LEN 3 ++#define ACP_PACKET_DAT_LEN 16 ++#define MASK_AUDIO_DST_RATE 0x80 ++#define MASK_AUDIO_FREQ 0x07 ++#define MASK_DC_PIXEL_PHASE 0xf0 ++#define MASK_DC_COLOR_DEPTH 0x0f ++ ++/* Page 0x12 */ ++#define REG_CLK_CFG 0x1200 ++#define REG_CLK_OUT_CFG 0x1201 ++#define REG_CFG1 0x1202 ++#define REG_CFG2 0x1203 ++#define REG_WDL_CFG 0x1210 ++#define REG_DELOCK_DELAY 0x1212 ++#define REG_PON_OVR_EN 0x12A0 ++#define REG_PON_CBIAS 0x12A1 ++#define REG_PON_RESCAL 0x12A2 ++#define REG_PON_RES 0x12A3 ++#define REG_PON_CLK 0x12A4 ++#define REG_PON_PLL 0x12A5 ++#define REG_PON_EQ 0x12A6 ++#define REG_PON_DES 0x12A7 ++#define REG_PON_OUT 0x12A8 ++#define REG_PON_MUX 0x12A9 ++#define REG_MODE_RECOVER_CFG1 0x12F8 ++#define REG_MODE_RECOVER_CFG2 0x12F9 ++#define REG_MODE_RECOVER_STS 0x12FA ++#define REG_AUDIO_LAYOUT 0x12D0 ++ ++/* Page 0x13 */ ++#define REG_DEEP_COLOR_CTRL 0x1300 ++#define REG_CGU_DEBUG_SEL 0x1305 ++#define REG_HDCP_DDC_ADDR 0x1310 ++#define REG_HDCP_KIDX 0x1316 ++#define REG_DEEP_PLL7 0x1347 ++#define REG_HDCP_DE_CTRL 0x1370 ++#define REG_HDCP_EP_FILT_CTRL 0x1371 ++#define REG_HDMI_CTRL 0x1377 ++#define REG_HMTP_CTRL 0x137a ++#define REG_TIMER_D 0x13CF ++#define REG_SUS_SET_RGB0 0x13E1 ++#define REG_SUS_SET_RGB1 0x13E2 ++#define REG_SUS_SET_RGB2 0x13E3 ++#define REG_SUS_SET_RGB3 0x13E4 ++#define REG_SUS_SET_RGB4 0x13E5 ++#define REG_MAN_SUS_HDMI_SEL 0x13E8 ++#define REG_MAN_HDMI_SET 0x13E9 ++#define REG_SUS_CLOCK_GOOD 0x13EF ++ ++/* CGU_DEBUG_SEL bits */ ++#define CGU_DEBUG_CFG_CLK_MASK 0x18 ++#define CGU_DEBUG_XO_FRO_SEL (1<<2) ++#define CGU_DEBUG_VDP_CLK_SEL (1<<1) ++#define CGU_DEBUG_PIX_CLK_SEL (1<<0) ++ ++/* REG_MAN_SUS_HDMI_SEL / REG_MAN_HDMI_SET bits */ ++#define MAN_DIS_OUT_BUF (1<<7) ++#define MAN_DIS_ANA_PATH (1<<6) ++#define MAN_DIS_HDCP (1<<5) ++#define MAN_DIS_TMDS_ENC (1<<4) ++#define MAN_DIS_TMDS_FLOW (1<<3) ++#define MAN_RST_HDCP (1<<2) ++#define MAN_RST_TMDS_ENC (1<<1) ++#define MAN_RST_TMDS_FLOW (1<<0) ++ ++/* Page 0x14 */ ++#define REG_FIFO_LATENCY_VAL 0x1403 ++#define REG_AUDIO_CLOCK_MODE 0x1411 ++#define REG_TEST_NCTS_CTRL 0x1415 ++#define REG_TEST_AUDIO_FREQ 0x1426 ++#define REG_TEST_MODE 0x1437 ++ ++/* Page 0x20 */ ++#define REG_EDID_IN_BYTE0 0x2000 /* EDID base */ ++#define REG_EDID_IN_VERSION 0x2080 ++#define REG_EDID_ENABLE 0x2081 ++#define REG_HPD_POWER 0x2084 ++#define REG_HPD_AUTO_CTRL 0x2085 ++#define REG_HPD_DURATION 0x2086 ++#define REG_RX_HPD_HEAC 0x2087 ++ ++/* Page 0x21 */ ++#define REG_EDID_IN_BYTE128 0x2100 /* CEA Extension block */ ++#define REG_EDID_IN_SPA_SUB 0x2180 ++#define REG_EDID_IN_SPA_AB_A 0x2181 ++#define REG_EDID_IN_SPA_CD_A 0x2182 ++#define REG_EDID_IN_CKSUM_A 0x2183 ++#define REG_EDID_IN_SPA_AB_B 0x2184 ++#define REG_EDID_IN_SPA_CD_B 0x2185 ++#define REG_EDID_IN_CKSUM_B 0x2186 ++ ++/* Page 0x30 */ ++#define REG_RT_AUTO_CTRL 0x3000 ++#define REG_EQ_MAN_CTRL0 0x3001 ++#define REG_EQ_MAN_CTRL1 0x3002 ++#define REG_OUTPUT_CFG 0x3003 ++#define REG_MUTE_CTRL 0x3004 ++#define REG_SLAVE_ADDR 0x3005 ++#define REG_CMTP_REG6 0x3006 ++#define REG_CMTP_REG7 0x3007 ++#define REG_CMTP_REG8 0x3008 ++#define REG_CMTP_REG9 0x3009 ++#define REG_CMTP_REGA 0x300A ++#define REG_CMTP_REGB 0x300B ++#define REG_CMTP_REGC 0x300C ++#define REG_CMTP_REGD 0x300D ++#define REG_CMTP_REGE 0x300E ++#define REG_CMTP_REGF 0x300F ++#define REG_CMTP_REG10 0x3010 ++#define REG_CMTP_REG11 0x3011 ++ ++/* CEC */ ++#define REG_PWR_CONTROL 0x80F4 ++#define REG_OSC_DIVIDER 0x80F5 ++#define REG_EN_OSC_PERIOD_LSB 0x80F8 ++#define REG_CONTROL 0x80FF ++ ++/* global interrupt flags (INT_FLG_CRL_TOP) */ ++#define INTERRUPT_AFE (1<<7) /* AFE module */ ++#define INTERRUPT_HDCP (1<<6) /* HDCP module */ ++#define INTERRUPT_AUDIO (1<<5) /* Audio module */ ++#define INTERRUPT_INFO (1<<4) /* Infoframe module */ ++#define INTERRUPT_MODE (1<<3) /* HDMI mode module */ ++#define INTERRUPT_RATE (1<<2) /* rate module */ ++#define INTERRUPT_DDC (1<<1) /* DDC module */ ++#define INTERRUPT_SUS (1<<0) /* SUS module */ ++ ++/* INT_FLG_CLR_HDCP bits */ ++#define MASK_HDCP_MTP (1<<7) /* HDCP MTP busy */ ++#define MASK_HDCP_DLMTP (1<<4) /* HDCP end download MTP to SRAM */ ++#define MASK_HDCP_DLRAM (1<<3) /* HDCP end download keys from SRAM */ ++#define MASK_HDCP_ENC (1<<2) /* HDCP ENC */ ++#define MASK_STATE_C5 (1<<1) /* HDCP State C5 reached */ ++#define MASK_AKSV (1<<0) /* AKSV received (start of auth) */ ++ ++/* INT_FLG_CLR_RATE bits */ ++#define MASK_RATE_B_DRIFT (1<<7) /* Rate measurement drifted */ ++#define MASK_RATE_B_ST (1<<6) /* Rate measurement stability change */ ++#define MASK_RATE_B_ACT (1<<5) /* Rate measurement activity change */ ++#define MASK_RATE_B_PST (1<<4) /* Rate measreument presence change */ ++#define MASK_RATE_A_DRIFT (1<<3) /* Rate measurement drifted */ ++#define MASK_RATE_A_ST (1<<2) /* Rate measurement stability change */ ++#define MASK_RATE_A_ACT (1<<1) /* Rate measurement presence change */ ++#define MASK_RATE_A_PST (1<<0) /* Rate measreument presence change */ ++ ++/* INT_FLG_CLR_SUS (Start Up Sequencer) bits */ ++#define MASK_MPT_BIT (1<<7) /* Config MTP end of process */ ++#define MASK_FMT_BIT (1<<5) /* Video format changed */ ++#define MASK_RT_PULSE_BIT (1<<4) /* End of termination resistance pulse */ ++#define MASK_SUS_END_BIT (1<<3) /* SUS last state reached */ ++#define MASK_SUS_ACT_BIT (1<<2) /* Activity of selected input changed */ ++#define MASK_SUS_CH_BIT (1<<1) /* Selected input changed */ ++#define MASK_SUS_ST_BIT (1<<0) /* SUS state changed */ ++ ++/* INT_FLG_CLR_DDC bits */ ++#define MASK_EDID_MTP (1<<7) /* EDID MTP end of process */ ++#define MASK_DDC_ERR (1<<6) /* master DDC error */ ++#define MASK_DDC_CMD_DONE (1<<5) /* master DDC cmd send correct */ ++#define MASK_READ_DONE (1<<4) /* End of down EDID read */ ++#define MASK_RX_DDC_SW (1<<3) /* Output DDC switching finished */ ++#define MASK_HDCP_DDC_SW (1<<2) /* HDCP DDC switching finished */ ++#define MASK_HDP_PULSE_END (1<<1) /* End of Hot Plug Detect pulse */ ++#define MASK_DET_5V (1<<0) /* Detection of +5V */ ++ ++/* INT_FLG_CLR_MODE bits */ ++#define MASK_HDMI_FLG (1<<7) /* HDMI mode, avmute, encrypt-on, FIFO fail */ ++#define MASK_GAMUT (1<<6) /* Gamut packet */ ++#define MASK_ISRC2 (1<<5) /* ISRC2 packet */ ++#define MASK_ISRC1 (1<<4) /* ISRC1 packet */ ++#define MASK_ACP (1<<3) /* Audio Content Protection packet */ ++#define MASK_DC_NO_GCP (1<<2) /* GCP not recieved in 5 frames */ ++#define MASK_DC_PHASE (1<<1) /* deep color mode pixel phase needs update */ ++#define MASK_DC_MODE (1<<0) /* deep color mode color depth changed */ ++ ++/* INT_FLG_CLR_INFO bits */ ++#define MASK_MPS_IF (1<<6) /* MPEG Source Product IF change */ ++#define MASK_AUD_IF (1<<5) /* Audio IF change */ ++#define MASK_SPD_IF (1<<4) /* Source Product Descriptor IF change */ ++#define MASK_AVI_IF (1<<3) /* Auxiliary Video information IF change */ ++#define MASK_VS_IF_OTHER_BK2 (1<<2) /* Vendor Specific IF (bank2) change */ ++#define MASK_VS_IF_OTHER_BK1 (1<<1) /* Vendor Specific IF (bank1) change */ ++#define MASK_VS_IF_HDMI (1<<0) /* Vendor Specific IF (with HDMI LLC reg code) change */ ++ ++/* INT_FLG_CLR_AUDIO bits */ ++#define MASK_AUDIO_FREQ_FLG (1<<5) /* Audio freq change */ ++#define MASK_AUDIO_FLG (1<<4) /* DST, OBA, HBR, ASP change */ ++#define MASK_MUTE_FLG (1<<3) /* Audio Mute */ ++#define MASK_CH_STATE (1<<2) /* Channel status */ ++#define MASK_UNMUTE_FIFO (1<<1) /* Audio Unmute */ ++#define MASK_ERROR_FIFO_PT (1<<0) /* Audio FIFO pointer error */ ++ ++/* INT_FLG_CLR_AFE bits */ ++#define MASK_AFE_WDL_UNLOCKED (1<<7) /* Wordlocker was unlocked */ ++#define MASK_AFE_GAIN_DONE (1<<6) /* Gain calibration done */ ++#define MASK_AFE_OFFSET_DONE (1<<5) /* Offset calibration done */ ++#define MASK_AFE_ACTIVITY_DET (1<<4) /* Activity detected on data */ ++#define MASK_AFE_PLL_LOCK (1<<3) /* TMDS PLL is locked */ ++#define MASK_AFE_TRMCAL_DONE (1<<2) /* Termination calibration done */ ++#define MASK_AFE_ASU_STATE (1<<1) /* ASU state is reached */ ++#define MASK_AFE_ASU_READY (1<<0) /* AFE calibration done: TMDS ready */ ++ ++/* OF_CTRL bits */ ++#define VP_OUT (1<<7) /* enable VP[35:0], HS, VS, DE, V_CLK */ ++#define VP_HIZ (1<<6) /* unused VP pins Hi-Z */ ++#define VP_BLK (1<<4) /* Insert blanking code in data */ ++#define VP_TRC (1<<3) /* Insert timing code (SAV/EAV) in data*/ ++#define VP_FORMAT_SEL_MASK 0x7 /* format selection */ ++ ++/* HDMI_SOFT_RST bits */ ++#define RESET_DC (1<<7) /* Reset deep color module */ ++#define RESET_HDCP (1<<6) /* Reset HDCP module */ ++#define RESET_KSV (1<<5) /* Reset KSV-FIFO */ ++#define RESET_SCFG (1<<4) /* Reset HDCP and repeater function */ ++#define RESET_HCFG (1<<3) /* Reset HDCP DDC part */ ++#define RESET_PA (1<<2) /* Reset polarity adjust */ ++#define RESET_EP (1<<1) /* Reset Error protection */ ++#define RESET_TMDS (1<<0) /* Reset TMDS (calib, encoding, flow) */ ++ ++/* HDMI_INFO_RST bits */ ++#define NACK_HDCP (1<<7) /* No ACK on HDCP request */ ++#define RESET_FIFO (1<<4) /* Reset Audio FIFO control */ ++#define RESET_GAMUT (1<<3) /* Clear Gamut packet */ ++#define RESET_AI (1<<2) /* Clear ACP and ISRC packets */ ++#define RESET_IF (1<<1) /* Clear all Audio infoframe packets */ ++#define RESET_AUDIO (1<<0) /* Reset Audio FIFO control */ ++ ++/* HDCP_BCAPS bits */ ++#define HDCP_HDMI (1<<7) /* HDCP suports HDMI (vs DVI only) */ ++#define HDCP_REPEATER (1<<6) /* HDCP supports repeater function */ ++#define HDCP_READY (1<<5) /* set by repeater function */ ++#define HDCP_FAST (1<<4) /* Up to 400kHz */ ++#define HDCP_11 (1<<1) /* HDCP 1.1 supported */ ++#define HDCP_FAST_REAUTH (1<<0) /* fast reauthentication suported */ ++ ++/* masks for interrupt status registers */ ++#define MASK_SUS_STATE_VALUE 0x1F ++#define LAST_STATE_REACHED 0x1B ++#define MASK_CLK_STABLE 0x04 ++#define MASK_CLK_ACTIVE 0x02 ++#define MASK_SUS_STATE_BIT 0x10 ++#define MASK_SR_FIFO_FIFO_CTRL 0x30 ++#define MASK_AUDIO_FLAG 0x10 ++ ++/* Power Control */ ++#define MASK_OF_CTRL_OUT_HIZ 0x80 ++#define MASK_AUDIO_PLL_PD 0x80 ++#define DC_PLL_PD 0x01 ++#define DC_PLL_PON 0x00 ++#define MASK_XTAL_OSC_PD 0x02 ++#define MASK_TMDS_CLK_DIS 0x08 ++#define CBIAS_PON 0x01 ++#define CBIAS_POFF 0x00 ++#define TMDS_AUTO_PON 0x00 ++#define TMDS_MAN_PON 0x01 ++#define MASK_LOW_PW_EDID 0x01 ++ ++/* Rate measurement */ ++#define RATE_REFTIM_ENABLE 0x01 ++#define CLK_MIN_RATE 0x0057e4 ++#define CLK_MAX_RATE 0x0395f8 ++#define WDL_CFG_VAL 0x82 ++#define DC_FILTER_VAL 0x31 ++ ++/* Infoframe */ ++#define VS_HDMI_IF_UPDATE 0x0200 ++#define VS_HDMI_IF_TYPE 0x0201 ++#define VS_BK1_IF_UPDATE 0x0220 ++#define VS_BK1_IF_TYPE 0x0221 ++#define VS_BK2_IF_UPDATE 0x0240 ++#define VS_BK2_IF_TYPE 0x0241 ++#define AVI_IF_UPDATE 0x0260 ++#define AVI_IF_TYPE 0x0261 ++#define AVI_IF_NB_DATA 17 ++#define SPD_IF_UPDATE 0x0280 ++#define SPD_IF_TYPE 0x0281 ++#define SPD_IF_NB_DATA 31 ++#define AUD_IF_UPDATE 0x02a0 ++#define AUD_IF_TYPE 0x02a1 ++#define AUD_IF_NB_DATA 14 ++#define MPS_IF_UPDATE 0x02c0 ++#define MPS_IF_TYPE 0x02c1 ++#define MPS_IF_NB_DATA 14 ++#define MAX_IF_DATA 40 ++#define VS_IF_NB 31 ++ ++/* Input Selection */ ++#define MASK_DIG_INPUT 0x01 ++#define MASK_DIG_INPUT_VDPR_FMT 0x85 ++#define MASK_HDMIOUTMODE 0x02 ++#define FORMAT_RESET 0x80 ++ ++/* Colorspace Conversion Registers */ ++#define MAT_OFFSET_NB 3 ++#define MAT_COEFF_NB 9 ++#define OFFSET_LOOP_NB 2 ++#define MIN_VAL_OFFSET -4096 ++#define MAX_VAL_OFFSET 4095 ++#define MIN_VAL_COEFF -16384 ++#define MAX_VAL_COEFF 16383 ++#define MASK_MAT_COEFF_LSB 0x00FF ++ ++/* Blanking code values depend on output colorspace (RGB or YUV) */ ++typedef struct ++{ ++ s16 blankingCodeGy; ++ s16 blankingCodeBu; ++ s16 blankingCodeRv; ++} blankingcodes_t; ++ ++blankingcodes_t RGBBlankingCode = {64, 64, 64}; ++blankingcodes_t YUVBlankingCode = {64, 512, 512}; ++ ++/* Video Colorspace formats */ ++typedef enum { ++ COLORSPACE_RGB, ++ COLORSPACE_YCBCR_422, ++ COLORSPACE_YCBCR_444, ++ COLORSPACE_FUTURE, ++} tda1997x_colorspace_t; ++ ++/* Video Colorimetry formats */ ++typedef enum { ++ COLORIMETRY_NONE, ++ COLORIMETRY_ITU601, ++ COLORIMETRY_ITU709, ++ COLORIMETRY_XVYCC, ++} tda1997x_colorimetry_t; ++ ++/* Video colormode formats */ ++typedef enum { ++ DEEPCOLORMODE_NOT_INDICATED = 0x00, ++ DEEPCOLORMODE_24 = 0x04, ++ DEEPCOLORMODE_30 = 0x05, ++ DEEPCOLORMODE_36 = 0x06, ++ DEEPCOLORMODE_48 = 0x07, ++} tda1997x_deepcolor_t; ++ ++/* resolution type */ ++typedef enum { ++ RESTYPE_SDTV, ++ RESTYPE_HDTV, ++ RESTYPE_PC, ++} tda1997x_restype_t; ++ ++/* Video output port format */ ++const char *vidfmt_names[] = { ++ "RGB444/YUV444", /* RGB/YUV444 16bit data bus, 8bpp */ ++ "YUV422 semi-planar", /* YUV422 16bit data base, 8bpp */ ++ "YUV422 CCIR656", /* BT656 (YUV 8bpp 2 clock per pixel) */ ++}; ++ ++static char *colorspace_names[] = { ++ "RGB", "YUV422", "YUV444", "Future" ++}; ++ ++static char *colorimetry_names[] = { ++ "", "ITU601", "ITU709", "XVYCC" ++}; ++ ++/* HDCP */ ++#define RX_SEED_TABLE_LEN 10 /* HDCP Seed */ ++typedef enum ++{ ++ HDCP_DECRYPTKEY_OFF = 0x00, ++ HDCP_DECRYPTKEY_ON = 0x02 ++} hdcp_key_t; ++typedef enum ++{ ++ DISABLE = 0x00, ++ ENABLE = 0x01 ++} enable_t; ++ ++/* MTP */ ++typedef enum { ++ MTP_START_DOWNLOAD, ++ MTP_START_READ, ++} mtp_command_t; ++ ++/* HPD modes */ ++typedef enum { ++ HPD_LOW, /* HPD low and pulse of at least 100ms */ ++ HPD_LOW_OTHER, /* HPD low and pulse of at least 100ms */ ++ HPD_HIGH, /* HIGH */ ++ HPD_HIGH_OTHER, ++ HPD_PULSE, /* HPD low pulse */ ++} hpdmode_t; ++ ++/** configure colorspace conversion matrix ++ * The color conversion matrix will convert between the colorimetry of the ++ * HDMI input to the desired output format RGB|YUV ++ */ ++typedef enum { ++ ITU709_RGBLimited, ++ RGBLimited_ITU601, ++ ITU601_RGBLimited, ++} colorconversion_t; ++ ++/* Colorspace conversion matrix coefficients and offsets ++ */ ++typedef struct ++{ ++ /* Input offsets */ ++ s16 offInt1; ++ s16 offInt2; ++ s16 offInt3; ++ /* Coeficients */ ++ s16 P11Coef; ++ s16 P12Coef; ++ s16 P13Coef; ++ s16 P21Coef; ++ s16 P22Coef; ++ s16 P23Coef; ++ s16 P31Coef; ++ s16 P32Coef; ++ s16 P33Coef; ++ /* Output offsets */ ++ s16 offOut1; ++ s16 offOut2; ++ s16 offOut3; ++} colormatrixcoefs_t; ++ ++/* Conversion matrixes */ ++colormatrixcoefs_t conversion_matrix[] = { ++ /* ITU709 -> RGBLimited */ ++ { ++ -256, -2048, -2048, /*Input Offset*/ ++ 4096, -1875, -750, ++ 4096, 6307, 0, ++ 4096, 0, 7431, ++ 256, 256, 256 /*Output Offset*/ ++ }, ++ /* RGBLimited -> ITU601 */ ++ { ++ -256, -256, -256, /*Input Offset*/ ++ 2404, 1225, 467, ++ -1754, 2095, -341, ++ -1388, -707, 2095, /*RGB limited range => ITU-601 YUV limited range */ ++ 256, 2048, 2048 /*Output Offset*/ ++ }, ++ /* YUV601 -> RGBLimited */ ++ { ++ -256, -2048, -2048, /*Input Offset*/ ++ 4096, -2860, -1378, ++ 4096, 5615, 0, ++ 4096, 0, 7097, /*ITU-601 YUV limited range => RGB limited range */ ++ 256, 256, 256 /*Output Offset*/ ++ } ++}; ++ ++/* HDCP seed table, arranged as pairs of 16bit integrers: lookup val, seed val ++ * If no table is programmed or KEY_SED in config file is null, HDCP will be ++ * disabled ++ */ ++typedef struct { ++ u16 lookUpVal; ++ u16 seedVal; ++} hdmi_cfg_seed_t; ++ ++const hdmi_cfg_seed_t rx_seed_table[RX_SEED_TABLE_LEN] = { ++ {0xF0, 0x1234}, ++ {0xF1, 0xDBE6}, ++ {0xF2, 0xDBE6}, ++ {0, 0x1234}, ++ {0, 0}, ++ {0, 0}, ++ {0, 0}, ++ {0, 0}, ++ {0, 0}, ++ {0, 0} ++}; ++ ++/** Video Input mode database ++ * TODO: can I use something like modedb instead? ++ * More recent kernels have some CEA data ++ */ ++static char *restype_names[] = { ++ "SDTV", "HDTV", "PC", ++}; ++ ++typedef enum ++{ ++ VIDEORES_1280_720p_24HZ, ++ VIDEORES_1280_720p_25HZ, ++ VIDEORES_1280_720p_30HZ, ++ VIDEORES_1920_1080p_24HZ, ++ VIDEORES_1920_1080p_25HZ, ++ VIDEORES_1920_1080p_30HZ, ++ ++ VIDEORES_720_480p_60HZ, ++ VIDEORES_1280_720p_60HZ, ++ VIDEORES_1920_1080i_60HZ, ++ VIDEORES_720_480i_60HZ, ++ VIDEORES_1920_1080p_60HZ, ++ ++ VIDEORES_720_576p_50HZ, ++ VIDEORES_1280_720p_50HZ, ++ VIDEORES_1920_1080i_50HZ, ++ VIDEORES_720_576i_50HZ, ++ VIDEORES_1920_1080p_50HZ, ++ ++ VIDEORES_640_480p_60HZ, /* VGA */ ++ VIDEORES_800_600p_60HZ, /* SVGA */ ++ VIDEORES_1024_768p_60HZ, /* XGA */ ++ VIDEORES_1280_768p_60HZ, /* WXGA */ ++ VIDEORES_1280_960p_60HZ, /* ???? */ ++ VIDEORES_1280_1024p_60HZ, /* SXGA */ ++ VIDEORES_1440_900p_60HZ, /* ???? */ ++ VIDEORES_1600_1200p_60HZ, /* UGA */ ++ VIDEORES_1680_1050p_60HZ_RB, /* WSXGA */ ++ VIDEORES_1920_1200p_60HZ_RB, /* WUXGA */ ++ ++ VIDEORES_640_480p_75HZ, /* VGA */ ++ VIDEORES_800_600p_75HZ, /* SVGA */ ++ VIDEORES_1024_768p_75HZ, /* XGA */ ++ VIDEORES_1280_768p_75HZ, /* WXGA */ ++ VIDEORES_1280_1024p_75HZ, /* SXGA */ ++ ++ VIDEORES_640_480p_85HZ, /* VGA */ ++ VIDEORES_800_600p_85HZ, /* SVGA */ ++ VIDEORES_1024_768p_85HZ, /* XGA */ ++ VIDEORES_1280_768p_85HZ, /* WXGA */ ++ VIDEORES_1280_1024p_85HZ, /* SXGA */ ++ ++ VIDEORES_720_240p_60HZ_M1, /* 720(1440, 2880)x240p 60Hz mode 1 */ ++ VIDEORES_720_240p_60HZ_M2, /* 720(1440, 2880)x240p 60Hz mode 2 */ ++ ++ VIDEORES_720_288p_50HZ_M1, /* 720(1440)x288p 50Hz mode 1 */ ++ VIDEORES_720_288p_50HZ_M2, /* 720(1440)x288p 50Hz mode 1 */ ++ VIDEORES_720_288p_50HZ_M3, /* 720(1440)x288p 50Hz mode 1 */ ++ ++ VIDEORES_1360_768p_60HZ, /* 1360x768p 60Hz (PC resolution) */ ++ VIDEORES_1400_1050p_60HZ, /* 1400x1050p 60Hz (PC resolution) */ ++ VIDEORES_1400_1050p_60HZ_RB, /* 1400x1050p 60Hz Reduced Blanking (PC) */ ++ ++ VIDEORES_1024_768p_70HZ, /* XGA */ ++ VIDEORES_640_480p_72HZ, /* VGA */ ++ VIDEORES_800_600p_72HZ, /* SVGA */ ++ ++ VIDEORES_640_350p_85HZ, /* 640x350p 85Hz (PC) */ ++ VIDEORES_640_400p_85HZ, /* 640x400p 85Hz (PC) */ ++ VIDEORES_720_400p_85HZ, /* 720x400p 85Hz (PC) */ ++ VIDEORES_UNKNOWN ++} resolutionid_t; ++ ++/* structure for video format measurements */ ++typedef struct ++{ ++ u8 videoFormat; /* 1=interlaced or 0=progressive */ ++ u8 vsPolarity; /* 1=negative 0=positive */ ++ u8 hsPolarity; /* 1=negative 0=positive */ ++ u16 horizontalTotalPeriod; /* period of 1 line (pixel clocks) */ ++ u16 horizontalVideoActiveWidth; /* period of 1 active line (pixel clocks) */ ++ u16 horizontalFrontPorchWidth; /* width of front porch */ ++ u16 horizontalBackPorchWidth; /* width of back porch */ ++ u16 horizontalSyncWidthPixClk; ++ u16 verticalTotalPeriod; /* period of a frame in line numbers */ ++ u16 verticalVideoActiveWidth; ++ u16 verticalFrontPorchWidthF1; /* vertical front porch width of field 1 */ ++ u16 verticalFrontPorchWidthF2; /* vertical front porch width of field 2*/ ++ u16 verticalSyncWidth; /* width of the VS in line numbers */ ++ u16 verticalBackPorchWidthF1; /* vertical back porch width of field 1 */ ++ u16 verticalBackPorchWidthF2; /* vertical back porch width of field 2 */ ++ u16 dataEnablePresent; /* 1=DE signal present */ ++} videoFormatDetails; ++ ++typedef struct ++{ ++ u8 resolutionID; ++ u16 width; ++ u16 height; ++ u8 horizfreq; ++ u8 interlaced; ++ u32 verticalPeriodMin; /* = MCLK(27MHz) / VFreq minus 0.7% */ ++ u32 verticalPeriodMax; /* same + 0.7% */ ++ u16 horizontalPeriodMin; /* = MCLK(27MHz) / HFreq minus 1% */ ++ u16 horizontalPeriodMax; ++ u16 hsWidthMin; /* = MCLK(27MHz) / pixclk * hWidth minux ...% */ ++ u16 hsWidthMax; ++} resolution_data_t; ++ ++typedef struct ++{ ++ u16 href_start; ++ u16 href_end; ++ u16 vref_f1_start; ++ u8 vref_f1_width; ++ u16 vref_f2_start; ++ u8 vref_f2_width; ++ u16 fieldref_f1_start; ++ u8 fieldPolarity; ++ u16 fieldref_f2_start; ++} vhref_values_t; ++ ++typedef struct ++{ ++ u8 resolutionID; ++ u16 pixCountPreset; ++ u16 pixCountNb; ++ u16 lineCountPreset; ++ u16 lineCountNb; ++ vhref_values_t vhref_values; ++} resolution_timings_t; ++ ++const resolution_timings_t resolution_timings[] = { ++ /* Low TV */ ++ {VIDEORES_1280_720p_24HZ, 1, 3300, 1, 750, ++ {261, 1541, 745, 30, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1280_720p_25HZ, 1, 3960, 1, 750, ++ {261, 1541, 745, 30, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1280_720p_30HZ, 1, 3300, 1, 750, ++ {261, 1541, 745, 30, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1920_1080p_24HZ, 1, 2750, 1, 1125, ++ {193, 2113, 1121, 45, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1920_1080p_25HZ, 1, 2640, 1, 1125, ++ {193, 2113, 1121, 45, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1920_1080p_30HZ, 1, 2200, 1, 1125, ++ {193, 2113, 1121, 45, 0, 0, 1, 0, 0} ++ }, ++ ++ /* 60 Hz TV */ ++ {VIDEORES_720_480p_60HZ, 1, 858, 1, 525, ++ {123, 843, 516, 45, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1280_720p_60HZ, 1, 1650, 1, 750, ++ {261, 1541, 745, 30, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1920_1080i_60HZ, 1, 2200, 1, 1125, ++ {193, 2113, 1123, 22, 560, 23, 1, 0, 563} ++ }, ++ {VIDEORES_720_480i_60HZ, 1, 858, 1, 525, ++ {120, 840, 521, 22, 258, 23, 1, 0, 263} ++ }, ++ {VIDEORES_1920_1080p_60HZ, 1, 2200, 1, 1125, ++ {193, 2113, 1121, 45, 0, 0, 1, 0, 0} ++ }, ++ ++ /* 50 Hz TV */ ++ {VIDEORES_720_576p_50HZ, 1, 864, 1, 625, ++ {133, 853, 620, 49, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1280_720p_50HZ, 1, 1980, 1, 750, ++ {261, 1541, 745, 30, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_1920_1080i_50HZ, 1, 2640, 1, 1125, ++ {193, 2113, 1123, 22, 560, 23, 1, 0, 563} ++ }, ++ {VIDEORES_720_576i_50HZ, 1, 864, 1, 625, ++ {133, 853, 623, 24, 310, 25, 1, 0, 313 } ++ }, ++ {VIDEORES_1920_1080p_50HZ, 1, 2640, 1, 1125, ++ {193, 2113, 1121, 45, 0, 0, 1, 0, 0} ++ }, ++ ++ /* 60 Hz PC */ ++ {VIDEORES_640_480p_60HZ, 1, 800, 1, 525, ++ {145, 785, 515, 45, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_800_600p_60HZ, 1, 1056, 1, 628, ++ {217, 1017, 627, 28, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1024_768p_60HZ, 1, 1344, 1, 806, ++ {297, 1321, 803, 38, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1280_768p_60HZ, 1, 1440, 1, 790, ++ {321, 1601, 795, 30, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1280_960p_60HZ, 1, 1800, 1, 1000, ++ {425, 1705, 999, 40, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1280_1024p_60HZ, 1, 1688, 1, 1066, ++ {361, 1641, 1065, 42, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1440_900p_60HZ, 1, 1904, 1, 934, ++ {385, 1825, 931, 34, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1600_1200p_60HZ, 1, 2160, 1, 1250, ++ {497, 2097, 1249, 50, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1680_1050p_60HZ_RB, 1, 1840, 1, 1080, ++ {113, 1793, 1077, 30, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1920_1200p_60HZ_RB, 1, 2080, 1, 1235, ++ {113, 2033, 1232, 35, 0, 0, 0, 0, 0} ++ }, ++ ++ /* 75 HZ PC */ ++ {VIDEORES_640_480p_75HZ, 1, 840, 1, 500, ++ {185, 825, 499, 20, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_800_600p_75HZ, 1, 1056, 1, 625, ++ {241, 1041, 624, 25, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1024_768p_75HZ, 1, 1312, 1, 800, ++ {273, 1297, 799, 32, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1280_768p_75HZ, 1, 1696, 1, 805, ++ {337, 1617, 802, 37, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1280_1024p_75HZ, 1, 1688, 1, 1066, ++ {393, 1673, 1065, 42, 0, 0, 0, 0, 0} ++ }, ++ ++ /* 85 HZ PC */ ++ {VIDEORES_640_480p_85HZ, 1, 832, 1, 509, ++ {137, 777, 508, 29, 0, 0, 1, 0, 0} ++ }, ++ {VIDEORES_800_600p_85HZ, 1, 1048, 1, 631, ++ {217, 1017, 630, 31, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1024_768p_85HZ, 1, 1376, 1, 808, ++ {305, 1329, 807, 40, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1280_768p_85HZ, 1, 1712, 1, 908, ++ {353, 1633, 905, 140, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1280_1024p_85HZ, 1, 1728, 1, 1072, ++ {385, 1665, 1071, 48, 0, 0, 0, 0, 0} ++ }, ++ ++ /* Other resolutions */ ++ {VIDEORES_720_240p_60HZ_M1, 1, 858, 1, 262, ++ {120, 840, 258, 22, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_720_240p_60HZ_M2, 1, 858, 1, 263, ++ {120, 840, 258, 23, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_720_288p_50HZ_M1, 1, 864, 1, 312, ++ {133, 853, 310, 24, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_720_288p_50HZ_M2, 1, 864, 1, 313, ++ {133, 853, 310, 25, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_720_288p_50HZ_M3, 1, 864, 1, 314, ++ {133, 853, 310, 26, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1360_768p_60HZ, 1, 1792, 1, 795, ++ {369, 1729, 792, 27, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1400_1050p_60HZ, 1, 1864, 1, 1089, ++ {377, 1777, 1086, 39, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1400_1050p_60HZ_RB, 1, 1560, 1, 1080, ++ {113, 1513, 1077, 30, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_1024_768p_70HZ, 1, 1328, 1, 806, ++ {281, 1305, 803, 38, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_640_480p_72HZ, 1, 832, 1, 520, ++ {169, 809, 511, 40, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_800_600p_72HZ, 1, 1040, 1, 666, ++ {185, 985, 629, 66, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_640_350p_85HZ, 1, 832, 1, 445, ++ {161, 801, 413, 95, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_640_400p_85HZ, 1, 832, 1, 445, ++ {161, 801, 444, 45, 0, 0, 0, 0, 0} ++ }, ++ {VIDEORES_720_400p_85HZ, 1, 936, 1, 446, ++ {181, 901, 445, 46, 0, 0, 0, 0, 0} ++ } ++}; ++ ++const resolution_data_t supported_res[] = ++{ ++ /* Low TV */ ++ {VIDEORES_1280_720p_24HZ, 1280,720,24,0, 1117178, 1134065, 1488, 1513, 17, 19}, ++ {VIDEORES_1280_720p_25HZ, 1280,720,25,0, 1072491, 1087614, 1428, 1451, 13, 15}, ++ {VIDEORES_1280_720p_30HZ, 1280,720,30,0, 893742, 907252, 1190, 1210, 13, 15}, ++ {VIDEORES_1920_1080p_24HZ, 1920,1080,24,0, 1117178, 1134065, 992, 1009, 14, 17}, ++ {VIDEORES_1920_1080p_25HZ, 1920,1080,25,0, 1072491, 1087614, 952, 967, 14, 17}, ++ {VIDEORES_1920_1080p_30HZ, 1920,1080,30,0, 893742, 907252, 794, 806, 14, 17}, ++ ++ /* 60 Hz TV */ ++ {VIDEORES_720_480p_60HZ, 720,480,60,0, 446870, 453626, 850, 865, 60, 63}, ++ {VIDEORES_1280_720p_60HZ, 1280,720,60,0, 446870, 453626, 594, 605, 13, 15}, ++ {VIDEORES_1920_1080i_60HZ, 1920,1080,60,1, 446870, 453626, 793, 807, 14, 17}, ++ {VIDEORES_720_480i_60HZ, 720,480,60,1, 446870, 453626, 1701, 1729, 122, 125}, ++ {VIDEORES_1920_1080p_60HZ, 1920,1080,60,0, 446870, 453626, 396, 404, 6, 9}, ++ ++ /* 50 Hz TV */ ++ {VIDEORES_720_576p_50HZ, 720,576,50,0, 536245, 543807, 856, 871, 62, 65}, ++ {VIDEORES_1280_720p_50HZ, 1280,720,50,0, 536245, 543807, 713, 726, 13, 15}, ++ {VIDEORES_1920_1080i_50HZ, 1920,1080,50,1, 536245, 543807, 952, 967, 14, 17}, ++ {VIDEORES_720_576i_50HZ, 720,576,50,1, 536245, 543807, 1714, 1741, 124, 127}, ++ {VIDEORES_1920_1080p_50HZ, 1920,1080,50,0, 536245, 543807, 475, 484, 6, 9}, ++ ++ /* 60 HZ PC */ ++ {VIDEORES_640_480p_60HZ, 640,480,60,0, 446870, 453626, 850, 865, 101, 104}, ++ {VIDEORES_800_600p_60HZ, 800,600,60,0, 444523, 450791, 708, 718, 84, 88}, ++ {VIDEORES_1024_768p_60HZ, 1024,768,60,0, 446842, 453142, 554, 562, 54, 58}, ++ {VIDEORES_1280_768p_60HZ, 1280,768,60,0, 447842, 454156, 561, 569, 41, 46}, ++ {VIDEORES_1280_960p_60HZ, 1280,960,60,0, 446872, 453172, 447, 453, 26, 30}, ++ {VIDEORES_1280_1024p_60HZ, 1280,1024,60,0, 446723, 453021, 419, 425, 26, 30}, ++ {VIDEORES_1440_900p_60HZ, 1440,900,60,0, 446723, 453021, 478, 486, 35, 40}, ++ {VIDEORES_1600_1200p_60HZ, 1600,1200,60,0, 446872, 453172, 357, 363, 30, 34}, ++ {VIDEORES_1680_1050p_60HZ_RB, 1680,1050,60,0, 447745, 454058, 415, 420, 5, 9}, ++ {VIDEORES_1920_1200p_60HZ_RB, 1920,1200,60,0, 447235, 453550, 362, 367, 4, 8}, ++ ++ /* 75 HZ PC */ ++ {VIDEORES_640_480p_75HZ, 640,480,75,0, 357498, 362538, 715, 725, 53, 57}, ++ {VIDEORES_800_600p_75HZ, 800,600,75,0, 357498, 362538, 572, 580, 42, 46}, ++ {VIDEORES_1024_768p_75HZ, 1024,768,75,0, 357359, 362398, 447, 453, 31, 35}, ++ {VIDEORES_1280_768p_75HZ, 1280,768,75,0, 357480, 362520, 444, 450, 32, 36}, ++ {VIDEORES_1280_1024p_75HZ, 1280,1024,75,0, 357378, 362417, 335, 340, 27, 31}, ++ ++ /* 85 HZ PC */ ++ {VIDEORES_640_480p_85HZ, 640,480,85,0, 315409, 319856, 620, 628, 40, 44}, ++ {VIDEORES_800_600p_85HZ, 800,600,85,0, 315213, 319657, 500, 507, 29, 33}, ++ {VIDEORES_1024_768p_85HZ, 1024,768,85,0, 315450, 319898, 390, 396, 25, 29}, ++ {VIDEORES_1280_768p_85HZ, 1280,768,85,0, 315423, 319871, 391, 396, 29, 33}, ++ {VIDEORES_1280_1024p_85HZ, 1280,1024,85,0, 315350, 319796, 294, 298, 26, 30}, ++ ++ /* Other resolutions */ ++ {VIDEORES_720_240p_60HZ_M1, 720,240,60,0, 446017, 452305, 1702, 1726, 122, 126}, ++ {VIDEORES_720_240p_60HZ_M2, 720,240,60,0, 447723, 454035, 1702, 1726, 122, 126}, ++ {VIDEORES_720_288p_50HZ_M1, 720,288,50,0, 535390, 542938, 1716, 1740, 124, 128}, ++ {VIDEORES_720_288p_50HZ_M2, 720,288,50,0, 537106, 544678, 1716, 1740, 124, 128}, ++ {VIDEORES_720_288p_50HZ_M3, 720,288,50,0, 538822, 546419, 1716, 1740, 124, 128}, ++ {VIDEORES_1360_768p_60HZ, 1360,768,60,0, 446760, 453059, 562, 570, 33, 37}, ++ {VIDEORES_1400_1050p_60HZ, 1400,1050,60,0, 447036, 453338, 411, 416, 30, 34}, ++ {VIDEORES_1400_1050p_60HZ_RB, 1400,1050,60,0, 447260, 453565, 414, 420, 7, 11}, ++ ++ {VIDEORES_1024_768p_70HZ, 1024,768,70,0, 382656, 388051, 475, 481, 47, 51}, ++ {VIDEORES_640_480p_72HZ, 640,480,72,0, 368255, 373447, 708, 718, 32, 36}, ++ {VIDEORES_800_600p_72HZ, 800,600,72,0, 371423, 376660, 558, 566, 63, 67}, ++ ++ {VIDEORES_640_350p_85HZ, 640,350,85,0, 315142, 319585, 708, 718, 53, 57}, ++ {VIDEORES_640_400p_85HZ, 640,400,85,0, 315142, 319585, 708, 718, 53, 57}, ++ {VIDEORES_720_400p_85HZ, 720,400,85,0, 315294, 319740, 707, 717, 53, 57} ++}; ++ ++/* Platform Data */ ++struct tda1997x_platform_data { ++ ++ /* Misc */ ++ char hdcp; /* enable HDCP */ ++ char external_edid; /* use external EDID */ ++ char ddc_slave; /* DDC i2c slave address */ ++ ++ /* Audio */ ++ tda1997x_audiofmt_t audout_format; /* output data format */ ++ tda1997x_audiosysclk_t audout_sysclk; /* clock config */ ++ tda1997x_audiolayout_t audout_layout; /* physical bus layout */ ++ bool audio_force_channel_assignment; /* use AUD IF info if unset */ ++ bool audio_auto_mute; /* enable hardware audio auto-mute */ ++ bool audout_invert_clk; /* data valid on rising edge of BCLK */ ++ ++ /* Video */ ++ tda1997x_videofmt_t vidout_format; /* video output data format */ ++ bool vidout_blc; /* insert blanking codes (SAV/EAV) */ ++ bool vidout_trc; /* insert timing codes */ ++ tda1997x_videoclkmode_t vidout_clkmode; /* clock mode */ ++ /* pin polarity (1=invert) */ ++ bool vidout_invert_de; ++ bool vidout_invert_hs; ++ bool vidout_invert_vs; ++ /* clock delays (0=-8, 1=-7 ... 15=+7 pixels) */ ++ char vidout_delay_hs; ++ char vidout_delay_vs; ++ char vidout_delay_de; ++ char vidout_delay_clk; ++ /* sync selections (controls how sync pins are derived) */ ++ tda1997x_sync_output_hs_t vidout_sel_hs; ++ tda1997x_sync_output_vs_t vidout_sel_vs; ++ tda1997x_sync_output_de_t vidout_sel_de; ++ /* Video port configs */ ++ u8 vidout_port_config[9]; ++ u8 vidout_port_config_no; ++ /* Max pixel rate (MP/sec) */ ++ int max_pixel_rate; ++}; ++ ++/** ++ * Maintains the information on the current state of the chip ++ */ ++struct tda1997x_data { ++ struct i2c_client *client; ++ struct i2c_client *client_cec; ++ char page; ++ struct work_struct work; ++ int irq; ++ tda1997x_state_t state; ++ tda1997x_input_t input; ++ spinlock_t lock; ++ struct tda1997x_platform_data *pdata; ++ struct mutex page_lock; ++ struct mutex cec_lock; ++ ++ /* detected info from chip */ ++ int chip; ++ int chip_version; ++ int chip_revision; ++ char eess_detected; ++ char hdmi_detected; ++ char hdcp_detected; ++ char internal_edid; ++ char port_30bit; ++ char output_2p5; ++ char tmdsb_clk; ++ char tmdsb_soc; ++ char cec_enabled; ++ char cec_slave; ++ ++ /* status info */ ++ char hdmi_status; ++ char vsi_received; ++ char mptrw_in_progress; ++ char state_c5_reached; ++ char activity_status_reg; ++ char input_detect[2]; ++ char vendor[12]; ++ char product[18]; ++ u16 key_decryption_seed; ++ ++ /* video source */ ++ tda1997x_colorspace_t colorspace; ++ tda1997x_colorimetry_t colorimetry; ++ tda1997x_restype_t resolutiontype; ++ ++ /* video source and output format */ ++ tda1997x_vidout_fmt_t video_mode; ++ ++ /* audio source */ ++ u8 channel_assignment; ++ int source_channels; ++ ++ /* audio output format */ ++ tda1997x_audout_fmt_t audio_mode; ++}; ++ ++#ifdef DEBUG ++/* kernel parameters */ ++static int debug = 0; ++module_param(debug, int, 0644); ++MODULE_PARM_DESC(debug, "Debug level"); ++ ++#define DPRINTK(x, fmt, args...) { if (debug>=x) printk(KERN_DEBUG fmt, ## args); } ++ ++/* HPD modes */ ++const char *hpd_names[] = { ++ "HPD_LOW", ++ "HPD_LOW_OTHER", ++ "HPD_HIGH", ++ "HPD_HIGH_OTHER", ++ "HPD_PULSE", ++}; ++ ++/* Audio output port layout (hardware pins) */ ++const char *audlayout_names[] = { ++ "AUDIO_LAYOUT_AUTO", ++ "AUDIO_LAYOUT_0", ++ "AUDIO_LAYOUT_1", ++}; ++ ++/* Audio format */ ++const char *audfmt_names[] = { ++ "AUDIO_FMT_I2S16", ++ "AUDIO_FMT_I2S32", ++ "AUDIO_FMT_SPDIF", ++ "AUDIO_FMT_OBA", ++ "AUDIO_FMT_I2S16_HBR_STRAIGHT", ++ "AUDIO_FMT_I2S16_HBR_DEMUX", ++ "AUDIO_FMT_I2S32_HBR_DEMUX", ++ "AUDIO_FMT_SPDIF_HBR_DEMUX", ++ "AUDIO_FMT_DST", ++}; ++#else ++#define DPRINTK(x, fmt, args...) ++#endif ++ ++static struct tda1997x_data tda1997x_data; ++ ++static int tda1997x_manual_hpd(struct tda1997x_data *tda1997x, hpdmode_t mode); ++ ++/** API for CEC ++ */ ++int tda1997x_cec_read(u8 reg) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ int val; ++ ++ mutex_lock(&tda1997x->cec_lock); ++ val = i2c_smbus_read_byte_data(tda1997x_data.client_cec, reg); ++ if (val < 0) { ++ dev_dbg(&tda1997x_data.client_cec->dev, ++ "%s:read reg error: reg=%2x\n", __func__, reg); ++ val = -1; ++ } ++ ++ mutex_unlock(&tda1997x->cec_lock); ++ return val; ++} ++EXPORT_SYMBOL(tda1997x_cec_read); ++ ++int tda1997x_cec_write(u8 reg, u8 val) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ int ret = 0; ++ ++ mutex_unlock(&tda1997x->cec_lock); ++ ret = i2c_smbus_write_byte_data(tda1997x_data.client_cec, reg, val); ++ if (ret < 0) { ++ dev_dbg(&tda1997x_data.client_cec->dev, ++ "%s:write reg error:reg=%2x,val=%2x\n", __func__, ++ reg, val); ++ ret = -1; ++ } ++ mutex_unlock(&tda1997x->cec_lock); ++ ++ return ret; ++} ++EXPORT_SYMBOL(tda1997x_cec_write); ++ ++/** API for MFD children ++ */ ++ ++/** get current state ++ */ ++tda1997x_state_t ++tda1997x_get_state(void) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ tda1997x_state_t state; ++ unsigned long flags; ++ ++ dev_dbg(&tda1997x_data.client->dev, "%s\n", __func__); ++ spin_lock_irqsave(&tda1997x->lock, flags); ++ state = tda1997x->state; ++ spin_unlock_irqrestore(&tda1997x->lock, flags); ++ ++ return state; ++} ++EXPORT_SYMBOL(tda1997x_get_state); ++ ++int ++tda1997x_get_vidout_fmt(tda1997x_vidout_fmt_t *fmt) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ unsigned long flags; ++ ++ dev_dbg(&tda1997x_data.client->dev, "%s\n", __func__); ++ spin_lock_irqsave(&tda1997x->lock, flags); ++ memcpy(fmt, &(tda1997x->video_mode), sizeof(*fmt)); ++ fmt->sensor_vidfmt = tda1997x->pdata->vidout_format; ++ fmt->sensor_clkmode = tda1997x->pdata->vidout_clkmode; ++ spin_unlock_irqrestore(&tda1997x->lock, flags); ++ ++ return 0; ++} ++EXPORT_SYMBOL(tda1997x_get_vidout_fmt); ++ ++int ++tda1997x_get_audout_fmt(tda1997x_audout_fmt_t *fmt) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ unsigned long flags; ++ ++ dev_dbg(&tda1997x_data.client->dev, "%s\n", __func__); ++ spin_lock_irqsave(&tda1997x->lock, flags); ++ memcpy(fmt, &(tda1997x->audio_mode), sizeof(*fmt)); ++ spin_unlock_irqrestore(&tda1997x->lock, flags); ++ ++ return 0; ++} ++EXPORT_SYMBOL(tda1997x_get_audout_fmt); ++ ++ ++/*********************************************************************** ++ * I2C transfer ++ ***********************************************************************/ ++ ++/** set the current page ++ * ++ * @param page number ++ * @returns 0 if success, an error code otherwise. ++ */ ++static int tda1997x_setpage(u8 page) { ++ int ret; ++ ++ if (tda1997x_data.page != page) { ++ ret = i2c_smbus_write_byte_data(tda1997x_data.client, ++ REG_CURPAGE_00H, page); ++ if (ret < 0) { ++ dev_dbg(&tda1997x_data.client->dev, ++ "%s:write reg error:reg=%2x,val=%2x\n", __func__, ++ REG_CURPAGE_00H, page); ++ return -1; ++ } ++ tda1997x_data.page = page; ++ } ++ return 0; ++} ++ ++/** Read one register from a tda1997x i2c slave device. ++ * ++ * @param reg register in the device we wish to access. ++ * high byte is page, low byte is reg ++ * @returns 0 if success, an error code otherwise. ++ */ ++static inline int io_read(u16 reg) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ int val; ++ ++ /* page 80 denotes CEC reg which needs to go out cec_client */ ++ BUG_ON(reg>>8 == 0x80); ++ ++ mutex_lock(&tda1997x->page_lock); ++ if (tda1997x_setpage(reg>>8)) { ++ val = -1; ++ goto out; ++ } ++ ++ val = i2c_smbus_read_byte_data(tda1997x_data.client, reg&0xff); ++ if (!(reg == REG_INT_FLG_CLR_TOP && val == 0x00)) { ++ DPRINTK(3, "<< 0x%04x=0x%02x\n", reg, val); ++ } ++ if (val < 0) { ++ dev_dbg(&tda1997x_data.client->dev, ++ "%s:read reg error: reg=%2x\n", __func__, reg&0xff); ++ val = -1; ++ goto out; ++ } ++ ++out: ++ mutex_unlock(&tda1997x->page_lock); ++ return val; ++} ++/* 16bit read */ ++static inline long io_read16(u16 reg) ++{ ++ u8 val; ++ long lval = 0; ++ ++ if ( (val = io_read(reg)) < 0) ++ return -1; ++ lval |= (val<<8); ++ if ( (val = io_read(reg+1)) < 0) ++ return -1; ++ lval |= val; ++ ++ return lval; ++} ++/* 24bit read */ ++static inline long io_read24(u16 reg) ++{ ++ u8 val; ++ long lval = 0; ++ ++ if ( (val = io_read(reg)) < 0) ++ return -1; ++ lval |= (val<<16); ++ if ( (val = io_read(reg+1)) < 0) ++ return -1; ++ lval |= (val<<8); ++ if ( (val = io_read(reg+2)) < 0) ++ return -1; ++ lval |= val; ++ ++ return lval; ++} ++/* n-byte read */ ++static unsigned int io_readn(u16 reg, u8 len, u8 *data) +{ + int i; -+ struct gpio_desc **gds = host->card_reset_gpios; ++ int sz = 0; ++ u8 val; ++ ++ for (i = 0; i < len; i++) { ++ if ( (val = io_read(reg + i)) < 0) ++ break; ++ data[i] = val; ++ sz++; ++ } + -+ for (i = 0; i < ARRAY_SIZE(host->card_reset_gpios); i++) { -+ if (gds[i]) { -+ dev_dbg(host->parent, "Asserting reset line %d", i); -+ gpiod_set_value(gds[i], 1); ++ return sz; ++} ++ ++/** Write one register of a tda1997x i2c slave device. ++ * ++ * @param reg register in the device we wish to access. ++ * high byte is page, low byte is reg ++ * @returns 0 if success, an error code otherwise. ++ */ ++static int io_write(u16 reg, u8 val) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ s32 ret = 0; ++ ++ /* page 80 denotes CEC reg which needs to go out cec_client */ ++ BUG_ON(reg>>8 == 0x80); ++ ++ mutex_lock(&tda1997x->page_lock); ++ if (tda1997x_setpage(reg>>8)) { ++ ret = -1; ++ goto out; ++ } ++ ++ DPRINTK(3, ">> 0x%04x=0x%02x\n", reg, val); ++ ret = i2c_smbus_write_byte_data(tda1997x_data.client, reg&0xff, val); ++ if (ret < 0) { ++ dev_dbg(&tda1997x_data.client->dev, ++ "%s:write reg error:reg=%2x,val=%2x\n", __func__, ++ reg&0xff, val); ++ ret = -1; ++ goto out; ++ } ++ ++out: ++ mutex_unlock(&tda1997x->page_lock); ++ return ret; ++} ++/* 16bit write */ ++static int io_write16(u16 reg, u16 val) ++{ ++ if (io_write(reg, (val>>8)&0xff) < 0) ++ return -1; ++ if (io_write(reg+1, val&0xff) < 0) ++ return -1; ++ return 0; ++} ++/* 24bit write */ ++static int io_write24(u16 reg, u32 val) ++{ ++ if (io_write(reg, (val>>16)&0xff) < 0) ++ return -1; ++ if (io_write(reg+1, (val>>8)&0xff) < 0) ++ return -1; ++ if (io_write(reg+2, val&0xff) < 0) ++ return -1; ++ return 0; ++} ++/* n-byte write */ ++static unsigned int io_writen(u16 reg, u8 len, u8 *data) ++{ ++ int i; ++ int sz = 0; ++ ++ for (i = 0; i < len; i++) { ++ io_write(reg + i, data[i]); ++ sz++; ++ } ++ ++ return sz; ++} ++ ++ ++/*********************************************************************** ++ * EDID ++ ***********************************************************************/ ++ ++/* Modified from the NXP exapp71a application for Ventana */ ++u8 edid_block[256] = { ++ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, ++ 0x1e, 0xe3, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, ++ 0x01, 0x17, 0x01, 0x03, 0xa2, 0x00, 0x00, 0x00, ++ 0x02, 0xee, 0x95, 0xa3, 0x54, 0x4c, 0x99, 0x26, ++ 0x0f, 0x50, 0x54, 0x20, 0x00, 0x00, 0x01, 0x01, ++ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, ++ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3a, ++ 0x80, 0x18, 0x71, 0x38, 0x2d, 0x40, 0x58, 0x2c, ++ 0x45, 0x00, 0xc4, 0x8e, 0x21, 0x00, 0x00, 0x1e, ++ 0x00, 0x00, 0x00, 0xfc, 0x00, 0x47, 0x57, 0x20, ++ 0x56, 0x65, 0x6e, 0x74, 0x61, 0x6e, 0x61, 0x0a, ++ 0x20, 0x20, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x1e, ++ 0x3c, 0x0f, 0x44, 0x09, 0x00, 0x0a, 0x20, 0x20, ++ 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfe, ++ 0x00, 0x31, 0x30, 0x38, 0x30, 0x70, 0x44, 0x43, ++ 0x78, 0x76, 0x43, 0x33, 0x44, 0x0a, 0x01, 0x89, ++ 0x02, 0x03, 0x21, 0xf0, 0x4c, 0x22, 0x20, 0x21, ++ 0x04, 0x13, 0x03, 0x12, 0x05, 0x14, 0x07, 0x16, ++ 0x01, 0x23, 0x09, 0x07, 0x07, 0x83, 0x01, 0x00, ++ 0x00, 0x67, 0x03, 0x0c, 0x00, 0x00, 0x00, 0xb8, ++ 0x2d, 0x01, 0x1d, 0x80, 0x18, 0x71, 0x38, 0x2d, ++ 0x40, 0x58, 0x2c, 0x45, 0x00, 0x80, 0x38, 0x74, ++ 0x00, 0x00, 0x3f, 0x01, 0x1d, 0x00, 0x72, 0x51, ++ 0xd0, 0x1e, 0x20, 0x6e, 0x50, 0x55, 0x00, 0x00, ++ 0xd0, 0x52, 0x00, 0x00, 0x39, 0xa0, 0x0f, 0x20, ++ 0x00, 0x31, 0x58, 0x1c, 0x20, 0x28, 0x80, 0x14, ++ 0x00, 0x20, 0x58, 0x32, 0x00, 0x00, 0x3f, 0xd7, ++ 0x09, 0x80, 0xa0, 0x20, 0xe0, 0x2d, 0x10, 0x08, ++ 0x60, 0x22, 0x01, 0x80, 0xe0, 0x21, 0x00, 0x00, ++ 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, ++}; ++ ++/* DDC config 0 (page 0x20) */ ++u8 ddc_config0[8] = { ++ /* 0x80: EDID_VERSION */ ++ 0x19, /* main=0x19 */ ++ ++ /* 0x81: EDID_ENABLE bits: ++ * 7 - unused ++ * 6 - edid_only ++ * 5:2 - unused ++ * 1 - edid_b_en ++ * 0 - edid_a_en ++ */ ++ 0x41, /* enable EDID for A only */ ++ ++ /* 0x82: EDID_BLOCK_SELECT bits: ++ * 7:6 - ddc_b_blk1_sel ++ * 5:4 - ddc_b_blk0_sel ++ * 3:2 - ddc_a_blk1_sel ++ * 1:0 - ddc_a_blk0_sel ++ */ ++ 0x44, /* ddc_b_blk1_sel=1 ddc_a_blk1_sel=1 */ ++ ++ /* 0x83: empty */ ++ 0x00, ++ ++ /* 0x84: HPD_POWER bits: ++ * 7:5 - unused ++ * 4:3 - hpd_bp ++ * 2 - hpd_edid_only ++ * 1:0 - unused ++ */ ++ 0x06, /* hpd_bp=1 hpd_edid_only=1 */ ++ ++ /* 0x85: HPD_AUTO_CTRL bits ++ * 7 - read_edid ++ * 6 - unused ++ * 5 - hpd_f3tech ++ * 4 - hpd_other ++ * 3 - hpd_unsel ++ * 2 - hpd_all_ch ++ * 1 - hpd_prv_ch ++ * 0 - hpd_new_ch ++ */ ++ 0x18, /* hpd_other=1, hdp_unsel=1 */ ++ ++ /* 0x86: HPD_DURATION */ ++ 0x00, /* hpd_duration=0 */ ++ ++ /* 0x87: RX_HPD_HEAC bits ++ * 7:2 - unused ++ * 1 - heac_b_en ++ * 0 - heac_a_en ++ */ ++ 0x00, ++}; ++ ++/* RT config (page 0x30) */ ++u8 rt_config[6] = { ++ /* 0x00: RT_AUTO_CTRL bits: ++ * 7 - unused ++ * 6 - rt_other ++ * 5 - rt_hpd_low ++ * 4 - rt_no_5v ++ * 3 - rt_unsel ++ * 2 - rt_all_ch ++ * 1 - rt_prv_ch ++ * 0 - rt_new_ch ++ */ ++ 0x78, ++ ++ /* 0x01: EQ_MAN_CTRL0 bits: ++ * 7-3 - unused ++ * 2-0 - ch0_man_gain ++ */ ++ 0x03, /* ch0_man_gain=3 */ ++ ++ /* 0x02: EQ_MAN_CTRL1 bits: ++ * 7 - unused ++ * 6-4 - ch1_man_gain ++ * 3 - unused ++ * 2-0 - ch2_man_gain ++ */ ++ 0x33, /* ch1_man_gain=3 ch2_man_gain=3 */ ++ ++ /* 0x03: OUTPUT_CFG bits ++ * 7 - eq_cal_act ++ * 6 - eq_cal_ch ++ * 5 - eq_cal_5v ++ * 4 - eq_cal_cond ++ * 3 - unused ++ * 2 - out_idle ++ * 1 - ap_idle ++ * 0 - vp_idle ++ */ ++ 0xf0, /* eq_cal_act=1 eq_cal_ch=1 eq_cal_5v=1 eq_cal_cond=1 */ ++ ++ /* 0x04: MUTE_CTRL bits ++ * 7:3 - unused ++ * 2 - mute_man ++ * 1 - mute_pol ++ * 0 - mute_ena ++ */ ++ 0x00, ++ ++ /* 0x05: SLAVE_ADDR bits ++ * 7:6 - unused ++ * 5 - i2c_cec_a1 ++ * 4 - i2c_cec_a0 ++ * 3 - unused ++ * 2 - i2c_a2 ++ * 1 - i2c_a1 ++ * 0 - i2c_a0 ++ */ ++ 0x10, /* i2c_cec_a0=1 */ ++}; ++ ++static u32 reg = 0; ++ ++/** Loads EDID data into embedded EDID memory of receiver device ++ * @edid - pointer to two block EDID (array of 256 bytes) common to both inputs ++ * ++ * A common EDID block is used for both inputs with the exception of the ++ * SPA (Source Physical Address) used for CEC. Therefore, we locate the SPA ++ * within the EDID passed and treating it as the SPA for InputA while adding ++ * 1 to it for the SPA for InputB. The EDID is written into nvram as well ++ * as the SPA offset, SPA's and adjusted checksums for both inputs. ++ */ ++static int tda1997x_load_edid_data(u8 *edid) ++{ ++ u8 chksum, chksum_spa; ++ int i, n, spa_offset = 0; ++ u16 spa; ++ ++ DPRINTK(0,"%s\n", __func__); ++ ++ /* sanity check EDID data: base block, extensions, checksums */ ++ if (!drm_edid_is_valid((struct edid *) edid)) { ++ printk(KERN_ERR "edid data is invalid\n"); ++ return -EINVAL; ++ } ++ if (edid[0x7e] != 1) { ++ printk(KERN_ERR "edid requires a single CEA extension block\n"); ++ return -EINVAL; ++ } ++ ++ /* Find SPA offset within CEA extentsion */ ++ for (i = 1; i <= edid[0x7e]; i++) { ++ u8 *ext = edid + (i * EDID_LENGTH); ++ ++ /* look for CEA v3 extension */ ++ if (ext[0] != 0x02 || ext[1] != 0x03) ++ continue; ++ ++ /* make sure we have a DBC */ ++ if (ext[2] < 5) ++ continue; ++ ++ /* iterate through DBC's until we find the Vendor block */ ++ for (n = 4; n < ext[2]; n++) { ++ char type = (ext[n] & 0xe0) >> 5; ++ char len = (ext[n] & 0x1f); ++ if (type == 3) { ++ if (ext[n+1] == 0x03 && ext[n+2] == 0x0c) { ++ spa_offset = n+4; ++ spa = ext[spa_offset] << 8 | ++ ext[spa_offset+1]; ++ } ++ } ++ n += len; + } + } ++ if (!spa_offset) { ++ printk(KERN_ERR ++ "EDID requires an HDMI Vendor Specific Data Block\n"); ++ return -EINVAL; ++ } ++ ++ /* calculate ext block checksum w/o SPA */ ++ chksum = 0; ++ for (i = 0; i < 127; i++) ++ if (i != spa_offset && i != (spa_offset + 1)) ++ chksum += edid[i+128]; ++ ++ /* write base EDID */ ++ for (i = 0; i < 128; i++) ++ io_write(REG_EDID_IN_BYTE0 + i, edid[i]); + -+ if (host->card_regulator) { -+ dev_dbg(host->parent, "Enabling external regulator"); -+ if (regulator_enable(host->card_regulator)) -+ dev_err(host->parent, "Failed to enable external regulator"); ++ /* write CEA Extension */ ++ for (i = 0; i < 128; i++) ++ io_write(REG_EDID_IN_BYTE128 + i, edid[i+128]); ++ ++ /* SPA for InputA */ ++ io_write16(REG_EDID_IN_SPA_AB_A, spa); ++ chksum_spa = (u8)((spa & 0xff00)>>8) + (u8)(spa & 0x00ff) + chksum; ++ chksum_spa = (u8)((0xff - chksum_spa) + 0x01); /* 2's complement */ ++ io_write(REG_EDID_IN_CKSUM_A, chksum_spa); ++ ++ /* SPA for InputB */ ++ spa += 1; ++ io_write16(REG_EDID_IN_SPA_AB_B, spa); ++ chksum_spa = (u8)((spa & 0xff00)>>8) + (u8)(spa & 0x00ff) + chksum; ++ chksum_spa = (u8)((0xff - chksum_spa) + 0x01); /* 2's comp */ ++ io_write(REG_EDID_IN_CKSUM_B, chksum_spa); ++ ++ /* write source physical address subaddress offset */ ++ io_write(REG_EDID_IN_SPA_SUB, spa_offset); ++ ++ return 0; ++} ++ ++/* ++ * sysfs hooks ++ */ ++static ssize_t b_show(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ int rz = 0; ++ const char *name = attr->attr.name; ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ unsigned long flags; ++ const char *sname = ""; ++ ++ spin_lock_irqsave(&tda1997x->lock, flags); ++ if (strcasecmp(name, "state") == 0) { ++ switch(tda1997x->state) { ++ case STATE_NOT_INITIALIZED: sname = "not initialized"; break; ++ case STATE_INITIALIZED: sname = "initalized"; break; ++ case STATE_LOCKED: sname = "locked"; break; ++ case STATE_UNLOCKED: sname = "unlocked"; break; ++ case STATE_CONFIGURED: sname = "configured"; break; ++ } ++ rz = sprintf(buf, "%s\n", sname); ++ } ++ else if (strcasecmp(name, "vidmode") == 0) { ++ if (tda1997x->state == STATE_LOCKED) { ++ rz = sprintf(buf, "%dx%d%c@%dHz\n", ++ tda1997x->video_mode.width, tda1997x->video_mode.height, ++ (tda1997x->video_mode.interlaced)?'i':'p', ++ tda1997x->video_mode.fps); ++ } else ++ rz = sprintf(buf, "no signal\n"); ++ } else if (strcasecmp(name, "colorspace") == 0) { ++ rz = sprintf(buf, "%s %s\n", ++ colorspace_names[tda1997x->colorspace], ++ colorimetry_names[tda1997x->colorimetry]); ++ } else if (strcasecmp(name, "audmode") == 0) { ++ if (tda1997x->state == STATE_LOCKED) { ++ rz = sprintf(buf, "%dHz\n", tda1997x->audio_mode.samplerate); ++ } else ++ rz = sprintf(buf, "no signal\n"); ++ } else if (strcasecmp(name, "vendor") == 0) { ++ rz = sprintf(buf, "%s\n", tda1997x->vendor); ++ } else if (strcasecmp(name, "product") == 0) { ++ rz = sprintf(buf, "%s\n", tda1997x->product); ++ } else if (strcasecmp(name, "info") == 0) { ++ rz = sprintf(buf, "%s%s%s\n", ++ (tda1997x->hdmi_detected)?"HDMI ":"", ++ (tda1997x->eess_detected)?"EESS ":"", ++ (tda1997x->hdcp_detected)?"HDCP ":""); ++ } else if (strcasecmp(name, "edid") == 0) { ++ for (rz = 0; rz < sizeof(edid_block); rz++) ++ buf[rz] = edid_block[rz]; ++ } else if (strcasecmp(name, "reg") == 0) { ++ rz = sprintf(buf, "%02x\n", io_read(reg) ); ++ printk(KERN_INFO "TDA1997x-core: Register 0x%04x=%s\n", reg, buf); ++ } else { ++ rz = sprintf(buf, "invalid attr\n"); + } ++ spin_unlock_irqrestore(&tda1997x->lock, flags); ++ ++ return rz; ++} + -+ if (host->card_clk) { -+ dev_dbg(host->parent, "Enabling external clock"); -+ clk_prepare_enable(host->card_clk); ++static ssize_t b_store(struct device *dev, struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ u32 val = 0; ++ const char *name = attr->attr.name; ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ int i; ++ ++ ++ if (strcasecmp(name, "edid") == 0) { ++ for (i = 0; i < count; i++) ++ edid_block[i] = buf[i]; ++ printk(KERN_INFO "TDA1997x-core: New EDID being loaded\n"); ++ /* Set HPD low */ ++ tda1997x_manual_hpd(tda1997x, HPD_LOW); ++ tda1997x_load_edid_data(edid_block); ++ /* Set HPD high (now that EDID is ready) */ ++ tda1997x_manual_hpd(tda1997x, HPD_HIGH); ++ } else if (strcasecmp(name, "reg") == 0) { ++ i = sscanf(buf, "%x %x", ®, &val); ++ if (i == 2) { ++ io_write( (u16)reg, (u8)val); ++ printk(KERN_INFO "TDA1997x-core: Register 0x%04x=0x%02x\n", reg, val); ++ } else { ++ printk(KERN_INFO "TDA1997x-core: Register 0x%04x\n", reg); ++ } ++ } else { ++ printk(KERN_ERR "invalid name '%s'\n", attr->attr.name); + } + -+ /* 2ms delay to let clocks and power settle */ -+ mmc_delay(20); ++ return count; ++} ++ ++/* ++ * Create a group of attributes so that we can create and destory them all ++ * at once. ++ */ ++static struct device_attribute attr_state = ++ __ATTR(state, 0660, b_show, b_store); ++static struct device_attribute attr_vidmode = ++ __ATTR(vidmode, 0660, b_show, NULL); ++static struct device_attribute attr_audmode = ++ __ATTR(audmode, 0660, b_show, NULL); ++static struct device_attribute attr_vendor = ++ __ATTR(vendor, 0660, b_show, NULL); ++static struct device_attribute attr_product = ++ __ATTR(product, 0660, b_show, NULL); ++static struct device_attribute attr_info = ++ __ATTR(info, 0660, b_show, NULL); ++static struct device_attribute attr_edid = ++ __ATTR(edid, 0770, b_show, b_store); ++static struct device_attribute attr_colorspace = ++ __ATTR(colorspace, 0660, b_show, NULL); ++static struct device_attribute attr_reg = ++ __ATTR(reg, 0660, b_show, b_store); ++ ++static struct attribute *tda1997x_attrs[] = { ++ &attr_state.attr, ++ &attr_vidmode.attr, ++ &attr_audmode.attr, ++ &attr_vendor.attr, ++ &attr_product.attr, ++ &attr_info.attr, ++ &attr_edid.attr, ++ &attr_colorspace.attr, ++ &attr_reg.attr, ++ NULL ++}; ++ ++static struct attribute_group attr_group = { ++ .attrs = tda1997x_attrs, ++}; ++ ++/** Loads DDC and RT configuration data into embedded memory of receiver device ++ * @ddc_config - pointer to the DDC block configuration (8 bytes) ++ * @rt_config - pointer to the RT block configuration (6 bytes) ++ */ ++static int tda1997x_load_config_data(struct tda1997x_data *tda1997x, ++ const u8 *ddc, const u8 *rt) ++{ ++ int i; ++ ++ if (!tda1997x->internal_edid) ++ return -EPERM; ++ ++ /* DDC to page 20h */ ++ for (i = 0; i < 8; i++) ++ io_write(REG_EDID_IN_VERSION + i, ddc[i]); ++ /* RT to page 30h */ ++ for (i = 0; i < 6; i++) ++ io_write(REG_RT_AUTO_CTRL + i, rt[i]); ++ ++ return 0; ++} ++ + -+ for (i = 0; i < ARRAY_SIZE(host->card_reset_gpios); i++) { -+ if (gds[i]) { -+ dev_dbg(host->parent, "Deasserting reset line %d", i); -+ gpiod_set_value(gds[i], 0); ++/*********************************************************************** ++ * Signal Control ++ ***********************************************************************/ ++ ++/** manual HPD (Hot Plug Detect) control ++ * @param hdp_mode ++ * @returns 0 on success ++ */ ++static int tda1997x_manual_hpd(struct tda1997x_data *tda1997x, hpdmode_t mode) ++{ ++ u8 hpd_auto, hpd_pwr, hpd_man; ++ ++ DPRINTK(0, "%s: %s\n", __func__, hpd_names[mode]); ++ ++ /* HPD_POWER bits: ++ * 7:4 - unused ++ * 3:2 - hpd_bp[1:0] ++ * 1 - hpd_edid_only ++ * 0 - unused ++ * ++ * HPD_AUTO_CTRL bits: ++ * 7 - read_edid ++ * 6 - unused ++ * 5 - hpd_f3tech ++ * 4 - hp_other ++ * 3 - hpd_unsel ++ * 2 - hpd_all_ch ++ * 1 - hpd_prv_ch ++ * 0 - hpd_new_ch ++ * ++ * HPD_MAN bits: ++ * 7 - ? ++ * 6-3 - unused ++ * 2:0 - man_gain ++ */ ++ hpd_auto = io_read(REG_HPD_AUTO_CTRL); ++ hpd_pwr = io_read(REG_HPD_POWER); ++ hpd_man = io_read(REG_HPD_MAN_CTRL); ++ hpd_man &= 0x87; ++ ++ switch(mode) { ++ /* HPD low and pulse of at least 100ms */ ++ case HPD_LOW: ++ hpd_man &= ~0x03; /* man_gain=0 */ ++ hpd_pwr &= ~0x0c; /* hpd_bp=0 */ ++ io_write(REG_HPD_POWER, hpd_pwr); ++ io_write(REG_HPD_MAN_CTRL, hpd_man); ++ break; ++ /* HPD high */ ++ case HPD_HIGH: ++ /* hpd_bp=1 */ ++ hpd_pwr = (hpd_pwr & ~0x0c) | 0x04; ++ io_write(REG_HPD_POWER, hpd_pwr); ++ break; ++ /* HPD low and pulse of at least 100ms */ ++ case HPD_LOW_OTHER: ++ hpd_man &= ~0x03; /* man_gain=0 */ ++ hpd_auto &= ~0x10; /* hp_other=0 */ ++ io_write(REG_HPD_AUTO_CTRL, hpd_auto); ++ io_write(REG_HPD_MAN_CTRL, hpd_man); ++ break; ++ /* HPD high */ ++ case HPD_HIGH_OTHER: ++ hpd_auto |= 0x10; /* hp_other=1 */ ++ io_write(REG_HPD_AUTO_CTRL, hpd_auto); ++ break; ++ /* HPD low pulse */ ++ case HPD_PULSE: ++ hpd_man &= ~0x03; /* man_gain=0 */ ++ /* write HPD_MAN to have HPD low pulse */ ++ io_write(REG_HPD_MAN_CTRL, hpd_man); ++ break; ++ } ++ ++ return 0; ++} ++ ++/** configure the receiver with the new colorspace ++ * @returns 0 on success ++ * colorspace conversion depends on input format and output format ++ * blanking codes depend on the output colorspace ++ */ ++static int tda1997x_configure_conversion(struct tda1997x_data *tda1997x, ++ tda1997x_colorspace_t colorspace, tda1997x_colorimetry_t colorimetry, ++ tda1997x_videofmt_t vidout_format) ++{ ++ colormatrixcoefs_t *pCoefficients = NULL; ++ blankingcodes_t *pBlankingCodes = NULL; ++ u8 data[31]; ++ ++ printk(KERN_INFO "%s: %s %s => %s\n", KBUILD_MODNAME, ++ colorspace_names[colorspace], ++ (colorspace == COLORSPACE_RGB) ? "" : ++ colorimetry_names[colorimetry], ++ vidfmt_names[vidout_format]); ++ ++ switch (vidout_format) { ++ /* RGB 4:4:4 output */ ++ case VIDEOFMT_444: ++ pBlankingCodes = &RGBBlankingCode; ++ if (colorspace != COLORSPACE_RGB) { ++ if (colorimetry == COLORIMETRY_ITU709) ++ pCoefficients = &conversion_matrix[ITU709_RGBLimited]; ++ else ++ pCoefficients = &conversion_matrix[ITU601_RGBLimited]; + } ++ break; ++ ++ /* YUV422 output */ ++ case VIDEOFMT_422_SMP: /* YUV422 semi-planar */ ++ case VIDEOFMT_422_CCIR:/* YUV422 CCIR656 */ ++ pBlankingCodes = &YUVBlankingCode; ++ if (colorspace == COLORSPACE_RGB) ++ pCoefficients = &conversion_matrix[RGBLimited_ITU601]; ++ break; + } + -+ /* 2ms delay to after reset release */ -+ mmc_delay(20); ++ if (pCoefficients) { ++ s16 *pTabCoeff = &(pCoefficients->offInt1); ++ u8 i, j; ++ ++ /* test the range of the coefs */ ++ for (i = 0; i < OFFSET_LOOP_NB; i++) { ++ for (j = 0; j < MAT_OFFSET_NB; j++) { ++ if ( (pTabCoeff[j] < MIN_VAL_OFFSET) || pTabCoeff[j] > MAX_VAL_OFFSET) ++ return -EINVAL; ++ } ++ pTabCoeff = &(pCoefficients->offOut1); ++ } ++ pTabCoeff = &(pCoefficients->P11Coef); ++ ++ for (i = 0; i < MAT_COEFF_NB; i++) { ++ if ( (pTabCoeff[i] < MIN_VAL_OFFSET) || pTabCoeff[i] > MAX_VAL_OFFSET) ++ return -EINVAL; ++ } ++ ++ /* enable matrix conversion by disabling bypass: mat_bp=0 */ ++ data[0] = io_read(REG_VDP_CTRL); ++ data[0] &= ~(1<<0); ++ /* offset input 1 value */ ++ data[1] = (u8) ((u16)(pCoefficients->offInt1) >> 8); ++ data[2] = (u8) (pCoefficients->offInt1 & MASK_MAT_COEFF_LSB); ++ /* offset input 2 value */ ++ data[3] = (u8) ((u16)(pCoefficients->offInt2) >> 8); ++ data[4] = (u8) (pCoefficients->offInt2 & MASK_MAT_COEFF_LSB); ++ /* offset input 3 value */ ++ data[5] = (u8) ((u16)(pCoefficients->offInt3) >> 8); ++ data[6] = (u8) (pCoefficients->offInt3 & MASK_MAT_COEFF_LSB); ++ /* Coefficient (1,1) value */ ++ data[7] = (u8) ((u16)(pCoefficients->P11Coef) >> 8); ++ data[8] = (u8) (pCoefficients->P11Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (1,2) value */ ++ data[9] = (u8) ((u16)(pCoefficients->P12Coef) >> 8); ++ data[10] = (u8) (pCoefficients->P12Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (1,3) value */ ++ data[11] = (u8) ((u16)(pCoefficients->P13Coef) >> 8); ++ data[12] = (u8) (pCoefficients->P13Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (2,1) value */ ++ data[13] = (u8) ((u16)(pCoefficients->P21Coef) >> 8); ++ data[14] = (u8) (pCoefficients->P21Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (2,2) value */ ++ data[15] = (u8) ((u16)(pCoefficients->P22Coef) >> 8); ++ data[16] = (u8) (pCoefficients->P22Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (2,3) value */ ++ data[17] = (u8) ((u16)(pCoefficients->P23Coef) >> 8); ++ data[18] = (u8) (pCoefficients->P23Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (3,1) value */ ++ data[19] = (u8) ((u16)(pCoefficients->P31Coef) >> 8); ++ data[20] = (u8) (pCoefficients->P31Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (3,2) value */ ++ data[21] = (u8) ((u16)(pCoefficients->P32Coef) >> 8); ++ data[22] = (u8) (pCoefficients->P32Coef & MASK_MAT_COEFF_LSB); ++ /* Coefficient (3,3) value */ ++ data[23] = (u8) ((u16)(pCoefficients->P33Coef) >> 8); ++ data[24] = (u8) (pCoefficients->P33Coef & MASK_MAT_COEFF_LSB); ++ /* Offset output 1 value */ ++ data[25] = (u8) ((u16)(pCoefficients->offOut1) >> 8); ++ data[26] = (u8) (pCoefficients->offOut1 & MASK_MAT_COEFF_LSB); ++ /* Offset output 2 value */ ++ data[27] = (u8) ((u16)(pCoefficients->offOut2) >> 8); ++ data[28] = (u8) (pCoefficients->offOut2 & MASK_MAT_COEFF_LSB); ++ /* Offset output 3 value */ ++ data[29] = (u8) ((u16)(pCoefficients->offOut3) >> 8); ++ data[30] = (u8) (pCoefficients->offOut3 & MASK_MAT_COEFF_LSB); ++ ++ io_writen(REG_VDP_CTRL, 31, data); ++ } else { ++ /* enable matrix conversion bypass (mat_b) */ ++ data[0] = io_read(REG_VDP_CTRL); ++ data[0] |= (1<<0); /* mat_bp=1 */ ++ io_write(REG_VDP_CTRL, data[0]); ++ } ++ ++ /* SetBlankingCodes */ ++ if (pBlankingCodes) { ++ io_write16(REG_BLK_GY, pBlankingCodes->blankingCodeGy); ++ io_write16(REG_BLK_BU, pBlankingCodes->blankingCodeBu); ++ io_write16(REG_BLK_RV, pBlankingCodes->blankingCodeRv); ++ } ++ ++ return 0; +} + - /* - * Apply power to the MMC stack. This is a two-stage process. - * First, we enable power to the card without the clock running. -@@ -1663,6 +1702,9 @@ - if (host->ios.power_mode == MMC_POWER_OFF) - return; - -+ /* Power up the card/module first, if needed */ -+ mmc_card_power_up(host); ++/** Configure the active input to the given resolution ++ * @param resolution ID ++ * @returns 0 on success ++ */ ++static int ++tda1997x_configure_input_resolution(resolutionid_t resolution) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ u8 reg; ++ const resolution_timings_t *timings = NULL; ++ const vhref_values_t *vh; ++ int i; + - mmc_host_clk_hold(host); - - mmc_pwrseq_power_off(host); -@@ -1688,7 +1730,7 @@ - { - mmc_power_off(host); - /* Wait at least 1 ms according to SD spec */ -- mmc_delay(1); -+ mmc_delay(3); - mmc_power_up(host, ocr); - } - -diff -Nur linux-4.1.10.orig/drivers/mmc/core/host.c linux-4.1.10/drivers/mmc/core/host.c ---- linux-4.1.10.orig/drivers/mmc/core/host.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/mmc/core/host.c 2015-10-10 16:41:42.645314847 +0200 -@@ -12,14 +12,18 @@ - * MMC host class device management - */ - -+#include <linux/kernel.h> -+#include <linux/clk.h> - #include <linux/device.h> - #include <linux/err.h> -+#include <linux/gpio/consumer.h> - #include <linux/idr.h> - #include <linux/of.h> - #include <linux/of_gpio.h> - #include <linux/pagemap.h> - #include <linux/export.h> - #include <linux/leds.h> -+#include <linux/regulator/consumer.h> - #include <linux/slab.h> - #include <linux/suspend.h> - -@@ -454,6 +458,66 @@ - - EXPORT_SYMBOL(mmc_of_parse); - -+static int mmc_of_parse_child(struct mmc_host *host) ++ DPRINTK(0,"%s\n", __func__); ++ ++ /* scan through resolution table looking for a match for timings */ ++ for (i = 0; i < ARRAY_SIZE(resolution_timings); i++) { ++ if (resolution == resolution_timings[i].resolutionID) ++ { ++ timings = &resolution_timings[i]; ++ vh = &timings->vhref_values; ++ break; ++ } ++ } ++ if (!timings) { ++ printk(KERN_INFO "%s: resolution not supported\n", KBUILD_MODNAME); ++ return -1; ++ } ++ ++ /* Configure Frame Detection Window: ++ * define the horizontal area where the VHREF modules consider a VSYNC a ++ * new frame (values typically depend on the video mode being processed ++ */ ++ /* start position of the frame detection window */ ++ io_write16(REG_FDW_S, 0x2ef & 0x3fff); ++ /* end position of the frame detection window */ ++ io_write16(REG_FDW_E, 0x141 & 0x3fff); ++ ++ /* Set Pixel And Line Counters */ ++ if (tda1997x->chip_revision == 0) ++ /* add 1 line to lineCountPreset */ ++ io_write16(REG_PXCNT_PR, (timings->pixCountPreset + 3) & 0x3fff); ++ else ++ io_write16(REG_PXCNT_PR, timings->pixCountPreset & 0x3fff); ++ io_write16(REG_PXCNT_NPIX, timings->pixCountNb & 0x3fff); ++ io_write16(REG_LCNT_PR, timings->lineCountPreset & 0x3fff); ++ io_write16(REG_LCNT_NLIN, timings->lineCountNb & 0x3fff); ++ ++ /* Configure VHRef: ++ * configure the VHRef timing generator responsible for rebuilding all ++ * horiz and vert synch and ref signals from its input allowing automatic ++ * detection algorithms and forcing predefined modes (480i & 576i) ++ * ++ * REG_VHREF_CTRL bits: ++ * bit7 - interlaced_det - interlace detect method: 1=alternate,0=framefield ++ * bit6:5 - vsync_type: 0=Auto,1=FDW,2=Even,3=Odd ++ * bit4:3 - std_det: 0=PAL,1=NTSC,2=AUTO,3=OFF ++ * bit2 - href_src - VREF source: 1=from standard, 0=manual ++ * bit1 - href_src - HREF source: 1=from standard, 0=manual ++ * bit0 - hsync_sel - HSYNC signal: 1=HS,0=VS ++ */ ++ reg = io_read(REG_VHREF_CTRL); ++ io_write(REG_VHREF_CTRL, 0x3<<3 /* std_det=off */); ++ ++ /* Set VHRef: ++ * configure the VHRef timing values. In case the VHREF generator has ++ * been configured in manual mode, this will allow to manually set all horiz ++ * and vert ref values (non-active pixel areas) of the generator ++ * and allows setting the frame reference params. These values typically ++ * depend on the video mode being processed ++ */ ++ /* horizontal reference start/end */ ++ io_write16(REG_HREF_S, vh->href_start & 0x3fff); ++ io_write16(REG_HREF_E, vh->href_end & 0x3fff); ++ /* vertical reference f1 start/end */ ++ io_write16(REG_VREF_F1_S, vh->vref_f1_start & 0x3fff); ++ io_write (REG_VREF_F1_WIDTH, vh->vref_f1_width); ++ /* vertical reference f2 start/end */ ++ io_write16(REG_VREF_F2_S, vh->vref_f2_start & 0x3fff); ++ io_write (REG_VREF_F2_WIDTH, vh->vref_f2_width); ++ /* F1/F2 FREF, field polarity */ ++ io_write16(REG_FREF_F1_S, (vh->fieldref_f1_start & 0x3fff) ++ || (vh->fieldPolarity<<8)); ++ io_write16(REG_FREF_F2_S, vh->fieldref_f2_start & 0x3fff); ++ ++ /* set the state machine */ ++ tda1997x->state = STATE_CONFIGURED; ++ ++ return 0; ++} ++ ++/** Configure Audio output formatter ++ * @param pdata with audio output configuration ++ * @param channel_assignment ++ * @returns 0 on success ++ */ ++static int ++tda1997x_configure_audio_formatter(struct tda1997x_platform_data *pdata, ++ u8 channel_assignment) +{ -+ struct device_node *np; -+ struct clk *clk; ++ u8 fifo_latency = 0x80; ++ bool sp_used_by_fifo = 0; ++ bool ws_active = 0; ++ u8 reg; ++ ++ DPRINTK(0,"%s: %s %s channel_assignment=%d enable_auto_mute=%d\n", __func__, ++ audlayout_names[pdata->audout_layout], ++ audfmt_names[pdata->audout_format], ++ channel_assignment, pdata->audio_auto_mute); ++ ++ /* AUDIO_PATH bits: ++ * 7:0 - channel assignment (CEA-861-D Table 20) ++ */ ++ io_write(REG_AUDIO_PATH, channel_assignment); ++ ++ /* AUDIO_SEL bits: ++ * 7 - aclk_inv - Polarity of clock signal on A_CLK pin (1=invert) ++ * 6 - test_tone - Audio test tone generator (1=on) ++ * 5 - i2s_spdif - Selection of audio output format (0=I2S, 1=SPDIF) ++ * 4 - i2s_32 - Size of I2S samples (0=16bit, 1=32bit) ++ * 3 - hwmute_ena - Automatic audio mute (1=enabled) ++ * 2 - hbr_demux - High Bit Rate output mode: ++ * 0:straight via AP0 ++ * 1:demuxed via AP0,AP1,AP2,AP3 ++ * 1:0 - audio_type - Selection of audio output packet mode ++ * 00: Audio samples ++ * 01: High-Bit Rate (HBR) ++ * 10: One Bit Audio (OBA) ++ * 11: Direct Stream Transfer (DST) ++ */ ++ reg = io_read(REG_AUDIO_SEL); ++ if (pdata->audio_auto_mute) ++ reg |= 1<<3; ++ else ++ reg &= ~(1<<3); ++ switch(pdata->audout_format) { ++ case AUDIO_FMT_I2S16: ++ /* 16bit I2S mode, SP flag used by FIFO */ ++ reg &= ~(1<<4); ++ reg &= ~(1<<5); ++ sp_used_by_fifo = 1; ++ ws_active = 1; ++ break; ++ case AUDIO_FMT_I2S32: ++ /* 32bit I2S mode, SP flag used by FIFO */ ++ reg |= (1<<4); ++ reg &= ~(1<<5); ++ sp_used_by_fifo = 1; ++ ws_active = 1; ++ break; ++ case AUDIO_FMT_OBA: ++ /* One Bit Audio */ ++ reg &= ~(1<<5); ++ sp_used_by_fifo = 1; ++ ws_active = 1; ++ break; ++ case AUDIO_FMT_SPDIF: /* SPDIF */ ++ /* SPDIF mode, SP flag used by FIFO */ ++ reg |= (1<<5); ++ sp_used_by_fifo = 1; ++ break; ++ case AUDIO_FMT_I2S16_HBR_DEMUX: ++ /* 16bit I2S High Bit Rate demux */ ++ reg &= ~(1<<4); ++ reg &= ~(1<<5); ++ sp_used_by_fifo = 1; ++ ws_active = 1; ++ break; ++ case AUDIO_FMT_I2S32_HBR_DEMUX: ++ /* 32bit I2S High Bit Rate demux */ ++ reg |= (1<<4); ++ reg &= ~(1<<5); ++ sp_used_by_fifo = 1; ++ ws_active = 1; ++ break; ++ case AUDIO_FMT_DST: ++ /* Direct Stream Transfer */ ++ sp_used_by_fifo = 0; ++ break; ++ case AUDIO_FMT_SPDIF_HBR_DEMUX: ++ /* SPDIF High Bit Rate demux */ ++ reg |= (1<<5); ++ sp_used_by_fifo = 0; ++ break; ++ default: ++ break; ++ } ++ /* Clock polarity */ ++ reg &= ~(1<<7); ++ if (pdata->audout_invert_clk) ++ reg |= 1<<7; ++ io_write(REG_AUDIO_SEL, reg); ++ ++ /* AUDIO_LAYOUT bits: ++ * 2 - sp_flag : ++ * 0 - sp flag ignored by FIFO-control (4 subpackets written in FIFO) ++ * 1 - sp flag used by FIFO-control (Present samples subpackets written in FIFO) ++ * 1 - layout_man: ++ * 0 - layout defined by audio packet header ++ * 1 - manual control of layout ++ * 0 - layout: value of layout in case of manual selection ++ * 0 - layout0 ++ * 1 - layout1 ++ */ ++ io_write(REG_AUDIO_LAYOUT, ++ ((sp_used_by_fifo)?(1<<2):0) | pdata->audout_layout); ++ ++ /* FIFO Latency value */ ++ io_write(REG_FIFO_LATENCY_VAL, fifo_latency); ++ ++ /* AUDIO_OUT_ENABLE bits: enable AP, ACLK and WS if needed ++ * 5 - aclk_out - 1=Audio clock port active ++ * 4 - ws_out - 1=Word selection port active ++ * 3 - ap3_out - 1=AP0 active ++ * 2 - ap2_out - 1=AP1 active ++ * 1 - ap1_out - 1=AP2 active ++ * 0 - ap0_out - 1=AP3 active ++ */ ++ if (!sp_used_by_fifo) { ++ reg = 0x0f; ++ } else { ++ /* TODO: ensure audio out DAI allows AP1,2,3? */ ++ reg = 0x01; /* AP0 always enabled */ ++ if (channel_assignment >= 0x01) ++ reg |= 2; /* >1 also need AP1 */ ++ if (channel_assignment >= 0x04) ++ reg |= 4; /* >4 also need AP2 */ ++ if (channel_assignment >= 0x0C) ++ reg |= 8; /* >12 also need AP3 */ ++ /* specific cases where AP1 is not used */ ++ if ((channel_assignment == 0x04) ++ || (channel_assignment == 0x08) ++ || (channel_assignment == 0x0c) ++ || (channel_assignment == 0x10) ++ || (channel_assignment == 0x14) ++ || (channel_assignment == 0x18) ++ || (channel_assignment == 0x1c)) ++ reg &= ~2; ++ /* specific cases where AP2 is not used */ ++ if ((channel_assignment >= 0x14) ++ && (channel_assignment <= 0x17)) ++ reg &= ~4; ++ } ++ if (ws_active) ++ reg |= 0x30; ++ io_write(REG_AUDIO_OUT_ENABLE, reg); ++ ++ /* reset test mode to normal audio freq auto selection */ ++ io_write(REG_TEST_MODE, 0x00); ++ ++ /* reset sw_ncts_en & ncts_en if i2s layout_0 */ ++ if (reg & 0x18) { ++ reg = io_read(REG_TEST_NCTS_CTRL); ++ reg &= ~0x03; ++ io_write(REG_TEST_NCTS_CTRL, reg); ++ } ++ ++ return 0; ++} ++ ++ ++/** Selects HDMI input ++ * here as well. ++ * ++ * @param input ++ * @returns 0 on success ++ */ ++int ++tda1997x_select_input(tda1997x_input_t input) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ u8 reg; ++ ++ DPRINTK(0,"%s: HDMI-%c\n", __func__, input?'B':'A'); ++ reg = io_read(REG_INPUT_SEL); ++ /* keep loop mode for TDA19973 */ ++ if (tda1997x->chip == 19973) ++ reg &= ~MASK_DIG_INPUT_VDPR_FMT; ++ else ++ reg &= ~(MASK_DIG_INPUT_VDPR_FMT | MASK_HDMIOUTMODE); ++ reg |= 0x80; /* RESET_FTM - vdp reset */ ++ reg |= input; ++ reg |= FORMAT_RESET; /* Soft reset of format measurement timing */ ++ /* update INPUT_SEL */ ++ io_write(REG_INPUT_SEL, reg); ++ ++ return 0; ++} ++EXPORT_SYMBOL(tda1997x_select_input); ++ ++ ++/** configure video output format (output pins and sync config) ++ * @param pdata with video output configuration ++ * @returns 0 on success ++ */ ++static int ++tda1997x_set_video_outputformat(struct tda1997x_platform_data *pdata) ++{ ++ u8 reg; ++ ++ DPRINTK(0,"%s: %s\n", __func__, vidfmt_names[pdata->vidout_format]); ++ ++ /* Configure pixel clock generator: ++ * - delay and polarity from platform data ++ * - clock per output format ++ * ++ * CLKOUT_CTRL bits: ++ * 7 - unused ++ * 6:4 - clkout_del - Delay of clock signal on V_CLK pin ++ * 3 - unused ++ * 2 - clkout_tog - polarity of clock signal on V_CLK pin (1 - invert) ++ * 1:0 - clkout_sel: Selection of the clock signal output on CKP pin ++ * 00: Pix_clock (and selection for Chroma/Luma in case of CCIR-656, so ++ * clock for CCIR-656 DDR) ++ * 01: Pix_clock_x2 (for 422_CCIR) ++ * 10: Pix_clock_div2 ++ * 11: Pix_clock_div4 ++ */ ++ reg = pdata->vidout_delay_clk << 4; ++ if (pdata->vidout_clkmode == CLOCK_SINGLE_EDGE) { /* single edge */ ++ switch (pdata->vidout_format) { ++ case VIDEOFMT_444: /* RGB444/YUV444 */ ++ case VIDEOFMT_422_SMP: /* YUV422 semi-planar */ ++ break; ++ case VIDEOFMT_422_CCIR:/* YUV422 CCIR656 */ ++ reg |= 0x01; /* clk_x2 */ ++ break; ++ } ++ } else { /* dual edge */ ++ switch (pdata->vidout_format) { ++ case VIDEOFMT_444: /* RGB444/YUV444 */ ++ case VIDEOFMT_422_SMP: /* YUV422 semi-planar */ ++ reg |= 0x02; /* clk_div2 */ ++ break; ++ case VIDEOFMT_422_CCIR:/* YUV422 CCIR656 */ ++ break; ++ } ++ } ++ io_write(REG_CLKOUT_CTRL, reg); ++ ++ /* Configure pre-filter: ++ * ++ * FILTERS_CTRL: ++ * 3:2 - Bu Filter control ++ * 00: Off ++ * 01: 2 Taps ++ * 10: 7 Taps ++ * 11: 2/7 Taps ++ * 1:0 - Rv Filter control ++ * 00: Off ++ * 01: 2 Taps ++ * 10: 7 Taps ++ * 11: 2/7 Taps ++ */ ++ reg = 0x00; /* filters off */ ++ /* 4:2:2 mode requires conversion */ ++ if ((pdata->vidout_format == VIDEOFMT_422_SMP) ++ || (pdata->vidout_format == VIDEOFMT_422_CCIR)) ++ reg = 0x0f; /* 27taps for Rv and Bu */ ++ io_write(REG_FILTERS_CTRL, reg); ++ ++ /* Enable Blanking code and timing ref (EAV/SAV) insertion */ ++ reg = VP_OUT | pdata->vidout_format; ++ if (pdata->vidout_blc) ++ reg |= VP_BLK; ++ if (pdata->vidout_trc) ++ reg |= VP_TRC; ++ io_write(REG_OF_CTRL, reg); ++ ++ /* Configure bypass: ++ * VDP_CTRL bits: ++ * 5 - compdel_bp - 1:bypass compdel ++ * 4 - formatter_bp - 1:bypass formatter ++ * 3 - ? ++ * 2 - ? ++ * 1 - prefilter_bp - 1:bypass prefilter ++ * 0 - mat_bp - 1:bypass matrix conversion ++ */ ++ reg = io_read(REG_VDP_CTRL); ++ /* bypass pre-filter if not needed (REG_FILTERS_CTRL == 0) */ ++ if ( (io_read(REG_FILTERS_CTRL) & 0x0f) == 0) ++ reg |= (1<<1); /* disable pre-filter */ ++ else ++ reg &= ~(1<<1); /* enable pre-filter */ ++ /* bypass formatter if not needed: ++ * (444 mode and no insertion of timing/blanking codes */ ++ if ( (pdata->vidout_format == VIDEOFMT_444) ++ && !pdata->vidout_blc ++ && !pdata->vidout_trc ++ ) { ++ reg |= (1<<4); /* disable formatter */ ++ } else { ++ /* enable formatter and compdel: needed for timing/blanking codes */ ++ reg &= ~((1<<4)|(1<<5)); ++ } ++ /* activate compdel for small sync delays */ ++ if ((pdata->vidout_delay_vs < 4) || (pdata->vidout_delay_hs < 4)) { ++ reg &= ~(1<<5); ++ } ++ io_write(REG_VDP_CTRL, reg); ++ ++ /* Configure DE output signal: ++ * - delay, polarity, and source from platform data ++ * ++ * DE_FREF_SEL bits: ++ * 7:4 - de_del - DE from HDMI delay (Latency datapath + [-8..+7] pixels) ++ * 3 - de_pxq - DE pixel qualification (only when del_sel = 00) ++ * 0: Timing codes are not signaled by DE ++ * 1: Timing codes are signaled by DE ++ * 2 - de_pol - Polarity of signal output on DE/FREF pin ++ * 0: No specific action ++ * 1: Invert signal ++ * 1:0 - de_sel - Selection of signal output on DE/FREF pin ++ * 00: DE from VHREF [HREF and not(VREF)] ++ * 01: FREF from VHREF ++ * 10: FREF from HDMI ++ */ ++ io_write(REG_DE_FREF_SEL, ++ (pdata->vidout_delay_de << 4) | ++ (pdata->vidout_invert_de << 2) | ++ (pdata->vidout_sel_de)); ++ ++ /* HS_HREF_SEL bits: ++ * 7:4 - hs_del - HS from HDMI delay (Latency datapath + [-8..+7] pixels) ++ * 3 - href_pxq - HREF pixel qualifcation: ++ * 0 - Timing codes are not signaled by HREF ++ * 1 - Timing codes are signaled by HREF ++ * 2 - hsync_pol: Polarity of signal output on HS/HREF pin ++ * 0 - No specific action ++ * 1 - Invert signal ++ * 1:0 - hsync_sel - Selection of signal output on HS/HREF pin ++ * 00: HS from VHREF (Select HS signal output from internal sync generator ++ * on HS_HREF hardware pin) ++ * 01: HREF from VHREF (Select HREF signal output from internal sync ++ * generator on HS_HREF hardware pin) ++ * 10: HREF from HDMI (Select HREF signal output from HDMI input sync ++ * processor on HS_HREF hardware pin) ++ */ ++ io_write(REG_HS_HREF_SEL, ++ (pdata->vidout_delay_hs << 4) | ++ (pdata->vidout_invert_hs << 2) | ++ (pdata->vidout_sel_hs)); ++ ++ /* VS_VREF_SEL bits: ++ * 7:4 - vs_del - VS from HDMI delay (Latency datapath + [-8..+7] pixels) ++ * 3 - unused ++ * 2 - vsync_pol: Polarity of signal output on VS/VREF pin ++ * 0 - No specific action ++ * 1 - Invert signal ++ * 1:0 - vsync_sel - Selection of signal output on VS/VREF pin ++ * 00: VS from VHREF (Select VS signal output from internal sync generator ++ * on HS_VREF hardware pin) (BSLHDMIRX_SYNCOUTPUT_VSYNC_VHREF) ++ * 01: VREF from VHREF (Select VREF signal output from internal sync ++ * generator on HS_VREF hardware pin) (BSLHDMIRX_SYNCOUTPUT_VREF_VHREF) ++ * 10: VREF from HDMI (Select HREF signal output from HDMI input sync ++ * processor on HS_VREF hardware pin) (BSLHDMIRX_SYNCOUTPUT_VSYNC_HDMI) ++ */ ++ io_write(REG_VS_VREF_SEL, ++ (pdata->vidout_delay_vs << 4) | ++ (pdata->vidout_invert_vs << 2) | ++ (pdata->vidout_sel_vs)); ++ ++ return 0; ++} ++ ++ ++/** Soft Reset of specific hdmi info ++ * @param info_rst - reset to apply to HDMI_INFO_RST ++ * @param bresetSus - reset start-up sequencer ++ * @returns 0 on success ++ */ ++static int ++tda1997x_hdmi_info_reset(u8 info_rst, bool bresetSus) ++{ ++ u8 reg; ++ ++ DPRINTK(0,"%s: 0x%02x %s\n", __func__, info_rst, bresetSus?"RESET_SUS":""); ++ ++ reg = io_read(REG_HDMI_INFO_RST); ++ io_write(REG_HDMI_INFO_RST, info_rst); ++ ++ /* if IF has been reset, clear INT_FLG_MODE as all ITs are raided by the ++ * reset IF */ ++ if (reg & RESET_IF) { ++ reg = io_read(REG_INT_FLG_CLR_MODE); ++ io_write(REG_INT_FLG_CLR_MODE, reg); ++ } ++ ++ /* Write SUS_RESET register (bit hdcp_dcc_man does not exist on TDA19972) */ ++ if (!bresetSus) { ++ reg = io_read(REG_RATE_CTRL); ++ reg |= RATE_REFTIM_ENABLE; ++ reg = io_write(REG_RATE_CTRL, reg); ++ } else { ++ reg = io_read(REG_RATE_CTRL); ++ reg &= ~RATE_REFTIM_ENABLE; ++ reg = io_write(REG_RATE_CTRL, reg); ++ } ++ ++ return 0; ++} ++ ++/* Configure HDCP: set basic configuration for HDCP module: ++ * enable/disable, key encryption, DDC address, key description seed ++ * ++ * @param decrypt_keys - Key internal decryption (on/off) ++ * @param hdcp_enable - Enable/disable HDCP function ++ * @param i2c_addr - Display data channel I2C slave address ++ * @param key_decryption_seed - Key decryption Seed ++ * @returns 0 on success ++ */ ++static int ++tda1997x_configure_hdcp(struct tda1997x_data *tda1997x, ++ hdcp_key_t decrypt_keys, ++ enable_t hdcp_enable, ++ u8 ddc_i2c_addr, ++ u16 key_decryption_seed) ++{ ++ u8 reg; ++ u8 regs[3]; ++ ++ DPRINTK(0,"%s: enable=%d ddc=0x%02x seed=0x%04x\n", ++ __func__, hdcp_enable, ddc_i2c_addr, key_decryption_seed); ++ ++ /* HDCP control */ ++ regs[0] = decrypt_keys | hdcp_enable; ++ /* keys description seed MSB */ ++ regs[1] = key_decryption_seed >> 8; ++ /* keys description seed LSB */ ++ regs[2] = key_decryption_seed & 0x00ff; ++ ++ if (tda1997x->chip_revision == 0) { ++ /* enable clock on TMDS PLL by using FRO */ ++ io_write(REG_CLK_CFG, 0x03); ++ io_write(REG_PON_CBIAS, 0x01); ++ io_write(REG_PON_PLL, 0x01); ++ io_write(REG_PON_OVR_EN, 0x01); ++ } ++ ++ /* write HDCP_CTRL regs */ ++ io_writen(REG_HDCP_CTRL, 3, regs); ++ ++ /* write i2c addr */ ++ io_write(REG_HDCP_DDC_ADDR, ddc_i2c_addr); ++ ++ if (tda1997x->chip_revision == 0) { ++ /* disable clock on TMDS PLL by using FRO */ ++ io_write(REG_CLK_CFG, 0x00); ++ io_write(REG_PON_OVR_EN, 0x00); ++ ++ /* Restore clock */ ++ io_write(REG_PON_CBIAS, 0x00); ++ io_write(REG_CGU_DEBUG_SEL, 0x08); ++ ++ /* Clear HDMI mode flag in BCAPS (for N1) */ ++ io_write(REG_CLK_CFG, 0x03); ++ io_write(REG_PON_OVR_EN, 0x01); ++ io_write(REG_PON_CBIAS, 0x01); ++ io_write(REG_PON_PLL, 0x01); ++ reg = io_read(REG_MODE_RECOVER_CFG1); ++ reg &= ~0x06; ++ reg |= 0x02; ++ io_write(REG_MODE_RECOVER_CFG1, reg); ++ io_write(REG_CLK_CFG, 0x00); ++ io_write(REG_PON_OVR_EN, 0x00); ++ reg = io_read(REG_MODE_RECOVER_CFG1); ++ reg &= ~0x06; ++ io_write(REG_MODE_RECOVER_CFG1, reg); ++ } ++ ++ /* clear HDCP interrupt status bits that may have been raised during this ++ * process ++ */ ++ io_write(REG_INT_FLG_CLR_HDCP, 0x07); ++ ++ return 0; ++} ++ ++/* Configure HDCP MTP ++ * @param cmd - command to be sent (download or read) ++ * @returns 0 on success ++ */ ++static int ++tda1997x_configure_mtp(struct tda1997x_data *tda1997x, mtp_command_t cmd) ++{ ++ u8 reg; ++ unsigned int timeout; ++ ++ switch (cmd) { ++ case MTP_START_DOWNLOAD: ++ DPRINTK(0,"%s: MTP_START_DOWNLOAD\n", __func__); ++ if (tda1997x->chip_revision == 0) { ++ /* disable termination and enable HDCP block */ ++ io_write(REG_RT_MAN_CTRL, 0x00); ++ io_write(REG_MAN_SUS_HDMI_SEL, MAN_RST_HDCP | MAN_DIS_HDCP); ++ ++ /* enable clock on TMDS PLL by using FRO */ ++ io_write(REG_CLK_CFG, 0x03); ++ io_write(REG_PON_CBIAS, 0x01); ++ io_write(REG_PON_PLL, 0x01); ++ io_write(REG_PON_OVR_EN, 0x01); ++ io_write(REG_CGU_DEBUG_SEL, 0x00); ++ ++ /* reset HDCP block */ ++ io_write(REG_MAN_SUS_HDMI_SEL, MAN_RST_HDCP | MAN_DIS_HDCP); ++ io_write(REG_MAN_HDMI_SET, 0x04); ++ io_write(REG_MAN_HDMI_SET, 0x00); ++ ++ /* remove force */ ++ io_write(REG_PON_OVR_EN, 0x00); ++ io_write(REG_CLK_CFG, 0x03); ++ ++ /* copy byte KEY_0(39) (0x4002) into private_area (0x425f) */ ++ reg = io_read(0x4002 /*REG_MTP_KEY39_LSB*/); ++ io_write(0x425f /*REG_MTP_PRIVATE_AREA*/, reg); ++ } ++ ++ /* Enable HDCP */ ++ io_write(REG_HDMI_INFO_RST, 0x00); ++ io_write(REG_HDCP_CTRL, 0x03); ++ ++ /* clear flag hdcp_dlmtp: 0x0015:4 */ ++ io_write(REG_INT_FLG_CLR_HDCP, 0x18); ++ ++ /* download key into HDCP engine */ ++ io_write(REG_HDCP_KEY_CTRL, 0x01); ++ ++ /* check flag hdcp_dlram: 0x0015:3 */ ++ timeout = jiffies + msecs_to_jiffies(100); ++ do { ++ reg = io_read(REG_INT_FLG_CLR_HDCP); ++ } while ( (jiffies < timeout) & ((reg & 0x08) != 0x08)); ++ ++ /* download MTP into SRAM: hmtp_dl_all (0x137a) */ ++ io_write(REG_HMTP_CTRL, 0x01); ++ ++ /* check flag hdcp_dlmtp: 0x0015:4 */ ++ timeout = jiffies + msecs_to_jiffies(100); ++ do { ++ reg = io_read(REG_INT_FLG_CLR_HDCP); ++ } while ( (jiffies < timeout) & ((reg & 0x10) != 0x10)); ++ ++ /* clear HDCP interrupt status bits that may have been raised */ ++ io_write(REG_INT_FLG_CLR_HDCP, 0x07); ++ break; ++ ++ case MTP_START_READ: ++ DPRINTK(0,"%s: MTP_START_READ\n", __func__); ++ /* clear flag hdcp_dlmtp */ ++ io_write(REG_INT_FLG_CLR_HDCP, 0x10); ++ ++ /* Download MTP into SRAM: hmtp_dl_all */ ++ io_write(REG_HMTP_CTRL, 0x01); ++ ++ /* check flag hdcp_dlmtp */ ++ timeout = jiffies + msecs_to_jiffies(100); ++ do { ++ reg = io_read(REG_INT_FLG_CLR_HDCP); ++ } while ( (jiffies < timeout) & ((reg & 0x10) != 0x10)); ++ break; ++ } ++ ++ return 0; ++} ++ ++ ++/** set power mode ++ */ ++static void ++tda1997x_power_mode(struct tda1997x_data *tda1997x, bool bEnable) ++{ ++ u8 reg; ++ ++ dev_dbg(&tda1997x->client->dev, "%s %s\n", __func__, bEnable?"on":"off"); ++ DPRINTK(0,"%s %s\n", __func__, bEnable?"on":"off"); ++ ++ if (bEnable) { ++ /* Power on sequence */ ++ ++#if 0 ++ /* Disable low power mode */ ++ reg = io_read(REG_EDID_POWER); ++ reg &= ~MASK_LOW_PW_EDID; ++ io_write(REG_EDID_POWER, reg); ++#endif ++ ++ /* Automatic control of TMDS */ ++ io_write(REG_PON_OVR_EN, TMDS_AUTO_PON); ++ ++ /* Enable current bias unit */ ++ io_write(REG_CFG1, CBIAS_PON); ++ ++#if 0 ++ /* Enable TMDS clock in the digital equalizer */ ++ reg = io_read(REG_SUS_RESET); ++ reg &= ~MASK_TMDS_CLK_DIS; ++ io_write(REG_SUS_RESET, reg); ++ ++ /* Enable Xtal Osc */ ++ reg = io_read(REG_XOSC_CFG); ++ reg &= ~MASK_XTAL_OSC_PD; ++ io_write(REG_XOSC_CFG, reg); ++#endif ++ ++ /* Enable deep color PLL */ ++ io_write(REG_DEEP_PLL7, DC_PLL_PON); ++ ++#if 0 ++ /* Enable audio PLL */ ++ reg = io_read(REG_CLOCKS_MODE); ++ reg &= ~MASK_AUDIO_PLL_PD; ++ io_write(REG_CLOCKS_MODE, reg); ++#endif ++ ++ /* Output buffers active */ ++ reg = io_read(REG_OF_CTRL); ++ reg &= ~MASK_OF_CTRL_OUT_HIZ; ++ io_write(REG_OF_CTRL, reg); ++ ++ } else { ++ /* Power down EDID mode sequence */ ++ ++ /* Output buffers in HiZ */ ++ reg = io_read(REG_OF_CTRL); ++ reg |= MASK_OF_CTRL_OUT_HIZ; ++ io_write(REG_OF_CTRL, reg); ++ ++#if 0 ++ /* Disable audio PLL */ ++ reg = io_read(REG_CLOCKS_MODE); ++ reg |= MASK_AUDIO_PLL_PD; ++ io_write(REG_CLOCKS_MODE, reg); ++#endif ++ ++ /* Disable deep color PLL */ ++ io_write(REG_DEEP_PLL7, DC_PLL_PD); ++ ++#if 0 ++ /* Disable Xtal Osc */ ++ reg = io_read(REG_XOSC_CFG); ++ reg |= MASK_XTAL_OSC_PD; ++ io_write(REG_XOSC_CFG, reg); ++ ++ /* Disable TMDS clock in the digital equalizer */ ++ reg = io_read(REG_SUS_RESET); ++ reg |= MASK_TMDS_CLK_DIS; ++ io_write(REG_SUS_RESET, reg); ++#endif ++ ++ /* Disable current bias unit */ ++ io_write(REG_CFG1, CBIAS_POFF); ++ ++ /* Manual control of TMDS */ ++ io_write(REG_PON_OVR_EN, TMDS_MAN_PON); ++ ++#if 0 ++ /* Enable low power mode */ ++ reg = io_read(REG_EDID_POWER); ++ reg |= MASK_LOW_PW_EDID; ++ io_write(REG_EDID_POWER, reg); ++#endif ++ } ++ ++} ++ ++ ++/* check the audio samplerate for change ++ * @returns 0 on success ++ */ ++static int ++tda1997x_get_audio_frequency(struct tda1997x_data *tda1997x) ++{ ++ u8 reg; ++ long freq = 0; ++ ++ reg = io_read(REG_AUDIO_FREQ); ++ switch(reg & MASK_AUDIO_FREQ) { ++ case 0x00: break; ++ case 0x01: freq= 32000; break; ++ case 0x02: freq= 44100; break; ++ case 0x03: freq= 48000; break; ++ case 0x04: freq= 88200; break; ++ case 0x05: freq= 96000; break; ++ case 0x06: freq=176400; break; ++ case 0x07: freq=192000; break; ++ } ++ ++ DPRINTK(0, "REG_AUDIO_FREQ=0x%02x: %ldHz\n", reg, freq); ++ tda1997x->audio_mode.samplerate = freq; ++ ++ return 0; ++} ++ ++/** detect an appropriate video mode from: ++ * video input verticalPeriod, horizontalPeriod, and hsWidth ++ * @returns resolution_data * ++ */ ++static const resolution_data_t * ++tda1997x_detect_resolution(struct tda1997x_data *tda1997x) ++{ ++ u32 verticalPeriod; ++ u16 horizontalPeriod; ++ u16 hsWidth; ++ char vPerCmp = 0, hPerCmp = 0, hsWidthCmp = 0; ++ const resolution_data_t *res; + int i; + -+ if (!host->parent || !host->parent->of_node) -+ return 0; ++ /* Read the FMT registers */ ++ verticalPeriod = io_read24(REG_V_PER) & MASK_VPER; ++ horizontalPeriod = io_read16(REG_H_PER) & MASK_HPER; ++ hsWidth = io_read16(REG_HS_WIDTH) & MASK_HSWIDTH; ++ DPRINTK(0,"verticalPeriod=%d horizontalPeriod=%d hsWidth=%d\n", ++ verticalPeriod, horizontalPeriod, hsWidth); ++ ++#if 1 // more details ++{ ++ videoFormatDetails fmt; ++ videoFormatDetails *pFMT = &fmt; ++ ++ /* read the FMT registers */ ++ pFMT->vsPolarity = io_read(REG_V_PER) & 0x80; ++ pFMT->hsPolarity = io_read(REG_H_PER) & 0x80; ++ pFMT->videoFormat = io_read(REG_HS_WIDTH) & 0x80; ++ pFMT->horizontalTotalPeriod = io_read16(REG_FMT_H_TOT)&0x3fff; ++ pFMT->horizontalVideoActiveWidth = io_read16(REG_FMT_H_ACT)&0x3fff; ++ pFMT->horizontalFrontPorchWidth = io_read16(REG_FMT_H_FRONT)&0x3fff; ++ pFMT->horizontalSyncWidthPixClk = io_read16(REG_FMT_H_SYNC)&0x3fff; ++ pFMT->horizontalBackPorchWidth = io_read16(REG_FMT_H_BACK)&0x3fff; ++ pFMT->verticalTotalPeriod = io_read16(REG_FMT_V_TOT)&0x3fff; ++ pFMT->verticalVideoActiveWidth = io_read16(REG_FMT_V_ACT)&0x3fff; ++ pFMT->verticalFrontPorchWidthF1 = io_read(REG_FMT_V_FRONT_F1); ++ pFMT->verticalFrontPorchWidthF2 = io_read(REG_FMT_V_FRONT_F2); ++ pFMT->verticalSyncWidth = io_read(REG_FMT_V_SYNC); ++ pFMT->verticalBackPorchWidthF1 = io_read(REG_FMT_V_BACK_F1); ++ pFMT->verticalBackPorchWidthF2 = io_read(REG_FMT_V_BACK_F2); ++ pFMT->dataEnablePresent = io_read(REG_FMT_DE_ACT)&0x01; ++ ++ DPRINTK(2,"vsPolarity=%d hsPolarity=%d videoFormat=%d\n" ++ "horizTotalPeriod=%d horizVideoActiveWidth=%d horizFrontPorchWidth=%d\n" ++ "horizSyncWidthPixClk=%d horizBackPorchWidth=%d\n" ++ "vertTotalPeriod=%d vertVideoActiveWidth=%d vertFrontPorchWidthF1=%d" ++ "vertFrontPorchWidthF2=%d\n" ++ "vertBackPorchWidthF1=%d vertBackPorchWidthF1=%d dataEnablePresent=%d\n", ++ pFMT->vsPolarity, pFMT->hsPolarity, pFMT->videoFormat, ++ pFMT->horizontalTotalPeriod, pFMT->horizontalVideoActiveWidth, ++ pFMT->horizontalFrontPorchWidth, pFMT->horizontalSyncWidthPixClk, ++ pFMT->horizontalBackPorchWidth, ++ pFMT->verticalTotalPeriod, pFMT->verticalVideoActiveWidth, ++ pFMT->verticalFrontPorchWidthF1, pFMT->verticalFrontPorchWidthF2, ++ pFMT->verticalBackPorchWidthF1, ++ pFMT->verticalBackPorchWidthF2, ++ pFMT->dataEnablePresent); ++} ++#endif ++ ++ /* iterate over list of supported resolutions and find best match */ ++ for (i = 0; i < ARRAY_SIZE(supported_res); i++) { ++ res = &supported_res[i]; ++ ++ vPerCmp = (char) ((verticalPeriod >= res->verticalPeriodMin) && ++ (verticalPeriod <= res->verticalPeriodMax)); ++ hPerCmp = (char) ((horizontalPeriod >= res->horizontalPeriodMin) && ++ (horizontalPeriod <= res->horizontalPeriodMax)); ++ hsWidthCmp = (char) ((hsWidth >= res->hsWidthMin) && ++ (hsWidth <= res->hsWidthMax)); ++ ++ DPRINTK(1,"\t%02d: %dx%d@%d%c: %d/%d/%d\n", i, res->width, res->height, ++ res->horizfreq, res->interlaced?'i':'p', ++ vPerCmp, hPerCmp, hsWidthCmp); ++ if (vPerCmp && hPerCmp && hsWidthCmp) { ++ int pixrate; ++ ++ /* resolutiontype used to determine Default Colorimetry */ ++ switch (res->height) { ++ case 480: ++ case 576: ++ case 240: ++ case 288: ++ tda1997x->resolutiontype = RESTYPE_SDTV; ++ break; ++ case 720: ++ case 1080: ++ tda1997x->resolutiontype = RESTYPE_HDTV; ++ break; ++ default: ++ tda1997x->resolutiontype = RESTYPE_PC; ++ } + -+ np = host->parent->of_node; ++ printk(KERN_INFO "%s: matched resolution: %dx%d%c@%d %s\n", ++ KBUILD_MODNAME, res->width, res->height, ++ res->interlaced?'i':'p', ++ res->horizfreq, ++ restype_names[tda1997x->resolutiontype]); ++ ++ /* validate input mode */ ++ pixrate = (res->width * res->height * res->horizfreq) / ++ 1000000; ++ if (res->interlaced) ++ pixrate /= 2; ++ switch(tda1997x->pdata->vidout_format) { ++ case VIDEOFMT_444: ++ case VIDEOFMT_422_SMP: ++ /* FIXME: have not figured out how to get HS output asserted on 2nd field */ ++ if (res->interlaced) { ++ printk(KERN_INFO "%s: Error %s: interlaced not supported\n", KBUILD_MODNAME, ++ vidfmt_names[tda1997x->pdata->vidout_format]); ++ return NULL; ++ } ++ break; ++ case VIDEOFMT_422_CCIR: ++ /* BT656 requires 2-clocks per pixel */ ++ pixrate *= 2; ++ break; ++ } ++ if (tda1997x->pdata->max_pixel_rate && ++ (pixrate > tda1997x->pdata->max_pixel_rate)) ++ { ++ printk(KERN_INFO "%s: Error: %dMP/s exceeds max of %dMP/s\n", KBUILD_MODNAME, ++ pixrate, ++ tda1997x->pdata->max_pixel_rate); ++ return NULL; ++ } + -+ host->card_regulator = regulator_get(host->parent, "card-external-vcc"); -+ if (IS_ERR(host->card_regulator)) { -+ if (PTR_ERR(host->card_regulator) == -EPROBE_DEFER) -+ return PTR_ERR(host->card_regulator); -+ host->card_regulator = NULL; ++ return res; ++ } + } + -+ /* Parse card power/reset/clock control */ -+ if (of_find_property(np, "card-reset-gpios", NULL)) { -+ struct gpio_desc *gpd; -+ int level = 0; ++ printk(KERN_ERR "%s: found no video resolution match for: %d/%d/%d\n", ++ KBUILD_MODNAME, verticalPeriod, horizontalPeriod, hsWidth); ++ return NULL; ++} + -+ /* -+ * If the regulator is enabled, then we can hold the -+ * card in reset with an active high resets. Otherwise, -+ * hold the resets low. ++/** read input activity registers ++ * ++ * @returns activity_sate bitmask: ++ * 7: unused ++ * 6: unused ++ * 5: unused ++ * 4: tmds_locked ++ * 3: inputD_clock_stable (unsupported) ++ * 2: inputC_clock_stable (unsupported) ++ * 1: inputB_clock_stable ++ * 0: inputA_clock_stable ++ */ ++static u8 ++tda1997x_read_activity_status_regs(void) ++{ ++ u8 reg, status = 0; ++ ++ /* Activity detection must only be notified when stable_clk_x AND active_x ++ * bits are set to 1. If only stable_clk_x bit is set to 1 but not ++ * active_x, it means that the TMDS clock is not in the defined range, ++ * so activity detection must not be notified ++ * => regStatus must be set to 0 in that case. If stable_clk_x bit is ++ * set to 0, regStatus must also be set to 0 ++ */ ++ ++ /* Read CLK_A_STATUS register */ ++ reg = io_read(REG_CLK_A_STATUS); ++ /* when stable_clk_x is set to 1, check active_x bit */ ++ if ((reg & MASK_CLK_STABLE) && !(reg & MASK_CLK_ACTIVE) ) ++ reg &= ~MASK_CLK_STABLE; ++ status |= ((reg & MASK_CLK_STABLE) >> 2); ++ ++ /* Read CLK_B_STATUS register */ ++ reg = io_read(REG_CLK_B_STATUS); ++ /* when stable_clk_x is set to 1, check active_x bit */ ++ if ((reg & MASK_CLK_STABLE) && !(reg & MASK_CLK_ACTIVE) ) ++ reg &= ~MASK_CLK_STABLE; ++ status |= ((reg & MASK_CLK_STABLE) >> 1); ++ ++ /* Read the SUS_STATUS register */ ++ reg = io_read(REG_SUS_STATUS); ++ ++ /* If state = 5 => TMDS is locked */ ++ if ( (reg & MASK_SUS_STATE_VALUE) == LAST_STATE_REACHED) ++ status |= MASK_SUS_STATE_BIT; ++ else ++ status &= ~MASK_SUS_STATE_BIT; ++ ++ return status; ++} ++ ++ ++/** parse an infoframe and do some sanity checks on it ++ * ++ * @type of inforframe ++ * @returns 0 on success ++ */ ++static unsigned int ++tda1997x_parse_infoframe(struct tda1997x_data *tda1997x, int type) ++{ ++ u8 d[MAX_IF_DATA]; ++ u8 crc; ++ int len = 0; ++ int i; ++ ++ /* determine length based on type */ ++ switch(type) { ++ case MPS_IF_TYPE: len = MPS_IF_NB_DATA; break; ++ case AUD_IF_TYPE: len = AUD_IF_NB_DATA; break; ++ case SPD_IF_TYPE: len = SPD_IF_NB_DATA; break; ++ case AVI_IF_TYPE: len = AVI_IF_NB_DATA; break; ++ case VS_HDMI_IF_TYPE: ++ case VS_BK1_IF_TYPE: ++ case VS_BK2_IF_TYPE: ++ len = VS_IF_NB; ++ break; ++ } ++ ++ /* read data */ ++ if (io_readn(type, len, d) != len) { ++ printk(KERN_ERR "infoframe type0x%02x failed read\n", type); ++ return -1; ++ } ++ ++ /* verify crc */ ++ for (i = 0, crc = 0; i < len; i++) ++ crc += d[i]; ++ if (crc) { ++ printk(KERN_ERR "infoframe type0x%02x failed CRC\n", type); ++ return -2; ++ } ++ ++ /* parse details */ ++ switch(type) { ++ case MPS_IF_TYPE: ++ /* parse infoframe to get bitrate, fieldrepeat, MPEG_Frame */ ++ DPRINTK(0,"\t\tbitrate=%d,%d,%d,%d fieldRepeat=%d MPEG_Frame=%d\n", ++ d[4], d[5], d[6], d[7], d[8] & 0x10, d[8] & 0x03); ++ break; ++ ++ /* Audio InfoFrame: see HDMI spec 8.2.2 */ ++ case AUD_IF_TYPE: ++ /* ++ * CC0..CC2 - Channel Count. See CEA-861-D table 17 ++ * CT0..CT3 - Coding Type. The CT bits shall always be 0 (use Stream Header) ++ * SS0..SS1 - Sample Size. The SS bits shall always be 0 (use Stream Header) ++ * SF0..SF2 - Sample Freq. See CEA-861-D table 18. ++ * - For L-PCM and IEC 61937 compressed audio streams the SF bits ++ * shall always be 0 (use Stream Header). ++ * - For One Bit Audio and DST streams, the SF bits shall equal ++ * the ACR fs value. ++ * - For Super Audio CD, the SF bits are typically 0, 1, 0 ++ * indicating a sample freq of 2.8224MSamples/s (64*44.1kHz) ++ * CA0..CA7 - Channel/Speaker Allocation. See CEA-861-D Section 6.6.2 ++ * - this is not valid for IEC 61937 compressed audio streams ++ * LSV0..LSV3 - Level Shif Value (for downmixing). See CEA-861-D 6.6.2 ++ * and CEA-861-D table 21 ++ * DM_INH - Downmix inibit. See CEA-861-D sec 6.6.2 and table 22 ++ * The DM_INH field is to be set only for DVD-Audio ++ * ++ * CT, SS, and SF values of 0 indicate that these items are carried in the ++ * audio stream itself. ++ */ ++ DPRINTK(0,"\t\tcodingType=%d channelCount=%d samplefrequency=%d " ++ "samplesize=%d dataByte3=%d channelAllocation=%d downmixInhibit=%d " ++ "levelShiftValue=%d\n", ++ (d[4] & 0xf0) >> 4, /* CT3, CT2, CT1, CT0 */ ++ (d[4] & 0x07), /* CC2, CC1, CC0 */ ++ (d[5] & 0x1c) >> 2, /* SF2, SF1, SF0 */ ++ (d[5] & 0x03), /* SS1, SS0 */ ++ d[6], ++ d[7], /* CA7 .. CA0 */ ++ (d[8] & 0x80) >> 7, /* DM_INH */ ++ (d[8] & 0x78) >> 3); /* LSV3, LSV2, LSV1, LSV0 */ ++ ++ /* Channel Count */ ++ tda1997x->source_channels = (d[4] & 0x07) + 1; ++ DPRINTK(0, "Audio Channels: %d\n", ++ tda1997x->source_channels); ++ ++ /* Channel Assignment */ ++ if ( (d[7] <= 0x1f) /* MAX_CHANNEL_ALLOC */ ++ && (d[7] != tda1997x->channel_assignment) ++ && !tda1997x->pdata->audio_force_channel_assignment) ++ { ++ /* use the channel assignment from the audio infoframe */ ++ DPRINTK(0, "channel assignment changed: %d\n", d[7]); ++ tda1997x->channel_assignment = d[7]; ++ ++ /* configure audio output */ ++ tda1997x_configure_audio_formatter(tda1997x->pdata, ++ tda1997x->channel_assignment); ++ ++ /* reset the audio FIFO */ ++ tda1997x_hdmi_info_reset(RESET_AUDIO, 0); ++ //tda1997x_hdmi_info_reset(0x00, 0); ++ } ++ break; ++ ++ /* Source Product Descriptor information (SPD) */ ++ case SPD_IF_TYPE: ++ for (i = 0; i < 8; i++) ++ tda1997x->vendor[i] = d[4 + i]; ++ for (i = 0; i < 16; i++) ++ tda1997x->product[i] = d[4 + 8 + i]; ++ printk(KERN_INFO "%s: Source Product Descriptor: %s %s\n", KBUILD_MODNAME, ++ tda1997x->vendor, tda1997x->product); ++ break; ++ ++ ++ /* Auxiliary Video information (AVI) InfoFrame: see HDMI spec 8.2.1 */ ++ case AVI_IF_TYPE: { ++ u8 pixel_repetitionfactor; ++ u8 reg; ++ ++ if (d[0] != 0x82) { ++ printk(KERN_ERR "INFOFRAME AVI: wrong packet type! (0x%02x)\n", d[0]); ++ } ++ DPRINTK(0,"\t\tcolorIndicator=%d activeInfoPresent=%d " ++ "barInfomationDataValid=%d scanInformation=%d colorimetry=%d " ++ "pictureAspectRatio=%d activeFormatAspectRation=%d " ++ "nonUinformPictureScaling=%d videoFormatIdentificationCode=%d " ++ "pixelRepetitionFactor=%d\n", ++ (d[4] & 0x60) >> 5, /* colorspace: Y1, Y0 */ ++ (d[4] & 0x10) >> 4, /* activeInfoPresent: A0 */ ++ (d[4] & 0x0c) >> 2, /* barInformationValid: B1, B0 */ ++ (d[4] & 0x03), /* scanInformation: S1, S0 */ ++ (d[5] & 0xc0) >> 6, /* coloriemtry: C1, C0 */ ++ (d[5] & 0x30) >> 4, /* pictureAspectRatio: M1, M0 */ ++ (d[5] & 0x0f), /* activeFormatAspectRatio: R3, R2, R1, R0 */ ++ (d[6] & 0x03), /* nonUniformPictureScaling: SC1, SC0 */ ++ (d[7] & 0x7f), /* videoFormatID: VIC6, VIC5, VIC4 */ ++ (d[8] & 0x0f) /* pixelRepetitionFactor: PR3, PR2, PR1, PR0 */ ++ ); ++ tda1997x->colorspace = (d[4] & 0x60) >> 5; /* Y1, Y0 */ ++ tda1997x->colorimetry = (d[5] & 0xc0) >> 6; /* C1, C0 */ ++ pixel_repetitionfactor = d[8] & 0x0f; /* PR3, PR2, PR1, PR0 */ ++ /* If colorimetry not specified, conversion depends on resolutiontype: ++ * - SDTV: ITU601 for SD (480/576/240/288 line resolution) ++ * - HDTV: ITU709 for HD (720/1080 line resolution) ++ * - PC: sRGB ++ * see HDMI specification section 6.7 ++ */ ++ if ( (tda1997x->colorspace == COLORSPACE_YCBCR_422 || ++ tda1997x->colorspace == COLORSPACE_YCBCR_444) && ++ (tda1997x->colorimetry == COLORIMETRY_XVYCC || ++ tda1997x->colorimetry == COLORIMETRY_NONE) ) ++ { ++ ++ if (tda1997x->resolutiontype == RESTYPE_HDTV) ++ tda1997x->colorimetry = COLORIMETRY_ITU709; ++ else if (tda1997x->resolutiontype == RESTYPE_SDTV) ++ tda1997x->colorimetry = COLORIMETRY_ITU601; ++ else ++ tda1997x->colorimetry = COLORIMETRY_NONE; ++ dev_info(&tda1997x->client->dev, ++ "invalid/undefined colorimetry defaulted to %s (%s)\n", ++ colorimetry_names[tda1997x->colorimetry], ++ restype_names[tda1997x->resolutiontype]); ++ } ++ ++ /* configure upsampler per sample format */ ++ /* ConfigureUpDownSampler: 0=bypass 1=repeatchroma 2=interpolate */ ++ reg = io_read(REG_PIX_REPEAT); ++ reg = (reg & ~0x30 /* MASK_UP_SEL */); ++ if (tda1997x->colorspace == COLORSPACE_YCBCR_422) ++ reg |= (1 << 4); /* repeatchroma */ ++ io_write(REG_PIX_REPEAT, reg); ++ ++ /* ConfigurePixelRepeater - repeat n-times each pixel */ ++ reg = io_read(REG_PIX_REPEAT); ++ reg = (reg & ~0x0f /*MASK_PIX_REP*/) | pixel_repetitionfactor; ++ io_write(REG_PIX_REPEAT, reg); ++ ++ /* configure the receiver with the new colorspace */ ++ tda1997x_configure_conversion(tda1997x, ++ tda1997x->colorspace, ++ tda1997x->colorimetry, ++ tda1997x->pdata->vidout_format); ++ ++ } break; ++ ++ case VS_HDMI_IF_TYPE: ++ case VS_BK1_IF_TYPE: ++ case VS_BK2_IF_TYPE: ++ /* read update flag and store at the end */ ++ d[VS_IF_NB] = io_read(type); ++ if (type == VS_HDMI_IF_TYPE && d[VS_IF_NB] > 3) /* HDMI_INFO_EXCEED */ ++ { ++ DPRINTK(0,"HDMI_INFO_EXCEED\n"); ++ return -3; ++ } ++ DPRINTK(0, "\t\tieee_id[0]=%d ieee_id[1]=%d ieee_id[2]=%d\n",d[0],d[1],d[2]); ++ break; ++ } ++ ++ return 0; ++} ++ ++ ++/* tda1997x_work - deferred work procedure for handling interrupt ++ */ ++static void tda1997x_work(struct work_struct *work) ++{ ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ u8 reg, interrupt_top_flags, source; ++ ++ do { ++ /* read interrupt flags */ ++ interrupt_top_flags = io_read(REG_INT_FLG_CLR_TOP); ++ if (interrupt_top_flags == 0) ++ break; ++ DPRINTK(0,"interrupt:0x%02x\n", interrupt_top_flags); ++ ++ /* SUS interrupt source (Input activity events) */ ++ if (interrupt_top_flags & INTERRUPT_SUS) { ++ source = io_read(REG_INT_FLG_CLR_SUS); ++ io_write(REG_INT_FLG_CLR_SUS, source); ++ DPRINTK(0,"SUS: 0x%02x\n", source); ++ ++ if (source & MASK_MPT_BIT) { ++ DPRINTK(0,"\tConfig MTP end of process\n"); ++ ++ /* reset MTP in use flag if set */ ++ if (tda1997x->mptrw_in_progress) ++ tda1997x->mptrw_in_progress = 0; ++ } ++ ++ if (source & MASK_SUS_END_BIT) { ++ /* reset audio FIFO */ ++ reg = io_read(REG_HDMI_INFO_RST); ++ reg |= MASK_SR_FIFO_FIFO_CTRL; ++ io_write(REG_HDMI_INFO_RST, reg); ++ reg &= ~MASK_SR_FIFO_FIFO_CTRL; ++ io_write(REG_HDMI_INFO_RST, reg); ++ ++ DPRINTK(0,"\tRESET AUDIO SUS_END\n"); ++ ++ /* reset HDMI flags memory and vsi_received flag */ ++ tda1997x->hdmi_status = 0; ++ tda1997x->vsi_received = 0; ++ } ++ ++ /* filter FMT interrupt based on SUS state */ ++ reg = io_read(REG_SUS_STATUS); ++ if ( ((reg & MASK_SUS_STATE_VALUE) != LAST_STATE_REACHED) ++ || (source & MASK_MPT_BIT)) ++ { ++ DPRINTK(0,"sus_state_value=0x%02x filter video fmt changed\n", ++ reg & MASK_SUS_STATE_VALUE); ++ source &= ~MASK_FMT_BIT; ++ } ++ ++ if (source & (MASK_FMT_BIT | MASK_SUS_END_BIT)) { ++ const resolution_data_t *res; ++ DPRINTK(0, "\tHDMI LOCKED\n"); ++ ++ reg = io_read(REG_SUS_STATUS); ++ if ((reg & MASK_SUS_STATE_VALUE) != LAST_STATE_REACHED) { ++ printk(KERN_ERR "%s: BAD SUS STATUS\n", KBUILD_MODNAME); ++ continue; ++ } ++ ++ /* There is a new activity, the status for HDCP repeater state */ ++ tda1997x->state_c5_reached = 0; ++ ++ /* Detect the new resolution */ ++ res = tda1997x_detect_resolution(tda1997x); ++ if (res) { ++ tda1997x->video_mode.width = res->width; ++ tda1997x->video_mode.height = res->height; ++ tda1997x->video_mode.fps = res->horizfreq; ++ tda1997x->video_mode.interlaced = res->interlaced; ++ tda1997x->video_mode.signal = 1; ++ ++ /* configure the active input to the given resolution */ ++ tda1997x_configure_input_resolution(res->resolutionID); ++ ++ } else { ++ tda1997x->video_mode.width = 0; ++ tda1997x->video_mode.height = 0; ++ tda1997x->video_mode.fps = 0; ++ tda1997x->video_mode.interlaced = 0; ++ tda1997x->video_mode.signal = 1; ++ } ++ ++ /* on 'input locked' event, RGB colorspace is forced (the AVI infoframe ++ * is not received yet at this moment) ++ * if AVI infoframe is received later, the colorspace will be ++ * reconfigured in the AVI infoframe handler ++ */ ++ tda1997x->colorspace = COLORSPACE_RGB; ++ tda1997x->colorimetry = COLORIMETRY_NONE; ++ /* bypass colorspace conversion */ ++ io_write(REG_VDP_CTRL, io_read(REG_VDP_CTRL) | (1<<0)); ++ /* SetBlankingCodes */ ++ io_write16(REG_BLK_GY, RGBBlankingCode.blankingCodeGy); ++ io_write16(REG_BLK_BU, RGBBlankingCode.blankingCodeBu); ++ io_write16(REG_BLK_RV, RGBBlankingCode.blankingCodeRv); ++ ++ /* set the state machine */ ++ tda1997x->state = STATE_LOCKED; ++ } ++ ++ if (source & MASK_RT_PULSE_BIT) { ++ DPRINTK(0,"\tEnd of termination resistance pulse\n"); ++ } ++ if (source & MASK_SUS_ACT_BIT) { ++ DPRINTK(0,"\tActivity of selected input changed\n"); ++ } ++ if (source & MASK_SUS_CH_BIT) { ++ DPRINTK(0,"\tSelected input changed\n"); ++ } ++ if (source & MASK_SUS_ST_BIT) { ++ DPRINTK(0,"\tSUS state changed\n"); ++ } ++ } ++ ++ /* DDC interrupt source (Display Data Channel) */ ++ else if (interrupt_top_flags & INTERRUPT_DDC ) { ++ source = io_read(REG_INT_FLG_CLR_DDC ); ++ io_write(REG_INT_FLG_CLR_DDC, source); ++ DPRINTK(0,"DDC: 0x%02x\n", source); ++ ++ if (source & MASK_EDID_MTP) { ++ DPRINTK(0,"\tEDID MTP end of process\n"); ++ /* reset MTP in use flag if set */ ++ if (tda1997x->mptrw_in_progress) ++ tda1997x->mptrw_in_progress = 0; ++ } ++ ++ /* we don't care about these */ ++ if (source & MASK_DDC_ERR) { ++ DPRINTK(0,"\tmaster DDC error\n"); ++ } ++ if (source & MASK_DDC_CMD_DONE) { ++ DPRINTK(0,"\tmaster DDC cmd send correct\n"); ++ } ++ if (source & MASK_READ_DONE) { ++ DPRINTK(0,"\tEnd of Down EDID read\n"); ++ } ++ if (source & MASK_RX_DDC_SW) { ++ DPRINTK(0,"\tOutput DDC switching finished\n"); ++ } ++ if (source & MASK_HDCP_DDC_SW) { ++ DPRINTK(0,"\tHDCP DDC switching finished\n"); ++ } ++ if (source & MASK_HDP_PULSE_END) { ++ DPRINTK(0,"\tEnd of Hot Plug Detect pulse\n"); ++ } ++ if (source & MASK_DET_5V) { ++ DPRINTK(0,"\tDetected +5V\n"); ++ } ++ } ++ ++ /* RATE interrupt source (Digital Input A/B activity: rate/presence/drift) */ ++ else if (interrupt_top_flags & INTERRUPT_RATE) { ++ u8 irq_status, last_irq_status; ++ ++ source = io_read(REG_INT_FLG_CLR_RATE); ++ io_write(REG_INT_FLG_CLR_RATE, source); ++ DPRINTK(0,"RATE: 0x%02x\n", source); ++ ++ /* read status regs */ ++ last_irq_status = irq_status = tda1997x_read_activity_status_regs(); ++ ++ /* read clock status reg until INT_FLG_CLR_RATE is still 0 ++ * after the read to make sure its the last one ++ */ ++ reg = source; ++ while (reg != 0) { ++ irq_status = tda1997x_read_activity_status_regs(); ++ reg = io_read(REG_INT_FLG_CLR_RATE); ++ io_write(REG_INT_FLG_CLR_RATE, reg); ++ source |= reg; ++ } ++ ++ /* we don't use these indicators */ ++#if 0 ++ if (source & MASK_RATE_B_DRIFT) { ++ DPRINTK(0, "\tRate measrement of input B drifted\n"); ++ } ++ if (source & MASK_RATE_B_ACT) { ++ DPRINTK(0, "\tRate measurement of input B activity change\n"); ++ } ++ if (source & MASK_RATE_B_PST) { ++ DPRINTK(0, "\tRate measurement of input B presence change\n"); ++ } ++ if (source & MASK_RATE_A_DRIFT) { ++ DPRINTK(0, "\tRate measrement of input A drifted\n"); ++ } ++ if (source & MASK_RATE_A_ACT) { ++ DPRINTK(0, "\tRate measurement of input A activity change\n"); ++ } ++ if (source & MASK_RATE_A_PST) { ++ DPRINTK(0, "\tRate measurement of input A presence change\n"); ++ } ++#endif ++ ++ /* we only pay attention to stability change events */ ++ if (source & (MASK_RATE_A_ST | MASK_RATE_B_ST)) { ++ int input = (source & MASK_RATE_A_ST)?0:1; ++ u8 mask = 1<<input; ++ ++ DPRINTK(0, "\tHDMI-%c: Rate measurement stability change\n", input+'A'); ++ DPRINTK(0, "\tirq_status=0x%02x/0x%02x/0x%02x\n", ++ irq_status, last_irq_status, tda1997x->activity_status_reg); ++ ++ /* state change */ ++ if ((irq_status & mask) != (tda1997x->activity_status_reg & mask)) { ++ ++ /* activity lost */ ++ if ( (irq_status & mask) == 0) { ++ printk(KERN_INFO "%s: HDMI-%c: Digital Activity Lost\n", ++ KBUILD_MODNAME, input+'A'); ++ tda1997x->state = STATE_UNLOCKED; ++ tda1997x->input_detect[input] = 0; ++ tda1997x->hdmi_status = 0; ++ tda1997x->hdmi_detected = 0; ++ tda1997x->hdcp_detected = 0; ++ tda1997x->eess_detected = 0; ++ ++ /* ConfigureUpDownSampler: 0=bypass 1=repeatchroma 2=interpolate */ ++ reg = io_read(REG_PIX_REPEAT); ++ reg = (reg & ~0x30 /*MASK_UP_SEL*/) | (0 << 4); /* bypass */ ++ io_write(REG_PIX_REPEAT, reg); ++ ++ /* ConfigurePixelRepeater - repeat n-times each pixel */ ++ reg = io_read(REG_PIX_REPEAT); ++ reg = (reg & ~0x0f /*MASK_PIX_REP*/) | 0; /* 0-times: disable */ ++ io_write(REG_PIX_REPEAT, reg); ++ ++ if (tda1997x->chip_revision == 0) { ++ /* Clear HDMI mode flag in BCAPS (for N1) */ ++ io_write(REG_CLK_CFG, 0x03); ++ io_write(REG_PON_OVR_EN, 0x01); ++ io_write(REG_PON_CBIAS, 0x01); ++ io_write(REG_PON_PLL, 0x01); ++ reg = io_read(REG_MODE_RECOVER_CFG1); ++ reg &= ~0x06; ++ reg |= 0x02; ++ io_write(REG_MODE_RECOVER_CFG1, reg); ++ io_write(REG_CLK_CFG, 0x00); ++ io_write(REG_PON_OVR_EN, 0x00); ++ reg = io_read(REG_MODE_RECOVER_CFG1); ++ reg &= ~0x06; ++ io_write(REG_MODE_RECOVER_CFG1, reg); ++ } ++ ++ tda1997x->video_mode.width = 0; ++ tda1997x->video_mode.height = 0; ++ tda1997x->video_mode.fps = 0; ++ tda1997x->video_mode.interlaced = 0; ++ tda1997x->video_mode.signal = 0; ++ } ++ ++ else { ++ printk(KERN_INFO "%s: HDMI-%c: Digital Activity Detected\n", ++ KBUILD_MODNAME, input+'A'); ++ tda1997x->input_detect[input] = 1; ++ } ++ ++ /* hold onto current state */ ++ tda1997x->activity_status_reg = (irq_status & mask); ++ } ++ } ++ } ++ ++ /* MODE interrupt source (Gamut, ISRC2, ISRC1, ACP, GCP, Deep color flags) */ ++ else if (interrupt_top_flags & INTERRUPT_MODE) { ++ source = io_read(REG_INT_FLG_CLR_MODE); ++ io_write(REG_INT_FLG_CLR_MODE, source); ++ DPRINTK(0,"MODE: 0x%02x\n", source); ++ ++ /* special processing for HDMI Flag IT */ ++ if (source & MASK_HDMI_FLG) { ++ u8 statusChange; ++ ++ reg = io_read(REG_HDMI_FLAGS); ++ reg &= 0x7c; /* ignore fifo_fail and fifo_warning bits */ ++ statusChange = tda1997x->hdmi_status ^ reg; ++ DPRINTK(0,"\tHDMI_FLAGS:0x%02x prev=0x%02x changed=0x%02x\n", reg, ++ tda1997x->hdmi_status, statusChange); ++ if (statusChange) { ++ tda1997x->hdmi_status = reg; ++ /* Get HDMI Status */ ++ if (statusChange & 0x80) ++ DPRINTK(0,"\t\tAUDIOFLAG - Audio packet in last videoframe\n"); ++ if (statusChange & 0x40) ++ DPRINTK(0,"\t\tHDMI mode detected\n"); ++ tda1997x->hdmi_detected = 1; ++ if (statusChange & 0x20) ++ DPRINTK(0,"\t\tEESS mode detected\n"); ++ tda1997x->eess_detected = 1; ++ if (statusChange & 0x10) ++ DPRINTK(0,"\t\tHDCP encryption detected\n"); ++ tda1997x->hdcp_detected = 1; ++ if (statusChange & 0x08) ++ DPRINTK(0,"\t\tAVMUTE\n"); ++ if (statusChange & 0x04) ++ DPRINTK(0,"\t\tLayout status Audio Sample Packet\n"); ++ if (statusChange & 0x02) ++ DPRINTK(0,"\t\tFIFO read/write pointers are crossed\n"); ++ if (statusChange & 0x01) ++ DPRINTK(0,"\t\tFIFO read ptr closer than 2 samples from write ptr\n"); ++ } ++ } ++ if (source & MASK_GAMUT) { ++ u8 d[GDB_PACKET_HDR_LEN + GDB_PACKET_DAT_LEN]; ++ io_readn(REG_GBD_PACKET_TYPE, sizeof(d), d); ++ DPRINTK(0,"\tGamut packet: type=%d nextField=%d GBDProfile=%d " ++ "affectedGamutSeqNum=%d noCrntGBD=%d packetSeq=%d curSeq=%d\n", ++ d[0], /* type */ ++ (d[1] & 0x80) >> 7, /* nextField */ ++ (d[1] & 0x70) >> 4, /* GBDProfile */ ++ (d[1] & 0x0f), /* affected Gamut SeqNum */ ++ (d[2] & 0x80) >> 7, /* noCrntGBD */ ++ (d[2] & 0x30) >> 4, /* packet SeqNum */ ++ (d[2] & 0x0f) /* current SeqNum */ ++ ); ++ } ++#if 0 ++ if (source & MASK_ISRC2) { ++ DPRINTK(0,"\tISRC2 packet\n"); ++ ++ if (1) // untested ++ { ++ u8 d[ISRC_PACKET_HDR_LEN + ISRC_PACKET_DAT_LEN]; ++ u8 crc = 0, i; ++ ++ io_readn(REG_ISRC2_PACKET_TYPE, sizeof(d), d); ++ for (i = 0; i < sizeof(d); i++) ++ crc += d[i]; ++ if (crc) { ++ printk(KERN_ERR "%s: ISRC2 packet CRC failed\n", KBUILD_MODNAME); ++ } ++ } ++ } ++ if (source & MASK_ISRC1) { ++ DPRINTK(0,"\tISRC1 packet\n"); ++ ++ if (1) // untested ++ { ++ u8 d[ISRC_PACKET_HDR_LEN + ISRC_PACKET_DAT_LEN]; ++ u8 crc = 0, i; ++ ++ io_readn(REG_ISRC1_PACKET_TYPE, sizeof(d), d); ++ for (i = 0; i < sizeof(d); i++) ++ crc += d[i]; ++ if (crc) { ++ printk(KERN_ERR "%s: ISRC1 packet CRC failed\n", KBUILD_MODNAME); ++ } else { ++ DPRINTK(0,"\tISRC1 packet: type=%d ISRCCont=%d ISRCValid=%d " ++ "ISRCStatus=%d\n", ++ d[0], ++ (d[1] & 0x80) >> 7, ++ (d[1] & 0x40) >> 6, ++ (d[1] & 0x07) ++ ); ++ } ++ } ++ } ++ if (source & MASK_ACP) { ++ DPRINTK(0,"\tAudio Content Protection (ACP) Packet\n"); ++ ++ if (1) // untested ++ { ++ u8 d[ACP_PACKET_HDR_LEN + ACP_PACKET_DAT_LEN]; ++ u8 crc = 0, i; ++ ++ io_readn(REG_ACP_PACKET_TYPE, sizeof(d), d); ++ for (i = 0; i < sizeof(d); i++) ++ crc += d[i]; ++ if (crc) { ++ printk(KERN_ERR "%s: ACP packet CRC failed\n", KBUILD_MODNAME); ++ } ++ } ++ } ++#endif ++ if (source & MASK_DC_NO_GCP) { ++ DPRINTK(0,"\tGCP not received in 5 frames\n"); ++ } ++ if (source & MASK_DC_PHASE) { ++ DPRINTK(0,"\tDeep color mode pixel phase needs update\n"); ++ } ++ if (source & MASK_DC_MODE) { ++ reg = io_read(REG_DEEP_COLOR_MODE); ++ DPRINTK(0,"\tDeep color mode color depth changed: " ++ "pixelPackingPhase=0x%02x mode=%d\n", ++ reg & MASK_DC_PIXEL_PHASE, ++ reg & MASK_DC_COLOR_DEPTH); ++ } ++ } ++ ++ /* Infoframe change interrupt source */ ++ else if (interrupt_top_flags & INTERRUPT_INFO ) { ++ source = io_read(REG_INT_FLG_CLR_INFO); ++ io_write(REG_INT_FLG_CLR_INFO, source); ++ DPRINTK(0,"INFO: 0x%02x\n", source); ++ ++ /* Vendor-Specific Infoframe */ ++ if (source & MASK_VS_IF_OTHER_BK2 || ++ source & MASK_VS_IF_OTHER_BK1 || ++ source & MASK_VS_IF_HDMI) ++ { ++ u8 VSIUpdate, VSOther1Update, VSOther2Update; ++ ++ /* Read the Update registers */ ++ VSIUpdate = io_read(VS_HDMI_IF_UPDATE); ++ VSOther1Update = io_read(VS_BK1_IF_UPDATE); ++ VSOther2Update = io_read(VS_BK2_IF_UPDATE); ++ ++ /* discard ITs that are too old */ ++ if (VSIUpdate >= 3) source &= ~MASK_VS_IF_HDMI; ++ if (VSOther1Update >= 3) source &= ~MASK_VS_IF_OTHER_BK1; ++ if (VSOther2Update >= 3) source &= ~MASK_VS_IF_OTHER_BK2; ++ ++ /* No new VSI has been received if these 3 registers are > 3 */ ++ if (tda1997x->vsi_received ++ && (VSIUpdate>=3) && (VSOther1Update>=3) && (VSOther2Update>=3)) ++ { ++ /* false VSI received */ ++ tda1997x->vsi_received = 0; ++ } ++ else ++ { ++ tda1997x->vsi_received = 1; ++ ++ if (source & MASK_VS_IF_HDMI) { ++ DPRINTK(0,"\tVendor-Specific InfoFrame: HDMI\n"); ++ tda1997x_parse_infoframe(tda1997x, VS_HDMI_IF_TYPE); ++ } ++ ++ if (source & MASK_VS_IF_OTHER_BK1) { ++ DPRINTK(0,"\tVendor-Specific InfoFrame: BK1\n"); ++ tda1997x_parse_infoframe(tda1997x, VS_BK1_IF_TYPE); ++ } ++ ++ if (source & MASK_VS_IF_OTHER_BK2) { ++ DPRINTK(0,"\tVendor-Specific InfoFrame: BK2\n"); ++ tda1997x_parse_infoframe(tda1997x, VS_BK2_IF_TYPE); ++ } ++ } ++ } ++ ++ /* MPEG Source Product infoframe */ ++ if (source & MASK_MPS_IF) { ++ DPRINTK(0, "\tMPEG Source Product InfoFrame content change\n"); ++ tda1997x_parse_infoframe(tda1997x, MPS_IF_TYPE); ++ } ++ ++ /* Audio infoframe */ ++ if (source & MASK_AUD_IF) { ++ DPRINTK(0, "\tAudio InfoFrame content change\n"); ++ tda1997x_parse_infoframe(tda1997x, AUD_IF_TYPE); ++ } ++ ++ /* Source Product Descriptor infoframe change */ ++ if (source & MASK_SPD_IF) { ++ DPRINTK(0, "\tSource Product Descriptor InfoFrame change\n"); ++ tda1997x_parse_infoframe(tda1997x, SPD_IF_TYPE); ++ } ++ ++ /* Auxillary Video Information infoframe */ ++ if (source & MASK_AVI_IF) { ++ DPRINTK(0, "\tAuxiliary Video information InfoFrame change\n"); ++ tda1997x_parse_infoframe(tda1997x, AVI_IF_TYPE); ++ } ++ } ++ ++ /* Audio interrupt source: ++ * freq change, DST,OBA,HBR,ASP flags, mute, FIFO err + */ -+ if (host->card_regulator && regulator_is_enabled(host->card_regulator)) -+ level = 1; -+ -+ for (i = 0; i < ARRAY_SIZE(host->card_reset_gpios); i++) { -+ gpd = devm_gpiod_get_index(host->parent, "card-reset", i); -+ if (IS_ERR(gpd)) { -+ if (PTR_ERR(gpd) == -EPROBE_DEFER) -+ return PTR_ERR(gpd); -+ break; ++ else if (interrupt_top_flags & INTERRUPT_AUDIO ) { ++ source = io_read(REG_INT_FLG_CLR_AUDIO); ++ io_write(REG_INT_FLG_CLR_AUDIO, source); ++ DPRINTK(0,"AUDIO: 0x%02x\n", source); ++ ++ if (source & MASK_ERROR_FIFO_PT || /* Audio FIFO pointer error */ ++ source & MASK_MUTE_FLG) /* Audio mute */ ++ { ++ if (source & MASK_MUTE_FLG) { ++ DPRINTK(0, "\tAudio MUTE\n"); ++ } else { ++ DPRINTK(0, "\tAudio FIFO error\n"); ++ } ++ ++ /* audio reset audio FIFO */ ++ reg = io_read(REG_SUS_STATUS); ++ if ((reg & MASK_SUS_STATE_VALUE) == LAST_STATE_REACHED) { ++ reg = io_read(REG_HDMI_INFO_RST); ++ reg |= MASK_SR_FIFO_FIFO_CTRL; ++ io_write(REG_HDMI_INFO_RST, reg); ++ reg &= ~MASK_SR_FIFO_FIFO_CTRL; ++ io_write(REG_HDMI_INFO_RST, reg); ++ ++ /* reset channel status IT if present */ ++ source &= ~(MASK_CH_STATE); ++ } ++ } ++ if (source & MASK_AUDIO_FREQ_FLG) { ++ DPRINTK(0, "\tAudio freq change\n"); ++ tda1997x_get_audio_frequency(tda1997x); ++ printk(KERN_INFO "%s: Audio Frequency Change: %dHz\n", ++ KBUILD_MODNAME, ++ tda1997x->audio_mode.samplerate); ++ } ++ if (source & MASK_AUDIO_FLG) { ++ reg = io_read(REG_AUDIO_FLAGS); ++ DPRINTK(0, "\tAudio flag: 0x%02x\n", reg); ++ if (reg & 0x08) { ++ DPRINTK(0, "\t\tDTS packets detected\n"); ++ } ++ if (reg & 0x04) { ++ DPRINTK(0, "\t\tOBA packets detected\n"); ++ } ++ if (reg & 0x02) { ++ DPRINTK(0, "\t\tHBR packets detected\n"); ++ } ++ if (reg & 0x01) { ++ DPRINTK(0, "\t\tAudio sample packets detected\n"); ++ } ++ } ++ if (source & MASK_CH_STATE) { ++ DPRINTK(0, "\tChannel status\n"); ++ } ++ if (source & MASK_UNMUTE_FIFO) { ++ DPRINTK(0, "\tUnmute audio FIFO\n"); ++ } ++ } ++ ++ /* HDCP interrupt source (content protection) */ ++ if (interrupt_top_flags & INTERRUPT_HDCP) { ++ source = io_read(REG_INT_FLG_CLR_HDCP); ++ io_write(REG_INT_FLG_CLR_HDCP, source); ++ DPRINTK(0,"HDCP: 0x%02x\n", source); ++ ++ /* reset MTP in use flag if set */ ++ if (source & MASK_HDCP_MTP) { ++ DPRINTK(0, "\tHDCP MTP in use\n"); ++ tda1997x->mptrw_in_progress = 0; ++ } ++ if (source & MASK_HDCP_DLMTP) { ++ DPRINTK(0,"\tHDCP end download MTP to SRAM\n"); ++ } ++ if (source & MASK_HDCP_DLRAM) { ++ DPRINTK(0,"\tHDCP end download keys from SRAM to HDCP core\n"); ++ } ++ if (source & MASK_HDCP_ENC) { ++ DPRINTK(0,"\tHDCP_ENC\n"); ++ } ++ if (source & MASK_STATE_C5) { ++ DPRINTK(0,"\tHDCP State C5 reached\n"); ++ ++ /* REPEATER: mask AUDIO and IF interrupts to avoid IF during auth */ ++ reg = io_read(REG_INT_MASK_TOP); ++ reg &= ~(INTERRUPT_AUDIO | INTERRUPT_INFO); ++ io_write(REG_INT_MASK_TOP, reg); ++ interrupt_top_flags &= (INTERRUPT_AUDIO | INTERRUPT_INFO); ++ } ++ if (source & MASK_AKSV) { ++ DPRINTK(0,"\tAKSV received (Start of Authentication)\n"); + } -+ gpiod_direction_output(gpd, gpiod_is_active_low(gpd) | level); -+ host->card_reset_gpios[i] = gpd; + } + -+ gpd = devm_gpiod_get_index(host->parent, "card-reset", ARRAY_SIZE(host->card_reset_gpios)); -+ if (!IS_ERR(gpd)) { -+ dev_warn(host->parent, "More reset gpios than we can handle"); -+ gpiod_put(gpd); ++ /* AFE interrupt source */ ++ else if (interrupt_top_flags & INTERRUPT_AFE ) { ++ source = io_read(REG_INT_FLG_CLR_AFE); ++ io_write(REG_INT_FLG_CLR_AFE, source); ++ DPRINTK(0,"AFE: 0x%02x\n", source); + } ++ } while (interrupt_top_flags != 0); ++ ++ /* we handled all alerts; re-enable level-triggered IRQ */ ++ enable_irq(tda1997x->irq); ++} ++ ++/** tda1997x interrupt handler ++ */ ++static irqreturn_t tda1997x_isr(int irq, void *d) ++{ ++ struct tda1997x_data *tda1997x = d; ++ ++ /* disable level-triggered IRQs until we handle them */ ++ disable_irq_nosync(irq); ++ schedule_work(&tda1997x->work); ++ ++ return IRQ_HANDLED; ++} ++ ++/*********************************************************************** ++ * I2C client and driver. ++ ***********************************************************************/ ++ ++/** ++ * tda1997x I2C detach function. ++ * Called on rmmod. ++ * ++ * @param *client struct i2c_client*. ++ * @return Error code indicating success or failure. ++ */ ++static int tda1997x_remove(struct i2c_client *client) ++{ ++ struct tda1997x_data *tda1997x = i2c_get_clientdata(client); ++ dev_dbg(&tda1997x_data.client->dev, ++ "%s:Removing tda1997x video decoder @ 0x%02X from adapter %s\n", ++ __func__, client->addr << 1, client->adapter->name); ++ ++ tda1997x_power_mode(&tda1997x_data, 0); ++ ++ if (client->irq) { ++ devm_free_irq(&client->dev, client->irq, &tda1997x_data); + } + -+ clk = of_clk_get_by_name(np, "card_ext_clock"); -+ if (IS_ERR(clk)) { -+ if (PTR_ERR(clk) == -EPROBE_DEFER) -+ return PTR_ERR(clk); -+ clk = NULL; ++/* ++ if (tda1997x->vid_child) { ++ platform_device_del(tda1997x->vid_child); + } -+ host->card_clk = clk; ++*/ ++ ++ if (tda1997x->client_cec) ++ i2c_unregister_device(tda1997x->client_cec); ++ ++ sysfs_remove_group(&client->dev.kobj, &attr_group); ++ ++ if (dvddio_regulator) ++ regulator_disable(dvddio_regulator); ++ if (dvdd_regulator) ++ regulator_disable(dvdd_regulator); ++ if (avdd_regulator) ++ regulator_disable(avdd_regulator); + + return 0; +} + - /** - * mmc_alloc_host - initialise the per-host structure. - * @extra: sizeof private data structure -@@ -533,6 +597,10 @@ ++ ++static int tda1997x_regulator_enable(struct device *dev, ++ struct tda1997x_platform_data *pdata) ++{ ++ int ret = 0; ++ ++ dvddio_regulator = devm_regulator_get(dev, "DOVDD"); ++ if (!IS_ERR(dvddio_regulator)) { ++ regulator_set_voltage(dvddio_regulator, ++ TDA1997X_VOLTAGE_DIGITAL_IO, ++ TDA1997X_VOLTAGE_DIGITAL_IO); ++ ret = regulator_enable(dvddio_regulator); ++ if (ret) { ++ dev_err(dev, "set io voltage failed\n"); ++ return ret; ++ } else { ++ dev_dbg(dev, "set io voltage ok\n"); ++ } ++ } else { ++ dev_warn(dev, "cannot get io voltage\n"); ++ } ++ ++ dvdd_regulator = devm_regulator_get(dev, "DVDD"); ++ if (!IS_ERR(dvdd_regulator)) { ++ ret = regulator_set_voltage(dvdd_regulator, ++ TDA1997X_VOLTAGE_DIGITAL_CORE, ++ TDA1997X_VOLTAGE_DIGITAL_CORE); ++ ret = regulator_enable(dvdd_regulator); ++ if (ret) { ++ dev_err(dev, "set core voltage failed\n"); ++ return ret; ++ } else { ++ dev_dbg(dev, "set core voltage ok\n"); ++ } ++ } else { ++ dev_warn(dev, "cannot get core voltage\n"); ++ } ++ ++ avdd_regulator = devm_regulator_get(dev, "AVDD"); ++ if (!IS_ERR(avdd_regulator)) { ++ ret = regulator_set_voltage(avdd_regulator, ++ TDA1997X_VOLTAGE_ANALOG, ++ TDA1997X_VOLTAGE_ANALOG); ++ ret = regulator_enable(avdd_regulator); ++ if (ret) { ++ dev_err(dev, "set analog voltage failed\n"); ++ return ret; ++ } else { ++ dev_dbg(dev, "set analog voltage ok\n"); ++ } ++ } else { ++ dev_warn(dev, "cannot get analog voltage\n"); ++ } ++ ++ return ret; ++} ++ ++static int parse_vidout_fmt(const char *mode) ++{ ++ int clkmode; ++ if (!strcmp(mode, "444")) ++ clkmode = VIDEOFMT_444; ++ else if (!strcmp(mode, "422_smp")) ++ clkmode = VIDEOFMT_422_SMP; ++ else if (!strcmp(mode, "422_ccir")) ++ clkmode = VIDEOFMT_422_CCIR; ++ else ++ clkmode = -EINVAL; ++ ++ return clkmode; ++} ++ ++static int parse_vidout_clkmode(const char *mode) ++{ ++ int clkmode; ++ if (!strcmp(mode, "single_edge")) ++ clkmode = CLOCK_SINGLE_EDGE; ++ else if (!strcmp(mode, "dual_edge")) ++ clkmode = CLOCK_DUAL_EDGE; ++ else if (!strcmp(mode, "single_edge_toggled")) ++ clkmode = CLOCK_SINGLE_EDGE_TOGGLED; ++ else if (!strcmp(mode, "dual_edge_toggled")) ++ clkmode = CLOCK_DUAL_EDGE_TOGGLED; ++ else ++ clkmode = -EINVAL; ++ ++ return clkmode; ++} ++ ++static int parse_audout_fmt(const char *mode) ++{ ++ int clkmode; ++ if (!strcmp(mode, "i2s16")) ++ clkmode = AUDIO_FMT_I2S16; ++ else if (!strcmp(mode, "i2s32")) ++ clkmode = AUDIO_FMT_I2S32; ++ else if (!strcmp(mode, "spdif")) ++ clkmode = AUDIO_FMT_SPDIF; ++ else if (!strcmp(mode, "oba")) ++ clkmode = AUDIO_FMT_OBA; ++ else if (!strcmp(mode, "i2s16_hbr_straight")) ++ clkmode = AUDIO_FMT_I2S16_HBR_STRAIGHT; ++ else if (!strcmp(mode, "i2s16_hbr_demux")) ++ clkmode = AUDIO_FMT_I2S16_HBR_DEMUX; ++ else if (!strcmp(mode, "i2s32_hbr_demux")) ++ clkmode = AUDIO_FMT_I2S32_HBR_DEMUX; ++ else if (!strcmp(mode, "dst")) ++ clkmode = AUDIO_FMT_DST; ++ else ++ clkmode = -EINVAL; ++ ++ return clkmode; ++} ++ ++static int tda1997x_get_of_property(struct device *dev, ++ struct tda1997x_platform_data *pdata) ++{ ++ struct device_node *np = dev->of_node; ++ const char *vidout_fmt, *vidout_clk, *audout_fmt; ++ u32 hdcp, ddc_slave, blc, trc; ++ u32 port_configs; ++ u32 audout_clk, audout_layout, max_pixel_rate = 0; ++ int err; ++ ++ /* defaults (use inverted vs/hs/de) */ ++ /* TODO: add of bindings for these */ ++ pdata->vidout_sel_vs = 1; ++ pdata->vidout_invert_vs =1; ++ pdata->vidout_sel_hs = 1; ++ pdata->vidout_invert_hs =1; ++ pdata->vidout_sel_de = 1; ++ pdata->vidout_invert_de =1; ++ ++ /* enable HDCP */ ++ err = of_property_read_u32(np, "hdcp", &hdcp); ++ if (err) { ++ dev_dbg(dev, "get of property hdcp fail\n"); ++ return err; ++ } ++ /* DDC Slave address */ ++ err = of_property_read_u32(np, "ddc_slave", &ddc_slave); ++ if (err) { ++ dev_dbg(dev, "get of property ddc_slave fail\n"); ++ return err; ++ } ++ ++ /* Video output mode */ ++ err = of_property_read_string(np, "vidout_fmt", &vidout_fmt); ++ if (err) { ++ dev_dbg(dev, "get of property vidout_fmt fail\n"); ++ return err; ++ } ++ /* insert timing codes (SAV/EAV) in stream */ ++ err = of_property_read_u32(np, "vidout_trc", &trc); ++ if (err) { ++ dev_dbg(dev, "get of property vidout_trc fail\n"); ++ return err; ++ } ++ /* insert blanking codes in stream */ ++ err = of_property_read_u32(np, "vidout_blc", &blc); ++ if (err) { ++ dev_dbg(dev, "get of property vidout_blc fail\n"); ++ return err; ++ } ++ /* video output clock mode */ ++ err = of_property_read_string(np, "vidout_clkmode", &vidout_clk); ++ if (err) { ++ dev_dbg(dev, "get of property vidout_clkmode fail\n"); ++ return err; ++ } ++ /* video output port config */ ++ of_find_property(np, "vidout_portcfg", &port_configs); ++ err = of_property_read_u8_array(np, "vidout_portcfg", ++ pdata->vidout_port_config, ++ port_configs); ++ if (err) { ++ dev_dbg(dev, "get of property vidout_portcfg fail\n"); ++ return err; ++ } ++ pdata->vidout_port_config_no = port_configs; ++ /* max pixrate */ ++ of_property_read_u32(np, "max-pixel-rate", &max_pixel_rate); ++ ++ /* audio output format */ ++ err = of_property_read_string(np, "audout_fmt", &audout_fmt); ++ if (err) { ++ dev_dbg(dev, "get of property audout_fmt fail\n"); ++ return err; ++ } ++ /* audio output sysclk */ ++ err = of_property_read_u32(np, "audout_sysclk", &audout_clk); ++ if (err) { ++ dev_dbg(dev, "get of property audout_clkmode fail\n"); ++ return err; ++ } ++ /* audio layout */ ++ err = of_property_read_u32(np, "audout_layout", &audout_layout); ++ if (err) { ++ dev_dbg(dev, "get of property audout_layout fail\n"); ++ return err; ++ } ++ ++ pdata->hdcp = hdcp; ++ pdata->ddc_slave = ddc_slave; ++ pdata->vidout_format = parse_vidout_fmt(vidout_fmt); ++ pdata->vidout_trc = trc; ++ pdata->vidout_blc = blc; ++ pdata->vidout_clkmode = parse_vidout_clkmode(vidout_clk); ++ pdata->max_pixel_rate = max_pixel_rate; ++ pdata->audout_layout = audout_layout; ++ pdata->audout_format = parse_audout_fmt(audout_fmt); ++ switch (audout_clk) { ++ default: ++ case 128: ++ pdata->audout_sysclk = AUDIO_SYSCLK_128FS; ++ break; ++ case 256: ++ pdata->audout_sysclk = AUDIO_SYSCLK_256FS; ++ break; ++ case 512: ++ pdata->audout_sysclk = AUDIO_SYSCLK_512FS; ++ break; ++ } ++ ++ return err; ++} ++ ++/** ++ * tda1997x I2C probe function. ++ * Function set in i2c_driver struct. ++ * Called by insmod. ++ * ++ * @param *adapter I2C adapter descriptor. ++ * ++ * @return Error code indicating success or failure. ++ */ ++static int tda1997x_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ int ret = 0; ++ int i; ++ u8 reg; ++ struct tda1997x_data *tda1997x = &tda1997x_data; ++ struct tda1997x_platform_data *pdata; ++ struct device *dev = &client->dev; ++ ++ dev_dbg(dev, "%s\n", __func__); ++ pdata = devm_kzalloc(dev, sizeof(struct tda1997x_platform_data), ++ GFP_KERNEL); ++ if (!pdata) ++ return -ENOMEM; ++ dev->platform_data = pdata; ++ ++ if (!client->irq) { ++ dev_err(dev, "get tda1997x of interrupt fail\n"); ++ return -EINVAL; ++ } ++ ++ ret = tda1997x_get_of_property(dev, pdata); ++ if (ret < 0) { ++ dev_err(dev, "get tda1997x of property fail\n"); ++ return ret; ++ } ++ ++ /* probe chip */ ++/* ++ ret = i2c_smbus_read_byte_data(client, REG_CMTP_REG10 & 0xff); ++ if (ret < 0) ++ return -ENODEV; ++*/ ++ ++ tda1997x_regulator_enable(dev, pdata); ++ ++ memset(tda1997x, 0, sizeof(tda1997x_data)); ++ i2c_set_clientdata(client, tda1997x); ++ spin_lock_init(&tda1997x->lock); ++ tda1997x->page = 0xff; ++ tda1997x->client = client; ++ tda1997x->irq = client->irq; ++ tda1997x->pdata = pdata; ++ tda1997x->internal_edid = !pdata->external_edid; ++ INIT_WORK(&tda1997x->work, tda1997x_work); ++ mutex_init(&tda1997x->page_lock); ++ mutex_init(&tda1997x->cec_lock); ++ switch(pdata->audout_layout) { ++ case AUDIO_LAYOUT_FORCED_0: ++ tda1997x->audio_mode.channels = 2; ++ break; ++ case AUDIO_LAYOUT_FORCED_1: ++ tda1997x->audio_mode.channels = 8; ++ break; ++ default: ++ tda1997x->audio_mode.channels = 8; ++ break; ++ } ++ switch(pdata->audout_format) { ++ case AUDIO_FMT_I2S16: ++ tda1997x->audio_mode.samplesize = 2; ++ break; ++ case AUDIO_FMT_I2S32: ++ tda1997x->audio_mode.samplesize = 2; ++ break; ++ default: ++ tda1997x->audio_mode.samplesize = 0; ++ } ++ ++ /* sysfs hooks */ ++ ret = sysfs_create_group(&client->dev.kobj, &attr_group); ++ if (ret) ++ printk(KERN_ERR "%s: failed creating sysfs attrs\n", KBUILD_MODNAME); ++ ++ tda1997x->colorspace = COLORSPACE_RGB; ++ tda1997x->colorimetry = COLORIMETRY_NONE; ++ tda1997x->resolutiontype = RESTYPE_SDTV; ++ ++ /* disable/reset HDCP to get correct I2C access to Rx HDMI */ ++ io_write(REG_MAN_SUS_HDMI_SEL, MAN_RST_HDCP | MAN_DIS_HDCP); ++ ++ /* Read chip configuration*/ ++ reg = io_read(REG_CMTP_REG10); ++ tda1997x->tmdsb_clk = (reg >> 6) & 0x01; /* use tmds clock B_inv for B */ ++ tda1997x->tmdsb_soc = (reg >> 5) & 0x01; /* tmds of input B */ ++ tda1997x->port_30bit = (reg >> 2) & 0x03; /* 30bit vs 24bit */ ++ tda1997x->output_2p5 = (reg >> 1) & 0x01; /* output supply 2.5v */ ++ tda1997x->cec_enabled = (reg >> 0) & 0x01; /* CEC enabled */ ++ switch((reg >> 4) & 0x03) { ++ case 0x00: ++ tda1997x->chip = 19971; ++ tda1997x->input = INPUT_HDMI_A; ++ break; ++ case 0x01: ++ tda1997x->chip = 19972; ++ tda1997x->input = INPUT_AUTO_DIGITAL; ++ break; ++ case 0x02: ++ case 0x03: ++ tda1997x->chip = 19973; ++ tda1997x->input = INPUT_HDMI_A; ++ break; ++ } ++ ++ /* read chip revision */ ++ tda1997x->chip_revision = io_read(REG_CMTP_REG11); ++ ++ /* if N2 version, reset compdel_bp as it may generate some small pixel ++ * shifts in case of embedded sync/or delay lower than 4 */ ++ if (tda1997x->chip_revision != 0) { ++ io_write(REG_MAN_SUS_HDMI_SEL, 0x00); ++ io_write (REG_VDP_CTRL, 0x1f); ++ } ++ ++ /* The CEC I2C address is not yet correct. We need to take into account ++ * possible config setting in SLAVE_ADDR register, however the Hw I2C address ++ */ ++ tda1997x->cec_slave = 0x34 + ((io_read(REG_SLAVE_ADDR)>>4) & 0x03); ++ ++ pr_info("NXP TDA%d N%d detected: %dbit VP%s\n", ++ tda1997x->chip, ++ tda1997x->chip_revision + 1, ++ (tda1997x->port_30bit)?30:24, ++ (tda1997x->cec_enabled)?", CEC ":""); ++ pr_info("video out format: %s\n", vidfmt_names[pdata->vidout_format]); ++ if (tda1997x->cec_enabled) ++ pr_info("CEC slave address 0x%02x\n", tda1997x->cec_slave); ++ if (tda1997x->pdata->max_pixel_rate) ++ pr_info("max pixel rate: %d MP/sec\n", pdata->max_pixel_rate); ++ ++ /* Attach a second dummy i2c_client for CEC register access */ ++ tda1997x->client_cec = i2c_new_dummy(client->adapter, tda1997x->cec_slave); ++ if (!tda1997x->client_cec) { ++ printk(KERN_ERR "%s: failed to register CEC client\n", KBUILD_MODNAME); ++ } ++ ++ /* disable HPD */ ++ io_write(REG_HPD_AUTO_CTRL, 0x08); /* hpd_unsel */ ++ ++ if (tda1997x->chip_revision == 0) { ++ io_write(REG_MAN_SUS_HDMI_SEL, MAN_DIS_HDCP | MAN_RST_HDCP); ++ io_write(REG_CGU_DEBUG_SEL, 0x08); ++ } ++ ++ /* reset infoframe at end of start-up-sequencer */ ++ io_write(REG_SUS_SET_RGB2, 0x06); ++ io_write(REG_SUS_SET_RGB3, 0x06); ++ ++ /* update page 0 */ ++ io_write(REG_RT_MAN_CTRL, 0x43); ++ ++ /* CEC ++ */ ++ /* enable sync measurement timing */ ++ tda1997x_cec_write(REG_PWR_CONTROL & 0xff, 0x04); ++ /* adjust CEC clock divider */ ++ tda1997x_cec_write(REG_OSC_DIVIDER & 0xff, 0x03); ++ tda1997x_cec_write(REG_EN_OSC_PERIOD_LSB & 0xff, 0xa0); ++ io_write(REG_TIMER_D, 0x54); ++ /* enable power switch - SRAM content is always valid ++ * (in case E-MTP is not or mis-programmed) ++ */ ++ reg = tda1997x_cec_read(REG_CONTROL & 0xff); ++ reg |= 0x20; ++ tda1997x_cec_write(REG_CONTROL & 0xff, reg); ++ mdelay(50); ++ ++ /* read the chip version */ ++ reg = io_read(REG_VERSION); ++ /* get the chip configuration */ ++ reg = io_read(REG_CMTP_REG10); ++ ++ /* init interrupt masks we care about */ ++ io_write(REG_INT_MASK_TOP, 0x7f); /* hdcp,audio,info,mode,rate,ddc,sus */ ++ io_write(REG_INT_MASK_SUS, 0xa8); /* config_mtp,fmt,sus_end,sus_st */ ++ io_write(REG_INT_MASK_DDC, 0x00); /* none */ ++ io_write(REG_INT_MASK_RATE, 0x44); /* rate_b_st, rate_a_st */ ++ io_write(REG_INT_MASK_MODE, 0xf9); /* hdmi_flg,gamut,isrc2,isrc1,acp,dc_mode */ ++ io_write(REG_INT_MASK_INFO, 0x7f); /* mps_if,aud_if,spd_if,avi_if, ++ vs_if_other_bk2,vs_if_other_bk1, ++ vs_if_hdmi */ ++ io_write(REG_INT_MASK_AUDIO,0x3f); /* audio_freq,audio_flg,mute_flg, ++ ch stat,unmount_fifo,fifo_err */ ++ io_write(REG_INT_MASK_HDCP, 0x02); /* state_c5 */ ++ io_write(REG_INT_MASK_AFE, 0x00); /* none */ ++ ++ /* clear all interrupts */ ++ io_write(REG_INT_FLG_CLR_TOP, 0xff); ++ io_write(REG_INT_FLG_CLR_SUS, 0xff); ++ io_write(REG_INT_FLG_CLR_DDC, 0xff); ++ io_write(REG_INT_FLG_CLR_RATE, 0xff); ++ io_write(REG_INT_FLG_CLR_MODE, 0xff); ++ io_write(REG_INT_FLG_CLR_INFO, 0xff); ++ io_write(REG_INT_FLG_CLR_AUDIO, 0xff); ++ io_write(REG_INT_FLG_CLR_HDCP, 0xff); ++ io_write(REG_INT_FLG_CLR_AFE, 0xff); ++ ++ /* init TMDS equalizer */ ++ if (tda1997x->chip_revision == 0) ++ io_write(REG_CGU_DEBUG_SEL, 0x08); ++ io_write24(REG_CLK_MIN_RATE, CLK_MIN_RATE); ++ io_write24(REG_CLK_MAX_RATE, CLK_MAX_RATE); ++ if (tda1997x->chip_revision == 0) ++ io_write(REG_WDL_CFG, WDL_CFG_VAL); ++ /* DC filter */ ++ io_write(REG_DEEP_COLOR_CTRL, DC_FILTER_VAL); ++ ++ /* disable test pattern */ ++ io_write(REG_SERVICE_MODE, 0x00); ++ ++ /* update HDMI INFO CTRL */ ++ io_write(REG_INFO_CTRL, 0xff); ++ ++ /* write HDMI INFO EXCEED value */ ++ io_write(REG_INFO_EXCEED, 3); ++ ++ if (tda1997x->chip_revision == 0) { ++ /* clear HDMI mode flag in BCAPS (for N1) */ ++ io_write(REG_CLK_CFG, 0x03); ++ io_write(REG_PON_OVR_EN, 0x01); ++ io_write(REG_PON_CBIAS, 0x01); ++ io_write(REG_PON_PLL, 0x01); ++ ++ reg = io_read(REG_MODE_RECOVER_CFG1); ++ reg &= ~0x06; ++ reg |= 0x02; ++ io_write(REG_MODE_RECOVER_CFG1, reg); ++ io_write(REG_CLK_CFG, 0x00); ++ io_write(REG_PON_OVR_EN, 0x00); ++ reg = io_read(REG_MODE_RECOVER_CFG1); ++ reg &= ~0x06; ++ io_write(REG_MODE_RECOVER_CFG1, reg); ++ } ++ ++ /* No HDCP acknowledge when HDCP is disabled ++ * and reset SUS to force format detection ++ */ ++ tda1997x_hdmi_info_reset(NACK_HDCP, 1); ++ //tda1997x_hdmi_info_reset(NACK_HDCP, 0); ++ ++ /* get key description seed in fuction of seed table if provded */ ++ tda1997x_configure_mtp(tda1997x, MTP_START_READ); /* Start read */ ++ reg = io_read(0x4000); /* read from MTP */ ++ for (i = 0; i < RX_SEED_TABLE_LEN; i++) { ++ if ((rx_seed_table[i].seedVal == 0) && (rx_seed_table[i].lookUpVal == 0)) ++ break; ++ else if (rx_seed_table[i].lookUpVal == reg) { /* MTP_DATA_LSB */ ++ /* found seed replace seed in key_decryption_seed */ ++ tda1997x->key_decryption_seed = rx_seed_table[i].seedVal; ++ break; ++ } ++ } ++ DPRINTK(0,"HDCP decryption seed:0x%04x\n", tda1997x->key_decryption_seed); ++ ++ /* disable HDCP */ ++ tda1997x_configure_hdcp(tda1997x, HDCP_DECRYPTKEY_ON, DISABLE, ++ tda1997x->pdata->ddc_slave, tda1997x->key_decryption_seed); ++ ++ /* set the state machine */ ++ tda1997x->state = STATE_INITIALIZED; ++ ++ /* Set HPD low */ ++ tda1997x_manual_hpd(tda1997x, HPD_LOW); ++ ++ /* Configure receiver capabilities */ ++ io_write(REG_HDCP_BCAPS, HDCP_HDMI | HDCP_FAST_REAUTH); ++ ++ /* Configure HDMI ++ * ++ * HDMI_CTRL bits: ++ * 3:2 - mute_mode: ++ * 00: use control packet ++ * 01: mute off ++ * 10: mute on ++ * 1:0 - hdcp_mode: ++ * 00: auto ++ * 01: oess ++ * 10: eess ++ */ ++ io_write(REG_HDMI_CTRL, 0x00); /* Auto HDCP mode, packet controlled mute */ ++ ++ /* Configure EDID ++ * ++ * EDID_ENABLE bits: ++ * 7 - nack_off ++ * 6 - edid_only ++ * 1 - edid_b_en ++ * 0 - edid_a_en ++ */ ++ reg = io_read(REG_EDID_ENABLE); ++ if (!tda1997x->internal_edid) ++ reg &= ~0x83; /* EDID Nack ON */ ++ else ++ reg |= 0x83; /* EDID Nack OFF */ ++ io_write(REG_EDID_ENABLE, reg); ++ ++ /* HDCP Activation */ ++ if (pdata->hdcp) { ++ DPRINTK(0,"%s: Activating HDCP\n", __func__); ++ ++ /* No HDCP acknowledge when HDCP is disabled */ ++ tda1997x_hdmi_info_reset(NACK_HDCP, 0); ++ ++ /* disable HDCP */ ++ tda1997x_configure_hdcp(tda1997x, HDCP_DECRYPTKEY_ON, DISABLE, ++ tda1997x->pdata->ddc_slave, tda1997x->key_decryption_seed); ++ ++ /* index first secret key */ ++ io_write(REG_HDCP_KIDX, 0x00); ++ ++ /* download MTP */ ++ tda1997x_configure_mtp(tda1997x, MTP_START_DOWNLOAD); ++ mdelay(20); ++ ++ /* enable HDCP */ ++ tda1997x_configure_hdcp(tda1997x, HDCP_DECRYPTKEY_OFF, ENABLE, ++ tda1997x->pdata->ddc_slave, tda1997x->key_decryption_seed); ++ ++ /* Enable HDCP acknowledge when HDCP is enabled */ ++ //tda1997x_hdmi_info_reset(0x00, 0); ++ ++ /* Configure HDCP error protection ++ */ ++ DPRINTK(0,"Configure HDCP error protection\n"); ++ /* delockDelay - Delay before delocking the word locker */ ++ io_write(REG_DELOCK_DELAY, 0x07); /* delockDelay (7=max) */ ++ /* HDCP_DE_CTRL bits: ++ * 7:6 - de_measurement_mode: ++ * 00: 1_VDP ++ * 01: 2_VDP ++ * 10: 3_VDP ++ * 11: 4_VDP ++ * 5 - de_regen_mode: 1-enable ++ * 4:3 - de_filter_sensitivity: ++ * 2:0 - de_composition_mode: ++ * 000: CH0 ++ * 001: CH1 ++ * 010: CH2 ++ * 011: AND ++ * 100: OR ++ * 101: MIXED ++ */ ++ io_write(REG_HDCP_DE_CTRL, 3<<3); /* de_filter_sensitivity=3 */ ++ /* HDCP_EP_FILT_CTRL bits: ++ * 5:4 - ctl_filter_sensitivity ++ * 3:2 - vs_filter_sensitivity ++ * 1:0 - hs_filter_sensitivity ++ */ ++ /* ctl_filter_sentivity = vs_filter_sensitivity = hs_filter_sensitivity = 3 */ ++ io_write(REG_HDCP_EP_FILT_CTRL, (0x3<<4) | (0x3<<2) | 0x3); ++ } ++ ++ /* reset start-up-sequencer to force format detection */ ++ tda1997x_hdmi_info_reset(0x00, 1); ++ //tda1997x_hdmi_info_reset(0x00, 0); ++ ++ /* Set HPD high */ ++ tda1997x_manual_hpd(tda1997x, HPD_HIGH_OTHER); ++ ++ /* Internal EDIDs are enabled - we can now load EDID */ ++ if (tda1997x->internal_edid) { ++ /* Load EDID into embedded memory */ ++ tda1997x_load_edid_data(edid_block); ++ ++ /* Load DDC and RT data into embedded memory */ ++ tda1997x_load_config_data(tda1997x, ddc_config0, rt_config); ++ } ++ ++ /* Set HPD high (now that EDID is ready) */ ++ tda1997x_manual_hpd(tda1997x, HPD_HIGH); ++ ++ /* Select input */ ++ tda1997x_select_input(tda1997x->input); ++ ++ /* enable matrix conversion bypass (no conversion) */ ++ io_write(REG_VDP_CTRL, io_read(REG_VDP_CTRL) | (1<<0)); ++ ++ /* set video output mode */ ++ tda1997x_set_video_outputformat(tda1997x->pdata); ++ for (i = 0; i < tda1997x->pdata->vidout_port_config_no; i++) ++ io_write(REG_VP35_32_CTRL + i, tda1997x->pdata->vidout_port_config[i]); ++ ++ /* configure audio output mode */ ++ tda1997x_configure_audio_formatter(tda1997x->pdata, 0); ++ /* configure audio clock mode: ++ * Audio clock generation from Xtal: 128fs, 256fs, 512fs and ++ * Fs = 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz, 172.4kHz, 192kHz ++ */ ++ //io_write(REG_AUDIO_CLOCK_MODE, tda1997x->pdata->audio_sysclk); ++ io_write(REG_AUDIO_CLOCK_MODE, AUDIO_SYSCLK_128FS); ++ ++ /* reset advanced infoframes (ISRC1/ISRC2/ACP) */ ++ tda1997x_hdmi_info_reset(RESET_AI, 0); ++ //tda1997x_hdmi_info_reset(0x00, 0); ++ /* reset infoframe */ ++ tda1997x_hdmi_info_reset(RESET_IF, 0); ++ //tda1997x_hdmi_info_reset(0x00, 0); ++ /* reset audio infoframes */ ++ tda1997x_hdmi_info_reset(RESET_AUDIO, 0); ++ //tda1997x_hdmi_info_reset(0x00, 0); ++ /* reset gamut */ ++ tda1997x_hdmi_info_reset(RESET_GAMUT, 0); ++ //tda1997x_hdmi_info_reset(0x00, 0); ++ ++ /* get initial HDMI status */ ++ tda1997x->hdmi_status = io_read(REG_HDMI_FLAGS); ++ ++ /* get DEEP color mode */ ++ reg = io_read(REG_DEEP_COLOR_MODE); ++ ++ /* register interrupt handler */ ++ if (client->irq) { ++ ret = devm_request_irq(&client->dev, client->irq, tda1997x_isr, 0, ++ "tda1997x_irq", tda1997x); ++ if (ret < 0) { ++ pr_err("%s:interrupt gpio%d registration failed, error=%d \n", ++ __func__, client->irq, ret); ++ } ++ pr_debug("registered irq%d\n", client->irq); ++ } ++ ++ return ret; ++} ++ ++static const struct i2c_device_id tda1997x_id[] = { ++ {"tda1997x", 0}, ++ {}, ++}; ++ ++MODULE_DEVICE_TABLE(i2c, tda1997x_id); ++ ++//static const struct of_device_id tda1997x_dt_ids[] = { ++// { .compatible = "nxp,tda1997x", }, ++// { /* sentinel */ } ++//}; ++//MODULE_DEVICE_TABLE(of, tda1997x_dt_ids); ++ ++static struct i2c_driver tda1997x_i2c_driver = { ++ .driver = { ++ .name = "tda1997x", ++ .owner = THIS_MODULE, ++ //.of_match_table = tda1997x_dt_ids, ++ }, ++ .probe = tda1997x_probe, ++ .remove = tda1997x_remove, ++ .id_table = tda1997x_id, ++}; ++ ++/** ++ * tda1997x init function. ++ * Called on insmod. ++ * ++ * @return Error code indicating success or failure. ++ */ ++static __init int tda1997x_init(void) ++{ ++ u8 err = 0; ++ ++ pr_debug("%s\n", __func__); ++ ++ /* Tells the i2c driver what functions to call for this driver. */ ++ err = i2c_add_driver(&tda1997x_i2c_driver); ++ if (err != 0) ++ pr_err("%s:driver registration failed, error=%d \n", ++ __func__, err); ++ ++ return err; ++} ++ ++/** ++ * tda1997x cleanup function. ++ * Called on rmmod. ++ * ++ * @return Error code indicating success or failure. ++ */ ++static void __exit tda1997x_clean(void) ++{ ++ dev_dbg(&tda1997x_data.client->dev, "%s\n", __func__); ++ i2c_del_driver(&tda1997x_i2c_driver); ++} ++ ++module_init(tda1997x_init); ++module_exit(tda1997x_clean); ++ ++MODULE_DESCRIPTION("Core driver for TDA1997X HDMI Receiver"); ++MODULE_AUTHOR("Tim Harvey <tharvey@gateworks.com>"); ++MODULE_LICENSE("GPL"); +diff -Nur linux-4.1.10/drivers/misc/sram.c xbian-sources-kernel/drivers/misc/sram.c +--- linux-4.1.10/drivers/misc/sram.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/misc/sram.c 2015-10-11 19:49:28.699220301 +0200 +@@ -17,6 +17,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ ++#define DEBUG + + #include <linux/kernel.h> + #include <linux/init.h> +diff -Nur linux-4.1.10/drivers/mmc/card/block.c xbian-sources-kernel/drivers/mmc/card/block.c +--- linux-4.1.10/drivers/mmc/card/block.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mmc/card/block.c 2015-10-11 19:49:28.703220035 +0200 +@@ -2395,6 +2395,10 @@ + * + * N.B. This doesn't affect SD cards. + */ ++ MMC_FIXUP("SDMB-32", CID_MANFID_SANDISK, CID_OEMID_ANY, add_quirk_mmc, ++ MMC_QUIRK_BLK_NO_CMD23), ++ MMC_FIXUP("SDM032", CID_MANFID_SANDISK, CID_OEMID_ANY, add_quirk_mmc, ++ MMC_QUIRK_BLK_NO_CMD23), + MMC_FIXUP("MMC08G", CID_MANFID_TOSHIBA, CID_OEMID_ANY, add_quirk_mmc, + MMC_QUIRK_BLK_NO_CMD23), + MMC_FIXUP("MMC16G", CID_MANFID_TOSHIBA, CID_OEMID_ANY, add_quirk_mmc, +diff -Nur linux-4.1.10/drivers/mmc/core/core.c xbian-sources-kernel/drivers/mmc/core/core.c +--- linux-4.1.10/drivers/mmc/core/core.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mmc/core/core.c 2015-10-11 19:49:28.703220035 +0200 +@@ -1688,7 +1688,7 @@ { - int err; + mmc_power_off(host); + /* Wait at least 1 ms according to SD spec */ +- mmc_delay(1); ++ mmc_delay(3); + mmc_power_up(host, ocr); + } -+ err = mmc_of_parse_child(host); -+ if (err) -+ return err; +@@ -2091,6 +2091,7 @@ + unsigned int arg) + { + unsigned int rem, to = from + nr; ++ int err; + + if (!(card->host->caps & MMC_CAP_ERASE) || + !(card->csd.cmdclass & CCC_ERASE)) +@@ -2141,6 +2142,23 @@ + /* 'from' and 'to' are inclusive */ + to -= 1; + ++ /* ++ * Special case where only one erase-group fits in the timeout budget: ++ * If the region crosses an erase-group boundary on this particular ++ * case, we will be trimming more than one erase-group which, does not ++ * fit in the timeout budget of the controller, so we need to split it ++ * and call mmc_do_erase() twice if necessary. This special case is ++ * identified by the card->eg_boundary flag. ++ */ ++ if ((arg & MMC_TRIM_ARGS) && (card->eg_boundary) && ++ (from % card->erase_size)) { ++ rem = card->erase_size - (from % card->erase_size); ++ err = mmc_do_erase(card, from, from + rem - 1, arg); ++ from += rem; ++ if ((err) || (to <= from)) ++ return err; ++ } + - WARN_ON((host->caps & MMC_CAP_SDIO_IRQ) && - !host->ops->enable_sdio_irq); + return mmc_do_erase(card, from, to, arg); + } + EXPORT_SYMBOL(mmc_erase); +@@ -2236,16 +2254,28 @@ + if (!qty) + return 0; -diff -Nur linux-4.1.10.orig/drivers/mmc/core/mmc_ops.c linux-4.1.10/drivers/mmc/core/mmc_ops.c ---- linux-4.1.10.orig/drivers/mmc/core/mmc_ops.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/mmc/core/mmc_ops.c 2015-10-10 16:41:42.645314847 +0200 ++ /* ++ * When specifying a sector range to trim, chances are we might cross ++ * an erase-group boundary even if the amount of sectors is less than ++ * one erase-group. ++ * If we can only fit one erase-group in the controller timeout budget, ++ * we have to care that erase-group boundaries are not crossed by a ++ * single trim operation. We flag that special case with "eg_boundary". ++ * In all other cases we can just decrement qty and pretend that we ++ * always touch (qty + 1) erase-groups as a simple optimization. ++ */ + if (qty == 1) +- return 1; ++ card->eg_boundary = 1; ++ else ++ qty--; + + /* Convert qty to sectors */ + if (card->erase_shift) +- max_discard = --qty << card->erase_shift; ++ max_discard = qty << card->erase_shift; + else if (mmc_card_sd(card)) +- max_discard = qty; ++ max_discard = qty + 1; + else +- max_discard = --qty * card->erase_size; ++ max_discard = qty * card->erase_size; + + return max_discard; + } +diff -Nur linux-4.1.10/drivers/mmc/core/host.c xbian-sources-kernel/drivers/mmc/core/host.c +--- linux-4.1.10/drivers/mmc/core/host.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mmc/core/host.c 2015-10-11 19:49:28.707219770 +0200 +@@ -451,7 +451,6 @@ + + return mmc_pwrseq_alloc(host); + } +- + EXPORT_SYMBOL(mmc_of_parse); + + /** +diff -Nur linux-4.1.10/drivers/mmc/core/mmc_ops.c xbian-sources-kernel/drivers/mmc/core/mmc_ops.c +--- linux-4.1.10/drivers/mmc/core/mmc_ops.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mmc/core/mmc_ops.c 2015-10-11 19:49:28.707219770 +0200 @@ -513,6 +513,12 @@ return 0; @@ -147130,9 +166968,9 @@ diff -Nur linux-4.1.10.orig/drivers/mmc/core/mmc_ops.c linux-4.1.10/drivers/mmc/ * CRC errors shall only be ignored in cases were CMD13 is used to poll * to detect busy completion. */ -diff -Nur linux-4.1.10.orig/drivers/mmc/core/sd.c linux-4.1.10/drivers/mmc/core/sd.c ---- linux-4.1.10.orig/drivers/mmc/core/sd.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/mmc/core/sd.c 2015-10-10 16:41:42.645314847 +0200 +diff -Nur linux-4.1.10/drivers/mmc/core/sd.c xbian-sources-kernel/drivers/mmc/core/sd.c +--- linux-4.1.10/drivers/mmc/core/sd.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mmc/core/sd.c 2015-10-11 19:49:28.707219770 +0200 @@ -521,6 +521,13 @@ else { mmc_set_timing(card->host, timing); @@ -147176,7 +167014,7 @@ diff -Nur linux-4.1.10.orig/drivers/mmc/core/sd.c linux-4.1.10/drivers/mmc/core/ + continue; + if (((status[15] >> 4) & 0x0F) != i) { -+ pr_warning("%s: Problem setting current limit to %d!\n", ++ pr_debug("%s: Problem setting current limit to %d!\n", + mmc_hostname(card->host), i); + } else { + break; @@ -147188,19 +167026,10 @@ diff -Nur linux-4.1.10.orig/drivers/mmc/core/sd.c linux-4.1.10/drivers/mmc/core/ } /* -diff -Nur linux-4.1.10.orig/drivers/mmc/host/sdhci-esdhc-imx.c linux-4.1.10/drivers/mmc/host/sdhci-esdhc-imx.c ---- linux-4.1.10.orig/drivers/mmc/host/sdhci-esdhc-imx.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/mmc/host/sdhci-esdhc-imx.c 2015-10-10 16:41:42.649314848 +0200 -@@ -65,6 +65,8 @@ - /* NOTE: the minimum valid tuning start tap for mx6sl is 1 */ - #define ESDHC_TUNING_START_TAP 0x1 - -+#define ESDHC_TUNING_BLOCK_PATTERN_LEN 64 -+ - /* pinctrl state */ - #define ESDHC_PINCTRL_STATE_100MHZ "state_100mhz" - #define ESDHC_PINCTRL_STATE_200MHZ "state_200mhz" -@@ -112,6 +114,12 @@ +diff -Nur linux-4.1.10/drivers/mmc/host/sdhci-esdhc-imx.c xbian-sources-kernel/drivers/mmc/host/sdhci-esdhc-imx.c +--- linux-4.1.10/drivers/mmc/host/sdhci-esdhc-imx.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/mmc/host/sdhci-esdhc-imx.c 2015-10-11 19:49:28.715219240 +0200 +@@ -112,6 +112,12 @@ #define ESDHC_FLAG_STD_TUNING BIT(5) /* The IP has SDHCI_CAPABILITIES_1 register */ #define ESDHC_FLAG_HAVE_CAP1 BIT(6) @@ -147213,7 +167042,7 @@ diff -Nur linux-4.1.10.orig/drivers/mmc/host/sdhci-esdhc-imx.c linux-4.1.10/driv struct esdhc_soc_data { u32 flags; -@@ -445,6 +453,10 @@ +@@ -445,6 +451,10 @@ if (val & SDHCI_CTRL_EXEC_TUNING) { v |= ESDHC_MIX_CTRL_EXE_TUNE; m |= ESDHC_MIX_CTRL_FBCLK_SEL; @@ -147224,109 +167053,7 @@ diff -Nur linux-4.1.10.orig/drivers/mmc/host/sdhci-esdhc-imx.c linux-4.1.10/driv } else { v &= ~ESDHC_MIX_CTRL_EXE_TUNE; } -@@ -700,6 +712,56 @@ - val, readl(host->ioaddr + ESDHC_TUNE_CTRL_STATUS)); - } - -+static void esdhc_request_done(struct mmc_request *mrq) -+{ -+ complete(&mrq->completion); -+} -+ -+static int esdhc_send_tuning_cmd(struct sdhci_host *host, u32 opcode, -+ struct scatterlist *sg) -+{ -+ struct mmc_command cmd = {0}; -+ struct mmc_request mrq = {NULL}; -+ struct mmc_data data = {0}; -+ -+ cmd.opcode = opcode; -+ cmd.arg = 0; -+ cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; -+ -+ data.blksz = ESDHC_TUNING_BLOCK_PATTERN_LEN; -+ data.blocks = 1; -+ data.flags = MMC_DATA_READ; -+ data.sg = sg; -+ data.sg_len = 1; -+ -+ mrq.cmd = &cmd; -+ mrq.cmd->mrq = &mrq; -+ mrq.data = &data; -+ mrq.data->mrq = &mrq; -+ mrq.cmd->data = mrq.data; -+ -+ mrq.done = esdhc_request_done; -+ init_completion(&(mrq.completion)); -+ -+ disable_irq(host->irq); -+ spin_lock(&host->lock); -+ host->mrq = &mrq; -+ -+ sdhci_send_command(host, mrq.cmd); -+ -+ spin_unlock(&host->lock); -+ enable_irq(host->irq); -+ -+ wait_for_completion(&mrq.completion); -+ -+ if (cmd.error) -+ return cmd.error; -+ if (data.error) -+ return data.error; -+ -+ return 0; -+} -+ - static void esdhc_post_tuning(struct sdhci_host *host) - { - u32 reg; -@@ -711,13 +773,21 @@ - - static int esdhc_executing_tuning(struct sdhci_host *host, u32 opcode) - { -+ struct scatterlist sg; -+ char *tuning_pattern; - int min, max, avg, ret; - -+ tuning_pattern = kmalloc(ESDHC_TUNING_BLOCK_PATTERN_LEN, GFP_KERNEL); -+ if (!tuning_pattern) -+ return -ENOMEM; -+ -+ sg_init_one(&sg, tuning_pattern, ESDHC_TUNING_BLOCK_PATTERN_LEN); -+ - /* find the mininum delay first which can pass tuning */ - min = ESDHC_TUNE_CTRL_MIN; - while (min < ESDHC_TUNE_CTRL_MAX) { - esdhc_prepare_tuning(host, min); -- if (!mmc_send_tuning(host->mmc)) -+ if (!esdhc_send_tuning_cmd(host, opcode, &sg)) - break; - min += ESDHC_TUNE_CTRL_STEP; - } -@@ -726,7 +796,7 @@ - max = min + ESDHC_TUNE_CTRL_STEP; - while (max < ESDHC_TUNE_CTRL_MAX) { - esdhc_prepare_tuning(host, max); -- if (mmc_send_tuning(host->mmc)) { -+ if (esdhc_send_tuning_cmd(host, opcode, &sg)) { - max -= ESDHC_TUNE_CTRL_STEP; - break; - } -@@ -736,9 +806,11 @@ - /* use average delay to get the best timing */ - avg = (min + max) / 2; - esdhc_prepare_tuning(host, avg); -- ret = mmc_send_tuning(host->mmc); -+ ret = esdhc_send_tuning_cmd(host, opcode, &sg); - esdhc_post_tuning(host); - -+ kfree(tuning_pattern); -+ - dev_dbg(mmc_dev(host->mmc), "tunning %s at 0x%x ret %d\n", - ret ? "failed" : "passed", avg, ret); - -@@ -901,6 +973,9 @@ +@@ -901,6 +911,9 @@ if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) boarddata->delay_line = 0; @@ -147336,7 +167063,7 @@ diff -Nur linux-4.1.10.orig/drivers/mmc/host/sdhci-esdhc-imx.c linux-4.1.10/driv mmc_of_parse_voltage(np, &host->ocr_mask); return 0; -@@ -991,16 +1066,22 @@ +@@ -991,16 +1004,22 @@ writel(0x08100810, host->ioaddr + ESDHC_WTMK_LVL); host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN; host->mmc->caps |= MMC_CAP_1_8V_DDR; @@ -147363,9 +167090,9 @@ diff -Nur linux-4.1.10.orig/drivers/mmc/host/sdhci-esdhc-imx.c linux-4.1.10/driv boarddata = &imx_data->boarddata; if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) { -diff -Nur linux-4.1.10.orig/drivers/mxc/asrc/Kconfig linux-4.1.10/drivers/mxc/asrc/Kconfig ---- linux-4.1.10.orig/drivers/mxc/asrc/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/asrc/Kconfig 2015-10-10 16:41:42.649314848 +0200 +diff -Nur linux-4.1.10/drivers/mxc/asrc/Kconfig xbian-sources-kernel/drivers/mxc/asrc/Kconfig +--- linux-4.1.10/drivers/mxc/asrc/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/asrc/Kconfig 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,14 @@ +# +# ASRC configuration @@ -147381,17 +167108,17 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/asrc/Kconfig linux-4.1.10/drivers/mxc/as + Say Y to get the ASRC service. + +endmenu -diff -Nur linux-4.1.10.orig/drivers/mxc/asrc/Makefile linux-4.1.10/drivers/mxc/asrc/Makefile ---- linux-4.1.10.orig/drivers/mxc/asrc/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/asrc/Makefile 2015-10-10 16:41:42.649314848 +0200 +diff -Nur linux-4.1.10/drivers/mxc/asrc/Makefile xbian-sources-kernel/drivers/mxc/asrc/Makefile +--- linux-4.1.10/drivers/mxc/asrc/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/asrc/Makefile 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,4 @@ +# +# Makefile for the kernel Asynchronous Sample Rate Converter driver +# +obj-$(CONFIG_MXC_ASRC) += mxc_asrc.o -diff -Nur linux-4.1.10.orig/drivers/mxc/asrc/mxc_asrc.c linux-4.1.10/drivers/mxc/asrc/mxc_asrc.c ---- linux-4.1.10.orig/drivers/mxc/asrc/mxc_asrc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/asrc/mxc_asrc.c 2015-10-10 16:41:42.653314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/asrc/mxc_asrc.c xbian-sources-kernel/drivers/mxc/asrc/mxc_asrc.c +--- linux-4.1.10/drivers/mxc/asrc/mxc_asrc.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/asrc/mxc_asrc.c 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,2045 @@ +/* + * Freescale Asynchronous Sample Rate Converter (ASRC) driver @@ -149438,9 +169165,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/asrc/mxc_asrc.c linux-4.1.10/drivers/mxc +MODULE_DESCRIPTION("Asynchronous Sample Rate Converter"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mxc_asrc"); -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c 2015-10-10 16:41:42.653314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.c 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,932 @@ +/**************************************************************************** +* @@ -150374,9 +170101,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_ker + +#endif /* gcdENABLE_VG */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h 2015-10-10 16:41:42.653314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_command_vg.h 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,319 @@ +/**************************************************************************** +* @@ -150697,9 +170424,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_ker + +#endif /* __gc_hal_kernel_hardware_command_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c 2015-10-10 16:41:42.653314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.c 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,2114 @@ +/**************************************************************************** +* @@ -152815,9 +172542,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_ker +} +#endif /* gcdENABLE_VG */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h 2015-10-10 16:41:42.653314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_kernel_hardware_vg.h 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,75 @@ +/**************************************************************************** +* @@ -152894,9 +172621,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/GC350/hal/kernel/gc_hal_ker + +#endif /* __gc_hal_kernel_hardware_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c 2015-10-10 16:41:42.653314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.c 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,1735 @@ +/**************************************************************************** +* @@ -154633,9 +174360,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kern +#endif +} + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h 2015-10-10 16:41:42.657314848 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_context.h 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,157 @@ +/**************************************************************************** +* @@ -154794,9 +174521,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kern + +#endif /* __gc_hal_kernel_context_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c 2015-10-10 16:41:42.661314846 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,7280 @@ +/**************************************************************************** +* @@ -162078,9 +181805,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kern +#endif + + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h 2015-10-10 16:41:42.661314846 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h +--- linux-4.1.10/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,136 @@ +/**************************************************************************** +* @@ -162218,10 +181945,10 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kern + +#endif /* __gc_hal_kernel_hardware_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/config linux-4.1.10/drivers/mxc/gpu-viv/config ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/config 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/config 2015-10-10 16:41:42.661314846 +0200 -@@ -0,0 +1,38 @@ +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/config xbian-sources-kernel/drivers/mxc/gpu-viv/config +--- linux-4.1.10/drivers/mxc/gpu-viv/config 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/config 2015-10-11 19:49:28.759216324 +0200 +@@ -0,0 +1,36 @@ +############################################################################## +# +# Copyright (C) 2005 - 2013 by Vivante Corp. @@ -162249,20 +181976,18 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/config linux-4.1.10/drivers/mxc/ +FORCE_ALL_VIDEO_MEMORY_CACHED ?= 0 +NONPAGED_MEMORY_CACHEABLE ?= 0 +NONPAGED_MEMORY_BUFFERABLE ?= 1 -+CACHE_FUNCTION_UNIMPLEMENTED ?= 0 +VIVANTE_ENABLE_VG ?= 1 +NO_USER_DIRECT_ACCESS_FROM_KERNEL ?= 1 +VIVANTE_NO_3D ?= 0 -+ENABLE_OUTER_CACHE_PATCH ?= 1 +USE_BANK_ALIGNMENT ?= 1 +BANK_BIT_START ?= 13 +BANK_BIT_END ?= 15 +BANK_CHANNEL_BIT ?= 12 +ENABLE_GPU_CLOCK_BY_DRIVER = 1 + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c 2015-10-10 16:41:42.661314846 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.c 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,2317 @@ +/**************************************************************************** +* @@ -164581,9 +184306,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_co + return status; +} + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h 2015-10-10 16:41:42.661314846 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_context.h 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,183 @@ +/**************************************************************************** +* @@ -164768,9 +184493,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_co + +#endif /* __gc_hal_kernel_context_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c 2015-10-10 16:41:42.669314845 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,8036 @@ +/**************************************************************************** +* @@ -172808,9 +192533,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_ha +} + + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h 2015-10-10 16:41:42.669314845 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,160 @@ +/**************************************************************************** +* @@ -172972,9 +192697,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_ha + +#endif /* __gc_hal_kernel_hardware_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c 2015-10-10 16:41:42.669314845 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_recorder.c 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,679 @@ +/**************************************************************************** +* @@ -173655,9 +193380,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_re +} + + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c 2015-10-10 16:41:42.669314845 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.c 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,932 @@ +/**************************************************************************** +* @@ -174591,9 +194316,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_ + +#endif /* gcdENABLE_VG */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h 2015-10-10 16:41:42.669314845 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_command_vg.h 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,319 @@ +/**************************************************************************** +* @@ -174914,9 +194639,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_ + +#endif /* __gc_hal_kernel_hardware_command_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c 2015-10-10 16:41:42.669314845 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.c 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,2119 @@ +/**************************************************************************** +* @@ -177037,9 +196762,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_ +} +#endif /* gcdENABLE_VG */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h 2015-10-10 16:41:42.669314845 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_hardware_vg.h 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,74 @@ +/**************************************************************************** +* @@ -177115,9 +196840,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/archvg/gc_hal_kernel_ + +#endif /* __gc_hal_kernel_hardware_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c 2015-10-10 16:41:42.673314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,3967 @@ +/**************************************************************************** +* @@ -181086,9 +200811,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c linux +***** Test Code **************************************************************** +*******************************************************************************/ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c 2015-10-10 16:41:42.673314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,3042 @@ +/**************************************************************************** +* @@ -184132,9 +203857,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command +#endif +} +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c 2015-10-10 16:41:42.677314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command_vg.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,3677 @@ +/**************************************************************************** +* @@ -187813,9 +207538,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c 2015-10-10 16:41:42.677314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,1604 @@ +/**************************************************************************** +* @@ -189421,9 +209146,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c li + gcmkFOOTER_NO(); + return gcvSTATUS_OK; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c 2015-10-10 16:41:42.677314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,2559 @@ +/**************************************************************************** +* @@ -191984,9 +211709,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_debug.c + return "nil"; + } +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,2898 @@ +/**************************************************************************** +* @@ -194886,9 +214611,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c + + return gcvSTATUS_OK; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h 2015-10-11 19:49:28.759216324 +0200 @@ -0,0 +1,1011 @@ +/**************************************************************************** +* @@ -195901,9 +215626,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.h linux +#endif + +#endif /* __gc_hal_kernel_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,859 @@ +/**************************************************************************** +* @@ -196764,9 +216489,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_heap.c +***** Test Code **************************************************************** +*******************************************************************************/ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interrupt_vg.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,877 @@ +/**************************************************************************** +* @@ -197645,9 +217370,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_interru +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,1982 @@ +/**************************************************************************** +* @@ -199631,9 +219356,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu.c l +****************************** T E S T C O D E ****************************** +******************************************************************************/ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,522 @@ +/**************************************************************************** +* @@ -200157,9 +219882,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_mmu_vg. +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,347 @@ +/**************************************************************************** +* @@ -200508,9 +220233,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_power.c + return gcvSTATUS_OK; +} +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp.h 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,29 @@ +/**************************************************************************** +* @@ -200541,9 +220266,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_precomp +#include "gc_hal_kernel.h" + +#endif /* __gc_hal_kernel_precomp_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c 2015-10-10 16:41:42.681314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_security.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,239 @@ +/**************************************************************************** +* @@ -200784,9 +220509,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_securit +} + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c 2015-10-10 16:41:42.685314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,895 @@ +/**************************************************************************** +* @@ -201683,9 +221408,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c li +} + +#endif /* gcdENABLE_VG */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h 2015-10-10 16:41:42.685314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,85 @@ +/**************************************************************************** +* @@ -201772,9 +221497,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.h li +}; + +#endif /* __gc_hal_kernel_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c 2015-10-10 16:41:42.685314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,2264 @@ +/**************************************************************************** +* @@ -204040,9 +223765,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_m + gcmkFOOTER(); + return status; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h 2015-10-10 16:41:42.685314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,3896 @@ +/**************************************************************************** +* @@ -207940,9 +227665,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_base.h lin +#endif + +#endif /* __gc_hal_base_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,4298 @@ +/**************************************************************************** +* @@ -212242,9 +231967,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_compiler.h + +#endif /* VIVANTE_NO_3D */ +#endif /* __gc_hal_compiler_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,1051 @@ +/**************************************************************************** +* @@ -213297,9 +233022,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h l +#endif + +#endif /* __gc_hal_driver_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,270 @@ +/**************************************************************************** +* @@ -213571,9 +233296,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver_vg. +#endif + +#endif /* __gc_hal_driver_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,88 @@ +/**************************************************************************** +* @@ -213663,9 +233388,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_dump.h lin + +#endif /* __gc_hal_dump_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,627 @@ +/**************************************************************************** +* @@ -214294,9 +234019,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatfor +#endif + +#endif /* __gc_hal_eglplatform_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform_type.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,286 @@ +/**************************************************************************** +* @@ -214584,9 +234309,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatfor +#endif + +#endif /* __gc_hal_eglplatform_type_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,2053 @@ +/**************************************************************************** +* @@ -216641,9 +236366,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine.h l + +#endif /* VIVANTE_NO_3D */ +#endif /* __gc_hal_engine_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,904 @@ +/**************************************************************************** +* @@ -217549,9 +237274,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_engine_vg. +#endif + +#endif /* __gc_hal_vg_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h 2015-10-10 16:41:42.689314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,965 @@ +/**************************************************************************** +* @@ -218518,9 +238243,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h lin +#endif + +#endif /* __gc_hal_enum_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h 2015-10-10 16:41:42.693314847 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h 2015-10-11 19:49:28.763216059 +0200 @@ -0,0 +1,2661 @@ +/**************************************************************************** +* @@ -221183,9 +240908,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal.h linux-4. +#endif + +#endif /* __gc_hal_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h 2015-10-10 16:41:42.693314847 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,185 @@ +/**************************************************************************** +* @@ -221372,9 +241097,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buf +#endif + +#endif /* __gc_hal_kernel_buffer_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h 2015-10-10 16:41:42.693314847 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,530 @@ +/**************************************************************************** +* @@ -221906,10 +241631,10 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_mem.h linu + +#endif /* VIVANTE_NO_3D */ +#endif /* __gc_hal_mem_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h 2015-10-10 16:41:42.693314847 +0200 -@@ -0,0 +1,947 @@ +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h 2015-10-11 19:49:28.767215793 +0200 +@@ -0,0 +1,938 @@ +/**************************************************************************** +* +* Copyright (C) 2005 - 2013 by Vivante Corp. @@ -222318,7 +242043,7 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h + otherwise GPU will enter gcvPOWER_IDLE. +*/ +#ifndef gcdPOWER_SUSNPEND_WHEN_IDLE -+# define gcdPOWER_SUSNPEND_WHEN_IDLE 0 ++# define gcdPOWER_SUSNPEND_WHEN_IDLE 1 +#endif + +/* @@ -222686,15 +242411,6 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h +# define gcdUSE_TRIANGLE_STRIP_PATCH 1 +#endif + -+/* -+ gcdENABLE_OUTER_CACHE_PATCH -+ -+ Enable the outer cache patch. -+*/ -+#ifndef gcdENABLE_OUTER_CACHE_PATCH -+# define gcdENABLE_OUTER_CACHE_PATCH 0 -+#endif -+ +#ifndef gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST +# ifdef ANDROID +# define gcdANDROID_UNALIGNED_LINEAR_COMPOSITION_ADJUST 1 @@ -222857,9 +242573,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h +#endif + +#endif /* __gc_hal_options_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h 2015-10-10 16:41:42.753314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,584 @@ +/**************************************************************************** +* @@ -223445,9 +243161,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_profiler.h +#endif + +#endif /* __gc_hal_profiler_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h 2015-10-10 16:41:42.753314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,1010 @@ +/**************************************************************************** +* @@ -224459,9 +244175,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_raster.h l +#endif + +#endif /* __gc_hal_raster_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h 2015-10-10 16:41:42.753314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,248 @@ +/**************************************************************************** +* @@ -224711,9 +244427,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_rename.h l +#endif + +#endif /* __gc_hal_rename_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h 2015-10-10 16:41:42.753314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_interface.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,137 @@ +/**************************************************************************** +* @@ -224852,9 +244568,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_security_i +}; + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h 2015-10-10 16:41:42.753314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,115 @@ +/**************************************************************************** +* @@ -224971,9 +244687,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_statistics + +#endif /*__gc_hal_statistics_h_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h 2015-10-10 16:41:42.757314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,1080 @@ +/**************************************************************************** +* @@ -226055,9 +245771,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_types.h li +#endif + +#endif /* __gc_hal_types_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h 2015-10-10 16:41:42.757314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,37 @@ +/**************************************************************************** +* @@ -226096,9 +245812,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_version.h +#define gcvVERSION_TIME __TIME__ + +#endif /* __gc_hal_version_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,913 @@ +/**************************************************************************** +* @@ -227013,9 +246729,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_vg.h linux +#endif + +#endif /* __gc_hal_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_array.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,34 @@ +/**************************************************************************** +* @@ -227051,9 +246767,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/de +}; + + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,45 @@ +/**************************************************************************** +* @@ -227100,9 +246816,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/fr +}; + + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,412 @@ +/**************************************************************************** +* @@ -227516,10 +247232,10 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/fr + return status; +} + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c 2015-10-10 16:41:42.761314850 +0200 -@@ -0,0 +1,938 @@ +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.c 2015-10-11 19:49:28.767215793 +0200 +@@ -0,0 +1,925 @@ +/**************************************************************************** +* +* Copyright (C) 2005 - 2014 by Vivante Corp. @@ -227915,19 +247631,6 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + { + flush_dcache_page(page); + -+#if !gcdCACHE_FUNCTION_UNIMPLEMENTED && defined(CONFIG_OUTER_CACHE) && gcdENABLE_OUTER_CACHE_PATCH -+ if (page_to_phys(page)) -+ { -+ _HandleOuterCache( -+ Allocator->os, -+ page_to_phys(page), -+ gcvNULL, -+ PAGE_SIZE, -+ gcvCACHE_FLUSH -+ ); -+ } -+#endif -+ + priv->high += PAGE_SIZE; + } + } @@ -228458,9 +248161,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + return gcvSTATUS_OK; +} + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_allocator.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,400 @@ +/**************************************************************************** +* @@ -228862,9 +248565,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + +*/ +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.c 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,795 @@ +/**************************************************************************** +* @@ -229661,9 +249364,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +{ + gcmkDBGFSPRINT ( _GetArgumentSize ( Message ) , Message ) ; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,84 @@ +/**************************************************************************** +* @@ -229749,9 +249452,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +#endif + + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,102 @@ +/**************************************************************************** +* @@ -229855,9 +249558,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +#endif + +#endif /* __gc_hal_kernel_debug_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,1676 @@ +/**************************************************************************** +* @@ -231535,9 +251238,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + gcmkFOOTER(); + return status; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,192 @@ +/**************************************************************************** +* @@ -231731,9 +251434,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + ); + +#endif /* __gc_hal_kernel_device_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c 2015-10-10 16:41:42.761314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,1476 @@ +/**************************************************************************** +* @@ -233211,9 +252914,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +module_exit(gpu_exit); + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c 2015-10-10 16:41:42.765314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_iommu.c 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,216 @@ +/**************************************************************************** +* @@ -233431,9 +253134,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + return gcvSTATUS_OK; +} + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c 2015-10-10 16:41:42.765314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.c 2015-10-11 19:49:28.767215793 +0200 @@ -0,0 +1,481 @@ +/**************************************************************************** +* @@ -233916,9 +253619,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + gcmkFOOTER_ARG("Settings->signal=%d", Settings->signal); + return gcvSTATUS_OK; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h 2015-10-10 16:41:42.765314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,94 @@ +/**************************************************************************** +* @@ -234014,9 +253717,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +} + +#endif /* __gc_hal_kernel_linux_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c 2015-10-10 16:41:42.765314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_math.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,32 @@ +/**************************************************************************** +* @@ -234050,10 +253753,10 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + if(Y ==0) {return 0;} + else {return X % Y;} +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c 2015-10-10 16:41:42.769314849 +0200 -@@ -0,0 +1,9022 @@ +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c 2015-10-11 19:49:28.771215528 +0200 +@@ -0,0 +1,8825 @@ +/**************************************************************************** +* +* Copyright (C) 2005 - 2013 by Vivante Corp. @@ -238334,7 +258037,7 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + unsigned long pfn; + gctINT i; + -+ gcmkHEADER_ARG("Os=0x%X Physical=0x%X Bytes=%lu", Os, Physical, Logical); ++ gcmkHEADER_ARG("Os=0x%X Physical=0x%X Bytes=%u", Os, Physical, Bytes); + + /* Verify the arguments. */ + gcmkVERIFY_OBJECT(Os, gcvOBJ_OS); @@ -238513,7 +258216,6 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + *Logical = mdlMap->vmaAddr; + + /* Return the page number according to the GPU page size. */ -+ gcmkASSERT((PAGE_SIZE % 4096) == 0); + gcmkASSERT((PAGE_SIZE / 4096) >= 1); + + *PageCount = mdl->numPages * (PAGE_SIZE / 4096); @@ -240134,128 +259836,6 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +********************************* Cache Control ******************************** +*******************************************************************************/ + -+#if !gcdCACHE_FUNCTION_UNIMPLEMENTED && defined(CONFIG_OUTER_CACHE) -+static inline gceSTATUS -+outer_func( -+ gceCACHEOPERATION Type, -+ unsigned long Start, -+ unsigned long End -+ ) -+{ -+ switch (Type) -+ { -+ case gcvCACHE_CLEAN: -+ outer_clean_range(Start, End); -+ break; -+ case gcvCACHE_INVALIDATE: -+ outer_inv_range(Start, End); -+ break; -+ case gcvCACHE_FLUSH: -+ outer_flush_range(Start, End); -+ break; -+ default: -+ return gcvSTATUS_INVALID_ARGUMENT; -+ break; -+ } -+ return gcvSTATUS_OK; -+} -+ -+#if gcdENABLE_OUTER_CACHE_PATCH -+/******************************************************************************* -+** _HandleOuterCache -+** -+** Handle the outer cache for the specified addresses. -+** -+** ARGUMENTS: -+** -+** gckOS Os -+** Pointer to gckOS object. -+** -+** gctUINT32 ProcessID -+** Process ID Logical belongs. -+** -+** gctPHYS_ADDR Handle -+** Physical address handle. If gcvNULL it is video memory. -+** -+** gctPOINTER Physical -+** Physical address to flush. -+** -+** gctPOINTER Logical -+** Logical address to flush. -+** -+** gctSIZE_T Bytes -+** Size of the address range in bytes to flush. -+** -+** gceOUTERCACHE_OPERATION Type -+** Operation need to be execute. -+*/ -+static gceSTATUS -+_HandleOuterCache( -+ IN gckOS Os, -+ IN gctUINT32 ProcessID, -+ IN gctPHYS_ADDR Handle, -+ IN gctPOINTER Physical, -+ IN gctPOINTER Logical, -+ IN gctSIZE_T Bytes, -+ IN gceCACHEOPERATION Type -+ ) -+{ -+ gceSTATUS status; -+ gctUINT32 i, pageNum; -+ unsigned long paddr; -+ gctPOINTER vaddr; -+ -+ gcmkHEADER_ARG("Os=0x%X ProcessID=%d Handle=0x%X Logical=0x%X Bytes=%lu", -+ Os, ProcessID, Handle, Logical, Bytes); -+ -+ if (Physical != gcvNULL) -+ { -+ /* Non paged memory or gcvPOOL_USER surface */ -+ paddr = (unsigned long) Physical; -+ gcmkONERROR(outer_func(Type, paddr, paddr + Bytes)); -+ } -+ else if ((Handle == gcvNULL) -+ || (Handle != gcvNULL && ((PLINUX_MDL)Handle)->contiguous) -+ ) -+ { -+ /* Video Memory or contiguous virtual memory */ -+ gcmkONERROR(gckOS_GetPhysicalAddress(Os, Logical, (gctUINT32*)&paddr)); -+ gcmkONERROR(outer_func(Type, paddr, paddr + Bytes)); -+ } -+ else -+ { -+ /* Non contiguous virtual memory */ -+ vaddr = (gctPOINTER)gcmALIGN_BASE((gctUINTPTR_T)Logical, PAGE_SIZE); -+ pageNum = GetPageCount(Bytes, 0); -+ -+ for (i = 0; i < pageNum; i += 1) -+ { -+ gcmkONERROR(_ConvertLogical2Physical( -+ Os, -+ vaddr + PAGE_SIZE * i, -+ ProcessID, -+ (PLINUX_MDL)Handle, -+ (gctUINT32*)&paddr -+ )); -+ -+ gcmkONERROR(outer_func(Type, paddr, paddr + PAGE_SIZE)); -+ } -+ } -+ -+ mb(); -+ -+ /* Success. */ -+ gcmkFOOTER_NO(); -+ return gcvSTATUS_OK; -+ -+OnError: -+ /* Return the status. */ -+ gcmkFOOTER(); -+ return status; -+} -+#endif -+#endif -+ +/******************************************************************************* +** gckOS_CacheClean +** @@ -240301,41 +259881,11 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + gcmkVERIFY_ARGUMENT(Logical != gcvNULL); + gcmkVERIFY_ARGUMENT(Bytes > 0); + -+#if !gcdCACHE_FUNCTION_UNIMPLEMENTED -+#ifdef CONFIG_ARM -+ -+ /* Inner cache. */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) -+ dmac_map_area(Logical, Bytes, DMA_TO_DEVICE); -+# else -+ dmac_clean_range(Logical, Logical + Bytes); -+# endif -+ -+#if defined(CONFIG_OUTER_CACHE) -+ /* Outer cache. */ -+#if gcdENABLE_OUTER_CACHE_PATCH -+ _HandleOuterCache(Os, ProcessID, Handle, Physical, Logical, Bytes, gcvCACHE_CLEAN); -+#else -+ outer_clean_range((unsigned long) Handle, (unsigned long) Handle + Bytes); -+#endif -+#endif -+ -+#elif defined(CONFIG_MIPS) -+ -+ dma_cache_wback((unsigned long) Logical, Bytes); -+ -+#elif defined(CONFIG_PPC) -+ -+ /* TODO */ -+ -+#else + dma_sync_single_for_device( + gcvNULL, + (dma_addr_t)Physical, + Bytes, + DMA_TO_DEVICE); -+#endif -+#endif + + /* Success. */ + gcmkFOOTER_NO(); @@ -240384,37 +259934,11 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + gcmkVERIFY_ARGUMENT(Logical != gcvNULL); + gcmkVERIFY_ARGUMENT(Bytes > 0); + -+#if !gcdCACHE_FUNCTION_UNIMPLEMENTED -+#ifdef CONFIG_ARM -+ -+ /* Inner cache. */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) -+ dmac_map_area(Logical, Bytes, DMA_FROM_DEVICE); -+# else -+ dmac_inv_range(Logical, Logical + Bytes); -+# endif -+ -+#if defined(CONFIG_OUTER_CACHE) -+ /* Outer cache. */ -+#if gcdENABLE_OUTER_CACHE_PATCH -+ _HandleOuterCache(Os, ProcessID, Handle, Physical, Logical, Bytes, gcvCACHE_INVALIDATE); -+#else -+ outer_inv_range((unsigned long) Handle, (unsigned long) Handle + Bytes); -+#endif -+#endif -+ -+#elif defined(CONFIG_MIPS) -+ dma_cache_inv((unsigned long) Logical, Bytes); -+#elif defined(CONFIG_PPC) -+ /* TODO */ -+#else + dma_sync_single_for_device( + gcvNULL, + (dma_addr_t)Physical, + Bytes, + DMA_FROM_DEVICE); -+#endif -+#endif + + /* Success. */ + gcmkFOOTER_NO(); @@ -240463,32 +259987,14 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + gcmkVERIFY_ARGUMENT(Logical != gcvNULL); + gcmkVERIFY_ARGUMENT(Bytes > 0); + -+#if !gcdCACHE_FUNCTION_UNIMPLEMENTED -+#ifdef CONFIG_ARM -+ /* Inner cache. */ -+ dmac_flush_range(Logical, Logical + Bytes); -+ -+#if defined(CONFIG_OUTER_CACHE) -+ /* Outer cache. */ -+#if gcdENABLE_OUTER_CACHE_PATCH -+ _HandleOuterCache(Os, ProcessID, Handle, Physical, Logical, Bytes, gcvCACHE_FLUSH); -+#else -+ outer_flush_range((unsigned long) Handle, (unsigned long) Handle + Bytes); -+#endif -+#endif -+ -+#elif defined(CONFIG_MIPS) -+ dma_cache_wback_inv((unsigned long) Logical, Bytes); -+#elif defined(CONFIG_PPC) -+ /* TODO */ -+#else -+ dma_sync_single_for_device( -+ gcvNULL, -+ (dma_addr_t)Physical, -+ Bytes, -+ DMA_BIDIRECTIONAL); -+#endif -+#endif ++ if (Physical != (void *)gcvINVALID_ADDRESS) ++ { ++ dma_sync_single_for_device( ++ gcvNULL, ++ (dma_addr_t)Physical, ++ Bytes, ++ DMA_BIDIRECTIONAL); ++ } + + /* Success. */ + gcmkFOOTER_NO(); @@ -243076,9 +262582,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + return status; +} +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,83 @@ +/**************************************************************************** +* @@ -243163,9 +262669,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +DRIVER_ARGS; + +#endif /* __gc_hal_kernel_os_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_platform.h 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,279 @@ +/**************************************************************************** +* @@ -243446,9 +262952,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + ); + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,1347 @@ +/**************************************************************************** +* @@ -244797,9 +264303,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +module_exit(gpu_exit); + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_security_channel.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,385 @@ +/**************************************************************************** +* @@ -245186,9 +264692,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + gcmkFOOTER(); + return status; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,174 @@ +/**************************************************************************** +* @@ -245364,9 +264870,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne +} + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_sync.h 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,71 @@ +/**************************************************************************** +* @@ -245439,9 +264945,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kerne + ); + +#endif /* __gc_hal_kernel_sync_h_ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,880 @@ +/**************************************************************************** +* @@ -246323,9 +265829,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/fre + *Operations = &platformOperations; +} + -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config +--- linux-4.1.10/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.config 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,15 @@ +EXTRA_CFLAGS += -DgcdDEFAULT_CONTIGUOUS_SIZE=134217728 + @@ -246342,10 +265848,10 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/fre +EXTRA_CFLAGS += -DLINUX_CMA_FSL=1 +ALLOCATOR_ARRAY_H_LOCATION := $(OS_KERNEL_DIR)/allocator/freescale +CUSTOMER_ALLOCATOR_OBJS := $(ALLOCATOR_ARRAY_H_LOCATION)/gc_hal_kernel_allocator_cma.o -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/Kbuild linux-4.1.10/drivers/mxc/gpu-viv/Kbuild ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/Kbuild 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/Kbuild 2015-10-10 16:41:42.769314849 +0200 -@@ -0,0 +1,236 @@ +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/Kbuild xbian-sources-kernel/drivers/mxc/gpu-viv/Kbuild +--- linux-4.1.10/drivers/mxc/gpu-viv/Kbuild 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/Kbuild 2015-10-11 19:49:28.755216589 +0200 +@@ -0,0 +1,230 @@ +############################################################################## +# +# Copyright (C) 2005 - 2013 by Vivante Corp. @@ -246544,12 +266050,6 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/Kbuild linux-4.1.10/drivers/mxc/ +EXTRA_CFLAGS += -DVIVANTE_NO_3D +endif + -+ifeq ($(ENABLE_OUTER_CACHE_PATCH), 1) -+EXTRA_CFLAGS += -DgcdENABLE_OUTER_CACHE_PATCH=1 -+else -+EXTRA_CFLAGS += -DgcdENABLE_OUTER_CACHE_PATCH=0 -+endif -+ +ifeq ($(USE_BANK_ALIGNMENT), 1) + EXTRA_CFLAGS += -DgcdENABLE_BANK_ALIGNMENT=1 + ifneq ($(BANK_BIT_START), 0) @@ -246582,9 +266082,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/Kbuild linux-4.1.10/drivers/mxc/ +galcore-objs := $(OBJS) + +endif -diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/Kconfig linux-4.1.10/drivers/mxc/gpu-viv/Kconfig ---- linux-4.1.10.orig/drivers/mxc/gpu-viv/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/gpu-viv/Kconfig 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/gpu-viv/Kconfig xbian-sources-kernel/drivers/mxc/gpu-viv/Kconfig +--- linux-4.1.10/drivers/mxc/gpu-viv/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/gpu-viv/Kconfig 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,15 @@ +menu "Vivante GPU support" + depends on SOC_IMX6Q @@ -246601,9 +266101,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/gpu-viv/Kconfig linux-4.1.10/drivers/mxc + Say Y to get the GPU driver support. + +endmenu -diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/Kconfig linux-4.1.10/drivers/mxc/hdmi-cec/Kconfig ---- linux-4.1.10.orig/drivers/mxc/hdmi-cec/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/hdmi-cec/Kconfig 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/hdmi-cec/Kconfig xbian-sources-kernel/drivers/mxc/hdmi-cec/Kconfig +--- linux-4.1.10/drivers/mxc/hdmi-cec/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/hdmi-cec/Kconfig 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,11 @@ + +menu "MXC HDMI CEC (Consumer Electronics Control) support" @@ -246616,14 +266116,14 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/Kconfig linux-4.1.10/drivers/mx + The HDMI CEC device implement low level protocol on i.MX6x platforms. + +endmenu -diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/Makefile linux-4.1.10/drivers/mxc/hdmi-cec/Makefile ---- linux-4.1.10.orig/drivers/mxc/hdmi-cec/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/hdmi-cec/Makefile 2015-10-10 16:41:42.769314849 +0200 +diff -Nur linux-4.1.10/drivers/mxc/hdmi-cec/Makefile xbian-sources-kernel/drivers/mxc/hdmi-cec/Makefile +--- linux-4.1.10/drivers/mxc/hdmi-cec/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/hdmi-cec/Makefile 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1 @@ +obj-$(CONFIG_MXC_HDMI_CEC) += mxc_hdmi-cec.o -diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c ---- linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c 2015-10-10 16:41:42.773314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c xbian-sources-kernel/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c +--- linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,795 @@ +/* + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -247420,9 +266920,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c linux-4.1.10/dri +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mxc_hdmi_cec"); + -diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c ---- linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c 2015-10-10 16:41:42.773314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c xbian-sources-kernel/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c +--- linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,765 @@ +/* + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -248189,9 +267689,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.debug.c linux-4.1. +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:mxc_hdmi_cec"); + -diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h ---- linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h 2015-10-10 16:41:42.773314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h xbian-sources-kernel/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h +--- linux-4.1.10/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,53 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -248246,9 +267746,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/hdmi-cec/mxc_hdmi-cec.h linux-4.1.10/dri + +#endif /* !_HDMICEC_H_ */ + -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c linux-4.1.10/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c 2015-10-10 16:41:42.773314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c xbian-sources-kernel/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c +--- linux-4.1.10/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,495 @@ +/* + * Copyright 2009-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -248537,10 +268037,10 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c linux-4.1. + if ((input_frame_width < 4) || (output_frame_width < 4)) + return 1; + -+ irr_opt = div_u64((((u64)(input_frame_width - 1)) << 32), -+ (output_frame_width - 1)); -+ rr_opt = div_u64((((u64)(output_frame_width - 1)) << 32), -+ (input_frame_width - 1)); ++ irr_opt = div_u64((((u64)(input_frame_width)) << 32), ++ (output_frame_width)); ++ rr_opt = div_u64((((u64)(output_frame_width)) << 32), ++ input_frame_width); + + if ((input_m == 0) || (output_m == 0) || (input_f == 0) || (output_f == 0) + || (input_frame_width < (2 * input_f)) @@ -248603,7 +268103,7 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c linux-4.1. + (right->input_width - 1)), (right->output_width - 1)); + left->irr = right->irr = truncate(0, div, 1); + } else { /* with overlap */ -+ onw = truncate(0, (((u64)output_frame_width - 1) << 32) >> 1, ++ onw = truncate(0, (((u64)output_frame_width) << 32) >> 1, + output_f); + inw = truncate(0, onw * irr_opt, input_f); + /* this is the maximal inw which allows the same resizing ratio */ @@ -248654,7 +268154,7 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c linux-4.1. + right->input_width, right->input_column, + right->output_width, + right->output_column, difwr, left->irr); -+ } else { /* independent stripes */ ++ } else { /* independent stripes */ + onw_min = output_frame_width - maximal_stripe_width; + /* onw is a multiple of output_f, in the range */ + /* [max(output_f,output_frame_width-maximal_stripe_width),*/ @@ -248745,9 +268245,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_calc_stripes_sizes.c linux-4.1. + return status; +} +EXPORT_SYMBOL(ipu_calc_stripes_sizes); -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_capture.c linux-4.1.10/drivers/mxc/ipu3/ipu_capture.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_capture.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_capture.c 2015-10-10 16:41:42.773314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_capture.c xbian-sources-kernel/drivers/mxc/ipu3/ipu_capture.c +--- linux-4.1.10/drivers/mxc/ipu3/ipu_capture.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_capture.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,862 @@ +/* + * Copyright 2008-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -249611,9 +269111,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_capture.c linux-4.1.10/drivers/ + ipu_free_irq(ipu, irq, ipu); + dev_dbg(ipu->dev, "CSI stop timeout - %d * 10ms\n", 5 - ret); +} -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_common.c linux-4.1.10/drivers/mxc/ipu3/ipu_common.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_common.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_common.c 2015-10-10 16:41:42.773314850 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_common.c xbian-sources-kernel/drivers/mxc/ipu3/ipu_common.c +--- linux-4.1.10/drivers/mxc/ipu3/ipu_common.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_common.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,3204 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -252819,10 +272319,10 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_common.c linux-4.1.10/drivers/m + +MODULE_DESCRIPTION("i.MX IPU v3 driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_device.c linux-4.1.10/drivers/mxc/ipu3/ipu_device.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_device.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_device.c 2015-10-10 16:41:42.777314851 +0200 -@@ -0,0 +1,3725 @@ +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_device.c xbian-sources-kernel/drivers/mxc/ipu3/ipu_device.c +--- linux-4.1.10/drivers/mxc/ipu3/ipu_device.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_device.c 2015-10-11 19:49:28.771215528 +0200 +@@ -0,0 +1,3726 @@ +/* + * Copyright 2005-2014 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -253640,6 +273140,7 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_device.c linux-4.1.10/drivers/m + break; + } + *stride = width * bytes_per_pixel(fmt); ++ *off &= ~0x7; +} + +static int update_split_setting(struct ipu_task_entry *t, bool vdi_split) @@ -256548,9 +276049,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_device.c linux-4.1.10/drivers/m + major = 0; + } +} -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_disp.c linux-4.1.10/drivers/mxc/ipu3/ipu_disp.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_disp.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_disp.c 2015-10-10 16:41:42.777314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_disp.c xbian-sources-kernel/drivers/mxc/ipu3/ipu_disp.c +--- linux-4.1.10/drivers/mxc/ipu3/ipu_disp.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_disp.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,1956 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -258508,9 +278009,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_disp.c linux-4.1.10/drivers/mxc + _ipu_init_dc_mappings(ipu); + _ipu_dmfc_init(ipu, DMFC_NORMAL, 1); +} -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_ic.c linux-4.1.10/drivers/mxc/ipu3/ipu_ic.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_ic.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_ic.c 2015-10-10 16:41:42.777314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_ic.c xbian-sources-kernel/drivers/mxc/ipu3/ipu_ic.c +--- linux-4.1.10/drivers/mxc/ipu3/ipu_ic.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_ic.c 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,924 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -259436,9 +278937,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_ic.c linux-4.1.10/drivers/mxc/i + + ipu_vdi_write(ipu, reg, VDI_C); +} -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_param_mem.h linux-4.1.10/drivers/mxc/ipu3/ipu_param_mem.h ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_param_mem.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_param_mem.h 2015-10-10 16:41:42.777314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_param_mem.h xbian-sources-kernel/drivers/mxc/ipu3/ipu_param_mem.h +--- linux-4.1.10/drivers/mxc/ipu3/ipu_param_mem.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_param_mem.h 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,921 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -260361,9 +279862,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_param_mem.h linux-4.1.10/driver + return false; +} +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_pixel_clk.c linux-4.1.10/drivers/mxc/ipu3/ipu_pixel_clk.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_pixel_clk.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_pixel_clk.c 2015-10-10 16:41:42.777314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_pixel_clk.c xbian-sources-kernel/drivers/mxc/ipu3/ipu_pixel_clk.c +--- linux-4.1.10/drivers/mxc/ipu3/ipu_pixel_clk.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_pixel_clk.c 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,317 @@ +/* + * Copyright (C) 2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -260682,9 +280183,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_pixel_clk.c linux-4.1.10/driver + + return clk; +} -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_prv.h linux-4.1.10/drivers/mxc/ipu3/ipu_prv.h ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_prv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_prv.h 2015-10-10 16:41:42.777314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_prv.h xbian-sources-kernel/drivers/mxc/ipu3/ipu_prv.h +--- linux-4.1.10/drivers/mxc/ipu3/ipu_prv.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_prv.h 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,371 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -261057,9 +280558,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_prv.h linux-4.1.10/drivers/mxc/ + const char *parent_name, unsigned long flags, + u8 ipu_id, u8 di_id, u8 clk_gate_flags); +#endif /* __INCLUDE_IPU_PRV_H__ */ -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_regs.h linux-4.1.10/drivers/mxc/ipu3/ipu_regs.h ---- linux-4.1.10.orig/drivers/mxc/ipu3/ipu_regs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/ipu_regs.h 2015-10-10 16:41:42.777314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/ipu_regs.h xbian-sources-kernel/drivers/mxc/ipu3/ipu_regs.h +--- linux-4.1.10/drivers/mxc/ipu3/ipu_regs.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/ipu_regs.h 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,749 @@ +/* + * Copyright (C) 2005-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -261810,23 +281311,23 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/ipu_regs.h linux-4.1.10/drivers/mxc +#define WRG (0x01) + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/Kconfig linux-4.1.10/drivers/mxc/ipu3/Kconfig ---- linux-4.1.10.orig/drivers/mxc/ipu3/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/Kconfig 2015-10-10 16:41:42.777314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/Kconfig xbian-sources-kernel/drivers/mxc/ipu3/Kconfig +--- linux-4.1.10/drivers/mxc/ipu3/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/Kconfig 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,2 @@ +config MXC_IPU_V3_FSL + bool -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/Makefile linux-4.1.10/drivers/mxc/ipu3/Makefile ---- linux-4.1.10.orig/drivers/mxc/ipu3/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/Makefile 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/Makefile xbian-sources-kernel/drivers/mxc/ipu3/Makefile +--- linux-4.1.10/drivers/mxc/ipu3/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/Makefile 2015-10-11 19:49:28.771215528 +0200 @@ -0,0 +1,4 @@ +obj-$(CONFIG_MXC_IPU_V3_FSL) = mxc_ipu.o + +mxc_ipu-objs := ipu_common.o ipu_ic.o ipu_disp.o ipu_capture.o ipu_device.o \ + ipu_calc_stripes_sizes.o vdoa.o ipu_pixel_clk.o -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/vdoa.c linux-4.1.10/drivers/mxc/ipu3/vdoa.c ---- linux-4.1.10.orig/drivers/mxc/ipu3/vdoa.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/vdoa.c 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/vdoa.c xbian-sources-kernel/drivers/mxc/ipu3/vdoa.c +--- linux-4.1.10/drivers/mxc/ipu3/vdoa.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/vdoa.c 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,547 @@ +/* + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -262375,9 +281876,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/vdoa.c linux-4.1.10/drivers/mxc/ipu +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("i.MX Video Data Order Adapter(VDOA) driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/vdoa.h linux-4.1.10/drivers/mxc/ipu3/vdoa.h ---- linux-4.1.10.orig/drivers/mxc/ipu3/vdoa.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/ipu3/vdoa.h 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/ipu3/vdoa.h xbian-sources-kernel/drivers/mxc/ipu3/vdoa.h +--- linux-4.1.10/drivers/mxc/ipu3/vdoa.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/ipu3/vdoa.h 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -262448,9 +281949,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/ipu3/vdoa.h linux-4.1.10/drivers/mxc/ipu +void vdoa_get_handle(vdoa_handle_t *handle); +void vdoa_put_handle(vdoa_handle_t *handle); +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/Kconfig linux-4.1.10/drivers/mxc/Kconfig ---- linux-4.1.10.orig/drivers/mxc/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/Kconfig 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/Kconfig xbian-sources-kernel/drivers/mxc/Kconfig +--- linux-4.1.10/drivers/mxc/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/Kconfig 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,25 @@ +# drivers/mxc/Kconfig + @@ -262477,9 +281978,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/Kconfig linux-4.1.10/drivers/mxc/Kconfig +endmenu + +endif -diff -Nur linux-4.1.10.orig/drivers/mxc/Makefile linux-4.1.10/drivers/mxc/Makefile ---- linux-4.1.10.orig/drivers/mxc/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/Makefile 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/Makefile xbian-sources-kernel/drivers/mxc/Makefile +--- linux-4.1.10/drivers/mxc/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/Makefile 2015-10-11 19:49:28.755216589 +0200 @@ -0,0 +1,8 @@ +obj-$(CONFIG_MXC_GPU_VIV) += gpu-viv/ +obj-$(CONFIG_MXC_GPU_VIV_V5) += ../gpu/galcore/ @@ -262489,9 +281990,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/Makefile linux-4.1.10/drivers/mxc/Makefi +obj-$(CONFIG_MXC_HDMI_CEC) += hdmi-cec/ +obj-$(CONFIG_MXC_MIPI_CSI2) += mipi/ +obj-$(CONFIG_MXC_MLB) += mlb/ -diff -Nur linux-4.1.10.orig/drivers/mxc/mipi/Kconfig linux-4.1.10/drivers/mxc/mipi/Kconfig ---- linux-4.1.10.orig/drivers/mxc/mipi/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/mipi/Kconfig 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/mipi/Kconfig xbian-sources-kernel/drivers/mxc/mipi/Kconfig +--- linux-4.1.10/drivers/mxc/mipi/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/mipi/Kconfig 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,14 @@ +# +# MIPI configuration @@ -262507,17 +282008,17 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/mipi/Kconfig linux-4.1.10/drivers/mxc/mi + Say Y to get the MIPI CSI2 support. + +endmenu -diff -Nur linux-4.1.10.orig/drivers/mxc/mipi/Makefile linux-4.1.10/drivers/mxc/mipi/Makefile ---- linux-4.1.10.orig/drivers/mxc/mipi/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/mipi/Makefile 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/mipi/Makefile xbian-sources-kernel/drivers/mxc/mipi/Makefile +--- linux-4.1.10/drivers/mxc/mipi/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/mipi/Makefile 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,4 @@ +# +# Makefile for the mipi interface driver +# +obj-$(CONFIG_MXC_MIPI_CSI2) += mxc_mipi_csi2.o -diff -Nur linux-4.1.10.orig/drivers/mxc/mipi/mxc_mipi_csi2.c linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.c ---- linux-4.1.10.orig/drivers/mxc/mipi/mxc_mipi_csi2.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.c 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.c xbian-sources-kernel/drivers/mxc/mipi/mxc_mipi_csi2.c +--- linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/mipi/mxc_mipi_csi2.c 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,466 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -262985,9 +282486,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/mipi/mxc_mipi_csi2.c linux-4.1.10/driver +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("i.MX MIPI CSI2 driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/mxc/mipi/mxc_mipi_csi2.h linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.h ---- linux-4.1.10.orig/drivers/mxc/mipi/mxc_mipi_csi2.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.h 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.h xbian-sources-kernel/drivers/mxc/mipi/mxc_mipi_csi2.h +--- linux-4.1.10/drivers/mxc/mipi/mxc_mipi_csi2.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/mipi/mxc_mipi_csi2.h 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -263031,9 +282532,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/mipi/mxc_mipi_csi2.h linux-4.1.10/driver +}; + +#endif -diff -Nur linux-4.1.10.orig/drivers/mxc/mlb/Kconfig linux-4.1.10/drivers/mxc/mlb/Kconfig ---- linux-4.1.10.orig/drivers/mxc/mlb/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/mlb/Kconfig 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/mlb/Kconfig xbian-sources-kernel/drivers/mxc/mlb/Kconfig +--- linux-4.1.10/drivers/mxc/mlb/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/mlb/Kconfig 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,17 @@ +# +# MLB150 configuration @@ -263052,18 +282553,18 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/mlb/Kconfig linux-4.1.10/drivers/mxc/mlb + Say Y to get the MLB150 support. + +endmenu -diff -Nur linux-4.1.10.orig/drivers/mxc/mlb/Makefile linux-4.1.10/drivers/mxc/mlb/Makefile ---- linux-4.1.10.orig/drivers/mxc/mlb/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/mlb/Makefile 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/mlb/Makefile xbian-sources-kernel/drivers/mxc/mlb/Makefile +--- linux-4.1.10/drivers/mxc/mlb/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/mlb/Makefile 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,5 @@ +# +# Makefile for the i.MX6Q/DL MLB150 driver +# + +obj-$(CONFIG_MXC_MLB150) += mxc_mlb150.o -diff -Nur linux-4.1.10.orig/drivers/mxc/mlb/mxc_mlb150.c linux-4.1.10/drivers/mxc/mlb/mxc_mlb150.c ---- linux-4.1.10.orig/drivers/mxc/mlb/mxc_mlb150.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/mlb/mxc_mlb150.c 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/mlb/mxc_mlb150.c xbian-sources-kernel/drivers/mxc/mlb/mxc_mlb150.c +--- linux-4.1.10/drivers/mxc/mlb/mxc_mlb150.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/mlb/mxc_mlb150.c 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,2778 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -265843,9 +285344,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/mlb/mxc_mlb150.c linux-4.1.10/drivers/mx +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("MLB150 low level driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/mxc/vpu/Kconfig linux-4.1.10/drivers/mxc/vpu/Kconfig ---- linux-4.1.10.orig/drivers/mxc/vpu/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/vpu/Kconfig 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/vpu/Kconfig xbian-sources-kernel/drivers/mxc/vpu/Kconfig +--- linux-4.1.10/drivers/mxc/vpu/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/vpu/Kconfig 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,31 @@ +# +# Codec configuration @@ -265878,9 +285379,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/vpu/Kconfig linux-4.1.10/drivers/mxc/vpu + This config is used for special VPU use case. + +endmenu -diff -Nur linux-4.1.10.orig/drivers/mxc/vpu/Makefile linux-4.1.10/drivers/mxc/vpu/Makefile ---- linux-4.1.10.orig/drivers/mxc/vpu/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/vpu/Makefile 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/vpu/Makefile xbian-sources-kernel/drivers/mxc/vpu/Makefile +--- linux-4.1.10/drivers/mxc/vpu/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/vpu/Makefile 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,9 @@ +# +# Makefile for the VPU drivers. @@ -265891,9 +285392,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/vpu/Makefile linux-4.1.10/drivers/mxc/vp +ifeq ($(CONFIG_MXC_VPU_DEBUG),y) +EXTRA_CFLAGS += -DDEBUG +endif -diff -Nur linux-4.1.10.orig/drivers/mxc/vpu/mxc_vpu.c linux-4.1.10/drivers/mxc/vpu/mxc_vpu.c ---- linux-4.1.10.orig/drivers/mxc/vpu/mxc_vpu.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/mxc/vpu/mxc_vpu.c 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/mxc/vpu/mxc_vpu.c xbian-sources-kernel/drivers/mxc/vpu/mxc_vpu.c +--- linux-4.1.10/drivers/mxc/vpu/mxc_vpu.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/mxc/vpu/mxc_vpu.c 2015-10-11 19:49:28.775215263 +0200 @@ -0,0 +1,1349 @@ +/* + * Copyright 2006-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -267244,9 +286745,9 @@ diff -Nur linux-4.1.10.orig/drivers/mxc/vpu/mxc_vpu.c linux-4.1.10/drivers/mxc/v + +module_init(vpu_init); +module_exit(vpu_exit); -diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec.h linux-4.1.10/drivers/net/ethernet/freescale/fec.h ---- linux-4.1.10.orig/drivers/net/ethernet/freescale/fec.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/ethernet/freescale/fec.h 2015-10-10 16:41:42.781314851 +0200 +diff -Nur linux-4.1.10/drivers/net/ethernet/freescale/fec.h xbian-sources-kernel/drivers/net/ethernet/freescale/fec.h +--- linux-4.1.10/drivers/net/ethernet/freescale/fec.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/ethernet/freescale/fec.h 2015-10-11 19:49:28.903206779 +0200 @@ -17,6 +17,7 @@ #include <linux/net_tstamp.h> #include <linux/ptp_clock_kernel.h> @@ -267320,9 +286821,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec.h linux-4.1.10/dr unsigned long last_overflow_check; spinlock_t tmreg_lock; struct cyclecounter cc; -diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1.10/drivers/net/ethernet/freescale/fec_main.c ---- linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/ethernet/freescale/fec_main.c 2015-10-10 16:41:42.837314855 +0200 +diff -Nur linux-4.1.10/drivers/net/ethernet/freescale/fec_main.c xbian-sources-kernel/drivers/net/ethernet/freescale/fec_main.c +--- linux-4.1.10/drivers/net/ethernet/freescale/fec_main.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/ethernet/freescale/fec_main.c 2015-10-11 19:49:28.907206514 +0200 @@ -18,7 +18,7 @@ * Bug fixes and cleanup by Philippe De Muyter (phdm@macqel.be) * Copyright (c) 2004-2006 Macq Electronique SA. @@ -267360,7 +286861,127 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. }, { .name = "mvf600-fec", .driver_data = FEC_QUIRK_ENET_MAC, -@@ -2512,6 +2517,28 @@ +@@ -622,7 +627,7 @@ + if (fep->bufdesc_ex) + ebdp->cbd_esc |= BD_ENET_TX_INT; + } +- ++ mb(); + bdp->cbd_sc = status; + + return 0; +@@ -677,7 +682,7 @@ + ebdp->cbd_bdu = 0; + ebdp->cbd_esc = estatus; + } +- ++ mb(); + bdp->cbd_sc = status; + + return 0; +@@ -1192,12 +1197,13 @@ + fec_enet_tx_queue(struct net_device *ndev, u16 queue_id) + { + struct fec_enet_private *fep; +- struct bufdesc *bdp; ++ struct bufdesc *bdp, *bdp_t; + unsigned short status; + struct sk_buff *skb; + struct fec_enet_priv_tx_q *txq; + struct netdev_queue *nq; + int index = 0; ++ int i, bdnum; + int entries_free; + + fep = netdev_priv(ndev); +@@ -1218,18 +1224,28 @@ + if (bdp == txq->cur_tx) + break; + +- index = fec_enet_get_bd_index(txq->tx_bd_base, bdp, fep); +- ++ bdp_t = bdp; ++ bdnum = 1; ++ index = fec_enet_get_bd_index(txq->tx_bd_base, bdp_t, fep); + skb = txq->tx_skbuff[index]; +- txq->tx_skbuff[index] = NULL; +- if (!IS_TSO_HEADER(txq, bdp->cbd_bufaddr)) +- dma_unmap_single(&fep->pdev->dev, bdp->cbd_bufaddr, +- bdp->cbd_datlen, DMA_TO_DEVICE); +- bdp->cbd_bufaddr = 0; +- if (!skb) { +- bdp = fec_enet_get_nextdesc(bdp, fep, queue_id); +- continue; ++ while (!skb) { ++ bdp_t = fec_enet_get_nextdesc(bdp_t, fep, queue_id); ++ index = fec_enet_get_bd_index(txq->tx_bd_base, bdp_t, fep); ++ skb = txq->tx_skbuff[index]; ++ bdnum++; + } ++ if ((status = bdp_t->cbd_sc) & BD_ENET_TX_READY) ++ break; ++ ++ for (i = 0; i < bdnum; i++) { ++ if (!IS_TSO_HEADER(txq, bdp->cbd_bufaddr)) ++ dma_unmap_single(&fep->pdev->dev, bdp->cbd_bufaddr, ++ bdp->cbd_datlen, DMA_TO_DEVICE); ++ bdp->cbd_bufaddr = 0; ++ if (i < bdnum - 1) ++ bdp = fec_enet_get_nextdesc(bdp, fep, queue_id); ++ } ++ txq->tx_skbuff[index] = NULL; + + /* Check for errors. */ + if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC | +@@ -1399,28 +1415,27 @@ + writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT); + + /* Check for errors. */ +- if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO | +- BD_ENET_RX_CR | BD_ENET_RX_OV)) { ++ if (status & BD_ENET_RX_ERROR) { + ndev->stats.rx_errors++; +- if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH)) { +- /* Frame too long or too short. */ +- ndev->stats.rx_length_errors++; +- } +- if (status & BD_ENET_RX_NO) /* Frame alignment */ +- ndev->stats.rx_frame_errors++; +- if (status & BD_ENET_RX_CR) /* CRC Error */ +- ndev->stats.rx_crc_errors++; +- if (status & BD_ENET_RX_OV) /* FIFO overrun */ +- ndev->stats.rx_fifo_errors++; +- } + +- /* Report late collisions as a frame error. +- * On this error, the BD is closed, but we don't know what we +- * have in the buffer. So, just drop this frame on the floor. +- */ +- if (status & BD_ENET_RX_CL) { +- ndev->stats.rx_errors++; +- ndev->stats.rx_frame_errors++; ++ /* Report late collisions as a frame error. ++ * On this error, the BD is closed, but we don't know what we ++ * have in the buffer. So, just drop this frame on the floor. ++ */ ++ if (status & BD_ENET_RX_CL) { ++ ndev->stats.rx_frame_errors++; ++ } else { ++ if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH)) { ++ /* Frame too long or too short. */ ++ ndev->stats.rx_length_errors++; ++ } ++ if (status & BD_ENET_RX_NO) /* Frame alignment */ ++ ndev->stats.rx_frame_errors++; ++ if (status & BD_ENET_RX_CR) /* CRC Error */ ++ ndev->stats.rx_crc_errors++; ++ if (status & BD_ENET_RX_OV) /* FIFO overrun */ ++ ndev->stats.rx_fifo_errors++; ++ } + goto rx_processing_done; + } + +@@ -2512,6 +2527,28 @@ return 0; } @@ -267389,7 +287010,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. static const struct ethtool_ops fec_enet_ethtool_ops = { .get_settings = fec_enet_get_settings, .set_settings = fec_enet_set_settings, -@@ -2532,6 +2559,8 @@ +@@ -2532,6 +2569,8 @@ .set_tunable = fec_enet_set_tunable, .get_wol = fec_enet_get_wol, .set_wol = fec_enet_set_wol, @@ -267398,7 +287019,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. }; static int fec_enet_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) -@@ -2760,10 +2789,29 @@ +@@ -2760,10 +2799,29 @@ return 0; } @@ -267428,7 +287049,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. int ret; pinctrl_pm_select_default_state(&fep->pdev->dev); -@@ -2779,10 +2827,11 @@ +@@ -2779,12 +2837,14 @@ if (ret) goto err_enet_alloc; @@ -267437,14 +287058,18 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. - if (ret) - goto err_enet_mii_probe; + if (!fep->phy_dev) { ++ fec_restart(ndev); + ret = fec_enet_mii_probe(ndev); + if (ret) + goto err_enet_alloc; -+ } ++ } else if (fep->phy_dev->state == PHY_RUNNING) ++ fep->phy_dev->state = PHY_HALTED; - fec_restart(ndev); +- fec_restart(ndev); napi_enable(&fep->napi); -@@ -2792,10 +2841,19 @@ + phy_start(fep->phy_dev); + netif_tx_start_all_queues(ndev); +@@ -2792,10 +2852,19 @@ device_set_wakeup_enable(&ndev->dev, fep->wol_flag & FEC_WOL_FLAG_ENABLE); @@ -267466,7 +287091,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. err_enet_alloc: fec_enet_clk_enable(ndev, false); pinctrl_pm_select_sleep_state(&fep->pdev->dev); -@@ -2819,7 +2877,9 @@ +@@ -2819,7 +2888,9 @@ fep->phy_dev = NULL; fec_enet_clk_enable(ndev, false); @@ -267476,7 +287101,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. fec_enet_free_buffers(ndev); return 0; -@@ -2984,10 +3044,42 @@ +@@ -2984,10 +3055,42 @@ return 0; } @@ -267519,7 +287144,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. .ndo_set_rx_mode = set_multicast_list, .ndo_change_mtu = eth_change_mtu, .ndo_validate_addr = eth_validate_addr, -@@ -3301,6 +3393,7 @@ +@@ -3301,6 +3404,7 @@ fep->bufdesc_ex = false; } @@ -267527,7 +287152,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. ret = fec_enet_clk_enable(ndev, true); if (ret) goto failed_clk; -@@ -3349,13 +3442,17 @@ +@@ -3349,13 +3453,17 @@ /* Carrier starts down, phylib will bring it up */ netif_carrier_off(ndev); @@ -267547,7 +287172,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. device_init_wakeup(&ndev->dev, fep->wol_flag & FEC_WOL_HAS_MAGIC_PACKET); -@@ -3366,6 +3463,8 @@ +@@ -3366,13 +3474,19 @@ INIT_WORK(&fep->tx_timeout_work, fec_enet_timeout_work); return 0; @@ -267556,8 +287181,10 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. failed_register: fec_enet_mii_remove(fep); failed_mii_init: -@@ -3373,6 +3472,8 @@ + failed_irq: failed_init: ++ if (fep->bufdesc_ex) ++ cancel_delayed_work_sync(&fep->time_keep); if (fep->reg_phy) regulator_disable(fep->reg_phy); + if (fep->ptp_clock) @@ -267565,7 +287192,17 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. failed_regulator: fec_enet_clk_enable(ndev, false); failed_clk: -@@ -3399,6 +3500,7 @@ +@@ -3390,7 +3504,8 @@ + struct net_device *ndev = platform_get_drvdata(pdev); + struct fec_enet_private *fep = netdev_priv(ndev); + +- cancel_delayed_work_sync(&fep->time_keep); ++ if (fep->bufdesc_ex) ++ cancel_delayed_work_sync(&fep->time_keep); + cancel_work_sync(&fep->tx_timeout_work); + unregister_netdev(ndev); + fec_enet_mii_remove(fep); +@@ -3399,6 +3514,7 @@ if (fep->ptp_clock) ptp_clock_unregister(fep->ptp_clock); of_node_put(fep->phy_node); @@ -267573,7 +287210,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. free_netdev(ndev); return 0; -@@ -3424,6 +3526,8 @@ +@@ -3424,6 +3540,8 @@ pinctrl_pm_select_sleep_state(&fep->pdev->dev); } rtnl_unlock(); @@ -267582,7 +287219,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. if (fep->reg_phy && !(fep->wol_flag & FEC_WOL_FLAG_ENABLE)) regulator_disable(fep->reg_phy); -@@ -3452,6 +3556,7 @@ +@@ -3452,6 +3570,7 @@ } rtnl_lock(); @@ -267590,7 +287227,7 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. if (netif_running(ndev)) { ret = fec_enet_clk_enable(ndev, true); if (ret) { -@@ -3485,7 +3590,22 @@ +@@ -3485,7 +3604,22 @@ return ret; } @@ -267614,9 +287251,729 @@ diff -Nur linux-4.1.10.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.1. static struct platform_driver fec_driver = { .driver = { -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c 2015-10-10 16:41:42.841314855 +0200 +diff -Nur linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_82575.c xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_82575.c +--- linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_82575.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_82575.c 2015-10-11 19:49:28.971202272 +0200 +@@ -598,13 +598,25 @@ + switch (link_mode) { + case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX: + hw->phy.media_type = e1000_media_type_internal_serdes; ++ if (igb_sgmii_uses_mdio_82575(hw)) { ++ u32 mdicnfg = rd32(E1000_MDICNFG); ++ mdicnfg &= E1000_MDICNFG_PHY_MASK; ++ hw->phy.addr = mdicnfg >> E1000_MDICNFG_PHY_SHIFT; ++ hw_dbg("1000BASE_KX w/ external MDIO device at 0x%x\n", ++ hw->phy.addr); ++ } else { ++ hw_dbg("1000BASE_KX"); ++ } + break; + case E1000_CTRL_EXT_LINK_MODE_SGMII: + /* Get phy control interface type set (MDIO vs. I2C)*/ + if (igb_sgmii_uses_mdio_82575(hw)) { + hw->phy.media_type = e1000_media_type_copper; + dev_spec->sgmii_active = true; ++ hw_dbg("SGMII with external MDIO PHY"); + break; ++ } else { ++ hw_dbg("SGMII with external I2C PHY"); + } + /* fall through for I2C based SGMII */ + case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES: +@@ -621,8 +633,11 @@ + hw->phy.media_type = e1000_media_type_copper; + dev_spec->sgmii_active = true; + } ++ hw_dbg("SERDES with external SFP"); + + break; ++ } else { ++ hw_dbg("SERDES"); + } + + /* do not change link mode for 100BaseFX */ +@@ -2129,7 +2144,7 @@ + if (ret_val) + goto out; + +- ret_val = igb_read_phy_reg_mdic(hw, offset, data); ++ ret_val = igb_read_phy_reg_mdic(hw, hw->phy.addr, offset, data); + + hw->phy.ops.release(hw); + +@@ -2154,7 +2169,7 @@ + if (ret_val) + goto out; + +- ret_val = igb_write_phy_reg_mdic(hw, offset, data); ++ ret_val = igb_write_phy_reg_mdic(hw, hw->phy.addr, offset, data); + + hw->phy.ops.release(hw); + +diff -Nur linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_hw.h xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_hw.h +--- linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_hw.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_hw.h 2015-10-11 19:49:28.971202272 +0200 +@@ -27,6 +27,7 @@ + #include <linux/delay.h> + #include <linux/io.h> + #include <linux/netdevice.h> ++#include <linux/phy.h> + + #include "e1000_regs.h" + #include "e1000_defines.h" +@@ -543,6 +544,12 @@ + struct e1000_mbx_info mbx; + struct e1000_host_mng_dhcp_cookie mng_cookie; + ++#ifdef CONFIG_PHYLIB ++ /* Phylib and MDIO interface */ ++ struct mii_bus *mii_bus; ++ struct phy_device *phy_dev; ++ phy_interface_t phy_interface; ++#endif + union { + struct e1000_dev_spec_82575 _82575; + } dev_spec; +diff -Nur linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_phy.c xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_phy.c +--- linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_phy.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_phy.c 2015-10-11 19:49:28.971202272 +0200 +@@ -132,10 +132,9 @@ + * Reads the MDI control regsiter in the PHY at offset and stores the + * information read to data. + **/ +-s32 igb_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data) ++s32 igb_read_phy_reg_mdic(struct e1000_hw *hw, u8 addr, u32 offset, u16 *data) + { +- struct e1000_phy_info *phy = &hw->phy; +- u32 i, mdic = 0; ++ u32 i, mdicnfg, mdic = 0; + s32 ret_val = 0; + + if (offset > MAX_PHY_REG_ADDRESS) { +@@ -148,11 +147,25 @@ + * Control register. The MAC will take care of interfacing with the + * PHY to retrieve the desired data. + */ +- mdic = ((offset << E1000_MDIC_REG_SHIFT) | +- (phy->addr << E1000_MDIC_PHY_SHIFT) | +- (E1000_MDIC_OP_READ)); ++ switch (hw->mac.type) { ++ case e1000_i210: ++ case e1000_i211: ++ mdicnfg = rd32(E1000_MDICNFG); ++ mdicnfg &= ~(E1000_MDICNFG_PHY_MASK); ++ mdicnfg |= (addr << E1000_MDICNFG_PHY_SHIFT); ++ wr32(E1000_MDICNFG, mdicnfg); ++ mdic = ((offset << E1000_MDIC_REG_SHIFT) | ++ (E1000_MDIC_OP_READ)); ++ break; ++ default: ++ mdic = ((offset << E1000_MDIC_REG_SHIFT) | ++ (addr << E1000_MDIC_PHY_SHIFT) | ++ (E1000_MDIC_OP_READ)); ++ break; ++ } + + wr32(E1000_MDIC, mdic); ++ wrfl(); + + /* Poll the ready bit to see if the MDI read completed + * Increasing the time out as testing showed failures with +@@ -177,6 +190,18 @@ + *data = (u16) mdic; + + out: ++ switch (hw->mac.type) { ++ /* restore MDICNFG to have phy's addr */ ++ case e1000_i210: ++ case e1000_i211: ++ mdicnfg = rd32(E1000_MDICNFG); ++ mdicnfg &= ~(E1000_MDICNFG_PHY_MASK); ++ mdicnfg |= (hw->phy.addr << E1000_MDICNFG_PHY_SHIFT); ++ wr32(E1000_MDICNFG, mdicnfg); ++ break; ++ default: ++ break; ++ } + return ret_val; + } + +@@ -188,10 +213,9 @@ + * + * Writes data to MDI control register in the PHY at offset. + **/ +-s32 igb_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data) ++s32 igb_write_phy_reg_mdic(struct e1000_hw *hw, u8 addr, u32 offset, u16 data) + { +- struct e1000_phy_info *phy = &hw->phy; +- u32 i, mdic = 0; ++ u32 i, mdicnfg, mdic = 0; + s32 ret_val = 0; + + if (offset > MAX_PHY_REG_ADDRESS) { +@@ -204,12 +228,27 @@ + * Control register. The MAC will take care of interfacing with the + * PHY to retrieve the desired data. + */ +- mdic = (((u32)data) | +- (offset << E1000_MDIC_REG_SHIFT) | +- (phy->addr << E1000_MDIC_PHY_SHIFT) | +- (E1000_MDIC_OP_WRITE)); ++ switch (hw->mac.type) { ++ case e1000_i210: ++ case e1000_i211: ++ mdicnfg = rd32(E1000_MDICNFG); ++ mdicnfg &= ~(E1000_MDICNFG_PHY_MASK); ++ mdicnfg |= (addr << E1000_MDICNFG_PHY_SHIFT); ++ wr32(E1000_MDICNFG, mdicnfg); ++ mdic = (((u32)data) | ++ (offset << E1000_MDIC_REG_SHIFT) | ++ (E1000_MDIC_OP_WRITE)); ++ break; ++ default: ++ mdic = (((u32)data) | ++ (offset << E1000_MDIC_REG_SHIFT) | ++ (addr << E1000_MDIC_PHY_SHIFT) | ++ (E1000_MDIC_OP_WRITE)); ++ break; ++ } + + wr32(E1000_MDIC, mdic); ++ wrfl(); + + /* Poll the ready bit to see if the MDI read completed + * Increasing the time out as testing showed failures with +@@ -233,6 +272,18 @@ + } + + out: ++ switch (hw->mac.type) { ++ /* restore MDICNFG to have phy's addr */ ++ case e1000_i210: ++ case e1000_i211: ++ mdicnfg = rd32(E1000_MDICNFG); ++ mdicnfg &= ~(E1000_MDICNFG_PHY_MASK); ++ mdicnfg |= (hw->phy.addr << E1000_MDICNFG_PHY_SHIFT); ++ wr32(E1000_MDICNFG, mdicnfg); ++ break; ++ default: ++ break; ++ } + return ret_val; + } + +@@ -411,7 +462,7 @@ + goto out; + + if (offset > MAX_PHY_MULTI_PAGE_REG) { +- ret_val = igb_write_phy_reg_mdic(hw, ++ ret_val = igb_write_phy_reg_mdic(hw, hw->phy.addr, + IGP01E1000_PHY_PAGE_SELECT, + (u16)offset); + if (ret_val) { +@@ -420,8 +471,8 @@ + } + } + +- ret_val = igb_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, +- data); ++ ret_val = igb_read_phy_reg_mdic(hw, hw->phy.addr, ++ MAX_PHY_REG_ADDRESS & offset, data); + + hw->phy.ops.release(hw); + +@@ -450,7 +501,7 @@ + goto out; + + if (offset > MAX_PHY_MULTI_PAGE_REG) { +- ret_val = igb_write_phy_reg_mdic(hw, ++ ret_val = igb_write_phy_reg_mdic(hw, hw->phy.addr, + IGP01E1000_PHY_PAGE_SELECT, + (u16)offset); + if (ret_val) { +@@ -459,8 +510,8 @@ + } + } + +- ret_val = igb_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, +- data); ++ ret_val = igb_write_phy_reg_mdic(hw, hw->phy.addr, ++ MAX_PHY_REG_ADDRESS & offset, data); + + hw->phy.ops.release(hw); + +@@ -2411,8 +2462,9 @@ + } + + /** +- * igb_write_phy_reg_gs40g - Write GS40G PHY register ++ * igb_write_reg_gs40g - Write GS40G PHY register + * @hw: pointer to the HW structure ++ * @addr: phy address to write to + * @offset: lower half is register offset to write to + * upper half is page to use. + * @data: data to write at register offset +@@ -2420,7 +2472,7 @@ + * Acquires semaphore, if necessary, then writes the data to PHY register + * at the offset. Release any acquired semaphores before exiting. + **/ +-s32 igb_write_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 data) ++s32 igb_write_reg_gs40g(struct e1000_hw *hw, u8 addr, u32 offset, u16 data) + { + s32 ret_val; + u16 page = offset >> GS40G_PAGE_SHIFT; +@@ -2430,10 +2482,10 @@ + if (ret_val) + return ret_val; + +- ret_val = igb_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page); ++ ret_val = igb_write_phy_reg_mdic(hw, addr, GS40G_PAGE_SELECT, page); + if (ret_val) + goto release; +- ret_val = igb_write_phy_reg_mdic(hw, offset, data); ++ ret_val = igb_write_phy_reg_mdic(hw, addr, offset, data); + + release: + hw->phy.ops.release(hw); +@@ -2441,8 +2493,24 @@ + } + + /** +- * igb_read_phy_reg_gs40g - Read GS40G PHY register ++ * igb_write_phy_reg_gs40g - Write GS40G PHY register ++ * @hw: pointer to the HW structure ++ * @offset: lower half is register offset to write to ++ * upper half is page to use. ++ * @data: data to write at register offset ++ * ++ * Acquires semaphore, if necessary, then writes the data to PHY register ++ * at the offset. Release any acquired semaphores before exiting. ++ **/ ++s32 igb_write_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 data) ++{ ++ return igb_write_reg_gs40g(hw, hw->phy.addr, offset, data); ++} ++ ++/** ++ * igb_read_reg_gs40g - Read GS40G PHY register + * @hw: pointer to the HW structure ++ * @addr: phy address to read from + * @offset: lower half is register offset to read to + * upper half is page to use. + * @data: data to read at register offset +@@ -2450,7 +2518,7 @@ + * Acquires semaphore, if necessary, then reads the data in the PHY register + * at the offset. Release any acquired semaphores before exiting. + **/ +-s32 igb_read_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 *data) ++s32 igb_read_reg_gs40g(struct e1000_hw *hw, u8 addr, u32 offset, u16 *data) + { + s32 ret_val; + u16 page = offset >> GS40G_PAGE_SHIFT; +@@ -2460,10 +2528,10 @@ + if (ret_val) + return ret_val; + +- ret_val = igb_write_phy_reg_mdic(hw, GS40G_PAGE_SELECT, page); ++ ret_val = igb_write_phy_reg_mdic(hw, addr, GS40G_PAGE_SELECT, page); + if (ret_val) + goto release; +- ret_val = igb_read_phy_reg_mdic(hw, offset, data); ++ ret_val = igb_read_phy_reg_mdic(hw, addr, offset, data); + + release: + hw->phy.ops.release(hw); +@@ -2471,6 +2539,21 @@ + } + + /** ++ * igb_read_phy_reg_gs40g - Read GS40G PHY register ++ * @hw: pointer to the HW structure ++ * @offset: lower half is register offset to read to ++ * upper half is page to use. ++ * @data: data to read at register offset ++ * ++ * Acquires semaphore, if necessary, then reads the data in the PHY register ++ * at the offset. Release any acquired semaphores before exiting. ++ **/ ++s32 igb_read_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 *data) ++{ ++ return igb_read_reg_gs40g(hw, hw->phy.addr, offset, data); ++} ++ ++/** + * igb_set_master_slave_mode - Setup PHY for Master/slave mode + * @hw: pointer to the HW structure + * +diff -Nur linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_phy.h xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_phy.h +--- linux-4.1.10/drivers/net/ethernet/intel/igb/e1000_phy.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/ethernet/intel/igb/e1000_phy.h 2015-10-11 19:49:28.971202272 +0200 +@@ -61,8 +61,8 @@ + void igb_power_up_phy_copper(struct e1000_hw *hw); + void igb_power_down_phy_copper(struct e1000_hw *hw); + s32 igb_phy_init_script_igp3(struct e1000_hw *hw); +-s32 igb_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data); +-s32 igb_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data); ++s32 igb_read_phy_reg_mdic(struct e1000_hw *hw, u8 addr, u32 offset, u16 *data); ++s32 igb_write_phy_reg_mdic(struct e1000_hw *hw, u8 addr, u32 offset, u16 data); + s32 igb_read_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 *data); + s32 igb_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data); + s32 igb_read_sfp_data_byte(struct e1000_hw *hw, u16 offset, u8 *data); +@@ -72,6 +72,8 @@ + s32 igb_get_cable_length_82580(struct e1000_hw *hw); + s32 igb_read_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 *data); + s32 igb_write_phy_reg_gs40g(struct e1000_hw *hw, u32 offset, u16 data); ++s32 igb_read_reg_gs40g(struct e1000_hw *hw, u8 addr, u32 offset, u16 *data); ++s32 igb_write_reg_gs40g(struct e1000_hw *hw, u8 addr, u32 offset, u16 data); + s32 igb_check_polarity_m88(struct e1000_hw *hw); + + /* IGP01E1000 Specific Registers */ +diff -Nur linux-4.1.10/drivers/net/ethernet/intel/igb/igb_main.c xbian-sources-kernel/drivers/net/ethernet/intel/igb/igb_main.c +--- linux-4.1.10/drivers/net/ethernet/intel/igb/igb_main.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/ethernet/intel/igb/igb_main.c 2015-10-11 19:49:28.975202007 +0200 +@@ -41,6 +41,7 @@ + #include <linux/if_vlan.h> + #include <linux/pci.h> + #include <linux/pci-aspm.h> ++#include <linux/phy.h> + #include <linux/delay.h> + #include <linux/interrupt.h> + #include <linux/ip.h> +@@ -2228,6 +2229,148 @@ + return status; + } + ++#ifdef CONFIG_PHYLIB ++/* ++ * MMIO/PHYdev support ++ */ ++ ++static int igb_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) ++{ ++ struct e1000_hw *hw = bus->priv; ++ u16 out; ++ int err; ++ ++ err = igb_read_reg_gs40g(hw, mii_id, regnum, &out); ++ if (err) ++ return err; ++ return out; ++} ++ ++static int igb_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum, ++ u16 val) ++{ ++ struct e1000_hw *hw = bus->priv; ++ ++ return igb_write_reg_gs40g(hw, mii_id, regnum, val); ++} ++ ++static int igb_enet_mdio_reset(struct mii_bus *bus) ++{ ++ udelay(300); ++ return 0; ++} ++ ++static void igb_enet_mii_link(struct net_device *netdev) ++{ ++} ++ ++/* Probe the mdio bus for phys and connect them */ ++static int igb_enet_mii_probe(struct net_device *netdev) ++{ ++ struct igb_adapter *adapter = netdev_priv(netdev); ++ struct e1000_hw *hw = &adapter->hw; ++ struct phy_device *phy_dev = NULL; ++ int phy_id; ++ ++ /* check for attached phy */ ++ for (phy_id = 0; (phy_id < PHY_MAX_ADDR); phy_id++) { ++ if (hw->mii_bus->phy_map[phy_id]) { ++ phy_dev = hw->mii_bus->phy_map[phy_id]; ++ break; ++ } ++ } ++ if (!phy_dev) { ++ netdev_err(netdev, "no PHY found\n"); ++ return -ENODEV; ++ } ++ ++ hw->phy_interface = PHY_INTERFACE_MODE_RGMII; ++ phy_dev = phy_connect(netdev, dev_name(&phy_dev->dev), ++ igb_enet_mii_link, hw->phy_interface); ++ if (IS_ERR(phy_dev)) { ++ netdev_err(netdev, "could not attach to PHY\n"); ++ return PTR_ERR(phy_dev); ++ } ++ ++ hw->phy_dev = phy_dev; ++ netdev_info(netdev, "igb PHY driver [%s] (mii_bus:phy_addr=%s)\n", ++ hw->phy_dev->drv->name, dev_name(&hw->phy_dev->dev)); ++ ++ return 0; ++} ++ ++/* Create and register mdio bus */ ++static int igb_enet_mii_init(struct pci_dev *pdev) ++{ ++ struct mii_bus *mii_bus; ++ struct net_device *netdev = pci_get_drvdata(pdev); ++ struct igb_adapter *adapter = netdev_priv(netdev); ++ struct e1000_hw *hw = &adapter->hw; ++ int err; ++ ++ mii_bus = mdiobus_alloc(); ++ if (mii_bus == NULL) { ++ err = -ENOMEM; ++ goto err_out; ++ } ++ ++ mii_bus->name = "igb_enet_mii_bus"; ++ mii_bus->read = igb_enet_mdio_read; ++ mii_bus->write = igb_enet_mdio_write; ++ mii_bus->reset = igb_enet_mdio_reset; ++ snprintf(mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", ++ pci_name(pdev), hw->device_id + 1); ++ mii_bus->priv = hw; ++ mii_bus->parent = &pdev->dev; ++ mii_bus->phy_mask = ~(1 << hw->phy.addr); ++ ++ err = mdiobus_register(mii_bus); ++ if (err) { ++ printk(KERN_ERR "failed to register mii_bus: %d\n", err); ++ goto err_out_free_mdiobus; ++ } ++ hw->mii_bus = mii_bus; ++ ++ return 0; ++ ++err_out_free_mdiobus: ++ mdiobus_free(mii_bus); ++err_out: ++ return err; ++} ++ ++static void igb_enet_mii_remove(struct e1000_hw *hw) ++{ ++ if (hw->mii_bus) { ++ mdiobus_unregister(hw->mii_bus); ++ mdiobus_free(hw->mii_bus); ++ } ++} ++#endif /* CONFIG_PHYLIB */ ++ ++/** ++ * igb_read_mac_addr_dts - Read mac addres from the device tree ++ * blob ++ * @adapter: pointer to adapter structure ++ **/ ++static void igb_read_mac_addr_dts(struct e1000_hw *hw) ++{ ++ struct device_node *dn; ++ const uint8_t *mac; ++ ++ dn = of_find_compatible_node(NULL, NULL, "intel,i211"); ++ ++ if (!dn) ++ return; ++ ++ mac = of_get_property(dn, "local-mac-address", NULL); ++ ++ if (mac) ++ memcpy(hw->mac.addr, mac, ETH_ALEN); ++ ++ return; ++} ++ + /** + * igb_probe - Device Initialization Routine + * @pdev: PCI device information struct +@@ -2430,6 +2573,14 @@ + if (hw->mac.ops.read_mac_addr(hw)) + dev_err(&pdev->dev, "NVM Read Error\n"); + ++ if (!is_valid_ether_addr(hw->mac.addr)) ++ igb_read_mac_addr_dts(hw); ++ ++ if (!is_valid_ether_addr(hw->mac.addr)) { ++ dev_info(&pdev->dev, "Random MAC Address\n"); ++ random_ether_addr(hw->mac.addr); ++ } ++ + memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); + + if (!is_valid_ether_addr(netdev->dev_addr)) { +@@ -2650,6 +2801,13 @@ + } + } + pm_runtime_put_noidle(&pdev->dev); ++ ++#ifdef CONFIG_PHYLIB ++ /* create and register the mdio bus if using ext phy */ ++ if (rd32(E1000_MDICNFG) & E1000_MDICNFG_EXT_MDIO) ++ igb_enet_mii_init(pdev); ++#endif ++ + return 0; + + err_register: +@@ -2793,6 +2951,10 @@ + struct e1000_hw *hw = &adapter->hw; + + pm_runtime_get_noresume(&pdev->dev); ++#ifdef CONFIG_PHYLIB ++ if (rd32(E1000_MDICNFG) & E1000_MDICNFG_EXT_MDIO) ++ igb_enet_mii_remove(hw); ++#endif + #ifdef CONFIG_IGB_HWMON + igb_sysfs_exit(adapter); + #endif +@@ -3106,6 +3268,12 @@ + if (!resuming) + pm_runtime_put(&pdev->dev); + ++#ifdef CONFIG_PHYLIB ++ /* Probe and connect to PHY if using ext phy */ ++ if (rd32(E1000_MDICNFG) & E1000_MDICNFG_EXT_MDIO) ++ igb_enet_mii_probe(netdev); ++#endif ++ + /* start the watchdog. */ + hw->mac.get_link_status = 1; + schedule_work(&adapter->watchdog_task); +@@ -7140,21 +7308,41 @@ + static int igb_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) + { + struct igb_adapter *adapter = netdev_priv(netdev); ++ struct e1000_hw *hw = &adapter->hw; + struct mii_ioctl_data *data = if_mii(ifr); + +- if (adapter->hw.phy.media_type != e1000_media_type_copper) ++ if (adapter->hw.phy.media_type != e1000_media_type_copper && ++ !(rd32(E1000_MDICNFG) & E1000_MDICNFG_EXT_MDIO)) + return -EOPNOTSUPP; + + switch (cmd) { + case SIOCGMIIPHY: +- data->phy_id = adapter->hw.phy.addr; ++ data->phy_id = hw->phy.addr; + break; + case SIOCGMIIREG: +- if (igb_read_phy_reg(&adapter->hw, data->reg_num & 0x1F, +- &data->val_out)) +- return -EIO; ++ if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) { ++ if (igb_read_reg_gs40g(hw, data->phy_id, ++ data->reg_num & 0x1F, ++ &data->val_out)) ++ return -EIO; ++ } else { ++ if (igb_read_phy_reg(hw, data->reg_num & 0x1F, ++ &data->val_out)) ++ return -EIO; ++ } + break; + case SIOCSMIIREG: ++ if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) { ++ if (igb_write_reg_gs40g(hw, data->phy_id, ++ data->reg_num & 0x1F, ++ data->val_in)) ++ return -EIO; ++ } else { ++ if (igb_write_phy_reg(hw, data->reg_num & 0x1F, ++ data->val_in)) ++ return -EIO; ++ } ++ break; + default: + return -EOPNOTSUPP; + } +diff -Nur linux-4.1.10/drivers/net/phy/phy.c xbian-sources-kernel/drivers/net/phy/phy.c +--- linux-4.1.10/drivers/net/phy/phy.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/phy/phy.c 2015-10-11 19:49:29.119192462 +0200 +@@ -58,6 +58,31 @@ + } + } + ++#define PHY_STATE_STR(_state) \ ++ case PHY_##_state: \ ++ return __stringify(_state); \ ++ ++static const char *phy_state_to_str(enum phy_state st) ++{ ++ switch (st) { ++ PHY_STATE_STR(DOWN) ++ PHY_STATE_STR(STARTING) ++ PHY_STATE_STR(READY) ++ PHY_STATE_STR(PENDING) ++ PHY_STATE_STR(UP) ++ PHY_STATE_STR(AN) ++ PHY_STATE_STR(RUNNING) ++ PHY_STATE_STR(NOLINK) ++ PHY_STATE_STR(FORCING) ++ PHY_STATE_STR(CHANGELINK) ++ PHY_STATE_STR(HALTED) ++ PHY_STATE_STR(RESUMING) ++ } ++ ++ return NULL; ++} ++ ++ + /** + * phy_print_status - Convenience function to print out the current phy status + * @phydev: the phy_device struct +@@ -784,10 +809,14 @@ + struct phy_device *phydev = + container_of(dwork, struct phy_device, state_queue); + bool needs_aneg = false, do_suspend = false; ++ enum phy_state old_state; + int err = 0; ++ int old_link; + + mutex_lock(&phydev->lock); + ++ old_state = phydev->state; ++ + if (phydev->drv->link_change_notify) + phydev->drv->link_change_notify(phydev); + +@@ -868,11 +897,18 @@ + phydev->adjust_link(phydev->attached_dev); + break; + case PHY_RUNNING: +- /* Only register a CHANGE if we are +- * polling or ignoring interrupts ++ /* Only register a CHANGE if we are polling or ignoring ++ * interrupts and link changed since latest checking. + */ +- if (!phy_interrupt_is_valid(phydev)) +- phydev->state = PHY_CHANGELINK; ++ if (!phy_interrupt_is_valid(phydev)) { ++ old_link = phydev->link; ++ err = phy_read_status(phydev); ++ if (err) ++ break; ++ ++ if (old_link != phydev->link) ++ phydev->state = PHY_CHANGELINK; ++ } + break; + case PHY_CHANGELINK: + err = phy_read_status(phydev); +@@ -952,6 +988,9 @@ + if (err < 0) + phy_error(phydev); + ++ dev_dbg(&phydev->dev, "PHY state change %s -> %s\n", ++ phy_state_to_str(old_state), phy_state_to_str(phydev->state)); ++ + queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, + PHY_STATE_TIME * HZ); + } +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c 2015-10-11 19:49:29.383174964 +0200 @@ -33,6 +33,7 @@ #include <linux/suspend.h> #include <linux/errno.h> @@ -267714,9 +288071,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c lin return 0; } -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c 2015-10-11 19:49:29.387174699 +0200 @@ -52,8 +52,6 @@ #define BRCMF_PNO_SCAN_COMPLETE 1 #define BRCMF_PNO_SCAN_INCOMPLETE 0 @@ -268396,9 +288753,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c l wl_deinit_priv(cfg); brcmf_free_wiphy(cfg->wiphy); } -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/chip.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/chip.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/chip.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/chip.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/chip.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/chip.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/chip.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/chip.c 2015-10-11 19:49:29.387174699 +0200 @@ -649,6 +649,7 @@ case BRCM_CC_43567_CHIP_ID: case BRCM_CC_43569_CHIP_ID: @@ -268407,9 +288764,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/chip.c linux case BRCM_CC_43602_CHIP_ID: return 0x180000; default: -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/commonring.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/commonring.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/commonring.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/commonring.c 2015-10-11 19:49:29.387174699 +0200 @@ -22,17 +22,6 @@ #include "core.h" #include "commonring.h" @@ -268482,9 +288839,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/commonring.c if (commonring->cr_write_rptr) return commonring->cr_write_rptr(commonring->cr_ctx); -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/commonring.h linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.h ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/commonring.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.h 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.h xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/commonring.h +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/commonring.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/commonring.h 2015-10-11 19:49:29.387174699 +0200 @@ -62,7 +62,8 @@ u16 n_items); void *brcmf_commonring_get_read_ptr(struct brcmf_commonring *commonring, @@ -268495,9 +288852,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/commonring.h #define brcmf_commonring_n_items(commonring) (commonring->depth) #define brcmf_commonring_len_item(commonring) (commonring->item_len) -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/core.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/core.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/core.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/core.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/core.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/core.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/core.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/core.c 2015-10-11 19:49:29.387174699 +0200 @@ -867,8 +867,6 @@ } /* unregister will take care of freeing it */ @@ -268516,9 +288873,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/core.c linux brcmf_bus_change_state(bus_if, BRCMF_BUS_DOWN); -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/debug.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/debug.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/debug.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/debug.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/debug.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/debug.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/debug.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/debug.c 2015-10-11 19:49:29.387174699 +0200 @@ -41,15 +41,6 @@ root_folder = NULL; } @@ -268592,9 +288949,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/debug.c linu + drvr->dbgfs_dir, read_fn); + return PTR_ERR_OR_ZERO(e); } -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/feature.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/feature.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/feature.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/feature.c 2015-10-11 19:49:29.387174699 +0200 @@ -124,10 +124,12 @@ struct brcmf_if *ifp = drvr->iflist[0]; @@ -268608,9 +288965,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/feature.c li /* set chip related quirks */ switch (drvr->bus_if->chip) { -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/feature.h linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.h ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/feature.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.h 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.h xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/feature.h +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/feature.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/feature.h 2015-10-11 19:49:29.387174699 +0200 @@ -19,12 +19,18 @@ /* * Features: @@ -268631,9 +288988,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/feature.h li /* * Quirks: * -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/firmware.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/firmware.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/firmware.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/firmware.c 2015-10-11 19:49:29.387174699 +0200 @@ -23,6 +23,10 @@ #include "debug.h" #include "firmware.h" @@ -269026,9 +289383,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/firmware.c l + 0); +} + -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/firmware.h linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.h ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/firmware.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.h 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.h xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/firmware.h +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/firmware.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/firmware.h 2015-10-11 19:49:29.387174699 +0200 @@ -32,6 +32,12 @@ * fails it will not use the callback, but call device_release_driver() * instead which will call the driver .remove() callback. @@ -269042,9 +289399,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/firmware.h l int brcmf_fw_get_firmwares(struct device *dev, u16 flags, const char *code, const char *nvram, void (*fw_cb)(struct device *dev, -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/flowring.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/flowring.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/flowring.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/flowring.c 2015-10-11 19:49:29.387174699 +0200 @@ -249,8 +249,8 @@ } @@ -269064,9 +289421,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/flowring.c l } -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/flowring.h linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.h ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/flowring.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.h 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.h xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/flowring.h +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/flowring.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/flowring.h 2015-10-11 19:49:29.387174699 +0200 @@ -64,8 +64,8 @@ void brcmf_flowring_delete(struct brcmf_flowring *flow, u8 flowid); void brcmf_flowring_open(struct brcmf_flowring *flow, u8 flowid); @@ -269078,9 +289435,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/flowring.h l struct sk_buff *brcmf_flowring_dequeue(struct brcmf_flowring *flow, u8 flowid); void brcmf_flowring_reinsert(struct brcmf_flowring *flow, u8 flowid, struct sk_buff *skb); -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h 2015-10-11 19:49:29.387174699 +0200 @@ -32,7 +32,11 @@ #define BRCMF_BSS_INFO_VERSION 109 /* curr ver of brcmf_bss_info_le struct */ #define BRCMF_BSS_RSSI_ON_CHANNEL 0x0002 @@ -269182,9 +289539,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/fwil_types.h }; struct brcmf_chanspec_list { -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c 2015-10-11 19:49:29.387174699 +0200 @@ -635,7 +635,7 @@ return 0; } @@ -269194,9 +289551,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c l u32 slot_id, struct sk_buff **pktout, bool remove_item) { -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c 2015-10-11 19:49:29.387174699 +0200 @@ -73,8 +73,10 @@ #define BRCMF_MSGBUF_TX_FLUSH_CNT1 32 #define BRCMF_MSGBUF_TX_FLUSH_CNT2 96 @@ -269284,9 +289641,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c lin if (commonring->r_ptr == 0) goto again; -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/of.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/of.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/of.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/of.c 2015-10-10 16:41:42.845314853 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/of.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/of.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/of.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/of.c 2015-10-11 19:49:29.387174699 +0200 @@ -39,10 +39,16 @@ if (!sdiodev->pdata) return; @@ -269313,9 +289670,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/of.c linux-4 - if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) - sdiodev->pdata->drive_strength = val; } -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/p2p.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/p2p.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/p2p.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/p2p.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/p2p.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/p2p.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/p2p.c 2015-10-11 19:49:29.387174699 +0200 @@ -16,6 +16,7 @@ #include <linux/slab.h> #include <linux/netdevice.h> @@ -269551,9 +289908,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/p2p.c linux- + memset(p2p, 0, sizeof(*p2p)); +} + -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/pcie.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/pcie.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/pcie.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/pcie.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/pcie.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/pcie.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/pcie.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/pcie.c 2015-10-11 19:49:29.387174699 +0200 @@ -51,6 +51,8 @@ #define BRCMF_PCIE_4356_NVRAM_NAME "brcm/brcmfmac4356-pcie.txt" #define BRCMF_PCIE_43570_FW_NAME "brcm/brcmfmac43570-pcie.bin" @@ -269956,9 +290313,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/pcie.c linux { /* end: all zeroes */ } }; -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/sdio.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/sdio.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/sdio.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/sdio.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/sdio.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/sdio.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/sdio.c 2015-10-11 19:49:29.391174434 +0200 @@ -601,6 +601,8 @@ #define BCM43241B0_NVRAM_NAME "brcm/brcmfmac43241b0-sdio.txt" #define BCM43241B4_FIRMWARE_NAME "brcm/brcmfmac43241b4-sdio.bin" @@ -270025,9 +290382,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/sdio.c linux /* Count the interrupt call */ bus->sdcnt.intrcount++; if (in_interrupt()) -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/usb.c linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/usb.c ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/usb.c xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/usb.c +--- linux-4.1.10/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2015-10-11 19:49:29.391174434 +0200 @@ -1270,8 +1270,13 @@ bus->chiprev = bus_pub->chiprev; @@ -270044,9 +290401,9 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/brcmfmac/usb.c linux- return 0; fail: -diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h linux-4.1.10/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h ---- linux-4.1.10.orig/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h xbian-sources-kernel/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h +--- linux-4.1.10/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h 2015-10-11 19:49:29.407173373 +0200 @@ -45,6 +45,7 @@ #define BRCM_CC_43567_CHIP_ID 43567 #define BRCM_CC_43569_CHIP_ID 43569 @@ -270067,9 +290424,39 @@ diff -Nur linux-4.1.10.orig/drivers/net/wireless/brcm80211/include/brcm_hw_ids.h /* brcmsmac IDs */ #define BCM4313_D11N2G_ID 0x4727 /* 4313 802.11n 2.4G device */ -diff -Nur linux-4.1.10.orig/drivers/power/reset/Kconfig linux-4.1.10/drivers/power/reset/Kconfig ---- linux-4.1.10.orig/drivers/power/reset/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/power/reset/Kconfig 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/pci/host/pci-imx6.c xbian-sources-kernel/drivers/pci/host/pci-imx6.c +--- linux-4.1.10/drivers/pci/host/pci-imx6.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/pci/host/pci-imx6.c 2015-10-11 19:49:29.567162768 +0200 +@@ -240,6 +240,8 @@ + val |= PCIE_PL_PFLR_FORCE_LINK; + writel(val, pp->dbi_base + PCIE_PL_PFLR); + ++ usleep_range(30, 50); ++ + regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, + IMX6Q_GPR12_PCIE_CTL_2, 0 << 10); + } +diff -Nur linux-4.1.10/drivers/pci/quirks.c xbian-sources-kernel/drivers/pci/quirks.c +--- linux-4.1.10/drivers/pci/quirks.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/pci/quirks.c 2015-10-11 19:49:29.579161973 +0200 +@@ -2869,6 +2869,14 @@ + DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800, + PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class); + ++static void fixup_tw6869_class(struct pci_dev* dev) ++{ ++ dev_info(&dev->dev, "Setting PCI class for tw6868 PCIe device\n"); ++ dev->class = PCI_CLASS_MULTIMEDIA_VIDEO; ++} ++DECLARE_PCI_FIXUP_CLASS_EARLY(0x1797, 0x6869, ++ PCI_CLASS_NOT_DEFINED, 0, fixup_tw6869_class); ++ + /* Some PCIe devices do not work reliably with the claimed maximum + * payload size supported. + */ +diff -Nur linux-4.1.10/drivers/power/reset/Kconfig xbian-sources-kernel/drivers/power/reset/Kconfig +--- linux-4.1.10/drivers/power/reset/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/power/reset/Kconfig 2015-10-11 19:49:29.651157201 +0200 @@ -124,6 +124,14 @@ Power off and restart support for ARM Versatile family of reference boards. @@ -270085,9 +290472,9 @@ diff -Nur linux-4.1.10.orig/drivers/power/reset/Kconfig linux-4.1.10/drivers/pow config POWER_RESET_VEXPRESS bool "ARM Versatile Express power-off and reset driver" depends on ARM || ARM64 -diff -Nur linux-4.1.10.orig/drivers/power/reset/Makefile linux-4.1.10/drivers/power/reset/Makefile ---- linux-4.1.10.orig/drivers/power/reset/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/power/reset/Makefile 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/power/reset/Makefile xbian-sources-kernel/drivers/power/reset/Makefile +--- linux-4.1.10/drivers/power/reset/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/power/reset/Makefile 2015-10-11 19:49:29.651157201 +0200 @@ -13,6 +13,7 @@ obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o obj-$(CONFIG_POWER_RESET_ST) += st-poweroff.o @@ -270096,9 +290483,9 @@ diff -Nur linux-4.1.10.orig/drivers/power/reset/Makefile linux-4.1.10/drivers/po obj-$(CONFIG_POWER_RESET_VEXPRESS) += vexpress-poweroff.o obj-$(CONFIG_POWER_RESET_XGENE) += xgene-reboot.o obj-$(CONFIG_POWER_RESET_KEYSTONE) += keystone-reset.o -diff -Nur linux-4.1.10.orig/drivers/power/reset/snvs-poweroff.c linux-4.1.10/drivers/power/reset/snvs-poweroff.c ---- linux-4.1.10.orig/drivers/power/reset/snvs-poweroff.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/power/reset/snvs-poweroff.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/power/reset/snvs-poweroff.c xbian-sources-kernel/drivers/power/reset/snvs-poweroff.c +--- linux-4.1.10/drivers/power/reset/snvs-poweroff.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/power/reset/snvs-poweroff.c 2015-10-11 19:49:29.655156936 +0200 @@ -0,0 +1,59 @@ +/* + * Power off by restarting and let u-boot keep hold of the machine @@ -270159,9 +290546,538 @@ diff -Nur linux-4.1.10.orig/drivers/power/reset/snvs-poweroff.c linux-4.1.10/dri + }, +}; +module_platform_driver(snvs_poweroff_driver); -diff -Nur linux-4.1.10.orig/drivers/rtc/rtc-snvs.c linux-4.1.10/drivers/rtc/rtc-snvs.c ---- linux-4.1.10.orig/drivers/rtc/rtc-snvs.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/rtc/rtc-snvs.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/regulator/Kconfig xbian-sources-kernel/drivers/regulator/Kconfig +--- linux-4.1.10/drivers/regulator/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/regulator/Kconfig 2015-10-11 19:49:29.695154284 +0200 +@@ -316,6 +316,13 @@ + The MAX14577 regulators include safeout LDO and charger current + regulator. The MAX77836 has two additional LDOs. + ++config REGULATOR_LTC3676 ++ tristate "LTC3676 regulator driver" ++ depends on I2C ++ select REGMAP_I2C ++ help ++ Say y here to support for the LTC3676 regulators controlled via I2C. ++ + config REGULATOR_MAX1586 + tristate "Maxim 1586/1587 voltage regulator" + depends on I2C +diff -Nur linux-4.1.10/drivers/regulator/ltc3676.c xbian-sources-kernel/drivers/regulator/ltc3676.c +--- linux-4.1.10/drivers/regulator/ltc3676.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/regulator/ltc3676.c 2015-10-11 19:49:29.763149777 +0200 +@@ -0,0 +1,497 @@ ++/* ++ * Copyright (C) 2014 Gateworks Corporation, Inc. All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#include <linux/i2c.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/module.h> ++#include <linux/kernel.h> ++#include <linux/of.h> ++#include <linux/regmap.h> ++#include <linux/regulator/driver.h> ++#include <linux/regulator/of_regulator.h> ++ ++#define DRIVER_NAME "ltc3676" ++ ++/* LTC3676 Registers */ ++#define LTC3676_BUCK1 0x01 ++#define LTC3676_BUCK2 0x02 ++#define LTC3676_BUCK3 0x03 ++#define LTC3676_BUCK4 0x04 ++#define LTC3676_LDOA 0x05 ++#define LTC3676_LDOB 0x06 ++#define LTC3676_SQD1 0x07 ++#define LTC3676_SQD2 0x08 ++#define LTC3676_CNTRL 0x09 ++#define LTC3676_DVB1A 0x0A ++#define LTC3676_DVB1B 0x0B ++#define LTC3676_DVB2A 0x0C ++#define LTC3676_DVB2B 0x0D ++#define LTC3676_DVB3A 0x0E ++#define LTC3676_DVB3B 0x0F ++#define LTC3676_DVB4A 0x10 ++#define LTC3676_DVB4B 0x11 ++#define LTC3676_MSKIRQ 0x12 ++#define LTC3676_MSKPG 0x13 ++#define LTC3676_USER 0x14 ++#define LTC3676_IRQSTAT 0x15 ++#define LTC3676_PGSTATL 0x16 ++#define LTC3676_PGSTATRT 0x17 ++#define LTC3676_HRST 0x1E ++#define LTC3676_CLIRQ 0x1F ++ ++#define LTC3676_IRQSTAT_PGOOD_TIMEOUT BIT(3) ++#define LTC3676_IRQSTAT_UNDERVOLT_WARN BIT(4) ++#define LTC3676_IRQSTAT_UNDERVOLT_FAULT BIT(5) ++#define LTC3676_IRQSTAT_THERMAL_WARN BIT(6) ++#define LTC3676_IRQSTAT_THERMAL_FAULT BIT(7) ++ ++enum ltc3676_reg { ++ LTC3676_SW1, ++ LTC3676_SW2, ++ LTC3676_SW3, ++ LTC3676_SW4, ++ LTC3676_LDO1, ++ LTC3676_LDO2, ++ LTC3676_LDO3, ++ LTC3676_LDO4, ++ LTC3676_NUM_REGULATORS, ++}; ++ ++struct ltc3676_regulator { ++ struct regulator_desc desc; ++ struct device_node *np; ++ ++ /* External feedback voltage divider */ ++ unsigned int r1; ++ unsigned int r2; ++}; ++ ++struct ltc3676 { ++ struct regmap *regmap; ++ struct device *dev; ++ struct ltc3676_regulator regulator_descs[LTC3676_NUM_REGULATORS]; ++ struct regulator_dev *regulators[LTC3676_NUM_REGULATORS]; ++}; ++ ++static int ltc3676_set_suspend_voltage(struct regulator_dev *rdev, int uV) ++{ ++ struct ltc3676 *ltc3676 = rdev_get_drvdata(rdev); ++ struct device *dev = ltc3676->dev; ++ int dcdc = rdev_get_id(rdev); ++ int sel; ++ ++ dev_dbg(dev, "%s id=%d uV=%d\n", __func__, dcdc, uV); ++ sel = regulator_map_voltage_linear(rdev, uV, uV); ++ if (sel < 0) ++ return sel; ++ ++ /* DVBB register follows right after the corresponding DVBA register */ ++ return regmap_update_bits(ltc3676->regmap, rdev->desc->vsel_reg + 1, ++ rdev->desc->vsel_mask, sel); ++} ++ ++static int ltc3676_set_suspend_mode(struct regulator_dev *rdev, ++ unsigned int mode) ++{ ++ struct ltc3676 *ltc3676= rdev_get_drvdata(rdev); ++ struct device *dev = ltc3676->dev; ++ int mask, bit = 0; ++ int dcdc = rdev_get_id(rdev); ++ ++ dev_dbg(dev, "%s id=%d mode=%d\n", __func__, dcdc, mode); ++ ++ /* DVB reference select is bit5 of DVBA reg */ ++ mask = 1 << 5; ++ ++ if (mode != REGULATOR_MODE_STANDBY) ++ bit = mask; /* Select DVBB */ ++ ++ return regmap_update_bits(ltc3676->regmap, rdev->desc->vsel_reg, ++ mask, bit); ++} ++ ++/* SW1, SW2, SW3, SW4 linear 0.8V-3.3V with scalar via R1/R2 feeback res */ ++static struct regulator_ops ltc3676_linear_regulator_ops = ++{ ++ .enable = regulator_enable_regmap, ++ .disable = regulator_disable_regmap, ++ .is_enabled = regulator_is_enabled_regmap, ++ .list_voltage = regulator_list_voltage_linear, ++ .set_voltage_sel = regulator_set_voltage_sel_regmap, ++ .get_voltage_sel = regulator_get_voltage_sel_regmap, ++ .set_suspend_voltage = ltc3676_set_suspend_voltage, ++ .set_suspend_mode = ltc3676_set_suspend_mode, ++}; ++ ++/* always on fixed regulators */ ++static struct regulator_ops ltc3676_fixed_standby_regulator_ops = { ++}; ++ ++#define LTC3676_REG(_name, _ops, en_reg, en_bit, dvba_reg, dvb_mask) \ ++ [LTC3676_ ## _name] = { \ ++ .desc = { \ ++ .name = #_name, \ ++ .n_voltages = (dvb_mask) + 1, \ ++ .min_uV = (dvba_reg) ? 412500 : 0, \ ++ .uV_step = (dvba_reg) ? 12500 : 0, \ ++ .ramp_delay = (dvba_reg) ? 800 : 0, \ ++ .fixed_uV = (dvb_mask) ? 0 : 725000, \ ++ .ops = <c3676_ ## _ops ## _regulator_ops, \ ++ .type = REGULATOR_VOLTAGE, \ ++ .id = LTC3676_ ## _name, \ ++ .owner = THIS_MODULE, \ ++ .vsel_reg = (dvba_reg), \ ++ .vsel_mask = (dvb_mask), \ ++ .enable_reg = (en_reg), \ ++ .enable_mask = (1 << en_bit), \ ++ }, \ ++ } ++ ++#define LTC3676_LINEAR_REG(_name, _en, _dvba) \ ++ LTC3676_REG(_name, linear, \ ++ LTC3676_ ## _en, 7, \ ++ LTC3676_ ## _dvba, 0x1f) ++ ++#define LTC3676_FIXED_REG(_name) \ ++ LTC3676_REG(_name, fixed_standby, 0, 0, 0, 0) ++ ++static struct ltc3676_regulator ltc3676_regulators[LTC3676_NUM_REGULATORS] = { ++ LTC3676_LINEAR_REG(SW1, BUCK1, DVB1A), ++ LTC3676_LINEAR_REG(SW2, BUCK2, DVB2A), ++ LTC3676_LINEAR_REG(SW3, BUCK3, DVB3A), ++ LTC3676_LINEAR_REG(SW4, BUCK4, DVB4A), ++ LTC3676_FIXED_REG(LDO1), ++ LTC3676_FIXED_REG(LDO2), ++ LTC3676_FIXED_REG(LDO3), ++ LTC3676_FIXED_REG(LDO4), ++}; ++ ++#ifdef CONFIG_OF ++static struct of_regulator_match ltc3676_matches[] = { ++ { .name = "sw1", }, ++ { .name = "sw2", }, ++ { .name = "sw3", }, ++ { .name = "sw4", }, ++ { .name = "ldo1", }, ++ { .name = "ldo2", }, ++ { .name = "ldo3", }, ++ { .name = "ldo4", }, ++}; ++ ++static int ltc3676_parse_regulators_dt(struct ltc3676 *ltc3676) ++{ ++ struct device *dev = ltc3676->dev; ++ struct device_node *node; ++ int i, ret; ++ ++ node = of_find_node_by_name(dev->of_node, "regulators"); ++ if (!node) { ++ dev_err(dev, "regulators node not found\n"); ++ return -EINVAL; ++ } ++ ++ ret = of_regulator_match(dev, node, ltc3676_matches, ++ ARRAY_SIZE(ltc3676_matches)); ++ of_node_put(node); ++ if (ret < 0) { ++ dev_err(dev, "Error parsing regulator init data: %d\n", ret); ++ return -EINVAL; ++ } ++ ++ /* parse feedback voltage deviders: LDO3 doesn't have them */ ++ for (i = 0; i < LTC3676_NUM_REGULATORS; i++) { ++ struct ltc3676_regulator *rdesc = <c3676->regulator_descs[i]; ++ struct device_node *np = ltc3676_matches[i].of_node; ++ u32 vdiv[2]; ++ ++ rdesc->np = ltc3676_matches[i].of_node; ++ if (i == LTC3676_LDO3 || !rdesc->np) ++ continue; ++ ret = of_property_read_u32_array(np, "lltc,fb-voltage-divider", ++ vdiv, 2); ++ if (ret) { ++ dev_err(dev, "Failed to parse voltage divider: %d\n", ++ ret); ++ return ret; ++ } ++ ++ rdesc->r1 = vdiv[0]; ++ rdesc->r2 = vdiv[1]; ++ } ++ ++ return 0; ++} ++ ++static inline struct regulator_init_data *match_init_data(int index) ++{ ++ return ltc3676_matches[index].init_data; ++} ++ ++static inline struct device_node *match_of_node(int index) ++{ ++ return ltc3676_matches[index].of_node; ++} ++#else ++static int ltc3676_parse_regulators_dt(struct ltc3676_chip *chip) ++{ ++ return 0; ++} ++ ++static inline struct regulator_init_data *match_init_data(int index) ++{ ++ return NULL; ++} ++ ++static inline struct device_node *match_of_node(int index) ++{ ++ return NULL; ++} ++#endif ++ ++static bool ltc3676_writeable_reg(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case LTC3676_IRQSTAT: ++ case LTC3676_BUCK1: ++ case LTC3676_BUCK2: ++ case LTC3676_BUCK3: ++ case LTC3676_BUCK4: ++ case LTC3676_LDOA: ++ case LTC3676_LDOB: ++ case LTC3676_SQD1: ++ case LTC3676_SQD2: ++ case LTC3676_CNTRL: ++ case LTC3676_DVB1A: ++ case LTC3676_DVB1B: ++ case LTC3676_DVB2A: ++ case LTC3676_DVB2B: ++ case LTC3676_DVB3A: ++ case LTC3676_DVB3B: ++ case LTC3676_DVB4A: ++ case LTC3676_DVB4B: ++ case LTC3676_MSKIRQ: ++ case LTC3676_MSKPG: ++ case LTC3676_USER: ++ case LTC3676_HRST: ++ case LTC3676_CLIRQ: ++ return true; ++ } ++ return false; ++} ++ ++static bool ltc3676_readable_reg(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case LTC3676_IRQSTAT: ++ case LTC3676_BUCK1: ++ case LTC3676_BUCK2: ++ case LTC3676_BUCK3: ++ case LTC3676_BUCK4: ++ case LTC3676_LDOA: ++ case LTC3676_LDOB: ++ case LTC3676_SQD1: ++ case LTC3676_SQD2: ++ case LTC3676_CNTRL: ++ case LTC3676_DVB1A: ++ case LTC3676_DVB1B: ++ case LTC3676_DVB2A: ++ case LTC3676_DVB2B: ++ case LTC3676_DVB3A: ++ case LTC3676_DVB3B: ++ case LTC3676_DVB4A: ++ case LTC3676_DVB4B: ++ case LTC3676_MSKIRQ: ++ case LTC3676_MSKPG: ++ case LTC3676_USER: ++ case LTC3676_HRST: ++ case LTC3676_CLIRQ: ++ return true; ++ } ++ return false; ++} ++ ++static bool ltc3676_volatile_reg(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case LTC3676_IRQSTAT: ++ case LTC3676_PGSTATL: ++ case LTC3676_PGSTATRT: ++ return true; ++ } ++ return false; ++} ++ ++static const struct regmap_config ltc3676_regmap_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ .writeable_reg = ltc3676_writeable_reg, ++ .readable_reg = ltc3676_readable_reg, ++ .volatile_reg = ltc3676_volatile_reg, ++ .max_register = LTC3676_CLIRQ, ++ .use_single_rw = true, ++ .cache_type = REGCACHE_RBTREE, ++}; ++ ++static irqreturn_t ltc3676_isr(int irq, void *dev_id) ++{ ++ struct ltc3676 *ltc3676 = dev_id; ++ struct device *dev = ltc3676->dev; ++ unsigned int i, irqstat, event; ++ ++ regmap_read(ltc3676->regmap, LTC3676_IRQSTAT, &irqstat); ++ ++ dev_dbg(dev, "irq%d irqstat=0x%02x\n", irq, irqstat); ++ if (irqstat & LTC3676_IRQSTAT_THERMAL_WARN) { ++ dev_info(dev, "Over-temperature Warning\n"); ++ event = REGULATOR_EVENT_OVER_TEMP; ++ for (i = 0; i < LTC3676_NUM_REGULATORS; i++) ++ regulator_notifier_call_chain(ltc3676->regulators[i], ++ event, NULL); ++ } ++ ++ if (irqstat & LTC3676_IRQSTAT_UNDERVOLT_WARN) { ++ dev_info(dev, "Undervoltage Warning\n"); ++ event = REGULATOR_EVENT_UNDER_VOLTAGE; ++ for (i = 0; i < LTC3676_NUM_REGULATORS; i++) ++ regulator_notifier_call_chain(ltc3676->regulators[i], ++ event, NULL); ++ } ++ ++ /* Clear warning condition */ ++ regmap_write(ltc3676->regmap, LTC3676_CLIRQ, 0); ++ ++ return IRQ_HANDLED; ++} ++ ++static inline unsigned int ltc3676_scale(unsigned int uV, u32 r1, u32 r2) ++{ ++ uint64_t tmp; ++ if (uV == 0) ++ return 0; ++ tmp = (uint64_t)uV * r1; ++ do_div(tmp, r2); ++ return uV + (unsigned int)tmp; ++} ++ ++static void ltc3676_apply_fb_voltage_divider(struct ltc3676_regulator *rdesc) ++{ ++ struct regulator_desc *desc = &rdesc->desc; ++ ++ if (!rdesc->r1 || !rdesc->r2) ++ return; ++ ++ desc->min_uV = ltc3676_scale(desc->min_uV, rdesc->r1, rdesc->r2); ++ desc->uV_step = ltc3676_scale(desc->uV_step, rdesc->r1, rdesc->r2); ++ desc->fixed_uV = ltc3676_scale(desc->fixed_uV, rdesc->r1, rdesc->r2); ++} ++ ++static int ltc3676_regulator_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct device *dev = &client->dev; ++ struct ltc3676_regulator *descs; ++ struct ltc3676 *ltc3676; ++ int i, ret; ++ ++ ltc3676 = devm_kzalloc(dev, sizeof(*ltc3676), GFP_KERNEL); ++ if (!ltc3676) ++ return -ENOMEM; ++ ++ i2c_set_clientdata(client, ltc3676); ++ ltc3676->dev = dev; ++ ++ descs = ltc3676->regulator_descs; ++ memcpy(descs, ltc3676_regulators, sizeof(ltc3676_regulators)); ++ descs[LTC3676_LDO3].desc.fixed_uV = 1800000; ++ ++ ltc3676->regmap = devm_regmap_init_i2c(client, <c3676_regmap_config); ++ if (IS_ERR(ltc3676->regmap)) { ++ ret = PTR_ERR(ltc3676->regmap); ++ dev_err(dev, "failed to initialize regmap: %d\n", ret); ++ return ret; ++ } ++ ++ ret = ltc3676_parse_regulators_dt(ltc3676); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < LTC3676_NUM_REGULATORS; i++) { ++ struct ltc3676_regulator *rdesc = <c3676->regulator_descs[i]; ++ struct regulator_desc *desc = &rdesc->desc; ++ struct regulator_init_data *init_data; ++ struct regulator_config config = { }; ++ ++ init_data = match_init_data(i); ++ ++ if (!rdesc->np) ++ continue; ++ ++ if (i != LTC3676_LDO3) { ++ /* skip unused (defined by r1=r2=0) */ ++ if (rdesc->r1 == 0 && rdesc->r2 == 0) ++ continue; ++ ltc3676_apply_fb_voltage_divider(rdesc); ++ } ++ ++ config.dev = dev; ++ config.init_data = init_data; ++ config.driver_data = ltc3676; ++ config.of_node = match_of_node(i); ++ ++ ltc3676->regulators[i] = regulator_register(desc, &config); ++ if (IS_ERR(ltc3676->regulators[i])) { ++ ret = PTR_ERR(ltc3676->regulators[i]); ++ dev_err(dev, "failed to register regulator %s: %d\n", ++ desc->name, ret); ++ return ret; ++ } ++ } ++ ++ regmap_write(ltc3676->regmap, LTC3676_CLIRQ, 0); ++ ret = devm_request_threaded_irq(dev, client->irq, NULL, ltc3676_isr, ++ IRQF_TRIGGER_LOW | IRQF_ONESHOT, ++ client->name, ltc3676); ++ if (ret) { ++ dev_err(dev, "Failed to request IRQ: %d\n", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static const struct i2c_device_id ltc3676_i2c_id[] = { ++ { "ltc3676" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ltc3676_i2c_id); ++ ++static struct i2c_driver ltc3676_driver = { ++ .driver = { ++ .name = DRIVER_NAME, ++ .owner = THIS_MODULE, ++ }, ++ .probe = ltc3676_regulator_probe, ++ .id_table = ltc3676_i2c_id, ++}; ++module_i2c_driver(ltc3676_driver); ++ ++MODULE_AUTHOR("Tim Harvey <tharvey@gateworks.com>"); ++MODULE_DESCRIPTION("Regulator Driver for Linear Technology LTC1376"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("i2c:ltc3676"); +diff -Nur linux-4.1.10/drivers/regulator/Makefile xbian-sources-kernel/drivers/regulator/Makefile +--- linux-4.1.10/drivers/regulator/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/regulator/Makefile 2015-10-11 19:49:29.695154284 +0200 +@@ -43,6 +43,7 @@ + obj-$(CONFIG_REGULATOR_LP8755) += lp8755.o + obj-$(CONFIG_REGULATOR_LTC3589) += ltc3589.o + obj-$(CONFIG_REGULATOR_MAX14577) += max14577.o ++obj-$(CONFIG_REGULATOR_LTC3676) += ltc3676.o + obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o + obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o + obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o +diff -Nur linux-4.1.10/drivers/rtc/rtc-snvs.c xbian-sources-kernel/drivers/rtc/rtc-snvs.c +--- linux-4.1.10/drivers/rtc/rtc-snvs.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/rtc/rtc-snvs.c 2015-10-11 19:49:29.795147656 +0200 @@ -43,6 +43,10 @@ struct clk *clk; }; @@ -270189,9 +291105,9 @@ diff -Nur linux-4.1.10.orig/drivers/rtc/rtc-snvs.c linux-4.1.10/drivers/rtc/rtc- static int snvs_rtc_probe(struct platform_device *pdev) { struct snvs_rtc_data *data; -diff -Nur linux-4.1.10.orig/drivers/spi/spi-imx.c linux-4.1.10/drivers/spi/spi-imx.c ---- linux-4.1.10.orig/drivers/spi/spi-imx.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/spi/spi-imx.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/spi/spi-imx.c xbian-sources-kernel/drivers/spi/spi-imx.c +--- linux-4.1.10/drivers/spi/spi-imx.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/spi/spi-imx.c 2015-10-11 19:49:30.107126976 +0200 @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. @@ -270541,9 +291457,30 @@ diff -Nur linux-4.1.10.orig/drivers/spi/spi-imx.c linux-4.1.10/drivers/spi/spi-i dev_info(&pdev->dev, "probed\n"); clk_disable(spi_imx->clk_ipg); -diff -Nur linux-4.1.10.orig/drivers/video/fbdev/core/fbmem.c linux-4.1.10/drivers/video/fbdev/core/fbmem.c ---- linux-4.1.10.orig/drivers/video/fbdev/core/fbmem.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/video/fbdev/core/fbmem.c 2015-10-10 16:41:42.849314851 +0200 +diff -Nur linux-4.1.10/drivers/usb/phy/phy-mxs-usb.c xbian-sources-kernel/drivers/usb/phy/phy-mxs-usb.c +--- linux-4.1.10/drivers/usb/phy/phy-mxs-usb.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/usb/phy/phy-mxs-usb.c 2015-10-11 19:49:30.507100464 +0200 +@@ -242,7 +242,7 @@ + + if (disconnect) + writel_relaxed(BM_USBPHY_DEBUG_CLKGATE, +- base + HW_USBPHY_DEBUG_CLR); ++ base + HW_USBPHY_DEBUG_SET); + + if (mxs_phy->port_id == 0) { + reg = disconnect ? ANADIG_USB1_LOOPBACK_SET +@@ -260,7 +260,7 @@ + + if (!disconnect) + writel_relaxed(BM_USBPHY_DEBUG_CLKGATE, +- base + HW_USBPHY_DEBUG_SET); ++ base + HW_USBPHY_DEBUG_CLR); + + /* Delay some time, and let Linestate be SE0 for controller */ + if (disconnect) +diff -Nur linux-4.1.10/drivers/video/fbdev/core/fbmem.c xbian-sources-kernel/drivers/video/fbdev/core/fbmem.c +--- linux-4.1.10/drivers/video/fbdev/core/fbmem.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/video/fbdev/core/fbmem.c 2015-10-11 19:49:30.563096752 +0200 @@ -1033,12 +1033,13 @@ !list_empty(&info->modelist)) ret = fb_add_videomode(&mode, &info->modelist); @@ -270559,54 +291496,40 @@ diff -Nur linux-4.1.10.orig/drivers/video/fbdev/core/fbmem.c linux-4.1.10/driver info->flags &= ~FBINFO_MISC_USEREVENT; event.info = info; event.data = &mode; -diff -Nur linux-4.1.10.orig/drivers/video/fbdev/core/fbmon.c linux-4.1.10/drivers/video/fbdev/core/fbmon.c ---- linux-4.1.10.orig/drivers/video/fbdev/core/fbmon.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/video/fbdev/core/fbmon.c 2015-10-10 16:41:42.849314851 +0200 -@@ -494,7 +494,7 @@ - static int get_std_timing(unsigned char *block, struct fb_videomode *mode, - int ver, int rev, const struct fb_monspecs *specs) - { -- int i; -+ int xres, yres = 0, ratio, i; - - for (i = 0; i < DMT_SIZE; i++) { - u32 std_2byte_code = block[0] << 8 | block[1]; -@@ -502,6 +502,32 @@ +diff -Nur linux-4.1.10/drivers/video/fbdev/core/fbmon.c xbian-sources-kernel/drivers/video/fbdev/core/fbmon.c +--- linux-4.1.10/drivers/video/fbdev/core/fbmon.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/video/fbdev/core/fbmon.c 2015-10-11 19:49:30.563096752 +0200 +@@ -519,19 +519,25 @@ + switch (ratio) { + case 0: + /* in EDID 1.3 the meaning of 0 changed to 16:10 (prior 1:1) */ +- if (ver < 1 || (ver == 1 && rev < 3)) ++ if (ver < 1 || (ver == 1 && rev < 3)) { + yres = xres; +- else ++ mode->vmode |= FB_VMODE_ASPECT_1; ++ } else { + yres = (xres * 10)/16; ++ mode->vmode |= FB_VMODE_ASPECT_16_10; ++ } break; - } - -+ ratio = (block[1] & 0xc0) >> 6; -+ switch (ratio) { -+ case 0: -+ /* in EDID 1.3 the meaning of 0 changed to 16:10 (prior 1:1) */ -+ if (ver < 1 || (ver == 1 && rev < 3)) { -+ yres = xres; -+ mode->vmode &= FB_VMODE_ASPECT_1; -+ } else { -+ yres = (xres * 10)/16; -+ mode->vmode &= FB_VMODE_ASPECT_16_10; -+ } -+ break; -+ case 1: -+ yres = (xres * 3)/4; -+ mode->vmode &= FB_VMODE_ASPECT_4_3; -+ break; -+ case 2: -+ yres = (xres * 4)/5; -+ mode->vmode &= FB_VMODE_ASPECT_5_4; -+ break; -+ case 3: -+ yres = (xres * 9)/16; -+ mode->vmode &= FB_VMODE_ASPECT_16_9; -+ break; -+ } -+ - if (i < DMT_SIZE && dmt_modes[i].mode) { - /* DMT mode found */ - *mode = *dmt_modes[i].mode; -diff -Nur linux-4.1.10.orig/drivers/video/fbdev/core/fbsysfs.c linux-4.1.10/drivers/video/fbdev/core/fbsysfs.c ---- linux-4.1.10.orig/drivers/video/fbdev/core/fbsysfs.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/video/fbdev/core/fbsysfs.c 2015-10-10 16:41:42.849314851 +0200 + case 1: + yres = (xres * 3)/4; ++ mode->vmode |= FB_VMODE_ASPECT_4_3; + break; + case 2: + yres = (xres * 4)/5; ++ mode->vmode |= FB_VMODE_ASPECT_5_4; + break; + case 3: + yres = (xres * 9)/16; ++ mode->vmode |= FB_VMODE_ASPECT_16_9; + break; + } + refresh = (block[1] & 0x3f) + 60; +diff -Nur linux-4.1.10/drivers/video/fbdev/core/fbsysfs.c xbian-sources-kernel/drivers/video/fbdev/core/fbsysfs.c +--- linux-4.1.10/drivers/video/fbdev/core/fbsysfs.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/video/fbdev/core/fbsysfs.c 2015-10-11 19:49:30.563096752 +0200 @@ -20,6 +20,7 @@ #include <linux/fb.h> #include <linux/console.h> @@ -270631,9 +291554,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/fbdev/core/fbsysfs.c linux-4.1.10/driv return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d%c-%d\n", m, mode->xres, mode->yres, v, mode->refresh); } -diff -Nur linux-4.1.10.orig/drivers/video/fbdev/core/modedb.c linux-4.1.10/drivers/video/fbdev/core/modedb.c ---- linux-4.1.10.orig/drivers/video/fbdev/core/modedb.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/video/fbdev/core/modedb.c 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/fbdev/core/modedb.c xbian-sources-kernel/drivers/video/fbdev/core/modedb.c +--- linux-4.1.10/drivers/video/fbdev/core/modedb.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/video/fbdev/core/modedb.c 2015-10-11 19:49:30.563096752 +0200 @@ -1111,7 +1111,7 @@ modelist->mode = *mode; list_add(&modelist->list, head); @@ -270652,9 +291575,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/fbdev/core/modedb.c linux-4.1.10/drive return; } } -diff -Nur linux-4.1.10.orig/drivers/video/Kconfig linux-4.1.10/drivers/video/Kconfig ---- linux-4.1.10.orig/drivers/video/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/video/Kconfig 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/Kconfig xbian-sources-kernel/drivers/video/Kconfig +--- linux-4.1.10/drivers/video/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/video/Kconfig 2015-10-11 19:49:30.543098078 +0200 @@ -30,6 +30,8 @@ source "drivers/video/fbdev/Kconfig" endmenu @@ -270664,9 +291587,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/Kconfig linux-4.1.10/drivers/video/Kco source "drivers/video/backlight/Kconfig" config VGASTATE -diff -Nur linux-4.1.10.orig/drivers/video/Makefile linux-4.1.10/drivers/video/Makefile ---- linux-4.1.10.orig/drivers/video/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/drivers/video/Makefile 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/Makefile xbian-sources-kernel/drivers/video/Makefile +--- linux-4.1.10/drivers/video/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/drivers/video/Makefile 2015-10-11 19:49:30.543098078 +0200 @@ -6,6 +6,7 @@ obj-y += backlight/ @@ -270675,9 +291598,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/Makefile linux-4.1.10/drivers/video/Ma obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o ifeq ($(CONFIG_OF),y) -diff -Nur linux-4.1.10.orig/drivers/video/mxc/crtc.h linux-4.1.10/drivers/video/mxc/crtc.h ---- linux-4.1.10.orig/drivers/video/mxc/crtc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/crtc.h 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/mxc/crtc.h xbian-sources-kernel/drivers/video/mxc/crtc.h +--- linux-4.1.10/drivers/video/mxc/crtc.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/crtc.h 2015-10-11 19:49:30.643091450 +0200 @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -270736,10 +291659,10 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/crtc.h linux-4.1.10/drivers/video/ +} + +#endif -diff -Nur linux-4.1.10.orig/drivers/video/mxc/Kconfig linux-4.1.10/drivers/video/mxc/Kconfig ---- linux-4.1.10.orig/drivers/video/mxc/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/Kconfig 2015-10-10 16:41:42.853314849 +0200 -@@ -0,0 +1,56 @@ +diff -Nur linux-4.1.10/drivers/video/mxc/Kconfig xbian-sources-kernel/drivers/video/mxc/Kconfig +--- linux-4.1.10/drivers/video/mxc/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/Kconfig 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,61 @@ +config FB_MXC + tristate "MXC Framebuffer support" + depends on FB @@ -270760,6 +291683,10 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/Kconfig linux-4.1.10/drivers/video + depends on FB_MXC + tristate "Synchronous Panel Framebuffer" + ++config FB_MXC_TVOUT_ADV739X ++ tristate "ADV7390/7391 TV Out Encoder" ++ depends on FB_MXC_SYNC_PANEL && I2C ++ +config FB_MXC_LDB + tristate "MXC LDB" + depends on FB_MXC_SYNC_PANEL @@ -270793,13 +291720,14 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/Kconfig linux-4.1.10/drivers/video + select VIDEOMODE_HELPERS + +config FB_MXC_EDID -+ depends on FB_MXC && I2C ++ depends on FB_MXC && I2C && DRM + tristate "MXC EDID support" + default y -diff -Nur linux-4.1.10.orig/drivers/video/mxc/ldb.c linux-4.1.10/drivers/video/mxc/ldb.c ---- linux-4.1.10.orig/drivers/video/mxc/ldb.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/ldb.c 2015-10-10 16:41:42.853314849 +0200 -@@ -0,0 +1,887 @@ ++ +diff -Nur linux-4.1.10/drivers/video/mxc/ldb.c xbian-sources-kernel/drivers/video/mxc/ldb.c +--- linux-4.1.10/drivers/video/mxc/ldb.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/ldb.c 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,888 @@ +/* + * Copyright (C) 2012-2014 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -270832,6 +291760,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/ldb.c linux-4.1.10/drivers/video/m +#include <linux/regmap.h> +#include <linux/types.h> +#include <video/of_videomode.h> ++#include <video/of_display_timing.h> +#include <video/videomode.h> +#include "mxc_dispdrv.h" + @@ -271613,7 +292542,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/ldb.c linux-4.1.10/drivers/video/m + return -EINVAL; + } + -+ ret = of_get_videomode(child, &chan->vm, 0); ++ ret = of_get_videomode(child, &chan->vm, OF_USE_NATIVE_MODE); + if (ret) + return -EINVAL; + @@ -271687,20 +292616,21 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/ldb.c linux-4.1.10/drivers/video/m +MODULE_DESCRIPTION("LDB driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRIVER_NAME); -diff -Nur linux-4.1.10.orig/drivers/video/mxc/Makefile linux-4.1.10/drivers/video/mxc/Makefile ---- linux-4.1.10.orig/drivers/video/mxc/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/Makefile 2015-10-10 16:41:42.853314849 +0200 -@@ -0,0 +1,7 @@ +diff -Nur linux-4.1.10/drivers/video/mxc/Makefile xbian-sources-kernel/drivers/video/mxc/Makefile +--- linux-4.1.10/drivers/video/mxc/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/Makefile 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,8 @@ +obj-$(CONFIG_FB_MXC_LDB) += ldb.o +obj-$(CONFIG_FB_MXC_MIPI_DSI) += mipi_dsi.o +obj-$(CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL) += mxcfb_hx8369_wvga.o ++obj-$(CONFIG_FB_MXC_TVOUT_ADV739X) += mxcfb_adv739x.o +obj-$(CONFIG_FB_MXC_HDMI) += mxc_hdmi.o +obj-$(CONFIG_FB_MXC_EDID) += mxc_edid.o +obj-$(CONFIG_FB_MXC_SYNC_PANEL) += mxc_dispdrv.o mxc_lcdif.o mxc_ipuv3_fb.o +obj-$(CONFIG_FB_MXC_DCIC) += mxc_dcic.o -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mipi_dsi.c linux-4.1.10/drivers/video/mxc/mipi_dsi.c ---- linux-4.1.10.orig/drivers/video/mxc/mipi_dsi.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mipi_dsi.c 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/mxc/mipi_dsi.c xbian-sources-kernel/drivers/video/mxc/mipi_dsi.c +--- linux-4.1.10/drivers/video/mxc/mipi_dsi.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mipi_dsi.c 2015-10-11 19:49:30.643091450 +0200 @@ -0,0 +1,989 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -272691,9 +293621,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mipi_dsi.c linux-4.1.10/drivers/vi +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("i.MX MIPI DSI driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mipi_dsi.h linux-4.1.10/drivers/video/mxc/mipi_dsi.h ---- linux-4.1.10.orig/drivers/video/mxc/mipi_dsi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mipi_dsi.h 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/mxc/mipi_dsi.h xbian-sources-kernel/drivers/video/mxc/mipi_dsi.h +--- linux-4.1.10/drivers/video/mxc/mipi_dsi.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mipi_dsi.h 2015-10-11 19:49:30.643091450 +0200 @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -272808,9 +293738,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mipi_dsi.h linux-4.1.10/drivers/vi +#endif + +#endif -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_dcic.c linux-4.1.10/drivers/video/mxc/mxc_dcic.c ---- linux-4.1.10.orig/drivers/video/mxc/mxc_dcic.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxc_dcic.c 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/mxc/mxc_dcic.c xbian-sources-kernel/drivers/video/mxc/mxc_dcic.c +--- linux-4.1.10/drivers/video/mxc/mxc_dcic.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxc_dcic.c 2015-10-11 19:49:30.643091450 +0200 @@ -0,0 +1,663 @@ +/* + * Copyright (C) 2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -273103,7 +294033,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_dcic.c linux-4.1.10/drivers/vi + + /* Disable both function and error interrupt */ + val = readl(&dcic->regs->dcicic); -+ val = DCICIC_ERROR_INT_DISABLE | DCICIC_FUN_INT_DISABLE; ++ val |= DCICIC_ERROR_INT_DISABLE | DCICIC_FUN_INT_DISABLE; + writel(val, &dcic->regs->dcicic); +} + @@ -273475,9 +294405,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_dcic.c linux-4.1.10/drivers/vi +MODULE_DESCRIPTION("MXC DCIC driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRIVER_NAME); -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_dispdrv.c linux-4.1.10/drivers/video/mxc/mxc_dispdrv.c ---- linux-4.1.10.orig/drivers/video/mxc/mxc_dispdrv.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxc_dispdrv.c 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/mxc/mxc_dispdrv.c xbian-sources-kernel/drivers/video/mxc/mxc_dispdrv.c +--- linux-4.1.10/drivers/video/mxc/mxc_dispdrv.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxc_dispdrv.c 2015-10-11 19:49:30.643091450 +0200 @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -273627,9 +294557,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_dispdrv.c linux-4.1.10/drivers + return ERR_PTR(-EINVAL); +} +EXPORT_SYMBOL_GPL(mxc_dispdrv_getdata); -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_dispdrv.h linux-4.1.10/drivers/video/mxc/mxc_dispdrv.h ---- linux-4.1.10.orig/drivers/video/mxc/mxc_dispdrv.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxc_dispdrv.h 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/mxc/mxc_dispdrv.h xbian-sources-kernel/drivers/video/mxc/mxc_dispdrv.h +--- linux-4.1.10/drivers/video/mxc/mxc_dispdrv.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxc_dispdrv.h 2015-10-11 19:49:30.643091450 +0200 @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -273683,10 +294613,10 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_dispdrv.h linux-4.1.10/drivers +int mxc_dispdrv_setdata(struct mxc_dispdrv_handle *handle, void *data); +void *mxc_dispdrv_getdata(struct mxc_dispdrv_handle *handle); +#endif -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_edid.c linux-4.1.10/drivers/video/mxc/mxc_edid.c ---- linux-4.1.10.orig/drivers/video/mxc/mxc_edid.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxc_edid.c 2015-10-10 16:41:42.853314849 +0200 -@@ -0,0 +1,843 @@ +diff -Nur linux-4.1.10/drivers/video/mxc/mxc_edid.c xbian-sources-kernel/drivers/video/mxc/mxc_edid.c +--- linux-4.1.10/drivers/video/mxc/mxc_edid.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxc_edid.c 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,882 @@ +/* + * Copyright 2009-2014 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -273720,6 +294650,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_edid.c linux-4.1.10/drivers/vi +#include <video/mxc_edid.h> +#include "../fbdev/edid.h" + ++#include <drm/drm_edid.h> ++#include <drm/drm_crtc.h> ++ +#define DPRINTK(fmt, args...) pr_debug(fmt, ## args) + +const struct fb_videomode mxc_cea_mode[64] = { @@ -274440,47 +295373,83 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_edid.c linux-4.1.10/drivers/vi +} +EXPORT_SYMBOL(mxc_edid_mode_to_vic); + -+/* make sure edid has 512 bytes*/ -+int mxc_edid_read(struct i2c_adapter *adp, unsigned short addr, -+ unsigned char *edid, struct mxc_edid_cfg *cfg, struct fb_info *fbi) ++int mxc_edid_to_edl(unsigned char *edid, unsigned char *eld) ++{ ++ struct drm_connector connector; ++ int ret; ++ ++ memset(&connector, 0, sizeof(struct drm_connector)); ++ drm_edid_to_eld(&connector, (struct edid *)edid); ++ ++ memcpy(eld, &connector.eld, MAX_ELD_BYTES); ++ ret = drm_eld_size(eld); ++ ++ return ret == DRM_ELD_HEADER_BLOCK_SIZE; ++} ++ ++int mxc_edid_parse_raw(unsigned char *edid, struct mxc_edid_cfg *cfg, struct fb_info *fbi) +{ + int ret = 0, extblknum; -+ if (!adp || !edid || !cfg || !fbi) ++ if (!edid || !cfg || !fbi) + return -EINVAL; + -+ memset(edid, 0, EDID_LENGTH*4); + memset(cfg, 0, sizeof(struct mxc_edid_cfg)); ++ mxc_edid_to_edl(edid, cfg->hdmi_eld); + -+ extblknum = mxc_edid_readblk(adp, addr, edid); ++ extblknum = edid[0x7E]; + if (extblknum < 0) + return extblknum; + -+ /* edid first block parsing */ + memset(&fbi->monspecs, 0, sizeof(fbi->monspecs)); + fb_edid_to_monspecs(edid, &fbi->monspecs); + -+ if (extblknum) { -+ int i; ++ ret = mxc_edid_parse_ext_blk(edid + EDID_LENGTH, ++ cfg, &fbi->monspecs); ++ if (ret < 0) { ++ fb_edid_add_monspecs(edid + EDID_LENGTH, &fbi->monspecs); ++ if (fbi->monspecs.modedb_len > 0) ++ cfg->hdmi_cap = false; ++ else ++ return -ENOENT; ++ } ++ ++ while (extblknum-- > 1) { ++ /* edid ext block parsing */ ++ ret = mxc_edid_parse_ext_blk(edid + extblknum*EDID_LENGTH, ++ cfg, &fbi->monspecs); ++ if (ret < 0) ++ return -ENOENT; ++ } ++ ++ return 0; ++} ++EXPORT_SYMBOL(mxc_edid_parse_raw); ++ ++/* make sure edid has 512 bytes*/ ++int mxc_edid_read(struct i2c_adapter *adp, unsigned short addr, ++ unsigned char *edid, struct mxc_edid_cfg *cfg, struct fb_info *fbi) ++{ ++ int ret = 0, extblknum; ++ if (!adp || !edid || !cfg || !fbi) ++ return -EINVAL; + ++ extblknum = mxc_edid_readblk(adp, addr, edid); ++ if (extblknum < 0) ++ return extblknum; ++ ++ if (extblknum) { + /* FIXME: mxc_edid_readsegblk() won't read more than 2 blocks + * and the for-loop will read past the end of the buffer! :-( */ + BUG_ON(extblknum > 3); + -+ /* need read segment block? */ -+ if (extblknum > 1) { ++ if (extblknum > 1) + ret = mxc_edid_readsegblk(adp, addr, + edid + EDID_LENGTH*2, extblknum - 1); -+ if (ret < 0) -+ return ret; -+ } -+ -+ for (i = 1; i <= extblknum; i++) -+ /* edid ext block parsing */ -+ mxc_edid_parse_ext_blk(edid + i*EDID_LENGTH, -+ cfg, &fbi->monspecs); + } ++ if (!ret) ++ ret = mxc_edid_parse_raw(edid, cfg, fbi); + -+ return 0; ++ return ret; +} +EXPORT_SYMBOL(mxc_edid_read); + @@ -274530,9 +295499,410 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_edid.c linux-4.1.10/drivers/vi + return best; +} +EXPORT_SYMBOL(mxc_fb_find_nearest_mode); -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxcfb_hx8369_wvga.c linux-4.1.10/drivers/video/mxc/mxcfb_hx8369_wvga.c ---- linux-4.1.10.orig/drivers/video/mxc/mxcfb_hx8369_wvga.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxcfb_hx8369_wvga.c 2015-10-10 16:41:42.853314849 +0200 +diff -Nur linux-4.1.10/drivers/video/mxc/mxcfb_adv739x.c xbian-sources-kernel/drivers/video/mxc/mxcfb_adv739x.c +--- linux-4.1.10/drivers/video/mxc/mxcfb_adv739x.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxcfb_adv739x.c 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,397 @@ ++/* ++ * Copyright (C) 2013 Freescale Semiconductor, Inc. All Rights Reserved. ++ */ ++ ++/* ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++#include <linux/delay.h> ++#include <linux/ipu.h> ++#include <linux/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/of_device.h> ++#include <linux/platform_device.h> ++#include <linux/mxcfb.h> ++ ++#include "mxc_dispdrv.h" ++#include "crtc.h" ++ ++#define DISPDRV_ADV739X "adv739x" ++ ++#define ADV739X_MODE_NTSC 0 ++#define ADV739X_MODE_PAL 1 ++ ++ ++struct adv739x_data { ++ struct platform_device *pdev; ++ struct i2c_client *client; ++ struct mxc_dispdrv_handle *disp_adv739x; ++ struct fb_info *fbi; ++ ++ int ipu_id; ++ int disp_id; ++ int default_ifmt; ++ ++ int cur_mode; ++ int enabled; ++ struct notifier_block nb; ++}; ++ ++/* ++ * left_margin: used for field0 vStart width in lines ++ * ++ * right_margin: used for field0 vEnd width in lines ++ * ++ * up_margin: used for field1 vStart width in lines ++ * ++ * down_margin: used for field1 vEnd width in lines ++ * ++ * hsync_len: EAV Code + Blanking Video + SAV Code (in pixel clock count) ++ * For BT656 NTSC, it is 4 + 67*4 + 4 = 276. ++ * For BT1120 NTSC, it is 4 + 67*2 + 4 = 142. ++ * For BT656 PAL, it is 4 + 70*4 + 4 = 288. ++ * For BT1120 PAL, it is 4 + 70*2 + 4 = 148. ++ * ++ * vsync_len: not used, set to 1 ++ */ ++static struct fb_videomode adv739x_modedb[] = { ++ { ++ /* NTSC Interlaced output */ ++ "BT656-NTSC", 60, 720, 480, 37037, ++ 19, 3, ++ 20, 3, ++ 276, 1, ++ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++ FB_VMODE_INTERLACED, ++ FB_MODE_IS_DETAILED,}, ++ { ++ /* PAL Interlaced output */ ++ "BT656-PAL", 50, 720, 576, 37037, ++ 22, 2, ++ 23, 2, ++ 288, 1, ++ FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, ++ FB_VMODE_INTERLACED, ++ FB_MODE_IS_DETAILED,}, ++}; ++static int adv739x_modedb_sz = ARRAY_SIZE(adv739x_modedb); ++ ++static int adv739x_write(struct i2c_client *client, u8 reg, u8 data) ++{ ++ int ret = 0; ++ ret = i2c_smbus_write_byte_data(client, reg, data); ++ ++ return ret; ++} ++ ++/* ++static int adv739x_read(struct i2c_client *client, u8 reg) ++{ ++ int data = 0; ++ data = i2c_smbus_read_byte_data(client, reg); ++ ++ return data; ++} ++*/ ++ ++static void adv739x_setmode(struct adv739x_data *adv739x, int mode) ++{ ++ struct i2c_client *client = adv739x->client; ++ ++ if(adv739x->enabled == 0) ++ return; ++ ++ dev_dbg(&adv739x->client->dev, "adv739x_setmode: mode = %d.\n", mode); ++ switch (mode) { ++ case ADV739X_MODE_NTSC: ++ // Reg 0x17: reset ++ adv739x_write(client, 0x17, 0x02); ++ ++ mdelay(20); ++ ++ // Reg 0x00: DAC1~3 power on ++ adv739x_write(client, 0x00, 0x1C); ++ ++ // Reg 0x01: SD input ++ adv739x_write(client, 0x01, 0x00); ++ ++ //NTSC ++ // Reg 0x80: SD, NTSC ++ adv739x_write(client, 0x80, 0x10); ++ ++ // Reg 0x82: SD, CVBS ++ adv739x_write(client, 0x82, 0xCB); ++ break; ++ ++ case ADV739X_MODE_PAL: ++ // Reg 0x17: reset ++ adv739x_write(client, 0x17, 0x02); ++ ++ mdelay(20); ++ ++ // Reg 0x00: DAC1~3 power on ++ adv739x_write(client, 0x00, 0x1C); ++ ++ // Reg 0x01: SD input ++ adv739x_write(client, 0x01, 0x00); ++ ++ // Reg 0x80: SD, PAL ++ adv739x_write(client, 0x80, 0x11); ++ ++ // Reg 0x82: SD, CVBS ++ adv739x_write(client, 0x82, 0xC3); ++ adv739x_write(client, 0x8C, 0xCB); ++ adv739x_write(client, 0x8D, 0x8A); ++ adv739x_write(client, 0x8E, 0x09); ++ adv739x_write(client, 0x8F, 0x2A); ++ break; ++ ++ default: ++ dev_err(&adv739x->client->dev, "unsupported mode.\n"); ++ break; ++ } ++} ++ ++static void adv739x_poweroff(struct adv739x_data *adv739x) ++{ ++ if (adv739x->enabled != 0) { ++ dev_dbg(&adv739x->client->dev, "adv739x_poweroff.\n"); ++ ++ /* power off the adv739x */ ++ adv739x_write(adv739x->client, 0x00, 0x1F); ++ ++ adv739x->enabled = 0; ++ } ++} ++ ++static void adv739x_poweron(struct adv739x_data *adv739x) ++{ ++ if (adv739x->enabled == 0) { ++ dev_dbg(&adv739x->client->dev, "adv739x_poweron.\n"); ++ ++ adv739x->enabled = 1; ++ adv739x_setmode(adv739x, adv739x->cur_mode); ++ } ++} ++ ++int adv739x_fb_event(struct notifier_block *nb, unsigned long val, void *v) ++{ ++ struct fb_event *event = v; ++ struct fb_info *fbi = event->info; ++ struct adv739x_data *adv739x = container_of(nb, struct adv739x_data, nb); ++ ++ if (strcmp(event->info->fix.id, adv739x->fbi->fix.id)) ++ return 0; ++ ++ dev_dbg(&adv739x->client->dev, "%s\n", __func__); ++ ++ fbi->mode = (struct fb_videomode *)fb_match_mode(&fbi->var, ++ &fbi->modelist); ++ if (!fbi->mode) { ++ dev_warn(&adv739x->pdev->dev, ++ "adv739x: can not find mode for xres=%d, yres=%d\n", ++ fbi->var.xres, fbi->var.yres); ++ return 0; ++ } ++ ++ switch (val) { ++ case FB_EVENT_MODE_CHANGE: ++ if(strcmp(fbi->mode->name, "BT656-NTSC") == 0) ++ adv739x->cur_mode = ADV739X_MODE_NTSC; ++ else if(strcmp(fbi->mode->name, "BT656-PAL") == 0) ++ adv739x->cur_mode = ADV739X_MODE_PAL; ++ adv739x_setmode(adv739x, adv739x->cur_mode); ++ break; ++ case FB_EVENT_BLANK: ++ if (*((int *)event->data) == FB_BLANK_UNBLANK) ++ adv739x_poweron(adv739x); ++ else ++ adv739x_poweroff(adv739x); ++ break; ++ } ++ return 0; ++} ++ ++static int adv739x_disp_init(struct mxc_dispdrv_handle *disp, ++ struct mxc_dispdrv_setting *setting) ++{ ++ int ret = 0, i; ++ struct adv739x_data *adv739x = mxc_dispdrv_getdata(disp); ++ struct fb_videomode *modedb = adv739x_modedb; ++ int modedb_sz = adv739x_modedb_sz; ++ static bool inited = false; ++ ++ dev_dbg(&adv739x->client->dev, "%s\n", __func__); ++ if (inited) ++ return -EBUSY; ++ ++ inited = true; ++ ++ ret = ipu_di_to_crtc(&adv739x->pdev->dev, adv739x->ipu_id, ++ adv739x->disp_id, &setting->crtc); ++ if (ret < 0) ++ return ret; ++/* ++ setting->dev_id = adv739x->ipu_id; ++ setting->disp_id = adv739x->disp_id; ++*/ ++ ++ ret = fb_find_mode(&setting->fbi->var, setting->fbi, setting->dft_mode_str, ++ modedb, modedb_sz, NULL, setting->default_bpp); ++ if (!ret) { ++ fb_videomode_to_var(&setting->fbi->var, &modedb[0]); ++ setting->if_fmt = adv739x->default_ifmt; ++ } ++ ++ INIT_LIST_HEAD(&setting->fbi->modelist); ++ for (i = 0; i < modedb_sz; i++) { ++ fb_add_videomode(&modedb[i], ++ &setting->fbi->modelist); ++ } ++ ++ adv739x->fbi = setting->fbi; ++ adv739x->enabled = 0; ++ adv739x->cur_mode = ADV739X_MODE_NTSC; //default mode ++ ++ adv739x->pdev = platform_device_register_simple("mxc_adv739x", 0, NULL, 0); ++ if (IS_ERR(adv739x->pdev)) { ++ dev_err(&adv739x->client->dev, ++ "Unable to register adv739x as a platform device\n"); ++ ret = PTR_ERR(adv739x->pdev); ++ goto register_pltdev_failed; ++ } ++ ++ adv739x->nb.notifier_call = adv739x_fb_event; ++ ret = fb_register_client(&adv739x->nb); ++ if (ret < 0) ++ goto reg_fbclient_failed; ++ ++ return ret; ++ ++reg_fbclient_failed: ++ platform_device_unregister(adv739x->pdev); ++register_pltdev_failed: ++ return ret; ++} ++ ++static void adv739x_disp_deinit(struct mxc_dispdrv_handle *disp) ++{ ++ struct adv739x_data *adv739x = mxc_dispdrv_getdata(disp); ++ ++ dev_dbg(&adv739x->client->dev, "%s\n", __func__); ++ if (adv739x->client->irq) ++ free_irq(adv739x->client->irq, adv739x); ++ ++ fb_unregister_client(&adv739x->nb); ++ ++ adv739x_poweroff(adv739x); ++ ++ platform_device_unregister(adv739x->pdev); ++} ++ ++static struct mxc_dispdrv_driver adv739x_drv = { ++ .name = DISPDRV_ADV739X, ++ .init = adv739x_disp_init, ++ .deinit = adv739x_disp_deinit, ++}; ++ ++static int adv739x_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct adv739x_data *adv739x; ++ struct device_node *np = client->dev.of_node; ++ int ret = 0; ++ ++ if (!i2c_check_functionality(client->adapter, ++ I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA)) ++ return -ENODEV; ++ ++ adv739x = kzalloc(sizeof(struct adv739x_data), GFP_KERNEL); ++ if (!adv739x) { ++ ret = -ENOMEM; ++ goto alloc_failed; ++ } ++ ++ adv739x->client = client; ++ ++ ret = of_property_read_u32(np, "ipu_id", &adv739x->ipu_id); ++ if (ret) { ++ dev_err(&client->dev, "get of property ipu_id fail\n"); ++ goto prop_failed; ++ } ++ ret = of_property_read_u32(np, "disp_id", &adv739x->disp_id); ++ if (ret) { ++ dev_err(&client->dev, "get of property disp_id fail\n"); ++ goto prop_failed; ++ } ++ adv739x->default_ifmt = IPU_PIX_FMT_BT656; ++ ++ adv739x->disp_adv739x = mxc_dispdrv_register(&adv739x_drv); ++ mxc_dispdrv_setdata(adv739x->disp_adv739x, adv739x); ++ ++ i2c_set_clientdata(client, adv739x); ++ ++ return 0; ++ ++prop_failed: ++ kfree(adv739x); ++alloc_failed: ++ return ret; ++ ++} ++ ++static int adv739x_remove(struct i2c_client *client) ++{ ++ struct adv739x_data *adv739x = i2c_get_clientdata(client); ++ ++ mxc_dispdrv_puthandle(adv739x->disp_adv739x); ++ mxc_dispdrv_unregister(adv739x->disp_adv739x); ++ kfree(adv739x); ++ return 0; ++} ++ ++static const struct i2c_device_id adv739x_id[] = { ++ { "mxc_adv739x", 0 }, ++}; ++ ++MODULE_DEVICE_TABLE(i2c, adv739x_id); ++ ++static struct of_device_id adv739x_dt_ids[] = { ++ { .compatible = "adi,adv7393", }, ++ { /* sentinel */ } ++}; ++ ++static struct i2c_driver adv739x_i2c_driver = { ++ .driver = { ++ .name = "mxc_adv739x", ++ .of_match_table = adv739x_dt_ids, ++ }, ++ .probe = adv739x_probe, ++ .remove = adv739x_remove, ++ .id_table = adv739x_id, ++}; ++ ++static int __init adv739x_i2c_init(void) ++{ ++ return i2c_add_driver(&adv739x_i2c_driver); ++} ++ ++static void __exit adv739x_i2c_exit(void) ++{ ++ i2c_del_driver(&adv739x_i2c_driver); ++} ++ ++module_init(adv739x_i2c_init); ++module_exit(adv739x_i2c_exit); ++ ++MODULE_AUTHOR("Freescale Semiconductor, Inc."); ++MODULE_DESCRIPTION("ADV739x TV encoder driver"); ++MODULE_LICENSE("GPL"); ++ +diff -Nur linux-4.1.10/drivers/video/mxc/mxcfb_hx8369_wvga.c xbian-sources-kernel/drivers/video/mxc/mxcfb_hx8369_wvga.c +--- linux-4.1.10/drivers/video/mxc/mxcfb_hx8369_wvga.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxcfb_hx8369_wvga.c 2015-10-11 19:49:30.643091450 +0200 @@ -0,0 +1,449 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -274983,10 +296353,10 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxcfb_hx8369_wvga.c linux-4.1.10/d + mipid_bl_update_status(bl); + return 0; +} -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/video/mxc/mxc_hdmi.c ---- linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxc_hdmi.c 2015-10-10 16:41:42.857314850 +0200 -@@ -0,0 +1,3509 @@ +diff -Nur linux-4.1.10/drivers/video/mxc/mxc_hdmi.c xbian-sources-kernel/drivers/video/mxc/mxc_hdmi.c +--- linux-4.1.10/drivers/video/mxc/mxc_hdmi.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxc_hdmi.c 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,3540 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. + * @@ -275041,7 +296411,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi +#include <linux/regmap.h> +#include <linux/pinctrl/consumer.h> +#include <linux/of_device.h> ++#include <linux/string.h> + ++#include <linux/firmware.h> +#include <linux/console.h> +#include <linux/types.h> + @@ -275135,6 +296507,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + unsigned int rgb_quant_range; + unsigned int enable_3d; + unsigned int enable_fract; ++ char *edid_filename; + struct hdmi_vmode video_mode; +}; + @@ -275169,6 +296542,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + int vic; + struct mxc_edid_cfg edid_cfg; + u8 edid[HDMI_EDID_LEN]; ++ const struct firmware *edid_from_fw; + bool fb_reg; + enum hotplug_state hp_state; + u8 blank; @@ -275180,6 +296554,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + u8 plug_mask; + bool irq_enabled; + spinlock_t irq_lock; ++ struct mutex m_lock; + bool phy_enabled; + struct fb_videomode default_mode; + struct fb_var_screeninfo previous_non_vga_mode; @@ -275204,6 +296579,8 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi +static bool hdmi_inited; +static bool hdcp_init; + ++static bool change; ++ +extern const struct fb_videomode mxc_cea_mode[64]; +extern void mxc_hdmi_cec_handle(u32 cec_stat); + @@ -275226,6 +296603,10 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi +module_param(ignore_edid, bool, S_IRUGO); +MODULE_PARM_DESC(ignore_edid, "Ignore EDID (default=0)"); + ++static char *ext_edid = ""; ++module_param(ext_edid, charp, S_IRUGO); ++MODULE_PARM_DESC(ext_edid, "file name to load EDID from"); ++ +static char *enable_3d = "1"; +module_param(enable_3d, charp, S_IRUGO); +MODULE_PARM_DESC(enable_3d, "3D modes enabled (0/1)"); @@ -276810,9 +298191,8 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + struct mxc_edid_cfg *cfg, struct fb_info *fbi) +{ + int extblknum; -+ int i, ret; ++ int i, j; + unsigned char *ediddata = edid; -+ unsigned char tmpedid[EDID_LENGTH]; + + dev_info(&hdmi->pdev->dev, "%s\n", __func__); + @@ -276842,10 +298222,6 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + HDMI_I2CM_CTLINT_ARBITRATION_POL, + HDMI_I2CM_CTLINT); + -+ /* reset edid data zero */ -+ memset(edid, 0, EDID_LENGTH*4); -+ memset(cfg, 0, sizeof(struct mxc_edid_cfg)); -+ + /* Check first three byte of EDID head */ + if (!(hdmi_edid_i2c_read(hdmi, 0, 0) == 0x00) || + !(hdmi_edid_i2c_read(hdmi, 1, 0) == 0xFF) || @@ -276860,47 +298236,25 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + } + + extblknum = edid[0x7E]; -+ -+ if (extblknum < 0) { ++ if (extblknum < 0) + return extblknum; -+ } else { -+ ediddata = edid + EDID_LENGTH; -+ for (i = 0; i < 128; i++) { -+ *ediddata = hdmi_edid_i2c_read(hdmi, i, 1); -+ ediddata++; -+ } -+ } -+ -+ /* edid first block parsing */ -+ memset(&fbi->monspecs, 0, sizeof(fbi->monspecs)); -+ fb_edid_to_monspecs(edid, &fbi->monspecs); + -+ ret = mxc_edid_parse_ext_blk(edid + EDID_LENGTH, -+ cfg, &fbi->monspecs); -+ if (ret < 0) { -+ fb_edid_add_monspecs(edid + EDID_LENGTH, &fbi->monspecs); -+ if (fbi->monspecs.modedb_len > 0) -+ hdmi->edid_cfg.hdmi_cap = false; -+ else -+ return -ENOENT; ++ for (i = 0; i < 128; i++) { ++ *ediddata = hdmi_edid_i2c_read(hdmi, i, 1); ++ ediddata++; + } + + /* need read segment block? */ -+ if (extblknum > 1) { -+ int j; -+ for (j = 1; j <= extblknum; j++) { -+ for (i = 0; i < 128; i++) -+ *(tmpedid + 1) = hdmi_edid_i2c_read(hdmi, i, j); -+ -+ /* edid ext block parsing */ -+ ret = mxc_edid_parse_ext_blk(tmpedid + EDID_LENGTH, -+ cfg, &fbi->monspecs); -+ if (ret < 0) -+ return -ENOENT; ++ if (extblknum == 1) ++ return 0; ++ ++ for (j = 1; j <= extblknum; j++) ++ for (i = 0; i < 128; i++) { ++ *ediddata = hdmi_edid_i2c_read(hdmi, i, j); ++ ediddata++; + } -+ } + -+ return 0; ++ return mxc_edid_parse_raw(hdmi->edid, &hdmi->edid_cfg, hdmi->fbi); +} + +static int mxc_hdmi_read_edid(struct mxc_hdmi *hdmi) @@ -276913,12 +298267,27 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + + /* save old edid */ + memcpy(edid_old, hdmi->edid, HDMI_EDID_LEN); ++ memset(hdmi->edid, 0, HDMI_EDID_LEN); + -+ /* Read EDID via HDMI DDC when HDCP Enable */ -+ if (!hdcp_init) ++ /* ++ Try loading EDID from firmware first ++ Read EDID via HDMI DDC when HDCP Enable ++ */ ++ if (hdmi->edid_from_fw) { ++ struct mxc_edid_cfg edid_cfg_old; ++ int edid_cfg_keep = (void*)&hdmi->edid_cfg.CONFIGKEEP - (void*)&hdmi->edid_cfg; ++ ++ memcpy(&edid_cfg_old, &hdmi->edid_cfg, edid_cfg_keep); ++ memcpy(hdmi->edid, hdmi->edid_from_fw->data, hdmi->edid_from_fw->size); ++ release_firmware(hdmi->edid_from_fw); ++ hdmi->edid_from_fw = NULL; ++ ++ if (!(ret = mxc_edid_parse_raw(hdmi->edid, &hdmi->edid_cfg, hdmi->fbi))) ++ memcpy(&hdmi->edid_cfg, &edid_cfg_old, edid_cfg_keep); ++ } else if (!hdcp_init) { + ret = mxc_edid_read(hdmi_i2c->adapter, hdmi_i2c->addr, + hdmi->edid, &hdmi->edid_cfg, hdmi->fbi); -+ else { ++ } else { + + /* Disable HDCP clk */ + if (hdmi->hdmi_data.hdcp_enable) { @@ -276942,11 +298311,6 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + if (ret < 0) + return HDMI_EDID_FAIL; + -+ dev_info(&hdmi->pdev->dev, "%s reports %s mode\n", __func__, hdmi->edid_cfg.hdmi_cap?"HDMI":"DVI"); -+ hdmi->hp_state = hdmi->edid_cfg.hdmi_cap?HDMI_HOTPLUG_CONNECTED_HDMI:HDMI_HOTPLUG_CONNECTED_DVI; -+ hdmi->plug_event = hdmi->edid_cfg.hdmi_cap?HDMI_IH_PHY_STAT0_HPD:HDMI_DVI_IH_STAT; -+ hdmi->plug_mask = hdmi->edid_cfg.hdmi_cap?HDMI_PHY_HPD:HDMI_DVI_STAT; -+ + if (!memcmp(edid_old, hdmi->edid, HDMI_EDID_LEN)) { + dev_info(&hdmi->pdev->dev, "same edid\n"); + return HDMI_EDID_SAME; @@ -277192,14 +298556,6 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + if ((vic = mxc_edid_mode_to_vic(mode, 0))) + nvic++; + -+ // allow detailed timing specification with vic=0 for HDMI -+ // mode -+ if (hdmi->edid_cfg.hdmi_cap && -+ ((!(mode->flag & FB_MODE_IS_DETAILED || !mode->flag) && vic == 0) -+ || -+ (mode->flag & FB_MODE_IS_VESA))) -+ continue; -+ + if (!mode->xres || !mode->refresh) + continue; + @@ -277275,8 +298631,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi +static void mxc_hdmi_default_modelist(struct mxc_hdmi *hdmi) +{ + u32 i; -+ const struct fb_videomode *mode; -+ struct fb_videomode m; ++ struct fb_videomode mode; + + dev_dbg(&hdmi->pdev->dev, "%s\n", __func__); + @@ -277288,14 +298643,16 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + + fb_destroy_modelist(&hdmi->fbi->modelist); + -+ fb_var_to_videomode(&m, &hdmi->fbi->var); -+ fb_add_videomode(&m, &hdmi->fbi->modelist); ++ fb_var_to_videomode(&mode, &hdmi->fbi->var); ++ fb_add_videomode(&mode, &hdmi->fbi->modelist); + + /*Add all no interlaced CEA mode to default modelist */ + for (i = 0; i < ARRAY_SIZE(mxc_cea_mode); i++) { -+ mode = &mxc_cea_mode[i]; -+ if (mode->xres != 0) -+ fb_add_videomode(mode, &hdmi->fbi->modelist); ++ mode = mxc_cea_mode[i]; ++ if (mode.xres != 0) { ++ mode.flag |= FB_MODE_IS_STANDARD; ++ fb_add_videomode(&mode, &hdmi->fbi->modelist); ++ } + } + + fb_new_modelist(hdmi->fbi); @@ -277308,6 +298665,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + const struct fb_videomode *mode; + struct fb_videomode m; + struct fb_var_screeninfo var; ++ u32 l; + + dev_dbg(&hdmi->pdev->dev, "%s\n", __func__); + @@ -277332,42 +298690,45 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + fb_blank(hdmi->fbi, FB_BLANK_UNBLANK); + console_unlock(); + ++ /* update fbi mode in case modelist is updated */ ++ hdmi->fbi->mode = (struct fb_videomode *)mode; ++ dump_fb_videomode(hdmi->fbi->mode); ++ hdmi_set_cable_state(1); ++ ++ /* If video mode same as previous, init HDMI again */ + if (mxc_edid_fb_mode_is_equal(true, &m, mode, ~0) && edid_status == HDMI_EDID_SAME) { + dev_dbg(&hdmi->pdev->dev, + "%s: Video mode and EDID same as previous\n", __func__); -+ /* update fbi mode in case modelist is updated */ -+ hdmi->fbi->mode = (struct fb_videomode *)mode; -+ memcpy(&hdmi->fbi->var, &hdmi->previous_non_vga_mode, -+ sizeof(struct fb_var_screeninfo)); ++ if (hdmi->previous_non_vga_mode.xres_virtual) ++ memcpy(&hdmi->fbi->var.xres_virtual, &hdmi->previous_non_vga_mode.xres_virtual, 2 *sizeof(u32)); + mxc_hdmi_setup(hdmi, 0); + } else if (mxc_edid_fb_mode_is_equal(true, &m, mode, ~0) && edid_status != HDMI_EDID_SAME) { + dev_dbg(&hdmi->pdev->dev, + "%s: Video mode same as previous, EDID changed\n", __func__); -+ /* update fbi mode in case modelist is updated */ -+ hdmi->fbi->mode = (struct fb_videomode *)mode; -+ dump_fb_videomode(hdmi->fbi->mode); -+ memcpy(&hdmi->fbi->var, &hdmi->previous_non_vga_mode, -+ sizeof(struct fb_var_screeninfo)); ++ fb_videomode_to_var(&hdmi->fbi->var, mode); ++ if (hdmi->previous_non_vga_mode.xres_virtual) ++ memcpy(&hdmi->fbi->var.xres_virtual, &hdmi->previous_non_vga_mode.xres_virtual, 2 *sizeof(u32)); + mxc_hdmi_notify_fb(hdmi); + } else if (edid_status != HDMI_EDID_SAME) { + dev_dbg(&hdmi->pdev->dev, "%s: New video mode\n", __func__); + fb_videomode_to_var(&hdmi->fbi->var, mode); -+ dump_fb_videomode((struct fb_videomode *)mode); + mxc_hdmi_notify_fb(hdmi); + } + ++#ifdef CONFIG_MXC_HDMI_CEC ++ memcpy(&l, &hdmi->edid_cfg.physical_address, 4 *sizeof(u8)); ++ mxc_hdmi_cec_handle(l); ++#endif +} + -+static void mxc_hdmi_cable_connected(struct mxc_hdmi *hdmi) ++static void mxc_hdmi_cable_connected_edid(struct mxc_hdmi *hdmi) +{ + int edid_status; + + dev_dbg(&hdmi->pdev->dev, "%s\n", __func__); + -+ hdmi->hp_state = HDMI_HOTPLUG_CONNECTED_NO_EDID; -+ ++ mutex_lock(&hdmi->m_lock); + /* HDMI Initialization Step C */ -+ + if (ignore_edid) + edid_status = HDMI_EDID_FAIL; + else @@ -277405,12 +298766,47 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + break; + } + ++ dev_info(&hdmi->pdev->dev, "%s reports %s mode\n", __func__, hdmi->edid_cfg.hdmi_cap ? "HDMI" : "DVI"); ++ hdmi->hp_state = hdmi->edid_cfg.hdmi_cap ? HDMI_HOTPLUG_CONNECTED_HDMI : HDMI_HOTPLUG_CONNECTED_DVI; ++ hdmi->plug_event = hdmi->edid_cfg.hdmi_cap ? HDMI_IH_PHY_STAT0_HPD : HDMI_DVI_IH_STAT; ++ hdmi->plug_mask = hdmi->edid_cfg.hdmi_cap ? HDMI_PHY_HPD : HDMI_DVI_STAT; ++ + /* Save edid cfg for audio driver */ + hdmi_set_edid_cfg(edid_status, &hdmi->edid_cfg); + + /* Setting video mode */ + mxc_hdmi_set_mode(hdmi, edid_status); + ++ mutex_unlock(&hdmi->m_lock); ++ dev_dbg(&hdmi->pdev->dev, "%s exit\n", __func__); ++} ++ ++static void mxc_hdmi_edid_from_file(const struct firmware *fw, void *data) ++{ ++ struct mxc_hdmi *hdmi = data; ++ ++ mutex_lock(&hdmi->m_lock); ++ hdmi->edid_from_fw = fw; ++ mutex_unlock(&hdmi->m_lock); ++ ++ mxc_hdmi_cable_connected_edid(hdmi); ++} ++ ++static void mxc_hdmi_cable_connected(struct mxc_hdmi *hdmi) ++{ ++ bool has_ext_edid = !!strcmp(hdmi->hdmi_data.edid_filename, ""); ++ ++ dev_dbg(&hdmi->pdev->dev, "%s\n", __func__); ++ ++ hdmi->hp_state = HDMI_HOTPLUG_CONNECTED_NO_EDID; ++ ++ if (has_ext_edid) ++ request_firmware_nowait(THIS_MODULE, true, hdmi->hdmi_data.edid_filename, ++ &hdmi->pdev->dev, GFP_KERNEL, hdmi, mxc_hdmi_edid_from_file); ++ ++ if (!has_ext_edid || !hdmi->dft_mode_set) ++ mxc_hdmi_cable_connected_edid(hdmi); ++ + dev_dbg(&hdmi->pdev->dev, "%s exit\n", __func__); +} + @@ -277419,6 +298815,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi +{ + struct mxc_hdmi *hdmi = mxc_dispdrv_getdata(disp); + ++ change = true; + mxc_hdmi_phy_init(hdmi); + hdmi_clk_regenerator_update_pixel_clock(hdmi->fbi->var.pixclock, hdmi->fbi->var.vmode); + return 0; @@ -277467,7 +298864,6 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + unsigned long flags; + char event_string[32]; + char *envp[] = { event_string, NULL }; -+ u32 l; + + hdmi_phy_stat0 = hdmi_readb(HDMI_PHY_STAT0); + hdmi_phy_pol0 = hdmi_readb(HDMI_PHY_POL0); @@ -277488,11 +298884,6 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + + sprintf(event_string, "EVENT=plugin"); + kobject_uevent_env(&hdmi->pdev->dev.kobj, KOBJ_CHANGE, envp); -+#ifdef CONFIG_MXC_HDMI_CEC -+ memcpy(&l, &hdmi->edid_cfg.physical_address, 4 *sizeof(u8)); -+ mxc_hdmi_cec_handle(l); -+#endif -+ hdmi_set_cable_state(1); + } else { + /* Plugout event */ + dev_dbg(&hdmi->pdev->dev, "EVENT=plugout\n"); @@ -277642,6 +299033,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + } + } + ++ if (!change) ++ return; ++ + hdmi_disable_overflow_interrupts(); + + if ((hdmi->hp_state == HDMI_HOTPLUG_CONNECTED_HDMI) || @@ -277723,6 +299117,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + if (hdmi->hp_state == HDMI_HOTPLUG_CONNECTED_HDMI) + hdmi_enable_overflow_interrupts(); + ++ change = false; + dev_dbg(&hdmi->pdev->dev, "%s exit\n\n", __func__); + +} @@ -278074,7 +299469,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + + /* Set the default mode and modelist when disp init. */ + fb_find_mode(&hdmi->fbi->var, hdmi->fbi, -+ hdmi->dft_mode_str, /*NULL, 0, NULL,*/mxc_cea_mode, ARRAY_SIZE(mxc_cea_mode), NULL, ++ hdmi->dft_mode_str, NULL, 0, NULL, + hdmi->default_bpp); + + console_lock(); @@ -278093,12 +299488,12 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + /* Find a nearest mode in default modelist */ + fb_var_to_videomode(&m, &hdmi->fbi->var); + hdmi->dft_mode_set = false; -+ /* Save default video mode */ -+ memcpy(&hdmi->default_mode, &m, sizeof(struct fb_videomode)); + + mode = fb_find_nearest_mode(&m, &hdmi->fbi->modelist); + if (!mode) + pr_err("%s: could not find mode in modelist\n", __func__); ++ /* Save default video mode */ ++ memcpy(&hdmi->default_mode, mode, sizeof(struct fb_videomode)); + + hdmi->default_mode.vmode |= mode->vmode; + dump_fb_videomode((struct fb_videomode *)mode); @@ -278117,6 +299512,8 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + INIT_WORK(&hdmi->hotplug_work, hotplug_worker); + INIT_DELAYED_WORK(&hdmi->hdcp_hdp_work, hdcp_hdp_worker); + ++ mutex_init(&hdmi->m_lock); ++ + /* Configure registers related to HDMI interrupt + * generation before registering IRQ. */ + hdmi_writeb(hdmi->plug_mask, HDMI_PHY_POL0); @@ -278131,6 +299528,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + + memset(&hdmi->hdmi_data, 0, sizeof(struct hdmi_data_info)); + ++ hdmi->hdmi_data.edid_filename = kstrdup(ext_edid, GFP_KERNEL); ++ pr_info("EDID specified in file: %s\n", hdmi->hdmi_data.edid_filename); ++ + /* Default HDMI working in RGB mode */ + hdmi->hdmi_data.rgb_out_enable = true; + @@ -278247,6 +299647,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi + clk_disable_unprepare(hdmi->mipi_core_clk); + clk_put(hdmi->mipi_core_clk); + ++ kfree(hdmi->hdmi_data.edid_filename); + platform_device_unregister(hdmi->pdev); + + hdmi_inited = false; @@ -278496,10 +299897,10 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_hdmi.c linux-4.1.10/drivers/vi +module_exit(mxc_hdmi_i2c_exit); + +MODULE_AUTHOR("Freescale Semiconductor, Inc."); -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/drivers/video/mxc/mxc_ipuv3_fb.c ---- linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxc_ipuv3_fb.c 2015-10-10 16:41:42.857314850 +0200 -@@ -0,0 +1,2587 @@ +diff -Nur linux-4.1.10/drivers/video/mxc/mxc_ipuv3_fb.c xbian-sources-kernel/drivers/video/mxc/mxc_ipuv3_fb.c +--- linux-4.1.10/drivers/video/mxc/mxc_ipuv3_fb.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxc_ipuv3_fb.c 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,2636 @@ +/* + * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -278931,6 +300332,28 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/driver + sizeof(struct fb_var_screeninfo)); +} + ++static struct fb_videomode *mxc_match_mode(const struct fb_var_screeninfo *var, ++ struct list_head *head) ++{ ++ struct list_head *pos; ++ struct fb_modelist *modelist; ++ struct fb_videomode *m, mode; ++ ++ fb_var_to_videomode(&mode, var); ++ list_for_each(pos, head) { ++ modelist = list_entry(pos, struct fb_modelist, list); ++ m = &modelist->mode; ++ ++ mode.sync &= ~FB_MXC_SYNC_MASK; ++ mode.sync |= m->sync & FB_MXC_SYNC_MASK; ++ ++ if (fb_mode_is_equal(m, &mode)) ++ return m; ++ } ++ ++ return NULL; ++} ++ +/* + * Set framebuffer parameters and change the operating mode. + * @@ -279086,6 +300509,7 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/driver + + if (!mxc_fbi->overlay) { + uint32_t out_pixel_fmt; ++ struct fb_videomode *sync_mode; + + memset(&sig_cfg, 0, sizeof(sig_cfg)); + if (fbi->var.vmode & FB_VMODE_INTERLACED) @@ -279099,6 +300523,21 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/driver + sig_cfg.Hsync_pol = true; + if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT) + sig_cfg.Vsync_pol = true; ++ ++ /* ++ * Try to find matching all parameters, except ++ * FB_MXC_SYNC_MASK bits in the .sync field. ++ */ ++ sync_mode = mxc_match_mode(&fbi->var, &fbi->modelist); ++ /* ++ * If entry exists in the mode list and FB_MXC_SYNC_MASK ++ * bits are empty in the fbi->var.sync (most probably cleared ++ * by the user space application) then copy it from the found ++ * mode list entry. ++ */ ++ if (sync_mode && !(fbi->var.sync & FB_MXC_SYNC_MASK)) ++ fbi->var.sync = sync_mode->sync; ++ + if (!(fbi->var.sync & FB_SYNC_CLK_LAT_FALL)) + sig_cfg.clk_pol = true; + if (fbi->var.sync & FB_SYNC_DATA_INVERT) @@ -280388,8 +301827,16 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/driver + struct fb_info *info = dev_get_drvdata(dev); + struct mxcfb_info *mxcfbi = (struct mxcfb_info *)info->par; + -+ if (mxcfbi->ipu_ch == MEM_FG_SYNC) -+ return sprintf(buf, "overlay\n"); ++ /* foreground */ ++ if (mxcfbi->ipu_ch == MEM_FG_SYNC) { ++ struct fb_info *fbi_tmp; ++ fbi_tmp = found_registered_fb(MEM_BG_SYNC, mxcfbi->ipu_id); ++ if (!fbi_tmp) ++ return sprintf(buf, "overlay\n"); ++ mxcfbi = ((struct mxcfb_info *)(fbi_tmp->par)); ++ return sprintf(buf, "%s overlay\n", mxcfbi->dispdrv->drv->name); ++ } ++ /* background */ + else + return sprintf(buf, "%s\n", mxcfbi->dispdrv->drv->name); +} @@ -280440,7 +301887,8 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/driver + mxcfbi->dispdrv = mxc_dispdrv_gethandle(disp_dev, &setting); + if (IS_ERR(mxcfbi->dispdrv)) { + ret = PTR_ERR(mxcfbi->dispdrv); -+ dev_err(&pdev->dev, "NO mxc display driver found!\n"); ++ dev_err(&pdev->dev, "NO mxc display driver found for %s!\n", ++ disp_dev); + return ret; + } else { + /* fix-up */ @@ -280455,6 +301903,8 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/driver + setting.if_fmt, setting.default_bpp, + mxcfbi->ipu_di, mxcfbi->ipu_id); + } ++ dev_info(&pdev->dev, "registered mxc display driver %s IPU%d_DISP%d\n", ++ disp_dev, mxcfbi->ipu_id + 1, mxcfbi->ipu_di); + + return ret; +} @@ -281087,10 +302537,10 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_ipuv3_fb.c linux-4.1.10/driver +MODULE_DESCRIPTION("MXC framebuffer driver"); +MODULE_LICENSE("GPL"); +MODULE_SUPPORTED_DEVICE("fb"); -diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_lcdif.c linux-4.1.10/drivers/video/mxc/mxc_lcdif.c ---- linux-4.1.10.orig/drivers/video/mxc/mxc_lcdif.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/drivers/video/mxc/mxc_lcdif.c 2015-10-10 16:41:42.857314850 +0200 -@@ -0,0 +1,243 @@ +diff -Nur linux-4.1.10/drivers/video/mxc/mxc_lcdif.c xbian-sources-kernel/drivers/video/mxc/mxc_lcdif.c +--- linux-4.1.10/drivers/video/mxc/mxc_lcdif.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/drivers/video/mxc/mxc_lcdif.c 2015-10-11 19:49:30.643091450 +0200 +@@ -0,0 +1,249 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -281147,6 +302597,12 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_lcdif.c linux-4.1.10/drivers/v + FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + FB_VMODE_INTERLACED, + 0,}, ++ { ++ /* 800x480 @ 60 Hz , pixel clk @ 32MHz */ ++ "KD050C-WVGA", 60, 800, 480, 30000, 40, 40, 13, 29, 48, 3, ++ FB_SYNC_CLK_LAT_FALL, ++ FB_VMODE_NONINTERLACED, ++ 0,}, +}; +static int lcdif_modedb_sz = ARRAY_SIZE(lcdif_modedb); + @@ -281334,9 +302790,9 @@ diff -Nur linux-4.1.10.orig/drivers/video/mxc/mxc_lcdif.c linux-4.1.10/drivers/v +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("i.MX ipuv3 LCD extern port driver"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/firmware/imx/sdma/sdma-imx6q.bin.ihex linux-4.1.10/firmware/imx/sdma/sdma-imx6q.bin.ihex ---- linux-4.1.10.orig/firmware/imx/sdma/sdma-imx6q.bin.ihex 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/firmware/imx/sdma/sdma-imx6q.bin.ihex 2015-10-10 16:41:42.857314850 +0200 +diff -Nur linux-4.1.10/firmware/imx/sdma/sdma-imx6q.bin.ihex xbian-sources-kernel/firmware/imx/sdma/sdma-imx6q.bin.ihex +--- linux-4.1.10/firmware/imx/sdma/sdma-imx6q.bin.ihex 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/firmware/imx/sdma/sdma-imx6q.bin.ihex 2015-10-11 19:49:30.699087738 +0200 @@ -0,0 +1,116 @@ +:1000000053444D4101000000010000001C000000AD +:1000100026000000B40000007A0600008202000002 @@ -281454,9 +302910,9 @@ diff -Nur linux-4.1.10.orig/firmware/imx/sdma/sdma-imx6q.bin.ihex linux-4.1.10/f +:10071000DD6F087FD169010FC86FDD6F037F0101B5 +:0E0720000004129B0700FF680C680002129B89 +:00000001FF -diff -Nur linux-4.1.10.orig/firmware/Makefile linux-4.1.10/firmware/Makefile ---- linux-4.1.10.orig/firmware/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/firmware/Makefile 2015-10-10 16:41:42.857314850 +0200 +diff -Nur linux-4.1.10/firmware/Makefile xbian-sources-kernel/firmware/Makefile +--- linux-4.1.10/firmware/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/firmware/Makefile 2015-10-11 19:49:30.671089594 +0200 @@ -62,6 +62,7 @@ radeon/RV730_pfp.bin radeon/RV730_me.bin \ radeon/RV710_pfp.bin radeon/RV710_me.bin @@ -281465,9 +302921,9 @@ diff -Nur linux-4.1.10.orig/firmware/Makefile linux-4.1.10/firmware/Makefile fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \ e100/d102e_ucode.bin -diff -Nur linux-4.1.10.orig/fs/btrfs/compression.c linux-4.1.10/fs/btrfs/compression.c ---- linux-4.1.10.orig/fs/btrfs/compression.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/fs/btrfs/compression.c 2015-10-10 16:41:42.933314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/compression.c xbian-sources-kernel/fs/btrfs/compression.c +--- linux-4.1.10/fs/btrfs/compression.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/fs/btrfs/compression.c 2015-10-11 19:49:30.727085882 +0200 @@ -753,6 +753,8 @@ static const struct btrfs_compress_op * const btrfs_compress_op[] = { &btrfs_zlib_compress, @@ -281477,9 +302933,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/compression.c linux-4.1.10/fs/btrfs/compres }; void __init btrfs_init_compress(void) -diff -Nur linux-4.1.10.orig/fs/btrfs/compression.h linux-4.1.10/fs/btrfs/compression.h ---- linux-4.1.10.orig/fs/btrfs/compression.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/fs/btrfs/compression.h 2015-10-10 16:41:42.933314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/compression.h xbian-sources-kernel/fs/btrfs/compression.h +--- linux-4.1.10/fs/btrfs/compression.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/fs/btrfs/compression.h 2015-10-11 19:49:30.727085882 +0200 @@ -79,5 +79,7 @@ extern const struct btrfs_compress_op btrfs_zlib_compress; @@ -281488,9 +302944,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/compression.h linux-4.1.10/fs/btrfs/compres +extern const struct btrfs_compress_op btrfs_lz4hc_compress; #endif -diff -Nur linux-4.1.10.orig/fs/btrfs/ctree.h linux-4.1.10/fs/btrfs/ctree.h ---- linux-4.1.10.orig/fs/btrfs/ctree.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/fs/btrfs/ctree.h 2015-10-10 16:41:42.933314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/ctree.h xbian-sources-kernel/fs/btrfs/ctree.h +--- linux-4.1.10/fs/btrfs/ctree.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/fs/btrfs/ctree.h 2015-10-11 19:49:30.727085882 +0200 @@ -504,13 +504,7 @@ #define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1) #define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2) @@ -281527,9 +302983,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/ctree.h linux-4.1.10/fs/btrfs/ctree.h }; struct btrfs_inode_item { -diff -Nur linux-4.1.10.orig/fs/btrfs/disk-io.c linux-4.1.10/fs/btrfs/disk-io.c ---- linux-4.1.10.orig/fs/btrfs/disk-io.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/fs/btrfs/disk-io.c 2015-10-10 16:41:42.937314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/disk-io.c xbian-sources-kernel/fs/btrfs/disk-io.c +--- linux-4.1.10/fs/btrfs/disk-io.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/fs/btrfs/disk-io.c 2015-10-11 19:49:30.727085882 +0200 @@ -2703,6 +2703,10 @@ if (tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZO) features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO; @@ -281541,9 +302997,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/disk-io.c linux-4.1.10/fs/btrfs/disk-io.c if (features & BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA) printk(KERN_INFO "BTRFS: has skinny extents\n"); -diff -Nur linux-4.1.10.orig/fs/btrfs/ioctl.c linux-4.1.10/fs/btrfs/ioctl.c ---- linux-4.1.10.orig/fs/btrfs/ioctl.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/fs/btrfs/ioctl.c 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/ioctl.c xbian-sources-kernel/fs/btrfs/ioctl.c +--- linux-4.1.10/fs/btrfs/ioctl.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/fs/btrfs/ioctl.c 2015-10-11 19:49:30.735085352 +0200 @@ -1439,6 +1439,10 @@ if (range->compress_type == BTRFS_COMPRESS_LZO) { btrfs_set_fs_incompat(root->fs_info, COMPRESS_LZO); @@ -281555,9 +303011,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/ioctl.c linux-4.1.10/fs/btrfs/ioctl.c ret = defrag_count; -diff -Nur linux-4.1.10.orig/fs/btrfs/lz4_wrapper.c linux-4.1.10/fs/btrfs/lz4_wrapper.c ---- linux-4.1.10.orig/fs/btrfs/lz4_wrapper.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/fs/btrfs/lz4_wrapper.c 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/lz4_wrapper.c xbian-sources-kernel/fs/btrfs/lz4_wrapper.c +--- linux-4.1.10/fs/btrfs/lz4_wrapper.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/fs/btrfs/lz4_wrapper.c 2015-10-11 19:49:30.735085352 +0200 @@ -0,0 +1,487 @@ +/* + * Copyright (C) 2008 Oracle. All rights reserved. @@ -282046,9 +303502,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/lz4_wrapper.c linux-4.1.10/fs/btrfs/lz4_wra + .decompress_biovec = lz4_decompress_biovec, + .decompress = lz4_decompress_wrapper, +}; -diff -Nur linux-4.1.10.orig/fs/btrfs/Makefile linux-4.1.10/fs/btrfs/Makefile ---- linux-4.1.10.orig/fs/btrfs/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/fs/btrfs/Makefile 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/Makefile xbian-sources-kernel/fs/btrfs/Makefile +--- linux-4.1.10/fs/btrfs/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/fs/btrfs/Makefile 2015-10-11 19:49:30.723086147 +0200 @@ -9,7 +9,7 @@ export.o tree-log.o free-space-cache.o zlib.o lzo.o \ compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o \ @@ -282058,9 +303514,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/Makefile linux-4.1.10/fs/btrfs/Makefile btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY) += check-integrity.o -diff -Nur linux-4.1.10.orig/fs/btrfs/super.c linux-4.1.10/fs/btrfs/super.c ---- linux-4.1.10.orig/fs/btrfs/super.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/fs/btrfs/super.c 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/fs/btrfs/super.c xbian-sources-kernel/fs/btrfs/super.c +--- linux-4.1.10/fs/btrfs/super.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/fs/btrfs/super.c 2015-10-11 19:49:30.739085087 +0200 @@ -492,6 +492,20 @@ btrfs_clear_opt(info->mount_opt, COMPRESS); btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS); @@ -282098,9 +303554,9 @@ diff -Nur linux-4.1.10.orig/fs/btrfs/super.c linux-4.1.10/fs/btrfs/super.c if (btrfs_test_opt(root, FORCE_COMPRESS)) seq_printf(seq, ",compress-force=%s", compress_type); else -diff -Nur linux-4.1.10.orig/include/dt-bindings/clock/imx6qdl-clock.h linux-4.1.10/include/dt-bindings/clock/imx6qdl-clock.h ---- linux-4.1.10.orig/include/dt-bindings/clock/imx6qdl-clock.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/dt-bindings/clock/imx6qdl-clock.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/dt-bindings/clock/imx6qdl-clock.h xbian-sources-kernel/include/dt-bindings/clock/imx6qdl-clock.h +--- linux-4.1.10/include/dt-bindings/clock/imx6qdl-clock.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/dt-bindings/clock/imx6qdl-clock.h 2015-10-11 19:49:31.491035243 +0200 @@ -86,8 +86,6 @@ #define IMX6QDL_CLK_GPU3D_SHADER 74 #define IMX6QDL_CLK_IPU1_PODF 75 @@ -282125,9 +303581,9 @@ diff -Nur linux-4.1.10.orig/include/dt-bindings/clock/imx6qdl-clock.h linux-4.1. +#define IMX6QDL_CLK_END 248 #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ -diff -Nur linux-4.1.10.orig/include/linux/busfreq-imx6.h linux-4.1.10/include/linux/busfreq-imx6.h ---- linux-4.1.10.orig/include/linux/busfreq-imx6.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/busfreq-imx6.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/busfreq-imx6.h xbian-sources-kernel/include/linux/busfreq-imx6.h +--- linux-4.1.10/include/linux/busfreq-imx6.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/busfreq-imx6.h 2015-10-11 19:49:31.523033122 +0200 @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -282152,9 +303608,9 @@ diff -Nur linux-4.1.10.orig/include/linux/busfreq-imx6.h linux-4.1.10/include/li +void request_bus_freq(enum bus_freq_mode mode); +void release_bus_freq(enum bus_freq_mode mode); +#endif -diff -Nur linux-4.1.10.orig/include/linux/cgroup_subsys.h linux-4.1.10/include/linux/cgroup_subsys.h ---- linux-4.1.10.orig/include/linux/cgroup_subsys.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/linux/cgroup_subsys.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/cgroup_subsys.h xbian-sources-kernel/include/linux/cgroup_subsys.h +--- linux-4.1.10/include/linux/cgroup_subsys.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/linux/cgroup_subsys.h 2015-10-11 19:49:31.535032327 +0200 @@ -35,6 +35,10 @@ SUBSYS(net_cls) #endif @@ -282166,9 +303622,9 @@ diff -Nur linux-4.1.10.orig/include/linux/cgroup_subsys.h linux-4.1.10/include/l #if IS_ENABLED(CONFIG_CGROUP_PERF) SUBSYS(perf_event) #endif -diff -Nur linux-4.1.10.orig/include/linux/device_cooling.h linux-4.1.10/include/linux/device_cooling.h ---- linux-4.1.10.orig/include/linux/device_cooling.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/device_cooling.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/device_cooling.h xbian-sources-kernel/include/linux/device_cooling.h +--- linux-4.1.10/include/linux/device_cooling.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/device_cooling.h 2015-10-11 19:49:31.547031531 +0200 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2013 Freescale Semiconductor, Inc. @@ -282215,9 +303671,9 @@ diff -Nur linux-4.1.10.orig/include/linux/device_cooling.h linux-4.1.10/include/ +} +#endif +#endif /* __DEVICE_THERMAL_H__ */ -diff -Nur linux-4.1.10.orig/include/linux/fb.h linux-4.1.10/include/linux/fb.h ---- linux-4.1.10.orig/include/linux/fb.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/linux/fb.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/fb.h xbian-sources-kernel/include/linux/fb.h +--- linux-4.1.10/include/linux/fb.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/linux/fb.h 2015-10-11 19:49:31.551031266 +0200 @@ -702,7 +702,8 @@ #define FB_MODE_IS_VESA 4 #define FB_MODE_IS_CALCULATED 8 @@ -282228,9 +303684,9 @@ diff -Nur linux-4.1.10.orig/include/linux/fb.h linux-4.1.10/include/linux/fb.h extern int fbmon_dpms(const struct fb_info *fb_info); extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, -diff -Nur linux-4.1.10.orig/include/linux/ipu.h linux-4.1.10/include/linux/ipu.h ---- linux-4.1.10.orig/include/linux/ipu.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/ipu.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/ipu.h xbian-sources-kernel/include/linux/ipu.h +--- linux-4.1.10/include/linux/ipu.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/ipu.h 2015-10-11 19:49:31.571029940 +0200 @@ -0,0 +1,38 @@ +/* + * Copyright 2005-2013 Freescale Semiconductor, Inc. @@ -282270,9 +303726,9 @@ diff -Nur linux-4.1.10.orig/include/linux/ipu.h linux-4.1.10/include/linux/ipu.h +int ipu_check_task(struct ipu_task *task); + +#endif -diff -Nur linux-4.1.10.orig/include/linux/ipu-v3.h linux-4.1.10/include/linux/ipu-v3.h ---- linux-4.1.10.orig/include/linux/ipu-v3.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/ipu-v3.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/ipu-v3.h xbian-sources-kernel/include/linux/ipu-v3.h +--- linux-4.1.10/include/linux/ipu-v3.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/ipu-v3.h 2015-10-11 19:49:31.571029940 +0200 @@ -0,0 +1,761 @@ +/* + * Copyright (c) 2010 Sascha Hauer <s.hauer@pengutronix.de> @@ -283035,9 +304491,9 @@ diff -Nur linux-4.1.10.orig/include/linux/ipu-v3.h linux-4.1.10/include/linux/ip +}; + +#endif /* __LINUX_IPU_V3_H_ */ -diff -Nur linux-4.1.10.orig/include/linux/mfd/mxc-hdmi-core.h linux-4.1.10/include/linux/mfd/mxc-hdmi-core.h ---- linux-4.1.10.orig/include/linux/mfd/mxc-hdmi-core.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/mfd/mxc-hdmi-core.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mfd/mxc-hdmi-core.h xbian-sources-kernel/include/linux/mfd/mxc-hdmi-core.h +--- linux-4.1.10/include/linux/mfd/mxc-hdmi-core.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mfd/mxc-hdmi-core.h 2015-10-11 19:49:31.591028615 +0200 @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -283107,9 +304563,9 @@ diff -Nur linux-4.1.10.orig/include/linux/mfd/mxc-hdmi-core.h linux-4.1.10/inclu +void hdmi_cec_stop_device(void); + +#endif -diff -Nur linux-4.1.10.orig/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h linux-4.1.10/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h ---- linux-4.1.10.orig/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h xbian-sources-kernel/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +--- linux-4.1.10/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h 2015-10-11 19:49:31.595028350 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Freescale Semiconductor, Inc. @@ -283203,9 +304659,238 @@ diff -Nur linux-4.1.10.orig/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h linux-4. +#define IMX6SX_GPR12_RX_EQ_MASK (0x7 << 0) +#define IMX6SX_GPR12_RX_EQ_2 (0x2 << 0) #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */ -diff -Nur linux-4.1.10.orig/include/linux/mipi_csi2.h linux-4.1.10/include/linux/mipi_csi2.h ---- linux-4.1.10.orig/include/linux/mipi_csi2.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/mipi_csi2.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mfd/tda1997x-core.h xbian-sources-kernel/include/linux/mfd/tda1997x-core.h +--- linux-4.1.10/include/linux/mfd/tda1997x-core.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mfd/tda1997x-core.h 2015-10-11 19:49:31.595028350 +0200 +@@ -0,0 +1,225 @@ ++/* ++ * tda1997x.h - header for TDA1997X HDMI receiver device ++ * ++ * Copyright (C) 2013 Gateworks Corporation ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++#ifndef __TDA1997X_H_ ++#define __TDA1997X_H_ ++ ++#include <linux/types.h> ++ ++/* ++ * Video Port Configuration: ++ * ++ * 9 byte registers describe the video port output bit mapping (which bits from ++ * the video data stream output on which pins). Each register controls a ++ * 'pin group' of 4 bits (nibble) of the internal 36bit video data bus ++ * with the following bit descriptions: ++ * ++ * 7 - vp_out - video port output enable: 1-active ++ * 6 - vp_hiz - video port output level when not used: 1-HI-Z, 0-Low ++ * 5 - unused ++ * 4 - vp_swap - Swap bit allocation: 1-swap ++ * 3:0 - vp_sel - Select nibble to be routed to this pin-group ++ * 00: D[03:00] ++ * 01: D[07:04] ++ * 02: D[03:08] ++ * 03: D[07:12] ++ * 04: D[11:16] ++ * 05: D[15:20] ++ * 06: D[19:24] ++ * 07: D[23:28] ++ * 08: D[27:32] ++ * 0a: D[31:35] ++ * ++ * The pingroups differ per chip and are as follows: ++ * ++ * Byte Register TDA19971(24bit) TDA19972(36bit) ++ * 1 VP35_32_CTRL VP[24:20] Group8 VP[35:32] Group8 ++ * 2 VP31_28_CTRL VP[19:16] Group7 VP[31:28] Group7 ++ * 3 VP27_24_CTRL N/A VP[27:24] Group6 ++ * 4 VP23_20_CTRL VP[15:12] Group5 VP[23:20] Group5 ++ * 5 VP19_16_CTRL VP[11:08] Group4 VP[19:16] Group4 ++ * 6 VP15_12_CTRL N/A VP[15:12] Group3 ++ * 7 VP11_08_CTRL VP[07:04] Group2 VP[11:08] Group2 ++ * 8 VP07_04_CTRL VP[03:00] Group1 VP[07:04] Group1 ++ * 9 VP03_00_CTRL N/A VP[03:00] Group0 ++ * ++ * Note that the internal 36bit video bus is aligned to the top of the bus, ++ * for example 8bit CCIR656 will be output on D[24:16] internally. ++ * ++ * If you have a TDA19971 (24bit output) pins VP[0:8] connected to ++ * an Soc with an 8bit video port (ie for 8bit CCIR656 data) you would ++ * assign the 9 registers as follows to map D[24:16] to VP[0:8]. ++ * ++ * video_out_port = { ++ * 0x00, // VP35_32_CTRL ++ * 0x00, // VP31_28_CTRL ++ * 0x00, // VP27_24_CTRL ++ * 0x82, // VP23_18_CTRL: vp_out=1 vp_hiz=0 vp_swap=0 vp_sel=2 (Group2) ++ * 0x81, // VP19_16_CTRL: vp_out=1 vp_hiz=0 vp_swap=0 vp_sel=1 (Group8) ++ * 0x00, // VP15_12_CTRL ++ * 0x00, // VP11_08_CTRL ++ * 0x00, // VP07_04_CTRL ++ * 0x00, // VP03_00_CTRL ++ * }; ++ */ ++ ++/* Video output clock modes */ ++typedef enum { ++ CLOCK_SINGLE_EDGE, ++ CLOCK_DUAL_EDGE, ++ CLOCK_SINGLE_EDGE_TOGGLED, ++ CLOCK_DUAL_EDGE_TOGGLED, ++} tda1997x_videoclkmode_t; ++ ++/* Video output data formats */ ++typedef enum { ++ VIDEOFMT_444 = 0x00, /* RGB444/YUV444 */ ++ VIDEOFMT_422_SMP = 0x01, /* YUV422 semi-planar */ ++ VIDEOFMT_422_CCIR = 0x02 /* YUV422 CCIR656 */ ++} tda1997x_videofmt_t; ++ ++/* HS/HREF signal source */ ++typedef enum ++{ ++ SYNCOUTPUT_HSYNC_VHREF = 0x00, /* HS from VHREF - do not use (not programmed) */ ++ SYNCOUTPUT_HREF_VHREF = 0x01, /* HREF from VHREF */ ++ SYNCOUTPUT_HREF_HDMI = 0x02, /* HREF from HDMI */ ++} tda1997x_sync_output_hs_t; ++ ++/* VS/VREF signal source */ ++typedef enum ++{ ++ SYNCOUTPUT_VSYNC_VHREF = 0x00, /* VS from VHREF - do not use (not programmed) */ ++ SYNCOUTPUT_VREF_VHREF = 0x01, /* VREF from VHREF */ ++ SYNCOUTPUT_VREF_HDMI = 0x02, /* VREF from HDMI */ ++} tda1997x_sync_output_vs_t; ++ ++/* DE/FREF signal source */ ++typedef enum ++{ ++ SYNCOUTPUT_DE_VHREF = 0x00, /* DE from VHREF (HREF and not VREF) */ ++ SYNCOUTPUT_FREF_VHREF = 0x01, /* FREF from VHREF */ ++ SYNCOUTPUT_FREF_HDMI = 0x02, /* FREF from HDMI */ ++} tda1997x_sync_output_de_t; ++ ++/* video details */ ++typedef struct { ++ /* video input data (input to the HDMI receiver) */ ++ int width; ++ int height; ++ int fps; ++ bool interlaced; ++ bool signal; ++ ++ /* video output data (output from the HDMI receiver) */ ++ tda1997x_videofmt_t sensor_vidfmt; ++ tda1997x_videoclkmode_t sensor_clkmode; ++} tda1997x_vidout_fmt_t; ++ ++/** Obtain current video format details from core */ ++int tda1997x_get_vidout_fmt(tda1997x_vidout_fmt_t *); ++ ++/* ++ * Audio samples can be output in either S/PDIF or I2S bus formats. ++ * In I2S mode, the TDF1997X is the master with 16bit or 32bit per word. ++ * In either modes, up to 8 audio channels can be controlled using the audio ++ * port pins AP0 to AP3 and A_WS. The audio port mapping depends on the ++ * channel allocation, layout, and audio input type. ++ * ++ * The following table shows the audio port pin usage for the various modes ++ * possible (pins missing should be unconnected) ++ * ++ * | SPDIF | SPDIF | I2S | I2S | HBR demux ++ * | Layout0 | Layout1 | Layout0 | Layout1 | SPDIF | I2S ++ * ------+---------+---------+---------+---------+------------+------------ ++ * A_WS | WS | WS | WS | WS | WS | WS ++ * AP3 | | SPDIF3 | | SD3 | SPDIF[x+3] | SD[x+3] ++ * AP2 | | SPDIF2 | | SD2 | SPDIF[x+2] | SD[x+2] ++ * AP1 | | SPDIF1 | | SD1 | SPDIF[x+1] | SD[x+1] ++ * AP0 | | SPDIF0 | | SD0 | SPDIF[x] | SD[x] ++ * A_CLK | (32*Fs) | (32*Fs) |(32*Fs) | (32*Fs) | (32*FsACR) | (32*FsACR) ++ * | (64*Fs) | (64*Fs) |(64*Fs) | (64*Fs) | (64*FsACR) | (64*FsACR) ++ * ++ * Freq(Sysclk) = 2*freq(Aclk) ++ */ ++typedef enum { ++ AUDIO_LAYOUT_FORCED_0 = 0x00, /* Layout dictated by packet header? */ ++ AUDIO_LAYOUT_FORCED_1 = 0x01, /* layout1? */ ++ AUDIO_LAYOUT_FORCED = 0x02, /* layout0? */ ++} tda1997x_audiolayout_t; ++ ++/* Audio output data formats */ ++typedef enum { ++ AUDIO_FMT_I2S16, /* I2S 16 bit */ ++ AUDIO_FMT_I2S32, /* I2S 32 bit */ ++ AUDIO_FMT_SPDIF, /* SPDIF */ ++ AUDIO_FMT_OBA, /* One Bit Audio */ ++ AUDIO_FMT_I2S16_HBR_STRAIGHT, /* HBR straight in I2S 16bit mode */ ++ AUDIO_FMT_I2S16_HBR_DEMUX, /* HBR demux in I2S 16bit mode */ ++ AUDIO_FMT_I2S32_HBR_DEMUX, /* HBR demux in I2S 32bit mode */ ++ AUDIO_FMT_SPDIF_HBR_DEMUX, /* HBR demux in SPDIF mode */ ++ AUDIO_FMT_DST, /* Direct Stream Transfer */ ++} tda1997x_audiofmt_t; ++ ++/* Audio output clock frequencies */ ++typedef enum ++{ ++ AUDIO_SYSCLK_128FS = 0x03, ++ AUDIO_SYSCLK_256FS = 0x04, ++ AUDIO_SYSCLK_512FS = 0x05, ++} tda1997x_audiosysclk_t; ++ ++/* Audio output info */ ++typedef struct { ++ int samplerate; ++ int channels; ++ int samplesize; ++} tda1997x_audout_fmt_t; ++ ++/** Obtain current audio format details from core */ ++int tda1997x_get_audout_fmt(tda1997x_audout_fmt_t *); ++ ++/* possible states of the state machine */ ++typedef enum ++{ ++ STATE_NOT_INITIALIZED, /* Driver is not initialized */ ++ STATE_INITIALIZED, /* Driver is initialized */ ++ STATE_UNLOCKED, /* Driver is not locked on input signal */ ++ STATE_LOCKED, /* Driver is locked on input signal */ ++ STATE_CONFIGURED /* Driver is configured */ ++} tda1997x_state_t; ++ ++extern tda1997x_state_t tda1997x_get_state(void); ++ ++/* HDMI Inputs: ++ * TDA19971: HDMI-A (single input) ++ * TDA19972: HDMI-A|B (dual input) ++ */ ++typedef enum ++{ ++ INPUT_HDMI_A, ++ INPUT_HDMI_B, /* TDA19972 only */ ++ INPUT_AUTO_DIGITAL, /* TDA19972 only */ ++} tda1997x_input_t; ++ ++extern int tda1997x_select_input(tda1997x_input_t); ++ ++#endif /* End of __TDA1997X_H */ +diff -Nur linux-4.1.10/include/linux/mipi_csi2.h xbian-sources-kernel/include/linux/mipi_csi2.h +--- linux-4.1.10/include/linux/mipi_csi2.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mipi_csi2.h 2015-10-11 19:49:31.603027819 +0200 @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -283294,9 +304979,9 @@ diff -Nur linux-4.1.10.orig/include/linux/mipi_csi2.h linux-4.1.10/include/linux +int mipi_csi2_reset(struct mipi_csi2_info *info); + +#endif -diff -Nur linux-4.1.10.orig/include/linux/mipi_dsi.h linux-4.1.10/include/linux/mipi_dsi.h ---- linux-4.1.10.orig/include/linux/mipi_dsi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/mipi_dsi.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mipi_dsi.h xbian-sources-kernel/include/linux/mipi_dsi.h +--- linux-4.1.10/include/linux/mipi_dsi.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mipi_dsi.h 2015-10-11 19:49:31.603027819 +0200 @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -283469,24 +305154,20 @@ diff -Nur linux-4.1.10.orig/include/linux/mipi_dsi.h linux-4.1.10/include/linux/ +#define DSI_PHY_CLK_INIT_COMMAND (0x44) +#define DSI_GEN_PLD_DATA_BUF_SIZE (0x4) +#endif -diff -Nur linux-4.1.10.orig/include/linux/mmc/host.h linux-4.1.10/include/linux/mmc/host.h ---- linux-4.1.10.orig/include/linux/mmc/host.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/linux/mmc/host.h 2015-10-10 16:41:42.941314855 +0200 -@@ -300,6 +300,11 @@ - unsigned long clkgate_delay; - #endif - -+ /* card specific properties to deal with power and reset */ -+ struct regulator *card_regulator; /* External VCC needed by the card */ -+ struct gpio_desc *card_reset_gpios[2]; /* External resets, active low */ -+ struct clk *card_clk; /* External clock needed by the card */ -+ - /* host specific block data */ - unsigned int max_seg_size; /* see blk_queue_max_segment_size */ - unsigned short max_segs; /* see blk_queue_max_segments */ -diff -Nur linux-4.1.10.orig/include/linux/mm_types.h linux-4.1.10/include/linux/mm_types.h ---- linux-4.1.10.orig/include/linux/mm_types.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/linux/mm_types.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mmc/card.h xbian-sources-kernel/include/linux/mmc/card.h +--- linux-4.1.10/include/linux/mmc/card.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/linux/mmc/card.h 2015-10-11 19:49:31.603027819 +0200 +@@ -282,6 +282,7 @@ + unsigned int erase_size; /* erase size in sectors */ + unsigned int erase_shift; /* if erase unit is power 2 */ + unsigned int pref_erase; /* in sectors */ ++ unsigned int eg_boundary; /* don't cross erase-group boundaries */ + u8 erased_byte; /* value of erased bytes */ + + u32 raw_cid[4]; /* raw card CID */ +diff -Nur linux-4.1.10/include/linux/mm_types.h xbian-sources-kernel/include/linux/mm_types.h +--- linux-4.1.10/include/linux/mm_types.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/linux/mm_types.h 2015-10-11 19:49:31.603027819 +0200 @@ -23,7 +23,7 @@ struct address_space; struct mem_cgroup; @@ -283496,9 +305177,9 @@ diff -Nur linux-4.1.10.orig/include/linux/mm_types.h linux-4.1.10/include/linux/ #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \ IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK)) #define ALLOC_SPLIT_PTLOCKS (SPINLOCK_SIZE > BITS_PER_LONG/8) -diff -Nur linux-4.1.10.orig/include/linux/mxc_asrc.h linux-4.1.10/include/linux/mxc_asrc.h ---- linux-4.1.10.orig/include/linux/mxc_asrc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/mxc_asrc.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mxc_asrc.h xbian-sources-kernel/include/linux/mxc_asrc.h +--- linux-4.1.10/include/linux/mxc_asrc.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mxc_asrc.h 2015-10-11 19:49:31.611027289 +0200 @@ -0,0 +1,389 @@ +/* + * Copyright 2008-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -283889,9 +305570,9 @@ diff -Nur linux-4.1.10.orig/include/linux/mxc_asrc.h linux-4.1.10/include/linux/ + u32 in_wm, u32 out_wm); + +#endif/* __MXC_ASRC_H__ */ -diff -Nur linux-4.1.10.orig/include/linux/mxc_dcic.h linux-4.1.10/include/linux/mxc_dcic.h ---- linux-4.1.10.orig/include/linux/mxc_dcic.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/mxc_dcic.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mxc_dcic.h xbian-sources-kernel/include/linux/mxc_dcic.h +--- linux-4.1.10/include/linux/mxc_dcic.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mxc_dcic.h 2015-10-11 19:49:31.611027289 +0200 @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2014 Freescale Semiconductor, Inc. All Rights Reserved @@ -284027,9 +305708,9 @@ diff -Nur linux-4.1.10.orig/include/linux/mxc_dcic.h linux-4.1.10/include/linux/ + unsigned int result; +}; +#endif -diff -Nur linux-4.1.10.orig/include/linux/mxc_v4l2.h linux-4.1.10/include/linux/mxc_v4l2.h ---- linux-4.1.10.orig/include/linux/mxc_v4l2.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/mxc_v4l2.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mxc_v4l2.h xbian-sources-kernel/include/linux/mxc_v4l2.h +--- linux-4.1.10/include/linux/mxc_v4l2.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mxc_v4l2.h 2015-10-11 19:49:31.611027289 +0200 @@ -0,0 +1,27 @@ +/* + * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -284058,9 +305739,9 @@ diff -Nur linux-4.1.10.orig/include/linux/mxc_v4l2.h linux-4.1.10/include/linux/ +#include <uapi/linux/mxc_v4l2.h> + +#endif -diff -Nur linux-4.1.10.orig/include/linux/mxc_vpu.h linux-4.1.10/include/linux/mxc_vpu.h ---- linux-4.1.10.orig/include/linux/mxc_vpu.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/mxc_vpu.h 2015-10-10 16:41:42.941314855 +0200 +diff -Nur linux-4.1.10/include/linux/mxc_vpu.h xbian-sources-kernel/include/linux/mxc_vpu.h +--- linux-4.1.10/include/linux/mxc_vpu.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/mxc_vpu.h 2015-10-11 19:49:31.611027289 +0200 @@ -0,0 +1,118 @@ +/* + * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -284180,9 +305861,9 @@ diff -Nur linux-4.1.10.orig/include/linux/mxc_vpu.h linux-4.1.10/include/linux/m +void vl2cc_cleanup(void); + +#endif -diff -Nur linux-4.1.10.orig/include/linux/platform_data/dma-imx.h linux-4.1.10/include/linux/platform_data/dma-imx.h ---- linux-4.1.10.orig/include/linux/platform_data/dma-imx.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/linux/platform_data/dma-imx.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/linux/platform_data/dma-imx.h xbian-sources-kernel/include/linux/platform_data/dma-imx.h +--- linux-4.1.10/include/linux/platform_data/dma-imx.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/linux/platform_data/dma-imx.h 2015-10-11 19:49:31.627026229 +0200 @@ -17,31 +17,30 @@ * This enumerates peripheral types. Used for SDMA. */ @@ -284247,9 +305928,9 @@ diff -Nur linux-4.1.10.orig/include/linux/platform_data/dma-imx.h linux-4.1.10/i }; static inline int imx_dma_is_ipu(struct dma_chan *chan) -diff -Nur linux-4.1.10.orig/include/linux/pxp_device.h linux-4.1.10/include/linux/pxp_device.h ---- linux-4.1.10.orig/include/linux/pxp_device.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/pxp_device.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/linux/pxp_device.h xbian-sources-kernel/include/linux/pxp_device.h +--- linux-4.1.10/include/linux/pxp_device.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/pxp_device.h 2015-10-11 19:49:31.635025698 +0200 @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -284319,9 +306000,9 @@ diff -Nur linux-4.1.10.orig/include/linux/pxp_device.h linux-4.1.10/include/linu +}; + +#endif -diff -Nur linux-4.1.10.orig/include/linux/pxp_dma.h linux-4.1.10/include/linux/pxp_dma.h ---- linux-4.1.10.orig/include/linux/pxp_dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/linux/pxp_dma.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/linux/pxp_dma.h xbian-sources-kernel/include/linux/pxp_dma.h +--- linux-4.1.10/include/linux/pxp_dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/linux/pxp_dma.h 2015-10-11 19:49:31.635025698 +0200 @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2010-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -284395,10 +306076,10 @@ diff -Nur linux-4.1.10.orig/include/linux/pxp_dma.h linux-4.1.10/include/linux/p +#endif + +#endif -diff -Nur linux-4.1.10.orig/include/media/v4l2-chip-ident.h linux-4.1.10/include/media/v4l2-chip-ident.h ---- linux-4.1.10.orig/include/media/v4l2-chip-ident.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/media/v4l2-chip-ident.h 2015-10-10 16:41:42.945314855 +0200 -@@ -0,0 +1,354 @@ +diff -Nur linux-4.1.10/include/media/v4l2-chip-ident.h xbian-sources-kernel/include/media/v4l2-chip-ident.h +--- linux-4.1.10/include/media/v4l2-chip-ident.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/media/v4l2-chip-ident.h 2015-10-11 19:49:31.703021191 +0200 +@@ -0,0 +1,358 @@ +/* + v4l2 chip identifiers header + @@ -284632,6 +306313,10 @@ diff -Nur linux-4.1.10.orig/include/media/v4l2-chip-ident.h linux-4.1.10/include + /* module ad9389b: just ident 9389 */ + V4L2_IDENT_AD9389B = 9389, + ++ /* module tda1997x */ ++ V4L2_IDENT_TDA19971 = 19971, ++ V4L2_IDENT_TDA19973 = 19973, ++ + /* module tda9840: just ident 9840 */ + V4L2_IDENT_TDA9840 = 9840, + @@ -284753,329 +306438,9 @@ diff -Nur linux-4.1.10.orig/include/media/v4l2-chip-ident.h linux-4.1.10/include +}; + +#endif -diff -Nur linux-4.1.10.orig/include/media/v4l2-int-device.h linux-4.1.10/include/media/v4l2-int-device.h ---- linux-4.1.10.orig/include/media/v4l2-int-device.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/media/v4l2-int-device.h 2015-10-10 16:41:42.945314855 +0200 -@@ -0,0 +1,316 @@ -+/* -+ * include/media/v4l2-int-device.h -+ * -+ * V4L2 internal ioctl interface. -+ * -+ * Copyright (C) 2007 Nokia Corporation. -+ * -+ * Contact: Sakari Ailus <sakari.ailus@nokia.com> -+ * -+ * 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. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -+ * 02110-1301 USA -+ */ -+ -+#ifndef V4L2_INT_DEVICE_H -+#define V4L2_INT_DEVICE_H -+ -+#include <media/v4l2-common.h> -+ -+#define V4L2NAMESIZE 32 -+ -+/* -+ * -+ * The internal V4L2 device interface core. -+ * -+ */ -+ -+enum v4l2_int_type { -+ v4l2_int_type_master = 1, -+ v4l2_int_type_slave -+}; -+ -+struct module; -+ -+struct v4l2_int_device; -+ -+struct v4l2_int_master { -+ int (*attach)(struct v4l2_int_device *slave); -+ void (*detach)(struct v4l2_int_device *slave); -+}; -+ -+typedef int (v4l2_int_ioctl_func)(struct v4l2_int_device *); -+typedef int (v4l2_int_ioctl_func_0)(struct v4l2_int_device *); -+typedef int (v4l2_int_ioctl_func_1)(struct v4l2_int_device *, void *); -+ -+struct v4l2_int_ioctl_desc { -+ int num; -+ v4l2_int_ioctl_func *func; -+}; -+ -+struct v4l2_int_slave { -+ /* Don't touch master. */ -+ struct v4l2_int_device *master; -+ -+ char attach_to[V4L2NAMESIZE]; -+ -+ int num_ioctls; -+ struct v4l2_int_ioctl_desc *ioctls; -+}; -+ -+struct v4l2_int_device { -+ /* Don't touch head. */ -+ struct list_head head; -+ -+ struct module *module; -+ -+ char name[V4L2NAMESIZE]; -+ -+ enum v4l2_int_type type; -+ union { -+ struct v4l2_int_master *master; -+ struct v4l2_int_slave *slave; -+ } u; -+ -+ void *priv; -+}; -+ -+void v4l2_int_device_try_attach_all(void); -+ -+int v4l2_int_device_register(struct v4l2_int_device *d); -+void v4l2_int_device_unregister(struct v4l2_int_device *d); -+ -+int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd); -+int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg); -+ -+/* -+ * -+ * Types and definitions for IOCTL commands. -+ * -+ */ -+ -+enum v4l2_power { -+ V4L2_POWER_OFF = 0, -+ V4L2_POWER_ON, -+ V4L2_POWER_STANDBY, -+}; -+ -+/* Slave interface type. */ -+enum v4l2_if_type { -+ /* -+ * Parallel 8-, 10- or 12-bit interface, used by for example -+ * on certain image sensors. -+ */ -+ V4L2_IF_TYPE_BT656, -+ V4L2_IF_TYPE_BT1120_PROGRESSIVE_DDR, -+ V4L2_IF_TYPE_BT1120_PROGRESSIVE_SDR, -+ V4L2_IF_TYPE_BT1120_INTERLACED_DDR, -+ V4L2_IF_TYPE_BT1120_INTERLACED_SDR, -+ V4L2_IF_TYPE_BT656_PROGRESSIVE, -+ V4L2_IF_TYPE_BT656_INTERLACED, -+}; -+ -+enum v4l2_if_type_bt656_mode { -+ /* -+ * Modes without Bt synchronisation codes. Separate -+ * synchronisation signal lines are used. -+ */ -+ V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT, -+ V4L2_IF_TYPE_BT656_MODE_NOBT_10BIT, -+ V4L2_IF_TYPE_BT656_MODE_NOBT_12BIT, -+ /* -+ * Use Bt synchronisation codes. The vertical and horizontal -+ * synchronisation is done based on synchronisation codes. -+ */ -+ V4L2_IF_TYPE_BT656_MODE_BT_8BIT, -+ V4L2_IF_TYPE_BT656_MODE_BT_10BIT, -+}; -+ -+struct v4l2_if_type_bt656 { -+ /* -+ * 0: Frame begins when vsync is high. -+ * 1: Frame begins when vsync changes from low to high. -+ */ -+ unsigned frame_start_on_rising_vs:1; -+ /* Use Bt synchronisation codes for sync correction. */ -+ unsigned bt_sync_correct:1; -+ /* Swap every two adjacent image data elements. */ -+ unsigned swap:1; -+ /* Inverted latch clock polarity from slave. */ -+ unsigned latch_clk_inv:1; -+ /* Hs polarity. 0 is active high, 1 active low. */ -+ unsigned nobt_hs_inv:1; -+ /* Vs polarity. 0 is active high, 1 active low. */ -+ unsigned nobt_vs_inv:1; -+ enum v4l2_if_type_bt656_mode mode; -+ /* Minimum accepted bus clock for slave (in Hz). */ -+ u32 clock_min; -+ /* Maximum accepted bus clock for slave. */ -+ u32 clock_max; -+ /* -+ * Current wish of the slave. May only change in response to -+ * ioctls that affect image capture. -+ */ -+ u32 clock_curr; -+}; -+ -+struct v4l2_ifparm { -+ enum v4l2_if_type if_type; -+ union { -+ struct v4l2_if_type_bt656 bt656; -+ } u; -+}; -+ -+/* IOCTL command numbers. */ -+enum v4l2_int_ioctl_num { -+ /* -+ * -+ * "Proper" V4L ioctls, as in struct video_device. -+ * -+ */ -+ vidioc_int_enum_fmt_cap_num = 1, -+ vidioc_int_g_fmt_cap_num, -+ vidioc_int_s_fmt_cap_num, -+ vidioc_int_try_fmt_cap_num, -+ vidioc_int_queryctrl_num, -+ vidioc_int_g_ctrl_num, -+ vidioc_int_s_ctrl_num, -+ vidioc_int_cropcap_num, -+ vidioc_int_g_crop_num, -+ vidioc_int_s_crop_num, -+ vidioc_int_g_parm_num, -+ vidioc_int_s_parm_num, -+ vidioc_int_querystd_num, -+ vidioc_int_s_std_num, -+ vidioc_int_s_video_routing_num, -+ vidioc_int_send_command_num, -+ -+ /* -+ * -+ * Strictly internal ioctls. -+ * -+ */ -+ /* Initialise the device when slave attaches to the master. */ -+ vidioc_int_dev_init_num = 1000, -+ /* Delinitialise the device at slave detach. */ -+ vidioc_int_dev_exit_num, -+ /* Set device power state. */ -+ vidioc_int_s_power_num, -+ /* -+ * Get slave private data, e.g. platform-specific slave -+ * configuration used by the master. -+ */ -+ vidioc_int_g_priv_num, -+ /* Get slave interface parameters. */ -+ vidioc_int_g_ifparm_num, -+ /* Does the slave need to be reset after VIDIOC_DQBUF? */ -+ vidioc_int_g_needs_reset_num, -+ vidioc_int_enum_framesizes_num, -+ vidioc_int_enum_frameintervals_num, -+ -+ /* -+ * -+ * VIDIOC_INT_* ioctls. -+ * -+ */ -+ /* VIDIOC_INT_RESET */ -+ vidioc_int_reset_num, -+ /* VIDIOC_INT_INIT */ -+ vidioc_int_init_num, -+ /* VIDIOC_DBG_G_CHIP_IDENT */ -+ vidioc_int_g_chip_ident_num, -+ -+ /* -+ * -+ * Start of private ioctls. -+ * -+ */ -+ vidioc_int_priv_start_num = 2000, -+}; -+ -+/* -+ * -+ * IOCTL wrapper functions for better type checking. -+ * -+ */ -+ -+#define V4L2_INT_WRAPPER_0(name) \ -+ static inline int vidioc_int_##name(struct v4l2_int_device *d) \ -+ { \ -+ return v4l2_int_ioctl_0(d, vidioc_int_##name##_num); \ -+ } \ -+ \ -+ static inline struct v4l2_int_ioctl_desc \ -+ vidioc_int_##name##_cb(int (*func) \ -+ (struct v4l2_int_device *)) \ -+ { \ -+ struct v4l2_int_ioctl_desc desc; \ -+ \ -+ desc.num = vidioc_int_##name##_num; \ -+ desc.func = (v4l2_int_ioctl_func *)func; \ -+ \ -+ return desc; \ -+ } -+ -+#define V4L2_INT_WRAPPER_1(name, arg_type, asterisk) \ -+ static inline int vidioc_int_##name(struct v4l2_int_device *d, \ -+ arg_type asterisk arg) \ -+ { \ -+ return v4l2_int_ioctl_1(d, vidioc_int_##name##_num, \ -+ (void *)(unsigned long)arg); \ -+ } \ -+ \ -+ static inline struct v4l2_int_ioctl_desc \ -+ vidioc_int_##name##_cb(int (*func) \ -+ (struct v4l2_int_device *, \ -+ arg_type asterisk)) \ -+ { \ -+ struct v4l2_int_ioctl_desc desc; \ -+ \ -+ desc.num = vidioc_int_##name##_num; \ -+ desc.func = (v4l2_int_ioctl_func *)func; \ -+ \ -+ return desc; \ -+ } -+ -+V4L2_INT_WRAPPER_1(enum_fmt_cap, struct v4l2_fmtdesc, *); -+V4L2_INT_WRAPPER_1(g_fmt_cap, struct v4l2_format, *); -+V4L2_INT_WRAPPER_1(s_fmt_cap, struct v4l2_format, *); -+V4L2_INT_WRAPPER_1(try_fmt_cap, struct v4l2_format, *); -+V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *); -+V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *); -+V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *); -+V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *); -+V4L2_INT_WRAPPER_1(g_crop, struct v4l2_crop, *); -+V4L2_INT_WRAPPER_1(s_crop, struct v4l2_crop, *); -+V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *); -+V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *); -+V4L2_INT_WRAPPER_1(querystd, v4l2_std_id, *); -+V4L2_INT_WRAPPER_1(s_std, v4l2_std_id, *); -+V4L2_INT_WRAPPER_1(s_video_routing, struct v4l2_routing, *); -+V4L2_INT_WRAPPER_1(send_command, struct v4l2_send_command_control, *); -+ -+V4L2_INT_WRAPPER_0(dev_init); -+V4L2_INT_WRAPPER_0(dev_exit); -+V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, ); -+V4L2_INT_WRAPPER_1(g_priv, void, *); -+V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *); -+V4L2_INT_WRAPPER_1(g_needs_reset, void, *); -+V4L2_INT_WRAPPER_1(enum_framesizes, struct v4l2_frmsizeenum, *); -+V4L2_INT_WRAPPER_1(enum_frameintervals, struct v4l2_frmivalenum, *); -+ -+V4L2_INT_WRAPPER_0(reset); -+V4L2_INT_WRAPPER_0(init); -+V4L2_INT_WRAPPER_1(g_chip_ident, int, *); -+ -+#endif -diff -Nur linux-4.1.10.orig/include/media/v4l2-ioctl.h linux-4.1.10/include/media/v4l2-ioctl.h ---- linux-4.1.10.orig/include/media/v4l2-ioctl.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/media/v4l2-ioctl.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/media/v4l2-ioctl.h xbian-sources-kernel/include/media/v4l2-ioctl.h +--- linux-4.1.10/include/media/v4l2-ioctl.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/media/v4l2-ioctl.h 2015-10-11 19:49:31.703021191 +0200 @@ -251,6 +251,8 @@ int (*vidioc_g_chip_info) (struct file *file, void *fh, struct v4l2_dbg_chip_info *chip); @@ -285085,9 +306450,9 @@ diff -Nur linux-4.1.10.orig/include/media/v4l2-ioctl.h linux-4.1.10/include/medi int (*vidioc_enum_framesizes) (struct file *file, void *fh, struct v4l2_frmsizeenum *fsize); -diff -Nur linux-4.1.10.orig/include/media/v4l2-subdev.h linux-4.1.10/include/media/v4l2-subdev.h ---- linux-4.1.10.orig/include/media/v4l2-subdev.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/media/v4l2-subdev.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/media/v4l2-subdev.h xbian-sources-kernel/include/media/v4l2-subdev.h +--- linux-4.1.10/include/media/v4l2-subdev.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/media/v4l2-subdev.h 2015-10-11 19:49:31.707020926 +0200 @@ -89,6 +89,7 @@ /* Core ops: it is highly recommended to implement at least these ops: @@ -285113,9 +306478,9 @@ diff -Nur linux-4.1.10.orig/include/media/v4l2-subdev.h linux-4.1.10/include/med */ #define v4l2_subdev_call(sd, o, f, args...) \ (!(sd) ? -ENODEV : (((sd)->ops->o && (sd)->ops->o->f) ? \ -diff -Nur linux-4.1.10.orig/include/mmc-mxcmmc.h linux-4.1.10/include/mmc-mxcmmc.h ---- linux-4.1.10.orig/include/mmc-mxcmmc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/mmc-mxcmmc.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/mmc-mxcmmc.h xbian-sources-kernel/include/mmc-mxcmmc.h +--- linux-4.1.10/include/mmc-mxcmmc.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/mmc-mxcmmc.h 2015-10-11 19:49:31.707020926 +0200 @@ -0,0 +1,39 @@ +#ifndef ASMARM_ARCH_MMC_H +#define ASMARM_ARCH_MMC_H @@ -285156,9 +306521,9 @@ diff -Nur linux-4.1.10.orig/include/mmc-mxcmmc.h linux-4.1.10/include/mmc-mxcmmc +}; + +#endif -diff -Nur linux-4.1.10.orig/include/mtd-mxc_nand.h linux-4.1.10/include/mtd-mxc_nand.h ---- linux-4.1.10.orig/include/mtd-mxc_nand.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/mtd-mxc_nand.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/mtd-mxc_nand.h xbian-sources-kernel/include/mtd-mxc_nand.h +--- linux-4.1.10/include/mtd-mxc_nand.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/mtd-mxc_nand.h 2015-10-11 19:49:31.707020926 +0200 @@ -0,0 +1,32 @@ +/* + * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. @@ -285192,9 +306557,38 @@ diff -Nur linux-4.1.10.orig/include/mtd-mxc_nand.h linux-4.1.10/include/mtd-mxc_ + int nr_parts; /* size of parts */ +}; +#endif /* __ASM_ARCH_NAND_H */ -diff -Nur linux-4.1.10.orig/include/sound/soc.h linux-4.1.10/include/sound/soc.h ---- linux-4.1.10.orig/include/sound/soc.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/sound/soc.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/sound/dmaengine_pcm.h xbian-sources-kernel/include/sound/dmaengine_pcm.h +--- linux-4.1.10/include/sound/dmaengine_pcm.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/sound/dmaengine_pcm.h 2015-10-11 19:49:31.739018805 +0200 +@@ -63,6 +63,8 @@ + * requesting the DMA channel. + * @chan_name: Custom channel name to use when requesting DMA channel. + * @fifo_size: FIFO size of the DAI controller in bytes ++ * @check_xrun: check if hardware xrun happen in the cpu dai. ++ * @device_reset: if xrun happened, then do cpu dai reset. + */ + struct snd_dmaengine_dai_dma_data { + dma_addr_t addr; +@@ -72,6 +74,16 @@ + void *filter_data; + const char *chan_name; + unsigned int fifo_size; ++ bool (*check_xrun)(struct snd_pcm_substream *substream); ++ void (*device_reset)(struct snd_pcm_substream *substream, bool stop); ++}; ++ ++struct dmaengine_pcm_runtime_data { ++ struct dma_chan *dma_chan; ++ dma_cookie_t cookie; ++ ++ unsigned int pos; ++ dma_async_tx_callback callback; + }; + + void snd_dmaengine_pcm_set_config_from_dai_data( +diff -Nur linux-4.1.10/include/sound/soc.h xbian-sources-kernel/include/sound/soc.h +--- linux-4.1.10/include/sound/soc.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/sound/soc.h 2015-10-11 19:49:31.743018540 +0200 @@ -28,6 +28,18 @@ #include <sound/control.h> #include <sound/ac97_codec.h> @@ -285239,9 +306633,9 @@ diff -Nur linux-4.1.10.orig/include/sound/soc.h linux-4.1.10/include/sound/soc.h /* component */ struct snd_soc_component component; -diff -Nur linux-4.1.10.orig/include/sync.h linux-4.1.10/include/sync.h ---- linux-4.1.10.orig/include/sync.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/sync.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/sync.h xbian-sources-kernel/include/sync.h +--- linux-4.1.10/include/sync.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/sync.h 2015-10-11 19:49:31.747018275 +0200 @@ -0,0 +1,356 @@ +/* + * include/linux/sync.h @@ -285599,9 +306993,9 @@ diff -Nur linux-4.1.10.orig/include/sync.h linux-4.1.10/include/sync.h + int wake_flags, void *key); + +#endif /* _LINUX_SYNC_H */ -diff -Nur linux-4.1.10.orig/include/uapi/linux/fb.h linux-4.1.10/include/uapi/linux/fb.h ---- linux-4.1.10.orig/include/uapi/linux/fb.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/uapi/linux/fb.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/fb.h xbian-sources-kernel/include/uapi/linux/fb.h +--- linux-4.1.10/include/uapi/linux/fb.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/uapi/linux/fb.h 2015-10-11 19:49:31.783015889 +0200 @@ -217,14 +217,45 @@ #define FB_SYNC_ON_GREEN 32 /* sync on green */ @@ -285656,9 +307050,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/fb.h linux-4.1.10/include/uapi/li /* * Display rotation support -diff -Nur linux-4.1.10.orig/include/uapi/linux/ipu.h linux-4.1.10/include/uapi/linux/ipu.h ---- linux-4.1.10.orig/include/uapi/linux/ipu.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/ipu.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/ipu.h xbian-sources-kernel/include/uapi/linux/ipu.h +--- linux-4.1.10/include/uapi/linux/ipu.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/ipu.h 2015-10-11 19:49:31.791015358 +0200 @@ -0,0 +1,282 @@ +/* + * Copyright (C) 2013 Freescale Semiconductor, Inc. All Rights Reserved @@ -285942,9 +307336,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/ipu.h linux-4.1.10/include/uapi/l +#define IPU_FREE _IOW('I', 0x4, int) + +#endif -diff -Nur linux-4.1.10.orig/include/uapi/linux/Kbuild linux-4.1.10/include/uapi/linux/Kbuild ---- linux-4.1.10.orig/include/uapi/linux/Kbuild 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/uapi/linux/Kbuild 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/Kbuild xbian-sources-kernel/include/uapi/linux/Kbuild +--- linux-4.1.10/include/uapi/linux/Kbuild 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/uapi/linux/Kbuild 2015-10-11 19:49:31.755017745 +0200 @@ -266,6 +266,9 @@ header-y += msdos_fs.h header-y += msg.h @@ -285962,9 +307356,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/Kbuild linux-4.1.10/include/uapi/ + +header-y += pxp_device.h +header-y += pxp_dma.h -diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_asrc.h linux-4.1.10/include/uapi/linux/mxc_asrc.h ---- linux-4.1.10.orig/include/uapi/linux/mxc_asrc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/mxc_asrc.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/mxc_asrc.h xbian-sources-kernel/include/uapi/linux/mxc_asrc.h +--- linux-4.1.10/include/uapi/linux/mxc_asrc.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/mxc_asrc.h 2015-10-11 19:49:31.795015093 +0200 @@ -0,0 +1,143 @@ +/* + * Copyright 2008-2013 Freescale Semiconductor, Inc. All Rights Reserved. @@ -286109,9 +307503,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_asrc.h linux-4.1.10/include/u + ASRC_INPUT_BUFFER_UNDERRUN = 0x10, +}; +#endif/* __MXC_ASRC_UAPI_H__ */ -diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_dcic.h linux-4.1.10/include/uapi/linux/mxc_dcic.h ---- linux-4.1.10.orig/include/uapi/linux/mxc_dcic.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/mxc_dcic.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/mxc_dcic.h xbian-sources-kernel/include/uapi/linux/mxc_dcic.h +--- linux-4.1.10/include/uapi/linux/mxc_dcic.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/mxc_dcic.h 2015-10-11 19:49:31.795015093 +0200 @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014 Freescale Semiconductor, Inc. All Rights Reserved @@ -286162,10 +307556,10 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_dcic.h linux-4.1.10/include/u +}; + +#endif -diff -Nur linux-4.1.10.orig/include/uapi/linux/mxcfb.h linux-4.1.10/include/uapi/linux/mxcfb.h ---- linux-4.1.10.orig/include/uapi/linux/mxcfb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/mxcfb.h 2015-10-10 16:41:42.945314855 +0200 -@@ -0,0 +1,176 @@ +diff -Nur linux-4.1.10/include/uapi/linux/mxcfb.h xbian-sources-kernel/include/uapi/linux/mxcfb.h +--- linux-4.1.10/include/uapi/linux/mxcfb.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/mxcfb.h 2015-10-11 19:49:31.795015093 +0200 +@@ -0,0 +1,180 @@ +/* + * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. All Rights Reserved + */ @@ -286207,6 +307601,10 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/mxcfb.h linux-4.1.10/include/uapi +#define FB_ACCEL_TRIPLE_FLAG 0x00000000 +#define FB_ACCEL_DOUBLE_FLAG 0x00000001 + ++#define FB_MXC_SYNC_MASK (FB_SYNC_OE_LOW_ACT | FB_SYNC_CLK_LAT_FALL | \ ++ FB_SYNC_DATA_INVERT | FB_SYNC_CLK_IDLE_EN | \ ++ FB_SYNC_SHARP_MODE | FB_SYNC_SWAP_RGB) ++ +struct mxcfb_gbl_alpha { + int enable; + int alpha; @@ -286342,9 +307740,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/mxcfb.h linux-4.1.10/include/uapi +#define MXCFB_DISABLE_EPDC_ACCESS _IO('F', 0x35) +#define MXCFB_ENABLE_EPDC_ACCESS _IO('F', 0x36) +#endif -diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_mlb.h linux-4.1.10/include/uapi/linux/mxc_mlb.h ---- linux-4.1.10.orig/include/uapi/linux/mxc_mlb.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/mxc_mlb.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/mxc_mlb.h xbian-sources-kernel/include/uapi/linux/mxc_mlb.h +--- linux-4.1.10/include/uapi/linux/mxc_mlb.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/mxc_mlb.h 2015-10-11 19:49:31.795015093 +0200 @@ -0,0 +1,55 @@ +/* + * mxc_mlb.h @@ -286401,9 +307799,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_mlb.h linux-4.1.10/include/ua + + +#endif /* _MXC_MLB_H */ -diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_v4l2.h linux-4.1.10/include/uapi/linux/mxc_v4l2.h ---- linux-4.1.10.orig/include/uapi/linux/mxc_v4l2.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/mxc_v4l2.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/mxc_v4l2.h xbian-sources-kernel/include/uapi/linux/mxc_v4l2.h +--- linux-4.1.10/include/uapi/linux/mxc_v4l2.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/mxc_v4l2.h 2015-10-11 19:49:31.795015093 +0200 @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2013 Freescale Semiconductor, Inc. All Rights Reserved @@ -286466,9 +307864,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/mxc_v4l2.h linux-4.1.10/include/u +}; + +#endif -diff -Nur linux-4.1.10.orig/include/uapi/linux/pxp_device.h linux-4.1.10/include/uapi/linux/pxp_device.h ---- linux-4.1.10.orig/include/uapi/linux/pxp_device.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/pxp_device.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/pxp_device.h xbian-sources-kernel/include/uapi/linux/pxp_device.h +--- linux-4.1.10/include/uapi/linux/pxp_device.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/pxp_device.h 2015-10-11 19:49:31.807014298 +0200 @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -286533,9 +307931,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/pxp_device.h linux-4.1.10/include +#define CACHE_FLUSH 0x4 + +#endif -diff -Nur linux-4.1.10.orig/include/uapi/linux/pxp_dma.h linux-4.1.10/include/uapi/linux/pxp_dma.h ---- linux-4.1.10.orig/include/uapi/linux/pxp_dma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/linux/pxp_dma.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/pxp_dma.h xbian-sources-kernel/include/uapi/linux/pxp_dma.h +--- linux-4.1.10/include/uapi/linux/pxp_dma.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/linux/pxp_dma.h 2015-10-11 19:49:31.807014298 +0200 @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2013-2015 Freescale Semiconductor, Inc. All Rights Reserved. @@ -286710,9 +308108,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/pxp_dma.h linux-4.1.10/include/ua + + +#endif -diff -Nur linux-4.1.10.orig/include/uapi/linux/videodev2.h linux-4.1.10/include/uapi/linux/videodev2.h ---- linux-4.1.10.orig/include/uapi/linux/videodev2.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/include/uapi/linux/videodev2.h 2015-10-10 16:41:42.945314855 +0200 +diff -Nur linux-4.1.10/include/uapi/linux/videodev2.h xbian-sources-kernel/include/uapi/linux/videodev2.h +--- linux-4.1.10/include/uapi/linux/videodev2.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/include/uapi/linux/videodev2.h 2015-10-11 19:49:31.815013768 +0200 @@ -147,6 +147,7 @@ V4L2_BUF_TYPE_SDR_CAPTURE = 11, /* Deprecated, do not use */ @@ -286799,9 +308197,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/linux/videodev2.h linux-4.1.10/include/ #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) -diff -Nur linux-4.1.10.orig/include/uapi/sync.h linux-4.1.10/include/uapi/sync.h ---- linux-4.1.10.orig/include/uapi/sync.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/uapi/sync.h 2015-10-10 16:41:42.949314855 +0200 +diff -Nur linux-4.1.10/include/uapi/sync.h xbian-sources-kernel/include/uapi/sync.h +--- linux-4.1.10/include/uapi/sync.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/uapi/sync.h 2015-10-11 19:49:31.823013237 +0200 @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2012 Google, Inc. @@ -286900,9 +308298,9 @@ diff -Nur linux-4.1.10.orig/include/uapi/sync.h linux-4.1.10/include/uapi/sync.h + struct sync_fence_info_data) + +#endif /* _UAPI_LINUX_SYNC_H */ -diff -Nur linux-4.1.10.orig/include/usb-ehci-mxc.h linux-4.1.10/include/usb-ehci-mxc.h ---- linux-4.1.10.orig/include/usb-ehci-mxc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/usb-ehci-mxc.h 2015-10-10 16:41:42.949314855 +0200 +diff -Nur linux-4.1.10/include/usb-ehci-mxc.h xbian-sources-kernel/include/usb-ehci-mxc.h +--- linux-4.1.10/include/usb-ehci-mxc.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/usb-ehci-mxc.h 2015-10-11 19:49:31.823013237 +0200 @@ -0,0 +1,13 @@ +#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H +#define __INCLUDE_ASM_ARCH_MXC_EHCI_H @@ -286917,10 +308315,10 @@ diff -Nur linux-4.1.10.orig/include/usb-ehci-mxc.h linux-4.1.10/include/usb-ehci + +#endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ + -diff -Nur linux-4.1.10.orig/include/video/mxc_edid.h linux-4.1.10/include/video/mxc_edid.h ---- linux-4.1.10.orig/include/video/mxc_edid.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/video/mxc_edid.h 2015-10-10 16:41:42.949314855 +0200 -@@ -0,0 +1,116 @@ +diff -Nur linux-4.1.10/include/video/mxc_edid.h xbian-sources-kernel/include/video/mxc_edid.h +--- linux-4.1.10/include/video/mxc_edid.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/video/mxc_edid.h 2015-10-11 19:49:31.823013237 +0200 +@@ -0,0 +1,123 @@ +/* + * Copyright 2009-2013 Freescale Semiconductor, Inc. All Rights Reserved. + */ @@ -286950,6 +308348,7 @@ diff -Nur linux-4.1.10.orig/include/video/mxc_edid.h linux-4.1.10/include/video/ +#define MXC_EDID_H + +#include <linux/fb.h> ++#include <drm/drm_crtc.h> + +enum cea_audio_coding_types { + AUDIO_CODING_TYPE_REF_STREAM_HEADER = 0, @@ -286978,8 +308377,19 @@ diff -Nur linux-4.1.10.orig/include/video/mxc_edid.h linux-4.1.10/include/video/ +}; + +struct mxc_edid_cfg { -+ bool cea_underscan; ++ u8 vsd_video_latency; ++ u8 vsd_audio_latency; ++ u8 vsd_I_video_latency; ++ u8 vsd_I_audio_latency; ++ ++ u8 sample_sizes[4]; ++ u8 sample_rates[4]; ++ u8 speaker_alloc; ++ u8 physical_address[4]; ++ + bool cea_basicaudio; ++ ++ bool cea_underscan; + bool cea_ycbcr444; + bool cea_ycbcr422; + bool hdmi_cap; @@ -286996,17 +308406,13 @@ diff -Nur linux-4.1.10.orig/include/video/mxc_edid.h linux-4.1.10/include/video/ + bool vsd_dc_y444; + bool vsd_dvi_dual; + ++ u8 CONFIGKEEP; ++ + bool vsd_cnc0; + bool vsd_cnc1; + bool vsd_cnc2; + bool vsd_cnc3; + -+ u8 vsd_video_latency; -+ u8 vsd_audio_latency; -+ u8 vsd_I_video_latency; -+ u8 vsd_I_audio_latency; -+ -+ u8 physical_address[4]; + u8 hdmi_vic[64]; + struct mxc_hdmi_3d_format hdmi_3d_format[64]; + u16 hdmi_3d_mask_all; @@ -287016,9 +308422,7 @@ diff -Nur linux-4.1.10.orig/include/video/mxc_edid.h linux-4.1.10/include/video/ + unsigned char hdmi_3d_multi_present; + u32 vsd_max_tmdsclk_rate; + -+ u8 sample_sizes[4]; -+ u8 sample_rates[4]; -+ u8 speaker_alloc; ++ u8 hdmi_eld[MAX_ELD_BYTES]; +}; + +static inline unsigned long mxcPICOS2KHZ(u32 pixclock, u32 vmode) { @@ -287028,6 +308432,7 @@ diff -Nur linux-4.1.10.orig/include/video/mxc_edid.h linux-4.1.10/include/video/ + +int mxc_edid_var_to_vic(struct fb_var_screeninfo *var); +int mxc_edid_mode_to_vic(const struct fb_videomode *mode, u32 mode_mask); ++int mxc_edid_parse_raw(unsigned char *edid, struct mxc_edid_cfg *cfg, struct fb_info *fbi); +int mxc_edid_read(struct i2c_adapter *adp, unsigned short addr, + unsigned char *edid, struct mxc_edid_cfg *cfg, struct fb_info *fbi); +int mxc_edid_parse_ext_blk(unsigned char *edid, struct mxc_edid_cfg *cfg, @@ -287037,9 +308442,9 @@ diff -Nur linux-4.1.10.orig/include/video/mxc_edid.h linux-4.1.10/include/video/ +int mxc_edid_fb_mode_is_equal(bool use_aspect, const struct fb_videomode *mode1, + const struct fb_videomode *mode2, u32 mode_mask); +#endif -diff -Nur linux-4.1.10.orig/include/video/mxc_hdmi.h linux-4.1.10/include/video/mxc_hdmi.h ---- linux-4.1.10.orig/include/video/mxc_hdmi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/include/video/mxc_hdmi.h 2015-10-10 16:41:42.949314855 +0200 +diff -Nur linux-4.1.10/include/video/mxc_hdmi.h xbian-sources-kernel/include/video/mxc_hdmi.h +--- linux-4.1.10/include/video/mxc_hdmi.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/include/video/mxc_hdmi.h 2015-10-11 19:49:31.823013237 +0200 @@ -0,0 +1,1027 @@ +/* + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. @@ -288068,9 +309473,46 @@ diff -Nur linux-4.1.10.orig/include/video/mxc_hdmi.h linux-4.1.10/include/video/ + + +#endif /* __MXC_HDMI_H__ */ -diff -Nur linux-4.1.10.orig/sound/soc/codecs/hdmi.c linux-4.1.10/sound/soc/codecs/hdmi.c ---- linux-4.1.10.orig/sound/soc/codecs/hdmi.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/codecs/hdmi.c 2015-10-10 16:41:42.949314855 +0200 +diff -Nur linux-4.1.10/sound/core/pcm_dmaengine.c xbian-sources-kernel/sound/core/pcm_dmaengine.c +--- linux-4.1.10/sound/core/pcm_dmaengine.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/core/pcm_dmaengine.c 2015-10-11 19:49:32.242985399 +0200 +@@ -5,6 +5,7 @@ + * Based on: + * imx-pcm-dma-mx2.c, Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de> + * mxs-pcm.c, Copyright (C) 2011 Freescale Semiconductor, Inc. ++ * imx-pcm-dma.c, Copyright (C) 2014 Freescale Semiconductor, Inc. + * ep93xx-pcm.c, Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> + * Copyright (C) 2006 Applied Data Systems + * +@@ -28,13 +29,6 @@ + + #include <sound/dmaengine_pcm.h> + +-struct dmaengine_pcm_runtime_data { +- struct dma_chan *dma_chan; +- dma_cookie_t cookie; +- +- unsigned int pos; +-}; +- + static inline struct dmaengine_pcm_runtime_data *substream_to_prtd( + const struct snd_pcm_substream *substream) + { +@@ -164,7 +158,10 @@ + if (!desc) + return -ENOMEM; + +- desc->callback = dmaengine_pcm_dma_complete; ++ if (prtd->callback) ++ desc->callback = prtd->callback; ++ else ++ desc->callback = dmaengine_pcm_dma_complete; + desc->callback_param = substream; + prtd->cookie = dmaengine_submit(desc); + +diff -Nur linux-4.1.10/sound/soc/codecs/hdmi.c xbian-sources-kernel/sound/soc/codecs/hdmi.c +--- linux-4.1.10/sound/soc/codecs/hdmi.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/codecs/hdmi.c 2015-10-11 19:49:32.358977711 +0200 @@ -47,7 +47,7 @@ SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE | @@ -288080,9 +309522,42 @@ diff -Nur linux-4.1.10.orig/sound/soc/codecs/hdmi.c linux-4.1.10/sound/soc/codec }, .capture = { .stream_name = "Capture", -diff -Nur linux-4.1.10.orig/sound/soc/codecs/sgtl5000.c linux-4.1.10/sound/soc/codecs/sgtl5000.c ---- linux-4.1.10.orig/sound/soc/codecs/sgtl5000.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/codecs/sgtl5000.c 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/codecs/Kconfig xbian-sources-kernel/sound/soc/codecs/Kconfig +--- linux-4.1.10/sound/soc/codecs/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/codecs/Kconfig 2015-10-11 19:49:32.350978241 +0200 +@@ -541,6 +541,10 @@ + tristate "Freescale SGTL5000 CODEC" + depends on I2C + ++# NXP TDA1997X HDMI audio codec ++config SND_SOC_TDA1997X ++ tristate ++ + config SND_SOC_SI476X + tristate + +diff -Nur linux-4.1.10/sound/soc/codecs/Makefile xbian-sources-kernel/sound/soc/codecs/Makefile +--- linux-4.1.10/sound/soc/codecs/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/codecs/Makefile 2015-10-11 19:49:32.350978241 +0200 +@@ -86,6 +86,7 @@ + snd-soc-rt5677-objs := rt5677.o + snd-soc-rt5677-spi-objs := rt5677-spi.o + snd-soc-sgtl5000-objs := sgtl5000.o ++snd-soc-tda1997x-objs := tda1997x.o + snd-soc-alc5623-objs := alc5623.o + snd-soc-alc5632-objs := alc5632.o + snd-soc-sigmadsp-objs := sigmadsp.o +@@ -271,6 +272,7 @@ + obj-$(CONFIG_SND_SOC_RT5677) += snd-soc-rt5677.o + obj-$(CONFIG_SND_SOC_RT5677_SPI) += snd-soc-rt5677-spi.o + obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o ++obj-$(CONFIG_SND_SOC_TDA1997X) += snd-soc-tda1997x.o + obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o + obj-$(CONFIG_SND_SOC_SIGMADSP_I2C) += snd-soc-sigmadsp-i2c.o + obj-$(CONFIG_SND_SOC_SIGMADSP_REGMAP) += snd-soc-sigmadsp-regmap.o +diff -Nur linux-4.1.10/sound/soc/codecs/sgtl5000.c xbian-sources-kernel/sound/soc/codecs/sgtl5000.c +--- linux-4.1.10/sound/soc/codecs/sgtl5000.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/codecs/sgtl5000.c 2015-10-11 19:49:32.370976915 +0200 @@ -16,7 +16,6 @@ #include <linux/pm.h> #include <linux/i2c.h> @@ -288540,9 +310015,168 @@ diff -Nur linux-4.1.10.orig/sound/soc/codecs/sgtl5000.c linux-4.1.10/sound/soc/c i2c_set_clientdata(client, sgtl5000); /* Ensure sgtl5000 will start with sane register values */ -diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_asrc.h linux-4.1.10/sound/soc/fsl/fsl_asrc.h ---- linux-4.1.10.orig/sound/soc/fsl/fsl_asrc.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/fsl_asrc.h 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/codecs/tda1997x.c xbian-sources-kernel/sound/soc/codecs/tda1997x.c +--- linux-4.1.10/sound/soc/codecs/tda1997x.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/codecs/tda1997x.c 2015-10-11 19:49:32.370976915 +0200 +@@ -0,0 +1,155 @@ ++/* ++ * tda1997x.c -- tda1997x ALSA SoC Audio driver ++ * ++ * Copyright (C) 2013 Gateworks Corporation ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ++ ++#include <linux/clk.h> ++#include <linux/init.h> ++#include <linux/delay.h> ++#include <linux/mfd/tda1997x-core.h> ++#include <linux/module.h> ++#include <linux/moduleparam.h> ++#include <linux/of_device.h> ++#include <linux/pm.h> ++#include <linux/regulator/driver.h> ++#include <linux/regulator/machine.h> ++#include <linux/slab.h> ++#include <sound/core.h> ++#include <sound/initval.h> ++#include <sound/soc.h> ++#include <sound/soc-dapm.h> ++#include <sound/tlv.h> ++#include <sound/pcm.h> ++#include <sound/pcm_params.h> ++ ++/* refine sample-rate based on HDMI source */ ++static int tda1997x_pcm_startup(struct snd_pcm_substream *substream, ++ struct snd_soc_dai *dai) ++{ ++ struct snd_soc_codec *codec = dai->codec; ++ struct snd_pcm_runtime *rtd = substream->runtime; ++ tda1997x_audout_fmt_t fmt; ++ int rate, ret; ++ ++ ret = tda1997x_get_audout_fmt(&fmt); ++ if (ret) { ++ dev_err(codec->dev, "failed to obtain tda1997x info: %d\n", ++ ret); ++ return -EIO; ++ } ++ rate = fmt.samplerate; ++ ++ ret = snd_pcm_hw_constraint_minmax(rtd, SNDRV_PCM_HW_PARAM_RATE, ++ rate, rate); ++ if (ret > 0) ++ dev_info(codec->dev, "set samplerate constraint to %dHz\n", ++ rate); ++ else ++ dev_err(codec->dev, "failed to set samplerate constraint " ++ "to %dHz: %d\n", rate, ret); ++ ++ return 0; ++} ++ ++static const struct snd_soc_dai_ops tda1997x_ops = { ++ .startup = tda1997x_pcm_startup, ++}; ++ ++static struct snd_soc_dai_driver tda1997x_codec_dai = { ++ .name = "tda1997x", ++ .capture = { ++ .stream_name = "Capture", ++ .channels_min = 2, ++ .channels_max = 2, ++ /* rate and foramat are dependent on the HDMI source */ ++ .rates = SNDRV_PCM_RATE_32000 | ++ SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | ++ SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | ++ SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ }, ++ .ops = &tda1997x_ops, ++}; ++ ++static int tda1997x_probe(struct snd_soc_codec *codec) ++{ ++ pr_debug("%s\n", __func__); ++ ++ return 0; ++} ++ ++static int tda1997x_remove(struct snd_soc_codec *codec) ++{ ++ pr_debug("%s\n", __func__); ++ return 0; ++} ++ ++static struct snd_soc_codec_driver tda1997x_codec_driver = { ++ .probe = tda1997x_probe, ++ .remove = tda1997x_remove, ++ .reg_word_size = sizeof(u16), ++}; ++ ++static int tda1997x_codec_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ dev_info(&pdev->dev, "TDA1997x HDMI Audio In\n"); ++ ++ ret = snd_soc_register_codec(&pdev->dev, ++ &tda1997x_codec_driver, &tda1997x_codec_dai, 1); ++ if (ret) { ++ dev_err(&pdev->dev, "Failed to register codec: %d\n", ret); ++ return ret; ++ } ++ pr_debug("%s registered codec and codec_dai\n", __func__); ++ ++ return 0; ++} ++ ++static int tda1997x_codec_remove(struct platform_device *pdev) ++{ ++ snd_soc_unregister_codec(&pdev->dev); ++ ++ return 0; ++} ++ ++static const struct of_device_id tda1997x_dt_ids[] = { ++ { .compatible = "nxp,tda1997x-codec", }, ++ { /* sentinel */ } ++}; ++MODULE_DEVICE_TABLE(of, tda1997x_dt_ids); ++ ++struct platform_driver tda1997x_driver = { ++ .driver = { ++ .name = "tda1997x_codec", ++ .owner = THIS_MODULE, ++ .of_match_table = tda1997x_dt_ids, ++ }, ++ .probe = tda1997x_codec_probe, ++ .remove = tda1997x_codec_remove, ++}; ++module_platform_driver(tda1997x_driver); ++ ++MODULE_DESCRIPTION("NXP TDA1997x ALSA SoC Codec Driver"); ++MODULE_AUTHOR("Tim Harvey <tharvey@gateworks.com>"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:tda1997x-audio"); +diff -Nur linux-4.1.10/sound/soc/fsl/fsl_asrc.h xbian-sources-kernel/sound/soc/fsl/fsl_asrc.h +--- linux-4.1.10/sound/soc/fsl/fsl_asrc.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/fsl_asrc.h 2015-10-11 19:49:32.402974794 +0200 @@ -326,7 +326,7 @@ OUTCLK_ASRCK1_CLK = 0x0f, }; @@ -288552,10 +310186,156 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_asrc.h linux-4.1.10/sound/soc/fsl/ enum asrc_word_width { ASRC_WIDTH_24_BIT = 0, -diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_esai.c linux-4.1.10/sound/soc/fsl/fsl_esai.c ---- linux-4.1.10.orig/sound/soc/fsl/fsl_esai.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/fsl_esai.c 2015-10-10 16:41:42.985314855 +0200 -@@ -839,7 +839,7 @@ +diff -Nur linux-4.1.10/sound/soc/fsl/fsl_esai.c xbian-sources-kernel/sound/soc/fsl/fsl_esai.c +--- linux-4.1.10/sound/soc/fsl/fsl_esai.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/fsl_esai.c 2015-10-11 19:49:32.402974794 +0200 +@@ -49,6 +49,7 @@ + struct fsl_esai { + struct snd_dmaengine_dai_dma_data dma_params_rx; + struct snd_dmaengine_dai_dma_data dma_params_tx; ++ struct snd_pcm_substream *substream[2]; + struct platform_device *pdev; + struct regmap *regmap; + struct clk *coreclk; +@@ -493,6 +494,8 @@ + ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(2)); + } + ++ esai_priv->substream[substream->stream] = substream; ++ + return 0; + + err_fsysclk: +@@ -560,6 +563,8 @@ + { + struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai); + ++ esai_priv->substream[substream->stream] = NULL; ++ + if (!IS_ERR(esai_priv->fsysclk)) + clk_disable_unprepare(esai_priv->fsysclk); + if (!IS_ERR(esai_priv->extalclk)) +@@ -725,6 +730,107 @@ + .writeable_reg = fsl_esai_writeable_reg, + }; + ++static bool fsl_esai_check_xrun(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(cpu_dai); ++ u32 saisr; ++ ++ regmap_read(esai_priv->regmap, REG_ESAI_SAISR, &saisr); ++ ++ return saisr & (ESAI_SAISR_TUE | ESAI_SAISR_ROE) ; ++} ++ ++static int stop_lock_stream(struct snd_pcm_substream *substream) ++{ ++ if (substream) { ++ snd_pcm_stream_lock_irq(substream); ++ if (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING) ++ substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_STOP); ++ } ++ return 0; ++} ++ ++static int start_unlock_stream(struct snd_pcm_substream *substream) ++{ ++ if (substream) { ++ if (substream->runtime->status->state == SNDRV_PCM_STATE_RUNNING) ++ substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_START); ++ snd_pcm_stream_unlock_irq(substream); ++ } ++ return 0; ++} ++ ++/* ++ *Here is ESAI underrun reset step: ++ *1. Read "TUE" and got TUE=1 ++ *2. stop DMA. ++ *3. stop ESAI TX section. ++ *4. Set the transmitter section individual reset "TPR=1" ++ *5. Reset the ESAI Transmit FIFO (set ESAI_TFCR[1]=1). ++ *6. Config the control registers ESAI_TCCR and ESAI_TCR.config the Transmit FIFO register. ++ *7. clear "TPR" ++ *8. read "TUE" ++ *9. Prefill ESAI TX FIFO. ++ *10.Start DMA. ++ *11 Enable the ESAI ++ */ ++static void fsl_esai_reset(struct snd_pcm_substream *substream, bool stop) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(cpu_dai); ++ u32 saisr; ++ ++ if (stop) { ++ stop_lock_stream(esai_priv->substream[0]); ++ stop_lock_stream(esai_priv->substream[1]); ++ } ++ ++ ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_ECR, ++ ESAI_ECR_ESAIEN_MASK | ESAI_ECR_ERST_MASK, ++ ESAI_ECR_ESAIEN | ESAI_ECR_ERST); ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_ECR, ++ ESAI_ECR_ESAIEN_MASK | ESAI_ECR_ERST_MASK, ++ ESAI_ECR_ESAIEN); ++ ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, ESAI_xCR_xPR_MASK, ESAI_xCR_xPR); ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR, ESAI_xCR_xPR_MASK, ESAI_xCR_xPR); ++ ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC, ESAI_PRRC_PDC_MASK, 0); ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC, ESAI_PCRC_PC_MASK, 0); ++ ++ /* ++ * Add fifo reset here, because the regcache_sync will write one more data to ETDR. ++ * Which will cause channel shift. ++ */ ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_TFCR, ESAI_xFCR_xFR_MASK, ESAI_xFCR_xFR); ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_RFCR, ESAI_xFCR_xFR_MASK, ESAI_xFCR_xFR); ++ ++ regcache_mark_dirty(esai_priv->regmap); ++ regcache_sync(esai_priv->regmap); ++ ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_TFCR, ESAI_xFCR_xFR_MASK, 0); ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_RFCR, ESAI_xFCR_xFR_MASK, 0); ++ ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, ESAI_xCR_xPR_MASK, 0); ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR, ESAI_xCR_xPR_MASK, 0); ++ ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC, ++ ESAI_PRRC_PDC_MASK, ESAI_PRRC_PDC(ESAI_GPIO)); ++ regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC, ++ ESAI_PCRC_PC_MASK, ESAI_PCRC_PC(ESAI_GPIO)); ++ ++ regmap_read(esai_priv->regmap, REG_ESAI_SAISR, &saisr); ++ ++ if (stop) { ++ start_unlock_stream(esai_priv->substream[1]); ++ start_unlock_stream(esai_priv->substream[0]); ++ } ++} ++ + static int fsl_esai_probe(struct platform_device *pdev) + { + struct device_node *np = pdev->dev.of_node; +@@ -803,6 +909,11 @@ + esai_priv->dma_params_tx.addr = res->start + REG_ESAI_ETDR; + esai_priv->dma_params_rx.addr = res->start + REG_ESAI_ERDR; + ++ esai_priv->dma_params_tx.check_xrun = fsl_esai_check_xrun; ++ esai_priv->dma_params_rx.check_xrun = fsl_esai_check_xrun; ++ esai_priv->dma_params_tx.device_reset = fsl_esai_reset; ++ esai_priv->dma_params_rx.device_reset = fsl_esai_reset; ++ + esai_priv->synchronous = + of_property_read_bool(np, "fsl,esai-synchronous"); + +@@ -839,7 +950,7 @@ return ret; } @@ -288564,10 +310344,10 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_esai.c linux-4.1.10/sound/soc/fsl/ if (ret) dev_err(&pdev->dev, "failed to init imx pcm dma: %d\n", ret); -diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_hdmi.c linux-4.1.10/sound/soc/fsl/fsl_hdmi.c ---- linux-4.1.10.orig/sound/soc/fsl/fsl_hdmi.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/sound/soc/fsl/fsl_hdmi.c 2015-10-10 16:41:42.985314855 +0200 -@@ -0,0 +1,707 @@ +diff -Nur linux-4.1.10/sound/soc/fsl/fsl_hdmi.c xbian-sources-kernel/sound/soc/fsl/fsl_hdmi.c +--- linux-4.1.10/sound/soc/fsl/fsl_hdmi.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/fsl/fsl_hdmi.c 2015-10-11 19:49:32.402974794 +0200 +@@ -0,0 +1,734 @@ +/* + * ALSA SoC HDMI Audio Layer for Freescale i.MX + * @@ -288607,6 +310387,8 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_hdmi.c linux-4.1.10/sound/soc/fsl/ + +#include <video/mxc_hdmi.h> + ++#include <drm/drm_edid.h> ++ +#include "imx-hdmi.h" + + @@ -289120,6 +310902,23 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_hdmi.c linux-4.1.10/sound/soc/fsl/ + return 0; +} + ++static int fsl_hdmi_eld_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; ++ uinfo->count = drm_eld_size(edid_cfg.hdmi_eld); ++ ++ return 0; ++} ++ ++static int fsl_hdmi_eld_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *uvalue) ++{ ++ memcpy(uvalue->value.bytes.data, edid_cfg.hdmi_eld, drm_eld_size(edid_cfg.hdmi_eld)); ++ ++ return 0; ++} ++ +static struct snd_kcontrol_new fsl_hdmi_ctrls[] = { + /* Status cchanel controller */ + { @@ -289132,6 +310931,14 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_hdmi.c linux-4.1.10/sound/soc/fsl/ + .get = fsl_hdmi_iec_get, + .put = fsl_hdmi_iec_put, + }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_PCM, ++ .name = "ELD", ++ .access = SNDRV_CTL_ELEM_ACCESS_READ | ++ SNDRV_CTL_ELEM_ACCESS_VOLATILE, ++ .info = fsl_hdmi_eld_info, ++ .get = fsl_hdmi_eld_get, ++ }, +}; + +static int fsl_hdmi_soc_dai_probe(struct snd_soc_dai *dai) @@ -289275,9 +311082,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_hdmi.c linux-4.1.10/sound/soc/fsl/ +MODULE_DESCRIPTION("IMX HDMI TX DAI"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:fsl-hdmi-dai"); -diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_sai.c linux-4.1.10/sound/soc/fsl/fsl_sai.c ---- linux-4.1.10.orig/sound/soc/fsl/fsl_sai.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/fsl_sai.c 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/fsl_sai.c xbian-sources-kernel/sound/soc/fsl/fsl_sai.c +--- linux-4.1.10/sound/soc/fsl/fsl_sai.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/fsl_sai.c 2015-10-11 19:49:32.402974794 +0200 @@ -1,7 +1,7 @@ /* * Freescale ALSA SoC Digital Audio Interface (SAI) driver. @@ -289296,9 +311103,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_sai.c linux-4.1.10/sound/soc/fsl/f else return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, SND_DMAENGINE_PCM_FLAG_NO_RESIDUE); -diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_spdif.c linux-4.1.10/sound/soc/fsl/fsl_spdif.c ---- linux-4.1.10.orig/sound/soc/fsl/fsl_spdif.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/fsl_spdif.c 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/fsl_spdif.c xbian-sources-kernel/sound/soc/fsl/fsl_spdif.c +--- linux-4.1.10/sound/soc/fsl/fsl_spdif.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/fsl_spdif.c 2015-10-11 19:49:32.402974794 +0200 @@ -1257,7 +1257,7 @@ return ret; } @@ -289308,86 +311115,28 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_spdif.c linux-4.1.10/sound/soc/fsl if (ret) dev_err(&pdev->dev, "imx_pcm_dma_init failed: %d\n", ret); -diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/fsl_ssi.c ---- linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/fsl_ssi.c 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/fsl_ssi.c xbian-sources-kernel/sound/soc/fsl/fsl_ssi.c +--- linux-4.1.10/sound/soc/fsl/fsl_ssi.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/fsl_ssi.c 2015-10-11 19:49:32.402974794 +0200 @@ -3,7 +3,7 @@ * * Author: Timur Tabi <timur@freescale.com> * - * Copyright 2007-2010 Freescale Semiconductor, Inc. -+ * Copyright (C) 2007-2013 Freescale Semiconductor, Inc. ++ * Copyright 2007-2015 Freescale Semiconductor, Inc. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any -@@ -30,19 +30,21 @@ - * around this by not polling these bits but only wait a fixed delay. - */ - -+#include <linux/busfreq-imx6.h> - #include <linux/init.h> - #include <linux/io.h> - #include <linux/module.h> - #include <linux/interrupt.h> - #include <linux/clk.h> -+#include <linux/debugfs.h> - #include <linux/device.h> - #include <linux/delay.h> - #include <linux/slab.h> - #include <linux/spinlock.h> --#include <linux/of.h> +@@ -43,6 +43,8 @@ #include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/of_platform.h> +#include <linux/pm_runtime.h> ++#include <linux/busfreq-imx6.h> #include <sound/core.h> #include <sound/pcm.h> -@@ -54,6 +56,43 @@ - #include "fsl_ssi.h" - #include "imx-pcm.h" - -+#ifdef PPC -+#define read_ssi(addr) in_be32(addr) -+#define write_ssi(val, addr) out_be32(addr, val) -+#define write_ssi_mask(addr, clear, set) clrsetbits_be32(addr, clear, set) -+#else -+#define read_ssi(addr) readl(addr) -+#define write_ssi(val, addr) writel(val, addr) -+/* -+ * FIXME: Proper locking should be added at write_ssi_mask caller level -+ * to ensure this register read/modify/write sequence is race free. -+ */ -+static inline void write_ssi_mask(u32 __iomem *addr, u32 clear, u32 set) -+{ -+ u32 val = readl(addr); -+ val = (val & ~clear) | set; -+ writel(val, addr); -+} -+#endif -+ -+#ifdef DEBUG -+#define NUM_OF_SSI_REG (sizeof(struct ccsr_ssi) / sizeof(__be32)) -+ -+void dump_reg(struct ccsr_ssi __iomem *ssi) -+{ -+ u32 val, i; -+ -+ for (i = 0; i < NUM_OF_SSI_REG; i++) { -+ if (&ssi->stx0 + i == NULL) -+ continue; -+ val = read_ssi(&ssi->stx0 + i); -+ pr_debug("REG %x = %x\n", (u32)(&ssi->stx0 + i) & 0xff, val); -+ } -+} -+#else -+void dump_reg(struct ccsr_ssi __iomem *ssi) {} -+#endif -+ - /** - * FSLSSI_I2S_RATES: sample rates supported by the I2S - * -@@ -67,6 +106,8 @@ +@@ -67,6 +69,8 @@ /** * FSLSSI_I2S_FORMATS: audio formats supported by the SSI * @@ -289396,237 +311145,128 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f * The SSI has a limitation in that the samples must be in the same byte * order as the host CPU. This is because when multiple bytes are written * to the STX register, the bytes and bits must be written in the same -@@ -92,6 +133,8 @@ - #define FSLSSI_SIER_DBG_TX_FLAGS (CCSR_SSI_SIER_TFE0_EN | \ - CCSR_SSI_SIER_TLS_EN | CCSR_SSI_SIER_TFS_EN | \ - CCSR_SSI_SIER_TUE0_EN | CCSR_SSI_SIER_TFRC_EN) -+#define FSLSSI_SISR_MASK (FSLSSI_SIER_DBG_RX_FLAGS | FSLSSI_SIER_DBG_TX_FLAGS) -+ - - enum fsl_ssi_type { - FSL_SSI_MCP8610, -@@ -111,158 +154,105 @@ +@@ -111,12 +115,98 @@ struct fsl_ssi_reg_val rx; struct fsl_ssi_reg_val tx; }; --static const struct regmap_config fsl_ssi_regconfig = { -- .max_register = CCSR_SSI_SACCDIS, -- .reg_bits = 32, -- .val_bits = 32, -- .reg_stride = 4, -- .val_format_endian = REGMAP_ENDIAN_NATIVE, --}; -- --struct fsl_ssi_soc_data { -- bool imx; -- bool offline_config; -- u32 sisr_write_mask; --}; ++ ++static bool fsl_ssi_readable_reg(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case CCSR_SSI_STX0: ++ case CCSR_SSI_STX1: ++ case CCSR_SSI_SRX0: ++ case CCSR_SSI_SRX1: ++ case CCSR_SSI_SCR: ++ case CCSR_SSI_SISR: ++ case CCSR_SSI_SIER: ++ case CCSR_SSI_STCR: ++ case CCSR_SSI_SRCR: ++ case CCSR_SSI_STCCR: ++ case CCSR_SSI_SRCCR: ++ case CCSR_SSI_SFCSR: ++ case CCSR_SSI_STR: ++ case CCSR_SSI_SOR: ++ case CCSR_SSI_SACNT: ++ case CCSR_SSI_SACADD: ++ case CCSR_SSI_SACDAT: ++ case CCSR_SSI_SATAG: ++ case CCSR_SSI_STMSK: ++ case CCSR_SSI_SRMSK: ++ case CCSR_SSI_SACCST: ++ case CCSR_SSI_SACCEN: ++ case CCSR_SSI_SACCDIS: ++ return true; ++ default: ++ return false; ++ } ++} ++ ++static bool fsl_ssi_volatile_reg(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case CCSR_SSI_STX0: ++ case CCSR_SSI_STX1: ++ case CCSR_SSI_SRX0: ++ case CCSR_SSI_SRX1: ++ case CCSR_SSI_SISR: ++ case CCSR_SSI_SFCSR: ++ case CCSR_SSI_SACADD: ++ case CCSR_SSI_SACDAT: ++ case CCSR_SSI_SATAG: ++ case CCSR_SSI_SACCST: ++ return true; ++ default: ++ return false; ++ } ++ ++} ++ ++static bool fsl_ssi_writeable_reg(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case CCSR_SSI_STX0: ++ case CCSR_SSI_STX1: ++ case CCSR_SSI_SCR: ++ case CCSR_SSI_SISR: ++ case CCSR_SSI_SIER: ++ case CCSR_SSI_STCR: ++ case CCSR_SSI_SRCR: ++ case CCSR_SSI_STCCR: ++ case CCSR_SSI_SRCCR: ++ case CCSR_SSI_SFCSR: ++ case CCSR_SSI_STR: ++ case CCSR_SSI_SOR: ++ case CCSR_SSI_SACNT: ++ case CCSR_SSI_SACADD: ++ case CCSR_SSI_SACDAT: ++ case CCSR_SSI_SATAG: ++ case CCSR_SSI_STMSK: ++ case CCSR_SSI_SRMSK: ++ case CCSR_SSI_SACCEN: ++ case CCSR_SSI_SACCDIS: ++ return true; ++ default: ++ return false; ++ } ++} ++ + static const struct regmap_config fsl_ssi_regconfig = { + .max_register = CCSR_SSI_SACCDIS, + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, + .val_format_endian = REGMAP_ENDIAN_NATIVE, ++ .readable_reg = fsl_ssi_readable_reg, ++ .volatile_reg = fsl_ssi_volatile_reg, ++ .writeable_reg = fsl_ssi_writeable_reg, ++ .cache_type = REGCACHE_RBTREE, + }; - /** - * fsl_ssi_private: per-SSI private data - * -- * @reg: Pointer to the regmap registers -- * @irq: IRQ of this SSI -- * @cpu_dai_drv: CPU DAI driver for this device -- * -- * @dai_fmt: DAI configuration this device is currently used with -- * @i2s_mode: i2s and network mode configuration of the device. Is used to -- * switch between normal and i2s/network mode -- * mode depending on the number of channels -- * @use_dma: DMA is used or FIQ with stream filter -- * @use_dual_fifo: DMA with support for both FIFOs used -- * @fifo_deph: Depth of the SSI FIFOs -- * @rxtx_reg_val: Specific register settings for receive/transmit configuration -- * -- * @clk: SSI clock -- * @baudclk: SSI baud clock for master mode -- * @baudclk_streams: Active streams that are using baudclk -- * @bitclk_freq: bitclock frequency set by .set_dai_sysclk -- * -- * @dma_params_tx: DMA transmit parameters -- * @dma_params_rx: DMA receive parameters -+ * @ssi: pointer to the SSI's registers - * @ssi_phys: physical address of the SSI registers -- * -- * @fiq_params: FIQ stream filtering parameters -- * -- * @pdev: Pointer to pdev used for deprecated fsl-ssi sound card -- * -- * @dbg_stats: Debugging statistics -- * -- * @soc: SoC specifc data -+ * @irq: IRQ of this SSI -+ * @playback: the number of playback streams opened -+ * @capture: the number of capture streams opened -+ * @cpu_dai: the CPU DAI for this device -+ * @dev_attr: the sysfs device attribute structure -+ * @stats: SSI statistics -+ * @name: name for this device + struct fsl_ssi_soc_data { +@@ -160,7 +250,7 @@ */ struct fsl_ssi_private { -- struct regmap *regs; + struct regmap *regs; - int irq; -+ struct ccsr_ssi __iomem *ssi; -+ dma_addr_t ssi_phys; + unsigned int irq; -+ unsigned int fifo_depth; struct snd_soc_dai_driver cpu_dai_drv; -+ struct platform_device *pdev; -- unsigned int dai_fmt; -- u8 i2s_mode; -+ enum fsl_ssi_type hw_type; -+ bool new_binding; -+ bool ssi_on_imx; -+ bool imx_ac97; - bool use_dma; -+ bool baudclk_locked; -+ bool irq_stats; -+ bool offline_config; - bool use_dual_fifo; -- bool has_ipg_clk_name; -- unsigned int fifo_depth; -- struct fsl_ssi_rxtx_reg_val rxtx_reg_val; -- -- struct clk *clk; -+ u8 i2s_mode; -+ spinlock_t baudclk_lock; - struct clk *baudclk; -- unsigned int baudclk_streams; -- unsigned int bitclk_freq; -- -- /* DMA params */ -+ struct clk *clk; + unsigned int dai_fmt; +@@ -176,6 +266,9 @@ + unsigned int baudclk_streams; + unsigned int bitclk_freq; + ++ /*regcache for SFCSR*/ ++ u32 regcache_sfcsr; ++ + /* DMA params */ struct snd_dmaengine_dai_dma_data dma_params_tx; struct snd_dmaengine_dai_dma_data dma_params_rx; -- dma_addr_t ssi_phys; -- -- /* params for non-dma FIQ stream filtered mode */ - struct imx_pcm_fiq_params fiq_params; -+ /* Register values for rx/tx configuration */ -+ struct fsl_ssi_rxtx_reg_val rxtx_reg_val; - -- /* Used when using fsl-ssi as sound-card. This is only used by ppc and -- * should be replaced with simple-sound-card. */ -- struct platform_device *pdev; -- -- struct fsl_ssi_dbg dbg_stats; -- -- const struct fsl_ssi_soc_data *soc; --}; -- --/* -- * imx51 and later SoCs have a slightly different IP that allows the -- * SSI configuration while the SSI unit is running. -- * -- * More important, it is necessary on those SoCs to configure the -- * sperate TX/RX DMA bits just before starting the stream -- * (fsl_ssi_trigger). The SDMA unit has to be configured before fsl_ssi -- * sends any DMA requests to the SDMA unit, otherwise it is not defined -- * how the SDMA unit handles the DMA request. -- * -- * SDMA units are present on devices starting at imx35 but the imx35 -- * reference manual states that the DMA bits should not be changed -- * while the SSI unit is running (SSIEN). So we support the necessary -- * online configuration of fsl-ssi starting at imx51. -- */ -+ struct { -+ unsigned int rfrc; -+ unsigned int tfrc; -+ unsigned int cmdau; -+ unsigned int cmddu; -+ unsigned int rxt; -+ unsigned int rdr1; -+ unsigned int rdr0; -+ unsigned int tde1; -+ unsigned int tde0; -+ unsigned int roe1; -+ unsigned int roe0; -+ unsigned int tue1; -+ unsigned int tue0; -+ unsigned int tfs; -+ unsigned int rfs; -+ unsigned int tls; -+ unsigned int rls; -+ unsigned int rff1; -+ unsigned int rff0; -+ unsigned int tfe1; -+ unsigned int tfe0; -+ } stats; -+ struct dentry *dbg_dir; -+ struct dentry *dbg_stats; - --static struct fsl_ssi_soc_data fsl_ssi_mpc8610 = { -- .imx = false, -- .offline_config = true, -- .sisr_write_mask = CCSR_SSI_SISR_RFRC | CCSR_SSI_SISR_TFRC | -- CCSR_SSI_SISR_ROE0 | CCSR_SSI_SISR_ROE1 | -- CCSR_SSI_SISR_TUE0 | CCSR_SSI_SISR_TUE1, -+ char name[1]; - }; - --static struct fsl_ssi_soc_data fsl_ssi_imx21 = { -- .imx = true, -- .offline_config = true, -- .sisr_write_mask = 0, --}; -+#ifdef CONFIG_PM -+static int fsl_ssi_runtime_resume(struct device *dev) -+{ -+ request_bus_freq(BUS_FREQ_AUDIO); -+ return 0; -+} - --static struct fsl_ssi_soc_data fsl_ssi_imx35 = { -- .imx = true, -- .offline_config = true, -- .sisr_write_mask = CCSR_SSI_SISR_RFRC | CCSR_SSI_SISR_TFRC | -- CCSR_SSI_SISR_ROE0 | CCSR_SSI_SISR_ROE1 | -- CCSR_SSI_SISR_TUE0 | CCSR_SSI_SISR_TUE1, --}; -+static int fsl_ssi_runtime_suspend(struct device *dev) -+{ -+ release_bus_freq(BUS_FREQ_AUDIO); -+ return 0; -+} -+#endif - --static struct fsl_ssi_soc_data fsl_ssi_imx51 = { -- .imx = true, -- .offline_config = false, -- .sisr_write_mask = CCSR_SSI_SISR_ROE0 | CCSR_SSI_SISR_ROE1 | -- CCSR_SSI_SISR_TUE0 | CCSR_SSI_SISR_TUE1, -+static const struct dev_pm_ops fsl_ssi_pm = { -+ SET_RUNTIME_PM_OPS(fsl_ssi_runtime_suspend, -+ fsl_ssi_runtime_resume, -+ NULL) - }; - - static const struct of_device_id fsl_ssi_ids[] = { -- { .compatible = "fsl,mpc8610-ssi", .data = &fsl_ssi_mpc8610 }, -- { .compatible = "fsl,imx51-ssi", .data = &fsl_ssi_imx51 }, -- { .compatible = "fsl,imx35-ssi", .data = &fsl_ssi_imx35 }, -- { .compatible = "fsl,imx21-ssi", .data = &fsl_ssi_imx21 }, -+ { .compatible = "fsl,mpc8610-ssi", .data = (void *) FSL_SSI_MCP8610}, -+ { .compatible = "fsl,imx51-ssi", .data = (void *) FSL_SSI_MX51}, -+ { .compatible = "fsl,imx35-ssi", .data = (void *) FSL_SSI_MX35}, -+ { .compatible = "fsl,imx21-ssi", .data = (void *) FSL_SSI_MX21}, - {} - }; - MODULE_DEVICE_TABLE(of, fsl_ssi_ids); +@@ -258,11 +351,6 @@ + SND_SOC_DAIFMT_CBS_CFS; + } --static bool fsl_ssi_is_ac97(struct fsl_ssi_private *ssi_private) --{ -- return !!(ssi_private->dai_fmt & SND_SOC_DAIFMT_AC97); --} -- --static bool fsl_ssi_is_i2s_master(struct fsl_ssi_private *ssi_private) --{ -- return (ssi_private->dai_fmt & SND_SOC_DAIFMT_MASTER_MASK) == -- SND_SOC_DAIFMT_CBS_CFS; --} -- -static bool fsl_ssi_is_i2s_cbm_cfs(struct fsl_ssi_private *ssi_private) -{ - return (ssi_private->dai_fmt & SND_SOC_DAIFMT_MASTER_MASK) == @@ -289635,601 +311275,39 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f /** * fsl_ssi_isr: SSI interrupt handler * -@@ -278,74 +268,281 @@ - static irqreturn_t fsl_ssi_isr(int irq, void *dev_id) - { - struct fsl_ssi_private *ssi_private = dev_id; -- struct regmap *regs = ssi_private->regs; -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; -+ irqreturn_t ret = IRQ_NONE; - __be32 sisr; - __be32 sisr2; -+ __be32 sisr_write_mask = 0; -+ -+ switch (ssi_private->hw_type) { -+ case FSL_SSI_MX21: -+ sisr_write_mask = 0; -+ break; -+ -+ case FSL_SSI_MCP8610: -+ case FSL_SSI_MX35: -+ sisr_write_mask = CCSR_SSI_SISR_RFRC | CCSR_SSI_SISR_TFRC | -+ CCSR_SSI_SISR_ROE0 | CCSR_SSI_SISR_ROE1 | -+ CCSR_SSI_SISR_TUE0 | CCSR_SSI_SISR_TUE1; -+ break; -+ -+ case FSL_SSI_MX51: -+ sisr_write_mask = CCSR_SSI_SISR_ROE0 | CCSR_SSI_SISR_ROE1 | -+ CCSR_SSI_SISR_TUE0 | CCSR_SSI_SISR_TUE1; -+ break; -+ } - - /* We got an interrupt, so read the status register to see what we - were interrupted for. We mask it with the Interrupt Enable register - so that we only check for events that we're interested in. - */ -- regmap_read(regs, CCSR_SSI_SISR, &sisr); -+ sisr = read_ssi(&ssi->sisr) & FSLSSI_SISR_MASK; +@@ -535,6 +623,8 @@ + if (ret) + return ret; -- sisr2 = sisr & ssi_private->soc->sisr_write_mask; -+ if (sisr & CCSR_SSI_SISR_RFRC) { -+ ssi_private->stats.rfrc++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TFRC) { -+ ssi_private->stats.tfrc++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_CMDAU) { -+ ssi_private->stats.cmdau++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_CMDDU) { -+ ssi_private->stats.cmddu++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_RXT) { -+ ssi_private->stats.rxt++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_RDR1) { -+ ssi_private->stats.rdr1++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_RDR0) { -+ ssi_private->stats.rdr0++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TDE1) { -+ ssi_private->stats.tde1++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TDE0) { -+ ssi_private->stats.tde0++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_ROE1) { -+ ssi_private->stats.roe1++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_ROE0) { -+ ssi_private->stats.roe0++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TUE1) { -+ ssi_private->stats.tue1++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TUE0) { -+ ssi_private->stats.tue0++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TFS) { -+ ssi_private->stats.tfs++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_RFS) { -+ ssi_private->stats.rfs++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TLS) { -+ ssi_private->stats.tls++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_RLS) { -+ ssi_private->stats.rls++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_RFF1) { -+ ssi_private->stats.rff1++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_RFF0) { -+ ssi_private->stats.rff0++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TFE1) { -+ ssi_private->stats.tfe1++; -+ ret = IRQ_HANDLED; -+ } -+ -+ if (sisr & CCSR_SSI_SISR_TFE0) { -+ ssi_private->stats.tfe0++; -+ ret = IRQ_HANDLED; -+ } -+ -+ sisr2 = sisr & sisr_write_mask; - /* Clear the bits that we set */ - if (sisr2) -- regmap_write(regs, CCSR_SSI_SISR, sisr2); -+ write_ssi(sisr2, &ssi->sisr); -+ -+ return ret; -+} -+ -+#if IS_ENABLED(CONFIG_DEBUG_FS) -+/* Show the statistics of a flag only if its interrupt is enabled. The -+ * compiler will optimze this code to a no-op if the interrupt is not -+ * enabled. -+ */ -+#define SIER_SHOW(flag, name) \ -+ do { \ -+ if (FSLSSI_SISR_MASK & CCSR_SSI_SIER_##flag) \ -+ seq_printf(s, #name "=%u\n", ssi_private->stats.name); \ -+ } while (0) -+ -+ -+/** -+ * fsl_sysfs_ssi_show: display SSI statistics -+ * -+ * Display the statistics for the current SSI device. To avoid confusion, -+ * we only show those counts that are enabled. -+ */ -+static int fsl_ssi_stats_show(struct seq_file *s, void *unused) -+{ -+ struct fsl_ssi_private *ssi_private = s->private; -+ -+ SIER_SHOW(RFRC_EN, rfrc); -+ SIER_SHOW(TFRC_EN, tfrc); -+ SIER_SHOW(CMDAU_EN, cmdau); -+ SIER_SHOW(CMDDU_EN, cmddu); -+ SIER_SHOW(RXT_EN, rxt); -+ SIER_SHOW(RDR1_EN, rdr1); -+ SIER_SHOW(RDR0_EN, rdr0); -+ SIER_SHOW(TDE1_EN, tde1); -+ SIER_SHOW(TDE0_EN, tde0); -+ SIER_SHOW(ROE1_EN, roe1); -+ SIER_SHOW(ROE0_EN, roe0); -+ SIER_SHOW(TUE1_EN, tue1); -+ SIER_SHOW(TUE0_EN, tue0); -+ SIER_SHOW(TFS_EN, tfs); -+ SIER_SHOW(RFS_EN, rfs); -+ SIER_SHOW(TLS_EN, tls); -+ SIER_SHOW(RLS_EN, rls); -+ SIER_SHOW(RFF1_EN, rff1); -+ SIER_SHOW(RFF0_EN, rff0); -+ SIER_SHOW(TFE1_EN, tfe1); -+ SIER_SHOW(TFE0_EN, tfe0); -+ -+ return 0; -+} ++ pm_runtime_get_sync(dai->dev); + -+static int fsl_ssi_stats_open(struct inode *inode, struct file *file) -+{ -+ return single_open(file, fsl_ssi_stats_show, inode->i_private); -+} + /* When using dual fifo mode, it is safer to ensure an even period + * size. If appearing to an odd number while DMA always starts its + * task from fifo0, fifo1 would be neglected at the end of each +@@ -558,6 +648,8 @@ + struct fsl_ssi_private *ssi_private = + snd_soc_dai_get_drvdata(rtd->cpu_dai); -- fsl_ssi_dbg_isr(&ssi_private->dbg_stats, sisr); -+static const struct file_operations fsl_ssi_stats_ops = { -+ .open = fsl_ssi_stats_open, -+ .read = seq_read, -+ .llseek = seq_lseek, -+ .release = single_release, -+}; -+ -+static int fsl_ssi_debugfs_create(struct fsl_ssi_private *ssi_private, -+ struct device *dev) -+{ -+ ssi_private->dbg_dir = debugfs_create_dir(dev_name(dev), NULL); -+ if (!ssi_private->dbg_dir) -+ return -ENOMEM; -+ -+ ssi_private->dbg_stats = debugfs_create_file("stats", S_IRUGO, -+ ssi_private->dbg_dir, ssi_private, &fsl_ssi_stats_ops); -+ if (!ssi_private->dbg_stats) { -+ debugfs_remove(ssi_private->dbg_dir); -+ return -ENOMEM; -+ } -+ -+ return 0; -+} -+ -+static void fsl_ssi_debugfs_remove(struct fsl_ssi_private *ssi_private) -+{ -+ debugfs_remove(ssi_private->dbg_stats); -+ debugfs_remove(ssi_private->dbg_dir); -+} -+ -+#else ++ pm_runtime_put_sync(dai->dev); + -+static int fsl_ssi_debugfs_create(struct fsl_ssi_private *ssi_private, -+ struct device *dev) -+{ -+ return 0; -+} + clk_disable_unprepare(ssi_private->clk); -- return IRQ_HANDLED; -+static void fsl_ssi_debugfs_remove(struct fsl_ssi_private *ssi_private) -+{ } +@@ -603,20 +695,17 @@ + factor = (div2 + 1) * (7 * psr + 1) * 2; -+#endif /* IS_ENABLED(CONFIG_DEBUG_FS) */ -+ - /* - * Enable/Disable all rx/tx config flags at once. - */ - static void fsl_ssi_rxtx_config(struct fsl_ssi_private *ssi_private, - bool enable) - { -- struct regmap *regs = ssi_private->regs; -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; - struct fsl_ssi_rxtx_reg_val *vals = &ssi_private->rxtx_reg_val; - - if (enable) { -- regmap_update_bits(regs, CCSR_SSI_SIER, -- vals->rx.sier | vals->tx.sier, -- vals->rx.sier | vals->tx.sier); -- regmap_update_bits(regs, CCSR_SSI_SRCR, -- vals->rx.srcr | vals->tx.srcr, -- vals->rx.srcr | vals->tx.srcr); -- regmap_update_bits(regs, CCSR_SSI_STCR, -- vals->rx.stcr | vals->tx.stcr, -- vals->rx.stcr | vals->tx.stcr); -+ write_ssi_mask(&ssi->sier, 0, vals->rx.sier | vals->tx.sier); -+ write_ssi_mask(&ssi->srcr, 0, vals->rx.srcr | vals->tx.srcr); -+ write_ssi_mask(&ssi->stcr, 0, vals->rx.stcr | vals->tx.stcr); - } else { -- regmap_update_bits(regs, CCSR_SSI_SRCR, -- vals->rx.srcr | vals->tx.srcr, 0); -- regmap_update_bits(regs, CCSR_SSI_STCR, -- vals->rx.stcr | vals->tx.stcr, 0); -- regmap_update_bits(regs, CCSR_SSI_SIER, -- vals->rx.sier | vals->tx.sier, 0); -+ write_ssi_mask(&ssi->srcr, vals->rx.srcr | vals->tx.srcr, 0); -+ write_ssi_mask(&ssi->stcr, vals->rx.stcr | vals->tx.stcr, 0); -+ write_ssi_mask(&ssi->sier, vals->rx.sier | vals->tx.sier, 0); - } - } - --/* -- * Calculate the bits that have to be disabled for the current stream that is -- * getting disabled. This keeps the bits enabled that are necessary for the -- * second stream to work if 'stream_active' is true. -- * -- * Detailed calculation: -- * These are the values that need to be active after disabling. For non-active -- * second stream, this is 0: -- * vals_stream * !!stream_active -- * -- * The following computes the overall differences between the setup for the -- * to-disable stream and the active stream, a simple XOR: -- * vals_disable ^ (vals_stream * !!(stream_active)) -- * -- * The full expression adds a mask on all values we care about -- */ --#define fsl_ssi_disable_val(vals_disable, vals_stream, stream_active) \ -- ((vals_disable) & \ -- ((vals_disable) ^ ((vals_stream) * (u32)!!(stream_active)))) -+static void fsl_ssi_clk_ctrl(struct fsl_ssi_private *ssi_private, bool enable) -+{ -+ if (enable) { -+ if (ssi_private->ssi_on_imx) { -+ if (!IS_ERR(ssi_private->baudclk)) -+ clk_enable(ssi_private->baudclk); -+ clk_enable(ssi_private->clk); -+ } -+ } else { -+ if (ssi_private->ssi_on_imx) { -+ if (!IS_ERR(ssi_private->baudclk)) -+ clk_disable(ssi_private->baudclk); -+ clk_disable(ssi_private->clk); -+ } -+ } -+} - - /* - * Enable/Disable a ssi configuration. You have to pass either -@@ -354,22 +551,12 @@ - static void fsl_ssi_config(struct fsl_ssi_private *ssi_private, bool enable, - struct fsl_ssi_reg_val *vals) - { -- struct regmap *regs = ssi_private->regs; -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; - struct fsl_ssi_reg_val *avals; -- int nr_active_streams; -- u32 scr_val; -- int keep_active; -- -- regmap_read(regs, CCSR_SSI_SCR, &scr_val); -- -- nr_active_streams = !!(scr_val & CCSR_SSI_SCR_TE) + -+ u32 scr_val = read_ssi(&ssi->scr); -+ int nr_active_streams = !!(scr_val & CCSR_SSI_SCR_TE) + - !!(scr_val & CCSR_SSI_SCR_RE); - -- if (nr_active_streams - 1 > 0) -- keep_active = 1; -- else -- keep_active = 0; -- - /* Find the other direction values rx or tx which we do not want to - * modify */ - if (&ssi_private->rxtx_reg_val.rx == vals) -@@ -377,11 +564,12 @@ - else - avals = &ssi_private->rxtx_reg_val.rx; - -+ fsl_ssi_clk_ctrl(ssi_private, enable); + for (i = 0; i < 255; i++) { +- tmprate = freq * factor * (i + 1); ++ /* The bclk rate must be smaller than 1/5 sysclk rate */ ++ if (factor * (i + 1) < 5) ++ continue; + - /* If vals should be disabled, start with disabling the unit */ - if (!enable) { -- u32 scr = fsl_ssi_disable_val(vals->scr, avals->scr, -- keep_active); -- regmap_update_bits(regs, CCSR_SSI_SCR, scr, 0); -+ u32 scr = vals->scr & (vals->scr ^ avals->scr); -+ write_ssi_mask(&ssi->scr, scr, 0); - } - - /* -@@ -389,9 +577,9 @@ - * reconfiguration, so we have to enable all necessary flags at once - * even if we do not use them later (capture and playback configuration) - */ -- if (ssi_private->soc->offline_config) { -+ if (ssi_private->offline_config) { - if ((enable && !nr_active_streams) || -- (!enable && !keep_active)) -+ (!enable && nr_active_streams == 1)) - fsl_ssi_rxtx_config(ssi_private, enable); - - goto config_done; -@@ -402,9 +590,9 @@ - * (online configuration) - */ - if (enable) { -- regmap_update_bits(regs, CCSR_SSI_SIER, vals->sier, vals->sier); -- regmap_update_bits(regs, CCSR_SSI_SRCR, vals->srcr, vals->srcr); -- regmap_update_bits(regs, CCSR_SSI_STCR, vals->stcr, vals->stcr); -+ write_ssi_mask(&ssi->sier, 0, vals->sier); -+ write_ssi_mask(&ssi->srcr, 0, vals->srcr); -+ write_ssi_mask(&ssi->stcr, 0, vals->stcr); - } else { - u32 sier; - u32 srcr; -@@ -420,22 +608,19 @@ - */ - - /* These assignments are simply vals without bits set in avals*/ -- sier = fsl_ssi_disable_val(vals->sier, avals->sier, -- keep_active); -- srcr = fsl_ssi_disable_val(vals->srcr, avals->srcr, -- keep_active); -- stcr = fsl_ssi_disable_val(vals->stcr, avals->stcr, -- keep_active); -- -- regmap_update_bits(regs, CCSR_SSI_SRCR, srcr, 0); -- regmap_update_bits(regs, CCSR_SSI_STCR, stcr, 0); -- regmap_update_bits(regs, CCSR_SSI_SIER, sier, 0); -+ sier = vals->sier & (vals->sier ^ avals->sier); -+ srcr = vals->srcr & (vals->srcr ^ avals->srcr); -+ stcr = vals->stcr & (vals->stcr ^ avals->stcr); -+ -+ write_ssi_mask(&ssi->srcr, srcr, 0); -+ write_ssi_mask(&ssi->stcr, stcr, 0); -+ write_ssi_mask(&ssi->sier, sier, 0); - } - - config_done: - /* Enabling of subunits is done after configuration */ - if (enable) -- regmap_update_bits(regs, CCSR_SSI_SCR, vals->scr, vals->scr); -+ write_ssi_mask(&ssi->scr, 0, vals->scr); - } - - -@@ -465,7 +650,7 @@ - reg->tx.stcr = CCSR_SSI_STCR_TFEN0; - reg->tx.scr = 0; - -- if (!fsl_ssi_is_ac97(ssi_private)) { -+ if (!ssi_private->imx_ac97) { - reg->rx.scr = CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_RE; - reg->rx.sier |= CCSR_SSI_SIER_RFF0_EN; - reg->tx.scr = CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE; -@@ -486,197 +671,161 @@ - - static void fsl_ssi_setup_ac97(struct fsl_ssi_private *ssi_private) - { -- struct regmap *regs = ssi_private->regs; -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; - - /* - * Setup the clock control register - */ -- regmap_write(regs, CCSR_SSI_STCCR, -- CCSR_SSI_SxCCR_WL(17) | CCSR_SSI_SxCCR_DC(13)); -- regmap_write(regs, CCSR_SSI_SRCCR, -- CCSR_SSI_SxCCR_WL(17) | CCSR_SSI_SxCCR_DC(13)); -+ write_ssi(CCSR_SSI_SxCCR_WL(17) | CCSR_SSI_SxCCR_DC(13), -+ &ssi->stccr); -+ write_ssi(CCSR_SSI_SxCCR_WL(17) | CCSR_SSI_SxCCR_DC(13), -+ &ssi->srccr); - - /* - * Enable AC97 mode and startup the SSI - */ -- regmap_write(regs, CCSR_SSI_SACNT, -- CCSR_SSI_SACNT_AC97EN | CCSR_SSI_SACNT_FV); -- regmap_write(regs, CCSR_SSI_SACCDIS, 0xff); -- regmap_write(regs, CCSR_SSI_SACCEN, 0x300); -+ write_ssi(CCSR_SSI_SACNT_AC97EN | CCSR_SSI_SACNT_FV, -+ &ssi->sacnt); -+ write_ssi(0xff, &ssi->saccdis); -+ write_ssi(0x300, &ssi->saccen); - - /* - * Enable SSI, Transmit and Receive. AC97 has to communicate with the - * codec before a stream is started. - */ -- regmap_update_bits(regs, CCSR_SSI_SCR, -- CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE, -- CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE); -- -- regmap_write(regs, CCSR_SSI_SOR, CCSR_SSI_SOR_WAIT(3)); --} -- --/** -- * fsl_ssi_startup: create a new substream -- * -- * This is the first function called when a stream is opened. -- * -- * If this is the first stream open, then grab the IRQ and program most of -- * the SSI registers. -- */ --static int fsl_ssi_startup(struct snd_pcm_substream *substream, -- struct snd_soc_dai *dai) --{ -- struct snd_soc_pcm_runtime *rtd = substream->private_data; -- struct fsl_ssi_private *ssi_private = -- snd_soc_dai_get_drvdata(rtd->cpu_dai); -- int ret; -- -- ret = clk_prepare_enable(ssi_private->clk); -- if (ret) -- return ret; -- -- /* When using dual fifo mode, it is safer to ensure an even period -- * size. If appearing to an odd number while DMA always starts its -- * task from fifo0, fifo1 would be neglected at the end of each -- * period. But SSI would still access fifo1 with an invalid data. -- */ -- if (ssi_private->use_dual_fifo) -- snd_pcm_hw_constraint_step(substream->runtime, 0, -- SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 2); -+ write_ssi_mask(&ssi->scr, 0, CCSR_SSI_SCR_SSIEN | -+ CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE); - -- return 0; -+ write_ssi(CCSR_SSI_SOR_WAIT(3), &ssi->sor); - } - --/** -- * fsl_ssi_shutdown: shutdown the SSI -- * -- */ --static void fsl_ssi_shutdown(struct snd_pcm_substream *substream, -- struct snd_soc_dai *dai) -+static int fsl_ssi_setup(struct fsl_ssi_private *ssi_private) - { -- struct snd_soc_pcm_runtime *rtd = substream->private_data; -- struct fsl_ssi_private *ssi_private = -- snd_soc_dai_get_drvdata(rtd->cpu_dai); -- -- clk_disable_unprepare(ssi_private->clk); -- --} -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; -+ u8 wm; -+ int synchronous = ssi_private->cpu_dai_drv.symmetric_rates; - --/** -- * fsl_ssi_set_bclk - configure Digital Audio Interface bit clock -- * -- * Note: This function can be only called when using SSI as DAI master -- * -- * Quick instruction for parameters: -- * freq: Output BCLK frequency = samplerate * 32 (fixed) * channels -- * dir: SND_SOC_CLOCK_OUT -> TxBCLK, SND_SOC_CLOCK_IN -> RxBCLK. -- */ --static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream, -- struct snd_soc_dai *cpu_dai, -- struct snd_pcm_hw_params *hw_params) --{ -- struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai); -- struct regmap *regs = ssi_private->regs; -- int synchronous = ssi_private->cpu_dai_drv.symmetric_rates, ret; -- u32 pm = 999, div2, psr, stccr, mask, afreq, factor, i; -- unsigned long clkrate, baudrate, tmprate; -- u64 sub, savesub = 100000; -- unsigned int freq; -- bool baudclk_is_used; -+ fsl_ssi_setup_reg_vals(ssi_private); - -- /* Prefer the explicitly set bitclock frequency */ -- if (ssi_private->bitclk_freq) -- freq = ssi_private->bitclk_freq; -+ if (ssi_private->imx_ac97) -+ ssi_private->i2s_mode = CCSR_SSI_SCR_I2S_MODE_NORMAL | CCSR_SSI_SCR_NET; - else -- freq = params_channels(hw_params) * 32 * params_rate(hw_params); -- -- /* Don't apply it to any non-baudclk circumstance */ -- if (IS_ERR(ssi_private->baudclk)) -- return -EINVAL; -- -- baudclk_is_used = ssi_private->baudclk_streams & ~(BIT(substream->stream)); -+ ssi_private->i2s_mode = CCSR_SSI_SCR_I2S_MODE_SLAVE; - -- /* It should be already enough to divide clock by setting pm alone */ -- psr = 0; -- div2 = 0; -- -- factor = (div2 + 1) * (7 * psr + 1) * 2; -+ /* -+ * Section 16.5 of the MPC8610 reference manual says that the SSI needs -+ * to be disabled before updating the registers we set here. -+ */ -+ write_ssi_mask(&ssi->scr, CCSR_SSI_SCR_SSIEN, 0); ++ tmprate = freq * factor * (i + 2); -- for (i = 0; i < 255; i++) { -- tmprate = freq * factor * (i + 1); -+ /* -+ * Program the SSI into I2S Slave Non-Network Synchronous mode. Also -+ * enable the transmit and receive FIFO. -+ * -+ * FIXME: Little-endian samples require a different shift dir -+ */ -+ write_ssi_mask(&ssi->scr, -+ CCSR_SSI_SCR_I2S_MODE_MASK | CCSR_SSI_SCR_SYN, -+ CCSR_SSI_SCR_TFR_CLK_DIS | -+ ssi_private->i2s_mode | -+ (synchronous ? CCSR_SSI_SCR_SYN : 0)); - -- if (baudclk_is_used) -- clkrate = clk_get_rate(ssi_private->baudclk); -- else -- clkrate = clk_round_rate(ssi_private->baudclk, tmprate); -+ write_ssi(CCSR_SSI_STCR_TXBIT0 | CCSR_SSI_STCR_TFSI | -+ CCSR_SSI_STCR_TEFS | CCSR_SSI_STCR_TSCKP, &ssi->stcr); + if (baudclk_is_used) + clkrate = clk_get_rate(ssi_private->baudclk); + else + clkrate = clk_round_rate(ssi_private->baudclk, tmprate); - /* - * Hardware limitation: The bclk rate must be @@ -290237,188 +311315,14 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f - */ - if (clkrate * 5 > clk_get_rate(ssi_private->clk)) - continue; -+ write_ssi(CCSR_SSI_SRCR_RXBIT0 | CCSR_SSI_SRCR_RFSI | -+ CCSR_SSI_SRCR_REFS | CCSR_SSI_SRCR_RSCKP, &ssi->srcr); - -- clkrate /= factor; -- afreq = clkrate / (i + 1); -+ /* -+ * The DC and PM bits are only used if the SSI is the clock master. -+ */ - -- if (freq == afreq) -- sub = 0; -- else if (freq / afreq == 1) -- sub = freq - afreq; -- else if (afreq / freq == 1) -- sub = afreq - freq; -- else -- continue; -+ /* -+ * Set the watermark for transmit FIFI 0 and receive FIFO 0. We don't -+ * use FIFO 1. We program the transmit water to signal a DMA transfer -+ * if there are only two (or fewer) elements left in the FIFO. Two -+ * elements equals one frame (left channel, right channel). This value, -+ * however, depends on the depth of the transmit buffer. -+ * -+ * We set the watermark on the same level as the DMA burstsize. For -+ * fiq it is probably better to use the biggest possible watermark -+ * size. -+ */ -+ if (ssi_private->use_dma) -+ wm = ssi_private->fifo_depth - 2; -+ else -+ wm = ssi_private->fifo_depth; - -- /* Calculate the fraction */ -- sub *= 100000; -- do_div(sub, freq); -+ write_ssi(CCSR_SSI_SFCSR_TFWM0(wm) | CCSR_SSI_SFCSR_RFWM0(wm) | -+ CCSR_SSI_SFCSR_TFWM1(wm) | CCSR_SSI_SFCSR_RFWM1(wm), -+ &ssi->sfcsr); - -- if (sub < savesub) { -- baudrate = tmprate; -- savesub = sub; -- pm = i; -- } -+ /* -+ * For ac97 interrupts are enabled with the startup of the substream -+ * because it is also running without an active substream. Normally SSI -+ * is only enabled when there is a substream. -+ */ -+ if (ssi_private->imx_ac97) -+ fsl_ssi_setup_ac97(ssi_private); - -- /* We are lucky */ -- if (savesub == 0) -- break; -+ /* -+ * Set a default slot number so that there is no need for those common -+ * cases like I2S mode to call the extra set_tdm_slot() any more. -+ */ -+ if (!ssi_private->imx_ac97) { -+ write_ssi_mask(&ssi->stccr, CCSR_SSI_SxCCR_DC_MASK, -+ CCSR_SSI_SxCCR_DC(2)); -+ write_ssi_mask(&ssi->srccr, CCSR_SSI_SxCCR_DC_MASK, -+ CCSR_SSI_SxCCR_DC(2)); - } - -- /* No proper pm found if it is still remaining the initial value */ -- if (pm == 999) { -- dev_err(cpu_dai->dev, "failed to handle the required sysclk\n"); -- return -EINVAL; -+ if (ssi_private->use_dual_fifo) { -+ write_ssi_mask(&ssi->srcr, 0, CCSR_SSI_SRCR_RFEN1); -+ write_ssi_mask(&ssi->stcr, 0, CCSR_SSI_STCR_TFEN1); -+ write_ssi_mask(&ssi->scr, 0, CCSR_SSI_SCR_TCH_EN); - } - -- stccr = CCSR_SSI_SxCCR_PM(pm + 1) | (div2 ? CCSR_SSI_SxCCR_DIV2 : 0) | -- (psr ? CCSR_SSI_SxCCR_PSR : 0); -- mask = CCSR_SSI_SxCCR_PM_MASK | CCSR_SSI_SxCCR_DIV2 | -- CCSR_SSI_SxCCR_PSR; -+ return 0; -+} - -- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK || synchronous) -- regmap_update_bits(regs, CCSR_SSI_STCCR, mask, stccr); -- else -- regmap_update_bits(regs, CCSR_SSI_SRCCR, mask, stccr); - -- if (!baudclk_is_used) { -- ret = clk_set_rate(ssi_private->baudclk, baudrate); -- if (ret) { -- dev_err(cpu_dai->dev, "failed to set baudclk rate\n"); -- return -EINVAL; -- } -- } -+/** -+ * fsl_ssi_startup: create a new substream -+ * -+ * This is the first function called when a stream is opened. -+ * -+ * If this is the first stream open, then grab the IRQ and program most of -+ * the SSI registers. -+ */ -+static int fsl_ssi_startup(struct snd_pcm_substream *substream, -+ struct snd_soc_dai *dai) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct fsl_ssi_private *ssi_private = -+ snd_soc_dai_get_drvdata(rtd->cpu_dai); -+ unsigned long flags; - -- return 0; --} -+ pm_runtime_get_sync(dai->dev); - --static int fsl_ssi_set_dai_sysclk(struct snd_soc_dai *cpu_dai, -- int clk_id, unsigned int freq, int dir) --{ -- struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai); -+ /* First, we only do fsl_ssi_setup() when SSI is going to be active. -+ * Second, fsl_ssi_setup was already called by ac97_init earlier if -+ * the driver is in ac97 mode. -+ */ -+ if (!dai->active && !ssi_private->imx_ac97) { -+ fsl_ssi_setup(ssi_private); -+ spin_lock_irqsave(&ssi_private->baudclk_lock, flags); -+ ssi_private->baudclk_locked = false; -+ spin_unlock_irqrestore(&ssi_private->baudclk_lock, flags); -+ } - -- ssi_private->bitclk_freq = freq; -+ /* When using dual fifo mode, it is safer to ensure an even period -+ * size. If appearing to an odd number while DMA always starts its -+ * task from fifo0, fifo1 would be neglected at the end of each -+ * period. But SSI would still access fifo1 with an invalid data. -+ */ -+ if (ssi_private->use_dual_fifo) -+ snd_pcm_hw_constraint_step(substream->runtime, 0, -+ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 2); - - return 0; - } -@@ -698,17 +847,12 @@ - struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *cpu_dai) - { - struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai); -- struct regmap *regs = ssi_private->regs; -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; - unsigned int channels = params_channels(hw_params); - unsigned int sample_size = - snd_pcm_format_width(params_format(hw_params)); - u32 wl = CCSR_SSI_SxCCR_WL(sample_size); -- int ret; -- u32 scr_val; -- int enabled; - -- regmap_read(regs, CCSR_SSI_SCR, &scr_val); -- enabled = scr_val & CCSR_SSI_SCR_SSIEN; -+ int enabled = read_ssi(&ssi->scr) & CCSR_SSI_SCR_SSIEN; + clkrate /= factor; + afreq = clkrate / (i + 1); - /* - * If we're in synchronous mode, and the SSI is already enabled, -@@ -717,38 +861,6 @@ - if (enabled && ssi_private->cpu_dai_drv.symmetric_rates) - return 0; +@@ -732,23 +821,6 @@ + } + } -- if (fsl_ssi_is_i2s_master(ssi_private)) { -- ret = fsl_ssi_set_bclk(substream, cpu_dai, hw_params); -- if (ret) -- return ret; -- -- /* Do not enable the clock if it is already enabled */ -- if (!(ssi_private->baudclk_streams & BIT(substream->stream))) { -- ret = clk_prepare_enable(ssi_private->baudclk); -- if (ret) -- return ret; -- -- ssi_private->baudclk_streams |= BIT(substream->stream); -- } -- } -- - if (!fsl_ssi_is_ac97(ssi_private)) { - u8 i2smode; - /* @@ -290439,121 +311343,48 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f /* * FIXME: The documentation says that SxCCR[WL] should not be * modified while the SSI is enabled. The only time this can -@@ -762,80 +874,49 @@ - /* In synchronous mode, the SSI uses STCCR for capture */ - if ((substream->stream == SNDRV_PCM_STREAM_PLAYBACK) || - ssi_private->cpu_dai_drv.symmetric_rates) -- regmap_update_bits(regs, CCSR_SSI_STCCR, CCSR_SSI_SxCCR_WL_MASK, -- wl); -+ write_ssi_mask(&ssi->stccr, CCSR_SSI_SxCCR_WL_MASK, wl); - else -- regmap_update_bits(regs, CCSR_SSI_SRCCR, CCSR_SSI_SxCCR_WL_MASK, -- wl); -+ write_ssi_mask(&ssi->srccr, CCSR_SSI_SxCCR_WL_MASK, wl); +@@ -768,6 +840,11 @@ + regmap_update_bits(regs, CCSR_SSI_SRCCR, CCSR_SSI_SxCCR_WL_MASK, + wl); -- return 0; --} -- --static int fsl_ssi_hw_free(struct snd_pcm_substream *substream, -- struct snd_soc_dai *cpu_dai) --{ -- struct snd_soc_pcm_runtime *rtd = substream->private_data; -- struct fsl_ssi_private *ssi_private = -- snd_soc_dai_get_drvdata(rtd->cpu_dai); -- -- if (fsl_ssi_is_i2s_master(ssi_private) && -- ssi_private->baudclk_streams & BIT(substream->stream)) { -- clk_disable_unprepare(ssi_private->baudclk); -- ssi_private->baudclk_streams &= ~BIT(substream->stream); -- } -+ if (!ssi_private->imx_ac97) -+ write_ssi_mask(&ssi->scr, ++ if (!fsl_ssi_is_ac97(ssi_private)) ++ regmap_update_bits(regs, CCSR_SSI_SCR, + CCSR_SSI_SCR_NET | CCSR_SSI_SCR_I2S_MODE_MASK, + channels == 1 ? 0 : ssi_private->i2s_mode); ++ + return 0; + } +@@ -787,9 +864,8 @@ return 0; } -static int _fsl_ssi_set_dai_fmt(struct device *dev, - struct fsl_ssi_private *ssi_private, - unsigned int fmt) -+/** -+ * fsl_ssi_set_dai_fmt - configure Digital Audio Interface Format. -+ */ -+static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) ++static int _fsl_ssi_set_dai_fmt(struct fsl_ssi_private *ssi_private, ++ unsigned int fmt) { -- struct regmap *regs = ssi_private->regs; -+ struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai); -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; + struct regmap *regs = ssi_private->regs; u32 strcr = 0, stcr, srcr, scr, mask; -- u8 wm; +@@ -798,7 +874,7 @@ + ssi_private->dai_fmt = fmt; -- ssi_private->dai_fmt = fmt; -- -- if (fsl_ssi_is_i2s_master(ssi_private) && IS_ERR(ssi_private->baudclk)) { + if (fsl_ssi_is_i2s_master(ssi_private) && IS_ERR(ssi_private->baudclk)) { - dev_err(dev, "baudclk is missing which is necessary for master mode\n"); -- return -EINVAL; -- } -- -- fsl_ssi_setup_reg_vals(ssi_private); -- -- regmap_read(regs, CCSR_SSI_SCR, &scr); -- scr &= ~(CCSR_SSI_SCR_SYN | CCSR_SSI_SCR_I2S_MODE_MASK); -- scr |= CCSR_SSI_SCR_SYNC_TX_FS; -+ scr = read_ssi(&ssi->scr) & ~(CCSR_SSI_SCR_SYN | CCSR_SSI_SCR_I2S_MODE_MASK); -+ scr |= CCSR_SSI_SCR_NET; - - mask = CCSR_SSI_STCR_TXBIT0 | CCSR_SSI_STCR_TFDIR | CCSR_SSI_STCR_TXDIR | - CCSR_SSI_STCR_TSCKP | CCSR_SSI_STCR_TFSI | CCSR_SSI_STCR_TFSL | - CCSR_SSI_STCR_TEFS; -- regmap_read(regs, CCSR_SSI_STCR, &stcr); -- regmap_read(regs, CCSR_SSI_SRCR, &srcr); -- stcr &= ~mask; -- srcr &= ~mask; -+ stcr = read_ssi(&ssi->stcr) & ~mask; -+ srcr = read_ssi(&ssi->srcr) & ~mask; - -- ssi_private->i2s_mode = CCSR_SSI_SCR_NET; ++ dev_err(&ssi_private->pdev->dev, "baudclk is missing which is necessary for master mode\n"); + return -EINVAL; + } + +@@ -820,7 +896,6 @@ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_I2S: switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFS: case SND_SOC_DAIFMT_CBS_CFS: -- ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_MASTER; -- regmap_update_bits(regs, CCSR_SSI_STCCR, -- CCSR_SSI_SxCCR_DC_MASK, -- CCSR_SSI_SxCCR_DC(2)); -- regmap_update_bits(regs, CCSR_SSI_SRCCR, -- CCSR_SSI_SxCCR_DC_MASK, -- CCSR_SSI_SxCCR_DC(2)); -+ ssi_private->i2s_mode = CCSR_SSI_SCR_I2S_MODE_MASTER; - break; - case SND_SOC_DAIFMT_CBM_CFM: -- ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE; -+ ssi_private->i2s_mode = CCSR_SSI_SCR_I2S_MODE_SLAVE; - break; - default: - return -EINVAL; - } -+ scr |= ssi_private->i2s_mode; - - /* Data on rising edge of bclk, frame low, 1clk before data */ - strcr |= CCSR_SSI_STCR_TFSI | CCSR_SSI_STCR_TSCKP | -@@ -855,13 +936,9 @@ - strcr |= CCSR_SSI_STCR_TFSL | CCSR_SSI_STCR_TSCKP | - CCSR_SSI_STCR_TXBIT0; - break; -- case SND_SOC_DAIFMT_AC97: -- ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_NORMAL; -- break; - default: - return -EINVAL; - } -- scr |= ssi_private->i2s_mode; - - /* DAI clock inversion */ - switch (fmt & SND_SOC_DAIFMT_INV_MASK) { -@@ -894,11 +971,6 @@ + ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_MASTER; + regmap_update_bits(regs, CCSR_SSI_STCCR, +@@ -894,11 +969,6 @@ case SND_SOC_DAIFMT_CBM_CFM: scr &= ~CCSR_SSI_SCR_SYS_CLK_EN; break; @@ -290565,288 +311396,36 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f default: return -EINVAL; } -@@ -912,54 +984,105 @@ - scr |= CCSR_SSI_SCR_SYN; - } - -- regmap_write(regs, CCSR_SSI_STCR, stcr); -- regmap_write(regs, CCSR_SSI_SRCR, srcr); -- regmap_write(regs, CCSR_SSI_SCR, scr); -- -- /* -- * Set the watermark for transmit FIFI 0 and receive FIFO 0. We don't -- * use FIFO 1. We program the transmit water to signal a DMA transfer -- * if there are only two (or fewer) elements left in the FIFO. Two -- * elements equals one frame (left channel, right channel). This value, -- * however, depends on the depth of the transmit buffer. -- * -- * We set the watermark on the same level as the DMA burstsize. For -- * fiq it is probably better to use the biggest possible watermark -- * size. -- */ -- if (ssi_private->use_dma) -- wm = ssi_private->fifo_depth - 2; -- else -- wm = ssi_private->fifo_depth; -- -- regmap_write(regs, CCSR_SSI_SFCSR, -- CCSR_SSI_SFCSR_TFWM0(wm) | CCSR_SSI_SFCSR_RFWM0(wm) | -- CCSR_SSI_SFCSR_TFWM1(wm) | CCSR_SSI_SFCSR_RFWM1(wm)); -- -- if (ssi_private->use_dual_fifo) { -- regmap_update_bits(regs, CCSR_SSI_SRCR, CCSR_SSI_SRCR_RFEN1, -- CCSR_SSI_SRCR_RFEN1); -- regmap_update_bits(regs, CCSR_SSI_STCR, CCSR_SSI_STCR_TFEN1, -- CCSR_SSI_STCR_TFEN1); -- regmap_update_bits(regs, CCSR_SSI_SCR, CCSR_SSI_SCR_TCH_EN, -- CCSR_SSI_SCR_TCH_EN); -- } -- -- if (fmt & SND_SOC_DAIFMT_AC97) -- fsl_ssi_setup_ac97(ssi_private); -+ write_ssi(stcr, &ssi->stcr); -+ write_ssi(srcr, &ssi->srcr); -+ write_ssi(scr, &ssi->scr); - - return 0; -- - } - - /** -- * fsl_ssi_set_dai_fmt - configure Digital Audio Interface Format. -+ * fsl_ssi_set_dai_sysclk - configure Digital Audio Interface bit clock -+ * -+ * Note: This function can be only called when using SSI as DAI master -+ * -+ * Quick instruction for parameters: -+ * freq: Output BCLK frequency = samplerate * 32 (fixed) * channels -+ * dir: SND_SOC_CLOCK_OUT -> TxBCLK, SND_SOC_CLOCK_IN -> RxBCLK. - */ --static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) -+static int fsl_ssi_set_dai_sysclk(struct snd_soc_dai *cpu_dai, -+ int clk_id, unsigned int freq, int dir) +@@ -959,7 +1029,7 @@ { struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai); -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; -+ int synchronous = ssi_private->cpu_dai_drv.symmetric_rates, ret; -+ u32 pm = 999, div2, psr, stccr, mask, afreq, factor, i; -+ unsigned long flags, clkrate, baudrate, tmprate; -+ u64 sub, savesub = 100000; -+ -+ /* Don't apply it to any non-baudclk circumstance */ -+ if (IS_ERR(ssi_private->baudclk)) -+ return -EINVAL; -+ -+ /* It should be already enough to divide clock by setting pm alone */ -+ psr = 0; -+ div2 = 0; -+ -+ factor = (div2 + 1) * (7 * psr + 1) * 2; -+ -+ for (i = 0; i < 255; i++) { -+ /* The bclk rate must be smaller than 1/5 sysclk rate */ -+ if (factor * (i + 1) < 5) -+ continue; -+ -+ tmprate = freq * factor * (i + 2); -+ clkrate = clk_round_rate(ssi_private->baudclk, tmprate); -+ -+ do_div(clkrate, factor); -+ afreq = (u32)clkrate / (i + 1); -+ -+ if (freq == afreq) -+ sub = 0; -+ else if (freq / afreq == 1) -+ sub = freq - afreq; -+ else if (afreq / freq == 1) -+ sub = afreq - freq; -+ else -+ continue; -+ -+ /* Calculate the fraction */ -+ sub *= 100000; -+ do_div(sub, freq); -+ -+ if (sub < savesub) { -+ baudrate = tmprate; -+ savesub = sub; -+ pm = i; -+ } -+ -+ /* We are lucky */ -+ if (savesub == 0) -+ break; -+ } -+ -+ /* No proper pm found if it is still remaining the initial value */ -+ if (pm == 999) { -+ dev_err(cpu_dai->dev, "failed to handle the required sysclk\n"); -+ return -EINVAL; -+ } -+ -+ stccr = CCSR_SSI_SxCCR_PM(pm + 1) | (div2 ? CCSR_SSI_SxCCR_DIV2 : 0) | -+ (psr ? CCSR_SSI_SxCCR_PSR : 0); -+ mask = CCSR_SSI_SxCCR_PM_MASK | CCSR_SSI_SxCCR_DIV2 | CCSR_SSI_SxCCR_PSR; -+ -+ if (dir == SND_SOC_CLOCK_OUT || synchronous) -+ write_ssi_mask(&ssi->stccr, mask, stccr); -+ else -+ write_ssi_mask(&ssi->srccr, mask, stccr); -+ -+ spin_lock_irqsave(&ssi_private->baudclk_lock, flags); -+ if (!ssi_private->baudclk_locked) { -+ ret = clk_set_rate(ssi_private->baudclk, baudrate); -+ if (ret) { -+ spin_unlock_irqrestore(&ssi_private->baudclk_lock, flags); -+ dev_err(cpu_dai->dev, "failed to set baudclk rate\n"); -+ return -EINVAL; -+ } -+ ssi_private->baudclk_locked = true; -+ } -+ spin_unlock_irqrestore(&ssi_private->baudclk_lock, flags); - return _fsl_ssi_set_dai_fmt(cpu_dai->dev, ssi_private, fmt); -+ return 0; ++ return _fsl_ssi_set_dai_fmt(ssi_private, fmt); } /** -@@ -971,34 +1094,31 @@ - u32 rx_mask, int slots, int slot_width) - { - struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai); -- struct regmap *regs = ssi_private->regs; -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; - u32 val; - - /* The slot number should be >= 2 if using Network mode or I2S mode */ -- regmap_read(regs, CCSR_SSI_SCR, &val); -- val &= CCSR_SSI_SCR_I2S_MODE_MASK | CCSR_SSI_SCR_NET; -+ val = read_ssi(&ssi->scr) & (CCSR_SSI_SCR_I2S_MODE_MASK | CCSR_SSI_SCR_NET); - if (val && slots < 2) { - dev_err(cpu_dai->dev, "slot number should be >= 2 in I2S or NET\n"); - return -EINVAL; - } - -- regmap_update_bits(regs, CCSR_SSI_STCCR, CCSR_SSI_SxCCR_DC_MASK, -+ write_ssi_mask(&ssi->stccr, CCSR_SSI_SxCCR_DC_MASK, - CCSR_SSI_SxCCR_DC(slots)); -- regmap_update_bits(regs, CCSR_SSI_SRCCR, CCSR_SSI_SxCCR_DC_MASK, -+ write_ssi_mask(&ssi->srccr, CCSR_SSI_SxCCR_DC_MASK, - CCSR_SSI_SxCCR_DC(slots)); - - /* The register SxMSKs needs SSI to provide essential clock due to - * hardware design. So we here temporarily enable SSI to set them. - */ -- regmap_read(regs, CCSR_SSI_SCR, &val); -- val &= CCSR_SSI_SCR_SSIEN; -- regmap_update_bits(regs, CCSR_SSI_SCR, CCSR_SSI_SCR_SSIEN, -- CCSR_SSI_SCR_SSIEN); -+ val = read_ssi(&ssi->scr) & CCSR_SSI_SCR_SSIEN; -+ write_ssi_mask(&ssi->scr, 0, CCSR_SSI_SCR_SSIEN); +@@ -995,8 +1065,8 @@ + regmap_update_bits(regs, CCSR_SSI_SCR, CCSR_SSI_SCR_SSIEN, + CCSR_SSI_SCR_SSIEN); - regmap_write(regs, CCSR_SSI_STMSK, ~tx_mask); - regmap_write(regs, CCSR_SSI_SRMSK, ~rx_mask); -+ write_ssi(tx_mask, &ssi->stmsk); -+ write_ssi(rx_mask, &ssi->srmsk); - -- regmap_update_bits(regs, CCSR_SSI_SCR, CCSR_SSI_SCR_SSIEN, val); -+ write_ssi_mask(&ssi->scr, CCSR_SSI_SCR_SSIEN, val); - - return 0; - } -@@ -1017,7 +1137,8 @@ - { - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(rtd->cpu_dai); -- struct regmap *regs = ssi_private->regs; -+ struct ccsr_ssi __iomem *ssi = ssi_private->ssi; -+ unsigned long flags; - - switch (cmd) { - case SNDRV_PCM_TRIGGER_START: -@@ -1027,6 +1148,7 @@ - fsl_ssi_tx_config(ssi_private, true); - else - fsl_ssi_rx_config(ssi_private, true); -+ dump_reg(ssi); - break; - - case SNDRV_PCM_TRIGGER_STOP: -@@ -1036,27 +1158,40 @@ - fsl_ssi_tx_config(ssi_private, false); - else - fsl_ssi_rx_config(ssi_private, false); -+ -+ if (!ssi_private->imx_ac97 && (read_ssi(&ssi->scr) & -+ (CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE)) == 0) { -+ spin_lock_irqsave(&ssi_private->baudclk_lock, flags); -+ ssi_private->baudclk_locked = false; -+ spin_unlock_irqrestore(&ssi_private->baudclk_lock, flags); -+ } - break; - - default: - return -EINVAL; - } - -- if (fsl_ssi_is_ac97(ssi_private)) { -+ if (ssi_private->imx_ac97) { - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -- regmap_write(regs, CCSR_SSI_SOR, CCSR_SSI_SOR_TX_CLR); -+ write_ssi(CCSR_SSI_SOR_TX_CLR, &ssi->sor); - else -- regmap_write(regs, CCSR_SSI_SOR, CCSR_SSI_SOR_RX_CLR); -+ write_ssi(CCSR_SSI_SOR_RX_CLR, &ssi->sor); - } - - return 0; - } ++ regmap_write(regs, CCSR_SSI_STMSK, tx_mask); ++ regmap_write(regs, CCSR_SSI_SRMSK, rx_mask); -+static void fsl_ssi_shutdown(struct snd_pcm_substream *substream, -+ struct snd_soc_dai *dai) -+{ -+ pm_runtime_put_sync(dai->dev); -+} -+ - static int fsl_ssi_dai_probe(struct snd_soc_dai *dai) - { - struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(dai); + regmap_update_bits(regs, CCSR_SSI_SCR, CCSR_SSI_SCR_SSIEN, val); -- if (ssi_private->soc->imx && ssi_private->use_dma) { -+ if (ssi_private->ssi_on_imx && ssi_private->use_dma) { - dai->playback_dma_data = &ssi_private->dma_params_tx; - dai->capture_dma_data = &ssi_private->dma_params_rx; - } -@@ -1066,27 +1201,24 @@ +@@ -1066,7 +1136,7 @@ static const struct snd_soc_dai_ops fsl_ssi_dai_ops = { .startup = fsl_ssi_startup, - .shutdown = fsl_ssi_shutdown, ++ .shutdown = fsl_ssi_shutdown, .hw_params = fsl_ssi_hw_params, -- .hw_free = fsl_ssi_hw_free, + .hw_free = fsl_ssi_hw_free, .set_fmt = fsl_ssi_set_dai_fmt, - .set_sysclk = fsl_ssi_set_dai_sysclk, - .set_tdm_slot = fsl_ssi_set_dai_tdm_slot, - .trigger = fsl_ssi_trigger, -+ .shutdown = fsl_ssi_shutdown, - }; - - /* Template for the CPU dai driver structure */ - static struct snd_soc_dai_driver fsl_ssi_dai_template = { - .probe = fsl_ssi_dai_probe, - .playback = { -- .stream_name = "CPU-Playback", - .channels_min = 1, - .channels_max = 2, - .rates = FSLSSI_I2S_RATES, - .formats = FSLSSI_I2S_FORMATS, - }, - .capture = { -- .stream_name = "CPU-Capture", - .channels_min = 1, - .channels_max = 2, - .rates = FSLSSI_I2S_RATES, -@@ -1100,7 +1232,7 @@ +@@ -1100,7 +1170,7 @@ }; static struct snd_soc_dai_driver fsl_ssi_ac97_dai = { @@ -290855,272 +311434,71 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f .playback = { .stream_name = "AC97 Playback", .channels_min = 2, -@@ -1121,10 +1253,15 @@ - - static struct fsl_ssi_private *fsl_ac97_data; - -+static void fsl_ssi_ac97_init(void) -+{ -+ fsl_ssi_setup(fsl_ac97_data); -+} -+ - static void fsl_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg, - unsigned short val) - { -- struct regmap *regs = fsl_ac97_data->regs; -+ struct ccsr_ssi *ssi = fsl_ac97_data->ssi; - unsigned int lreg; - unsigned int lval; - -@@ -1133,12 +1270,12 @@ - +@@ -1227,7 +1297,7 @@ + ssi_private->dma_params_tx.addr = ssi_private->ssi_phys + CCSR_SSI_STX0; + ssi_private->dma_params_rx.addr = ssi_private->ssi_phys + CCSR_SSI_SRX0; - lreg = reg << 12; -- regmap_write(regs, CCSR_SSI_SACADD, lreg); -+ write_ssi(lreg, &ssi->sacadd); - - lval = val << 4; -- regmap_write(regs, CCSR_SSI_SACDAT, lval); -+ write_ssi(lval , &ssi->sacdat); - -- regmap_update_bits(regs, CCSR_SSI_SACNT, CCSR_SSI_SACNT_RDWR_MASK, -+ write_ssi_mask(&ssi->sacnt, CCSR_SSI_SACNT_RDWR_MASK, - CCSR_SSI_SACNT_WR); - udelay(100); - } -@@ -1146,21 +1283,19 @@ - static unsigned short fsl_ssi_ac97_read(struct snd_ac97 *ac97, - unsigned short reg) - { -- struct regmap *regs = fsl_ac97_data->regs; -+ struct ccsr_ssi *ssi = fsl_ac97_data->ssi; - - unsigned short val = -1; -- u32 reg_val; - unsigned int lreg; - - lreg = (reg & 0x7f) << 12; -- regmap_write(regs, CCSR_SSI_SACADD, lreg); -- regmap_update_bits(regs, CCSR_SSI_SACNT, CCSR_SSI_SACNT_RDWR_MASK, -+ write_ssi(lreg, &ssi->sacadd); -+ write_ssi_mask(&ssi->sacnt, CCSR_SSI_SACNT_RDWR_MASK, - CCSR_SSI_SACNT_RD); - - udelay(100); - -- regmap_read(regs, CCSR_SSI_SACDAT, ®_val); -- val = (reg_val >> 4) & 0xffff; -+ val = (read_ssi(&ssi->sacdat) >> 4) & 0xffff; - - return val; - } -@@ -1185,112 +1320,20 @@ - } - } - --static int fsl_ssi_imx_probe(struct platform_device *pdev, -- struct fsl_ssi_private *ssi_private, void __iomem *iomem) --{ -- struct device_node *np = pdev->dev.of_node; -- u32 dmas[4]; -- int ret; -- -- if (ssi_private->has_ipg_clk_name) -- ssi_private->clk = devm_clk_get(&pdev->dev, "ipg"); -- else -- ssi_private->clk = devm_clk_get(&pdev->dev, NULL); -- if (IS_ERR(ssi_private->clk)) { -- ret = PTR_ERR(ssi_private->clk); -- dev_err(&pdev->dev, "could not get clock: %d\n", ret); -- return ret; -- } -- -- if (!ssi_private->has_ipg_clk_name) { -- ret = clk_prepare_enable(ssi_private->clk); -- if (ret) { -- dev_err(&pdev->dev, "clk_prepare_enable failed: %d\n", ret); -- return ret; -- } -- } -- -- /* For those SLAVE implementations, we ingore non-baudclk cases -- * and, instead, abandon MASTER mode that needs baud clock. -- */ -- ssi_private->baudclk = devm_clk_get(&pdev->dev, "baud"); -- if (IS_ERR(ssi_private->baudclk)) -- dev_dbg(&pdev->dev, "could not get baud clock: %ld\n", -- PTR_ERR(ssi_private->baudclk)); -- -- /* -- * We have burstsize be "fifo_depth - 2" to match the SSI -- * watermark setting in fsl_ssi_startup(). -- */ -- ssi_private->dma_params_tx.maxburst = ssi_private->fifo_depth - 2; -- ssi_private->dma_params_rx.maxburst = ssi_private->fifo_depth - 2; -- ssi_private->dma_params_tx.addr = ssi_private->ssi_phys + CCSR_SSI_STX0; -- ssi_private->dma_params_rx.addr = ssi_private->ssi_phys + CCSR_SSI_SRX0; -- - ret = of_property_read_u32_array(np, "dmas", dmas, 4); -- if (ssi_private->use_dma && !ret && dmas[2] == IMX_DMATYPE_SSI_DUAL) { -- ssi_private->use_dual_fifo = true; -- /* When using dual fifo mode, we need to keep watermark -- * as even numbers due to dma script limitation. -- */ -- ssi_private->dma_params_tx.maxburst &= ~0x1; -- ssi_private->dma_params_rx.maxburst &= ~0x1; -- } -- -- if (!ssi_private->use_dma) { -- -- /* -- * Some boards use an incompatible codec. To get it -- * working, we are using imx-fiq-pcm-audio, that -- * can handle those codecs. DMA is not possible in this -- * situation. -- */ -- -- ssi_private->fiq_params.irq = ssi_private->irq; -- ssi_private->fiq_params.base = iomem; -- ssi_private->fiq_params.dma_params_rx = -- &ssi_private->dma_params_rx; -- ssi_private->fiq_params.dma_params_tx = -- &ssi_private->dma_params_tx; -- -- ret = imx_pcm_fiq_init(pdev, &ssi_private->fiq_params); -- if (ret) -- goto error_pcm; -- } else { ++ ret = !of_property_read_u32_array(np, "dmas", dmas, 4); + if (ssi_private->use_dma && !ret && dmas[2] == IMX_DMATYPE_SSI_DUAL) { + ssi_private->use_dual_fifo = true; + /* When using dual fifo mode, we need to keep watermark +@@ -1257,7 +1327,7 @@ + if (ret) + goto error_pcm; + } else { - ret = imx_pcm_dma_init(pdev); -- if (ret) -- goto error_pcm; -- } -- -- return 0; -- --error_pcm: -- -- if (!ssi_private->has_ipg_clk_name) -- clk_disable_unprepare(ssi_private->clk); -- return ret; --} -- --static void fsl_ssi_imx_clean(struct platform_device *pdev, -- struct fsl_ssi_private *ssi_private) --{ -- if (!ssi_private->use_dma) -- imx_pcm_fiq_exit(pdev); -- if (!ssi_private->has_ipg_clk_name) -- clk_disable_unprepare(ssi_private->clk); --} -- - static int fsl_ssi_probe(struct platform_device *pdev) - { - struct fsl_ssi_private *ssi_private; - int ret = 0; -+ struct device_attribute *dev_attr = NULL; - struct device_node *np = pdev->dev.of_node; -+ u32 dmas[4]; ++ ret = imx_pcm_dma_init(pdev, IMX_SSI_DMABUF_SIZE); + if (ret) + goto error_pcm; + } +@@ -1288,7 +1358,7 @@ const struct of_device_id *of_id; -+ enum fsl_ssi_type hw_type; const char *p, *sprop; const uint32_t *iprop; - struct resource *res; -- void __iomem *iomem; + struct resource res; + void __iomem *iomem; char name[64]; -+ bool ac97 = false; - - /* SSIs that are not connected on the board should have a - * status = "disabled" -@@ -1300,32 +1343,39 @@ - return -ENODEV; - of_id = of_match_device(fsl_ssi_ids, &pdev->dev); -- if (!of_id || !of_id->data) -+ if (!of_id) -+ return -EINVAL; -+ hw_type = (enum fsl_ssi_type) of_id->data; -+ -+ sprop = of_get_property(np, "fsl,mode", NULL); -+ if (!sprop) { -+ dev_err(&pdev->dev, "fsl,mode property is necessary\n"); - return -EINVAL; -+ } -+ if (!strcmp(sprop, "ac97-slave")) -+ ac97 = true; - -- ssi_private = devm_kzalloc(&pdev->dev, sizeof(*ssi_private), -- GFP_KERNEL); -+ /* The DAI name is the last part of the full name of the node. */ -+ p = strrchr(np->full_name, '/') + 1; -+ ssi_private = devm_kzalloc(&pdev->dev, sizeof(*ssi_private) + strlen(p), -+ GFP_KERNEL); - if (!ssi_private) { - dev_err(&pdev->dev, "could not allocate DAI object\n"); - return -ENOMEM; +@@ -1316,6 +1386,9 @@ + if (sprop) { + if (!strcmp(sprop, "ac97-slave")) + ssi_private->dai_fmt = SND_SOC_DAIFMT_AC97; ++ else if (!strcmp(sprop, "i2s-slave")) ++ ssi_private->dai_fmt = SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_CBM_CFM; } -- ssi_private->soc = of_id->data; -- -- sprop = of_get_property(np, "fsl,mode", NULL); -- if (sprop) { -- if (!strcmp(sprop, "ac97-slave")) -- ssi_private->dai_fmt = SND_SOC_DAIFMT_AC97; -- } -+ strcpy(ssi_private->name, p); - ssi_private->use_dma = !of_property_read_bool(np, - "fsl,fiq-stream-filter"); -+ ssi_private->hw_type = hw_type; - -- if (fsl_ssi_is_ac97(ssi_private)) { -+ if (ac97) { - memcpy(&ssi_private->cpu_dai_drv, &fsl_ssi_ac97_dai, - sizeof(fsl_ssi_ac97_dai)); - - fsl_ac97_data = ssi_private; -+ ssi_private->imx_ac97 = true; - - snd_soc_set_ac97_ops_of_reset(&fsl_ssi_ac97_ops, pdev); - } else { -@@ -1333,33 +1383,25 @@ - memcpy(&ssi_private->cpu_dai_drv, &fsl_ssi_dai_template, - sizeof(fsl_ssi_dai_template)); +@@ -1335,11 +1408,19 @@ } -- ssi_private->cpu_dai_drv.name = dev_name(&pdev->dev); -+ ssi_private->cpu_dai_drv.name = ssi_private->name; + ssi_private->cpu_dai_drv.name = dev_name(&pdev->dev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - iomem = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(iomem)) - return PTR_ERR(iomem); - ssi_private->ssi_phys = res->start; -- -- ret = of_property_match_string(np, "clock-names", "ipg"); -- if (ret < 0) { -- ssi_private->has_ipg_clk_name = false; -- ssi_private->regs = devm_regmap_init_mmio(&pdev->dev, iomem, -- &fsl_ssi_regconfig); -- } else { -- ssi_private->has_ipg_clk_name = true; -- ssi_private->regs = devm_regmap_init_mmio_clk(&pdev->dev, -- "ipg", iomem, &fsl_ssi_regconfig); -- } -- if (IS_ERR(ssi_private->regs)) { -- dev_err(&pdev->dev, "Failed to init register map\n"); -- return PTR_ERR(ssi_private->regs); + /* Get the addresses and IRQ */ + ret = of_address_to_resource(np, 0, &res); + if (ret) { + dev_err(&pdev->dev, "could not determine device resources\n"); + return ret; + } -+ ssi_private->ssi = of_iomap(np, 0); -+ if (!ssi_private->ssi) { ++ ssi_private->ssi_phys = res.start; ++ ++ iomem = devm_ioremap(&pdev->dev, res.start, resource_size(&res)); ++ if (!iomem) { + dev_err(&pdev->dev, "could not map device resources\n"); + return -ENOMEM; ++ } + + ret = of_property_match_string(np, "clock-names", "ipg"); + if (ret < 0) { +@@ -1356,10 +1437,10 @@ + return PTR_ERR(ssi_private->regs); } -+ ssi_private->ssi_phys = res.start; - ssi_private->irq = platform_get_irq(pdev, 0); - if (ssi_private->irq < 0) { @@ -291133,252 +311511,131 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f } /* Are the RX and the TX clocks locked? */ -@@ -1377,43 +1419,153 @@ +@@ -1377,16 +1458,18 @@ /* Older 8610 DTs didn't have the fifo-depth property */ ssi_private->fifo_depth = 8; -- dev_set_drvdata(&pdev->dev, ssi_private); -+ ssi_private->baudclk_locked = false; -+ spin_lock_init(&ssi_private->baudclk_lock); ++ pm_runtime_enable(&pdev->dev); ++ + dev_set_drvdata(&pdev->dev, ssi_private); -- if (ssi_private->soc->imx) { -- ret = fsl_ssi_imx_probe(pdev, ssi_private, iomem); -- if (ret) + if (ssi_private->soc->imx) { + ret = fsl_ssi_imx_probe(pdev, ssi_private, iomem); + if (ret) - return ret; -+ /* -+ * imx51 and later SoCs have a slightly different IP that allows the -+ * SSI configuration while the SSI unit is running. -+ * -+ * More important, it is necessary on those SoCs to configure the -+ * sperate TX/RX DMA bits just before starting the stream -+ * (fsl_ssi_trigger). The SDMA unit has to be configured before fsl_ssi -+ * sends any DMA requests to the SDMA unit, otherwise it is not defined -+ * how the SDMA unit handles the DMA request. -+ * -+ * SDMA units are present on devices starting at imx35 but the imx35 -+ * reference manual states that the DMA bits should not be changed -+ * while the SSI unit is running (SSIEN). So we support the necessary -+ * online configuration of fsl-ssi starting at imx51. -+ */ -+ switch (hw_type) { -+ case FSL_SSI_MCP8610: -+ case FSL_SSI_MX21: -+ case FSL_SSI_MX35: -+ ssi_private->offline_config = true; -+ break; -+ case FSL_SSI_MX51: -+ ssi_private->offline_config = false; -+ break; ++ goto error_irqmap; } - ret = devm_snd_soc_register_component(&pdev->dev, &fsl_ssi_component, - &ssi_private->cpu_dai_drv, 1); -- if (ret) { -- dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); -- goto error_asoc_register; -+ if (hw_type == FSL_SSI_MX21 || hw_type == FSL_SSI_MX51 || -+ hw_type == FSL_SSI_MX35) { -+ ssi_private->ssi_on_imx = true; -+ -+ ssi_private->clk = devm_clk_get(&pdev->dev, NULL); -+ if (IS_ERR(ssi_private->clk)) { -+ ret = PTR_ERR(ssi_private->clk); -+ dev_err(&pdev->dev, "could not get clock: %d\n", ret); -+ goto error_irqmap; -+ } -+ ret = clk_prepare(ssi_private->clk); -+ if (ret) { -+ dev_err(&pdev->dev, "clk_prepare failed: %d\n", -+ ret); -+ goto error_irqmap; -+ } -+ -+ /* For those SLAVE implementations, we ingore non-baudclk cases -+ * and, instead, abandon MASTER mode that needs baud clock. -+ */ -+ ssi_private->baudclk = devm_clk_get(&pdev->dev, "baud"); -+ if (IS_ERR(ssi_private->baudclk)) -+ dev_dbg(&pdev->dev, "could not get baud clock: %ld\n", -+ PTR_ERR(ssi_private->baudclk)); -+ else -+ clk_prepare(ssi_private->baudclk); -+ -+ /* -+ * We have burstsize be "fifo_depth - 2" to match the SSI -+ * watermark setting in fsl_ssi_startup(). -+ */ -+ ssi_private->dma_params_tx.maxburst = ssi_private->fifo_depth - 2; -+ ssi_private->dma_params_rx.maxburst = ssi_private->fifo_depth - 2; -+ ssi_private->dma_params_tx.addr = -+ ssi_private->ssi_phys + offsetof(struct ccsr_ssi, stx0); -+ ssi_private->dma_params_rx.addr = -+ ssi_private->ssi_phys + offsetof(struct ccsr_ssi, srx0); -+ -+ ret = !of_property_read_u32_array(np, "dmas", dmas, 4); -+ if (ssi_private->use_dma && !ret && dmas[2] == IMX_DMATYPE_SSI_DUAL) { -+ ssi_private->use_dual_fifo = true; -+ /* When using dual fifo mode, we need to keep watermark -+ * as even numbers due to dma script limitation. -+ */ -+ ssi_private->dma_params_tx.maxburst &= ~0x1; -+ ssi_private->dma_params_rx.maxburst &= ~0x1; -+ } - } - -+ /* -+ * Enable interrupts only for MCP8610 and MX51. The other MXs have -+ * different writeable interrupt status registers. -+ */ - if (ssi_private->use_dma) { -+ /* The 'name' should not have any slashes in it. */ - ret = devm_request_irq(&pdev->dev, ssi_private->irq, -- fsl_ssi_isr, 0, dev_name(&pdev->dev), -+ fsl_ssi_isr, 0, ssi_private->name, - ssi_private); -+ ssi_private->irq_stats = true; ++ ret = snd_soc_register_component(&pdev->dev, &fsl_ssi_component, ++ &ssi_private->cpu_dai_drv, 1); + if (ret) { + dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); + goto error_asoc_register; +@@ -1399,7 +1482,7 @@ if (ret < 0) { dev_err(&pdev->dev, "could not claim irq %u\n", ssi_private->irq); - goto error_asoc_register; -+ goto error_clk; ++ goto error_irq; } } -- ret = fsl_ssi_debugfs_create(&ssi_private->dbg_stats, &pdev->dev); -+ pm_runtime_enable(&pdev->dev); -+ -+ /* Register with ASoC */ -+ dev_set_drvdata(&pdev->dev, ssi_private); -+ -+ ret = snd_soc_register_component(&pdev->dev, &fsl_ssi_component, -+ &ssi_private->cpu_dai_drv, 1); -+ if (ret) { -+ dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); -+ goto error_dev; -+ } -+ -+ ret = fsl_ssi_debugfs_create(ssi_private, &pdev->dev); - if (ret) -- goto error_asoc_register; -+ goto error_dbgfs; -+ -+ if (ssi_private->ssi_on_imx) { -+ if (!ssi_private->use_dma) { -+ -+ /* -+ * Some boards use an incompatible codec. To get it -+ * working, we are using imx-fiq-pcm-audio, that -+ * can handle those codecs. DMA is not possible in this -+ * situation. -+ */ -+ -+ ssi_private->fiq_params.irq = ssi_private->irq; -+ ssi_private->fiq_params.base = ssi_private->ssi; -+ ssi_private->fiq_params.dma_params_rx = -+ &ssi_private->dma_params_rx; -+ ssi_private->fiq_params.dma_params_tx = -+ &ssi_private->dma_params_tx; -+ -+ ret = imx_pcm_fiq_init(pdev, &ssi_private->fiq_params); -+ if (ret) -+ goto error_pcm; -+ } else { -+ ret = imx_pcm_dma_init(pdev, IMX_SSI_DMABUF_SIZE); -+ if (ret) -+ goto error_pcm; -+ } -+ } - - /* - * If codec-handle property is missing from SSI node, we assume - * that the machine driver uses new binding which does not require - * SSI driver to trigger machine driver's probe. - */ -- if (!of_get_property(np, "codec-handle", NULL)) -+ if (!of_get_property(np, "codec-handle", NULL)) { -+ ssi_private->new_binding = true; - goto done; -+ } - - /* Trigger the machine driver's probe function. The platform driver - * name of the machine driver is taken from /compatible property of the -@@ -1433,22 +1585,42 @@ - if (IS_ERR(ssi_private->pdev)) { - ret = PTR_ERR(ssi_private->pdev); - dev_err(&pdev->dev, "failed to register platform: %d\n", ret); -- goto error_sound_card; -+ goto error_dai; - } +@@ -1438,18 +1521,24 @@ done: -- if (ssi_private->dai_fmt) + if (ssi_private->dai_fmt) - _fsl_ssi_set_dai_fmt(&pdev->dev, ssi_private, - ssi_private->dai_fmt); -+ if (ssi_private->imx_ac97) -+ fsl_ssi_ac97_init(); ++ _fsl_ssi_set_dai_fmt(ssi_private, ssi_private->dai_fmt); return 0; --error_sound_card: -- fsl_ssi_debugfs_remove(&ssi_private->dbg_stats); -+error_dai: -+ if (ssi_private->ssi_on_imx && !ssi_private->use_dma) -+ imx_pcm_fiq_exit(pdev); -+ -+error_pcm: -+ fsl_ssi_debugfs_remove(ssi_private); -+ -+error_dbgfs: + error_sound_card: + fsl_ssi_debugfs_remove(&ssi_private->dbg_stats); + ++error_irq: + snd_soc_unregister_component(&pdev->dev); + -+error_dev: -+ device_remove_file(&pdev->dev, dev_attr); + error_asoc_register: + if (ssi_private->soc->imx) + fsl_ssi_imx_clean(pdev, ssi_private); --error_asoc_register: -- if (ssi_private->soc->imx) -- fsl_ssi_imx_clean(pdev, ssi_private); -+ if (ssi_private->ssi_on_imx) { -+ if (!IS_ERR(ssi_private->baudclk)) -+ clk_unprepare(ssi_private->baudclk); -+ clk_unprepare(ssi_private->clk); -+ } -+error_clk: -+ if (!IS_ERR(ssi_private->baudclk)) -+ clk_unprepare(ssi_private->baudclk); -+ if (!IS_ERR(ssi_private->clk)) -+ clk_unprepare(ssi_private->clk); -+ +error_irqmap: -+ if (ssi_private->irq_stats) ++ if (ssi_private->use_dma) + irq_dispose_mapping(ssi_private->irq); - ++ return ret; } -@@ -1457,13 +1629,18 @@ - { - struct fsl_ssi_private *ssi_private = dev_get_drvdata(&pdev->dev); -- fsl_ssi_debugfs_remove(&ssi_private->dbg_stats); -+ fsl_ssi_debugfs_remove(ssi_private); +@@ -1461,17 +1550,75 @@ -- if (ssi_private->pdev) -+ if (!ssi_private->new_binding) + if (ssi_private->pdev) platform_device_unregister(ssi_private->pdev); -- -- if (ssi_private->soc->imx) -- fsl_ssi_imx_clean(pdev, ssi_private); + snd_soc_unregister_component(&pdev->dev); -+ if (ssi_private->ssi_on_imx) { -+ if (!IS_ERR(ssi_private->baudclk)) -+ clk_unprepare(ssi_private->baudclk); -+ clk_unprepare(ssi_private->clk); -+ } -+ if (ssi_private->irq_stats) -+ irq_dispose_mapping(ssi_private->irq); + if (ssi_private->soc->imx) + fsl_ssi_imx_clean(pdev, ssi_private); + ++ if (ssi_private->use_dma) ++ irq_dispose_mapping(ssi_private->irq); ++ ++ return 0; ++} ++ ++#ifdef CONFIG_PM ++static int fsl_ssi_runtime_resume(struct device *dev) ++{ ++ request_bus_freq(BUS_FREQ_AUDIO); ++ return 0; ++} ++ ++static int fsl_ssi_runtime_suspend(struct device *dev) ++{ ++ release_bus_freq(BUS_FREQ_AUDIO); ++ return 0; ++} ++#endif ++ ++#ifdef CONFIG_PM_SLEEP ++static int fsl_ssi_suspend(struct device *dev) ++{ ++ struct fsl_ssi_private *ssi_private = dev_get_drvdata(dev); ++ struct regmap *regs = ssi_private->regs; ++ ++ regmap_read(regs, CCSR_SSI_SFCSR, ++ &ssi_private->regcache_sfcsr); ++ ++ regcache_cache_only(regs, true); ++ regcache_mark_dirty(regs); ++ return 0; } -@@ -1471,7 +1648,9 @@ + ++static int fsl_ssi_resume(struct device *dev) ++{ ++ struct fsl_ssi_private *ssi_private = dev_get_drvdata(dev); ++ struct regmap *regs = ssi_private->regs; ++ ++ regcache_cache_only(regs, false); ++ ++ regmap_update_bits(regs, CCSR_SSI_SFCSR, ++ CCSR_SSI_SFCSR_RFWM1_MASK | CCSR_SSI_SFCSR_TFWM1_MASK | ++ CCSR_SSI_SFCSR_RFWM0_MASK | CCSR_SSI_SFCSR_TFWM0_MASK, ++ ssi_private->regcache_sfcsr); ++ ++ return regcache_sync(regs); ++} ++#endif /* CONFIG_PM_SLEEP */ ++ ++static const struct dev_pm_ops fsl_ssi_pm = { ++ SET_RUNTIME_PM_OPS(fsl_ssi_runtime_suspend, ++ fsl_ssi_runtime_resume, ++ NULL) ++ SET_SYSTEM_SLEEP_PM_OPS(fsl_ssi_suspend, fsl_ssi_resume) ++}; ++ static struct platform_driver fsl_ssi_driver = { .driver = { .name = "fsl-ssi-dai", @@ -291388,137 +311645,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.c linux-4.1.10/sound/soc/fsl/f }, .probe = fsl_ssi_probe, .remove = fsl_ssi_remove, -diff -Nur linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.h linux-4.1.10/sound/soc/fsl/fsl_ssi.h ---- linux-4.1.10.orig/sound/soc/fsl/fsl_ssi.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/fsl_ssi.h 2015-10-10 16:41:42.985314855 +0200 -@@ -12,32 +12,33 @@ - #ifndef _MPC8610_I2S_H - #define _MPC8610_I2S_H - --/* SSI registers */ --#define CCSR_SSI_STX0 0x00 --#define CCSR_SSI_STX1 0x04 --#define CCSR_SSI_SRX0 0x08 --#define CCSR_SSI_SRX1 0x0c --#define CCSR_SSI_SCR 0x10 --#define CCSR_SSI_SISR 0x14 --#define CCSR_SSI_SIER 0x18 --#define CCSR_SSI_STCR 0x1c --#define CCSR_SSI_SRCR 0x20 --#define CCSR_SSI_STCCR 0x24 --#define CCSR_SSI_SRCCR 0x28 --#define CCSR_SSI_SFCSR 0x2c --#define CCSR_SSI_STR 0x30 --#define CCSR_SSI_SOR 0x34 --#define CCSR_SSI_SACNT 0x38 --#define CCSR_SSI_SACADD 0x3c --#define CCSR_SSI_SACDAT 0x40 --#define CCSR_SSI_SATAG 0x44 --#define CCSR_SSI_STMSK 0x48 --#define CCSR_SSI_SRMSK 0x4c --#define CCSR_SSI_SACCST 0x50 --#define CCSR_SSI_SACCEN 0x54 --#define CCSR_SSI_SACCDIS 0x58 -+/* SSI Register Map */ -+struct ccsr_ssi { -+ __be32 stx0; /* 0x.0000 - SSI Transmit Data Register 0 */ -+ __be32 stx1; /* 0x.0004 - SSI Transmit Data Register 1 */ -+ __be32 srx0; /* 0x.0008 - SSI Receive Data Register 0 */ -+ __be32 srx1; /* 0x.000C - SSI Receive Data Register 1 */ -+ __be32 scr; /* 0x.0010 - SSI Control Register */ -+ __be32 sisr; /* 0x.0014 - SSI Interrupt Status Register Mixed */ -+ __be32 sier; /* 0x.0018 - SSI Interrupt Enable Register */ -+ __be32 stcr; /* 0x.001C - SSI Transmit Configuration Register */ -+ __be32 srcr; /* 0x.0020 - SSI Receive Configuration Register */ -+ __be32 stccr; /* 0x.0024 - SSI Transmit Clock Control Register */ -+ __be32 srccr; /* 0x.0028 - SSI Receive Clock Control Register */ -+ __be32 sfcsr; /* 0x.002C - SSI FIFO Control/Status Register */ -+ __be32 str; /* 0x.0030 - SSI Test Register */ -+ __be32 sor; /* 0x.0034 - SSI Option Register */ -+ __be32 sacnt; /* 0x.0038 - SSI AC97 Control Register */ -+ __be32 sacadd; /* 0x.003C - SSI AC97 Command Address Register */ -+ __be32 sacdat; /* 0x.0040 - SSI AC97 Command Data Register */ -+ __be32 satag; /* 0x.0044 - SSI AC97 Tag Register */ -+ __be32 stmsk; /* 0x.0048 - SSI Transmit Time Slot Mask Register */ -+ __be32 srmsk; /* 0x.004C - SSI Receive Time Slot Mask Register */ -+ __be32 saccst; /* 0x.0050 - SSI AC97 Channel Status Register */ -+ __be32 saccen; /* 0x.0054 - SSI AC97 Channel Enable Register */ -+ __be32 saccdis; /* 0x.0058 - SSI AC97 Channel Disable Register */ -+}; - --#define CCSR_SSI_SCR_SYNC_TX_FS 0x00001000 - #define CCSR_SSI_SCR_RFR_CLK_DIS 0x00000800 - #define CCSR_SSI_SCR_TFR_CLK_DIS 0x00000400 - #define CCSR_SSI_SCR_TCH_EN 0x00000100 -@@ -205,64 +206,5 @@ - #define CCSR_SSI_SACNT_FV 0x00000002 - #define CCSR_SSI_SACNT_AC97EN 0x00000001 - -- --struct device; -- --#if IS_ENABLED(CONFIG_DEBUG_FS) -- --struct fsl_ssi_dbg { -- struct dentry *dbg_dir; -- struct dentry *dbg_stats; -- -- struct { -- unsigned int rfrc; -- unsigned int tfrc; -- unsigned int cmdau; -- unsigned int cmddu; -- unsigned int rxt; -- unsigned int rdr1; -- unsigned int rdr0; -- unsigned int tde1; -- unsigned int tde0; -- unsigned int roe1; -- unsigned int roe0; -- unsigned int tue1; -- unsigned int tue0; -- unsigned int tfs; -- unsigned int rfs; -- unsigned int tls; -- unsigned int rls; -- unsigned int rff1; -- unsigned int rff0; -- unsigned int tfe1; -- unsigned int tfe0; -- } stats; --}; -- --void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *ssi_dbg, u32 sisr); -- --int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev); -- --void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg); -- --#else -- --struct fsl_ssi_dbg { --}; -- --static inline void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *stats, u32 sisr) --{ --} -- --static inline int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, -- struct device *dev) --{ -- return 0; --} -- --static inline void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg) --{ --} --#endif /* ! IS_ENABLED(CONFIG_DEBUG_FS) */ -- - #endif -+ -diff -Nur linux-4.1.10.orig/sound/soc/fsl/hdmi_pcm.S linux-4.1.10/sound/soc/fsl/hdmi_pcm.S ---- linux-4.1.10.orig/sound/soc/fsl/hdmi_pcm.S 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/sound/soc/fsl/hdmi_pcm.S 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/hdmi_pcm.S xbian-sources-kernel/sound/soc/fsl/hdmi_pcm.S +--- linux-4.1.10/sound/soc/fsl/hdmi_pcm.S 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/fsl/hdmi_pcm.S 2015-10-11 19:49:32.402974794 +0200 @@ -0,0 +1,246 @@ +/** + * Copyright (C) 2010-2014 Freescale Semiconductor, Inc. All Rights Reserved. @@ -291766,9 +311895,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/hdmi_pcm.S linux-4.1.10/sound/soc/fsl/ + + vpop {d8} + mov pc, lr -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-audmux.c linux-4.1.10/sound/soc/fsl/imx-audmux.c ---- linux-4.1.10.orig/sound/soc/fsl/imx-audmux.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/imx-audmux.c 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-audmux.c xbian-sources-kernel/sound/soc/fsl/imx-audmux.c +--- linux-4.1.10/sound/soc/fsl/imx-audmux.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/imx-audmux.c 2015-10-11 19:49:32.402974794 +0200 @@ -67,7 +67,7 @@ { ssize_t ret; @@ -291811,9 +311940,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-audmux.c linux-4.1.10/sound/soc/fs .of_match_table = imx_audmux_dt_ids, } }; -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-hdmi.c linux-4.1.10/sound/soc/fsl/imx-hdmi.c ---- linux-4.1.10.orig/sound/soc/fsl/imx-hdmi.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/sound/soc/fsl/imx-hdmi.c 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-hdmi.c xbian-sources-kernel/sound/soc/fsl/imx-hdmi.c +--- linux-4.1.10/sound/soc/fsl/imx-hdmi.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/fsl/imx-hdmi.c 2015-10-11 19:49:32.406974529 +0200 @@ -0,0 +1,114 @@ +/* + * ASoC HDMI Transmitter driver for IMX development boards @@ -291929,9 +312058,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-hdmi.c linux-4.1.10/sound/soc/fsl/ +MODULE_DESCRIPTION("IMX HDMI TX ASoC driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:imx-audio-hdmi"); -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-hdmi-dma.c linux-4.1.10/sound/soc/fsl/imx-hdmi-dma.c ---- linux-4.1.10.orig/sound/soc/fsl/imx-hdmi-dma.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/sound/soc/fsl/imx-hdmi-dma.c 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-hdmi-dma.c xbian-sources-kernel/sound/soc/fsl/imx-hdmi-dma.c +--- linux-4.1.10/sound/soc/fsl/imx-hdmi-dma.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/fsl/imx-hdmi-dma.c 2015-10-11 19:49:32.406974529 +0200 @@ -0,0 +1,1256 @@ +/* + * imx-hdmi-dma.c -- HDMI DMA driver for ALSA Soc Audio Layer @@ -292962,7 +313091,7 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-hdmi-dma.c linux-4.1.10/sound/soc/ + .buffer_bytes_max = HDMI_PCM_BUF_SIZE, + .period_bytes_min = HDMI_DMA_PERIOD_BYTES / 2, + .period_bytes_max = HDMI_DMA_PERIOD_BYTES / 2, -+ .periods_min = 2, //8 ++ .periods_min = 8, + .periods_max = HDMI_DMA_BUF_SIZE / HDMI_DMA_PERIOD_BYTES, + .fifo_size = 0, +}; @@ -293189,9 +313318,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-hdmi-dma.c linux-4.1.10/sound/soc/ +MODULE_AUTHOR("Freescale Semiconductor, Inc."); +MODULE_DESCRIPTION("i.MX HDMI audio DMA"); +MODULE_LICENSE("GPL"); -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-hdmi.h linux-4.1.10/sound/soc/fsl/imx-hdmi.h ---- linux-4.1.10.orig/sound/soc/fsl/imx-hdmi.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.10/sound/soc/fsl/imx-hdmi.h 2015-10-10 16:41:42.985314855 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-hdmi.h xbian-sources-kernel/sound/soc/fsl/imx-hdmi.h +--- linux-4.1.10/sound/soc/fsl/imx-hdmi.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/fsl/imx-hdmi.h 2015-10-11 19:49:32.406974529 +0200 @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. @@ -293299,10 +313428,10 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-hdmi.h linux-4.1.10/sound/soc/fsl/ + } while (0) + +#endif /* __IMX_HDMI_H */ -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-pcm-dma.c linux-4.1.10/sound/soc/fsl/imx-pcm-dma.c ---- linux-4.1.10.orig/sound/soc/fsl/imx-pcm-dma.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/imx-pcm-dma.c 2015-10-10 16:41:42.989314854 +0200 -@@ -43,7 +43,7 @@ +diff -Nur linux-4.1.10/sound/soc/fsl/imx-pcm-dma.c xbian-sources-kernel/sound/soc/fsl/imx-pcm-dma.c +--- linux-4.1.10/sound/soc/fsl/imx-pcm-dma.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/imx-pcm-dma.c 2015-10-11 19:49:32.406974529 +0200 +@@ -43,22 +43,79 @@ .buffer_bytes_max = IMX_SSI_DMABUF_SIZE, .period_bytes_min = 128, .period_bytes_max = 65535, /* Limited by SDMA engine */ @@ -293311,7 +313440,52 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-pcm-dma.c linux-4.1.10/sound/soc/f .periods_max = 255, .fifo_size = 0, }; -@@ -55,10 +55,27 @@ + ++static void imx_pcm_dma_complete(void *arg) ++{ ++ struct snd_pcm_substream *substream = arg; ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct dmaengine_pcm_runtime_data *prtd = substream->runtime->private_data; ++ struct snd_dmaengine_dai_dma_data *dma_data; ++ ++ prtd->pos += snd_pcm_lib_period_bytes(substream); ++ if (prtd->pos >= snd_pcm_lib_buffer_bytes(substream)) ++ prtd->pos = 0; ++ ++ snd_pcm_period_elapsed(substream); ++ ++ dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); ++ if (dma_data->check_xrun && dma_data->check_xrun(substream)) ++ dma_data->device_reset(substream, 1); ++} ++ ++static int imx_pcm_dma_prepare_slave_config(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_dmaengine_dai_dma_data *dma_data; ++ struct dmaengine_pcm_runtime_data *prtd = substream->runtime->private_data; ++ int ret; ++ ++ dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); ++ prtd->callback = imx_pcm_dma_complete; ++ ++ ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); ++ if (ret) ++ return ret; ++ ++ snd_dmaengine_pcm_set_config_from_dai_data(substream, dma_data, ++ slave_config); ++ ++ return 0; ++ ++} ++ + static const struct snd_dmaengine_pcm_config imx_dmaengine_pcm_config = { + .pcm_hardware = &imx_pcm_hardware, +- .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, ++ .prepare_slave_config = imx_pcm_dma_prepare_slave_config, + .compat_filter_fn = filter, .prealloc_buffer_size = IMX_SSI_DMABUF_SIZE, }; @@ -293341,9 +313515,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-pcm-dma.c linux-4.1.10/sound/soc/f SND_DMAENGINE_PCM_FLAG_COMPAT); } EXPORT_SYMBOL_GPL(imx_pcm_dma_init); -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-pcm.h linux-4.1.10/sound/soc/fsl/imx-pcm.h ---- linux-4.1.10.orig/sound/soc/fsl/imx-pcm.h 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/imx-pcm.h 2015-10-10 16:41:42.989314854 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-pcm.h xbian-sources-kernel/sound/soc/fsl/imx-pcm.h +--- linux-4.1.10/sound/soc/fsl/imx-pcm.h 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/imx-pcm.h 2015-10-11 19:49:32.406974529 +0200 @@ -19,6 +19,10 @@ * Do not change this as the FIQ handler depends on this size */ @@ -293367,9 +313541,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-pcm.h linux-4.1.10/sound/soc/fsl/i { return -ENODEV; } -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-sgtl5000.c linux-4.1.10/sound/soc/fsl/imx-sgtl5000.c ---- linux-4.1.10.orig/sound/soc/fsl/imx-sgtl5000.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/imx-sgtl5000.c 2015-10-10 16:41:42.989314854 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-sgtl5000.c xbian-sources-kernel/sound/soc/fsl/imx-sgtl5000.c +--- linux-4.1.10/sound/soc/fsl/imx-sgtl5000.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/imx-sgtl5000.c 2015-10-11 19:49:32.406974529 +0200 @@ -175,8 +175,10 @@ fail: if (data && !IS_ERR(data->codec_clk)) @@ -293391,9 +313565,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-sgtl5000.c linux-4.1.10/sound/soc/ .pm = &snd_soc_pm_ops, .of_match_table = imx_sgtl5000_dt_ids, }, -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-spdif.c linux-4.1.10/sound/soc/fsl/imx-spdif.c ---- linux-4.1.10.orig/sound/soc/fsl/imx-spdif.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/imx-spdif.c 2015-10-10 16:41:42.989314854 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-spdif.c xbian-sources-kernel/sound/soc/fsl/imx-spdif.c +--- linux-4.1.10/sound/soc/fsl/imx-spdif.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/imx-spdif.c 2015-10-11 19:49:32.406974529 +0200 @@ -66,16 +66,18 @@ if (ret) goto end; @@ -293425,9 +313599,9 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-spdif.c linux-4.1.10/sound/soc/fsl .of_match_table = imx_spdif_dt_ids, }, .probe = imx_spdif_audio_probe, -diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-ssi.c linux-4.1.10/sound/soc/fsl/imx-ssi.c ---- linux-4.1.10.orig/sound/soc/fsl/imx-ssi.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/imx-ssi.c 2015-10-10 16:41:42.989314854 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-ssi.c xbian-sources-kernel/sound/soc/fsl/imx-ssi.c +--- linux-4.1.10/sound/soc/fsl/imx-ssi.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/imx-ssi.c 2015-10-11 19:49:32.406974529 +0200 @@ -603,7 +603,7 @@ ssi->fiq_params.dma_params_tx = &ssi->dma_params_tx; @@ -293437,9 +313611,894 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/imx-ssi.c linux-4.1.10/sound/soc/fsl/i if (ssi->fiq_init && ssi->dma_init) { ret = ssi->fiq_init; -diff -Nur linux-4.1.10.orig/sound/soc/fsl/Kconfig linux-4.1.10/sound/soc/fsl/Kconfig ---- linux-4.1.10.orig/sound/soc/fsl/Kconfig 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/Kconfig 2015-10-10 16:41:42.989314854 +0200 +diff -Nur linux-4.1.10/sound/soc/fsl/imx-tda1997x.c xbian-sources-kernel/sound/soc/fsl/imx-tda1997x.c +--- linux-4.1.10/sound/soc/fsl/imx-tda1997x.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/fsl/imx-tda1997x.c 2015-10-11 19:49:32.406974529 +0200 +@@ -0,0 +1,195 @@ ++/* ++ * SoC audio for i.MX boards with tda1997x HDMI receiver ++ * based off sound/soc/fsl/imx-sgtl5000.c ++ * ++ * Copyright 2013 Tim Harvey, Gateworks Corporation <tharvey@gateworks.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ++ ++#include <linux/clk.h> ++#include <linux/mfd/tda1997x-core.h> ++#include <linux/module.h> ++#include <linux/gpio.h> ++#include <linux/of.h> ++#include <linux/of_platform.h> ++#include <sound/core.h> ++#include <sound/soc.h> ++ ++#include "imx-audmux.h" ++ ++#define DAI_NAME_SIZE 32 ++ ++struct imx_tda1997x_data { ++ struct snd_soc_dai_link dai; ++ struct snd_soc_card card; ++ char codec_dai_name[DAI_NAME_SIZE]; ++ char platform_name[DAI_NAME_SIZE]; ++}; ++ ++static int imx_tda1997x_dai_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ return 0; ++} ++ ++static int imx_tda1997x_audmux_config(struct platform_device *pdev) ++{ ++ struct device_node *np = pdev->dev.of_node; ++ int int_port, ext_port; ++ int ret; ++ ++ ret = of_property_read_u32(np, "mux-int-port", &int_port); ++ if (ret) { ++ dev_err(&pdev->dev, "mux-int-port missing or invalid\n"); ++ return ret; ++ } ++ ret = of_property_read_u32(np, "mux-ext-port", &ext_port); ++ if (ret) { ++ dev_err(&pdev->dev, "mux-ext-port missing or invalid\n"); ++ return ret; ++ } ++ ++ /* ++ * The port numbering in the hardware manual starts at 1, while ++ * the audmux API expects it starts at 0. ++ */ ++ int_port--; ++ ext_port--; ++ ret = imx_audmux_v2_configure_port(int_port, ++ IMX_AUDMUX_V2_PTCR_SYN | ++ IMX_AUDMUX_V2_PTCR_TFSEL(ext_port) | ++ IMX_AUDMUX_V2_PTCR_TCSEL(ext_port) | ++ IMX_AUDMUX_V2_PTCR_TFSDIR | ++ IMX_AUDMUX_V2_PTCR_TCLKDIR | ++ (1<<30) | /* use RXFS from port instead of TXFS */ ++ (1<<25), /* use RXC from port instead of TXC */ ++ IMX_AUDMUX_V2_PDCR_RXDSEL(ext_port)); ++ if (ret) { ++ dev_err(&pdev->dev, "audmux internal port setup failed\n"); ++ return ret; ++ } ++ ret = imx_audmux_v2_configure_port(ext_port, ++ IMX_AUDMUX_V2_PTCR_SYN, ++ IMX_AUDMUX_V2_PDCR_RXDSEL(int_port)); ++ if (ret) { ++ dev_err(&pdev->dev, "audmux external port setup failed\n"); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int imx_tda1997x_probe(struct platform_device *pdev) ++{ ++ struct device_node *cpu_np, *codec_np; ++ struct platform_device *cpu_pdev; ++ struct imx_tda1997x_data *data; ++ int ret; ++ ++ cpu_np = of_parse_phandle(pdev->dev.of_node, "cpu-dai", 0); ++ codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0); ++ if (!cpu_np || !codec_np) { ++ dev_err(&pdev->dev, "phandle missing or invalid\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ if (strstr(cpu_np->name, "ssi")) { ++ ret = imx_tda1997x_audmux_config(pdev); ++ if (ret) ++ goto fail; ++ } ++ ++ cpu_pdev = of_find_device_by_node(cpu_np); ++ if (!cpu_pdev) { ++ dev_err(&pdev->dev, "failed to find SSI platform device\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); ++ if (!data) { ++ ret = -ENOMEM; ++ goto fail; ++ } ++ ++ data->dai.name = "i.MX HDMI Audio Rx"; ++ data->dai.stream_name = "i.MX HDMI Audio Rx"; ++ data->dai.codec_dai_name = "tda1997x"; ++ data->dai.codec_of_node = codec_np; ++ data->dai.cpu_of_node = cpu_np; ++ data->dai.platform_of_node = cpu_np; ++ data->dai.init = &imx_tda1997x_dai_init; ++ data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM; ++ ++ data->card.dev = &pdev->dev; ++ ret = snd_soc_of_parse_card_name(&data->card, "model"); ++ if (ret) ++ goto fail; ++ data->card.num_links = 1; ++ data->card.owner = THIS_MODULE; ++ data->card.dai_link = &data->dai; ++ ++ /* register card with ASoC core */ ++ ret = snd_soc_register_card(&data->card); ++ if (ret) { ++ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); ++ goto fail; ++ } ++ ++ platform_set_drvdata(pdev, data); ++fail: ++ if (cpu_np) ++ of_node_put(cpu_np); ++ if (codec_np) ++ of_node_put(codec_np); ++ ++ return ret; ++} ++ ++static int imx_tda1997x_remove(struct platform_device *pdev) ++{ ++ struct imx_tda1997x_data *data = platform_get_drvdata(pdev); ++ ++ snd_soc_unregister_card(&data->card); ++ ++ return 0; ++} ++ ++static const struct of_device_id imx_tda1997x_dt_ids[] = { ++ { .compatible = "fsl,imx-audio-tda1997x", }, ++ { /* sentinel */ } ++}; ++MODULE_DEVICE_TABLE(of, imx_tda1997x_dt_ids); ++ ++static struct platform_driver imx_tda1997x_audio_driver = { ++ .driver = { ++ .name = "imx-tda1997x-audio", ++ .owner = THIS_MODULE, ++ .of_match_table = imx_tda1997x_dt_ids, ++ }, ++ .probe = imx_tda1997x_probe, ++ .remove = imx_tda1997x_remove, ++}; ++ ++module_platform_driver(imx_tda1997x_audio_driver); ++ ++MODULE_AUTHOR("Tim Harvey <tharvey@gateworks.com>"); ++MODULE_DESCRIPTION("Freescale i.MX TDA1997X RX ASoC machine driver"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:imx-tda1997x-audio"); +diff -Nur linux-4.1.10/sound/soc/fsl/imx-wm8731.c xbian-sources-kernel/sound/soc/fsl/imx-wm8731.c +--- linux-4.1.10/sound/soc/fsl/imx-wm8731.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbian-sources-kernel/sound/soc/fsl/imx-wm8731.c 2015-10-11 19:49:32.406974529 +0200 +@@ -0,0 +1,682 @@ ++/* ++ * Copyright (C) 2014 Freescale Semiconductor, Inc. ++ * ++ * Based on imx-sgtl5000.c ++ * Copyright (C) 2012 Freescale Semiconductor, Inc. ++ * Copyright (C) 2012 Linaro Ltd. ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++#include <linux/module.h> ++#include <linux/of.h> ++#include <linux/of_platform.h> ++#include <linux/i2c.h> ++#include <linux/clk.h> ++#include <sound/soc.h> ++#include <sound/pcm_params.h> ++ ++#include "../codecs/wm8731.h" ++#include "imx-audmux.h" ++#include "imx-ssi.h" ++ ++#define DAI_NAME_SIZE 32 ++#define WM8731_MCLK_FREQ (24000000 / 2) ++ ++struct imx_wm8731_data { ++ struct snd_soc_dai_link dai; ++ struct snd_soc_card card; ++ char codec_dai_name[DAI_NAME_SIZE]; ++ char platform_name[DAI_NAME_SIZE]; ++ struct i2c_client *codec_dev; ++ /* audio_clocking_data */ ++ struct clk *pll; ++ struct clk *clock_root; ++ long sysclk; ++ long current_rate; ++ /* apis */ ++ int (*clock_enable)(int enable,struct imx_wm8731_data *data); ++}; ++ ++static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd); ++static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params); ++static void imx_hifi_shutdown(struct snd_pcm_substream *substream); ++ ++struct imx_priv { ++ struct platform_device *pdev; ++ struct imx_wm8731_data *data; ++}; ++ ++static struct imx_priv card_priv; ++ ++static struct snd_soc_ops imx_hifi_ops = { ++ .shutdown = imx_hifi_shutdown, ++}; ++ ++/* imx card dapm widgets */ ++static const struct snd_soc_dapm_widget imx_dapm_widgets[] = { ++ SND_SOC_DAPM_HP("Headphone Jack", NULL), ++ SND_SOC_DAPM_SPK("Ext Spk", NULL), ++ SND_SOC_DAPM_LINE("Line Jack", NULL), ++ SND_SOC_DAPM_MIC("Mic Jack", NULL), ++}; ++ ++/* imx machine connections to the codec pins */ ++static const struct snd_soc_dapm_route audio_map[] = { ++ { "Headphone Jack", NULL, "LHPOUT" }, ++ { "Headphone Jack", NULL, "RHPOUT" }, ++ ++ { "Ext Spk", NULL, "LOUT" }, ++ { "Ext Spk", NULL, "ROUT" }, ++ ++ { "LLINEIN", NULL, "Line Jack" }, ++ { "RLINEIN", NULL, "Line Jack" }, ++ ++ { "MICIN", NULL, "Mic Bias" }, ++ { "Mic Bias", NULL, "Mic Jack"}, ++}; ++ ++static int wm8731_slv_mode_init(struct imx_wm8731_data *data) ++{ ++ struct clk *new_parent; ++ struct clk *ssi_clk; ++ struct i2c_client *codec_dev = data->codec_dev; ++ ++ new_parent = devm_clk_get(&codec_dev->dev, "pll4"); ++ if (IS_ERR(new_parent)) { ++ pr_err("Could not get \"pll4\" clock \n"); ++ return PTR_ERR(new_parent); ++ } ++ ++ ssi_clk = devm_clk_get(&codec_dev->dev, "imx-ssi.1"); ++ if (IS_ERR(ssi_clk)) { ++ pr_err("Could not get \"imx-ssi.1\" clock \n"); ++ return PTR_ERR(ssi_clk); ++ } ++ ++ clk_set_parent(ssi_clk, new_parent); ++ ++ data->pll = new_parent; ++ data->clock_root = ssi_clk; ++ data->current_rate = 0; ++ ++ data->sysclk = 0; ++ ++ return 0; ++} ++ ++static int wm8731_slv_mode_clock_enable(int enable, struct imx_wm8731_data *data) ++{ ++ long pll_rate; ++ long rate_req; ++ long rate_avail; ++ ++ if (!enable) ++ return 0; ++ ++ if (data->sysclk == data->current_rate) ++ return 0; ++ ++ switch (data->sysclk) { ++ case 11289600: ++ pll_rate = 632217600; ++ break; ++ ++ case 12288000: ++ pll_rate = 688128000; ++ break; ++ ++ default: ++ return -EINVAL; ++ } ++ ++ rate_req = pll_rate; ++ rate_avail = clk_round_rate(data->pll, rate_req); ++ clk_set_rate(data->pll, rate_avail); ++ ++ rate_req = data->sysclk; ++ rate_avail = clk_round_rate(data->clock_root, ++ rate_req); ++ clk_set_rate(data->clock_root, rate_avail); ++ ++ pr_info("%s: \"imx-ssi.1\" rate = %ld (= %ld)\n", ++ __func__, rate_avail, rate_req); ++ ++ data->current_rate = data->sysclk; ++ ++ return 0; ++} ++ ++static int imx_hifi_startup_slv_mode(struct snd_pcm_substream *substream) ++{ ++ /* ++ * As SSI's sys clock rate depends on sampling rate, ++ * the clock enabling code is moved to imx_hifi_hw_params(). ++ */ ++ return 0; ++} ++ ++static int wm8731_mst_mode_init(struct imx_wm8731_data *data) ++{ ++ long rate; ++ struct clk *new_parent; ++ struct clk *ssi_clk; ++ struct i2c_client *codec_dev = data->codec_dev; ++ ++ new_parent = devm_clk_get(&codec_dev->dev, "cko2"); ++ if (IS_ERR(new_parent)) { ++ pr_err("Could not get \"cko2\" clock \n"); ++ return PTR_ERR(new_parent); ++ } ++ ++ ssi_clk = devm_clk_get(&codec_dev->dev, "cko"); ++ if (IS_ERR(ssi_clk)) { ++ pr_err("Could not get \"cko\" clock \n"); ++ return PTR_ERR(ssi_clk); ++ } ++ ++ rate = clk_round_rate(new_parent, WM8731_MCLK_FREQ); ++ clk_set_rate(new_parent, rate); ++ ++ clk_set_parent(ssi_clk, new_parent); ++ ++ rate = clk_round_rate(ssi_clk, WM8731_MCLK_FREQ); ++ clk_set_rate(ssi_clk, rate); ++ ++ pr_info("%s: \"CLKO\" rate = %ld (= %d)\n", ++ __func__, rate, WM8731_MCLK_FREQ); ++ ++ data->pll = new_parent; ++ data->clock_root = ssi_clk; ++ data->sysclk = rate; ++ ++ return 0; ++} ++ ++static int wm8731_mst_mode_clock_enable(int enable, struct imx_wm8731_data *data) ++{ ++ struct clk *clko = data->clock_root; ++ ++ if (enable) ++ clk_enable(clko); ++ else ++ clk_disable(clko); ++ ++ return 0; ++} ++ ++static int imx_hifi_startup_mst_mode(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_card *card = codec_dai->codec->card; ++ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); ++ ++ if (!codec_dai->active) ++ data->clock_enable(1,data); ++ ++ return 0; ++} ++ ++ ++static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_card *card = codec_dai->codec->card; ++ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); ++ ++ u32 dai_format; ++ snd_pcm_format_t sample_format; ++ unsigned int channels; ++ unsigned int tx_mask, rx_mask; ++ unsigned int sampling_rate; ++ unsigned int div_2, div_psr, div_pm; ++ int ret; ++ ++ sampling_rate = params_rate(params); ++ sample_format = params_format(params); ++ ++ channels = params_channels(params); ++ printk("%s:%s sampling rate = %u channels = %u \n", __FUNCTION__, ++ (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? "Playback" : "Capture"), ++ sampling_rate, channels); ++ ++ /* set CPU DAI configuration */ ++ switch (sampling_rate) { ++ case 8000: ++ case 32000: ++ case 48000: ++ case 96000: ++ data->sysclk = 12288000; ++ break; ++ ++ case 44100: ++ case 88200: ++ data->sysclk = 11289600; ++ break; ++ ++ default: ++ return -EINVAL; ++ } ++ ++ wm8731_slv_mode_clock_enable(1,data); ++ ++ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | ++ SND_SOC_DAIFMT_CBS_CFS; ++ ++ ret = snd_soc_dai_set_fmt(cpu_dai, dai_format); ++ if (ret < 0) ++ return ret; ++ ++ /* set i.MX active slot mask */ ++ /* S[TR]CCR:DC */ ++ tx_mask = ~((1 << channels) - 1); ++ rx_mask = tx_mask; ++ snd_soc_dai_set_tdm_slot(cpu_dai, tx_mask, rx_mask, 2, 32); ++ ++ /* ++ * SSI sysclk divider: ++ * div_2: /1 or /2 ++ * div_psr: /1 or /8 ++ * div_pm: /1 .. /256 ++ */ ++ div_2 = 0; ++ div_psr = 0; ++ switch (sampling_rate) { ++ case 8000: ++ // 1x1x12 ++ div_pm = 11; ++ break; ++ case 32000: ++ // 1x1x3 ++ div_pm = 2; ++ break; ++ case 48000: ++ // 1x1x2 ++ div_pm = 1; ++ break; ++ case 96000: ++ // 1x1x1 ++ div_pm = 0; ++ break; ++ case 44100: ++ // 1x1x2 ++ div_pm = 1; ++ break; ++ case 88200: ++ // 1x1x1 ++ div_pm = 0; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ /* sync mode: a single clock controls both playback and capture */ ++ snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_2, (div_2 ? SSI_STCCR_DIV2 : 0)); ++ snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PSR, (div_psr ? SSI_STCCR_PSR : 0)); ++ snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PM, div_pm); ++ ++ /* set codec DAI configuration */ ++ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBS_CFS; ++ ++ ret = snd_soc_dai_set_fmt(codec_dai, dai_format); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, ++ WM8731_SYSCLK_MCLK, ++ data->sysclk, ++ SND_SOC_CLOCK_IN); ++ ++ if (ret < 0) { ++ pr_err("Failed to set codec master clock to %lu: %d \n", ++ data->sysclk, ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int imx_hifi_hw_params_mst_mode(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_card *card = codec_dai->codec->card; ++ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); ++ u32 dai_format; ++ unsigned int channels; ++ unsigned int tx_mask, rx_mask; ++ unsigned int sampling_rate; ++ int ret; ++ ++ ++ sampling_rate = params_rate(params); ++ channels = params_channels(params); ++ pr_debug("%s:%s sampling rate = %u channels = %u \n", __FUNCTION__, ++ (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? "Playback" : "Capture"), ++ sampling_rate, channels); ++ ++ /* set cpu DAI configuration */ ++ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | ++ SND_SOC_DAIFMT_CBM_CFM; ++ ++ ret = snd_soc_dai_set_fmt(cpu_dai, dai_format); ++ if (ret < 0) ++ return ret; ++ ++ /* set i.MX active slot mask */ ++ /* S[TR]CCR:DC */ ++ tx_mask = ~((1 << channels) - 1); ++ rx_mask = tx_mask; ++ snd_soc_dai_set_tdm_slot(cpu_dai, tx_mask, rx_mask, 2, 32); ++ ++ /* set codec DAI configuration */ ++ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM; ++ ++ ret = snd_soc_dai_set_fmt(codec_dai, dai_format); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, ++ WM8731_SYSCLK_MCLK, ++ data->sysclk, ++ SND_SOC_CLOCK_IN); ++ ++ if (ret < 0) { ++ pr_err("Failed to set codec master clock to %lu: %d \n", ++ data->sysclk, ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static void imx_hifi_shutdown(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_card *card = codec_dai->codec->card; ++ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); ++ ++ if (!codec_dai->active) ++ data->clock_enable(0,data); ++ ++ return; ++} ++ ++static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ int ret = 0; ++ struct snd_soc_codec *codec = rtd->codec; ++ ++ /* Add imx specific widgets */ ++ ret = snd_soc_dapm_new_controls(&codec->dapm, imx_dapm_widgets, ++ ARRAY_SIZE(imx_dapm_widgets)); ++ if (ret) ++ goto out_retcode; ++ ++ /* Set up imx specific audio path audio_map */ ++ ret = snd_soc_dapm_add_routes(&codec->dapm, audio_map, ARRAY_SIZE(audio_map)); ++ if (ret) ++ goto out_retcode; ++ ++ ret = snd_soc_dapm_enable_pin(&codec->dapm, "Headphone Jack"); ++ if (ret) ++ goto out_retcode; ++ ++ ret = snd_soc_dapm_nc_pin(&codec->dapm, "Ext Spk"); ++ if (ret) ++ goto out_retcode; ++ ++out_retcode: ++ ++ if (ret) ++ pr_err("%s: failed with error code: %d \n", __FUNCTION__, ret); ++ else ++ pr_info("%s: success \n", __FUNCTION__); ++ ++ return ret; ++} ++ ++/** ++ * Configure AUDMUX interconnection between ++ * _slave (CPU side) and _master (codec size) ++ * ++ * When SSI operates in master mode, 5-wire interconnect with ++ * audio codec is required: ++ * TXC - BCLK ++ * TXD - DAC data ++ * RXD - ADC data ++ * TXFS - {DAC|ADC}LRC, i.e. word clock ++ * RXC - MCLK, i.e. oversampling clock ++ * Audmux is operated in asynchronous mode to enable 6-wire ++ * interface (as opposed to 4-wire interface in sync mode). ++ */ ++static int imx_audmux_config_slv_mode(int _slave, int _master) ++{ ++ unsigned int ptcr, pdcr; ++ int slave = _slave - 1; ++ int master = _master - 1; ++ ++ ptcr = IMX_AUDMUX_V2_PTCR_SYN | ++ IMX_AUDMUX_V2_PTCR_TFSDIR | ++ IMX_AUDMUX_V2_PTCR_TFSEL(slave) | ++ IMX_AUDMUX_V2_PTCR_RCLKDIR | ++ IMX_AUDMUX_V2_PTCR_RCSEL(slave | 0x8) | ++ IMX_AUDMUX_V2_PTCR_TCLKDIR | ++ IMX_AUDMUX_V2_PTCR_TCSEL(slave); ++ ++ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(slave); ++ imx_audmux_v2_configure_port(master, ptcr, pdcr); ++ ptcr = ptcr & ~IMX_AUDMUX_V2_PTCR_SYN; ++ imx_audmux_v2_configure_port(master, ptcr, pdcr); ++ ++ ptcr = IMX_AUDMUX_V2_PTCR_SYN | ++ IMX_AUDMUX_V2_PTCR_RCLKDIR | ++ IMX_AUDMUX_V2_PTCR_RCSEL(master | 0x8) | ++ IMX_AUDMUX_V2_PTCR_TCLKDIR | ++ IMX_AUDMUX_V2_PTCR_TCSEL(master); ++ ++ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(master); ++ imx_audmux_v2_configure_port(slave, ptcr, pdcr); ++ ptcr = ptcr & ~IMX_AUDMUX_V2_PTCR_SYN; ++ imx_audmux_v2_configure_port(slave, ptcr, pdcr); ++ ++ return 0; ++} ++ ++static int imx_audmux_config_mst_mode(int _slave, int _master) ++{ ++ unsigned int ptcr, pdcr; ++ int slave = _slave - 1; ++ int master = _master - 1; ++ ++ ptcr = IMX_AUDMUX_V2_PTCR_SYN; ++ ptcr |= IMX_AUDMUX_V2_PTCR_TFSDIR | ++ IMX_AUDMUX_V2_PTCR_TFSEL(master) | ++ IMX_AUDMUX_V2_PTCR_TCLKDIR | ++ IMX_AUDMUX_V2_PTCR_TCSEL(master); ++ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(master); ++ imx_audmux_v2_configure_port(slave, ptcr, pdcr); ++ ++ ptcr = IMX_AUDMUX_V2_PTCR_SYN; ++ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(slave); ++ imx_audmux_v2_configure_port(master, ptcr, pdcr); ++ ++ return 0; ++} ++ ++static int imx_wm8731_probe(struct platform_device *pdev) ++{ ++ struct device_node *ssi_np, *codec_np; ++ struct platform_device *ssi_pdev; ++ struct imx_priv *priv = &card_priv; ++ struct i2c_client *codec_dev; ++ struct imx_wm8731_data *data; ++ unsigned int src_port, ext_port; ++ unsigned int ssi_mode; ++ const char *ssi_mode_str; ++ ++ int ret; ++ ++ priv->pdev = pdev; ++ ++ ssi_np = of_parse_phandle(pdev->dev.of_node, "ssi-controller", 0); ++ codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0); ++ if (!ssi_np || !codec_np) { ++ dev_err(&pdev->dev, "phandle missing or invalid\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ ssi_pdev = of_find_device_by_node(ssi_np); ++ if (!ssi_pdev) { ++ dev_err(&pdev->dev, "failed to find SSI platform device\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ codec_dev = of_find_i2c_device_by_node(codec_np); ++ if (!codec_dev) { ++ dev_err(&pdev->dev, "failed to find codec platform device\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); ++ if (!data) { ++ ret = -ENOMEM; ++ goto fail; ++ } ++ ++ card_priv.data = data; ++ ++ data->codec_dev = codec_dev; ++ ++ data->dai.name = "HiFi"; ++ data->dai.stream_name = "HiFi"; ++ data->dai.codec_dai_name = "wm8731-hifi"; ++ data->dai.codec_of_node = codec_np; ++ data->dai.cpu_dai_name = dev_name(&ssi_pdev->dev); ++ data->dai.platform_of_node = ssi_np; ++ data->dai.ops = &imx_hifi_ops; ++ data->dai.init = &imx_wm8731_init; ++ ++ ret = of_property_read_u32(pdev->dev.of_node, "src-port", &src_port); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to get \"src-port\" value\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ ret = of_property_read_u32(pdev->dev.of_node, "ext-port", &ext_port); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to get \"ext-port\" value\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ ret = of_property_read_string(ssi_np, "fsl,mode", &ssi_mode_str); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to get \"fsl,mode\" value\n"); ++ ret = -EINVAL; ++ goto fail; ++ } ++ ++ ssi_mode = strcmp(ssi_mode_str, "i2s-master"); ++ ++ if (ssi_mode) { ++ /* Master Mode */ ++ imx_audmux_config_mst_mode(src_port, ext_port); ++ wm8731_mst_mode_init(data); ++ data->clock_enable = wm8731_mst_mode_clock_enable; ++ imx_hifi_ops.hw_params = imx_hifi_hw_params_mst_mode; ++ imx_hifi_ops.startup = imx_hifi_startup_mst_mode; ++ } else { ++ /* Slave Mode */ ++ imx_audmux_config_slv_mode(src_port, ext_port); ++ wm8731_slv_mode_init(data); ++ data->clock_enable = wm8731_slv_mode_clock_enable; ++ imx_hifi_ops.hw_params = imx_hifi_hw_params_slv_mode; ++ imx_hifi_ops.startup = imx_hifi_startup_slv_mode; ++ } ++ ++ data->card.dev = &pdev->dev; ++ ret = snd_soc_of_parse_card_name(&data->card, "model"); ++ if (ret) ++ goto fail; ++ ++ ret = snd_soc_of_parse_audio_routing(&data->card, "audio-routing"); ++ if (ret) ++ goto fail; ++ ++ data->card.num_links = 1; ++ data->card.dai_link = &data->dai; ++ ++ data->card.dapm_widgets = imx_dapm_widgets; ++ data->card.num_dapm_widgets = ARRAY_SIZE(imx_dapm_widgets); ++ ++ platform_set_drvdata(pdev, &data->card); ++ snd_soc_card_set_drvdata(&data->card, data); ++ ++ ret = snd_soc_register_card(&data->card); ++ if (ret) { ++ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); ++ goto fail; ++ } ++ ++ return 0; ++ ++fail: ++ ++ if (ssi_np) ++ of_node_put(ssi_np); ++ ++ if (codec_np) ++ of_node_put(codec_np); ++ ++ return ret; ++} ++ ++static int imx_wm8731_remove(struct platform_device *pdev) ++{ ++ struct snd_soc_card *card = platform_get_drvdata(pdev); ++ snd_soc_unregister_card(card); ++ ++ return 0; ++} ++ ++static const struct of_device_id imx_wm8731_dt_ids[] = { ++ { .compatible = "fsl,imx-audio-wm8731", }, ++ { /* sentinel */ } ++}; ++MODULE_DEVICE_TABLE(of, imx_wm8731_dt_ids); ++ ++static struct platform_driver imx_wm8731_driver = { ++ .driver = { ++ .name = "imx-wm8731", ++ .owner = THIS_MODULE, ++ .of_match_table = imx_wm8731_dt_ids, ++ }, ++ .probe = imx_wm8731_probe, ++ .remove = imx_wm8731_remove, ++}; ++module_platform_driver(imx_wm8731_driver); ++ ++MODULE_AUTHOR("Freescale Semiconductor, Inc."); ++MODULE_DESCRIPTION("Freescale i.MX WM8731 ASoC machine driver"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:imx-wm8731"); +diff -Nur linux-4.1.10/sound/soc/fsl/Kconfig xbian-sources-kernel/sound/soc/fsl/Kconfig +--- linux-4.1.10/sound/soc/fsl/Kconfig 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/Kconfig 2015-10-11 19:49:32.402974794 +0200 @@ -55,6 +55,9 @@ This option is only useful for out-of-tree drivers since in-tree drivers select it automatically. @@ -293462,7 +314521,25 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/Kconfig linux-4.1.10/sound/soc/fsl/Kco config SND_SOC_IMX_AUDMUX tristate "Digital Audio Mux module support" help -@@ -235,7 +243,9 @@ +@@ -229,13 +237,27 @@ + Enable I2S based access to the TLV320AIC23B codec attached + to the SSI interface + ++config SND_SOC_IMX_WM8731 ++ tristate "SoC Audio support for i.MX boards with wm8731" ++ depends on OF && I2C ++ select SND_SOC_WM8731 ++ select SND_SOC_IMX_PCM_DMA ++ select SND_SOC_IMX_AUDMUX ++ select SND_SOC_FSL_SSI ++ select SND_SOC_FSL_UTILS ++ help ++ Say Y if you want to add support for SoC audio on an i.MX board with ++ a wm8731 codec. ++ + config SND_SOC_IMX_WM8962 + tristate "SoC Audio support for i.MX boards with wm8962" + depends on OF && I2C && INPUT select SND_SOC_WM8962 select SND_SOC_IMX_PCM_DMA select SND_SOC_IMX_AUDMUX @@ -293472,7 +314549,7 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/Kconfig linux-4.1.10/sound/soc/fsl/Kco help Say Y if you want to add support for SoC audio on an i.MX board with a wm8962 codec. -@@ -258,7 +268,9 @@ +@@ -258,7 +280,9 @@ select SND_SOC_SGTL5000 select SND_SOC_IMX_PCM_DMA select SND_SOC_IMX_AUDMUX @@ -293482,7 +314559,7 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/Kconfig linux-4.1.10/sound/soc/fsl/Kco help Say Y if you want to add support for SoC audio on an i.MX board with a sgtl5000 codec. -@@ -280,6 +292,17 @@ +@@ -280,6 +304,17 @@ select SND_SOC_MC13783 select SND_SOC_IMX_PCM_DMA @@ -293500,15 +314577,33 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/Kconfig linux-4.1.10/sound/soc/fsl/Kco config SND_SOC_FSL_ASOC_CARD tristate "Generic ASoC Sound Card with ASRC support" depends on OF && I2C -diff -Nur linux-4.1.10.orig/sound/soc/fsl/Makefile linux-4.1.10/sound/soc/fsl/Makefile ---- linux-4.1.10.orig/sound/soc/fsl/Makefile 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/fsl/Makefile 2015-10-10 16:41:42.989314854 +0200 -@@ -15,7 +15,8 @@ - snd-soc-fsl-asrc-objs := fsl_asrc.o fsl_asrc_dma.o +@@ -294,6 +329,19 @@ + and SGTL5000. + Say Y if you want to add support for Freescale Generic ASoC Sound Card. + ++config SND_SOC_IMX_TDA1997X ++ tristate "SoC Audio support for i.MX boards with tda1997x" ++ depends on OF && I2C ++ select SND_SOC_TDA1997X ++ select SND_SOC_IMX_PCM_DMA ++ select SND_SOC_IMX_AUDMUX ++ select SND_SOC_FSL_SSI ++ select SND_SOC_FSL_UTILS ++ help ++ SoC Audio support for i.MX boards with TDA1997x ++ Say Y if you want to add support for SoC audio on an i.MX board with ++ a tda1997x codec. ++ + endif # SND_IMX_SOC + + endmenu +diff -Nur linux-4.1.10/sound/soc/fsl/Makefile xbian-sources-kernel/sound/soc/fsl/Makefile +--- linux-4.1.10/sound/soc/fsl/Makefile 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/fsl/Makefile 2015-10-11 19:49:32.402974794 +0200 +@@ -16,6 +16,7 @@ snd-soc-fsl-sai-objs := fsl_sai.o snd-soc-fsl-ssi-y := fsl_ssi.o --snd-soc-fsl-ssi-$(CONFIG_DEBUG_FS) += fsl_ssi_dbg.o -+##snd-soc-fsl-ssi-$(CONFIG_DEBUG_FS) += fsl_ssi_dbg.o + snd-soc-fsl-ssi-$(CONFIG_DEBUG_FS) += fsl_ssi_dbg.o +snd-soc-fsl-hdmi-objs := fsl_hdmi.o snd-soc-fsl-spdif-objs := fsl_spdif.o snd-soc-fsl-esai-objs := fsl_esai.o @@ -293530,7 +314625,12 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/Makefile linux-4.1.10/sound/soc/fsl/Ma # i.MX Machine Support snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o snd-soc-phycore-ac97-objs := phycore-ac97.o -@@ -57,6 +59,7 @@ +@@ -54,9 +56,12 @@ + snd-soc-wm1133-ev1-objs := wm1133-ev1.o + snd-soc-imx-es8328-objs := imx-es8328.o + snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o ++snd-soc-imx-tda1997x-objs := imx-tda1997x.o ++snd-soc-imx-wm8731-objs := imx-wm8731.o snd-soc-imx-wm8962-objs := imx-wm8962.o snd-soc-imx-spdif-objs := imx-spdif.o snd-soc-imx-mc13783-objs := imx-mc13783.o @@ -293538,16 +314638,21 @@ diff -Nur linux-4.1.10.orig/sound/soc/fsl/Makefile linux-4.1.10/sound/soc/fsl/Ma obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o obj-$(CONFIG_SND_SOC_PHYCORE_AC97) += snd-soc-phycore-ac97.o -@@ -67,3 +70,6 @@ +@@ -64,6 +69,11 @@ + obj-$(CONFIG_SND_MXC_SOC_WM1133_EV1) += snd-soc-wm1133-ev1.o + obj-$(CONFIG_SND_SOC_IMX_ES8328) += snd-soc-imx-es8328.o + obj-$(CONFIG_SND_SOC_IMX_SGTL5000) += snd-soc-imx-sgtl5000.o ++obj-$(CONFIG_SND_SOC_IMX_TDA1997X) += snd-soc-imx-tda1997x.o obj-$(CONFIG_SND_SOC_IMX_WM8962) += snd-soc-imx-wm8962.o ++obj-$(CONFIG_SND_SOC_IMX_WM8731) += snd-soc-imx-wm8731.o obj-$(CONFIG_SND_SOC_IMX_SPDIF) += snd-soc-imx-spdif.o obj-$(CONFIG_SND_SOC_IMX_MC13783) += snd-soc-imx-mc13783.o +obj-$(CONFIG_SND_SOC_IMX_HDMI) += snd-soc-imx-hdmi.o + +AFLAGS_hdmi_pcm.o := -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp -diff -Nur linux-4.1.10.orig/sound/soc/soc-io.c linux-4.1.10/sound/soc/soc-io.c ---- linux-4.1.10.orig/sound/soc/soc-io.c 2015-10-03 13:49:38.000000000 +0200 -+++ linux-4.1.10/sound/soc/soc-io.c 2015-10-10 16:41:42.989314854 +0200 +diff -Nur linux-4.1.10/sound/soc/soc-io.c xbian-sources-kernel/sound/soc/soc-io.c +--- linux-4.1.10/sound/soc/soc-io.c 2015-10-03 13:49:38.000000000 +0200 ++++ xbian-sources-kernel/sound/soc/soc-io.c 2015-10-11 19:49:32.426973204 +0200 @@ -17,6 +17,8 @@ #include <linux/export.h> #include <sound/soc.h> |