Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444901

Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T
Date 2016-07-16 21:20 +0200
Message-ID <rVDi1-7HC-9@gated-at.bofh.it> (permalink)
References <rVzo5-5n4-3@gated-at.bofh.it> <rVzo6-5n4-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Saturday, July 16, 2016 3:29:04 PM CEST Jamie Lentin wrote:
> +
> +#define WNR854T_PCI_SLOT0_OFFS	7
> +#define WNR854T_PCI_SLOT0_IRQ_PIN	4
> +
> +static void __init wnr854t_pci_preinit(void)
> +{
> +	int pin;
> +
> +	/*
> +	 * Configure PCI GPIO IRQ pins
> +	 */
> +	pin = WNR854T_PCI_SLOT0_IRQ_PIN;
> +	if (gpio_request(pin, "PCI Int") == 0) {
> +		if (gpio_direction_input(pin) == 0) {
> +			irq_set_irq_type(gpio_to_irq(pin), IRQ_TYPE_LEVEL_LOW);
> +		} else {
> +			pr_err("wnr854t_pci_preinit failed to set_irq_type pin %d\n",
> +				pin);
> +			gpio_free(pin);
> +		}
> +	} else {
> +		pr_err("wnr854t_pci_preinit failed to request gpio %d\n", pin);
> +	}
> +}
> +
> +static int __init wnr854t_pci_map_irq(const struct pci_dev *dev, u8 slot,
> +	u8 pin)
> +{
> +	int irq;
> +
> +	/*
> +	 * Check for devices with hard-wired IRQs.
> +	 */
> +	irq = orion5x_pci_map_irq(dev, slot, pin);
> +	if (irq != -1)
> +		return irq;
> +
> +	/*
> +	 * PCI IRQs are connected via GPIOs
> +	 */
> +	switch (slot - WNR854T_PCI_SLOT0_OFFS) {
> +	case 0:
> +		return gpio_to_irq(WNR854T_PCI_SLOT0_IRQ_PIN);
> +	default:
> +		return -1;
> +	}
> +}

The other patches all appear good to me, but I find this one suspicious.

Why are you not using the device tree for probing PCI? Is there anything
missing in drivers/pci/host/pci-mvebu.c, or do you just need help
describing it in DT?

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v0 00/10] Convert Netgear WNR854T to devicetree Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
  [PATCH v0 09/10] net: phy: Re-attempt custom DT configuration after configuration Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 09/10] net: phy: Re-attempt custom DT configuration  after configuration Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:50 +0200
  [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:20 +0200
    Re: [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-07-16 19:40 +0200
    Re: [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Rob Herring <robh@kernel.org> - 2016-07-17 22:40 +0200
  [PATCH v0 01/10] arm: orion5x: Add required properties for orion-wdt to DT node Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 01/10] arm: orion5x: Add required properties for  orion-wdt to DT node Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:10 +0200
  [PATCH v0 10/10] arm: orion5x: Configure Netgear WNR854T network port LEDs Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
  [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:40 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:40 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-16 21:20 +0200
      Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-17 12:10 +0200
        Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-17 22:50 +0200
          Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-07-18 11:50 +0200
            Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-18 12:10 +0200
              Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-19 11:50 +0200
              Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-19 12:10 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Rob Herring <robh@kernel.org> - 2016-07-17 23:00 +0200
      Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-19 11:50 +0200
  [PATCH v0 07/10] arm: orion5x: Remove old non-DT-based WNR854T support Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 07/10] arm: orion5x: Remove old non-DT-based WNR854T  support Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:40 +0200
  [PATCH v0 04/10] arm: orion5x: Generalise mv88f5181l pinctrl support for 88f5181 Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 04/10] arm: orion5x: Generalise mv88f5181l pinctrl  support for 88f5181 Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:20 +0200
    Re: [PATCH v0 04/10] arm: orion5x: Generalise mv88f5181l pinctrl  support for 88f5181 Rob Herring <robh@kernel.org> - 2016-07-17 22:50 +0200

csiph-web