* [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style
@ 2020-07-17 19:36 Fabio Estevam
2020-07-17 19:36 ` [PATCH 2/2] imx8m: soc: Remove unneeded space Fabio Estevam
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Fabio Estevam @ 2020-07-17 19:36 UTC (permalink / raw)
To: u-boot
Currently checkpatch is not happy about this file:
total: 14 errors, 2 warnings, 7 checks, 359 lines checked
Improve the coding style so that it can now report:
total: 0 errors, 0 warnings, 6 checks, 360 lines checked
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/ddr/imx/imx8m/ddrphy_utils.c | 29 ++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/drivers/ddr/imx/imx8m/ddrphy_utils.c b/drivers/ddr/imx/imx8m/ddrphy_utils.c
index 20ae47bfb5..0f8baefb1f 100644
--- a/drivers/ddr/imx/imx8m/ddrphy_utils.c
+++ b/drivers/ddr/imx/imx8m/ddrphy_utils.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
-* Copyright 2018 NXP
-*/
+ * Copyright 2018 NXP
+ */
#include <common.h>
#include <errno.h>
@@ -201,7 +201,7 @@ unsigned int lpddr4_mr_read(unsigned int mr_rank, unsigned int mr_addr)
}
unsigned int look_for_max(unsigned int data[],
- unsigned int addr_start, unsigned int addr_end)
+ unsigned int addr_start, unsigned int addr_end)
{
unsigned int i, imax = 0;
@@ -233,9 +233,9 @@ void get_trained_CDD(u32 fsp)
if (i == 0) {
cdd_cha[0] = (tmp >> 8) & 0xff;
} else if (i == 6) {
- cdd_cha[11]=tmp & 0xff;
+ cdd_cha[11] = tmp & 0xff;
} else {
- cdd_chb[ i * 2 - 1] = tmp & 0xff;
+ cdd_chb[i * 2 - 1] = tmp & 0xff;
cdd_chb[i * 2] = (tmp >> 8) & 0xff;
}
}
@@ -254,7 +254,8 @@ void get_trained_CDD(u32 fsp)
g_cdd_ww_max[fsp] = cdd_cha_ww_max > cdd_chb_ww_max ? cdd_cha_ww_max : cdd_chb_ww_max;
} else {
unsigned int ddr4_cdd[64];
- for( i = 0; i < 29; i++) {
+
+ for (i = 0; i < 29; i++) {
tmp = reg32_read(IP2APB_DDRPHY_IPS_BASE_ADDR(0) + (0x54012 + i) * 4);
ddr4_cdd[i * 2] = tmp & 0xff;
ddr4_cdd[i * 2 + 1] = (tmp >> 8) & 0xff;
@@ -269,18 +270,18 @@ void get_trained_CDD(u32 fsp)
void update_umctl2_rank_space_setting(unsigned int pstat_num)
{
- unsigned int i,ddr_type;
+ unsigned int i, ddr_type;
unsigned int addr_slot, rdata, tmp, tmp_t;
- unsigned int ddrc_w2r,ddrc_r2w,ddrc_wr_gap,ddrc_rd_gap;
+ unsigned int ddrc_w2r, ddrc_r2w, ddrc_wr_gap, ddrc_rd_gap;
ddr_type = reg32_read(DDRC_MSTR(0)) & 0x3f;
for (i = 0; i < pstat_num; i++) {
addr_slot = i ? (i + 1) * 0x1000 : 0;
if (ddr_type == 0x20) {
/* update r2w:[13:8], w2r:[5:0] */
- rdata=reg32_read(DDRC_DRAMTMG2(0) + addr_slot);
+ rdata = reg32_read(DDRC_DRAMTMG2(0) + addr_slot);
ddrc_w2r = rdata & 0x3f;
- if(is_imx8mp())
+ if (is_imx8mp())
tmp = ddrc_w2r + (g_cdd_wr_max[i] >> 1);
else
tmp = ddrc_w2r + (g_cdd_wr_max[i] >> 1) + 1;
@@ -297,7 +298,7 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num)
reg32_write((DDRC_DRAMTMG2(0) + addr_slot), tmp_t);
} else {
/* update w2r:[5:0] */
- rdata=reg32_read(DDRC_DRAMTMG9(0) + addr_slot);
+ rdata = reg32_read(DDRC_DRAMTMG9(0) + addr_slot);
ddrc_w2r = rdata & 0x3f;
if (is_imx8mp())
tmp = ddrc_w2r + (g_cdd_wr_max[i] >> 1);
@@ -310,7 +311,7 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num)
/* update r2w:[13:8] */
rdata = reg32_read(DDRC_DRAMTMG2(0) + addr_slot);
ddrc_r2w = (rdata >> 8) & 0x3f;
- if(is_imx8mp())
+ if (is_imx8mp())
tmp = ddrc_r2w + (g_cdd_rw_max[i] >> 1);
else
tmp = ddrc_r2w + (g_cdd_rw_max[i] >> 1) + 1;
@@ -324,7 +325,7 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num)
/* update rankctl: wr_gap:11:8; rd:gap:7:4; quasi-dymic, doc wrong(static) */
rdata = reg32_read(DDRC_RANKCTL(0) + addr_slot);
ddrc_wr_gap = (rdata >> 8) & 0xf;
- if(is_imx8mp())
+ if (is_imx8mp())
tmp = ddrc_wr_gap + (g_cdd_ww_max[i] >> 1);
else
tmp = ddrc_wr_gap + (g_cdd_ww_max[i] >> 1) + 1;
@@ -342,7 +343,7 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num)
}
}
- if(is_imx8mq()) {
+ if (is_imx8mq()) {
/* update rankctl: wr_gap:11:8; rd:gap:7:4; quasi-dymic, doc wrong(static) */
rdata = reg32_read(DDRC_RANKCTL(0));
ddrc_wr_gap = (rdata >> 8) & 0xf;
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] imx8m: soc: Remove unneeded space
2020-07-17 19:36 [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Fabio Estevam
@ 2020-07-17 19:36 ` Fabio Estevam
2020-07-17 20:56 ` Tom Rini
` (2 more replies)
2020-07-17 20:56 ` [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Tom Rini
` (2 subsequent siblings)
3 siblings, 3 replies; 8+ messages in thread
From: Fabio Estevam @ 2020-07-17 19:36 UTC (permalink / raw)
To: u-boot
Checkpatch reports the following issue:
ERROR: space prohibited before that ',' (ctx:WxW)
#936: FILE: arch/arm/mach-imx/imx8m/soc.c:936:
+ 0, 0 , 0, 0, 0, 0, &res);
Remove the unneeded space.
^
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
arch/arm/mach-imx/imx8m/soc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index b3c08271e6..75e1877e20 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -933,7 +933,7 @@ static void acquire_buildinfo(void)
/* Get ARM Trusted Firmware commit id */
arm_smccc_smc(IMX_SIP_BUILDINFO, IMX_SIP_BUILDINFO_GET_COMMITHASH,
- 0, 0 , 0, 0, 0, 0, &res);
+ 0, 0, 0, 0, 0, 0, &res);
atf_commit = res.a0;
if (atf_commit == 0xffffffff) {
debug("ATF does not support build info\n");
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style
2020-07-17 19:36 [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Fabio Estevam
2020-07-17 19:36 ` [PATCH 2/2] imx8m: soc: Remove unneeded space Fabio Estevam
@ 2020-07-17 20:56 ` Tom Rini
2020-07-20 1:51 ` Peng Fan
2020-07-27 19:09 ` sbabic at denx.de
3 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2020-07-17 20:56 UTC (permalink / raw)
To: u-boot
On Fri, Jul 17, 2020 at 04:36:53PM -0300, Fabio Estevam wrote:
> Currently checkpatch is not happy about this file:
>
> total: 14 errors, 2 warnings, 7 checks, 359 lines checked
>
> Improve the coding style so that it can now report:
>
> total: 0 errors, 0 warnings, 6 checks, 360 lines checked
>
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200717/0b28a8fb/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] imx8m: soc: Remove unneeded space
2020-07-17 19:36 ` [PATCH 2/2] imx8m: soc: Remove unneeded space Fabio Estevam
@ 2020-07-17 20:56 ` Tom Rini
2020-07-20 1:51 ` Peng Fan
2020-07-27 19:09 ` sbabic at denx.de
2 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2020-07-17 20:56 UTC (permalink / raw)
To: u-boot
On Fri, Jul 17, 2020 at 04:36:54PM -0300, Fabio Estevam wrote:
> Checkpatch reports the following issue:
>
> ERROR: space prohibited before that ',' (ctx:WxW)
> #936: FILE: arch/arm/mach-imx/imx8m/soc.c:936:
> + 0, 0 , 0, 0, 0, 0, &res);
>
> Remove the unneeded space.
> ^
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200717/c6a82746/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style
2020-07-17 19:36 [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Fabio Estevam
2020-07-17 19:36 ` [PATCH 2/2] imx8m: soc: Remove unneeded space Fabio Estevam
2020-07-17 20:56 ` [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Tom Rini
@ 2020-07-20 1:51 ` Peng Fan
2020-07-27 19:09 ` sbabic at denx.de
3 siblings, 0 replies; 8+ messages in thread
From: Peng Fan @ 2020-07-20 1:51 UTC (permalink / raw)
To: u-boot
> Subject: [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style
>
> Currently checkpatch is not happy about this file:
>
> total: 14 errors, 2 warnings, 7 checks, 359 lines checked
>
> Improve the coding style so that it can now report:
>
> total: 0 errors, 0 warnings, 6 checks, 360 lines checked
>
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> drivers/ddr/imx/imx8m/ddrphy_utils.c | 29 ++++++++++++++--------------
> 1 file changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/ddr/imx/imx8m/ddrphy_utils.c
> b/drivers/ddr/imx/imx8m/ddrphy_utils.c
> index 20ae47bfb5..0f8baefb1f 100644
> --- a/drivers/ddr/imx/imx8m/ddrphy_utils.c
> +++ b/drivers/ddr/imx/imx8m/ddrphy_utils.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0+
> /*
> -* Copyright 2018 NXP
> -*/
> + * Copyright 2018 NXP
> + */
>
> #include <common.h>
> #include <errno.h>
> @@ -201,7 +201,7 @@ unsigned int lpddr4_mr_read(unsigned int mr_rank,
> unsigned int mr_addr) }
>
> unsigned int look_for_max(unsigned int data[],
> - unsigned int addr_start, unsigned int addr_end)
> + unsigned int addr_start, unsigned int addr_end)
> {
> unsigned int i, imax = 0;
>
> @@ -233,9 +233,9 @@ void get_trained_CDD(u32 fsp)
> if (i == 0) {
> cdd_cha[0] = (tmp >> 8) & 0xff;
> } else if (i == 6) {
> - cdd_cha[11]=tmp & 0xff;
> + cdd_cha[11] = tmp & 0xff;
> } else {
> - cdd_chb[ i * 2 - 1] = tmp & 0xff;
> + cdd_chb[i * 2 - 1] = tmp & 0xff;
> cdd_chb[i * 2] = (tmp >> 8) & 0xff;
> }
> }
> @@ -254,7 +254,8 @@ void get_trained_CDD(u32 fsp)
> g_cdd_ww_max[fsp] = cdd_cha_ww_max > cdd_chb_ww_max ?
> cdd_cha_ww_max : cdd_chb_ww_max;
> } else {
> unsigned int ddr4_cdd[64];
> - for( i = 0; i < 29; i++) {
> +
> + for (i = 0; i < 29; i++) {
> tmp = reg32_read(IP2APB_DDRPHY_IPS_BASE_ADDR(0) +
> (0x54012 + i) * 4);
> ddr4_cdd[i * 2] = tmp & 0xff;
> ddr4_cdd[i * 2 + 1] = (tmp >> 8) & 0xff; @@ -269,18 +270,18
> @@ void get_trained_CDD(u32 fsp)
>
> void update_umctl2_rank_space_setting(unsigned int pstat_num) {
> - unsigned int i,ddr_type;
> + unsigned int i, ddr_type;
> unsigned int addr_slot, rdata, tmp, tmp_t;
> - unsigned int ddrc_w2r,ddrc_r2w,ddrc_wr_gap,ddrc_rd_gap;
> + unsigned int ddrc_w2r, ddrc_r2w, ddrc_wr_gap, ddrc_rd_gap;
>
> ddr_type = reg32_read(DDRC_MSTR(0)) & 0x3f;
> for (i = 0; i < pstat_num; i++) {
> addr_slot = i ? (i + 1) * 0x1000 : 0;
> if (ddr_type == 0x20) {
> /* update r2w:[13:8], w2r:[5:0] */
> - rdata=reg32_read(DDRC_DRAMTMG2(0) + addr_slot);
> + rdata = reg32_read(DDRC_DRAMTMG2(0) + addr_slot);
> ddrc_w2r = rdata & 0x3f;
> - if(is_imx8mp())
> + if (is_imx8mp())
> tmp = ddrc_w2r + (g_cdd_wr_max[i] >> 1);
> else
> tmp = ddrc_w2r + (g_cdd_wr_max[i] >> 1) + 1; @@ -297,7
> +298,7 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num)
> reg32_write((DDRC_DRAMTMG2(0) + addr_slot), tmp_t);
> } else {
> /* update w2r:[5:0] */
> - rdata=reg32_read(DDRC_DRAMTMG9(0) + addr_slot);
> + rdata = reg32_read(DDRC_DRAMTMG9(0) + addr_slot);
> ddrc_w2r = rdata & 0x3f;
> if (is_imx8mp())
> tmp = ddrc_w2r + (g_cdd_wr_max[i] >> 1); @@ -310,7
> +311,7 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num)
> /* update r2w:[13:8] */
> rdata = reg32_read(DDRC_DRAMTMG2(0) + addr_slot);
> ddrc_r2w = (rdata >> 8) & 0x3f;
> - if(is_imx8mp())
> + if (is_imx8mp())
> tmp = ddrc_r2w + (g_cdd_rw_max[i] >> 1);
> else
> tmp = ddrc_r2w + (g_cdd_rw_max[i] >> 1) + 1; @@ -324,7
> +325,7 @@ void update_umctl2_rank_space_setting(unsigned int pstat_num)
> /* update rankctl: wr_gap:11:8; rd:gap:7:4; quasi-dymic, doc
> wrong(static) */
> rdata = reg32_read(DDRC_RANKCTL(0) + addr_slot);
> ddrc_wr_gap = (rdata >> 8) & 0xf;
> - if(is_imx8mp())
> + if (is_imx8mp())
> tmp = ddrc_wr_gap + (g_cdd_ww_max[i] >> 1);
> else
> tmp = ddrc_wr_gap + (g_cdd_ww_max[i] >> 1) + 1; @@
> -342,7 +343,7 @@ void update_umctl2_rank_space_setting(unsigned int
> pstat_num)
> }
> }
>
> - if(is_imx8mq()) {
> + if (is_imx8mq()) {
> /* update rankctl: wr_gap:11:8; rd:gap:7:4; quasi-dymic, doc
> wrong(static) */
> rdata = reg32_read(DDRC_RANKCTL(0));
> ddrc_wr_gap = (rdata >> 8) & 0xf;
> --
Reviewed-by: Peng Fan <peng.fan@nxp.com>
> 2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] imx8m: soc: Remove unneeded space
2020-07-17 19:36 ` [PATCH 2/2] imx8m: soc: Remove unneeded space Fabio Estevam
2020-07-17 20:56 ` Tom Rini
@ 2020-07-20 1:51 ` Peng Fan
2020-07-27 19:09 ` sbabic at denx.de
2 siblings, 0 replies; 8+ messages in thread
From: Peng Fan @ 2020-07-20 1:51 UTC (permalink / raw)
To: u-boot
> Subject: [PATCH 2/2] imx8m: soc: Remove unneeded space
>
> Checkpatch reports the following issue:
>
> ERROR: space prohibited before that ',' (ctx:WxW)
> #936: FILE: arch/arm/mach-imx/imx8m/soc.c:936:
> + 0, 0 , 0, 0, 0, 0, &res);
>
> Remove the unneeded space.
> ^
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> arch/arm/mach-imx/imx8m/soc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-imx/imx8m/soc.c
> b/arch/arm/mach-imx/imx8m/soc.c index b3c08271e6..75e1877e20 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -933,7 +933,7 @@ static void acquire_buildinfo(void)
>
> /* Get ARM Trusted Firmware commit id */
> arm_smccc_smc(IMX_SIP_BUILDINFO,
> IMX_SIP_BUILDINFO_GET_COMMITHASH,
> - 0, 0 , 0, 0, 0, 0, &res);
> + 0, 0, 0, 0, 0, 0, &res);
> atf_commit = res.a0;
> if (atf_commit == 0xffffffff) {
> debug("ATF does not support build info\n");
Reviewed-by: Peng Fan <peng.fan@nxp.com>
> --
> 2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] imx8m: soc: Remove unneeded space
2020-07-17 19:36 ` [PATCH 2/2] imx8m: soc: Remove unneeded space Fabio Estevam
2020-07-17 20:56 ` Tom Rini
2020-07-20 1:51 ` Peng Fan
@ 2020-07-27 19:09 ` sbabic at denx.de
2 siblings, 0 replies; 8+ messages in thread
From: sbabic at denx.de @ 2020-07-27 19:09 UTC (permalink / raw)
To: u-boot
> Checkpatch reports the following issue:
> ERROR: space prohibited before that ',' (ctx:WxW)
> #936: FILE: arch/arm/mach-imx/imx8m/soc.c:936:
> + 0, 0 , 0, 0, 0, 0, &res);
> Remove the unneeded space.
> ^
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style
2020-07-17 19:36 [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Fabio Estevam
` (2 preceding siblings ...)
2020-07-20 1:51 ` Peng Fan
@ 2020-07-27 19:09 ` sbabic at denx.de
3 siblings, 0 replies; 8+ messages in thread
From: sbabic at denx.de @ 2020-07-27 19:09 UTC (permalink / raw)
To: u-boot
> Currently checkpatch is not happy about this file:
> total: 14 errors, 2 warnings, 7 checks, 359 lines checked
> Improve the coding style so that it can now report:
> total: 0 errors, 0 warnings, 6 checks, 360 lines checked
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-07-27 19:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 19:36 [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Fabio Estevam
2020-07-17 19:36 ` [PATCH 2/2] imx8m: soc: Remove unneeded space Fabio Estevam
2020-07-17 20:56 ` Tom Rini
2020-07-20 1:51 ` Peng Fan
2020-07-27 19:09 ` sbabic at denx.de
2020-07-17 20:56 ` [PATCH 1/2] imx8m: ddrphy_utils: Improve coding style Tom Rini
2020-07-20 1:51 ` Peng Fan
2020-07-27 19:09 ` sbabic at denx.de
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.