summaryrefslogtreecommitdiff
path: root/board/amcc
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2013-04-01 11:29:11 -0700
committerTom Rini <trini@ti.com>2013-04-01 16:33:52 -0400
commit472d546054dadacca91530bad42ad06f6408124e (patch)
tree3acfccea2d15c21f12651a852d31452d33ea98e0 /board/amcc
parent5644369450635fa5c2967bee55b1ac41f6e988d0 (diff)
downloadu-boot-imx-472d546054dadacca91530bad42ad06f6408124e.zip
u-boot-imx-472d546054dadacca91530bad42ad06f6408124e.tar.gz
u-boot-imx-472d546054dadacca91530bad42ad06f6408124e.tar.bz2
Consolidate bool type
'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board/amcc')
-rw-r--r--board/amcc/bamboo/bamboo.c22
-rw-r--r--board/amcc/bamboo/bamboo.h3
-rw-r--r--board/amcc/yucca/yucca.c3
3 files changed, 11 insertions, 17 deletions
diff --git a/board/amcc/bamboo/bamboo.c b/board/amcc/bamboo/bamboo.c
index 79788a8..6f5d0a6 100644
--- a/board/amcc/bamboo/bamboo.c
+++ b/board/amcc/bamboo/bamboo.c
@@ -477,16 +477,16 @@ int is_powerpc440ep_pass1(void)
pvr = get_pvr();
if (pvr == PVR_POWERPC_440EP_PASS1)
- return TRUE;
+ return true;
else if (pvr == PVR_POWERPC_440EP_PASS2)
- return FALSE;
+ return false;
else {
printf("brdutil error 3\n");
for (;;)
;
}
- return(FALSE);
+ return false;
}
/*----------------------------------------------------------------------------+
@@ -495,9 +495,9 @@ int is_powerpc440ep_pass1(void)
int is_nand_selected(void)
{
#ifdef CONFIG_BAMBOO_NAND
- return TRUE;
+ return true;
#else
- return FALSE;
+ return false;
#endif
}
@@ -507,7 +507,7 @@ int is_nand_selected(void)
unsigned char config_on_ebc_cs4_is_small_flash(void)
{
/* Not implemented yet => returns constant value */
- return TRUE;
+ return true;
}
/*----------------------------------------------------------------------------+
@@ -561,7 +561,7 @@ void ext_bus_cntlr_init(void)
/*-------------------------------------------------------------------------+
| PPC440EP Pass1
+-------------------------------------------------------------------------*/
- if (is_powerpc440ep_pass1() == TRUE) {
+ if (is_powerpc440ep_pass1() == true) {
switch(bootstrap_settings) {
case SDR0_PSTRP0_BOOTSTRAP_SETTINGS0:
/* Default Strap Settings 0 : CPU 400 - PLB 133 - Boot EBC 8 bit 33MHz */
@@ -738,7 +738,7 @@ void ext_bus_cntlr_init(void)
/*------------------------------------------------------------------------- */
ebc0_cs0_bnap_value = EBC0_BNAP_SMALL_FLASH;
ebc0_cs0_bncr_value = EBC0_BNCR_SMALL_FLASH_CS0;
- if ((is_nand_selected()) == TRUE) {
+ if ((is_nand_selected()) == true) {
/* NAND Flash */
ebc0_cs1_bnap_value = EBC0_BNAP_NAND_FLASH;
ebc0_cs1_bncr_value = EBC0_BNCR_NAND_FLASH_CS1;
@@ -765,7 +765,7 @@ void ext_bus_cntlr_init(void)
/*------------------------------------------------------------------------- */
ebc0_cs0_bnap_value = EBC0_BNAP_LARGE_FLASH_OR_SRAM;
ebc0_cs0_bncr_value = EBC0_BNCR_LARGE_FLASH_OR_SRAM_CS0;
- if ((is_nand_selected()) == TRUE) {
+ if ((is_nand_selected()) == true) {
/* NAND Flash */
ebc0_cs1_bnap_value = EBC0_BNAP_NAND_FLASH;
ebc0_cs1_bncr_value = EBC0_BNCR_NAND_FLASH_CS1;
@@ -812,7 +812,7 @@ void ext_bus_cntlr_init(void)
ebc0_cs0_bnap_value = 0;
ebc0_cs0_bncr_value = 0;
- if ((is_nand_selected()) == TRUE) {
+ if ((is_nand_selected()) == true) {
/* NAND Flash */
ebc0_cs1_bnap_value = EBC0_BNAP_NAND_FLASH;
ebc0_cs1_bncr_value = EBC0_BNCR_NAND_FLASH_CS1;
@@ -830,7 +830,7 @@ void ext_bus_cntlr_init(void)
ebc0_cs3_bncr_value = 0;
}
- if ((config_on_ebc_cs4_is_small_flash()) == TRUE) {
+ if ((config_on_ebc_cs4_is_small_flash()) == true) {
/* Small Flash */
ebc0_cs4_bnap_value = EBC0_BNAP_SMALL_FLASH;
ebc0_cs4_bncr_value = EBC0_BNCR_SMALL_FLASH_CS4;
diff --git a/board/amcc/bamboo/bamboo.h b/board/amcc/bamboo/bamboo.h
index f2b78a9..6c49733 100644
--- a/board/amcc/bamboo/bamboo.h
+++ b/board/amcc/bamboo/bamboo.h
@@ -250,9 +250,6 @@
#define PVR_POWERPC_440EP_PASS1 0x42221850
#define PVR_POWERPC_440EP_PASS2 0x422218D3
-#define TRUE 1
-#define FALSE 0
-
#define GPIO0 0
#define GPIO1 1
diff --git a/board/amcc/yucca/yucca.c b/board/amcc/yucca/yucca.c
index 1fab794..f606d92 100644
--- a/board/amcc/yucca/yucca.c
+++ b/board/amcc/yucca/yucca.c
@@ -47,9 +47,6 @@ void fpga_init (void);
#define DEBUGF(fmt,args...)
#endif
-#define FALSE 0
-#define TRUE 1
-
int board_early_init_f (void)
{
/*----------------------------------------------------------------------------+