From patchwork Fri Aug 25 09:51:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balamanikandan Gunasundar X-Patchwork-Id: 13365376 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 3FCC1C71133 for ; Fri, 25 Aug 2023 09:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0AmfxN5fFtVr6VHRWE3q8TV67j0tw5vAoAA0ezwf/kk=; b=S4Oc+Kn3jPT4k+ EtXtUxnFFFVUuL7xJ7f/16GkVIArtudznu/COpi7gWPLsWCMBZaV8Zab2B6U3+Aze7raiFgE+byMr Gb404z7CK29ZFB+lGgqW8mm54b1zjf2cgCvk3H7zcHpe9nJY8qPzVqFuJwkWg1O3+Q+Ybf9ek4lZi HjhXJRF4tFQLiLQ8Ey9Eldj/Lwuo6SZtQQyHN+NgwoZ1jFkj0XAv5lTEq8D8Vqn1gGyon5n7Jw5f2 f2Fd7D4nQBdciDnhwP2EjhUy5JZmNCQjM1wjCVc78jWMMvijvUOD2aAGn3R/J+EUlIfJd+tL0UGIz vweGJBN8uUPa6odY4G/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZTVB-004lyL-2p; Fri, 25 Aug 2023 09:53:13 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZTV7-004lxO-2t for linux-arm-kernel@lists.infradead.org; Fri, 25 Aug 2023 09:53:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1692957190; x=1724493190; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OXd/cO1jC0n1lhZm5VNzylnvJMWqGYjkafbXBg592zg=; b=JlhaeZnZZ7gxH55vVd2TP0sTPIXpBkOWOwdld2yk9yfMHqsIFgUridtz AF/FnnzJix4UV2Y+xLwmkbPwAOLtiWwjOH/Fo+RLyfVBFhUZpVOTuKj+3 QMUjUyUPIHFm0/PVnnh0wmp1hCnX9dP4l5r7AcZ0bseirhcIdnDJxLrPG OrYQ3xZVF+zUOJ2+kx+DFPvnG2jedpfxBdtYizC0Fd02svjjewHOnZhrd t6IU6N/CTA9d3Swb3AVPzvDRQ7jKH7EqabVy904cH9AgBHUQ5SEmZ1OI+ xBzrx7Q4aIgx9SKGASmQelb9bm0ijrvu9RiHjmISRk/0RK9UoWv6WaFDZ A==; X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="231695116" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Aug 2023 02:53:08 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 25 Aug 2023 02:52:40 -0700 Received: from che-lt-i64410lx.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Fri, 25 Aug 2023 02:52:35 -0700 From: Balamanikandan Gunasundar To: , , , , , , , , CC: , Subject: [PATCH v6 2/3] mmc: atmel-mci: move atmel MCI header file Date: Fri, 25 Aug 2023 15:21:56 +0530 Message-ID: <20230825095157.76073-3-balamanikandan.gunasundar@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230825095157.76073-1-balamanikandan.gunasundar@microchip.com> References: <20230825095157.76073-1-balamanikandan.gunasundar@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230825_025309_941904_76DBF5A8 X-CRM114-Status: GOOD ( 20.22 ) 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 Move the contents of linux/atmel-mci.h into drivers/mmc/host/atmel-mci.c as it is only used in one file Signed-off-by: Balamanikandan Gunasundar Reviewed-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci.c | 39 +++++++++++++++++++++++++++++- include/linux/atmel-mci.h | 46 ------------------------------------ 2 files changed, 38 insertions(+), 47 deletions(-) delete mode 100644 include/linux/atmel-mci.h diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 892d29fed9ec..6f815818dd22 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -39,6 +38,8 @@ #include #include +#define ATMCI_MAX_NR_SLOTS 2 + /* * Superset of MCI IP registers integrated in Atmel AT91 Processor * Registers and bitfields marked with [2] are only available in MCI2 @@ -200,6 +201,42 @@ enum atmci_pdc_buf { PDC_SECOND_BUF, }; +/** + * struct mci_slot_pdata - board-specific per-slot configuration + * @bus_width: Number of data lines wired up the slot + * @detect_pin: GPIO pin wired to the card detect switch + * @wp_pin: GPIO pin wired to the write protect sensor + * @detect_is_active_high: The state of the detect pin when it is active + * @non_removable: The slot is not removable, only detect once + * + * If a given slot is not present on the board, @bus_width should be + * set to 0. The other fields are ignored in this case. + * + * Any pins that aren't available should be set to a negative value. + * + * Note that support for multiple slots is experimental -- some cards + * might get upset if we don't get the clock management exactly right. + * But in most cases, it should work just fine. + */ +struct mci_slot_pdata { + unsigned int bus_width; + struct gpio_desc *detect_pin; + struct gpio_desc *wp_pin; + bool detect_is_active_high; + bool non_removable; +}; + +/** + * struct mci_platform_data - board-specific MMC/SDcard configuration + * @dma_slave: DMA slave interface to use in data transfers. + * @slot: Per-slot configuration data. + */ +struct mci_platform_data { + void *dma_slave; + dma_filter_fn dma_filter; + struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS]; +}; + struct atmel_mci_caps { bool has_dma_conf_reg; bool has_pdc; diff --git a/include/linux/atmel-mci.h b/include/linux/atmel-mci.h deleted file mode 100644 index 017e7d8f6126..000000000000 --- a/include/linux/atmel-mci.h +++ /dev/null @@ -1,46 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __LINUX_ATMEL_MCI_H -#define __LINUX_ATMEL_MCI_H - -#include -#include - -#define ATMCI_MAX_NR_SLOTS 2 - -/** - * struct mci_slot_pdata - board-specific per-slot configuration - * @bus_width: Number of data lines wired up the slot - * @detect_pin: GPIO pin wired to the card detect switch - * @wp_pin: GPIO pin wired to the write protect sensor - * @detect_is_active_high: The state of the detect pin when it is active - * @non_removable: The slot is not removable, only detect once - * - * If a given slot is not present on the board, @bus_width should be - * set to 0. The other fields are ignored in this case. - * - * Any pins that aren't available should be set to a negative value. - * - * Note that support for multiple slots is experimental -- some cards - * might get upset if we don't get the clock management exactly right. - * But in most cases, it should work just fine. - */ -struct mci_slot_pdata { - unsigned int bus_width; - struct gpio_desc *detect_pin; - struct gpio_desc *wp_pin; - bool detect_is_active_high; - bool non_removable; -}; - -/** - * struct mci_platform_data - board-specific MMC/SDcard configuration - * @dma_slave: DMA slave interface to use in data transfers. - * @slot: Per-slot configuration data. - */ -struct mci_platform_data { - void *dma_slave; - dma_filter_fn dma_filter; - struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS]; -}; - -#endif /* __LINUX_ATMEL_MCI_H */