Lines Matching +full:pin +full:- +full:count

1 // SPDX-License-Identifier: GPL-2.0-or-later
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",
78 int pin; in tsp2_pci_preinit() local
83 pin = TSP2_PCI_SLOT0_IRQ_PIN; in tsp2_pci_preinit()
84 if (gpio_request(pin, "PCI Int1") == 0) { in tsp2_pci_preinit()
85 if (gpio_direction_input(pin) == 0) { in tsp2_pci_preinit()
86 irq_set_irq_type(gpio_to_irq(pin), IRQ_TYPE_LEVEL_LOW); in tsp2_pci_preinit()
89 "to set_irq_type pin %d\n", pin); in tsp2_pci_preinit()
90 gpio_free(pin); in tsp2_pci_preinit()
94 "gpio_request %d\n", pin); in tsp2_pci_preinit()
98 static int __init tsp2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) in tsp2_pci_map_irq() argument
103 * Check for devices with hard-wired IRQs. in tsp2_pci_map_irq()
105 irq = orion5x_pci_map_irq(dev, slot, pin); in tsp2_pci_map_irq()
106 if (irq != -1) in tsp2_pci_map_irq()
115 return -1; in tsp2_pci_map_irq()
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
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()