All patches of LSDK 19.03 were ported to Openwrt kernel. We still used an all-in-one patch for each IP/feature for OpenWrt. Below are the changes this patch introduced. - Updated original IP/feature patches to LSDK 19.03. - Added new IP/feature patches for eTSEC/PTP/TMU. - Squashed scattered patches into IP/feature patches. - Updated config-4.14 correspondingly. - Refreshed all patches. More info about LSDK and the kernel: - https://lsdk.github.io/components.html - https://source.codeaurora.org/external/qoriq/qoriq-components/linux Signed-off-by: Biwen Li <biwen.li@nxp.com> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>master
parent
639d127b83
commit
5159d71983
File diff suppressed because it is too large
Load Diff
@ -1,96 +0,0 @@ |
||||
From 263092cd68368ac6f030b847a1d5b0069bc2cef3 Mon Sep 17 00:00:00 2001
|
||||
From: Mathew McBride <matt@traverse.com.au>
|
||||
Date: Tue, 17 Apr 2018 10:01:03 +1000
|
||||
Subject: [PATCH 05/40] add DTS for Traverse LS1043 Boards
|
||||
|
||||
Signed-off-by: Mathew McBride <matt@traverse.com.au>
|
||||
---
|
||||
arch/arm64/boot/dts/freescale/Makefile | 5 +++-
|
||||
.../boot/dts/freescale/traverse-ls1043s.dts | 29 +++++++++++++++++++
|
||||
.../boot/dts/freescale/traverse-ls1043v.dts | 29 +++++++++++++++++++
|
||||
3 files changed, 62 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/freescale/Makefile
|
||||
+++ b/arch/arm64/boot/dts/freescale/Makefile
|
||||
@@ -22,7 +22,10 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2
|
||||
dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2080a-simu.dtb
|
||||
dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2088a-qds.dtb
|
||||
dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2088a-rdb.dtb
|
||||
-
|
||||
+
|
||||
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += traverse-ls1043v.dtb
|
||||
+dtb-$(CONFIG_ARCH_LAYERSCAPE) += traverse-ls1043s.dtb
|
||||
+
|
||||
always := $(dtb-y)
|
||||
subdir-y := $(dts-dirs)
|
||||
clean-files := *.dtb
|
||||
--- a/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts
|
||||
+++ b/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts
|
||||
@@ -330,3 +330,32 @@
|
||||
&sata {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+/* Additions for Layerscape SDK (4.4/4.9) Kernel only
|
||||
+ * These kernels need additional setup for FMan/QMan DMA shared memory
|
||||
+ */
|
||||
+
|
||||
+#include "qoriq-qman-portals-sdk.dtsi"
|
||||
+#include "qoriq-bman-portals-sdk.dtsi"
|
||||
+
|
||||
+&bman_fbpr {
|
||||
+ compatible = "fsl,bman-fbpr";
|
||||
+ alloc-ranges = <0 0 0x10000 0>;
|
||||
+};
|
||||
+&qman_fqd {
|
||||
+ compatible = "fsl,qman-fqd";
|
||||
+ alloc-ranges = <0 0 0x10000 0>;
|
||||
+};
|
||||
+&qman_pfdr {
|
||||
+ compatible = "fsl,qman-pfdr";
|
||||
+ alloc-ranges = <0 0 0x10000 0>;
|
||||
+};
|
||||
+
|
||||
+&soc {
|
||||
+#include "qoriq-dpaa-eth.dtsi"
|
||||
+#include "qoriq-fman3-0-6oh.dtsi"
|
||||
+};
|
||||
+
|
||||
+&fman0 {
|
||||
+ compatible = "fsl,fman", "simple-bus";
|
||||
+};
|
||||
--- a/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts
|
||||
+++ b/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts
|
||||
@@ -251,3 +251,32 @@
|
||||
&sata {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+/* Additions for Layerscape SDK (4.4/4.9) Kernel only
|
||||
+ * These kernels need additional setup for FMan/QMan DMA shared memory
|
||||
+ */
|
||||
+
|
||||
+#include "qoriq-qman-portals-sdk.dtsi"
|
||||
+#include "qoriq-bman-portals-sdk.dtsi"
|
||||
+
|
||||
+&bman_fbpr {
|
||||
+ compatible = "fsl,bman-fbpr";
|
||||
+ alloc-ranges = <0 0 0x10000 0>;
|
||||
+};
|
||||
+&qman_fqd {
|
||||
+ compatible = "fsl,qman-fqd";
|
||||
+ alloc-ranges = <0 0 0x10000 0>;
|
||||
+};
|
||||
+&qman_pfdr {
|
||||
+ compatible = "fsl,qman-pfdr";
|
||||
+ alloc-ranges = <0 0 0x10000 0>;
|
||||
+};
|
||||
+
|
||||
+&soc {
|
||||
+#include "qoriq-dpaa-eth.dtsi"
|
||||
+#include "qoriq-fman3-0-6oh.dtsi"
|
||||
+};
|
||||
+
|
||||
+&fman0 {
|
||||
+ compatible = "fsl,fman", "simple-bus";
|
||||
+};
|
@ -1,289 +0,0 @@ |
||||
From bb1a53f1bcb3f4c5983955a1d419c0e4e2531043 Mon Sep 17 00:00:00 2001
|
||||
From: Biwen Li <biwen.li@nxp.com>
|
||||
Date: Fri, 26 Oct 2018 16:00:37 +0800
|
||||
Subject: [PATCH 06/40] arm: dts: ls1021a: Add LS1021A-IOT board support
|
||||
|
||||
Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/ls1021a-iot.dts | 262 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 264 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/ls1021a-iot.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -496,7 +496,8 @@ dtb-$(CONFIG_SOC_IMX7D) += \
|
||||
imx7s-warp.dtb
|
||||
dtb-$(CONFIG_SOC_LS1021A) += \
|
||||
ls1021a-qds.dtb \
|
||||
- ls1021a-twr.dtb
|
||||
+ ls1021a-twr.dtb \
|
||||
+ ls1021a-iot.dtb
|
||||
dtb-$(CONFIG_SOC_VF610) += \
|
||||
vf500-colibri-eval-v3.dtb \
|
||||
vf610-colibri-eval-v3.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/ls1021a-iot.dts
|
||||
@@ -0,0 +1,262 @@
|
||||
+/*
|
||||
+ * Copyright 2013-2016 Freescale Semiconductor, Inc.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "ls1021a.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "LS1021A IOT Board";
|
||||
+
|
||||
+ sys_mclk: clock-mclk {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <24576000>;
|
||||
+ };
|
||||
+
|
||||
+ regulators {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ reg_3p3v: regulator@0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ reg = <0>;
|
||||
+ regulator-name = "3P3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_2p5v: regulator@1 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ reg = <1>;
|
||||
+ regulator-name = "2P5V";
|
||||
+ regulator-min-microvolt = <2500000>;
|
||||
+ regulator-max-microvolt = <2500000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,widgets =
|
||||
+ "Microphone", "Microphone Jack",
|
||||
+ "Headphone", "Headphone Jack",
|
||||
+ "Speaker", "Speaker Ext",
|
||||
+ "Line", "Line In Jack";
|
||||
+ simple-audio-card,routing =
|
||||
+ "MIC_IN", "Microphone Jack",
|
||||
+ "Microphone Jack", "Mic Bias",
|
||||
+ "LINE_IN", "Line In Jack",
|
||||
+ "Headphone Jack", "HP_OUT",
|
||||
+ "Speaker Ext", "LINE_OUT";
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&sai2>;
|
||||
+ frame-master;
|
||||
+ bitclock-master;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&codec>;
|
||||
+ frame-master;
|
||||
+ bitclock-master;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ firmware {
|
||||
+ optee {
|
||||
+ compatible = "linaro,optee-tz";
|
||||
+ method = "smc";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&enet0 {
|
||||
+ tbi-handle = <&tbi1>;
|
||||
+ phy-handle = <&phy1>;
|
||||
+ phy-connection-type = "sgmii";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&enet1 {
|
||||
+ tbi-handle = <&tbi1>;
|
||||
+ phy-handle = <&phy3>;
|
||||
+ phy-connection-type = "sgmii";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&enet2 {
|
||||
+ fixed-link = <0 1 1000 0 0>;
|
||||
+ phy-connection-type = "rgmii-id";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&can0{
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&can1{
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&can2{
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&can3{
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&esdhc{
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ max1239@35 {
|
||||
+ compatible = "maxim,max1239";
|
||||
+ reg = <0x35>;
|
||||
+ #io-channel-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
+ codec: sgtl5000@2a {
|
||||
+ #sound-dai-cells=<0x0>;
|
||||
+ compatible = "fsl,sgtl5000";
|
||||
+ reg = <0x2a>;
|
||||
+ VDDA-supply = <®_3p3v>;
|
||||
+ VDDIO-supply = <®_2p5v>;
|
||||
+ clocks = <&sys_mclk 1>;
|
||||
+ };
|
||||
+
|
||||
+ pca9555: pca9555@23 {
|
||||
+ compatible = "nxp,pca9555";
|
||||
+ /*pinctrl-names = "default";*/
|
||||
+ /*interrupt-parent = <&gpio2>;
|
||||
+ interrupts = <19 0x2>;*/
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ reg = <0x23>;
|
||||
+ };
|
||||
+
|
||||
+ ina220@44 {
|
||||
+ compatible = "ti,ina220";
|
||||
+ reg = <0x44>;
|
||||
+ shunt-resistor = <1000>;
|
||||
+ };
|
||||
+
|
||||
+ ina220@45 {
|
||||
+ compatible = "ti,ina220";
|
||||
+ reg = <0x45>;
|
||||
+ shunt-resistor = <1000>;
|
||||
+ };
|
||||
+
|
||||
+ lm75b@48 {
|
||||
+ compatible = "nxp,lm75a";
|
||||
+ reg = <0x48>;
|
||||
+ };
|
||||
+
|
||||
+ adt7461a@4c {
|
||||
+ compatible = "adt7461a";
|
||||
+ reg = <0x4c>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi: sii9022a@39 {
|
||||
+ compatible = "fsl,sii902x";
|
||||
+ reg = <0x39>;
|
||||
+ interrupts = <GIC_SPI 163 IRQ_TYPE_EDGE_RISING>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&ifc {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&lpuart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio0 {
|
||||
+ phy0: ethernet-phy@0 {
|
||||
+ reg = <0x0>;
|
||||
+ };
|
||||
+ phy1: ethernet-phy@1 {
|
||||
+ reg = <0x1>;
|
||||
+ };
|
||||
+ phy2: ethernet-phy@2 {
|
||||
+ reg = <0x2>;
|
||||
+ };
|
||||
+ phy3: ethernet-phy@3 {
|
||||
+ reg = <0x3>;
|
||||
+ };
|
||||
+ tbi1: tbi-phy@1f {
|
||||
+ reg = <0x1f>;
|
||||
+ device_type = "tbi-phy";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&qspi {
|
||||
+ num-cs = <2>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ qflash0: s25fl128s@0 {
|
||||
+ compatible = "spansion,s25fl129p1";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ spi-max-frequency = <20000000>;
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sai2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dcu {
|
||||
+ display = <&display>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ display: display@0 {
|
||||
+ bits-per-pixel = <24>;
|
||||
+
|
||||
+ display-timings {
|
||||
+ native-mode = <&timing0>;
|
||||
+
|
||||
+ timing0: mode0 {
|
||||
+ clock-frequency = <25000000>;
|
||||
+ hactive = <640>;
|
||||
+ vactive = <480>;
|
||||
+ hback-porch = <80>;
|
||||
+ hfront-porch = <80>;
|
||||
+ vback-porch = <16>;
|
||||
+ vfront-porch = <16>;
|
||||
+ hsync-len = <12>;
|
||||
+ vsync-len = <2>;
|
||||
+ hsync-active = <1>;
|
||||
+ vsync-active = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,77 @@ |
||||
From f0f6e88696957d376d8875f675c1caf75a33fd67 Mon Sep 17 00:00:00 2001
|
||||
From: Biwen Li <biwen.li@nxp.com>
|
||||
Date: Wed, 17 Apr 2019 18:58:34 +0800
|
||||
Subject: [PATCH] etsec: support layerscape
|
||||
|
||||
This is an integrated patch of etsec for layerscape
|
||||
|
||||
Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
drivers/net/ethernet/freescale/gianfar.h | 3 ---
|
||||
.../net/ethernet/freescale/gianfar_ethtool.c | 23 +++++++++++++++----
|
||||
2 files changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/freescale/gianfar.h
|
||||
+++ b/drivers/net/ethernet/freescale/gianfar.h
|
||||
@@ -1372,7 +1372,4 @@ struct filer_table {
|
||||
struct gfar_filer_entry fe[MAX_FILER_CACHE_IDX + 20];
|
||||
};
|
||||
|
||||
-/* The gianfar_ptp module will set this variable */
|
||||
-extern int gfar_phc_index;
|
||||
-
|
||||
#endif /* __GIANFAR_H */
|
||||
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
|
||||
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
|
||||
@@ -41,6 +41,8 @@
|
||||
#include <linux/phy.h>
|
||||
#include <linux/sort.h>
|
||||
#include <linux/if_vlan.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/fsl/ptp_qoriq.h>
|
||||
|
||||
#include "gianfar.h"
|
||||
|
||||
@@ -1509,24 +1511,35 @@ static int gfar_get_nfc(struct net_devic
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int gfar_phc_index = -1;
|
||||
-EXPORT_SYMBOL(gfar_phc_index);
|
||||
-
|
||||
static int gfar_get_ts_info(struct net_device *dev,
|
||||
struct ethtool_ts_info *info)
|
||||
{
|
||||
struct gfar_private *priv = netdev_priv(dev);
|
||||
+ struct platform_device *ptp_dev;
|
||||
+ struct device_node *ptp_node;
|
||||
+ struct qoriq_ptp *ptp = NULL;
|
||||
+
|
||||
+ info->phc_index = -1;
|
||||
|
||||
if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)) {
|
||||
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_SOFTWARE;
|
||||
- info->phc_index = -1;
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+ ptp_node = of_find_compatible_node(NULL, NULL, "fsl,etsec-ptp");
|
||||
+ if (ptp_node) {
|
||||
+ ptp_dev = of_find_device_by_node(ptp_node);
|
||||
+ if (ptp_dev)
|
||||
+ ptp = platform_get_drvdata(ptp_dev);
|
||||
+ }
|
||||
+
|
||||
+ if (ptp)
|
||||
+ info->phc_index = ptp->phc_index;
|
||||
+
|
||||
info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE;
|
||||
- info->phc_index = gfar_phc_index;
|
||||
info->tx_types = (1 << HWTSTAMP_TX_OFF) |
|
||||
(1 << HWTSTAMP_TX_ON);
|
||||
info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
|
@ -1,62 +0,0 @@ |
||||
From b3544990f8496edda965e1ff9a14727360660676 Mon Sep 17 00:00:00 2001
|
||||
From: Mathew McBride <matt@traverse.com.au>
|
||||
Date: Mon, 7 Aug 2017 10:19:48 +1000
|
||||
Subject: [PATCH] Recognize when an RGMII Link is set as fixed (in the device
|
||||
tree) and set up the MAC accordingly
|
||||
|
||||
---
|
||||
drivers/net/ethernet/freescale/sdk_dpaa/mac.c | 1 +
|
||||
.../freescale/sdk_fman/Peripherals/FM/MAC/memac.c | 13 +++++++++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
|
||||
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
|
||||
@@ -386,6 +386,7 @@ static int __cold mac_probe(struct platf
|
||||
mac_dev->fixed_link->duplex = phy->duplex;
|
||||
mac_dev->fixed_link->pause = phy->pause;
|
||||
mac_dev->fixed_link->asym_pause = phy->asym_pause;
|
||||
+ printk(KERN_INFO "Setting up fixed link, speed %d duplex %d\n", mac_dev->fixed_link->speed, mac_dev->fixed_link->duplex);
|
||||
}
|
||||
|
||||
_errno = mac_dev->init(mac_dev);
|
||||
--- a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c
|
||||
+++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
@Description FM mEMAC driver
|
||||
*//***************************************************************************/
|
||||
+#include <../../../../sdk_dpaa/mac.h>
|
||||
+#include <linux/phy_fixed.h>
|
||||
|
||||
#include "std_ext.h"
|
||||
#include "string_ext.h"
|
||||
@@ -48,6 +50,8 @@
|
||||
#include "memac.h"
|
||||
|
||||
|
||||
+static t_Error MemacAdjustLink(t_Handle h_Memac, e_EnetSpeed speed, bool fullDuplex);
|
||||
+
|
||||
/*****************************************************************************/
|
||||
/* Internal routines */
|
||||
/*****************************************************************************/
|
||||
@@ -276,11 +280,20 @@ static t_Error MemacEnable(t_Handle h_Me
|
||||
{
|
||||
t_Memac *p_Memac = (t_Memac *)h_Memac;
|
||||
|
||||
+ struct mac_device *mac_dev = (struct mac_device *)p_Memac->h_App;
|
||||
+
|
||||
SANITY_CHECK_RETURN_ERROR(p_Memac, E_INVALID_HANDLE);
|
||||
SANITY_CHECK_RETURN_ERROR(!p_Memac->p_MemacDriverParam, E_INVALID_STATE);
|
||||
|
||||
fman_memac_enable(p_Memac->p_MemMap, (mode & e_COMM_MODE_RX), (mode & e_COMM_MODE_TX));
|
||||
|
||||
+ if (ENET_INTERFACE_FROM_MODE(p_Memac->enetMode) == e_ENET_IF_RGMII) {
|
||||
+ if (mac_dev->fixed_link) {
|
||||
+ printk(KERN_INFO "This is a fixed-link, forcing speed %d duplex %d\n",mac_dev->fixed_link->speed,mac_dev->fixed_link->duplex);
|
||||
+ MemacAdjustLink(h_Memac,mac_dev->fixed_link->speed,mac_dev->fixed_link->duplex);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return E_OK;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,23 +0,0 @@ |
||||
From bb7412794db9b48dc4cc041c75d380e512dfff2a Mon Sep 17 00:00:00 2001
|
||||
From: Mathew McBride <matt@traverse.com.au>
|
||||
Date: Tue, 20 Nov 2018 14:36:54 +0800
|
||||
Subject: [PATCH] mmc: sdhci-of-esdhc: add voltage switch support for ls1043a
|
||||
|
||||
Added voltage switch support for ls1043a.
|
||||
|
||||
Signed-off-by: Mathew McBride <matt@traverse.com.au>
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
drivers/mmc/host/sdhci-of-esdhc.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/mmc/host/sdhci-of-esdhc.c
|
||||
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
|
||||
@@ -661,6 +661,7 @@ static void esdhc_reset(struct sdhci_hos
|
||||
static const struct of_device_id scfg_device_ids[] = {
|
||||
{ .compatible = "fsl,t1040-scfg", },
|
||||
{ .compatible = "fsl,ls1012a-scfg", },
|
||||
+ { .compatible = "fsl,ls1043a-scfg", },
|
||||
{ .compatible = "fsl,ls1046a-scfg", },
|
||||
{}
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,188 @@ |
||||
From 2ddaec76dbe9b6e911e2a1442248ab103909cce3 Mon Sep 17 00:00:00 2001
|
||||
From: Biwen Li <biwen.li@nxp.com>
|
||||
Date: Wed, 17 Apr 2019 18:59:06 +0800
|
||||
Subject: [PATCH] tmu: support layerscape
|
||||
|
||||
This is an integrated patch of tmu for layerscape
|
||||
|
||||
Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
||||
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
|
||||
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
|
||||
---
|
||||
drivers/thermal/qoriq_thermal.c | 102 ++++++++++++++------------------
|
||||
1 file changed, 46 insertions(+), 56 deletions(-)
|
||||
|
||||
--- a/drivers/thermal/qoriq_thermal.c
|
||||
+++ b/drivers/thermal/qoriq_thermal.c
|
||||
@@ -69,14 +69,21 @@ struct qoriq_tmu_regs {
|
||||
u32 ttr3cr; /* Temperature Range 3 Control Register */
|
||||
};
|
||||
|
||||
+struct qoriq_tmu_data;
|
||||
+
|
||||
/*
|
||||
* Thermal zone data
|
||||
*/
|
||||
+struct qoriq_sensor {
|
||||
+ struct thermal_zone_device *tzd;
|
||||
+ struct qoriq_tmu_data *qdata;
|
||||
+ int id;
|
||||
+};
|
||||
+
|
||||
struct qoriq_tmu_data {
|
||||
- struct thermal_zone_device *tz;
|
||||
struct qoriq_tmu_regs __iomem *regs;
|
||||
- int sensor_id;
|
||||
bool little_endian;
|
||||
+ struct qoriq_sensor *sensor[SITES_MAX];
|
||||
};
|
||||
|
||||
static void tmu_write(struct qoriq_tmu_data *p, u32 val, void __iomem *addr)
|
||||
@@ -97,48 +104,51 @@ static u32 tmu_read(struct qoriq_tmu_dat
|
||||
|
||||
static int tmu_get_temp(void *p, int *temp)
|
||||
{
|
||||
+ struct qoriq_sensor *qsensor = p;
|
||||
+ struct qoriq_tmu_data *qdata = qsensor->qdata;
|
||||
u32 val;
|
||||
- struct qoriq_tmu_data *data = p;
|
||||
|
||||
- val = tmu_read(data, &data->regs->site[data->sensor_id].tritsr);
|
||||
+ val = tmu_read(qdata, &qdata->regs->site[qsensor->id].tritsr);
|
||||
*temp = (val & 0xff) * 1000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int qoriq_tmu_get_sensor_id(void)
|
||||
+static const struct thermal_zone_of_device_ops tmu_tz_ops = {
|
||||
+ .get_temp = tmu_get_temp,
|
||||
+};
|
||||
+
|
||||
+static int qoriq_tmu_register_tmu_zone(struct platform_device *pdev)
|
||||
{
|
||||
- int ret, id;
|
||||
- struct of_phandle_args sensor_specs;
|
||||
- struct device_node *np, *sensor_np;
|
||||
+ struct qoriq_tmu_data *qdata = platform_get_drvdata(pdev);
|
||||
+ int id, sites = 0;
|
||||
|
||||
- np = of_find_node_by_name(NULL, "thermal-zones");
|
||||
- if (!np)
|
||||
- return -ENODEV;
|
||||
+ for (id = 0; id < SITES_MAX; id++) {
|
||||
+ qdata->sensor[id] = devm_kzalloc(&pdev->dev,
|
||||
+ sizeof(struct qoriq_sensor), GFP_KERNEL);
|
||||
+ if (!qdata->sensor[id])
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ qdata->sensor[id]->id = id;
|
||||
+ qdata->sensor[id]->qdata = qdata;
|
||||
+
|
||||
+ qdata->sensor[id]->tzd = devm_thermal_zone_of_sensor_register(
|
||||
+ &pdev->dev, id, qdata->sensor[id], &tmu_tz_ops);
|
||||
+ if (IS_ERR(qdata->sensor[id]->tzd)) {
|
||||
+ if (PTR_ERR(qdata->sensor[id]->tzd) == -ENODEV)
|
||||
+ continue;
|
||||
+ else
|
||||
+ return PTR_ERR(qdata->sensor[id]->tzd);
|
||||
|
||||
- sensor_np = of_get_next_child(np, NULL);
|
||||
- ret = of_parse_phandle_with_args(sensor_np, "thermal-sensors",
|
||||
- "#thermal-sensor-cells",
|
||||
- 0, &sensor_specs);
|
||||
- if (ret) {
|
||||
- of_node_put(np);
|
||||
- of_node_put(sensor_np);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- if (sensor_specs.args_count >= 1) {
|
||||
- id = sensor_specs.args[0];
|
||||
- WARN(sensor_specs.args_count > 1,
|
||||
- "%s: too many cells in sensor specifier %d\n",
|
||||
- sensor_specs.np->name, sensor_specs.args_count);
|
||||
- } else {
|
||||
- id = 0;
|
||||
- }
|
||||
+ }
|
||||
|
||||
- of_node_put(np);
|
||||
- of_node_put(sensor_np);
|
||||
+ sites |= 0x1 << (15 - id);
|
||||
+ }
|
||||
+ /* Enable monitoring */
|
||||
+ if (sites != 0)
|
||||
+ tmu_write(qdata, sites | TMR_ME | TMR_ALPF, &qdata->regs->tmr);
|
||||
|
||||
- return id;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int qoriq_tmu_calibration(struct platform_device *pdev)
|
||||
@@ -188,16 +198,11 @@ static void qoriq_tmu_init_device(struct
|
||||
tmu_write(data, TMR_DISABLE, &data->regs->tmr);
|
||||
}
|
||||
|
||||
-static const struct thermal_zone_of_device_ops tmu_tz_ops = {
|
||||
- .get_temp = tmu_get_temp,
|
||||
-};
|
||||
-
|
||||
static int qoriq_tmu_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
struct qoriq_tmu_data *data;
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
- u32 site = 0;
|
||||
|
||||
if (!np) {
|
||||
dev_err(&pdev->dev, "Device OF-Node is NULL");
|
||||
@@ -213,13 +218,6 @@ static int qoriq_tmu_probe(struct platfo
|
||||
|
||||
data->little_endian = of_property_read_bool(np, "little-endian");
|
||||
|
||||
- data->sensor_id = qoriq_tmu_get_sensor_id();
|
||||
- if (data->sensor_id < 0) {
|
||||
- dev_err(&pdev->dev, "Failed to get sensor id\n");
|
||||
- ret = -ENODEV;
|
||||
- goto err_iomap;
|
||||
- }
|
||||
-
|
||||
data->regs = of_iomap(np, 0);
|
||||
if (!data->regs) {
|
||||
dev_err(&pdev->dev, "Failed to get memory region\n");
|
||||
@@ -233,19 +231,13 @@ static int qoriq_tmu_probe(struct platfo
|
||||
if (ret < 0)
|
||||
goto err_tmu;
|
||||
|
||||
- data->tz = thermal_zone_of_sensor_register(&pdev->dev, data->sensor_id,
|
||||
- data, &tmu_tz_ops);
|
||||
- if (IS_ERR(data->tz)) {
|
||||
- ret = PTR_ERR(data->tz);
|
||||
- dev_err(&pdev->dev,
|
||||
- "Failed to register thermal zone device %d\n", ret);
|
||||
- goto err_tmu;
|
||||
+ ret = qoriq_tmu_register_tmu_zone(pdev);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&pdev->dev, "Failed to register sensors\n");
|
||||
+ ret = -ENODEV;
|
||||
+ goto err_iomap;
|
||||
}
|
||||
|
||||
- /* Enable monitoring */
|
||||
- site |= 0x1 << (15 - data->sensor_id);
|
||||
- tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
|
||||
-
|
||||
return 0;
|
||||
|
||||
err_tmu:
|
||||
@@ -261,8 +253,6 @@ static int qoriq_tmu_remove(struct platf
|
||||
{
|
||||
struct qoriq_tmu_data *data = platform_get_drvdata(pdev);
|
||||
|
||||
- thermal_zone_of_sensor_unregister(&pdev->dev, data->tz);
|
||||
-
|
||||
/* Disable monitoring */
|
||||
tmu_write(data, TMR_DISABLE, &data->regs->tmr);
|
||||
|
@ -1,48 +0,0 @@ |
||||
From 703b2ca94467a029942fa478a38f0a14c8109766 Mon Sep 17 00:00:00 2001
|
||||
From: Bharat Bhushan <bharat.bhushan@nxp.com>
|
||||
Date: Fri, 1 Mar 2019 13:33:58 +0800
|
||||
Subject: [PATCH] vfio/fsl-mc: Improve send mc-command and read response
|
||||
|
||||
Actually there is no ordering need when reading response
|
||||
from mc-portal. Similarly when writing the mc-command,
|
||||
ordering needed before command is submitted.
|
||||
|
||||
This patch removes un-necessary barriers, response is read
|
||||
relaxed and maintain ordering when submit command. This also
|
||||
fixes compilation issue with newer kernel.
|
||||
|
||||
Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
|
||||
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
---
|
||||
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
|
||||
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
|
||||
@@ -331,9 +331,7 @@ static int vfio_fsl_mc_dprc_wait_for_res
|
||||
u64 header;
|
||||
struct mc_cmd_header *resp_hdr;
|
||||
|
||||
- __iormb();
|
||||
- header = readq(ioaddr);
|
||||
- __iormb();
|
||||
+ header = cpu_to_le64(readq_relaxed(ioaddr));
|
||||
|
||||
resp_hdr = (struct mc_cmd_header *)&header;
|
||||
status = (enum mc_cmd_status)resp_hdr->status;
|
||||
@@ -353,9 +351,12 @@ static int vfio_fsl_mc_send_command(void
|
||||
{
|
||||
int i;
|
||||
|
||||
- /* Write at command header in the end */
|
||||
- for (i = 7; i >= 0; i--)
|
||||
- writeq(cmd_data[i], ioaddr + i * sizeof(uint64_t));
|
||||
+ /* Write at command parameter into portal */
|
||||
+ for (i = 7; i >= 1; i--)
|
||||
+ writeq_relaxed(cmd_data[i], ioaddr + i * sizeof(uint64_t));
|
||||
+
|
||||
+ /* Write command header in the end */
|
||||
+ writeq(cmd_data[0], ioaddr);
|
||||
|
||||
/* Wait for response before returning to user-space
|
||||
* This can be optimized in future to even prepare response
|
Loading…
Reference in new issue