Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-13 Thread Bartosz Golaszewski
śr., 13 lis 2019 o 11:52 Bartosz Golaszewski  napisał(a):
>
> pon., 11 lis 2019 o 13:58 Adam Ford  napisał(a):
> >
> > On Fri, Nov 8, 2019 at 11:59 AM Bartosz Golaszewski  wrote:
> > >
> > > pt., 8 lis 2019 o 18:33 Bartosz Golaszewski
> > >  napisał(a):
> > > >
> > > > pt., 8 lis 2019 o 17:14 Adam Ford  napisał(a):
> > > > >
> > > > > On Fri, Nov 8, 2019 at 9:50 AM Bartosz Golaszewski
> > > > >  wrote:
> > > > > >
> > > > > > pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  
> > > > > > napisał(a):
> > > > > > >
> > > > > > > czw., 26 wrz 2019 o 01:21 Faiz Abbas  
> > > > > > > napisał(a):
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > > > > > > > > From: Bartosz Golaszewski 
> > > > > > > > >
> > > > > > > > > Enable CONFIG_SPL_DM and enable the driver model for serial 
> > > > > > > > > by defining
> > > > > > > > > an appropriate device in the board file for da850-lcdk.
> > > > > > > > >
> > > > > > > >
> > > > > > > > This breaks booting from MMC on omapl138_lcdk. You didn't add a
> > > > > > > > U_BOOT_DEVICE for the mmc node.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Faiz
> > > > > > >
> > > > > > > Just letting you know I haven't forgotten about this. I finally 
> > > > > > > got
> > > > > > > some time to work on it this week, but it turned out to be
> > > > > > > non-trivial, as for some reason the set_cmd mmc callback is not 
> > > > > > > being
> > > > > > > properly assigned in SPL with driver-model and I couldn't find 
> > > > > > > out why
> > > > > > > so far. Next week I'm at ELCE, but I'll be back at it on 
> > > > > > > Thursday. I'm
> > > > > > > not sure if you want to revert the offending patch for now or 
> > > > > > > this can
> > > > > > > wait for another week?
> > > > > > >
> > > > > > > Best regards,
> > > > > > > Bartosz Golaszewski
> > > > > >
> > > > > > I've been working on this some more this week and noticed that in 
> > > > > > SPL
> > > > > > for some reason the bind function of the mmc driver is not called
> > > > > > (despite the driver being probed fine), but so far I've been unable 
> > > > > > to
> > > > > > figure out why exactly. This is the reason for the failure as the 
> > > > > > mmc
> > > > > > is not properly setup but the mmc core thinks it is and tries using
> > > > > > it.
> > > > > >
> > > > > > I've tried both using a U_BOOT_DEVICE() defined in the board file or
> > > > > > adding the mmc node to arch/arm/dts/da850-lcdk-u-boot.dtsi.
> > > > > >
> > > > > > Adam: you know davinci's SPL pretty well - do you have any 
> > > > > > suggestions?
> > > > >
> > > > > I am not sure that I know it well.  It's just one of several TI
> > > > > platforms that I support for Logic PD.
> > > > >
> > > > > Two thoughts I had:  There are aliases setup for various peripherals
> > > > > but I am not seeing one for mmc0 =   I a not sure if it will
> > > > > help or not but it is different I see.
> > > > >
> > > >
> > > > I'm having the same problem even when I'm defining the device using
> > > > U_BOOT_DEVICE() in the relevant board file.
> > > >
> > > > > There is also a function void board_boot_order (u32 *spl_boot_list)
> > > > > which can force the system to boot from a given device (ie, MMC1).
> > > > > It's an optional function, but it's a quick and dirty option to try.
> > > > >
> > > >
> > > > Thanks, I'll take a look at that.
> > >
> > > It's still the same, no matter what order I specify here.
> > >
> > > One thing that bothers me is: if I manually call mmc_bind() from probe
> > > instead of the bind() callback, it fails with ENOMEM on memory
> > > allocation when creating the block device. I'm wondering if it has
> > > something to do with the simple malloc we're using now.
> >
> > Over the weekend, I sent a series of patches.  One of them, [1], was
> > to increase the size of the available RAM before relocation. I believe
> > i doubled the amount from 1k to 2k.
> >
> > Can you see if the ENMOM error still exists?
> >
>
> Hi Adam,
>
> thanks a lot, this helps with memory. I can even boot from mmc if I
> manually call mmc_bind() from probe, but the bind callback is still
> not called even with DM_FLAG_PRE_RELOC added to mmc driver's flags.
>
> I'm still working on it though, must be some minor detail.
>

