Move patches relating to the video systems to save for later,
also cleaned up non-relevant patches
This commit is contained in:
parent
d9033e13c8
commit
f8b9f56fb2
@ -1,39 +0,0 @@
|
|||||||
From fe85565d9ed8212cbda2148d4731418a36a8d088 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
|
||||||
Date: Mon, 11 Dec 2017 21:53:28 +0100
|
|
||||||
Subject: [PATCH 1/3] drivers: Integrating Mali Midgard video and gpu drivers.
|
|
||||||
|
|
||||||
I'm dropping the UMP drivers. They are not maintained.
|
|
||||||
|
|
||||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
|
||||||
---
|
|
||||||
drivers/gpu/Makefile | 2 +-
|
|
||||||
drivers/video/Kconfig | 1 +
|
|
||||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile
|
|
||||||
index e9ed439a5..66386b42a 100644
|
|
||||||
--- a/drivers/gpu/Makefile
|
|
||||||
+++ b/drivers/gpu/Makefile
|
|
||||||
@@ -2,5 +2,5 @@
|
|
||||||
# taken to initialize them in the correct order. Link order is the only way
|
|
||||||
# to ensure this currently.
|
|
||||||
obj-$(CONFIG_TEGRA_HOST1X) += host1x/
|
|
||||||
-obj-y += drm/ vga/
|
|
||||||
+obj-y += drm/ vga/ arm/
|
|
||||||
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
|
|
||||||
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
|
|
||||||
index 3c20af999..041e15f2c 100644
|
|
||||||
--- a/drivers/video/Kconfig
|
|
||||||
+++ b/drivers/video/Kconfig
|
|
||||||
@@ -17,6 +17,7 @@ source "drivers/gpu/vga/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/gpu/host1x/Kconfig"
|
|
||||||
source "drivers/gpu/ipu-v3/Kconfig"
|
|
||||||
+source "drivers/gpu/arm/midgard/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/gpu/drm/Kconfig"
|
|
||||||
|
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
From e0c5a419cf5464cd02996431afa98e3b22dc6801 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Myy <myy@miouyouyou.fr>
|
|
||||||
Date: Mon, 17 Jul 2017 23:14:48 +0000
|
|
||||||
Subject: [PATCH] clk: rockchip: add all known operating points to the allowed
|
|
||||||
CPU freqs
|
|
||||||
|
|
||||||
Patch from Willy Tarreau
|
|
||||||
|
|
||||||
Original commit message :
|
|
||||||
At least 1920 MHz runs stable on the MiQi even on openssl speed -multi 4,
|
|
||||||
which is by far the most intensive workload, and 1992/2016 work fine on
|
|
||||||
the CS-008 until it starts to heat too much. So add all of them so that
|
|
||||||
the device tree can simply manipulate them.
|
|
||||||
|
|
||||||
Signed-off-by: Myy <myy@miouyouyou.fr>
|
|
||||||
---
|
|
||||||
drivers/clk/rockchip/clk-rk3288.c | 17 +++++++++++++++++
|
|
||||||
1 file changed, 17 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
|
|
||||||
index 753c649..fd2058f 100644
|
|
||||||
--- a/drivers/clk/rockchip/clk-rk3288.c
|
|
||||||
+++ b/drivers/clk/rockchip/clk-rk3288.c
|
|
||||||
@@ -145,6 +145,23 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
|
|
||||||
+ RK3288_CPUCLK_RATE(2208000000U, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2184000000U, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2160000000U, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2136000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2112000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2088000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2064000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2040000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(2016000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1992000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1968000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1944000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1920000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1896000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1872000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1848000000, 1, 3, 1, 3, 3),
|
|
||||||
+ RK3288_CPUCLK_RATE(1824000000, 1, 3, 1, 3, 3),
|
|
||||||
RK3288_CPUCLK_RATE(1800000000, 1, 3, 1, 3, 3),
|
|
||||||
RK3288_CPUCLK_RATE(1704000000, 1, 3, 1, 3, 3),
|
|
||||||
RK3288_CPUCLK_RATE(1608000000, 1, 3, 1, 3, 3),
|
|
||||||
--
|
|
||||||
2.10.2
|
|
||||||
|
|
@ -1,116 +0,0 @@
|
|||||||
From 302cd9b8a9f1f8a7735fabea3b9a7645dc40f9cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
|
||||||
Date: Sun, 7 Jan 2018 01:52:44 +0100
|
|
||||||
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
|
|
||||||
|
|
||||||
On ASUS Tinkerboard systems, if the SDMMC hardware is shutdown before
|
|
||||||
rebooting, the system will be dead, as the SDMMC is the only way to
|
|
||||||
boot anything, and the hardware doesn't power up the SDMMC hardware
|
|
||||||
automatically when rebooting.
|
|
||||||
|
|
||||||
So, when using an ASUS Tinkerboard system, a new reboot handler is
|
|
||||||
installed. This reboot handler takes care of powering the SDMMC
|
|
||||||
hardware again before restarting the system, resolving the issue.
|
|
||||||
|
|
||||||
The code was inspired by the pwrseq_emmc.c, which seems to overcome
|
|
||||||
similar effects with eMMC hardware.
|
|
||||||
|
|
||||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
|
||||||
---
|
|
||||||
drivers/mmc/host/dw_mmc-rockchip.c | 66 ++++++++++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 66 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
|
||||||
index a3f1c2b30..7eac1f221 100644
|
|
||||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
|
||||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
|
||||||
@@ -16,6 +16,11 @@
|
|
||||||
#include <linux/pm_runtime.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
|
|
||||||
+#include <linux/regulator/consumer.h>
|
|
||||||
+#include <linux/reboot.h>
|
|
||||||
+#include <linux/delay.h>
|
|
||||||
+#include "../core/core.h"
|
|
||||||
+
|
|
||||||
#include "dw_mmc.h"
|
|
||||||
#include "dw_mmc-pltfm.h"
|
|
||||||
|
|
||||||
@@ -334,6 +339,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
|
|
||||||
};
|
|
||||||
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
|
|
||||||
|
|
||||||
+struct dw_mci_rockchip_broken_boards_data {
|
|
||||||
+ struct notifier_block reset_nb;
|
|
||||||
+ struct platform_device *pdev;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* This reboot handler handles cases where disabling the SDMMC on
|
|
||||||
+ * reboot will cause the hardware to be unable to start correctly
|
|
||||||
+ * after rebooting.
|
|
||||||
+ *
|
|
||||||
+ * This happens with Tinkerboard systems...
|
|
||||||
+ */
|
|
||||||
+static int dw_mci_rockchip_broken_boards_reset_nb(
|
|
||||||
+ struct notifier_block *this,
|
|
||||||
+ unsigned long mode, void *cmd)
|
|
||||||
+{
|
|
||||||
+ struct dw_mci_rockchip_broken_boards_data const *data =
|
|
||||||
+ container_of(this,
|
|
||||||
+ struct dw_mci_rockchip_broken_boards_data,
|
|
||||||
+ reset_nb);
|
|
||||||
+ struct dw_mci *host = platform_get_drvdata(data->pdev);
|
|
||||||
+ struct mmc_host *mmc = host->slot->mmc;
|
|
||||||
+
|
|
||||||
+ printk(KERN_ERR "Meow.\n");
|
|
||||||
+
|
|
||||||
+ mmc_power_off(mmc);
|
|
||||||
+
|
|
||||||
+ mdelay(20);
|
|
||||||
+
|
|
||||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
|
||||||
+ regulator_enable(mmc->supply.vmmc);
|
|
||||||
+
|
|
||||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
|
||||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
|
||||||
+
|
|
||||||
+ printk(KERN_ERR "woeM.\n");
|
|
||||||
+
|
|
||||||
+ return NOTIFY_DONE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void dw_mci_rockchip_register_broken_boards_reboot_handler(
|
|
||||||
+ struct platform_device *pdev)
|
|
||||||
+{
|
|
||||||
+ struct dw_mci_rockchip_broken_boards_data *data;
|
|
||||||
+
|
|
||||||
+ if (!of_machine_is_compatible("asus,rk3288-tinker"))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
|
|
||||||
+
|
|
||||||
+ if (!data)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ data->reset_nb.notifier_call =
|
|
||||||
+ dw_mci_rockchip_broken_boards_reset_nb;
|
|
||||||
+ data->reset_nb.priority = 255;
|
|
||||||
+ register_restart_handler(&data->reset_nb);
|
|
||||||
+
|
|
||||||
+ data->pdev = pdev;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
const struct dw_mci_drv_data *drv_data;
|
|
||||||
@@ -361,6 +426,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
|
||||||
}
|
|
||||||
|
|
||||||
pm_runtime_put_autosuspend(&pdev->dev);
|
|
||||||
+ dw_mci_rockchip_register_broken_boards_reboot_handler(pdev);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
@ -1,162 +0,0 @@
|
|||||||
From b557fc4afe1563d26aab58bec05ee84dcd6f9be8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Myy Miouyouyou <myy@miouyouyou.fr>
|
|
||||||
Date: Sun, 11 Mar 2018 22:15:36 +0100
|
|
||||||
Subject: [PATCH] dw_mmc: The stupid ASUS Reboot patch
|
|
||||||
|
|
||||||
The patch didn't apply in the 4.16-rc4 so it had to be "rewritten".
|
|
||||||
By "rewritten", I mean, move the code blocks accordingly, based on
|
|
||||||
the new dw_mmc.c file layout.
|
|
||||||
|
|
||||||
No major changes were done.
|
|
||||||
|
|
||||||
It's still fucking ugly but I have no time to concentrate on this
|
|
||||||
issue and deal with it accordingly.
|
|
||||||
|
|
||||||
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
|
|
||||||
---
|
|
||||||
drivers/mmc/host/dw_mmc-rockchip.c | 25 +++++++++++++++++++++++++
|
|
||||||
drivers/mmc/host/dw_mmc.c | 31 +++++++++++++++++++++++++++++++
|
|
||||||
include/linux/reboot.h | 2 ++
|
|
||||||
kernel/reboot.c | 1 +
|
|
||||||
4 files changed, 59 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
|
|
||||||
index 339295212..a8fe79b14 100644
|
|
||||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
|
||||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
|
||||||
@@ -14,10 +14,13 @@
|
|
||||||
#include <linux/of_address.h>
|
|
||||||
#include <linux/mmc/slot-gpio.h>
|
|
||||||
#include <linux/pm_runtime.h>
|
|
||||||
+#include <linux/regulator/consumer.h> // Stupid Tinkerboard Hack
|
|
||||||
#include <linux/slab.h>
|
|
||||||
|
|
||||||
#include "dw_mmc.h"
|
|
||||||
#include "dw_mmc-pltfm.h"
|
|
||||||
+#include "../core/core.h" // Stupid Tinkerboard Hack
|
|
||||||
+
|
|
||||||
|
|
||||||
#define RK3288_CLKGEN_DIV 2
|
|
||||||
|
|
||||||
@@ -366,6 +369,27 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Stupid Tinkerboard Hack */
|
|
||||||
+static void dw_mci_rockchip_platfm_shutdown(struct platform_device *pdev)
|
|
||||||
+{
|
|
||||||
+ struct dw_mci *host = platform_get_drvdata(pdev);
|
|
||||||
+ struct mmc_host *mmc = host->slot->mmc;
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ if(of_machine_is_compatible("asus,rk3288-tinker")){
|
|
||||||
+
|
|
||||||
+ mmc_power_off(mmc);
|
|
||||||
+
|
|
||||||
+ mdelay(20);
|
|
||||||
+
|
|
||||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
|
||||||
+ ret = regulator_enable(mmc->supply.vmmc);
|
|
||||||
+
|
|
||||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
|
||||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int dw_mci_rockchip_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
pm_runtime_get_sync(&pdev->dev);
|
|
||||||
@@ -386,6 +410,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = {
|
|
||||||
static struct platform_driver dw_mci_rockchip_pltfm_driver = {
|
|
||||||
.probe = dw_mci_rockchip_probe,
|
|
||||||
.remove = dw_mci_rockchip_remove,
|
|
||||||
+ .shutdown = dw_mci_rockchip_platfm_shutdown, // Stupid Tinkerboard Hack
|
|
||||||
.driver = {
|
|
||||||
.name = "dwmmc_rockchip",
|
|
||||||
.of_match_table = dw_mci_rockchip_match,
|
|
||||||
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
|
|
||||||
index d9b4acefe..5627c9da6 100644
|
|
||||||
--- a/drivers/mmc/host/dw_mmc.c
|
|
||||||
+++ b/drivers/mmc/host/dw_mmc.c
|
|
||||||
@@ -39,8 +39,10 @@
|
|
||||||
#include <linux/of.h>
|
|
||||||
#include <linux/of_gpio.h>
|
|
||||||
#include <linux/mmc/slot-gpio.h>
|
|
||||||
+#include <linux/reboot.h> // Stupid Tinkerboard Hack
|
|
||||||
|
|
||||||
#include "dw_mmc.h"
|
|
||||||
+#include "../core/core.h" // Stupid Tinkerboard hack
|
|
||||||
|
|
||||||
/* Common flag combinations */
|
|
||||||
#define DW_MCI_DATA_ERROR_FLAGS (SDMMC_INT_DRTO | SDMMC_INT_DCRC | \
|
|
||||||
@@ -2782,6 +2784,31 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Stupid Tinkerboard Hack */
|
|
||||||
+struct dw_mci *mSdhost;
|
|
||||||
+void setmmcEmergency() {
|
|
||||||
+ struct mmc_host *mmc;
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ printk(KERN_ERR "Emergency route taken.\n");
|
|
||||||
+ if (of_machine_is_compatible("asus,rk3288-tinker")) {
|
|
||||||
+ mmc = mSdhost->slot->mmc;
|
|
||||||
+
|
|
||||||
+ mmc_power_off(mmc);
|
|
||||||
+
|
|
||||||
+ mdelay(20);
|
|
||||||
+
|
|
||||||
+ if (!IS_ERR(mmc->supply.vmmc))
|
|
||||||
+ ret = regulator_enable(mmc->supply.vmmc);
|
|
||||||
+
|
|
||||||
+ if (!IS_ERR(mmc->supply.vqmmc))
|
|
||||||
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+EXPORT_SYMBOL(setmmcEmergency);
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static int dw_mci_init_slot_caps(struct dw_mci_slot *slot)
|
|
||||||
{
|
|
||||||
struct dw_mci *host = slot->host;
|
|
||||||
@@ -2858,6 +2885,10 @@ static int dw_mci_init_slot(struct dw_mci *host)
|
|
||||||
mmc->f_max = freq[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Stupid Tinkerboard Hack */
|
|
||||||
+ if (of_find_property(host->dev->of_node, "supports-sd", NULL))
|
|
||||||
+ mSdhost = host;
|
|
||||||
+
|
|
||||||
/*if there are external regulators, get them*/
|
|
||||||
ret = mmc_regulator_get_supply(mmc);
|
|
||||||
if (ret)
|
|
||||||
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
|
|
||||||
index e63799a6e..057d3ce0c 100644
|
|
||||||
--- a/include/linux/reboot.h
|
|
||||||
+++ b/include/linux/reboot.h
|
|
||||||
@@ -77,6 +77,8 @@ extern char poweroff_cmd[POWEROFF_CMD_PATH_LEN];
|
|
||||||
|
|
||||||
extern void orderly_poweroff(bool force);
|
|
||||||
extern void orderly_reboot(void);
|
|
||||||
+/* Stupid Tinkerboard Hack */
|
|
||||||
+extern void setmmcEmergency(void);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Emergency restart, callable from an interrupt handler.
|
|
||||||
diff --git a/kernel/reboot.c b/kernel/reboot.c
|
|
||||||
index e4ced883d..c8e678ce6 100644
|
|
||||||
--- a/kernel/reboot.c
|
|
||||||
+++ b/kernel/reboot.c
|
|
||||||
@@ -61,6 +61,7 @@ void (*pm_power_off_prepare)(void);
|
|
||||||
void emergency_restart(void)
|
|
||||||
{
|
|
||||||
kmsg_dump(KMSG_DUMP_EMERG);
|
|
||||||
+ setmmcEmergency(); // Stupid Tinkerboard Hack
|
|
||||||
machine_emergency_restart();
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(emergency_restart);
|
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user