From 00e274e85653f313d7b7b87951f329e124f7d662 Mon Sep 17 00:00:00 2001 From: Steve Sakoman Date: Thu, 14 Aug 2008 21:21:03 -0700 Subject: [PATCH] Fix build breakage when CONFIG_MMC is disabled --- board/overo/overo.c | 3 ++- lib/board.c | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/board/overo/overo.c b/board/overo/overo.c index f1fca25..2f29f82 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -529,6 +529,7 @@ void s_init(void) ********************************************************/ int misc_init_r(void) { +#ifdef CONFIG_MMC /* REMOVE!! for proto boards only */ /* set vaux2 to 2.8V */ unsigned char byte = 0x20; @@ -537,7 +538,7 @@ int misc_init_r(void) i2c_write(0x4B, 0x79, 1, &byte, 1); udelay(5000); - +#endif return 0; } diff --git a/lib/board.c b/lib/board.c index dec550d..ef00bff 100644 --- a/lib/board.c +++ b/lib/board.c @@ -48,7 +48,9 @@ int print_info(void) static int init_func_i2c (void) { +#ifdef CONFIG_MMC i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE); +#endif return 0; } @@ -62,7 +64,9 @@ init_fnc_t *init_sequence[] = { print_info, #endif nand_init, /* board specific nand init */ +#ifdef CONFIG_MMC init_func_i2c, +#endif NULL, }; @@ -93,8 +97,8 @@ void start_armboot (void) #endif buf += size; } -#endif } +#endif if (buf == (uchar *)CFG_LOADADDR) { /* if no u-boot on mmc, try onenand or nand, depending upon sysboot */ @@ -106,9 +110,7 @@ void start_armboot (void) if (!onenand_read_block(buf, i)) buf += ONENAND_BLOCK_SIZE; } - } - - if (get_mem_type() == GPMC_NAND){ + } else if (get_mem_type() == GPMC_NAND){ #ifdef CFG_PRINTF printf("Booting from nand\n"); #endif -- 2.39.2