From: Jiri Slaby <jirislaby@kernel.org>
To: "Grégoire Layet" <gregoire.layet@9elements.com>,
joel@jms.id.au, andrew@codeconstruct.com.au, lkundrak@v3.sk,
devicetree@vger.kernel.org, gregkh@linuxfoundation.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org
Cc: andrew@lunn.ch, jacky_chou@aspeedtech.com,
yh_chung@aspeedtech.com, ninad@linux.ibm.com,
anirudhsriniv@gmail.com, linux-serial@vger.kernel.org,
linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 4/7] serial: 8250_aspeed_vuart: add VUART over PCI
Date: Thu, 9 Jul 2026 07:17:51 +0200 [thread overview]
Message-ID: <1af9eb75-fcab-4541-8ba7-ec620546f031@kernel.org> (raw)
In-Reply-To: <28c6e7c493559feffc7e6231b0a2f0b73b7fda41.1783524645.git.gregoire.layet@9elements.com>
On 08. 07. 26, 17:35, Grégoire Layet wrote:
...
> --- a/drivers/tty/serial/8250/8250_aspeed_vuart.c
> +++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c
> @@ -32,6 +32,26 @@
> #define ASPEED_VUART_DEFAULT_SIRQ 4
> #define ASPEED_VUART_DEFAULT_SIRQ_POLARITY IRQ_TYPE_LEVEL_LOW
>
> +#define ASPEED_SCU_SILICON_REVISION_ID 0x04
> +#define AST2600A3_REVISION_ID 0x05030303
> +
> +#define ASPEED_SCUC24 0xC24
> +#define ASPEED_SCUC24_MSI_ROUTING_MASK GENMASK(11, 10)
> +#define ASPEED_SCUC24_MSI_ROUTING_PCIE2LPC_PCIDEV1 (0x2 << 10)
So is this
FIELD_PREP(ASPEED_SCUC24_MSI_ROUTING_MASK, 2)
?
> +#define ASPEED_SCUC24_PCIDEV1_INTX_MSI_HOST2BMC_EN BIT(18)
> +#define ASPEED_SCUC24_PCIDEV1_INTX_MSI_SCU560_EN BIT(17)
Perhaps switch the two (to be in asc order)? And define 14 as _RESERVED
as well?
> +#define ASPEED_SCU_PCIE_CONF_CTRL 0xC20
Hmm, should these go before 0xC24?
> +#define SCU_PCIE_CONF_BMC_DEV_EN BIT(8)
> +#define SCU_PCIE_CONF_BMC_DEV_EN_MMIO BIT(9)
> +#define SCU_PCIE_CONF_BMC_DEV_EN_MSI BIT(11)
> +#define SCU_PCIE_CONF_BMC_DEV_EN_IRQ BIT(13)
> +#define SCU_PCIE_CONF_BMC_DEV_EN_PCIE_BUS_MASTER BIT(14)
> +#define SCU_PCIE_CONF_BMC_DEV_EN_E2L BIT(15)
> +#define SCU_PCIE_CONF_BMC_DEV_EN_LPC_DECODE BIT(21)
> +
> +#define ASPEED_SCU_BMC_DEV_CLASS 0xC68
> +
> struct aspeed_vuart {
> struct device *dev;
> int line;
> @@ -412,6 +432,63 @@ static int aspeed_vuart_map_irq_polarity(u32 dt)
> }
> }
>
> +static int aspeed_ast2600_vuart_over_pci_set_enabled(struct platform_device *pdev)
> +{
...
> + if (silicon_revision_id == AST2600A3_REVISION_ID)
> + rc = regmap_update_bits(scu, ASPEED_SCUC24,
> + ASPEED_SCUC24_PCIDEV1_INTX_MSI_HOST2BMC_EN | ASPEED_SCUC24_MSI_ROUTING_MASK,
> + ASPEED_SCUC24_PCIDEV1_INTX_MSI_HOST2BMC_EN | ASPEED_SCUC24_MSI_ROUTING_PCIE2LPC_PCIDEV1);
> + else
> + rc = regmap_update_bits(scu, ASPEED_SCUC24,
> + /**
> + * The bit 14 is reserved in the Datasheet.
> + */
If you defined reserved as suggested above, no need for the comment.
> + ASPEED_SCUC24_PCIDEV1_INTX_MSI_SCU560_EN | BIT(14) | ASPEED_SCUC24_MSI_ROUTING_MASK,
> + ASPEED_SCUC24_PCIDEV1_INTX_MSI_SCU560_EN | BIT(14) | ASPEED_SCUC24_MSI_ROUTING_PCIE2LPC_PCIDEV1);
> + if (rc) {
> + dev_err(dev, "could not set PCI device 1 MSI interrupt routing\n");
> + return -EIO;
> + }
> +
> + return 0;
> +}
> +
thanks,
--
js
suse labs
next prev parent reply other threads:[~2026-07-09 5:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 15:35 [PATCH v4 0/7] soc: aspeed: Add BMC and host driver for PCIe BMC device Grégoire Layet
2026-07-08 15:35 ` [PATCH v4 1/7] dt-bindings: serial: 8250: aspeed: add compatible string for ast2600 Grégoire Layet
2026-07-08 16:38 ` Andrew Lunn
2026-07-09 8:50 ` Krzysztof Kozlowski
2026-07-09 14:21 ` Grégoire Layet
2026-07-08 15:35 ` [PATCH v4 2/7] dt-bindings: serial: 8250: aspeed: add aspeed,vuart-over-pci bool prop Grégoire Layet
2026-07-09 8:54 ` Krzysztof Kozlowski
2026-07-08 15:35 ` [PATCH v4 3/7] serial: 8250_aspeed_vuart: add aspeed,ast2600-vuart compatible string Grégoire Layet
2026-07-08 15:35 ` [PATCH v4 4/7] serial: 8250_aspeed_vuart: add VUART over PCI Grégoire Layet
2026-07-08 16:46 ` Andrew Lunn
2026-07-09 5:18 ` Jiri Slaby
2026-07-09 5:17 ` Jiri Slaby [this message]
2026-07-08 15:35 ` [PATCH v4 5/7] soc: aspeed: add host-side PCIe BMC device driver Grégoire Layet
2026-07-09 5:27 ` Jiri Slaby
2026-07-08 15:35 ` [PATCH v4 6/7] ARM: dts: aspeed: g6: Change vuart compatible string for ast2600 Grégoire Layet
2026-07-08 15:35 ` [PATCH v4 7/7] ARM: dts: aspeed: g6: add aspeed,vuart-over-pci prop to vuart3 and 4 Grégoire Layet
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=1af9eb75-fcab-4541-8ba7-ec620546f031@kernel.org \
--to=jirislaby@kernel.org \
--cc=andrew@codeconstruct.com.au \
--cc=andrew@lunn.ch \
--cc=anirudhsriniv@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=gregoire.layet@9elements.com \
--cc=jacky_chou@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lkundrak@v3.sk \
--cc=ninad@linux.ibm.com \
--cc=robh@kernel.org \
--cc=yh_chung@aspeedtech.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox