summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2016-09-20 10:12:54 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-09-29 06:04:21 +0200
commit3f42c624fa03c30b546fc4eab6f1ae376291660d (patch)
treee6c1549d67c9b5c85b1d85866a503bd4d26eee63
parenta3d0bf966cb932bdf1b2a4f189f21410a9036b16 (diff)
board/toradex/colibri_imx6: whitespace fixup
Cleanup whitespace found when preparing patches for mainline. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--board/toradex/colibri_imx6/colibri_imx6.c56
-rw-r--r--board/toradex/colibri_imx6/do_fuse.c3
-rw-r--r--board/toradex/colibri_imx6/pf0100.c81
-rw-r--r--board/toradex/colibri_imx6/pf0100.h7
-rw-r--r--board/toradex/colibri_imx6/pf0100_otp.inc2
5 files changed, 73 insertions, 76 deletions
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 56130852d88..9bfc341049f 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -224,7 +224,7 @@ iomux_v3_cfg_t const gpio_pads[] = {
MX6_PAD_EIM_D27__GPIO3_IO27 | MUX_PAD_CTRL(WEAK_PULLUP),
MX6_PAD_NANDF_D6__GPIO2_IO06 | MUX_PAD_CTRL(WEAK_PULLUP),
MX6_PAD_NANDF_D3__GPIO2_IO03 | MUX_PAD_CTRL(WEAK_PULLUP),
- MX6_PAD_ENET_REF_CLK__GPIO1_IO23| MUX_PAD_CTRL(WEAK_PULLUP),
+ MX6_PAD_ENET_REF_CLK__GPIO1_IO23 | MUX_PAD_CTRL(WEAK_PULLUP),
MX6_PAD_DI0_PIN4__GPIO4_IO20 | MUX_PAD_CTRL(WEAK_PULLUP),
MX6_PAD_SD4_DAT3__GPIO2_IO11 | MUX_PAD_CTRL(WEAK_PULLUP),
MX6_PAD_NANDF_D4__GPIO2_IO04 | MUX_PAD_CTRL(WEAK_PULLUP),
@@ -348,8 +348,8 @@ int board_mmc_init(bd_t *bis)
break;
default:
printf("Warning: you configured more USDHC controllers"
- "(%d) then supported by the board (%d)\n",
- index + 1, CONFIG_SYS_FSL_USDHC_NUM);
+ "(%d) than supported by the board (%d)\n",
+ index + 1, CONFIG_SYS_FSL_USDHC_NUM);
return status;
}
@@ -429,28 +429,28 @@ static iomux_v3_cfg_t const backlight_pads[] = {
};
static iomux_v3_cfg_t const rgb_pads[] = {
- MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 | MUX_PAD_CTRL(OUTPUT_RGB),
- MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 | MUX_PAD_CTRL(OUTPUT_RGB),
+ MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 | MUX_PAD_CTRL(OUTPUT_RGB),
};
static void do_enable_hdmi(struct display_info_t const *dev)
@@ -596,7 +596,7 @@ static void setup_display(void)
int board_early_init_f(void)
{
imx_iomux_v3_setup_multiple_pads(pwr_intb_pads,
- ARRAY_SIZE(pwr_intb_pads));
+ ARRAY_SIZE(pwr_intb_pads));
setup_iomux_uart();
#if defined(CONFIG_VIDEO_IPUV3)
@@ -654,7 +654,7 @@ int board_late_init(void)
int checkboard_fallback(void)
{
printf("Model: Toradex Colibri iMX6 %sMB\n",
- (gd->ram_size == 0x20000000) ? "512" : "256");
+ (gd->ram_size == 0x20000000) ? "512" : "256");
return 0;
}
@@ -684,7 +684,7 @@ int do_patch_ddr_size(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
char *ivt;
- unsigned len, *next = 0, *start_dcd = 0;
+ unsigned int len, *next = 0, *start_dcd = 0;
struct mmc *mmc;
int found = 0, ret = 0;
diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c
index 6447e3133f4..754ad1ee0e3 100644
--- a/board/toradex/colibri_imx6/do_fuse.c
+++ b/board/toradex/colibri_imx6/do_fuse.c
@@ -23,8 +23,7 @@ static int mfgr_fuse(void)
printf("Fuse 4, 3: %8x\n", val);
fuse_sense(4, 2, &val);
printf("Fuse 4, 2: %8x\n", val);
- if(val6 & 0x10)
- {
+ if (val6 & 0x10) {
puts("BT_FUSE_SEL already fused, will do nothing\n");
return CMD_RET_FAILURE;
}
diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c
index 49c8f68cfb6..3e319072272 100644
--- a/board/toradex/colibri_imx6/pf0100.c
+++ b/board/toradex/colibri_imx6/pf0100.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014, Toradex AG
+ * Copyright (C) 2014-2016, Toradex AG
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -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;
}
@@ -56,13 +56,13 @@ unsigned pmic_init(void)
#ifdef DEBUG
{
- unsigned i,j;
+ unsigned i, j;
- for(i=0; i<16; i++)
- printf("\t%x",i);
- for(j=0; j<0x80; ) {
- printf("\n%2x",j);
- for(i=0; i<16; i++) {
+ for (i = 0; i < 16; i++)
+ printf("\t%x", i);
+ for (j = 0; j < 0x80; ) {
+ printf("\n%2x", j);
+ 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,
- &val, 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; ) {
- printf("\n%2x",j);
- for(i=0; i<16; i++) {
+ for (j = 0x80; j < 0x100; ) {
+ printf("\n%2x", j);
+ for (i = 0; i < 16; i++) {
i2c_read(PFUZE100_I2C_ADDR, j+i, 1, &val, 1);
printf("\t%2x", val);
}
@@ -88,17 +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,
- &val, 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; )
- {
- printf("\n%2x",j);
- for(i=0; i<16; i++)
- {
+ for (j = 0x80; j < 0x100; ) {
+ printf("\n%2x", j);
+ for (i = 0; i < 16; i++) {
i2c_read(PFUZE100_I2C_ADDR, j+i, 1, &val, 1);
printf("\t%2x", val);
}
@@ -109,30 +107,29 @@ 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) {
@@ -156,29 +153,29 @@ 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;
}
/* set up gpio to manipulate vprog, initially off */
imx_iomux_v3_setup_multiple_pads(pmic_prog_pads,
- ARRAY_SIZE(pmic_prog_pads));
+ 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) {
+ for (i = 0; i < ARRAY_SIZE(pmic_otp_prog); i++) {
+ 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,
- 1, &val, 1)) {
- printf("i2c write failed, reg 0x%2x, value"
- "0x%2x\n", pmic_otp_prog[i].reg, val);
+ 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);
return CMD_RET_FAILURE;
}
break;
@@ -187,7 +184,7 @@ int pf0100_prog(void)
break;
case pmic_vpgm:
gpio_direction_output(PMIC_PROG_VOLTAGE,
- pmic_otp_prog[i].value);
+ pmic_otp_prog[i].value);
break;
case pmic_pwr:
/* TODO */
diff --git a/board/toradex/colibri_imx6/pf0100.h b/board/toradex/colibri_imx6/pf0100.h
index b43744c47e1..c84cab8b158 100644
--- a/board/toradex/colibri_imx6/pf0100.h
+++ b/board/toradex/colibri_imx6/pf0100.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014, Toradex AG
+ * Copyright (C) 2014-2016, Toradex AG
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -12,7 +12,7 @@
#define PF0100_H_
/* 7-bit I2C bus slave address */
-#define PFUZE100_I2C_ADDR (0x08)
+#define PFUZE100_I2C_ADDR (0x08)
/* Register Addresses */
#define PFUZE100_DEVICEID (0x0)
#define PFUZE100_REVID (0x3)
@@ -30,7 +30,8 @@
#define PFUZE100_VGEN1CTL (0x6c)
#define PFUZE100_VGEN1_VAL (0x30 + 0x08) /* Always ON, 1.2V */
#define PFUZE100_SWBSTCTL (0x66)
-#define PFUZE100_SWBST_VAL (0x40 + 0x08 + 0x00) /* Always ON, Auto Switching Mode, 5.0V */
+/* Always ON, Auto Switching Mode, 5.0V */
+#define PFUZE100_SWBST_VAL (0x40 + 0x08 + 0x00)
/* chooses the extended page (registers 0x80..0xff) */
#define PFUZE100_PAGE_REGISTER 0x7f
diff --git a/board/toradex/colibri_imx6/pf0100_otp.inc b/board/toradex/colibri_imx6/pf0100_otp.inc
index b84f1a8b0ad..d87dd920b39 100644
--- a/board/toradex/colibri_imx6/pf0100_otp.inc
+++ b/board/toradex/colibri_imx6/pf0100_otp.inc
@@ -7,7 +7,7 @@
// Register Output for PF0100 programmer
// Customer: Toradex AG
// Program: Colibri iMX6
-// Sample marking:
+// Sample marking:
// Date: 24.07.2015
// Time: 10:52:58
// Generated from Spreadsheet Revision: P1.8