Lines Matching +full:cdr +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * tscan1.c: driver for Technologic Systems TS-CAN1 PC104 boards
9 * - Getting started with TS-CAN1, Technologic Systems, Feb 2022
10 * https://docs.embeddedts.com/TS-CAN1
21 MODULE_DESCRIPTION("Driver for Technologic Systems TS-CAN1 PC104 boards");
41 /* PLD mode register SJA1000 IO enable bit */
68 return inb((unsigned long)priv->reg_base + reg); in tscan1_read()
74 outb(val, (unsigned long)priv->reg_base + reg); in tscan1_write()
77 /* Probe for a TS-CAN1 board with JP2:JP1 jumper setting ID */
87 return -EBUSY; in tscan1_probe()
92 return -ENODEV; in tscan1_probe()
108 return -EINVAL; in tscan1_probe()
114 return -ENOMEM; in tscan1_probe()
120 netdev->base_addr = pld_base; in tscan1_probe()
121 netdev->irq = irq; in tscan1_probe()
124 priv->read_reg = tscan1_read; in tscan1_probe()
125 priv->write_reg = tscan1_write; in tscan1_probe()
126 priv->can.clock.freq = TSCAN1_SJA1000_XTAL / 2; in tscan1_probe()
127 priv->cdr = CDR_CBP | CDR_CLK_OFF; in tscan1_probe()
128 priv->ocr = OCR_TX0_PUSHPULL; in tscan1_probe()
140 priv->reg_base = (void __iomem *)sja1000_base; in tscan1_probe()
144 netdev_info(netdev, "TS-CAN1 at 0x%lx 0x%lx irq %d\n", in tscan1_probe()
158 return -ENXIO; in tscan1_probe()
172 pld_base = netdev->base_addr; in tscan1_remove()
173 sja1000_base = (unsigned long)priv->reg_base; in tscan1_remove()