[PATCH 4/6] i.MX6: pci: Replace magic number with a named constant
Lucas Stach
l.stach at pengutronix.de
Thu Jan 7 01:04:14 PST 2016
Am Donnerstag, den 31.12.2015, 21:58 -0800 schrieb Andrey Smirnov:
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> drivers/pci/pci-imx6.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci-imx6.c b/drivers/pci/pci-imx6.c
> index eaa5f0e..84a937f 100644
> --- a/drivers/pci/pci-imx6.c
> +++ b/drivers/pci/pci-imx6.c
> @@ -51,6 +51,8 @@ struct imx6_pcie {
> #define PCIE_RC_LCR_MAX_LINK_SPEEDS_GEN2 0x2
> #define PCIE_RC_LCR_MAX_LINK_SPEEDS_MASK 0xf
>
> +#define PCIE_RC_LCSR 0x80
> +
> /* PCIe Port Logic registers (memory-mapped) */
> #define PL_OFFSET 0x700
> #define PCIE_PL_PFLR (PL_OFFSET + 0x08)
> @@ -418,7 +420,7 @@ static int imx6_pcie_start_link(struct pcie_port *pp)
> if (ret) {
> dev_err(pp->dev, "Failed to bring link up!\n");
> } else {
> - tmp = readl(pp->dbi_base + 0x80);
> + tmp = readl(pp->dbi_base + PCIE_RC_LCSR);
> dev_dbg(pp->dev, "Link up, Gen=%i\n", (tmp >> 16) & 0xf);
> }
>
> --
> 2.5.0
>
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the barebox
mailing list