imx: fix coding style

Fix checkpatch warning and errors in several i.MX related files.

While at it also address a checkpatch warning at arch/arm/cpu/armv7/mx5/soc.c
regarding the usage of extern in a C file.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
This commit is contained in:
Fabio Estevam 2011-10-13 05:34:59 +00:00 committed by Albert ARIBAUD
parent f8f96129bf
commit 77f11a99e1
14 changed files with 108 additions and 101 deletions

View file

@ -43,7 +43,11 @@
DECLARE_GLOBAL_DATA_PTR;
/* "time" is measured in 1 / CONFIG_SYS_HZ seconds, "tick" is internal timer period */
/*
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
* "tick" is internal timer period
*/
#ifdef CONFIG_MX31_TIMER_HIGH_PRECISION
/* ~0.4% error - measured with stop-watch on 100s boot-delay */
static inline unsigned long long tick_to_time(unsigned long long tick)
@ -68,7 +72,8 @@ static inline unsigned long long us_to_tick(unsigned long long us)
}
#else
/* ~2% error */
#define TICK_PER_TIME ((CONFIG_MX31_CLK32 + CONFIG_SYS_HZ / 2) / CONFIG_SYS_HZ)
#define TICK_PER_TIME ((CONFIG_MX31_CLK32 + CONFIG_SYS_HZ / 2) \
/ CONFIG_SYS_HZ)
#define US_PER_TICK (1000000 / CONFIG_MX31_CLK32)
static inline unsigned long long tick_to_time(unsigned long long tick)

View file

@ -240,7 +240,7 @@ unsigned int mxc_get_main_clock(enum mxc_main_clocks clk)
}
break;
case IPG_CLK:
ret_val = get_ipg_clk();;
ret_val = get_ipg_clk();
break;
case IPG_PER_CLK:
ret_val = get_ipg_per_clk();

View file

@ -43,8 +43,8 @@
DECLARE_GLOBAL_DATA_PTR;
#define timestamp gd->tbl
#define lastinc gd->lastinc
#define timestamp (gd->tbl)
#define lastinc (gd->lastinc)
/*
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,

View file

@ -45,8 +45,8 @@
DECLARE_GLOBAL_DATA_PTR;
#define timestamp gd->tbl
#define lastinc gd->lastinc
#define timestamp (gd->tbl)
#define lastinc (gd->lastinc)
/*
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,

View file

@ -26,6 +26,8 @@
#include <common.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
#include <asm/errno.h>
#include <asm/io.h>
@ -117,14 +119,6 @@ int print_cpuinfo(void)
}
#endif
/*
* Initializes on-chip ethernet controllers.
* to override, implement board_eth_init()
*/
#if defined(CONFIG_FEC_MXC)
extern int fecmxc_initialize(bd_t *bis);
#endif
int cpu_eth_init(bd_t *bis)
{
int rc = -ENODEV;

View file

@ -28,4 +28,12 @@ u32 get_cpu_rev(void);
#define is_soc_rev(rev) ((get_cpu_rev() & 0xFF) - rev)
void sdelay(unsigned long);
void set_chipselect_size(int const);
/*
* Initializes on-chip ethernet controllers.
* to override, implement board_eth_init()
*/
int fecmxc_initialize(bd_t *bis);
#endif