Lines Matching +full:i2c +full:- +full:retry +full:- +full:count
1 // SPDX-License-Identifier: GPL-2.0-or-later
16 #include <linux/i2c.h>
18 #include <asm/mach-types.h>
31 * - Marvell 88F5281-D0
32 * - Marvell 88SX6042 SATA controller (PCI)
33 * - Marvell 88E1118 Gigabit Ethernet PHY
34 * - 256KB NOR flash
35 * - 128MB of DDR RAM
36 * - PCIe port (not equipped)
57 .end = TSP2_NOR_BOOT_BASE + TSP2_NOR_BOOT_SIZE - 1,
61 .name = "physmap-flash",
103 * Check for devices with hard-wired IRQs. in tsp2_pci_map_irq()
106 if (irq != -1) in tsp2_pci_map_irq()
115 return -1; in tsp2_pci_map_irq()
145 * RTC 5C372a on I2C bus
155 * Terastation Pro II specific power off method via UART1-attached
161 static int tsp2_miconread(unsigned char *buf, int count) in tsp2_miconread() argument
166 for (i = 0; i < count; i++) { in tsp2_miconread()
170 if (--timeout == 0) in tsp2_miconread()
184 static int tsp2_miconwrite(const unsigned char *buf, int count) in tsp2_miconwrite() argument
188 while (count--) { in tsp2_miconwrite()
197 static int tsp2_miconsend(const unsigned char *data, int count) in tsp2_miconsend() argument
204 int retry = 2; in tsp2_miconsend() local
207 for (i = 0; i < count; i++) in tsp2_miconsend()
208 checksum -= data[i]; in tsp2_miconsend()
212 tsp2_miconwrite(data, count); in tsp2_miconsend()
256 } while (retry--); in tsp2_miconsend()
261 return -1; in tsp2_miconsend()
272 pr_info("%s: triggering power-off...\n", __func__); in tsp2_power_off()
351 /* register Terastation Pro II specific power-off method */ in tsp2_init()