X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Farmltd%2Fintegrator%2Fpci.c;h=28efc33f1f426bd3d28d3d9f53943a099960e6d8;hb=c05ed00afb95fa5237f16962fccf5810437317bf;hp=f040450417cfb10a077134c1e3a40a8a126c0cd7;hpb=2458716a5b2269cff89f4b41afac16ac84bf6fb2;p=oweals%2Fu-boot.git diff --git a/board/armltd/integrator/pci.c b/board/armltd/integrator/pci.c index f040450417..28efc33f1f 100644 --- a/board/armltd/integrator/pci.c +++ b/board/armltd/integrator/pci.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2002 * Sysgo Real-Time Solutions, GmbH @@ -17,28 +18,14 @@ * (C) Copyright 2011 * Linaro * Linus Walleij - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA */ #include +#include +#include #include #include +#include +#include #include "integrator-sc.h" #include "pci_v3.h" @@ -283,17 +270,14 @@ struct pci_controller integrator_hose = { void pci_init_board(void) { - volatile int i, j; struct pci_controller *hose = &integrator_hose; u16 val; /* setting this register will take the V3 out of reset */ __raw_writel(SC_PCI_PCIEN, SC_PCI); - /* wait a few usecs to settle the device and the PCI bus */ - - for (i = 0; i < 100; i++) - j = i + 1; + /* Wait for 230 ms (from spec) before accessing any V3 registers */ + mdelay(230); /* Now write the Base I/O Address Word to PHYS_PCI_V3_BASE + 0x6E */ v3_writew(V3_LB_IO_BASE, (PHYS_PCI_V3_BASE >> 16));