[U-Boot] [PATCH] ARM: unbreak PXA build by defining UP2OCR

U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de --- include/asm-arm/arch-pxa/pxa-regs.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index a8d30e2..4f5e738 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h @@ -991,6 +991,7 @@ typedef void (*ExcpHndlr) (void) ; #define UHCHR __REG(0x4C000064) #define UHCHIE __REG(0x4C000068) #define UHCHIT __REG(0x4C00006C) +#define UP2OCR __REG(0x40600020)
#define UHCHR_FSBIR (1<<0) #define UHCHR_FHR (1<<1)

On Mon, May 04, 2009 at 12:34:01PM +0200, Daniel Mack wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de
Acked-by: Markus Klotzbuecher mk@denx.de
Best regards Markus

On 12:34 Mon 04 May , Daniel Mack wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de
NACK
UP2OCR is not avaaillable for the pxa2xx
we need to clean it really
Best Regards, J.

Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20090504120514.GD25959@game.jcrosoft.org you wrote:
On 12:34 Mon 04 May , Daniel Mack wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de
NACK
UP2OCR is not avaaillable for the pxa2xx
we need to clean it really
So who is going to do that, and when?
BTW - how many PXA platforms with USB support do we have, and how many of these are pxa2xx ?
In other words: should we not just apply the fix as it fixes a real problem now, and then fix a less urgent problem on other potetntially affected systems later?
Best regards,
Wolfgang Denk

On 20:40 Mon 04 May , Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20090504120514.GD25959@game.jcrosoft.org you wrote:
On 12:34 Mon 04 May , Daniel Mack wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de
NACK
UP2OCR is not avaaillable for the pxa2xx
we need to clean it really
So who is going to do that, and when?
BTW - how many PXA platforms with USB support do we have, and how many of these are pxa2xx ?
the usb driver use the same file for supporting all the PXA and as it's store in a generic header. We must define the register only the specific pxa version and when the same register could mean differents things depending the pxa version
Best Regards, J.

Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20090504224128.GF13923@game.jcrosoft.org you wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de
NACK
UP2OCR is not avaaillable for the pxa2xx
we need to clean it really
So who is going to do that, and when?
BTW - how many PXA platforms with USB support do we have, and how many of these are pxa2xx ?
the usb driver use the same file for supporting all the PXA and as it's store in a generic header. We must define the register only the specific pxa version and when the same register could mean differents things depending the pxa version
That's the theory. Praxis is that we have a bug, and we need a fix. And we seem to have one.
You did not answer my questiosn:
- how many PXA platforms with USB support do we have? - how many of these are pxa2xx?
In other words - is your concern a real problem, or just a theoretical one?
As far as I can tell, "delta" is the only PXA based board which has USB enabled. And this is not a pxa2xx.
As mentioned before, I'd rather see a quick fix for a real build problem now, instead of waiting for a perfect solution that is mostly of theoretical interest which comes much later.
Best regards,
Wolfgang Denk

On 00:58 Tue 05 May , Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20090504224128.GF13923@game.jcrosoft.org you wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de
NACK
UP2OCR is not avaaillable for the pxa2xx
we need to clean it really
So who is going to do that, and when?
BTW - how many PXA platforms with USB support do we have, and how many of these are pxa2xx ?
the usb driver use the same file for supporting all the PXA and as it's store in a generic header. We must define the register only the specific pxa version and when the same register could mean differents things depending the pxa version
That's the theory. Praxis is that we have a bug, and we need a fix. And we seem to have one.
You did not answer my questiosn:
- how many PXA platforms with USB support do we have?
nomahans and pxa27x IIRC for usb host
- how many of these are pxa2xx?
IIRC trizepsiv but other HW (mainline) can activate it also evenif they do not actually by default
In other words - is your concern a real problem, or just a theoretical one?
yes a real problem because you will have to deal with is latter anyway and it will take hours to debug. So do a quick dirty fix will not improve the situation at the end.
Also define a register the pxa specific is alread the principle fallow in this header
As far as I can tell, "delta" is the only PXA based board which has USB enabled. And this is not a pxa2xx.
which not mean that we do support the pxa2xx usb (trizepsiv)
Best Regards, J.

