unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob d94a201911ca70a3cf2e5e49039fbaf16e8ad6ca 2137 bytes (raw)
name: gnu/packages/patches/amlogic-0025-WIP-mmc-meson-gx-mmc-set-core-clock-phase-to-270-deg.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 
From 9d475abbf29793acc2c085e862ee8abb60c88961 Mon Sep 17 00:00:00 2001
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Thu, 14 Jan 2021 17:43:02 +0100
Subject: [PATCH 25/73] WIP: mmc: meson-gx-mmc: set core clock phase to 270
 degrees for AXG compatible controllers

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/mmc/host/meson-gx-mmc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index a2aacbffc3bf..c16ac828b6f9 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -38,6 +38,7 @@
 #define   CLK_RX_PHASE_MASK GENMASK(13, 12)
 #define   CLK_PHASE_0 0
 #define   CLK_PHASE_180 2
+#define   CLK_PHASE_270 3
 #define   CLK_V2_TX_DELAY_MASK GENMASK(19, 16)
 #define   CLK_V2_RX_DELAY_MASK GENMASK(23, 20)
 #define   CLK_V2_ALWAYS_ON BIT(24)
@@ -136,6 +137,7 @@ struct meson_mmc_data {
 	unsigned int rx_delay_mask;
 	unsigned int always_on;
 	unsigned int adjust;
+	unsigned int clk_core_phase;
 };
 
 struct sd_emmc_desc {
@@ -428,7 +430,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
 	/* init SD_EMMC_CLOCK to sane defaults w/min clock rate */
 	clk_reg = CLK_ALWAYS_ON(host);
 	clk_reg |= CLK_DIV_MASK;
-	clk_reg |= FIELD_PREP(CLK_CORE_PHASE_MASK, CLK_PHASE_180);
+	clk_reg |= FIELD_PREP(CLK_CORE_PHASE_MASK, host->data->clk_core_phase);
 	clk_reg |= FIELD_PREP(CLK_TX_PHASE_MASK, CLK_PHASE_0);
 	clk_reg |= FIELD_PREP(CLK_RX_PHASE_MASK, CLK_PHASE_0);
 	writel(clk_reg, host->regs + SD_EMMC_CLOCK);
@@ -1328,6 +1330,7 @@ static const struct meson_mmc_data meson_gx_data = {
 	.rx_delay_mask	= CLK_V2_RX_DELAY_MASK,
 	.always_on	= CLK_V2_ALWAYS_ON,
 	.adjust		= SD_EMMC_ADJUST,
+	.clk_core_phase	= CLK_PHASE_180,
 };
 
 static const struct meson_mmc_data meson_axg_data = {
@@ -1335,6 +1338,7 @@ static const struct meson_mmc_data meson_axg_data = {
 	.rx_delay_mask	= CLK_V3_RX_DELAY_MASK,
 	.always_on	= CLK_V3_ALWAYS_ON,
 	.adjust		= SD_EMMC_V3_ADJUST,
+	.clk_core_phase	= CLK_PHASE_270,
 };
 
 static const struct of_device_id meson_mmc_of_match[] = {
-- 
2.17.1


debug log:

solving d94a201911 ...
found d94a201911 in https://yhetil.org/guix-patches/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/

applying [1/1] https://yhetil.org/guix-patches/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/
diff --git a/gnu/packages/patches/amlogic-0025-WIP-mmc-meson-gx-mmc-set-core-clock-phase-to-270-deg.patch b/gnu/packages/patches/amlogic-0025-WIP-mmc-meson-gx-mmc-set-core-clock-phase-to-270-deg.patch
new file mode 100644
index 0000000000..d94a201911

1:31: space before tab in indent.
 	unsigned int rx_delay_mask;
1:32: space before tab in indent.
 	unsigned int always_on;
1:33: space before tab in indent.
 	unsigned int adjust;
1:36: trailing whitespace.
 
1:39: space before tab in indent.
 	/* init SD_EMMC_CLOCK to sane defaults w/min clock rate */
Checking patch gnu/packages/patches/amlogic-0025-WIP-mmc-meson-gx-mmc-set-core-clock-phase-to-270-deg.patch...
Applied patch gnu/packages/patches/amlogic-0025-WIP-mmc-meson-gx-mmc-set-core-clock-phase-to-270-deg.patch cleanly.
warning: squelched 15 whitespace errors
warning: 20 lines add whitespace errors.

index at:
100644 d94a201911ca70a3cf2e5e49039fbaf16e8ad6ca	gnu/packages/patches/amlogic-0025-WIP-mmc-meson-gx-mmc-set-core-clock-phase-to-270-deg.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).