From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
oss@buserror.net
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v3 05/10] powerpc/8xx: Refactor microcode write
Date: Fri, 14 Jun 2019 06:41:42 +0000 (UTC) [thread overview]
Message-ID: <093a095faf6d7627acf071cffca530496540c13e.1560494349.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <04852442b540e73be0a20e13f69ab8427fd102e0.1560494348.git.christophe.leroy@c-s.fr>
Add empty microcode tables so that all tables are defined
all the time. Regroup the writing of the 3 tables regardless
of the selected microcode.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/platforms/8xx/micropatch.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/platforms/8xx/micropatch.c b/arch/powerpc/platforms/8xx/micropatch.c
index 2abc226d1139..410968a0b177 100644
--- a/arch/powerpc/platforms/8xx/micropatch.c
+++ b/arch/powerpc/platforms/8xx/micropatch.c
@@ -68,6 +68,8 @@ static uint patch_2f00[] __initdata = {
0x31497353, 0x76956D69, 0x7B9D9693, 0x13131979,
0x79376935
};
+
+static uint patch_2e00[] __initdata = {};
#endif
/*
@@ -201,6 +203,8 @@ static uint patch_2000[] __initdata = {
static uint patch_2f00[] __initdata = {
0x3030304c, 0xcab9e441, 0xa1aaf220
};
+
+static uint patch_2e00[] __initdata = {};
#endif
static void __init cpm_write_patch(cpm8xx_t *cp, int offset, uint *patch, int len)
@@ -223,12 +227,13 @@ void __init cpm_load_patch(cpm8xx_t *cp)
#endif
commproc = cp;
-#ifdef CONFIG_USB_SOF_UCODE_PATCH
commproc->cp_rccr = 0;
cpm_write_patch(cp, 0, patch_2000, sizeof(patch_2000));
cpm_write_patch(cp, 0xf00, patch_2f00, sizeof(patch_2f00));
+ cpm_write_patch(cp, 0xe00, patch_2e00, sizeof(patch_2e00));
+#ifdef CONFIG_USB_SOF_UCODE_PATCH
commproc->cp_rccr = 0x0009;
printk("USB SOF microcode patch installed\n");
@@ -237,11 +242,6 @@ void __init cpm_load_patch(cpm8xx_t *cp)
#if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
- commproc->cp_rccr = 0;
-
- cpm_write_patch(cp, 0, patch_2000, sizeof(patch_2000));
- cpm_write_patch(cp, 0xf00, patch_2f00, sizeof(patch_2f00));
-
iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
# define RPBASE 0x0500
iip->iic_rpbase = RPBASE;
@@ -262,9 +262,6 @@ void __init cpm_load_patch(cpm8xx_t *cp)
# endif /* CONFIG_I2C_SPI_UCODE_PATCH */
# if defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
-
- cpm_write_patch(cp, 0xe00, patch_2e00, sizeof(patch_2e00));
-
commproc->cp_cpmcr1 = 0x8080;
commproc->cp_cpmcr2 = 0x808a;
commproc->cp_cpmcr3 = 0x8028;
--
2.13.3
next prev parent reply other threads:[~2019-06-14 6:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 6:41 [PATCH v3 01/10] powerpc/8xx: move CPM1 related files from sysdev/ to platforms/8xx Christophe Leroy
2019-06-14 6:41 ` [PATCH v3 02/10] powerpc/8xx: drop verify_patch() Christophe Leroy
2019-06-14 6:41 ` [PATCH v3 03/10] powerpc/8xx: compact microcode arrays Christophe Leroy
2019-06-14 6:41 ` [PATCH v3 04/10] powerpc/8xx: refactor writing of CPM " Christophe Leroy
2019-06-14 6:41 ` Christophe Leroy [this message]
2019-06-14 6:41 ` [PATCH v3 06/10] powerpc/8xx: refactor printing of microcode patch name Christophe Leroy
2019-06-14 6:41 ` [PATCH v3 07/10] powerpc/8xx: refactor programming of microcode CPM params Christophe Leroy
2019-06-14 6:41 ` [PATCH v3 08/10] powerpc/8xx: replace #ifdefs by IS_ENABLED() in microcode.c Christophe Leroy
2019-06-14 6:41 ` [PATCH v3 09/10] powerpc/8xx: Use IO accessors in microcode programming Christophe Leroy
2019-06-14 6:41 ` [PATCH v3 10/10] powerpc/8xx: Add microcode patch to move SMC parameter RAM Christophe Leroy
2019-07-08 1:19 ` [PATCH v3 01/10] powerpc/8xx: move CPM1 related files from sysdev/ to platforms/8xx Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=093a095faf6d7627acf071cffca530496540c13e.1560494349.git.christophe.leroy@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oss@buserror.net \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).