mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
cddd459140
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release which was tagged LSDK-20.04-V5.4. https://source.codeaurora.org/external/qoriq/qoriq-components/linux/ For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in LSDK, port the dts patches from 4.14. The patches are sorted into the following categories: 301-arch-xxxx 302-dts-xxxx 303-core-xxxx 701-net-xxxx 801-audio-xxxx 802-can-xxxx 803-clock-xxxx 804-crypto-xxxx 805-display-xxxx 806-dma-xxxx 807-gpio-xxxx 808-i2c-xxxx 809-jailhouse-xxxx 810-keys-xxxx 811-kvm-xxxx 812-pcie-xxxx 813-pm-xxxx 814-qe-xxxx 815-sata-xxxx 816-sdhc-xxxx 817-spi-xxxx 818-thermal-xxxx 819-uart-xxxx 820-usb-xxxx 821-vfio-xxxx Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
96 lines
2.8 KiB
Diff
96 lines
2.8 KiB
Diff
From c8055614385c90accdea4e7a046c5560bccc84cf Mon Sep 17 00:00:00 2001
|
|
From: Leonard Crestez <leonard.crestez@nxp.com>
|
|
Date: Mon, 13 May 2019 15:06:37 +0300
|
|
Subject: [PATCH] imx busfreq: Add API header file
|
|
|
|
Add sufficient enough definitions so that drivers which call
|
|
request_bus_freq and release_bus_freq can compile even if
|
|
CONFIG_HAVE_IMX_BUSFREQ is missing.
|
|
|
|
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
|
|
---
|
|
include/linux/busfreq-imx.h | 77 +++++++++++++++++++++++++++++++++++++++++++++
|
|
1 file changed, 77 insertions(+)
|
|
create mode 100644 include/linux/busfreq-imx.h
|
|
|
|
--- /dev/null
|
|
+++ b/include/linux/busfreq-imx.h
|
|
@@ -0,0 +1,77 @@
|
|
+/*
|
|
+ * Copyright 2012-2016 Freescale Semiconductor, Inc. All Rights Reserved.
|
|
+ *
|
|
+ * This program is free software; you can redistribute it and/or modify
|
|
+ * it under the terms of the GNU General Public License version 2 as
|
|
+ * published by the Free Software Foundation.
|
|
+ */
|
|
+
|
|
+#ifndef __ASM_ARCH_MXC_BUSFREQ_H__
|
|
+#define __ASM_ARCH_MXC_BUSFREQ_H__
|
|
+
|
|
+#include <linux/notifier.h>
|
|
+#include <linux/regulator/consumer.h>
|
|
+
|
|
+/*
|
|
+ * This enumerates busfreq low power mode entry and exit.
|
|
+ */
|
|
+enum busfreq_event {
|
|
+ LOW_BUSFREQ_ENTER,
|
|
+ LOW_BUSFREQ_EXIT,
|
|
+};
|
|
+
|
|
+/*
|
|
+ * This enumerates the system bus and ddr frequencies in various modes.
|
|
+ * BUS_FREQ_HIGH - DDR @ 528MHz, AHB @ 132MHz.
|
|
+ * BUS_FREQ_MED - DDR @ 400MHz, AHB @ 132MHz
|
|
+ * BUS_FREQ_AUDIO - DDR @ 50MHz/100MHz, AHB @ 24MHz.
|
|
+ * BUS_FREQ_LOW - DDR @ 24MHz, AHB @ 24MHz.
|
|
+ * BUS_FREQ_ULTRA_LOW - DDR @ 1MHz, AHB - 3MHz.
|
|
+ *
|
|
+ * Drivers need to request/release the bus/ddr frequencies based on
|
|
+ * their performance requirements. Drivers cannot request/release
|
|
+ * BUS_FREQ_ULTRA_LOW mode as this mode is automatically entered from
|
|
+ * either BUS_FREQ_AUDIO or BUS_FREQ_LOW
|
|
+ * modes.
|
|
+ */
|
|
+enum bus_freq_mode {
|
|
+ BUS_FREQ_HIGH,
|
|
+ BUS_FREQ_MED,
|
|
+ BUS_FREQ_AUDIO,
|
|
+ BUS_FREQ_LOW,
|
|
+ BUS_FREQ_ULTRA_LOW,
|
|
+};
|
|
+
|
|
+#if defined(CONFIG_HAVE_IMX_BUSFREQ) && !defined(CONFIG_ARM64)
|
|
+extern struct regulator *arm_reg;
|
|
+extern struct regulator *soc_reg;
|
|
+void request_bus_freq(enum bus_freq_mode mode);
|
|
+void release_bus_freq(enum bus_freq_mode mode);
|
|
+int register_busfreq_notifier(struct notifier_block *nb);
|
|
+int unregister_busfreq_notifier(struct notifier_block *nb);
|
|
+int get_bus_freq_mode(void);
|
|
+#elif defined(CONFIG_HAVE_IMX_BUSFREQ)
|
|
+void request_bus_freq(enum bus_freq_mode mode);
|
|
+void release_bus_freq(enum bus_freq_mode mode);
|
|
+int get_bus_freq_mode(void);
|
|
+#else
|
|
+static inline void request_bus_freq(enum bus_freq_mode mode)
|
|
+{
|
|
+}
|
|
+static inline void release_bus_freq(enum bus_freq_mode mode)
|
|
+{
|
|
+}
|
|
+static inline int register_busfreq_notifier(struct notifier_block *nb)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+static inline int unregister_busfreq_notifier(struct notifier_block *nb)
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+static inline int get_bus_freq_mode(void)
|
|
+{
|
|
+ return BUS_FREQ_HIGH;
|
|
+}
|
|
+#endif
|
|
+#endif
|