[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230206131620.2758724-22-mkl@pengutronix.de>
Date: Mon, 6 Feb 2023 14:15:54 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, linux-can@...r.kernel.org,
kernel@...gutronix.de,
Gerhard Uttenthaler <uttenthaler@...-wuensche.com>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: [PATCH net-next 21/47] can: ems_pci: Deassert hardware reset
From: Gerhard Uttenthaler <uttenthaler@...-wuensche.com>
The reset line from the Asix chip to the SJA1000 is asserted after boot up
until it is deasserted by a register write
Signed-off-by: Gerhard Uttenthaler <uttenthaler@...-wuensche.com>
Link: https://lore.kernel.org/all/20230120112616.6071-8-uttenthaler@ems-wuensche.com
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
---
drivers/net/can/sja1000/ems_pci.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c
index 1f237acd7bd1..212d051c53c0 100644
--- a/drivers/net/can/sja1000/ems_pci.c
+++ b/drivers/net/can/sja1000/ems_pci.c
@@ -326,6 +326,14 @@ static int ems_pci_add_card(struct pci_dev *pdev,
}
}
+ if (card->version == 3) {
+ /* ASIX chip asserts local reset to CAN controllers
+ * after bootup until it is deasserted
+ */
+ writel(readl(card->conf_addr + ASIX_LIEMR) & ~ASIX_LIEMR_LRST,
+ card->conf_addr + ASIX_LIEMR);
+ }
+
ems_pci_card_reset(card);
/* Detect available channels */
--
2.39.1
Powered by blists - more mailing lists