From: Andrea della Porta <andrea.porta@suse.com>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: Andrea della Porta <andrea.porta@suse.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Krzysztof Wilczynski <kw@linux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Linus Walleij <linus.walleij@linaro.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Derek Kiernan <derek.kiernan@amd.com>,
Dragan Cvetic <dragan.cvetic@amd.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Saravana Kannan <saravanak@google.com>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-gpio@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Herve Codina <herve.codina@bootlin.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH v4 08/10] misc: rp1: RaspberryPi RP1 misc driver
Date: Fri, 29 Nov 2024 17:28:19 +0100 [thread overview]
Message-ID: <Z0nro2vMNxoU35GH@apocalypse> (raw)
In-Reply-To: <c5575991-eab1-40ef-a984-b23076b09cf3@gmx.net>
Hi Stephan,
On 19:35 Mon 25 Nov , Stefan Wahren wrote:
> Hi Andrea,
>
> Am 24.11.24 um 11:51 schrieb Andrea della Porta:
> > The RaspberryPi RP1 is a PCI multi function device containing
> > peripherals ranging from Ethernet to USB controller, I2C, SPI
> > and others.
> >
...
> > + Support the RP1 peripheral chip found on Raspberry Pi 5 board.
> > + controller, USB controller, I2C, SPI and UART.
> > +
> > + The driver is responsible for enabling the DT node once the PCIe
> > + endpoint has been configured, and handling interrupts.
> > +
> > + This driver uses an overlay to load other drivers to support for
> > + RP1 internal sub-devices.
> Please fix up the leading whitespace here
Ack.
> > diff --git a/drivers/misc/rp1/Makefile b/drivers/misc/rp1/Makefile
> > new file mode 100644
> > index 000000000000..508b4cb05627
> > --- /dev/null
> > +++ b/drivers/misc/rp1/Makefile
> > @@ -0,0 +1,3 @@
> > +# SPDX-License-Identifier: GPL-2.0-only
...
> > +#define RP1_INT_SYSCFG 58
> > +#define RP1_INT_CLOCKS_DEFAULT 59
> > +#define RP1_INT_VBUSCTRL 60
> > +#define RP1_INT_PROC_MISC 57
> > +#define RP1_INT_END 61
> > +
> > +struct rp1_dev {
> > + struct pci_dev *pdev;
> > + struct irq_domain *domain;
> > + struct irq_data *pcie_irqds[64];
> > + void __iomem *bar1;
> > + int ovcs_id;
> /* overlay changeset id */
Ack.
> > + bool level_triggered_irq[RP1_INT_END];
> > +};
> > +
> > +static void msix_cfg_set(struct rp1_dev *rp1, unsigned int hwirq, u32 value)
> > +{
...
> > + struct device_node *rp1_node;
> > + struct rp1_dev *rp1;
> > + int err = 0;
> Please remove the extra space after err
Ack.
> > + int i;
> > +
> > + rp1_node = dev_of_node(dev);
> > + if (!rp1_node) {
> > + dev_err(dev, "Missing of_node for device\n");
> > + return -EINVAL;
> > + }
> > +
> > + rp1 = devm_kzalloc(&pdev->dev, sizeof(*rp1), GFP_KERNEL);
> > + if (!rp1)
> > + return -ENOMEM;
> > +
> > + rp1->pdev = pdev;
...
> > + err = pci_alloc_irq_vectors(pdev, RP1_INT_END, RP1_INT_END,
> > + PCI_IRQ_MSIX);
> > + if (err < 0)
> > + return dev_err_probe(&pdev->dev, err,
> > + "pci_alloc_irq_vectors failed");
> > + else if (err != RP1_INT_END) {
> Please add braces for the if case
Ack.
Many thanks,
Andrea
> > + dev_err(&pdev->dev, "Cannot allocate enough interrupts\n");
> > + return -EINVAL;
> > + }
> > +
> >
next prev parent reply other threads:[~2024-11-29 16:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 10:51 [PATCH v4 00/10] Add support for RaspberryPi RP1 PCI device using a DT overlay Andrea della Porta
2024-11-24 10:51 ` [PATCH v4 01/10] dt-bindings: clock: Add RaspberryPi RP1 clock bindings Andrea della Porta
2024-11-27 7:34 ` Krzysztof Kozlowski
2024-11-24 10:51 ` [PATCH v4 02/10] dt-bindings: pinctrl: Add RaspberryPi RP1 gpio/pinctrl/pinmux bindings Andrea della Porta
2024-11-25 18:12 ` Stefan Wahren
2024-11-29 17:51 ` Andrea della Porta
2024-11-27 7:55 ` Krzysztof Kozlowski
2024-11-29 17:11 ` Andrea della Porta
2024-11-24 10:51 ` [PATCH v4 03/10] dt-bindings: pci: Add common schema for devices accessible through PCI BARs Andrea della Porta
2024-11-24 10:51 ` [PATCH v4 04/10] dt-bindings: misc: Add device specific bindings for RaspberryPi RP1 Andrea della Porta
2024-11-25 2:06 ` Rob Herring (Arm)
2024-11-25 9:15 ` Andrea della Porta
2024-11-25 13:21 ` Rob Herring
2024-11-26 15:08 ` Andrea della Porta
2024-11-24 10:51 ` [PATCH v4 05/10] clk: rp1: Add support for clocks provided by RP1 Andrea della Porta
2024-11-24 10:51 ` [PATCH v4 06/10] pinctrl: rp1: Implement RaspberryPi RP1 gpio support Andrea della Porta
2024-11-25 18:46 ` Stefan Wahren
2024-11-24 10:51 ` [PATCH v4 07/10] arm64: dts: rp1: Add support for RaspberryPi's RP1 device Andrea della Porta
2024-11-24 10:51 ` [PATCH v4 08/10] misc: rp1: RaspberryPi RP1 misc driver Andrea della Porta
2024-11-24 19:33 ` Andrew Lunn
2024-11-25 8:35 ` Andrea della Porta
2024-11-25 13:46 ` Greg Kroah-Hartman
2024-11-29 18:18 ` Andrea della Porta
2024-11-25 18:35 ` Stefan Wahren
2024-11-29 16:28 ` Andrea della Porta [this message]
2024-11-24 10:51 ` [PATCH v4 09/10] arm64: dts: bcm2712: Add external clock for RP1 chipset on Rpi5 Andrea della Porta
2024-11-24 19:41 ` Andrew Lunn
2024-11-25 8:55 ` Andrea della Porta
2024-11-24 10:51 ` [PATCH v4 10/10] arm64: defconfig: Enable RP1 misc/clock/gpio drivers Andrea della Porta
2024-11-25 18:37 ` Stefan Wahren
2024-11-24 19:26 ` [PATCH v4 00/10] Add support for RaspberryPi RP1 PCI device using a DT overlay Andrew Lunn
2024-11-25 8:57 ` Andrea della Porta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z0nro2vMNxoU35GH@apocalypse \
--to=andrea.porta@suse.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=derek.kiernan@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=dragan.cvetic@amd.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=herve.codina@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=masahiroy@kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=sboyd@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=wahrenst@gmx.net \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.