From patchwork Sun Sep 12 20:29:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 509613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6462FC433EF for ; Sun, 12 Sep 2021 20:29:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F00A61050 for ; Sun, 12 Sep 2021 20:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236527AbhILUar (ORCPT ); Sun, 12 Sep 2021 16:30:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236352AbhILUae (ORCPT ); Sun, 12 Sep 2021 16:30:34 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 946F4C061574; Sun, 12 Sep 2021 13:29:19 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id d6so11341150wrc.11; Sun, 12 Sep 2021 13:29:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zQP7uhtwMAP/xCI1kCq0LZ0EbLp5qp053nAfBZhyU9Y=; b=IKAN2GUCQ6Mv9/F+gKmY0ucfBSeNT+//byyZ0qnBJUDUJ65wewSlJRWn7tLuQAoJQN 9JOI3DjTJrje01FdNcni+7qr19VPe3VgcQKOnmwP4mpNmMmkOhzWAC/s1ZBdmKRzNXLx 0ll8XxKBISVzElno+yHHnX+jOq9epJUdGl/BhhnxLyqq5gIklNotRSEfi8p4vecXTcRw 4bvTkr5dNkwmTLOAhxFxQIb2g0bpX6p95psqF9WqoQWuMI8R2Z22Mn6ZWgLF9eMIhrux rSkUgWVG7BrGo+hHiFz7R624vfQpxZKIP5tvmWtYNbpigTQ/52YV+RJQPnm7Rt0sN0hL w3yg== 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=zQP7uhtwMAP/xCI1kCq0LZ0EbLp5qp053nAfBZhyU9Y=; b=cds04iTwtSC2+Xz8tBAK4A+3ykRTYX6D9ckb+V1c290HRW8ZcCjHtSEImJ5KJTlYq7 cjwLLMIcotEBTSNAW2qkaQsHKtAhHclCjsZjmoD3iLjR40JaQtRlrd/BAlak3GUtOSls EX2vwJ/fHB4sS574/YqHGQg3j/Qp6x5Lg3b5ajT+Bg0KrIRfcKg3QHmgFW17Ix9WAEYz HhwR+E12DK+CIC3SjOTb6XEWc2na/aHiu0yBs+zPfYWSqQ2g6tjRafR7DjcnFLoTKqda d3owG9MyhsmUOKCbytJqtaUh+0Ax6o1UEa1+PwkVsLrObqBDEZ5GP3rFJxHP1T8F1v4E cPfQ== X-Gm-Message-State: AOAM533YAd70O3xfc48tBaK9OgW8bpVCwqBO1kkkco/qkqdLuDCu2nFp gYcFdzjukRKeetN4YTkXat0= X-Google-Smtp-Source: ABdhPJybfeg9iibdbGDxMWZO+26ryO8/vNJBqwfU3phrQQs8rkpNaIpW7aPJzLJpwj1dl/L1lBaxCg== X-Received: by 2002:a5d:6a8f:: with SMTP id s15mr4191081wru.15.1631478558194; Sun, 12 Sep 2021 13:29:18 -0700 (PDT) Received: from localhost.localdomain (46-138-83-36.dynamic.spd-mgts.ru. [46.138.83.36]) by smtp.gmail.com with ESMTPSA id k29sm4847466wms.24.2021.09.12.13.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 13:29:18 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/6] soc/tegra: fuse: Add stubs needed for compile testing Date: Sun, 12 Sep 2021 23:29:02 +0300 Message-Id: <20210912202907.28471-2-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210912202907.28471-1-digetx@gmail.com> References: <20210912202907.28471-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add stubs needed for compile-testing of tegra-cpuidle driver. Signed-off-by: Dmitry Osipenko --- include/soc/tegra/fuse.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h index 990701f788bc..67d2bc856fbc 100644 --- a/include/soc/tegra/fuse.h +++ b/include/soc/tegra/fuse.h @@ -6,6 +6,8 @@ #ifndef __SOC_TEGRA_FUSE_H__ #define __SOC_TEGRA_FUSE_H__ +#include + #define TEGRA20 0x20 #define TEGRA30 0x30 #define TEGRA114 0x35 @@ -22,11 +24,6 @@ #ifndef __ASSEMBLY__ -u32 tegra_read_chipid(void); -u8 tegra_get_chip_id(void); -u8 tegra_get_platform(void); -bool tegra_is_silicon(void); - enum tegra_revision { TEGRA_REVISION_UNKNOWN = 0, TEGRA_REVISION_A01, @@ -57,6 +54,10 @@ extern struct tegra_sku_info tegra_sku_info; u32 tegra_read_straps(void); u32 tegra_read_ram_code(void); int tegra_fuse_readl(unsigned long offset, u32 *value); +u32 tegra_read_chipid(void); +u8 tegra_get_chip_id(void); +u8 tegra_get_platform(void); +bool tegra_is_silicon(void); #else static struct tegra_sku_info tegra_sku_info __maybe_unused; @@ -74,6 +75,26 @@ static inline int tegra_fuse_readl(unsigned long offset, u32 *value) { return -ENODEV; } + +static inline u32 tegra_read_chipid(void) +{ + return 0; +} + +static inline u8 tegra_get_chip_id(void) +{ + return 0; +} + +static inline u8 tegra_get_platform(void) +{ + return 0; +} + +static inline bool tegra_is_silicon(void) +{ + return false; +} #endif struct device *tegra_soc_device_register(void); From patchwork Sun Sep 12 20:29:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 509614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4238C4332F for ; Sun, 12 Sep 2021 20:29:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94BFE6108E for ; Sun, 12 Sep 2021 20:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236396AbhILUai (ORCPT ); Sun, 12 Sep 2021 16:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236372AbhILUaf (ORCPT ); Sun, 12 Sep 2021 16:30:35 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54B3EC061762; Sun, 12 Sep 2021 13:29:20 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id d6so11341176wrc.11; Sun, 12 Sep 2021 13:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JTbm+Ivds98cb9V5q8q1C/zZH2NCdOMIxgLjAuUIi4Y=; b=QdWTkWXDkHr1OL1oUfrE+dECJvDZkBMO98M5MBCU2R8F6tt47tXHBM72yq7z85SzOs b8T/Lgz5zoU/tOWehQFeBfYsFU7xBSPFKMjO+dErY2llrYtII90K67dkk0qVCgqoL/XS KGUjU8e870h2J57SuTHzRDxat/KdQKvk/aFP7TnQclG2P+60qLgV6FRoZLa/k9wHCs8i TCXdOJWrxlpbr6i6KFKYJJxspQqmWeKgPA8kssvCRWoH+w/4jbOnaHh13mVXx0M8mk6t 1UrD5h+oNXFl9CTzMXoclhEsy/1hUMmZ83918ADBhOFCt+gpH3yIG3R5iW4eRoQ+ebf/ jTrg== 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=JTbm+Ivds98cb9V5q8q1C/zZH2NCdOMIxgLjAuUIi4Y=; b=TgdFdWDHvqVdmxlk9GESheysw+LC+BIXXm9IQS/D/1LkL+v7uL+72VtkD7AGiGI18I qd4zeGsF490PtYZHptoCrLnZH+ZsTVDXwq7Pt9Q0apWc6iQmTK/2Z7Z2AVI/YsAMzcaA RlbqttehqdRpSsLzpdGw0fMCCLMBrxRM2/fEMemyVH7BLEEb7vqchIu7LogOjqqbDS85 8KmEtZIO2nklPJYkPsm8lIQ0BJ4tNeH6wisNzfLSsZhpeofVBYHmHdNLRNc8ow22N1tl ixBIR+uMRd93ytkjjbbwPKylnozqsl54+gyB1vQvBJNaUVUc/Ph6vhsb7Fv+bXWU4EXZ g6RQ== X-Gm-Message-State: AOAM5310hRXSpI28s5sCr8+jdlyPSA9IGK5U6cvXB9NTm+MklJGfHxui JJVwBKBVljdteiU0DRhXvGE= X-Google-Smtp-Source: ABdhPJwx6tSscBJiPzgeceppiIUbf4P3AF4lYVjjAILZ4ZG14NRxwmFtq7F+tTtUa6kn6EIHen6JjQ== X-Received: by 2002:a5d:67c8:: with SMTP id n8mr1616735wrw.122.1631478559016; Sun, 12 Sep 2021 13:29:19 -0700 (PDT) Received: from localhost.localdomain (46-138-83-36.dynamic.spd-mgts.ru. [46.138.83.36]) by smtp.gmail.com with ESMTPSA id k29sm4847466wms.24.2021.09.12.13.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 13:29:18 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/6] soc/tegra: irq: Add stubs needed for compile testing Date: Sun, 12 Sep 2021 23:29:03 +0300 Message-Id: <20210912202907.28471-3-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210912202907.28471-1-digetx@gmail.com> References: <20210912202907.28471-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add stubs needed for compile-testing of tegra-cpuidle driver. Signed-off-by: Dmitry Osipenko --- include/soc/tegra/irq.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/soc/tegra/irq.h b/include/soc/tegra/irq.h index 8eb11a7109e4..94539551c8c1 100644 --- a/include/soc/tegra/irq.h +++ b/include/soc/tegra/irq.h @@ -6,8 +6,15 @@ #ifndef __SOC_TEGRA_IRQ_H #define __SOC_TEGRA_IRQ_H -#if defined(CONFIG_ARM) +#include + +#if defined(CONFIG_ARM) && defined(CONFIG_ARCH_TEGRA) bool tegra_pending_sgi(void); +#else +static inline bool tegra_pending_sgi(void) +{ + return false; +} #endif #endif /* __SOC_TEGRA_IRQ_H */ From patchwork Sun Sep 12 20:29:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 510103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F35C0C433F5 for ; Sun, 12 Sep 2021 20:29:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD4256103D for ; Sun, 12 Sep 2021 20:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236451AbhILUam (ORCPT ); Sun, 12 Sep 2021 16:30:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236382AbhILUag (ORCPT ); Sun, 12 Sep 2021 16:30:36 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A050C061764; Sun, 12 Sep 2021 13:29:21 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 192-20020a1c04c9000000b002f7a4ab0a49so4092794wme.0; Sun, 12 Sep 2021 13:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w+ldZ6zVWXwe3g3Zo8gamYTapy9Dc2w3F5/3/sLNYtQ=; b=Tx8VwqZ98CsA/xnJcPa67JWpsLa0ggEdSMyMfWGPbSpFXirGrCzhRFb+/9IGTtYQfn AYnZQY9iOjqT9Ixdgpr4bBpKA9AucXADQZs13opRWGWvjC4ODHry1tRFvys7PzZ5+922 obyhYjdVoXNSomVoOWAM24JrybXBTau+9oroafJGaki5WlQ5ZfxJJxdbN50igu/IFr92 Tq8q5TUWCePqk0W75uzK84hkBrw9a0/ETEEHH4WTOdasX4PWAP6/vY8amR6WUVapsVN5 nDF7UuxvcSFfAjb0FwCzYt0qZUHPzPsTDPIaS7hGM9+fAY8HPHrhgS32EpsMSJW0fk8Q sGEw== 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=w+ldZ6zVWXwe3g3Zo8gamYTapy9Dc2w3F5/3/sLNYtQ=; b=JJwujND+Cq9kzMFxqJYh5seb/4zh2mN9aJn9PR+mwbobiQeV/vq9pPXltVmekIi8wv 54sYd8dITSSBk9yaDaVEdDjoO7t7of8+gIoDYpFu/UPb5YttRxEpGvn8lbzgzirAMP8s 05DzvXjMu1UTfr+xxvRKiJwpkL+eCFWGheKCuefGh27mhkP9cykQPTe1EPJcxCuqGFrY hMmFA0ytcsyFcEIzeTP2K5bGylg36wgkdl4i8lC9cEqp1TQfzeTBeXkGL+5/rheGGvIp iXLwmEZZRa3mxC+nt/HHJfJltSvVvtTQqo5w3U+7mYS7j02DYCQIX/Y6LcmfqCccS0hJ Bjhw== X-Gm-Message-State: AOAM530zfIU0cwFD+IxzslZVa8oEs6yUHIfvnmdbOBSnHMmgU6JVQfuI ggRyLPtvGHwfC90TiC2kYcQ= X-Google-Smtp-Source: ABdhPJx15WYSxITWAhHDQmYgMkWxC0uVFyH3DGO4sYsZC64xIT4caSMc1pqFtEVVN9C301vvdiA/vQ== X-Received: by 2002:a1c:d2:: with SMTP id 201mr7735259wma.67.1631478559796; Sun, 12 Sep 2021 13:29:19 -0700 (PDT) Received: from localhost.localdomain (46-138-83-36.dynamic.spd-mgts.ru. [46.138.83.36]) by smtp.gmail.com with ESMTPSA id k29sm4847466wms.24.2021.09.12.13.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 13:29:19 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/6] soc/tegra: pm: Make stubs usable for compile testing Date: Sun, 12 Sep 2021 23:29:04 +0300 Message-Id: <20210912202907.28471-4-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210912202907.28471-1-digetx@gmail.com> References: <20210912202907.28471-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The PM stubs need to depend on ARCH_TEGRA in order to be usable for compile-testing of tegra-cpuidle driver. Add the dependency. Signed-off-by: Dmitry Osipenko --- include/soc/tegra/pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/soc/tegra/pm.h b/include/soc/tegra/pm.h index 433878927026..ce4d0b1bd0d6 100644 --- a/include/soc/tegra/pm.h +++ b/include/soc/tegra/pm.h @@ -17,7 +17,7 @@ enum tegra_suspend_mode { TEGRA_SUSPEND_NOT_READY, }; -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM) +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM) && defined(CONFIG_ARCH_TEGRA) enum tegra_suspend_mode tegra_pm_validate_suspend_mode(enum tegra_suspend_mode mode); From patchwork Sun Sep 12 20:29:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 510104 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A21CC43219 for ; Sun, 12 Sep 2021 20:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25DEC6103D for ; Sun, 12 Sep 2021 20:29:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236499AbhILUao (ORCPT ); Sun, 12 Sep 2021 16:30:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236383AbhILUah (ORCPT ); Sun, 12 Sep 2021 16:30:37 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73112C061574; Sun, 12 Sep 2021 13:29:22 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id i23so11367674wrb.2; Sun, 12 Sep 2021 13:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cZO3c0fpnwQfqDRvDUKCPGXMXP2rFLnO7bySGQVOuzg=; b=Ydfa+q6BwqoWYTb3uTbbugDmElpcXeMJKd7IUmktBODwQDdzCtRfN9jEIWR0MegiIY lvx19ENUVFkK8sVlc2wyoaFAQ/ry6evxQ+2/2NSRorWgf17bpechZHo5kEw1ZarcWzJ1 nrDfXD0sDq+LVMaaIvptcpaKIC3WIKnkcevHEILQDwIxpmNIRQhgfHJFcSTDtdxa1MPX qxycbTbL1Bz1kOgmiRWh8ZBk+vO9Wfrg3gdR5Uuk6OFfXhF20JNBZvO4Ev9eN/AMrOzQ meGST2SkhQs1zHX9VX0uHYu37bkL5aUIVKV8xhV/noh6IxepvK5zK+Lbm0pWNTiU01Cb RTdQ== 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=cZO3c0fpnwQfqDRvDUKCPGXMXP2rFLnO7bySGQVOuzg=; b=EATYU66HIFYUIHP03cMecAwyGcZVLwLclyghDB9szF4kKzRqBrWH9se8VoyZzrmbaA QB629CgUHHsz7CO9j9NQiLwEBGS37BboR93ovOKdgwiYyoHvPD7tgVfXghtjWB3D6BY6 /jQkyC2ofErHYTQ2YqnbxDw9rZyCKQkmF1RSCadhhJYRshyuMKEebBEfjVQeXfbmqvLr TN4jfk6M2UM/JTy3mRsVYFHDVfgBjGCEVVkUoKLM17+s/ADajgD46sKhgmyc5aWCDAVn 1lW0xly4f+XbyGlwTJlZHls2f66Lb7Mna/QA1Ni1i9pRxbX+THrwIxy1DeyEB8bJVLTl r5ww== X-Gm-Message-State: AOAM531E7DA1YXVfcKKmHdMvkSAg7MgJ4Xv9PHh4rPlVNMxxo9zqxlwu TWAWGyTGcQOKVttB7SIxmYw= X-Google-Smtp-Source: ABdhPJwM0nLTIrYP/wtpMt2yYOSJNezEQsNl15O/3gO37O6ItP2azMWA+DWR30tWaoQ1BhnOMvz2VA== X-Received: by 2002:adf:9d45:: with SMTP id o5mr8875561wre.226.1631478560629; Sun, 12 Sep 2021 13:29:20 -0700 (PDT) Received: from localhost.localdomain (46-138-83-36.dynamic.spd-mgts.ru. [46.138.83.36]) by smtp.gmail.com with ESMTPSA id k29sm4847466wms.24.2021.09.12.13.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 13:29:20 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 4/6] clk: tegra: Add stubs needed for compile testing Date: Sun, 12 Sep 2021 23:29:05 +0300 Message-Id: <20210912202907.28471-5-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210912202907.28471-1-digetx@gmail.com> References: <20210912202907.28471-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add stubs needed for compile-testing of tegra-cpuidle driver. Signed-off-by: Dmitry Osipenko --- include/linux/clk/tegra.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h index d128ad1570aa..9bd06d8a5436 100644 --- a/include/linux/clk/tegra.h +++ b/include/linux/clk/tegra.h @@ -42,7 +42,11 @@ struct tegra_cpu_car_ops { #endif }; +#ifdef CONFIG_ARCH_TEGRA extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; +#else +static struct tegra_cpu_car_ops *tegra_cpu_car_ops __maybe_unused; +#endif static inline void tegra_wait_cpu_in_reset(u32 cpu) { From patchwork Sun Sep 12 20:29:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 509612 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8EA8C433F5 for ; Sun, 12 Sep 2021 20:29:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DB5761050 for ; Sun, 12 Sep 2021 20:29:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236584AbhILUav (ORCPT ); Sun, 12 Sep 2021 16:30:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236390AbhILUai (ORCPT ); Sun, 12 Sep 2021 16:30:38 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6BDEC06175F; Sun, 12 Sep 2021 13:29:22 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id t18so11411505wrb.0; Sun, 12 Sep 2021 13:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a0H54VcaSkULvQ0XfRhbooC/ZXW5WM4Ks5Bh/dzSIL8=; b=Hm8kwc9+ak0NQvURspJVzZlnw2P1MvUPDLATWgiisBkeG2XJTi+80RgVDkxolXnBPR CrVUDcXylOqzqU20VLb/ba+VYwJnCjQHeRJ8zWpUOYC0S9X6Gq+C111DBQyMZPOnJlWj bExfAMWsXn3D2tAwuzp/vhBFQQQyX/syil99wuC9M/WyXlFczDSXykBQENS4yWjZ2Zb3 Xad8W3kR1vK81VSVkQQkx7CG22w9mKEEG8HW59hVEHtur5PRVITiylNUJQUSnuEn000b vbIgfhJteFP3AYgir4m6tp/ZW2DdIYTqp0aYDV3BplUtPSyAuwgafhGEmz26t1UdHGiZ fG+A== 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=a0H54VcaSkULvQ0XfRhbooC/ZXW5WM4Ks5Bh/dzSIL8=; b=BsWQ7TnhD96u1Xby3+faTLSBnGbZ8MNfn1g/4WawyfQ4NZOjSMTQGXamSWxJkdDbBC LIxV/LL0q+pFW/Y/ObOBwGcuGcJsB6bhbVii547CZw8WarZqnvNjb65Vne5RznjSBQ0Z NA/aoGk1B12uuyLu8XhuBie9EDYcpiNb+zxnwHwYIbrmtxg+vH57YUe6wAy9zTsEI/FE OFamrfbAnZbN4HnqGAR2KjCt+gluUYyF6Xt/2sKp1i5JjAfu0asseE+EyvuZRt/haCzM VloQHlW7cnPUzvo/oa2nw0KgDLwucBD4jqwL5P9ddGujJjkwE7V/Pp6T/ktokQMjSg+A 3BCg== X-Gm-Message-State: AOAM5309NUvfWzk/m1M0//DBgAIeiHyydA17QD627M3mNp++iV5ZxOxD fZiQEugT5+3bQX/HncbRtJsBWQhs9XY= X-Google-Smtp-Source: ABdhPJwh2PUp3Py6hlk1c6sbav2J9iqh9ayK+eVHYQ9Or7wUlnyUeeZgVt0FRJMgGwLgO+R2wWNCCQ== X-Received: by 2002:adf:f789:: with SMTP id q9mr8868994wrp.367.1631478561454; Sun, 12 Sep 2021 13:29:21 -0700 (PDT) Received: from localhost.localdomain (46-138-83-36.dynamic.spd-mgts.ru. [46.138.83.36]) by smtp.gmail.com with ESMTPSA id k29sm4847466wms.24.2021.09.12.13.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 13:29:21 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 5/6] cpuidle: tegra: Enable compile testing Date: Sun, 12 Sep 2021 23:29:06 +0300 Message-Id: <20210912202907.28471-6-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210912202907.28471-1-digetx@gmail.com> References: <20210912202907.28471-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Enable compile testing of tegra-cpuidle driver. Signed-off-by: Dmitry Osipenko Acked-by: Daniel Lezcano --- drivers/cpuidle/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm index 334f83e56120..599286fc0b08 100644 --- a/drivers/cpuidle/Kconfig.arm +++ b/drivers/cpuidle/Kconfig.arm @@ -99,7 +99,7 @@ config ARM_MVEBU_V7_CPUIDLE config ARM_TEGRA_CPUIDLE bool "CPU Idle Driver for NVIDIA Tegra SoCs" - depends on ARCH_TEGRA && !ARM64 + depends on (ARCH_TEGRA || COMPILE_TEST) && !ARM64 && MMU select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP select ARM_CPU_SUSPEND help From patchwork Sun Sep 12 20:29:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 510102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84C6CC4332F for ; Sun, 12 Sep 2021 20:29:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7584B61056 for ; Sun, 12 Sep 2021 20:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236427AbhILUat (ORCPT ); Sun, 12 Sep 2021 16:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236394AbhILUai (ORCPT ); Sun, 12 Sep 2021 16:30:38 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3737C061574; Sun, 12 Sep 2021 13:29:23 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 192-20020a1c04c9000000b002f7a4ab0a49so4092822wme.0; Sun, 12 Sep 2021 13:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AyR2ZkcURDXZDRYrzrABh/RSFyxFVolgF84p/Vdxxs4=; b=PHowcovkSxmFNc7rDqbAaw/nK3EGGSgworhe+XIqHDgcpV4uR5CYEuiVVaSPJLdHm0 WhONSaRXZBV/FYrpLbtHGLLuS2bOwIRYDiKZzehqbk3wZzcJTGRFBklJrvyvCq2np4QF 55lrWUqMUjsKYh9bVY0wrHy+MvaMmgMeNeWm09/AaQxhk+wi+jk17L56Br+w0YN/WngI mupvOvCAqaNsxOBQJcxw3IpGYf6nqcOynnFWNE5t3XGCaSsmwEz1+QTTRg0JpJcdIuRI 7ih6+4MXjWW7KyjjByqtsoFW+GHfSO6DH/5W0mySd4jK7v+81TtQfhTLqp8TfXIh8igq 2zSw== 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=AyR2ZkcURDXZDRYrzrABh/RSFyxFVolgF84p/Vdxxs4=; b=msZrLQvuoJ6DRC2e6jW/6OyVRQInNR2DYi6vLawj1wwLrZfvLxXc09+LTc9kDmLyG7 BZJSa1vity3A9Y5BEEuo9wc/QRBbs+WLpSGFBCAcyS4Kcc9a4FjAEMfrR4u+2IpdFRYl xDXn4UCGXN14oZlQhHRxyfqL4dS6XQbp2eCZ8YaKo7kQcXsHULNz4z7bBgl8C1JFw/QP vbxFJLC+wYVFKjqumwAxmYbZC+D/I+LbRs7MxDvs9dIRilCT8AOLr6BCpIfaTuYf9KAx aSV/3ypy/1XObRhrSF8cAwjZPYRtR99Er01F83L/zm0CsFnMA7cUupPkGcWXZuVUZd+X cPcw== X-Gm-Message-State: AOAM533Xujo4ZNP0MlJoJfxmWGMSyiB9gY2OhftOUhTvlRFaXBDlyO/K og1l368mCrEkN8X/5qlZvTU= X-Google-Smtp-Source: ABdhPJwaQJpPBxnSEbswZ3ufsNkRQ98oLdVp8bOzBFhqsGULp3N+srvHJAL+Obyl0243K8JIXkf3Gg== X-Received: by 2002:a05:600c:2046:: with SMTP id p6mr8193149wmg.132.1631478562295; Sun, 12 Sep 2021 13:29:22 -0700 (PDT) Received: from localhost.localdomain (46-138-83-36.dynamic.spd-mgts.ru. [46.138.83.36]) by smtp.gmail.com with ESMTPSA id k29sm4847466wms.24.2021.09.12.13.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 13:29:22 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Daniel Lezcano Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 6/6] cpuidle: tegra: Check whether PMC is ready Date: Sun, 12 Sep 2021 23:29:07 +0300 Message-Id: <20210912202907.28471-7-digetx@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210912202907.28471-1-digetx@gmail.com> References: <20210912202907.28471-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Check whether PMC is ready before proceeding with the cpuidle registration. This fixes racing with the PMC driver probe order, which results in a disabled deepest CC6 idling state if cpuidle driver is probed before the PMC. Acked-by: Daniel Lezcano Signed-off-by: Dmitry Osipenko --- drivers/cpuidle/cpuidle-tegra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c index 508bd9f23792..9845629aeb6d 100644 --- a/drivers/cpuidle/cpuidle-tegra.c +++ b/drivers/cpuidle/cpuidle-tegra.c @@ -337,6 +337,9 @@ static void tegra_cpuidle_setup_tegra114_c7_state(void) static int tegra_cpuidle_probe(struct platform_device *pdev) { + if (tegra_pmc_get_suspend_mode() == TEGRA_SUSPEND_NOT_READY) + return -EPROBE_DEFER; + /* LP2 could be disabled in device-tree */ if (tegra_pmc_get_suspend_mode() < TEGRA_SUSPEND_LP2) tegra_cpuidle_disable_state(TEGRA_CC6);