X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Ffreescale%2Fmpc8568mds%2Fmpc8568mds.c;h=a5c5d9dd1acae394921b1fe9fedd455fc5fd5385;hb=e6ac28b60be2d670948332197862e314b7977177;hp=5cda81c318e00a82a2beb2c91c53bbbe5ee80399;hpb=3f6f9d76415072571029b646a6aefc067a635bde;p=u-boot diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c index 5cda81c318..a5c5d9dd1a 100644 --- a/board/freescale/mpc8568mds/mpc8568mds.c +++ b/board/freescale/mpc8568mds/mpc8568mds.c @@ -1,25 +1,9 @@ /* - * Copyright 2007,2009-2010 Freescale Semiconductor, Inc. + * Copyright 2007,2009-2011 Freescale Semiconductor, Inc. * * (C) Copyright 2002 Scott McNutt * - * 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 + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -28,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -147,12 +131,10 @@ local_bus_init(void) volatile fsl_lbc_t *lbc = LBC_BASE_ADDR; uint clkdiv; - uint lbc_hz; sys_info_t sysinfo; get_sys_info(&sysinfo); clkdiv = (lbc->lcrr & LCRR_CLKDIV) * 2; - lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv; gur->lbiuiplldcr1 = 0x00078080; if (clkdiv == 16) { @@ -259,11 +241,7 @@ static struct pci_config_table pci_mpc8568mds_config_table[] = { }; #endif -static struct pci_controller pci1_hose = { -#ifndef CONFIG_PCI_PNP - config_table: pci_mpc8568mds_config_table, -#endif -}; +static struct pci_controller pci1_hose; #endif /* CONFIG_PCI */ /* @@ -306,6 +284,7 @@ pib_init(void) i2c_write(0x27, 0x3, 1, &val8, 1); asm("eieio"); + i2c_set_bus_num(orig_i2c_bus); } #ifdef CONFIG_PCI @@ -347,6 +326,9 @@ void pci_init_board(void) pci_arb ? "arbiter" : "external-arbiter", pci_info.regs); +#ifndef CONFIG_PCI_PNP + pci1_hose.config_table = pci_mpc8568mds_config_table; +#endif first_free_busno = fsl_pci_init_port(&pci_info, &pci1_hose, first_free_busno); } else { @@ -363,10 +345,12 @@ void pci_init_board(void) #endif /* CONFIG_PCI */ #if defined(CONFIG_OF_BOARD_SETUP) -void ft_board_setup(void *blob, bd_t *bd) +int ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup(blob, bd); FT_FSL_PCI_SETUP; + + return 0; } #endif