I noticed that calling mmc_bind() from probe() actually results in
davinci_mmc_bind() being called. Is this expected? Because all the
latter function does is call mmc_bind() again. This doesn't seem right
- should someone else call mmc_bind in SPL maybe?

> Bart
>
> > [1] - https://patchwork.ozlabs.org/patch/1192574/
> >
> > adam
> > >
> > > Bart
> > >
> > > >
> > > > > What are the jumper settings to boot from SD,  I have an lcdk I can
> > > > > try when I have some time.  It's not an official board I can support,
> > > > > but I can tinker when I'm off the clock.
> > > > >
> > > >
> > > > When looking at the board with the ethernet port in the upper-right
> > > > corner the 

Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-13 Thread Bartosz Golaszewski
pon., 11 lis 2019 o 13:58 Adam Ford  napisał(a):
>
> On Fri, Nov 8, 2019 at 11:59 AM Bartosz Golaszewski  wrote:
> >
> > pt., 8 lis 2019 o 18:33 Bartosz Golaszewski
> >  napisał(a):
> > >
> > > pt., 8 lis 2019 o 17:14 Adam Ford  napisał(a):
> > > >
> > > > On Fri, Nov 8, 2019 at 9:50 AM Bartosz Golaszewski
> > > >  wrote:
> > > > >
> > > > > pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  
> > > > > napisał(a):
> > > > > >
> > > > > > czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > > > > > > > From: Bartosz Golaszewski 
> > > > > > > >
> > > > > > > > Enable CONFIG_SPL_DM and enable the driver model for serial by 
> > > > > > > > defining
> > > > > > > > an appropriate device in the board file for da850-lcdk.
> > > > > > > >
> > > > > > >
> > > > > > > This breaks booting from MMC on omapl138_lcdk. You didn't add a
> > > > > > > U_BOOT_DEVICE for the mmc node.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Faiz
> > > > > >
> > > > > > Just letting you know I haven't forgotten about this. I finally got
> > > > > > some time to work on it this week, but it turned out to be
> > > > > > non-trivial, as for some reason the set_cmd mmc callback is not 
> > > > > > being
> > > > > > properly assigned in SPL with driver-model and I couldn't find out 
> > > > > > why
> > > > > > so far. Next week I'm at ELCE, but I'll be back at it on Thursday. 
> > > > > > I'm
> > > > > > not sure if you want to revert the offending patch for now or this 
> > > > > > can
> > > > > > wait for another week?
> > > > > >
> > > > > > Best regards,
> > > > > > Bartosz Golaszewski
> > > > >
> > > > > I've been working on this some more this week and noticed that in SPL
> > > > > for some reason the bind function of the mmc driver is not called
> > > > > (despite the driver being probed fine), but so far I've been unable to
> > > > > figure out why exactly. This is the reason for the failure as the mmc
> > > > > is not properly setup but the mmc core thinks it is and tries using
> > > > > it.
> > > > >
> > > > > I've tried both using a U_BOOT_DEVICE() defined in the board file or
> > > > > adding the mmc node to arch/arm/dts/da850-lcdk-u-boot.dtsi.
> > > > >
> > > > > Adam: you know davinci's SPL pretty well - do you have any 
> > > > > suggestions?
> > > >
> > > > I am not sure that I know it well.  It's just one of several TI
> > > > platforms that I support for Logic PD.
> > > >
> > > > Two thoughts I had:  There are aliases setup for various peripherals
> > > > but I am not seeing one for mmc0 =   I a not sure if it will
> > > > help or not but it is different I see.
> > > >
> > >
> > > I'm having the same problem even when I'm defining the device using
> > > U_BOOT_DEVICE() in the relevant board file.
> > >
> > > > There is also a function void board_boot_order (u32 *spl_boot_list)
> > > > which can force the system to boot from a given device (ie, MMC1).
> > > > It's an optional function, but it's a quick and dirty option to try.
> > > >
> > >
> > > Thanks, I'll take a look at that.
> >
> > It's still the same, no matter what order I specify here.
> >
> > One thing that bothers me is: if I manually call mmc_bind() from probe
> > instead of the bind() callback, it fails with ENOMEM on memory
> > allocation when creating the block device. I'm wondering if it has
> > something to do with the simple malloc we're using now.
>
> Over the weekend, I sent a series of patches.  One of them, [1], was
> to increase the size of the available RAM before relocation. I believe
> i doubled the amount from 1k to 2k.
>
> Can you see if the ENMOM error still exists?
>

