summaryrefslogtreecommitdiffstats
path: root/board
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
parent5644369450635fa5c2967bee55b1ac41f6e988d0 (diff)
downloadblackbird-obmc-uboot-472d546054dadacca91530bad42ad06f6408124e.tar.gz
blackbird-obmc-uboot-472d546054dadacca91530bad42ad06f6408124e.zip
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')
-rw-r--r--board/Marvell/common/memory.c10
-rw-r--r--board/Marvell/db64360/mpsc.c2
-rw-r--r--board/Marvell/db64360/mv_eth.h7
-rw-r--r--board/Marvell/db64460/mpsc.c2
-rw-r--r--board/Marvell/db64460/mv_eth.h7
-rw-r--r--board/Marvell/include/core.h5
-rw-r--r--board/amcc/bamboo/bamboo.c22
-rw-r--r--board/amcc/bamboo/bamboo.h3
-rw-r--r--board/amcc/yucca/yucca.c3
-rw-r--r--board/bf533-ezkit/flash-defines.h2
-rw-r--r--board/bf533-ezkit/flash.c4
-rw-r--r--board/bf533-stamp/video.h3
-rw-r--r--board/esd/common/lcd.c10
-rw-r--r--board/esd/common/lcd.h5
-rw-r--r--board/esd/cpci750/mpsc.c2
-rw-r--r--board/esd/cpci750/mv_eth.h7
-rw-r--r--board/esd/dasa_sim/cmd_dasa_sim.c6
-rw-r--r--board/esd/pmc440/fpga.c16
-rw-r--r--board/evb64260/eth_addrtbl.c11
-rw-r--r--board/gen860t/fpga.c8
-rw-r--r--board/matrix_vision/mvblx/mvblx.c2
-rw-r--r--board/mousse/flash.c2
-rw-r--r--board/mpl/common/isa.c13
-rw-r--r--board/mpl/mip405/mip405.c5
-rw-r--r--board/mpl/pip405/pip405.c10
-rw-r--r--board/prodrive/p3mx/mpsc.c2
-rw-r--r--board/prodrive/p3mx/mv_eth.h7
-rw-r--r--board/sacsng/clkinit.c4
-rw-r--r--board/sacsng/clkinit.h5
-rw-r--r--board/spear/x600/fpga.c8
-rw-r--r--board/teejet/mt_ventoux/mt_ventoux.c4
31 files changed, 63 insertions, 134 deletions
diff --git a/board/Marvell/common/memory.c b/board/Marvell/common/memory.c
index 7fd6355236..1400604142 100644
--- a/board/Marvell/common/memory.c
+++ b/board/Marvell/common/memory.c
@@ -383,7 +383,7 @@ unsigned int memoryGetDeviceWidth (DEVICE device)
* OUTPUT:
* None.
* RETURN:
-* False for invalid size, true otherwise.
+* false for invalid size, true otherwise.
*
* CAUTION: PCI_functions must be implemented later To_do !!!!!!!!!!!!!!!!!
*
@@ -509,7 +509,7 @@ bool memoryMapBank (MEMORY_BANK bank, unsigned int bankBase,
* None.
*
* RETURN:
-* False for invalid size, true otherwise.
+* false for invalid size, true otherwise.
*
* CAUTION: PCI_functions must be implemented later To_do !!!!!!!!!!!!!!!!!
*
@@ -624,7 +624,7 @@ bool memoryMapDeviceSpace (DEVICE device, unsigned int deviceBase,
* None.
*
* RETURN:
-* False for invalid size, true otherwise.
+* false for invalid size, true otherwise.
*
*******************************************************************************/
bool memorySetPciWindow (PCI_MEM_WINDOW pciWindow, unsigned int pciWindowBase,
@@ -885,7 +885,7 @@ void gtMemorySetInternalSramBaseAddr (unsigned int sramBaseAddress)
* None.
*
* RETURN:
-* False for invalid size, true otherwise.
+* false for invalid size, true otherwise.
*
*******************************************************************************/
bool memorySetProtectRegion (MEMORY_PROTECT_WINDOW window,
@@ -1380,7 +1380,7 @@ void MemoryEnableWindow (MEMORY_WINDOW window)
* OUTPUT:
* None.
* RETURN:
-* True for a closed window, false otherwise .
+* true for a closed window, false otherwise .
*******************************************************************************/
MEMORY_WINDOW_STATUS MemoryGetMemWindowStatus (MEMORY_WINDOW window)
{
diff --git a/board/Marvell/db64360/mpsc.c b/board/Marvell/db64360/mpsc.c
index 7ad6ae8c0e..9227e5cb1f 100644
--- a/board/Marvell/db64360/mpsc.c
+++ b/board/Marvell/db64360/mpsc.c
@@ -966,7 +966,7 @@ static int galmpsc_set_snoop (int mpsc, int value)
* None.
*
* RETURN:
-* True for success, false otherwise.
+* true for success, false otherwise.
*
*******************************************************************************/
diff --git a/board/Marvell/db64360/mv_eth.h b/board/Marvell/db64360/mv_eth.h
index bd8e05dafd..d7de9d9796 100644
--- a/board/Marvell/db64360/mv_eth.h
+++ b/board/Marvell/db64360/mv_eth.h
@@ -46,13 +46,6 @@
**************************************************************************
**************************************************************************
*************************************************************************/
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */
#ifndef MAX_SKB_FRAGS
#define MAX_SKB_FRAGS 0
diff --git a/board/Marvell/db64460/mpsc.c b/board/Marvell/db64460/mpsc.c
index 303a63615f..45e13b8fe2 100644
--- a/board/Marvell/db64460/mpsc.c
+++ b/board/Marvell/db64460/mpsc.c
@@ -966,7 +966,7 @@ static int galmpsc_set_snoop (int mpsc, int value)
* None.
*
* RETURN:
-* True for success, false otherwise.
+* true for success, false otherwise.
*
*******************************************************************************/
diff --git a/board/Marvell/db64460/mv_eth.h b/board/Marvell/db64460/mv_eth.h
index af4e818fe8..1107e959ba 100644
--- a/board/Marvell/db64460/mv_eth.h
+++ b/board/Marvell/db64460/mv_eth.h
@@ -47,13 +47,6 @@
**************************************************************************
**************************************************************************
*************************************************************************/
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */
#ifndef MAX_SKB_FRAGS
#define MAX_SKB_FRAGS 0
diff --git a/board/Marvell/include/core.h b/board/Marvell/include/core.h
index c41343919e..3119d0a073 100644
--- a/board/Marvell/include/core.h
+++ b/board/Marvell/include/core.h
@@ -91,11 +91,6 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
#define _1G 0x40000000
#define _2G 0x80000000
-#ifndef BOOL_WAS_DEFINED
-#define BOOL_WAS_DEFINED
-typedef enum _bool{false,true} bool;
-#endif
-
/* Little to Big endian conversion macros */
#ifdef LE /* Little Endian */
diff --git a/board/amcc/bamboo/bamboo.c b/board/amcc/bamboo/bamboo.c
index 79788a80fc..6f5d0a60a3 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 f2b78a9453..6c49733639 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 1fab794bd3..f606d920b5 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)
{
/*----------------------------------------------------------------------------+
diff --git a/board/bf533-ezkit/flash-defines.h b/board/bf533-ezkit/flash-defines.h
index eb0af94797..f073c0c84b 100644
--- a/board/bf533-ezkit/flash-defines.h
+++ b/board/bf533-ezkit/flash-defines.h
@@ -32,8 +32,6 @@
#define V_ULONG(a) (*(volatile unsigned long *)( a ))
#define V_BYTE(a) (*(volatile unsigned char *)( a ))
-#define TRUE 0x1
-#define FALSE 0x0
#define BUFFER_SIZE 0x80000
#define NO_COMMAND 0
#define GET_CODES 1
diff --git a/board/bf533-ezkit/flash.c b/board/bf533-ezkit/flash.c
index ab808d86b0..e4fcd1e39d 100644
--- a/board/bf533-ezkit/flash.c
+++ b/board/bf533-ezkit/flash.c
@@ -309,7 +309,7 @@ int read_flash(long nOffset, int *pnValue)
nValue = *(volatile unsigned short *)addr;
SSYNC();
*pnValue = nValue;
- return TRUE;
+ return true;
}
int poll_toggle_bit(long lOffset)
@@ -398,7 +398,7 @@ int erase_block_flash(int nBlock, unsigned long address)
long ulSectorOff = 0x0;
if ((nBlock < 0) || (nBlock > AFP_NumSectors))
- return FALSE;
+ return false;
ulSectorOff = (address - CONFIG_SYS_FLASH_BASE);
diff --git a/board/bf533-stamp/video.h b/board/bf533-stamp/video.h
index 80837e2323..949c3d8f3f 100644
--- a/board/bf533-stamp/video.h
+++ b/board/bf533-stamp/video.h
@@ -9,9 +9,6 @@
#define YELLOW (0xD292D210) /* yellow pixel pattern */
#define WHITE (0xFE80FE80) /* white pixel pattern */
-#define true 1
-#define false 0
-
typedef struct {
unsigned int sav;
unsigned int eav;
diff --git a/board/esd/common/lcd.c b/board/esd/common/lcd.c
index 3dfbf3bc91..1a5f6565e5 100644
--- a/board/esd/common/lcd.c
+++ b/board/esd/common/lcd.c
@@ -260,7 +260,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
/*
* Big epson detected
*/
- reg_byte_swap = FALSE;
+ reg_byte_swap = false;
palette_index = 0x1e2;
palette_value = 0x1e4;
lcd_depth = 16;
@@ -269,7 +269,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
/*
* Big epson detected (with register swap bug)
*/
- reg_byte_swap = TRUE;
+ reg_byte_swap = true;
palette_index = 0x1e3;
palette_value = 0x1e5;
lcd_depth = 16;
@@ -278,7 +278,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
/*
* Small epson detected (704)
*/
- reg_byte_swap = FALSE;
+ reg_byte_swap = false;
palette_index = 0x15;
palette_value = 0x17;
lcd_depth = 8;
@@ -287,7 +287,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
/*
* Small epson detected (705)
*/
- reg_byte_swap = FALSE;
+ reg_byte_swap = false;
palette_index = 0x15;
palette_value = 0x17;
lcd_depth = 8;
@@ -300,7 +300,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,
/*
* S1D13505 detected
*/
- reg_byte_swap = TRUE;
+ reg_byte_swap = true;
palette_index = 0x25;
palette_value = 0x27;
lcd_depth = 16;
diff --git a/board/esd/common/lcd.h b/board/esd/common/lcd.h
index 01f6019bb2..5c48b5ad5a 100644
--- a/board/esd/common/lcd.h
+++ b/board/esd/common/lcd.h
@@ -35,11 +35,6 @@
#define LOAD_LONG(data) SWAP_LONG(data)
#define LOAD_SHORT(data) SWAP_SHORT(data)
-#ifndef FALSE
-#define FALSE 0
-#define TRUE (!FALSE)
-#endif
-
#define S1D_WRITE_PALETTE(p,i,r,g,b) \
{ \
out_8(&((uchar*)(p))[palette_index], (uchar)(i)); \
diff --git a/board/esd/cpci750/mpsc.c b/board/esd/cpci750/mpsc.c
index c89426d085..4adcec078a 100644
--- a/board/esd/cpci750/mpsc.c
+++ b/board/esd/cpci750/mpsc.c
@@ -967,7 +967,7 @@ static int galmpsc_set_snoop (int mpsc, int value)
* None.
*
* RETURN:
-* True for success, false otherwise.
+* true for success, false otherwise.
*
*******************************************************************************/
diff --git a/board/esd/cpci750/mv_eth.h b/board/esd/cpci750/mv_eth.h
index 3d0cb10dd5..94745bcf03 100644
--- a/board/esd/cpci750/mv_eth.h
+++ b/board/esd/cpci750/mv_eth.h
@@ -47,13 +47,6 @@
**************************************************************************
**************************************************************************
*************************************************************************/
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */
#ifndef MAX_SKB_FRAGS
#define MAX_SKB_FRAGS 0
diff --git a/board/esd/dasa_sim/cmd_dasa_sim.c b/board/esd/dasa_sim/cmd_dasa_sim.c
index 0014808762..ccea7152c2 100644
--- a/board/esd/dasa_sim/cmd_dasa_sim.c
+++ b/board/esd/dasa_sim/cmd_dasa_sim.c
@@ -30,10 +30,6 @@
#define OK 0
#define ERROR (-1)
-#define TRUE 1
-#define FALSE 0
-
-
extern u_long pci9054_iobase;
@@ -97,7 +93,7 @@ static int PciEepromWriteLongVPD (int offs, unsigned int value)
}
}
- return TRUE;
+ return true;
}
diff --git a/board/esd/pmc440/fpga.c b/board/esd/pmc440/fpga.c
index f92bbff291..d38cc96066 100644
--- a/board/esd/pmc440/fpga.c
+++ b/board/esd/pmc440/fpga.c
@@ -113,7 +113,7 @@ void fpga_serialslave_init(void)
{
debug("%s:%d: Initialize serial slave interface\n", __FUNCTION__,
__LINE__);
- fpga_pgm_fn(FALSE, FALSE, 0); /* make sure program pin is inactive */
+ fpga_pgm_fn(false, false, 0); /* make sure program pin is inactive */
}
@@ -188,7 +188,7 @@ int fpga_done_fn(int cookie)
int fpga_pre_config_fn(int cookie)
{
debug("%s:%d: FPGA pre-configuration\n", __FUNCTION__, __LINE__);
- fpga_reset(TRUE);
+ fpga_reset(true);
/* release init# */
out_be32((void*)GPIO0_OR, in_be32((void*)GPIO0_OR) | GPIO0_FPGA_FORCEINIT);
@@ -213,9 +213,9 @@ int fpga_post_config_fn(int cookie)
/* enable PLD0..7 pins */
out_be32((void*)GPIO1_OR, in_be32((void*)GPIO1_OR) & ~GPIO1_IOEN_N);
- fpga_reset(TRUE);
+ fpga_reset(true);
udelay (100);
- fpga_reset(FALSE);
+ fpga_reset(false);
udelay (100);
FPGA_OUT32(&fpga->status, (gd->board_type << STATUS_HWREV_SHIFT) & STATUS_HWREV_MASK);
@@ -296,7 +296,7 @@ void ngcc_fpga_serialslave_init(void)
__FUNCTION__, __LINE__);
/* make sure program pin is inactive */
- ngcc_fpga_pgm_fn (FALSE, FALSE, 0);
+ ngcc_fpga_pgm_fn(false, false, 0);
}
/*
@@ -382,10 +382,10 @@ int ngcc_fpga_pre_config_fn(int cookie)
pmc440_fpga_t *fpga = (pmc440_fpga_t *)FPGA_BA;
debug("%s:%d: FPGA pre-configuration\n", __FUNCTION__, __LINE__);
- ngcc_fpga_reset(TRUE);
+ ngcc_fpga_reset(true);
FPGA_CLRBITS(&fpga->ctrla, 0xfffffe00);
- ngcc_fpga_reset(TRUE);
+ ngcc_fpga_reset(true);
return 0;
}
@@ -401,7 +401,7 @@ int ngcc_fpga_post_config_fn(int cookie)
debug("%s:%d: NGCC FPGA post configuration\n", __FUNCTION__, __LINE__);
udelay (100);
- ngcc_fpga_reset(FALSE);
+ ngcc_fpga_reset(false);
FPGA_SETBITS(&fpga->ctrla, 0x29f8c000);
diff --git a/board/evb64260/eth_addrtbl.c b/board/evb64260/eth_addrtbl.c
index e8ef0e3e52..8c2c17f962 100644
--- a/board/evb64260/eth_addrtbl.c
+++ b/board/evb64260/eth_addrtbl.c
@@ -6,9 +6,6 @@
#include "eth.h"
#include "eth_addrtbl.h"
-#define TRUE 1
-#define FALSE 0
-
#define PRINTF printf
#ifdef CONFIG_GT_USE_MAC_HASH_TABLE
@@ -160,8 +157,8 @@ u32 hashTableFunction (u32 macH, u32 macL, u32 HashSize, u32 hash_mode)
* rd - the RD field in the address table.
* Outputs
* address table entry is added.
- * TRUE if success.
- * FALSE if table full
+ * true if success.
+ * false if table full
*/
int addAddressTableEntry (u32 port, u32 macH, u32 macL, u32 rd, u32 skip)
{
@@ -206,7 +203,7 @@ int addAddressTableEntry (u32 port, u32 macH, u32 macL, u32 rd, u32 skip)
if (i == HOP_NUMBER) {
PRINTF ("addGT64260addressTableEntry: table section is full\n");
- return (FALSE);
+ return false;
}
/*
@@ -215,7 +212,7 @@ int addAddressTableEntry (u32 port, u32 macH, u32 macL, u32 rd, u32 skip)
entry->hi = newHi;
entry->lo = newLo;
DCACHE_FLUSH_N_SYNC ((u32) entry, MAC_ENTRY_SIZE);
- return (TRUE);
+ return true;
}
#endif /* CONFIG_GT_USE_MAC_HASH_TABLE */
diff --git a/board/gen860t/fpga.c b/board/gen860t/fpga.c
index d42c500ca0..4c360096b1 100644
--- a/board/gen860t/fpga.c
+++ b/board/gen860t/fpga.c
@@ -182,7 +182,7 @@ void fpga_selectmap_init (void)
{
PRINTF ("%s:%d: Initialize SelectMap interface\n", __FUNCTION__,
__LINE__);
- fpga_pgm_fn (FALSE, FALSE, 0); /* make sure program pin is inactive */
+ fpga_pgm_fn(false, false, 0); /* make sure program pin is inactive */
}
@@ -314,7 +314,7 @@ int fpga_abort_fn (int cookie)
int fpga_pre_config_fn (int cookie)
{
PRINTF ("%s:%d: FPGA pre-configuration\n", __FUNCTION__, __LINE__);
- fpga_reset (TRUE);
+ fpga_reset(true);
return 0;
}
@@ -328,9 +328,9 @@ int fpga_post_config_fn (int cookie)
int rc;
PRINTF ("%s:%d: FPGA post configuration\n", __FUNCTION__, __LINE__);
- fpga_reset (TRUE);
+ fpga_reset(true);
udelay (1000);
- fpga_reset (FALSE);
+ fpga_reset(false);
udelay (1000);
/*
diff --git a/board/matrix_vision/mvblx/mvblx.c b/board/matrix_vision/mvblx/mvblx.c
index 49af384aaa..3ea15a1c04 100644
--- a/board/matrix_vision/mvblx/mvblx.c
+++ b/board/matrix_vision/mvblx/mvblx.c
@@ -162,7 +162,7 @@ int board_eth_init(bd_t *bis)
int overwrite_console(void)
{
- /* return TRUE if console should be overwritten */
+ /* return true if console should be overwritten */
return 0;
}
diff --git a/board/mousse/flash.c b/board/mousse/flash.c
index cc405356dc..5f60c8dfe3 100644
--- a/board/mousse/flash.c
+++ b/board/mousse/flash.c
@@ -450,7 +450,7 @@ STATUS flashWrite (flash_dev_t * dev, int pos, char *buf, int len)
}
/*
- * flashWritable returns TRUE if a range contains all F's.
+ * flashWritable returns true if a range contains all F's.
*/
STATUS flashWritable (flash_dev_t * dev, int pos, int len)
diff --git a/board/mpl/common/isa.c b/board/mpl/common/isa.c
index fc56153b87..66724edf57 100644
--- a/board/mpl/common/isa.c
+++ b/board/mpl/common/isa.c
@@ -41,13 +41,6 @@
#define PRINTF(fmt,args...)
#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#if defined(CONFIG_PIP405)
extern int drv_isa_kbd_init (void);
@@ -116,9 +109,9 @@ unsigned char open_cfg_super_IO(int address)
out8(CONFIG_SYS_ISA_IO_BASE_ADDRESS | address,0x55); /* open config */
out8(CONFIG_SYS_ISA_IO_BASE_ADDRESS | address,0x20); /* set address to DEV ID */
if(in8(CONFIG_SYS_ISA_IO_BASE_ADDRESS | address | 0x1)==0x40) /* ok Device ID is correct */
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
void close_cfg_super_IO(int address)
@@ -179,7 +172,7 @@ void isa_sio_loadtable(void)
void isa_sio_setup(void)
{
- if(open_cfg_super_IO(SIO_CFG_PORT)==TRUE)
+ if (open_cfg_super_IO(SIO_CFG_PORT) == true)
{
isa_sio_loadtable();
close_cfg_super_IO(0x3F0);
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index 56a84e9afa..89ea27600d 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -77,8 +77,6 @@ DECLARE_GLOBAL_DATA_PTR;
#undef SDRAM_DEBUG
#define ENABLE_ECC /* for ecc boards */
-#define FALSE 0
-#define TRUE 1
/* stdlib.h causes some compatibility problems; should fixe these! -- wd */
#ifndef __ldiv_t_defined
@@ -771,7 +769,8 @@ int last_stage_init (void)
int overwrite_console (void)
{
- return ((in8 (PLD_EXT_CONF_REG) & 0x1)==0); /* return TRUE if console should be overwritten */
+ /* return true if console should be overwritten */
+ return ((in8(PLD_EXT_CONF_REG) & 0x1) == 0);
}
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 75f57ad8ee..b203037cf9 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -36,9 +36,6 @@ DECLARE_GLOBAL_DATA_PTR;
#undef SDRAM_DEBUG
-#define FALSE 0
-#define TRUE 1
-
/* stdlib.h causes some compatibility problems; should fixe these! -- wd */
#ifndef __ldiv_t_defined
typedef struct {
@@ -700,7 +697,8 @@ int misc_init_r (void)
int overwrite_console (void)
{
- return (in8 (CONFIG_PORT_ADDR) & 0x1); /* return TRUE if console should be overwritten */
+ /* return true if console should be overwritten */
+ return in8(CONFIG_PORT_ADDR) & 0x1;
}
@@ -945,7 +943,7 @@ void print_pip405_info (void)
void user_led0 (unsigned char on)
{
- if (on == TRUE)
+ if (on == true)
out8 (PLD_LED_USER_REG, (in8 (PLD_LED_USER_REG) | 0x1));
else
out8 (PLD_LED_USER_REG, (in8 (PLD_LED_USER_REG) & 0xfe));
@@ -953,7 +951,7 @@ void user_led0 (unsigned char on)
void user_led1 (unsigned char on)
{
- if (on == TRUE)
+ if (on == true)
out8 (PLD_LED_USER_REG, (in8 (PLD_LED_USER_REG) | 0x2));
else
out8 (PLD_LED_USER_REG, (in8 (PLD_LED_USER_REG) & 0xfd));
diff --git a/board/prodrive/p3mx/mpsc.c b/board/prodrive/p3mx/mpsc.c
index cc05b45038..c6a3af5f3e 100644
--- a/board/prodrive/p3mx/mpsc.c
+++ b/board/prodrive/p3mx/mpsc.c
@@ -962,7 +962,7 @@ static int galmpsc_set_snoop (int mpsc, int value)
* None.
*
* RETURN:
-* True for success, false otherwise.
+* true for success, false otherwise.
*
*******************************************************************************/
diff --git a/board/prodrive/p3mx/mv_eth.h b/board/prodrive/p3mx/mv_eth.h
index 8cc00dc9c6..58a8cb9207 100644
--- a/board/prodrive/p3mx/mv_eth.h
+++ b/board/prodrive/p3mx/mv_eth.h
@@ -47,13 +47,6 @@
**************************************************************************
**************************************************************************
*************************************************************************/
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */
#ifndef MAX_SKB_FRAGS
#define MAX_SKB_FRAGS 0
diff --git a/board/sacsng/clkinit.c b/board/sacsng/clkinit.c
index 4a7f362c5e..3894a5c1aa 100644
--- a/board/sacsng/clkinit.c
+++ b/board/sacsng/clkinit.c
@@ -94,11 +94,11 @@ uint Daq_BRG_Get_Div16(uint brg)
if (*brg_ptr & CPM_BRG_DIV16) {
/* DIV16 active */
- return (TRUE);
+ return true;
}
else {
/* DIV16 inactive */
- return (FALSE);
+ return false;
}
}
diff --git a/board/sacsng/clkinit.h b/board/sacsng/clkinit.h
index 011638f2fa..68d69db36f 100644
--- a/board/sacsng/clkinit.h
+++ b/board/sacsng/clkinit.h
@@ -22,11 +22,6 @@
* MA 02111-1307 USA
*/
-#ifndef FALSE
-#define FALSE 0
-#define TRUE (!FALSE)
-#endif
-
#define SLRCLK_EN_MASK 0x00040000 /* PA13 - SLRCLK_EN* */
#define MIN_SAMPLE_RATE 4000 /* Minimum sample rate */
diff --git a/board/spear/x600/fpga.c b/board/spear/x600/fpga.c
index 85eb31be7b..74baa3fc40 100644
--- a/board/spear/x600/fpga.c
+++ b/board/spear/x600/fpga.c
@@ -113,7 +113,7 @@ static int fpga_done_fn(int cookie)
static int fpga_pre_config_fn(int cookie)
{
debug("%s:%d: FPGA pre-configuration\n", __func__, __LINE__);
- fpga_reset(TRUE);
+ fpga_reset(true);
return 0;
}
@@ -128,9 +128,9 @@ static int fpga_post_config_fn(int cookie)
debug("%s:%d: FPGA post configuration\n", __func__, __LINE__);
- fpga_reset(TRUE);
+ fpga_reset(true);
udelay(100);
- fpga_reset(FALSE);
+ fpga_reset(false);
udelay(100);
return rc;
@@ -200,7 +200,7 @@ static Xilinx_desc fpga[CONFIG_FPGA_COUNT] = {
static void fpga_serialslave_init(void)
{
debug("%s:%d: Initialize serial slave interface\n", __func__, __LINE__);
- fpga_pgm_fn(FALSE, FALSE, 0); /* make sure program pin is inactive */
+ fpga_pgm_fn(false, false, 0); /* make sure program pin is inactive */
}
static int expi_setup(int freq)
diff --git a/board/teejet/mt_ventoux/mt_ventoux.c b/board/teejet/mt_ventoux/mt_ventoux.c
index d57678668b..8347cf9ce9 100644
--- a/board/teejet/mt_ventoux/mt_ventoux.c
+++ b/board/teejet/mt_ventoux/mt_ventoux.c
@@ -179,9 +179,9 @@ int fpga_post_config_fn(int cookie)
{
debug("%s:%d: FPGA post-configuration\n", __func__, __LINE__);
- fpga_reset(TRUE);
+ fpga_reset(true);
udelay(100);
- fpga_reset(FALSE);
+ fpga_reset(false);
return 0;
}
OpenPOWER on IntegriCloud