From: Steve Sakoman Date: Fri, 15 Aug 2008 04:21:03 +0000 (-0700) Subject: Fix build breakage when CONFIG_MMC is disabled X-Git-Tag: Release-2010-05/1~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00e274e85653f313d7b7b87951f329e124f7d662;p=pandora-x-loader.git Fix build breakage when CONFIG_MMC is disabled --- 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