Hi Adam,

thanks a lot, this helps with memory. I can even boot from mmc if I
manually call mmc_bind() from probe, but the bind callback is still
not called even with DM_FLAG_PRE_RELOC added to mmc driver's flags.

I'm still working on it though, must be some minor detail.

Bart

> [1] - https://patchwork.ozlabs.org/patch/1192574/
>
> adam
> >
> > Bart
> >
> > >
> > > > What are the jumper settings to boot from SD,  I have an lcdk I can
> > > > try when I have some time.  It's not an official board I can support,
> > > > but I can tinker when I'm off the clock.
> > > >
> > >
> > > When looking at the board with the ethernet port in the upper-right
> > > corner the jumpers should be like this:
> > >
> > > ---^
> > >
> > > You can flash the .ais image onto an SD card with the following command:
> > >
> > > dd if=u-boot.ais of= seek=117 bs=512 conv=fsync
> > >
> > > Thanks!
> > > Bart
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-11 Thread Adam Ford
On Fri, Nov 8, 2019 at 11:59 AM Bartosz Golaszewski  wrote:
>
> pt., 8 lis 2019 o 18:33 Bartosz Golaszewski
>  napisał(a):
> >
> > pt., 8 lis 2019 o 17:14 Adam Ford  napisał(a):
> > >
> > > On Fri, Nov 8, 2019 at 9:50 AM Bartosz Golaszewski
> > >  wrote:
> > > >
> > > > pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  napisał(a):
> > > > >
> > > > > czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > > > > > > From: Bartosz Golaszewski 
> > > > > > >
> > > > > > > Enable CONFIG_SPL_DM and enable the driver model for serial by 
> > > > > > > defining
> > > > > > > an appropriate device in the board file for da850-lcdk.
> > > > > > >
> > > > > >
> > > > > > This breaks booting from MMC on omapl138_lcdk. You didn't add a
> > > > > > U_BOOT_DEVICE for the mmc node.
> > > > > >
> > > > > > Thanks,
> > > > > > Faiz
> > > > >
> > > > > Just letting you know I haven't forgotten about this. I finally got
> > > > > some time to work on it this week, but it turned out to be
> > > > > non-trivial, as for some reason the set_cmd mmc callback is not being
> > > > > properly assigned in SPL with driver-model and I couldn't find out why
> > > > > so far. Next week I'm at ELCE, but I'll be back at it on Thursday. I'm
> > > > > not sure if you want to revert the offending patch for now or this can
> > > > > wait for another week?
> > > > >
> > > > > Best regards,
> > > > > Bartosz Golaszewski
> > > >
> > > > I've been working on this some more this week and noticed that in SPL
> > > > for some reason the bind function of the mmc driver is not called
> > > > (despite the driver being probed fine), but so far I've been unable to
> > > > figure out why exactly. This is the reason for the failure as the mmc
> > > > is not properly setup but the mmc core thinks it is and tries using
> > > > it.
> > > >
> > > > I've tried both using a U_BOOT_DEVICE() defined in the board file or
> > > > adding the mmc node to arch/arm/dts/da850-lcdk-u-boot.dtsi.
> > > >
> > > > Adam: you know davinci's SPL pretty well - do you have any suggestions?
> > >
> > > I am not sure that I know it well.  It's just one of several TI
> > > platforms that I support for Logic PD.
> > >
> > > Two thoughts I had:  There are aliases setup for various peripherals
> > > but I am not seeing one for mmc0 =   I a not sure if it will
> > > help or not but it is different I see.
> > >
> >
> > I'm having the same problem even when I'm defining the device using
> > U_BOOT_DEVICE() in the relevant board file.
> >
> > > There is also a function void board_boot_order (u32 *spl_boot_list)
> > > which can force the system to boot from a given device (ie, MMC1).
> > > It's an optional function, but it's a quick and dirty option to try.
> > >
> >
> > Thanks, I'll take a look at that.
>
> It's still the same, no matter what order I specify here.
>
> One thing that bothers me is: if I manually call mmc_bind() from probe
> instead of the bind() callback, it fails with ENOMEM on memory
> allocation when creating the block device. I'm wondering if it has
> something to do with the simple malloc we're using now.

