Skip to content

Commit e52984b

Browse files
committed
Merge tag 'linux-can-fixes-for-5.17-20220124' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says: ==================== pull-request: can 2022-01-24 The first patch updates the email address of Brian Silverman from his former employer to his private address. The next patch fixes DT bindings information for the tcan4x5x SPI CAN driver. The following patch targets the m_can driver and fixes the introduction of FIFO bulk read support. Another patch for the tcan4x5x driver, which fixes the max register value for the regmap config. The last patch for the flexcan driver marks the RX mailbox support for the MCF5441X as support. * tag 'linux-can-fixes-for-5.17-20220124' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: flexcan: mark RX via mailboxes as supported on MCF5441X can: tcan4x5x: regmap: fix max register value can: m_can: m_can_fifo_{read,write}: don't read or write from/to FIFO if length is 0 dt-bindings: can: tcan4x5x: fix mram-cfg RX FIFO config mailmap: update email address of Brian Silverman ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents de8a820 + f04aefd commit e52984b

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Boris Brezillon <[email protected]> <[email protected]>
7070
7171
Brian Avery <[email protected]>
7272
Brian King <[email protected]>
73+
7374
7475
7576

Documentation/devicetree/bindings/net/can/tcan4x5x.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tcan4x5x: tcan4x5x@0 {
3131
#address-cells = <1>;
3232
#size-cells = <1>;
3333
spi-max-frequency = <10000000>;
34-
bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
34+
bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
3535
interrupt-parent = <&gpio1>;
3636
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
3737
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;

drivers/net/can/flexcan/flexcan-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ static_assert(sizeof(struct flexcan_regs) == 0x4 * 18 + 0xfb8);
296296
static const struct flexcan_devtype_data fsl_mcf5441x_devtype_data = {
297297
.quirks = FLEXCAN_QUIRK_BROKEN_PERR_STATE |
298298
FLEXCAN_QUIRK_NR_IRQ_3 | FLEXCAN_QUIRK_NR_MB_16 |
299+
FLEXCAN_QUIRK_SUPPPORT_RX_MAILBOX |
299300
FLEXCAN_QUIRK_SUPPPORT_RX_FIFO,
300301
};
301302

drivers/net/can/flexcan/flexcan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Below is some version info we got:
2222
* SOC Version IP-Version Glitch- [TR]WRN_INT IRQ Err Memory err RTR rece- FD Mode MB
2323
* Filter? connected? Passive detection ption in MB Supported?
24-
* MCF5441X FlexCAN2 ? no yes no no yes no 16
24+
* MCF5441X FlexCAN2 ? no yes no no no no 16
2525
* MX25 FlexCAN2 03.00.00.00 no no no no no no 64
2626
* MX28 FlexCAN2 03.00.04.00 yes yes no no no no 64
2727
* MX35 FlexCAN2 03.00.00.00 no no no no no no 64

drivers/net/can/m_can/m_can.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ m_can_fifo_read(struct m_can_classdev *cdev,
336336
u32 addr_offset = cdev->mcfg[MRAM_RXF0].off + fgi * RXF0_ELEMENT_SIZE +
337337
offset;
338338

339+
if (val_count == 0)
340+
return 0;
341+
339342
return cdev->ops->read_fifo(cdev, addr_offset, val, val_count);
340343
}
341344

@@ -346,6 +349,9 @@ m_can_fifo_write(struct m_can_classdev *cdev,
346349
u32 addr_offset = cdev->mcfg[MRAM_TXB].off + fpi * TXB_ELEMENT_SIZE +
347350
offset;
348351

352+
if (val_count == 0)
353+
return 0;
354+
349355
return cdev->ops->write_fifo(cdev, addr_offset, val, val_count);
350356
}
351357

drivers/net/can/m_can/tcan4x5x-regmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define TCAN4X5X_SPI_INSTRUCTION_WRITE (0x61 << 24)
1313
#define TCAN4X5X_SPI_INSTRUCTION_READ (0x41 << 24)
1414

15-
#define TCAN4X5X_MAX_REGISTER 0x8ffc
15+
#define TCAN4X5X_MAX_REGISTER 0x87fc
1616

1717
static int tcan4x5x_regmap_gather_write(void *context,
1818
const void *reg, size_t reg_len,

0 commit comments

Comments
 (0)