summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/patches
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-03-07 12:45:41 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2023-03-27 18:07:53 +0200
commita194368d1bbc482f9d0a55eecf4bd466f4878b41 (patch)
treecd6fe841ec6b714f1e06c74f114dc1e03c32f4d5 /configs/platform-v7a/patches
parentaf669e145d8c95b8f19566314a96644e41854f78 (diff)
downloadDistroKit-a194368d1bbc482f9d0a55eecf4bd466f4878b41.tar.gz
DistroKit-a194368d1bbc482f9d0a55eecf4bd466f4878b41.tar.xz
v7a: barebox: version bump v2022.09.0 → v2023.02.1
Our patches for optionally working around flaky SD-Card detect are now upstream, so let's update to the newest release and drop them from our side. Config is what resulted from oldconfig with the exception of: - CONFIG_DRIVER_NET_BCMGENET, which is now enabled to give resulting barebox-raspberry-pi.img Ethernet support when running on the rpi 4-b. - CONFIG_CMD_FCB, which adds a useful fcb command for debugging boot from NAND on i.MX SoCs. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.pengutronix.de/20230307114541.3179101-1-a.fatoum@pengutronix.de Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a/patches')
-rw-r--r--configs/platform-v7a/patches/barebox-2022.09.0/0001-mci-core-act-upon-broken-cd-device-tree-property.patch60
-rw-r--r--configs/platform-v7a/patches/barebox-2022.09.0/0002-mci-core-add-broken_cd-device-parameter.patch46
-rw-r--r--configs/platform-v7a/patches/barebox-2022.09.0/0003-mci-core-fixup-broken-cd-information-into-kernel-DT.patch67
-rw-r--r--configs/platform-v7a/patches/barebox-2022.09.0/series3
4 files changed, 0 insertions, 176 deletions
diff --git a/configs/platform-v7a/patches/barebox-2022.09.0/0001-mci-core-act-upon-broken-cd-device-tree-property.patch b/configs/platform-v7a/patches/barebox-2022.09.0/0001-mci-core-act-upon-broken-cd-device-tree-property.patch
deleted file mode 100644
index 7360637..0000000
--- a/configs/platform-v7a/patches/barebox-2022.09.0/0001-mci-core-act-upon-broken-cd-device-tree-property.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 1d41bcf91e00a2e590497c266d5171232f30428c Mon Sep 17 00:00:00 2001
-From: Ahmad Fatoum <a.fatoum@pengutronix.de>
-Date: Tue, 6 Sep 2022 20:10:14 +0200
-Subject: [PATCH 1/3] mci: core: act upon broken-cd device tree property
-
-We didn't care much for broken-cd so far, still we have some drivers
-implementing the card_present callback, which we should ignore when
-card-detect is marked broken.
-
-Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
----
- drivers/mci/mci-core.c | 12 ++++++++----
- include/mci.h | 1 +
- 2 files changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
-index b8f71e15986e..5b1aa8dbed87 100644
---- a/drivers/mci/mci-core.c
-+++ b/drivers/mci/mci-core.c
-@@ -1750,10 +1750,13 @@ static int mci_card_probe(struct mci *mci)
- int i, rc, disknum, ret;
- bool has_bootpart = false;
-
-- if (host->card_present && !host->card_present(host) &&
-- !host->non_removable) {
-- dev_err(&mci->dev, "no card inserted\n");
-- return -ENODEV;
-+ if (host->card_present && !host->card_present(host) && !host->non_removable) {
-+ if (!host->broken_cd) {
-+ dev_err(&mci->dev, "no card inserted\n");
-+ return -ENODEV;
-+ }
-+
-+ dev_info(&mci->dev, "no card inserted (ignoring)\n");
- }
-
- ret = regulator_enable(host->supply);
-@@ -2033,6 +2036,7 @@ void mci_of_parse_node(struct mci_host *host,
- }
- }
-
-+ host->broken_cd = of_property_read_bool(np, "broken-cd");
- host->non_removable = of_property_read_bool(np, "non-removable");
- host->no_sd = of_property_read_bool(np, "no-sd");
- host->disable_wp = of_property_read_bool(np, "disable-wp");
-diff --git a/include/mci.h b/include/mci.h
-index 2098b4fbf084..d949310fac30 100644
---- a/include/mci.h
-+++ b/include/mci.h
-@@ -404,6 +404,7 @@ struct mci_host {
- unsigned max_req_size;
- unsigned dsr_val; /**< optional dsr value */
- int use_dsr; /**< optional dsr usage flag */
-+ int broken_cd; /**< card detect is broken */
- bool non_removable; /**< device is non removable */
- bool no_sd; /**< do not send SD commands during initialization */
- bool disable_wp; /**< ignore write-protect detection logic */
---
-2.30.2
-
diff --git a/configs/platform-v7a/patches/barebox-2022.09.0/0002-mci-core-add-broken_cd-device-parameter.patch b/configs/platform-v7a/patches/barebox-2022.09.0/0002-mci-core-add-broken_cd-device-parameter.patch
deleted file mode 100644
index b14c160..0000000
--- a/configs/platform-v7a/patches/barebox-2022.09.0/0002-mci-core-add-broken_cd-device-parameter.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 8d66a16dfd6b5c7e0d39e90954af32667e480074 Mon Sep 17 00:00:00 2001
-From: Ahmad Fatoum <a.fatoum@pengutronix.de>
-Date: Tue, 6 Sep 2022 20:10:37 +0200
-Subject: [PATCH 2/3] mci: core: add broken_cd device parameter
-
-Sometimes a broken card-detect is not a general issue affecting all
-boards, but only a given board. Allow setting broken_cd for such boards
-via a device parameter.
-
-Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
----
- drivers/mci/mci-core.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
-index 5b1aa8dbed87..5101ac1d8298 100644
---- a/drivers/mci/mci-core.c
-+++ b/drivers/mci/mci-core.c
-@@ -1919,7 +1919,7 @@ int mci_register(struct mci_host *host)
- {
- struct mci *mci;
- struct device_d *hw_dev;
-- struct param_d *param_probe;
-+ struct param_d *param_probe, *param_broken_cd;
- int ret;
-
- mci = xzalloc(sizeof(*mci));
-@@ -1963,6 +1963,15 @@ int mci_register(struct mci_host *host)
- goto err_unregister;
- }
-
-+ param_broken_cd = dev_add_param_bool(&mci->dev, "broken_cd",
-+ NULL, NULL, &host->broken_cd, mci);
-+
-+ if (IS_ERR(param_broken_cd) && PTR_ERR(param_broken_cd) != -ENOSYS) {
-+ ret = PTR_ERR(param_broken_cd);
-+ dev_dbg(&mci->dev, "Failed to add 'broken_cd' parameter to the MCI device\n");
-+ goto err_unregister;
-+ }
-+
- if (IS_ENABLED(CONFIG_MCI_INFO))
- mci->dev.info = mci_info;
-
---
-2.30.2
-
diff --git a/configs/platform-v7a/patches/barebox-2022.09.0/0003-mci-core-fixup-broken-cd-information-into-kernel-DT.patch b/configs/platform-v7a/patches/barebox-2022.09.0/0003-mci-core-fixup-broken-cd-information-into-kernel-DT.patch
deleted file mode 100644
index 8f2c776..0000000
--- a/configs/platform-v7a/patches/barebox-2022.09.0/0003-mci-core-fixup-broken-cd-information-into-kernel-DT.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 16931f8ef3bc2a5ecce5ae77c33e2b5611ac8d98 Mon Sep 17 00:00:00 2001
-From: Ahmad Fatoum <a.fatoum@pengutronix.de>
-Date: Mon, 25 Jul 2022 13:58:56 +0200
-Subject: [PATCH 3/3] mci: core: fixup broken-cd information into kernel DT
-
-In remote labs co-located with other hardware, we've observed card
-detect levers of different boards to sporadically fail to detect
-the card, e.g. because the cable on the usbsdmux was yanked around
-by accident. When this happens, barebox usually boots up normally as
-the card detect is ignored and then Linux waits indefinitely for
-the card-detect to turn active. We already maintain a broken_cd flag
-for each card. Use this to fixup the kernel DT appropriately.
-
-Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
----
- drivers/mci/mci-core.c | 28 ++++++++++++++++++++++++++++
- 1 file changed, 28 insertions(+)
-
-diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
-index 5101ac1d8298..92dbdaf469fd 100644
---- a/drivers/mci/mci-core.c
-+++ b/drivers/mci/mci-core.c
-@@ -1739,6 +1739,31 @@ static int mci_register_partition(struct mci_part *part)
- return 0;
- }
-
-+static int of_broken_cd_fixup(struct device_node *root, void *ctx)
-+{
-+ struct mci_host *host = ctx;
-+ struct device_d *hw_dev = host->hw_dev;
-+ struct device_node *np;
-+ char *name;
-+
-+ if (!host->broken_cd)
-+ return 0;
-+
-+ name = of_get_reproducible_name(hw_dev->device_node);
-+ np = of_find_node_by_reproducible_name(root, name);
-+ free(name);
-+ if (!np) {
-+ dev_warn(hw_dev, "Cannot find nodepath %s, cannot fixup\n",
-+ hw_dev->device_node->full_name);
-+ return -EINVAL;
-+ }
-+
-+ of_property_write_bool(np, "cd-gpios", false);
-+ of_property_write_bool(np, "broken-cd", true);
-+
-+ return 0;
-+}
-+
- /**
- * Probe an MCI card at the given host interface
- * @param mci MCI device instance
-@@ -1979,6 +2004,9 @@ int mci_register(struct mci_host *host)
- if (IS_ENABLED(CONFIG_MCI_STARTUP))
- mci_card_probe(mci);
-
-+ if (!host->no_sd && dev_of_node(host->hw_dev))
-+ of_register_fixup(of_broken_cd_fixup, host);
-+
- list_add_tail(&mci->list, &mci_list);
-
- return 0;
---
-2.30.2
-
diff --git a/configs/platform-v7a/patches/barebox-2022.09.0/series b/configs/platform-v7a/patches/barebox-2022.09.0/series
deleted file mode 100644
index 26c8a02..0000000
--- a/configs/platform-v7a/patches/barebox-2022.09.0/series
+++ /dev/null
@@ -1,3 +0,0 @@
-0001-mci-core-act-upon-broken-cd-device-tree-property.patch
-0002-mci-core-add-broken_cd-device-parameter.patch
-0003-mci-core-fixup-broken-cd-information-into-kernel-DT.patch