Over the weekend, I sent a series of patches.  One of them, [1], was
to increase the size of the available RAM before relocation. I believe
i doubled the amount from 1k to 2k.

Can you see if the ENMOM error still exists?

[1] - https://patchwork.ozlabs.org/patch/1192574/

adam
>
> Bart
>
> >
> > > What are the jumper settings to boot from SD,  I have an lcdk I can
> > > try when I have some time.  It's not an official board I can support,
> > > but I can tinker when I'm off the clock.
> > >
> >
> > When looking at the board with the ethernet port in the upper-right
> > corner the jumpers should be like this:
> >
> > ---^
> >
> > You can flash the .ais image onto an SD card with the following command:
> >
> > dd if=u-boot.ais of= seek=117 bs=512 conv=fsync
> >
> > Thanks!
> > Bart
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-11 Thread Faiz Abbas
Hi Bartosz,

On 08/11/19 9:20 PM, Bartosz Golaszewski wrote:
> pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  napisał(a):
>>
>> czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
>>>
>>> Hi,
>>>
>>> On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
 From: Bartosz Golaszewski 

 Enable CONFIG_SPL_DM and enable the driver model for serial by defining
 an appropriate device in the board file for da850-lcdk.

>>>
>>> This breaks booting from MMC on omapl138_lcdk. You didn't add a
>>> U_BOOT_DEVICE for the mmc node.
>>>
>>> Thanks,
>>> Faiz
>>
>> Just letting you know I haven't forgotten about this. I finally got
>> some time to work on it this week, but it turned out to be
>> non-trivial, as for some reason the set_cmd mmc callback is not being
>> properly assigned in SPL with driver-model and I couldn't find out why
>> so far. Next week I'm at ELCE, but I'll be back at it on Thursday. I'm
>> not sure if you want to revert the offending patch for now or this can
>> wait for another week?
>>
>> Best regards,
>> Bartosz Golaszewski
> 
> I've been working on this some more this week and noticed that in SPL
> for some reason the bind function of the mmc driver is not called
> (despite the driver being probed fine), but so far I've been unable to
> figure out why exactly.

I suspect you need to set DM_FLAG_PRE_RELOC for the bind to be called.
Can you try setting this flag?

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


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-08 Thread Bartosz Golaszewski
pt., 8 lis 2019 o 17:14 Adam Ford  napisał(a):
>
> On Fri, Nov 8, 2019 at 9:50 AM Bartosz Golaszewski
>  wrote:
> >
> > pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  napisał(a):
> > >
> > > czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
> > > >
> > > > Hi,
> > > >
> > > > On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > > > > From: Bartosz Golaszewski 
> > > > >
> > > > > Enable CONFIG_SPL_DM and enable the driver model for serial by 
> > > > > defining
> > > > > an appropriate device in the board file for da850-lcdk.
> > > > >
> > > >
> > > > This breaks booting from MMC on omapl138_lcdk. You didn't add a
> > > > U_BOOT_DEVICE for the mmc node.
> > > >
> > > > Thanks,
> > > > Faiz
> > >
> > > Just letting you know I haven't forgotten about this. I finally got
> > > some time to work on it this week, but it turned out to be
> > > non-trivial, as for some reason the set_cmd mmc callback is not being
> > > properly assigned in SPL with driver-model and I couldn't find out why
> > > so far. Next week I'm at ELCE, but I'll be back at it on Thursday. I'm
> > > not sure if you want to revert the offending patch for now or this can
> > > wait for another week?
> > >
> > > Best regards,
> > > Bartosz Golaszewski
> >
> > I've been working on this some more this week and noticed that in SPL
> > for some reason the bind function of the mmc driver is not called
> > (despite the driver being probed fine), but so far I've been unable to
> > figure out why exactly. This is the reason for the failure as the mmc
> > is not properly setup but the mmc core thinks it is and tries using
> > it.
> >
> > I've tried both using a U_BOOT_DEVICE() defined in the board file or
> > adding the mmc node to arch/arm/dts/da850-lcdk-u-boot.dtsi.
> >
> > Adam: you know davinci's SPL pretty well - do you have any suggestions?
>
> I am not sure that I know it well.  It's just one of several TI
> platforms that I support for Logic PD.
>
> Two thoughts I had:  There are aliases setup for various peripherals
> but I am not seeing one for mmc0 =   I a not sure if it will
> help or not but it is different I see.
>

