txgpio             48 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio	*txgpio;
txgpio             75 drivers/gpio/gpio-thunderx.c static bool thunderx_gpio_is_gpio_nowarn(struct thunderx_gpio *txgpio,
txgpio             78 drivers/gpio/gpio-thunderx.c 	u64 bit_cfg = readq(txgpio->register_base + bit_cfg_reg(line));
txgpio             87 drivers/gpio/gpio-thunderx.c static bool thunderx_gpio_is_gpio(struct thunderx_gpio *txgpio,
txgpio             90 drivers/gpio/gpio-thunderx.c 	bool rv = thunderx_gpio_is_gpio_nowarn(txgpio, line);
txgpio             99 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            101 drivers/gpio/gpio-thunderx.c 	return thunderx_gpio_is_gpio(txgpio, line) ? 0 : -EIO;
txgpio            106 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            108 drivers/gpio/gpio-thunderx.c 	if (!thunderx_gpio_is_gpio(txgpio, line))
txgpio            111 drivers/gpio/gpio-thunderx.c 	raw_spin_lock(&txgpio->lock);
txgpio            112 drivers/gpio/gpio-thunderx.c 	clear_bit(line, txgpio->invert_mask);
txgpio            113 drivers/gpio/gpio-thunderx.c 	clear_bit(line, txgpio->od_mask);
txgpio            114 drivers/gpio/gpio-thunderx.c 	writeq(txgpio->line_entries[line].fil_bits,
txgpio            115 drivers/gpio/gpio-thunderx.c 	       txgpio->register_base + bit_cfg_reg(line));
txgpio            116 drivers/gpio/gpio-thunderx.c 	raw_spin_unlock(&txgpio->lock);
txgpio            123 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            127 drivers/gpio/gpio-thunderx.c 	void __iomem *reg = txgpio->register_base +
txgpio            136 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            137 drivers/gpio/gpio-thunderx.c 	u64 bit_cfg = txgpio->line_entries[line].fil_bits | GPIO_BIT_CFG_TX_OE;
txgpio            139 drivers/gpio/gpio-thunderx.c 	if (!thunderx_gpio_is_gpio(txgpio, line))
txgpio            142 drivers/gpio/gpio-thunderx.c 	raw_spin_lock(&txgpio->lock);
txgpio            146 drivers/gpio/gpio-thunderx.c 	if (test_bit(line, txgpio->invert_mask))
txgpio            149 drivers/gpio/gpio-thunderx.c 	if (test_bit(line, txgpio->od_mask))
txgpio            152 drivers/gpio/gpio-thunderx.c 	writeq(bit_cfg, txgpio->register_base + bit_cfg_reg(line));
txgpio            154 drivers/gpio/gpio-thunderx.c 	raw_spin_unlock(&txgpio->lock);
txgpio            160 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            163 drivers/gpio/gpio-thunderx.c 	if (!thunderx_gpio_is_gpio_nowarn(txgpio, line))
txgpio            171 drivers/gpio/gpio-thunderx.c 	bit_cfg = readq(txgpio->register_base + bit_cfg_reg(line));
txgpio            186 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            187 drivers/gpio/gpio-thunderx.c 	void __iomem *reg = txgpio->register_base + (bank * GPIO_2ND_BANK) + GPIO_TX_SET;
txgpio            189 drivers/gpio/gpio-thunderx.c 	if (!thunderx_gpio_is_gpio(txgpio, line))
txgpio            192 drivers/gpio/gpio-thunderx.c 	raw_spin_lock(&txgpio->lock);
txgpio            193 drivers/gpio/gpio-thunderx.c 	orig_invert = test_bit(line, txgpio->invert_mask);
txgpio            195 drivers/gpio/gpio-thunderx.c 	orig_od = test_bit(line, txgpio->od_mask);
txgpio            198 drivers/gpio/gpio-thunderx.c 	bit_cfg = readq(txgpio->register_base + bit_cfg_reg(line));
txgpio            206 drivers/gpio/gpio-thunderx.c 		set_bit(line, txgpio->invert_mask);
txgpio            208 drivers/gpio/gpio-thunderx.c 		set_bit(line, txgpio->od_mask);
txgpio            213 drivers/gpio/gpio-thunderx.c 		clear_bit(line, txgpio->invert_mask);
txgpio            215 drivers/gpio/gpio-thunderx.c 		clear_bit(line, txgpio->od_mask);
txgpio            232 drivers/gpio/gpio-thunderx.c 		txgpio->line_entries[line].fil_bits =
txgpio            236 drivers/gpio/gpio-thunderx.c 		bit_cfg |= txgpio->line_entries[line].fil_bits;
txgpio            237 drivers/gpio/gpio-thunderx.c 		writeq(bit_cfg, txgpio->register_base + bit_cfg_reg(line));
txgpio            243 drivers/gpio/gpio-thunderx.c 	raw_spin_unlock(&txgpio->lock);
txgpio            258 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            261 drivers/gpio/gpio-thunderx.c 	u64 read_bits = readq(txgpio->register_base + (bank * GPIO_2ND_BANK) + GPIO_RX_DAT);
txgpio            264 drivers/gpio/gpio-thunderx.c 	if (test_bit(line, txgpio->invert_mask))
txgpio            276 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            281 drivers/gpio/gpio-thunderx.c 		writeq(set_bits, txgpio->register_base + (bank * GPIO_2ND_BANK) + GPIO_TX_SET);
txgpio            282 drivers/gpio/gpio-thunderx.c 		writeq(clear_bits, txgpio->register_base + (bank * GPIO_2ND_BANK) + GPIO_TX_CLR);
txgpio            291 drivers/gpio/gpio-thunderx.c 	       txline->txgpio->register_base + intr_reg(txline->line));
txgpio            299 drivers/gpio/gpio-thunderx.c 	       txline->txgpio->register_base + intr_reg(txline->line));
txgpio            307 drivers/gpio/gpio-thunderx.c 	       txline->txgpio->register_base + intr_reg(txline->line));
txgpio            315 drivers/gpio/gpio-thunderx.c 	       txline->txgpio->register_base + intr_reg(txline->line));
txgpio            322 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = txline->txgpio;
txgpio            336 drivers/gpio/gpio-thunderx.c 	raw_spin_lock(&txgpio->lock);
txgpio            339 drivers/gpio/gpio-thunderx.c 		set_bit(txline->line, txgpio->invert_mask);
txgpio            341 drivers/gpio/gpio-thunderx.c 		clear_bit(txline->line, txgpio->invert_mask);
txgpio            343 drivers/gpio/gpio-thunderx.c 	clear_bit(txline->line, txgpio->od_mask);
txgpio            344 drivers/gpio/gpio-thunderx.c 	writeq(bit_cfg, txgpio->register_base + bit_cfg_reg(txline->line));
txgpio            345 drivers/gpio/gpio-thunderx.c 	raw_spin_unlock(&txgpio->lock);
txgpio            365 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = txline->txgpio;
txgpio            368 drivers/gpio/gpio-thunderx.c 	r = gpiochip_lock_as_irq(&txgpio->chip, txline->line);
txgpio            374 drivers/gpio/gpio-thunderx.c 		gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
txgpio            382 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = txline->txgpio;
txgpio            386 drivers/gpio/gpio-thunderx.c 	gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
txgpio            417 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = d->host_data;
txgpio            421 drivers/gpio/gpio-thunderx.c 	if (fwspec->param[0] >= txgpio->chip.ngpio)
txgpio            444 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = gpiochip_get_data(chip);
txgpio            446 drivers/gpio/gpio-thunderx.c 	return irq_find_mapping(txgpio->irqd, offset);
txgpio            454 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio;
txgpio            459 drivers/gpio/gpio-thunderx.c 	txgpio = devm_kzalloc(dev, sizeof(*txgpio), GFP_KERNEL);
txgpio            460 drivers/gpio/gpio-thunderx.c 	if (!txgpio)
txgpio            463 drivers/gpio/gpio-thunderx.c 	raw_spin_lock_init(&txgpio->lock);
txgpio            464 drivers/gpio/gpio-thunderx.c 	chip = &txgpio->chip;
txgpio            466 drivers/gpio/gpio-thunderx.c 	pci_set_drvdata(pdev, txgpio);
txgpio            481 drivers/gpio/gpio-thunderx.c 	txgpio->register_base = tbl[0];
txgpio            482 drivers/gpio/gpio-thunderx.c 	if (!txgpio->register_base) {
txgpio            491 drivers/gpio/gpio-thunderx.c 		txgpio->base_msi = 48;
txgpio            493 drivers/gpio/gpio-thunderx.c 		u64 c = readq(txgpio->register_base + GPIO_CONST);
txgpio            496 drivers/gpio/gpio-thunderx.c 		txgpio->base_msi = (c >> 8) & 0xff;
txgpio            499 drivers/gpio/gpio-thunderx.c 	txgpio->msix_entries = devm_kcalloc(dev,
txgpio            502 drivers/gpio/gpio-thunderx.c 	if (!txgpio->msix_entries) {
txgpio            507 drivers/gpio/gpio-thunderx.c 	txgpio->line_entries = devm_kcalloc(dev,
txgpio            511 drivers/gpio/gpio-thunderx.c 	if (!txgpio->line_entries) {
txgpio            517 drivers/gpio/gpio-thunderx.c 		u64 bit_cfg = readq(txgpio->register_base + bit_cfg_reg(i));
txgpio            519 drivers/gpio/gpio-thunderx.c 		txgpio->msix_entries[i].entry = txgpio->base_msi + (2 * i);
txgpio            520 drivers/gpio/gpio-thunderx.c 		txgpio->line_entries[i].line = i;
txgpio            521 drivers/gpio/gpio-thunderx.c 		txgpio->line_entries[i].txgpio = txgpio;
txgpio            527 drivers/gpio/gpio-thunderx.c 		txgpio->line_entries[i].fil_bits = bit_cfg ?
txgpio            531 drivers/gpio/gpio-thunderx.c 			set_bit(i, txgpio->od_mask);
txgpio            533 drivers/gpio/gpio-thunderx.c 			set_bit(i, txgpio->invert_mask);
txgpio            538 drivers/gpio/gpio-thunderx.c 	err = pci_enable_msix_range(pdev, txgpio->msix_entries, ngpio, ngpio);
txgpio            546 drivers/gpio/gpio-thunderx.c 	txgpio->irqd = irq_domain_create_hierarchy(irq_get_irq_data(txgpio->msix_entries[0].vector)->domain,
txgpio            548 drivers/gpio/gpio-thunderx.c 						   &thunderx_gpio_irqd_ops, txgpio);
txgpio            549 drivers/gpio/gpio-thunderx.c 	if (!txgpio->irqd) {
txgpio            556 drivers/gpio/gpio-thunderx.c 		err = irq_domain_push_irq(txgpio->irqd,
txgpio            557 drivers/gpio/gpio-thunderx.c 					  txgpio->msix_entries[i].vector,
txgpio            558 drivers/gpio/gpio-thunderx.c 					  &txgpio->line_entries[i]);
txgpio            578 drivers/gpio/gpio-thunderx.c 	err = devm_gpiochip_add_data(dev, chip, txgpio);
txgpio            593 drivers/gpio/gpio-thunderx.c 	struct thunderx_gpio *txgpio = pci_get_drvdata(pdev);
txgpio            595 drivers/gpio/gpio-thunderx.c 	for (i = 0; i < txgpio->chip.ngpio; i++)
txgpio            596 drivers/gpio/gpio-thunderx.c 		irq_domain_pop_irq(txgpio->irqd,
txgpio            597 drivers/gpio/gpio-thunderx.c 				   txgpio->msix_entries[i].vector);
txgpio            599 drivers/gpio/gpio-thunderx.c 	irq_domain_remove(txgpio->irqd);