diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-07-25 17:57:46 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-07-25 17:57:46 +0200 |
commit | 8b485ba12b0defa0c4ed3559789250238f8331a8 (patch) | |
tree | a1174810bef0d504370272918dca8d485ae2ae3b /arch/powerpc/lib/board.c | |
parent | 12607adcd5181a8f6eab885a5fe4ba2fa12ef92a (diff) | |
parent | aaf5e825606a70ddc8fca8e366d8c16a6fd3cc7c (diff) | |
download | u-boot-imx-8b485ba12b0defa0c4ed3559789250238f8331a8.zip u-boot-imx-8b485ba12b0defa0c4ed3559789250238f8331a8.tar.gz u-boot-imx-8b485ba12b0defa0c4ed3559789250238f8331a8.tar.bz2 |
Merge branch 'u-boot/master' into u-boot-arm/master
Diffstat (limited to 'arch/powerpc/lib/board.c')
-rw-r--r-- | arch/powerpc/lib/board.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index fc4c1d5..a101e03 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -2,23 +2,7 @@ * (C) Copyright 2000-2011 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * 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 <common.h> @@ -98,8 +82,7 @@ extern void sc3_read_eeprom(void); #if defined(CONFIG_CMD_DOC) void doc_init(void); #endif -#if defined(CONFIG_HARD_I2C) || \ - defined(CONFIG_SOFT_I2C) +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C) #include <i2c.h> #endif #include <spi.h> @@ -214,11 +197,15 @@ static int init_func_ram(void) /***********************************************************************/ -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C) static int init_func_i2c(void) { puts("I2C: "); +#ifdef CONFIG_SYS_I2C + i2c_init_all(); +#else i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#endif puts("ready\n"); return 0; } @@ -307,7 +294,7 @@ static init_fnc_t *init_sequence[] = { misc_init_f, #endif INIT_FUNC_WATCHDOG_RESET -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C) init_func_i2c, #endif #if defined(CONFIG_HARD_SPI) |