diff options
author | Heiko Schocher <hs@denx.de> | 2011-03-15 16:52:29 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-04-30 00:44:22 +0200 |
commit | b11f53f31b97536c74d75e7678ad7a363a9537da (patch) | |
tree | 48fd9244ad791ab6fe0365ddf186d634719a730d /board/keymile/km_arm/km_arm.c | |
parent | 802d996324777173f123116c00a6c654f4a4177a (diff) | |
download | u-boot-imx-b11f53f31b97536c74d75e7678ad7a363a9537da.zip u-boot-imx-b11f53f31b97536c74d75e7678ad7a363a9537da.tar.gz u-boot-imx-b11f53f31b97536c74d75e7678ad7a363a9537da.tar.bz2 |
keymile: Fix Coding style issues for keymile boards.
- use I/O accessors
-> For accessing the FPGA therefore a struct km_bec_fpga
is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a
numeric value
- Codingstyle changes to prevent checkpatch errors/warnings
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Diffstat (limited to 'board/keymile/km_arm/km_arm.c')
-rw-r--r-- | board/keymile/km_arm/km_arm.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index bf03f0c..7c43475 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -108,12 +108,12 @@ int ethernet_present(void) int ret = 0; if (i2c_read(0x10, 2, 1, &buf, 1) != 0) { - printf ("%s: Error reading Boco\n", __FUNCTION__); + printf("%s: Error reading Boco\n", __func__); return -1; } - if ((buf & 0x40) == 0x40) { + if ((buf & 0x40) == 0x40) ret = 1; - } + return ret; } @@ -258,15 +258,15 @@ void reset_phy(void) } #if defined(CONFIG_HUSH_INIT_VAR) -int hush_init_var (void) +int hush_init_var(void) { - ivm_read_eeprom (); + ivm_read_eeprom(); return 0; } #endif #if defined(CONFIG_BOOTCOUNT_LIMIT) -void bootcount_store (ulong a) +void bootcount_store(ulong a) { volatile ulong *save_addr; volatile ulong size = 0; @@ -279,7 +279,7 @@ void bootcount_store (ulong a) writel(BOOTCOUNT_MAGIC, &save_addr[1]); } -ulong bootcount_load (void) +ulong bootcount_load(void) { volatile ulong *save_addr; volatile ulong size = 0; @@ -296,31 +296,31 @@ ulong bootcount_load (void) #endif #if defined(CONFIG_SOFT_I2C) -void set_sda (int state) +void set_sda(int state) { I2C_ACTIVE; I2C_SDA(state); } -void set_scl (int state) +void set_scl(int state) { I2C_SCL(state); } -int get_sda (void) +int get_sda(void) { I2C_TRISTATE; return I2C_READ; } -int get_scl (void) +int get_scl(void) { return (kw_gpio_get_value(SUEN3_SCL_PIN) ? 1 : 0); } #endif #if defined(CONFIG_SYS_EEPROM_WREN) -int eeprom_write_enable (unsigned dev_addr, int state) +int eeprom_write_enable(unsigned dev_addr, int state) { kw_gpio_set_value(SUEN3_ENV_WP, !state); |