On Tue, May 05, 2009 at 12:58:57AM +0200, Wolfgang Denk wrote:
the usb driver use the same file for supporting all the PXA and as it's store in a generic header. We must define the register only the specific pxa version and when the same register could mean differents things depending the pxa version
That's the theory. Praxis is that we have a bug, and we need a fix. And we seem to have one.
Correct. It does not build anymore. Another possibility is to revert the commit which caused the trouble and make Markus Klotzbuecher fix it in a way Jean-Christophe PLAGNIOL-VILLARD likes.
- how many PXA platforms with USB support do we have?
That's not the point. I for myself won't bring my board support into U-Boot's mainline (at least not now) because that would help nobody as nobody except for me has the hardware the code was written for. And I guess I'm not the only one.
IMO hings should compile, even when the config for this is not in your repository; hope you agree.
In other words - is your concern a real problem, or just a theoretical one?
Code using that macro is guarded by MONAHANS #ifdefs anyway, his point is solely not to have it in the register headers.
Daniel

Dear Daniel Mack,
In message 20090505101606.GD22117@buzzloop.caiaq.de you wrote:
Correct. It does not build anymore. Another possibility is to revert the commit which caused the trouble and make Markus Klotzbuecher fix it in a way Jean-Christophe PLAGNIOL-VILLARD likes.
We will not do that.
- how many PXA platforms with USB support do we have?
That's not the point. I for myself won't bring my board support into U-Boot's mainline (at least not now) because that would help nobody as nobody except for me has the hardware the code was written for. And I guess I'm not the only one.
Well, that is your decision. But if you chose your place intentionally outside the community that you should not be surprised if you only receive pretty limited support from that community either.
IMO hings should compile, even when the config for this is not in your repository; hope you agree.
No, I disagree. I don't care at all about any out-of-tree ports that might exist anywhere. I will not waste any thoughts about the eventual possibility that changes to the mainline U-Boot code might cause problems in such out-of-tree ports. That's not our problem.
In other words - is your concern a real problem, or just a theoretical one?
Code using that macro is guarded by MONAHANS #ifdefs anyway, his point is solely not to have it in the register headers.
...where it could be protected by a similar #ifdef, so I really don't see where the problem is.
Best regards,
Wolfgang Denk

On Tue, May 05, 2009 at 12:28:33PM +0200, Wolfgang Denk wrote:
That's not the point. I for myself won't bring my board support into U-Boot's mainline (at least not now) because that would help nobody as nobody except for me has the hardware the code was written for. And I guess I'm not the only one.
Well, that is your decision. But if you chose your place intentionally outside the community that you should not be surprised if you only receive pretty limited support from that community either.
Well, I was just talking about the config itself - I _do_ merge everything else upstream.
IMO hings should compile, even when the config for this is not in your repository; hope you agree.
No, I disagree. I don't care at all about any out-of-tree ports that might exist anywhere. I will not waste any thoughts about the eventual possibility that changes to the mainline U-Boot code might cause problems in such out-of-tree ports. That's not our problem.
What we're facing here is a clear build breakage that occurs in a combination of valid configuration flags. It's not an out-of-tree port. I was just reporting that in order to help other who might face a similar problem.
In other words - is your concern a real problem, or just a theoretical one?
Code using that macro is guarded by MONAHANS #ifdefs anyway, his point is solely not to have it in the register headers.
...where it could be protected by a similar #ifdef, so I really don't see where the problem is.
Me neither.
Daniel

U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Markus Klotzbuecher mk@denx.de --- include/asm-arm/arch-pxa/pxa-regs.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index a8d30e2..5a0885a 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h @@ -992,6 +992,10 @@ typedef void (*ExcpHndlr) (void) ; #define UHCHIE __REG(0x4C000068) #define UHCHIT __REG(0x4C00006C)
+#if defined(CONFIG_CPU_MONAHANS) +#define UP2OCR __REG(0x40600020) +#endif + #define UHCHR_FSBIR (1<<0) #define UHCHR_FHR (1<<1) #define UHCHR_CGR (1<<2)

