* [U-Boot] [PATCH] gdsys: Drop print_fpga_state function
@ 2016-07-15 19:51 Tom Rini
2016-07-23 0:12 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2016-07-15 19:51 UTC (permalink / raw)
To: u-boot
On most platforms the print_fpga_state function is never called. Only
on dlvision-10g do we, so in that case inline it. Drop it from
everywhere else to avoid extra strings.
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Reinhard Pfau <reinhard.pfau@gdsys.cc>
Acked-by: Dirk Eibach <dirk.eibach@gdsys.cc>
---
Changes in v2:
- Per Reinhard, use fpga_state directly rather than checking gd
for the value.
---
board/gdsys/405ep/405ep.c | 8 --------
board/gdsys/405ep/dlvision-10g.c | 5 ++++-
board/gdsys/405ex/405ex.c | 8 --------
board/gdsys/mpc8308/mpc8308.c | 8 --------
include/gdsys_fpga.h | 1 -
5 files changed, 4 insertions(+), 26 deletions(-)
diff --git a/board/gdsys/405ep/405ep.c b/board/gdsys/405ep/405ep.c
index 426dc05..35fa06a 100644
--- a/board/gdsys/405ep/405ep.c
+++ b/board/gdsys/405ep/405ep.c
@@ -31,14 +31,6 @@ int get_fpga_state(unsigned dev)
return gd->arch.fpga_state[dev];
}
-void print_fpga_state(unsigned dev)
-{
- if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
- puts(" Waiting for FPGA-DONE timed out.\n");
- if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
- puts(" FPGA reflection test failed.\n");
-}
-
int board_early_init_f(void)
{
unsigned k;
diff --git a/board/gdsys/405ep/dlvision-10g.c b/board/gdsys/405ep/dlvision-10g.c
index 54c7eb3..e400d19 100644
--- a/board/gdsys/405ep/dlvision-10g.c
+++ b/board/gdsys/405ep/dlvision-10g.c
@@ -109,7 +109,10 @@ static void print_fpga_info(unsigned dev)
&& !((hardware_version == HWVER_101)
&& (fpga_state == FPGA_STATE_DONE_FAILED))) {
puts("not available\n");
- print_fpga_state(dev);
+ if (fpga_state & FPGA_STATE_DONE_FAILED)
+ puts(" Waiting for FPGA-DONE timed out.\n");
+ if (fpga_state & FPGA_STATE_REFLECTION_FAILED)
+ puts(" FPGA reflection test failed.\n");
return;
}
diff --git a/board/gdsys/405ex/405ex.c b/board/gdsys/405ex/405ex.c
index c1a583f..9e1c57f 100644
--- a/board/gdsys/405ex/405ex.c
+++ b/board/gdsys/405ex/405ex.c
@@ -24,14 +24,6 @@ int get_fpga_state(unsigned dev)
return gd->arch.fpga_state[dev];
}
-void print_fpga_state(unsigned dev)
-{
- if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
- puts(" Waiting for FPGA-DONE timed out.\n");
- if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
- puts(" FPGA reflection test failed.\n");
-}
-
int board_early_init_f(void)
{
u32 val;
diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c
index 4338a33..1b8e035 100644
--- a/board/gdsys/mpc8308/mpc8308.c
+++ b/board/gdsys/mpc8308/mpc8308.c
@@ -31,14 +31,6 @@ int get_fpga_state(unsigned dev)
return gd->arch.fpga_state[dev];
}
-void print_fpga_state(unsigned dev)
-{
- if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
- puts(" Waiting for FPGA-DONE timed out.\n");
- if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
- puts(" FPGA reflection test failed.\n");
-}
-
int board_early_init_f(void)
{
unsigned k;
diff --git a/include/gdsys_fpga.h b/include/gdsys_fpga.h
index e1b9c64..bb8e144 100644
--- a/include/gdsys_fpga.h
+++ b/include/gdsys_fpga.h
@@ -17,7 +17,6 @@ enum {
};
int get_fpga_state(unsigned dev);
-void print_fpga_state(unsigned dev);
int fpga_set_reg(u32 fpga, u16 *reg, off_t regoff, u16 data);
int fpga_get_reg(u32 fpga, u16 *reg, off_t regoff, u16 *data);
--
2.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] gdsys: Drop print_fpga_state function
2016-07-15 19:51 [U-Boot] [PATCH] gdsys: Drop print_fpga_state function Tom Rini
@ 2016-07-23 0:12 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-07-23 0:12 UTC (permalink / raw)
To: u-boot
On Fri, Jul 15, 2016 at 03:51:40PM -0400, Tom Rini wrote:
> On most platforms the print_fpga_state function is never called. Only
> on dlvision-10g do we, so in that case inline it. Drop it from
> everywhere else to avoid extra strings.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Acked-by: Reinhard Pfau <reinhard.pfau@gdsys.cc>
> Acked-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160722/e25bfd42/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] gdsys: Drop print_fpga_state function
2016-06-02 18:54 ` Dirk Eibach
@ 2016-06-02 19:25 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-06-02 19:25 UTC (permalink / raw)
To: u-boot
On Thu, Jun 02, 2016 at 08:54:12PM +0200, Dirk Eibach wrote:
> Hi Tom,
>
> sorry for the delay, and thanks for keeping iocon alive :)
>
> 2016-06-02 16:05 GMT+02:00 Reinhard Pfau <reinhard.pfau@gdsys.cc>:
> ...
> >> diff --git a/board/gdsys/405ep/dlvision-10g.c
> >> b/board/gdsys/405ep/dlvision-10g.c
> >> index 54c7eb3..def4f9c 100644
> >> --- a/board/gdsys/405ep/dlvision-10g.c
> >> +++ b/board/gdsys/405ep/dlvision-10g.c
> >> @@ -109,7 +109,10 @@ static void print_fpga_info(unsigned dev)
> >> && !((hardware_version == HWVER_101)
> >> && (fpga_state == FPGA_STATE_DONE_FAILED))) {
> >> puts("not available\n");
> >> - print_fpga_state(dev);
> >> + if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
> >> + puts(" Waiting for FPGA-DONE timed out.\n");
> >> + if (gd->arch.fpga_state[dev] &
> >> FPGA_STATE_REFLECTION_FAILED)
> >> + puts(" FPGA reflection test failed.\n");
> >
> >
> > At this point the FPGA state is already available in the local var
> > "fpga_state".
> > So please replace "gd->arch.fpga_state[dev]" with just "fpga_state".
> >
> >> return;
> >> }
> >>
> > [...]
> >
>
> Apart from that
> Acked-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Will do, thanks guys!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160602/1a4fd503/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] gdsys: Drop print_fpga_state function
2016-06-02 14:05 ` Reinhard Pfau
@ 2016-06-02 18:54 ` Dirk Eibach
2016-06-02 19:25 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Dirk Eibach @ 2016-06-02 18:54 UTC (permalink / raw)
To: u-boot
Hi Tom,
sorry for the delay, and thanks for keeping iocon alive :)
2016-06-02 16:05 GMT+02:00 Reinhard Pfau <reinhard.pfau@gdsys.cc>:
...
>> diff --git a/board/gdsys/405ep/dlvision-10g.c
>> b/board/gdsys/405ep/dlvision-10g.c
>> index 54c7eb3..def4f9c 100644
>> --- a/board/gdsys/405ep/dlvision-10g.c
>> +++ b/board/gdsys/405ep/dlvision-10g.c
>> @@ -109,7 +109,10 @@ static void print_fpga_info(unsigned dev)
>> && !((hardware_version == HWVER_101)
>> && (fpga_state == FPGA_STATE_DONE_FAILED))) {
>> puts("not available\n");
>> - print_fpga_state(dev);
>> + if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
>> + puts(" Waiting for FPGA-DONE timed out.\n");
>> + if (gd->arch.fpga_state[dev] &
>> FPGA_STATE_REFLECTION_FAILED)
>> + puts(" FPGA reflection test failed.\n");
>
>
> At this point the FPGA state is already available in the local var
> "fpga_state".
> So please replace "gd->arch.fpga_state[dev]" with just "fpga_state".
>
>> return;
>> }
>>
> [...]
>
Apart from that
Acked-by: Dirk Eibach <dirk.eibach@gdsys.cc>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] gdsys: Drop print_fpga_state function
2016-01-13 23:12 [U-Boot] [PATCH] " Tom Rini
@ 2016-06-02 14:05 ` Reinhard Pfau
2016-06-02 18:54 ` Dirk Eibach
0 siblings, 1 reply; 6+ messages in thread
From: Reinhard Pfau @ 2016-06-02 14:05 UTC (permalink / raw)
To: u-boot
Hi Tom,
I think, Dirk had missed this message. Sorry for a late reply.
Inlining the func is basically OK.
But could you please make a little change at the inlined code (see
below)?
Beside this:
Acked-by: Reinhard Pfau <reinhard.pfau@gdsys.cc>
Greetings,
Reinhard.
On 2016-01-14 00:12, Tom Rini wrote:
[...]
> diff --git a/board/gdsys/405ep/dlvision-10g.c
> b/board/gdsys/405ep/dlvision-10g.c
> index 54c7eb3..def4f9c 100644
> --- a/board/gdsys/405ep/dlvision-10g.c
> +++ b/board/gdsys/405ep/dlvision-10g.c
> @@ -109,7 +109,10 @@ static void print_fpga_info(unsigned dev)
> && !((hardware_version == HWVER_101)
> && (fpga_state == FPGA_STATE_DONE_FAILED))) {
> puts("not available\n");
> - print_fpga_state(dev);
> + if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
> + puts(" Waiting for FPGA-DONE timed out.\n");
> + if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
> + puts(" FPGA reflection test failed.\n");
At this point the FPGA state is already available in the local var
"fpga_state".
So please replace "gd->arch.fpga_state[dev]" with just "fpga_state".
> return;
> }
>
[...]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] gdsys: Drop print_fpga_state function
@ 2016-01-13 23:12 Tom Rini
2016-06-02 14:05 ` Reinhard Pfau
0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2016-01-13 23:12 UTC (permalink / raw)
To: u-boot
On most platforms the print_fpga_state function is never called. Only
on dlvision-10g do we, so in that case inline it. Drop it from
everywhere else to avoid extra strings.
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
board/gdsys/405ep/405ep.c | 8 --------
board/gdsys/405ep/dlvision-10g.c | 5 ++++-
board/gdsys/405ex/405ex.c | 8 --------
board/gdsys/mpc8308/mpc8308.c | 8 --------
include/gdsys_fpga.h | 1 -
5 files changed, 4 insertions(+), 26 deletions(-)
diff --git a/board/gdsys/405ep/405ep.c b/board/gdsys/405ep/405ep.c
index 426dc05..35fa06a 100644
--- a/board/gdsys/405ep/405ep.c
+++ b/board/gdsys/405ep/405ep.c
@@ -31,14 +31,6 @@ int get_fpga_state(unsigned dev)
return gd->arch.fpga_state[dev];
}
-void print_fpga_state(unsigned dev)
-{
- if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
- puts(" Waiting for FPGA-DONE timed out.\n");
- if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
- puts(" FPGA reflection test failed.\n");
-}
-
int board_early_init_f(void)
{
unsigned k;
diff --git a/board/gdsys/405ep/dlvision-10g.c b/board/gdsys/405ep/dlvision-10g.c
index 54c7eb3..def4f9c 100644
--- a/board/gdsys/405ep/dlvision-10g.c
+++ b/board/gdsys/405ep/dlvision-10g.c
@@ -109,7 +109,10 @@ static void print_fpga_info(unsigned dev)
&& !((hardware_version == HWVER_101)
&& (fpga_state == FPGA_STATE_DONE_FAILED))) {
puts("not available\n");
- print_fpga_state(dev);
+ if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
+ puts(" Waiting for FPGA-DONE timed out.\n");
+ if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
+ puts(" FPGA reflection test failed.\n");
return;
}
diff --git a/board/gdsys/405ex/405ex.c b/board/gdsys/405ex/405ex.c
index c1a583f..9e1c57f 100644
--- a/board/gdsys/405ex/405ex.c
+++ b/board/gdsys/405ex/405ex.c
@@ -24,14 +24,6 @@ int get_fpga_state(unsigned dev)
return gd->arch.fpga_state[dev];
}
-void print_fpga_state(unsigned dev)
-{
- if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
- puts(" Waiting for FPGA-DONE timed out.\n");
- if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
- puts(" FPGA reflection test failed.\n");
-}
-
int board_early_init_f(void)
{
u32 val;
diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c
index 4338a33..1b8e035 100644
--- a/board/gdsys/mpc8308/mpc8308.c
+++ b/board/gdsys/mpc8308/mpc8308.c
@@ -31,14 +31,6 @@ int get_fpga_state(unsigned dev)
return gd->arch.fpga_state[dev];
}
-void print_fpga_state(unsigned dev)
-{
- if (gd->arch.fpga_state[dev] & FPGA_STATE_DONE_FAILED)
- puts(" Waiting for FPGA-DONE timed out.\n");
- if (gd->arch.fpga_state[dev] & FPGA_STATE_REFLECTION_FAILED)
- puts(" FPGA reflection test failed.\n");
-}
-
int board_early_init_f(void)
{
unsigned k;
diff --git a/include/gdsys_fpga.h b/include/gdsys_fpga.h
index 3b8762d..4ef4e09 100644
--- a/include/gdsys_fpga.h
+++ b/include/gdsys_fpga.h
@@ -17,7 +17,6 @@ enum {
};
int get_fpga_state(unsigned dev);
-void print_fpga_state(unsigned dev);
int fpga_set_reg(u32 fpga, u16 *reg, off_t regoff, u16 data);
int fpga_get_reg(u32 fpga, u16 *reg, off_t regoff, u16 *data);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-07-23 0:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15 19:51 [U-Boot] [PATCH] gdsys: Drop print_fpga_state function Tom Rini
2016-07-23 0:12 ` [U-Boot] " Tom Rini
-- strict thread matches above, loose matches on Subject: below --
2016-01-13 23:12 [U-Boot] [PATCH] " Tom Rini
2016-06-02 14:05 ` Reinhard Pfau
2016-06-02 18:54 ` Dirk Eibach
2016-06-02 19:25 ` Tom Rini
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.