From 8d2818603e51c29e2cc2f95706270d9967e6a7ed Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 12 Oct 2015 08:08:13 +0200 Subject: update to latest xbian kernel patch --- .../solidrun-imx6/patches/4.1.10/0001-xbian.patch | 40835 ++++++++++++++----- 1 file changed, 30970 insertions(+), 9865 deletions(-) (limited to 'target/arm/solidrun-imx6/patches') 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 ++ * ++ * 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 ++* ++* 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 ++* ++* 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 + * +@@ -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 ++ * ++ * 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 ++ * ++ * 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 @@ -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 @@ -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 = ; }; -@@ -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,323 +3304,1305 @@ 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 -@@ -14,6 +14,7 @@ - - / { - aliases { -+ ipu1 = &ipu2; - spi4 = &ecspi5; - }; - -@@ -32,7 +33,7 @@ - 996000 1250000 - 852000 1250000 - 792000 1175000 -- 396000 975000 -+ 396000 1175000 - >; - fsl,soc-operating-points = < - /* ARM kHz SOC-PU uV */ -@@ -47,9 +48,12 @@ - <&clks IMX6QDL_CLK_PLL2_PFD2_396M>, - <&clks IMX6QDL_CLK_STEP>, - <&clks IMX6QDL_CLK_PLL1_SW>, -- <&clks IMX6QDL_CLK_PLL1_SYS>; -+ <&clks IMX6QDL_CLK_PLL1_SYS>, -+ <&clks IMX6QDL_PLL1_BYPASS>, -+ <&clks IMX6QDL_CLK_PLL1>, -+ <&clks IMX6QDL_PLL1_BYPASS_SRC> ; - clock-names = "arm", "pll2_pfd2_396m", "step", -- "pll1_sw", "pll1_sys"; -+ "pll1_sw", "pll1_sys", "pll1_bypass", "pll1", "pll1_bypass_src"; - arm-supply = <®_arm>; - pu-supply = <®_pu>; - soc-supply = <®_soc>; -@@ -78,9 +82,58 @@ - }; - - soc { -- ocram: sram@00900000 { +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 ++ * ++ * 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 ++ */ + -+ busfreq { /* BUSFREQ */ -+ compatible = "fsl,imx6_busfreq"; -+ clocks = <&clks 171>, <&clks 6>, <&clks 11>, <&clks 104>, <&clks 172>, <&clks 58>, -+ <&clks 18>, <&clks 60>, <&clks 20>, <&clks 3>; -+ clock-names = "pll2_bus", "pll2_pfd2_396m", "pll2_198m", "arm", "pll3_usb_otg", "periph", -+ "periph_pre", "periph_clk2", "periph_clk2_sel", "osc"; -+ interrupts = <0 107 0x04>, <0 112 0x4>, <0 113 0x4>, <0 114 0x4>; -+ interrupt-names = "irq_busfreq_0", "irq_busfreq_1", "irq_busfreq_2", "irq_busfreq_3"; -+ fsl,max_ddr_freq = <528000000>; -+ }; ++/ { ++ backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm3 0 5000000>; ++ brightness-levels = <0 4 8 16 32 64 128 255>; ++ default-brightness-level = <7>; ++ }; + -+ gpu@00130000 { -+ compatible = "fsl,imx6q-gpu"; -+ reg = <0x00130000 0x4000>, <0x00134000 0x4000>, -+ <0x02204000 0x4000>, <0x0 0x0>; -+ reg-names = "iobase_3d", "iobase_2d", -+ "iobase_vg", "phys_baseaddr"; -+ interrupts = <0 9 0x04>, <0 10 0x04>,<0 11 0x04>; -+ interrupt-names = "irq_3d", "irq_2d", "irq_vg"; -+ clocks = <&clks 26>, <&clks 143>, -+ <&clks 27>, <&clks 121>, -+ <&clks 122>, <&clks 74>; -+ clock-names = "gpu2d_axi_clk", "openvg_axi_clk", -+ "gpu3d_axi_clk", "gpu2d_clk", -+ "gpu3d_clk", "gpu3d_shader_clk"; -+ resets = <&src 0>, <&src 3>, <&src 3>; -+ reset-names = "gpu3d", "gpu2d", "gpuvg"; -+ power-domains = <&gpc 1>; -+ }; ++ 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>; ++ }; + -+ hdmi_cec: hdmi_cec@00120000 { -+ compatible = "fsl,imx6q-hdmi-cec"; -+ interrupts = <0 115 0x04>; -+ status = "disabled"; + }; + -+ ocrams: sram@00900000 { -+ compatible = "fsl,lpm-sram"; -+ reg = <0x00900000 0x4000>; -+ clocks = <&clks IMX6QDL_CLK_OCRAM>; ++ i2c@1 { ++ reg = <1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ dvi: edid@50 { ++ compatible = "fsl,imx6-hdmi-i2c"; ++ reg = <0x50>; ++ }; + }; + -+ ocrams_ddr: sram@00904000 { -+ compatible = "fsl,ddr-lpm-sram"; -+ reg = <0x00904000 0x1000>; -+ clocks = <&clks IMX6QDL_CLK_OCRAM>; ++ }; ++}; ++ ++&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 ++ * ++ * 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; + }; ++ }; + -+ ocram: sram@00905000 { - compatible = "mmio-sram"; -- reg = <0x00900000 0x40000>; -+ reg = <0x00905000 0x3B000>; - clocks = <&clks IMX6QDL_CLK_OCRAM>; - }; - -@@ -101,6 +154,10 @@ - }; - }; - -+ vpu@02040000 { -+ status = "okay"; ++ 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>; + }; + - iomuxc: iomuxc@020e0000 { - compatible = "fsl,imx6q-iomuxc"; - -@@ -142,6 +199,18 @@ - }; - }; - -+ aips-bus@02100000 { /* AIPS2 */ -+ mipi_dsi: mipi@021e0000 { -+ compatible = "fsl,imx6q-mipi-dsi"; -+ reg = <0x021e0000 0x4000>; -+ interrupts = <0 102 0x04>; -+ gpr = <&gpr>; -+ clocks = <&clks IMX6QDL_CLK_HSI_TX>, <&clks IMX6QDL_CLK_VIDEO_27M>; -+ clock-names = "mipi_pllref_clk", "mipi_cfg_clk"; -+ status = "disabled"; ++ rtc@56 { ++ compatible = "emmicro,em3027"; ++ reg = <0x56>; + }; + }; + - sata: sata@02200000 { - compatible = "fsl,imx6q-ahci"; - reg = <0x02200000 0x4000>; -@@ -154,165 +223,33 @@ - }; - - ipu2: ipu@02800000 { -- #address-cells = <1>; -- #size-cells = <0>; - compatible = "fsl,imx6q-ipu"; - reg = <0x02800000 0x400000>; - interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>, - <0 7 IRQ_TYPE_LEVEL_HIGH>; -- clocks = <&clks IMX6QDL_CLK_IPU2>, -- <&clks IMX6QDL_CLK_IPU2_DI0>, -- <&clks IMX6QDL_CLK_IPU2_DI1>; -- clock-names = "bus", "di0", "di1"; -+ clocks = <&clks 133>, <&clks 134>, <&clks 137>, -+ <&clks 41>, <&clks 42>, -+ <&clks 135>, <&clks 136>; -+ clock-names = "bus", "di0", "di1", -+ "di0_sel", "di1_sel", -+ "ldb_di0", "ldb_di1"; - resets = <&src 4>; -- -- ipu2_csi0: port@0 { -- reg = <0>; -- }; -- -- ipu2_csi1: port@1 { -- reg = <1>; -- }; -- -- ipu2_di0: port@2 { -- #address-cells = <1>; -- #size-cells = <0>; -- reg = <2>; -- -- ipu2_di0_disp0: endpoint@0 { -- }; -- -- ipu2_di0_hdmi: endpoint@1 { -- remote-endpoint = <&hdmi_mux_2>; -- }; -- -- ipu2_di0_mipi: endpoint@2 { -- }; -- -- ipu2_di0_lvds0: endpoint@3 { -- remote-endpoint = <&lvds0_mux_2>; -- }; -- -- ipu2_di0_lvds1: endpoint@4 { -- remote-endpoint = <&lvds1_mux_2>; -- }; -- }; -- -- ipu2_di1: port@3 { -- #address-cells = <1>; -- #size-cells = <0>; -- reg = <3>; -- -- ipu2_di1_hdmi: endpoint@1 { -- remote-endpoint = <&hdmi_mux_3>; -- }; -- -- ipu2_di1_mipi: endpoint@2 { -- }; -- -- ipu2_di1_lvds0: endpoint@3 { -- remote-endpoint = <&lvds0_mux_3>; -- }; -- -- ipu2_di1_lvds1: endpoint@4 { -- remote-endpoint = <&lvds1_mux_3>; -- }; -- }; -- }; -- }; -- -- display-subsystem { -- compatible = "fsl,imx-display-subsystem"; -- ports = <&ipu1_di0>, <&ipu1_di1>, <&ipu2_di0>, <&ipu2_di1>; -- }; --}; -- --&hdmi { -- compatible = "fsl,imx6q-hdmi"; -- -- port@2 { -- reg = <2>; -- -- hdmi_mux_2: endpoint { -- remote-endpoint = <&ipu2_di0_hdmi>; -- }; -- }; -- -- port@3 { -- reg = <3>; -- -- hdmi_mux_3: endpoint { -- remote-endpoint = <&ipu2_di1_hdmi>; -+ bypass_reset = <0>; - }; - }; - }; - - &ldb { -- clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>, -+ clocks = <&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>, - <&clks IMX6QDL_CLK_IPU1_DI0_SEL>, <&clks IMX6QDL_CLK_IPU1_DI1_SEL>, - <&clks IMX6QDL_CLK_IPU2_DI0_SEL>, <&clks IMX6QDL_CLK_IPU2_DI1_SEL>, -- <&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>; -- clock-names = "di0_pll", "di1_pll", -- "di0_sel", "di1_sel", "di2_sel", "di3_sel", -- "di0", "di1"; -- -- lvds-channel@0 { -- port@2 { -- reg = <2>; -- -- lvds0_mux_2: endpoint { -- remote-endpoint = <&ipu2_di0_lvds0>; -- }; -- }; -- -- port@3 { -- reg = <3>; -- -- lvds0_mux_3: endpoint { -- remote-endpoint = <&ipu2_di1_lvds0>; -- }; -- }; -- }; -- -- lvds-channel@1 { -- port@2 { -- reg = <2>; -- -- lvds1_mux_2: endpoint { -- remote-endpoint = <&ipu2_di0_lvds1>; -- }; -- }; -- -- port@3 { -- reg = <3>; -- -- lvds1_mux_3: endpoint { -- remote-endpoint = <&ipu2_di1_lvds1>; -- }; -- }; -- }; --}; -- --&mipi_dsi { -- ports { -- port@2 { -- reg = <2>; -- -- mipi_mux_2: endpoint { -- remote-endpoint = <&ipu2_di0_mipi>; -- }; -- }; -- -- port@3 { -- reg = <3>; -- -- mipi_mux_3: endpoint { -- remote-endpoint = <&ipu2_di1_mipi>; -- }; -- }; -- }; --}; -- --&vpu { -- compatible = "fsl,imx6q-vpu", "cnm,coda960"; -+ <&clks IMX6QDL_CLK_LDB_DI0_DIV_3_5>, <&clks IMX6QDL_CLK_LDB_DI1_DIV_3_5>, -+ <&clks IMX6QDL_CLK_LDB_DI0_DIV_7>, <&clks IMX6QDL_CLK_LDB_DI1_DIV_7>, -+ <&clks IMX6QDL_CLK_LDB_DI0_DIV_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_DIV_SEL>; -+ clock-names = "ldb_di0", "ldb_di1", -+ "di0_sel", "di1_sel", -+ "di2_sel", "di3_sel", -+ "ldb_di0_div_3_5", "ldb_di1_div_3_5", -+ "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 -@@ -0,0 +1,60 @@ ++ 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 @@ +/* -+ * Device Tree file for SolidRun HummingBoard2 -+ * Copyright (C) 2015 Rabeeh Khoury -+ * Based on work by Russell King ++ * Copyright 2014 CompuLab Ltd. ++ * ++ * Author: Valentin Raevsky ++ * ++ * 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 ++#include ++ ++/ { ++ 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 = ; ++ }; ++ }; ++ ++ 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 = ; ++ }; ++ ++ pinctrl_vero_spdif: vero-spdif { ++ fsl,pins = ; ++ }; ++ ++ pinctrl_vero_usbh1: vero-usbh1 { ++ fsl,pins = ; ++ }; ++ ++ pinctrl_vero_usbh1_vbus: vero-usbh1-vbus { ++ fsl,pins = ; ++ }; ++ ++ 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 = ; ++ }; ++ ++ 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 ++/ { ++ 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 @@ + + / { + aliases { ++ ipu1 = &ipu2; + spi4 = &ecspi5; + }; + +@@ -32,7 +33,7 @@ + 996000 1250000 + 852000 1250000 + 792000 1175000 +- 396000 975000 ++ 396000 1175000 + >; + fsl,soc-operating-points = < + /* ARM kHz SOC-PU uV */ +@@ -47,9 +48,12 @@ + <&clks IMX6QDL_CLK_PLL2_PFD2_396M>, + <&clks IMX6QDL_CLK_STEP>, + <&clks IMX6QDL_CLK_PLL1_SW>, +- <&clks IMX6QDL_CLK_PLL1_SYS>; ++ <&clks IMX6QDL_CLK_PLL1_SYS>, ++ <&clks IMX6QDL_PLL1_BYPASS>, ++ <&clks IMX6QDL_CLK_PLL1>, ++ <&clks IMX6QDL_PLL1_BYPASS_SRC> ; + clock-names = "arm", "pll2_pfd2_396m", "step", +- "pll1_sw", "pll1_sys"; ++ "pll1_sw", "pll1_sys", "pll1_bypass", "pll1", "pll1_bypass_src"; + arm-supply = <®_arm>; + pu-supply = <®_pu>; + soc-supply = <®_soc>; +@@ -78,9 +82,58 @@ + }; + + soc { +- ocram: sram@00900000 { ++ ++ busfreq { /* BUSFREQ */ ++ compatible = "fsl,imx6_busfreq"; ++ clocks = <&clks 171>, <&clks 6>, <&clks 11>, <&clks 104>, <&clks 172>, <&clks 58>, ++ <&clks 18>, <&clks 60>, <&clks 20>, <&clks 3>; ++ clock-names = "pll2_bus", "pll2_pfd2_396m", "pll2_198m", "arm", "pll3_usb_otg", "periph", ++ "periph_pre", "periph_clk2", "periph_clk2_sel", "osc"; ++ interrupts = <0 107 0x04>, <0 112 0x4>, <0 113 0x4>, <0 114 0x4>; ++ interrupt-names = "irq_busfreq_0", "irq_busfreq_1", "irq_busfreq_2", "irq_busfreq_3"; ++ fsl,max_ddr_freq = <528000000>; ++ }; ++ ++ gpu@00130000 { ++ compatible = "fsl,imx6q-gpu"; ++ reg = <0x00130000 0x4000>, <0x00134000 0x4000>, ++ <0x02204000 0x4000>, <0x0 0x0>; ++ reg-names = "iobase_3d", "iobase_2d", ++ "iobase_vg", "phys_baseaddr"; ++ interrupts = <0 9 0x04>, <0 10 0x04>,<0 11 0x04>; ++ interrupt-names = "irq_3d", "irq_2d", "irq_vg"; ++ clocks = <&clks 26>, <&clks 143>, ++ <&clks 27>, <&clks 121>, ++ <&clks 122>, <&clks 74>; ++ clock-names = "gpu2d_axi_clk", "openvg_axi_clk", ++ "gpu3d_axi_clk", "gpu2d_clk", ++ "gpu3d_clk", "gpu3d_shader_clk"; ++ resets = <&src 0>, <&src 3>, <&src 3>; ++ reset-names = "gpu3d", "gpu2d", "gpuvg"; ++ power-domains = <&gpc 1>; ++ }; ++ ++ hdmi_cec: hdmi_cec@00120000 { ++ compatible = "fsl,imx6q-hdmi-cec"; ++ interrupts = <0 115 0x04>; ++ status = "disabled"; ++ }; ++ ++ ocrams: sram@00900000 { ++ compatible = "fsl,lpm-sram"; ++ reg = <0x00900000 0x4000>; ++ clocks = <&clks IMX6QDL_CLK_OCRAM>; ++ }; ++ ++ ocrams_ddr: sram@00904000 { ++ compatible = "fsl,ddr-lpm-sram"; ++ reg = <0x00904000 0x1000>; ++ clocks = <&clks IMX6QDL_CLK_OCRAM>; ++ }; ++ ++ ocram: sram@00905000 { + compatible = "mmio-sram"; +- reg = <0x00900000 0x40000>; ++ reg = <0x00905000 0x3B000>; + clocks = <&clks IMX6QDL_CLK_OCRAM>; + }; + +@@ -101,6 +154,10 @@ + }; + }; + ++ vpu@02040000 { ++ status = "okay"; ++ }; ++ + iomuxc: iomuxc@020e0000 { + compatible = "fsl,imx6q-iomuxc"; + +@@ -142,6 +199,18 @@ + }; + }; + ++ aips-bus@02100000 { /* AIPS2 */ ++ mipi_dsi: mipi@021e0000 { ++ compatible = "fsl,imx6q-mipi-dsi"; ++ reg = <0x021e0000 0x4000>; ++ interrupts = <0 102 0x04>; ++ gpr = <&gpr>; ++ clocks = <&clks IMX6QDL_CLK_HSI_TX>, <&clks IMX6QDL_CLK_VIDEO_27M>; ++ clock-names = "mipi_pllref_clk", "mipi_cfg_clk"; ++ status = "disabled"; ++ }; ++ }; ++ + sata: sata@02200000 { + compatible = "fsl,imx6q-ahci"; + reg = <0x02200000 0x4000>; +@@ -154,165 +223,33 @@ + }; + + ipu2: ipu@02800000 { +- #address-cells = <1>; +- #size-cells = <0>; + compatible = "fsl,imx6q-ipu"; + reg = <0x02800000 0x400000>; + interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>, + <0 7 IRQ_TYPE_LEVEL_HIGH>; +- clocks = <&clks IMX6QDL_CLK_IPU2>, +- <&clks IMX6QDL_CLK_IPU2_DI0>, +- <&clks IMX6QDL_CLK_IPU2_DI1>; +- clock-names = "bus", "di0", "di1"; ++ clocks = <&clks 133>, <&clks 134>, <&clks 137>, ++ <&clks 41>, <&clks 42>, ++ <&clks 135>, <&clks 136>; ++ clock-names = "bus", "di0", "di1", ++ "di0_sel", "di1_sel", ++ "ldb_di0", "ldb_di1"; + resets = <&src 4>; +- +- ipu2_csi0: port@0 { +- reg = <0>; +- }; +- +- ipu2_csi1: port@1 { +- reg = <1>; +- }; +- +- ipu2_di0: port@2 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <2>; +- +- ipu2_di0_disp0: endpoint@0 { +- }; +- +- ipu2_di0_hdmi: endpoint@1 { +- remote-endpoint = <&hdmi_mux_2>; +- }; +- +- ipu2_di0_mipi: endpoint@2 { +- }; +- +- ipu2_di0_lvds0: endpoint@3 { +- remote-endpoint = <&lvds0_mux_2>; +- }; +- +- ipu2_di0_lvds1: endpoint@4 { +- remote-endpoint = <&lvds1_mux_2>; +- }; +- }; +- +- ipu2_di1: port@3 { +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <3>; +- +- ipu2_di1_hdmi: endpoint@1 { +- remote-endpoint = <&hdmi_mux_3>; +- }; +- +- ipu2_di1_mipi: endpoint@2 { +- }; +- +- ipu2_di1_lvds0: endpoint@3 { +- remote-endpoint = <&lvds0_mux_3>; +- }; +- +- ipu2_di1_lvds1: endpoint@4 { +- remote-endpoint = <&lvds1_mux_3>; +- }; +- }; +- }; +- }; +- +- display-subsystem { +- compatible = "fsl,imx-display-subsystem"; +- ports = <&ipu1_di0>, <&ipu1_di1>, <&ipu2_di0>, <&ipu2_di1>; +- }; +-}; +- +-&hdmi { +- compatible = "fsl,imx6q-hdmi"; +- +- port@2 { +- reg = <2>; +- +- hdmi_mux_2: endpoint { +- remote-endpoint = <&ipu2_di0_hdmi>; +- }; +- }; +- +- port@3 { +- reg = <3>; +- +- hdmi_mux_3: endpoint { +- remote-endpoint = <&ipu2_di1_hdmi>; ++ bypass_reset = <0>; + }; + }; + }; + + &ldb { +- clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>, ++ clocks = <&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>, + <&clks IMX6QDL_CLK_IPU1_DI0_SEL>, <&clks IMX6QDL_CLK_IPU1_DI1_SEL>, + <&clks IMX6QDL_CLK_IPU2_DI0_SEL>, <&clks IMX6QDL_CLK_IPU2_DI1_SEL>, +- <&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>; +- clock-names = "di0_pll", "di1_pll", +- "di0_sel", "di1_sel", "di2_sel", "di3_sel", +- "di0", "di1"; +- +- lvds-channel@0 { +- port@2 { +- reg = <2>; +- +- lvds0_mux_2: endpoint { +- remote-endpoint = <&ipu2_di0_lvds0>; +- }; +- }; +- +- port@3 { +- reg = <3>; +- +- lvds0_mux_3: endpoint { +- remote-endpoint = <&ipu2_di1_lvds0>; +- }; +- }; +- }; +- +- lvds-channel@1 { +- port@2 { +- reg = <2>; +- +- lvds1_mux_2: endpoint { +- remote-endpoint = <&ipu2_di0_lvds1>; +- }; +- }; +- +- port@3 { +- reg = <3>; +- +- lvds1_mux_3: endpoint { +- remote-endpoint = <&ipu2_di1_lvds1>; +- }; +- }; +- }; +-}; +- +-&mipi_dsi { +- ports { +- port@2 { +- reg = <2>; +- +- mipi_mux_2: endpoint { +- remote-endpoint = <&ipu2_di0_mipi>; +- }; +- }; +- +- port@3 { +- reg = <3>; +- +- mipi_mux_3: endpoint { +- remote-endpoint = <&ipu2_di1_mipi>; +- }; +- }; +- }; +-}; +- +-&vpu { +- compatible = "fsl,imx6q-vpu", "cnm,coda960"; ++ <&clks IMX6QDL_CLK_LDB_DI0_DIV_3_5>, <&clks IMX6QDL_CLK_LDB_DI1_DIV_3_5>, ++ <&clks IMX6QDL_CLK_LDB_DI0_DIV_7>, <&clks IMX6QDL_CLK_LDB_DI1_DIV_7>, ++ <&clks IMX6QDL_CLK_LDB_DI0_DIV_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_DIV_SEL>; ++ clock-names = "ldb_di0", "ldb_di1", ++ "di0_sel", "di1_sel", ++ "di2_sel", "di3_sel", ++ "ldb_di0_div_3_5", "ldb_di1_div_3_5", ++ "ldb_di0_div_7", "ldb_di1_div_7", ++ "ldb_di0_div_sel", "ldb_di1_div_sel"; + }; +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 ++ * Copyright (C) 2015 Rabeeh Khoury ++ * Based on work by Russell King + * + * 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 @@ -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 ++* ++* 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 ++* ++* 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,23 +4891,46 @@ 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 -@@ -0,0 +1,367 @@ -+# CONFIG_LOCALVERSION_AUTO is not set + 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_FHANDLE=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_CLEANCACHE=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y @@ -2831,42 +4941,37 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_base_defconfig linux- +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 is not set -+# CONFIG_SOC_IMX6SX is not set ++CONFIG_SOC_IMX6SL=y ++CONFIG_SOC_IMX6SX=y ++CONFIG_SOC_VF610=y +# CONFIG_SWP_EMULATE is not set +CONFIG_PCI=y -+CONFIG_PCIE_DW=y +CONFIG_PCI_IMX6=y +CONFIG_SMP=y -+CONFIG_VMSPLIT_3G=y -+CONFIG_PREEMPT_VOLUNTARY=y ++CONFIG_VMSPLIT_2G=y ++CONFIG_PREEMPT=y +CONFIG_AEABI=y -+# CONFIG_OABI_COMPAT is not set +CONFIG_HIGHMEM=y -+CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" ++CONFIG_CMA=y ++CONFIG_CMDLINE="console=ttymxc3,115200 root=/dev/mmcblk0p1 rootwait" +CONFIG_CPU_FREQ=y -+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -+CONFIG_CPU_FREQ_GOV_PERFORMANCE=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_IMX6_CPUFREQ=y ++CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y -+CONFIG_VFPv3=y +CONFIG_NEON=y -+CONFIG_KERNEL_MODE_NEON=y +CONFIG_BINFMT_MISC=m -+CONFIG_PM=y -+CONFIG_SUSPEND=y -+# CONFIG_PM_DEBUG is not set -+# CONFIG_PM_TEST_SUSPEND is not set -+CONFIG_IOSCHED_BFQ=y -+CONFIG_CGROUP_BFQIO=y -+CONFIG_DEFAULT_BFQ=y -+CONFIG_DEFAULT_IOSCHED="bfq" ++CONFIG_PM_RUNTIME=y ++CONFIG_PM_DEBUG=y ++CONFIG_PM_TEST_SUSPEND=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y @@ -2879,58 +4984,112 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_base_defconfig linux- +# CONFIG_INET_LRO is not set +CONFIG_IPV6=y +CONFIG_NETFILTER=y -+CONFIG_VLAN_8021Q=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_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_ETHERNET=y -+# CONFIG_NET_VENDOR_BROADCOM is not set -+# CONFIG_NET_VENDOR_CIRRUS is not set -+# CONFIG_NET_VENDOR_FARADAY -+# CONFIG_NET_VENDOR_INTEL -+# CONFIG_NET_VENDOR_I825XX -+# CONFIG_NET_VENDOR_MARVELL -+# CONFIG_NET_VENDOR_MICROCHIP -+# CONFIG_NET_VENDOR_MICROCHIP=y -+# CONFIG_ENC28J60 is not set -+# CONFIG_NET_VENDOR_NATSEMI=y -+# CONFIG_NET_VENDOR_8390=y -+# CONFIG_AX88796 is not set -+# CONFIG_ETHOC is not set -+# CONFIG_SH_ETH is not set -+# CONFIG_NET_VENDOR_SEEQ=y -+# CONFIG_NET_VENDOR_SMSC=y -+# CONFIG_SMC91X is not set -+# CONFIG_SMC911X is not set -+# CONFIG_SMSC911X is not set -+# CONFIG_NET_VENDOR_STMICRO=y -+# CONFIG_STMMAC_ETH is not set -+# CONFIG_NET_VENDOR_VIA=y -+# CONFIG_VIA_VELOCITY is not set -+# CONFIG_NET_VENDOR_WIZNET=y -+CONFIG_NET_VENDOR_FREESCALE=y -+CONFIG_FEC=y -+CONFIG_PHYLIB=y -+CONFIG_AT803X_PHY=y -+CONFIG_WLAN=y -+CONFIG_BRCMUTIL=m -+CONFIG_BRCMFMAC=m -+CONFIG_BRCMFMAC_SDIO=y ++CONFIG_CFG80211_WEXT=y ++CONFIG_MAC80211=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set -+CONFIG_DMA_CMA=y -+CONFIG_CMA=y -+CONFIG_CMA_SIZE_MBYTES=256 ++CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y -+# CONFIG_MTD is not set ++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 @@ -2939,25 +5098,423 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_cbi_hb_base_defconfig linux- +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_INPUT_EVDEV=y -+# CONFIG_INPUT_EVBUG is not set -+CONFIG_KEYBOARD_GPIO=y -+CONFIG_KEYBOARD_IMX=y -+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -+# CONFIG_KEYBOARD_ATKBD is not set -+# CONFIG_MOUSE_PS2 is not set -+CONFIG_INPUT_MISC=y -+CONFIG_SERIO_SERPORT=m -+CONFIG_VT_HW_CONSOLE_BINDING=y -+# 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_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 ++CONFIG_SYSVIPC=y ++CONFIG_FHANDLE=y ++CONFIG_NO_HZ=y ++CONFIG_HIGH_RES_TIMERS=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_CLEANCACHE=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_SOC_IMX6Q=y ++# CONFIG_SOC_IMX6SL is not set ++# CONFIG_SOC_IMX6SX is not set ++# CONFIG_SWP_EMULATE is not set ++CONFIG_PCI=y ++CONFIG_PCIE_DW=y ++CONFIG_PCI_IMX6=y ++CONFIG_SMP=y ++CONFIG_VMSPLIT_3G=y ++CONFIG_PREEMPT_VOLUNTARY=y ++CONFIG_AEABI=y ++# CONFIG_OABI_COMPAT is not set ++CONFIG_HIGHMEM=y ++CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" ++CONFIG_CPU_FREQ=y ++CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y ++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 ++CONFIG_ARM_IMX6_CPUFREQ=y ++CONFIG_CPU_IDLE=y ++CONFIG_VFP=y ++CONFIG_VFPv3=y ++CONFIG_NEON=y ++CONFIG_KERNEL_MODE_NEON=y ++CONFIG_BINFMT_MISC=m ++CONFIG_PM=y ++CONFIG_SUSPEND=y ++# CONFIG_PM_DEBUG is not set ++# CONFIG_PM_TEST_SUSPEND is not set ++CONFIG_IOSCHED_BFQ=y ++CONFIG_CGROUP_BFQIO=y ++CONFIG_DEFAULT_BFQ=y ++CONFIG_DEFAULT_IOSCHED="bfq" ++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_VLAN_8021Q=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=y ++CONFIG_ETHERNET=y ++# CONFIG_NET_VENDOR_BROADCOM is not set ++# CONFIG_NET_VENDOR_CIRRUS is not set ++# CONFIG_NET_VENDOR_FARADAY ++# CONFIG_NET_VENDOR_INTEL ++# CONFIG_NET_VENDOR_I825XX ++# CONFIG_NET_VENDOR_MARVELL ++# CONFIG_NET_VENDOR_MICROCHIP ++# CONFIG_NET_VENDOR_MICROCHIP=y ++# CONFIG_ENC28J60 is not set ++# CONFIG_NET_VENDOR_NATSEMI=y ++# CONFIG_NET_VENDOR_8390=y ++# CONFIG_AX88796 is not set ++# CONFIG_ETHOC is not set ++# CONFIG_SH_ETH is not set ++# CONFIG_NET_VENDOR_SEEQ=y ++# CONFIG_NET_VENDOR_SMSC=y ++# CONFIG_SMC91X is not set ++# CONFIG_SMC911X is not set ++# CONFIG_SMSC911X is not set ++# CONFIG_NET_VENDOR_STMICRO=y ++# CONFIG_STMMAC_ETH is not set ++# CONFIG_NET_VENDOR_VIA=y ++# CONFIG_VIA_VELOCITY is not set ++# CONFIG_NET_VENDOR_WIZNET=y ++CONFIG_NET_VENDOR_FREESCALE=y ++CONFIG_FEC=y ++CONFIG_PHYLIB=y ++CONFIG_AT803X_PHY=y ++CONFIG_WLAN=y ++CONFIG_BRCMUTIL=m ++CONFIG_BRCMFMAC=m ++CONFIG_BRCMFMAC_SDIO=y ++CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y ++# CONFIG_STANDALONE is not set ++CONFIG_DMA_CMA=y ++CONFIG_CMA=y ++CONFIG_CMA_SIZE_MBYTES=256 ++CONFIG_CONNECTOR=y ++# CONFIG_MTD is not set ++CONFIG_BLK_DEV_LOOP=y ++CONFIG_BLK_DEV_RAM=y ++CONFIG_BLK_DEV_RAM_SIZE=65536 ++# 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_PLATFORM=y ++CONFIG_AHCI_IMX=y ++CONFIG_NETDEVICES=y ++CONFIG_INPUT_EVDEV=y ++# CONFIG_INPUT_EVBUG is not set ++CONFIG_KEYBOARD_GPIO=y ++CONFIG_KEYBOARD_IMX=y ++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set ++# CONFIG_KEYBOARD_ATKBD is not set ++# CONFIG_MOUSE_PS2 is not set ++CONFIG_INPUT_MISC=y ++CONFIG_SERIO_SERPORT=m ++CONFIG_VT_HW_CONSOLE_BINDING=y ++# 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_GPIO_MXC=y +# CONFIG_I2C_COMPAT is not set @@ -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,298 +10875,4825 @@ 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 -@@ -0,0 +1,414 @@ -+CONFIG_KERNEL_LZO=y +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_NO_HZ=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 -+CONFIG_LOG_BUF_SHIFT=18 ++ ++# ++# 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_BLK_DEV_BSG is not set -+CONFIG_GPIO_PCA953X=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_MACH_IMX51_DT=y -+CONFIG_MACH_EUKREA_CPUIMX51SD=y -+CONFIG_SOC_IMX50=y -+CONFIG_SOC_IMX53=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=y -+CONFIG_SOC_VF610=y -+# CONFIG_SWP_EMULATE is not set ++# 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_PREEMPT=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_CMDLINE="noinitrd console=ttymxc0,115200" ++# 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_DEFAULT_GOV_INTERACTIVE=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_PM_RUNTIME=y ++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_TEST_SUSPEND=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_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_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_VLAN_8021Q=y -+CONFIG_LLC2=y -+CONFIG_CAN=y -+CONFIG_CAN_FLEXCAN=y -+CONFIG_CAN_M_CAN=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_HIDP=y -+CONFIG_BT_HCIBTUSB=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_HCIBCM203X=y -+CONFIG_BT_ATH3K=y -+CONFIG_CFG80211=y -+CONFIG_MAC80211=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 -+CONFIG_CMA_SIZE_MBYTES=320 ++ ++# ++# 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_M25P80=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_GPMI_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_SPI_NOR=y -+CONFIG_SPI_FSL_QUADSPI=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_BLK_DEV_LOOP=y -+CONFIG_BLK_DEV_RAM=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_SCSI_MULTI_LUN=y -+CONFIG_SCSI_CONSTANTS=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 -+# CONFIG_SCSI_LOWLEVEL is not set ++ ++# ++# 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_CS89x0=y -+CONFIG_CS89x0_PLATFORM=y ++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_SMC91X=y -+CONFIG_SMC911X=y -+CONFIG_SMSC911X=y ++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_USB_PEGASUS=m -+CONFIG_USB_RTL8150=m -+CONFIG_USB_RTL8152=m -+CONFIG_USB_USBNET=m -+CONFIG_USB_NET_CDC_EEM=m -+CONFIG_ATH_CARDS=y -+CONFIG_ATH6KL=m -+CONFIG_ATH6KL_SDIO=m -+CONFIG_BRCMFMAC=m -+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -+CONFIG_INPUT_EVDEV=y -+CONFIG_INPUT_EVBUG=m -+CONFIG_KEYBOARD_GPIO=y -+CONFIG_KEYBOARD_SNVS_PWRKEY=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_TOUCHSCREEN_TSC2007=y -+CONFIG_TOUCHSCREEN_STMPE=y ++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_ISL29023=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_LEGACY_PTYS is not set ++# 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_FSL_LPUART=y -+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -+CONFIG_FSL_OTP=y -+# CONFIG_I2C_COMPAT is not set ++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_HELPER_AUTO is not set -+CONFIG_I2C_ALGOPCF=m -+CONFIG_I2C_ALGOPCA=m ++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_IMX=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_SABRESD_MAX8903=y -+CONFIG_SENSORS_MAX17135=y -+CONFIG_SENSORS_MAG3110=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 -+CONFIG_DEVICE_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_MAX17135=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_STMPE=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=y -+CONFIG_REGULATOR_MAX17135=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_MEDIA_SUPPORT=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_IR_GPIO_CIR=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_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_MXC_VADC=m -+CONFIG_SOC_CAMERA=y -+CONFIG_VIDEO_MX3=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=y -+CONFIG_RADIO_SI476X=y -+CONFIG_SOC_CAMERA_OV2640=y -+CONFIG_DRM=y -+CONFIG_DRM_VIVANTE=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_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_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_EINK_PANEL=y -+CONFIG_FB_MXS_SII902X=y -+CONFIG_FB_MXC_DCIC=m -+CONFIG_HANNSTAR_CABC=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_LOGO=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 -+CONFIG_SND_SOC_EUKREA_TLV320=y -+CONFIG_SND_SOC_IMX_CS42888=y -+CONFIG_SND_SOC_IMX_WM8962=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_MQS=y +CONFIG_SND_SOC_IMX_SPDIF=y -+CONFIG_SND_SOC_IMX_MC13783=y ++# CONFIG_SND_SOC_IMX_MC13783 is not set +CONFIG_SND_SOC_IMX_HDMI=y -+CONFIG_SND_SOC_IMX_SI476X=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_MXC=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_UDC=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_SERIAL=m -+CONFIG_USB_SERIAL_GENERIC=y -+CONFIG_USB_SERIAL_FTDI_SIO=m -+CONFIG_USB_SERIAL_OPTION=m -+CONFIG_USB_EHSET_TEST_FIXTURE=m ++# 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 @@ -8622,125 +15706,1429 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_defconfig linux-4.1.10/arch/ +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_UNSAFE_RESUME=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_MXC_IPU=y -+CONFIG_MXC_GPU_VIV=y -+CONFIG_MXC_MIPI_CSI2=y -+CONFIG_MXC_MLB150=m ++# 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=y -+CONFIG_LEDS_GPIO=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=y -+CONFIG_LEDS_TRIGGER_ONESHOT=y ++CONFIG_LEDS_TRIGGER_TIMER=m ++CONFIG_LEDS_TRIGGER_ONESHOT=m +CONFIG_LEDS_TRIGGER_HEARTBEAT=y -+CONFIG_LEDS_TRIGGER_BACKLIGHT=y -+CONFIG_LEDS_TRIGGER_GPIO=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_MXC_PXP_V2=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_IOMMU_SUPPORT is not set -+CONFIG_IIO=y -+CONFIG_VF610_ADC=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_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_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_QUOTA=y -+CONFIG_QUOTA_NETLINK_INTERFACE=y -+# CONFIG_PRINT_QUOTA_WARNING is not set ++# 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_ISO9660_FS=m ++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=m -+CONFIG_MSDOS_FS=m ++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_JFFS2_FS=y -+CONFIG_UBIFS_FS=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_NLS_DEFAULT="cp437" ++# 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_15=m ++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 -+CONFIG_SECURITYFS=y ++ ++# ++# 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_TEST=m ++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=y -+CONFIG_CRYPTO_RMD160=y -+CONFIG_CRYPTO_RMD256=y -+CONFIG_CRYPTO_RMD320=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=y -+CONFIG_CRYPTO_WP512=y -+CONFIG_CRYPTO_BLOWFISH=y -+CONFIG_CRYPTO_CAMELLIA=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_ANSI_CPRNG is not set ++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_SM=y -+CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -+CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -+CONFIG_CRC_CCITT=m ++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=m -+CONFIG_FONTS=y ++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 -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 -@@ -0,0 +1,332 @@ -+# CONFIG_LOCALVERSION_AUTO is not set ++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 +CONFIG_NO_HZ=y @@ -8759,11 +17147,8 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set -+CONFIG_ARCH_MULTI_V6=y +CONFIG_GPIO_PCA953X=y +CONFIG_ARCH_MXC=y -+# CONFIG_MACH_MX31ADS is not set -+# CONFIG_MACH_BUG is not set +CONFIG_MACH_IMX51_DT=y +CONFIG_MACH_EUKREA_CPUIMX51SD=y +CONFIG_SOC_IMX50=y @@ -8772,6 +17157,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_SOC_IMX6SL=y +CONFIG_SOC_IMX6SX=y +CONFIG_SOC_VF610=y ++# CONFIG_SWP_EMULATE is not set +CONFIG_SMP=y +CONFIG_VMSPLIT_2G=y +CONFIG_PREEMPT=y @@ -8779,6 +17165,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_HIGHMEM=y +CONFIG_CMA=y +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" ++CONFIG_KEXEC=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y @@ -8806,10 +17193,28 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +# CONFIG_INET_LRO is not set +CONFIG_IPV6=y +CONFIG_NETFILTER=y ++CONFIG_VLAN_8021Q=y ++CONFIG_LLC2=y ++CONFIG_CAN=y ++CONFIG_CAN_FLEXCAN=y ++CONFIG_CAN_M_CAN=y ++CONFIG_BT=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_HIDP=y ++CONFIG_BT_HCIBTUSB=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_HCIBCM203X=y ++CONFIG_BT_ATH3K=y +CONFIG_CFG80211=y +CONFIG_MAC80211=y -+CONFIG_RFKILL=y -+CONFIG_RFKILL_INPUT=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set @@ -8866,22 +17271,33 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_NET_VENDOR_STMICRO is not set -+CONFIG_AT803X_PHY=y ++CONFIG_USB_PEGASUS=m ++CONFIG_USB_RTL8150=m ++CONFIG_USB_RTL8152=m ++CONFIG_USB_USBNET=m ++CONFIG_USB_NET_CDC_EEM=m ++CONFIG_ATH_CARDS=y ++CONFIG_ATH6KL=m ++CONFIG_ATH6KL_SDIO=m +CONFIG_BRCMFMAC=m +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=m +CONFIG_KEYBOARD_GPIO=y ++CONFIG_KEYBOARD_SNVS_PWRKEY=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_TOUCHSCREEN_TSC2007=y +CONFIG_TOUCHSCREEN_STMPE=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 @@ -8889,8 +17305,7 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -+CONFIG_HW_RANDOM=y -+CONFIG_IMX_SEMA4=y ++CONFIG_FSL_OTP=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_HELPER_AUTO is not set @@ -8900,7 +17315,10 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_GPIO_SYSFS=y -+# CONFIG_HWMON is not set ++CONFIG_POWER_SUPPLY=y ++CONFIG_SABRESD_MAX8903=y ++CONFIG_SENSORS_MAX17135=y ++CONFIG_SENSORS_MAG3110=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y @@ -8910,27 +17328,42 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +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_MFD_STMPE=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_RC_SUPPORT=y +CONFIG_RC_DEVICES=y +CONFIG_IR_GPIO_CIR=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_MXC_VADC=m +CONFIG_SOC_CAMERA=y +CONFIG_VIDEO_MX3=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_CODA=y ++CONFIG_RADIO_SI476X=y +CONFIG_SOC_CAMERA_OV2640=y +CONFIG_DRM=y +CONFIG_DRM_VIVANTE=y @@ -8948,39 +17381,413 @@ diff -Nur linux-4.1.10.orig/arch/arm/configs/imx_v7_mfg_defconfig linux-4.1.10/a +CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y +CONFIG_FB_MXC_HDMI=y +CONFIG_FB_MXC_EINK_PANEL=y -+CONFIG_FB_MXC_EINK_AUTO_UPDATE_MODE=y +CONFIG_FB_MXS_SII902X=y ++CONFIG_FB_MXC_DCIC=m +CONFIG_HANNSTAR_CABC=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y ++CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_EUKREA_TLV320=y ++CONFIG_SND_SOC_IMX_CS42888=y +CONFIG_SND_SOC_IMX_WM8962=y +CONFIG_SND_SOC_IMX_SGTL5000=y ++CONFIG_SND_SOC_IMX_MQS=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_MC13783=y ++CONFIG_SND_SOC_IMX_HDMI=y ++CONFIG_SND_SOC_IMX_SI476X=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y ++CONFIG_USB_ACM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y ++CONFIG_USB_SERIAL=m ++CONFIG_USB_SERIAL_GENERIC=y ++CONFIG_USB_SERIAL_FTDI_SIO=m ++CONFIG_USB_SERIAL_OPTION=m ++CONFIG_USB_EHSET_TEST_FIXTURE=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y ++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_ZERO=m +CONFIG_USB_ETH=m -+CONFIG_USB_PHY=y -+# CONFIG_USB_ZERO is not set -+# CONFIG_USB_AUDIO is not set -+# CONFIG_USB_ETH is not set -+# CONFIG_USB_G_NCM is not set -+# CONFIG_USB_GADGETFS is not set -+# CONFIG_USB_FUNCTIONFS is not set ++CONFIG_USB_G_NCM=m ++CONFIG_USB_GADGETFS=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_TIMER=y ++CONFIG_LEDS_TRIGGER_ONESHOT=y ++CONFIG_LEDS_TRIGGER_HEARTBEAT=y ++CONFIG_LEDS_TRIGGER_BACKLIGHT=y ++CONFIG_LEDS_TRIGGER_GPIO=y ++CONFIG_RTC_CLASS=y ++CONFIG_RTC_INTF_DEV_UIE_EMUL=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_STAGING_MEDIA=y ++# CONFIG_IOMMU_SUPPORT is not set ++CONFIG_IIO=y ++CONFIG_VF610_ADC=y ++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_DEBUG_FS=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_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_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_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 ++CONFIG_SYSVIPC=y ++CONFIG_NO_HZ=y ++CONFIG_HIGH_RES_TIMERS=y ++CONFIG_LOG_BUF_SHIFT=18 ++CONFIG_CGROUPS=y ++CONFIG_RELAY=y ++CONFIG_BLK_DEV_INITRD=y ++CONFIG_EXPERT=y ++CONFIG_KALLSYMS_ALL=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_ARCH_MULTI_V6=y ++CONFIG_GPIO_PCA953X=y ++CONFIG_ARCH_MXC=y ++# CONFIG_MACH_MX31ADS is not set ++# CONFIG_MACH_BUG is not set ++CONFIG_MACH_IMX51_DT=y ++CONFIG_MACH_EUKREA_CPUIMX51SD=y ++CONFIG_SOC_IMX50=y ++CONFIG_SOC_IMX53=y ++CONFIG_SOC_IMX6Q=y ++CONFIG_SOC_IMX6SL=y ++CONFIG_SOC_IMX6SX=y ++CONFIG_SOC_VF610=y ++CONFIG_SMP=y ++CONFIG_VMSPLIT_2G=y ++CONFIG_PREEMPT=y ++CONFIG_AEABI=y ++CONFIG_HIGHMEM=y ++CONFIG_CMA=y ++CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" ++CONFIG_CPU_FREQ=y ++CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y ++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 ++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_CFG80211=y ++CONFIG_MAC80211=y ++CONFIG_RFKILL=y ++CONFIG_RFKILL_INPUT=y ++CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y ++# CONFIG_STANDALONE is not set ++CONFIG_DMA_CMA=y ++CONFIG_CMA_SIZE_MBYTES=320 ++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_M25P80=y ++CONFIG_MTD_SST25L=y ++CONFIG_MTD_NAND=y ++CONFIG_MTD_NAND_GPMI_NAND=y ++CONFIG_MTD_NAND_MXC=y ++CONFIG_MTD_SPI_NOR=y ++CONFIG_SPI_FSL_QUADSPI=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_PLATFORM=y ++CONFIG_AHCI_IMX=y ++CONFIG_PATA_IMX=y ++CONFIG_NETDEVICES=y ++# CONFIG_NET_VENDOR_BROADCOM is not set ++CONFIG_CS89x0=y ++CONFIG_CS89x0_PLATFORM=y ++# CONFIG_NET_VENDOR_FARADAY is not set ++# CONFIG_NET_VENDOR_INTEL is not set ++# 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_AT803X_PHY=y ++CONFIG_BRCMFMAC=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_MC13783=y ++CONFIG_TOUCHSCREEN_TSC2007=y ++CONFIG_TOUCHSCREEN_STMPE=y ++CONFIG_INPUT_MISC=y ++CONFIG_INPUT_MMA8450=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_HW_RANDOM=y ++CONFIG_IMX_SEMA4=y ++# CONFIG_I2C_COMPAT is not set ++CONFIG_I2C_CHARDEV=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_HWMON is not set ++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_STMPE=y ++CONFIG_REGULATOR=y ++CONFIG_REGULATOR_FIXED_VOLTAGE=y ++CONFIG_REGULATOR_ANATOP=y ++CONFIG_REGULATOR_DA9052=y ++CONFIG_REGULATOR_MC13783=y ++CONFIG_REGULATOR_MC13892=y ++CONFIG_REGULATOR_PFUZE100=y ++CONFIG_MEDIA_SUPPORT=y ++CONFIG_MEDIA_CAMERA_SUPPORT=y ++CONFIG_MEDIA_RC_SUPPORT=y ++CONFIG_RC_DEVICES=y ++CONFIG_IR_GPIO_CIR=y ++CONFIG_V4L_PLATFORM_DRIVERS=y ++CONFIG_VIDEO_MXC_OUTPUT=y ++CONFIG_VIDEO_MXC_IPU_OUTPUT=y ++CONFIG_VIDEO_MXC_PXP_V4L2=y ++CONFIG_SOC_CAMERA=y ++CONFIG_VIDEO_MX3=y ++CONFIG_V4L_MEM2MEM_DRIVERS=y ++CONFIG_VIDEO_CODA=y ++CONFIG_SOC_CAMERA_OV2640=y ++CONFIG_DRM=y ++CONFIG_DRM_VIVANTE=y ++CONFIG_FB=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_MXC_EINK_AUTO_UPDATE_MODE=y ++CONFIG_FB_MXS_SII902X=y ++CONFIG_HANNSTAR_CABC=y ++CONFIG_FRAMEBUFFER_CONSOLE=y ++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y ++CONFIG_LOGO=y ++CONFIG_SOUND=y ++CONFIG_SND=y ++CONFIG_SND_SOC=y ++CONFIG_SND_IMX_SOC=y ++CONFIG_SND_SOC_EUKREA_TLV320=y ++CONFIG_SND_SOC_IMX_WM8962=y ++CONFIG_SND_SOC_IMX_SGTL5000=y ++CONFIG_SND_SOC_IMX_SPDIF=y ++CONFIG_SND_SOC_IMX_MC13783=y ++CONFIG_USB=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_MXC=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_ETH=m ++CONFIG_USB_PHY=y ++# CONFIG_USB_ZERO is not set ++# CONFIG_USB_AUDIO is not set ++# CONFIG_USB_ETH is not set ++# CONFIG_USB_G_NCM is not set ++# CONFIG_USB_GADGETFS is not set ++# CONFIG_USB_FUNCTIONFS is not set +CONFIG_USB_MASS_STORAGE=y +CONFIG_FSL_UTP=y +# CONFIG_USB_G_SERIAL is not set @@ -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 #include @@ -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 #include @@ -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 #include @@ -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 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 #include #include -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 #include @@ -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 #include @@ -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 #include @@ -29939,9 +39083,9 @@ diff -Nur linux-4.1.10.orig/drivers/crypto/caam/compat.h linux-4.1.10/drivers/cr #include #include #include -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 #include @@ -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 "); 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 ++ * ++ * Based on: ++ * Driver for Intersil|Techwell TW6869 based DVR cards ++ * (c) 2011-12 liran [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 ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "tw6869.h" ++ ++MODULE_DESCRIPTION("tw6869/65 media bridge driver"); ++MODULE_AUTHOR("starterkit "); ++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 ++ * ++ * Based on: ++ * tw686x common header file ++ * Copyright 2009-10 liran [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,446 +133137,459 @@ 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; -+ -+ CAMERA_TRACE("In csi_enc_setup\n"); -+ if (!cam) { -+ printk(KERN_ERR "cam private is NULL\n"); -+ return -ENXIO; -+ } -+ -+ memset(¶ms, 0, sizeof(ipu_channel_params_t)); -+ params.csi_mem.csi = cam->csi; -+ -+ sensor_protocol = ipu_csi_get_sensor_protocol(cam->ipu, cam->csi); -+ switch (sensor_protocol) { -+ case IPU_CSI_CLK_MODE_GATED_CLK: -+ case IPU_CSI_CLK_MODE_NONGATED_CLK: -+ case IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE: -+ case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_DDR: -+ case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_SDR: -+ params.csi_mem.interlaced = false; -+ break; -+ case IPU_CSI_CLK_MODE_CCIR656_INTERLACED: -+ case IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_DDR: -+ case IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_SDR: -+ params.csi_mem.interlaced = true; -+ break; -+ default: -+ printk(KERN_ERR "sensor protocol unsupported\n"); -+ return -EINVAL; -+ } -+ -+ if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_YUV420) -+ pixel_fmt = IPU_PIX_FMT_YUV420P; -+ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_YVU420) -+ pixel_fmt = IPU_PIX_FMT_YVU420P; -+ 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; -+ 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) -+ pixel_fmt = IPU_PIX_FMT_NV12; -+ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_BGR24) -+ pixel_fmt = IPU_PIX_FMT_BGR24; -+ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_RGB24) -+ pixel_fmt = IPU_PIX_FMT_RGB24; -+ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565) -+ pixel_fmt = IPU_PIX_FMT_RGB565; -+ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_BGR32) -+ pixel_fmt = IPU_PIX_FMT_BGR32; -+ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_RGB32) -+ pixel_fmt = IPU_PIX_FMT_RGB32; -+ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_SBGGR8) -+ pixel_fmt = IPU_PIX_FMT_GENERIC; -+ else { -+ printk(KERN_ERR "format not supported\n"); -+ return -EINVAL; -+ } -+ err = cam_mipi_csi2_enable(cam, ¶ms.csi_mem.mipi); -+ if (err) -+ return err; -+ -+ err = ipu_channel_request(cam->ipu, CSI_MEM, ¶ms, &cam->ipu_chan); -+ if (err) { -+ pr_err("%s:ipu_channel_request %d\n", __func__, err); -+ return err; -+ } -+ -+ err = ipu_init_channel_buffer(cam->ipu, CSI_MEM, IPU_OUTPUT_BUFFER, -+ pixel_fmt, cam->v2f.fmt.pix.width, -+ cam->v2f.fmt.pix.height, -+ cam->v2f.fmt.pix.bytesperline, -+ cam->rotation, -+ dummy, dummy, 0, -+ cam->offset.u_offset, -+ cam->offset.v_offset); -+ if (err != 0) { -+ printk(KERN_ERR "CSI_MEM output buffer\n"); -+ return err; -+ } -+ err = ipu_enable_channel(cam->ipu, CSI_MEM); -+ if (err < 0) { -+ printk(KERN_ERR "ipu_enable_channel CSI_MEM\n"); -+ return err; -+ } -+ -+ return err; -+} -+ -+/*! -+ * function to update physical buffer address for encorder IDMA channel -+ * -+ * @param eba physical buffer address for encorder IDMA channel -+ * @param buffer_num int buffer 0 or buffer 1 -+ * -+ * @return status -+ */ -+static int csi_enc_eba_update(struct ipu_soc *ipu, dma_addr_t eba, -+ int *buffer_num) -+{ -+ int err = 0; -+ -+ pr_debug("eba %x\n", eba); -+ err = ipu_update_channel_buffer(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, -+ *buffer_num, eba); -+ if (err != 0) { -+ ipu_clear_buffer_ready(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, -+ *buffer_num); -+ -+ err = ipu_update_channel_buffer(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, -+ *buffer_num, eba); -+ if (err != 0) { -+ pr_err("ERROR: v4l2 capture: fail to update " -+ "buf%d\n", *buffer_num); -+ return err; -+ } -+ } -+ -+ ipu_select_buffer(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, *buffer_num); -+ -+ *buffer_num = (*buffer_num == 0) ? 1 : 0; -+ -+ return 0; -+} -+ -+/*! -+ * Enable encoder task -+ * @param private struct cam_data * mxc capture instance -+ * -+ * @return status -+ */ -+static int csi_enc_enabling_tasks(void *private) -+{ -+ cam_data *cam = (cam_data *) private; -+ int err = 0; -+ CAMERA_TRACE("IPU:In csi_enc_enabling_tasks\n"); -+ -+ if (cam->dummy_frame.vaddress && -+ cam->dummy_frame.buffer.length -+ < PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage)) { -+ dma_free_coherent(0, cam->dummy_frame.buffer.length, -+ cam->dummy_frame.vaddress, -+ cam->dummy_frame.paddress); -+ cam->dummy_frame.vaddress = 0; -+ } -+ -+ if (!cam->dummy_frame.vaddress) { -+ cam->dummy_frame.vaddress = dma_alloc_coherent(0, -+ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage), -+ &cam->dummy_frame.paddress, -+ GFP_DMA | GFP_KERNEL); -+ if (cam->dummy_frame.vaddress == 0) { -+ pr_err("ERROR: v4l2 capture: Allocate dummy frame " -+ "failed.\n"); -+ return -ENOBUFS; -+ } -+ cam->dummy_frame.buffer.length = -+ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage); -+ } -+ cam->dummy_frame.buffer.type = V4L2_BUF_TYPE_PRIVATE; -+ cam->dummy_frame.buffer.m.offset = cam->dummy_frame.paddress; -+ -+ ipu_clear_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF); -+ err = ipu_request_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF, -+ csi_enc_callback, 0, "Mxc Camera", cam); -+ if (err != 0) { -+ pr_err("%s: Error requesting IPU_IRQ_CSI0_OUT_EOF\n", __func__); -+ return err; -+ } -+ -+ err = csi_enc_setup(cam); -+ if (err != 0) { -+ printk(KERN_ERR "csi_enc_setup %d\n", err); -+ return err; -+ } -+ -+ return err; -+} -+ -+/*! -+ * Disable encoder task -+ * @param private struct cam_data * mxc capture instance -+ * -+ * @return int -+ */ -+static int csi_enc_disabling_tasks(void *private) -+{ -+ cam_data *cam = (cam_data *) private; -+ int err = 0; -+ int err2 = 0; -+ -+ err = ipu_channel_disable(cam->ipu_chan, true); -+ -+ ipu_channel_free(&cam->ipu_chan); -+ -+ err2 = cam_mipi_csi2_disable(cam); -+ return err ? err : err2; -+} -+ -+/*! -+ * Enable csi -+ * @param private struct cam_data * mxc capture instance -+ * -+ * @return status -+ */ -+static int csi_enc_enable_csi(void *private) -+{ -+ return cam_ipu_enable_csi((cam_data *)private); -+} -+ -+/*! -+ * Disable csi -+ * @param private struct cam_data * mxc capture instance -+ * -+ * @return status -+ */ -+static int csi_enc_disable_csi(void *private) -+{ -+ cam_data *cam = (cam_data *) private; -+ -+ /* free csi eof irq firstly. -+ * when disable csi, wait for idmac eof. -+ * it requests eof irq again */ -+ ipu_free_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF, cam); -+ return cam_ipu_disable_csi(cam); -+} -+ -+/*! -+ * function to select CSI ENC as the working path -+ * -+ * @param private struct cam_data * mxc capture instance -+ * -+ * @return int -+ */ -+int csi_enc_select(void *private) -+{ -+ cam_data *cam = (cam_data *) private; -+ int err = 0; -+ -+ if (cam) { -+ cam->enc_update_eba = csi_enc_eba_update; -+ cam->enc_enable = csi_enc_enabling_tasks; -+ cam->enc_disable = csi_enc_disabling_tasks; -+ cam->enc_enable_csi = csi_enc_enable_csi; -+ cam->enc_disable_csi = csi_enc_disable_csi; -+ } else { -+ err = -EIO; -+ } -+ -+ return err; -+} -+EXPORT_SYMBOL(csi_enc_select); -+ -+/*! -+ * function to de-select CSI ENC as the working path -+ * -+ * @param private struct cam_data * mxc capture instance -+ * -+ * @return int -+ */ -+int csi_enc_deselect(void *private) -+{ -+ cam_data *cam = (cam_data *) private; -+ int err = 0; -+ -+ if (cam) { -+ cam->enc_update_eba = NULL; -+ cam->enc_enable = NULL; -+ cam->enc_disable = NULL; -+ cam->enc_enable_csi = NULL; -+ cam->enc_disable_csi = NULL; -+ } -+ -+ return err; -+} -+EXPORT_SYMBOL(csi_enc_deselect); -+ -+/*! -+ * Init the Encorder channels -+ * -+ * @return Error code indicating success or failure -+ */ -+__init int csi_enc_init(void) -+{ -+ return 0; -+} -+ -+/*! -+ * Deinit the Encorder channels -+ * -+ */ -+void __exit csi_enc_exit(void) -+{ -+} -+ -+module_init(csi_enc_init); -+module_exit(csi_enc_exit); -+ -+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 -@@ -0,0 +1,580 @@ -+/* -+ * Copyright 2004-2014 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 -+ */ -+ -+/*! -+ * @file ipu_foreground_sdc.c -+ * -+ * @brief IPU Use case for PRP-VF -+ * -+ * @ingroup IPU -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "mxc_v4l2_capture.h" -+#include "ipu_prp_sw.h" -+ -+#ifdef CAMERA_DBG -+ #define CAMERA_TRACE(x) (printk)x -+#else -+ #define CAMERA_TRACE(x) ++#ifdef CONFIG_MXC_MIPI_CSI2 ++ void *mipi_csi2_info; ++ int ipu_id; ++ int csi_id; +#endif -+ -+static int csi_buffer_num, buffer_num; -+static u32 csi_mem_bufsize; -+static struct ipu_soc *disp_ipu; -+static struct fb_info *fbi; -+static struct fb_var_screeninfo fbvar; -+static u32 vf_out_format; -+static void csi_buf_work_func(struct work_struct *work) -+{ -+ int err = 0; -+ cam_data *cam = -+ container_of(work, struct _cam_data, csi_work_struct); -+ -+ struct ipu_task task; -+ memset(&task, 0, sizeof(task)); -+ -+ if (csi_buffer_num) -+ task.input.paddr = cam->vf_bufs[0]; -+ else -+ task.input.paddr = cam->vf_bufs[1]; -+ task.input.width = cam->crop_current.width; -+ task.input.height = cam->crop_current.height; -+ task.input.format = IPU_PIX_FMT_NV12; -+ -+ if (buffer_num == 0) -+ task.output.paddr = fbi->fix.smem_start + -+ (fbi->fix.line_length * fbvar.yres); -+ else -+ task.output.paddr = fbi->fix.smem_start; -+ task.output.width = cam->win.w.width; -+ task.output.height = cam->win.w.height; -+ task.output.format = vf_out_format; -+ task.output.rotate = cam->rotation; -+again: -+ err = ipu_check_task(&task); -+ if (err != IPU_CHECK_OK) { -+ if (err > IPU_CHECK_ERR_MIN) { -+ if (err == IPU_CHECK_ERR_SPLIT_INPUTW_OVER) { -+ task.input.crop.w -= 8; -+ goto again; -+ } -+ if (err == IPU_CHECK_ERR_SPLIT_INPUTH_OVER) { -+ task.input.crop.h -= 8; -+ goto again; -+ } -+ if (err == IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER) { -+ task.output.width -= 8; -+ task.output.crop.w = task.output.width; -+ goto again; -+ } -+ if (err == IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER) { -+ task.output.height -= 8; -+ task.output.crop.h = task.output.height; -+ goto again; -+ } -+ printk(KERN_ERR "check ipu taks fail\n"); -+ return; -+ } -+ printk(KERN_ERR "check ipu taks fail\n"); -+ return; -+ } -+ err = ipu_queue_task(&task); -+ if (err < 0) -+ printk(KERN_ERR "queue ipu task error\n"); -+ ipu_select_buffer(disp_ipu, MEM_FG_SYNC, IPU_INPUT_BUFFER, buffer_num); -+ buffer_num = (buffer_num == 0) ? 1 : 0; -+} -+ -+static void get_disp_ipu(cam_data *cam) -+{ -+ if (cam->output > 2) -+ disp_ipu = ipu_get_soc(1); /* using DISP4 */ -+ else -+ disp_ipu = ipu_get_soc(0); -+} -+ -+/*! -+ * csi ENC callback function. -+ * -+ * @param irq int irq line -+ * @param dev_id void * device id -+ * -+ * @return status IRQ_HANDLED for handled -+ */ -+static irqreturn_t csi_enc_callback(int irq, void *dev_id) -+{ -+ cam_data *cam = (cam_data *) dev_id; -+ -+ ipu_select_buffer(cam->ipu, CSI_MEM, IPU_OUTPUT_BUFFER, csi_buffer_num); -+ if ((cam->crop_current.width != cam->win.w.width) || -+ (cam->crop_current.height != cam->win.w.height) || -+ (vf_out_format != IPU_PIX_FMT_NV12) || -+ (cam->rotation >= IPU_ROTATE_VERT_FLIP)) -+ schedule_work(&cam->csi_work_struct); -+ csi_buffer_num = (csi_buffer_num == 0) ? 1 : 0; -+ return IRQ_HANDLED; -+} -+ -+static int csi_enc_setup(cam_data *cam) -+{ -+ ipu_channel_params_t params; -+ int err = 0, sensor_protocol = 0; ++ struct v4l2_format cam_fmt; ++ ++ CAMERA_TRACE("In csi_enc_setup\n"); ++ if (!cam) { ++ printk(KERN_ERR "cam private is NULL\n"); ++ return -ENXIO; ++ } ++ ++ memset(¶ms, 0, sizeof(ipu_channel_params_t)); ++ params.csi_mem.csi = cam->csi; ++ ++ sensor_protocol = ipu_csi_get_sensor_protocol(cam->ipu, cam->csi); ++ switch (sensor_protocol) { ++ case IPU_CSI_CLK_MODE_GATED_CLK: ++ case IPU_CSI_CLK_MODE_NONGATED_CLK: ++ case IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE: ++ case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_DDR: ++ case IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_SDR: ++ params.csi_mem.interlaced = false; ++ break; ++ case IPU_CSI_CLK_MODE_CCIR656_INTERLACED: ++ case IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_DDR: ++ case IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_SDR: ++ params.csi_mem.interlaced = true; ++ break; ++ default: ++ printk(KERN_ERR "sensor protocol unsupported\n"); ++ return -EINVAL; ++ } ++ ++ if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_YUV420) ++ pixel_fmt = IPU_PIX_FMT_YUV420P; ++ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_YVU420) ++ pixel_fmt = IPU_PIX_FMT_YVU420P; ++ 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) ++ { ++ 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) ++ pixel_fmt = IPU_PIX_FMT_NV12; ++ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_BGR24) ++ pixel_fmt = IPU_PIX_FMT_BGR24; ++ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_RGB24) ++ pixel_fmt = IPU_PIX_FMT_RGB24; ++ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565) ++ pixel_fmt = IPU_PIX_FMT_RGB565; ++ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_BGR32) ++ pixel_fmt = IPU_PIX_FMT_BGR32; ++ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_RGB32) ++ pixel_fmt = IPU_PIX_FMT_RGB32; ++ else if (cam->v2f.fmt.pix.pixelformat == V4L2_PIX_FMT_SBGGR8) ++ pixel_fmt = IPU_PIX_FMT_GENERIC; ++ else { ++ printk(KERN_ERR "format not supported\n"); ++ return -EINVAL; ++ } ++ err = cam_mipi_csi2_enable(cam, ¶ms.csi_mem.mipi); ++ if (err) ++ return err; ++ ++ err = ipu_channel_request(cam->ipu, CSI_MEM, ¶ms, &cam->ipu_chan); ++ if (err) { ++ pr_err("%s:ipu_channel_request %d\n", __func__, err); ++ return err; ++ } ++ ++ err = ipu_init_channel_buffer(cam->ipu, CSI_MEM, IPU_OUTPUT_BUFFER, ++ pixel_fmt, cam->v2f.fmt.pix.width, ++ cam->v2f.fmt.pix.height, ++ cam->v2f.fmt.pix.bytesperline, ++ cam->rotation, ++ dummy, dummy, 0, ++ cam->offset.u_offset, ++ cam->offset.v_offset); ++ if (err != 0) { ++ printk(KERN_ERR "CSI_MEM output buffer\n"); ++ return err; ++ } ++ err = ipu_enable_channel(cam->ipu, CSI_MEM); ++ if (err < 0) { ++ printk(KERN_ERR "ipu_enable_channel CSI_MEM\n"); ++ return err; ++ } ++ ++ return err; ++} ++ ++/*! ++ * function to update physical buffer address for encorder IDMA channel ++ * ++ * @param eba physical buffer address for encorder IDMA channel ++ * @param buffer_num int buffer 0 or buffer 1 ++ * ++ * @return status ++ */ ++static int csi_enc_eba_update(struct ipu_soc *ipu, dma_addr_t eba, ++ int *buffer_num) ++{ ++ int err = 0; ++ ++ pr_debug("eba %x\n", eba); ++ err = ipu_update_channel_buffer(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, ++ *buffer_num, eba); ++ if (err != 0) { ++ ipu_clear_buffer_ready(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, ++ *buffer_num); ++ ++ err = ipu_update_channel_buffer(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, ++ *buffer_num, eba); ++ if (err != 0) { ++ pr_err("ERROR: v4l2 capture: fail to update " ++ "buf%d\n", *buffer_num); ++ return err; ++ } ++ } ++ ++ ipu_select_buffer(ipu, CSI_MEM, IPU_OUTPUT_BUFFER, *buffer_num); ++ ++ *buffer_num = (*buffer_num == 0) ? 1 : 0; ++ ++ return 0; ++} ++ ++/*! ++ * Enable encoder task ++ * @param private struct cam_data * mxc capture instance ++ * ++ * @return status ++ */ ++static int csi_enc_enabling_tasks(void *private) ++{ ++ cam_data *cam = (cam_data *) private; ++ int err = 0; ++ CAMERA_TRACE("IPU:In csi_enc_enabling_tasks\n"); ++ ++ if (cam->dummy_frame.vaddress && ++ cam->dummy_frame.buffer.length ++ < PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage)) { ++ dma_free_coherent(0, cam->dummy_frame.buffer.length, ++ cam->dummy_frame.vaddress, ++ cam->dummy_frame.paddress); ++ cam->dummy_frame.vaddress = 0; ++ } ++ ++ if (!cam->dummy_frame.vaddress) { ++ cam->dummy_frame.vaddress = dma_alloc_coherent(0, ++ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage), ++ &cam->dummy_frame.paddress, ++ GFP_DMA | GFP_KERNEL); ++ if (cam->dummy_frame.vaddress == 0) { ++ pr_err("ERROR: v4l2 capture: Allocate dummy frame " ++ "failed.\n"); ++ return -ENOBUFS; ++ } ++ cam->dummy_frame.buffer.length = ++ PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage); ++ } ++ cam->dummy_frame.buffer.type = V4L2_BUF_TYPE_PRIVATE; ++ cam->dummy_frame.buffer.m.offset = cam->dummy_frame.paddress; ++ ++ ipu_clear_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF); ++ err = ipu_request_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF, ++ csi_enc_callback, 0, "Mxc Camera", cam); ++ if (err != 0) { ++ pr_err("%s: Error requesting IPU_IRQ_CSI0_OUT_EOF\n", __func__); ++ return err; ++ } ++ ++ err = csi_enc_setup(cam); ++ if (err != 0) { ++ printk(KERN_ERR "csi_enc_setup %d\n", err); ++ return err; ++ } ++ ++ return err; ++} ++ ++/*! ++ * Disable encoder task ++ * @param private struct cam_data * mxc capture instance ++ * ++ * @return int ++ */ ++static int csi_enc_disabling_tasks(void *private) ++{ ++ cam_data *cam = (cam_data *) private; ++ int err = 0; ++ int err2 = 0; ++ ++ err = ipu_channel_disable(cam->ipu_chan, true); ++ ++ ipu_channel_free(&cam->ipu_chan); ++ ++ err2 = cam_mipi_csi2_disable(cam); ++ return err ? err : err2; ++} ++ ++/*! ++ * Enable csi ++ * @param private struct cam_data * mxc capture instance ++ * ++ * @return status ++ */ ++static int csi_enc_enable_csi(void *private) ++{ ++ return cam_ipu_enable_csi((cam_data *)private); ++} ++ ++/*! ++ * Disable csi ++ * @param private struct cam_data * mxc capture instance ++ * ++ * @return status ++ */ ++static int csi_enc_disable_csi(void *private) ++{ ++ cam_data *cam = (cam_data *) private; ++ ++ /* free csi eof irq firstly. ++ * when disable csi, wait for idmac eof. ++ * it requests eof irq again */ ++ ipu_free_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF, cam); ++ return cam_ipu_disable_csi(cam); ++} ++ ++/*! ++ * function to select CSI ENC as the working path ++ * ++ * @param private struct cam_data * mxc capture instance ++ * ++ * @return int ++ */ ++int csi_enc_select(void *private) ++{ ++ cam_data *cam = (cam_data *) private; ++ int err = 0; ++ ++ if (cam) { ++ cam->enc_update_eba = csi_enc_eba_update; ++ cam->enc_enable = csi_enc_enabling_tasks; ++ cam->enc_disable = csi_enc_disabling_tasks; ++ cam->enc_enable_csi = csi_enc_enable_csi; ++ cam->enc_disable_csi = csi_enc_disable_csi; ++ } else { ++ err = -EIO; ++ } ++ ++ return err; ++} ++EXPORT_SYMBOL(csi_enc_select); ++ ++/*! ++ * function to de-select CSI ENC as the working path ++ * ++ * @param private struct cam_data * mxc capture instance ++ * ++ * @return int ++ */ ++int csi_enc_deselect(void *private) ++{ ++ cam_data *cam = (cam_data *) private; ++ int err = 0; ++ ++ if (cam) { ++ cam->enc_update_eba = NULL; ++ cam->enc_enable = NULL; ++ cam->enc_disable = NULL; ++ cam->enc_enable_csi = NULL; ++ cam->enc_disable_csi = NULL; ++ } ++ ++ return err; ++} ++EXPORT_SYMBOL(csi_enc_deselect); ++ ++/*! ++ * Init the Encorder channels ++ * ++ * @return Error code indicating success or failure ++ */ ++__init int csi_enc_init(void) ++{ ++ return 0; ++} ++ ++/*! ++ * Deinit the Encorder channels ++ * ++ */ ++void __exit csi_enc_exit(void) ++{ ++} ++ ++module_init(csi_enc_init); ++module_exit(csi_enc_exit); ++ ++MODULE_AUTHOR("Freescale Semiconductor, Inc."); ++MODULE_DESCRIPTION("CSI ENC Driver"); ++MODULE_LICENSE("GPL"); +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. ++ */ ++/* * 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 ++ */ ++ ++/*! ++ * @file ipu_foreground_sdc.c ++ * ++ * @brief IPU Use case for PRP-VF ++ * ++ * @ingroup IPU ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "mxc_v4l2_capture.h" ++#include "ipu_prp_sw.h" ++ ++#ifdef CAMERA_DBG ++ #define CAMERA_TRACE(x) (printk)x ++#else ++ #define CAMERA_TRACE(x) ++#endif ++ ++static int csi_buffer_num, buffer_num; ++static u32 csi_mem_bufsize; ++static struct ipu_soc *disp_ipu; ++static struct fb_info *fbi; ++static struct fb_var_screeninfo fbvar; ++static u32 vf_out_format; ++static void csi_buf_work_func(struct work_struct *work) ++{ ++ int err = 0; ++ cam_data *cam = ++ container_of(work, struct _cam_data, csi_work_struct); ++ ++ struct ipu_task task; ++ memset(&task, 0, sizeof(task)); ++ ++ if (csi_buffer_num) ++ task.input.paddr = cam->vf_bufs[0]; ++ else ++ task.input.paddr = cam->vf_bufs[1]; ++ task.input.width = cam->crop_current.width; ++ task.input.height = cam->crop_current.height; ++ task.input.format = IPU_PIX_FMT_NV12; ++ ++ if (buffer_num == 0) ++ task.output.paddr = fbi->fix.smem_start + ++ (fbi->fix.line_length * fbvar.yres); ++ else ++ task.output.paddr = fbi->fix.smem_start; ++ task.output.width = cam->win.w.width; ++ task.output.height = cam->win.w.height; ++ task.output.format = vf_out_format; ++ task.output.rotate = cam->rotation; ++again: ++ err = ipu_check_task(&task); ++ if (err != IPU_CHECK_OK) { ++ if (err > IPU_CHECK_ERR_MIN) { ++ if (err == IPU_CHECK_ERR_SPLIT_INPUTW_OVER) { ++ task.input.crop.w -= 8; ++ goto again; ++ } ++ if (err == IPU_CHECK_ERR_SPLIT_INPUTH_OVER) { ++ task.input.crop.h -= 8; ++ goto again; ++ } ++ if (err == IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER) { ++ task.output.width -= 8; ++ task.output.crop.w = task.output.width; ++ goto again; ++ } ++ if (err == IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER) { ++ task.output.height -= 8; ++ task.output.crop.h = task.output.height; ++ goto again; ++ } ++ printk(KERN_ERR "check ipu taks fail\n"); ++ return; ++ } ++ printk(KERN_ERR "check ipu taks fail\n"); ++ return; ++ } ++ err = ipu_queue_task(&task); ++ if (err < 0) ++ printk(KERN_ERR "queue ipu task error\n"); ++ ipu_select_buffer(disp_ipu, MEM_FG_SYNC, IPU_INPUT_BUFFER, buffer_num); ++ buffer_num = (buffer_num == 0) ? 1 : 0; ++} ++ ++static void get_disp_ipu(cam_data *cam) ++{ ++ if (cam->output > 2) ++ disp_ipu = ipu_get_soc(1); /* using DISP4 */ ++ else ++ disp_ipu = ipu_get_soc(0); ++} ++ ++/*! ++ * csi ENC callback function. ++ * ++ * @param irq int irq line ++ * @param dev_id void * device id ++ * ++ * @return status IRQ_HANDLED for handled ++ */ ++static irqreturn_t csi_enc_callback(int irq, void *dev_id) ++{ ++ cam_data *cam = (cam_data *) dev_id; ++ ++ ipu_select_buffer(cam->ipu, CSI_MEM, IPU_OUTPUT_BUFFER, csi_buffer_num); ++ if ((cam->crop_current.width != cam->win.w.width) || ++ (cam->crop_current.height != cam->win.w.height) || ++ (vf_out_format != IPU_PIX_FMT_NV12) || ++ (cam->rotation >= IPU_ROTATE_VERT_FLIP)) ++ schedule_work(&cam->csi_work_struct); ++ csi_buffer_num = (csi_buffer_num == 0) ? 1 : 0; ++ return IRQ_HANDLED; ++} ++ ++static int csi_enc_setup(cam_data *cam) ++{ ++ ipu_channel_params_t params; ++ int err = 0, sensor_protocol = 0; + + CAMERA_TRACE("In csi_enc_setup\n"); + if (!cam) { @@ -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 +#include +#include -+#include ++#include ++#include "v4l2-int-device.h" +#include -+#include +#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 + +#include -+#include ++#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 +#include +#include -+#include +#include "mxc_v4l2_capture.h" + +#define OV5647_VOLTAGE_ANALOG 2800000 @@ -141685,5236 +152520,14328 @@ diff -Nur linux-4.1.10.orig/drivers/media/platform/mxc/capture/ov5647_mipi.c lin + pr_err("%s: cannot get analog voltage error\n", __func__); + } + -+ return ret; -+} ++ return ret; ++} ++ ++static s32 ov5647_write_reg(u16 reg, u8 val) ++{ ++ u8 au8Buf[3] = {0}; ++ ++ au8Buf[0] = reg >> 8; ++ au8Buf[1] = reg & 0xff; ++ au8Buf[2] = val; ++ ++ if (i2c_master_send(ov5647_data.i2c_client, au8Buf, 3) < 0) { ++ pr_err("%s:write reg error:reg=%x,val=%x\n", ++ __func__, reg, val); ++ return -1; ++ } ++ pr_debug("reg=%x,val=%x\n", reg, val); ++ return 0; ++} ++ ++static s32 ov5647_read_reg(u16 reg, u8 *val) ++{ ++ struct sensor_data *sensor = &ov5647_data; ++ struct i2c_client *client = sensor->i2c_client; ++ struct i2c_msg msgs[2]; ++ u8 buf[2]; ++ int ret; ++ ++ buf[0] = reg >> 8; ++ buf[1] = reg & 0xff; ++ msgs[0].addr = client->addr; ++ msgs[0].flags = 0; ++ msgs[0].len = 2; ++ msgs[0].buf = buf; ++ ++ msgs[1].addr = client->addr; ++ msgs[1].flags = I2C_M_RD; ++ msgs[1].len = 1; ++ msgs[1].buf = buf; ++ ++ ret = i2c_transfer(client->adapter, msgs, 2); ++ if (ret < 0) { ++ pr_err("%s(mipi):reg=%x ret=%d\n", __func__, reg, ret); ++ return ret; ++ } ++ *val = buf[0]; ++ pr_debug("%s(mipi):reg=%x,val=%x\n", __func__, reg, buf[0]); ++ return buf[0]; ++} ++ ++static int prev_sysclk, prev_HTS; ++static int AE_low, AE_high, AE_Target = 44; ++ ++void OV5647_stream_on(void) ++{ ++ ov5647_write_reg(0x4202, 0x00); ++ ov5647_write_reg(0x300D, 0x00); ++} ++ ++void OV5647_stream_off(void) ++{ ++ ov5647_write_reg(0x4202, 0x0f); ++ ov5647_write_reg(0x300D, 0x01); ++} ++ ++static const int sclk_rdiv_map[] = {1, 2, 4, 8}; ++ ++int OV5647_get_sysclk(void) ++{ ++ /* calculate sysclk */ ++ int tmp; ++ unsigned Multiplier, PreDiv, SysDiv, Pll_rdiv, Bit_div2x = 1; ++ unsigned div, sclk_rdiv, sysclk; ++ u8 temp; ++ ++ tmp = ov5647_read_reg(0x3034, &temp); ++ if (tmp < 0) ++ return tmp; ++ tmp &= 0x0f; ++ if (tmp == 8 || tmp == 10) ++ Bit_div2x = tmp / 2; ++ ++ tmp = ov5647_read_reg(0x3035, &temp); ++ if (tmp < 0) ++ return tmp; ++ SysDiv = tmp >> 4; ++ if (SysDiv == 0) ++ SysDiv = 16; ++ ++ tmp = ov5647_read_reg(0x3036, &temp); ++ if (tmp < 0) ++ return tmp; ++ Multiplier = tmp; ++ ++ tmp = ov5647_read_reg(0x3037, &temp); ++ if (tmp < 0) ++ return tmp; ++ PreDiv = tmp & 0x0f; ++ Pll_rdiv = ((tmp >> 4) & 0x01) + 1; ++ ++ tmp = ov5647_read_reg(0x3108, &temp); ++ if (tmp < 0) ++ return tmp; ++ sclk_rdiv = sclk_rdiv_map[tmp & 0x03]; ++ ++ sysclk = ov5647_data.mclk / 10000 * Multiplier; ++ div = PreDiv * SysDiv * Pll_rdiv * Bit_div2x * sclk_rdiv; ++ if (!div) { ++ pr_err("%s:Error divide by 0, (%d * %d * %d * %d * %d)\n", ++ __func__, PreDiv, SysDiv, Pll_rdiv, Bit_div2x, sclk_rdiv); ++ return -EINVAL; ++ } ++ if (!sysclk) { ++ pr_err("%s:Error 0 clk, ov5647_data.mclk=%d, Multiplier=%d\n", ++ __func__, ov5647_data.mclk, Multiplier); ++ return -EINVAL; ++ } ++ sysclk /= div; ++ pr_debug("%s: sysclk(%d) = %d / 10000 * %d / (%d * %d * %d * %d * %d)\n", ++ __func__, sysclk, ov5647_data.mclk, Multiplier, ++ PreDiv, SysDiv, Pll_rdiv, Bit_div2x, sclk_rdiv); ++ return sysclk; ++} ++ ++void OV5647_set_night_mode(void) ++{ ++ /* read HTS from register settings */ ++ u8 mode; ++ ++ ov5647_read_reg(0x3a00, &mode); ++ mode &= 0xfb; ++ ov5647_write_reg(0x3a00, mode); ++} ++ ++int OV5647_get_HTS(void) ++{ ++ /* read HTS from register settings */ ++ int HTS; ++ u8 temp; ++ ++ HTS = ov5647_read_reg(0x380c, &temp); ++ HTS = (HTS<<8) + ov5647_read_reg(0x380d, &temp); ++ ++ return HTS; ++} ++ ++int OV5647_get_VTS(void) ++{ ++ /* read VTS from register settings */ ++ int VTS; ++ u8 temp; ++ ++ /* total vertical size[15:8] high byte */ ++ VTS = ov5647_read_reg(0x380e, &temp); ++ ++ VTS = (VTS<<8) + ov5647_read_reg(0x380f, &temp); ++ ++ return VTS; ++} ++ ++int OV5647_set_VTS(int VTS) ++{ ++ /* write VTS to registers */ ++ int temp; ++ ++ temp = VTS & 0xff; ++ ov5647_write_reg(0x380f, temp); ++ ++ temp = VTS>>8; ++ ov5647_write_reg(0x380e, temp); ++ ++ return 0; ++} ++ ++int OV5647_get_shutter(void) ++{ ++ /* read shutter, in number of line period */ ++ int shutter; ++ u8 temp; ++ ++ shutter = (ov5647_read_reg(0x03500, &temp) & 0x0f); ++ shutter = (shutter<<8) + ov5647_read_reg(0x3501, &temp); ++ shutter = (shutter<<4) + (ov5647_read_reg(0x3502, &temp)>>4); ++ ++ return shutter; ++} ++ ++int OV5647_set_shutter(int shutter) ++{ ++ /* write shutter, in number of line period */ ++ int temp; ++ ++ shutter = shutter & 0xffff; ++ ++ temp = shutter & 0x0f; ++ temp = temp<<4; ++ ov5647_write_reg(0x3502, temp); ++ ++ temp = shutter & 0xfff; ++ temp = temp>>4; ++ ov5647_write_reg(0x3501, temp); ++ ++ temp = shutter>>12; ++ ov5647_write_reg(0x3500, temp); ++ ++ return 0; ++} ++ ++int OV5647_get_gain16(void) ++{ ++ /* read gain, 16 = 1x */ ++ int gain16; ++ u8 temp; ++ ++ gain16 = ov5647_read_reg(0x350a, &temp) & 0x03; ++ gain16 = (gain16<<8) + ov5647_read_reg(0x350b, &temp); ++ ++ return gain16; ++} ++ ++int OV5647_set_gain16(int gain16) ++{ ++ /* write gain, 16 = 1x */ ++ u8 temp; ++ gain16 = gain16 & 0x3ff; ++ ++ temp = gain16 & 0xff; ++ ov5647_write_reg(0x350b, temp); ++ ++ temp = gain16>>8; ++ ov5647_write_reg(0x350a, temp); ++ ++ return 0; ++} ++ ++int OV5647_get_light_freq(void) ++{ ++ /* get banding filter value */ ++ int temp, temp1, light_freq = 0; ++ u8 tmp; ++ ++ temp = ov5647_read_reg(0x3c01, &tmp); ++ ++ if (temp & 0x80) { ++ /* manual */ ++ temp1 = ov5647_read_reg(0x3c00, &tmp); ++ if (temp1 & 0x04) { ++ /* 50Hz */ ++ light_freq = 50; ++ } else { ++ /* 60Hz */ ++ light_freq = 60; ++ } ++ } else { ++ /* auto */ ++ temp1 = ov5647_read_reg(0x3c0c, &tmp); ++ if (temp1 & 0x01) { ++ /* 50Hz */ ++ light_freq = 50; ++ } else { ++ /* 60Hz */ ++ light_freq = 60; ++ } ++ } ++ return light_freq; ++} ++ ++void OV5647_set_bandingfilter(void) ++{ ++ int prev_VTS; ++ int band_step60, max_band60, band_step50, max_band50; ++ ++ /* read preview PCLK */ ++ prev_sysclk = OV5647_get_sysclk(); ++ /* read preview HTS */ ++ prev_HTS = OV5647_get_HTS(); ++ ++ /* read preview VTS */ ++ prev_VTS = OV5647_get_VTS(); ++ ++ /* calculate banding filter */ ++ /* 60Hz */ ++ band_step60 = prev_sysclk * 100/prev_HTS * 100/120; ++ ov5647_write_reg(0x3a0a, (band_step60 >> 8)); ++ ov5647_write_reg(0x3a0b, (band_step60 & 0xff)); ++ ++ max_band60 = (int)((prev_VTS-4)/band_step60); ++ ov5647_write_reg(0x3a0d, max_band60); ++ ++ /* 50Hz */ ++ band_step50 = prev_sysclk * 100/prev_HTS; ++ ov5647_write_reg(0x3a08, (band_step50 >> 8)); ++ ov5647_write_reg(0x3a09, (band_step50 & 0xff)); ++ ++ max_band50 = (int)((prev_VTS-4)/band_step50); ++ ov5647_write_reg(0x3a0e, max_band50); ++} ++ ++int OV5647_set_AE_target(int target) ++{ ++ /* stable in high */ ++ int fast_high, fast_low; ++ AE_low = target * 23 / 25; /* 0.92 */ ++ AE_high = target * 27 / 25; /* 1.08 */ ++ ++ fast_high = AE_high<<1; ++ if (fast_high > 255) ++ fast_high = 255; ++ ++ fast_low = AE_low >> 1; ++ ++ ov5647_write_reg(0x3a0f, AE_high); ++ ov5647_write_reg(0x3a10, AE_low); ++ ov5647_write_reg(0x3a1b, AE_high); ++ ov5647_write_reg(0x3a1e, AE_low); ++ ov5647_write_reg(0x3a11, fast_high); ++ ov5647_write_reg(0x3a1f, fast_low); ++ ++ return 0; ++} ++ ++void OV5647_turn_on_AE_AG(int enable) ++{ ++ u8 ae_ag_ctrl; ++ ++ ov5647_read_reg(0x3503, &ae_ag_ctrl); ++ if (enable) { ++ /* turn on auto AE/AG */ ++ ae_ag_ctrl = ae_ag_ctrl & ~(0x03); ++ } else { ++ /* turn off AE/AG */ ++ ae_ag_ctrl = ae_ag_ctrl | 0x03; ++ } ++ ov5647_write_reg(0x3503, ae_ag_ctrl); ++} ++ ++bool ov5647_binning_on(void) ++{ ++ u8 temp; ++ ov5647_read_reg(0x3821, &temp); ++ temp &= 0xfe; ++ if (temp) ++ return true; ++ else ++ return false; ++} ++ ++static void ov5647_set_virtual_channel(int channel) ++{ ++ u8 channel_id; ++ ++ ov5647_read_reg(0x4814, &channel_id); ++ channel_id &= ~(3 << 6); ++ ov5647_write_reg(0x4814, channel_id | (channel << 6)); ++} ++ ++/* download ov5647 settings to sensor through i2c */ ++static int ov5647_download_firmware(struct reg_value *pModeSetting, s32 ArySize) ++{ ++ register u32 Delay_ms = 0; ++ register u16 RegAddr = 0; ++ register u8 Mask = 0; ++ register u8 Val = 0; ++ u8 RegVal = 0; ++ int i, retval = 0; ++ ++ for (i = 0; i < ArySize; ++i, ++pModeSetting) { ++ Delay_ms = pModeSetting->u32Delay_ms; ++ RegAddr = pModeSetting->u16RegAddr; ++ Val = pModeSetting->u8Val; ++ Mask = pModeSetting->u8Mask; ++ ++ if (Mask) { ++ retval = ov5647_read_reg(RegAddr, &RegVal); ++ if (retval < 0) ++ goto err; ++ ++ RegVal &= ~(u8)Mask; ++ Val &= Mask; ++ Val |= RegVal; ++ } ++ ++ retval = ov5647_write_reg(RegAddr, Val); ++ if (retval < 0) ++ goto err; ++ ++ if (Delay_ms) ++ msleep(Delay_ms); ++ } ++err: ++ return retval; ++} ++ ++/* sensor changes between scaling and subsampling ++ * go through exposure calcualtion ++ */ ++static int ov5647_change_mode_exposure_calc(enum ov5647_frame_rate frame_rate, ++ enum ov5647_mode mode) ++{ ++ struct reg_value *pModeSetting = NULL; ++ s32 ArySize = 0; ++ u8 average; ++ int prev_shutter, prev_gain16; ++ int cap_shutter, cap_gain16; ++ int cap_sysclk, cap_HTS, cap_VTS; ++ int light_freq, cap_bandfilt, cap_maxband; ++ long cap_gain16_shutter; ++ int retval = 0; ++ ++ /* check if the input mode and frame rate is valid */ ++ pModeSetting = ++ ov5647_mode_info_data[frame_rate][mode].init_data_ptr; ++ ArySize = ++ ov5647_mode_info_data[frame_rate][mode].init_data_size; ++ ++ ov5647_data.pix.width = ++ ov5647_mode_info_data[frame_rate][mode].width; ++ ov5647_data.pix.height = ++ ov5647_mode_info_data[frame_rate][mode].height; ++ ov5647_data_add.map_sizeimage = ++ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; ++ ++ if (ov5647_data.pix.width == 0 || ov5647_data.pix.height == 0 || ++ pModeSetting == NULL || ArySize == 0) ++ return -EINVAL; ++ ++ /* turn off AE/AG */ ++ OV5647_turn_on_AE_AG(0); ++ ++ /* read preview shutter */ ++ prev_shutter = OV5647_get_shutter(); ++ if ((ov5647_binning_on()) && (mode != ov5647_mode_960P_1280_960) && ++ (mode != ov5647_mode_720P_1280_720) && (mode != ov5647_mode_1080P_1920_1080)) ++ prev_shutter *= 2; ++ ++ /* read preview gain */ ++ prev_gain16 = OV5647_get_gain16(); ++ ++ /* get average */ ++ ov5647_read_reg(0x5693, &average); ++ ++ /* turn off night mode for capture */ ++ OV5647_set_night_mode(); ++ ++ /* turn off overlay */ ++ /* ov5647_write_reg(0x3022, 0x06);//if no af function, just skip it */ ++ ++ OV5647_stream_off(); ++ ++ /* Write capture setting */ ++ retval = ov5647_download_firmware(pModeSetting, ArySize); ++ if (retval < 0) ++ goto err; ++ ++ /* read capture VTS */ ++ cap_VTS = OV5647_get_VTS(); ++ cap_HTS = OV5647_get_HTS(); ++ cap_sysclk = OV5647_get_sysclk(); ++ ++ /* calculate capture banding filter */ ++ light_freq = OV5647_get_light_freq(); ++ if (light_freq == 60) { ++ /* 60Hz */ ++ cap_bandfilt = cap_sysclk * 100 / cap_HTS * 100 / 120; ++ } else { ++ /* 50Hz */ ++ cap_bandfilt = cap_sysclk * 100 / cap_HTS; ++ } ++ cap_maxband = (int)((cap_VTS - 4)/cap_bandfilt); ++ ++ /* calculate capture shutter/gain16 */ ++ if (average > AE_low && average < AE_high) { ++ /* in stable range */ ++ cap_gain16_shutter = ++ prev_gain16 * prev_shutter * cap_sysclk/prev_sysclk ++ * prev_HTS/cap_HTS * AE_Target / average; ++ } else { ++ cap_gain16_shutter = ++ prev_gain16 * prev_shutter * cap_sysclk/prev_sysclk ++ * prev_HTS/cap_HTS; ++ } ++ ++ /* gain to shutter */ ++ if (cap_gain16_shutter < (cap_bandfilt * 16)) { ++ /* shutter < 1/100 */ ++ cap_shutter = cap_gain16_shutter/16; ++ if (cap_shutter < 1) ++ cap_shutter = 1; ++ ++ cap_gain16 = cap_gain16_shutter/cap_shutter; ++ if (cap_gain16 < 16) ++ cap_gain16 = 16; ++ } else { ++ if (cap_gain16_shutter > ++ (cap_bandfilt * cap_maxband * 16)) { ++ /* exposure reach max */ ++ cap_shutter = cap_bandfilt * cap_maxband; ++ cap_gain16 = cap_gain16_shutter / cap_shutter; ++ } else { ++ /* 1/100 < (cap_shutter = n/100) =< max */ ++ cap_shutter = ++ ((int) (cap_gain16_shutter/16 / cap_bandfilt)) ++ *cap_bandfilt; ++ cap_gain16 = cap_gain16_shutter / cap_shutter; ++ } ++ } ++ ++ /* write capture gain */ ++ OV5647_set_gain16(cap_gain16); ++ ++ /* write capture shutter */ ++ if (cap_shutter > (cap_VTS - 4)) { ++ cap_VTS = cap_shutter + 4; ++ OV5647_set_VTS(cap_VTS); ++ } ++ OV5647_set_shutter(cap_shutter); ++ ++ OV5647_stream_on(); ++ ++err: ++ return retval; ++} ++ ++/* if sensor changes inside scaling or subsampling ++ * change mode directly ++ * */ ++static int ov5647_change_mode_direct(enum ov5647_frame_rate frame_rate, ++ enum ov5647_mode mode) ++{ ++ struct reg_value *pModeSetting = NULL; ++ s32 ArySize = 0; ++ int retval = 0; ++ ++ /* check if the input mode and frame rate is valid */ ++ pModeSetting = ++ ov5647_mode_info_data[frame_rate][mode].init_data_ptr; ++ ArySize = ++ ov5647_mode_info_data[frame_rate][mode].init_data_size; ++ ++ ov5647_data.pix.width = ++ ov5647_mode_info_data[frame_rate][mode].width; ++ ov5647_data.pix.height = ++ ov5647_mode_info_data[frame_rate][mode].height; ++ ov5647_data_add.map_sizeimage = ++ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; ++ ++ if (ov5647_data.pix.width == 0 || ov5647_data.pix.height == 0 || ++ pModeSetting == NULL || ArySize == 0) ++ return -EINVAL; ++ ++ /* turn off AE/AG */ ++ OV5647_turn_on_AE_AG(0); ++ ++ OV5647_stream_off(); ++ ++ /* Write capture setting */ ++ retval = ov5647_download_firmware(pModeSetting, ArySize); ++ if (retval < 0) ++ goto err; ++ ++ OV5647_stream_on(); ++ ++ OV5647_turn_on_AE_AG(1); ++ ++err: ++ return retval; ++} ++ ++static int ov5647_init_mode(enum ov5647_frame_rate frame_rate, ++ enum ov5647_mode mode, enum ov5647_mode orig_mode) ++{ ++ struct reg_value *pModeSetting = NULL; ++ s32 ArySize = 0; ++ int retval = 0; ++ void *mipi_csi2_info; ++ u32 mipi_reg, msec_wait4stable = 0; ++ enum ov5647_downsize_mode dn_mode, orig_dn_mode; ++ ++ if ((mode > ov5647_mode_MAX || mode < ov5647_mode_MIN) ++ && (mode != ov5647_mode_INIT)) { ++ pr_err("Wrong ov5647 mode detected!\n"); ++ return -1; ++ } ++ ++ mipi_csi2_info = mipi_csi2_get_info(); ++ ++ /* initial mipi dphy */ ++ if (!mipi_csi2_info) { ++ printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n", ++ __func__, __FILE__); ++ return -1; ++ } ++ ++ ov5647_write_reg(0x4800, 0x25); ++ OV5647_stream_off(); ++ ++ if (!mipi_csi2_get_status(mipi_csi2_info)) ++ 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; ++ } ++ ++ mipi_csi2_set_lanes(mipi_csi2_info, 2); ++ ++ /*Only reset MIPI CSI2 HW at sensor initialize*/ ++ if (mode == ov5647_mode_INIT) ++ mipi_csi2_reset(mipi_csi2_info); ++ ++ /* reg 0x3034[3:0] == 0x8 is 8bit mode */ ++ mipi_csi2_set_datatype(mipi_csi2_info, MIPI_DT_RAW8); ++ ++ if (orig_mode != ov5647_mode_INIT) { ++ dn_mode = ov5647_mode_info_data[frame_rate][mode].dn_mode; ++ orig_dn_mode = ov5647_mode_info_data[frame_rate][orig_mode].dn_mode; ++ } ++ else { ++ orig_dn_mode = dn_mode = 0; ++ } ++ ++ if (mode == ov5647_mode_INIT) { ++ int index = (int)ov5647_data.streamcap.capturemode; ++ ++ pModeSetting = ov5647_mode_info_data[frame_rate][index].init_data_ptr; ++ ArySize = ov5647_mode_info_data[frame_rate][index].init_data_size; ++ retval = ov5647_download_firmware(pModeSetting, ArySize); ++ if (retval < 0) ++ goto err; ++ } else if ((dn_mode == SUBSAMPLING && orig_dn_mode == SCALING) || ++ (dn_mode == SCALING && orig_dn_mode == SUBSAMPLING)) { ++ /* change between subsampling and scaling ++ * go through exposure calucation */ ++ retval = ov5647_change_mode_exposure_calc(frame_rate, mode); ++ } else { ++ /* change inside subsampling or scaling ++ * download firmware directly */ ++ retval = ov5647_change_mode_direct(frame_rate, mode); ++ } ++ ++ if (retval < 0) ++ goto err; ++ ++ OV5647_set_AE_target(AE_Target); ++ OV5647_get_light_freq(); ++ OV5647_set_bandingfilter(); ++ ov5647_set_virtual_channel(ov5647_data.virtual_channel); ++ ++ /* add delay to wait for sensor stable */ ++ if (frame_rate == ov5647_15_fps) { ++ /* dump the first nine frames: 1/15*9 */ ++ msec_wait4stable = 600; ++ } else if (frame_rate == ov5647_30_fps) { ++ /* dump the first nine frames: 1/30*9 */ ++ msec_wait4stable = 300; ++ } ++ msleep(msec_wait4stable); ++ ++ if (mipi_csi2_info) { ++ unsigned int i = 0; ++ u8 resetval; ++ ++ /* wait for mipi sensor ready */ ++ while (1) { ++ mipi_reg = mipi_csi2_dphy_status(mipi_csi2_info); ++ if (mipi_reg != 0x200) ++ break; ++ if (i++ >= 20) { ++ pr_err("mipi csi2 can not receive sensor clk! %x\n", mipi_reg); ++ return -1; ++ } ++ msleep(10); ++ } ++ ++ i = 0; ++ /* wait for mipi stable */ ++ while (1) { ++ mipi_reg = mipi_csi2_get_error1(mipi_csi2_info); ++ if (!mipi_reg) ++ break; ++ if (i++ >= 20) { ++ pr_err("mipi csi2 can not receive data correctly!\n"); ++ return -1; ++ } ++ msleep(10); ++ } ++ ++ pr_debug("receiving data"); ++ mipi_reg = mipi_csi2_get_error2(mipi_csi2_info); ++ pr_debug("mipi_csi2 error2 = 0x%X\n", mipi_reg); ++ mipi_reg = mipi_csi2_dphy_status(mipi_csi2_info); ++ pr_debug("mipi_csi2_dphy_status = 0x%X\n", mipi_reg); ++ ++ ov5647_read_reg(0x0100, &resetval); ++ if (!resetval&0x01) { ++ pr_info("DEVICE WAS IN SOFTWARE STANDBY"); ++ ov5647_write_reg(0x0100, 0x01); ++ } ++ ++ ov5647_write_reg(0x4800, 0x04); ++ msleep(266); ++ OV5647_stream_on(); ++ msleep(30); ++ OV5647_turn_on_AE_AG(1); ++ } ++err: ++ return retval; ++} ++ ++/* --------------- IOCTL functions from v4l2_int_ioctl_desc --------------- */ ++ ++static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p) ++{ ++ if (s == NULL) { ++ pr_err(" ERROR!! no slave device set!\n"); ++ return -1; ++ } ++ ++ memset(p, 0, sizeof(*p)); ++ p->u.bt656.clock_curr = ov5647_data.mclk; ++ pr_debug(" clock_curr=mclk=%d\n", ov5647_data.mclk); ++ p->if_type = V4L2_IF_TYPE_BT656; ++ p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_10BIT; ++ p->u.bt656.clock_min = OV5647_XCLK_MIN; ++ p->u.bt656.clock_max = OV5647_XCLK_MAX; ++ p->u.bt656.bt_sync_correct = 1; /* Indicate external vsync */ ++ ++ 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 sensor_data *sensor = s->priv; ++ ++ if (on && !sensor->on) { ++ if (io_regulator) ++ if (regulator_enable(io_regulator) != 0) ++ return -EIO; ++ if (core_regulator) ++ if (regulator_enable(core_regulator) != 0) ++ return -EIO; ++ if (gpo_regulator) ++ if (regulator_enable(gpo_regulator) != 0) ++ return -EIO; ++ if (analog_regulator) ++ if (regulator_enable(analog_regulator) != 0) ++ return -EIO; ++ /* Make sure power on */ ++ ov5647_standby(0); ++ } else if (!on && sensor->on) { ++ if (analog_regulator) ++ regulator_disable(analog_regulator); ++ if (core_regulator) ++ regulator_disable(core_regulator); ++ if (io_regulator) ++ regulator_disable(io_regulator); ++ if (gpo_regulator) ++ regulator_disable(gpo_regulator); ++ ++ ov5647_standby(1); ++ } ++ ++ sensor->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_data *sensor = s->priv; ++ struct v4l2_captureparm *cparm = &a->parm.capture; ++ int ret = 0; ++ ++ 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; ++ 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; ++ } ++ ++ 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 sensor_data *sensor = s->priv; ++ struct v4l2_fract *timeperframe = &a->parm.capture.timeperframe; ++ u32 tgt_fps; /* target frames per secound */ ++ enum ov5647_frame_rate frame_rate; ++ enum ov5647_mode orig_mode; ++ int ret = 0; ++ ++ /* Make sure power on */ ++ ov5647_standby(0); ++ ++ 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 == 15) ++ frame_rate = ov5647_15_fps; ++ else if (tgt_fps == 30) ++ frame_rate = ov5647_30_fps; ++ else { ++ pr_err(" The camera frame rate is not supported!\n"); ++ return -EINVAL; ++ } ++ ++ orig_mode = sensor->streamcap.capturemode; ++ ret = ov5647_init_mode(frame_rate, ++ (u32)a->parm.capture.capturemode, orig_mode); ++ if (ret < 0) ++ return ret; ++ ++ sensor->streamcap.timeperframe = *timeperframe; ++ sensor->streamcap.capturemode = ++ (u32)a->parm.capture.capturemode; ++ ++ 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; ++ } ++ ++ 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 sensor_data *sensor = s->priv; ++ ++ 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: ++ break; ++ ++ default: ++ f->fmt.pix = sensor->pix; ++ break; ++ } ++ ++ return 0; ++} ++ ++/*! ++ * 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) ++{ ++ int ret = 0; ++ ++ switch (vc->id) { ++ case V4L2_CID_BRIGHTNESS: ++ vc->value = ov5647_data.brightness; ++ break; ++ case V4L2_CID_HUE: ++ vc->value = ov5647_data.hue; ++ break; ++ case V4L2_CID_CONTRAST: ++ vc->value = ov5647_data.contrast; ++ break; ++ case V4L2_CID_SATURATION: ++ vc->value = ov5647_data.saturation; ++ break; ++ case V4L2_CID_RED_BALANCE: ++ vc->value = ov5647_data.red; ++ break; ++ case V4L2_CID_BLUE_BALANCE: ++ vc->value = ov5647_data.blue; ++ break; ++ case V4L2_CID_EXPOSURE: ++ vc->value = ov5647_data.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 ov5647: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) ++{ ++ if (fsize->index > ov5647_mode_MAX) ++ return -EINVAL; ++ ++ fsize->pixel_format = ov5647_data.pix.pixelformat; ++ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; ++ fsize->discrete.width = ++ max(ov5647_mode_info_data[0][fsize->index].width, ++ ov5647_mode_info_data[1][fsize->index].width); ++ fsize->discrete.height = ++ max(ov5647_mode_info_data[0][fsize->index].height, ++ ov5647_mode_info_data[1][fsize->index].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 v4l2_dbg_chip_ident *)id)->match.type = ++ V4L2_CHIP_MATCH_I2C_DRIVER; ++ strcpy(((struct v4l2_dbg_chip_ident *)id)->match.name, ++ "ov5647_mipi_camera"); ++ ++ 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) ++{ ++ ++ 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) ++{ ++ if (fmt->index > ov5647_mode_MAX) ++ return -EINVAL; ++ ++ fmt->pixelformat = ov5647_data.pix.pixelformat; ++ ++ 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 sensor_data *sensor = s->priv; ++ u32 tgt_xclk; /* target xclk */ ++ u32 tgt_fps; /* target frames per secound */ ++ int ret; ++ enum ov5647_frame_rate frame_rate; ++ void *mipi_csi2_info; ++ ++ ov5647_data.on = true; ++ ++ /* mclk */ ++ tgt_xclk = ov5647_data.mclk; ++ tgt_xclk = min(tgt_xclk, (u32)OV5647_XCLK_MAX); ++ tgt_xclk = max(tgt_xclk, (u32)OV5647_XCLK_MIN); ++ ov5647_data.mclk = tgt_xclk; ++ ++ pr_debug(" Setting mclk to %d MHz\n", tgt_xclk / 1000000); ++ ++ /* Default camera frame rate is set in probe */ ++ tgt_fps = sensor->streamcap.timeperframe.denominator / ++ sensor->streamcap.timeperframe.numerator; ++ ++ if (tgt_fps == 15) ++ frame_rate = ov5647_15_fps; ++ else if (tgt_fps == 30) ++ frame_rate = ov5647_30_fps; ++ else ++ return -EINVAL; /* Only support 15fps or 30fps now. */ ++ ++ mipi_csi2_info = mipi_csi2_get_info(); ++ ++ /* enable mipi csi2 */ ++ if (mipi_csi2_info) ++ mipi_csi2_enable(mipi_csi2_info); ++ else { ++ printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n", ++ __func__, __FILE__); ++ return -EPERM; ++ } ++ ++ ret = ov5647_init_mode(frame_rate, ov5647_mode_INIT, ov5647_mode_INIT); ++ ++ return ret; ++} ++ ++/*! ++ * 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 ov5647_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_g_needs_reset_num, ++ (v4l2_int_ioctl_func *)ioctl_g_needs_reset}, */ ++/* {vidioc_int_reset_num, (v4l2_int_ioctl_func *)ioctl_reset}, */ ++ {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_s_fmt_cap_num, (v4l2_int_ioctl_func *) ioctl_s_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_queryctrl_num, (v4l2_int_ioctl_func *)ioctl_queryctrl}, */ ++ {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 ov5647_slave = { ++ .ioctls = ov5647_ioctl_desc, ++ .num_ioctls = ARRAY_SIZE(ov5647_ioctl_desc), ++}; ++ ++static struct v4l2_int_device ov5647_int_device = { ++ .module = THIS_MODULE, ++ .name = "ov5647_mipi", ++ .type = v4l2_int_type_slave, ++ .u = { ++ .slave = &ov5647_slave, ++ }, ++}; ++ ++static ssize_t show_reg(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ u8 val; ++ s32 rval = ov5647_read_reg(ov5647_data.last_reg, &val); ++ ++ return sprintf(buf, "ov5647[0x%04x]=0x%02x\n",ov5647_data.last_reg, rval); ++} ++static ssize_t set_reg(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ int regnum, value; ++ int num_parsed = sscanf(buf, "%04x=%02x", ®num, &value); ++ if (1 <= num_parsed) { ++ if (0xffff < (unsigned)regnum){ ++ pr_err("%s:invalid regnum %x\n", __func__, regnum); ++ return 0; ++ } ++ ov5647_data.last_reg = regnum; ++ } ++ if (2 == num_parsed) { ++ if (0xff < (unsigned)value) { ++ pr_err("%s:invalid value %x\n", __func__, value); ++ return 0; ++ } ++ ov5647_write_reg(ov5647_data.last_reg, value); ++ } ++ return count; ++} ++ ++/* XXX: workaround for v4l2 client except for gstreamer-imx */ ++static ssize_t show_mode(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ return sprintf(buf, "ov5647 mode = 0x%02x\n", (int)ov5647_data.streamcap.capturemode); ++} ++ ++static ssize_t set_mode(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ unsigned long mode; ++ ++ mode = simple_strtoul(buf, NULL, 10); ++ if ((enum ov5647_mode)mode >= ov5647_mode_MIN && ++ (enum ov5647_mode)mode <= ov5647_mode_MAX) { ++ ++ ov5647_data.streamcap.capturemode = mode; ++ ov5647_data.pix.width = ++ max(ov5647_mode_info_data[0][mode].width, ++ ov5647_mode_info_data[1][mode].width); ++ ov5647_data.pix.height = ++ max(ov5647_mode_info_data[0][mode].height, ++ ov5647_mode_info_data[1][mode].height); ++ ov5647_data_add.map_sizeimage = ++ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; ++ } ++ ++ return count; ++} ++ ++static DEVICE_ATTR(ov5647_reg, S_IRUGO|S_IWUSR|S_IWGRP, show_reg, set_reg); ++static DEVICE_ATTR(ov5647_mode, S_IRUGO|S_IWUSR|S_IWGRP, show_mode, set_mode); ++ ++/*! ++ * ov5647 I2C probe function ++ * ++ * @param adapter struct i2c_adapter * ++ * @return Error code indicating success or failure ++ */ ++static int ov5647_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct device *dev = &client->dev; ++ int retval, init, gpio; ++ u8 chip_id_high, chip_id_low; ++ struct sensor_data *sensor = &ov5647_data; ++ enum of_gpio_flags flags; ++ bool extbuf; ++ ++ /* request power down pin */ ++ pwn_gpio = of_get_named_gpio_flags(dev->of_node, "pwn-gpios", 0, &flags); ++ if (gpio_is_valid(pwn_gpio)) { ++ /* powon_active - camera power on */ ++ /* !powon_active - camera power down */ ++ powon_active = !(flags & OF_GPIO_ACTIVE_LOW); ++ init = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; ++ ++ retval = devm_gpio_request_one(dev, pwn_gpio, init, "ov5647_mipi_pwdn"); ++ if (retval < 0) { ++ dev_warn(dev, "request of pwn_gpio failed"); ++ pwn_gpio = -EINVAL; ++ } ++ } ++ ++ /* request reset pin */ ++ rst_gpio = of_get_named_gpio_flags(dev->of_node, "rst-gpios", 0, &flags); ++ if (gpio_is_valid(rst_gpio)) { ++ /* rst_active - camera reset */ ++ /* !rst_active - clear camera reset */ ++ rst_active = !(flags & OF_GPIO_ACTIVE_LOW); ++ init = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; ++ ++ retval = devm_gpio_request_one(dev, rst_gpio, init, "ov5647_mipi_reset"); ++ if (retval < 0) { ++ dev_warn(dev, "request of ov5647_mipi_reset failed"); ++ rst_gpio = -EINVAL; ++ } ++ } ++ ++ /* request LED(for sanity) pin */ ++ gpio = of_get_named_gpio_flags(dev->of_node, "led-gpios", 0, &flags); ++ if (gpio_is_valid(gpio)) { ++ /* led_active - LED turn on */ ++ /* !led_active - LED trun off */ ++ led_active = !(flags & OF_GPIO_ACTIVE_LOW); ++ init = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; ++ ++ retval = devm_gpio_request_one(dev, gpio, init, "ov5647_mipi_led"); ++ if (retval < 0) { ++ dev_warn(dev, "request of led_gpio failed"); ++ gpio = -EINVAL; ++ } ++ } ++ ++ /* allocate extended video frame buffer */ ++ extbuf = of_find_property(dev->of_node, "extended-buffer", NULL); ++ ++ /* Set initial values for the sensor struct. */ ++ memset(&ov5647_data, 0, sizeof(ov5647_data)); ++ memset(&ov5647_data_add, 0, sizeof(ov5647_data_add)); ++ ++ sensor->mipi_camera = 1; ++ ov5647_data.sensor_clk = devm_clk_get(dev, "csi_mclk"); ++ if (IS_ERR(ov5647_data.sensor_clk)) { ++ /* assuming clock enabled by default */ ++ ov5647_data.sensor_clk = NULL; ++ dev_err(dev, "clock-frequency missing or invalid\n"); ++ return PTR_ERR(ov5647_data.sensor_clk); ++ } ++ ++ retval = of_property_read_u32(dev->of_node, "mclk", ++ &(ov5647_data.mclk)); ++ if (retval) { ++ dev_err(dev, "mclk missing or invalid\n"); ++ return retval; ++ } ++ ++ retval = of_property_read_u32(dev->of_node, "mclk_source", ++ (u32 *) &(ov5647_data.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", ++ &(ov5647_data.csi)); ++ if (retval) { ++ dev_err(dev, "csi id missing or invalid\n"); ++ return retval; ++ } ++ ++ clk_prepare_enable(ov5647_data.sensor_clk); ++ ++ ov5647_data.io_init = ov5647_reset; ++ ov5647_data.i2c_client = client; ++ /* real OV5647 pixelformat is V4L2_PIX_FMT_SBGGR10. */ ++ /* i.MX6 CSI CPD convert 10 bits color data to 8 bits. */ ++ /* (see drivers/mxc/ipu3/ipu_capture.c - _ipu_csi_init) */ ++ ov5647_data.pix.pixelformat = V4L2_PIX_FMT_SBGGR8; ++ ov5647_data.pix.width = 1024; ++ ov5647_data.pix.height = 768; ++ ov5647_data.streamcap.capability = V4L2_MODE_HIGHQUALITY | ++ V4L2_CAP_TIMEPERFRAME; ++ ov5647_data.streamcap.capturemode = ov5647_mode_XGA_1024_768; ++ ov5647_data.streamcap.timeperframe.denominator = DEFAULT_FPS; ++ ov5647_data.streamcap.timeperframe.numerator = 1; ++ ++ /* lager memory allocate for Vivante direct texture mapping API */ ++ /* (VIDIOC_REQBUFS ioctl) */ ++ ov5647_data_add.map_sizeimage = ++ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; /* I420 */ ++ ++ if (extbuf) { ++ ov5647_data.adata = &ov5647_data_add; ++ } ++ ++ ov5647_power_on(dev); ++ ++ ov5647_reset(); ++ ++ ov5647_standby(0); ++ ++ retval = ov5647_read_reg(OV5647_CHIP_ID_HIGH_BYTE, &chip_id_high); ++ if (retval < 0 || chip_id_high != 0x56) { ++ pr_warning("camera ov5647_mipi is not found\n"); ++ clk_disable_unprepare(ov5647_data.sensor_clk); ++ return -ENODEV; ++ } ++ retval = ov5647_read_reg(OV5647_CHIP_ID_LOW_BYTE, &chip_id_low); ++ if (retval < 0 || chip_id_low != 0x47) { ++ pr_warning("camera ov5647_mipi is not found\n"); ++ clk_disable_unprepare(ov5647_data.sensor_clk); ++ return -ENODEV; ++ } ++ ++ sensor->virtual_channel = sensor->csi | (sensor->ipu_id << 1); ++ ov5647_standby(1); ++ ++ led_gpio = gpio; ++ ov5647_int_device.priv = &ov5647_data; ++ retval = v4l2_int_device_register(&ov5647_int_device); ++ ++// clk_disable_unprepare(ov5647_data.sensor_clk); ++ ++ if (device_create_file(dev, &dev_attr_ov5647_reg)) ++ dev_err(dev, "%s: error creating ov5647_reg entry\n", __func__); ++ if (device_create_file(dev, &dev_attr_ov5647_mode)) ++ dev_err(dev, "%s: error creating ov5647_mode entry\n", __func__); ++ ++ pr_info("camera ov5647_mipi is found\n"); ++ return retval; ++} ++ ++/*! ++ * ov5647 I2C detach function ++ * ++ * @param client struct i2c_client * ++ * @return Error code indicating success or failure ++ */ ++static int ov5647_remove(struct i2c_client *client) ++{ ++ v4l2_int_device_unregister(&ov5647_int_device); ++ ++ if (gpo_regulator) ++ regulator_disable(gpo_regulator); ++ ++ if (analog_regulator) ++ regulator_disable(analog_regulator); ++ ++ if (core_regulator) ++ regulator_disable(core_regulator); ++ ++ if (io_regulator) ++ regulator_disable(io_regulator); ++ ++ return 0; ++} ++ ++/*! ++ * ov5647 init function ++ * Called by insmod ov5647_camera.ko. ++ * ++ * @return Error code indicating success or failure ++ */ ++static __init int ov5647_init(void) ++{ ++ u8 err; ++ ++ err = i2c_add_driver(&ov5647_i2c_driver); ++ if (err != 0) ++ pr_err("%s:driver registration failed, error=%d\n", ++ __func__, err); ++ ++ return err; ++} ++ ++/*! ++ * OV5647 cleanup function ++ * Called on rmmod ov5647_camera.ko ++ * ++ * @return Error code indicating success or failure ++ */ ++static void __exit ov5647_clean(void) ++{ ++ i2c_del_driver(&ov5647_i2c_driver); ++} ++ ++module_init(ov5647_init); ++module_exit(ov5647_clean); ++ ++MODULE_AUTHOR("Viion Systems Inc."); ++MODULE_DESCRIPTION("OV5647 MIPI Camera Driver"); ++MODULE_LICENSE("GPL"); ++MODULE_VERSION("1.0"); ++MODULE_ALIAS("CSI"); +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 ++ * 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 ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "v4l2-int-device.h" ++#include ++#include ++#include ++#include ++#include ++#include ++//#include ++#include ++#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; iaccess_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 for details ++ */ ++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#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 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 "); ++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 ++ * ++ * 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 ++#include ++#include ++#include ++#include ++ ++#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 ++ * ++ * 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 ++ ++#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/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/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. ++ */ ++ ++/* ++ * 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 ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include + -+static s32 ov5647_write_reg(u16 reg, u8 val) -+{ -+ u8 au8Buf[3] = {0}; ++#define UYVY_BLACK (0x00800080) ++#define RGB_BLACK (0x0) ++#define UV_BLACK (0x80) ++#define Y_BLACK (0x0) + -+ au8Buf[0] = reg >> 8; -+ au8Buf[1] = reg & 0xff; -+ au8Buf[2] = val; ++#define MAX_FB_NUM 6 ++#define FB_BUFS 3 ++#define VDOA_FB_BUFS (FB_BUFS - 1) ++#define VALID_HEIGHT_1080P (1080) ++#define FRAME_HEIGHT_1080P (1088) ++#define FRAME_WIDTH_1080P (1920) ++#define CHECK_TILED_1080P_DISPLAY(vout) \ ++ ((((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12) || \ ++ ((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12F)) &&\ ++ ((vout)->task.input.width == FRAME_WIDTH_1080P) && \ ++ ((vout)->task.input.height == FRAME_HEIGHT_1080P) && \ ++ ((vout)->task.input.crop.w == FRAME_WIDTH_1080P) && \ ++ (((vout)->task.input.crop.h == FRAME_HEIGHT_1080P) || \ ++ ((vout)->task.input.crop.h == VALID_HEIGHT_1080P)) && \ ++ ((vout)->task.output.width == FRAME_WIDTH_1080P) && \ ++ ((vout)->task.output.height == VALID_HEIGHT_1080P) && \ ++ ((vout)->task.output.crop.w == FRAME_WIDTH_1080P) && \ ++ ((vout)->task.output.crop.h == VALID_HEIGHT_1080P)) ++#define CHECK_TILED_1080P_STREAM(vout) \ ++ ((((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12) || \ ++ ((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12F)) &&\ ++ ((vout)->task.input.width == FRAME_WIDTH_1080P) && \ ++ ((vout)->task.input.crop.w == FRAME_WIDTH_1080P) && \ ++ ((vout)->task.input.height == FRAME_HEIGHT_1080P) && \ ++ ((vout)->task.input.crop.h == FRAME_HEIGHT_1080P)) ++#define IS_PLANAR_PIXEL_FORMAT(format) \ ++ (format == IPU_PIX_FMT_NV12 || \ ++ format == IPU_PIX_FMT_YUV420P2 || \ ++ format == IPU_PIX_FMT_YUV420P || \ ++ format == IPU_PIX_FMT_YVU420P || \ ++ format == IPU_PIX_FMT_YUV422P || \ ++ format == IPU_PIX_FMT_YVU422P || \ ++ format == IPU_PIX_FMT_YUV444P) + -+ if (i2c_master_send(ov5647_data.i2c_client, au8Buf, 3) < 0) { -+ pr_err("%s:write reg error:reg=%x,val=%x\n", -+ __func__, reg, val); -+ return -1; -+ } -+ pr_debug("reg=%x,val=%x\n", reg, val); -+ return 0; -+} ++#define NSEC_PER_FRAME_30FPS (33333333) + -+static s32 ov5647_read_reg(u16 reg, u8 *val) -+{ -+ struct sensor_data *sensor = &ov5647_data; -+ struct i2c_client *client = sensor->i2c_client; -+ struct i2c_msg msgs[2]; -+ u8 buf[2]; -+ int ret; ++struct mxc_vout_fb { ++ char *name; ++ int ipu_id; ++ struct v4l2_rect crop_bounds; ++ unsigned int disp_fmt; ++ bool disp_support_csc; ++ bool disp_support_windows; ++}; + -+ buf[0] = reg >> 8; -+ buf[1] = reg & 0xff; -+ msgs[0].addr = client->addr; -+ msgs[0].flags = 0; -+ msgs[0].len = 2; -+ msgs[0].buf = buf; ++struct dma_mem { ++ void *vaddr; ++ dma_addr_t paddr; ++ size_t size; ++}; + -+ msgs[1].addr = client->addr; -+ msgs[1].flags = I2C_M_RD; -+ msgs[1].len = 1; -+ msgs[1].buf = buf; ++struct mxc_vout_output { ++ int open_cnt; ++ struct fb_info *fbi; ++ unsigned long fb_smem_start; ++ unsigned long fb_smem_len; ++ struct video_device *vfd; ++ struct mutex mutex; ++ struct mutex task_lock; ++ enum v4l2_buf_type type; + -+ ret = i2c_transfer(client->adapter, msgs, 2); -+ if (ret < 0) { -+ pr_err("%s(mipi):reg=%x ret=%d\n", __func__, reg, ret); -+ return ret; -+ } -+ *val = buf[0]; -+ pr_debug("%s(mipi):reg=%x,val=%x\n", __func__, reg, buf[0]); -+ return buf[0]; -+} ++ struct videobuf_queue vbq; ++ spinlock_t vbq_lock; + -+static int prev_sysclk, prev_HTS; -+static int AE_low, AE_high, AE_Target = 44; ++ struct list_head queue_list; ++ struct list_head active_list; + -+void OV5647_stream_on(void) -+{ -+ ov5647_write_reg(0x4202, 0x00); -+ ov5647_write_reg(0x300D, 0x00); -+} ++ struct v4l2_rect crop_bounds; ++ unsigned int disp_fmt; ++ struct mxcfb_pos win_pos; ++ bool disp_support_windows; ++ bool disp_support_csc; + -+void OV5647_stream_off(void) -+{ -+ ov5647_write_reg(0x4202, 0x0f); -+ ov5647_write_reg(0x300D, 0x01); -+} ++ bool fmt_init; ++ bool release; ++ bool linear_bypass_pp; ++ bool vdoa_1080p; ++ bool tiled_bypass_pp; ++ struct v4l2_rect in_rect; ++ struct ipu_task task; ++ struct ipu_task vdoa_task; ++ struct dma_mem vdoa_work; ++ struct dma_mem vdoa_output[VDOA_FB_BUFS]; + -+static const int sclk_rdiv_map[] = {1, 2, 4, 8}; ++ bool timer_stop; ++ struct hrtimer timer; ++ struct workqueue_struct *v4l_wq; ++ struct work_struct disp_work; ++ unsigned long frame_count; ++ unsigned long vdi_frame_cnt; ++ ktime_t start_ktime; + -+int OV5647_get_sysclk(void) -+{ -+ /* calculate sysclk */ -+ int tmp; -+ unsigned Multiplier, PreDiv, SysDiv, Pll_rdiv, Bit_div2x = 1; -+ unsigned div, sclk_rdiv, sysclk; -+ u8 temp; ++ int ctrl_rotate; ++ int ctrl_vflip; ++ int ctrl_hflip; + -+ tmp = ov5647_read_reg(0x3034, &temp); -+ if (tmp < 0) -+ return tmp; -+ tmp &= 0x0f; -+ if (tmp == 8 || tmp == 10) -+ Bit_div2x = tmp / 2; ++ dma_addr_t disp_bufs[FB_BUFS]; + -+ tmp = ov5647_read_reg(0x3035, &temp); -+ if (tmp < 0) -+ return tmp; -+ SysDiv = tmp >> 4; -+ if (SysDiv == 0) -+ SysDiv = 16; ++ struct videobuf_buffer *pre1_vb; ++ struct videobuf_buffer *pre2_vb; ++}; + -+ tmp = ov5647_read_reg(0x3036, &temp); -+ if (tmp < 0) -+ return tmp; -+ Multiplier = tmp; ++struct mxc_vout_dev { ++ struct device *dev; ++ struct v4l2_device v4l2_dev; ++ struct mxc_vout_output *out[MAX_FB_NUM]; ++ int out_num; ++}; + -+ tmp = ov5647_read_reg(0x3037, &temp); -+ if (tmp < 0) -+ return tmp; -+ PreDiv = tmp & 0x0f; -+ Pll_rdiv = ((tmp >> 4) & 0x01) + 1; ++/* Driver Configuration macros */ ++#define VOUT_NAME "mxc_vout" + -+ tmp = ov5647_read_reg(0x3108, &temp); -+ if (tmp < 0) -+ return tmp; -+ sclk_rdiv = sclk_rdiv_map[tmp & 0x03]; ++/* Variables configurable through module params*/ ++static int debug; ++static int vdi_rate_double; ++static int video_nr = 16; + -+ sysclk = ov5647_data.mclk / 10000 * Multiplier; -+ div = PreDiv * SysDiv * Pll_rdiv * Bit_div2x * sclk_rdiv; -+ if (!div) { -+ pr_err("%s:Error divide by 0, (%d * %d * %d * %d * %d)\n", -+ __func__, PreDiv, SysDiv, Pll_rdiv, Bit_div2x, sclk_rdiv); -+ return -EINVAL; -+ } -+ if (!sysclk) { -+ pr_err("%s:Error 0 clk, ov5647_data.mclk=%d, Multiplier=%d\n", -+ __func__, ov5647_data.mclk, Multiplier); -+ return -EINVAL; -+ } -+ sysclk /= div; -+ pr_debug("%s: sysclk(%d) = %d / 10000 * %d / (%d * %d * %d * %d * %d)\n", -+ __func__, sysclk, ov5647_data.mclk, Multiplier, -+ PreDiv, SysDiv, Pll_rdiv, Bit_div2x, sclk_rdiv); -+ return sysclk; -+} ++/* Module parameters */ ++module_param(video_nr, int, S_IRUGO); ++MODULE_PARM_DESC(video_nr, "video device numbers"); ++module_param(debug, int, 0600); ++MODULE_PARM_DESC(debug, "Debug level (0-1)"); ++module_param(vdi_rate_double, int, 0600); ++MODULE_PARM_DESC(vdi_rate_double, "vdi frame rate double on/off"); + -+void OV5647_set_night_mode(void) -+{ -+ /* read HTS from register settings */ -+ u8 mode; ++static const struct v4l2_fmtdesc mxc_formats[] = { ++ { ++ .description = "RGB565", ++ .pixelformat = V4L2_PIX_FMT_RGB565, ++ }, ++ { ++ .description = "BGR24", ++ .pixelformat = V4L2_PIX_FMT_BGR24, ++ }, ++ { ++ .description = "RGB24", ++ .pixelformat = V4L2_PIX_FMT_RGB24, ++ }, ++ { ++ .description = "RGB32", ++ .pixelformat = V4L2_PIX_FMT_RGB32, ++ }, ++ { ++ .description = "BGR32", ++ .pixelformat = V4L2_PIX_FMT_BGR32, ++ }, ++ { ++ .description = "NV12", ++ .pixelformat = V4L2_PIX_FMT_NV12, ++ }, ++ { ++ .description = "UYVY", ++ .pixelformat = V4L2_PIX_FMT_UYVY, ++ }, ++ { ++ .description = "YUYV", ++ .pixelformat = V4L2_PIX_FMT_YUYV, ++ }, ++ { ++ .description = "YUV422 planar", ++ .pixelformat = V4L2_PIX_FMT_YUV422P, ++ }, ++ { ++ .description = "YUV444", ++ .pixelformat = V4L2_PIX_FMT_YUV444, ++ }, ++ { ++ .description = "YUV420", ++ .pixelformat = V4L2_PIX_FMT_YUV420, ++ }, ++ { ++ .description = "YVU420", ++ .pixelformat = V4L2_PIX_FMT_YVU420, ++ }, ++ { ++ .description = "TILED NV12P", ++ .pixelformat = IPU_PIX_FMT_TILED_NV12, ++ }, ++ { ++ .description = "TILED NV12F", ++ .pixelformat = IPU_PIX_FMT_TILED_NV12F, ++ }, ++ { ++ .description = "YUV444 planar", ++ .pixelformat = IPU_PIX_FMT_YUV444P, ++ }, ++}; + -+ ov5647_read_reg(0x3a00, &mode); -+ mode &= 0xfb; -+ ov5647_write_reg(0x3a00, mode); -+} ++#define NUM_MXC_VOUT_FORMATS (ARRAY_SIZE(mxc_formats)) + -+int OV5647_get_HTS(void) -+{ -+ /* read HTS from register settings */ -+ int HTS; -+ u8 temp; ++#define DEF_INPUT_WIDTH 320 ++#define DEF_INPUT_HEIGHT 240 + -+ HTS = ov5647_read_reg(0x380c, &temp); -+ HTS = (HTS<<8) + ov5647_read_reg(0x380d, &temp); ++static int mxc_vidioc_streamoff(struct file *file, void *fh, ++ enum v4l2_buf_type i); + -+ return HTS; -+} ++static struct mxc_vout_fb g_fb_setting[MAX_FB_NUM]; ++static int config_disp_output(struct mxc_vout_output *vout); ++static void release_disp_output(struct mxc_vout_output *vout); + -+int OV5647_get_VTS(void) ++static unsigned int get_frame_size(struct mxc_vout_output *vout) +{ -+ /* read VTS from register settings */ -+ int VTS; -+ u8 temp; -+ -+ /* total vertical size[15:8] high byte */ -+ VTS = ov5647_read_reg(0x380e, &temp); ++ unsigned int size; + -+ VTS = (VTS<<8) + ov5647_read_reg(0x380f, &temp); ++ if (IPU_PIX_FMT_TILED_NV12 == vout->task.input.format) ++ size = TILED_NV12_FRAME_SIZE(vout->task.input.width, ++ vout->task.input.height); ++ else if (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format) { ++ size = TILED_NV12_FRAME_SIZE(vout->task.input.width, ++ vout->task.input.height/2); ++ size *= 2; ++ } else ++ size = vout->task.input.width * vout->task.input.height * ++ fmt_to_bpp(vout->task.input.format)/8; + -+ return VTS; ++ return size; +} + -+int OV5647_set_VTS(int VTS) ++static void free_dma_buf(struct mxc_vout_output *vout, struct dma_mem *buf) +{ -+ /* write VTS to registers */ -+ int temp; -+ -+ temp = VTS & 0xff; -+ ov5647_write_reg(0x380f, temp); -+ -+ temp = VTS>>8; -+ ov5647_write_reg(0x380e, temp); -+ -+ return 0; ++ dma_free_coherent(vout->vbq.dev, buf->size, buf->vaddr, buf->paddr); ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "free dma size:0x%x, paddr:0x%x\n", ++ buf->size, buf->paddr); ++ memset(buf, 0, sizeof(*buf)); +} + -+int OV5647_get_shutter(void) ++static int alloc_dma_buf(struct mxc_vout_output *vout, struct dma_mem *buf) +{ -+ /* read shutter, in number of line period */ -+ int shutter; -+ u8 temp; -+ -+ shutter = (ov5647_read_reg(0x03500, &temp) & 0x0f); -+ shutter = (shutter<<8) + ov5647_read_reg(0x3501, &temp); -+ shutter = (shutter<<4) + (ov5647_read_reg(0x3502, &temp)>>4); + -+ return shutter; ++ buf->vaddr = dma_alloc_coherent(vout->vbq.dev, buf->size, &buf->paddr, ++ GFP_DMA | GFP_KERNEL); ++ if (!buf->vaddr) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "cannot get dma buf size:0x%x\n", buf->size); ++ return -ENOMEM; ++ } ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "alloc dma buf size:0x%x, paddr:0x%x\n", buf->size, buf->paddr); ++ return 0; +} + -+int OV5647_set_shutter(int shutter) ++static ipu_channel_t get_ipu_channel(struct fb_info *fbi) +{ -+ /* write shutter, in number of line period */ -+ int temp; -+ -+ shutter = shutter & 0xffff; -+ -+ temp = shutter & 0x0f; -+ temp = temp<<4; -+ ov5647_write_reg(0x3502, temp); -+ -+ temp = shutter & 0xfff; -+ temp = temp>>4; -+ ov5647_write_reg(0x3501, temp); ++ ipu_channel_t ipu_ch = CHAN_NONE; ++ mm_segment_t old_fs; + -+ temp = shutter>>12; -+ ov5647_write_reg(0x3500, temp); ++ if (fbi->fbops->fb_ioctl) { ++ old_fs = get_fs(); ++ set_fs(KERNEL_DS); ++ fbi->fbops->fb_ioctl(fbi, MXCFB_GET_FB_IPU_CHAN, ++ (unsigned long)&ipu_ch); ++ set_fs(old_fs); ++ } + -+ return 0; ++ return ipu_ch; +} + -+int OV5647_get_gain16(void) ++static unsigned int get_ipu_fmt(struct fb_info *fbi) +{ -+ /* read gain, 16 = 1x */ -+ int gain16; -+ u8 temp; ++ mm_segment_t old_fs; ++ unsigned int fb_fmt; + -+ gain16 = ov5647_read_reg(0x350a, &temp) & 0x03; -+ gain16 = (gain16<<8) + ov5647_read_reg(0x350b, &temp); ++ if (fbi->fbops->fb_ioctl) { ++ old_fs = get_fs(); ++ set_fs(KERNEL_DS); ++ fbi->fbops->fb_ioctl(fbi, MXCFB_GET_DIFMT, ++ (unsigned long)&fb_fmt); ++ set_fs(old_fs); ++ } + -+ return gain16; ++ return fb_fmt; +} + -+int OV5647_set_gain16(int gain16) ++static void update_display_setting(void) +{ -+ /* write gain, 16 = 1x */ -+ u8 temp; -+ gain16 = gain16 & 0x3ff; -+ -+ temp = gain16 & 0xff; -+ ov5647_write_reg(0x350b, temp); ++ int i; ++ struct fb_info *fbi; ++ struct v4l2_rect bg_crop_bounds[2]; + -+ temp = gain16>>8; -+ ov5647_write_reg(0x350a, temp); ++ for (i = 0; i < num_registered_fb; i++) { ++ fbi = registered_fb[i]; + -+ return 0; -+} ++ memset(&g_fb_setting[i], 0, sizeof(struct mxc_vout_fb)); + -+int OV5647_get_light_freq(void) -+{ -+ /* get banding filter value */ -+ int temp, temp1, light_freq = 0; -+ u8 tmp; ++ if (!strncmp(fbi->fix.id, "DISP3", 5)) ++ g_fb_setting[i].ipu_id = 0; ++ else ++ g_fb_setting[i].ipu_id = 1; + -+ temp = ov5647_read_reg(0x3c01, &tmp); ++ g_fb_setting[i].name = fbi->fix.id; ++ g_fb_setting[i].crop_bounds.left = 0; ++ g_fb_setting[i].crop_bounds.top = 0; ++ g_fb_setting[i].crop_bounds.width = fbi->var.xres; ++ g_fb_setting[i].crop_bounds.height = fbi->var.yres; ++ g_fb_setting[i].disp_fmt = get_ipu_fmt(fbi); + -+ if (temp & 0x80) { -+ /* manual */ -+ temp1 = ov5647_read_reg(0x3c00, &tmp); -+ if (temp1 & 0x04) { -+ /* 50Hz */ -+ light_freq = 50; -+ } else { -+ /* 60Hz */ -+ light_freq = 60; -+ } -+ } else { -+ /* auto */ -+ temp1 = ov5647_read_reg(0x3c0c, &tmp); -+ if (temp1 & 0x01) { -+ /* 50Hz */ -+ light_freq = 50; -+ } else { -+ /* 60Hz */ -+ light_freq = 60; ++ if (get_ipu_channel(fbi) == MEM_BG_SYNC) { ++ bg_crop_bounds[g_fb_setting[i].ipu_id] = ++ g_fb_setting[i].crop_bounds; ++ g_fb_setting[i].disp_support_csc = true; ++ } else if (get_ipu_channel(fbi) == MEM_FG_SYNC) { ++ g_fb_setting[i].disp_support_csc = true; ++ g_fb_setting[i].disp_support_windows = true; + } + } -+ return light_freq; ++ ++ for (i = 0; i < num_registered_fb; i++) { ++ fbi = registered_fb[i]; ++ ++ if (get_ipu_channel(fbi) == MEM_FG_SYNC) ++ g_fb_setting[i].crop_bounds = ++ bg_crop_bounds[g_fb_setting[i].ipu_id]; ++ } +} + -+void OV5647_set_bandingfilter(void) ++/* called after g_fb_setting filled by update_display_setting */ ++static int update_setting_from_fbi(struct mxc_vout_output *vout, ++ struct fb_info *fbi) +{ -+ int prev_VTS; -+ int band_step60, max_band60, band_step50, max_band50; ++ int i; ++ bool found = false; + -+ /* read preview PCLK */ -+ prev_sysclk = OV5647_get_sysclk(); -+ /* read preview HTS */ -+ prev_HTS = OV5647_get_HTS(); ++ for (i = 0; i < MAX_FB_NUM; i++) { ++ if (g_fb_setting[i].name) { ++ if (!strcmp(fbi->fix.id, g_fb_setting[i].name)) { ++ vout->crop_bounds = g_fb_setting[i].crop_bounds; ++ vout->disp_fmt = g_fb_setting[i].disp_fmt; ++ vout->disp_support_csc = ++ g_fb_setting[i].disp_support_csc; ++ vout->disp_support_windows = ++ g_fb_setting[i].disp_support_windows; ++ found = true; ++ break; ++ } ++ } ++ } + -+ /* read preview VTS */ -+ prev_VTS = OV5647_get_VTS(); ++ if (!found) { ++ v4l2_err(vout->vfd->v4l2_dev, "can not find output\n"); ++ return -EINVAL; ++ } ++ strlcpy(vout->vfd->name, fbi->fix.id, sizeof(vout->vfd->name)); + -+ /* calculate banding filter */ -+ /* 60Hz */ -+ band_step60 = prev_sysclk * 100/prev_HTS * 100/120; -+ ov5647_write_reg(0x3a0a, (band_step60 >> 8)); -+ ov5647_write_reg(0x3a0b, (band_step60 & 0xff)); ++ memset(&vout->task, 0, sizeof(struct ipu_task)); + -+ max_band60 = (int)((prev_VTS-4)/band_step60); -+ ov5647_write_reg(0x3a0d, max_band60); ++ vout->task.input.width = DEF_INPUT_WIDTH; ++ vout->task.input.height = DEF_INPUT_HEIGHT; ++ vout->task.input.crop.pos.x = 0; ++ vout->task.input.crop.pos.y = 0; ++ vout->task.input.crop.w = DEF_INPUT_WIDTH; ++ vout->task.input.crop.h = DEF_INPUT_HEIGHT; + -+ /* 50Hz */ -+ band_step50 = prev_sysclk * 100/prev_HTS; -+ ov5647_write_reg(0x3a08, (band_step50 >> 8)); -+ ov5647_write_reg(0x3a09, (band_step50 & 0xff)); ++ vout->task.output.width = vout->crop_bounds.width; ++ vout->task.output.height = vout->crop_bounds.height; ++ vout->task.output.crop.pos.x = 0; ++ vout->task.output.crop.pos.y = 0; ++ vout->task.output.crop.w = vout->crop_bounds.width; ++ vout->task.output.crop.h = vout->crop_bounds.height; ++ if (colorspaceofpixel(vout->disp_fmt) == YUV_CS) ++ vout->task.output.format = IPU_PIX_FMT_UYVY; ++ else ++ vout->task.output.format = IPU_PIX_FMT_RGB565; + -+ max_band50 = (int)((prev_VTS-4)/band_step50); -+ ov5647_write_reg(0x3a0e, max_band50); ++ return 0; +} + -+int OV5647_set_AE_target(int target) ++static inline unsigned long get_jiffies(struct timeval *t) +{ -+ /* stable in high */ -+ int fast_high, fast_low; -+ AE_low = target * 23 / 25; /* 0.92 */ -+ AE_high = target * 27 / 25; /* 1.08 */ -+ -+ fast_high = AE_high<<1; -+ if (fast_high > 255) -+ fast_high = 255; -+ -+ fast_low = AE_low >> 1; -+ -+ ov5647_write_reg(0x3a0f, AE_high); -+ ov5647_write_reg(0x3a10, AE_low); -+ ov5647_write_reg(0x3a1b, AE_high); -+ ov5647_write_reg(0x3a1e, AE_low); -+ ov5647_write_reg(0x3a11, fast_high); -+ ov5647_write_reg(0x3a1f, fast_low); ++ struct timeval cur; + -+ return 0; -+} ++ if (t->tv_usec >= 1000000) { ++ t->tv_sec += t->tv_usec / 1000000; ++ t->tv_usec = t->tv_usec % 1000000; ++ } + -+void OV5647_turn_on_AE_AG(int enable) -+{ -+ u8 ae_ag_ctrl; ++ do_gettimeofday(&cur); ++ if ((t->tv_sec < cur.tv_sec) ++ || ((t->tv_sec == cur.tv_sec) && (t->tv_usec < cur.tv_usec))) ++ return jiffies; + -+ ov5647_read_reg(0x3503, &ae_ag_ctrl); -+ if (enable) { -+ /* turn on auto AE/AG */ -+ ae_ag_ctrl = ae_ag_ctrl & ~(0x03); ++ if (t->tv_usec < cur.tv_usec) { ++ cur.tv_sec = t->tv_sec - cur.tv_sec - 1; ++ cur.tv_usec = t->tv_usec + 1000000 - cur.tv_usec; + } else { -+ /* turn off AE/AG */ -+ ae_ag_ctrl = ae_ag_ctrl | 0x03; ++ cur.tv_sec = t->tv_sec - cur.tv_sec; ++ cur.tv_usec = t->tv_usec - cur.tv_usec; + } -+ ov5647_write_reg(0x3503, ae_ag_ctrl); -+} + -+bool ov5647_binning_on(void) -+{ -+ u8 temp; -+ ov5647_read_reg(0x3821, &temp); -+ temp &= 0xfe; -+ if (temp) -+ return true; -+ else -+ return false; ++ return jiffies + timeval_to_jiffies(&cur); +} + -+static void ov5647_set_virtual_channel(int channel) ++static bool deinterlace_3_field(struct mxc_vout_output *vout) +{ -+ u8 channel_id; -+ -+ ov5647_read_reg(0x4814, &channel_id); -+ channel_id &= ~(3 << 6); -+ ov5647_write_reg(0x4814, channel_id | (channel << 6)); ++ return (vout->task.input.deinterlace.enable && ++ (vout->task.input.deinterlace.motion != HIGH_MOTION)); +} + -+/* download ov5647 settings to sensor through i2c */ -+static int ov5647_download_firmware(struct reg_value *pModeSetting, s32 ArySize) ++static int set_field_fmt(struct mxc_vout_output *vout, enum v4l2_field field) +{ -+ register u32 Delay_ms = 0; -+ register u16 RegAddr = 0; -+ register u8 Mask = 0; -+ register u8 Val = 0; -+ u8 RegVal = 0; -+ int i, retval = 0; ++ struct ipu_deinterlace *deinterlace = &vout->task.input.deinterlace; + -+ for (i = 0; i < ArySize; ++i, ++pModeSetting) { -+ Delay_ms = pModeSetting->u32Delay_ms; -+ RegAddr = pModeSetting->u16RegAddr; -+ Val = pModeSetting->u8Val; -+ Mask = pModeSetting->u8Mask; ++ switch (field) { ++ /* Images are in progressive format, not interlaced */ ++ case V4L2_FIELD_NONE: ++ case V4L2_FIELD_ANY: ++ deinterlace->enable = false; ++ deinterlace->field_fmt = 0; ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "Progressive frame.\n"); ++ break; ++ case V4L2_FIELD_INTERLACED_TB: ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "Enable deinterlace TB.\n"); ++ deinterlace->enable = true; ++ deinterlace->field_fmt = IPU_DEINTERLACE_FIELD_TOP; ++ break; ++ case V4L2_FIELD_INTERLACED_BT: ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "Enable deinterlace BT.\n"); ++ deinterlace->enable = true; ++ deinterlace->field_fmt = IPU_DEINTERLACE_FIELD_BOTTOM; ++ break; ++ default: ++ v4l2_err(vout->vfd->v4l2_dev, ++ "field format:%d not supported yet!\n", field); ++ return -EINVAL; ++ } + -+ if (Mask) { -+ retval = ov5647_read_reg(RegAddr, &RegVal); -+ if (retval < 0) -+ goto err; ++ if (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format) { ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "tiled fmt enable deinterlace.\n"); ++ deinterlace->enable = true; ++ } + -+ RegVal &= ~(u8)Mask; -+ Val &= Mask; -+ Val |= RegVal; -+ } ++ if (deinterlace->enable && vdi_rate_double) ++ deinterlace->field_fmt |= IPU_DEINTERLACE_RATE_EN; + -+ retval = ov5647_write_reg(RegAddr, Val); -+ if (retval < 0) -+ goto err; ++ return 0; ++} + -+ if (Delay_ms) -+ msleep(Delay_ms); ++static bool is_pp_bypass(struct mxc_vout_output *vout) ++{ ++ if ((IPU_PIX_FMT_TILED_NV12 == vout->task.input.format) || ++ (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format)) ++ return false; ++ if ((vout->task.input.width == vout->task.output.width) && ++ (vout->task.input.height == vout->task.output.height) && ++ (vout->task.input.crop.w == vout->task.output.crop.w) && ++ (vout->task.input.crop.h == vout->task.output.crop.h) && ++ (vout->task.output.rotate < IPU_ROTATE_HORIZ_FLIP) && ++ !vout->task.input.deinterlace.enable) { ++ if (vout->disp_support_csc) ++ return true; ++ else if (!need_csc(vout->task.input.format, vout->disp_fmt)) ++ return true; ++ /* ++ * input crop show to full output which can show based on ++ * xres_virtual/yres_virtual ++ */ ++ } else if ((vout->task.input.crop.w == vout->task.output.crop.w) && ++ (vout->task.output.crop.w == vout->task.output.width) && ++ (vout->task.input.crop.h == vout->task.output.crop.h) && ++ (vout->task.output.crop.h == ++ vout->task.output.height) && ++ (vout->task.output.rotate < IPU_ROTATE_HORIZ_FLIP) && ++ !vout->task.input.deinterlace.enable) { ++ if (vout->disp_support_csc) ++ return true; ++ else if (!need_csc(vout->task.input.format, vout->disp_fmt)) ++ return true; + } -+err: -+ return retval; ++ return false; +} + -+/* sensor changes between scaling and subsampling -+ * go through exposure calcualtion -+ */ -+static int ov5647_change_mode_exposure_calc(enum ov5647_frame_rate frame_rate, -+ enum ov5647_mode mode) ++static void setup_buf_timer(struct mxc_vout_output *vout, ++ struct videobuf_buffer *vb) +{ -+ struct reg_value *pModeSetting = NULL; -+ s32 ArySize = 0; -+ u8 average; -+ int prev_shutter, prev_gain16; -+ int cap_shutter, cap_gain16; -+ int cap_sysclk, cap_HTS, cap_VTS; -+ int light_freq, cap_bandfilt, cap_maxband; -+ long cap_gain16_shutter; -+ int retval = 0; -+ -+ /* check if the input mode and frame rate is valid */ -+ pModeSetting = -+ ov5647_mode_info_data[frame_rate][mode].init_data_ptr; -+ ArySize = -+ ov5647_mode_info_data[frame_rate][mode].init_data_size; -+ -+ ov5647_data.pix.width = -+ ov5647_mode_info_data[frame_rate][mode].width; -+ ov5647_data.pix.height = -+ ov5647_mode_info_data[frame_rate][mode].height; -+ ov5647_data_add.map_sizeimage = -+ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; -+ -+ if (ov5647_data.pix.width == 0 || ov5647_data.pix.height == 0 || -+ pModeSetting == NULL || ArySize == 0) -+ return -EINVAL; -+ -+ /* turn off AE/AG */ -+ OV5647_turn_on_AE_AG(0); -+ -+ /* read preview shutter */ -+ prev_shutter = OV5647_get_shutter(); -+ if ((ov5647_binning_on()) && (mode != ov5647_mode_960P_1280_960) && -+ (mode != ov5647_mode_720P_1280_720) && (mode != ov5647_mode_1080P_1920_1080)) -+ prev_shutter *= 2; -+ -+ /* read preview gain */ -+ prev_gain16 = OV5647_get_gain16(); ++ ktime_t expiry_time, now; + -+ /* get average */ -+ ov5647_read_reg(0x5693, &average); ++ /* if timestamp is 0, then default to 30fps */ ++ if ((vb->ts.tv_sec == 0) && (vb->ts.tv_usec == 0)) ++ expiry_time = ktime_add_ns(vout->start_ktime, ++ NSEC_PER_FRAME_30FPS * vout->frame_count); ++ else ++ expiry_time = timeval_to_ktime(vb->ts); + -+ /* turn off night mode for capture */ -+ OV5647_set_night_mode(); ++ now = hrtimer_cb_get_time(&vout->timer); ++ if ((now.tv64 > expiry_time.tv64)) { ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "warning: timer timeout already expired.\n"); ++ expiry_time = now; ++ } + -+ /* turn off overlay */ -+ /* ov5647_write_reg(0x3022, 0x06);//if no af function, just skip it */ ++ hrtimer_start(&vout->timer, expiry_time, HRTIMER_MODE_ABS); + -+ OV5647_stream_off(); ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "timer handler next " ++ "schedule: %lldnsecs\n", expiry_time.tv64); ++} + -+ /* Write capture setting */ -+ retval = ov5647_download_firmware(pModeSetting, ArySize); -+ if (retval < 0) -+ goto err; ++static int show_buf(struct mxc_vout_output *vout, int idx, ++ struct ipu_pos *ipos) ++{ ++ struct fb_info *fbi = vout->fbi; ++ struct fb_var_screeninfo var; ++ int ret; ++ u32 fb_base = 0; + -+ /* read capture VTS */ -+ cap_VTS = OV5647_get_VTS(); -+ cap_HTS = OV5647_get_HTS(); -+ cap_sysclk = OV5647_get_sysclk(); ++ memcpy(&var, &fbi->var, sizeof(var)); + -+ /* calculate capture banding filter */ -+ light_freq = OV5647_get_light_freq(); -+ if (light_freq == 60) { -+ /* 60Hz */ -+ cap_bandfilt = cap_sysclk * 100 / cap_HTS * 100 / 120; ++ if (vout->linear_bypass_pp || vout->tiled_bypass_pp) { ++ /* ++ * crack fb base ++ * NOTE: should not do other fb operation during v4l2 ++ */ ++ console_lock(); ++ fb_base = fbi->fix.smem_start; ++ fbi->fix.smem_start = vout->task.output.paddr; ++ fbi->var.yoffset = ipos->y + 1; ++ var.xoffset = ipos->x; ++ var.yoffset = ipos->y; ++ var.vmode |= FB_VMODE_YWRAP; ++ ret = fb_pan_display(fbi, &var); ++ fbi->fix.smem_start = fb_base; ++ console_unlock(); + } else { -+ /* 50Hz */ -+ cap_bandfilt = cap_sysclk * 100 / cap_HTS; ++ console_lock(); ++ var.yoffset = idx * fbi->var.yres; ++ var.vmode &= ~FB_VMODE_YWRAP; ++ ret = fb_pan_display(fbi, &var); ++ console_unlock(); + } -+ cap_maxband = (int)((cap_VTS - 4)/cap_bandfilt); + -+ /* calculate capture shutter/gain16 */ -+ if (average > AE_low && average < AE_high) { -+ /* in stable range */ -+ cap_gain16_shutter = -+ prev_gain16 * prev_shutter * cap_sysclk/prev_sysclk -+ * prev_HTS/cap_HTS * AE_Target / average; -+ } else { -+ cap_gain16_shutter = -+ prev_gain16 * prev_shutter * cap_sysclk/prev_sysclk -+ * prev_HTS/cap_HTS; -+ } ++ return ret; ++} + -+ /* gain to shutter */ -+ if (cap_gain16_shutter < (cap_bandfilt * 16)) { -+ /* shutter < 1/100 */ -+ cap_shutter = cap_gain16_shutter/16; -+ if (cap_shutter < 1) -+ cap_shutter = 1; ++static void disp_work_func(struct work_struct *work) ++{ ++ struct mxc_vout_output *vout = ++ container_of(work, struct mxc_vout_output, disp_work); ++ struct videobuf_queue *q = &vout->vbq; ++ struct videobuf_buffer *vb, *vb_next = NULL; ++ unsigned long flags = 0; ++ struct ipu_pos ipos; ++ int ret = 0; ++ u32 in_fmt = 0; ++ u32 vdi_cnt = 0; ++ u32 vdi_frame; ++ u32 index = 0; ++ u32 ocrop_h = 0; ++ u32 o_height = 0; ++ u32 tiled_interlaced = 0; ++ bool tiled_fmt = false; + -+ cap_gain16 = cap_gain16_shutter/cap_shutter; -+ if (cap_gain16 < 16) -+ cap_gain16 = 16; -+ } else { -+ if (cap_gain16_shutter > -+ (cap_bandfilt * cap_maxband * 16)) { -+ /* exposure reach max */ -+ cap_shutter = cap_bandfilt * cap_maxband; -+ cap_gain16 = cap_gain16_shutter / cap_shutter; -+ } else { -+ /* 1/100 < (cap_shutter = n/100) =< max */ -+ cap_shutter = -+ ((int) (cap_gain16_shutter/16 / cap_bandfilt)) -+ *cap_bandfilt; -+ cap_gain16 = cap_gain16_shutter / cap_shutter; -+ } -+ } ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "disp work begin one frame\n"); + -+ /* write capture gain */ -+ OV5647_set_gain16(cap_gain16); ++ spin_lock_irqsave(q->irqlock, flags); + -+ /* write capture shutter */ -+ if (cap_shutter > (cap_VTS - 4)) { -+ cap_VTS = cap_shutter + 4; -+ OV5647_set_VTS(cap_VTS); ++ if (list_empty(&vout->active_list)) { ++ v4l2_warn(vout->vfd->v4l2_dev, ++ "no entry in active_list, should not be here\n"); ++ spin_unlock_irqrestore(q->irqlock, flags); ++ return; + } -+ OV5647_set_shutter(cap_shutter); -+ -+ OV5647_stream_on(); + -+err: -+ return retval; -+} -+ -+/* if sensor changes inside scaling or subsampling -+ * change mode directly -+ * */ -+static int ov5647_change_mode_direct(enum ov5647_frame_rate frame_rate, -+ enum ov5647_mode mode) -+{ -+ struct reg_value *pModeSetting = NULL; -+ s32 ArySize = 0; -+ int retval = 0; ++ vb = list_first_entry(&vout->active_list, ++ struct videobuf_buffer, queue); ++ ret = set_field_fmt(vout, vb->field); ++ if (ret < 0) { ++ spin_unlock_irqrestore(q->irqlock, flags); ++ return; ++ } ++ if (deinterlace_3_field(vout)) { ++ if (list_is_singular(&vout->active_list)) { ++ if (list_empty(&vout->queue_list)) { ++ vout->timer_stop = true; ++ spin_unlock_irqrestore(q->irqlock, flags); ++ v4l2_warn(vout->vfd->v4l2_dev, ++ "no enough entry for 3 fields " ++ "deinterlacer\n"); ++ return; ++ } + -+ /* check if the input mode and frame rate is valid */ -+ pModeSetting = -+ ov5647_mode_info_data[frame_rate][mode].init_data_ptr; -+ ArySize = -+ ov5647_mode_info_data[frame_rate][mode].init_data_size; ++ /* ++ * We need to use the next vb even if it is ++ * not on the active list. ++ */ ++ vb_next = list_first_entry(&vout->queue_list, ++ struct videobuf_buffer, queue); ++ } else ++ vb_next = list_first_entry(vout->active_list.next, ++ struct videobuf_buffer, queue); ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "cur field_fmt:%d, next field_fmt:%d.\n", ++ vb->field, vb_next->field); ++ /* repeat the last field during field format changing */ ++ if ((vb->field != vb_next->field) && ++ (vb_next->field != V4L2_FIELD_NONE)) ++ vb_next = vb; ++ } + -+ ov5647_data.pix.width = -+ ov5647_mode_info_data[frame_rate][mode].width; -+ ov5647_data.pix.height = -+ ov5647_mode_info_data[frame_rate][mode].height; -+ ov5647_data_add.map_sizeimage = -+ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; ++ spin_unlock_irqrestore(q->irqlock, flags); + -+ if (ov5647_data.pix.width == 0 || ov5647_data.pix.height == 0 || -+ pModeSetting == NULL || ArySize == 0) -+ return -EINVAL; ++vdi_frame_rate_double: ++ mutex_lock(&vout->task_lock); + -+ /* turn off AE/AG */ -+ OV5647_turn_on_AE_AG(0); ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "v4l2 frame_cnt:%ld, vb_field:%d, fmt:%d\n", ++ vout->frame_count, vb->field, ++ vout->task.input.deinterlace.field_fmt); ++ if (vb->memory == V4L2_MEMORY_USERPTR) ++ vout->task.input.paddr = vb->baddr; ++ else ++ vout->task.input.paddr = videobuf_to_dma_contig(vb); + -+ OV5647_stream_off(); ++ if (vout->task.input.deinterlace.field_fmt & IPU_DEINTERLACE_RATE_EN) ++ index = vout->vdi_frame_cnt % FB_BUFS; ++ else ++ index = vout->frame_count % FB_BUFS; ++ if (vout->linear_bypass_pp) { ++ vout->task.output.paddr = vout->task.input.paddr; ++ ipos.x = vout->task.input.crop.pos.x; ++ ipos.y = vout->task.input.crop.pos.y; ++ } else { ++ if (deinterlace_3_field(vout)) { ++ if (vb->memory == V4L2_MEMORY_USERPTR) ++ vout->task.input.paddr_n = vb_next->baddr; ++ else ++ vout->task.input.paddr_n = ++ videobuf_to_dma_contig(vb_next); ++ } ++ vout->task.output.paddr = vout->disp_bufs[index]; ++ if (vout->vdoa_1080p) { ++ o_height = vout->task.output.height; ++ ocrop_h = vout->task.output.crop.h; ++ vout->task.output.height = FRAME_HEIGHT_1080P; ++ vout->task.output.crop.h = FRAME_HEIGHT_1080P; ++ } ++ tiled_fmt = ++ (IPU_PIX_FMT_TILED_NV12 == vout->task.input.format) || ++ (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format); ++ if (vout->tiled_bypass_pp) { ++ ipos.x = vout->task.input.crop.pos.x; ++ ipos.y = vout->task.input.crop.pos.y; ++ } else if (tiled_fmt) { ++ vout->vdoa_task.input.paddr = vout->task.input.paddr; ++ if (deinterlace_3_field(vout)) ++ vout->vdoa_task.input.paddr_n = ++ vout->task.input.paddr_n; ++ vout->vdoa_task.output.paddr = vout->vdoa_work.paddr; ++ ret = ipu_queue_task(&vout->vdoa_task); ++ if (ret < 0) { ++ mutex_unlock(&vout->task_lock); ++ goto err; ++ } ++ vout->task.input.paddr = vout->vdoa_task.output.paddr; ++ in_fmt = vout->task.input.format; ++ vout->task.input.format = vout->vdoa_task.output.format; ++ if (vout->task.input.deinterlace.enable) { ++ tiled_interlaced = 1; ++ vout->task.input.deinterlace.enable = 0; ++ } ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "tiled queue task\n"); ++ } ++ ret = ipu_queue_task(&vout->task); ++ if ((!vout->tiled_bypass_pp) && tiled_fmt) ++ vout->task.input.format = in_fmt; ++ if (tiled_interlaced) ++ vout->task.input.deinterlace.enable = 1; ++ if (ret < 0) { ++ mutex_unlock(&vout->task_lock); ++ goto err; ++ } ++ if (vout->vdoa_1080p) { ++ vout->task.output.crop.h = ocrop_h; ++ vout->task.output.height = o_height; ++ } ++ } + -+ /* Write capture setting */ -+ retval = ov5647_download_firmware(pModeSetting, ArySize); -+ if (retval < 0) -+ goto err; ++ mutex_unlock(&vout->task_lock); + -+ OV5647_stream_on(); ++ ret = show_buf(vout, index, &ipos); ++ if (ret < 0) ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "show buf with ret %d\n", ret); + -+ OV5647_turn_on_AE_AG(1); ++ if (vout->task.input.deinterlace.field_fmt & IPU_DEINTERLACE_RATE_EN) { ++ vdi_frame = vout->task.input.deinterlace.field_fmt ++ & IPU_DEINTERLACE_RATE_FRAME1; ++ if (vdi_frame) ++ vout->task.input.deinterlace.field_fmt &= ++ ~IPU_DEINTERLACE_RATE_FRAME1; ++ else ++ vout->task.input.deinterlace.field_fmt |= ++ IPU_DEINTERLACE_RATE_FRAME1; ++ vout->vdi_frame_cnt++; ++ vdi_cnt++; ++ if (vdi_cnt < IPU_DEINTERLACE_MAX_FRAME) ++ goto vdi_frame_rate_double; ++ } ++ spin_lock_irqsave(q->irqlock, flags); + -+err: -+ return retval; -+} ++ list_del(&vb->queue); + -+static int ov5647_init_mode(enum ov5647_frame_rate frame_rate, -+ enum ov5647_mode mode, enum ov5647_mode orig_mode) -+{ -+ struct reg_value *pModeSetting = NULL; -+ s32 ArySize = 0; -+ int retval = 0; -+ void *mipi_csi2_info; -+ u32 mipi_reg, msec_wait4stable = 0; -+ enum ov5647_downsize_mode dn_mode, orig_dn_mode; ++ /* ++ * The videobuf before the last one has been shown. Set ++ * VIDEOBUF_DONE state here to avoid tearing issue in ic bypass ++ * case, which makes sure a buffer being shown will not be ++ * dequeued to be overwritten. It also brings side-effect that ++ * the last 2 buffers can not be dequeued correctly, apps need ++ * to take care of it. ++ */ ++ if (vout->pre2_vb) { ++ vout->pre2_vb->state = VIDEOBUF_DONE; ++ wake_up_interruptible(&vout->pre2_vb->done); ++ vout->pre2_vb = NULL; ++ } + -+ if ((mode > ov5647_mode_MAX || mode < ov5647_mode_MIN) -+ && (mode != ov5647_mode_INIT)) { -+ pr_err("Wrong ov5647 mode detected!\n"); -+ return -1; ++ if (vout->linear_bypass_pp) { ++ vout->pre2_vb = vout->pre1_vb; ++ vout->pre1_vb = vb; ++ } else { ++ if (vout->pre1_vb) { ++ vout->pre1_vb->state = VIDEOBUF_DONE; ++ wake_up_interruptible(&vout->pre1_vb->done); ++ vout->pre1_vb = NULL; ++ } ++ vb->state = VIDEOBUF_DONE; ++ wake_up_interruptible(&vb->done); + } + -+ mipi_csi2_info = mipi_csi2_get_info(); ++ vout->frame_count++; + -+ /* initial mipi dphy */ -+ if (!mipi_csi2_info) { -+ printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n", -+ __func__, __FILE__); -+ return -1; ++ /* pick next queue buf to setup timer */ ++ if (list_empty(&vout->queue_list)) ++ vout->timer_stop = true; ++ else { ++ vb = list_first_entry(&vout->queue_list, ++ struct videobuf_buffer, queue); ++ setup_buf_timer(vout, vb); + } + -+ ov5647_write_reg(0x4800, 0x25); -+ OV5647_stream_off(); -+ -+ if (!mipi_csi2_get_status(mipi_csi2_info)) -+ mipi_csi2_enable(mipi_csi2_info); ++ spin_unlock_irqrestore(q->irqlock, flags); + -+ if (!mipi_csi2_get_status(mipi_csi2_info)) { -+ pr_err("Can not enable mipi csi2 driver!\n"); -+ return -1; -+ } ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "disp work finish one frame\n"); + -+ mipi_csi2_set_lanes(mipi_csi2_info, 2); ++ return; ++err: ++ v4l2_err(vout->vfd->v4l2_dev, "display work fail ret = %d\n", ret); ++ vout->timer_stop = true; ++ vb->state = VIDEOBUF_ERROR; ++ return; ++} + -+ /*Only reset MIPI CSI2 HW at sensor initialize*/ -+ if (mode == ov5647_mode_INIT) -+ mipi_csi2_reset(mipi_csi2_info); ++static enum hrtimer_restart mxc_vout_timer_handler(struct hrtimer *timer) ++{ ++ struct mxc_vout_output *vout = container_of(timer, ++ struct mxc_vout_output, ++ timer); ++ struct videobuf_queue *q = &vout->vbq; ++ struct videobuf_buffer *vb; ++ unsigned long flags = 0; + -+ /* reg 0x3034[3:0] == 0x8 is 8bit mode */ -+ mipi_csi2_set_datatype(mipi_csi2_info, MIPI_DT_RAW8); ++ spin_lock_irqsave(q->irqlock, flags); + -+ if (orig_mode != ov5647_mode_INIT) { -+ dn_mode = ov5647_mode_info_data[frame_rate][mode].dn_mode; -+ orig_dn_mode = ov5647_mode_info_data[frame_rate][orig_mode].dn_mode; -+ } -+ else { -+ orig_dn_mode = dn_mode = 0; ++ /* ++ * put first queued entry into active, if previous entry did not ++ * finish, setup current entry's timer again. ++ */ ++ if (list_empty(&vout->queue_list)) { ++ spin_unlock_irqrestore(q->irqlock, flags); ++ return HRTIMER_NORESTART; + } + -+ if (mode == ov5647_mode_INIT) { -+ int index = (int)ov5647_data.streamcap.capturemode; ++ /* move videobuf from queued list to active list */ ++ vb = list_first_entry(&vout->queue_list, ++ struct videobuf_buffer, queue); ++ list_del(&vb->queue); ++ list_add_tail(&vb->queue, &vout->active_list); + -+ pModeSetting = ov5647_mode_info_data[frame_rate][index].init_data_ptr; -+ ArySize = ov5647_mode_info_data[frame_rate][index].init_data_size; -+ retval = ov5647_download_firmware(pModeSetting, ArySize); -+ if (retval < 0) -+ goto err; -+ } else if ((dn_mode == SUBSAMPLING && orig_dn_mode == SCALING) || -+ (dn_mode == SCALING && orig_dn_mode == SUBSAMPLING)) { -+ /* change between subsampling and scaling -+ * go through exposure calucation */ -+ retval = ov5647_change_mode_exposure_calc(frame_rate, mode); -+ } else { -+ /* change inside subsampling or scaling -+ * download firmware directly */ -+ retval = ov5647_change_mode_direct(frame_rate, mode); ++ if (queue_work(vout->v4l_wq, &vout->disp_work) == 0) { ++ v4l2_warn(vout->vfd->v4l2_dev, ++ "disp work was in queue already, queue buf again next time\n"); ++ list_del(&vb->queue); ++ list_add(&vb->queue, &vout->queue_list); ++ spin_unlock_irqrestore(q->irqlock, flags); ++ return HRTIMER_NORESTART; + } + -+ if (retval < 0) -+ goto err; ++ vb->state = VIDEOBUF_ACTIVE; + -+ OV5647_set_AE_target(AE_Target); -+ OV5647_get_light_freq(); -+ OV5647_set_bandingfilter(); -+ ov5647_set_virtual_channel(ov5647_data.virtual_channel); ++ spin_unlock_irqrestore(q->irqlock, flags); + -+ /* add delay to wait for sensor stable */ -+ if (frame_rate == ov5647_15_fps) { -+ /* dump the first nine frames: 1/15*9 */ -+ msec_wait4stable = 600; -+ } else if (frame_rate == ov5647_30_fps) { -+ /* dump the first nine frames: 1/30*9 */ -+ msec_wait4stable = 300; -+ } -+ msleep(msec_wait4stable); ++ return HRTIMER_NORESTART; ++} + -+ if (mipi_csi2_info) { -+ unsigned int i = 0; -+ u8 resetval; ++/* Video buffer call backs */ + -+ /* wait for mipi sensor ready */ -+ while (1) { -+ mipi_reg = mipi_csi2_dphy_status(mipi_csi2_info); -+ if (mipi_reg != 0x200) -+ break; -+ if (i++ >= 20) { -+ pr_err("mipi csi2 can not receive sensor clk! %x\n", mipi_reg); -+ return -1; -+ } -+ msleep(10); -+ } ++/* ++ * Buffer setup function is called by videobuf layer when REQBUF ioctl is ++ * called. This is used to setup buffers and return size and count of ++ * buffers allocated. After the call to this buffer, videobuf layer will ++ * setup buffer queue depending on the size and count of buffers ++ */ ++static int mxc_vout_buffer_setup(struct videobuf_queue *q, unsigned int *count, ++ unsigned int *size) ++{ ++ struct mxc_vout_output *vout = q->priv_data; ++ unsigned int frame_size; + -+ i = 0; -+ /* wait for mipi stable */ -+ while (1) { -+ mipi_reg = mipi_csi2_get_error1(mipi_csi2_info); -+ if (!mipi_reg) -+ break; -+ if (i++ >= 20) { -+ pr_err("mipi csi2 can not receive data correctly!\n"); -+ return -1; -+ } -+ msleep(10); -+ } ++ if (!vout) ++ return -EINVAL; + -+ pr_debug("receiving data"); -+ mipi_reg = mipi_csi2_get_error2(mipi_csi2_info); -+ pr_debug("mipi_csi2 error2 = 0x%X\n", mipi_reg); -+ mipi_reg = mipi_csi2_dphy_status(mipi_csi2_info); -+ pr_debug("mipi_csi2_dphy_status = 0x%X\n", mipi_reg); ++ if (V4L2_BUF_TYPE_VIDEO_OUTPUT != q->type) ++ return -EINVAL; + -+ ov5647_read_reg(0x0100, &resetval); -+ if (!resetval&0x01) { -+ pr_info("DEVICE WAS IN SOFTWARE STANDBY"); -+ ov5647_write_reg(0x0100, 0x01); -+ } ++ frame_size = get_frame_size(vout); ++ *size = PAGE_ALIGN(frame_size); + -+ ov5647_write_reg(0x4800, 0x04); -+ msleep(266); -+ OV5647_stream_on(); -+ msleep(30); -+ OV5647_turn_on_AE_AG(1); -+ } -+err: -+ return retval; ++ return 0; +} + -+/* --------------- IOCTL functions from v4l2_int_ioctl_desc --------------- */ -+ -+static int ioctl_g_ifparm(struct v4l2_int_device *s, struct v4l2_ifparm *p) ++/* ++ * This function will be called when VIDIOC_QBUF ioctl is called. ++ * It prepare buffers before give out for the display. This function ++ * converts user space virtual address into physical address if userptr memory ++ * exchange mechanism is used. ++ */ ++static int mxc_vout_buffer_prepare(struct videobuf_queue *q, ++ struct videobuf_buffer *vb, ++ enum v4l2_field field) +{ -+ if (s == NULL) { -+ pr_err(" ERROR!! no slave device set!\n"); -+ return -1; -+ } -+ -+ memset(p, 0, sizeof(*p)); -+ p->u.bt656.clock_curr = ov5647_data.mclk; -+ pr_debug(" clock_curr=mclk=%d\n", ov5647_data.mclk); -+ p->if_type = V4L2_IF_TYPE_BT656; -+ p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_NOBT_10BIT; -+ p->u.bt656.clock_min = OV5647_XCLK_MIN; -+ p->u.bt656.clock_max = OV5647_XCLK_MAX; -+ p->u.bt656.bt_sync_correct = 1; /* Indicate external vsync */ -+ ++ vb->state = VIDEOBUF_PREPARED; + 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. ++/* ++ * Buffer queue funtion will be called from the videobuf layer when _QBUF ++ * ioctl is called. It is used to enqueue buffer, which is ready to be ++ * displayed. ++ * This function is protected by q->irqlock. + */ -+static int ioctl_s_power(struct v4l2_int_device *s, int on) ++static void mxc_vout_buffer_queue(struct videobuf_queue *q, ++ struct videobuf_buffer *vb) +{ -+ struct sensor_data *sensor = s->priv; ++ struct mxc_vout_output *vout = q->priv_data; ++ struct videobuf_buffer *active_vb; + -+ if (on && !sensor->on) { -+ if (io_regulator) -+ if (regulator_enable(io_regulator) != 0) -+ return -EIO; -+ if (core_regulator) -+ if (regulator_enable(core_regulator) != 0) -+ return -EIO; -+ if (gpo_regulator) -+ if (regulator_enable(gpo_regulator) != 0) -+ return -EIO; -+ if (analog_regulator) -+ if (regulator_enable(analog_regulator) != 0) -+ return -EIO; -+ /* Make sure power on */ -+ ov5647_standby(0); -+ } else if (!on && sensor->on) { -+ if (analog_regulator) -+ regulator_disable(analog_regulator); -+ if (core_regulator) -+ regulator_disable(core_regulator); -+ if (io_regulator) -+ regulator_disable(io_regulator); -+ if (gpo_regulator) -+ regulator_disable(gpo_regulator); ++ list_add_tail(&vb->queue, &vout->queue_list); ++ vb->state = VIDEOBUF_QUEUED; + -+ ov5647_standby(1); ++ if (vout->timer_stop) { ++ if (deinterlace_3_field(vout) && ++ !list_empty(&vout->active_list)) { ++ active_vb = list_first_entry(&vout->active_list, ++ struct videobuf_buffer, queue); ++ setup_buf_timer(vout, active_vb); ++ } else { ++ setup_buf_timer(vout, vb); ++ } ++ vout->timer_stop = false; + } -+ -+ sensor->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. ++/* ++ * Buffer release function is called from videobuf layer to release buffer ++ * which are already allocated + */ -+static int ioctl_g_parm(struct v4l2_int_device *s, struct v4l2_streamparm *a) ++static void mxc_vout_buffer_release(struct videobuf_queue *q, ++ struct videobuf_buffer *vb) +{ -+ struct sensor_data *sensor = s->priv; -+ struct v4l2_captureparm *cparm = &a->parm.capture; -+ int ret = 0; ++ vb->state = VIDEOBUF_NEEDS_INIT; ++} + -+ 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; -+ ret = 0; -+ break; ++static int mxc_vout_mmap(struct file *file, struct vm_area_struct *vma) ++{ ++ int ret; ++ struct mxc_vout_output *vout = file->private_data; + -+ /* 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; ++ if (!vout) ++ return -ENODEV; + -+ default: -+ pr_debug(" type is unknown - %d\n", a->type); -+ ret = -EINVAL; -+ break; -+ } ++ ret = videobuf_mmap_mapper(&vout->vbq, vma); ++ if (ret < 0) ++ v4l2_err(vout->vfd->v4l2_dev, ++ "offset invalid [offset=0x%lx]\n", ++ (vma->vm_pgoff << PAGE_SHIFT)); + + 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) ++static int mxc_vout_release(struct file *file) +{ -+ struct sensor_data *sensor = s->priv; -+ struct v4l2_fract *timeperframe = &a->parm.capture.timeperframe; -+ u32 tgt_fps; /* target frames per secound */ -+ enum ov5647_frame_rate frame_rate; -+ enum ov5647_mode orig_mode; -+ int ret = 0; -+ -+ /* Make sure power on */ -+ ov5647_standby(0); -+ -+ 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; -+ } ++ unsigned int ret = 0; ++ struct videobuf_queue *q; ++ struct mxc_vout_output *vout = file->private_data; + -+ /* Actual frame rate we use */ -+ tgt_fps = timeperframe->denominator / -+ timeperframe->numerator; ++ if (!vout) ++ return 0; + -+ if (tgt_fps == 15) -+ frame_rate = ov5647_15_fps; -+ else if (tgt_fps == 30) -+ frame_rate = ov5647_30_fps; ++ if (--vout->open_cnt == 0) { ++ q = &vout->vbq; ++ if (q->streaming) ++ mxc_vidioc_streamoff(file, vout, vout->type); + else { -+ pr_err(" The camera frame rate is not supported!\n"); -+ return -EINVAL; ++ release_disp_output(vout); ++ videobuf_queue_cancel(q); + } -+ -+ orig_mode = sensor->streamcap.capturemode; -+ ret = ov5647_init_mode(frame_rate, -+ (u32)a->parm.capture.capturemode, orig_mode); -+ if (ret < 0) -+ return ret; -+ -+ sensor->streamcap.timeperframe = *timeperframe; -+ sensor->streamcap.capturemode = -+ (u32)a->parm.capture.capturemode; -+ -+ 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; ++ destroy_workqueue(vout->v4l_wq); ++ ret = videobuf_mmap_free(q); + } + + 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) ++static int mxc_vout_open(struct file *file) +{ -+ struct sensor_data *sensor = s->priv; -+ -+ 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: -+ break; ++ struct mxc_vout_output *vout = NULL; ++ int ret = 0; + -+ default: -+ f->fmt.pix = sensor->pix; -+ break; -+ } ++ vout = video_drvdata(file); + -+ return 0; -+} ++ if (vout == NULL) ++ return -ENODEV; + -+/*! -+ * 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) -+{ -+ int ret = 0; ++ if (vout->open_cnt++ == 0) { ++ vout->ctrl_rotate = 0; ++ vout->ctrl_vflip = 0; ++ vout->ctrl_hflip = 0; ++ update_display_setting(); ++ ret = update_setting_from_fbi(vout, vout->fbi); ++ if (ret < 0) ++ goto err; + -+ switch (vc->id) { -+ case V4L2_CID_BRIGHTNESS: -+ vc->value = ov5647_data.brightness; -+ break; -+ case V4L2_CID_HUE: -+ vc->value = ov5647_data.hue; -+ break; -+ case V4L2_CID_CONTRAST: -+ vc->value = ov5647_data.contrast; -+ break; -+ case V4L2_CID_SATURATION: -+ vc->value = ov5647_data.saturation; -+ break; -+ case V4L2_CID_RED_BALANCE: -+ vc->value = ov5647_data.red; -+ break; -+ case V4L2_CID_BLUE_BALANCE: -+ vc->value = ov5647_data.blue; -+ break; -+ case V4L2_CID_EXPOSURE: -+ vc->value = ov5647_data.ae_mode; -+ break; -+ default: -+ ret = -EINVAL; -+ } ++ vout->v4l_wq = create_singlethread_workqueue("v4l2q"); ++ if (!vout->v4l_wq) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "Could not create work queue\n"); ++ ret = -ENOMEM; ++ goto err; ++ } + -+ return ret; -+} ++ INIT_WORK(&vout->disp_work, disp_work_func); + -+/*! -+ * 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; ++ INIT_LIST_HEAD(&vout->queue_list); ++ INIT_LIST_HEAD(&vout->active_list); + -+ pr_debug("In ov5647:ioctl_s_ctrl %d\n", -+ vc->id); ++ vout->fmt_init = false; ++ vout->frame_count = 0; ++ vout->vdi_frame_cnt = 0; + -+ 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; ++ vout->win_pos.x = 0; ++ vout->win_pos.y = 0; ++ vout->release = true; + } + -+ 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) -+{ -+ if (fsize->index > ov5647_mode_MAX) -+ return -EINVAL; ++ file->private_data = vout; + -+ fsize->pixel_format = ov5647_data.pix.pixelformat; -+ fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; -+ fsize->discrete.width = -+ max(ov5647_mode_info_data[0][fsize->index].width, -+ ov5647_mode_info_data[1][fsize->index].width); -+ fsize->discrete.height = -+ max(ov5647_mode_info_data[0][fsize->index].height, -+ ov5647_mode_info_data[1][fsize->index].height); -+ return 0; ++err: ++ return ret; +} + -+/*! -+ * 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. ++/* ++ * V4L2 ioctls + */ -+static int ioctl_g_chip_ident(struct v4l2_int_device *s, int *id) ++static int mxc_vidioc_querycap(struct file *file, void *fh, ++ struct v4l2_capability *cap) +{ -+ ((struct v4l2_dbg_chip_ident *)id)->match.type = -+ V4L2_CHIP_MATCH_I2C_DRIVER; -+ strcpy(((struct v4l2_dbg_chip_ident *)id)->match.name, -+ "ov5647_mipi_camera"); -+ -+ return 0; -+} ++ struct mxc_vout_output *vout = fh; + -+/*! -+ * 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) -+{ ++ strlcpy(cap->driver, VOUT_NAME, sizeof(cap->driver)); ++ strlcpy(cap->card, vout->vfd->name, sizeof(cap->card)); ++ cap->bus_info[0] = '\0'; ++ cap->capabilities = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT; + + 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) ++static int mxc_vidioc_enum_fmt_vid_out(struct file *file, void *fh, ++ struct v4l2_fmtdesc *fmt) +{ -+ if (fmt->index > ov5647_mode_MAX) ++ if (fmt->index >= NUM_MXC_VOUT_FORMATS) + return -EINVAL; + -+ fmt->pixelformat = ov5647_data.pix.pixelformat; ++ strlcpy(fmt->description, mxc_formats[fmt->index].description, ++ sizeof(fmt->description)); ++ fmt->pixelformat = mxc_formats[fmt->index].pixelformat; + + 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) ++static int mxc_vidioc_g_fmt_vid_out(struct file *file, void *fh, ++ struct v4l2_format *f) +{ -+ struct sensor_data *sensor = s->priv; -+ u32 tgt_xclk; /* target xclk */ -+ u32 tgt_fps; /* target frames per secound */ -+ int ret; -+ enum ov5647_frame_rate frame_rate; -+ void *mipi_csi2_info; -+ -+ ov5647_data.on = true; -+ -+ /* mclk */ -+ tgt_xclk = ov5647_data.mclk; -+ tgt_xclk = min(tgt_xclk, (u32)OV5647_XCLK_MAX); -+ tgt_xclk = max(tgt_xclk, (u32)OV5647_XCLK_MIN); -+ ov5647_data.mclk = tgt_xclk; -+ -+ pr_debug(" Setting mclk to %d MHz\n", tgt_xclk / 1000000); -+ -+ /* Default camera frame rate is set in probe */ -+ tgt_fps = sensor->streamcap.timeperframe.denominator / -+ sensor->streamcap.timeperframe.numerator; -+ -+ if (tgt_fps == 15) -+ frame_rate = ov5647_15_fps; -+ else if (tgt_fps == 30) -+ frame_rate = ov5647_30_fps; -+ else -+ return -EINVAL; /* Only support 15fps or 30fps now. */ ++ struct mxc_vout_output *vout = fh; ++ struct v4l2_rect rect; + -+ mipi_csi2_info = mipi_csi2_get_info(); ++ f->fmt.pix.width = vout->task.input.width; ++ f->fmt.pix.height = vout->task.input.height; ++ f->fmt.pix.pixelformat = vout->task.input.format; ++ f->fmt.pix.sizeimage = get_frame_size(vout); + -+ /* enable mipi csi2 */ -+ if (mipi_csi2_info) -+ mipi_csi2_enable(mipi_csi2_info); -+ else { -+ printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n", -+ __func__, __FILE__); -+ return -EPERM; ++ if (f->fmt.pix.priv) { ++ rect.left = vout->task.input.crop.pos.x; ++ rect.top = vout->task.input.crop.pos.y; ++ rect.width = vout->task.input.crop.w; ++ rect.height = vout->task.input.crop.h; ++ if (copy_to_user((void __user *)f->fmt.pix.priv, ++ &rect, sizeof(rect))) ++ return -EFAULT; + } -+ -+ ret = ov5647_init_mode(frame_rate, ov5647_mode_INIT, ov5647_mode_INIT); -+ -+ return ret; -+} -+ -+/*! -+ * 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); ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "frame_size:0x%x, pix_fmt:0x%x\n", ++ f->fmt.pix.sizeimage, ++ vout->task.input.format); + + return 0; +} + -+/*! -+ * This structure defines all the ioctls for this module and links them to the -+ * enumeration. -+ */ -+static struct v4l2_int_ioctl_desc ov5647_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_g_needs_reset_num, -+ (v4l2_int_ioctl_func *)ioctl_g_needs_reset}, */ -+/* {vidioc_int_reset_num, (v4l2_int_ioctl_func *)ioctl_reset}, */ -+ {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_s_fmt_cap_num, (v4l2_int_ioctl_func *) ioctl_s_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_queryctrl_num, (v4l2_int_ioctl_func *)ioctl_queryctrl}, */ -+ {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 ov5647_slave = { -+ .ioctls = ov5647_ioctl_desc, -+ .num_ioctls = ARRAY_SIZE(ov5647_ioctl_desc), -+}; -+ -+static struct v4l2_int_device ov5647_int_device = { -+ .module = THIS_MODULE, -+ .name = "ov5647_mipi", -+ .type = v4l2_int_type_slave, -+ .u = { -+ .slave = &ov5647_slave, -+ }, -+}; -+ -+static ssize_t show_reg(struct device *dev, -+ struct device_attribute *attr, char *buf) ++static inline int ipu_try_task(struct mxc_vout_output *vout) +{ -+ u8 val; -+ s32 rval = ov5647_read_reg(ov5647_data.last_reg, &val); ++ int ret; ++ struct ipu_task *task = &vout->task; + -+ return sprintf(buf, "ov5647[0x%04x]=0x%02x\n",ov5647_data.last_reg, rval); -+} -+static ssize_t set_reg(struct device *dev, -+ struct device_attribute *attr, -+ const char *buf, size_t count) -+{ -+ int regnum, value; -+ int num_parsed = sscanf(buf, "%04x=%02x", ®num, &value); -+ if (1 <= num_parsed) { -+ if (0xffff < (unsigned)regnum){ -+ pr_err("%s:invalid regnum %x\n", __func__, regnum); -+ return 0; -+ } -+ ov5647_data.last_reg = regnum; -+ } -+ if (2 == num_parsed) { -+ if (0xff < (unsigned)value) { -+ pr_err("%s:invalid value %x\n", __func__, value); -+ return 0; ++again: ++ ret = ipu_check_task(task); ++ if (ret != IPU_CHECK_OK) { ++ if (ret > IPU_CHECK_ERR_MIN) { ++ if (ret == IPU_CHECK_ERR_SPLIT_INPUTW_OVER || ++ ret == IPU_CHECK_ERR_W_DOWNSIZE_OVER) { ++ task->input.crop.w -= 8; ++ goto again; ++ } ++ if (ret == IPU_CHECK_ERR_SPLIT_INPUTH_OVER || ++ ret == IPU_CHECK_ERR_H_DOWNSIZE_OVER) { ++ task->input.crop.h -= 8; ++ goto again; ++ } ++ if (ret == IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER) { ++ if (vout->disp_support_windows) { ++ task->output.width -= 8; ++ task->output.crop.w = ++ task->output.width; ++ } else ++ task->output.crop.w -= 8; ++ goto again; ++ } ++ if (ret == IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER) { ++ if (vout->disp_support_windows) { ++ task->output.height -= 8; ++ task->output.crop.h = ++ task->output.height; ++ } else ++ task->output.crop.h -= 8; ++ goto again; ++ } ++ ret = -EINVAL; + } -+ ov5647_write_reg(ov5647_data.last_reg, value); -+ } -+ return count; -+} ++ } else ++ ret = 0; + -+/* XXX: workaround for v4l2 client except for gstreamer-imx */ -+static ssize_t show_mode(struct device *dev, -+ struct device_attribute *attr, char *buf) -+{ -+ return sprintf(buf, "ov5647 mode = 0x%02x\n", (int)ov5647_data.streamcap.capturemode); ++ return ret; +} + -+static ssize_t set_mode(struct device *dev, -+ struct device_attribute *attr, -+ const char *buf, size_t count) ++static inline int vdoaipu_try_task(struct mxc_vout_output *vout) +{ -+ unsigned long mode; ++ int ret; ++ int is_1080p_stream; ++ size_t size; ++ struct ipu_task *ipu_task = &vout->task; ++ struct ipu_crop *icrop = &ipu_task->input.crop; ++ struct ipu_task *vdoa_task = &vout->vdoa_task; ++ u32 deinterlace = 0; ++ u32 in_fmt; + -+ mode = simple_strtoul(buf, NULL, 10); -+ if ((enum ov5647_mode)mode >= ov5647_mode_MIN && -+ (enum ov5647_mode)mode <= ov5647_mode_MAX) { ++ if (vout->task.input.deinterlace.enable) ++ deinterlace = 1; + -+ ov5647_data.streamcap.capturemode = mode; -+ ov5647_data.pix.width = -+ max(ov5647_mode_info_data[0][mode].width, -+ ov5647_mode_info_data[1][mode].width); -+ ov5647_data.pix.height = -+ max(ov5647_mode_info_data[0][mode].height, -+ ov5647_mode_info_data[1][mode].height); -+ ov5647_data_add.map_sizeimage = -+ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; ++ memset(vdoa_task, 0, sizeof(*vdoa_task)); ++ vdoa_task->output.format = IPU_PIX_FMT_NV12; ++ memcpy(&vdoa_task->input, &ipu_task->input, ++ sizeof(ipu_task->input)); ++ if ((icrop->w % IPU_PIX_FMT_TILED_NV12_MBALIGN) || ++ (icrop->h % IPU_PIX_FMT_TILED_NV12_MBALIGN)) { ++ vdoa_task->input.crop.w = ++ ALIGN(icrop->w, IPU_PIX_FMT_TILED_NV12_MBALIGN); ++ vdoa_task->input.crop.h = ++ ALIGN(icrop->h, IPU_PIX_FMT_TILED_NV12_MBALIGN); + } ++ vdoa_task->output.width = vdoa_task->input.crop.w; ++ vdoa_task->output.height = vdoa_task->input.crop.h; ++ vdoa_task->output.crop.w = vdoa_task->input.crop.w; ++ vdoa_task->output.crop.h = vdoa_task->input.crop.h; + -+ return count; -+} -+ -+static DEVICE_ATTR(ov5647_reg, S_IRUGO|S_IWUSR|S_IWGRP, show_reg, set_reg); -+static DEVICE_ATTR(ov5647_mode, S_IRUGO|S_IWUSR|S_IWGRP, show_mode, set_mode); -+ -+/*! -+ * ov5647 I2C probe function -+ * -+ * @param adapter struct i2c_adapter * -+ * @return Error code indicating success or failure -+ */ -+static int ov5647_probe(struct i2c_client *client, -+ const struct i2c_device_id *id) -+{ -+ struct device *dev = &client->dev; -+ int retval, init, gpio; -+ u8 chip_id_high, chip_id_low; -+ struct sensor_data *sensor = &ov5647_data; -+ enum of_gpio_flags flags; -+ bool extbuf; ++ size = PAGE_ALIGN(vdoa_task->input.crop.w * ++ vdoa_task->input.crop.h * ++ fmt_to_bpp(vdoa_task->output.format)/8); ++ if (size > vout->vdoa_work.size) { ++ if (vout->vdoa_work.vaddr) ++ free_dma_buf(vout, &vout->vdoa_work); ++ vout->vdoa_work.size = size; ++ ret = alloc_dma_buf(vout, &vout->vdoa_work); ++ if (ret < 0) ++ return ret; ++ } ++ ret = ipu_check_task(vdoa_task); ++ if (ret != IPU_CHECK_OK) ++ return -EINVAL; + -+ /* request power down pin */ -+ pwn_gpio = of_get_named_gpio_flags(dev->of_node, "pwn-gpios", 0, &flags); -+ if (gpio_is_valid(pwn_gpio)) { -+ /* powon_active - camera power on */ -+ /* !powon_active - camera power down */ -+ powon_active = !(flags & OF_GPIO_ACTIVE_LOW); -+ init = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; ++ is_1080p_stream = CHECK_TILED_1080P_STREAM(vout); ++ if (is_1080p_stream) ++ ipu_task->input.crop.h = VALID_HEIGHT_1080P; ++ in_fmt = ipu_task->input.format; ++ ipu_task->input.format = vdoa_task->output.format; ++ ipu_task->input.height = vdoa_task->output.height; ++ ipu_task->input.width = vdoa_task->output.width; ++ if (deinterlace) ++ ipu_task->input.deinterlace.enable = 0; ++ ret = ipu_try_task(vout); ++ if (deinterlace) ++ ipu_task->input.deinterlace.enable = 1; ++ ipu_task->input.format = in_fmt; + -+ retval = devm_gpio_request_one(dev, pwn_gpio, init, "ov5647_mipi_pwdn"); -+ if (retval < 0) { -+ dev_warn(dev, "request of pwn_gpio failed"); -+ pwn_gpio = -EINVAL; -+ } -+ } ++ return ret; ++} + -+ /* request reset pin */ -+ rst_gpio = of_get_named_gpio_flags(dev->of_node, "rst-gpios", 0, &flags); -+ if (gpio_is_valid(rst_gpio)) { -+ /* rst_active - camera reset */ -+ /* !rst_active - clear camera reset */ -+ rst_active = !(flags & OF_GPIO_ACTIVE_LOW); -+ init = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; ++static int mxc_vout_try_task(struct mxc_vout_output *vout) ++{ ++ int ret = 0; ++ struct ipu_output *output = &vout->task.output; ++ struct ipu_input *input = &vout->task.input; ++ struct ipu_crop *crop = &input->crop; ++ u32 o_height = 0; ++ u32 ocrop_h = 0; ++ bool tiled_fmt = false; ++ bool tiled_need_pp = false; + -+ retval = devm_gpio_request_one(dev, rst_gpio, init, "ov5647_mipi_reset"); -+ if (retval < 0) { -+ dev_warn(dev, "request of ov5647_mipi_reset failed"); -+ rst_gpio = -EINVAL; -+ } ++ vout->vdoa_1080p = CHECK_TILED_1080P_DISPLAY(vout); ++ if (vout->vdoa_1080p) { ++ input->crop.h = FRAME_HEIGHT_1080P; ++ o_height = output->height; ++ ocrop_h = output->crop.h; ++ output->height = FRAME_HEIGHT_1080P; ++ output->crop.h = FRAME_HEIGHT_1080P; + } + -+ /* request LED(for sanity) pin */ -+ gpio = of_get_named_gpio_flags(dev->of_node, "led-gpios", 0, &flags); -+ if (gpio_is_valid(gpio)) { -+ /* led_active - LED turn on */ -+ /* !led_active - LED trun off */ -+ led_active = !(flags & OF_GPIO_ACTIVE_LOW); -+ init = (flags & OF_GPIO_ACTIVE_LOW) ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; -+ -+ retval = devm_gpio_request_one(dev, gpio, init, "ov5647_mipi_led"); -+ if (retval < 0) { -+ dev_warn(dev, "request of led_gpio failed"); -+ gpio = -EINVAL; ++ if ((IPU_PIX_FMT_TILED_NV12 == input->format) || ++ (IPU_PIX_FMT_TILED_NV12F == input->format)) { ++ if ((input->width % IPU_PIX_FMT_TILED_NV12_MBALIGN) || ++ (input->height % IPU_PIX_FMT_TILED_NV12_MBALIGN) || ++ (crop->pos.x % IPU_PIX_FMT_TILED_NV12_MBALIGN) || ++ (crop->pos.y % IPU_PIX_FMT_TILED_NV12_MBALIGN)) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "ERR: tiled fmt needs 16 pixel align.\n"); ++ return -EINVAL; + } ++ if ((crop->w % IPU_PIX_FMT_TILED_NV12_MBALIGN) || ++ (crop->h % IPU_PIX_FMT_TILED_NV12_MBALIGN)) ++ tiled_need_pp = true; ++ } else { ++ crop->w -= crop->w % 8; ++ crop->h -= crop->h % 8; + } ++ /* assume task.output already set by S_CROP */ ++ vout->linear_bypass_pp = is_pp_bypass(vout); ++ if (vout->linear_bypass_pp) { ++ v4l2_info(vout->vfd->v4l2_dev, "Bypass IC.\n"); ++ output->format = input->format; ++ } else { ++ /* if need CSC, choose IPU-DP or IPU_IC do it */ ++ if (vout->disp_support_csc) { ++ if (colorspaceofpixel(input->format) == YUV_CS) ++ output->format = IPU_PIX_FMT_UYVY; ++ else ++ output->format = IPU_PIX_FMT_RGB565; ++ } else { ++ if (colorspaceofpixel(vout->disp_fmt) == YUV_CS) ++ output->format = IPU_PIX_FMT_UYVY; ++ else ++ output->format = IPU_PIX_FMT_RGB565; ++ } + -+ /* allocate extended video frame buffer */ -+ extbuf = of_find_property(dev->of_node, "extended-buffer", NULL); -+ -+ /* Set initial values for the sensor struct. */ -+ memset(&ov5647_data, 0, sizeof(ov5647_data)); -+ memset(&ov5647_data_add, 0, sizeof(ov5647_data_add)); ++ vout->tiled_bypass_pp = false; ++ if ((IPU_PIX_FMT_TILED_NV12 == input->format) || ++ (IPU_PIX_FMT_TILED_NV12F == input->format)) { ++ /* check resize/rotate/flip, or csc task */ ++ if (!(tiled_need_pp || ++ (IPU_ROTATE_NONE != output->rotate) || ++ (input->crop.w != output->crop.w) || ++ (input->crop.h != output->crop.h) || ++ (!vout->disp_support_csc && ++ (colorspaceofpixel(vout->disp_fmt) == RGB_CS))) ++ ) { ++ /* IC bypass */ ++ output->format = IPU_PIX_FMT_NV12; ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "tiled bypass pp\n"); ++ vout->tiled_bypass_pp = true; ++ } ++ tiled_fmt = true; ++ } + -+ sensor->mipi_camera = 1; -+ ov5647_data.sensor_clk = devm_clk_get(dev, "csi_mclk"); -+ if (IS_ERR(ov5647_data.sensor_clk)) { -+ /* assuming clock enabled by default */ -+ ov5647_data.sensor_clk = NULL; -+ dev_err(dev, "clock-frequency missing or invalid\n"); -+ return PTR_ERR(ov5647_data.sensor_clk); ++ if ((!vout->tiled_bypass_pp) && tiled_fmt) ++ ret = vdoaipu_try_task(vout); ++ else ++ ret = ipu_try_task(vout); + } + -+ retval = of_property_read_u32(dev->of_node, "mclk", -+ &(ov5647_data.mclk)); -+ if (retval) { -+ dev_err(dev, "mclk missing or invalid\n"); -+ return retval; ++ if (vout->vdoa_1080p) { ++ output->height = o_height; ++ output->crop.h = ocrop_h; + } + -+ retval = of_property_read_u32(dev->of_node, "mclk_source", -+ (u32 *) &(ov5647_data.mclk_source)); -+ if (retval) { -+ dev_err(dev, "mclk_source missing or invalid\n"); -+ return retval; -+ } ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "icrop.w:%u, icrop.h:%u, iw:%u, ih:%u," ++ "ocrop.w:%u, ocrop.h:%u, ow:%u, oh:%u\n", ++ input->crop.w, input->crop.h, ++ input->width, input->height, ++ output->crop.w, output->crop.h, ++ output->width, output->height); ++ return ret; ++} + -+ 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; -+ } ++static int mxc_vout_try_format(struct mxc_vout_output *vout, ++ struct v4l2_format *f) ++{ ++ int ret = 0; ++ struct v4l2_rect rect; + -+ retval = of_property_read_u32(dev->of_node, "csi_id", -+ &(ov5647_data.csi)); -+ if (retval) { -+ dev_err(dev, "csi id missing or invalid\n"); -+ return retval; ++ if ((f->fmt.pix.field != V4L2_FIELD_NONE) && ++ (IPU_PIX_FMT_TILED_NV12 == vout->task.input.format)) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "progressive tiled fmt should used V4L2_FIELD_NONE!\n"); ++ return -EINVAL; + } + -+ clk_prepare_enable(ov5647_data.sensor_clk); ++ if (f->fmt.pix.priv && copy_from_user(&rect, ++ (void __user *)f->fmt.pix.priv, sizeof(rect))) ++ return -EFAULT; + -+ ov5647_data.io_init = ov5647_reset; -+ ov5647_data.i2c_client = client; -+ /* real OV5647 pixelformat is V4L2_PIX_FMT_SBGGR10. */ -+ /* i.MX6 CSI CPD convert 10 bits color data to 8 bits. */ -+ /* (see drivers/mxc/ipu3/ipu_capture.c - _ipu_csi_init) */ -+ ov5647_data.pix.pixelformat = V4L2_PIX_FMT_SBGGR8; -+ ov5647_data.pix.width = 1024; -+ ov5647_data.pix.height = 768; -+ ov5647_data.streamcap.capability = V4L2_MODE_HIGHQUALITY | -+ V4L2_CAP_TIMEPERFRAME; -+ ov5647_data.streamcap.capturemode = ov5647_mode_XGA_1024_768; -+ ov5647_data.streamcap.timeperframe.denominator = DEFAULT_FPS; -+ ov5647_data.streamcap.timeperframe.numerator = 1; ++ vout->task.input.width = f->fmt.pix.width; ++ vout->task.input.height = f->fmt.pix.height; ++ vout->task.input.format = f->fmt.pix.pixelformat; + -+ /* lager memory allocate for Vivante direct texture mapping API */ -+ /* (VIDIOC_REQBUFS ioctl) */ -+ ov5647_data_add.map_sizeimage = -+ ov5647_data.pix.width * ov5647_data.pix.height * 3 / 2; /* I420 */ ++ ret = set_field_fmt(vout, f->fmt.pix.field); ++ if (ret < 0) ++ return ret; + -+ if (extbuf) { -+ ov5647_data.adata = &ov5647_data_add; ++ if (f->fmt.pix.priv) { ++ vout->task.input.crop.pos.x = rect.left; ++ vout->task.input.crop.pos.y = rect.top; ++ vout->task.input.crop.w = rect.width; ++ vout->task.input.crop.h = rect.height; ++ } else { ++ vout->task.input.crop.pos.x = 0; ++ vout->task.input.crop.pos.y = 0; ++ vout->task.input.crop.w = f->fmt.pix.width; ++ vout->task.input.crop.h = f->fmt.pix.height; + } ++ memcpy(&vout->in_rect, &vout->task.input.crop, sizeof(vout->in_rect)); + -+ ov5647_power_on(dev); ++ ret = mxc_vout_try_task(vout); ++ if (!ret) { ++ if (f->fmt.pix.priv) { ++ rect.width = vout->task.input.crop.w; ++ rect.height = vout->task.input.crop.h; ++ if (copy_to_user((void __user *)f->fmt.pix.priv, ++ &rect, sizeof(rect))) ++ ret = -EFAULT; ++ } else { ++ f->fmt.pix.width = vout->task.input.crop.w; ++ f->fmt.pix.height = vout->task.input.crop.h; ++ } ++ } + -+ ov5647_reset(); ++ return ret; ++} + -+ ov5647_standby(0); ++static bool mxc_vout_need_fb_reconfig(struct mxc_vout_output *vout, ++ struct mxc_vout_output *pre_vout) ++{ ++ if (!vout->vbq.streaming) ++ return false; + -+ retval = ov5647_read_reg(OV5647_CHIP_ID_HIGH_BYTE, &chip_id_high); -+ if (retval < 0 || chip_id_high != 0x56) { -+ pr_warning("camera ov5647_mipi is not found\n"); -+ clk_disable_unprepare(ov5647_data.sensor_clk); -+ return -ENODEV; -+ } -+ retval = ov5647_read_reg(OV5647_CHIP_ID_LOW_BYTE, &chip_id_low); -+ if (retval < 0 || chip_id_low != 0x47) { -+ pr_warning("camera ov5647_mipi is not found\n"); -+ clk_disable_unprepare(ov5647_data.sensor_clk); -+ return -ENODEV; -+ } ++ if (vout->tiled_bypass_pp) ++ return true; + -+ sensor->virtual_channel = sensor->csi | (sensor->ipu_id << 1); -+ ov5647_standby(1); ++ if (vout->linear_bypass_pp != pre_vout->linear_bypass_pp) ++ return true; + -+ led_gpio = gpio; -+ ov5647_int_device.priv = &ov5647_data; -+ retval = v4l2_int_device_register(&ov5647_int_device); ++ /* cropped output resolution or format are changed */ ++ if (vout->task.output.format != pre_vout->task.output.format || ++ vout->task.output.crop.w != pre_vout->task.output.crop.w || ++ vout->task.output.crop.h != pre_vout->task.output.crop.h) ++ return true; + -+// clk_disable_unprepare(ov5647_data.sensor_clk); ++ /* overlay: window position or resolution are changed */ ++ if (vout->disp_support_windows && ++ (vout->win_pos.x != pre_vout->win_pos.x || ++ vout->win_pos.y != pre_vout->win_pos.y || ++ vout->task.output.width != pre_vout->task.output.width || ++ vout->task.output.height != pre_vout->task.output.height)) ++ return true; + -+ if (device_create_file(dev, &dev_attr_ov5647_reg)) -+ dev_err(dev, "%s: error creating ov5647_reg entry\n", __func__); -+ if (device_create_file(dev, &dev_attr_ov5647_mode)) -+ dev_err(dev, "%s: error creating ov5647_mode entry\n", __func__); ++ /* background: cropped position is changed */ ++ if (!vout->disp_support_windows && ++ (vout->task.output.crop.pos.x != ++ pre_vout->task.output.crop.pos.x || ++ vout->task.output.crop.pos.y != ++ pre_vout->task.output.crop.pos.y)) ++ return true; + -+ pr_info("camera ov5647_mipi is found\n"); -+ return retval; ++ return false; +} + -+/*! -+ * ov5647 I2C detach function -+ * -+ * @param client struct i2c_client * -+ * @return Error code indicating success or failure -+ */ -+static int ov5647_remove(struct i2c_client *client) ++static int mxc_vidioc_s_fmt_vid_out(struct file *file, void *fh, ++ struct v4l2_format *f) +{ -+ v4l2_int_device_unregister(&ov5647_int_device); ++ struct mxc_vout_output *vout = fh; ++ int ret = 0; + -+ if (gpo_regulator) -+ regulator_disable(gpo_regulator); ++ if (vout->vbq.streaming) ++ return -EBUSY; + -+ if (analog_regulator) -+ regulator_disable(analog_regulator); ++ mutex_lock(&vout->task_lock); ++ ret = mxc_vout_try_format(vout, f); ++ if (ret >= 0) ++ vout->fmt_init = true; ++ mutex_unlock(&vout->task_lock); + -+ if (core_regulator) -+ regulator_disable(core_regulator); ++ return ret; ++} + -+ if (io_regulator) -+ regulator_disable(io_regulator); ++static int mxc_vidioc_cropcap(struct file *file, void *fh, ++ struct v4l2_cropcap *cropcap) ++{ ++ struct mxc_vout_output *vout = fh; ++ ++ if (cropcap->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ++ return -EINVAL; ++ ++ cropcap->bounds = vout->crop_bounds; ++ cropcap->defrect = vout->crop_bounds; + + return 0; +} + -+/*! -+ * ov5647 init function -+ * Called by insmod ov5647_camera.ko. -+ * -+ * @return Error code indicating success or failure -+ */ -+static __init int ov5647_init(void) ++static int mxc_vidioc_g_crop(struct file *file, void *fh, ++ struct v4l2_crop *crop) +{ -+ u8 err; ++ struct mxc_vout_output *vout = fh; + -+ err = i2c_add_driver(&ov5647_i2c_driver); -+ if (err != 0) -+ pr_err("%s:driver registration failed, error=%d\n", -+ __func__, err); ++ if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ++ return -EINVAL; + -+ return err; ++ if (vout->disp_support_windows) { ++ crop->c.left = vout->win_pos.x; ++ crop->c.top = vout->win_pos.y; ++ crop->c.width = vout->task.output.width; ++ crop->c.height = vout->task.output.height; ++ } else { ++ if (vout->task.output.crop.w && vout->task.output.crop.h) { ++ crop->c.left = vout->task.output.crop.pos.x; ++ crop->c.top = vout->task.output.crop.pos.y; ++ crop->c.width = vout->task.output.crop.w; ++ crop->c.height = vout->task.output.crop.h; ++ } else { ++ crop->c.left = 0; ++ crop->c.top = 0; ++ crop->c.width = vout->task.output.width; ++ crop->c.height = vout->task.output.height; ++ } ++ } ++ ++ return 0; +} + -+/*! -+ * OV5647 cleanup function -+ * Called on rmmod ov5647_camera.ko -+ * -+ * @return Error code indicating success or failure -+ */ -+static void __exit ov5647_clean(void) ++static int mxc_vidioc_s_crop(struct file *file, void *fh, ++ const struct v4l2_crop *crop) +{ -+ i2c_del_driver(&ov5647_i2c_driver); -+} ++ struct mxc_vout_output *vout = fh, *pre_vout; ++ struct v4l2_rect *b = &vout->crop_bounds; ++ struct v4l2_crop fix_up_crop; ++ int ret = 0; + -+module_init(ov5647_init); -+module_exit(ov5647_clean); ++ memcpy(&fix_up_crop, crop, sizeof(*crop)); + -+MODULE_AUTHOR("Viion Systems Inc."); -+MODULE_DESCRIPTION("OV5647 MIPI Camera Driver"); -+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 -@@ -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 -@@ -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 -@@ -0,0 +1,2265 @@ -+/* -+ * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved. -+ */ ++ if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ++ return -EINVAL; + -+/* -+ * 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 -+ */ ++ if (crop->c.width < 0 || crop->c.height < 0) ++ return -EINVAL; + -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include ++ if (crop->c.width == 0) ++ fix_up_crop.c.width = b->width - b->left; ++ if (crop->c.height == 0) ++ fix_up_crop.c.height = b->height - b->top; + -+#include -+#include -+#include ++ if (crop->c.top < b->top) ++ fix_up_crop.c.top = b->top; ++ if (crop->c.top >= b->top + b->height) ++ fix_up_crop.c.top = b->top + b->height - 1; ++ if (crop->c.height > b->top - crop->c.top + b->height) ++ fix_up_crop.c.height = ++ b->top - fix_up_crop.c.top + b->height; + -+#define UYVY_BLACK (0x00800080) -+#define RGB_BLACK (0x0) -+#define UV_BLACK (0x80) -+#define Y_BLACK (0x0) ++ if (crop->c.left < b->left) ++ fix_up_crop.c.left = b->left; ++ if (crop->c.left >= b->left + b->width) ++ fix_up_crop.c.left = b->left + b->width - 1; ++ if (crop->c.width > b->left - crop->c.left + b->width) ++ fix_up_crop.c.width = ++ b->left - fix_up_crop.c.left + b->width; + -+#define MAX_FB_NUM 6 -+#define FB_BUFS 3 -+#define VDOA_FB_BUFS (FB_BUFS - 1) -+#define VALID_HEIGHT_1080P (1080) -+#define FRAME_HEIGHT_1080P (1088) -+#define FRAME_WIDTH_1080P (1920) -+#define CHECK_TILED_1080P_DISPLAY(vout) \ -+ ((((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12) || \ -+ ((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12F)) &&\ -+ ((vout)->task.input.width == FRAME_WIDTH_1080P) && \ -+ ((vout)->task.input.height == FRAME_HEIGHT_1080P) && \ -+ ((vout)->task.input.crop.w == FRAME_WIDTH_1080P) && \ -+ (((vout)->task.input.crop.h == FRAME_HEIGHT_1080P) || \ -+ ((vout)->task.input.crop.h == VALID_HEIGHT_1080P)) && \ -+ ((vout)->task.output.width == FRAME_WIDTH_1080P) && \ -+ ((vout)->task.output.height == VALID_HEIGHT_1080P) && \ -+ ((vout)->task.output.crop.w == FRAME_WIDTH_1080P) && \ -+ ((vout)->task.output.crop.h == VALID_HEIGHT_1080P)) -+#define CHECK_TILED_1080P_STREAM(vout) \ -+ ((((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12) || \ -+ ((vout)->task.input.format == IPU_PIX_FMT_TILED_NV12F)) &&\ -+ ((vout)->task.input.width == FRAME_WIDTH_1080P) && \ -+ ((vout)->task.input.crop.w == FRAME_WIDTH_1080P) && \ -+ ((vout)->task.input.height == FRAME_HEIGHT_1080P) && \ -+ ((vout)->task.input.crop.h == FRAME_HEIGHT_1080P)) -+#define IS_PLANAR_PIXEL_FORMAT(format) \ -+ (format == IPU_PIX_FMT_NV12 || \ -+ format == IPU_PIX_FMT_YUV420P2 || \ -+ format == IPU_PIX_FMT_YUV420P || \ -+ format == IPU_PIX_FMT_YVU420P || \ -+ format == IPU_PIX_FMT_YUV422P || \ -+ format == IPU_PIX_FMT_YVU422P || \ -+ format == IPU_PIX_FMT_YUV444P) ++ /* stride line limitation */ ++ fix_up_crop.c.height -= fix_up_crop.c.height % 8; ++ fix_up_crop.c.width -= fix_up_crop.c.width % 8; ++ if ((fix_up_crop.c.width <= 0) || (fix_up_crop.c.height <= 0) || ++ ((fix_up_crop.c.left + fix_up_crop.c.width) > ++ (b->left + b->width)) || ++ ((fix_up_crop.c.top + fix_up_crop.c.height) > ++ (b->top + b->height))) { ++ v4l2_err(vout->vfd->v4l2_dev, "s_crop err: %d, %d, %d, %d", ++ fix_up_crop.c.left, fix_up_crop.c.top, ++ fix_up_crop.c.width, fix_up_crop.c.height); ++ return -EINVAL; ++ } + -+#define NSEC_PER_FRAME_30FPS (33333333) ++ /* the same setting, return */ ++ if (vout->disp_support_windows) { ++ if ((vout->win_pos.x == fix_up_crop.c.left) && ++ (vout->win_pos.y == fix_up_crop.c.top) && ++ (vout->task.output.crop.w == fix_up_crop.c.width) && ++ (vout->task.output.crop.h == fix_up_crop.c.height)) ++ return 0; ++ } else { ++ if ((vout->task.output.crop.pos.x == fix_up_crop.c.left) && ++ (vout->task.output.crop.pos.y == fix_up_crop.c.top) && ++ (vout->task.output.crop.w == fix_up_crop.c.width) && ++ (vout->task.output.crop.h == fix_up_crop.c.height)) ++ return 0; ++ } + -+struct mxc_vout_fb { -+ char *name; -+ int ipu_id; -+ struct v4l2_rect crop_bounds; -+ unsigned int disp_fmt; -+ bool disp_support_csc; -+ bool disp_support_windows; -+}; ++ pre_vout = vmalloc(sizeof(*pre_vout)); ++ if (!pre_vout) ++ return -ENOMEM; + -+struct dma_mem { -+ void *vaddr; -+ dma_addr_t paddr; -+ size_t size; -+}; ++ /* wait current work finish */ ++ if (vout->vbq.streaming) ++ flush_workqueue(vout->v4l_wq); + -+struct mxc_vout_output { -+ int open_cnt; -+ struct fb_info *fbi; -+ unsigned long fb_smem_start; -+ unsigned long fb_smem_len; -+ struct video_device *vfd; -+ struct mutex mutex; -+ struct mutex task_lock; -+ enum v4l2_buf_type type; ++ mutex_lock(&vout->task_lock); + -+ struct videobuf_queue vbq; -+ spinlock_t vbq_lock; ++ memcpy(pre_vout, vout, sizeof(*vout)); + -+ struct list_head queue_list; -+ struct list_head active_list; ++ if (vout->disp_support_windows) { ++ vout->task.output.crop.pos.x = 0; ++ vout->task.output.crop.pos.y = 0; ++ vout->win_pos.x = fix_up_crop.c.left; ++ vout->win_pos.y = fix_up_crop.c.top; ++ vout->task.output.width = fix_up_crop.c.width; ++ vout->task.output.height = fix_up_crop.c.height; ++ } else { ++ vout->task.output.crop.pos.x = fix_up_crop.c.left; ++ vout->task.output.crop.pos.y = fix_up_crop.c.top; ++ } + -+ struct v4l2_rect crop_bounds; -+ unsigned int disp_fmt; -+ struct mxcfb_pos win_pos; -+ bool disp_support_windows; -+ bool disp_support_csc; ++ vout->task.output.crop.w = fix_up_crop.c.width; ++ vout->task.output.crop.h = fix_up_crop.c.height; + -+ bool fmt_init; -+ bool release; -+ bool linear_bypass_pp; -+ bool vdoa_1080p; -+ bool tiled_bypass_pp; -+ struct v4l2_rect in_rect; -+ struct ipu_task task; -+ struct ipu_task vdoa_task; -+ struct dma_mem vdoa_work; -+ struct dma_mem vdoa_output[VDOA_FB_BUFS]; ++ /* ++ * must S_CROP before S_FMT, for fist time S_CROP, will not check ++ * ipu task, it will check in S_FMT, after S_FMT, S_CROP should ++ * check ipu task too. ++ */ ++ if (vout->fmt_init) { ++ memcpy(&vout->task.input.crop, &vout->in_rect, ++ sizeof(vout->in_rect)); ++ ret = mxc_vout_try_task(vout); ++ if (ret < 0) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "vout check task failed\n"); ++ memcpy(vout, pre_vout, sizeof(*vout)); ++ goto done; ++ } + -+ bool timer_stop; -+ struct hrtimer timer; -+ struct workqueue_struct *v4l_wq; -+ struct work_struct disp_work; -+ unsigned long frame_count; -+ unsigned long vdi_frame_cnt; -+ ktime_t start_ktime; ++ if (mxc_vout_need_fb_reconfig(vout, pre_vout)) { ++ ret = config_disp_output(vout); ++ if (ret < 0) ++ v4l2_err(vout->vfd->v4l2_dev, ++ "Config display output failed\n"); ++ } ++ } + -+ int ctrl_rotate; -+ int ctrl_vflip; -+ int ctrl_hflip; ++done: ++ vfree(pre_vout); ++ mutex_unlock(&vout->task_lock); + -+ dma_addr_t disp_bufs[FB_BUFS]; ++ return ret; ++} + -+ struct videobuf_buffer *pre1_vb; -+ struct videobuf_buffer *pre2_vb; -+}; ++static int mxc_vidioc_queryctrl(struct file *file, void *fh, ++ struct v4l2_queryctrl *ctrl) ++{ ++ int ret = 0; + -+struct mxc_vout_dev { -+ struct device *dev; -+ struct v4l2_device v4l2_dev; -+ struct mxc_vout_output *out[MAX_FB_NUM]; -+ int out_num; -+}; ++ switch (ctrl->id) { ++ case V4L2_CID_ROTATE: ++ ret = v4l2_ctrl_query_fill(ctrl, 0, 270, 90, 0); ++ break; ++ case V4L2_CID_VFLIP: ++ ret = v4l2_ctrl_query_fill(ctrl, 0, 1, 1, 0); ++ break; ++ case V4L2_CID_HFLIP: ++ ret = v4l2_ctrl_query_fill(ctrl, 0, 1, 1, 0); ++ break; ++ case V4L2_CID_MXC_MOTION: ++ ret = v4l2_ctrl_query_fill(ctrl, 0, 2, 1, 0); ++ break; ++ default: ++ ctrl->name[0] = '\0'; ++ ret = -EINVAL; ++ } ++ return ret; ++} + -+/* Driver Configuration macros */ -+#define VOUT_NAME "mxc_vout" ++static int mxc_vidioc_g_ctrl(struct file *file, void *fh, ++ struct v4l2_control *ctrl) ++{ ++ int ret = 0; ++ struct mxc_vout_output *vout = fh; + -+/* Variables configurable through module params*/ -+static int debug; -+static int vdi_rate_double; -+static int video_nr = 16; ++ switch (ctrl->id) { ++ case V4L2_CID_ROTATE: ++ ctrl->value = vout->ctrl_rotate; ++ break; ++ case V4L2_CID_VFLIP: ++ ctrl->value = vout->ctrl_vflip; ++ break; ++ case V4L2_CID_HFLIP: ++ ctrl->value = vout->ctrl_hflip; ++ break; ++ case V4L2_CID_MXC_MOTION: ++ if (vout->task.input.deinterlace.enable) ++ ctrl->value = vout->task.input.deinterlace.motion; ++ else ++ ctrl->value = 0; ++ break; ++ default: ++ ret = -EINVAL; ++ } ++ return ret; ++} + -+/* Module parameters */ -+module_param(video_nr, int, S_IRUGO); -+MODULE_PARM_DESC(video_nr, "video device numbers"); -+module_param(debug, int, 0600); -+MODULE_PARM_DESC(debug, "Debug level (0-1)"); -+module_param(vdi_rate_double, int, 0600); -+MODULE_PARM_DESC(vdi_rate_double, "vdi frame rate double on/off"); ++static void setup_task_rotation(struct mxc_vout_output *vout) ++{ ++ if (vout->ctrl_rotate == 0) { ++ if (vout->ctrl_vflip && vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_180; ++ else if (vout->ctrl_vflip) ++ vout->task.output.rotate = IPU_ROTATE_VERT_FLIP; ++ else if (vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_HORIZ_FLIP; ++ else ++ vout->task.output.rotate = IPU_ROTATE_NONE; ++ } else if (vout->ctrl_rotate == 90) { ++ if (vout->ctrl_vflip && vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_90_LEFT; ++ else if (vout->ctrl_vflip) ++ vout->task.output.rotate = IPU_ROTATE_90_RIGHT_VFLIP; ++ else if (vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_90_RIGHT_HFLIP; ++ else ++ vout->task.output.rotate = IPU_ROTATE_90_RIGHT; ++ } else if (vout->ctrl_rotate == 180) { ++ if (vout->ctrl_vflip && vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_NONE; ++ else if (vout->ctrl_vflip) ++ vout->task.output.rotate = IPU_ROTATE_HORIZ_FLIP; ++ else if (vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_VERT_FLIP; ++ else ++ vout->task.output.rotate = IPU_ROTATE_180; ++ } else if (vout->ctrl_rotate == 270) { ++ if (vout->ctrl_vflip && vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_90_RIGHT; ++ else if (vout->ctrl_vflip) ++ vout->task.output.rotate = IPU_ROTATE_90_RIGHT_HFLIP; ++ else if (vout->ctrl_hflip) ++ vout->task.output.rotate = IPU_ROTATE_90_RIGHT_VFLIP; ++ else ++ vout->task.output.rotate = IPU_ROTATE_90_LEFT; ++ } ++} + -+static const struct v4l2_fmtdesc mxc_formats[] = { -+ { -+ .description = "RGB565", -+ .pixelformat = V4L2_PIX_FMT_RGB565, -+ }, -+ { -+ .description = "BGR24", -+ .pixelformat = V4L2_PIX_FMT_BGR24, -+ }, -+ { -+ .description = "RGB24", -+ .pixelformat = V4L2_PIX_FMT_RGB24, -+ }, -+ { -+ .description = "RGB32", -+ .pixelformat = V4L2_PIX_FMT_RGB32, -+ }, -+ { -+ .description = "BGR32", -+ .pixelformat = V4L2_PIX_FMT_BGR32, -+ }, -+ { -+ .description = "NV12", -+ .pixelformat = V4L2_PIX_FMT_NV12, -+ }, -+ { -+ .description = "UYVY", -+ .pixelformat = V4L2_PIX_FMT_UYVY, -+ }, -+ { -+ .description = "YUYV", -+ .pixelformat = V4L2_PIX_FMT_YUYV, -+ }, -+ { -+ .description = "YUV422 planar", -+ .pixelformat = V4L2_PIX_FMT_YUV422P, -+ }, -+ { -+ .description = "YUV444", -+ .pixelformat = V4L2_PIX_FMT_YUV444, -+ }, -+ { -+ .description = "YUV420", -+ .pixelformat = V4L2_PIX_FMT_YUV420, -+ }, ++static int mxc_vidioc_s_ctrl(struct file *file, void *fh, ++ struct v4l2_control *ctrl) ++{ ++ int ret = 0; ++ struct mxc_vout_output *vout = fh, *pre_vout; ++ ++ pre_vout = vmalloc(sizeof(*pre_vout)); ++ if (!pre_vout) ++ return -ENOMEM; ++ ++ /* wait current work finish */ ++ if (vout->vbq.streaming) ++ flush_workqueue(vout->v4l_wq); ++ ++ mutex_lock(&vout->task_lock); ++ ++ memcpy(pre_vout, vout, sizeof(*vout)); ++ ++ switch (ctrl->id) { ++ case V4L2_CID_ROTATE: + { -+ .description = "YVU420", -+ .pixelformat = V4L2_PIX_FMT_YVU420, -+ }, ++ vout->ctrl_rotate = (ctrl->value/90) * 90; ++ if (vout->ctrl_rotate > 270) ++ vout->ctrl_rotate = 270; ++ setup_task_rotation(vout); ++ break; ++ } ++ case V4L2_CID_VFLIP: + { -+ .description = "TILED NV12P", -+ .pixelformat = IPU_PIX_FMT_TILED_NV12, -+ }, ++ vout->ctrl_vflip = ctrl->value; ++ setup_task_rotation(vout); ++ break; ++ } ++ case V4L2_CID_HFLIP: + { -+ .description = "TILED NV12F", -+ .pixelformat = IPU_PIX_FMT_TILED_NV12F, -+ }, ++ vout->ctrl_hflip = ctrl->value; ++ setup_task_rotation(vout); ++ break; ++ } ++ case V4L2_CID_MXC_MOTION: + { -+ .description = "YUV444 planar", -+ .pixelformat = IPU_PIX_FMT_YUV444P, -+ }, -+}; ++ vout->task.input.deinterlace.motion = ctrl->value; ++ break; ++ } ++ default: ++ ret = -EINVAL; ++ goto done; ++ } + -+#define NUM_MXC_VOUT_FORMATS (ARRAY_SIZE(mxc_formats)) ++ if (vout->fmt_init) { ++ memcpy(&vout->task.input.crop, &vout->in_rect, ++ sizeof(vout->in_rect)); ++ ret = mxc_vout_try_task(vout); ++ if (ret < 0) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "vout check task failed\n"); ++ memcpy(vout, pre_vout, sizeof(*vout)); ++ goto done; ++ } + -+#define DEF_INPUT_WIDTH 320 -+#define DEF_INPUT_HEIGHT 240 ++ if (mxc_vout_need_fb_reconfig(vout, pre_vout)) { ++ ret = config_disp_output(vout); ++ if (ret < 0) ++ v4l2_err(vout->vfd->v4l2_dev, ++ "Config display output failed\n"); ++ } ++ } + -+static int mxc_vidioc_streamoff(struct file *file, void *fh, -+ enum v4l2_buf_type i); ++done: ++ vfree(pre_vout); ++ mutex_unlock(&vout->task_lock); + -+static struct mxc_vout_fb g_fb_setting[MAX_FB_NUM]; -+static int config_disp_output(struct mxc_vout_output *vout); -+static void release_disp_output(struct mxc_vout_output *vout); ++ return ret; ++} + -+static unsigned int get_frame_size(struct mxc_vout_output *vout) ++static int mxc_vidioc_reqbufs(struct file *file, void *fh, ++ struct v4l2_requestbuffers *req) +{ -+ unsigned int size; ++ int ret = 0; ++ struct mxc_vout_output *vout = fh; ++ struct videobuf_queue *q = &vout->vbq; + -+ if (IPU_PIX_FMT_TILED_NV12 == vout->task.input.format) -+ size = TILED_NV12_FRAME_SIZE(vout->task.input.width, -+ vout->task.input.height); -+ else if (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format) { -+ size = TILED_NV12_FRAME_SIZE(vout->task.input.width, -+ vout->task.input.height/2); -+ size *= 2; -+ } else -+ size = vout->task.input.width * vout->task.input.height * -+ fmt_to_bpp(vout->task.input.format)/8; ++ if (req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) ++ return -EINVAL; + -+ return size; ++ /* should not be here after streaming, videobuf_reqbufs will control */ ++ mutex_lock(&vout->task_lock); ++ ++ ret = videobuf_reqbufs(q, req); ++ ++ mutex_unlock(&vout->task_lock); ++ return ret; +} + -+static void free_dma_buf(struct mxc_vout_output *vout, struct dma_mem *buf) ++static int mxc_vidioc_querybuf(struct file *file, void *fh, ++ struct v4l2_buffer *b) +{ -+ dma_free_coherent(vout->vbq.dev, buf->size, buf->vaddr, buf->paddr); -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "free dma size:0x%x, paddr:0x%x\n", -+ buf->size, buf->paddr); -+ memset(buf, 0, sizeof(*buf)); ++ int ret; ++ struct mxc_vout_output *vout = fh; ++ ++ ret = videobuf_querybuf(&vout->vbq, b); ++ if (!ret) { ++ /* return physical address */ ++ struct videobuf_buffer *vb = vout->vbq.bufs[b->index]; ++ if (b->flags & V4L2_BUF_FLAG_MAPPED) ++ b->m.offset = videobuf_to_dma_contig(vb); ++ } ++ ++ return ret; +} + -+static int alloc_dma_buf(struct mxc_vout_output *vout, struct dma_mem *buf) ++static int mxc_vidioc_qbuf(struct file *file, void *fh, ++ struct v4l2_buffer *buffer) +{ ++ struct mxc_vout_output *vout = fh; + -+ buf->vaddr = dma_alloc_coherent(vout->vbq.dev, buf->size, &buf->paddr, -+ GFP_DMA | GFP_KERNEL); -+ if (!buf->vaddr) { -+ v4l2_err(vout->vfd->v4l2_dev, -+ "cannot get dma buf size:0x%x\n", buf->size); -+ return -ENOMEM; -+ } -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "alloc dma buf size:0x%x, paddr:0x%x\n", buf->size, buf->paddr); -+ return 0; ++ return videobuf_qbuf(&vout->vbq, buffer); +} + -+static ipu_channel_t get_ipu_channel(struct fb_info *fbi) ++static int mxc_vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b) +{ -+ ipu_channel_t ipu_ch = CHAN_NONE; ++ struct mxc_vout_output *vout = fh; ++ ++ if (!vout->vbq.streaming) ++ return -EINVAL; ++ ++ if (file->f_flags & O_NONBLOCK) ++ return videobuf_dqbuf(&vout->vbq, (struct v4l2_buffer *)b, 1); ++ else ++ return videobuf_dqbuf(&vout->vbq, (struct v4l2_buffer *)b, 0); ++} ++ ++static int set_window_position(struct mxc_vout_output *vout, ++ struct mxcfb_pos *pos) ++{ ++ struct fb_info *fbi = vout->fbi; + mm_segment_t old_fs; ++ int ret = 0; + -+ if (fbi->fbops->fb_ioctl) { ++ if (vout->disp_support_windows) { + old_fs = get_fs(); + set_fs(KERNEL_DS); -+ fbi->fbops->fb_ioctl(fbi, MXCFB_GET_FB_IPU_CHAN, -+ (unsigned long)&ipu_ch); ++ ret = fbi->fbops->fb_ioctl(fbi, MXCFB_SET_OVERLAY_POS, ++ (unsigned long)pos); + set_fs(old_fs); + } + -+ return ipu_ch; ++ return ret; ++} ++ ++static int config_disp_output(struct mxc_vout_output *vout) ++{ ++ struct dma_mem *buf = NULL; ++ struct fb_info *fbi = vout->fbi; ++ struct fb_var_screeninfo var; ++ struct mxcfb_pos pos; ++ int i, fb_num, ret; ++ u32 fb_base; ++ u32 size; ++ u32 display_buf_size; ++ u32 *pixel = NULL; ++ u32 color; ++ int j; ++ ++ memcpy(&var, &fbi->var, sizeof(var)); ++ fb_base = fbi->fix.smem_start; ++ ++ var.xres = vout->task.output.width; ++ var.yres = vout->task.output.height; ++ if (vout->linear_bypass_pp || vout->tiled_bypass_pp) { ++ fb_num = 1; ++ /* input crop */ ++ if (vout->task.input.width > vout->task.output.width) ++ var.xres_virtual = vout->task.input.width; ++ else ++ var.xres_virtual = var.xres; ++ if (vout->task.input.height > vout->task.output.height) ++ var.yres_virtual = vout->task.input.height; ++ else ++ var.yres_virtual = var.yres; ++ var.rotate = vout->task.output.rotate; ++ var.vmode |= FB_VMODE_YWRAP; ++ } else { ++ fb_num = FB_BUFS; ++ var.xres_virtual = var.xres; ++ var.yres_virtual = fb_num * var.yres; ++ var.vmode &= ~FB_VMODE_YWRAP; ++ } ++ var.bits_per_pixel = fmt_to_bpp(vout->task.output.format); ++ var.nonstd = vout->task.output.format; ++ ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "set display fb to %d %d\n", ++ var.xres, var.yres); ++ ++ /* ++ * To setup the overlay fb from scratch without ++ * the last time overlay fb position or resolution's ++ * impact, we take the following steps: ++ * - blank fb ++ * - set fb position to the starting point ++ * - reconfigure fb ++ * - set fb position to a specific point ++ * - unblank fb ++ * This procedure applies to non-overlay fbs as well. ++ */ ++ console_lock(); ++ fbi->flags |= FBINFO_MISC_USEREVENT; ++ fb_blank(fbi, FB_BLANK_POWERDOWN); ++ fbi->flags &= ~FBINFO_MISC_USEREVENT; ++ console_unlock(); ++ ++ pos.x = 0; ++ pos.y = 0; ++ ret = set_window_position(vout, &pos); ++ if (ret < 0) { ++ v4l2_err(vout->vfd->v4l2_dev, "failed to set fb position " ++ "to starting point\n"); ++ return ret; ++ } ++ ++ /* Init display channel through fb API */ ++ var.yoffset = 0; ++ var.activate |= FB_ACTIVATE_FORCE; ++ console_lock(); ++ fbi->flags |= FBINFO_MISC_USEREVENT; ++ ret = fb_set_var(fbi, &var); ++ fbi->flags &= ~FBINFO_MISC_USEREVENT; ++ console_unlock(); ++ if (ret < 0) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "ERR:%s fb_set_var ret:%d\n", __func__, ret); ++ return ret; ++ } ++ ++ ret = set_window_position(vout, &vout->win_pos); ++ if (ret < 0) { ++ v4l2_err(vout->vfd->v4l2_dev, "failed to set fb position\n"); ++ return ret; ++ } ++ ++ if (vout->linear_bypass_pp || vout->tiled_bypass_pp) ++ display_buf_size = fbi->fix.line_length * fbi->var.yres_virtual; ++ else ++ display_buf_size = fbi->fix.line_length * fbi->var.yres; ++ for (i = 0; i < fb_num; i++) ++ vout->disp_bufs[i] = fbi->fix.smem_start + i * display_buf_size; ++ if (vout->tiled_bypass_pp) { ++ size = PAGE_ALIGN(vout->task.input.crop.w * ++ vout->task.input.crop.h * ++ fmt_to_bpp(vout->task.output.format)/8); ++ if (size > vout->vdoa_output[0].size) { ++ for (i = 0; i < VDOA_FB_BUFS; i++) { ++ buf = &vout->vdoa_output[i]; ++ if (buf->vaddr) ++ free_dma_buf(vout, buf); ++ buf->size = size; ++ ret = alloc_dma_buf(vout, buf); ++ if (ret < 0) ++ goto err; ++ } ++ } ++ for (i = fb_num; i < (fb_num + VDOA_FB_BUFS); i++) ++ vout->disp_bufs[i] = ++ vout->vdoa_output[i - fb_num].paddr; ++ } ++ vout->fb_smem_len = fbi->fix.smem_len; ++ vout->fb_smem_start = fbi->fix.smem_start; ++ if (fb_base != fbi->fix.smem_start) { ++ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, ++ "realloc fb mem size:0x%x@0x%lx,old paddr @0x%x\n", ++ fbi->fix.smem_len, fbi->fix.smem_start, fb_base); ++ } ++ ++ /* fill black when video config changed */ ++ color = colorspaceofpixel(vout->task.output.format) == YUV_CS ? ++ UYVY_BLACK : RGB_BLACK; ++ if (IS_PLANAR_PIXEL_FORMAT(vout->task.output.format)) { ++ size = display_buf_size * 8 / ++ fmt_to_bpp(vout->task.output.format); ++ memset(fbi->screen_base, Y_BLACK, size); ++ memset(fbi->screen_base + size, UV_BLACK, ++ display_buf_size - size); ++ } else { ++ pixel = (u32 *)fbi->screen_base; ++ for (i = 0; i < (display_buf_size >> 2); i++) ++ *pixel++ = color; ++ } ++ console_lock(); ++ fbi->flags |= FBINFO_MISC_USEREVENT; ++ ret = fb_blank(fbi, FB_BLANK_UNBLANK); ++ fbi->flags &= ~FBINFO_MISC_USEREVENT; ++ console_unlock(); ++ vout->release = false; ++ ++ return ret; ++err: ++ for (j = i - 1; j >= 0; j--) { ++ buf = &vout->vdoa_output[j]; ++ if (buf->vaddr) ++ free_dma_buf(vout, buf); ++ } ++ return ret; +} + -+static unsigned int get_ipu_fmt(struct fb_info *fbi) ++static inline void wait_for_vsync(struct mxc_vout_output *vout) +{ ++ struct fb_info *fbi = vout->fbi; + mm_segment_t old_fs; -+ unsigned int fb_fmt; + + if (fbi->fbops->fb_ioctl) { + old_fs = get_fs(); + set_fs(KERNEL_DS); -+ fbi->fbops->fb_ioctl(fbi, MXCFB_GET_DIFMT, -+ (unsigned long)&fb_fmt); ++ fbi->fbops->fb_ioctl(fbi, MXCFB_WAIT_FOR_VSYNC, ++ (unsigned long)NULL); + set_fs(old_fs); + } + -+ return fb_fmt; ++ return; +} + -+static void update_display_setting(void) ++static void release_disp_output(struct mxc_vout_output *vout) +{ -+ int i; -+ struct fb_info *fbi; -+ struct v4l2_rect bg_crop_bounds[2]; -+ -+ for (i = 0; i < num_registered_fb; i++) { -+ fbi = registered_fb[i]; ++ struct fb_info *fbi = vout->fbi; ++ struct mxcfb_pos pos; + -+ memset(&g_fb_setting[i], 0, sizeof(struct mxc_vout_fb)); ++ if (vout->release) ++ return; ++ console_lock(); ++ fbi->flags |= FBINFO_MISC_USEREVENT; ++ fb_blank(fbi, FB_BLANK_POWERDOWN); ++ fbi->flags &= ~FBINFO_MISC_USEREVENT; ++ console_unlock(); + -+ if (!strncmp(fbi->fix.id, "DISP3", 5)) -+ g_fb_setting[i].ipu_id = 0; -+ else -+ g_fb_setting[i].ipu_id = 1; ++ /* restore pos to 0,0 avoid fb pan display hang? */ ++ pos.x = 0; ++ pos.y = 0; ++ set_window_position(vout, &pos); + -+ g_fb_setting[i].name = fbi->fix.id; -+ g_fb_setting[i].crop_bounds.left = 0; -+ g_fb_setting[i].crop_bounds.top = 0; -+ g_fb_setting[i].crop_bounds.width = fbi->var.xres; -+ g_fb_setting[i].crop_bounds.height = fbi->var.yres; -+ g_fb_setting[i].disp_fmt = get_ipu_fmt(fbi); ++ if (get_ipu_channel(fbi) == MEM_BG_SYNC) { ++ console_lock(); ++ fbi->fix.smem_start = vout->disp_bufs[0]; ++ fbi->flags |= FBINFO_MISC_USEREVENT; ++ fb_blank(fbi, FB_BLANK_UNBLANK); ++ fbi->flags &= ~FBINFO_MISC_USEREVENT; ++ console_unlock(); + -+ if (get_ipu_channel(fbi) == MEM_BG_SYNC) { -+ bg_crop_bounds[g_fb_setting[i].ipu_id] = -+ g_fb_setting[i].crop_bounds; -+ g_fb_setting[i].disp_support_csc = true; -+ } else if (get_ipu_channel(fbi) == MEM_FG_SYNC) { -+ g_fb_setting[i].disp_support_csc = true; -+ g_fb_setting[i].disp_support_windows = true; -+ } + } + -+ for (i = 0; i < num_registered_fb; i++) { -+ fbi = registered_fb[i]; -+ -+ if (get_ipu_channel(fbi) == MEM_FG_SYNC) -+ g_fb_setting[i].crop_bounds = -+ bg_crop_bounds[g_fb_setting[i].ipu_id]; -+ } ++ vout->release = true; +} + -+/* called after g_fb_setting filled by update_display_setting */ -+static int update_setting_from_fbi(struct mxc_vout_output *vout, -+ struct fb_info *fbi) ++static int mxc_vidioc_streamon(struct file *file, void *fh, ++ enum v4l2_buf_type i) +{ -+ int i; -+ bool found = false; ++ struct mxc_vout_output *vout = fh; ++ struct videobuf_queue *q = &vout->vbq; ++ int ret; + -+ for (i = 0; i < MAX_FB_NUM; i++) { -+ if (g_fb_setting[i].name) { -+ if (!strcmp(fbi->fix.id, g_fb_setting[i].name)) { -+ vout->crop_bounds = g_fb_setting[i].crop_bounds; -+ vout->disp_fmt = g_fb_setting[i].disp_fmt; -+ vout->disp_support_csc = -+ g_fb_setting[i].disp_support_csc; -+ vout->disp_support_windows = -+ g_fb_setting[i].disp_support_windows; -+ found = true; -+ break; -+ } -+ } ++ if (q->streaming) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "video output already run\n"); ++ ret = -EBUSY; ++ goto done; + } + -+ if (!found) { -+ v4l2_err(vout->vfd->v4l2_dev, "can not find output\n"); -+ return -EINVAL; ++ if (deinterlace_3_field(vout) && list_is_singular(&q->stream)) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "deinterlacing: need queue 2 frame before streamon\n"); ++ ret = -EINVAL; ++ goto done; + } -+ strlcpy(vout->vfd->name, fbi->fix.id, sizeof(vout->vfd->name)); + -+ memset(&vout->task, 0, sizeof(struct ipu_task)); ++ ret = config_disp_output(vout); ++ if (ret < 0) { ++ v4l2_err(vout->vfd->v4l2_dev, ++ "Config display output failed\n"); ++ goto done; ++ } + -+ vout->task.input.width = DEF_INPUT_WIDTH; -+ vout->task.input.height = DEF_INPUT_HEIGHT; -+ vout->task.input.crop.pos.x = 0; -+ vout->task.input.crop.pos.y = 0; -+ vout->task.input.crop.w = DEF_INPUT_WIDTH; -+ vout->task.input.crop.h = DEF_INPUT_HEIGHT; ++ hrtimer_init(&vout->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); ++ vout->timer.function = mxc_vout_timer_handler; ++ vout->timer_stop = true; + -+ vout->task.output.width = vout->crop_bounds.width; -+ vout->task.output.height = vout->crop_bounds.height; -+ vout->task.output.crop.pos.x = 0; -+ vout->task.output.crop.pos.y = 0; -+ vout->task.output.crop.w = vout->crop_bounds.width; -+ vout->task.output.crop.h = vout->crop_bounds.height; -+ if (colorspaceofpixel(vout->disp_fmt) == YUV_CS) -+ vout->task.output.format = IPU_PIX_FMT_UYVY; -+ else -+ vout->task.output.format = IPU_PIX_FMT_RGB565; ++ vout->start_ktime = hrtimer_cb_get_time(&vout->timer); + -+ return 0; ++ vout->pre1_vb = NULL; ++ vout->pre2_vb = NULL; ++ ++ ret = videobuf_streamon(q); ++done: ++ return ret; +} + -+static inline unsigned long get_jiffies(struct timeval *t) ++static int mxc_vidioc_streamoff(struct file *file, void *fh, ++ enum v4l2_buf_type i) +{ -+ struct timeval cur; ++ struct mxc_vout_output *vout = fh; ++ struct videobuf_queue *q = &vout->vbq; ++ int ret = 0; + -+ if (t->tv_usec >= 1000000) { -+ t->tv_sec += t->tv_usec / 1000000; -+ t->tv_usec = t->tv_usec % 1000000; -+ } ++ if (q->streaming) { ++ flush_workqueue(vout->v4l_wq); + -+ do_gettimeofday(&cur); -+ if ((t->tv_sec < cur.tv_sec) -+ || ((t->tv_sec == cur.tv_sec) && (t->tv_usec < cur.tv_usec))) -+ return jiffies; ++ hrtimer_cancel(&vout->timer); + -+ if (t->tv_usec < cur.tv_usec) { -+ cur.tv_sec = t->tv_sec - cur.tv_sec - 1; -+ cur.tv_usec = t->tv_usec + 1000000 - cur.tv_usec; -+ } else { -+ cur.tv_sec = t->tv_sec - cur.tv_sec; -+ cur.tv_usec = t->tv_usec - cur.tv_usec; ++ /* ++ * Wait for 2 vsyncs to make sure ++ * frames are drained on triple ++ * buffer. ++ */ ++ wait_for_vsync(vout); ++ wait_for_vsync(vout); ++ ++ release_disp_output(vout); ++ ++ ret = videobuf_streamoff(&vout->vbq); + } ++ INIT_LIST_HEAD(&vout->queue_list); ++ INIT_LIST_HEAD(&vout->active_list); + -+ return jiffies + timeval_to_jiffies(&cur); ++ return ret; +} + -+static bool deinterlace_3_field(struct mxc_vout_output *vout) ++static const struct v4l2_ioctl_ops mxc_vout_ioctl_ops = { ++ .vidioc_querycap = mxc_vidioc_querycap, ++ .vidioc_enum_fmt_vid_out = mxc_vidioc_enum_fmt_vid_out, ++ .vidioc_g_fmt_vid_out = mxc_vidioc_g_fmt_vid_out, ++ .vidioc_s_fmt_vid_out = mxc_vidioc_s_fmt_vid_out, ++ .vidioc_cropcap = mxc_vidioc_cropcap, ++ .vidioc_g_crop = mxc_vidioc_g_crop, ++ .vidioc_s_crop = mxc_vidioc_s_crop, ++ .vidioc_queryctrl = mxc_vidioc_queryctrl, ++ .vidioc_g_ctrl = mxc_vidioc_g_ctrl, ++ .vidioc_s_ctrl = mxc_vidioc_s_ctrl, ++ .vidioc_reqbufs = mxc_vidioc_reqbufs, ++ .vidioc_querybuf = mxc_vidioc_querybuf, ++ .vidioc_qbuf = mxc_vidioc_qbuf, ++ .vidioc_dqbuf = mxc_vidioc_dqbuf, ++ .vidioc_streamon = mxc_vidioc_streamon, ++ .vidioc_streamoff = mxc_vidioc_streamoff, ++}; ++ ++static const struct v4l2_file_operations mxc_vout_fops = { ++ .owner = THIS_MODULE, ++ .unlocked_ioctl = video_ioctl2, ++ .mmap = mxc_vout_mmap, ++ .open = mxc_vout_open, ++ .release = mxc_vout_release, ++}; ++ ++static struct video_device mxc_vout_template = { ++ .name = "MXC Video Output", ++ .fops = &mxc_vout_fops, ++ .ioctl_ops = &mxc_vout_ioctl_ops, ++ .release = video_device_release, ++}; ++ ++static struct videobuf_queue_ops mxc_vout_vbq_ops = { ++ .buf_setup = mxc_vout_buffer_setup, ++ .buf_prepare = mxc_vout_buffer_prepare, ++ .buf_release = mxc_vout_buffer_release, ++ .buf_queue = mxc_vout_buffer_queue, ++}; ++ ++static void mxc_vout_free_output(struct mxc_vout_dev *dev) +{ -+ return (vout->task.input.deinterlace.enable && -+ (vout->task.input.deinterlace.motion != HIGH_MOTION)); ++ int i; ++ int j; ++ struct mxc_vout_output *vout; ++ struct video_device *vfd; ++ ++ for (i = 0; i < dev->out_num; i++) { ++ vout = dev->out[i]; ++ vfd = vout->vfd; ++ if (vout->vdoa_work.vaddr) ++ free_dma_buf(vout, &vout->vdoa_work); ++ for (j = 0; j < VDOA_FB_BUFS; j++) { ++ if (vout->vdoa_output[j].vaddr) ++ free_dma_buf(vout, &vout->vdoa_output[j]); ++ } ++ if (vfd) { ++ if (!video_is_registered(vfd)) ++ video_device_release(vfd); ++ else ++ video_unregister_device(vfd); ++ } ++ kfree(vout); ++ } +} + -+static int set_field_fmt(struct mxc_vout_output *vout, enum v4l2_field field) ++static int mxc_vout_setup_output(struct mxc_vout_dev *dev) +{ -+ struct ipu_deinterlace *deinterlace = &vout->task.input.deinterlace; ++ struct videobuf_queue *q; ++ struct fb_info *fbi; ++ struct mxc_vout_output *vout; ++ int i, ret = 0; + -+ switch (field) { -+ /* Images are in progressive format, not interlaced */ -+ case V4L2_FIELD_NONE: -+ case V4L2_FIELD_ANY: -+ deinterlace->enable = false; -+ deinterlace->field_fmt = 0; -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "Progressive frame.\n"); -+ break; -+ case V4L2_FIELD_INTERLACED_TB: -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "Enable deinterlace TB.\n"); -+ deinterlace->enable = true; -+ deinterlace->field_fmt = IPU_DEINTERLACE_FIELD_TOP; -+ break; -+ case V4L2_FIELD_INTERLACED_BT: -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "Enable deinterlace BT.\n"); -+ deinterlace->enable = true; -+ deinterlace->field_fmt = IPU_DEINTERLACE_FIELD_BOTTOM; -+ break; -+ default: -+ v4l2_err(vout->vfd->v4l2_dev, -+ "field format:%d not supported yet!\n", field); -+ return -EINVAL; -+ } ++ update_display_setting(); + -+ if (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format) { -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "tiled fmt enable deinterlace.\n"); -+ deinterlace->enable = true; -+ } ++ /* all output/overlay based on fb */ ++ for (i = 0; i < num_registered_fb; i++) { ++ fbi = registered_fb[i]; + -+ if (deinterlace->enable && vdi_rate_double) -+ deinterlace->field_fmt |= IPU_DEINTERLACE_RATE_EN; ++ vout = kzalloc(sizeof(struct mxc_vout_output), GFP_KERNEL); ++ if (!vout) { ++ ret = -ENOMEM; ++ break; ++ } + -+ return 0; -+} ++ dev->out[dev->out_num] = vout; ++ dev->out_num++; + -+static bool is_pp_bypass(struct mxc_vout_output *vout) -+{ -+ if ((IPU_PIX_FMT_TILED_NV12 == vout->task.input.format) || -+ (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format)) -+ return false; -+ if ((vout->task.input.width == vout->task.output.width) && -+ (vout->task.input.height == vout->task.output.height) && -+ (vout->task.input.crop.w == vout->task.output.crop.w) && -+ (vout->task.input.crop.h == vout->task.output.crop.h) && -+ (vout->task.output.rotate < IPU_ROTATE_HORIZ_FLIP) && -+ !vout->task.input.deinterlace.enable) { -+ if (vout->disp_support_csc) -+ return true; -+ else if (!need_csc(vout->task.input.format, vout->disp_fmt)) -+ return true; -+ /* -+ * input crop show to full output which can show based on -+ * xres_virtual/yres_virtual -+ */ -+ } else if ((vout->task.input.crop.w == vout->task.output.crop.w) && -+ (vout->task.output.crop.w == vout->task.output.width) && -+ (vout->task.input.crop.h == vout->task.output.crop.h) && -+ (vout->task.output.crop.h == -+ vout->task.output.height) && -+ (vout->task.output.rotate < IPU_ROTATE_HORIZ_FLIP) && -+ !vout->task.input.deinterlace.enable) { -+ if (vout->disp_support_csc) -+ return true; -+ else if (!need_csc(vout->task.input.format, vout->disp_fmt)) -+ return true; -+ } -+ return false; -+} ++ vout->fbi = fbi; ++ vout->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ vout->vfd = video_device_alloc(); ++ if (!vout->vfd) { ++ ret = -ENOMEM; ++ break; ++ } + -+static void setup_buf_timer(struct mxc_vout_output *vout, -+ struct videobuf_buffer *vb) -+{ -+ ktime_t expiry_time, now; ++ *vout->vfd = mxc_vout_template; ++ vout->vfd->dev_debug = debug; ++ vout->vfd->v4l2_dev = &dev->v4l2_dev; ++ vout->vfd->lock = &vout->mutex; ++ vout->vfd->vfl_dir = VFL_DIR_TX; + -+ /* if timestamp is 0, then default to 30fps */ -+ if ((vb->ts.tv_sec == 0) && (vb->ts.tv_usec == 0)) -+ expiry_time = ktime_add_ns(vout->start_ktime, -+ NSEC_PER_FRAME_30FPS * vout->frame_count); -+ else -+ expiry_time = timeval_to_ktime(vb->ts); ++ mutex_init(&vout->mutex); ++ mutex_init(&vout->task_lock); + -+ now = hrtimer_cb_get_time(&vout->timer); -+ if ((now.tv64 > expiry_time.tv64)) { -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "warning: timer timeout already expired.\n"); -+ expiry_time = now; -+ } ++ strlcpy(vout->vfd->name, fbi->fix.id, sizeof(vout->vfd->name)); + -+ hrtimer_start(&vout->timer, expiry_time, HRTIMER_MODE_ABS); ++ video_set_drvdata(vout->vfd, vout); + -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "timer handler next " -+ "schedule: %lldnsecs\n", expiry_time.tv64); -+} ++ if (video_register_device(vout->vfd, ++ VFL_TYPE_GRABBER, video_nr + i) < 0) { ++ ret = -ENODEV; ++ break; ++ } + -+static int show_buf(struct mxc_vout_output *vout, int idx, -+ struct ipu_pos *ipos) -+{ -+ struct fb_info *fbi = vout->fbi; -+ struct fb_var_screeninfo var; -+ int ret; -+ u32 fb_base = 0; ++ q = &vout->vbq; ++ q->dev = dev->dev; ++ spin_lock_init(&vout->vbq_lock); ++ videobuf_queue_dma_contig_init(q, &mxc_vout_vbq_ops, q->dev, ++ &vout->vbq_lock, vout->type, V4L2_FIELD_NONE, ++ sizeof(struct videobuf_buffer), vout, NULL); + -+ memcpy(&var, &fbi->var, sizeof(var)); ++ v4l2_info(vout->vfd->v4l2_dev, "V4L2 device registered as %s\n", ++ video_device_node_name(vout->vfd)); + -+ if (vout->linear_bypass_pp || vout->tiled_bypass_pp) { -+ /* -+ * crack fb base -+ * NOTE: should not do other fb operation during v4l2 -+ */ -+ console_lock(); -+ fb_base = fbi->fix.smem_start; -+ fbi->fix.smem_start = vout->task.output.paddr; -+ fbi->var.yoffset = ipos->y + 1; -+ var.xoffset = ipos->x; -+ var.yoffset = ipos->y; -+ var.vmode |= FB_VMODE_YWRAP; -+ ret = fb_pan_display(fbi, &var); -+ fbi->fix.smem_start = fb_base; -+ console_unlock(); -+ } else { -+ console_lock(); -+ var.yoffset = idx * fbi->var.yres; -+ var.vmode &= ~FB_VMODE_YWRAP; -+ ret = fb_pan_display(fbi, &var); -+ console_unlock(); + } + + return ret; +} + -+static void disp_work_func(struct work_struct *work) ++static int mxc_vout_probe(struct platform_device *pdev) +{ -+ struct mxc_vout_output *vout = -+ container_of(work, struct mxc_vout_output, disp_work); -+ struct videobuf_queue *q = &vout->vbq; -+ struct videobuf_buffer *vb, *vb_next = NULL; -+ unsigned long flags = 0; -+ struct ipu_pos ipos; -+ int ret = 0; -+ u32 in_fmt = 0; -+ u32 vdi_cnt = 0; -+ u32 vdi_frame; -+ u32 index = 0; -+ u32 ocrop_h = 0; -+ u32 o_height = 0; -+ u32 tiled_interlaced = 0; -+ bool tiled_fmt = false; -+ -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "disp work begin one frame\n"); ++ int ret; ++ struct mxc_vout_dev *dev; + -+ spin_lock_irqsave(q->irqlock, flags); ++ dev = kzalloc(sizeof(*dev), GFP_KERNEL); ++ if (!dev) ++ return -ENOMEM; + -+ if (list_empty(&vout->active_list)) { -+ v4l2_warn(vout->vfd->v4l2_dev, -+ "no entry in active_list, should not be here\n"); -+ spin_unlock_irqrestore(q->irqlock, flags); -+ return; -+ } ++ dev->dev = &pdev->dev; ++ dev->dev->dma_mask = kmalloc(sizeof(*dev->dev->dma_mask), GFP_KERNEL); ++ *dev->dev->dma_mask = DMA_BIT_MASK(32); ++ dev->dev->coherent_dma_mask = DMA_BIT_MASK(32); + -+ vb = list_first_entry(&vout->active_list, -+ struct videobuf_buffer, queue); -+ ret = set_field_fmt(vout, vb->field); -+ if (ret < 0) { -+ spin_unlock_irqrestore(q->irqlock, flags); -+ return; ++ ret = v4l2_device_register(dev->dev, &dev->v4l2_dev); ++ if (ret) { ++ dev_err(dev->dev, "v4l2_device_register failed\n"); ++ goto free_dev; + } -+ if (deinterlace_3_field(vout)) { -+ if (list_is_singular(&vout->active_list)) { -+ if (list_empty(&vout->queue_list)) { -+ vout->timer_stop = true; -+ spin_unlock_irqrestore(q->irqlock, flags); -+ v4l2_warn(vout->vfd->v4l2_dev, -+ "no enough entry for 3 fields " -+ "deinterlacer\n"); -+ return; -+ } + -+ /* -+ * We need to use the next vb even if it is -+ * not on the active list. -+ */ -+ vb_next = list_first_entry(&vout->queue_list, -+ struct videobuf_buffer, queue); -+ } else -+ vb_next = list_first_entry(vout->active_list.next, -+ struct videobuf_buffer, queue); -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "cur field_fmt:%d, next field_fmt:%d.\n", -+ vb->field, vb_next->field); -+ /* repeat the last field during field format changing */ -+ if ((vb->field != vb_next->field) && -+ (vb_next->field != V4L2_FIELD_NONE)) -+ vb_next = vb; -+ } ++ ret = mxc_vout_setup_output(dev); ++ if (ret < 0) ++ goto rel_vdev; + -+ spin_unlock_irqrestore(q->irqlock, flags); ++ return 0; + -+vdi_frame_rate_double: -+ mutex_lock(&vout->task_lock); ++rel_vdev: ++ mxc_vout_free_output(dev); ++ v4l2_device_unregister(&dev->v4l2_dev); ++free_dev: ++ kfree(dev); ++ return ret; ++} + -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "v4l2 frame_cnt:%ld, vb_field:%d, fmt:%d\n", -+ vout->frame_count, vb->field, -+ vout->task.input.deinterlace.field_fmt); -+ if (vb->memory == V4L2_MEMORY_USERPTR) -+ vout->task.input.paddr = vb->baddr; -+ else -+ vout->task.input.paddr = videobuf_to_dma_contig(vb); ++static int mxc_vout_remove(struct platform_device *pdev) ++{ ++ struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); ++ struct mxc_vout_dev *dev = container_of(v4l2_dev, struct ++ mxc_vout_dev, v4l2_dev); + -+ if (vout->task.input.deinterlace.field_fmt & IPU_DEINTERLACE_RATE_EN) -+ index = vout->vdi_frame_cnt % FB_BUFS; -+ else -+ index = vout->frame_count % FB_BUFS; -+ if (vout->linear_bypass_pp) { -+ vout->task.output.paddr = vout->task.input.paddr; -+ ipos.x = vout->task.input.crop.pos.x; -+ ipos.y = vout->task.input.crop.pos.y; -+ } else { -+ if (deinterlace_3_field(vout)) { -+ if (vb->memory == V4L2_MEMORY_USERPTR) -+ vout->task.input.paddr_n = vb_next->baddr; -+ else -+ vout->task.input.paddr_n = -+ videobuf_to_dma_contig(vb_next); -+ } -+ vout->task.output.paddr = vout->disp_bufs[index]; -+ if (vout->vdoa_1080p) { -+ o_height = vout->task.output.height; -+ ocrop_h = vout->task.output.crop.h; -+ vout->task.output.height = FRAME_HEIGHT_1080P; -+ vout->task.output.crop.h = FRAME_HEIGHT_1080P; -+ } -+ tiled_fmt = -+ (IPU_PIX_FMT_TILED_NV12 == vout->task.input.format) || -+ (IPU_PIX_FMT_TILED_NV12F == vout->task.input.format); -+ if (vout->tiled_bypass_pp) { -+ ipos.x = vout->task.input.crop.pos.x; -+ ipos.y = vout->task.input.crop.pos.y; -+ } else if (tiled_fmt) { -+ vout->vdoa_task.input.paddr = vout->task.input.paddr; -+ if (deinterlace_3_field(vout)) -+ vout->vdoa_task.input.paddr_n = -+ vout->task.input.paddr_n; -+ vout->vdoa_task.output.paddr = vout->vdoa_work.paddr; -+ ret = ipu_queue_task(&vout->vdoa_task); -+ if (ret < 0) { -+ mutex_unlock(&vout->task_lock); -+ goto err; -+ } -+ vout->task.input.paddr = vout->vdoa_task.output.paddr; -+ in_fmt = vout->task.input.format; -+ vout->task.input.format = vout->vdoa_task.output.format; -+ if (vout->task.input.deinterlace.enable) { -+ tiled_interlaced = 1; -+ vout->task.input.deinterlace.enable = 0; -+ } -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "tiled queue task\n"); -+ } -+ ret = ipu_queue_task(&vout->task); -+ if ((!vout->tiled_bypass_pp) && tiled_fmt) -+ vout->task.input.format = in_fmt; -+ if (tiled_interlaced) -+ vout->task.input.deinterlace.enable = 1; -+ if (ret < 0) { -+ mutex_unlock(&vout->task_lock); -+ goto err; -+ } -+ if (vout->vdoa_1080p) { -+ vout->task.output.crop.h = ocrop_h; -+ vout->task.output.height = o_height; -+ } -+ } ++ mxc_vout_free_output(dev); ++ v4l2_device_unregister(v4l2_dev); ++ kfree(dev); ++ return 0; ++} + -+ mutex_unlock(&vout->task_lock); ++static const struct of_device_id mxc_v4l2_dt_ids[] = { ++ { .compatible = "fsl,mxc_v4l2_output", }, ++ { /* sentinel */ } ++}; + -+ ret = show_buf(vout, index, &ipos); -+ if (ret < 0) -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, -+ "show buf with ret %d\n", ret); ++static struct platform_driver mxc_vout_driver = { ++ .driver = { ++ .name = "mxc_v4l2_output", ++ .of_match_table = mxc_v4l2_dt_ids, ++ }, ++ .probe = mxc_vout_probe, ++ .remove = mxc_vout_remove, ++}; + -+ if (vout->task.input.deinterlace.field_fmt & IPU_DEINTERLACE_RATE_EN) { -+ vdi_frame = vout->task.input.deinterlace.field_fmt -+ & IPU_DEINTERLACE_RATE_FRAME1; -+ if (vdi_frame) -+ vout->task.input.deinterlace.field_fmt &= -+ ~IPU_DEINTERLACE_RATE_FRAME1; -+ else -+ vout->task.input.deinterlace.field_fmt |= -+ IPU_DEINTERLACE_RATE_FRAME1; -+ vout->vdi_frame_cnt++; -+ vdi_cnt++; -+ if (vdi_cnt < IPU_DEINTERLACE_MAX_FRAME) -+ goto vdi_frame_rate_double; ++static int __init mxc_vout_init(void) ++{ ++ if (platform_driver_register(&mxc_vout_driver) != 0) { ++ printk(KERN_ERR VOUT_NAME ":Could not register Video driver\n"); ++ return -EINVAL; + } -+ spin_lock_irqsave(q->irqlock, flags); ++ return 0; ++} + -+ list_del(&vb->queue); ++static void mxc_vout_cleanup(void) ++{ ++ platform_driver_unregister(&mxc_vout_driver); ++} + -+ /* -+ * The videobuf before the last one has been shown. Set -+ * VIDEOBUF_DONE state here to avoid tearing issue in ic bypass -+ * case, which makes sure a buffer being shown will not be -+ * dequeued to be overwritten. It also brings side-effect that -+ * the last 2 buffers can not be dequeued correctly, apps need -+ * to take care of it. -+ */ -+ if (vout->pre2_vb) { -+ vout->pre2_vb->state = VIDEOBUF_DONE; -+ wake_up_interruptible(&vout->pre2_vb->done); -+ vout->pre2_vb = NULL; -+ } ++module_init(mxc_vout_init); ++module_exit(mxc_vout_cleanup); + -+ if (vout->linear_bypass_pp) { -+ vout->pre2_vb = vout->pre1_vb; -+ vout->pre1_vb = vb; -+ } else { -+ if (vout->pre1_vb) { -+ vout->pre1_vb->state = VIDEOBUF_DONE; -+ wake_up_interruptible(&vout->pre1_vb->done); -+ vout->pre1_vb = NULL; -+ } -+ vb->state = VIDEOBUF_DONE; -+ wake_up_interruptible(&vb->done); -+ } ++MODULE_AUTHOR("Freescale Semiconductor, Inc."); ++MODULE_DESCRIPTION("V4L2-driver for MXC video output"); ++MODULE_LICENSE("GPL"); +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 { ++ __u32 id; ++ __u32 value0; ++ __u32 value1; ++ char debug[256]; ++}; ++*/ + -+ vout->frame_count++; ++#define VIDIOC_SEND_COMMAND _IOWR('V', 92, struct v4l2_send_command_control) + -+ /* pick next queue buf to setup timer */ -+ if (list_empty(&vout->queue_list)) -+ vout->timer_stop = true; -+ else { -+ vb = list_first_entry(&vout->queue_list, -+ struct videobuf_buffer, queue); -+ setup_buf_timer(vout, vb); +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 + ++config VIDEO_V4L2_INT_DEVICE ++ tristate ++ depends on VIDEO_V4L2 ++ + # Used by drivers that need Videobuf modules + config VIDEOBUF_GEN + tristate +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 + + obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o ++obj-$(CONFIG_V4L2_INT_DEVICE) += v4l2-int-device.o + + obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o + obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o +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) + { +- if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_format32))) ++ if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_format32)) || ++ put_user(kp->type, &up->type)) + return -EFAULT; + return __put_v4l2_format32(kp, up); + } +@@ -259,8 +260,8 @@ + static int put_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_buffers32 __user *up) + { + if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_create_buffers32)) || +- copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format))) +- return -EFAULT; ++ copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format.fmt))) ++ return -EFAULT; + return __put_v4l2_format32(&kp->format, &up->format); + } + +@@ -330,7 +331,7 @@ + __u32 reserved; + }; + +-static int get_v4l2_plane32(struct v4l2_plane __user *up, struct v4l2_plane32 __user *up32, ++static int get_v4l2_plane32(struct v4l2_plane *up, struct v4l2_plane32 *up32, + enum v4l2_memory memory) + { + void __user *up_pln; +@@ -359,7 +360,7 @@ + return 0; + } + +-static int put_v4l2_plane32(struct v4l2_plane __user *up, struct v4l2_plane32 __user *up32, ++static int put_v4l2_plane32(struct v4l2_plane *up, struct v4l2_plane32 *up32, + enum v4l2_memory memory) + { + if (copy_in_user(up32, up, 2 * sizeof(__u32)) || +@@ -429,7 +430,7 @@ + * by passing a very big num_planes value */ + uplane = compat_alloc_user_space(num_planes * + sizeof(struct v4l2_plane)); +- kp->m.planes = (__force struct v4l2_plane *)uplane; ++ kp->m.planes = uplane; + + while (--num_planes >= 0) { + ret = get_v4l2_plane32(uplane, uplane32, kp->memory); +@@ -500,7 +501,7 @@ + if (num_planes == 0) + return 0; + +- uplane = (__force struct v4l2_plane __user *)kp->m.planes; ++ uplane = kp->m.planes; + if (get_user(p, &up->m.planes)) + return -EFAULT; + uplane32 = compat_ptr(p); +@@ -542,16 +543,7 @@ + __u32 capability; + __u32 flags; + compat_caddr_t base; +- struct { +- __u32 width; +- __u32 height; +- __u32 pixelformat; +- __u32 field; +- __u32 bytesperline; +- __u32 sizeimage; +- __u32 colorspace; +- __u32 priv; +- } fmt; ++ struct v4l2_pix_format fmt; + }; + + static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_framebuffer32 __user *up) +@@ -561,10 +553,10 @@ + if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_framebuffer32)) || + get_user(tmp, &up->base) || + get_user(kp->capability, &up->capability) || +- get_user(kp->flags, &up->flags) || +- copy_from_user(&kp->fmt, &up->fmt, sizeof(up->fmt))) ++ get_user(kp->flags, &up->flags)) + return -EFAULT; +- kp->base = (__force void *)compat_ptr(tmp); ++ kp->base = compat_ptr(tmp); ++ get_v4l2_pix_format(&kp->fmt, &up->fmt); + return 0; + } + +@@ -575,9 +567,9 @@ + if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_framebuffer32)) || + put_user(tmp, &up->base) || + put_user(kp->capability, &up->capability) || +- put_user(kp->flags, &up->flags) || +- copy_to_user(&up->fmt, &kp->fmt, sizeof(up->fmt))) ++ put_user(kp->flags, &up->flags)) + return -EFAULT; ++ put_v4l2_pix_format(&kp->fmt, &up->fmt); + return 0; + } + +@@ -669,15 +661,11 @@ + n * sizeof(struct v4l2_ext_control32))) + return -EFAULT; + kcontrols = compat_alloc_user_space(n * sizeof(struct v4l2_ext_control)); +- kp->controls = (__force struct v4l2_ext_control *)kcontrols; ++ kp->controls = kcontrols; + while (--n >= 0) { +- u32 id; +- + if (copy_in_user(kcontrols, ucontrols, sizeof(*ucontrols))) + return -EFAULT; +- if (get_user(id, &kcontrols->id)) +- return -EFAULT; +- if (ctrl_is_pointer(id)) { ++ if (ctrl_is_pointer(kcontrols->id)) { + void __user *s; + + if (get_user(p, &ucontrols->string)) +@@ -695,8 +683,7 @@ + static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext_controls32 __user *up) + { + struct v4l2_ext_control32 __user *ucontrols; +- struct v4l2_ext_control __user *kcontrols = +- (__force struct v4l2_ext_control __user *)kp->controls; ++ struct v4l2_ext_control __user *kcontrols = kp->controls; + int n = kp->count; + compat_caddr_t p; + +@@ -718,14 +705,11 @@ + + while (--n >= 0) { + unsigned size = sizeof(*ucontrols); +- u32 id; + +- if (get_user(id, &kcontrols->id)) +- return -EFAULT; + /* Do not modify the pointer when copying a pointer control. + The contents of the pointer was changed, not the pointer + itself. */ +- if (ctrl_is_pointer(id)) ++ if (ctrl_is_pointer(kcontrols->id)) + size -= sizeof(ucontrols->value64); + if (copy_in_user(ucontrols, kcontrols, size)) + return -EFAULT; +@@ -754,14 +738,14 @@ + copy_to_user(&up->u, &kp->u, sizeof(kp->u)) || + put_user(kp->pending, &up->pending) || + put_user(kp->sequence, &up->sequence) || +- compat_put_timespec(&kp->timestamp, &up->timestamp) || ++ put_compat_timespec(&kp->timestamp, &up->timestamp) || + put_user(kp->id, &up->id) || + copy_to_user(up->reserved, kp->reserved, 8 * sizeof(__u32))) + return -EFAULT; + return 0; + } + +-struct v4l2_edid32 { ++struct v4l2_subdev_edid32 { + __u32 pad; + __u32 start_block; + __u32 blocks; +@@ -769,31 +753,31 @@ + compat_caddr_t edid; + }; + +-static int get_v4l2_edid32(struct v4l2_edid *kp, struct v4l2_edid32 __user *up) ++static int get_v4l2_subdev_edid32(struct v4l2_subdev_edid *kp, struct v4l2_subdev_edid32 __user *up) + { + u32 tmp; + +- if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_edid32)) || ++ if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_subdev_edid32)) || + get_user(kp->pad, &up->pad) || + get_user(kp->start_block, &up->start_block) || + get_user(kp->blocks, &up->blocks) || + get_user(tmp, &up->edid) || + copy_from_user(kp->reserved, up->reserved, sizeof(kp->reserved))) + return -EFAULT; +- kp->edid = (__force u8 *)compat_ptr(tmp); ++ kp->edid = compat_ptr(tmp); + return 0; + } + +-static int put_v4l2_edid32(struct v4l2_edid *kp, struct v4l2_edid32 __user *up) ++static int put_v4l2_subdev_edid32(struct v4l2_subdev_edid *kp, struct v4l2_subdev_edid32 __user *up) + { + u32 tmp = (u32)((unsigned long)kp->edid); + +- if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_edid32)) || ++ if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_subdev_edid32)) || + put_user(kp->pad, &up->pad) || + put_user(kp->start_block, &up->start_block) || + put_user(kp->blocks, &up->blocks) || + put_user(tmp, &up->edid) || +- copy_to_user(up->reserved, kp->reserved, sizeof(up->reserved))) ++ copy_to_user(kp->reserved, up->reserved, sizeof(kp->reserved))) + return -EFAULT; + return 0; + } +@@ -837,7 +821,7 @@ + struct v4l2_ext_controls v2ecs; + struct v4l2_event v2ev; + struct v4l2_create_buffers v2crt; +- struct v4l2_edid v2edid; ++ struct v4l2_subdev_edid v2edid; + unsigned long vx; + int vi; + } karg; +@@ -987,9 +971,9 @@ + err = put_v4l2_event32(&karg.v2ev, up); + break; + +- case VIDIOC_G_EDID: +- case VIDIOC_S_EDID: +- err = put_v4l2_edid32(&karg.v2edid, up); ++ case VIDIOC_SUBDEV_G_EDID: ++ case VIDIOC_SUBDEV_S_EDID: ++ err = put_v4l2_subdev_edid32(&karg.v2edid, up); + break; + + case VIDIOC_G_FMT: +@@ -1027,14 +1011,104 @@ + if (!file->f_op->unlocked_ioctl) + return ret; + +- if (_IOC_TYPE(cmd) == 'V' && _IOC_NR(cmd) < BASE_VIDIOC_PRIVATE) ++ switch (cmd) { ++ case VIDIOC_QUERYCAP: ++ case VIDIOC_RESERVED: ++ case VIDIOC_ENUM_FMT: ++ case VIDIOC_G_FMT32: ++ case VIDIOC_S_FMT32: ++ case VIDIOC_REQBUFS: ++ case VIDIOC_QUERYBUF32: ++ case VIDIOC_G_FBUF32: ++ case VIDIOC_S_FBUF32: ++ case VIDIOC_OVERLAY32: ++ case VIDIOC_QBUF32: ++ case VIDIOC_EXPBUF: ++ case VIDIOC_DQBUF32: ++ case VIDIOC_STREAMON32: ++ case VIDIOC_STREAMOFF32: ++ case VIDIOC_G_PARM: ++ case VIDIOC_S_PARM: ++ case VIDIOC_G_STD: ++ case VIDIOC_S_STD: ++ case VIDIOC_ENUMSTD32: ++ case VIDIOC_ENUMINPUT32: ++ case VIDIOC_G_CTRL: ++ case VIDIOC_S_CTRL: ++ case VIDIOC_G_TUNER: ++ case VIDIOC_S_TUNER: ++ case VIDIOC_G_AUDIO: ++ case VIDIOC_S_AUDIO: ++ case VIDIOC_QUERYCTRL: ++ case VIDIOC_QUERYMENU: ++ case VIDIOC_G_INPUT32: ++ case VIDIOC_S_INPUT32: ++ case VIDIOC_G_OUTPUT32: ++ case VIDIOC_S_OUTPUT32: ++ case VIDIOC_ENUMOUTPUT: ++ case VIDIOC_G_AUDOUT: ++ case VIDIOC_S_AUDOUT: ++ case VIDIOC_G_MODULATOR: ++ case VIDIOC_S_MODULATOR: ++ case VIDIOC_S_FREQUENCY: ++ case VIDIOC_G_FREQUENCY: ++ case VIDIOC_CROPCAP: ++ case VIDIOC_G_CROP: ++ case VIDIOC_S_CROP: ++ case VIDIOC_G_SELECTION: ++ case VIDIOC_S_SELECTION: ++ case VIDIOC_G_JPEGCOMP: ++ case VIDIOC_S_JPEGCOMP: ++ case VIDIOC_QUERYSTD: ++ case VIDIOC_TRY_FMT32: ++ case VIDIOC_ENUMAUDIO: ++ case VIDIOC_ENUMAUDOUT: ++ case VIDIOC_G_PRIORITY: ++ case VIDIOC_S_PRIORITY: ++ case VIDIOC_G_SLICED_VBI_CAP: ++ case VIDIOC_LOG_STATUS: ++ case VIDIOC_G_EXT_CTRLS32: ++ case VIDIOC_S_EXT_CTRLS32: ++ case VIDIOC_TRY_EXT_CTRLS32: ++ case VIDIOC_ENUM_FRAMESIZES: ++ case VIDIOC_ENUM_FRAMEINTERVALS: ++ case VIDIOC_G_ENC_INDEX: ++ case VIDIOC_ENCODER_CMD: ++ case VIDIOC_TRY_ENCODER_CMD: ++ case VIDIOC_DECODER_CMD: ++ case VIDIOC_TRY_DECODER_CMD: ++ case VIDIOC_DBG_S_REGISTER: ++ case VIDIOC_DBG_G_REGISTER: ++ case VIDIOC_DBG_G_CHIP_IDENT: ++ case VIDIOC_S_HW_FREQ_SEEK: ++ case VIDIOC_S_DV_TIMINGS: ++ case VIDIOC_G_DV_TIMINGS: ++ case VIDIOC_DQEVENT: ++ case VIDIOC_DQEVENT32: ++ case VIDIOC_SUBSCRIBE_EVENT: ++ case VIDIOC_UNSUBSCRIBE_EVENT: ++ case VIDIOC_CREATE_BUFS32: ++ case VIDIOC_PREPARE_BUF32: ++ case VIDIOC_ENUM_DV_TIMINGS: ++ case VIDIOC_QUERY_DV_TIMINGS: ++ case VIDIOC_DV_TIMINGS_CAP: ++ case VIDIOC_ENUM_FREQ_BANDS: ++ case VIDIOC_SUBDEV_G_EDID32: ++ case VIDIOC_SUBDEV_S_EDID32: + ret = do_video_ioctl(file, cmd, arg); +- else if (vdev->fops->compat_ioctl32) +- ret = vdev->fops->compat_ioctl32(file, cmd, arg); ++ break; + +- if (ret == -ENOIOCTLCMD) +- pr_warn("compat_ioctl32: unknown ioctl '%c', dir=%d, #%d (0x%08x)\n", +- _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd), cmd); ++ default: ++ if (vdev->fops->compat_ioctl32) ++ ret = vdev->fops->compat_ioctl32(file, cmd, arg); ++ ++ if (ret == -ENOIOCTLCMD) ++ printk(KERN_WARNING "compat_ioctl32: " ++ "unknown ioctl '%c', dir=%d, #%d (0x%08x)\n", ++ _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd), ++ cmd); ++ break; + } + return ret; + } + EXPORT_SYMBOL_GPL(v4l2_compat_ioctl32); +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); + #endif ++ SET_VALID_IOCTL(ops, VIDIOC_DBG_G_CHIP_IDENT, vidioc_g_chip_ident); + /* 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/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 + #include + #include ++#include + #include + + #define CREATE_TRACE_POINTS +@@ -649,6 +650,20 @@ + pr_info("pts=%llu\n", p->stop.pts); + } + ++static void v4l_print_dbg_chip_ident(const void *arg, bool write_only) ++{ ++ const struct v4l2_dbg_chip_ident *p = arg; + -+ spin_unlock_irqrestore(q->irqlock, flags); ++ pr_cont("type=%u, ", p->match.type); ++ if (p->match.type == V4L2_CHIP_MATCH_I2C_DRIVER) ++ pr_cont("name=%.*s, ", ++ (int)sizeof(p->match.name), p->match.name); ++ else ++ pr_cont("addr=%u, ", p->match.addr); ++ pr_cont("chip_ident=%u, revision=0x%x\n", ++ p->ident, p->revision); ++} + -+ v4l2_dbg(1, debug, vout->vfd->v4l2_dev, "disp work finish one frame\n"); + static void v4l_print_dbg_chip_info(const void *arg, bool write_only) + { + const struct v4l2_dbg_chip_info *p = arg; +@@ -2002,6 +2017,18 @@ + #endif + } + ++static int v4l_dbg_g_chip_ident(const struct v4l2_ioctl_ops *ops, ++ struct file *file, void *fh, void *arg) ++{ ++ struct v4l2_dbg_chip_ident *p = arg; + -+ return; -+err: -+ v4l2_err(vout->vfd->v4l2_dev, "display work fail ret = %d\n", ret); -+ vout->timer_stop = true; -+ vb->state = VIDEOBUF_ERROR; -+ return; ++ p->ident = V4L2_IDENT_NONE; ++ p->revision = 0; ++ if (p->match.type == V4L2_CHIP_MATCH_SUBDEV) ++ return -EINVAL; ++ return ops->vidioc_g_chip_ident(file, fh, p); +} + -+static enum hrtimer_restart mxc_vout_timer_handler(struct hrtimer *timer) -+{ -+ struct mxc_vout_output *vout = container_of(timer, -+ struct mxc_vout_output, -+ timer); -+ struct videobuf_queue *q = &vout->vbq; -+ struct videobuf_buffer *vb; -+ unsigned long flags = 0; + static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops, + struct file *file, void *fh, void *arg) + { +@@ -2256,6 +2283,7 @@ + IOCTL_INFO_STD(VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd, v4l_print_decoder_cmd, 0), + IOCTL_INFO_FNC(VIDIOC_DBG_S_REGISTER, v4l_dbg_s_register, v4l_print_dbg_register, 0), + IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0), ++ IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_IDENT, v4l_dbg_g_chip_ident, v4l_print_dbg_chip_ident, 0), + 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/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. + ++config MFD_MXC_HDMI ++ tristate "Freescale HDMI Core" ++ select MFD_CORE ++ help ++ This is the core driver for the Freescale i.MX6 on-chip HDMI. ++ This MFD driver connects with the video and audio drivers for HDMI. + -+ spin_lock_irqsave(q->irqlock, flags); + config MFD_DLN2 + tristate "Diolan DLN2 support" + select MFD_CORE +@@ -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. + -+ /* -+ * put first queued entry into active, if previous entry did not -+ * finish, setup current entry's timer again. -+ */ -+ if (list_empty(&vout->queue_list)) { -+ spin_unlock_irqrestore(q->irqlock, flags); -+ return HRTIMER_NORESTART; -+ } + 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 ++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. ++ * ++ * 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 ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + -+ /* move videobuf from queued list to active list */ -+ vb = list_first_entry(&vout->queue_list, -+ struct videobuf_buffer, queue); -+ list_del(&vb->queue); -+ list_add_tail(&vb->queue, &vout->active_list); ++#include ++#include ++#include + -+ if (queue_work(vout->v4l_wq, &vout->disp_work) == 0) { -+ v4l2_warn(vout->vfd->v4l2_dev, -+ "disp work was in queue already, queue buf again next time\n"); -+ list_del(&vb->queue); -+ list_add(&vb->queue, &vout->queue_list); -+ spin_unlock_irqrestore(q->irqlock, flags); -+ return HRTIMER_NORESTART; -+ } ++#include