Re: [U-Boot] [PATCH RFCv2 0/6] Beginning of migration of MPC8xx to DM model

2018-05-04 Thread Joakim Tjernlund
On Fri, 2018-05-04 at 12:33 +0200, Christophe LEROY wrote:
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open attachments unless you recognize the sender and know the 
> content is safe.
> 
> 
> Hi Mario,
> 
> Le 04/05/2018 à 11:56, Mario Six a écrit :
> > Hi Christophe,
> > 
> > On Fri, May 4, 2018 at 7:20 AM, Christophe LEROY
> >  wrote:
> > > Hello,
> > > 
> > > 
> > > Le 16/03/2018 à 17:32, Christophe Leroy a écrit :
> > > > 
> > > > This serie is the beginning of MPC8xx migration to DM model.
> > > 
> > > 
> > > I didn't get any feedback on this serie. I don't feel totally confortable 
> > > as
> > > it is my first implementation of DM and also the first time powerpc uses 
> > > DT
> > > for U-boot.
> > > 
> > > I'd rather someone look at it.
> > > 
> > 
> > One thing I'm noticing: Are you setting up pre-relocation malloc? Since 
> > MPC8xx
> > is another old powerpc platform, I suspect that the start.S doesn't do it, 
> > and
> > DM needs it to function correctly.
> 
> Yes, I did it with the following patch:
> 
> https://patchwork.ozlabs.org/patch/886980/

Hi 

Had a quick look at that patch and it looks like you lost zeroing the
stack frame (stwu   r0, -4(r1) ...) ?

Also, don't use touch r1 until the stack is ready, otherwise gdb will
try accessing the stack if you single step over this part.

 Jocke
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH RFCv2 0/6] Beginning of migration of MPC8xx to DM model

2018-05-04 Thread Christophe LEROY

Hi Mario,

Le 04/05/2018 à 11:56, Mario Six a écrit :

Hi Christophe,

On Fri, May 4, 2018 at 7:20 AM, Christophe LEROY
 wrote:

Hello,


Le 16/03/2018 à 17:32, Christophe Leroy a écrit :


This serie is the beginning of MPC8xx migration to DM model.



I didn't get any feedback on this serie. I don't feel totally confortable as
it is my first implementation of DM and also the first time powerpc uses DT
for U-boot.

I'd rather someone look at it.



One thing I'm noticing: Are you setting up pre-relocation malloc? Since MPC8xx
is another old powerpc platform, I suspect that the start.S doesn't do it, and
DM needs it to function correctly.


Yes, I did it with the following patch:

https://patchwork.ozlabs.org/patch/886980/

Best regards
Christophe



Maybe you can model the case of MPC8xx similarly to the ones for MPC83xx and
MPC85xx (those are pretty similar):

dbcb2c0e2ba28 ("powerpc: mpc83xx: Enable pre-relocation malloc")
50689461205e0 ("powerpc: mpc85xx: Enable pre-relocation malloc for MPC85xx")


Thanks
Christophe



Best regards,
Mario






It applies on top of the serie "[v4] Powerpc: mpc8xx: cleanup before
migration to DM model"

Christophe Leroy (6):
board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROL
drivers: watchdog: add a DM driver for the MPC8xx watchdog
board: MCR3000: use new DM watchdog
drivers: serial: migrate mpc8xx to DM
board: MCR3000: migrate to DM_SERIAL
drivers: serial: get rid of non DM mpc8xx driver

Change since initial RFC:
Migrated serial driver in addition
Few changes on the watchdog

   arch/powerpc/dts/Makefile  | 16 ++
   arch/powerpc/dts/mcr3000.dts   | 22 ++
   board/cssi/MCR3000/MCR3000.c   | 16 ++
   board/cssi/MCR3000/u-boot.lds  |  6 
   configs/MCR3000_defconfig  |  6 
   drivers/serial/serial.c|  2 --
   drivers/serial/serial_mpc8xx.c | 66
++
   drivers/watchdog/Kconfig   |  7 +
   drivers/watchdog/mpc8xx_wdt.c  | 51 
   include/configs/MCR3000.h  |  1 +
   include/serial.h   |  1 -
   11 files changed, 159 insertions(+), 35 deletions(-)
   create mode 100644 arch/powerpc/dts/Makefile
   create mode 100644 arch/powerpc/dts/mcr3000.dts




___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH RFCv2 0/6] Beginning of migration of MPC8xx to DM model

2018-05-04 Thread Mario Six
Hi Christophe,

On Fri, May 4, 2018 at 7:20 AM, Christophe LEROY
 wrote:
> Hello,
>
>
> Le 16/03/2018 à 17:32, Christophe Leroy a écrit :
>>
>> This serie is the beginning of MPC8xx migration to DM model.
>
>
> I didn't get any feedback on this serie. I don't feel totally confortable as
> it is my first implementation of DM and also the first time powerpc uses DT
> for U-boot.
>
> I'd rather someone look at it.
>

One thing I'm noticing: Are you setting up pre-relocation malloc? Since MPC8xx
is another old powerpc platform, I suspect that the start.S doesn't do it, and
DM needs it to function correctly.

Maybe you can model the case of MPC8xx similarly to the ones for MPC83xx and
MPC85xx (those are pretty similar):

