Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7058265ybi; Thu, 13 Jun 2019 08:52:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3Kg1MSKSaxkYy7w56zeE/YDgMeN4VCvY1zRM0r35vt4WHB5eLMPSf1wIUHxNkEgVbzBnT X-Received: by 2002:a17:902:b43:: with SMTP id 61mr90736658plq.322.1560441169157; Thu, 13 Jun 2019 08:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560441169; cv=none; d=google.com; s=arc-20160816; b=LdokyRFZ7dNz6WhVHk1Au6/EZht5wrlShXlZ8ZsqkVEpgmvYTcRdVOSTZ3dgsyu69h j0sTcrgXLiGw+cUyHbMbT1tQG3OFG7abNJ6yDmI1XXa/SusOS9KoryqGLD5p+o2A+PVn M3f1TUHoGan7oJteBVeEW6pP5IspgyM6cq3mn4AvOu/v/aRXwqTI/xTWhQQTMDNCJu3f IUh1KL0UqDOMBDXOJsnt4fHJlmPWw0lvqUxPx8pl93viTygVkDv5V8u5Wi5gZQ2Hm0n8 jZo+7HgFuabnoKycg6DU8TbkuV92fG61zJ3JBDFWJOnkJrfe8j72WgNCGCxJLhEPfFKT 1sCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=nw7s55nSCE5gZsdfCAQCVWUUIXEzDyTDYLqPEVTErBE=; b=woVB+7BYLpJqUkfgx9Qr8WAXoM0qZuw6C2lTIGxL10Udmt2wAAqgaf++h1Azbc4bcZ kGNd6PwB46DiiJzyer0Mc6GPGoFj1lEY8+VguW+EIwNjDWAEyEYVIhmNREGJl+xq9gzI 3uI7bxzwDyZSMglxxZNMyufltqpLye3cudz2lgPIBs8CRluzbjGbYMiIHXHACgfdY9Nl eV4I9sbC7e91IzsrexEefVDcaCVZX9gv0EZW3NNAnvn5zb5uIigM4GFMyx51n/7MCSh5 GdwhlfRWT2lDhpwn1pYExua6/MgAZvsIqM1jRRPF+2ElI/HRXp2nVpVkOSGMl8BErrt0 1FMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=boWQWqC3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si76332pjv.58.2019.06.13.08.52.34; Thu, 13 Jun 2019 08:52:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=boWQWqC3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732079AbfFMPvE (ORCPT + 99 others); Thu, 13 Jun 2019 11:51:04 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:50072 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731671AbfFMJMB (ORCPT ); Thu, 13 Jun 2019 05:12:01 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 45PdKT6DDszB09Zl; Thu, 13 Jun 2019 11:11:57 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=boWQWqC3; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id JrueQZJUsD0U; Thu, 13 Jun 2019 11:11:57 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 45PdKT59v1zB09Zg; Thu, 13 Jun 2019 11:11:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1560417117; bh=nw7s55nSCE5gZsdfCAQCVWUUIXEzDyTDYLqPEVTErBE=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=boWQWqC3D/XalcPnhPI/GyNq60NyTwjwLNLBvads62bU5FaTyZVFdwPXezhQuVOT3 apb9UxvasoerSAoIb92J3K1hpMlzF4xxDJQRpmuycX9o+cjyGMzijrfORaLBwBzRK7 17hclZKYm8GvtuOUJAXBdwZ71hXlRdZHqetTFYwA= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BA4F58B8CB; Thu, 13 Jun 2019 11:11:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id mGt5KfZ8d4MU; Thu, 13 Jun 2019 11:11:58 +0200 (CEST) Received: from po16838vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 765A68B8B9; Thu, 13 Jun 2019 11:11:58 +0200 (CEST) Received: by po16838vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 3730168B1D; Thu, 13 Jun 2019 09:11:58 +0000 (UTC) Message-Id: <3f5c27c0045fddab9e32d7450d2124e04dcf6205.1560416987.git.christophe.leroy@c-s.fr> In-Reply-To: <1930b7e67ab361e68f356e7fdeba403e32ce3ad0.1560416986.git.christophe.leroy@c-s.fr> References: <1930b7e67ab361e68f356e7fdeba403e32ce3ad0.1560416986.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH v2 06/10] powerpc/8xx: refactor printing of microcode patch name. To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , oss@buserror.net Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 13 Jun 2019 09:11:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Define patch name together with the patch code, and refactor the associated printk() while replacing it by a pr_info() Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/8xx/micropatch.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/8xx/micropatch.c b/arch/powerpc/platforms/8xx/micropatch.c index 410968a0b177..5e5ac2378d3f 100644 --- a/arch/powerpc/platforms/8xx/micropatch.c +++ b/arch/powerpc/platforms/8xx/micropatch.c @@ -26,6 +26,8 @@ #ifdef CONFIG_I2C_SPI_UCODE_PATCH +static char patch_name[] __initdata = "I2C/SPI"; + static uint patch_2000[] __initdata = { 0x7FFFEFD9, 0x3FFD0000, 0x7FFB49F7, 0x7FF90000, 0x5FEFADF7, 0x5F89ADF7, 0x5FEFAFF7, 0x5F89AFF7, @@ -78,6 +80,8 @@ static uint patch_2e00[] __initdata = {}; #ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH +static char patch_name[] __initdata = "I2C/SPI/SMC1"; + static uint patch_2000[] __initdata = { 0x3fff0000, 0x3ffd0000, 0x3ffb0000, 0x3ff90000, 0x5f13eff8, 0x5eb5eff8, 0x5f88adf7, 0x5fefadf7, @@ -194,6 +198,8 @@ static uint patch_2e00[] __initdata = { #ifdef CONFIG_USB_SOF_UCODE_PATCH +static char patch_name[] __initdata = "USB SOF"; + static uint patch_2000[] __initdata = { 0x7fff0000, 0x7ffd0000, 0x7ffb0000, 0x49f7ba5b, 0xba383ffb, 0xf9b8b46d, 0xe5ab4e07, 0xaf77bffe, @@ -235,8 +241,6 @@ void __init cpm_load_patch(cpm8xx_t *cp) #ifdef CONFIG_USB_SOF_UCODE_PATCH commproc->cp_rccr = 0x0009; - - printk("USB SOF microcode patch installed\n"); #endif /* CONFIG_USB_SOF_UCODE_PATCH */ #if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \ @@ -257,8 +261,6 @@ void __init cpm_load_patch(cpm8xx_t *cp) commproc->cp_cpmcr3 = 0x802e; commproc->cp_cpmcr4 = 0x802c; commproc->cp_rccr = 1; - - printk("I2C/SPI microcode patch installed.\n"); # endif /* CONFIG_I2C_SPI_UCODE_PATCH */ # if defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH) @@ -270,9 +272,9 @@ void __init cpm_load_patch(cpm8xx_t *cp) smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SMC1]; smp->smc_rpbase = 0x1FC0; - - printk("I2C/SPI/SMC1 microcode patch installed.\n"); # endif /* CONFIG_I2C_SPI_SMC1_UCODE_PATCH) */ #endif /* some variation of the I2C/SPI patch was selected */ + + pr_info("%s microcode patch installed\n", patch_name); } -- 2.13.3