I'm having the same problem even when I'm defining the device using
U_BOOT_DEVICE() in the relevant board file.

> There is also a function void board_boot_order (u32 *spl_boot_list)
> which can force the system to boot from a given device (ie, MMC1).
> It's an optional function, but it's a quick and dirty option to try.
>

Thanks, I'll take a look at that.

> What are the jumper settings to boot from SD,  I have an lcdk I can
> try when I have some time.  It's not an official board I can support,
> but I can tinker when I'm off the clock.
>

When looking at the board with the ethernet port in the upper-right
corner the jumpers should be like this:

---^

You can flash the .ais image onto an SD card with the following command:

dd if=u-boot.ais of= seek=117 bs=512 conv=fsync

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


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-08 Thread Bartosz Golaszewski
pt., 8 lis 2019 o 18:33 Bartosz Golaszewski
 napisał(a):
>
> pt., 8 lis 2019 o 17:14 Adam Ford  napisał(a):
> >
> > On Fri, Nov 8, 2019 at 9:50 AM Bartosz Golaszewski
> >  wrote:
> > >
> > > pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  napisał(a):
> > > >
> > > > czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
> > > > >
> > > > > Hi,
> > > > >
> > > > > On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > > > > > From: Bartosz Golaszewski 
> > > > > >
> > > > > > Enable CONFIG_SPL_DM and enable the driver model for serial by 
> > > > > > defining
> > > > > > an appropriate device in the board file for da850-lcdk.
> > > > > >
> > > > >
> > > > > This breaks booting from MMC on omapl138_lcdk. You didn't add a
> > > > > U_BOOT_DEVICE for the mmc node.
> > > > >
> > > > > Thanks,
> > > > > Faiz
> > > >
> > > > Just letting you know I haven't forgotten about this. I finally got
> > > > some time to work on it this week, but it turned out to be
> > > > non-trivial, as for some reason the set_cmd mmc callback is not being
> > > > properly assigned in SPL with driver-model and I couldn't find out why
> > > > so far. Next week I'm at ELCE, but I'll be back at it on Thursday. I'm
> > > > not sure if you want to revert the offending patch for now or this can
> > > > wait for another week?
> > > >
> > > > Best regards,
> > > > Bartosz Golaszewski
> > >
> > > I've been working on this some more this week and noticed that in SPL
> > > for some reason the bind function of the mmc driver is not called
> > > (despite the driver being probed fine), but so far I've been unable to
> > > figure out why exactly. This is the reason for the failure as the mmc
> > > is not properly setup but the mmc core thinks it is and tries using
> > > it.
> > >
> > > I've tried both using a U_BOOT_DEVICE() defined in the board file or
> > > adding the mmc node to arch/arm/dts/da850-lcdk-u-boot.dtsi.
> > >
> > > Adam: you know davinci's SPL pretty well - do you have any suggestions?
> >
> > I am not sure that I know it well.  It's just one of several TI
> > platforms that I support for Logic PD.
> >
> > Two thoughts I had:  There are aliases setup for various peripherals
> > but I am not seeing one for mmc0 =   I a not sure if it will
> > help or not but it is different I see.
> >
>
> I'm having the same problem even when I'm defining the device using
> U_BOOT_DEVICE() in the relevant board file.
>
> > There is also a function void board_boot_order (u32 *spl_boot_list)
> > which can force the system to boot from a given device (ie, MMC1).
> > It's an optional function, but it's a quick and dirty option to try.
> >
>
> Thanks, I'll take a look at that.

It's still the same, no matter what order I specify here.

One thing that bothers me is: if I manually call mmc_bind() from probe
instead of the bind() callback, it fails with ENOMEM on memory
allocation when creating the block device. I'm wondering if it has
something to do with the simple malloc we're using now.

