From patchwork Wed Oct 6 16:43:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 515360 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp590221ime; Wed, 6 Oct 2021 09:43:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLHVy6xGwAKmuIr/zLRF3LeAtmy0PdixG09Cbs+mbxakw/qHOtsSiWKZhwTqK8STr7NtAp X-Received: by 2002:a17:907:7803:: with SMTP id la3mr34252586ejc.235.1633538628562; Wed, 06 Oct 2021 09:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633538628; cv=none; d=google.com; s=arc-20160816; b=y6kOx2Eg6n0CLhLPPNuPanHzsCbYoma0QSGBPOYVUoMQrFXNpDjAnsuRb7XRFXpSOJ Wsk/m82H/32xeaT8N+/a4K7eHjB4nvrF7do0NjfDw3l2GrDkzuc3DbvMM+fOSjUtki0S EUhUtfOYE9fkhpwlLVollD1V1YLQT34Tfb/p6zd45V7nzoWLuwwacPircnDo73C117Lm bIQkbkX2/AuIoALTIBbWC87iCrTzS6w698Z25bvucb2gbTpiTHkqIHJHluXBxdW6oTvz aqlOM0s85DNn+DoqoO2HfqQ0G6EDgDHCHwx8Dres+bJ21Bx5F+XNdcNSo7q2Tqd5Ea6F e6oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SdvZjQ/BWS45GZwLPJ4dVbNMr/Wj7uXKHO/Bl7X5Es4=; b=ryNZDObIQFEzSLiwXZ9spjKOCY/IkjE46J3kvZVoGjmZcWASKbJ3Z4rZMi5YbyD722 Ka9jhvGRtafLPEjIMI7chl6uPZQHuN8Zv+1uT94PF6oTFsykbDIUlOIMLnqMiAHyZIA0 MjGa7GFuodraruKHeCPPOy2MoaVuOxWEuvLWeLb9vy7LqbLBe56SuxPnFC/iFmQbocQN k7Y/PbdQgfZ+mJ2VSYxqPunBQPUnXrU6zcHMJdlTi8g8a9s7eWtW1joT7EsND3ADQ8kj hEjmufWEYEfL3B8Fqm2ZjlcwDjS6t6uanx/nkD3JUiU+JkoJa2Sre8EZpJEugPclMcNm Fktg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b3si19117438ejp.504.2021.10.06.09.43.47; Wed, 06 Oct 2021 09:43:48 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239415AbhJFQpf (ORCPT + 7 others); Wed, 6 Oct 2021 12:45:35 -0400 Received: from mail-oo1-f50.google.com ([209.85.161.50]:41971 "EHLO mail-oo1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239395AbhJFQpd (ORCPT ); Wed, 6 Oct 2021 12:45:33 -0400 Received: by mail-oo1-f50.google.com with SMTP id b5-20020a4ac285000000b0029038344c3dso1022241ooq.8; Wed, 06 Oct 2021 09:43: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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SdvZjQ/BWS45GZwLPJ4dVbNMr/Wj7uXKHO/Bl7X5Es4=; b=oU55qGR6BHceUgiewU1iBrshR/CxA3A9igLkdkXMmtO5+kFjEQcJVZoUvP9rFh7XHE /+U2bTaQDZevTs0Dh5mWc0IYfhGY0ke6qSdsr2ZsgLETkpwkow8jzBKKdkSTBJAZZfTA d3UG0CKOsVd/yAvkDvKpNK94QZbvaZsJL7Rhr3q4EKqFtIQIPS63sgvpoGL3k49zNMFG zFFuyK0CLOCzemTQ8rRxqBMKLNSqY0R2HBvXDe5lS9TUQeMRxdpE7GwaKzv/bqTCDGqc 7wY7cWM66PXzWvG5jIORTVl+KkHUMo5DT0KaBtoRBd8z23GT2WQpWcxsuMWaXVLJUWR2 ASJw== X-Gm-Message-State: AOAM530SdEENQYPczjZ7XJWdg7qpyXpIizsimlPvs6KzIFbBOoR+Ddse 3yjzuS6q5+N3HDPCtXxUhw== X-Received: by 2002:a4a:4c46:: with SMTP id a67mr18657206oob.72.1633538621020; Wed, 06 Oct 2021 09:43:41 -0700 (PDT) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id s29sm4236628otg.60.2021.10.06.09.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 09:43:40 -0700 (PDT) From: Rob Herring To: Russell King , James Morse , Catalin Marinas , Will Deacon , Guo Ren , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Michael Ellerman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , x86@kernel.org, Greg Kroah-Hartman Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "Rafael J. Wysocki" , Frank Rowand , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 03/12] ARM: broadcom: Use of_get_cpu_hwid() Date: Wed, 6 Oct 2021 11:43:23 -0500 Message-Id: <20211006164332.1981454-4-robh@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211006164332.1981454-1-robh@kernel.org> References: <20211006164332.1981454-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Replace open coded parsing of CPU nodes 'reg' property with of_get_cpu_hwid(). Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Russell King Signed-off-by: Rob Herring --- arch/arm/mach-bcm/bcm63xx_pmb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.30.2 Acked-by: Florian Fainelli diff --git a/arch/arm/mach-bcm/bcm63xx_pmb.c b/arch/arm/mach-bcm/bcm63xx_pmb.c index 0e5a05bac3ea..003f1472ab45 100644 --- a/arch/arm/mach-bcm/bcm63xx_pmb.c +++ b/arch/arm/mach-bcm/bcm63xx_pmb.c @@ -91,10 +91,10 @@ static int bcm63xx_pmb_get_resources(struct device_node *dn, struct of_phandle_args args; int ret; - ret = of_property_read_u32(dn, "reg", cpu); - if (ret) { + *cpu = of_get_cpu_hwid(dn, 0); + if (*cpu == ~0U) { pr_err("CPU is missing a reg node\n"); - return ret; + return -ENODEV; } ret = of_parse_phandle_with_args(dn, "resets", "#reset-cells",