diff mbox

[U-Boot,v2,1/2] ftpmu010: support faraday ftpmu010 driver

Message ID AANLkTintH9NgCQnYMpXm--oXzANpuAwEw2+fXT+eB486@mail.gmail.com
State Superseded
Headers show

Commit Message

Macpaul Lin Feb. 16, 2011, 7:58 a.m. UTC
Hi Po-Yu and Wolfgang,

2011/2/16 Po-Yu Chuang <ratbert.chuang@gmail.com>
>
> Actually, I am done with the fix (move ftpmu010.h to include/ and add
> declarations).
> I can submit the patch. Just want to know if you think it is appropriate.
>

As you can see, the include of PMU header has been replaced to a correct path.
[U-Boot,2/3] fttmr010: move fttmr010 controller to drivers/timer folder
http://patchwork.ozlabs.org/patch/71952/

However, I cannot found the part of previous patch [U-Boot,1/3]
You can find that I have replace a correct path to the file
"arch/arm/cpu/arm920t/a320/timer.c" which haven't been applied.
http://www.mail-archive.com/u-boot@lists.denx.de/msg41320.html

Wolfgang, could you please check if something have been missing in the
last git apply?
It looks like that we have something missed in the current tree while
this patch have been already applied
"http://www.mail-archive.com/u-boot@lists.denx.de/msg41320.html".

The missing part is the following patch.

Po-Yu,
Yes, there are also another patches waiting to be review and be applied.
ftpmu010: fix relocation and enhance features
http://patchwork.ozlabs.org/patch/77704/

>
> >> I am trying to fix arch/arm/cpu/arm920t/a320/timer.c, but I cannot
> >> access the new API now.
>
> regards,
> Po-Yu Chuang



--
Best regards,
Macpaul Lin

Comments

Po-Yu Chuang Feb. 16, 2011, 9:10 a.m. UTC | #1
Hi Macpaul,

On Wed, Feb 16, 2011 at 3:58 PM, Macpaul Lin <macpaul@gmail.com> wrote:
>
> As you can see, the include of PMU header has been replaced to a correct path.
> [U-Boot,2/3] fttmr010: move fttmr010 controller to drivers/timer folder
> http://patchwork.ozlabs.org/patch/71952/
>
> However, I cannot found the part of previous patch [U-Boot,1/3]
> You can find that I have replace a correct path to the file
> "arch/arm/cpu/arm920t/a320/timer.c" which haven't been applied.
> http://www.mail-archive.com/u-boot@lists.denx.de/msg41320.html
>
> Wolfgang, could you please check if something have been missing in the
> last git apply?
> It looks like that we have something missed in the current tree while
> this patch have been already applied
> "http://www.mail-archive.com/u-boot@lists.denx.de/msg41320.html".
>
> The missing part is the following patch.
> diff --git a/arch/arm/cpu/arm920t/a320/timer.c
> b/arch/arm/cpu/arm920t/a320/timer.c
> index d2e316f..4718ae6 100644
> --- a/arch/arm/cpu/arm920t/a320/timer.c
> +++ b/arch/arm/cpu/arm920t/a320/timer.c
> @@ -19,7 +19,7 @@
>
>  #include <common.h>
>  #include <asm/io.h>
> -#include <asm/arch/ftpmu010.h>
> +#include "../../../../../drivers/power/ftpmu010.h"
>  #include <asm/arch/fttmr010.h>
>
>  static ulong timestamp;

If I remember correctly, this patch was not applied
because Wolfgang does not like the include "../../../..".

> Po-Yu,
> Yes, there are also another patches waiting to be review and be applied.
> ftpmu010: fix relocation and enhance features
> http://patchwork.ozlabs.org/patch/77704/

This patch doesn't seem to affect a320.

Since I have a patch to fix the current (compilation) problem,
I'll send it to RFC.

regards,
Po-Yu Chuang
Macpaul Lin Feb. 16, 2011, 9:19 a.m. UTC | #2
Hi Po-Yu,

