mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
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:
parent
f8f96129bf
commit
77f11a99e1
14 changed files with 108 additions and 101 deletions
|
@ -43,7 +43,11 @@
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
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
|
#ifdef CONFIG_MX31_TIMER_HIGH_PRECISION
|
||||||
/* ~0.4% error - measured with stop-watch on 100s boot-delay */
|
/* ~0.4% error - measured with stop-watch on 100s boot-delay */
|
||||||
static inline unsigned long long tick_to_time(unsigned long long tick)
|
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
|
#else
|
||||||
/* ~2% error */
|
/* ~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)
|
#define US_PER_TICK (1000000 / CONFIG_MX31_CLK32)
|
||||||
|
|
||||||
static inline unsigned long long tick_to_time(unsigned long long tick)
|
static inline unsigned long long tick_to_time(unsigned long long tick)
|
||||||
|
|
|
@ -240,7 +240,7 @@ unsigned int mxc_get_main_clock(enum mxc_main_clocks clk)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IPG_CLK:
|
case IPG_CLK:
|
||||||
ret_val = get_ipg_clk();;
|
ret_val = get_ipg_clk();
|
||||||
break;
|
break;
|
||||||
case IPG_PER_CLK:
|
case IPG_PER_CLK:
|
||||||
ret_val = get_ipg_per_clk();
|
ret_val = get_ipg_per_clk();
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
#define timestamp gd->tbl
|
#define timestamp (gd->tbl)
|
||||||
#define lastinc gd->lastinc
|
#define lastinc (gd->lastinc)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
|
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
#define timestamp gd->tbl
|
#define timestamp (gd->tbl)
|
||||||
#define lastinc gd->lastinc
|
#define lastinc (gd->lastinc)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
|
* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/arch/imx-regs.h>
|
#include <asm/arch/imx-regs.h>
|
||||||
#include <asm/arch/clock.h>
|
#include <asm/arch/clock.h>
|
||||||
|
#include <asm/arch/sys_proto.h>
|
||||||
|
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
@ -117,14 +119,6 @@ int print_cpuinfo(void)
|
||||||
}
|
}
|
||||||
#endif
|
#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 cpu_eth_init(bd_t *bis)
|
||||||
{
|
{
|
||||||
int rc = -ENODEV;
|
int rc = -ENODEV;
|
||||||
|
|
|
@ -28,4 +28,12 @@ u32 get_cpu_rev(void);
|
||||||
#define is_soc_rev(rev) ((get_cpu_rev() & 0xFF) - rev)
|
#define is_soc_rev(rev) ((get_cpu_rev() & 0xFF) - rev)
|
||||||
void sdelay(unsigned long);
|
void sdelay(unsigned long);
|
||||||
void set_chipselect_size(int const);
|
void set_chipselect_size(int const);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initializes on-chip ethernet controllers.
|
||||||
|
* to override, implement board_eth_init()
|
||||||
|
*/
|
||||||
|
|
||||||
|
int fecmxc_initialize(bd_t *bis);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue