[PATCH v6 6/6] PCI: spacemit-k1: Add Spacemit K3 PCIe host controller support

Troy Mitchell troy.mitchell at linux.spacemit.com
Wed Sep 23 20:25:07 PDT 2026


On Wed, Sep 23, 2026 at 09:50:15AM +0800, Inochi Amaoto wrote:
> @@ -315,6 +328,123 @@ static int k1_pcie_parse_port(struct k1_pcie *k1)
> +static int k3_pcie_init(struct dw_pcie_rp *pp)
> +{
> [...]
> +failed_phy_power_on:
> +	phy_bulk_exit(k1->phy_count, k1->phys);
> +failed_phy_init:
> +	k1_pcie_disable_resources(k1);
> +failed_resources:
> +	regmap_update_bits(k1->pmu, k1->pmu_off + PCIE_CONTROL_LOGIC,
> +			   PCIE_PERSTN_OUT | PCIE_PERSTN_OE | PCIE_IGNORE_PERSTN,
> +			   PCIE_PERSTN_OUT | PCIE_PERSTN_OE);

Could we keep PERST# asserted on the error path, as k3_pcie_deinit()
does? Setting PCIE_PERSTN_OUT here releases the endpoint from reset
even though initialization has failed and the controller resources
are unavailable.


-- 
Troy Mitchell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20260924/a1b54f18/attachment.sig>


More information about the linux-riscv mailing list