From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=66.163.191.206 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796263862; b=quKTEShyoyhVKJiDE4VzwuFHohsJbQD8I/iRjley7YeceEWBTy0rX/ZCCRlEVjql14o6 dOdD8rQtTqvgedgY4/QB6ZKfbm2Kyhl1ArnE75Zm1/afpQZn2KPX5MW8TbGd2FMX31n1W LJtvFji/hGRneD05fkx3eIC6ZKOVcO4KtzJdr5C2yWuPzbo6npxXdhdllc1obVKtG8RKs kzhS7sCtxfpCj3aOyg5/mdAEviS7OSPvIw704JYIPrCAzmebvXZWy6T9c4G1t3BGuBd0M 6ReSapNG92pnNjhhNr5Fi6TL3vpx1EomPP4PEoFaG1ctmIY7XFvZ4xBQzyoUWBhl8Bw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796263862; h=DMARC-Filter:DKIM-Signature:X-SONIC-DKIM-SIGN:X-YMail-OSG:X-Sonic-MF: X-Sonic-ID:Received:Received:Message-ID:Date:MIME-Version:User-Agent: Subject:To:References:Content-Language:In-Reply-To:From:Content-Type: Content-Transfer-Encoding:X-Mailer; bh=83+Dd6AfDWYcA1B5SXvXpNoLGGpVkCT0tcTywCutllw=; b=wi+/8pEjwLqUVw2O7iqy9xdLqf2jbleBG/IktRYEqAP3FHe3h5Loec21MuXBTwueNbVE mU86Xw9e1GwGw3x0xCBYzE6ubhVQDl+DGD+N+4DCRi0QEaDeYH3n80KSUJdtZivFgKphK vbyY4gdfrBgYhmPZHVpzns2sHijoLxP/gUdhxkUtE6pEYf2cCoeDpl2pRmmATDDliAbgG Enmag2VtPI6jkVtEgJnQfB1q593R5Hcrxi9vqehAxDVsvga8Wh4rn7c3Ng/Wi9cv33uPH sV22ToV6pwmSMvmrJ446IhZ9FenLwKg37VFHgOLaLH4g7Kv5mGo98p+kO4JNoZe7iaw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass header.d=yahoo.com header.i=@yahoo.com header.a=rsa-sha256 header.s=s2048 header.b=p8XVuCTN; arc=none smtp.remote-ip=66.163.191.206 Received: from sonic312-25.consmr.mail.ne1.yahoo.com (sonic312-25.consmr.mail.ne1.yahoo.com [66.163.191.206]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9166606A322 for ; Thu, 3 Dec 2026 02:11:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E9166606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.a=rsa-sha256 header.s=s2048 header.b=p8XVuCTN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1796263860; bh=83+Dd6AfDWYcA1B5SXvXpNoLGGpVkCT0tcTywCutllw=; h=Date:Subject:To:References:In-Reply-To:From:Content-Type:From:Subject:Reply-To:Content-Type; b=p8XVuCTNDEFv2LbJk9ZuJ9vRkYoQmLyUkjJRmYNrHvMQB1NzDhfs3xh4s8H1FApsTdLhniDEpO9lPNS8kFzcNwUkbUZ2YCNLiI7TyZICJ/RiwsR8s27Zuu2n+5HvgGvRcDFSrlU72JjW61RyUOX7e7tOZsp8/iVsXC7xp3xSYRvpPYhKirHCfYACeqH78YVyabxdfKBgj7UFXJyRjqqkapGSVGmViRSLw8RWYKebNaJR31S3NOE8FmWFML7ku4AqWJj8kt55qUbY1VPNlXQUIMBrJEzIQV5wXSObIBp6+YLMSfCfwKg3/8o/No+1LkYVuKQamyUgFHkV43B0WQHrow== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1796263860; bh=9BIzOg5vF4AL8U4lSm4kYZ/IF1OfayFJFbOiKlXtFus=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=Ai5XL2greKE1Qa64Kit6sjSWzS06RshzPI2qbeQH5ZJ5bX75WCew+zwLUZhBHEn5Wq+cc2CYb2F5y8GyCbPJyhu+q8YUxtKhGYIQhDShyobeierjBpM+h/wUzQHksDdNA91/ev1d4rNIEtR1MP2x6OrKzF5rMQy/rj+0fLIkD1F1GVmZIL+JdzT/AJr/SANQ7D779DT6+SGGqUWirKLCdA5Tv5xef6kIfM2ZvDCfs5ac7So4NZ6WdNm5kYhs2nLH1fckrukHaiLTtWc7bYnLu9t34AaZ2BGb+939omAo8diJBEtgMQxb05iQ/f0BzothsjZxxoRPrvR8eMOUOIyhrg== X-YMail-OSG: 8X4OGbIVM1mx29b2hzwHqm22ip7sPokb3KgBload4TVQ_XHW1vdhDPoUCl1QOks wgMlYXYjMLXreVCg08cs5JO5N7peNkS2qFVTW7Lc2iZ6Tpzj2t9cHJ7l7ymFGW.aqmved.QMx0Fw uULxh5qily33204Kwb1OGVg8zMjuGFoMoKOSbWI0L.JcQPgUVruFatJ71kwueSCyMU7k2zqPr_Jg PvFbB6mDZ81DpDGqTRDpymgrXWjp2qobOsE9rl8WTnoXU0BUY2509st0tfsHLa_kRcBQ0NSLzb.3 qX5TwlIzRRLdNGOaaLEQ0xRc7xUctmxOjANCNy9lEQ6L4Og.0WJigJpTC3wsITUIHZmeRlr.zo1N ejYpDjqB1n5WiPuFnw561qgdq030VXiT3tajk26YpsX99spsmBCJhXYho.uUQ2NOLXQsH0YDN_sK dAB.jzpqorQ33y5QNuK44ncFDxTIqebEjQydeY1MhC5ZYJaRf22uS6dguvp18kdsVer2qDs.ByWz 0bRashp.TIn2UM7uhpyipUskvUHL5as9.HbRnVvoH0N2ZinB_cmo.6AjBajodn6r4vvdLJg6KlTn Th0NkTSuE2bYfqGi69k8lJTyyQlxs6k6E9.LrTd67kP5o5EAGx39XvWFHwBbWZgor7iWkyvnwn5W BZTQVCiVdue9BdYMyz50YF65kfbFGGUwsI4qgAjZzJf4HwtSwe3nw_Bek7ZXTsl3WneeaKBoX97S 8RMtapGgnbGlj4AOgtFdZv9dSjPVXOrjn7mF8daqkllndCL3bqwK6zXLwkn7y0QE5bUR38m3wXGG G493UWljufeiwyUwQefBxPliZ3BtgjP_z6qe_ARdS8HPeCC27hLdh3x1cErV0MQn4W1I6ksh.qOw iOg.hhuho3EIcIRd52M7ZDhAZUFt2VXrp2b9fIefFJx04wI.fYJXSFvsxTs.byTllCq0gRgvHqtF gd2uiCrLCOiPszEYIzye3i2ZvGG7mlTAFdPZOFx572FKrkwbPG1cIywl.u_Kvvmb1RvguaWI8ZSm LyGystKIMsClGy2yM4F2MGKzUT_EXCuSX59VqEuuJ_JzrpdE62SoEZ.S4J1TRlarBv76O2UrcB6s 8GhgfvXghHOACubActoTdSU5oMduJcyjDWyDIJo1scEg7LQ7GlTvUI_R6riuDE7LPKmJGbMsPeJ6 gs.ZgEo__GdKQiXGip7qwJUoOdzKyVJz4GjIkOyV0jbSUvvpbi7I5QLnQDJPkQqc6AH8FYml1Nga GqhONE3diG8q0jNAAEJCkyz4YKh_Sovv9E55rZhVrCqIUf23gbwnR2OXUg225lrUQwHQb3.nJbxV jftT9O60vL0yi8rXBXfy2.6o1Izk2dsGLRhnKgEUPQu4nRe2Fp9L57UU.IRnsYs5KZ.mYmCDjvXR Du0RnumHXWQ.MNK2PdQER8yV8mFz2TcaPRmC7GMTlnkRyGVTYmeUdChdRAMdtSmtWedv99XIoi2R ldDyxcY9OLOw8irYC6O8njDu.kq8QbBr0hu0f1jqKF.GPBXZABYFD_nznybmTgGPqe_c19fTBxBB eZ1F9Pc39bgaZ6xfaVysu6rX9fKlo0DmHsV.n8.oYEROtWhMPBuG3R_jypCRKPM1mSL3tv8TlGeC imRj2V6ueJg1O9kysREHAd.b1sQf8hgD9Ju_.lyQl5ehTg6F8U9KZknO24A2Cj6yG7esCVciMAUA sZJnMtXhVJplJV4MzFqRaGjdXchlUfb6ARfU6FsVXWcss7Jo_2KAlP.oD2AGGCi.cHZgIC6QlNgN vHvWkdiJIRu1OvOM2Mc56UKt7GbfoTQ0DLIFEaHFvmBomhwSAfMPpFBbhBpbAsxGk8_KBKY5zxyL Z7i0vpqBkqpP8N57ui7Z296AsnqH_ce8wyx6e2rvWApR6nTl1xrmq3kmaksOiWBITUjKblWj8Zi6 eQuZ0uN222smUGVWNUN6L1sN5TtVVizOtj0xSMQtlxb_aInP5qlpdikiNxrMnc8sF5Qd3gs632LI v27IEu9SKuSsvNgie4iC8QpBiiEsG2AtJ9IZrb6_xcagBZFV6HMPCc0z0DAJHiGw.DvhOIb5HM42 MdOHhbhVKEDMf0bTYRyoY5o23JA5s6bQ.DK.CiFw.Q2brZ2O3a7OdJr6G5NrQniVVF3mmlb6owKx _QiLTsRbqemT7TqhXTJ8XV6sDm_yVZwcy9oAb7cpqFUE2fPc3hASiuw5r5Nhls5Gfilwux7cthIF SZwTyqAYdLExkKWeHjfG6AuE5NYE0BfFqYX4_Ln6yWZn3jWRx2Sk7r2PK40PoLH0ju_uWJEKRk6P hK1AIiAnwsjXSWJhJmb_j6XSgKPk23M6iBcE- X-Sonic-MF: X-Sonic-ID: 603f7e70-94dd-4e09-827a-dc7ee3dbfe95 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Thu, 3 Dec 2026 02:11:00 +0000 Received: by hermes--production-ir2-7c4859dc89-7fxqz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8763db0375a975c1c174d03f1599c151; Thu, 03 Dec 2026 02:10:56 +0000 (UTC) Message-ID: <49c05687-187f-4311-bb8d-4c715dd33a1c@yahoo.com> Date: Thu, 3 Dec 2026 03:10:53 +0100 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v19 02/15] net: dsa: realtek: rtl8365mb: add chip family infrastructure To: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk, luizluca@gmail.com, maxime.chevallier@bootlin.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alvin.sipraga@analog.com, gusfmora@gmail.com, kuncy7@gmail.com, fabianotassotti@gmail.com, gabonpivovich@gmail.com, contact@c127.dev, o.rempel@pengutronix.de References: <59c7992d-1c83-4bf1-a2f4-c853d4777190@yahoo.com> Content-Language: pl In-Reply-To: <59c7992d-1c83-4bf1-a2f4-c853d4777190@yahoo.com> From: Mieczyslaw Nalewaj Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.27100 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Add enum rtl8365mb_family and struct rtl8365mb_family_info, which holds the data shared by all chips of one family: the family id and the init jam table. Fold rtl8365mb_init_jam_common into the family C init jam table (renamed to rtl8365mb_c_init_jam) and drop the separate common jam loop from rtl8365mb_switch_init(), as family D does not use these writes. struct rtl8365mb_chip_info now points to the family info through a family_info member, and all existing chips use the RTL8365MB_FAMILY_C instance. rtl8365mb_get_family_info() and rtl8365mb_is_d() are declared in a new rtl8365mb.h so that the VLAN code can use them too. The available ports of a chip are already described by port_mask in struct rtl8365mb_chip_info, so the family info does not carry a port count. RTL8365MB_FAMILY_D is defined here but no chip uses it yet; it is needed by the following patches, which add family D handling for chips whose register layout differs from the existing ones. No functional change. Tested-by: Gustavo Foletto Mora Tested-by: Stanislaw Pal Tested-by: Oleg Gavrilov Signed-off-by: Mieczyslaw Nalewaj Reviewed-by: Linus Walleij --- drivers/net/dsa/realtek/rtl8365mb.h | 28 ++++++++++ drivers/net/dsa/realtek/rtl8365mb_main.c | 71 ++++++++++++------------ 2 files changed, 62 insertions(+), 37 deletions(-) create mode 100644 drivers/net/dsa/realtek/rtl8365mb.h diff --git a/drivers/net/dsa/realtek/rtl8365mb.h b/drivers/net/dsa/realtek/rtl8365mb.h new file mode 100644 index 0000000..7b0c710 --- /dev/null +++ b/drivers/net/dsa/realtek/rtl8365mb.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _RTL8365MB_H +#define _RTL8365MB_H + +#include "realtek.h" + +enum rtl8365mb_family { + RTL8365MB_FAMILY_C, + RTL8365MB_FAMILY_D, +}; + +struct rtl8365mb_jam_tbl_entry; + +struct rtl8365mb_family_info { + enum rtl8365mb_family family; + const struct rtl8365mb_jam_tbl_entry *jam_table; + size_t jam_size; +}; + +const struct rtl8365mb_family_info * +rtl8365mb_get_family_info(struct realtek_priv *priv); + +static inline bool rtl8365mb_is_d(struct realtek_priv *priv) +{ + return rtl8365mb_get_family_info(priv)->family == RTL8365MB_FAMILY_D; +} + +#endif /* _RTL8365MB_H */ diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c index 6c11c36..8c59b1e 100644 --- a/drivers/net/dsa/realtek/rtl8365mb_main.c +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c @@ -112,6 +112,7 @@ #include "rtl8365mb_qos.h" #include "rtl8365mb_l2.h" #include "rtl8365mb_vlan.h" +#include "rtl8365mb.h" /* Family-specific data and limits */ #define RTL8365MB_PHYADDRMAX 7 @@ -638,20 +639,16 @@ struct rtl8365mb_jam_tbl_entry { }; /* Lifted from the vendor driver sources */ -static const struct rtl8365mb_jam_tbl_entry rtl8365mb_init_jam_8365mb_vc[] = { +static const struct rtl8365mb_jam_tbl_entry rtl8365mb_c_init_jam[] = { { 0x13EB, 0x15BB }, { 0x1303, 0x06D6 }, { 0x1304, 0x0700 }, { 0x13E2, 0x003F }, { 0x13F9, 0x0090 }, { 0x121E, 0x03CA }, { 0x1233, 0x0352 }, { 0x1237, 0x00A0 }, { 0x123A, 0x0030 }, { 0x1239, 0x0084 }, { 0x0301, 0x1000 }, { 0x1349, 0x001F }, { 0x18E0, 0x4004 }, { 0x122B, 0x241C }, { 0x1305, 0xC000 }, - { 0x13F0, 0x0000 }, -}; - -static const struct rtl8365mb_jam_tbl_entry rtl8365mb_init_jam_common[] = { - { 0x1200, 0x7FCB }, { 0x0884, 0x0003 }, { 0x06EB, 0x0001 }, - { 0x03Fa, 0x0007 }, { 0x08C8, 0x00C0 }, { 0x0A30, 0x020E }, - { 0x0800, 0x0000 }, { 0x0802, 0x0000 }, { 0x09DA, 0x0013 }, - { 0x1D32, 0x0002 }, + { 0x13F0, 0x0000 }, { 0x1200, 0x7FCB }, { 0x0884, 0x0003 }, + { 0x06EB, 0x0001 }, { 0x03Fa, 0x0007 }, { 0x08C8, 0x00C0 }, + { 0x0A30, 0x020E }, { 0x0800, 0x0000 }, { 0x0802, 0x0000 }, + { 0x09DA, 0x0013 }, { 0x1D32, 0x0002 }, }; /* SGMII SerDes tuning parameters, lifted from the vendor driver sources. The @@ -704,15 +701,20 @@ struct rtl8365mb_extint { unsigned int supported_interfaces; }; +static const struct rtl8365mb_family_info rtl8365mb_family_c = { + .family = RTL8365MB_FAMILY_C, + .jam_table = rtl8365mb_c_init_jam, + .jam_size = ARRAY_SIZE(rtl8365mb_c_init_jam), +}; + /** * struct rtl8365mb_chip_info - static chip-specific info * @name: human-readable chip name * @chip_id: chip identifier * @chip_ver: chip silicon revision * @port_mask: ports the chip has + * @family_info: data shared by all chips of the same family * @extints: available external interfaces - * @jam_table: chip-specific initialization jam table - * @jam_size: size of the chip's jam table * @num_tx_queues: number of egress queues exposed by the chip * * These data are specific to a given chip in the family of switches supported @@ -724,9 +726,8 @@ struct rtl8365mb_chip_info { u32 chip_id; u32 chip_ver; u32 port_mask; + const struct rtl8365mb_family_info *family_info; const struct rtl8365mb_extint extints[RTL8365MB_MAX_NUM_EXTINTS]; - const struct rtl8365mb_jam_tbl_entry *jam_table; - size_t jam_size; unsigned int num_tx_queues; }; @@ -746,33 +747,32 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = { .name = "RTL8365MB-VC", .chip_id = 0x6367, .chip_ver = 0x0040, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(3, 0) | BIT(6)), .extints = { { 6, 1, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, { .name = "RTL8367S", .chip_id = 0x6367, .chip_ver = 0x00A0, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)), .extints = { { 6, 1, PHY_INTF(SGMII) | PHY_INTF(HSGMII) }, { 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, { .name = "RTL8367SB", .chip_id = 0x6367, .chip_ver = 0x0010, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)), .extints = { { 6, 1, PHY_INTF(MII) | PHY_INTF(TMII) | @@ -781,14 +781,13 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = { { 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, { .name = "RTL8367RB-VB", .chip_id = 0x6367, .chip_ver = 0x0020, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)), .extints = { { 6, 1, PHY_INTF(MII) | PHY_INTF(TMII) | @@ -796,8 +795,6 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = { { 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, }; @@ -897,6 +894,14 @@ struct rtl8365mb { #define pcs_to_rtl8365mb(_pcs) container_of((_pcs), struct rtl8365mb, pcs) +const struct rtl8365mb_family_info * +rtl8365mb_get_family_info(struct realtek_priv *priv) +{ + struct rtl8365mb *mb = priv->chip_data; + + return mb->chip_info->family_info; +} + static int rtl8365mb_phy_poll_busy(struct realtek_priv *priv) { u32 val; @@ -1375,7 +1380,7 @@ static int rtl8365mb_sds_probe_option(struct realtek_priv *priv) * the cap has been observed on hardware. Raise them likewise, to 0x7FFFF * (~4.19 Gbps, above the HSGMII line rate). The related HSGMII scheduler * line rate register (LINE_RATE_HSG_H, 0x03FA) is already set to its - * maximum by the common init jam table. + * maximum by the family C init jam table. */ static int rtl8365mb_sds_raise_rate_limits(struct realtek_priv *priv) { @@ -3059,30 +3064,22 @@ static int rtl8365mb_change_tag_protocol(struct dsa_switch *ds, static int rtl8365mb_switch_init(struct realtek_priv *priv) { struct rtl8365mb *mb = priv->chip_data; - const struct rtl8365mb_chip_info *ci; + const struct rtl8365mb_family_info *fi; int ret; int i; - ci = mb->chip_info; + fi = mb->chip_info->family_info; - /* Do any chip-specific init jam before getting to the common stuff */ - if (ci->jam_table) { - for (i = 0; i < ci->jam_size; i++) { - ret = regmap_write(priv->map, ci->jam_table[i].reg, - ci->jam_table[i].val); + /* Do any family-specific init jam */ + if (fi->jam_table) { + for (i = 0; i < fi->jam_size; i++) { + ret = regmap_write(priv->map, fi->jam_table[i].reg, + fi->jam_table[i].val); if (ret) return ret; } } - /* Common init jam */ - for (i = 0; i < ARRAY_SIZE(rtl8365mb_init_jam_common); i++) { - ret = regmap_write(priv->map, rtl8365mb_init_jam_common[i].reg, - rtl8365mb_init_jam_common[i].val); - if (ret) - return ret; - } - return 0; } -- 2.53.0