On 12:48 Tue 05 May , Daniel Mack wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
unfortunatly it's the invert this commit remove it
please fix the comment otherwise ok
Best Regards, J.

Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20090507203647.GA3302@game.jcrosoft.org you wrote:
On 12:48 Tue 05 May , Daniel Mack wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
unfortunatly it's the invert this commit remove it
please fix the comment
Can you please run a "git show 24e37645" again?
To me it seems that this commit
- removed the usage of UP2OCR from board/delta/delta.c but also - added the usage of UP2OCR to the new file cpu/pxa/usb.c without defining it.
So the comment seems absolutely correct to me. Maybe I'm missing something?
Best regards,
Wolfgang Denk

On 23:00 Thu 07 May , Wolfgang Denk wrote:
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message 20090507203647.GA3302@game.jcrosoft.org you wrote:
On 12:48 Tue 05 May , Daniel Mack wrote:
U-Boot does not currently build for PXA platforms with USB support enabled. This is due to commit 24e37645e7378b20fa8f20e2996c8fb8e9 which introduced the usage of UP2OCR without defining it.
unfortunatly it's the invert this commit remove it
please fix the comment
Can you please run a "git show 24e37645" again?
To me it seems that this commit
- removed the usage of UP2OCR from board/delta/delta.c
but also
- added the usage of UP2OCR to the new file cpu/pxa/usb.c
without defining it.
So the comment seems absolutely correct to me. Maybe I'm missing something?
It's me I mix the commit this commit 3ccbfb25f48a:Support for PXA27X UDC. brake the pxa support by removing the UP2OCR
Best Regards, J.

On Thu, May 07, 2009 at 11:02:34PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
Can you please run a "git show 24e37645" again?
To me it seems that this commit
- removed the usage of UP2OCR from board/delta/delta.c
but also
- added the usage of UP2OCR to the new file cpu/pxa/usb.c
without defining it.
So the comment seems absolutely correct to me. Maybe I'm missing something?
It's me I mix the commit this commit 3ccbfb25f48a:Support for PXA27X UDC. brake the pxa support by removing the UP2OCR
I was just running 'git blame' on the file that broke the build and pointed out the commit that added the line that made the trouble. I don't see what shouldn't be correct about that?
Anyway, feel free to change the commit log if you like, I don't care. Most important thing is that things get fixed.
Thanks, Daniel

Dear Daniel Mack,
In message 20090505103623.GE22117@buzzloop.caiaq.de you wrote:
No, I disagree. I don't care at all about any out-of-tree ports that might exist anywhere. I will not waste any thoughts about the eventual possibility that changes to the mainline U-Boot code might cause problems in such out-of-tree ports. That's not our problem.
What we're facing here is a clear build breakage that occurs in a combination of valid configuration flags. It's not an out-of-tree port.
We don't test all possible combinations of valid configuration flags. As long as nobody is affected, there is little urge to move.
But here the situation is different: it does affect an actual board which is in mainline:
-> ./MAKEALL delta Configuring for delta board... usb.c: In function 'usb_cpu_init': usb.c:46: error: 'UP2OCR' undeclared (first use in this function) usb.c:46: error: (Each undeclared identifier is reported only once usb.c:46: error: for each function it appears in.) make[1]: *** [usb.o] Error 1
I was just reporting that in order to help other who might face a similar problem.
I understand this, and I appreciate your help.
I just wanted to point out some limitations that affect code or configurations that are not in mainline.
Best regards,
Wolfgang Denk

On Tue, May 05, 2009 at 12:16:06PM +0200, Daniel Mack wrote:
On Tue, May 05, 2009 at 12:58:57AM +0200, Wolfgang Denk wrote:
the usb driver use the same file for supporting all the PXA and as it's store in a generic header. We must define the register only the specific pxa version and when the same register could mean differents things depending the pxa version
That's the theory. Praxis is that we have a bug, and we need a fix. And we seem to have one.
Correct. It does not build anymore. Another possibility is to revert the commit which caused the trouble and make Markus Klotzbuecher fix it in a way Jean-Christophe PLAGNIOL-VILLARD likes.
You and which army are going to *make* me do something?
Markus
participants (4)
-
Daniel Mack
-
Jean-Christophe PLAGNIOL-VILLARD
-
Markus Klotzbücher
-
Wolfgang Denk