* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
@ 2009-06-16 20:06 Richard Retanubun
2009-06-16 20:20 ` Ben Warren
0 siblings, 1 reply; 9+ messages in thread
From: Richard Retanubun @ 2009-06-16 20:06 UTC (permalink / raw)
To: u-boot
Hi,
Since rebasing to 2009.06 release, I have been getting this compiler warning
cpu.c: In function 'cpu_eth_init':
cpu.c:372: warning: implicit declaration of function 'uec_standard_init'
It is declared in /drivers/qe/uec.h, crude hacks at including the header causes even more errors:
In file included from cpu.c:35:
../../drivers/qe/uec.h:699: error: expected specifier-qualifier-list before 'ucc_fast_info_t'
../../drivers/qe/uec.h:722: error: expected specifier-qualifier-list before 'ucc_fast_private_t'
In file included from cpu.c:37:
/home/richardretanubun/workspace/u-boot/include/netdev.h:75: error: conflicting types for 'uec_initialize'
../../drivers/qe/uec.h:764: error: previous declaration of 'uec_initialize' was here
make[1]: *** [cpu.o] Error 1
make: *** [cpu/mpc83xx/libmpc83xx.a] Error 2
The side effect I see so far is that the network interface can be used once (say for tftp) but fails after that.
is there a patch missing for cpu.c?
- Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-16 20:06 [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init' Richard Retanubun
@ 2009-06-16 20:20 ` Ben Warren
2009-06-16 20:29 ` Richard Retanubun
0 siblings, 1 reply; 9+ messages in thread
From: Ben Warren @ 2009-06-16 20:20 UTC (permalink / raw)
To: u-boot
Hi Richard,
Richard Retanubun wrote:
> Hi,
>
> Since rebasing to 2009.06 release, I have been getting this compiler warning
>
> cpu.c: In function 'cpu_eth_init':
> cpu.c:372: warning: implicit declaration of function 'uec_standard_init'
>
> It is declared in /drivers/qe/uec.h, crude hacks at including the header causes even more errors:
>
> In file included from cpu.c:35:
> ../../drivers/qe/uec.h:699: error: expected specifier-qualifier-list before 'ucc_fast_info_t'
> ../../drivers/qe/uec.h:722: error: expected specifier-qualifier-list before 'ucc_fast_private_t'
> In file included from cpu.c:37:
> /home/richardretanubun/workspace/u-boot/include/netdev.h:75: error: conflicting types for 'uec_initialize'
> ../../drivers/qe/uec.h:764: error: previous declaration of 'uec_initialize' was here
> make[1]: *** [cpu.o] Error 1
> make: *** [cpu/mpc83xx/libmpc83xx.a] Error 2
>
> The side effect I see so far is that the network interface can be used once (say for tftp) but fails after that.
>
> is there a patch missing for cpu.c?
>
> - Richard
>
Looks like some networking code snuck in through the back door:
http://git.denx.de/?p=u-boot.git;a=commit;h=8e55258f144764de8902e9f078a7ad4c6c022c2f
include/netdev.h should contain the definitive public API for device
initialization.
Does removing '#include "netdev.h' in cpu.c fix it?
regards,
Ben
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-16 20:20 ` Ben Warren
@ 2009-06-16 20:29 ` Richard Retanubun
2009-06-16 20:33 ` Ben Warren
0 siblings, 1 reply; 9+ messages in thread
From: Richard Retanubun @ 2009-06-16 20:29 UTC (permalink / raw)
To: u-boot
Ben Warren wrote:
> Hi Richard,
[snip]
> Looks like some networking code snuck in through the back door:
>
> http://git.denx.de/?p=u-boot.git;a=commit;h=8e55258f144764de8902e9f078a7ad4c6c022c2f
>
>
> include/netdev.h should contain the definitive public API for device
> initialization.
>
> Does removing '#include "netdev.h' in cpu.c fix it?
Hi Ben,
Thanks for the quick reply :)
If by '#include "netdev.h' in cpu.c you mean this:
diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
index c4331ae..dc463aa 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -33,7 +33,8 @@
#include <asm/processor.h>
#include <libfdt.h>
#include <tsec.h>
-#include <netdev.h>
+#include "../../drivers/qe/uec.h"
#include <fsl_esdhc.h>
#ifdef CONFIG_BOOTCOUNT_LIMIT
#include <asm/immap_qe.h>
Then no (well, it does fix the conflicting declaration of uec_initialize between uec.h and netdev.h) but the error of:
In file included from cpu.c:36:
../../drivers/qe/uec.h:699: error: expected specifier-qualifier-list before 'ucc_fast_info_t'
../../drivers/qe/uec.h:722: error: expected specifier-qualifier-list before 'ucc_fast_private_t'
make[1]: *** [cpu.o] Error 1
make: *** [cpu/mpc83xx/libmpc83xx.a] Error 2
Still remains.
- Richard
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-16 20:29 ` Richard Retanubun
@ 2009-06-16 20:33 ` Ben Warren
2009-06-16 20:50 ` Richard Retanubun
0 siblings, 1 reply; 9+ messages in thread
From: Ben Warren @ 2009-06-16 20:33 UTC (permalink / raw)
To: u-boot
Hi Richard,
Richard Retanubun wrote:
> Ben Warren wrote:
>> Hi Richard,
> [snip]
>> Looks like some networking code snuck in through the back door:
>>
>> http://git.denx.de/?p=u-boot.git;a=commit;h=8e55258f144764de8902e9f078a7ad4c6c022c2f
>>
>>
>> include/netdev.h should contain the definitive public API for device
>> initialization.
>>
>> Does removing '#include "netdev.h' in cpu.c fix it?
>
> Hi Ben,
>
> Thanks for the quick reply :)
Just sitting in my cube, waiting for a compile to finish :)
>
> If by '#include "netdev.h' in cpu.c you mean this:
>
> diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
> index c4331ae..dc463aa 100644
> --- a/cpu/mpc83xx/cpu.c
> +++ b/cpu/mpc83xx/cpu.c
> @@ -33,7 +33,8 @@
> #include <asm/processor.h>
> #include <libfdt.h>
> #include <tsec.h>
> -#include <netdev.h>
> +#include "../../drivers/qe/uec.h"
> #include <fsl_esdhc.h>
> #ifdef CONFIG_BOOTCOUNT_LIMIT
> #include <asm/immap_qe.h>
>
> Then no (well, it does fix the conflicting declaration of
> uec_initialize between uec.h and netdev.h) but the error of:
>
> In file included from cpu.c:36:
> ../../drivers/qe/uec.h:699: error: expected specifier-qualifier-list
> before 'ucc_fast_info_t'
> ../../drivers/qe/uec.h:722: error: expected specifier-qualifier-list
> before 'ucc_fast_private_t'
> make[1]: *** [cpu.o] Error 1
> make: *** [cpu/mpc83xx/libmpc83xx.a] Error 2
>
> Still remains.
>
> - Richard
>
How about removing the include "netdev.h" and adding:
extern int uec_standard_init(bd_t *bis);
IMHO this submission should be backed out - it looks like it wasn't
properly baked.
regards,
Ben
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-16 20:33 ` Ben Warren
@ 2009-06-16 20:50 ` Richard Retanubun
2009-06-16 21:16 ` Kumar Gala
2009-06-17 13:22 ` Kumar Gala
0 siblings, 2 replies; 9+ messages in thread
From: Richard Retanubun @ 2009-06-16 20:50 UTC (permalink / raw)
To: u-boot
[snip]
> How about removing the include "netdev.h" and adding:
>
> extern int uec_standard_init(bd_t *bis);
>
D'oh!
diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
index c4331ae..f29b848 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -33,13 +33,14 @@
#include <asm/processor.h>
#include <libfdt.h>
#include <tsec.h>
-#include <netdev.h>
#include <fsl_esdhc.h>
#ifdef CONFIG_BOOTCOUNT_LIMIT
#include <asm/immap_qe.h>
#include <asm/io.h>
#endif
+extern int uec_standard_init(bd_t *bis);
+
DECLARE_GLOBAL_DATA_PTR;
int checkcpu(void)
Yeah, this works (if we want to patch it, better do it for the cpu/mpc85xx/cpu.c also though) :)
> IMHO this submission should be backed out - it looks like it wasn't properly baked.
I'll let you make the call on that, the patch does introduce a nice cleanup on a
problem I've compounded in the past so I am quite grateful for it.
- Richard
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-16 20:50 ` Richard Retanubun
@ 2009-06-16 21:16 ` Kumar Gala
2009-06-17 12:27 ` Richard Retanubun
2009-06-17 13:22 ` Kumar Gala
1 sibling, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2009-06-16 21:16 UTC (permalink / raw)
To: u-boot
On Jun 16, 2009, at 3:50 PM, Richard Retanubun wrote:
> [snip]
>> How about removing the include "netdev.h" and adding:
>>
>> extern int uec_standard_init(bd_t *bis);
>>
> D'oh!
>
> diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
> index c4331ae..f29b848 100644
> --- a/cpu/mpc83xx/cpu.c
> +++ b/cpu/mpc83xx/cpu.c
> @@ -33,13 +33,14 @@
> #include <asm/processor.h>
> #include <libfdt.h>
> #include <tsec.h>
> -#include <netdev.h>
> #include <fsl_esdhc.h>
> #ifdef CONFIG_BOOTCOUNT_LIMIT
> #include <asm/immap_qe.h>
> #include <asm/io.h>
> #endif
>
> +extern int uec_standard_init(bd_t *bis);
> +
> DECLARE_GLOBAL_DATA_PTR;
>
> int checkcpu(void)
>
>
> Yeah, this works (if we want to patch it, better do it for the cpu/
> mpc85xx/cpu.c also though) :)
>
>> IMHO this submission should be backed out - it looks like it wasn't
>> properly baked.
>
> I'll let you make the call on that, the patch does introduce a nice
> cleanup on a
> problem I've compounded in the past so I am quite grateful for it.
This is my bad.. I hope this patch isn't actually in v2009.06. (it
wasn't intended to be).
- k
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-16 21:16 ` Kumar Gala
@ 2009-06-17 12:27 ` Richard Retanubun
2009-06-17 13:15 ` Kumar Gala
0 siblings, 1 reply; 9+ messages in thread
From: Richard Retanubun @ 2009-06-17 12:27 UTC (permalink / raw)
To: u-boot
Kumar Gala wrote:
>
> On Jun 16, 2009, at 3:50 PM, Richard Retanubun wrote:
>
>> [snip]
>>> How about removing the include "netdev.h" and adding:
>>>
>>> extern int uec_standard_init(bd_t *bis);
>>>
>> D'oh!
>>
>> diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
>> index c4331ae..f29b848 100644
>> --- a/cpu/mpc83xx/cpu.c
>> +++ b/cpu/mpc83xx/cpu.c
>> @@ -33,13 +33,14 @@
>> #include <asm/processor.h>
>> #include <libfdt.h>
>> #include <tsec.h>
>> -#include <netdev.h>
>> #include <fsl_esdhc.h>
>> #ifdef CONFIG_BOOTCOUNT_LIMIT
>> #include <asm/immap_qe.h>
>> #include <asm/io.h>
>> #endif
>>
>> +extern int uec_standard_init(bd_t *bis);
>> +
>> DECLARE_GLOBAL_DATA_PTR;
>>
>> int checkcpu(void)
>>
>>
>> Yeah, this works (if we want to patch it, better do it for the
>> cpu/mpc85xx/cpu.c also though) :)
>>
>>> IMHO this submission should be backed out - it looks like it wasn't
>>> properly baked.
>>
>> I'll let you make the call on that, the patch does introduce a nice
>> cleanup on a
>> problem I've compounded in the past so I am quite grateful for it.
>
> This is my bad.. I hope this patch isn't actually in v2009.06. (it
> wasn't intended to be).
>
> - k
Not sure if it is my turn to answer, but this is in v2009.06, as Ben stated before,
http://git.denx.de/?p=u-boot.git;a=commit;h=8e55258f144764de8902e9f078a7ad4c6c022c2f
- R
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-17 12:27 ` Richard Retanubun
@ 2009-06-17 13:15 ` Kumar Gala
0 siblings, 0 replies; 9+ messages in thread
From: Kumar Gala @ 2009-06-17 13:15 UTC (permalink / raw)
To: u-boot
On Jun 17, 2009, at 7:27 AM, Richard Retanubun wrote:
> Kumar Gala wrote:
>> On Jun 16, 2009, at 3:50 PM, Richard Retanubun wrote:
>>> [snip]
>>>> How about removing the include "netdev.h" and adding:
>>>>
>>>> extern int uec_standard_init(bd_t *bis);
>>>>
>>> D'oh!
>>>
>>> diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
>>> index c4331ae..f29b848 100644
>>> --- a/cpu/mpc83xx/cpu.c
>>> +++ b/cpu/mpc83xx/cpu.c
>>> @@ -33,13 +33,14 @@
>>> #include <asm/processor.h>
>>> #include <libfdt.h>
>>> #include <tsec.h>
>>> -#include <netdev.h>
>>> #include <fsl_esdhc.h>
>>> #ifdef CONFIG_BOOTCOUNT_LIMIT
>>> #include <asm/immap_qe.h>
>>> #include <asm/io.h>
>>> #endif
>>>
>>> +extern int uec_standard_init(bd_t *bis);
>>> +
>>> DECLARE_GLOBAL_DATA_PTR;
>>>
>>> int checkcpu(void)
>>>
>>>
>>> Yeah, this works (if we want to patch it, better do it for the cpu/
>>> mpc85xx/cpu.c also though) :)
>>>
>>>> IMHO this submission should be backed out - it looks like it
>>>> wasn't properly baked.
>>>
>>> I'll let you make the call on that, the patch does introduce a
>>> nice cleanup on a
>>> problem I've compounded in the past so I am quite grateful for it.
>> This is my bad.. I hope this patch isn't actually in v2009.06. (it
>> wasn't intended to be).
>> - k
>
> Not sure if it is my turn to answer, but this is in v2009.06, as Ben
> stated before,
>
> http://git.denx.de/?p=u-boot.git;a=commit;h=8e55258f144764de8902e9f078a7ad4c6c022c2f
I don't see this commit in v2009.06. I think you are seeing the fact
that the pull of next makes it appear as if its v2009.06
- k
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init'
2009-06-16 20:50 ` Richard Retanubun
2009-06-16 21:16 ` Kumar Gala
@ 2009-06-17 13:22 ` Kumar Gala
1 sibling, 0 replies; 9+ messages in thread
From: Kumar Gala @ 2009-06-17 13:22 UTC (permalink / raw)
To: u-boot
On Jun 16, 2009, at 3:50 PM, Richard Retanubun wrote:
> [snip]
>> How about removing the include "netdev.h" and adding:
>>
>> extern int uec_standard_init(bd_t *bis);
>>
> D'oh!
>
> diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
> index c4331ae..f29b848 100644
> --- a/cpu/mpc83xx/cpu.c
> +++ b/cpu/mpc83xx/cpu.c
> @@ -33,13 +33,14 @@
> #include <asm/processor.h>
> #include <libfdt.h>
> #include <tsec.h>
> -#include <netdev.h>
> #include <fsl_esdhc.h>
> #ifdef CONFIG_BOOTCOUNT_LIMIT
> #include <asm/immap_qe.h>
> #include <asm/io.h>
> #endif
>
> +extern int uec_standard_init(bd_t *bis);
> +
> DECLARE_GLOBAL_DATA_PTR;
>
> int checkcpu(void)
>
>
> Yeah, this works (if we want to patch it, better do it for the cpu/
> mpc85xx/cpu.c also though) :)
>
>> IMHO this submission should be backed out - it looks like it wasn't
>> properly baked.
>
> I'll let you make the call on that, the patch does introduce a nice
> cleanup on a
> problem I've compounded in the past so I am quite grateful for it.
I've posted a patch which I think address the issue.
- k
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-06-17 13:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-16 20:06 [U-Boot] 83xx 85xx: UEC: Implicit declaration of function 'uec_standard_init' Richard Retanubun
2009-06-16 20:20 ` Ben Warren
2009-06-16 20:29 ` Richard Retanubun
2009-06-16 20:33 ` Ben Warren
2009-06-16 20:50 ` Richard Retanubun
2009-06-16 21:16 ` Kumar Gala
2009-06-17 12:27 ` Richard Retanubun
2009-06-17 13:15 ` Kumar Gala
2009-06-17 13:22 ` Kumar Gala
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.