From patchwork Fri Sep 24 10:56:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1532201 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=rEbFlMU8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HG8CN3GSTz9svs for ; Fri, 24 Sep 2021 20:58:24 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HG8CN1gsqz3bhq for ; Fri, 24 Sep 2021 20:58:24 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=rEbFlMU8; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=canonical.com (client-ip=185.125.188.123; helo=smtp-relay-internal-1.canonical.com; envelope-from=krzysztof.kozlowski@canonical.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=rEbFlMU8; dkim-atps=neutral Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HG8Bh6qfRz2ypC for ; Fri, 24 Sep 2021 20:57:47 +1000 (AEST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id C29AD40783 for ; Fri, 24 Sep 2021 10:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632481060; bh=5qaBnFV4UUYxgISb8cWftr5quOXHWqv70CjWCUQzcvI=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=rEbFlMU8mo7ueYnR6LSvRkBXiK7Mzhn5rOBhF0q8zil8+IvCBjtYCXRXavPw0uEC5 60Um72p954zqWnRo8UExZ9gmxQuxUqVJTcTUBPsI1SQ7+fxyUxXxQTGPAWaijBjZXV 0UO7Ogza2SRWMjswM7NljWef0H9VEB7jgA/IQZTsLaqA6DtWZlpWsBYz7VxDCeOI+B NTzc9ggJRHuRQM8lY+gQz/vtz5vuVL3j+tsj1t4pcVkxz4KHEiBQ2gTa7PN6E/Pyrh tQ/oUNAJ3u1aZ7ZpBWppKnR2vILDsykKNlOEfvY4eh7NAoLnylfgZ3BqM2p2fRf9GJ XxjHhftkNr1Rw== Received: by mail-wr1-f69.google.com with SMTP id s13-20020a5d69cd000000b00159d49442cbso7717285wrw.13 for ; Fri, 24 Sep 2021 03:57:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=5qaBnFV4UUYxgISb8cWftr5quOXHWqv70CjWCUQzcvI=; b=NV+lr7iCiqJceFZl2KzA1xNIHy8y/GTwPoyIsvhGKHko3sm8H8jJqtviyXi4OU0RBZ SVAN4PPcs9F5aoC2Ss+3uvjK1ju6l7oI8aqL16sD/Yraqx38YdiF5h7NKMChdSJWnulK lVA7FTuPZZ7DU6rDdzKEvJDSUdcOXgX4TS/VTHdMc/lfpuyZrwb/3MaLCph2Cg63G/PA HYeo5uTeKfYM09qjrt7yajOfvcw0L/god/IODMZDIQ/TeYDn2lwSe4d60bDSo6nQ1gCI 3Y8o/F8tBabBGzyuhTaICZL5KUjbyCUGbm6U/sj8KdFcQhir4B53dVFgqpTPQlAUnMR/ 5IGw== X-Gm-Message-State: AOAM531I98pfuT7WKWuUxAhCUlFBXUfYh1K2jk+isaREBrPQ4h0oAETo yqpNYdnXUVnyyDTdWz5BuR/0PcOFhiIzcekMuP6cmcGA0Kl3fldse6JIL7qfnDchgy8aZwF/Q1I qFaAtF3qiLSyK30zq4Y7tyVzs2rT5XhcPURQT65sKB88= X-Received: by 2002:a7b:cb49:: with SMTP id v9mr1372339wmj.76.1632481060502; Fri, 24 Sep 2021 03:57:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDVTGZH5QCPK7kyu8GVnvvhqoDPEvq8MgewAmm21kiS/2XNKEsaKIMI9R6BZZAQ/A08Z3BPw== X-Received: by 2002:a7b:cb49:: with SMTP id v9mr1372317wmj.76.1632481060111; Fri, 24 Sep 2021 03:57:40 -0700 (PDT) Received: from localhost.localdomain (lk.84.20.244.219.dc.cable.static.lj-kabel.net. [84.20.244.219]) by smtp.gmail.com with ESMTPSA id x17sm8188836wrc.51.2021.09.24.03.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 03:57:39 -0700 (PDT) From: Krzysztof Kozlowski To: Benjamin Herrenschmidt , Michael Ellerman , Paul Mackerras , Rob Herring , Frank Rowand , Krzysztof Kozlowski , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration Date: Fri, 24 Sep 2021 12:56:52 +0200 Message-Id: <20210924105653.46963-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" g5_phy_disable_cpu1() is used outside of platforms/powermac/feature.c, so it should have a declaration to fix W=1 warning: arch/powerpc/platforms/powermac/feature.c:1533:6: error: no previous prototype for ‘g5_phy_disable_cpu1’ [-Werror=missing-prototypes] Signed-off-by: Krzysztof Kozlowski --- Changes since v2: 1. Put declaration in powermac/pmac.h Changes since v1: 1. Drop declaration in powermac/smp.c --- arch/powerpc/platforms/powermac/pmac.h | 2 ++ arch/powerpc/platforms/powermac/smp.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h index 0d715db434dc..be528e0e507f 100644 --- a/arch/powerpc/platforms/powermac/pmac.h +++ b/arch/powerpc/platforms/powermac/pmac.h @@ -14,6 +14,8 @@ struct rtc_time; extern int pmac_newworld; +void g5_phy_disable_cpu1(void); + extern long pmac_time_init(void); extern time64_t pmac_get_boot_time(void); extern void pmac_get_rtc_time(struct rtc_time *); diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 3256a316e884..5d0626f432d5 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c @@ -875,8 +875,6 @@ static int smp_core99_cpu_online(unsigned int cpu) static void __init smp_core99_bringup_done(void) { - extern void g5_phy_disable_cpu1(void); - /* Close i2c bus if it was used for tb sync */ if (pmac_tb_clock_chip_host) pmac_i2c_close(pmac_tb_clock_chip_host); From patchwork Fri Sep 24 10:56:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1532202 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=dhLOQ8V7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HG8D52srxz9svs for ; Fri, 24 Sep 2021 20:59:01 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HG8D51TLBz3c7N for ; Fri, 24 Sep 2021 20:59:01 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=dhLOQ8V7; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=canonical.com (client-ip=185.125.188.122; helo=smtp-relay-internal-0.canonical.com; envelope-from=krzysztof.kozlowski@canonical.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=dhLOQ8V7; dkim-atps=neutral Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HG8Bh731kz2ypL for ; Fri, 24 Sep 2021 20:57:47 +1000 (AEST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id AFEB9402E0 for ; Fri, 24 Sep 2021 10:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632481061; bh=JVVwsOf7X0M/+qlOsF+1zUq32C7aF6kWbgyKr7RQdek=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dhLOQ8V7F4wVe75i3PP2WCguFKDr6BjyNVv5ua9EHpsxQ1BlMFCYvRQd3O85uqBUA cnb6WqfLCe680LwJR2RFNeUhI1PFNGxQmKWiz3E07Rv4vYMqaNQbmS1BAE3dIKXFJR HbRUnLeDviteJ/Ce4NuJh6i9mGan0LOi+wn57RWVfgufBC8sRisGFCqAwn17/FrOyr YAv2pXqMWjqJQiXad8KOtHc9l+msV98PkaY9c2bTmS3WvA5iqOZe8bt/6CGdYjt6kr eAGxBuEA2tLvsMI216Cn8tt/q0svwZG5o0CDApg8AxRXb46Ps3sk//WrQHcoScIA2G CJMF7J18rY6CA== Received: by mail-wr1-f69.google.com with SMTP id k2-20020adfc702000000b0016006b2da9bso7728840wrg.1 for ; Fri, 24 Sep 2021 03:57:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JVVwsOf7X0M/+qlOsF+1zUq32C7aF6kWbgyKr7RQdek=; b=VsrkLp4fQNX3ZKkJ+mYPQtrseemOJs20XcrgdstP8NYrM90kC4WYiGuvBXJ636bOJr +qQF+3tHfowhr+h3p44c5eiLTU9gNTTKq5ooAockDkNmySZ10T6NHvG56sE8ijZdReYC EisqsVWcCOFgOGpz7bIu3mEMCLWUw3OIJN5O9pDPjt7r70/qV6a8U06/5TW11FHN4yum 8rAmQFZvfGCseKZIofVGQZ4l+s+Xv33+HiYN+30sN3iTypMoJ1BbUmqOAL5xxKVuzswb 9uYnm0IKtojn1zO2QLEOr9NiI17jWx5AW9WVeOFqpxp1p/Cp0EoU/cAkhvA2wMPY6uFy olFw== X-Gm-Message-State: AOAM532caHvw/FYKe5GNn+X9x5mNb+s/B6RdrGGl6Z6fkrOZkgbag7LQ svmULI9fdKI7MsbhLczQN78ENLFw3SUYpUAAI7X1R75l7fRzsnkRsQK+rsVPWFmNYd72dDCO3Bz ggu3u2HgRz0X4gqfGOIsJV2Ky8GVBtF0Z7TfqiGvnxSQ= X-Received: by 2002:a05:6000:1a85:: with SMTP id f5mr10982712wry.25.1632481061422; Fri, 24 Sep 2021 03:57:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLYvzxMc9tP9qdmx2NxdiK+8VdwTUT+JMDAWIj2fLS9fniGFXTFwHyxW2JGc/QJ7sNrnQG5A== X-Received: by 2002:a05:6000:1a85:: with SMTP id f5mr10982699wry.25.1632481061305; Fri, 24 Sep 2021 03:57:41 -0700 (PDT) Received: from localhost.localdomain (lk.84.20.244.219.dc.cable.static.lj-kabel.net. [84.20.244.219]) by smtp.gmail.com with ESMTPSA id x17sm8188836wrc.51.2021.09.24.03.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 03:57:40 -0700 (PDT) From: Krzysztof Kozlowski To: Benjamin Herrenschmidt , Michael Ellerman , Paul Mackerras , Rob Herring , Frank Rowand , Krzysztof Kozlowski , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v3 2/2] powerpc/powermac: constify device_node in of_irq_parse_oldworld() Date: Fri, 24 Sep 2021 12:56:53 +0200 Message-Id: <20210924105653.46963-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210924105653.46963-1-krzysztof.kozlowski@canonical.com> References: <20210924105653.46963-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The of_irq_parse_oldworld() does not modify passed device_node so make it a pointer to const for safety. Drop the extern while modifying the line. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring --- Changes since v1: 1. Drop extern. --- arch/powerpc/platforms/powermac/pic.c | 2 +- include/linux/of_irq.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 4921bccf0376..af5ca1f41bb1 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void) #endif } -int of_irq_parse_oldworld(struct device_node *device, int index, +int of_irq_parse_oldworld(const struct device_node *device, int index, struct of_phandle_args *out_irq) { const u32 *ints = NULL; diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index aaf219bd0354..83fccd0c9bba 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -20,12 +20,12 @@ typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *); #if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC) extern unsigned int of_irq_workarounds; extern struct device_node *of_irq_dflt_pic; -extern int of_irq_parse_oldworld(struct device_node *device, int index, - struct of_phandle_args *out_irq); +int of_irq_parse_oldworld(const struct device_node *device, int index, + struct of_phandle_args *out_irq); #else /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ #define of_irq_workarounds (0) #define of_irq_dflt_pic (NULL) -static inline int of_irq_parse_oldworld(struct device_node *device, int index, +static inline int of_irq_parse_oldworld(const struct device_node *device, int index, struct of_phandle_args *out_irq) { return -EINVAL;