mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
Merge patch series "R-Car CANFD fixes"
Biju Das <biju.das.jz@bp.renesas.com> says: This patch series addresses 2 issues 1) Fix typo in pattern properties for R-Car V4M. 2) Fix page entries in the AFL list. v2->v3: * Collected tags. * Dropped unused variables cfg and start from rcar_canfd_configure_afl_rules(). * Link to v2: https://lore.kernel.org/all/20250220094516.126598-1-biju.das.jz@bp.renesas.com v1->v2: * Split fixes patches as separate series. * Added Rb tag from Geert for binding patch. * Added the tag Cc:stable@vger.kernel.org Link: https://patch.msgid.link/20250307170330.173425-1-biju.das.jz@bp.renesas.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
commit
d5cd454825
|
|
@ -170,7 +170,7 @@ allOf:
|
|||
const: renesas,r8a779h0-canfd
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel[5-7]$": false
|
||||
"^channel[4-7]$": false
|
||||
else:
|
||||
if:
|
||||
not:
|
||||
|
|
|
|||
|
|
@ -787,22 +787,14 @@ static void rcar_canfd_configure_controller(struct rcar_canfd_global *gpriv)
|
|||
}
|
||||
|
||||
static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
|
||||
u32 ch)
|
||||
u32 ch, u32 rule_entry)
|
||||
{
|
||||
u32 cfg;
|
||||
int offset, start, page, num_rules = RCANFD_CHANNEL_NUMRULES;
|
||||
int offset, page, num_rules = RCANFD_CHANNEL_NUMRULES;
|
||||
u32 rule_entry_index = rule_entry % 16;
|
||||
u32 ridx = ch + RCANFD_RFFIFO_IDX;
|
||||
|
||||
if (ch == 0) {
|
||||
start = 0; /* Channel 0 always starts from 0th rule */
|
||||
} else {
|
||||
/* Get number of Channel 0 rules and adjust */
|
||||
cfg = rcar_canfd_read(gpriv->base, RCANFD_GAFLCFG(ch));
|
||||
start = RCANFD_GAFLCFG_GETRNC(gpriv, 0, cfg);
|
||||
}
|
||||
|
||||
/* Enable write access to entry */
|
||||
page = RCANFD_GAFL_PAGENUM(start);
|
||||
page = RCANFD_GAFL_PAGENUM(rule_entry);
|
||||
rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLECTR,
|
||||
(RCANFD_GAFLECTR_AFLPN(gpriv, page) |
|
||||
RCANFD_GAFLECTR_AFLDAE));
|
||||
|
|
@ -818,13 +810,13 @@ static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
|
|||
offset = RCANFD_C_GAFL_OFFSET;
|
||||
|
||||
/* Accept all IDs */
|
||||
rcar_canfd_write(gpriv->base, RCANFD_GAFLID(offset, start), 0);
|
||||
rcar_canfd_write(gpriv->base, RCANFD_GAFLID(offset, rule_entry_index), 0);
|
||||
/* IDE or RTR is not considered for matching */
|
||||
rcar_canfd_write(gpriv->base, RCANFD_GAFLM(offset, start), 0);
|
||||
rcar_canfd_write(gpriv->base, RCANFD_GAFLM(offset, rule_entry_index), 0);
|
||||
/* Any data length accepted */
|
||||
rcar_canfd_write(gpriv->base, RCANFD_GAFLP0(offset, start), 0);
|
||||
rcar_canfd_write(gpriv->base, RCANFD_GAFLP0(offset, rule_entry_index), 0);
|
||||
/* Place the msg in corresponding Rx FIFO entry */
|
||||
rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLP1(offset, start),
|
||||
rcar_canfd_set_bit(gpriv->base, RCANFD_GAFLP1(offset, rule_entry_index),
|
||||
RCANFD_GAFLP1_GAFLFDP(ridx));
|
||||
|
||||
/* Disable write access to page */
|
||||
|
|
@ -1851,6 +1843,7 @@ static int rcar_canfd_probe(struct platform_device *pdev)
|
|||
unsigned long channels_mask = 0;
|
||||
int err, ch_irq, g_irq;
|
||||
int g_err_irq, g_recc_irq;
|
||||
u32 rule_entry = 0;
|
||||
bool fdmode = true; /* CAN FD only mode - default */
|
||||
char name[9] = "channelX";
|
||||
int i;
|
||||
|
|
@ -2023,7 +2016,8 @@ static int rcar_canfd_probe(struct platform_device *pdev)
|
|||
rcar_canfd_configure_tx(gpriv, ch);
|
||||
|
||||
/* Configure receive rules */
|
||||
rcar_canfd_configure_afl_rules(gpriv, ch);
|
||||
rcar_canfd_configure_afl_rules(gpriv, ch, rule_entry);
|
||||
rule_entry += RCANFD_CHANNEL_NUMRULES;
|
||||
}
|
||||
|
||||
/* Configure common interrupts */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user