diff options
author | Yangbo Lu <yangbo.lu@nxp.com> | 2018-02-06 12:39:05 +0800 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-02-13 10:01:49 +0100 |
commit | 1a28100e68f4863ebc68625d5c6123ef0e5de8db (patch) | |
tree | 904bf6eec64dd2235c89e02bdc4033253512fbd1 /target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch | |
parent | 3a0fa1e7b860c600256f102d07356964821e7d7e (diff) | |
download | upstream-1a28100e68f4863ebc68625d5c6123ef0e5de8db.tar.gz upstream-1a28100e68f4863ebc68625d5c6123ef0e5de8db.tar.bz2 upstream-1a28100e68f4863ebc68625d5c6123ef0e5de8db.zip |
layerscape: update patches-4.9 to LSDK1712
Patches changes
- Updated patches-4.9 to NXP LSDK1712 linux-4.9.
- Merged changes of patch 303 into integrated patch 201.
- Split changes of patch 706 into dpaa part and dpaa2
part, and merged these changes into integrated patches
701 and 705.
- Removed patch 819 since ehci-fsl driver could be compiled now.
- Refreshed these patches.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Diffstat (limited to 'target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch | 226 |
1 files changed, 44 insertions, 182 deletions
diff --git a/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch b/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch index ccfce1df74..218421265a 100644 --- a/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch @@ -1,12 +1,12 @@ -From 7992b4384d94c5e1bad998ca3a9a5781caac8e62 Mon Sep 17 00:00:00 2001 +From e43dec70614b55ba1ce24dfcdf8f51e36d800af2 Mon Sep 17 00:00:00 2001 From: Yangbo Lu <yangbo.lu@nxp.com> -Date: Mon, 25 Sep 2017 09:52:26 +0800 -Subject: [PATCH] config: support layerscape +Date: Wed, 17 Jan 2018 15:26:46 +0800 +Subject: [PATCH 01/30] config: support layerscape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -This is a integrated patch for layerscape config/makefile support. +This is an integrated patch for layerscape config/makefile support. Signed-off-by: Yuantian Tang <andy.tang@nxp.com> Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com> @@ -16,33 +16,42 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> --- - drivers/base/Kconfig | 1 + - drivers/crypto/Makefile | 2 +- - drivers/net/ethernet/freescale/Kconfig | 4 +- - drivers/net/ethernet/freescale/Makefile | 2 + - drivers/ptp/Kconfig | 29 ++++++ - drivers/rtc/Kconfig | 8 ++ - drivers/rtc/Makefile | 1 + - drivers/soc/Kconfig | 3 +- - drivers/soc/fsl/Kconfig | 22 +++++ - drivers/soc/fsl/Kconfig.arm | 16 ++++ - drivers/soc/fsl/Makefile | 4 + - drivers/soc/fsl/layerscape/Kconfig | 10 +++ - drivers/soc/fsl/layerscape/Makefile | 1 + - drivers/soc/fsl/rcpm.c | 154 ++++++++++++++++++++++++++++++++ - drivers/staging/Kconfig | 6 ++ - drivers/staging/Makefile | 3 + - drivers/staging/fsl-dpaa2/Kconfig | 41 +++++++++ - drivers/staging/fsl-dpaa2/Makefile | 9 ++ - 18 files changed, 312 insertions(+), 4 deletions(-) + arch/arm/mach-imx/Kconfig | 1 + + drivers/base/Kconfig | 1 + + drivers/crypto/Makefile | 2 +- + drivers/net/ethernet/freescale/Kconfig | 4 ++- + drivers/net/ethernet/freescale/Makefile | 2 ++ + drivers/ptp/Kconfig | 29 +++++++++++++++++++ + drivers/rtc/Kconfig | 8 ++++++ + drivers/rtc/Makefile | 1 + + drivers/soc/Kconfig | 3 +- + drivers/soc/fsl/Kconfig | 22 ++++++++++++++ + drivers/soc/fsl/Kconfig.arm | 16 +++++++++++ + drivers/soc/fsl/Makefile | 4 +++ + drivers/soc/fsl/layerscape/Kconfig | 10 +++++++ + drivers/soc/fsl/layerscape/Makefile | 1 + + drivers/staging/Kconfig | 6 ++++ + drivers/staging/Makefile | 3 ++ + drivers/staging/fsl-dpaa2/Kconfig | 51 +++++++++++++++++++++++++++++++++ + drivers/staging/fsl-dpaa2/Makefile | 9 ++++++ + 18 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 drivers/soc/fsl/Kconfig create mode 100644 drivers/soc/fsl/Kconfig.arm create mode 100644 drivers/soc/fsl/layerscape/Kconfig create mode 100644 drivers/soc/fsl/layerscape/Makefile - create mode 100644 drivers/soc/fsl/rcpm.c create mode 100644 drivers/staging/fsl-dpaa2/Kconfig create mode 100644 drivers/staging/fsl-dpaa2/Makefile +--- a/arch/arm/mach-imx/Kconfig ++++ b/arch/arm/mach-imx/Kconfig +@@ -1,6 +1,7 @@ + menuconfig ARCH_MXC + bool "Freescale i.MX family" + depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M ++ select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE + select ARCH_SUPPORTS_BIG_ENDIAN + select CLKSRC_IMX_GPT + select GENERIC_IRQ_CHIP --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -240,6 +240,7 @@ config GENERIC_CPU_VULNERABILITIES @@ -239,163 +248,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> +++ b/drivers/soc/fsl/layerscape/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_FTM_ALARM) += ftm_alarm.o ---- /dev/null -+++ b/drivers/soc/fsl/rcpm.c -@@ -0,0 +1,154 @@ -+/* -+ * Run Control and Power Management (RCPM) driver -+ * -+ * Copyright 2016 NXP -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+#define pr_fmt(fmt) "RCPM: %s: " fmt, __func__ -+ -+#include <linux/kernel.h> -+#include <linux/io.h> -+#include <linux/of_platform.h> -+#include <linux/of_address.h> -+#include <linux/suspend.h> -+ -+/* RCPM register offset */ -+#define RCPM_IPPDEXPCR0 0x140 -+ -+#define RCPM_WAKEUP_CELL_SIZE 2 -+ -+struct rcpm_config { -+ int ipp_num; -+ int ippdexpcr_offset; -+ u32 ippdexpcr[2]; -+ void *rcpm_reg_base; -+}; -+ -+static struct rcpm_config *rcpm; -+ -+static inline void rcpm_reg_write(u32 offset, u32 value) -+{ -+ iowrite32be(value, rcpm->rcpm_reg_base + offset); -+} -+ -+static inline u32 rcpm_reg_read(u32 offset) -+{ -+ return ioread32be(rcpm->rcpm_reg_base + offset); -+} -+ -+static void rcpm_wakeup_fixup(struct device *dev, void *data) -+{ -+ struct device_node *node = dev ? dev->of_node : NULL; -+ u32 value[RCPM_WAKEUP_CELL_SIZE]; -+ int ret, i; -+ -+ if (!dev || !node || !device_may_wakeup(dev)) -+ return; -+ -+ /* -+ * Get the values in the "rcpm-wakeup" property. -+ * Three values are: -+ * The first is a pointer to the RCPM node. -+ * The second is the value of the ippdexpcr0 register. -+ * The third is the value of the ippdexpcr1 register. -+ */ -+ ret = of_property_read_u32_array(node, "fsl,rcpm-wakeup", -+ value, RCPM_WAKEUP_CELL_SIZE); -+ if (ret) -+ return; -+ -+ pr_debug("wakeup source: the device %s\n", node->full_name); -+ -+ for (i = 0; i < rcpm->ipp_num; i++) -+ rcpm->ippdexpcr[i] |= value[i + 1]; -+} -+ -+static int rcpm_suspend_prepare(void) -+{ -+ int i; -+ -+ BUG_ON(!rcpm); -+ -+ for (i = 0; i < rcpm->ipp_num; i++) -+ rcpm->ippdexpcr[i] = 0; -+ -+ dpm_for_each_dev(NULL, rcpm_wakeup_fixup); -+ -+ for (i = 0; i < rcpm->ipp_num; i++) { -+ rcpm_reg_write(rcpm->ippdexpcr_offset + 4 * i, -+ rcpm->ippdexpcr[i]); -+ pr_debug("ippdexpcr%d = 0x%x\n", i, rcpm->ippdexpcr[i]); -+ } -+ -+ return 0; -+} -+ -+static int rcpm_suspend_notifier_call(struct notifier_block *bl, -+ unsigned long state, -+ void *unused) -+{ -+ switch (state) { -+ case PM_SUSPEND_PREPARE: -+ rcpm_suspend_prepare(); -+ break; -+ } -+ -+ return NOTIFY_DONE; -+} -+ -+static struct rcpm_config rcpm_default_config = { -+ .ipp_num = 1, -+ .ippdexpcr_offset = RCPM_IPPDEXPCR0, -+}; -+ -+static const struct of_device_id rcpm_matches[] = { -+ { -+ .compatible = "fsl,qoriq-rcpm-2.1", -+ .data = &rcpm_default_config, -+ }, -+ {} -+}; -+ -+static struct notifier_block rcpm_suspend_notifier = { -+ .notifier_call = rcpm_suspend_notifier_call, -+}; -+ -+static int __init layerscape_rcpm_init(void) -+{ -+ const struct of_device_id *match; -+ struct device_node *np; -+ -+ np = of_find_matching_node_and_match(NULL, rcpm_matches, &match); -+ if (!np) { -+ pr_err("Can't find the RCPM node.\n"); -+ return -EINVAL; -+ } -+ -+ if (match->data) -+ rcpm = (struct rcpm_config *)match->data; -+ else -+ return -EINVAL; -+ -+ rcpm->rcpm_reg_base = of_iomap(np, 0); -+ of_node_put(np); -+ if (!rcpm->rcpm_reg_base) -+ return -ENOMEM; -+ -+ register_pm_notifier(&rcpm_suspend_notifier); -+ -+ pr_info("The RCPM driver initialized.\n"); -+ -+ return 0; -+} -+ -+subsys_initcall(layerscape_rcpm_init); --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -94,6 +94,8 @@ source "drivers/staging/fbtft/Kconfig" @@ -433,7 +285,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> +obj-$(CONFIG_FSL_PPFE) += fsl_ppfe/ --- /dev/null +++ b/drivers/staging/fsl-dpaa2/Kconfig -@@ -0,0 +1,41 @@ +@@ -0,0 +1,51 @@ +# +# Freescale DataPath Acceleration Architecture Gen2 (DPAA2) drivers +# @@ -470,6 +322,16 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> + default n + ---help--- + Enable advanced statistics through debugfs interface. ++ ++config FSL_DPAA2_ETH_DCB ++ bool "Data Center Bridging (DCB) Support" ++ default n ++ depends on DCB ++ ---help--- ++ Say Y here if you want to use Data Center Bridging (DCB) features ++ (PFC) in the driver. ++ ++ If unsure, say N. +endif + +source "drivers/staging/fsl-dpaa2/mac/Kconfig" |