From patchwork Tue Aug 13 08:27:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13761546 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F759C52D7B for ; Tue, 13 Aug 2024 08:28:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=j+WcU1i8Pfa7H0Uw57fEoiqtGdX8zfLORzxJutrBiD0=; b=G8i/mdReiXf+wZx/HsCP99FriW Vj8Uv0XD7miIjE7cQWs8PcK6ZZoL6qiKxfiT3iYcZKrPp+uFBI7hj/h543SCbNunc9fQl9/h4C13b BNxg+9ppZaGuQzQNa9BqMwp+2i89pguBGA0k9EkRFRoaQVvCUS1/ZYQ+bbEZzUqBAsCasSLhDbno+ CuwNi4Puh+R6a5aGd/sGgUZ6hwjf0V+9rV2mdHFHKFf2qazHzIFo7SGPJBbX900wP2QzdgFacgGUY 5bPVaguCKM3Q5hmwOS2Vc9/4phNrzYg5hAn/mcPRD73T/CIwKU16EvfzfOQFaOIsGDYtosWPPgpH8 YMstLgzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdmtC-00000002u7q-1Unl; Tue, 13 Aug 2024 08:28:22 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdmsW-00000002trT-0Szp for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 08:27:41 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52f025bc147so6006446e87.3 for ; Tue, 13 Aug 2024 01:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1723537658; x=1724142458; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=j+WcU1i8Pfa7H0Uw57fEoiqtGdX8zfLORzxJutrBiD0=; b=FoDp21gVrJSuAk+pOkeawr3tveWlc2b585DDGUulydgWjp0SNVu+UdCOsztNJ+Sg7H 4bN1s2eL2rHE2IUfrbtRkQixgPUo/Zg5nAlvQetvyYA7YvK41AWegH+GuJUgivF269ec Kjxh/nfxE1vo+N0NkM4mg2Hrr0qnrQ2wbCTTjvhETNDQWyF7++N4NdoqsCJeSoJBHRH+ jbKADZK/7ol5dkGOlVudaW/0+4/jz5oPQEABu+12va4ytB1oVi8m5uJG9PrqWgJQof6Z IFUDXuryrULyN6gN/aXlQKeUyX5AjkzWCCjwS2WQYVxs6yjcdxSO1cXGEzdZ66pxM67y hhCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723537658; x=1724142458; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j+WcU1i8Pfa7H0Uw57fEoiqtGdX8zfLORzxJutrBiD0=; b=saJrVjOpQYd2oHGX94FzvJQTprORqgklQK73KLy0Rg5GYBTBCLuSYl/UVnPHz8LH/E Lr9nhfurPCQRnSZ1wYzGSDMa/b1y3siRx0xMvbZVAD4IUmA8zWkIfea5eOv/F2M54GLC FaiK4eGiWaGGe6Xzl0cxo9aXSIZV4ojkur9BJg6W7JuMUw17/RCALOsb6+ND3eUiJ54+ eol1MP8SO6rPzc+07zQKW/LbJjSa1Z1Xp34o4eZJZWYUCBovQLr7VDSPvZnFDR15KaOk whQv7zpJdho5diRKbWq5Y156qh/pCcvj7qKDnbjq8GLQ4tlEShkeji2qX/3z9x0NLdpx aU8Q== X-Gm-Message-State: AOJu0YxoelIOVfs26Io9gbEUtgJDIy3JGeF6yulj5yLBlJEl4WjTNzpC aOBELw68bOCdUUiYu8gx9kSSTWClkhdJoM9CU2McJmOdOCK7k0lOGNHGz9weUEk= X-Google-Smtp-Source: AGHT+IGMAfyqcznoapwAUt9cItTGv63DkeWVVnGXL12Ac4luSAMASdQbRlHZOzzQ21n7a3N4b4VP8w== X-Received: by 2002:a05:6512:b25:b0:52c:def4:386b with SMTP id 2adb3069b0e04-532136637b3mr1972548e87.35.1723537657992; Tue, 13 Aug 2024 01:27:37 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:3979:ff54:1b42:968a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429d781047asm13865605e9.0.2024.08.13.01.27.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 01:27:37 -0700 (PDT) From: Bartosz Golaszewski To: Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH] ARM: davinci: remove unused cpuidle code Date: Tue, 13 Aug 2024 10:27:35 +0200 Message-ID: <20240813082735.52402-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_012740_175805_40DD7420 X-CRM114-Status: GOOD ( 18.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski The cpuidle driver in mach-davinci is no longer used by anyone. Remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/Makefile | 1 - arch/arm/mach-davinci/cpuidle.c | 99 --------------------------- arch/arm/mach-davinci/cpuidle.h | 15 ---- arch/arm/mach-davinci/devices-da8xx.c | 1 - 4 files changed, 116 deletions(-) delete mode 100644 arch/arm/mach-davinci/cpuidle.c delete mode 100644 arch/arm/mach-davinci/cpuidle.h diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 450883ea0e73..31d22a5d8e1e 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile @@ -16,7 +16,6 @@ obj-$(CONFIG_ARCH_DAVINCI_DA850) += da850.o pdata-quirks.o obj-y += da8xx-dt.o # Power Management -obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_HAVE_CLK) += pm_domain.o ifeq ($(CONFIG_SUSPEND),y) obj-$(CONFIG_ARCH_DAVINCI_DA850) += pm.o sleep.o diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c deleted file mode 100644 index 78a1575c387d..000000000000 --- a/arch/arm/mach-davinci/cpuidle.c +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * CPU idle for DaVinci SoCs - * - * Copyright (C) 2009 Texas Instruments Incorporated. https://www.ti.com/ - * - * Derived from Marvell Kirkwood CPU idle code - * (arch/arm/mach-kirkwood/cpuidle.c) - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cpuidle.h" -#include "ddr2.h" - -#define DAVINCI_CPUIDLE_MAX_STATES 2 - -static void __iomem *ddr2_reg_base; -static bool ddr2_pdown; - -static void davinci_save_ddr_power(int enter, bool pdown) -{ - u32 val; - - val = __raw_readl(ddr2_reg_base + DDR2_SDRCR_OFFSET); - - if (enter) { - if (pdown) - val |= DDR2_SRPD_BIT; - else - val &= ~DDR2_SRPD_BIT; - val |= DDR2_LPMODEN_BIT; - } else { - val &= ~(DDR2_SRPD_BIT | DDR2_LPMODEN_BIT); - } - - __raw_writel(val, ddr2_reg_base + DDR2_SDRCR_OFFSET); -} - -/* Actual code that puts the SoC in different idle states */ -static __cpuidle int davinci_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) -{ - davinci_save_ddr_power(1, ddr2_pdown); - cpu_do_idle(); - davinci_save_ddr_power(0, ddr2_pdown); - - return index; -} - -static struct cpuidle_driver davinci_idle_driver = { - .name = "cpuidle-davinci", - .owner = THIS_MODULE, - .states[0] = ARM_CPUIDLE_WFI_STATE, - .states[1] = { - .enter = davinci_enter_idle, - .exit_latency = 10, - .target_residency = 10000, - .name = "DDR SR", - .desc = "WFI and DDR Self Refresh", - }, - .state_count = DAVINCI_CPUIDLE_MAX_STATES, -}; - -static int __init davinci_cpuidle_probe(struct platform_device *pdev) -{ - struct davinci_cpuidle_config *pdata = pdev->dev.platform_data; - - if (!pdata) { - dev_err(&pdev->dev, "cannot get platform data\n"); - return -ENOENT; - } - - ddr2_reg_base = pdata->ddr2_ctlr_base; - - ddr2_pdown = pdata->ddr2_pdown; - - return cpuidle_register(&davinci_idle_driver, NULL); -} - -static struct platform_driver davinci_cpuidle_driver = { - .driver = { - .name = "cpuidle-davinci", - }, -}; - -static int __init davinci_cpuidle_init(void) -{ - return platform_driver_probe(&davinci_cpuidle_driver, - davinci_cpuidle_probe); -} -device_initcall(davinci_cpuidle_init); - diff --git a/arch/arm/mach-davinci/cpuidle.h b/arch/arm/mach-davinci/cpuidle.h deleted file mode 100644 index 976d43073597..000000000000 --- a/arch/arm/mach-davinci/cpuidle.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * TI DaVinci cpuidle platform support - * - * 2009 (C) Texas Instruments, Inc. https://www.ti.com/ - */ -#ifndef _MACH_DAVINCI_CPUIDLE_H -#define _MACH_DAVINCI_CPUIDLE_H - -struct davinci_cpuidle_config { - u32 ddr2_pdown; - void __iomem *ddr2_ctlr_base; -}; - -#endif diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 6939166c33c2..5e73a725d5da 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c @@ -21,7 +21,6 @@ #include "common.h" #include "cputype.h" #include "da8xx.h" -#include "cpuidle.h" #include "irqs.h" #include "sram.h"