mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-09 02:57:42 -04:00
can: rcar_canfd: Add max_aflpn variable to struct rcar_canfd_hw_info
R-Car Gen3 has maximum acceptance filter list page number of 31 whereas on R-Car Gen4 it is 127. Add max_aflpn variable to struct rcar_canfd_hw_info in order to support RZ/G3E that has max AFLPN of 63. While at it, rename the parameter x->page_num in RCANFD_GAFLECTR_AFLPN macro to make it clear. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20250417054320.14100-11-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
committed by
Marc Kleine-Budde
parent
e9ffa12e02
commit
2d6cb8ff94
@@ -92,7 +92,7 @@
|
||||
|
||||
/* RSCFDnCFDGAFLECTR / RSCFDnGAFLECTR */
|
||||
#define RCANFD_GAFLECTR_AFLDAE BIT(8)
|
||||
#define RCANFD_GAFLECTR_AFLPN(gpriv, x) ((x) & reg_gen4(gpriv, 0x7f, 0x1f))
|
||||
#define RCANFD_GAFLECTR_AFLPN(gpriv, page_num) ((page_num) & (gpriv)->info->max_aflpn)
|
||||
|
||||
/* RSCFDnCFDGAFLIDj / RSCFDnGAFLIDj */
|
||||
#define RCANFD_GAFLID_GAFLLB BIT(29)
|
||||
@@ -504,6 +504,7 @@ struct rcar_canfd_global;
|
||||
|
||||
struct rcar_canfd_hw_info {
|
||||
u8 rnc_field_width;
|
||||
u8 max_aflpn;
|
||||
u8 max_channels;
|
||||
u8 postdiv;
|
||||
/* hardware features */
|
||||
@@ -581,6 +582,7 @@ static const struct can_bittiming_const rcar_canfd_bittiming_const = {
|
||||
|
||||
static const struct rcar_canfd_hw_info rcar_gen3_hw_info = {
|
||||
.rnc_field_width = 8,
|
||||
.max_aflpn = 31,
|
||||
.max_channels = 2,
|
||||
.postdiv = 2,
|
||||
.shared_global_irqs = 1,
|
||||
@@ -588,6 +590,7 @@ static const struct rcar_canfd_hw_info rcar_gen3_hw_info = {
|
||||
|
||||
static const struct rcar_canfd_hw_info rcar_gen4_hw_info = {
|
||||
.rnc_field_width = 16,
|
||||
.max_aflpn = 127,
|
||||
.max_channels = 8,
|
||||
.postdiv = 2,
|
||||
.shared_global_irqs = 1,
|
||||
@@ -595,6 +598,7 @@ static const struct rcar_canfd_hw_info rcar_gen4_hw_info = {
|
||||
|
||||
static const struct rcar_canfd_hw_info rzg2l_hw_info = {
|
||||
.rnc_field_width = 8,
|
||||
.max_aflpn = 31,
|
||||
.max_channels = 2,
|
||||
.postdiv = 1,
|
||||
.multi_channel_irqs = 1,
|
||||
|
||||
Reference in New Issue
Block a user