| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * at91_can.c - CAN network driver for AT91 SoC CAN controller |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * (C) 2007 by Hans J. Koch <hjk@hansjkoch.de> |
|---|
| 5 | 6 | * (C) 2008, 2009, 2010, 2011 by Marc Kleine-Budde <kernel@pengutronix.de> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This software may be distributed under the terms of the GNU General |
|---|
| 8 | | - * Public License ("GPL") version 2 as distributed in the 'COPYING' |
|---|
| 9 | | - * file from the main directory of the linux kernel source. |
|---|
| 10 | | - * |
|---|
| 11 | 7 | */ |
|---|
| 12 | 8 | |
|---|
| 13 | 9 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 647 | 643 | * |
|---|
| 648 | 644 | * The first message goes into mb nr. 1 and issues an interrupt. All |
|---|
| 649 | 645 | * rx ints are disabled in the interrupt handler and a napi poll is |
|---|
| 650 | | - * scheduled. We read the mailbox, but do _not_ reenable the mb (to |
|---|
| 646 | + * scheduled. We read the mailbox, but do _not_ re-enable the mb (to |
|---|
| 651 | 647 | * receive another message). |
|---|
| 652 | 648 | * |
|---|
| 653 | 649 | * lower mbxs upper |
|---|
| .. | .. |
|---|
| 665 | 661 | * |
|---|
| 666 | 662 | * The variable priv->rx_next points to the next mailbox to read a |
|---|
| 667 | 663 | * message from. As long we're in the lower mailboxes we just read the |
|---|
| 668 | | - * mailbox but not reenable it. |
|---|
| 664 | + * mailbox but not re-enable it. |
|---|
| 669 | 665 | * |
|---|
| 670 | | - * With completion of the last of the lower mailboxes, we reenable the |
|---|
| 666 | + * With completion of the last of the lower mailboxes, we re-enable the |
|---|
| 671 | 667 | * whole first group, but continue to look for filled mailboxes in the |
|---|
| 672 | 668 | * upper mailboxes. Imagine the second group like overflow mailboxes, |
|---|
| 673 | 669 | * which takes CAN messages if the lower goup is full. While in the |
|---|
| 674 | | - * upper group we reenable the mailbox right after reading it. Giving |
|---|
| 670 | + * upper group we re-enable the mailbox right after reading it. Giving |
|---|
| 675 | 671 | * the chip more room to store messages. |
|---|
| 676 | 672 | * |
|---|
| 677 | 673 | * After finishing we look again in the lower group if we've still |
|---|
| .. | .. |
|---|
| 902 | 898 | CAN_ERR_CRTL_TX_WARNING : |
|---|
| 903 | 899 | CAN_ERR_CRTL_RX_WARNING; |
|---|
| 904 | 900 | } |
|---|
| 905 | | - case CAN_STATE_ERROR_WARNING: /* fallthrough */ |
|---|
| 901 | + fallthrough; |
|---|
| 902 | + case CAN_STATE_ERROR_WARNING: |
|---|
| 906 | 903 | /* |
|---|
| 907 | 904 | * from: ERROR_ACTIVE, ERROR_WARNING |
|---|
| 908 | 905 | * to : ERROR_PASSIVE, BUS_OFF |
|---|
| .. | .. |
|---|
| 951 | 948 | netdev_dbg(dev, "Error Active\n"); |
|---|
| 952 | 949 | cf->can_id |= CAN_ERR_PROT; |
|---|
| 953 | 950 | cf->data[2] = CAN_ERR_PROT_ACTIVE; |
|---|
| 954 | | - case CAN_STATE_ERROR_WARNING: /* fallthrough */ |
|---|
| 951 | + fallthrough; |
|---|
| 952 | + case CAN_STATE_ERROR_WARNING: |
|---|
| 955 | 953 | reg_idr = AT91_IRQ_ERRA | AT91_IRQ_WARN | AT91_IRQ_BOFF; |
|---|
| 956 | 954 | reg_ier = AT91_IRQ_ERRP; |
|---|
| 957 | 955 | break; |
|---|
| .. | .. |
|---|
| 1304 | 1302 | goto exit_put; |
|---|
| 1305 | 1303 | } |
|---|
| 1306 | 1304 | |
|---|
| 1307 | | - addr = ioremap_nocache(res->start, resource_size(res)); |
|---|
| 1305 | + addr = ioremap(res->start, resource_size(res)); |
|---|
| 1308 | 1306 | if (!addr) { |
|---|
| 1309 | 1307 | err = -ENOMEM; |
|---|
| 1310 | 1308 | goto exit_release; |
|---|