aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/patches-4.4/0073-of-mtd-prepare-helper-reading-NAND-ECC-algo-from-DT.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2018-05-31 17:28:38 +0200
committerDaniel Golle <daniel@makrotopia.org>2018-06-18 18:44:14 +0200
commit6f398aa76248dfdbd1ea31b8ef32431be0f762ee (patch)
treee9c8f6380fdabb0a5e00b6bdd335c9397e93b6ad /target/linux/oxnas/patches-4.4/0073-of-mtd-prepare-helper-reading-NAND-ECC-algo-from-DT.patch
parentd6ee5e462c34a337a1b53994df5581a507e2c342 (diff)
downloadupstream-6f398aa76248dfdbd1ea31b8ef32431be0f762ee.tar.gz
upstream-6f398aa76248dfdbd1ea31b8ef32431be0f762ee.tar.bz2
upstream-6f398aa76248dfdbd1ea31b8ef32431be0f762ee.zip
oxnas: reboot target
Reboot the oxnas target based on Linux 4.14 by rebasing our support on top of the now-existing upstream kernel support. This commit brings oxnas support to the level of v4.17 having upstream drivers for Ethernet, Serial and NAND flash. Botch up OpenWrt's local drivers for EHCI, SATA and PCIe based on the new platform code and device-tree. Re-introduce base-files from old oxnas target which works for now but needs further clean-up towards generic board support. Functional issues: * PCIe won't come up (hence no USB3 on Shuttle KD20) * I2C bus of Akitio myCloud device is likely not to work (missing debounce support in new pinctrl driver) Code-style issues: * plla/pllb needs further cleanup -- currently their users are writing into the syscon regmap after acquireling the clk instead of using defined clk_*_*() functions to setup multipliers and dividors. * PCIe phy needs its own little driver. * SATA driver is a monster and should be split into an mfd having a raidctrl regmap, sata controller, sata ports and sata phy. Tested on MitraStar STG-212 aka. Medion Akoya MD86xxx and Shuttle KD20. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (squash-picked commit 17511a7ea8 and commit dcc34574ef from master)
Diffstat (limited to 'target/linux/oxnas/patches-4.4/0073-of-mtd-prepare-helper-reading-NAND-ECC-algo-from-DT.patch')
-rw-r--r--target/linux/oxnas/patches-4.4/0073-of-mtd-prepare-helper-reading-NAND-ECC-algo-from-DT.patch91
1 files changed, 0 insertions, 91 deletions
diff --git a/target/linux/oxnas/patches-4.4/0073-of-mtd-prepare-helper-reading-NAND-ECC-algo-from-DT.patch b/target/linux/oxnas/patches-4.4/0073-of-mtd-prepare-helper-reading-NAND-ECC-algo-from-DT.patch
deleted file mode 100644
index aa45441afa..0000000000
--- a/target/linux/oxnas/patches-4.4/0073-of-mtd-prepare-helper-reading-NAND-ECC-algo-from-DT.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 410a91f6efa1c4c3c4369d1dd2c31286749dff33 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
-Date: Wed, 23 Mar 2016 11:19:01 +0100
-Subject: [PATCH 073/102] of: mtd: prepare helper reading NAND ECC algo from
- DT
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-NAND subsystem is being slightly reworked to store ECC details in
-separated fields. In future we'll want to add support for more DT
-properties as specifying every possible setup with a single
-"nand-ecc-mode" is a pretty bad idea.
-To allow this let's add a helper that will support something like
-"nand-ecc-algo" in future. Right now we use it for keeping backward
-compatibility.
-
-Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
-Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
----
- drivers/of/of_mtd.c | 36 ++++++++++++++++++++++++++++++++++++
- include/linux/of_mtd.h | 6 ++++++
- 2 files changed, 42 insertions(+)
-
---- a/drivers/of/of_mtd.c
-+++ b/drivers/of/of_mtd.c
-@@ -50,6 +50,42 @@ int of_get_nand_ecc_mode(struct device_n
- EXPORT_SYMBOL_GPL(of_get_nand_ecc_mode);
-
- /**
-+ * of_get_nand_ecc_algo - Get nand ecc algorithm for given device_node
-+ * @np: Pointer to the given device_node
-+ *
-+ * The function gets ecc algorithm and returns its enum value, or errno in error
-+ * case.
-+ */
-+int of_get_nand_ecc_algo(struct device_node *np)
-+{
-+ const char *pm;
-+ int err;
-+
-+ /*
-+ * TODO: Read ECC algo OF property and map it to enum nand_ecc_algo.
-+ * It's not implemented yet as currently NAND subsystem ignores
-+ * algorithm explicitly set this way. Once it's handled we should
-+ * document & support new property.
-+ */
-+
-+ /*
-+ * For backward compatibility we also read "nand-ecc-mode" checking
-+ * for some obsoleted values that were specifying ECC algorithm.
-+ */
-+ err = of_property_read_string(np, "nand-ecc-mode", &pm);
-+ if (err < 0)
-+ return err;
-+
-+ if (!strcasecmp(pm, "soft"))
-+ return NAND_ECC_HAMMING;
-+ else if (!strcasecmp(pm, "soft_bch"))
-+ return NAND_ECC_BCH;
-+
-+ return -ENODEV;
-+}
-+EXPORT_SYMBOL_GPL(of_get_nand_ecc_algo);
-+
-+/**
- * of_get_nand_ecc_step_size - Get ECC step size associated to
- * the required ECC strength (see below).
- * @np: Pointer to the given device_node
---- a/include/linux/of_mtd.h
-+++ b/include/linux/of_mtd.h
-@@ -13,6 +13,7 @@
-
- #include <linux/of.h>
- int of_get_nand_ecc_mode(struct device_node *np);
-+int of_get_nand_ecc_algo(struct device_node *np);
- int of_get_nand_ecc_step_size(struct device_node *np);
- int of_get_nand_ecc_strength(struct device_node *np);
- int of_get_nand_bus_width(struct device_node *np);
-@@ -24,6 +25,11 @@ static inline int of_get_nand_ecc_mode(s
- {
- return -ENOSYS;
- }
-+
-+static inline int of_get_nand_ecc_algo(struct device_node *np)
-+{
-+ return -ENOSYS;
-+}
-
- static inline int of_get_nand_ecc_step_size(struct device_node *np)
- {