From nobody Tue Dec 2 02:52:28 2025 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BB6D2C324E for ; Mon, 17 Nov 2025 16:12:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763395977; cv=none; b=DkfegfDugZDQBkUtxQ01+d8x4z9r3/ZPNh56S6YKlfvO0PHlfzFO/vu3rGf3IljYZoVT8sB8LcUur9DurmKIAh+EO9M/nnGsPKuTl5MHT67MU0jEs7UN0zuE8SOhp8iLm6OcbdhrRoma2BJ3Jy5izT+x4cGzboy/ef5QL+ONsL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763395977; c=relaxed/simple; bh=irhKvUY6luUQYQCjfUO79QZdoddqpn0XAk946ikRMGM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=RY+mYfz9CtQOzMjzxXicvWauv7YSFE10cW0WWTLs8tgUmppl4kQ1Wdf7TeYl5QaV8vnD3P0+Xpfoxyczo73YHwu323AFPpURZuVbgOFyoaPlHKRKbsA8CPnTRpG5sgf6j03hCJyoiVT1pVOrt7dgsAy/DTRAmP4VKmho6O71c3M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=k89CbDUN; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="k89CbDUN" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso12172335e9.3 for ; Mon, 17 Nov 2025 08:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1763395973; x=1764000773; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=f+SE0fYOezsu8aNKbnzhAj9VZ6llsp+abwdEMUWBzyQ=; b=k89CbDUNgQqB4+5sXTMxLxv9TSdgV4rH+GPO/+WH+SFxbfQut33U2UWNHEStERUyNt BpoZLfMGyKw0qTmtIHV8J1bzlquDE8GWFoBo95HLuPwku80skGdFnWBl8ToPrPZkUZ43 LNlQQsLxL0E7nFq/rdqEkasTUYm4kzav6HPNWJ/kQ1zxJS6yhdn9JX/n4tXhhe1g7mHT Gzki9jaCDyBIRDa5GnWvcm2Ele/saTf3c6VihDApd5eTzABpk1GOkMZdRSNj0CoLhDNS 6op91kf9dBR5A/rpbGDofDkIft5iZ9rfZig2eaDSJm43S/rhgpfb/vMUr5hvuxfvf6V/ NJMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763395973; x=1764000773; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f+SE0fYOezsu8aNKbnzhAj9VZ6llsp+abwdEMUWBzyQ=; b=B0iVKuW3qU1XQkU9DGgyguzMFTxMX0jY01YyTdyl6rU8537aL64ro0yMooS674vp3V GQ0d86pATOzWOZj9JeQp8HWS5GIcFA12GjPGqVnFmStjX9mkfwPWPGDF1aOYPpQxZOs5 Ex0bK+tmedkEJ/uYIWOi+eDdZjKY3hpIDIqq8DPY1vzCe5zaEjjPNGhaWuRG4fttgDPc 56z1xxdEra2aB+5jQ82r9lpOZmGIqJTiJozmqqS3faReQOy3gD0r5ZW4fKtBQpbmJk1w 7LITbstXWf8GJoA37JEzL5x14hcjBdPG7zRtXZLyay0cdqwLcQ9tAd9b04lg16wobWKp IKiw== X-Gm-Message-State: AOJu0Yz3z1fUDgirBG7We+2D/zSoolqnrZS+NM7QApYbQXeCERARfIQ1 5sIF2Zx9Zf5zQxAaYwpkKOV5TmuuroarcDs/1wYyFTrgrVk4ssNZ+WMsF6pYlsplgY044rK5Tqu tuc6Tprw= X-Gm-Gg: ASbGncvfGb0GH71Esr1CJE+wfH3GbIHnwV8El49FtIcQCb92lrMKUPVp4d8BCBBFwFj zkXer5Pdkwe1dyC4+9pgtpwM+Fm56OaMTFgZKEBCCpNE9iNK0WEvprstwRrabCgK/LJzHo1KKje XyveGYh6siDZvp1AGnZ+RJq+jztjRfwf7hPLK7AKhgk4XtammgofZGITN/uVs1cGZGtbTrZX02b hOaPgnA5EfLLAA2Ecf3zWYZIWRTg4AViLDRJr1pGDlrwdk3slc5UWCxxzoLmCVJ4F4VKSVLAOfc jBlEfDeLQvosZBDAn2mOgiohgp0R+eytczbfOzkqIelkl5SWsjTuZ43lqQxSy1piwWZaw0h8r+6 nhgdZTvcWBDrtaDUzVc9QtWsV9Dzm54jDUNy6n4ewZelmbroa2AVNe/34N1d+nWAmnUs3zH0zWW VAupD1 X-Google-Smtp-Source: AGHT+IFGb1o2W6QYlDDv0rwbgLGbPsAz5AYJmXa/hsVKUFgwfWOK9i6RIVG8MJdF0ff6tmkMN7Tgdw== X-Received: by 2002:a05:600c:a47:b0:46e:4b79:551 with SMTP id 5b1f17b1804b1-4778fea84cemr143485895e9.31.1763395972799; Mon, 17 Nov 2025 08:12:52 -0800 (PST) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:36dc:12ef:ca32:1a1c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47787daab3fsm341218575e9.0.2025.11.17.08.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Nov 2025 08:12:52 -0800 (PST) From: Bartosz Golaszewski Date: Mon, 17 Nov 2025 17:12:47 +0100 Subject: [PATCH v2] spi: davinci: remove platform data header Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251117-davinci-spi-v2-1-cd799d17f04a@linaro.org> X-B4-Tracking: v=1; b=H4sIAH5JG2kC/23MQQ7CIBCF4as0sxbjULTYlfcwXSAM7SQGGjBE0 3B3sWuX/0vet0GmxJRh7DZIVDhzDC3koQO7mDCTYNca5EmeEVEJZwoHyyKvLPzF0aDVQNIbaI8 1kef3rt2n1gvnV0yfHS/4W/87BQWKB169VtL3tte3JweT4jGmGaZa6xdKI8I0pwAAAA== X-Change-ID: 20251114-davinci-spi-f6de7847e2fa To: Mark Brown Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6629; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=86z0jBSHZcsTCcwlfViR6MY7DgeQAb3XF58fAhXiqRA=; b=owEBbQKS/ZANAwAKAQWdLsv/NoTDAcsmYgBpG0mA2exUdNXHVj4aC5h+2PeMVLbsoPzeea+EJ xkF/nTgcp2JAjMEAAEKAB0WIQSR5RMt5bVGHXuiZfwFnS7L/zaEwwUCaRtJgAAKCRAFnS7L/zaE w4ekD/wLnwm6weOibrpniNACjYS6naFo0QF20HA3WUrdU6kxPa6c6FxtnZe8q91za/rignSw44+ PKNtO965urxzwPJPg84bkcNhsvX3tM4VWKE3m+clZV4zyU3cUgyd7C2+/yESk7sAwv9uenfDv+D pgPBw014U80i42hmb+liQREYD0/4lnbqQU6LWOv0+Dw7d21aecot/XfkIQGy1yF2XGDfgYNpbno TzxeMV/fI6qpfoQZmE5Pb0IreKZJc/9nS4FANfc8JwTyplp5uVMesBqBUNe7NieCg456p53uusp D0qM+7qrepRowart1ZjxitZY3IU5Ib2fftujA5y/Gb5tY9V4LnDTw/TdKCM+amEGgwwQaiEqJYP 0E6DvGKcusNMga2Gfzi9zrr+S18fPd9McpnX2HVR/O/k6tvhxoXNQ/7sLZiW1dJ16NySjgDdZoq MOPPujVDx3T9Hr2lJksfX9/GWZPgGNJnyn4xPcOUEWZ7cgA5+NaE9B6L4ohE37RqPlklWioUGbI BZxFkj6aRjp2hiLfC9Ix7P7DEX5Dnh4GfNlFSFeJhXTdYfMAPLefs5fpXHV/zvh3pkp0pjWoLLk UiznPr2QP2eePOswMX9Z2AHxb/jVNLdFXiSgd5tN+BsmRqiuPN8K3TQ9sGHCNNIDCPkhU6w32WU HmpZHez2wrYagzA== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski There are no longer any board files including the DaVinci SPI platform data header. Let's move the bits and pieces that are used in the driver into the driver .c file itself and remove the header. Signed-off-by: Bartosz Golaszewski --- Changes in v2: - Fix kernel doc warnings - Link to v1: https://lore.kernel.org/r/20251114-davinci-spi-v1-1-b19f842f3= c38@linaro.org --- drivers/spi/spi-davinci.c | 64 ++++++++++++++++++++++++++- include/linux/platform_data/spi-davinci.h | 73 ---------------------------= ---- 2 files changed, 62 insertions(+), 75 deletions(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index a29934422356b6b6d4043c0f0b43b91e5ccd894b..21a14e800eedc7ec41ade3187dd= ca79265b6e143 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -19,8 +20,6 @@ #include #include =20 -#include - #define CS_DEFAULT 0xFF =20 #define SPIFMT_PHASE_MASK BIT(16) @@ -98,8 +97,69 @@ #define SPIDEF 0x4c #define SPIFMT0 0x50 =20 +#define SPI_IO_TYPE_POLL 1 +#define SPI_IO_TYPE_DMA 2 + #define DMA_MIN_BYTES 16 =20 +enum { + SPI_VERSION_1, /* For DM355/DM365/DM6467 */ + SPI_VERSION_2, /* For DA8xx */ +}; + +/** + * struct davinci_spi_platform_data - Platform data for SPI master device = on DaVinci + * + * @version: version of the SPI IP. Different DaVinci devices have slightly + * varying versions of the same IP. + * @num_chipselect: number of chipselects supported by this SPI master + * @intr_line: interrupt line used to connect the SPI IP to the ARM interr= upt + * controller withn the SoC. Possible values are 0 and 1. + * @prescaler_limit: max clock prescaler value + * @cshold_bug: set this to true if the SPI controller on your chip requir= es + * a write to CSHOLD bit in between transfers (like in DM355). + * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any + * device on the bus. + */ +struct davinci_spi_platform_data { + u8 version; + u8 num_chipselect; + u8 intr_line; + u8 prescaler_limit; + bool cshold_bug; + enum dma_event_q dma_event_q; +}; + +/** + * struct davinci_spi_config - Per-chip-select configuration for SPI slave= devices + * + * @wdelay: amount of delay between transmissions. Measured in number of + * SPI module clocks. + * @odd_parity: polarity of parity flag at the end of transmit data stream. + * 0 - odd parity, 1 - even parity. + * @parity_enable: enable transmission of parity at end of each transmit + * data stream. + * @io_type: type of IO transfer. Choose between polled, interrupt and DMA. + * @timer_disable: disable chip-select timers (setup and hold) + * @c2tdelay: chip-select setup time. Measured in number of SPI module clo= cks. + * @t2cdelay: chip-select hold time. Measured in number of SPI module cloc= ks. + * @t2edelay: transmit data finished to SPI ENAn pin inactive time. Measur= ed + * in number of SPI clocks. + * @c2edelay: chip-select active to SPI ENAn signal active time. Measured = in + * number of SPI clocks. + */ +struct davinci_spi_config { + u8 wdelay; + u8 odd_parity; + u8 parity_enable; + u8 io_type; + u8 timer_disable; + u8 c2tdelay; + u8 t2cdelay; + u8 t2edelay; + u8 c2edelay; +}; + /* SPI Controller driver's private data. */ struct davinci_spi { struct spi_bitbang bitbang; diff --git a/include/linux/platform_data/spi-davinci.h b/include/linux/plat= form_data/spi-davinci.h deleted file mode 100644 index 2cb5cc70fd9d22bd00c85beb5b9a8cb74547e9f4..000000000000000000000000000= 0000000000000 --- a/include/linux/platform_data/spi-davinci.h +++ /dev/null @@ -1,73 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright 2009 Texas Instruments. - */ - -#ifndef __ARCH_ARM_DAVINCI_SPI_H -#define __ARCH_ARM_DAVINCI_SPI_H - -#include - -#define SPI_INTERN_CS 0xFF - -enum { - SPI_VERSION_1, /* For DM355/DM365/DM6467 */ - SPI_VERSION_2, /* For DA8xx */ -}; - -/** - * davinci_spi_platform_data - Platform data for SPI master device on DaVi= nci - * - * @version: version of the SPI IP. Different DaVinci devices have slightly - * varying versions of the same IP. - * @num_chipselect: number of chipselects supported by this SPI master - * @intr_line: interrupt line used to connect the SPI IP to the ARM interr= upt - * controller withn the SoC. Possible values are 0 and 1. - * @cshold_bug: set this to true if the SPI controller on your chip requir= es - * a write to CSHOLD bit in between transfers (like in DM355). - * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any - * device on the bus. - */ -struct davinci_spi_platform_data { - u8 version; - u8 num_chipselect; - u8 intr_line; - u8 prescaler_limit; - bool cshold_bug; - enum dma_event_q dma_event_q; -}; - -/** - * davinci_spi_config - Per-chip-select configuration for SPI slave devices - * - * @wdelay: amount of delay between transmissions. Measured in number of - * SPI module clocks. - * @odd_parity: polarity of parity flag at the end of transmit data stream. - * 0 - odd parity, 1 - even parity. - * @parity_enable: enable transmission of parity at end of each transmit - * data stream. - * @io_type: type of IO transfer. Choose between polled, interrupt and DMA. - * @timer_disable: disable chip-select timers (setup and hold) - * @c2tdelay: chip-select setup time. Measured in number of SPI module clo= cks. - * @t2cdelay: chip-select hold time. Measured in number of SPI module cloc= ks. - * @t2edelay: transmit data finished to SPI ENAn pin inactive time. Measur= ed - * in number of SPI clocks. - * @c2edelay: chip-select active to SPI ENAn signal active time. Measured = in - * number of SPI clocks. - */ -struct davinci_spi_config { - u8 wdelay; - u8 odd_parity; - u8 parity_enable; -#define SPI_IO_TYPE_INTR 0 -#define SPI_IO_TYPE_POLL 1 -#define SPI_IO_TYPE_DMA 2 - u8 io_type; - u8 timer_disable; - u8 c2tdelay; - u8 t2cdelay; - u8 t2edelay; - u8 c2edelay; -}; - -#endif /* __ARCH_ARM_DAVINCI_SPI_H */ --- base-commit: 0f2995693867bfb26197b117cd55624ddc57582f change-id: 20251114-davinci-spi-f6de7847e2fa Best regards, --=20 Bartosz Golaszewski