Bart

>
> > What are the jumper settings to boot from SD,  I have an lcdk I can
> > try when I have some time.  It's not an official board I can support,
> > but I can tinker when I'm off the clock.
> >
>
> When looking at the board with the ethernet port in the upper-right
> corner the jumpers should be like this:
>
> ---^
>
> You can flash the .ais image onto an SD card with the following command:
>
> dd if=u-boot.ais of= seek=117 bs=512 conv=fsync
>
> Thanks!
> Bart
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-08 Thread Bartosz Golaszewski
pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  napisał(a):
>
> czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
> >
> > Hi,
> >
> > On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski 
> > >
> > > Enable CONFIG_SPL_DM and enable the driver model for serial by defining
> > > an appropriate device in the board file for da850-lcdk.
> > >
> >
> > This breaks booting from MMC on omapl138_lcdk. You didn't add a
> > U_BOOT_DEVICE for the mmc node.
> >
> > Thanks,
> > Faiz
>
> Just letting you know I haven't forgotten about this. I finally got
> some time to work on it this week, but it turned out to be
> non-trivial, as for some reason the set_cmd mmc callback is not being
> properly assigned in SPL with driver-model and I couldn't find out why
> so far. Next week I'm at ELCE, but I'll be back at it on Thursday. I'm
> not sure if you want to revert the offending patch for now or this can
> wait for another week?
>
> Best regards,
> Bartosz Golaszewski

I've been working on this some more this week and noticed that in SPL
for some reason the bind function of the mmc driver is not called
(despite the driver being probed fine), but so far I've been unable to
figure out why exactly. This is the reason for the failure as the mmc
is not properly setup but the mmc core thinks it is and tries using
it.

I've tried both using a U_BOOT_DEVICE() defined in the board file or
adding the mmc node to arch/arm/dts/da850-lcdk-u-boot.dtsi.

Adam: you know davinci's SPL pretty well - do you have any suggestions?

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


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-11-08 Thread Adam Ford
On Fri, Nov 8, 2019 at 9:50 AM Bartosz Golaszewski
 wrote:
>
> pt., 25 paź 2019 o 18:10 Bartosz Golaszewski  napisał(a):
> >
> > czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
> > >
> > > Hi,
> > >
> > > On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski 
> > > >
> > > > Enable CONFIG_SPL_DM and enable the driver model for serial by defining
> > > > an appropriate device in the board file for da850-lcdk.
> > > >
> > >
> > > This breaks booting from MMC on omapl138_lcdk. You didn't add a
> > > U_BOOT_DEVICE for the mmc node.
> > >
> > > Thanks,
> > > Faiz
> >
> > Just letting you know I haven't forgotten about this. I finally got
> > some time to work on it this week, but it turned out to be
> > non-trivial, as for some reason the set_cmd mmc callback is not being
> > properly assigned in SPL with driver-model and I couldn't find out why
> > so far. Next week I'm at ELCE, but I'll be back at it on Thursday. I'm
> > not sure if you want to revert the offending patch for now or this can
> > wait for another week?
> >
> > Best regards,
> > Bartosz Golaszewski
>
> I've been working on this some more this week and noticed that in SPL
> for some reason the bind function of the mmc driver is not called
> (despite the driver being probed fine), but so far I've been unable to
> figure out why exactly. This is the reason for the failure as the mmc
> is not properly setup but the mmc core thinks it is and tries using
> it.
>
> I've tried both using a U_BOOT_DEVICE() defined in the board file or
> adding the mmc node to arch/arm/dts/da850-lcdk-u-boot.dtsi.
>
> Adam: you know davinci's SPL pretty well - do you have any suggestions?

I am not sure that I know it well.  It's just one of several TI
platforms that I support for Logic PD.

Two thoughts I had:  There are aliases setup for various peripherals
but I am not seeing one for mmc0 =   I a not sure if it will
help or not but it is different I see.

There is also a function void board_boot_order (u32 *spl_boot_list)
which can force the system to boot from a given device (ie, MMC1).
It's an optional function, but it's a quick and dirty option to try.

What are the jumper settings to boot from SD,  I have an lcdk I can
try when I have some time.  It's not an official board I can support,
but I can tinker when I'm off the clock.

