diff mbox series

[28/38] ra6w: add sdio.h

Message ID 20250417135236.52410-29-oleksandr.savchenko.dn@bp.renesas.com (mailing list archive)
State New
Delegated to: Johannes Berg
Headers show
Series wireless: ra6w driver for Renesas IEEE 802.11ax devices | expand

Checks

Context Check Description
wifibot/tree_selection success Guessed tree name to be wireless-next
wifibot/fixes_present success Fixes tag not required for -next series
wifibot/series_format fail Series longer than 15 patches; Target tree name not specified in the subject
wifibot/ynl success Generated files up to date; no warnings/errors; no diff in generated;
wifibot/build_clang fail Errors and warnings before: 5 this patch: 5
wifibot/build_clang_rust success No Rust files in patch. Skipping build
wifibot/build_tools success No tools touched, skip
wifibot/check_selftest success No net selftest shell script
wifibot/deprecated_api success None detected
wifibot/header_inline success No static functions without inline keyword in header files
wifibot/source_inline success Was 0 now: 0
wifibot/verify_fixes success No Fixes tag
wifibot/build_32bit fail Errors and warnings before: 5 this patch: 5
wifibot/build_allmodconfig_warn fail Errors and warnings before: 5 this patch: 5
wifibot/checkpatch warning WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? WARNING: line length of 83 exceeds 80 columns
wifibot/kdoc success Errors and warnings before: 0 this patch: 0
wifibot/verify_signedoff success Signed-off-by tag matches author and committer

Commit Message

Alexander Savchenko April 17, 2025, 1:52 p.m. UTC
Part of the split. Please, take a look at the cover letter for more details

Reviewed-by: Viktor Barna <viktor.barna.rj@bp.renesas.com>
Reviewed-by: Gal Gur <gal.gur.jx@renesas.com>
Signed-off-by: Alexander Savchenko <oleksandr.savchenko.dn@bp.renesas.com>
---
 drivers/net/wireless/renesas/ra6w/sdio.h | 38 ++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 drivers/net/wireless/renesas/ra6w/sdio.h
diff mbox series

Patch

diff --git a/drivers/net/wireless/renesas/ra6w/sdio.h b/drivers/net/wireless/renesas/ra6w/sdio.h
new file mode 100644
index 000000000000..6b7d0c7d7bbc
--- /dev/null
+++ b/drivers/net/wireless/renesas/ra6w/sdio.h
@@ -0,0 +1,38 @@ 
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) [2022-2025] Renesas Electronics Corporation and/or its affiliates.
+ */
+
+#ifndef RA6W_SDIO_H
+#define RA6W_SDIO_H
+
+#include <linux/mmc/sdio_func.h>
+
+#define RA6W_SDIO_VENDOR_ID_RENESAS		0x5245
+#define RA6W_SDIO_DEVICE_ID_RA6W		0x4154
+#define RA6W_SDIO_MAX_BLOCK_CNT			5
+#define RA6W_SDIO_BLOCK_SIZE			512
+#define RA6W_SDIO_HOST_GP_REG			0x24
+#define RA6W_SDIO_CHIP_GP_REG			0x28
+#define RA6W_SDIO_CODE_SUCCESS			0x00022000
+#define RA6W_SDIO_CODE_CRC_CHECKING		0xf0f0f0f0
+#define RA6W_SDIO_CODE_BOOT_NG			0x20000002
+#define RA6W_SDIO_ADDR_RESET			0xdeadffff
+#define RA6W_SDIO_ADDR_READ			0x0001
+#define RA6W_SDIO_ADDR_WRITE			0x0002
+#define RA6W_SDIO_ADDR_STATUS			0x0010
+
+#define RA6W_SDIO_FW_NAME			"fmacfw_sdio.bin"
+
+#define RA6W_SDIO_GET_CNT(len, blk_size)	(((u32)(len)) / (blk_size))
+#define RA6W_SDIO_GET_REMAIN(len, blk_size)	(((u32)(len)) % (blk_size))
+
+#define RA6W_SDIO_ACK_CNT_MAX			10
+#define RA6W_SDIO_WAIT_SYNC_CNT_MAX		20
+#define RA6W_SDIO_CRC_CHECK_RETRY_MAX		20
+#define RA6W_SDIO_CRC_CHECK_SLEEP_MIN_US	10000
+#define RA6W_SDIO_CRC_CHECK_SLEEP_MAX_US	11000
+
+void ra6w_sdio_reprobe(struct sdio_func *func);
+
+#endif /* RA6W_SDIO_H */