dbcb2c0e2ba28 ("powerpc: mpc83xx: Enable pre-relocation malloc")
50689461205e0 ("powerpc: mpc85xx: Enable pre-relocation malloc for MPC85xx")

> Thanks
> Christophe
>

Best regards,
Mario

>
>
>>
>> It applies on top of the serie "[v4] Powerpc: mpc8xx: cleanup before
>> migration to DM model"
>>
>> Christophe Leroy (6):
>>board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROL
>>drivers: watchdog: add a DM driver for the MPC8xx watchdog
>>board: MCR3000: use new DM watchdog
>>drivers: serial: migrate mpc8xx to DM
>>board: MCR3000: migrate to DM_SERIAL
>>drivers: serial: get rid of non DM mpc8xx driver
>>
>> Change since initial RFC:
>>Migrated serial driver in addition
>>Few changes on the watchdog
>>
>>   arch/powerpc/dts/Makefile  | 16 ++
>>   arch/powerpc/dts/mcr3000.dts   | 22 ++
>>   board/cssi/MCR3000/MCR3000.c   | 16 ++
>>   board/cssi/MCR3000/u-boot.lds  |  6 
>>   configs/MCR3000_defconfig  |  6 
>>   drivers/serial/serial.c|  2 --
>>   drivers/serial/serial_mpc8xx.c | 66
>> ++
>>   drivers/watchdog/Kconfig   |  7 +
>>   drivers/watchdog/mpc8xx_wdt.c  | 51 
>>   include/configs/MCR3000.h  |  1 +
>>   include/serial.h   |  1 -
>>   11 files changed, 159 insertions(+), 35 deletions(-)
>>   create mode 100644 arch/powerpc/dts/Makefile
>>   create mode 100644 arch/powerpc/dts/mcr3000.dts
>>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH RFCv2 0/6] Beginning of migration of MPC8xx to DM model

2018-05-03 Thread Christophe LEROY

Hello,


Le 16/03/2018 à 17:32, Christophe Leroy a écrit :

This serie is the beginning of MPC8xx migration to DM model.


I didn't get any feedback on this serie. I don't feel totally 
confortable as it is my first implementation of DM and also the first 
time powerpc uses DT for U-boot.


I'd rather someone look at it.

Thanks
Christophe




It applies on top of the serie "[v4] Powerpc: mpc8xx: cleanup before migration to DM 
model"

Christophe Leroy (6):
   board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROL
   drivers: watchdog: add a DM driver for the MPC8xx watchdog
   board: MCR3000: use new DM watchdog
   drivers: serial: migrate mpc8xx to DM
   board: MCR3000: migrate to DM_SERIAL
   drivers: serial: get rid of non DM mpc8xx driver

Change since initial RFC:
   Migrated serial driver in addition
   Few changes on the watchdog

  arch/powerpc/dts/Makefile  | 16 ++
  arch/powerpc/dts/mcr3000.dts   | 22 ++
  board/cssi/MCR3000/MCR3000.c   | 16 ++
  board/cssi/MCR3000/u-boot.lds  |  6 
  configs/MCR3000_defconfig  |  6 
  drivers/serial/serial.c|  2 --
  drivers/serial/serial_mpc8xx.c | 66 ++
  drivers/watchdog/Kconfig   |  7 +
  drivers/watchdog/mpc8xx_wdt.c  | 51 
  include/configs/MCR3000.h  |  1 +
  include/serial.h   |  1 -
  11 files changed, 159 insertions(+), 35 deletions(-)
  create mode 100644 arch/powerpc/dts/Makefile
  create mode 100644 arch/powerpc/dts/mcr3000.dts


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH RFCv2 0/6] Beginning of migration of MPC8xx to DM model

2018-03-16 Thread Christophe Leroy
This serie is the beginning of MPC8xx migration to DM model.

It applies on top of the serie "[v4] Powerpc: mpc8xx: cleanup before migration 
to DM model"

Christophe Leroy (6):
  board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROL
  drivers: watchdog: add a DM driver for the MPC8xx watchdog
  board: MCR3000: use new DM watchdog
  drivers: serial: migrate mpc8xx to DM
  board: MCR3000: migrate to DM_SERIAL
  drivers: serial: get rid of non DM mpc8xx driver

Change since initial RFC:
  Migrated serial driver in addition
  Few changes on the watchdog

 arch/powerpc/dts/Makefile  | 16 ++
 arch/powerpc/dts/mcr3000.dts   | 22 ++
 board/cssi/MCR3000/MCR3000.c   | 16 ++
 board/cssi/MCR3000/u-boot.lds  |  6 
 configs/MCR3000_defconfig  |  6 
 drivers/serial/serial.c|  2 --
 drivers/serial/serial_mpc8xx.c | 66 ++
 drivers/watchdog/Kconfig   |  7 +
 drivers/watchdog/mpc8xx_wdt.c  | 51 
 include/configs/MCR3000.h  |  1 +
 include/serial.h   |  1 -
 11 files changed, 159 insertions(+), 35 deletions(-)
 create mode 100644 arch/powerpc/dts/Makefile
 create mode 100644 arch/powerpc/dts/mcr3000.dts

-- 
2.13.3

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot