From: kettenis Date: Wed, 5 Apr 2023 10:48:12 +0000 (+0000) Subject: Call dwpcie_link_config() when initializing the RK3568 PCIe controllers. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a14a93a7abf5b2712256aa0e9277a3f5583dbc43;p=openbsd Call dwpcie_link_config() when initializing the RK3568 PCIe controllers. This makes sure the PCIe link runs at the maximum possible speed. Prompted by a diff from dlg@, who also tested this alternative diff. ok dlg@ --- diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c index d8394067cd3..ab4a53889c1 100644 --- a/sys/dev/fdt/dwpcie.c +++ b/sys/dev/fdt/dwpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwpcie.c,v 1.43 2023/03/30 20:07:49 kn Exp $ */ +/* $OpenBSD: dwpcie.c,v 1.44 2023/04/05 10:48:12 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -1307,6 +1307,8 @@ dwpcie_rk3568_init(struct dwpcie_softc *sc) if (reset_gpiolen > 0) gpio_controller_set_pin(reset_gpio, 0); + dwpcie_link_config(sc); + /* Enable LTSSM. */ bus_space_write_4(sc->sc_iot, sc->sc_glue_ioh, PCIE_CLIENT_GENERAL_CON, PCIE_CLIENT_LINK_REQ_RST_GRT | PCIE_CLIENT_APP_LTSSM_ENABLE);