adam

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


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-10-28 Thread Bartosz Golaszewski
pt., 25 paź 2019 o 19:25 Rizvi, Mohammad Faiz Abbas
 napisał(a):
>
> Hi Barotz,
>

It's Bartosz - it's literally on the next line of the e-mail too. :)

> On 10/25/2019 9:40 PM, Bartosz Golaszewski wrote:
> > czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
> >>
> >> Hi,
> >>
> >> On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> >>> From: Bartosz Golaszewski 
> >>>
> >>> Enable CONFIG_SPL_DM and enable the driver model for serial by defining
> >>> an appropriate device in the board file for da850-lcdk.
> >>>
> >>
> >> This breaks booting from MMC on omapl138_lcdk. You didn't add a
> >> U_BOOT_DEVICE for the mmc node.
> >>
> >> Thanks,
> >> Faiz
> >
> > Just letting you know I haven't forgotten about this. I finally got
> > some time to work on it this week, but it turned out to be
> > non-trivial, as for some reason the set_cmd mmc callback is not being
> > properly assigned in SPL with driver-model and I couldn't find out why
> > so far.
>
> I will try to look at it as well.
>
>  Next week I'm at ELCE, but I'll be back at it on Thursday.
>
> I'm at ELC as well. Will be nice to meet up with you and discuss this if
> you want.
>

Sure, I'll be doing a talk on Wednesday, may be a good time to catch
me afterwards.

Bartosz

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


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-10-25 Thread Rizvi, Mohammad Faiz Abbas
Hi Barotz,

On 10/25/2019 9:40 PM, Bartosz Golaszewski wrote:
> czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
>>
>> Hi,
>>
>> On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
>>> From: Bartosz Golaszewski 
>>>
>>> Enable CONFIG_SPL_DM and enable the driver model for serial by defining
>>> an appropriate device in the board file for da850-lcdk.
>>>
>>
>> This breaks booting from MMC on omapl138_lcdk. You didn't add a
>> U_BOOT_DEVICE for the mmc node.
>>
>> Thanks,
>> Faiz
> 
> Just letting you know I haven't forgotten about this. I finally got
> some time to work on it this week, but it turned out to be
> non-trivial, as for some reason the set_cmd mmc callback is not being
> properly assigned in SPL with driver-model and I couldn't find out why
> so far.

I will try to look at it as well.

 Next week I'm at ELCE, but I'll be back at it on Thursday.

I'm at ELC as well. Will be nice to meet up with you and discuss this if
you want.

Thanks,
Faiz



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


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-10-25 Thread Bartosz Golaszewski
czw., 26 wrz 2019 o 01:21 Faiz Abbas  napisał(a):
>
> Hi,
>
> On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski 
> >
> > Enable CONFIG_SPL_DM and enable the driver model for serial by defining
> > an appropriate device in the board file for da850-lcdk.
> >
>
> This breaks booting from MMC on omapl138_lcdk. You didn't add a
> U_BOOT_DEVICE for the mmc node.
>
> Thanks,
> Faiz

Just letting you know I haven't forgotten about this. I finally got
some time to work on it this week, but it turned out to be
non-trivial, as for some reason the set_cmd mmc callback is not being
properly assigned in SPL with driver-model and I couldn't find out why
so far. Next week I'm at ELCE, but I'll be back at it on Thursday. I'm
not sure if you want to revert the offending patch for now or this can
wait for another week?

Best regards,
Bartosz Golaszewski
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-09-25 Thread Faiz Abbas
Hi,

On 29/07/19 12:28 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski 
> 
> Enable CONFIG_SPL_DM and enable the driver model for serial by defining
> an appropriate device in the board file for da850-lcdk.
> 

This breaks booting from MMC on omapl138_lcdk. You didn't add a
U_BOOT_DEVICE for the mmc node.

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


Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL

2019-07-29 Thread Tom Rini
On Mon, Jul 29, 2019 at 08:58:09AM +0200, Bartosz Golaszewski wrote:

> From: Bartosz Golaszewski 
> 
> Enable CONFIG_SPL_DM and enable the driver model for serial by defining
> an appropriate device in the board file for da850-lcdk.
> 
> Signed-off-by: Bartosz Golaszewski 

Applied to u-boot/master, thanks!

-- 
Tom


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