Add new Linux kernel + junk - boots and works kinda fine with some
issues
This commit is contained in:
parent
57145dbcf3
commit
cb373c00b6
39 changed files with 27208 additions and 0 deletions
Binary file not shown.
Binary file not shown.
BIN
packages/builds/linux/linux-asus-flo-4.11.12-1-armv7h.pkg.tar.xz
Normal file
BIN
packages/builds/linux/linux-asus-flo-4.11.12-1-armv7h.pkg.tar.xz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
packages/builds/mesa/mesa-18.3.4-1-armv7h.pkg.tar.xz
Normal file
BIN
packages/builds/mesa/mesa-18.3.4-1-armv7h.pkg.tar.xz
Normal file
Binary file not shown.
BIN
packages/builds/mesa/mesa-vdpau-18.3.4-1-armv7h.pkg.tar.xz
Normal file
BIN
packages/builds/mesa/mesa-vdpau-18.3.4-1-armv7h.pkg.tar.xz
Normal file
Binary file not shown.
BIN
packages/builds/mesa/opencl-mesa-18.3.4-1-armv7h.pkg.tar.xz
Normal file
BIN
packages/builds/mesa/opencl-mesa-18.3.4-1-armv7h.pkg.tar.xz
Normal file
Binary file not shown.
|
@ -0,0 +1,491 @@
|
||||||
|
author Stephen Boyd <stephen.boyd@linaro.org> 2017-01-26 16:47:27 -0800
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 12:39:31 -0700
|
||||||
|
commit 77b05751cbd9b5ebe9fa0a8ef9dd2277e978ee59 (patch)
|
||||||
|
tree a5481a707e6cd25a6f915fdec91b2cc0b5bfa22a
|
||||||
|
parent 733fde282f4cacf4163f74219af5787cbb01155a (diff)
|
||||||
|
download flo-77b05751cbd9b5ebe9fa0a8ef9dd2277e978ee59.tar.gz
|
||||||
|
ARM: dts: qcom-apq8064: Collapse usb support into one node
|
||||||
|
We currently have three device nodes for the same USB hardware
|
||||||
|
block, as evident by the reuse of the same reg address multiple
|
||||||
|
times. Now that the chipidea driver fully supports OTG with the
|
||||||
|
MSM wrapper we can collapse the three nodes into one USB device
|
||||||
|
node, reflecting the true nature of the hardware.
|
||||||
|
|
||||||
|
Since we're here, we also mark the irq trigger flags correctly,
|
||||||
|
as IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_NONE.
|
||||||
|
|
||||||
|
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||||
|
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||||
|
Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
|
||||||
|
Cc: John Stultz <john.stultz@linaro.org>
|
||||||
|
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
|
||||||
|
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts 49
|
||||||
|
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts 21
|
||||||
|
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts 54
|
||||||
|
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064-ifc6410.dts 54
|
||||||
|
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts 16
|
||||||
|
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064.dtsi 154
|
||||||
|
|
||||||
|
6 files changed, 169 insertions, 179 deletions
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts b/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
|
||||||
|
index 8f5de02..c5f561f 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
|
||||||
|
@@ -319,44 +319,37 @@
|
||||||
|
target-supply = <&pm8921_lvs7>;
|
||||||
|
};
|
||||||
|
|
||||||
|
- /* OTG */
|
||||||
|
- phy@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- dr_mode = "peripheral";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l4>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- phy@12520000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l23>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- phy@12530000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l23>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- gadget@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- /* OTG */
|
||||||
|
usb@12500000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "peripheral";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l4>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
usb@12520000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "otg";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l23>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
usb@12530000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "otg";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l23>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
amba {
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
index e39440a..e5fef32 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
@@ -320,22 +320,15 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
- /* OTG */
|
||||||
|
- phy@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l4>;
|
||||||
|
- dr_mode = "otg";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- gadget@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- /* OTG */
|
||||||
|
usb@12500000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "otg";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l4>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
amba {
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts b/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
|
||||||
|
index 35f1d46..d736203 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
|
||||||
|
@@ -149,43 +149,37 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
- /* OTG */
|
||||||
|
- usb1_phy: phy@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l4>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- usb3_phy: phy@12520000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l23>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- usb4_phy: phy@12530000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l23>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- gadget1: gadget@12500000 {
|
||||||
|
- status = "ok";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- /* OTG */
|
||||||
|
- usb1: usb@12500000 {
|
||||||
|
+ usb@12500000 {
|
||||||
|
status = "ok";
|
||||||
|
+ dr_mode = "otg";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l4>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
- usb3: usb@12520000 {
|
||||||
|
+ usb@12520000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "host";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l23>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
- usb4: usb@12530000 {
|
||||||
|
+ usb@12530000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "host";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l23>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
/* on board fixed 3.3v supply */
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
|
||||||
|
index 881ce70..bbd1dac 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
|
||||||
|
@@ -243,43 +243,37 @@
|
||||||
|
target-supply = <&pm8921_s4>;
|
||||||
|
};
|
||||||
|
|
||||||
|
- /* OTG */
|
||||||
|
- usb1_phy: phy@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l4>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- usb3_phy: phy@12520000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l23>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- usb4_phy: phy@12530000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l23>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- gadget1: gadget@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- /* OTG */
|
||||||
|
- usb1: usb@12500000 {
|
||||||
|
+ usb@12500000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "otg";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l4>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
- usb3: usb@12520000 {
|
||||||
|
+ usb@12520000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "host";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l23>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
- usb4: usb@12530000 {
|
||||||
|
+ usb@12530000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "host";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l23>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
pci@1b500000 {
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
|
||||||
|
index a34ba35..88a9aff 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
|
||||||
|
@@ -349,15 +349,15 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
- phy@12500000 {
|
||||||
|
- status = "okay";
|
||||||
|
- vddcx-supply = <&pm8921_s3>;
|
||||||
|
- v3p3-supply = <&pm8921_l3>;
|
||||||
|
- v1p8-supply = <&pm8921_l4>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- gadget@12500000 {
|
||||||
|
+ usb@12500000 {
|
||||||
|
status = "okay";
|
||||||
|
+ dr_mode = "otg";
|
||||||
|
+ ulpi {
|
||||||
|
+ phy {
|
||||||
|
+ v3p3-supply = <&pm8921_l3>;
|
||||||
|
+ v1p8-supply = <&pm8921_l4>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
gsbi@1a200000 {
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
|
||||||
|
index 14a6f5e..f3db185 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
|
||||||
|
@@ -197,7 +197,7 @@
|
||||||
|
clock-frequency = <27000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
- sleep_clk {
|
||||||
|
+ sleep_clk: sleep_clk {
|
||||||
|
compatible = "fixed-clock";
|
||||||
|
#clock-cells = <0>;
|
||||||
|
clock-frequency = <32768>;
|
||||||
|
@@ -884,81 +884,97 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
- usb1_phy: phy@12500000 {
|
||||||
|
- compatible = "qcom,usb-otg-ci";
|
||||||
|
- reg = <0x12500000 0x400>;
|
||||||
|
- interrupts = <GIC_SPI 100 IRQ_TYPE_NONE>;
|
||||||
|
- status = "disabled";
|
||||||
|
-
|
||||||
|
- clocks = <&gcc USB_HS1_XCVR_CLK>,
|
||||||
|
- <&gcc USB_HS1_H_CLK>;
|
||||||
|
- clock-names = "core", "iface";
|
||||||
|
-
|
||||||
|
- resets = <&gcc USB_HS1_RESET>;
|
||||||
|
- reset-names = "link";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- usb3_phy: phy@12520000 {
|
||||||
|
- compatible = "qcom,usb-otg-ci";
|
||||||
|
- reg = <0x12520000 0x400>;
|
||||||
|
- interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>;
|
||||||
|
- status = "disabled";
|
||||||
|
- dr_mode = "host";
|
||||||
|
-
|
||||||
|
- clocks = <&gcc USB_HS3_XCVR_CLK>,
|
||||||
|
- <&gcc USB_HS3_H_CLK>;
|
||||||
|
- clock-names = "core", "iface";
|
||||||
|
-
|
||||||
|
- resets = <&gcc USB_HS3_RESET>;
|
||||||
|
- reset-names = "link";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- usb4_phy: phy@12530000 {
|
||||||
|
- compatible = "qcom,usb-otg-ci";
|
||||||
|
- reg = <0x12530000 0x400>;
|
||||||
|
- interrupts = <GIC_SPI 215 IRQ_TYPE_NONE>;
|
||||||
|
- status = "disabled";
|
||||||
|
- dr_mode = "host";
|
||||||
|
-
|
||||||
|
- clocks = <&gcc USB_HS4_XCVR_CLK>,
|
||||||
|
- <&gcc USB_HS4_H_CLK>;
|
||||||
|
- clock-names = "core", "iface";
|
||||||
|
-
|
||||||
|
- resets = <&gcc USB_HS4_RESET>;
|
||||||
|
- reset-names = "link";
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- gadget1: gadget@12500000 {
|
||||||
|
- compatible = "qcom,ci-hdrc";
|
||||||
|
- reg = <0x12500000 0x400>;
|
||||||
|
- status = "disabled";
|
||||||
|
- dr_mode = "peripheral";
|
||||||
|
- interrupts = <GIC_SPI 100 IRQ_TYPE_NONE>;
|
||||||
|
- usb-phy = <&usb1_phy>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
usb1: usb@12500000 {
|
||||||
|
- compatible = "qcom,ehci-host";
|
||||||
|
- reg = <0x12500000 0x400>;
|
||||||
|
- interrupts = <GIC_SPI 100 IRQ_TYPE_NONE>;
|
||||||
|
- status = "disabled";
|
||||||
|
- usb-phy = <&usb1_phy>;
|
||||||
|
+ compatible = "qcom,ci-hdrc";
|
||||||
|
+ reg = <0x12500000 0x200>,
|
||||||
|
+ <0x12500200 0x200>;
|
||||||
|
+ interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ clocks = <&gcc USB_HS1_XCVR_CLK>, <&gcc USB_HS1_H_CLK>;
|
||||||
|
+ clock-names = "core", "iface";
|
||||||
|
+ assigned-clocks = <&gcc USB_HS1_XCVR_CLK>;
|
||||||
|
+ assigned-clock-rates = <60000000>;
|
||||||
|
+ resets = <&gcc USB_HS1_RESET>;
|
||||||
|
+ reset-names = "core";
|
||||||
|
+ phy_type = "ulpi";
|
||||||
|
+ ahb-burst-config = <0>;
|
||||||
|
+ phys = <&usb_hs1_phy>;
|
||||||
|
+ phy-names = "usb-phy";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ #reset-cells = <1>;
|
||||||
|
+
|
||||||
|
+ ulpi {
|
||||||
|
+ usb_hs1_phy: phy {
|
||||||
|
+ compatible = "qcom,usb-hs-phy-apq8064",
|
||||||
|
+ "qcom,usb-hs-phy";
|
||||||
|
+ #phy-cells = <0>;
|
||||||
|
+ clocks = <&sleep_clk>, <&cxo_board>;
|
||||||
|
+ clock-names = "sleep", "ref";
|
||||||
|
+ resets = <&usb1 0>;
|
||||||
|
+ reset-names = "por";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
usb3: usb@12520000 {
|
||||||
|
- compatible = "qcom,ehci-host";
|
||||||
|
- reg = <0x12520000 0x400>;
|
||||||
|
- interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>;
|
||||||
|
- status = "disabled";
|
||||||
|
- usb-phy = <&usb3_phy>;
|
||||||
|
+ compatible = "qcom,ci-hdrc";
|
||||||
|
+ reg = <0x12520000 0x200>,
|
||||||
|
+ <0x12520200 0x200>;
|
||||||
|
+ interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ clocks = <&gcc USB_HS3_XCVR_CLK>, <&gcc USB_HS3_H_CLK>;
|
||||||
|
+ clock-names = "core", "iface";
|
||||||
|
+ assigned-clocks = <&gcc USB_HS3_XCVR_CLK>;
|
||||||
|
+ assigned-clock-rates = <60000000>;
|
||||||
|
+ resets = <&gcc USB_HS3_RESET>;
|
||||||
|
+ reset-names = "core";
|
||||||
|
+ phy_type = "ulpi";
|
||||||
|
+ ahb-burst-config = <0>;
|
||||||
|
+ phys = <&usb_hs3_phy>;
|
||||||
|
+ phy-names = "usb-phy";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ #reset-cells = <1>;
|
||||||
|
+
|
||||||
|
+ ulpi {
|
||||||
|
+ usb_hs3_phy: phy {
|
||||||
|
+ compatible = "qcom,usb-hs-phy-apq8064",
|
||||||
|
+ "qcom,usb-hs-phy";
|
||||||
|
+ #phy-cells = <0>;
|
||||||
|
+ clocks = <&sleep_clk>, <&cxo_board>;
|
||||||
|
+ clock-names = "sleep", "ref";
|
||||||
|
+ resets = <&usb3 0>;
|
||||||
|
+ reset-names = "por";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
usb4: usb@12530000 {
|
||||||
|
- compatible = "qcom,ehci-host";
|
||||||
|
- reg = <0x12530000 0x400>;
|
||||||
|
- interrupts = <GIC_SPI 215 IRQ_TYPE_NONE>;
|
||||||
|
- status = "disabled";
|
||||||
|
- usb-phy = <&usb4_phy>;
|
||||||
|
+ compatible = "qcom,ci-hdrc";
|
||||||
|
+ reg = <0x12530000 0x200>,
|
||||||
|
+ <0x12530200 0x200>;
|
||||||
|
+ interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
+ clocks = <&gcc USB_HS4_XCVR_CLK>, <&gcc USB_HS4_H_CLK>;
|
||||||
|
+ clock-names = "core", "iface";
|
||||||
|
+ assigned-clocks = <&gcc USB_HS4_XCVR_CLK>;
|
||||||
|
+ assigned-clock-rates = <60000000>;
|
||||||
|
+ resets = <&gcc USB_HS4_RESET>;
|
||||||
|
+ reset-names = "core";
|
||||||
|
+ phy_type = "ulpi";
|
||||||
|
+ ahb-burst-config = <0>;
|
||||||
|
+ phys = <&usb_hs4_phy>;
|
||||||
|
+ phy-names = "usb-phy";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ #reset-cells = <1>;
|
||||||
|
+
|
||||||
|
+ ulpi {
|
||||||
|
+ usb_hs4_phy: phy {
|
||||||
|
+ compatible = "qcom,usb-hs-phy-apq8064",
|
||||||
|
+ "qcom,usb-hs-phy";
|
||||||
|
+ #phy-cells = <0>;
|
||||||
|
+ clocks = <&sleep_clk>, <&cxo_board>;
|
||||||
|
+ clock-names = "sleep", "ref";
|
||||||
|
+ resets = <&usb4 0>;
|
||||||
|
+ reset-names = "por";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
sata_phy0: phy@1b400000 {
|
|
@ -0,0 +1,136 @@
|
||||||
|
author John Stultz <john.stultz@linaro.org> 2016-02-29 20:23:21 -0800
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 14:09:02 -0700
|
||||||
|
commit d337a84d6b6adc6d7e315de7faba6694bb25b05e (patch)
|
||||||
|
tree b5cd19a76d8c7590db47bea7845f003bf69ae6d6
|
||||||
|
parent e4b001541f7fc4f142d1f2327bbed779db6193ec (diff)
|
||||||
|
download flo-d337a84d6b6adc6d7e315de7faba6694bb25b05e.tar.gz
|
||||||
|
ARM: dts: nexus7: Add regulator tweaks and wcnss entry to support wifi
|
||||||
|
Tweak and add some regulator entries that are needed to
|
||||||
|
support wifi.
|
||||||
|
|
||||||
|
The values here were taken from:
|
||||||
|
arch/arm/mach-msm/asustek/flo/board-flo-regulator.c
|
||||||
|
in the AOSP msm 3.4 flo branch.
|
||||||
|
|
||||||
|
This also adds a wcnss entry so it gets enabled on the board.
|
||||||
|
|
||||||
|
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||||
|
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||||
|
Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
|
||||||
|
Cc: Stephen Boyd <stephen.boyd@linaro.org>
|
||||||
|
Cc: Andy Gross <andy.gross@linaro.org>
|
||||||
|
Cc: Rob Clark <robdclark@gmail.com>
|
||||||
|
Cc: Vinay Simha <simhavcs@gmail.com>
|
||||||
|
Cc: David Brown <david.brown@linaro.org>
|
||||||
|
Cc: Rob Herring <robh+dt@kernel.org>
|
||||||
|
Signed-off-by: John Stults <john.stultz@linaro.org>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts 42
|
||||||
|
|
||||||
|
1 files changed, 40 insertions, 2 deletions
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
index e5fef32..3cae48f 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
@@ -82,7 +82,17 @@
|
||||||
|
bias-pull-down;
|
||||||
|
};
|
||||||
|
|
||||||
|
- /* msm otg HSUSB_VDDCX */
|
||||||
|
+ /* wcnss_wlan.0-iris_vddrfa */
|
||||||
|
+ s2 {
|
||||||
|
+ regulator-min-microvolt = <1300000>;
|
||||||
|
+ regulator-max-microvolt = <1300000>;
|
||||||
|
+ qcom,switch-mode-frequency = <1600000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * msm otg HSUSB_VDDCX
|
||||||
|
+ * wcnss_wlan.0-riva_vddcx
|
||||||
|
+ */
|
||||||
|
s3 {
|
||||||
|
regulator-min-microvolt = <500000>;
|
||||||
|
regulator-max-microvolt = <1150000>;
|
||||||
|
@@ -95,6 +105,7 @@
|
||||||
|
* tabla2x-slim-CDC_VDDA_TX
|
||||||
|
* tabla2x-slim-CDC_VDD_CP
|
||||||
|
* tabla2x-slim-VDDIO_CDC
|
||||||
|
+ * wcnss_wlan.0-riva_vddpx
|
||||||
|
*/
|
||||||
|
s4 {
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
@@ -123,7 +134,10 @@
|
||||||
|
bias-pull-down;
|
||||||
|
};
|
||||||
|
|
||||||
|
- /* msm_otg-HSUSB_1p8 */
|
||||||
|
+ /*
|
||||||
|
+ * msm_otg-HSUSB_1p8
|
||||||
|
+ * wcnss_wlan.0-iris_vddxo
|
||||||
|
+ */
|
||||||
|
l4 {
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
@@ -143,6 +157,12 @@
|
||||||
|
regulator-max-microvolt = <2950000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /* wcnss_wlan.0-iris_vddpa */
|
||||||
|
+ l10 {
|
||||||
|
+ regulator-min-microvolt = <2900000>;
|
||||||
|
+ regulator-max-microvolt = <2900000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
/* mipi_dsi.1-dsi1_avdd */
|
||||||
|
l11 {
|
||||||
|
regulator-min-microvolt = <3000000>;
|
||||||
|
@@ -165,6 +185,12 @@
|
||||||
|
bias-pull-down;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /* wcnss_wlan.0-riva_vddmx */
|
||||||
|
+ l24 {
|
||||||
|
+ regulator-min-microvolt = <750000>;
|
||||||
|
+ regulator-max-microvolt = <1150000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* tabla2x-slim-CDC_VDDA_A_1P2V
|
||||||
|
* tabla2x-slim-VDDD_CDC_D
|
||||||
|
@@ -175,10 +201,15 @@
|
||||||
|
bias-pull-down;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /* wcnss_wlan.0-iris_vddio */
|
||||||
|
lvs1 {
|
||||||
|
bias-pull-down;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ /* wcnss_wlan.0-iris_vdddig */
|
||||||
|
+ lvs2 {
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
lvs4 {
|
||||||
|
bias-pull-down;
|
||||||
|
};
|
||||||
|
@@ -196,6 +227,7 @@
|
||||||
|
*/
|
||||||
|
lvs7 {
|
||||||
|
bias-pull-down;
|
||||||
|
+ regulator-always-on;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@@ -340,6 +372,12 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+ riva-pil@3204000 {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&riva_wlan_pin_a>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
imem@2a03f000 {
|
||||||
|
compatible = "syscon", "simple-mfd";
|
||||||
|
reg = <0x2a03f000 0x1000>;
|
|
@ -0,0 +1,109 @@
|
||||||
|
author Stephen Boyd <sboyd@codeaurora.org> 2015-03-20 23:45:22 -0700
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 14:09:21 -0700
|
||||||
|
commit a4daa927877f99711d1d90eb4ecbef9655ae7071 (patch)
|
||||||
|
tree 60d791c89659daf488265681a0e98f288f5168a7
|
||||||
|
parent d337a84d6b6adc6d7e315de7faba6694bb25b05e (diff)
|
||||||
|
download flo-a4daa927877f99711d1d90eb4ecbef9655ae7071.tar.gz
|
||||||
|
clk: Avoid sending high rates to downstream clocks during set_rate
|
||||||
|
If a clock is on and we call clk_set_rate() on it we may get into
|
||||||
|
a situation where the clock temporarily increases in rate
|
||||||
|
dramatically while we walk the tree and call .set_rate() ops. For
|
||||||
|
example, consider a case where a PLL feeds into a divider.
|
||||||
|
Initially the divider is set to divide by 1 and the PLL is
|
||||||
|
running fairly slow (100MHz). The downstream consumer of the
|
||||||
|
divider output can only handle rates =< 400 MHz, but the divider
|
||||||
|
can only choose between divisors of 1 and 4.
|
||||||
|
|
||||||
|
+-----+ +----------------+
|
||||||
|
| PLL |-->| div 1 or div 4 |---> consumer device
|
||||||
|
+-----+ +----------------+
|
||||||
|
|
||||||
|
To achieve a rate of 400MHz on the output of the divider, we
|
||||||
|
would have to set the rate of the PLL to 1.6 GHz and then divide
|
||||||
|
it by 4. The current code would set the PLL to 1.6GHz first while
|
||||||
|
the divider is still set to 1, thus causing the downstream
|
||||||
|
consumer of the clock to receive a few clock cycles of 1.6GHz
|
||||||
|
clock (far beyond it's maximum acceptable rate). We should be
|
||||||
|
changing the divider first before increasing the PLL rate to
|
||||||
|
avoid this problem.
|
||||||
|
|
||||||
|
Therefore, set the rate of any child clocks that are increasing
|
||||||
|
in rate from their current rate so that they can increase their
|
||||||
|
dividers if necessary. We assume that there isn't such a thing as
|
||||||
|
minimum rate requirements.
|
||||||
|
|
||||||
|
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
|
||||||
|
|
||||||
|
Conflicts:
|
||||||
|
drivers/clk/clk.c
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- drivers/clk/clk.c 22
|
||||||
|
|
||||||
|
1 files changed, 15 insertions, 7 deletions
|
||||||
|
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
|
||||||
|
index fc58c52..784d7a2 100644
|
||||||
|
--- a/drivers/clk/clk.c
|
||||||
|
+++ b/drivers/clk/clk.c
|
||||||
|
@@ -1468,12 +1468,12 @@ static struct clk_core *clk_propagate_rate_change(struct clk_core *core,
|
||||||
|
* walk down a subtree and set the new rates notifying the rate
|
||||||
|
* change on the way
|
||||||
|
*/
|
||||||
|
-static void clk_change_rate(struct clk_core *core)
|
||||||
|
+static void
|
||||||
|
+clk_change_rate(struct clk_core *core, unsigned long best_parent_rate)
|
||||||
|
{
|
||||||
|
struct clk_core *child;
|
||||||
|
struct hlist_node *tmp;
|
||||||
|
unsigned long old_rate;
|
||||||
|
- unsigned long best_parent_rate = 0;
|
||||||
|
bool skip_set_rate = false;
|
||||||
|
struct clk_core *old_parent;
|
||||||
|
struct clk_core *parent = NULL;
|
||||||
|
@@ -1525,6 +1525,7 @@ static void clk_change_rate(struct clk_core *core)
|
||||||
|
trace_clk_set_rate_complete(core, core->new_rate);
|
||||||
|
|
||||||
|
core->rate = clk_recalc(core, best_parent_rate);
|
||||||
|
+ core->rate = core->new_rate;
|
||||||
|
|
||||||
|
if (core->flags & CLK_SET_RATE_UNGATE) {
|
||||||
|
unsigned long flags;
|
||||||
|
@@ -1552,12 +1553,13 @@ static void clk_change_rate(struct clk_core *core)
|
||||||
|
/* Skip children who will be reparented to another clock */
|
||||||
|
if (child->new_parent && child->new_parent != core)
|
||||||
|
continue;
|
||||||
|
- clk_change_rate(child);
|
||||||
|
+ if (child->new_rate != child->rate)
|
||||||
|
+ clk_change_rate(child, core->new_rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* handle the new child who might not be in core->children yet */
|
||||||
|
- if (core->new_child)
|
||||||
|
- clk_change_rate(core->new_child);
|
||||||
|
+ /* handle the new child who might not be in clk->children yet */
|
||||||
|
+ if (core->new_child && core->new_child->new_rate != core->new_child->rate)
|
||||||
|
+ clk_change_rate(core->new_child, core->new_rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int clk_core_set_rate_nolock(struct clk_core *core,
|
||||||
|
@@ -1565,6 +1567,7 @@ static int clk_core_set_rate_nolock(struct clk_core *core,
|
||||||
|
{
|
||||||
|
struct clk_core *top, *fail_clk;
|
||||||
|
unsigned long rate = req_rate;
|
||||||
|
+ unsigned long parent_rate;
|
||||||
|
|
||||||
|
if (!core)
|
||||||
|
return 0;
|
||||||
|
@@ -1590,8 +1593,13 @@ static int clk_core_set_rate_nolock(struct clk_core *core,
|
||||||
|
return -EBUSY;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (top->parent)
|
||||||
|
+ parent_rate = top->parent->rate;
|
||||||
|
+ else
|
||||||
|
+ parent_rate = 0;
|
||||||
|
+
|
||||||
|
/* change the rates */
|
||||||
|
- clk_change_rate(top);
|
||||||
|
+ clk_change_rate(top, parent_rate);
|
||||||
|
|
||||||
|
core->req_rate = req_rate;
|
311
packages/linux-asus-flo/03_Support_devicetree_binding.patch
Normal file
311
packages/linux-asus-flo/03_Support_devicetree_binding.patch
Normal file
|
@ -0,0 +1,311 @@
|
||||||
|
author Vinay Simha BN <simhavcs@gmail.com> 2016-07-26 23:22:16 +0530
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 12:39:39 -0700
|
||||||
|
commit 04be7aa13586e450728845951f969f39ed577f0e (patch)
|
||||||
|
tree aba86875e93db08a8fd279c692caa2b28eb4fceb
|
||||||
|
parent c0648aa6e6063285cec2a15fecd360a3b4394af4 (diff)
|
||||||
|
download flo-04be7aa13586e450728845951f969f39ed577f0e.tar.gz
|
||||||
|
power: smb347-charger: Support devicetree binding
|
||||||
|
This patch makes smb347 charger driver to support dt binding. All legacy
|
||||||
|
platform data now can be parsed from dt.
|
||||||
|
Because of that smb347 is i2c client driver, IRQ number can be passed
|
||||||
|
automatically through client's irq variable if it is defined in dt.
|
||||||
|
No more to use requesting gpio to irq manually in dt-way.
|
||||||
|
|
||||||
|
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
|
||||||
|
Acked-by : Chanwoo Choi <cw00.choi@samsung.com>
|
||||||
|
Acked-by : Myungjoo Ham <myungjoo.ham@samsung.com>
|
||||||
|
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- Documentation/devicetree/bindings/power_supply/smb347_charger.txt 57
|
||||||
|
|
||||||
|
-rw-r--r-- drivers/power/supply/smb347-charger.c 140
|
||||||
|
|
||||||
|
2 files changed, 160 insertions, 37 deletions
|
||||||
|
diff --git a/Documentation/devicetree/bindings/power_supply/smb347_charger.txt b/Documentation/devicetree/bindings/power_supply/smb347_charger.txt
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..91570a5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/Documentation/devicetree/bindings/power_supply/smb347_charger.txt
|
||||||
|
@@ -0,0 +1,57 @@
|
||||||
|
+smb347_charger bindings
|
||||||
|
+~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
+
|
||||||
|
+[Required porperties]
|
||||||
|
+- compatible : "summit,smb347"
|
||||||
|
+- reg : Slave address for i2c interface
|
||||||
|
+# At least one of followings should be set
|
||||||
|
+ - enable-usb-charging
|
||||||
|
+ - enable-otg-charging
|
||||||
|
+ - enable-mains-charging
|
||||||
|
+
|
||||||
|
+[Optional properties]
|
||||||
|
+- interrupt-parent : The phandle for the interrupt controller
|
||||||
|
+- interrupts : Interrupt line index for mapping
|
||||||
|
+- enable-chg-ctrl : Enable charging control
|
||||||
|
+ <0> : SW (i2c interface)
|
||||||
|
+ <1> : Pin control (Active Low)
|
||||||
|
+ <2> : Pin control (Active High)
|
||||||
|
+# Charging constraints
|
||||||
|
+- max-chg-curr : Maximum current for charging (in uA)
|
||||||
|
+- max-chg-volt : Maximum voltage for charging (in uV)
|
||||||
|
+- pre-chg-curr : Pre-charging current (in uA)
|
||||||
|
+- term-curr : Charging cycle termination current (in uA)
|
||||||
|
+- fast-volt-thershold : Voltage threshold to transit to fast charge mode (in uV)
|
||||||
|
+- mains-curr-limit : Maximum input current from AC/DC input (in uA)
|
||||||
|
+- usb-curr-limit : Maximum input current from USB input (in uA)
|
||||||
|
+
|
||||||
|
+# Related thermometer monitoring (in degree C)
|
||||||
|
+- chip-temp-threshold : Chip temperature for thermal regulaton. <100, 130>
|
||||||
|
+- soft-cold-temp-limit : Cold battery temperature for soft alarm. <0, 15>*
|
||||||
|
+- soft-hot-temp-limit : Hot battery temperature for soft alarm. <40, 55>
|
||||||
|
+- hard-cold-temp-limit : Cold battery temperature for hard alarm. <0, 15>*
|
||||||
|
+- hard-hot-temp-limit : Hot battery temperature for hard alarm. <55, 65>
|
||||||
|
+(* The written temperature has +5'C offset. 0'C -> -5'C, 15'C -> 10'C)
|
||||||
|
+- soft-comp-method : Soft temperature limit compensation method
|
||||||
|
+ (Not defined) : Use default setting
|
||||||
|
+ <0> : Compensation none
|
||||||
|
+ <1> : Charge current compensation
|
||||||
|
+ <2> : Voltage compensation
|
||||||
|
+
|
||||||
|
+Example:
|
||||||
|
+ smb347@7f {
|
||||||
|
+ compatible = "summit,smb347";
|
||||||
|
+ reg = <0x7f>;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ max-chg-curr = <1800000>;
|
||||||
|
+ mains-curr-limit = <2000000>;
|
||||||
|
+ usb-curr-limit = <450000>;
|
||||||
|
+
|
||||||
|
+ chip-temp-thershold = <110>;
|
||||||
|
+
|
||||||
|
+ enable-usb-charging;
|
||||||
|
+ enable-mains-charging;
|
||||||
|
+
|
||||||
|
+ enable-chg-ctrl = <2>; /* Pin control (Active High) */
|
||||||
|
+ };
|
||||||
|
diff --git a/drivers/power/supply/smb347-charger.c b/drivers/power/supply/smb347-charger.c
|
||||||
|
index 072c518..0231844 100644
|
||||||
|
--- a/drivers/power/supply/smb347-charger.c
|
||||||
|
+++ b/drivers/power/supply/smb347-charger.c
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
-
|
||||||
|
+#define DEBUG
|
||||||
|
#include <linux/err.h>
|
||||||
|
#include <linux/gpio.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
@@ -834,22 +834,21 @@ static inline int smb347_irq_disable(struct smb347_charger *smb)
|
||||||
|
static int smb347_irq_init(struct smb347_charger *smb,
|
||||||
|
struct i2c_client *client)
|
||||||
|
{
|
||||||
|
- const struct smb347_charger_platform_data *pdata = smb->pdata;
|
||||||
|
- int ret, irq = gpio_to_irq(pdata->irq_gpio);
|
||||||
|
+ int ret;
|
||||||
|
+ unsigned long irqflags;
|
||||||
|
|
||||||
|
- ret = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
|
||||||
|
- if (ret < 0)
|
||||||
|
- goto fail;
|
||||||
|
+ irqflags = client->dev.of_node ? 0 : IRQF_TRIGGER_FALLING;
|
||||||
|
+
|
||||||
|
+ ret = devm_request_threaded_irq(smb->dev, client->irq, NULL,
|
||||||
|
+ smb347_interrupt, irqflags | IRQF_ONESHOT,
|
||||||
|
+ client->name, smb);
|
||||||
|
|
||||||
|
- ret = request_threaded_irq(irq, NULL, smb347_interrupt,
|
||||||
|
- IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||||
|
- client->name, smb);
|
||||||
|
if (ret < 0)
|
||||||
|
- goto fail_gpio;
|
||||||
|
+ goto out;
|
||||||
|
|
||||||
|
ret = smb347_set_writable(smb, true);
|
||||||
|
if (ret < 0)
|
||||||
|
- goto fail_irq;
|
||||||
|
+ goto out;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Configure the STAT output to be suitable for interrupts: disable
|
||||||
|
@@ -859,20 +858,10 @@ static int smb347_irq_init(struct smb347_charger *smb,
|
||||||
|
CFG_STAT_ACTIVE_HIGH | CFG_STAT_DISABLED,
|
||||||
|
CFG_STAT_DISABLED);
|
||||||
|
if (ret < 0)
|
||||||
|
- goto fail_readonly;
|
||||||
|
-
|
||||||
|
- smb347_set_writable(smb, false);
|
||||||
|
- client->irq = irq;
|
||||||
|
- return 0;
|
||||||
|
+ client->irq = 0;
|
||||||
|
|
||||||
|
-fail_readonly:
|
||||||
|
smb347_set_writable(smb, false);
|
||||||
|
-fail_irq:
|
||||||
|
- free_irq(irq, smb);
|
||||||
|
-fail_gpio:
|
||||||
|
- gpio_free(pdata->irq_gpio);
|
||||||
|
-fail:
|
||||||
|
- client->irq = 0;
|
||||||
|
+out:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1178,6 +1167,80 @@ static bool smb347_readable_reg(struct device *dev, unsigned int reg)
|
||||||
|
return smb347_volatile_reg(dev, reg);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void smb347_dt_parse_pdata(struct device_node *np,
|
||||||
|
+ struct smb347_charger_platform_data *pdata)
|
||||||
|
+{
|
||||||
|
+ /* Charing constraints */
|
||||||
|
+ of_property_read_u32(np, "max-chg-curr", &pdata->max_charge_current);
|
||||||
|
+ of_property_read_u32(np, "max-chg-volt", &pdata->max_charge_voltage);
|
||||||
|
+ of_property_read_u32(np, "pre-chg-curr", &pdata->pre_charge_current);
|
||||||
|
+ of_property_read_u32(np, "term-curr", &pdata->termination_current);
|
||||||
|
+ of_property_read_u32(np, "fast-volt-threshold",
|
||||||
|
+ &pdata->pre_to_fast_voltage);
|
||||||
|
+ of_property_read_u32(np, "mains-curr-limit",
|
||||||
|
+ &pdata->mains_current_limit);
|
||||||
|
+ of_property_read_u32(np, "usb-curr-limit",
|
||||||
|
+ &pdata->usb_hc_current_limit);
|
||||||
|
+
|
||||||
|
+ /* For thermometer monitoring */
|
||||||
|
+ of_property_read_u32(np, "chip-temp-threshold",
|
||||||
|
+ &pdata->chip_temp_threshold);
|
||||||
|
+ if (of_property_read_u32(np, "soft-cold-temp-limit",
|
||||||
|
+ &pdata->soft_cold_temp_limit))
|
||||||
|
+ pdata->soft_cold_temp_limit = SMB347_TEMP_USE_DEFAULT;
|
||||||
|
+ if (of_property_read_u32(np, "soft-hot-temp-limit",
|
||||||
|
+ &pdata->soft_hot_temp_limit))
|
||||||
|
+ pdata->soft_hot_temp_limit = SMB347_TEMP_USE_DEFAULT;
|
||||||
|
+ if (of_property_read_u32(np, "hard-cold-temp-limit",
|
||||||
|
+ &pdata->hard_cold_temp_limit))
|
||||||
|
+ pdata->hard_cold_temp_limit = SMB347_TEMP_USE_DEFAULT;
|
||||||
|
+ if (of_property_read_u32(np, "hard-hot-temp-limit",
|
||||||
|
+ &pdata->hard_hot_temp_limit))
|
||||||
|
+ pdata->hard_hot_temp_limit = SMB347_TEMP_USE_DEFAULT;
|
||||||
|
+
|
||||||
|
+ /* Suspend when battery temperature is outside hard limits */
|
||||||
|
+ if ((pdata->hard_cold_temp_limit != SMB347_TEMP_USE_DEFAULT)
|
||||||
|
+ || (pdata->hard_hot_temp_limit != SMB347_TEMP_USE_DEFAULT))
|
||||||
|
+ pdata->suspend_on_hard_temp_limit = true;
|
||||||
|
+
|
||||||
|
+ if (of_property_read_u32(np, "soft-comp-method",
|
||||||
|
+ &pdata->soft_temp_limit_compensation))
|
||||||
|
+ pdata->soft_temp_limit_compensation =
|
||||||
|
+ SMB347_SOFT_TEMP_COMPENSATE_DEFAULT;
|
||||||
|
+
|
||||||
|
+ of_property_read_u32(np, "chg-curr-comp",
|
||||||
|
+ &pdata->charge_current_compensation);
|
||||||
|
+
|
||||||
|
+ /* Supported charging mode */
|
||||||
|
+ pdata->use_mains = of_property_read_bool(np, "enable-mains-charging");
|
||||||
|
+ pdata->use_usb = of_property_read_bool(np, "enable-usb-charging");
|
||||||
|
+ pdata->use_usb_otg = of_property_read_bool(np, "enable-otg-charging");
|
||||||
|
+
|
||||||
|
+ /* Enable charging method */
|
||||||
|
+ of_property_read_u32(np, "enable-chg-ctrl", &pdata->enable_control);
|
||||||
|
+
|
||||||
|
+ /* If IRQ is enabled or not */
|
||||||
|
+ if (!of_get_property(np, "interrupts", NULL))
|
||||||
|
+ pdata->irq_gpio = -1;
|
||||||
|
+
|
||||||
|
+ return;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static struct smb347_charger_platform_data
|
||||||
|
+ *smb347_get_platdata(struct device *dev)
|
||||||
|
+{
|
||||||
|
+ struct smb347_charger_platform_data *pdata = NULL;
|
||||||
|
+
|
||||||
|
+ if (dev->of_node) {
|
||||||
|
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
|
||||||
|
+ smb347_dt_parse_pdata(dev->of_node, pdata);
|
||||||
|
+ } else {
|
||||||
|
+ pdata = dev_get_platdata(dev);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return pdata;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static const struct regmap_config smb347_regmap = {
|
||||||
|
.reg_bits = 8,
|
||||||
|
.val_bits = 8,
|
||||||
|
@@ -1214,28 +1277,26 @@ static int smb347_probe(struct i2c_client *client,
|
||||||
|
const struct i2c_device_id *id)
|
||||||
|
{
|
||||||
|
static char *battery[] = { "smb347-battery" };
|
||||||
|
- const struct smb347_charger_platform_data *pdata;
|
||||||
|
struct power_supply_config mains_usb_cfg = {}, battery_cfg = {};
|
||||||
|
struct device *dev = &client->dev;
|
||||||
|
struct smb347_charger *smb;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
- pdata = dev->platform_data;
|
||||||
|
- if (!pdata)
|
||||||
|
- return -EINVAL;
|
||||||
|
-
|
||||||
|
- if (!pdata->use_mains && !pdata->use_usb)
|
||||||
|
- return -EINVAL;
|
||||||
|
-
|
||||||
|
smb = devm_kzalloc(dev, sizeof(*smb), GFP_KERNEL);
|
||||||
|
if (!smb)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
+ smb->pdata = smb347_get_platdata(dev);
|
||||||
|
+ if (IS_ERR_OR_NULL(smb->pdata))
|
||||||
|
+ return -ENODEV;
|
||||||
|
+
|
||||||
|
+ if (!smb->pdata->use_mains && !smb->pdata->use_usb)
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
i2c_set_clientdata(client, smb);
|
||||||
|
|
||||||
|
mutex_init(&smb->lock);
|
||||||
|
smb->dev = &client->dev;
|
||||||
|
- smb->pdata = pdata;
|
||||||
|
|
||||||
|
smb->regmap = devm_regmap_init_i2c(client, &smb347_regmap);
|
||||||
|
if (IS_ERR(smb->regmap))
|
||||||
|
@@ -1280,7 +1341,7 @@ static int smb347_probe(struct i2c_client *client,
|
||||||
|
* Interrupt pin is optional. If it is connected, we setup the
|
||||||
|
* interrupt support here.
|
||||||
|
*/
|
||||||
|
- if (pdata->irq_gpio >= 0) {
|
||||||
|
+ if (smb->pdata->irq_gpio >= 0) {
|
||||||
|
ret = smb347_irq_init(smb, client);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_warn(dev, "failed to initialize IRQ: %d\n", ret);
|
||||||
|
@@ -1297,11 +1358,8 @@ static int smb347_remove(struct i2c_client *client)
|
||||||
|
{
|
||||||
|
struct smb347_charger *smb = i2c_get_clientdata(client);
|
||||||
|
|
||||||
|
- if (client->irq) {
|
||||||
|
+ if (client->irq)
|
||||||
|
smb347_irq_disable(smb);
|
||||||
|
- free_irq(client->irq, smb);
|
||||||
|
- gpio_free(smb->pdata->irq_gpio);
|
||||||
|
- }
|
||||||
|
|
||||||
|
power_supply_unregister(smb->battery);
|
||||||
|
if (smb->pdata->use_usb)
|
||||||
|
@@ -1317,9 +1375,17 @@ static const struct i2c_device_id smb347_id[] = {
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(i2c, smb347_id);
|
||||||
|
|
||||||
|
+#ifdef CONFIG_OF
|
||||||
|
+static struct of_device_id of_smb347_ids[] = {
|
||||||
|
+ { .compatible = "summit,smb347" },
|
||||||
|
+ {},
|
||||||
|
+};
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
static struct i2c_driver smb347_driver = {
|
||||||
|
.driver = {
|
||||||
|
.name = "smb347",
|
||||||
|
+ .of_match_table = of_match_ptr(of_smb347_ids),
|
||||||
|
},
|
||||||
|
.probe = smb347_probe,
|
||||||
|
.remove = smb347_remove,
|
291
packages/linux-asus-flo/04_Summit_SMB345_charger_IC.patch
Normal file
291
packages/linux-asus-flo/04_Summit_SMB345_charger_IC.patch
Normal file
|
@ -0,0 +1,291 @@
|
||||||
|
author Vinay Simha BN <simhavcs@gmail.com> 2016-09-02 20:46:57 +0530
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 12:39:41 -0700
|
||||||
|
commit cba521131c17b70b5973c662a59d134d607ad311 (patch)
|
||||||
|
tree d32a9ea9e23590ab7703944bc0b3db5b9d8b8835
|
||||||
|
parent 04be7aa13586e450728845951f969f39ed577f0e (diff)
|
||||||
|
download flo-cba521131c17b70b5973c662a59d134d607ad311.tar.gz
|
||||||
|
power: smb347-charger: Summit SMB345 charger IC
|
||||||
|
Summit microelectronics SMB358 charger chip added.
|
||||||
|
It shares the same register map and functionality
|
||||||
|
with SMB347.
|
||||||
|
|
||||||
|
Cc: Jonghwa Lee <jonghwa3.lee@samsung.com>
|
||||||
|
Cc: Sumit Semwal <sumit.semwal@linaro.org>
|
||||||
|
Cc: John Stultz <john.stultz@linaro.org>
|
||||||
|
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- Documentation/devicetree/bindings/power_supply/smb347_charger.txt 1
|
||||||
|
|
||||||
|
-rw-r--r-- drivers/power/supply/smb347-charger.c 122
|
||||||
|
|
||||||
|
2 files changed, 61 insertions, 62 deletions
|
||||||
|
diff --git a/Documentation/devicetree/bindings/power_supply/smb347_charger.txt b/Documentation/devicetree/bindings/power_supply/smb347_charger.txt
|
||||||
|
index 91570a5..ee39b58 100644
|
||||||
|
--- a/Documentation/devicetree/bindings/power_supply/smb347_charger.txt
|
||||||
|
+++ b/Documentation/devicetree/bindings/power_supply/smb347_charger.txt
|
||||||
|
@@ -3,6 +3,7 @@ smb347_charger bindings
|
||||||
|
|
||||||
|
[Required porperties]
|
||||||
|
- compatible : "summit,smb347"
|
||||||
|
+ "summit,smb345"
|
||||||
|
- reg : Slave address for i2c interface
|
||||||
|
# At least one of followings should be set
|
||||||
|
- enable-usb-charging
|
||||||
|
diff --git a/drivers/power/supply/smb347-charger.c b/drivers/power/supply/smb347-charger.c
|
||||||
|
index 0231844..4be638c 100644
|
||||||
|
--- a/drivers/power/supply/smb347-charger.c
|
||||||
|
+++ b/drivers/power/supply/smb347-charger.c
|
||||||
|
@@ -136,6 +136,7 @@
|
||||||
|
* @pdata: pointer to platform data
|
||||||
|
*/
|
||||||
|
struct smb347_charger {
|
||||||
|
+ int id;
|
||||||
|
struct mutex lock;
|
||||||
|
struct device *dev;
|
||||||
|
struct regmap *regmap;
|
||||||
|
@@ -148,58 +149,46 @@ struct smb347_charger {
|
||||||
|
const struct smb347_charger_platform_data *pdata;
|
||||||
|
};
|
||||||
|
|
||||||
|
+enum smb_charger_chipid {
|
||||||
|
+ SMB347,
|
||||||
|
+ SMB345,
|
||||||
|
+ NUM_CHIP_TYPES,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
/* Fast charge current in uA */
|
||||||
|
-static const unsigned int fcc_tbl[] = {
|
||||||
|
- 700000,
|
||||||
|
- 900000,
|
||||||
|
- 1200000,
|
||||||
|
- 1500000,
|
||||||
|
- 1800000,
|
||||||
|
- 2000000,
|
||||||
|
- 2200000,
|
||||||
|
- 2500000,
|
||||||
|
+static const unsigned int fcc_tbl[NUM_CHIP_TYPES][8] = {
|
||||||
|
+ [SMB347] = { 700000, 900000, 1200000, 1500000,
|
||||||
|
+ 1800000, 2000000, 2200000, 2500000 },
|
||||||
|
+ [SMB345] = { 200000, 450000, 600000, 900000,
|
||||||
|
+ 1300000, 1500000, 1800000, 2000000 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Pre-charge current in uA */
|
||||||
|
-static const unsigned int pcc_tbl[] = {
|
||||||
|
- 100000,
|
||||||
|
- 150000,
|
||||||
|
- 200000,
|
||||||
|
- 250000,
|
||||||
|
+static const unsigned int pcc_tbl[NUM_CHIP_TYPES][4] = {
|
||||||
|
+ [SMB347] = { 100000, 150000, 200000, 250000 },
|
||||||
|
+ [SMB345] = { 150000, 250000, 350000, 450000 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Termination current in uA */
|
||||||
|
-static const unsigned int tc_tbl[] = {
|
||||||
|
- 37500,
|
||||||
|
- 50000,
|
||||||
|
- 100000,
|
||||||
|
- 150000,
|
||||||
|
- 200000,
|
||||||
|
- 250000,
|
||||||
|
- 500000,
|
||||||
|
- 600000,
|
||||||
|
+static const unsigned int tc_tbl[NUM_CHIP_TYPES][8] = {
|
||||||
|
+ [SMB347] = { 37500, 50000, 100000, 150000,
|
||||||
|
+ 200000, 250000, 500000, 600000 },
|
||||||
|
+ [SMB345] = { 30000, 40000, 60000, 80000,
|
||||||
|
+ 100000, 125000, 150000, 200000 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Input current limit in uA */
|
||||||
|
-static const unsigned int icl_tbl[] = {
|
||||||
|
- 300000,
|
||||||
|
- 500000,
|
||||||
|
- 700000,
|
||||||
|
- 900000,
|
||||||
|
- 1200000,
|
||||||
|
- 1500000,
|
||||||
|
- 1800000,
|
||||||
|
- 2000000,
|
||||||
|
- 2200000,
|
||||||
|
- 2500000,
|
||||||
|
+static const unsigned int icl_tbl[NUM_CHIP_TYPES][10] = {
|
||||||
|
+ [SMB347] = { 300000, 500000, 700000, 900000, 1200000,
|
||||||
|
+ 1500000, 1800000, 2000000, 2200000, 2500000 },
|
||||||
|
+ [SMB345] = { 300000, 500000, 700000, 1000000, 1500000,
|
||||||
|
+ 1800000, 2000000, 2000000, 2000000, 2000000 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Charge current compensation in uA */
|
||||||
|
-static const unsigned int ccc_tbl[] = {
|
||||||
|
- 250000,
|
||||||
|
- 700000,
|
||||||
|
- 900000,
|
||||||
|
- 1200000,
|
||||||
|
+static const unsigned int ccc_tbl[NUM_CHIP_TYPES][4] = {
|
||||||
|
+ [SMB347] = { 250000, 700000, 900000, 1200000 },
|
||||||
|
+ [SMB345] = { 200000, 450000, 600000, 900000 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Convert register value to current using lookup table */
|
||||||
|
@@ -354,10 +343,10 @@ static int smb347_start_stop_charging(struct smb347_charger *smb)
|
||||||
|
|
||||||
|
static int smb347_set_charge_current(struct smb347_charger *smb)
|
||||||
|
{
|
||||||
|
- int ret;
|
||||||
|
+ int ret, id = smb->id;
|
||||||
|
|
||||||
|
if (smb->pdata->max_charge_current) {
|
||||||
|
- ret = current_to_hw(fcc_tbl, ARRAY_SIZE(fcc_tbl),
|
||||||
|
+ ret = current_to_hw(fcc_tbl[id], ARRAY_SIZE(fcc_tbl[id]),
|
||||||
|
smb->pdata->max_charge_current);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
@@ -370,7 +359,7 @@ static int smb347_set_charge_current(struct smb347_charger *smb)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (smb->pdata->pre_charge_current) {
|
||||||
|
- ret = current_to_hw(pcc_tbl, ARRAY_SIZE(pcc_tbl),
|
||||||
|
+ ret = current_to_hw(pcc_tbl[id], ARRAY_SIZE(pcc_tbl[id]),
|
||||||
|
smb->pdata->pre_charge_current);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
@@ -383,7 +372,7 @@ static int smb347_set_charge_current(struct smb347_charger *smb)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (smb->pdata->termination_current) {
|
||||||
|
- ret = current_to_hw(tc_tbl, ARRAY_SIZE(tc_tbl),
|
||||||
|
+ ret = current_to_hw(tc_tbl[id], ARRAY_SIZE(tc_tbl[id]),
|
||||||
|
smb->pdata->termination_current);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
@@ -399,10 +388,10 @@ static int smb347_set_charge_current(struct smb347_charger *smb)
|
||||||
|
|
||||||
|
static int smb347_set_current_limits(struct smb347_charger *smb)
|
||||||
|
{
|
||||||
|
- int ret;
|
||||||
|
+ int ret, id = smb->id;
|
||||||
|
|
||||||
|
if (smb->pdata->mains_current_limit) {
|
||||||
|
- ret = current_to_hw(icl_tbl, ARRAY_SIZE(icl_tbl),
|
||||||
|
+ ret = current_to_hw(icl_tbl[id], ARRAY_SIZE(icl_tbl[id]),
|
||||||
|
smb->pdata->mains_current_limit);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
@@ -415,7 +404,7 @@ static int smb347_set_current_limits(struct smb347_charger *smb)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (smb->pdata->usb_hc_current_limit) {
|
||||||
|
- ret = current_to_hw(icl_tbl, ARRAY_SIZE(icl_tbl),
|
||||||
|
+ ret = current_to_hw(icl_tbl[id], ARRAY_SIZE(icl_tbl[id]),
|
||||||
|
smb->pdata->usb_hc_current_limit);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
@@ -467,7 +456,7 @@ static int smb347_set_temp_limits(struct smb347_charger *smb)
|
||||||
|
{
|
||||||
|
bool enable_therm_monitor = false;
|
||||||
|
int ret = 0;
|
||||||
|
- int val;
|
||||||
|
+ int val, id = smb->id;
|
||||||
|
|
||||||
|
if (smb->pdata->chip_temp_threshold) {
|
||||||
|
val = smb->pdata->chip_temp_threshold;
|
||||||
|
@@ -589,7 +578,7 @@ static int smb347_set_temp_limits(struct smb347_charger *smb)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (smb->pdata->charge_current_compensation) {
|
||||||
|
- val = current_to_hw(ccc_tbl, ARRAY_SIZE(ccc_tbl),
|
||||||
|
+ val = current_to_hw(ccc_tbl[id], ARRAY_SIZE(ccc_tbl[id]),
|
||||||
|
smb->pdata->charge_current_compensation);
|
||||||
|
if (val < 0)
|
||||||
|
return val;
|
||||||
|
@@ -723,10 +712,12 @@ static irqreturn_t smb347_interrupt(int irq, void *data)
|
||||||
|
return IRQ_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = regmap_read(smb->regmap, IRQSTAT_D, &irqstat_d);
|
||||||
|
- if (ret < 0) {
|
||||||
|
- dev_warn(smb->dev, "reading IRQSTAT_D failed\n");
|
||||||
|
- return IRQ_NONE;
|
||||||
|
+ if(smb->id != SMB345) {
|
||||||
|
+ ret = regmap_read(smb->regmap, IRQSTAT_D, &irqstat_d);
|
||||||
|
+ if (ret < 0) {
|
||||||
|
+ dev_warn(smb->dev, "reading IRQSTAT_D failed\n");
|
||||||
|
+ return IRQ_NONE;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = regmap_read(smb->regmap, IRQSTAT_E, &irqstat_e);
|
||||||
|
@@ -761,13 +752,15 @@ static irqreturn_t smb347_interrupt(int irq, void *data)
|
||||||
|
* If we got a charger timeout INT that means the charge
|
||||||
|
* full is not detected with in charge timeout value.
|
||||||
|
*/
|
||||||
|
- if (irqstat_d & IRQSTAT_D_CHARGE_TIMEOUT_IRQ) {
|
||||||
|
- dev_dbg(smb->dev, "total Charge Timeout INT received\n");
|
||||||
|
+ if(smb->id != SMB345) {
|
||||||
|
+ if (irqstat_d & IRQSTAT_D_CHARGE_TIMEOUT_IRQ) {
|
||||||
|
+ dev_dbg(smb->dev, "total Charge Timeout INT received\n");
|
||||||
|
|
||||||
|
- if (irqstat_d & IRQSTAT_D_CHARGE_TIMEOUT_STAT)
|
||||||
|
- dev_warn(smb->dev, "charging stopped due to timeout\n");
|
||||||
|
- power_supply_changed(smb->battery);
|
||||||
|
- handled = true;
|
||||||
|
+ if (irqstat_d & IRQSTAT_D_CHARGE_TIMEOUT_STAT)
|
||||||
|
+ dev_warn(smb->dev, "charging stopped due to timeout\n");
|
||||||
|
+ power_supply_changed(smb->battery);
|
||||||
|
+ handled = true;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -871,7 +864,7 @@ out:
|
||||||
|
*/
|
||||||
|
static int get_const_charge_current(struct smb347_charger *smb)
|
||||||
|
{
|
||||||
|
- int ret, intval;
|
||||||
|
+ int ret, intval, id = smb->id;
|
||||||
|
unsigned int v;
|
||||||
|
|
||||||
|
if (!smb347_is_ps_online(smb))
|
||||||
|
@@ -886,10 +879,12 @@ static int get_const_charge_current(struct smb347_charger *smb)
|
||||||
|
* and we can detect which table to use from bit 5.
|
||||||
|
*/
|
||||||
|
if (v & 0x20) {
|
||||||
|
- intval = hw_to_current(fcc_tbl, ARRAY_SIZE(fcc_tbl), v & 7);
|
||||||
|
+ intval = hw_to_current(fcc_tbl[id],
|
||||||
|
+ ARRAY_SIZE(fcc_tbl[id]), v & 7);
|
||||||
|
} else {
|
||||||
|
v >>= 3;
|
||||||
|
- intval = hw_to_current(pcc_tbl, ARRAY_SIZE(pcc_tbl), v & 7);
|
||||||
|
+ intval = hw_to_current(pcc_tbl[id],
|
||||||
|
+ ARRAY_SIZE(pcc_tbl[id]), v & 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
return intval;
|
||||||
|
@@ -1296,6 +1291,7 @@ static int smb347_probe(struct i2c_client *client,
|
||||||
|
i2c_set_clientdata(client, smb);
|
||||||
|
|
||||||
|
mutex_init(&smb->lock);
|
||||||
|
+ smb->id = id->driver_data;
|
||||||
|
smb->dev = &client->dev;
|
||||||
|
|
||||||
|
smb->regmap = devm_regmap_init_i2c(client, &smb347_regmap);
|
||||||
|
@@ -1370,7 +1366,8 @@ static int smb347_remove(struct i2c_client *client)
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct i2c_device_id smb347_id[] = {
|
||||||
|
- { "smb347", 0 },
|
||||||
|
+ { "smb347", SMB347 },
|
||||||
|
+ { "smb345", SMB345 },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(i2c, smb347_id);
|
||||||
|
@@ -1378,6 +1375,7 @@ MODULE_DEVICE_TABLE(i2c, smb347_id);
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
static struct of_device_id of_smb347_ids[] = {
|
||||||
|
{ .compatible = "summit,smb347" },
|
||||||
|
+ { .compatible = "summit,smb345" },
|
||||||
|
{},
|
||||||
|
};
|
||||||
|
#endif
|
43
packages/linux-asus-flo/05_Add_smb345_charger_node.patch
Normal file
43
packages/linux-asus-flo/05_Add_smb345_charger_node.patch
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
author Vinay Simha BN <simhavcs@gmail.com> 2016-10-17 13:45:44 -0700
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 14:09:23 -0700
|
||||||
|
commit 7c0667f5e450796a1494e05b419aad1a264ee09f (patch)
|
||||||
|
tree bdae632852a7e70bc14bcb75deffa037b31ac95b
|
||||||
|
parent 25001b47cca9a155f261d5b8c9acea6150213ca9 (diff)
|
||||||
|
download flo-7c0667f5e450796a1494e05b419aad1a264ee09f.tar.gz
|
||||||
|
arm: dts: qcom: apq8064-nexus7: Add smb345 charger node
|
||||||
|
Add smb345 charger node to nexus7 dts.
|
||||||
|
|
||||||
|
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
|
||||||
|
[jstultz: split out from larger patch from Vinay]
|
||||||
|
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts 17
|
||||||
|
|
||||||
|
1 files changed, 17 insertions, 0 deletions
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
index 3cae48f..03a4b33 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
|
||||||
|
@@ -329,6 +329,23 @@
|
||||||
|
reg = <0x55>;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ smb345@6a {
|
||||||
|
+ compatible = "summit,smb345";
|
||||||
|
+ reg = <0x6a>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ interrupt-parent = <&tlmm_pinmux>;
|
||||||
|
+ interrupts = <23 IRQ_TYPE_EDGE_BOTH>;
|
||||||
|
+
|
||||||
|
+ max-chg-curr = <1800000>;
|
||||||
|
+ usb-curr-limit = <450000>;
|
||||||
|
+
|
||||||
|
+ chip-temp-thershold = <110>;
|
||||||
|
+
|
||||||
|
+ enable-usb-charging;
|
||||||
|
+ enable-otg-charging;
|
||||||
|
+
|
||||||
|
+ enable-chg-ctrl = <0>; /* SW (i2c interface) */
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,41 @@
|
||||||
|
author John Stultz <john.stultz@linaro.org> 2015-06-22 16:37:30 -0700
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 14:09:24 -0700
|
||||||
|
commit 18a343b4eb643e0eaf203d812b32b4aff19df17b (patch)
|
||||||
|
tree 66cf0beff9832db7b6be94bb1ef597654b6fd0d1
|
||||||
|
parent 7c0667f5e450796a1494e05b419aad1a264ee09f (diff)
|
||||||
|
download flo-18a343b4eb643e0eaf203d812b32b4aff19df17b.tar.gz
|
||||||
|
HACK: Modify the elants_i2c driver to not immediately fail on Nexus7
|
||||||
|
So the upstream elants_i2c driver doesn't seem to exactly
|
||||||
|
support the N7's touch screen, but its close, so tweak the
|
||||||
|
driver to accept the intial packet and this allows the driver
|
||||||
|
to load and detect the touchscreen. Allowing data from
|
||||||
|
/dev/input/event0 to show up on touch events.
|
||||||
|
|
||||||
|
I've not yet validated if that data is at all correct or calibrated,
|
||||||
|
as that will have to wait for getting the display up and running.
|
||||||
|
|
||||||
|
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- drivers/input/touchscreen/elants_i2c.c 2
|
||||||
|
|
||||||
|
1 files changed, 1 insertions, 1 deletions
|
||||||
|
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
|
||||||
|
index 872750e..6079857 100644
|
||||||
|
--- a/drivers/input/touchscreen/elants_i2c.c
|
||||||
|
+++ b/drivers/input/touchscreen/elants_i2c.c
|
||||||
|
@@ -894,7 +894,6 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev)
|
||||||
|
switch (ts->buf[FW_HDR_TYPE]) {
|
||||||
|
case CMD_HEADER_HELLO:
|
||||||
|
case CMD_HEADER_RESP:
|
||||||
|
- case CMD_HEADER_REK:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QUEUE_HEADER_WAIT:
|
||||||
|
@@ -912,6 +911,7 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev)
|
||||||
|
elants_i2c_event(ts, &ts->buf[HEADER_SIZE]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
+ case CMD_HEADER_REK:
|
||||||
|
case QUEUE_HEADER_NORMAL:
|
||||||
|
report_count = ts->buf[FW_HDR_COUNT];
|
||||||
|
if (report_count == 0 || report_count > 3) {
|
|
@ -0,0 +1,60 @@
|
||||||
|
author John Stultz <john.stultz@linaro.org> 2016-02-24 23:02:26 -0800
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 14:09:25 -0700
|
||||||
|
commit c347b88add07696addaf87d8ab8233331b02a393 (patch)
|
||||||
|
tree 91c8279fbc692fb7d4bc9bd651948df47972a111
|
||||||
|
parent 18a343b4eb643e0eaf203d812b32b4aff19df17b (diff)
|
||||||
|
download flo-c347b88add07696addaf87d8ab8233331b02a393.tar.gz
|
||||||
|
HACK: Get touchpanel working on flo
|
||||||
|
Hack up the touchpanel to get the x/y coordinates rotated properly.
|
||||||
|
Also provide proper x_max and y_max values.
|
||||||
|
|
||||||
|
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- drivers/input/touchscreen/elants_i2c.c 12
|
||||||
|
|
||||||
|
1 files changed, 7 insertions, 5 deletions
|
||||||
|
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
|
||||||
|
index 6079857..6983302 100644
|
||||||
|
--- a/drivers/input/touchscreen/elants_i2c.c
|
||||||
|
+++ b/drivers/input/touchscreen/elants_i2c.c
|
||||||
|
@@ -801,8 +801,8 @@ static void elants_i2c_mt_event(struct elants_data *ts, u8 *buf)
|
||||||
|
u8 *pos;
|
||||||
|
|
||||||
|
pos = &buf[FW_POS_XY + i * 3];
|
||||||
|
- x = (((u16)pos[0] & 0xf0) << 4) | pos[1];
|
||||||
|
- y = (((u16)pos[0] & 0x0f) << 8) | pos[2];
|
||||||
|
+ y = 2240-((((u16)pos[0] & 0xf0) << 4) | pos[1]);
|
||||||
|
+ x = ((((u16)pos[0] & 0x0f) << 8) | pos[2]);
|
||||||
|
p = buf[FW_POS_PRESSURE + i];
|
||||||
|
w = buf[FW_POS_WIDTH + i];
|
||||||
|
|
||||||
|
@@ -1233,8 +1233,9 @@ static int elants_i2c_probe(struct i2c_client *client,
|
||||||
|
ts->input->name = "Elan Touchscreen";
|
||||||
|
ts->input->id.bustype = BUS_I2C;
|
||||||
|
|
||||||
|
- __set_bit(BTN_TOUCH, ts->input->keybit);
|
||||||
|
__set_bit(EV_ABS, ts->input->evbit);
|
||||||
|
+#if 0
|
||||||
|
+ __set_bit(BTN_TOUCH, ts->input->keybit);
|
||||||
|
__set_bit(EV_KEY, ts->input->evbit);
|
||||||
|
|
||||||
|
/* Single touch input params setup */
|
||||||
|
@@ -1243,6 +1244,7 @@ static int elants_i2c_probe(struct i2c_client *client,
|
||||||
|
input_set_abs_params(ts->input, ABS_PRESSURE, 0, 255, 0, 0);
|
||||||
|
input_abs_set_res(ts->input, ABS_X, ts->x_res);
|
||||||
|
input_abs_set_res(ts->input, ABS_Y, ts->y_res);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Multitouch input params setup */
|
||||||
|
error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM,
|
||||||
|
@@ -1253,8 +1255,8 @@ static int elants_i2c_probe(struct i2c_client *client,
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
- input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, ts->x_max, 0, 0);
|
||||||
|
- input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, ts->y_max, 0, 0);
|
||||||
|
+ input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, 1350, 0, 0);
|
||||||
|
+ input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, 2240, 0, 0);
|
||||||
|
input_set_abs_params(ts->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
|
||||||
|
input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
|
||||||
|
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
|
26
packages/linux-asus-flo/08_Add_mac_address.patch
Normal file
26
packages/linux-asus-flo/08_Add_mac_address.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
author John Stultz <john.stultz@linaro.org> 2017-01-03 22:40:13 -0800
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 14:09:26 -0700
|
||||||
|
commit 7c27abcb9687786bc4a05885c308cc0a22b909ba (patch)
|
||||||
|
tree 175188552e1f1d7874c3b08e826f2591164d4728
|
||||||
|
parent 5e3530082e5adf009a867364b76f9db013e49dc9 (diff)
|
||||||
|
download flo-7c27abcb9687786bc4a05885c308cc0a22b909ba.tar.gz
|
||||||
|
HACK: add mac address
|
||||||
|
Re-add mac address bits
|
||||||
|
|
||||||
|
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- arch/arm/boot/dts/qcom-apq8064.dtsi 1
|
||||||
|
|
||||||
|
1 files changed, 1 insertions, 0 deletions
|
||||||
|
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
|
||||||
|
index f3db185..0fae486 100644
|
||||||
|
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
|
||||||
|
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
|
||||||
|
@@ -1528,6 +1528,7 @@
|
||||||
|
|
||||||
|
qcom,smem-states = <&apps_smsm 10>, <&apps_smsm 9>;
|
||||||
|
qcom,smem-state-names = "tx-enable", "tx-rings-empty";
|
||||||
|
+ local-mac-address = [ 18 00 2d 88 9c a9 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,81 @@
|
||||||
|
author Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 2015-05-15 02:00:05 +0300
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 12:39:34 -0700
|
||||||
|
commit 6dd93436bf11ccd9fef459b8dc9f58c8635a6230 (patch)
|
||||||
|
tree 8855dd8b458c81c573d372354a3743bfde1691c0
|
||||||
|
parent da8cb6993ea1b433adec1059b65db265b2fe85f3 (diff)
|
||||||
|
download flo-6dd93436bf11ccd9fef459b8dc9f58c8635a6230.tar.gz
|
||||||
|
of: dma: Make of_dma_deconfigure() public
|
||||||
|
As part of moving DMA initializing to probe time the
|
||||||
|
of_dma_deconfigure() function will need to be called from different
|
||||||
|
source files. Make it public and move it to drivers/of/device.c where
|
||||||
|
the of_dma_configure() function is.
|
||||||
|
|
||||||
|
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- drivers/of/device.c 12
|
||||||
|
|
||||||
|
-rw-r--r-- drivers/of/platform.c 5
|
||||||
|
|
||||||
|
-rw-r--r-- include/linux/of_device.h 3
|
||||||
|
|
||||||
|
3 files changed, 15 insertions, 5 deletions
|
||||||
|
diff --git a/drivers/of/device.c b/drivers/of/device.c
|
||||||
|
index b1e6beb..0d378c0 100644
|
||||||
|
--- a/drivers/of/device.c
|
||||||
|
+++ b/drivers/of/device.c
|
||||||
|
@@ -151,6 +151,18 @@ void of_dma_configure(struct device *dev, struct device_node *np)
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(of_dma_configure);
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * of_dma_deconfigure - Clean up DMA configuration
|
||||||
|
+ * @dev: Device for which to clean up DMA configuration
|
||||||
|
+ *
|
||||||
|
+ * Clean up all configuration performed by of_dma_configure_ops() and free all
|
||||||
|
+ * resources that have been allocated.
|
||||||
|
+ */
|
||||||
|
+void of_dma_deconfigure(struct device *dev)
|
||||||
|
+{
|
||||||
|
+ arch_teardown_dma_ops(dev);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int of_device_register(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
device_initialize(&pdev->dev);
|
||||||
|
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
|
||||||
|
index 5dfcc96..5344db5 100644
|
||||||
|
--- a/drivers/of/platform.c
|
||||||
|
+++ b/drivers/of/platform.c
|
||||||
|
@@ -158,11 +158,6 @@ struct platform_device *of_device_alloc(struct device_node *np,
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(of_device_alloc);
|
||||||
|
|
||||||
|
-static void of_dma_deconfigure(struct device *dev)
|
||||||
|
-{
|
||||||
|
- arch_teardown_dma_ops(dev);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* of_platform_device_create_pdata - Alloc, initialize and register an of_device
|
||||||
|
* @np: pointer to node to create device for
|
||||||
|
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
|
||||||
|
index c12dace..af98455 100644
|
||||||
|
--- a/include/linux/of_device.h
|
||||||
|
+++ b/include/linux/of_device.h
|
||||||
|
@@ -56,6 +56,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
|
||||||
|
}
|
||||||
|
|
||||||
|
void of_dma_configure(struct device *dev, struct device_node *np);
|
||||||
|
+void of_dma_deconfigure(struct device *dev);
|
||||||
|
#else /* CONFIG_OF */
|
||||||
|
|
||||||
|
static inline int of_driver_match_device(struct device *dev,
|
||||||
|
@@ -105,6 +106,8 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
|
||||||
|
}
|
||||||
|
static inline void of_dma_configure(struct device *dev, struct device_node *np)
|
||||||
|
{}
|
||||||
|
+static inline void of_dma_deconfigure(struct device *dev)
|
||||||
|
+{}
|
||||||
|
#endif /* CONFIG_OF */
|
||||||
|
|
||||||
|
#endif /* _LINUX_OF_DEVICE_H */
|
|
@ -0,0 +1,183 @@
|
||||||
|
author Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 2015-05-15 02:00:06 +0300
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 12:39:36 -0700
|
||||||
|
commit b3c0228dd8468ab9a9da3b70b2a011ffb855091b (patch)
|
||||||
|
tree 98ebf97c7cb6a3b42602124fcef49d2c78b992d7
|
||||||
|
parent 6dd93436bf11ccd9fef459b8dc9f58c8635a6230 (diff)
|
||||||
|
download flo-b3c0228dd8468ab9a9da3b70b2a011ffb855091b.tar.gz
|
||||||
|
of: dma: Split of_configure_dma() into mask and ops configuration
|
||||||
|
The of_configure_dma() function configures both the DMA masks and ops.
|
||||||
|
Moving DMA ops configuration to probe time would thus also delay
|
||||||
|
configuration of the DMA masks, which might not be safe. To avoid issues
|
||||||
|
split the configuration in two to allow keeping masks configuration at
|
||||||
|
device add time and move ops configuration to device probe time.
|
||||||
|
|
||||||
|
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- drivers/of/device.c 47
|
||||||
|
|
||||||
|
-rw-r--r-- drivers/of/of_reserved_mem.c 3
|
||||||
|
|
||||||
|
-rw-r--r-- drivers/of/platform.c 6
|
||||||
|
|
||||||
|
-rw-r--r-- include/linux/of_device.h 11
|
||||||
|
|
||||||
|
4 files changed, 50 insertions, 17 deletions
|
||||||
|
diff --git a/drivers/of/device.c b/drivers/of/device.c
|
||||||
|
index 0d378c0..d73bfa19 100644
|
||||||
|
--- a/drivers/of/device.c
|
||||||
|
+++ b/drivers/of/device.c
|
||||||
|
@@ -71,7 +71,7 @@ int of_device_add(struct platform_device *ofdev)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
- * of_dma_configure - Setup DMA configuration
|
||||||
|
+ * of_dma_configure - Setup DMA masks and offset
|
||||||
|
* @dev: Device to apply DMA configuration
|
||||||
|
* @np: Pointer to OF node having DMA configuration
|
||||||
|
*
|
||||||
|
@@ -82,13 +82,12 @@ int of_device_add(struct platform_device *ofdev)
|
||||||
|
* can use a platform bus notifier and handle BUS_NOTIFY_ADD_DEVICE events
|
||||||
|
* to fix up DMA configuration.
|
||||||
|
*/
|
||||||
|
-void of_dma_configure(struct device *dev, struct device_node *np)
|
||||||
|
+void of_dma_configure_masks(struct device *dev, struct device_node *np)
|
||||||
|
{
|
||||||
|
- u64 dma_addr, paddr, size;
|
||||||
|
- int ret;
|
||||||
|
- bool coherent;
|
||||||
|
+ u64 dma_addr, paddr, size, range_mask;
|
||||||
|
unsigned long offset;
|
||||||
|
const struct iommu_ops *iommu;
|
||||||
|
+ int ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set default coherent_dma_mask to 32 bit. Drivers are expected to
|
||||||
|
@@ -106,9 +105,10 @@ void of_dma_configure(struct device *dev, struct device_node *np)
|
||||||
|
|
||||||
|
ret = of_dma_get_range(np, &dma_addr, &paddr, &size);
|
||||||
|
if (ret < 0) {
|
||||||
|
- dma_addr = offset = 0;
|
||||||
|
- size = dev->coherent_dma_mask + 1;
|
||||||
|
+ range_mask = dev->coherent_dma_mask + 1;
|
||||||
|
+ offset = 0;
|
||||||
|
} else {
|
||||||
|
+ range_mask = DMA_BIT_MASK(ilog2(dma_addr + size));
|
||||||
|
offset = PFN_DOWN(paddr - dma_addr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -134,10 +134,31 @@ void of_dma_configure(struct device *dev, struct device_node *np)
|
||||||
|
* Limit coherent and dma mask based on size and default mask
|
||||||
|
* set by the driver.
|
||||||
|
*/
|
||||||
|
- dev->coherent_dma_mask = min(dev->coherent_dma_mask,
|
||||||
|
- DMA_BIT_MASK(ilog2(dma_addr + size)));
|
||||||
|
- *dev->dma_mask = min((*dev->dma_mask),
|
||||||
|
- DMA_BIT_MASK(ilog2(dma_addr + size)));
|
||||||
|
+ dev->coherent_dma_mask = min(dev->coherent_dma_mask, range_mask);
|
||||||
|
+ *dev->dma_mask = min((*dev->dma_mask), range_mask);
|
||||||
|
+}
|
||||||
|
+EXPORT_SYMBOL_GPL(of_dma_configure_masks);
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * of_dma_configure_ops - Setup DMA operations
|
||||||
|
+ * @dev: Device to apply DMA configuration
|
||||||
|
+ * @np: Pointer to OF node having DMA configuration
|
||||||
|
+ *
|
||||||
|
+ * Try to get devices's DMA configuration from DT and update it
|
||||||
|
+ * accordingly.
|
||||||
|
+ */
|
||||||
|
+int of_dma_configure_ops(struct device *dev, struct device_node *np)
|
||||||
|
+{
|
||||||
|
+ u64 dma_addr, paddr, size;
|
||||||
|
+ struct iommu_ops *iommu;
|
||||||
|
+ bool coherent;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ ret = of_dma_get_range(np, &dma_addr, &paddr, &size);
|
||||||
|
+ if (ret < 0) {
|
||||||
|
+ dma_addr = 0;
|
||||||
|
+ size = dev->coherent_dma_mask + 1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
coherent = of_dma_is_coherent(np);
|
||||||
|
dev_dbg(dev, "device is%sdma coherent\n",
|
||||||
|
@@ -148,8 +169,10 @@ void of_dma_configure(struct device *dev, struct device_node *np)
|
||||||
|
iommu ? " " : " not ");
|
||||||
|
|
||||||
|
arch_setup_dma_ops(dev, dma_addr, size, iommu, coherent);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
-EXPORT_SYMBOL_GPL(of_dma_configure);
|
||||||
|
+EXPORT_SYMBOL_GPL(of_dma_configure_ops);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* of_dma_deconfigure - Clean up DMA configuration
|
||||||
|
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
|
||||||
|
index d507c35..a145480 100644
|
||||||
|
--- a/drivers/of/of_reserved_mem.c
|
||||||
|
+++ b/drivers/of/of_reserved_mem.c
|
||||||
|
@@ -357,7 +357,8 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
|
||||||
|
/* ensure that dma_ops is set for virtual devices
|
||||||
|
* using reserved memory
|
||||||
|
*/
|
||||||
|
- of_dma_configure(dev, np);
|
||||||
|
+ of_dma_configure_masks(dev, np);
|
||||||
|
+ of_dma_configure_ops(dev, np);
|
||||||
|
|
||||||
|
dev_info(dev, "assigned reserved memory node %s\n", rmem->name);
|
||||||
|
} else {
|
||||||
|
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
|
||||||
|
index 5344db5..a2d27bc 100644
|
||||||
|
--- a/drivers/of/platform.c
|
||||||
|
+++ b/drivers/of/platform.c
|
||||||
|
@@ -186,7 +186,8 @@ static struct platform_device *of_platform_device_create_pdata(
|
||||||
|
|
||||||
|
dev->dev.bus = &platform_bus_type;
|
||||||
|
dev->dev.platform_data = platform_data;
|
||||||
|
- of_dma_configure(&dev->dev, dev->dev.of_node);
|
||||||
|
+ of_dma_configure_masks(&dev->dev, dev->dev.of_node);
|
||||||
|
+ of_dma_configure_ops(&dev->dev, dev->dev.of_node);
|
||||||
|
of_msi_configure(&dev->dev, dev->dev.of_node);
|
||||||
|
|
||||||
|
if (of_device_add(dev) != 0) {
|
||||||
|
@@ -248,7 +249,8 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
|
||||||
|
dev_set_name(&dev->dev, "%s", bus_id);
|
||||||
|
else
|
||||||
|
of_device_make_bus_id(&dev->dev);
|
||||||
|
- of_dma_configure(&dev->dev, dev->dev.of_node);
|
||||||
|
+ of_dma_configure_masks(&dev->dev, dev->dev.of_node);
|
||||||
|
+ of_dma_configure_ops(&dev->dev, dev->dev.of_node);
|
||||||
|
|
||||||
|
/* Allow the HW Peripheral ID to be overridden */
|
||||||
|
prop = of_get_property(node, "arm,primecell-periphid", NULL);
|
||||||
|
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
|
||||||
|
index af98455..8c70184 100644
|
||||||
|
--- a/include/linux/of_device.h
|
||||||
|
+++ b/include/linux/of_device.h
|
||||||
|
@@ -55,7 +55,8 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
|
||||||
|
return of_node_get(cpu_dev->of_node);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void of_dma_configure(struct device *dev, struct device_node *np);
|
||||||
|
+void of_dma_configure_masks(struct device *dev, struct device_node *np);
|
||||||
|
+int of_dma_configure_ops(struct device *dev, struct device_node *np);
|
||||||
|
void of_dma_deconfigure(struct device *dev);
|
||||||
|
#else /* CONFIG_OF */
|
||||||
|
|
||||||
|
@@ -104,8 +105,14 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
-static inline void of_dma_configure(struct device *dev, struct device_node *np)
|
||||||
|
+static inline void of_dma_configure_masks(struct device *dev,
|
||||||
|
+ struct device_node *np)
|
||||||
|
{}
|
||||||
|
+static inline int of_dma_configure_ops(struct device *dev,
|
||||||
|
+ struct device_node *np)
|
||||||
|
+{
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
static inline void of_dma_deconfigure(struct device *dev)
|
||||||
|
{}
|
||||||
|
#endif /* CONFIG_OF */
|
|
@ -0,0 +1,82 @@
|
||||||
|
author Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 2015-05-15 02:00:07 +0300
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 12:39:37 -0700
|
||||||
|
commit 4d4d7186492648fe2517178b983fcd5a55e3d575 (patch)
|
||||||
|
tree fea85da4e2e33bac4712d8c0ab66a0d0624920f8
|
||||||
|
parent b3c0228dd8468ab9a9da3b70b2a011ffb855091b (diff)
|
||||||
|
download flo-4d4d7186492648fe2517178b983fcd5a55e3d575.tar.gz
|
||||||
|
drivers: platform: Configure dma operations at probe time
|
||||||
|
Configuring DMA ops at probe time will allow deferring device probe when
|
||||||
|
the IOMMU isn't available yet.
|
||||||
|
|
||||||
|
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- drivers/base/platform.c 9
|
||||||
|
|
||||||
|
-rw-r--r-- drivers/of/platform.c 7
|
||||||
|
|
||||||
|
2 files changed, 12 insertions, 4 deletions
|
||||||
|
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
|
||||||
|
index c245683..1526298 100644
|
||||||
|
--- a/drivers/base/platform.c
|
||||||
|
+++ b/drivers/base/platform.c
|
||||||
|
@@ -572,6 +572,10 @@ static int platform_drv_probe(struct device *_dev)
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
+ ret = of_dma_configure_ops(_dev, _dev->of_node);
|
||||||
|
+ if (ret < 0)
|
||||||
|
+ goto done;
|
||||||
|
+
|
||||||
|
ret = dev_pm_domain_attach(_dev, true);
|
||||||
|
if (ret != -EPROBE_DEFER) {
|
||||||
|
if (drv->probe) {
|
||||||
|
@@ -584,6 +588,10 @@ static int platform_drv_probe(struct device *_dev)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (ret)
|
||||||
|
+ of_dma_deconfigure(_dev);
|
||||||
|
+
|
||||||
|
+done:
|
||||||
|
if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) {
|
||||||
|
dev_warn(_dev, "probe deferral not supported\n");
|
||||||
|
ret = -ENXIO;
|
||||||
|
@@ -606,6 +614,7 @@ static int platform_drv_remove(struct device *_dev)
|
||||||
|
if (drv->remove)
|
||||||
|
ret = drv->remove(dev);
|
||||||
|
dev_pm_domain_detach(_dev, true);
|
||||||
|
+ of_dma_deconfigure(_dev);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
|
||||||
|
index a2d27bc..967f6ce 100644
|
||||||
|
--- a/drivers/of/platform.c
|
||||||
|
+++ b/drivers/of/platform.c
|
||||||
|
@@ -187,11 +187,9 @@ static struct platform_device *of_platform_device_create_pdata(
|
||||||
|
dev->dev.bus = &platform_bus_type;
|
||||||
|
dev->dev.platform_data = platform_data;
|
||||||
|
of_dma_configure_masks(&dev->dev, dev->dev.of_node);
|
||||||
|
- of_dma_configure_ops(&dev->dev, dev->dev.of_node);
|
||||||
|
of_msi_configure(&dev->dev, dev->dev.of_node);
|
||||||
|
|
||||||
|
if (of_device_add(dev) != 0) {
|
||||||
|
- of_dma_deconfigure(&dev->dev);
|
||||||
|
platform_device_put(dev);
|
||||||
|
goto err_clear_flag;
|
||||||
|
}
|
||||||
|
@@ -540,11 +538,12 @@ static int of_platform_device_destroy(struct device *dev, void *data)
|
||||||
|
if (dev->bus == &platform_bus_type)
|
||||||
|
platform_device_unregister(to_platform_device(dev));
|
||||||
|
#ifdef CONFIG_ARM_AMBA
|
||||||
|
- else if (dev->bus == &amba_bustype)
|
||||||
|
+ else if (dev->bus == &amba_bustype) {
|
||||||
|
amba_device_unregister(to_amba_device(dev));
|
||||||
|
+ of_dma_deconfigure(dev);
|
||||||
|
+ }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- of_dma_deconfigure(dev);
|
||||||
|
of_node_clear_flag(dev->of_node, OF_POPULATED);
|
||||||
|
of_node_clear_flag(dev->of_node, OF_POPULATED_BUS);
|
||||||
|
return 0;
|
|
@ -0,0 +1,93 @@
|
||||||
|
author Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 2015-05-15 02:00:09 +0300
|
||||||
|
committer John Stultz <john.stultz@linaro.org> 2017-05-12 12:39:38 -0700
|
||||||
|
commit c0648aa6e6063285cec2a15fecd360a3b4394af4 (patch)
|
||||||
|
tree 0f23e82630929c7307560803faa4bf9b489ddd52
|
||||||
|
parent 4d4d7186492648fe2517178b983fcd5a55e3d575 (diff)
|
||||||
|
download flo-c0648aa6e6063285cec2a15fecd360a3b4394af4.tar.gz
|
||||||
|
iommu: of: Handle IOMMU lookup failure with deferred probing or error
|
||||||
|
Failures to look up an IOMMU when parsing the DT iommus property need to
|
||||||
|
be handled separately from the .of_xlate() failures to support deferred
|
||||||
|
probing.
|
||||||
|
|
||||||
|
The lack of a registered IOMMU can be caused by the lack of a driver for
|
||||||
|
the IOMMU, the IOMMU device probe not having been performed yet, having
|
||||||
|
been deferred, or having failed.
|
||||||
|
|
||||||
|
The first case occurs when the device tree describes the bus master and
|
||||||
|
IOMMU topology correctly but no device driver exists for the IOMMU yet
|
||||||
|
or the device driver has not been compiled in. Return NULL, the caller
|
||||||
|
will configure the device without an IOMMU.
|
||||||
|
|
||||||
|
The second and third cases are handled by deferring the probe of the bus
|
||||||
|
master device which will eventually get reprobed after the IOMMU.
|
||||||
|
|
||||||
|
The last case is currently handled by deferring the probe of the bus
|
||||||
|
master device as well. A mechanism to either configure the bus master
|
||||||
|
device without an IOMMU or to fail the bus master device probe depending
|
||||||
|
on whether the IOMMU is optional or mandatory would be a good
|
||||||
|
enhancement.
|
||||||
|
|
||||||
|
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
||||||
|
Diffstat
|
||||||
|
-rw-r--r-- drivers/iommu/of_iommu.c 18
|
||||||
|
|
||||||
|
-rw-r--r-- drivers/of/device.c 2
|
||||||
|
|
||||||
|
2 files changed, 16 insertions, 4 deletions
|
||||||
|
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
|
||||||
|
index 2683e9f..b171b2c 100644
|
||||||
|
--- a/drivers/iommu/of_iommu.c
|
||||||
|
+++ b/drivers/iommu/of_iommu.c
|
||||||
|
@@ -159,10 +159,20 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
|
||||||
|
np = iommu_spec.np;
|
||||||
|
ops = iommu_ops_from_fwnode(&np->fwnode);
|
||||||
|
|
||||||
|
- if (!ops || !ops->of_xlate ||
|
||||||
|
+ if (!ops) {
|
||||||
|
+ const struct of_device_id *oid;
|
||||||
|
+
|
||||||
|
+ oid = of_match_node(&__iommu_of_table, np);
|
||||||
|
+ ops = oid ? ERR_PTR(-EPROBE_DEFER) : NULL;
|
||||||
|
+ goto err_put_node;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!ops->of_xlate ||
|
||||||
|
iommu_fwspec_init(dev, &np->fwnode, ops) ||
|
||||||
|
- ops->of_xlate(dev, &iommu_spec))
|
||||||
|
+ ops->of_xlate(dev, &iommu_spec)) {
|
||||||
|
+ ops = NULL;
|
||||||
|
goto err_put_node;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
of_node_put(np);
|
||||||
|
idx++;
|
||||||
|
@@ -172,7 +182,7 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
|
||||||
|
|
||||||
|
err_put_node:
|
||||||
|
of_node_put(np);
|
||||||
|
- return NULL;
|
||||||
|
+ return ops;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __init of_iommu_init(void)
|
||||||
|
@@ -183,7 +193,7 @@ static int __init of_iommu_init(void)
|
||||||
|
for_each_matching_node_and_match(np, matches, &match) {
|
||||||
|
const of_iommu_init_fn init_fn = match->data;
|
||||||
|
|
||||||
|
- if (init_fn(np))
|
||||||
|
+ if (init_fn && init_fn(np))
|
||||||
|
pr_err("Failed to initialise IOMMU %s\n",
|
||||||
|
of_node_full_name(np));
|
||||||
|
}
|
||||||
|
diff --git a/drivers/of/device.c b/drivers/of/device.c
|
||||||
|
index d73bfa19..22365aa 100644
|
||||||
|
--- a/drivers/of/device.c
|
||||||
|
+++ b/drivers/of/device.c
|
||||||
|
@@ -165,6 +165,8 @@ int of_dma_configure_ops(struct device *dev, struct device_node *np)
|
||||||
|
coherent ? " " : " not ");
|
||||||
|
|
||||||
|
iommu = of_iommu_configure(dev, np);
|
||||||
|
+ if (IS_ERR(iommu))
|
||||||
|
+ return PTR_ERR(iommu);
|
||||||
|
dev_dbg(dev, "device is%sbehind an iommu\n",
|
||||||
|
iommu ? " " : " not ");
|
|
@ -0,0 +1,34 @@
|
||||||
|
From 5bd38905f6dd829c32ca3c33647344816060fc34 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Davide Depau <davide@depau.eu>
|
||||||
|
Date: Sun, 3 Mar 2019 14:24:51 +0100
|
||||||
|
Subject: [PATCH] Fix renamed of_dma_configure symbol in drivers/dma/qcom
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/dma/qcom/hidma_mgmt.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c
|
||||||
|
index f847d32c..a2ff7020 100644
|
||||||
|
--- a/drivers/dma/qcom/hidma_mgmt.c
|
||||||
|
+++ b/drivers/dma/qcom/hidma_mgmt.c
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
#include <linux/property.h>
|
||||||
|
#include <linux/of_irq.h>
|
||||||
|
#include <linux/of_platform.h>
|
||||||
|
+#include <linux/of_device.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
@@ -378,7 +379,8 @@ static int __init hidma_mgmt_of_populate_channels(struct device_node *np)
|
||||||
|
}
|
||||||
|
of_node_get(child);
|
||||||
|
new_pdev->dev.of_node = child;
|
||||||
|
- of_dma_configure(&new_pdev->dev, child);
|
||||||
|
+ of_dma_configure_masks(&new_pdev->dev, child);
|
||||||
|
+ of_dma_configure_ops(&new_pdev->dev, child);
|
||||||
|
/*
|
||||||
|
* It is assumed that calling of_msi_configure is safe on
|
||||||
|
* platforms with or without MSI support.
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
|
@ -0,0 +1,137 @@
|
||||||
|
From patchwork Wed Oct 8 11:24:24 2014
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Transfer-Encoding: 7bit
|
||||||
|
X-Patchwork-Submitter: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||||
|
X-Patchwork-Id: 506636
|
||||||
|
Return-Path: <linux-kernel-owner@vger.kernel.org>
|
||||||
|
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||||
|
id S1756135AbaJHLZQ (ORCPT <rfc822;w@1wt.eu>);
|
||||||
|
Wed, 8 Oct 2014 07:25:16 -0400
|
||||||
|
Received: from mail-wi0-f172.google.com ([209.85.212.172]:63569 "EHLO
|
||||||
|
mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||||
|
with ESMTP id S1755492AbaJHLZO (ORCPT
|
||||||
|
<rfc822;linux-kernel@vger.kernel.org>);
|
||||||
|
Wed, 8 Oct 2014 07:25:14 -0400
|
||||||
|
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||||
|
To: linux-mmc@vger.kernel.org
|
||||||
|
Cc: Chris Ball <chris@printf.net>, Ulf Hansson <ulf.hansson@linaro.org>,
|
||||||
|
Russell King <linux@arm.linux.org.uk>, linux-kernel@vger.kernel.org,
|
||||||
|
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||||
|
Subject: [RFC PATCH 1/2] mmc: core: fix prepared requests while doing bkops
|
||||||
|
Date: Wed, 8 Oct 2014 12:24:24 +0100
|
||||||
|
Message-Id: <1412767464-6677-1-git-send-email-srinivas.kandagatla@linaro.org>
|
||||||
|
X-Mailer: git-send-email 1.9.1
|
||||||
|
In-Reply-To: <1412767415-6624-1-git-send-email-srinivas.kandagatla@linaro.org>
|
||||||
|
References: <1412767415-6624-1-git-send-email-srinivas.kandagatla@linaro.org>
|
||||||
|
Sender: linux-kernel-owner@vger.kernel.org
|
||||||
|
List-ID: <linux-kernel.vger.kernel.org>
|
||||||
|
X-Mailing-List: linux-kernel@vger.kernel.org
|
||||||
|
|
||||||
|
While starting the bkops the previously prepared request should be canceled
|
||||||
|
and restarted after the bkops. As the prepared resource might already
|
||||||
|
setup the dma channels and ready to be started. Now with the arrival of bkops
|
||||||
|
request this prepared request can be serviced ONLY after the bkops. So
|
||||||
|
holding on to the prepared request in the host driver is confusing at
|
||||||
|
this point in time, so it makes sense to cleanup such dangling requests and
|
||||||
|
reissue this request once bkops is done.
|
||||||
|
Canceling the prepared request would give opportunity to the host drivers
|
||||||
|
to perform cleanup on the prepared request.
|
||||||
|
|
||||||
|
Without this patch host drivers like mmci gets confused when a blocking
|
||||||
|
request like send_ext_csd(CMD8) is issued while there is already a prepared
|
||||||
|
request. With the help of this patch, the driver can better manage such
|
||||||
|
blocking requests and cleanup the prepared requests which are not started yet.
|
||||||
|
|
||||||
|
Without this patch I hit below crash on Qualcomm APQ8064 based IFC6410 board
|
||||||
|
with mmci host driver.
|
||||||
|
|
||||||
|
mmci-pl18x 12400000.sdcc: error during DMA transfer!
|
||||||
|
Unable to handle kernel paging request at virtual address 40000000
|
||||||
|
pgd = c0204000
|
||||||
|
[40000000] *pgd=00000000
|
||||||
|
Internal error: Oops: 805 [#1] SMP ARM
|
||||||
|
Modules linked in: ipv6 ath6kl_sdio ath6kl_core
|
||||||
|
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.17.0-rc7-linaro-multi-v7 #1
|
||||||
|
task: c0c9d7e0 ti: c0c92000 task.ti: c0c92000
|
||||||
|
PC is at v7_dma_inv_range+0x34/0x4c
|
||||||
|
LR is at __dma_page_dev_to_cpu+0x80/0x100
|
||||||
|
pc : [<c021efc0>] lr : [<c021af18>] psr: 400f0193
|
||||||
|
sp : c0c93e20 ip : c0c9a478 fp : c08ea538
|
||||||
|
r10: c0c9f548 r9 : 00000002 r8 : e97d9000
|
||||||
|
r7 : 00000200 r6 : c0c9d504 r5 : c0db0880 r4 : 00000000
|
||||||
|
r3 : 0000003f r2 : 00000040 r1 : 40000200 r0 : 40000000
|
||||||
|
Flags: nZcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
|
||||||
|
Control: 10c5787d Table: a9ef406a DAC: 00000015
|
||||||
|
Process swapper/0 (pid: 0, stack limit = 0xc0c92250)
|
||||||
|
Stack: (0xc0c93e20 to 0xc0c94000)
|
||||||
|
3e20: c021f058 e9a17178 e9a171bc e99dfd6c 00000001 00000001 e995de10 00000002
|
||||||
|
3e40: 00000000 c021b574 00000000 c04bc4a4 00000000 e9b49ac0 c0ce6e6c e99dfda4
|
||||||
|
3e60: 00000088 e9810780 c0d8291c c072ea58 00000000 c072d3fc 00000000 c072f534
|
||||||
|
3e80: 00000000 e9b49ac0 00000100 c0c9a444 00000088 c072f6b4 c072f5d4 e9d40080
|
||||||
|
3ea0: e98107dc 00000000 00000000 c0280a60 00000000 7d55bf61 e9810780 e98107dc
|
||||||
|
3ec0: 00000000 f0002000 c0d460e8 c0d460e8 c0c92000 c0280b60 e9810780 c0ce7190
|
||||||
|
3ee0: 00000000 c028369c c02835f4 00000088 00000088 c0280278 c0c8ec70 c020f080
|
||||||
|
3f00: f000200c c0c9a958 c0c93f28 c02088e4 c04bd630 c04bd5bc 200f0013 ffffffff
|
||||||
|
3f20: c0c93f5c c0212800 00000001 a987c000 c0c93f3c c04bd574 00000000 0000015b
|
||||||
|
3f40: ea7a0e40 00000000 c0d460e8 c0d460e8 c0c92000 c08ea538 29b12000 c0c93f70
|
||||||
|
3f60: c04bd630 c04bd5bc 200f0013 ffffffff c04bd574 c071bd24 7d50c9b4 c0719a44
|
||||||
|
3f80: 7d50c9b4 0000015b c0c9a498 c0c92028 c0c9a498 c0c9a4fc ea7a0e40 c0c8ee38
|
||||||
|
3fa0: c0d460e8 c0276198 00000000 c0d8291a 00000000 c0c9a400 00000000 c0be0bc4
|
||||||
|
3fc0: ffffffff ffffffff c0be05f8 00000000 00000000 c0c533d8 c0d82ed4 c0c9a47c
|
||||||
|
3fe0: c0c533d4 c0c9e870 8020406a 511f06f0 00000000 80208074 00000000 00000000
|
||||||
|
[<c021efc0>] (v7_dma_inv_range) from [<c021af18>] (__dma_page_dev_to_cpu+0x80/0x100)
|
||||||
|
[<c021af18>] (__dma_page_dev_to_cpu) from [<c021b574>] (arm_dma_unmap_sg+0x5c/0x84)
|
||||||
|
[<c021b574>] (arm_dma_unmap_sg) from [<c072ea58>] (mmci_dma_unmap.isra.16+0x60/0x74)
|
||||||
|
[<c072ea58>] (mmci_dma_unmap.isra.16) from [<c072f534>] (mmci_data_irq+0x1fc/0x29c)
|
||||||
|
[<c072f534>] (mmci_data_irq) from [<c072f6b4>] (mmci_irq+0xe0/0x114)
|
||||||
|
[<c072f6b4>] (mmci_irq) from [<c0280a60>] (handle_irq_event_percpu+0x78/0x134)
|
||||||
|
[<c0280a60>] (handle_irq_event_percpu) from [<c0280b60>] (handle_irq_event+0x44/0x64)
|
||||||
|
[<c0280b60>] (handle_irq_event) from [<c028369c>] (handle_fasteoi_irq+0xa8/0x1a8)
|
||||||
|
[<c028369c>] (handle_fasteoi_irq) from [<c0280278>] (generic_handle_irq+0x2c/0x3c)
|
||||||
|
[<c0280278>] (generic_handle_irq) from [<c020f080>] (handle_IRQ+0x40/0x90)
|
||||||
|
[<c020f080>] (handle_IRQ) from [<c02088e4>] (gic_handle_irq+0x38/0x68)
|
||||||
|
[<c02088e4>] (gic_handle_irq) from [<c0212800>] (__irq_svc+0x40/0x54)
|
||||||
|
Exception stack(0xc0c93f28 to 0xc0c93f70)
|
||||||
|
3f20: 00000001 a987c000 c0c93f3c c04bd574 00000000 0000015b
|
||||||
|
3f40: ea7a0e40 00000000 c0d460e8 c0d460e8 c0c92000 c08ea538 29b12000 c0c93f70
|
||||||
|
3f60: c04bd630 c04bd5bc 200f0013 ffffffff
|
||||||
|
[<c0212800>] (__irq_svc) from [<c04bd5bc>] (msm_cpu_pm_enter_sleep+0x48/0x4c)
|
||||||
|
[<c04bd5bc>] (msm_cpu_pm_enter_sleep) from [<c071bd24>] (qcom_lpm_enter_spc+0x20/0x2c)
|
||||||
|
[<c071bd24>] (qcom_lpm_enter_spc) from [<c0719a44>] (cpuidle_enter_state+0x44/0xf0)
|
||||||
|
[<c0719a44>] (cpuidle_enter_state) from [<c0276198>] (cpu_startup_entry+0x1f4/0x238)
|
||||||
|
[<c0276198>] (cpu_startup_entry) from [<c0be0bc4>] (start_kernel+0x384/0x390)
|
||||||
|
Code: 1e070f3e e1110003 e1c11003 1e071f3e (ee070f36)
|
||||||
|
---[ end trace cf6cb3f6432c9834 ]---
|
||||||
|
Kernel panic - not syncing: Fatal exception in interrup
|
||||||
|
|
||||||
|
Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
|
||||||
|
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||||
|
---
|
||||||
|
drivers/mmc/core/core.c | 12 +++++++++++-
|
||||||
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
|
||||||
|
index d03a080..4d9b142 100644
|
||||||
|
--- a/drivers/mmc/core/core.c
|
||||||
|
+++ b/drivers/mmc/core/core.c
|
||||||
|
@@ -538,8 +538,18 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
|
||||||
|
if (host->card && mmc_card_mmc(host->card) &&
|
||||||
|
((mmc_resp_type(host->areq->mrq->cmd) == MMC_RSP_R1) ||
|
||||||
|
(mmc_resp_type(host->areq->mrq->cmd) == MMC_RSP_R1B)) &&
|
||||||
|
- (host->areq->mrq->cmd->resp[0] & R1_EXCEPTION_EVENT))
|
||||||
|
+ (host->areq->mrq->cmd->resp[0] & R1_EXCEPTION_EVENT)) {
|
||||||
|
+
|
||||||
|
+ /* Cancel the prepared request */
|
||||||
|
+ if (areq)
|
||||||
|
+ mmc_post_req(host, areq->mrq, -EINVAL);
|
||||||
|
+
|
||||||
|
mmc_start_bkops(host->card, true);
|
||||||
|
+
|
||||||
|
+ /* prepare the request again */
|
||||||
|
+ if (areq)
|
||||||
|
+ mmc_pre_req(host, areq->mrq, !host->areq);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!err && areq)
|
12
packages/linux-asus-flo/60-linux.hook
Normal file
12
packages/linux-asus-flo/60-linux.hook
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[Trigger]
|
||||||
|
Type = File
|
||||||
|
Operation = Install
|
||||||
|
Operation = Upgrade
|
||||||
|
Operation = Remove
|
||||||
|
Target = usr/lib/modules/%KERNVER%/*
|
||||||
|
Target = usr/lib/modules/%EXTRAMODULES%/*
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Updating %PKGBASE% module dependencies...
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/depmod %KERNVER%
|
11
packages/linux-asus-flo/90-linux.hook
Normal file
11
packages/linux-asus-flo/90-linux.hook
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Trigger]
|
||||||
|
Type = File
|
||||||
|
Operation = Install
|
||||||
|
Operation = Upgrade
|
||||||
|
Target = boot/zImage
|
||||||
|
Target = usr/lib/initcpio/*
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Updating %PKGBASE% initcpios...
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
|
322
packages/linux-asus-flo/PKGBUILD
Normal file
322
packages/linux-asus-flo/PKGBUILD
Normal file
|
@ -0,0 +1,322 @@
|
||||||
|
# ARMv7 multi-platform
|
||||||
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
|
||||||
|
buildarch=4
|
||||||
|
|
||||||
|
_vendor=asus
|
||||||
|
_flavor=asus-flo
|
||||||
|
|
||||||
|
pkgbase=linux-${_flavor}
|
||||||
|
_srcname=linux-4.11
|
||||||
|
_kernelname=${pkgbase#linux}
|
||||||
|
_desc="ARMv7 kernel with patches for Nexus 7 2013 Wi-Fi"
|
||||||
|
pkgver=4.11.12
|
||||||
|
pkgrel=1
|
||||||
|
rcnrel=armv7-x1
|
||||||
|
arch=('armv7h')
|
||||||
|
url="http://www.kernel.org/"
|
||||||
|
license=('GPL2')
|
||||||
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc')
|
||||||
|
options=('!strip')
|
||||||
|
source=("http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
||||||
|
"http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
|
||||||
|
"http://rcn-ee.com/deb/sid-armhf/v${pkgver}-${rcnrel}/patch-${pkgver%.0}-${rcnrel}.diff.gz"
|
||||||
|
|
||||||
|
"00_Collapse_usb_support_into_one_node.patch"
|
||||||
|
"01_Add_regulator_tweaks_and_wcnss_entry_to_support_wifi.patch"
|
||||||
|
"02_Avoid_sending_high_rates_to_downstream_clocks_during_set_rate.patch"
|
||||||
|
"03_Support_devicetree_binding.patch"
|
||||||
|
"04_Summit_SMB345_charger_IC.patch"
|
||||||
|
"05_Add_smb345_charger_node.patch"
|
||||||
|
"06_Modify_the_elants_i2c_driver_to_not_immediately_fail_on_Nexus7.patch"
|
||||||
|
"07_Get_touchpanel_working_on_flo.patch"
|
||||||
|
"08_Add_mac_address.patch"
|
||||||
|
"09_Make_of_dma_deconfigure()_public.patch"
|
||||||
|
"10_Split_of_configure_dma()_into_mask_and_ops_configuration.patch"
|
||||||
|
"11_Configure_dma_operations_at_probe_time.patch"
|
||||||
|
"12_Handle_IOMMU_lookup_failure_with_deferred_probing_or_error.patch"
|
||||||
|
"13_Fix-renamed-symbol-in-drivers-qcom-hidma_mgmt.c.patch"
|
||||||
|
'config'
|
||||||
|
'linux.preset'
|
||||||
|
'linux-asus-flo.install'
|
||||||
|
'60-linux.hook'
|
||||||
|
'90-linux.hook')
|
||||||
|
|
||||||
|
|
||||||
|
sha512sums=('6610eed97ffb7207c71771198c36179b8244ace7222bebb109507720e26c5f17d918079a56d5febdd8605844d67fb2df0ebe910fa2f2f53690daf6e2a8ad09c3'
|
||||||
|
'ee9c5ac45896d84739c679834fcd15dfc46f9e939dcefd54ba049ac47168d71f0af680153615de002a2073ba79e44a9214f74af17ed16aa97d85e6df157fc6e8'
|
||||||
|
'6c24610802f25b33d949d8e2b414f4874ab7de826a8e8c65e6b1e87687e785786829944c6e705bc71659155554cdf5ec0b400028d5b7a1459592230f08ee0e9d'
|
||||||
|
'c79d93af715c59188c7fccbb0402623b599b2e9fed944bb444d0ea2279e4086fc2b9f9e30aac468331b0a25150e537cd1647dd5cb6f47b53bf0af573cf6c7c67'
|
||||||
|
'f11d7351873aecc73c612fa3d6f9411c6f777bdb502dc9ba918cd824fbb36596c476b164fb9cf7eac2fa1c9484fa21b78ec8d03c13f959933cb5c1e30ed54754'
|
||||||
|
'303b25b44280dfbaa4b85f6dbeabc7752956b69fa7b85a1d837947ef490327a1228789bf57077d90e7c669b2f79d35c927ca423d4bbffeecdf7c1369af1120fb'
|
||||||
|
'412f1d3245831b37a0fe95622fae7af607b0df364317f828f0c5bba06c616efc78aff5d58de8d0ebe7b0f55032dbc7d5a807220e56ba676b47b25176c7e3d583'
|
||||||
|
'ebd987d3cc0c5515e042c7bc8bd89d8b951d0cd4a0fb74a3dd45333698812e299d0f9477988740d00417e6e84e21a97a67a7496f3c18dc5c13f3cf36044dceb9'
|
||||||
|
'0e2baf625cab807f645110b2a10f7e6c5eceac78433cedbe644b87bcdd0a4e71768107623b8a2a7b52033af1db6414f460f79ebcb71373300d720469cc90cdab'
|
||||||
|
'b86e56c653f0426a0d2a4fb500a11bdce7739b48d053ff584bd6ee1e560fc7f7759cc8fe12c96da182e6ef126e0c687015f771d7b9c4a61c5f08a5a55b8eeb0a'
|
||||||
|
'957b3c317364c5f4973a09b18837101137fff6dfd97254fda1d9fc255e0e2277341cefd2cc9582dc275e2ec7c81fcaa3d7b544eed6c72cdfc4c04f5de80aa960'
|
||||||
|
'7dcc9de43ed0e9f433f73e78999b9533f0e1d48ede06bebe32ac621513a49f6900dd80bb7c2ca06f67421b3826e5624f20e0e2fa3c0150efe7933895f21942df'
|
||||||
|
'cc7fb2d646c1d602b507fa2d6ce77458e794e27d624ed0097cc35ce0486e71e4dd4cec96cdb8aaf5800126ec172efd30e1fd4706754eddb48a952d587284af32'
|
||||||
|
'e031b821cce7a561752aeb6837c93b97438c1bc1e81efa3bdda931ad552b515ffc89872b3df300ba8704bccd672a73af22974b49493e1f7ad5a8c652e43158af'
|
||||||
|
'38a539a97d8dd00be1ec2ab7bdb72caafe16865cba4b7a7152cf6b78ce0c9cf6206163f3edfd3a8371098a422647fbd3e83b2d89692e7d0675a51f4cad279e44'
|
||||||
|
'25e9f71f038e1ef41c31a472f49487b63604668610232bec3842460dd67955c70158982744e51cf96143f0c5d2402b99bb86aec1d5e3bd9841ca5c11087a0b1b'
|
||||||
|
'26ee047935db2a899972d3f41a8d4319202ee57aa1ab6824e75bfb1ce9c62f5dc09792728b2595be11cb138c8ad9690b2cd37d715188ef5b7b8b64c22987ec24'
|
||||||
|
'535b0824d9bf53dac6dd597669bcba99eb141da22c327089439c98af6ad8d39b6d656817c3d8fe3f5391817c54558a30e4c372025082a90edbabbb7b5ee89a53'
|
||||||
|
'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96'
|
||||||
|
'706b94db744f2b9d91b9a19197600a161401eba5708cfdb3ba13cacfe2bef6c2be700ca826f35e904995ee120c247d95e498a9f920dde32a5f1a65ec1a540268'
|
||||||
|
'7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
|
||||||
|
'a8fc668de860cf7b44269e35f879d130ccbc7db84d159ffcac6a92c02324f09c08fb57cccad18332f423bf2153c928633fa681ee96482c778dc76bffe80dd4f5')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
|
# add upstream patch
|
||||||
|
git apply --whitespace=nowarn ../patch-${pkgver}
|
||||||
|
|
||||||
|
# RCN patch
|
||||||
|
git apply ../patch-${pkgver%.0}-${rcnrel}.diff
|
||||||
|
|
||||||
|
# postMarketOS patches
|
||||||
|
patch -p1 < '../00_Collapse_usb_support_into_one_node.patch'
|
||||||
|
patch -p1 < '../01_Add_regulator_tweaks_and_wcnss_entry_to_support_wifi.patch'
|
||||||
|
patch -p1 < '../02_Avoid_sending_high_rates_to_downstream_clocks_during_set_rate.patch'
|
||||||
|
patch -p1 < '../03_Support_devicetree_binding.patch'
|
||||||
|
patch -p1 < '../04_Summit_SMB345_charger_IC.patch'
|
||||||
|
patch -p1 < '../05_Add_smb345_charger_node.patch'
|
||||||
|
patch -p1 < '../06_Modify_the_elants_i2c_driver_to_not_immediately_fail_on_Nexus7.patch'
|
||||||
|
patch -p1 < '../07_Get_touchpanel_working_on_flo.patch'
|
||||||
|
patch -p1 < '../08_Add_mac_address.patch'
|
||||||
|
patch -p1 < '../09_Make_of_dma_deconfigure()_public.patch'
|
||||||
|
patch -p1 < '../10_Split_of_configure_dma()_into_mask_and_ops_configuration.patch'
|
||||||
|
patch -p1 < '../11_Configure_dma_operations_at_probe_time.patch'
|
||||||
|
patch -p1 < '../12_Handle_IOMMU_lookup_failure_with_deferred_probing_or_error.patch'
|
||||||
|
patch -p1 < '../13_Fix-renamed-symbol-in-drivers-qcom-hidma_mgmt.c.patch'
|
||||||
|
|
||||||
|
cat "${srcdir}/config" > ./.config
|
||||||
|
|
||||||
|
# add pkgrel to extraversion
|
||||||
|
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}-${_flavor}|" Makefile
|
||||||
|
|
||||||
|
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
||||||
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
|
# get kernel version
|
||||||
|
make prepare
|
||||||
|
|
||||||
|
# load configuration
|
||||||
|
# Configure the kernel. Replace the line below with one of your choice.
|
||||||
|
make menuconfig # CLI menu for configuration
|
||||||
|
#make nconfig # new CLI menu for configuration
|
||||||
|
#make xconfig # X-based configuration
|
||||||
|
#make oldconfig # using old config from previous kernel version
|
||||||
|
# ... or manually edit .config
|
||||||
|
|
||||||
|
# Copy back our configuration (use with new kernel version)
|
||||||
|
cp ./.config ../${pkgbase}-"$(date "+%Y.%m.%d-%H.%M")".config
|
||||||
|
|
||||||
|
####################
|
||||||
|
# stop here
|
||||||
|
# this is useful to configure the kernel
|
||||||
|
#msg "Stopping build"
|
||||||
|
#return 1
|
||||||
|
####################
|
||||||
|
|
||||||
|
#yes "" | make config
|
||||||
|
|
||||||
|
# build!
|
||||||
|
make \
|
||||||
|
${MAKEFLAGS} \
|
||||||
|
CFLAGS_MODULE=-fno-pic \
|
||||||
|
zImage modules qcom-apq8064-asus-nexus7-flo.dtb
|
||||||
|
}
|
||||||
|
|
||||||
|
_package() {
|
||||||
|
pkgdesc="The Linux Kernel and modules - ${_desc}"
|
||||||
|
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
|
||||||
|
optdepends=('crda: to set the correct wireless channels of your country')
|
||||||
|
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||||
|
provides=('kernel26' "linux=${pkgver}" "${pkgbase}-uimage")
|
||||||
|
conflicts=('linux' "${pkgbase}-uimage")
|
||||||
|
replaces=('linux-mvebu' 'linux-udoo' 'linux-sun4i' 'linux-sun5i' 'linux-sun7i' 'linux-usbarmory' 'linux-wandboard' 'linux-clearfog')
|
||||||
|
install=${pkgname}.install
|
||||||
|
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
|
KARCH=arm
|
||||||
|
|
||||||
|
# get kernel version
|
||||||
|
_kernver="$(make kernelrelease)"
|
||||||
|
_basekernel=${_kernver%%-*}
|
||||||
|
_basekernel=${_basekernel%.*}
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
|
||||||
|
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
|
||||||
|
#make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
||||||
|
install -Dm644 "arch/$KARCH/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb" "${pkgdir}/boot/dtbs/qcom-apq8064-asus-nexus7-flo.dtb"
|
||||||
|
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/${pkgbase}"
|
||||||
|
cat arch/$KARCH/boot/zImage arch/$KARCH/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb > "${pkgdir}/boot/${pkgbase}+dtb"
|
||||||
|
|
||||||
|
# make room for external modules
|
||||||
|
local _extramodules="extramodules-${_basekernel}${_kernelname}"
|
||||||
|
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
|
||||||
|
|
||||||
|
# add real version for building modules and running depmod from hook
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_extramodules}"
|
||||||
|
echo "${_kernver}" > "${pkgdir}/usr/lib/modules/${_extramodules}/version"
|
||||||
|
chmod 644 "${pkgdir}/usr/lib/modules/${_extramodules}/version"
|
||||||
|
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
|
||||||
|
|
||||||
|
# remove build and source links
|
||||||
|
rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
|
||||||
|
|
||||||
|
# now we call depmod...
|
||||||
|
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
|
||||||
|
|
||||||
|
# sed expression for following substitutions
|
||||||
|
local _subst="
|
||||||
|
s|%PKGBASE%|${pkgbase}|g
|
||||||
|
s|%KERNVER%|${_kernver}|g
|
||||||
|
s|%EXTRAMODULES%|${_extramodules}|g
|
||||||
|
"
|
||||||
|
|
||||||
|
# install mkinitcpio preset file
|
||||||
|
mkdir -p "${pkgdir}/etc/mkinitcpio.d"
|
||||||
|
mkdir -p "${pkgdir}/usr/share/libalpm/hooks"
|
||||||
|
|
||||||
|
sed "${_subst}" ../linux.preset > "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||||
|
|
||||||
|
# install pacman hooks
|
||||||
|
sed "${_subst}" ../60-linux.hook > "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
|
||||||
|
sed "${_subst}" ../90-linux.hook > "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
|
||||||
|
|
||||||
|
chmod 644 "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook" \
|
||||||
|
"${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" \
|
||||||
|
"${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||||
|
|
||||||
|
# remove firmware (provided by linux-firmware) (is this bad? somebody tell me please lol)
|
||||||
|
rm -rf "$pkgdir/usr/lib/firmware"
|
||||||
|
}
|
||||||
|
|
||||||
|
_package-headers() {
|
||||||
|
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
|
||||||
|
provides=("linux-headers=${pkgver}")
|
||||||
|
conflicts=('linux-headers')
|
||||||
|
replaces=('linux-mvebu-headers' 'linux-sun4i-headers' 'linux-sun5i-headers' 'linux-sun7i-headers' 'linux-usbarmory-headers' 'linux-wandboard-headers' 'linux-clearfog-headers')
|
||||||
|
|
||||||
|
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
||||||
|
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
install -D -m644 Makefile \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
|
||||||
|
install -D -m644 kernel/Makefile \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
|
||||||
|
install -D -m644 .config \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
|
||||||
|
|
||||||
|
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
|
||||||
|
media net pcmcia scsi soc sound trace uapi video xen; do
|
||||||
|
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy arch includes for external modules
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH
|
||||||
|
cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
|
||||||
|
for i in dove exynos omap2; do
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-${i}
|
||||||
|
cp -a arch/$KARCH/mach-${i}/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-${i}/
|
||||||
|
done
|
||||||
|
for i in omap orion samsung versatile; do
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-${i}
|
||||||
|
cp -a arch/$KARCH/plat-${i}/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-${i}/
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy files necessary for later builds, like nvidia and vmware
|
||||||
|
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
|
||||||
|
# fix permissions on scripts dir
|
||||||
|
chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
|
||||||
|
|
||||||
|
# add dm headers
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
|
cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
|
|
||||||
|
# add inotify.h
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
|
||||||
|
cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
|
||||||
|
|
||||||
|
# add wireless headers
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
|
cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
|
|
||||||
|
# add dvb headers for external modules
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/11194
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||||
|
cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||||
|
|
||||||
|
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/13146
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||||
|
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||||
|
|
||||||
|
# add dvb headers
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/20402
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
|
||||||
|
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
|
||||||
|
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
|
||||||
|
cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
|
||||||
|
|
||||||
|
# add xfs and shmem for aufs building
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
|
||||||
|
|
||||||
|
# copy in Kconfig files
|
||||||
|
for i in $(find . -name "Kconfig*"); do
|
||||||
|
mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
|
||||||
|
cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
|
||||||
|
done
|
||||||
|
|
||||||
|
chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
|
||||||
|
|
||||||
|
# strip scripts directory
|
||||||
|
find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
||||||
|
case "$(file -bi "${binary}")" in
|
||||||
|
*application/x-sharedlib*) # Libraries (.so)
|
||||||
|
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
||||||
|
*application/x-archive*) # Libraries (.a)
|
||||||
|
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
|
||||||
|
*application/x-executable*) # Binaries
|
||||||
|
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# remove unneeded architectures
|
||||||
|
rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,x86,xtensa}
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||||
|
for _p in ${pkgname[@]}; do
|
||||||
|
eval "package_${_p}() {
|
||||||
|
_package${_p#${pkgbase}}
|
||||||
|
}"
|
||||||
|
done
|
307
packages/linux-asus-flo/PKGBUILD.old
Normal file
307
packages/linux-asus-flo/PKGBUILD.old
Normal file
|
@ -0,0 +1,307 @@
|
||||||
|
# ARMv7 multi-platform
|
||||||
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
|
||||||
|
buildarch=4
|
||||||
|
|
||||||
|
_vendor=asus
|
||||||
|
_flavor=asus-flo
|
||||||
|
|
||||||
|
pkgbase=linux-${_flavor}
|
||||||
|
_srcname=linux-4.11
|
||||||
|
_kernelname=${pkgbase#linux}
|
||||||
|
_desc="ARMv7 kernel with patches for Nexus 7 2013 Wi-Fi"
|
||||||
|
pkgver=4.11.12
|
||||||
|
pkgrel=1
|
||||||
|
rcnrel=armv7-x7
|
||||||
|
arch=('armv7h')
|
||||||
|
url="http://www.kernel.org/"
|
||||||
|
license=('GPL2')
|
||||||
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc')
|
||||||
|
options=('!strip' '!check' '!tracedeps')
|
||||||
|
source=("http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
||||||
|
"http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
|
||||||
|
"http://rcn-ee.com/deb/sid-armhf/v${pkgver}-${rcnrel}/patch-${pkgver%.0}-${rcnrel}.diff.gz"
|
||||||
|
|
||||||
|
"00_Collapse_usb_support_into_one_node.patch"
|
||||||
|
"01_Add_regulator_tweaks_and_wcnss_entry_to_support_wifi.patch"
|
||||||
|
"02_Avoid_sending_high_rates_to_downstream_clocks_during_set_rate.patch"
|
||||||
|
"03_Support_devicetree_binding.patch"
|
||||||
|
"04_Summit_SMB345_charger_IC.patch"
|
||||||
|
"05_Add_smb345_charger_node.patch"
|
||||||
|
"06_Modify_the_elants_i2c_driver_to_not_immediately_fail_on_Nexus7.patch"
|
||||||
|
"07_Get_touchpanel_working_on_flo.patch"
|
||||||
|
"08_Add_mac_address.patch"
|
||||||
|
"09_Make_of_dma_deconfigure()_public.patch"
|
||||||
|
"10_Split_of_configure_dma()_into_mask_and_ops_configuration.patch"
|
||||||
|
"11_Configure_dma_operations_at_probe_time.patch"
|
||||||
|
"12_Handle_IOMMU_lookup_failure_with_deferred_probing_or_error.patch"
|
||||||
|
'config'
|
||||||
|
'linux.preset'
|
||||||
|
'linux-asus-flo.install'
|
||||||
|
'60-linux.hook'
|
||||||
|
'90-linux.hook')
|
||||||
|
|
||||||
|
|
||||||
|
md5sums=('d39dd4ba2d5861c54b90d49be19eaf31'
|
||||||
|
'a54c60bf1a5f5682da13c86985c40336'
|
||||||
|
'12c064d84977ce090c4712afbfde3edd'
|
||||||
|
'a9f76b75f18f89d535bbbe357c08f70e'
|
||||||
|
'40708505c237608fbc3923a714f8ffcb'
|
||||||
|
'339f1a7d7242c8639f33f6acd370f761'
|
||||||
|
'f276f1bfdd926516db36c81096eb6914'
|
||||||
|
'32ba1be48b4305dde4a3503097f1ad10'
|
||||||
|
'37c972c5bc79514b85846d5f1b13838a'
|
||||||
|
'c5fce59d890676702244170c2736dcb1'
|
||||||
|
'2907befef7c5dc788ceb5a99fdefd23c'
|
||||||
|
'2faa70647c4965b32e9f0f597614fcbf'
|
||||||
|
'b9093b16971857906975d1924b582d8f'
|
||||||
|
'4f2379ed84258050edb858ee8d281678'
|
||||||
|
'61c5ff73c136ed07a7aadbf58db3d96a'
|
||||||
|
'584777ae88bce2c5659960151b64c7d8'
|
||||||
|
'86d4a35722b5410e3b29fc92dae15d4b'
|
||||||
|
'ce6c81ad1ad1f8b333fd6077d47abdaf'
|
||||||
|
'3e2a512f8da5db5fe9f17875405e56a3')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
|
# add upstream patch
|
||||||
|
git apply --whitespace=nowarn ../patch-${pkgver}
|
||||||
|
|
||||||
|
# RCN patch
|
||||||
|
git apply ../patch-${pkgver%.0}-${rcnrel}.diff
|
||||||
|
|
||||||
|
# postMarketOS patches
|
||||||
|
git apply '../00_Collapse_usb_support_into_one_node.patch'
|
||||||
|
git apply '../01_Add_regulator_tweaks_and_wcnss_entry_to_support_wifi.patch'
|
||||||
|
git apply '../02_Avoid_sending_high_rates_to_downstream_clocks_during_set_rate.patch'
|
||||||
|
git apply '../03_Support_devicetree_binding.patch'
|
||||||
|
git apply '../04_Summit_SMB345_charger_IC.patch'
|
||||||
|
git apply '../05_Add_smb345_charger_node.patch'
|
||||||
|
git apply '../06_Modify_the_elants_i2c_driver_to_not_immediately_fail_on_Nexus7.patch'
|
||||||
|
git apply '../07_Get_touchpanel_working_on_flo.patch'
|
||||||
|
git apply '../08_Add_mac_address.patch'
|
||||||
|
git apply '../09_Make_of_dma_deconfigure()_public.patch'
|
||||||
|
git apply '../10_Split_of_configure_dma()_into_mask_and_ops_configuration.patch'
|
||||||
|
git apply '../11_Configure_dma_operations_at_probe_time.patch'
|
||||||
|
git apply '../12_Handle_IOMMU_lookup_failure_with_deferred_probing_or_error.patch'
|
||||||
|
|
||||||
|
cat "${srcdir}/config" > ./.config
|
||||||
|
|
||||||
|
# add pkgrel to extraversion
|
||||||
|
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}-${_flavor}|" Makefile
|
||||||
|
|
||||||
|
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
||||||
|
sed -i '2iexit 0' scripts/depmod.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
|
# get kernel version
|
||||||
|
make prepare
|
||||||
|
|
||||||
|
# load configuration
|
||||||
|
# Configure the kernel. Replace the line below with one of your choice.
|
||||||
|
#make menuconfig # CLI menu for configuration
|
||||||
|
#make nconfig # new CLI menu for configuration
|
||||||
|
#make xconfig # X-based configuration
|
||||||
|
#make oldconfig # using old config from previous kernel version
|
||||||
|
# ... or manually edit .config
|
||||||
|
|
||||||
|
# Copy back our configuration (use with new kernel version)
|
||||||
|
#cp ./.config ../${pkgbase}.config
|
||||||
|
|
||||||
|
####################
|
||||||
|
# stop here
|
||||||
|
# this is useful to configure the kernel
|
||||||
|
#msg "Stopping build"
|
||||||
|
#return 1
|
||||||
|
####################
|
||||||
|
|
||||||
|
#yes "" | make config
|
||||||
|
|
||||||
|
# build!
|
||||||
|
make \
|
||||||
|
${MAKEFLAGS} \
|
||||||
|
CFLAGS_MODULE=-fno-pic \
|
||||||
|
zImage modules dtbs qcom-apq8064-asus-nexus7-flo.dtb
|
||||||
|
}
|
||||||
|
|
||||||
|
_package() {
|
||||||
|
pkgdesc="The Linux Kernel and modules - ${_desc}"
|
||||||
|
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7' 'abootimg')
|
||||||
|
optdepends=('crda: to set the correct wireless channels of your country')
|
||||||
|
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
|
||||||
|
provides=('kernel26' "linux=${pkgver}" "${pkgbase}-uimage")
|
||||||
|
conflicts=('linux' "${pkgbase}-uimage")
|
||||||
|
replaces=('linux-mvebu' 'linux-udoo' 'linux-sun4i' 'linux-sun5i' 'linux-sun7i' 'linux-usbarmory' 'linux-wandboard' 'linux-clearfog')
|
||||||
|
install=${pkgname}.install
|
||||||
|
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
|
KARCH=arm
|
||||||
|
|
||||||
|
# get kernel version
|
||||||
|
_kernver="$(make kernelrelease)"
|
||||||
|
_basekernel=${_kernver%%-*}
|
||||||
|
_basekernel=${_basekernel%.*}
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
|
||||||
|
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
|
||||||
|
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
|
||||||
|
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/${pkgbase}"
|
||||||
|
cat arch/$KARCH/boot/zImage arch/$KARCH/boot/dts/qcom-apq8064-asus-nexus7-flo.dtb > "${pkgdir}/boot/${pkgbase}-dtb"
|
||||||
|
|
||||||
|
# make room for external modules
|
||||||
|
local _extramodules="extramodules-${_basekernel}${_kernelname}"
|
||||||
|
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
|
||||||
|
|
||||||
|
# add real version for building modules and running depmod from hook
|
||||||
|
echo "${_kernver}" |
|
||||||
|
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
|
||||||
|
|
||||||
|
# remove build and source links
|
||||||
|
rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
|
||||||
|
|
||||||
|
# now we call depmod...
|
||||||
|
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
|
||||||
|
|
||||||
|
# sed expression for following substitutions
|
||||||
|
local _subst="
|
||||||
|
s|%PKGBASE%|${pkgbase}|g
|
||||||
|
s|%KERNVER%|${_kernver}|g
|
||||||
|
s|%EXTRAMODULES%|${_extramodules}|g
|
||||||
|
"
|
||||||
|
|
||||||
|
# install mkinitcpio preset file
|
||||||
|
sed "${_subst}" ../linux.preset |
|
||||||
|
install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||||
|
|
||||||
|
# install pacman hooks
|
||||||
|
sed "${_subst}" ../60-linux.hook |
|
||||||
|
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
|
||||||
|
sed "${_subst}" ../90-linux.hook |
|
||||||
|
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
|
||||||
|
}
|
||||||
|
|
||||||
|
_package-headers() {
|
||||||
|
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
|
||||||
|
provides=("linux-headers=${pkgver}")
|
||||||
|
conflicts=('linux-headers')
|
||||||
|
replaces=('linux-mvebu-headers' 'linux-sun4i-headers' 'linux-sun5i-headers' 'linux-sun7i-headers' 'linux-usbarmory-headers' 'linux-wandboard-headers' 'linux-clearfog-headers')
|
||||||
|
|
||||||
|
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
|
||||||
|
|
||||||
|
cd "${srcdir}/${_srcname}"
|
||||||
|
install -D -m644 Makefile \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
|
||||||
|
install -D -m644 kernel/Makefile \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
|
||||||
|
install -D -m644 .config \
|
||||||
|
"${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
|
||||||
|
|
||||||
|
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
|
||||||
|
media net pcmcia scsi soc sound trace uapi video xen; do
|
||||||
|
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy arch includes for external modules
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH
|
||||||
|
cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
|
||||||
|
for i in dove exynos omap2; do
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-${i}
|
||||||
|
cp -a arch/$KARCH/mach-${i}/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/mach-${i}/
|
||||||
|
done
|
||||||
|
for i in omap orion samsung versatile; do
|
||||||
|
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-${i}
|
||||||
|
cp -a arch/$KARCH/plat-${i}/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/plat-${i}/
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy files necessary for later builds, like nvidia and vmware
|
||||||
|
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
|
||||||
|
# fix permissions on scripts dir
|
||||||
|
chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
|
||||||
|
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
|
||||||
|
|
||||||
|
# add dm headers
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
|
cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
|
||||||
|
|
||||||
|
# add inotify.h
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
|
||||||
|
cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
|
||||||
|
|
||||||
|
# add wireless headers
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
|
cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
|
||||||
|
|
||||||
|
# add dvb headers for external modules
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/11194
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||||
|
cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
|
||||||
|
|
||||||
|
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/13146
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||||
|
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
|
||||||
|
|
||||||
|
# add dvb headers
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/20402
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
|
||||||
|
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
|
||||||
|
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
|
||||||
|
cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
|
||||||
|
|
||||||
|
# add xfs and shmem for aufs building
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
|
||||||
|
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
|
||||||
|
|
||||||
|
# copy in Kconfig files
|
||||||
|
for i in $(find . -name "Kconfig*"); do
|
||||||
|
mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
|
||||||
|
cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
|
||||||
|
done
|
||||||
|
|
||||||
|
chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||||
|
find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
|
||||||
|
|
||||||
|
# strip scripts directory
|
||||||
|
find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
||||||
|
case "$(file -bi "${binary}")" in
|
||||||
|
*application/x-sharedlib*) # Libraries (.so)
|
||||||
|
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
||||||
|
*application/x-archive*) # Libraries (.a)
|
||||||
|
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
|
||||||
|
*application/x-executable*) # Binaries
|
||||||
|
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# remove unneeded architectures
|
||||||
|
rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,x86,xtensa}
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||||
|
for _p in ${pkgname[@]}; do
|
||||||
|
eval "package_${_p}() {
|
||||||
|
_package${_p#${pkgbase}}
|
||||||
|
}"
|
||||||
|
done
|
5996
packages/linux-asus-flo/config
Normal file
5996
packages/linux-asus-flo/config
Normal file
File diff suppressed because it is too large
Load diff
5986
packages/linux-asus-flo/linux-asus-flo-2019.02.28-09.47.config
Normal file
5986
packages/linux-asus-flo/linux-asus-flo-2019.02.28-09.47.config
Normal file
File diff suppressed because it is too large
Load diff
5996
packages/linux-asus-flo/linux-asus-flo-2019.03.03-02.46.config
Normal file
5996
packages/linux-asus-flo/linux-asus-flo-2019.03.03-02.46.config
Normal file
File diff suppressed because it is too large
Load diff
6055
packages/linux-asus-flo/linux-asus-flo-2019.03.03-17.31.config
Normal file
6055
packages/linux-asus-flo/linux-asus-flo-2019.03.03-17.31.config
Normal file
File diff suppressed because it is too large
Load diff
3
packages/linux-asus-flo/linux-asus-flo.install
Normal file
3
packages/linux-asus-flo/linux-asus-flo.install
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
post_remove() {
|
||||||
|
rm -f boot/initramfs-linux.img
|
||||||
|
}
|
10
packages/linux-asus-flo/linux.preset
Normal file
10
packages/linux-asus-flo/linux.preset
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# mkinitcpio preset file for the '%PKGBASE%' package
|
||||||
|
|
||||||
|
ALL_config="/etc/mkinitcpio.conf"
|
||||||
|
ALL_kver="%KERNVER%"
|
||||||
|
|
||||||
|
PRESETS=('default')
|
||||||
|
|
||||||
|
#default_config="/etc/mkinitcpio.conf"
|
||||||
|
default_image="/boot/initramfs-%PKGBASE%.img"
|
||||||
|
#default_options=""
|
87
packages/linux-firmware-asus-flo/PKGBUILD
Normal file
87
packages/linux-firmware-asus-flo/PKGBUILD
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
pkgname=linux-firmware-asus-flo
|
||||||
|
pkgver=20190228
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Firmware for asus-flo"
|
||||||
|
url="https://developers.google.com/android/drivers#flomob30x"
|
||||||
|
arch=("armv7h")
|
||||||
|
license=("custom")
|
||||||
|
options=("!strip")
|
||||||
|
|
||||||
|
# AOSP sources
|
||||||
|
_version_broadcom="23c0a6c8"
|
||||||
|
_version_qcom="43963492"
|
||||||
|
_commit_los="42b685b6cd77540048e15012278ef290f94194a7"
|
||||||
|
_url_aosp="https://dl.google.com/dl/android/aosp"
|
||||||
|
_url_los="https://github.com/LineageOS/android_device_asus_flo/raw/${_commit_los}/wifi"
|
||||||
|
|
||||||
|
source=("${_url_aosp}/broadcom-flo-mob30x-${_version_broadcom}.tgz"
|
||||||
|
"${_url_aosp}/qcom-flo-mob30x-${_version_qcom}.tgz"
|
||||||
|
"WCNSS_qcom_cfg.ini::${_url_los}/WCNSS_qcom_cfg.ini"
|
||||||
|
"WCNSS_cfg.dat::${_url_los}/WCNSS_cfg.dat"
|
||||||
|
"WCNSS_qcom_wlan_nv_flo.bin::${_url_los}/WCNSS_qcom_wlan_nv_flo.bin")
|
||||||
|
|
||||||
|
sha512sums=('e18fe860185e2efe2b9b0d1ed17e7ba40c687fdf08667db1358fb8c68cc8632f36942ddccee975eecbc9f0e0a9b5b97abddb837dbd07653298609de09fe5bfce'
|
||||||
|
'0e36c52300f8e290d6f2c28f7f676fee326cbf843aa00090d50e14f6810856b78cc116c8ca73b2b3d62311faff5ab5f2ef0dcf73929c36f7f6bc9e76460e8f1c'
|
||||||
|
'df8bbc08774c1d8b479955e11e88964a172638934b98aeff3a1a76eeb2a6981f4ab9ef1c5e8abb050812ca2e99f21f661485c0c052f2103c76eccc19857f3f47'
|
||||||
|
'd9ec98e8fa795383678dc8ffd388d8a5fe2a475559c5996f551f02766bc3397e74c100548dcb06e2a65515c76cf28eac6f156aa805cf81ea3c580c859f4bd0f1'
|
||||||
|
'd734e76a83960e0d6fbc11816417459ec17a72196cde727f7aeba509601965637234101cb17fa168f1cb128f1b63499cb68fe7acdef280654f25d0847a59960a')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir"
|
||||||
|
cat extract-broadcom-flo.sh | sed -n '/__EOF__/,/__EOF__/' | grep -v __EOF__ > LICENSE.broadcom
|
||||||
|
cat extract-qcom-flo.sh | sed -n '/__EOF__/,/__EOF__/' | grep -v __EOF__ > LICENSE.qcom
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir"
|
||||||
|
tail -n +276 $srcdir/extract-broadcom-flo.sh | tar zx
|
||||||
|
tail -n +315 $srcdir/extract-qcom-flo.sh | tar zx
|
||||||
|
|
||||||
|
# Licenses
|
||||||
|
install -Dm644 LICENSE.{broadcom,qcom} "$pkgdir/usr/share/licenses/$pkgname/"
|
||||||
|
|
||||||
|
# bcm2089x
|
||||||
|
_files="bcm2079x-b5_firmware.ncd bcm2079x-b5_pre_firmware.ncd"
|
||||||
|
for _i in $_files; do
|
||||||
|
install -Dm644 "vendor/broadcom/flo/proprietary/$_i" \
|
||||||
|
"$pkgdir/usr/lib/firmware/$_i";
|
||||||
|
done
|
||||||
|
|
||||||
|
# keymaster
|
||||||
|
_files="keymaster.b00 keymaster.b01 keymaster.b02 keymaster.b03
|
||||||
|
keymaster.mdt"
|
||||||
|
for _i in $_files; do
|
||||||
|
install -Dm644 "vendor/qcom/flo/proprietary/$_i" \
|
||||||
|
"$pkgdir/usr/lib/firmware/keymaster/$_i";
|
||||||
|
done
|
||||||
|
|
||||||
|
# discretix
|
||||||
|
_files="dxhdcp2.b00 dxhdcp2.b01 dxhdcp2.b02 dxhdcp2.b03
|
||||||
|
dxhdcp2.mdt"
|
||||||
|
for _i in $_files; do
|
||||||
|
install -Dm644 "vendor/qcom/flo/proprietary/$_i" \
|
||||||
|
"$pkgdir/usr/lib/firmware/discretix/$_i";
|
||||||
|
done
|
||||||
|
|
||||||
|
# prima
|
||||||
|
install -Dm644 "$pkgname-$_commit_other-WCNSS_qcom_wlan_nv_flo.bin" \
|
||||||
|
"$pkgdir/lib/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin"
|
||||||
|
for _i in WCNSS_qcom_cfg.ini WCNSS_cfg.dat; do
|
||||||
|
install -Dm644 "$pkgname-$_commit_other-$_i" \
|
||||||
|
"$pkgdir/usr/lib/firmware/wlan/prima/$_i";
|
||||||
|
done
|
||||||
|
|
||||||
|
# qualcomm
|
||||||
|
_files="wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b05 wcnss.mdt
|
||||||
|
a300_pfp.fw a300_pm4.fw dsps.b00 dsps.b01 dsps.b02 dsps.b03
|
||||||
|
dsps.b04 dsps.b05 dsps.mdt gss.b00 gss.b02 gss.b04 gss.b06
|
||||||
|
gss.b08 gss.b10 gss.mdt gss.b01 gss.b03 gss.b05 gss.b07 gss.b09
|
||||||
|
gss.b11 q6.b00 q6.b01 q6.b03 q6.b04 q6.b05 q6.b06 q6.mdt
|
||||||
|
tzapps.b00 tzapps.b01 tzapps.b02 tzapps.b03 tzapps.mdt
|
||||||
|
vidc_1080p.fw vidc.b00 vidc.b01 vidc.b02 vidc.b03 vidcfw.elf
|
||||||
|
vidc.mdt"
|
||||||
|
for _i in $_files; do
|
||||||
|
install -Dm644 "vendor/qcom/flo/proprietary/$_i" \
|
||||||
|
"$pkgdir/usr/lib/firmware/$_i";
|
||||||
|
done
|
||||||
|
}
|
83
packages/mesa/LICENSE
Normal file
83
packages/mesa/LICENSE
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
The Mesa 3D Graphics Library
|
||||||
|
|
||||||
|
Disclaimer
|
||||||
|
|
||||||
|
Mesa is a 3-D graphics library with an API which is very similar to
|
||||||
|
that of [1]OpenGL.* To the extent that Mesa utilizes the OpenGL command
|
||||||
|
syntax or state machine, it is being used with authorization from
|
||||||
|
[2]Silicon Graphics, Inc.(SGI). However, the author does not possess an
|
||||||
|
OpenGL license from SGI, and makes no claim that Mesa is in any way a
|
||||||
|
compatible replacement for OpenGL or associated with SGI. Those who
|
||||||
|
want a licensed implementation of OpenGL should contact a licensed
|
||||||
|
vendor.
|
||||||
|
|
||||||
|
Please do not refer to the library as MesaGL (for legal reasons). It's
|
||||||
|
just Mesa or The Mesa 3-D graphics library.
|
||||||
|
|
||||||
|
* OpenGL is a trademark of [3]Silicon Graphics Incorporated.
|
||||||
|
|
||||||
|
License / Copyright Information
|
||||||
|
|
||||||
|
The Mesa distribution consists of several components. Different
|
||||||
|
copyrights and licenses apply to different components. For example, the
|
||||||
|
GLX client code uses the SGI Free Software License B, and some of the
|
||||||
|
Mesa device drivers are copyrighted by their authors. See below for a
|
||||||
|
list of Mesa's main components and the license for each.
|
||||||
|
|
||||||
|
The core Mesa library is licensed according to the terms of the MIT
|
||||||
|
license. This allows integration with the XFree86, Xorg and DRI
|
||||||
|
projects.
|
||||||
|
|
||||||
|
The default Mesa license is as follows:
|
||||||
|
|
||||||
|
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||||
|
|
||||||
|
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 "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.
|
||||||
|
|
||||||
|
Attention, Contributors
|
||||||
|
|
||||||
|
When contributing to the Mesa project you must agree to the licensing
|
||||||
|
terms of the component to which you're contributing. The following
|
||||||
|
section lists the primary components of the Mesa distribution and their
|
||||||
|
respective licenses.
|
||||||
|
|
||||||
|
Mesa Component Licenses
|
||||||
|
|
||||||
|
Component Location License
|
||||||
|
------------------------------------------------------------------
|
||||||
|
Main Mesa code src/mesa/ MIT
|
||||||
|
|
||||||
|
Device drivers src/mesa/drivers/* MIT, generally
|
||||||
|
|
||||||
|
Gallium code src/gallium/ MIT
|
||||||
|
|
||||||
|
Ext headers include/GL/glext.h Khronos
|
||||||
|
include/GL/glxext.h
|
||||||
|
|
||||||
|
GLX client code src/glx/ SGI Free Software License B
|
||||||
|
|
||||||
|
C11 thread include/c11/threads*.h Boost (permissive) emulation
|
||||||
|
|
||||||
|
In general, consult the source files for license terms.
|
||||||
|
|
||||||
|
References
|
||||||
|
|
||||||
|
1. https://www.opengl.org/
|
||||||
|
2. https://www.sgi.com/
|
||||||
|
3. https://www.sgi.com/
|
164
packages/mesa/PKGBUILD
Normal file
164
packages/mesa/PKGBUILD
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
# Maintainer: Jan de Groot <jgc@archlinux.org>
|
||||||
|
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
|
||||||
|
|
||||||
|
pkgbase=mesa
|
||||||
|
pkgname=('opencl-mesa' 'libva-mesa-driver' 'mesa-vdpau' 'mesa')
|
||||||
|
pkgdesc="An open-source implementation of the OpenGL specification"
|
||||||
|
pkgver=18.3.4
|
||||||
|
pkgrel=1
|
||||||
|
arch=('armv7h' 'x86_64')
|
||||||
|
makedepends=('python-mako' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'dri3proto' 'presentproto'
|
||||||
|
'libxshmfence' 'libxxf86vm' 'libxdamage' 'libvdpau' 'libva' 'wayland' 'wayland-protocols'
|
||||||
|
'elfutils' 'llvm' 'libomxil-bellagio' 'libclc' 'clang' 'libglvnd' 'libunwind' 'lm_sensors'
|
||||||
|
'libxrandr' 'meson')
|
||||||
|
url="https://www.mesa3d.org/"
|
||||||
|
license=('custom')
|
||||||
|
source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
|
||||||
|
get-program-name-based-on-path.patch
|
||||||
|
LICENSE)
|
||||||
|
sha512sums=('e4ead944ba053aa05425e9e199d633f576dfa424976253fc32438e8db6da5e8d381122e4c4b7fb18f94177421f208bab5567cfec8d2692d104e266483ca02a99'
|
||||||
|
'SKIP'
|
||||||
|
'3c851ec0f1d8c1d918756c5b5315901d2a9c1de22624378bb2ba49ae8d7abc0b6c015a91c455f1d40d50532939f60db81cab0d7c9f832d41162c684582783fa6'
|
||||||
|
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7')
|
||||||
|
validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov <emil.l.velikov@gmail.com>
|
||||||
|
'946D09B5E4C9845E63075FF1D961C596A7203456' # Andres Gomez <tanty@igalia.com>
|
||||||
|
'E3E8F480C52ADD73B278EE78E1ECBE07D7D70895' # Juan Antonio Suárez Romero (Igalia, S.L.) <jasuarez@igalia.com>
|
||||||
|
'A5CC9FEC93F2F837CB044912336909B6B25FADFA' # Juan A. Suarez Romero <jasuarez@igalia.com>
|
||||||
|
'71C4B75620BC75708B4BDB254C95FAAB3EB073EC') # Dylan Baker <dylan@pnwbakers.com>
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd mesa-${pkgver}
|
||||||
|
|
||||||
|
# Needed in order to target Chromium in drirc (included upstream in Mesa 19)
|
||||||
|
patch -Np1 -i ../get-program-name-based-on-path.patch
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
# -D gallium-drivers=r300,r600,virgl,svga,swrast,swr ### swr doesn't build https://bugs.freedesktop.org/show_bug.cgi?id=107865
|
||||||
|
|
||||||
|
arch-meson mesa-$pkgver build \
|
||||||
|
-D b_lto=false \
|
||||||
|
-D b_ndebug=true \
|
||||||
|
-D platforms=x11,wayland,drm,surfaceless \
|
||||||
|
-D dri-drivers=r100,r200,nouveau \
|
||||||
|
-D gallium-drivers=freedreno,r300,r600,nouveau,virgl,swrast \
|
||||||
|
-D vulkan-drivers= \
|
||||||
|
-D swr-arches=avx,avx2 \
|
||||||
|
-D dri3=true \
|
||||||
|
-D egl=true \
|
||||||
|
-D gallium-extra-hud=true \
|
||||||
|
-D gallium-nine=true \
|
||||||
|
-D gallium-omx=bellagio \
|
||||||
|
-D gallium-opencl=icd \
|
||||||
|
-D gallium-va=true \
|
||||||
|
-D gallium-vdpau=true \
|
||||||
|
-D gallium-xa=true \
|
||||||
|
-D gallium-xvmc=false \
|
||||||
|
-D gbm=true \
|
||||||
|
-D gles1=true \
|
||||||
|
-D gles2=true \
|
||||||
|
-D glvnd=true \
|
||||||
|
-D glx=dri \
|
||||||
|
-D libunwind=true \
|
||||||
|
-D llvm=true \
|
||||||
|
-D lmsensors=true \
|
||||||
|
-D osmesa=gallium \
|
||||||
|
-D shared-glapi=true \
|
||||||
|
-D texture-float=true \
|
||||||
|
-D valgrind=false
|
||||||
|
|
||||||
|
# Print config
|
||||||
|
meson configure build
|
||||||
|
|
||||||
|
ninja -C build
|
||||||
|
|
||||||
|
# fake installation to be seperated into packages
|
||||||
|
# outside of fakeroot but mesa doesn't need to chown/mod
|
||||||
|
DESTDIR="${srcdir}/fakeinstall" ninja -C build install
|
||||||
|
}
|
||||||
|
|
||||||
|
_install() {
|
||||||
|
local src f dir
|
||||||
|
for src; do
|
||||||
|
f="${src#fakeinstall/}"
|
||||||
|
dir="${pkgdir}/${f%/*}"
|
||||||
|
install -m755 -d "${dir}"
|
||||||
|
mv -v "${src}" "${dir}/"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
package_opencl-mesa() {
|
||||||
|
pkgdesc="OpenCL support for AMD/ATI Radeon mesa drivers"
|
||||||
|
depends=('expat' 'libdrm' 'libelf' 'libclc' 'clang')
|
||||||
|
optdepends=('opencl-headers: headers necessary for OpenCL development')
|
||||||
|
provides=('opencl-driver')
|
||||||
|
|
||||||
|
_install fakeinstall/etc/OpenCL
|
||||||
|
_install fakeinstall/usr/lib/lib*OpenCL*
|
||||||
|
_install fakeinstall/usr/lib/gallium-pipe
|
||||||
|
|
||||||
|
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
package_libva-mesa-driver() {
|
||||||
|
pkgdesc="VA-API implementation for gallium"
|
||||||
|
depends=('libdrm' 'libx11' 'llvm-libs' 'expat' 'libelf' 'libxshmfence')
|
||||||
|
|
||||||
|
_install fakeinstall/usr/lib/dri/*_drv_video.so
|
||||||
|
|
||||||
|
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
package_mesa-vdpau() {
|
||||||
|
pkgdesc="Mesa VDPAU drivers"
|
||||||
|
depends=('libdrm' 'libx11' 'llvm-libs' 'expat' 'libelf' 'libxshmfence')
|
||||||
|
|
||||||
|
_install fakeinstall/usr/lib/vdpau
|
||||||
|
|
||||||
|
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
package_mesa() {
|
||||||
|
depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'libelf'
|
||||||
|
'libomxil-bellagio' 'libunwind' 'llvm-libs' 'lm_sensors' 'libglvnd')
|
||||||
|
optdepends=('opengl-man-pages: for the OpenGL API man pages'
|
||||||
|
'mesa-vdpau: for accelerated video playback'
|
||||||
|
'libva-mesa-driver: for accelerated video playback')
|
||||||
|
provides=('nouveau-dri' 'freedreno-dri' 'svga-dri' 'mesa-dri' 'mesa-libgl' 'opengl-driver')
|
||||||
|
conflicts=('nouveau-dri' 'freedreno-dri' 'svga-dri' 'mesa-dri' 'mesa-libgl')
|
||||||
|
replaces=('nouveau-dri' 'freedreno-dri' 'svga-dri' 'mesa-dri' 'mesa-libgl')
|
||||||
|
|
||||||
|
_install fakeinstall/usr/share/drirc.d/00-mesa-defaults.conf
|
||||||
|
_install fakeinstall/usr/share/glvnd/egl_vendor.d/50_mesa.json
|
||||||
|
|
||||||
|
# ati-dri, nouveau-dri, intel-dri, svga-dri, swrast
|
||||||
|
_install fakeinstall/usr/lib/dri/*_dri.so
|
||||||
|
|
||||||
|
_install fakeinstall/usr/lib/bellagio
|
||||||
|
_install fakeinstall/usr/lib/d3d
|
||||||
|
_install fakeinstall/usr/lib/lib{gbm,glapi}.so*
|
||||||
|
_install fakeinstall/usr/lib/libOSMesa.so*
|
||||||
|
_install fakeinstall/usr/lib/libxatracker.so*
|
||||||
|
# _install fakeinstall/usr/lib/libswrAVX*.so*
|
||||||
|
|
||||||
|
# in libglvnd
|
||||||
|
rm -v fakeinstall/usr/lib/libGLESv{1_CM,2}.so*
|
||||||
|
|
||||||
|
# in vulkan-headers
|
||||||
|
rm -rv fakeinstall/usr/include/vulkan
|
||||||
|
|
||||||
|
_install fakeinstall/usr/include
|
||||||
|
_install fakeinstall/usr/lib/pkgconfig
|
||||||
|
|
||||||
|
# libglvnd support
|
||||||
|
_install fakeinstall/usr/lib/libGLX_mesa.so*
|
||||||
|
_install fakeinstall/usr/lib/libEGL_mesa.so*
|
||||||
|
|
||||||
|
# indirect rendering
|
||||||
|
ln -s /usr/lib/libGLX_mesa.so.0 "${pkgdir}/usr/lib/libGLX_indirect.so.0"
|
||||||
|
|
||||||
|
# make sure there are no files left to install
|
||||||
|
find fakeinstall -depth -print0 | xargs -0 rmdir
|
||||||
|
|
||||||
|
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
|
||||||
|
}
|
58
packages/mesa/get-program-name-based-on-path.patch
Normal file
58
packages/mesa/get-program-name-based-on-path.patch
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
From 759b94038987bb983398cd4b1d2cb1c8f79817a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
|
||||||
|
Date: Tue, 23 Oct 2018 11:38:48 -0400
|
||||||
|
Subject: [PATCH] util: Get program name based on path when possible
|
||||||
|
|
||||||
|
Some programs start with the path and command line arguments in
|
||||||
|
argv[0] (program_invocation_name). Chromium is an example of
|
||||||
|
an application using mesa that does this.
|
||||||
|
|
||||||
|
This tries to query the real path for the symbolic link /proc/self/exe
|
||||||
|
to find the program name instead. It only uses the realpath if it
|
||||||
|
was a prefix of the invocation to avoid breaking wine programs.
|
||||||
|
|
||||||
|
Cc: Timothy Arceri <tarceri@itsqueeze.com>
|
||||||
|
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
|
||||||
|
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
|
||||||
|
---
|
||||||
|
src/util/u_process.c | 23 ++++++++++++++++++++++-
|
||||||
|
1 file changed, 22 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/util/u_process.c b/src/util/u_process.c
|
||||||
|
index 5e5927678d8..a1667e78074 100644
|
||||||
|
--- a/src/util/u_process.c
|
||||||
|
+++ b/src/util/u_process.c
|
||||||
|
@@ -41,8 +41,29 @@ static const char *
|
||||||
|
__getProgramName()
|
||||||
|
{
|
||||||
|
char * arg = strrchr(program_invocation_name, '/');
|
||||||
|
- if (arg)
|
||||||
|
+ if (arg) {
|
||||||
|
+ /* If the / character was found this is likely a linux path or
|
||||||
|
+ * an invocation path for a 64-bit wine program.
|
||||||
|
+ *
|
||||||
|
+ * However, some programs pass command line arguments into argv[0].
|
||||||
|
+ * Strip these arguments out by using the realpath only if it was
|
||||||
|
+ * a prefix of the invocation name.
|
||||||
|
+ */
|
||||||
|
+ static char *path;
|
||||||
|
+
|
||||||
|
+ if (!path)
|
||||||
|
+ path = realpath("/proc/self/exe", NULL);
|
||||||
|
+
|
||||||
|
+ if (path && strncmp(path, program_invocation_name, strlen(path)) == 0) {
|
||||||
|
+ /* This shouldn't be null because path is a a prefix,
|
||||||
|
+ * but check it anyway since path is static. */
|
||||||
|
+ char * name = strrchr(path, '/');
|
||||||
|
+ if (name)
|
||||||
|
+ return name + 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return arg+1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* If there was no '/' at all we likely have a windows like path from
|
||||||
|
* a wine application.
|
||||||
|
--
|
||||||
|
2.18.1
|
||||||
|
|
Loading…
Reference in a new issue