summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-06-06 13:00:19 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2016-06-22 14:36:40 +0200
commitd06ef9ba19335001a31d35570b85fd74591c7bd5 (patch)
treeb684d0409230c35773ffba685284518e1fb5f96a /board
parent44aa0139363837ecd9ce066eddf8a0ca373ed349 (diff)
apalis/colibri_imx6/imx7/vf: white space fixes
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'board')
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c6
-rw-r--r--board/toradex/apalis_imx6/do_fuse.c2
-rw-r--r--board/toradex/apalis_imx6/pf0100.c50
-rw-r--r--board/toradex/colibri_imx6/colibri_imx6.c8
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c9
-rw-r--r--board/toradex/colibri_imx7/imximage.cfg2
-rw-r--r--board/toradex/colibri_vf/colibri_vf.c6
-rw-r--r--board/toradex/common/Kconfig2
-rw-r--r--board/toradex/common/configblock.c4
9 files changed, 44 insertions, 45 deletions
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 8519e4e6f95..0d979cd6fc0 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -276,7 +276,7 @@ static void setup_iomux_gpio(void)
iomux_v3_cfg_t const usb_pads[] = {
/* TODO This pin has a dedicated USB power functionality, can we use it? */
/* USBH_EN */
- MX6_PAD_GPIO_0__GPIO1_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL),
+ MX6_PAD_GPIO_0__GPIO1_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL),
# define GPIO_USBH_EN IMX_GPIO_NR(1, 0)
/* USB_VBUS_DET */
MX6_PAD_EIM_D28__GPIO3_IO28 | MUX_PAD_CTRL(NO_PAD_CTRL),
@@ -451,7 +451,7 @@ int board_eth_init(bd_t *bis)
return 0;
}
printf("using PHY at %d\n", phydev->addr);
- ret = fec_probe(bis, -1, base, bus, phydev);
+ ret = fec_probe(bis, -1, base, bus, phydev);
if (ret) {
printf("FEC MXC: %s:failed\n", __func__);
free(phydev);
@@ -731,7 +731,7 @@ static void setup_display(void)
imx_setup_hdmi();
/* Turn on LDB0,IPU,IPU DI0 clocks */
reg = __raw_readl(&mxc_ccm->CCGR3);
- reg |= MXC_CCM_CCGR3_LDB_DI0_MASK;
+ reg |= MXC_CCM_CCGR3_LDB_DI0_MASK;
writel(reg, &mxc_ccm->CCGR3);
/* set LDB0, LDB1 clk select to 011/011 */
diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c
index 6447e3133f4..c3e39839f3e 100644
--- a/board/toradex/apalis_imx6/do_fuse.c
+++ b/board/toradex/apalis_imx6/do_fuse.c
@@ -72,7 +72,7 @@ int do_updt_fuse(cmd_tbl_t *cmdtp, int flag, int argc,
" Updating to fast boot mode prevents easy\n"
" downgrading to previous BSP versions.\n"
"\nReally perform this fuse programming? <y/N>\n");
- if (!confirm_yesno())
+ if (!confirm_yesno())
return CMD_RET_FAILURE;
}
puts("Fusing fast boot mode...\n");
diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c
index e289e10a61d..e066b986fd0 100644
--- a/board/toradex/apalis_imx6/pf0100.c
+++ b/board/toradex/apalis_imx6/pf0100.c
@@ -38,17 +38,17 @@ unsigned pmic_init(void)
uchar devid, revid, val;
puts("PMIC: ");
- if(!(0 == i2c_set_bus_num(bus) && (0 == i2c_probe(PFUZE100_I2C_ADDR))))
+ if (!(0 == i2c_set_bus_num(bus) && (0 == i2c_probe(PFUZE100_I2C_ADDR))))
{
puts("i2c bus failed\n");
return 0;
}
/* get device ident */
- if( i2c_read(PFUZE100_I2C_ADDR, PFUZE100_DEVICEID, 1, &devid, 1) < 0) {
+ if (i2c_read(PFUZE100_I2C_ADDR, PFUZE100_DEVICEID, 1, &devid, 1) < 0) {
puts("i2c pmic devid read failed\n");
return 0;
}
- if( i2c_read(PFUZE100_I2C_ADDR, PFUZE100_REVID, 1, &revid, 1) < 0) {
+ if (i2c_read(PFUZE100_I2C_ADDR, PFUZE100_REVID, 1, &revid, 1) < 0) {
puts("i2c pmic revid read failed\n");
return 0;
}
@@ -58,11 +58,11 @@ unsigned pmic_init(void)
{
unsigned i,j;
- for(i=0; i<16; i++)
+ for (i=0; i<16; i++)
printf("\t%x",i);
- for(j=0; j<0x80; ) {
+ for (j=0; j<0x80;) {
printf("\n%2x",j);
- for(i=0; i<16; i++) {
+ for (i=0; i<16; i++) {
i2c_read(PFUZE100_I2C_ADDR, j+i, 1, &val, 1);
printf("\t%2x", val);
}
@@ -71,15 +71,15 @@ unsigned pmic_init(void)
printf("\nEXT Page 1");
val = PFUZE100_PAGE_REGISTER_PAGE1;
- if( i2c_write(PFUZE100_I2C_ADDR, PFUZE100_PAGE_REGISTER, 1,
+ if (i2c_write(PFUZE100_I2C_ADDR, PFUZE100_PAGE_REGISTER, 1,
&val, 1)) {
puts("i2c write failed\n");
return 0;
}
- for(j=0x80; j<0x100; ) {
+ for (j=0x80; j<0x100;) {
printf("\n%2x",j);
- for(i=0; i<16; i++) {
+ for (i=0; i<16; i++) {
i2c_read(PFUZE100_I2C_ADDR, j+i, 1, &val, 1);
printf("\t%2x", val);
}
@@ -88,15 +88,15 @@ unsigned pmic_init(void)
printf("\nEXT Page 2");
val = PFUZE100_PAGE_REGISTER_PAGE2;
- if( i2c_write(PFUZE100_I2C_ADDR, PFUZE100_PAGE_REGISTER, 1,
+ if (i2c_write(PFUZE100_I2C_ADDR, PFUZE100_PAGE_REGISTER, 1,
&val, 1)) {
puts("i2c write failed\n");
return 0;
}
- for(j=0x80; j<0x100; ) {
+ for (j=0x80; j<0x100;) {
printf("\n%2x",j);
- for(i=0; i<16; i++) {
+ for (i=0; i<16; i++) {
i2c_read(PFUZE100_I2C_ADDR, j+i, 1, &val, 1);
printf("\t%2x", val);
}
@@ -107,30 +107,30 @@ unsigned pmic_init(void)
#endif
/* get device programmed state */
val = PFUZE100_PAGE_REGISTER_PAGE1;
- if( i2c_write(PFUZE100_I2C_ADDR, PFUZE100_PAGE_REGISTER, 1, &val, 1))
+ if (i2c_write(PFUZE100_I2C_ADDR, PFUZE100_PAGE_REGISTER, 1, &val, 1))
{
puts("i2c write failed\n");
return 0;
}
- if( i2c_read(PFUZE100_I2C_ADDR, PFUZE100_FUSE_POR1, 1, &val, 1) < 0) {
+ if (i2c_read(PFUZE100_I2C_ADDR, PFUZE100_FUSE_POR1, 1, &val, 1) < 0) {
puts("i2c fuse_por read failed\n");
return 0;
}
- if(val & PFUZE100_FUSE_POR_M)
+ if (val & PFUZE100_FUSE_POR_M)
programmed++;
- if( i2c_read(PFUZE100_I2C_ADDR, PFUZE100_FUSE_POR2, 1, &val, 1) < 0) {
+ if (i2c_read(PFUZE100_I2C_ADDR, PFUZE100_FUSE_POR2, 1, &val, 1) < 0) {
puts("i2c fuse_por read failed\n");
return programmed;
}
- if(val & PFUZE100_FUSE_POR_M)
+ if (val & PFUZE100_FUSE_POR_M)
programmed++;
- if( i2c_read(PFUZE100_I2C_ADDR, PFUZE100_FUSE_POR3, 1, &val, 1) < 0) {
+ if (i2c_read(PFUZE100_I2C_ADDR, PFUZE100_FUSE_POR3, 1, &val, 1) < 0) {
puts("i2c fuse_por read failed\n");
return programmed;
}
- if(val & PFUZE100_FUSE_POR_M)
+ if (val & PFUZE100_FUSE_POR_M)
programmed++;
switch (programmed) {
@@ -149,7 +149,7 @@ unsigned pmic_init(void)
if (programmed != 3) {
/* set VGEN1 to 1.2V */
val = PFUZE100_VGEN1_VAL;
- if( i2c_write(PFUZE100_I2C_ADDR, PFUZE100_VGEN1CTL, 1,
+ if (i2c_write(PFUZE100_I2C_ADDR, PFUZE100_VGEN1CTL, 1,
&val, 1)) {
puts("i2c write failed\n");
return programmed;
@@ -157,7 +157,7 @@ unsigned pmic_init(void)
/* set SWBST to 5.0V */
val = PFUZE100_SWBST_VAL;
- if( i2c_write(PFUZE100_I2C_ADDR, PFUZE100_SWBSTCTL, 1,
+ if (i2c_write(PFUZE100_I2C_ADDR, PFUZE100_SWBSTCTL, 1,
&val, 1)) {
puts("i2c write failed\n");
}
@@ -171,7 +171,7 @@ int pf0100_prog(void)
unsigned char val;
unsigned char bus = 1;
- if(pmic_init() == 3) {
+ if (pmic_init() == 3) {
puts("PMIC already programmed, exiting\n");
return CMD_RET_FAILURE;
}
@@ -180,17 +180,17 @@ int pf0100_prog(void)
ARRAY_SIZE(pmic_prog_pads));
gpio_direction_output(PMIC_PROG_VOLTAGE, 0);
- if(!(0 == i2c_set_bus_num(bus) && (0 == i2c_probe(PFUZE100_I2C_ADDR))))
+ if (!(0 == i2c_set_bus_num(bus) && (0 == i2c_probe(PFUZE100_I2C_ADDR))))
{
puts("i2c bus failed\n");
return CMD_RET_FAILURE;
}
for (i=0; i<ARRAY_SIZE(pmic_otp_prog); i++) {
- switch(pmic_otp_prog[i].cmd) {
+ switch (pmic_otp_prog[i].cmd) {
case pmic_i2c:
val = (unsigned char) (pmic_otp_prog[i].value & 0xff);
- if( i2c_write(PFUZE100_I2C_ADDR, pmic_otp_prog[i].reg,
+ if (i2c_write(PFUZE100_I2C_ADDR, pmic_otp_prog[i].reg,
1, &val, 1)) {
printf("i2c write failed, reg 0x%2x, value"
"0x%2x\n", pmic_otp_prog[i].reg, val);
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index ef8357609b6..56130852d88 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -398,7 +398,7 @@ int board_eth_init(bd_t *bis)
}
phy_reset(phydev);
printf("using PHY at %d\n", phydev->addr);
- ret = fec_probe(bis, -1, base, bus, phydev);
+ ret = fec_probe(bis, -1, base, bus, phydev);
if (ret) {
printf("FEC MXC: %s:failed\n", __func__);
free(phydev);
@@ -546,7 +546,7 @@ static void setup_display(void)
/* FIXME disable whatever LVDS stuff is initialized here */
/* Turn on LDB0,IPU,IPU DI0 clocks */
reg = __raw_readl(&mxc_ccm->CCGR3);
- reg |= MXC_CCM_CCGR3_LDB_DI0_MASK;
+ reg |= MXC_CCM_CCGR3_LDB_DI0_MASK;
writel(reg, &mxc_ccm->CCGR3);
/* set LDB0, LDB1 clk select to 011/011 */
@@ -701,7 +701,7 @@ int do_patch_ddr_size(cmd_tbl_t *cmdtp, int flag, int argc,
goto fail;
if (is_cpu_type(MXC_CPU_MX6DL)) {
start_dcd = (unsigned *)(ivt + *(unsigned*)(&ivt[0xc]) -
- *(unsigned*)(&ivt[0x14]));
+ *(unsigned*)(&ivt[0x14]));
if ((*start_dcd & 0xfe0000ff) == 0x400000d2) {
len = (*start_dcd & 0xffff00) >> 8;
/* search register value for addr 0x21b0000 */
@@ -721,7 +721,7 @@ int do_patch_ddr_size(cmd_tbl_t *cmdtp, int flag, int argc,
ret = mmc->block_dev.block_write(0, 2, 2, ivt);
puts("patched, ");
}
- } else
+ } else
puts("reg/val pair not found, ");
}
/* Switch back to regular eMMC user partition */
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 22f544b39a7..ce9eac4aa72 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -161,7 +161,6 @@ static void setup_gpmi_nand(void)
/*
* NAND_USDHC_BUS_CLK is set in rom
*/
-
set_clk_nand();
/*
@@ -211,7 +210,7 @@ static iomux_v3_cfg_t const backlight_pads[] = {
MX7D_PAD_SD1_WP__GPIO5_IO1 | MUX_PAD_CTRL(NO_PAD_CTRL),
#define RGB_BACKLIGHT_GP IMX_GPIO_NR(5, 1)
/* TODO PWM not GPIO */
- MX7D_PAD_GPIO1_IO08__GPIO1_IO8 | MUX_PAD_CTRL(NO_PULLUP),
+ MX7D_PAD_GPIO1_IO08__GPIO1_IO8 | MUX_PAD_CTRL(NO_PULLUP),
MX7D_PAD_ECSPI2_MOSI__GPIO4_IO21 | MUX_PAD_CTRL(NO_PAD_CTRL),
#define RGB_BACKLIGHTPWM_GP IMX_GPIO_NR(1, 8)
};
@@ -289,7 +288,7 @@ int board_video_skip(void)
}
if (i < ARRAY_SIZE(displays)) {
ret = mxs_lcd_panel_setup(displays[i].mode, displays[i].depth,
- displays[i].lcdif_base_addr);
+ displays[i].lcdif_base_addr);
if (!ret) {
if (displays[i].enable)
displays[i].enable(displays+i);
@@ -565,7 +564,7 @@ static const struct boot_mode board_boot_modes[] = {
/* 4 bit bus width */
{"nand", MAKE_CFGVAL(0x40, 0x34, 0x00, 0x00)},
{"sd1", MAKE_CFGVAL(0x10, 0x10, 0x00, 0x00)},
- {NULL, 0},
+ {NULL, 0},
};
#endif
@@ -589,7 +588,7 @@ int power_init_board(void)
pmic_reg_read(p, RN5T567_LSIVER, &ver);
pmic_reg_read(p, RN5T567_OTPVER, &reg);
- printf("PMIC: RN5T567 LSIVER=0x%x OTPVER=0x%x\n", ver, reg);
+ printf("PMIC: RN5T567 LSIVER=0x%x OTPVER=0x%x\n", ver, reg);
/* set jduge and press timer of N_OE to minimal values */
pmic_reg_read(p, RN5T567_NOETIMSETCNT, &reg);
diff --git a/board/toradex/colibri_imx7/imximage.cfg b/board/toradex/colibri_imx7/imximage.cfg
index 558dbf9b55b..5ea961644f4 100644
--- a/board/toradex/colibri_imx7/imximage.cfg
+++ b/board/toradex/colibri_imx7/imximage.cfg
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015 Freescale Semiconductor, Inc.
- * 2015 Toradex AG
+ * 2015-2016 Toradex AG
*
* SPDX-License-Identifier: GPL-2.0+
*
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c
index d270cd8fc7e..7f3d182f3ef 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -40,7 +40,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define ENET_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_HIGH | \
PAD_CTL_DSE_50ohm | PAD_CTL_OBE_IBE_ENABLE)
-#define USB_PEN_GPIO 83
+#define USB_PEN_GPIO 83
static const iomux_v3_cfg_t usb_pads[] = {
VF610_PAD_PTD4__GPIO_83,
@@ -421,7 +421,7 @@ int board_early_init_f(void)
static const struct boot_mode board_boot_modes[] = {
{"nand", MAKE_CFGVAL(0x80, 0x02, 0x00, 0x00)},
{"mmc", MAKE_CFGVAL(0x60, 0x28, 0x00, 0x00)},
- {NULL, 0},
+ {NULL, 0},
};
#endif
@@ -498,7 +498,7 @@ int ft_board_setup(void *blob, bd_t *bd)
int ret = 0;
#ifdef CONFIG_FDT_FIXUP_PARTITIONS
static struct node_info nodes[] = {
- { "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */
+ { "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */
};
/* Update partition nodes using info from mtdparts env var */
diff --git a/board/toradex/common/Kconfig b/board/toradex/common/Kconfig
index e4299167494..94d5c305f6d 100644
--- a/board/toradex/common/Kconfig
+++ b/board/toradex/common/Kconfig
@@ -53,7 +53,7 @@ config TRDX_CFG_BLOCK_OFFSET2
help
Specify the byte offset of the 2nd instance of the Toradex config block
within the flash device the config block is stored on.
- Set to 0 on modules which have no 2nd instance.
+ Set to 0 on modules which have no 2nd instance.
config TRDX_CFG_BLOCK_2ND_ETHADDR
bool "Set the second ethernet address"
diff --git a/board/toradex/common/configblock.c b/board/toradex/common/configblock.c
index 10d730a801e..1601e2e9c35 100644
--- a/board/toradex/common/configblock.c
+++ b/board/toradex/common/configblock.c
@@ -252,7 +252,7 @@ static int get_cfgblock_interactive(void)
trdx_hw_tag.prodid = COLIBRI_IMX6DL_IT;
else
trdx_hw_tag.prodid = COLIBRI_IMX6S_IT;
- else
+ else
if (is_cpu_type(MXC_CPU_MX6DL))
trdx_hw_tag.prodid = COLIBRI_IMX6DL;
else
@@ -392,7 +392,7 @@ static int do_cfgblock_create(cmd_tbl_t *cmdtp, int flag, int argc,
#endif
}
- /* Parse new Toradex config block data... */
+ /* Parse new Toradex config block data... */
if (argc < 3)
err = get_cfgblock_interactive();
else