2011/2/16 Po-Yu Chuang <ratbert.chuang@gmail.com>:
> Hi Macpaul,
>
> On Wed, Feb 16, 2011 at 3:58 PM, Macpaul Lin <macpaul@gmail.com> wrote:
>>
>> As you can see, the include of PMU header has been replaced to a correct path.
>> [U-Boot,2/3] fttmr010: move fttmr010 controller to drivers/timer folder
>> http://patchwork.ozlabs.org/patch/71952/
>>
>> However, I cannot found the part of previous patch [U-Boot,1/3]
>> You can find that I have replace a correct path to the file
>> "arch/arm/cpu/arm920t/a320/timer.c" which haven't been applied.
>> http://www.mail-archive.com/u-boot@lists.denx.de/msg41320.html
>>
>> Wolfgang, could you please check if something have been missing in the
>> last git apply?
>> It looks like that we have something missed in the current tree while
>> this patch have been already applied
>> "http://www.mail-archive.com/u-boot@lists.denx.de/msg41320.html".
>>
>> The missing part is the following patch.
>> diff --git a/arch/arm/cpu/arm920t/a320/timer.c
>> b/arch/arm/cpu/arm920t/a320/timer.c
>> index d2e316f..4718ae6 100644
>> --- a/arch/arm/cpu/arm920t/a320/timer.c
>> +++ b/arch/arm/cpu/arm920t/a320/timer.c
>> @@ -19,7 +19,7 @@
>>
>>  #include <common.h>
>>  #include <asm/io.h>
>> -#include <asm/arch/ftpmu010.h>
>> +#include "../../../../../drivers/power/ftpmu010.h"
>>  #include <asm/arch/fttmr010.h>
>>
>>  static ulong timestamp;
>
> If I remember correctly, this patch was not applied
> because Wolfgang does not like the include "../../../..".

Yes.
However, I also found there exists similar include format in other SoC.
Even you put drivers for all common IP still have the same problem.

For example, like some SoCs will use the drivers in "board/Marvell/common/".
If you want to use the API inside "board/Marvell/common/",
the code will looks like "include ../../board/Marvell/common".

>> Po-Yu,
>> Yes, there are also another patches waiting to be review and be applied.
>> ftpmu010: fix relocation and enhance features
>> http://patchwork.ozlabs.org/patch/77704/
>
> This patch doesn't seem to affect a320.
>
> Since I have a patch to fix the current (compilation) problem,
> I'll send it to RFC.

Just one comment,
I think you can put it into folder "include/faraday"
I have discussed with Wolfgang about collecting the faraday header
files together before.
This should be better for future driver releasement.

> regards,
> Po-Yu Chuang
>
Wolfgang Denk Feb. 16, 2011, 10:49 a.m. UTC | #3
Dear Po-Yu Chuang,

In message <AANLkTin5Od4_3W+YPTNP5tJAXKcayg+bjmdPP=+vi5so@mail.gmail.com> you wrote:
> 
> > -#include <asm/arch/ftpmu010.h>
> > +#include "../../../../../drivers/power/ftpmu010.h"
> >  #include <asm/arch/fttmr010.h>
> >
> >  static ulong timestamp;
> 
> If I remember correctly, this patch was not applied
> because Wolfgang does not like the include "../../../..".

Correct.

Best regards,

Wolfgang Denk
Wolfgang Denk Feb. 16, 2011, 10:52 a.m. UTC | #4
Dear Macpaul Lin,

In message <AANLkTin8iSrcnAQ8hgNjdTgOa9uLeiCm7murDjz2z_JU@mail.gmail.com> you wrote:
> 
> > If I remember correctly, this patch was not applied
> > because Wolfgang does not like the include "../../../..".
> 
> Yes.
> However, I also found there exists similar include format in other SoC.
> Even you put drivers for all common IP still have the same problem.

Bad examples is not an excuse for adding more bad code. Bad code may
slip through a review, and sometimes it takes a while until we
understand what is god or what is bad.

But when we notice it, we reject it.



Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/arm/cpu/arm920t/a320/timer.c
b/arch/arm/cpu/arm920t/a320/timer.c
index d2e316f..4718ae6 100644
--- a/arch/arm/cpu/arm920t/a320/timer.c
+++ b/arch/arm/cpu/arm920t/a320/timer.c
@@ -19,7 +19,7 @@ 

 #include <common.h>
 #include <asm/io.h>
-#include <asm/arch/ftpmu010.h>
+#include "../../../../../drivers/power/ftpmu010.h"
 #include <asm/arch/fttmr010.h>

 static ulong timestamp;