Re: [PATCH v5 1/4] omap: mmc: Avoid using libfdt with of-platdata
wt., 28 kwi 2020 o 09:01 Faiz Abbas napisał(a): > > +Bartosz > > On 28/04/20 9:47 am, Lokesh Vutla wrote: > > +Faiz, > > > > On 28/04/20 12:29 AM, Tom Rini wrote: > >> On Mon, Apr 27, 2020 at 05:33:41AM +, Peng Fan wrote: > Subject: [PATCH v5 1/4] omap: mmc: Avoid using libfdt with of-platdata > > At present this driver is enabled in SPL on omapl138_lcdk, which uses > of-platdata. The driver needs to be ported to use of-platdata properly. > For now, avoid a build error by returning an error. > > Signed-off-by: Simon Glass > > > > Does this break the boot on omap l138? > > > > I don't have a board at hand to test this out. Bartosz can you help test this > with > omapl138? > > Thanks, > Faiz Hi Faiz, I can confirm - this *does* break the mmc boot on da850-lcdk. Bart
Re: [PATCH v5 1/4] omap: mmc: Avoid using libfdt with of-platdata
pt., 1 maj 2020 o 20:32 Tom Rini napisał(a): > > On Thu, Apr 30, 2020 at 01:43:30PM +0200, Bartosz Golaszewski wrote: > > wt., 28 kwi 2020 o 09:01 Faiz Abbas napisał(a): > > > > > > +Bartosz > > > > > > On 28/04/20 9:47 am, Lokesh Vutla wrote: > > > > +Faiz, > > > > > > > > On 28/04/20 12:29 AM, Tom Rini wrote: > > > >> On Mon, Apr 27, 2020 at 05:33:41AM +, Peng Fan wrote: > > > >>>> Subject: [PATCH v5 1/4] omap: mmc: Avoid using libfdt with > > > >>>> of-platdata > > > >>>> > > > >>>> At present this driver is enabled in SPL on omapl138_lcdk, which uses > > > >>>> of-platdata. The driver needs to be ported to use of-platdata > > > >>>> properly. > > > >>>> For now, avoid a build error by returning an error. > > > >>>> > > > >>>> Signed-off-by: Simon Glass > > > > > > > > Does this break the boot on omap l138? > > > > > > > > > > I don't have a board at hand to test this out. Bartosz can you help test > > > this with > > > omapl138? > > > > > > Thanks, > > > Faiz > > > > Hi Faiz, > > > > I can confirm - this *does* break the mmc boot on da850-lcdk. > > So who is going to fix the driver to unblock Simon's series? > Is this something that will take a lot of work? What exactly needs doing? I'm not sure what "use of-platdata properly" means. Bart
Re: [PATCH v5 1/4] omap: mmc: Avoid using libfdt with of-platdata
wt., 5 maj 2020 o 08:50 Faiz Abbas napisał(a): > > Hi, > > On 04/05/20 6:44 pm, Simon Glass wrote: > > Hi Bart, > > > > On Mon, 4 May 2020 at 01:10, Bartosz Golaszewski wrote: > >> > >> pt., 1 maj 2020 o 20:32 Tom Rini napisał(a): > >>> > >>> On Thu, Apr 30, 2020 at 01:43:30PM +0200, Bartosz Golaszewski wrote: > >>>> wt., 28 kwi 2020 o 09:01 Faiz Abbas napisał(a): > >>>>> > >>>>> +Bartosz > >>>>> > >>>>> On 28/04/20 9:47 am, Lokesh Vutla wrote: > >>>>>> +Faiz, > >>>>>> > >>>>>> On 28/04/20 12:29 AM, Tom Rini wrote: > >>>>>>> On Mon, Apr 27, 2020 at 05:33:41AM +, Peng Fan wrote: > >>>>>>>>> Subject: [PATCH v5 1/4] omap: mmc: Avoid using libfdt with > >>>>>>>>> of-platdata > >>>>>>>>> > >>>>>>>>> At present this driver is enabled in SPL on omapl138_lcdk, which > >>>>>>>>> uses > >>>>>>>>> of-platdata. The driver needs to be ported to use of-platdata > >>>>>>>>> properly. > >>>>>>>>> For now, avoid a build error by returning an error. > >>>>>>>>> > >>>>>>>>> Signed-off-by: Simon Glass > >>>>>> > >>>>>> Does this break the boot on omap l138? > >>>>>> > >>>>> > >>>>> I don't have a board at hand to test this out. Bartosz can you help > >>>>> test this with > >>>>> omapl138? > >>>>> > >>>>> Thanks, > >>>>> Faiz > >>>> > >>>> Hi Faiz, > >>>> > >>>> I can confirm - this *does* break the mmc boot on da850-lcdk. > >>> > >>> So who is going to fix the driver to unblock Simon's series? > >>> > >> > >> Is this something that will take a lot of work? What exactly needs > >> doing? I'm not sure what "use of-platdata properly" means. > > > > This board is defining CONFIG_SPL_OF_PLATDATA which means that device > > tree is not available in SPL. Instead you need to use a C structure > > created by dtoc. It basically involves creating that struct and > > getting the data from that instead of calling the DT functions. I > > expect it will take 2-4 hours to figure out, code and test. > > > > See of-plat.rst for full documentation. There are quite a few examples for > > mmc: > > > > grep PLATDATA drivers/mmc/*.c > > drivers/mmc/ftsdc010_mci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/ftsdc010_mci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/ftsdc010_mci.c:#if !CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/ftsdc010_mci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/mxsmmc.c: debug("OF_PLATDATA: regs: 0x%p bw: %d clkid: %d > > non_removable: %d\n", > > drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) && > > !CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/mxsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) && > > !CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/omap_hsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) && > > !CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/omap_hsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) && > > !CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/omap_hsmmc.c:#if CONFIG_IS_ENABLED(OF_CONTROL) && > > !CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/rockchip_dw_mmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/rockchip_dw_mmc.c:#if !CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/rockchip_dw_mmc.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/rockchip_sdhci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/rockchip_sdhci.c:#if CONFIG_IS_ENABLED(OF_PLATDATA) > > drivers/mmc/rockchip_sdhci.c:#if !CONFIG_IS_ENABLED(OF_PLATDATA) > > > > I was able to get a setup to work on. Will post a fix for this soon. > > Thanks, > Faiz Thanks Faiz! Let me know if you need some help testing it. Bart
Re: [U-Boot] [RESEND PATCH v2 12/13] davinci: omapl138-lcdk: enable driver-model in SPL
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
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 = &mmc1. 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
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 = &mmc1. 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
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 = &mmc1. 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
ś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 = &mmc1. 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
[U-Boot] [PATCH] scripts: dtc: ignore files generated generated by python
From: Bartosz Golaszewski Add __pycache__ to ignored files and extend the rule for _libfdt to also include generated shared objects (e.g. _libfdt.cpython-37m-x86_64-linux-gnu.so). Signed-off-by: Bartosz Golaszewski --- scripts/dtc/pylibfdt/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/pylibfdt/.gitignore b/scripts/dtc/pylibfdt/.gitignore index 033f23dfdd..3a512001c9 100644 --- a/scripts/dtc/pylibfdt/.gitignore +++ b/scripts/dtc/pylibfdt/.gitignore @@ -1,4 +1,5 @@ -/_libfdt.so +/_libfdt.* /libfdt.py /libfdt.pyc /libfdt_wrap.c +/__pycache__ -- 2.23.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: omapl138_lcdk: Shrink code size by building with Thumb
niedz., 10 lis 2019 o 13:33 Adam Ford napisał(a): > > SPL has limited available resources, and the performance between > ARM and Thumb isn't that significant. > > This patch builds using Thumb instruction set to reduce the code > size by nearly 6K. > > Original: >textdata bss dec hex filename > 2652640041376 319067ca2 spl/u-boot-spl > > Thumb: > >textdata bss dec hex filename > 2023240041376 25612640c spl/u-boot-spl > > Signed-off-by: Adam Ford > > diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig > index 9821df9884..16287a4ac2 100644 > --- a/configs/omapl138_lcdk_defconfig > +++ b/configs/omapl138_lcdk_defconfig > @@ -1,4 +1,5 @@ > CONFIG_ARM=y > +CONFIG_SYS_THUMB_BUILD=y > CONFIG_ARCH_DAVINCI=y > CONFIG_SYS_TEXT_BASE=0xc108 > CONFIG_TARGET_OMAPL138_LCDK=y > -- > 2.20.1 > Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: omapl138_lcdk: Allow early init to start instruction cache
niedz., 10 lis 2019 o 17:18 Adam Ford napisał(a): > > Currently the omapl138_lcdk has SKIP_LOWLEVEL_INIT set. > The README states there is a variation of this for the ARM926EJ-S > which allows the board to just skip the call to lowlevel_init() > and do the normal CP15 init which enables the instruction cache. > > On the da850evm, this was shown to improve startup time. > > This patch switches SKIP_LOWLEVEL_INIT to SKIP_LOWLEVEL_INIT_ONLY > thus, enabling the cache. > > Signed-off-by: Adam Ford > > diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h > index 1c41e7e97a..3b5c085a24 100644 > --- a/include/configs/omapl138_lcdk.h > +++ b/include/configs/omapl138_lcdk.h > @@ -23,7 +23,7 @@ > #define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE > #define CONFIG_SYS_HZ_CLOCKclk_get(DAVINCI_AUXCLK_CLKID) > #define CONFIG_SYS_HZ 1000 > -#define CONFIG_SKIP_LOWLEVEL_INIT > +#define CONFIG_SKIP_LOWLEVEL_INIT_ONLY > > /* > * Memory Info > -- > 2.20.1 > Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] ARM: omapl138_lcdk: Increase malloc pool before relocation
niedz., 10 lis 2019 o 15:01 Adam Ford napisał(a): > > Driver model requires a malloc pool to allocate memory before > relocations to operate serial and some other devices. This patch > increases the pool size to 2K. > > Signed-off-by: Adam Ford > > diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig > index cceb0c408e..376bb9f953 100644 > --- a/configs/omapl138_lcdk_defconfig > +++ b/configs/omapl138_lcdk_defconfig > @@ -8,6 +8,7 @@ CONFIG_SYS_DA850_PLL1_PLLDIV3=0x8003 > CONFIG_TI_COMMON_CMD_OPTIONS=y > CONFIG_SPL_LIBCOMMON_SUPPORT=y > CONFIG_SPL_LIBGENERIC_SUPPORT=y > +CONFIG_SYS_MALLOC_F_LEN=0x800 > CONFIG_SPL_MMC_SUPPORT=y > CONFIG_SPL_SERIAL_SUPPORT=y > CONFIG_NR_DRAM_BANKS=1 > -- > 2.20.1 > Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] ARM: omapl138_lcdk: Separate BSS in SPL
niedz., 10 lis 2019 o 15:01 Adam Ford napisał(a): > > In preparation to use full device tree support, SPL can separate > BSS from text region. > > This patch enables SPL_SEPARATE_BSS. > > Signed-off-by: Adam Ford > > diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig > index 16287a4ac2..cceb0c408e 100644 > --- a/configs/omapl138_lcdk_defconfig > +++ b/configs/omapl138_lcdk_defconfig > @@ -20,6 +20,7 @@ CONFIG_VERSION_VARIABLE=y > # CONFIG_DISPLAY_CPUINFO is not set > CONFIG_BOARD_EARLY_INIT_F=y > CONFIG_SPL_SYS_MALLOC_SIMPLE=y > +CONFIG_SPL_SEPARATE_BSS=y > CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5 > CONFIG_SPL_NAND_SUPPORT=y > CONFIG_HUSH_PARSER=y > -- > 2.20.1 > Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] ARM: omapl138_lcdk: Enable SPL_DM_SEQ_ALIAS and SPL_OF_TRANSLATE
niedz., 10 lis 2019 o 15:01 Adam Ford napisał(a): > > In order to further prepare for full device tree support in SPL, > this patch enables both SPL_DM_SEQ_ALIAS and SPL_OF_TRANSLATE. > Both of these are already enabled in U-Boot, so SPL will have > the same functionality > > Signed-off-by: Adam Ford > > diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig > index 376bb9f953..c95d06b551 100644 > --- a/configs/omapl138_lcdk_defconfig > +++ b/configs/omapl138_lcdk_defconfig > @@ -44,6 +44,8 @@ CONFIG_ENV_IS_IN_NAND=y > CONFIG_NET_RANDOM_ETHADDR=y > CONFIG_DM=y > CONFIG_SPL_DM=y > +CONFIG_SPL_DM_SEQ_ALIAS=y > +CONFIG_SPL_OF_TRANSLATE=y > CONFIG_DM_GPIO=y > CONFIG_DA8XX_GPIO=y > CONFIG_DM_I2C=y > -- > 2.20.1 > Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 0/4] omapl138_lcdk: fix MMC boot
From: Bartosz Golaszewski Booting from MMC on omapl138-lcdk is currently broken after we enabled driver-model in SPL. While I know what's wrong - the bind() callback not being called - I can't for the life of me figure out how to fix it. I'm still working on proper changes, but for now, I'd like to propose this series which fixes MMC boot with a workaround in which we call mmc_boot() manually from probe. First two patches drop some legacy code that's no longer needed. The third patch adds a U_BOOT_DEVICE() for mmc as we don't yet have full DT support (also in-progress). The last patch adds the workaround to the davinci mmc driver. This series depends on Adam Ford's patch increasing the pre-reloc malloc pool. [1] https://patchwork.ozlabs.org/patch/1192574/ Bartosz Golaszewski (4): mmc: davinci: drop support for ti,dm6441-mmc mmc: davinci: drop struct davinci_mmc_plat board: omapl138_lcdk: add the mmc device to SPL mmc: davinci: fix mmc boot in SPL arch/arm/mach-davinci/Kconfig | 1 + .../mach-davinci/include/mach/sdmmc_defs.h| 6 -- board/davinci/da8xxevm/omapl138_lcdk.c| 10 ++- drivers/mmc/davinci_mmc.c | 73 +++ 4 files changed, 36 insertions(+), 54 deletions(-) -- 2.23.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/4] mmc: davinci: drop support for ti,dm6441-mmc
From: Bartosz Golaszewski The DM family of DaVinci SoCs is no longer supported. Drop the irrelevant code from the driver. Signed-off-by: Bartosz Golaszewski --- .../mach-davinci/include/mach/sdmmc_defs.h| 6 --- board/davinci/da8xxevm/omapl138_lcdk.c| 1 - drivers/mmc/davinci_mmc.c | 42 +++ 3 files changed, 5 insertions(+), 44 deletions(-) diff --git a/arch/arm/mach-davinci/include/mach/sdmmc_defs.h b/arch/arm/mach-davinci/include/mach/sdmmc_defs.h index 5755c45f91..46f6391aa2 100644 --- a/arch/arm/mach-davinci/include/mach/sdmmc_defs.h +++ b/arch/arm/mach-davinci/include/mach/sdmmc_defs.h @@ -149,15 +149,9 @@ struct davinci_mmc { uint input_clk; /* Input clock to MMC controller */ uint host_caps; /* Host capabilities */ uint voltages; /* Host supported voltages */ - uint version; /* MMC Controller version */ struct mmc_config cfg; }; -enum { - MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */ - MMC_CTLR_VERSION_2, /* DA830 */ -}; - int davinci_mmc_init(bd_t *bis, struct davinci_mmc *host); #endif /* _SDMMC_DEFS_H */ diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 27a51d6a78..d4cda0a8a7 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -342,7 +342,6 @@ static struct davinci_mmc mmc_sd0 = { .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE, .host_caps = MMC_MODE_4BIT, /* DA850 supports only 4-bit SD/MMC */ .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, - .version = MMC_CTLR_VERSION_2, }; int board_mmc_init(bd_t *bis) diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c index 0d63279db0..370b18cc78 100644 --- a/drivers/mmc/davinci_mmc.c +++ b/drivers/mmc/davinci_mmc.c @@ -26,16 +26,10 @@ #define clear_bit(addr, val) set_val((addr), (get_val(addr) & ~(val))) #ifdef CONFIG_DM_MMC -struct davinci_of_data { - const char *name; - u8 version; -}; - /* Davinci MMC board definitions */ struct davinci_mmc_priv { struct davinci_mmc_regs *reg_base; /* Register base address */ uint input_clk; /* Input clock to MMC controller */ - uint version; /* MMC Controller version */ struct gpio_desc cd_gpio; /* Card Detect GPIO */ struct gpio_desc wp_gpio; /* Write Protect GPIO */ }; @@ -173,7 +167,7 @@ davinci_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data * /* Clear status registers */ mmcstatus = get_val(®s->mmcst0); - fifo_words = (host->version == MMC_CTLR_VERSION_2) ? 16 : 8; + fifo_words = 16; fifo_bytes = fifo_words << 2; /* Wait for any previous busy signal to be cleared */ @@ -211,8 +205,7 @@ davinci_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data * set_val(®s->mmcfifoctl, (MMCFIFOCTL_FIFOLEV | MMCFIFOCTL_FIFORST)); - if (host->version == MMC_CTLR_VERSION_2) - cmddata |= MMCCMD_DMATRIG; + cmddata |= MMCCMD_DMATRIG; cmddata |= MMCCMD_WDATX; if (data->flags == MMC_DATA_READ) { @@ -494,18 +487,13 @@ static int davinci_mmc_probe(struct udevice *dev) struct davinci_mmc_plat *plat = dev_get_platdata(dev); struct davinci_mmc_priv *priv = dev_get_priv(dev); struct mmc_config *cfg = &plat->cfg; - struct davinci_of_data *data = - (struct davinci_of_data *)dev_get_driver_data(dev); + cfg->f_min = 20; cfg->f_max = 2500; cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34, cfg->host_caps = MMC_MODE_4BIT, /* DA850 supports only 4-bit SD/MMC */ cfg->b_max = DAVINCI_MAX_BLOCKS; - - if (data) { - cfg->name = data->name; - priv->version = data->version; - } + cfg->name = "da830-mmc"; priv->reg_base = (struct davinci_mmc_regs *)dev_read_addr(dev); priv->input_clk = clk_get(DAVINCI_MMCSD_CLKID); @@ -528,28 +516,8 @@ static int davinci_mmc_bind(struct udevice *dev) return mmc_bind(dev, &plat->mmc, &plat->cfg); } - -const struct davinci_of_data davinci_mmc_host_info[] = { - { - .name = "dm6441-mmc", - .version = MMC_CTLR_VERSION_1, - }, - { - .name = "da830-mmc", - .version = MMC_CTLR_VERSION_2, - }, - {}, -}; - static const struct udevice_id davinci_mmc_ids[] = { - { - .compatible = "ti,dm6441-mmc", - .data = (ulong) &davinci_mmc_host_info[MMC_CTLR_VERSION_1] - }, -
[U-Boot] [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat
From: Bartosz Golaszewski struct mmc_config & struct mmc don't need to be exported over platform data, but can instead be private in the driver. Remove struct davinci_mmc_plat. Signed-off-by: Bartosz Golaszewski --- drivers/mmc/davinci_mmc.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c index 370b18cc78..a27a039f9b 100644 --- a/drivers/mmc/davinci_mmc.c +++ b/drivers/mmc/davinci_mmc.c @@ -32,10 +32,6 @@ struct davinci_mmc_priv { uint input_clk; /* Input clock to MMC controller */ struct gpio_desc cd_gpio; /* Card Detect GPIO */ struct gpio_desc wp_gpio; /* Write Protect GPIO */ -}; - -struct davinci_mmc_plat -{ struct mmc_config cfg; struct mmc mmc; }; @@ -484,9 +480,8 @@ int davinci_mmc_init(bd_t *bis, struct davinci_mmc *host) static int davinci_mmc_probe(struct udevice *dev) { struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); - struct davinci_mmc_plat *plat = dev_get_platdata(dev); struct davinci_mmc_priv *priv = dev_get_priv(dev); - struct mmc_config *cfg = &plat->cfg; + struct mmc_config *cfg = &priv->cfg; cfg->f_min = 20; cfg->f_max = 2500; @@ -504,16 +499,16 @@ static int davinci_mmc_probe(struct udevice *dev) gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN); #endif - upriv->mmc = &plat->mmc; + upriv->mmc = &priv->mmc; return davinci_dm_mmc_init(dev); } static int davinci_mmc_bind(struct udevice *dev) { - struct davinci_mmc_plat *plat = dev_get_platdata(dev); + struct davinci_mmc_priv *priv = dev_get_priv(dev); - return mmc_bind(dev, &plat->mmc, &plat->cfg); + return mmc_bind(dev, &priv->mmc, &priv->cfg); } static const struct udevice_id davinci_mmc_ids[] = { @@ -530,7 +525,6 @@ U_BOOT_DRIVER(davinci_mmc_drv) = { #endif .probe = davinci_mmc_probe, .ops = &davinci_mmc_ops, - .platdata_auto_alloc_size = sizeof(struct davinci_mmc_plat), .priv_auto_alloc_size = sizeof(struct davinci_mmc_priv), }; #endif -- 2.23.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/4] mmc: davinci: fix mmc boot in SPL
From: Bartosz Golaszewski The MMC boot is currently broken on omapl138-lcdk after enabling the driver model in SPL. The main problem is the driver's bind callback not being called after probe in SPL (even with the DM_FLAG_PRE_RELOC flag specified). While a proper fix is still being worked on, this hacky changeset at least fixes the MMC boot on this platform by calling mmc_bind() manually from probe(). Signed-off-by: Bartosz Golaszewski --- drivers/mmc/davinci_mmc.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c index a27a039f9b..c3f7b57665 100644 --- a/drivers/mmc/davinci_mmc.c +++ b/drivers/mmc/davinci_mmc.c @@ -482,6 +482,9 @@ static int davinci_mmc_probe(struct udevice *dev) struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); struct davinci_mmc_priv *priv = dev_get_priv(dev); struct mmc_config *cfg = &priv->cfg; +#ifdef CONFIG_SPL_BUILD + int ret; +#endif cfg->f_min = 20; cfg->f_max = 2500; @@ -501,6 +504,20 @@ static int davinci_mmc_probe(struct udevice *dev) upriv->mmc = &priv->mmc; +#ifdef CONFIG_SPL_BUILD + /* +* FIXME This is a temporary workaround to enable the driver model in +* SPL on omapl138-lcdk. For some reason the bind() callback is not +* being called in SPL for MMC which breaks the mmc boot - the hack +* is to call mmc_bind() from probe(). We also don't have full DT +* support in SPL, hence the hard-coded base register address. +*/ + priv->reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE; + ret = mmc_bind(dev, &priv->mmc, &priv->cfg); + if (ret) + return ret; +#endif + return davinci_dm_mmc_init(dev); } -- 2.23.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/4] board: omapl138_lcdk: add the mmc device to SPL
From: Bartosz Golaszewski We don't have full device-tree support in SPL yet - add an appropriate U_BOOT_DEVICE() to the board file. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/Kconfig | 1 + board/davinci/da8xxevm/omapl138_lcdk.c | 9 + 2 files changed, 10 insertions(+) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index adc50922c8..8a81c07881 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -14,6 +14,7 @@ config TARGET_OMAPL138_LCDK bool "OMAPL138 LCDK" select SOC_DA8XX select SUPPORT_SPL + select SPL_BOARD_INIT config TARGET_LEGOEV3 bool "LEGO MINDSTORMS EV3" diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index d4cda0a8a7..608a7f28eb 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -366,4 +366,13 @@ U_BOOT_DEVICE(omapl138_uart) = { .name = "ns16550_serial", .platdata = &serial_pdata, }; + +U_BOOT_DEVICE(omapl138_mmc) = { + .name = "davinci_mmc", +}; + +void spl_board_init(void) +{ + davinci_configure_pin_mux(mmc0_pins, ARRAY_SIZE(mmc0_pins)); +} #endif -- 2.23.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: dts: da850-lcdk: Update DTS files for SPL device tree support
śr., 13 lis 2019 o 16:46 Adam Ford napisał(a): > > Currently, the da850-lcdk uses SPL_OF_PLATDATA and manually loads > the necessary source code instead of using the auto-generated, > because the drivers don't properly autogenerate the code. > > This patch simply enables the various device tree options to > mimic the da850-evm which doesn't need or use OF_PLATDATA for > device tree support. It does not disable OF_PLATDATA. > > Signed-off-by: Adam Ford > > diff --git a/arch/arm/dts/da850-lcdk-u-boot.dtsi > b/arch/arm/dts/da850-lcdk-u-boot.dtsi > index 541f4ca200..b372d06ca9 100644 > --- a/arch/arm/dts/da850-lcdk-u-boot.dtsi > +++ b/arch/arm/dts/da850-lcdk-u-boot.dtsi > @@ -8,9 +8,23 @@ > / { > aliases { > i2c0 = &i2c0; > + mmc0 = &mmc0; > + serial2 = &serial2; > + }; > + > + soc@1c0 { > + u-boot,dm-spl; > }; > > nand { > compatible = "ti,davinci-nand"; > }; > }; > + > +&mmc0 { > + u-boot,dm-spl; > +}; > + > +&serial2 { > + u-boot,dm-spl; > +}; > diff --git a/arch/arm/dts/da850-lcdk.dts b/arch/arm/dts/da850-lcdk.dts > index 0177e3ed20..db8ae566f3 100644 > --- a/arch/arm/dts/da850-lcdk.dts > +++ b/arch/arm/dts/da850-lcdk.dts > @@ -18,7 +18,7 @@ > }; > > chosen { > - stdout-path = "serial2:115200n8"; > + stdout-path = &serial2; > }; > > memory@c000 { > -- > 2.20.1 > Hi Adam, the generated platdata has wrong driver names. I'm not sure how these are generated but at first glance it looks like the compatible string is transformed by converting commas and hyphens into underscores. This of course won't work as the real driver names are different and the lookup fails (with your patch - if I remove the serial U_BOOT_DEVICE() from the board file, the serial stops working). Are you aware of how other SPL users handle this? 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
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
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: [PATCH 2/4] mmc: davinci: drop struct davinci_mmc_plat
pt., 3 sty 2020 o 17:01 Adam Ford napisał(a): > > On Thu, Nov 14, 2019 at 9:10 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > struct mmc_config & struct mmc don't need to be exported over platform > > data, but can instead be private in the driver. > > > > Remove struct davinci_mmc_plat. > > This patch appears to break the da850-evm. > > With the pending release of 2020.01, is there any way we can revert > before release and try to apply this going forward with more time to > test? > > As of now, the da850-evm cannot read/write from the MMC card from > U-Boot which includes MMC booting. > This is strange, this change doesn't seem to affect the logic. This isn't revertible automatically anymore, due to other patches that came before and after. We can probably try to revert it manually. Bart
[U-Boot] [PATCH] davinci: omapl138_lcdk: increase PLL0 frequency
The LCDC controller on the lcdk board has high memory throughput requirements. Even with the kernel-side tweaks to master peripheral and peripheral bus burst priorities, the default PLL0 frquency of 300 MHz is not enough to service the LCD controller and causes DMA FIFO underflows. Increment the PLL0 multiplier to 37, resulting in PLL0 frequency of 456 MHz - the same value that downstream reference u-boot from Texas Instruments uses. Signed-off-by: Bartosz Golaszewski --- include/configs/omapl138_lcdk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index f751fe7..18abac0 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -75,7 +75,7 @@ #define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 #define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8003 -#define CONFIG_SYS_DA850_PLL0_PLLM 24 +#define CONFIG_SYS_DA850_PLL0_PLLM 37 #define CONFIG_SYS_DA850_PLL1_PLLM 21 /* -- 2.9.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: davinci_emac: convert to using the driver model
sob., 1 cze 2019 o 05:24 Adam Ford napisał(a): > > On Fri, May 31, 2019 at 8:32 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > Now that we removed all legacy boards selecting TI_EMAC we can > > completely convert the driver code to using the driver model. > > This patch also updates all remaining users of davinci_emac. > > > > I took a break from this to come back, and I'm going to give some > feedback about how the driver was written. I still do not know why I > cannot get an IP address with this patch on the AM3517-evm. > Hi Adam, thanks for all the testing. Unfortunately I can only test with da850-evm and da850-lcdk. I was wondering if it is possible that the problem is caused by cpu_eth_init() from ./arch/arm/mach-omap2/omap3/emac. not being called with CONFIG_DM_ETH? The comments say that it brings the module out of reset, so maybe this is what causes the problem you're seeing? > > Signed-off-by: Bartosz Golaszewski > > --- > > arch/arm/mach-davinci/cpu.c| 13 - > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > board/davinci/da8xxevm/da850evm.c | 6 -- > > board/davinci/da8xxevm/omapl138_lcdk.c | 14 - > > board/logicpd/am3517evm/am3517evm.c| 1 - > > board/ti/ti816x/evm.c | 3 +- > > configs/am3517_evm_defconfig | 1 + > > configs/da850evm_defconfig | 1 + > > configs/da850evm_direct_nor_defconfig | 1 + > > configs/da850evm_nand_defconfig| 1 + > > configs/omapl138_lcdk_defconfig| 1 + > > configs/ti816x_evm_defconfig | 1 + > > drivers/net/ti/davinci_emac.c | 77 ++ > > include/netdev.h | 1 - > > 14 files changed, 51 insertions(+), 73 deletions(-) > > > > diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c > > index f97ad3fc74..9fd6564d04 100644 > > --- a/arch/arm/mach-davinci/cpu.c > > +++ b/arch/arm/mach-davinci/cpu.c > > @@ -5,7 +5,6 @@ > > */ > > > > #include > > -#include > > #include > > #include > > > > @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) > > gd->bd->bi_dsp_freq = 0; > > return 0; > > } > > - > > -/* > > - * Initializes on-chip ethernet controllers. > > - * to override, implement board_eth_init() > > - */ > > -int cpu_eth_init(bd_t *bis) > > -{ > > -#if defined(CONFIG_DRIVER_TI_EMAC) > > - davinci_emac_initialize(); > > -#endif > > - return 0; > > -} > > diff --git a/arch/arm/mach-omap2/omap3/emac.c > > b/arch/arm/mach-omap2/omap3/emac.c > > index c79e870183..fb0c9188f5 100644 > > --- a/arch/arm/mach-omap2/omap3/emac.c > > +++ b/arch/arm/mach-omap2/omap3/emac.c > > @@ -7,7 +7,6 @@ > > */ > > > > #include > > -#include > > #include > > #include > > > > @@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis) > > reset &= ~CPGMACSS_SW_RST; > > writel(reset, &am35x_scm_general_regs->ip_sw_reset); > > > > - return davinci_emac_initialize(); > > + return 0; > > } > > diff --git a/board/davinci/da8xxevm/da850evm.c > > b/board/davinci/da8xxevm/da850evm.c > > index 1bc26828bf..d090c00466 100644 > > --- a/board/davinci/da8xxevm/da850evm.c > > +++ b/board/davinci/da8xxevm/da850evm.c > > @@ -13,7 +13,6 @@ > > #include > > #include > > #include > > -#include > > #include > > #include > > #include > > @@ -472,11 +471,6 @@ int board_eth_init(bd_t *bis) > > if (rmii_hw_init()) > > printf("RMII hardware init failed!!!\n"); > > #endif > > - if (!davinci_emac_initialize()) { > > - printf("Error: Ethernet init failed!\n"); > > - return -1; > > - } > > - > > return 0; > > } > > #endif /* CONFIG_DRIVER_TI_EMAC */ > > diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c > > b/board/davinci/da8xxevm/omapl138_lcdk.c > > index 2c2f885d43..ef9656add8 100644 > > --- a/board/davinci/da8xxevm/omapl138_lcdk.c > > +++ b/board/davinci/da8xxevm/omapl138_lcdk.c > > @@ -11,7 +11,6 @@ > > #include > > #include > > #include > > -#include > > #include > > #include > > #include > > @@ -229,19 +228,6 @@ int board_init(void) > > > > #ifdef CONFIG_DRIVER_TI_EMAC > > > > -/* > > -
Re: [U-Boot] [PATCH] net: davinci_emac: convert to using the driver model
pon., 3 cze 2019 o 15:03 Adam Ford napisał(a): > > On Mon, Jun 3, 2019 at 3:12 AM Bartosz Golaszewski wrote: > > > > sob., 1 cze 2019 o 05:24 Adam Ford napisał(a): > > > > > > On Fri, May 31, 2019 at 8:32 AM Bartosz Golaszewski wrote: > > > > > > > > From: Bartosz Golaszewski > > > > > > > > Now that we removed all legacy boards selecting TI_EMAC we can > > > > completely convert the driver code to using the driver model. > > > > This patch also updates all remaining users of davinci_emac. > > > > > > > > > > I took a break from this to come back, and I'm going to give some > > > feedback about how the driver was written. I still do not know why I > > > cannot get an IP address with this patch on the AM3517-evm. > > > > > > > Hi Adam, > > > > thanks for all the testing. Unfortunately I can only test with > > da850-evm and da850-lcdk. > > > > I was wondering if it is possible that the problem is caused by > > cpu_eth_init() from ./arch/arm/mach-omap2/omap3/emac. not being called > > with CONFIG_DM_ETH? The comments say that it brings the module out of > > reset, so maybe this is what causes the problem you're seeing? > > I looked into that nearly right away, but there is a chunk of code in > board/logicpd/am3517evm/am3517evm.c which has a function called > misc_init_r() which does the same thing. Looking through the debug > data, it appears as if the drive is communicating for a bit, but at > some point it dies. I'm not going to be able to look at it for a few > days. Is there any way you can submit a V2 to use #ifdef's to allow > users to use the same driver with and without DM_ETH? That would give > the da850/L138 boards the DM_ETH, and give me some time to > troubleshoot the am3517-evm. I know Sekhar works for TI and the AM3517 > was the official development kit for TI back in the day. If TI has > some ideas, I'm open to trying them as well when I can get back to it. > > adam Hi Adam, I'm trying to find out if I can get my hands on one of these boards somehow. My priority for this week is the nand driver conversion. I'll also be off next week and the one after. I think that since we already removed a bunch of boards to make it possible to avoid the ifdef hell, it's better to wait a bit more than to merge something that we'll remove soon anyway. If Sekhar agrees, we can push back merging of this patch until it's fixed. There's also a big backlog of my other davinci patches on the list anyway, maybe they'll get picked up before we get back to it. Bart > > > > > > > Signed-off-by: Bartosz Golaszewski > > > > --- > > > > arch/arm/mach-davinci/cpu.c| 13 - > > > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > > > board/davinci/da8xxevm/da850evm.c | 6 -- > > > > board/davinci/da8xxevm/omapl138_lcdk.c | 14 - > > > > board/logicpd/am3517evm/am3517evm.c| 1 - > > > > board/ti/ti816x/evm.c | 3 +- > > > > configs/am3517_evm_defconfig | 1 + > > > > configs/da850evm_defconfig | 1 + > > > > configs/da850evm_direct_nor_defconfig | 1 + > > > > configs/da850evm_nand_defconfig| 1 + > > > > configs/omapl138_lcdk_defconfig| 1 + > > > > configs/ti816x_evm_defconfig | 1 + > > > > drivers/net/ti/davinci_emac.c | 77 ++ > > > > include/netdev.h | 1 - > > > > 14 files changed, 51 insertions(+), 73 deletions(-) > > > > > > > > diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c > > > > index f97ad3fc74..9fd6564d04 100644 > > > > --- a/arch/arm/mach-davinci/cpu.c > > > > +++ b/arch/arm/mach-davinci/cpu.c > > > > @@ -5,7 +5,6 @@ > > > > */ > > > > > > > > #include > > > > -#include > > > > #include > > > > #include > > > > > > > > @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) > > > > gd->bd->bi_dsp_freq = 0; > > > > return 0; > > > > } > > > > - > > > > -/* > > > > - * Initializes on-chip ethernet controllers. > > > > - * to override, implement board_eth_init() > > > > - */ > > > > -int cpu_eth_init(bd_t *bis) > > > > -{ > > > > -#if defined(CONFIG_DRIVER_TI_EMAC)
[U-Boot] [PATCH 2/4] nand: davinci: add support for driver model
From: Bartosz Golaszewski Extend the davinci NAND driver to support the driver model. For now this doesn't add any device-tree parsing due to the fact that we can't access the actual nand node on the device-tree - it's a subnode of the aemif device and we don't have an aemif driver on davinci at the moment. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 46 - 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index e1c4498cb9..33c2f16be8 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -31,6 +31,7 @@ #include #include #include +#include #include /* Definitions for 4-bit hardware ECC */ @@ -785,10 +786,53 @@ static void davinci_nand_init(struct nand_chip *nand) nand->dev_ready = nand_davinci_dev_ready; } -int board_nand_init(struct nand_chip *chip) __attribute__((weak)); +#ifdef CONFIG_SYS_NAND_SELF_INIT +static int davinci_nand_probe(struct udevice *dev) +{ + struct nand_chip *nand = dev_get_priv(dev); + struct mtd_info *mtd = nand_to_mtd(nand); + int ret; + + nand->IO_ADDR_R = (void __iomem *)CONFIG_SYS_NAND_BASE; + nand->IO_ADDR_W = (void __iomem *)CONFIG_SYS_NAND_BASE; + + davinci_nand_init(nand); + + ret = nand_scan(mtd, CONFIG_SYS_NAND_MAX_CHIPS); + if (ret) + return ret; + + return nand_register(0, mtd); +} + +static const struct udevice_id davinci_nand_ids[] = { + { .compatible = "ti,davinci-nand" }, + { } +}; + +U_BOOT_DRIVER(davinci_nand) = { + .name = "davinci-nand", + .id = UCLASS_MTD, + .of_match = davinci_nand_ids, + .probe = davinci_nand_probe, + .priv_auto_alloc_size = sizeof(struct nand_chip), +}; + +void board_nand_init(void) +{ + struct udevice *dev; + int ret; + ret = uclass_get_device_by_driver(UCLASS_MTD, + DM_GET_DRIVER(davinci_nand), &dev); + if (ret && ret != -ENODEV) + pr_err("Failed to initialize %s: %d\n", dev->name, ret); +} +#else +int board_nand_init(struct nand_chip *chip) __attribute__((weak)); int board_nand_init(struct nand_chip *chip) { davinci_nand_init(chip); return 0; } +#endif /* CONFIG_SYS_NAND_SELF_INIT */ -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 0/4] nand: davinci: enable driver model for NAND
From: Bartosz Golaszewski This series enables the driver model for NAND on davinci da850 boards. The first patch is a simple tweak for an unnecessarily exported function. The second patch extends the NAND driver to support both legacy and driver-model users. For now we don't parse the device-tree as it's a bit complicated on da850, namely: the nand node is a child of the aemif node for which we don't have a driver in u-boot (unlike on linux where the aemif driver populates all its subnodes). In order for the nand device to be probed, we're adding a dummy node to the u-boot dts extensions with an appropriate compatible. Two last patches enable driver model for NAND on da850-lcdk and da850-evm. We don't enable the driver model in SPL as first: the patches enabling CONFIG_SPL_DM are still waiting to be merged, and second: the nand_spl_simple driver used by davinci SPL doesn't support driver model users. This is planned for future series once some basic support is merged. Bartosz Golaszewski (4): nand: davinci: make davinci_nand_init() static nand: davinci: add support for driver model davinci: omapl138-lcdk: enable driver model for NAND davinci: da850-evm: enable driver model for NAND arch/arm/dts/da850-evm-u-boot.dtsi| 4 ++ arch/arm/dts/da850-lcdk-u-boot.dtsi | 4 ++ arch/arm/include/asm/ti-common/davinci_nand.h | 2 - configs/da850evm_defconfig| 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/da850evm_nand_defconfig | 1 + configs/omapl138_lcdk_defconfig | 1 + drivers/mtd/nand/raw/davinci_nand.c | 48 ++- include/configs/da850evm.h| 4 ++ include/configs/omapl138_lcdk.h | 4 ++ 10 files changed, 66 insertions(+), 4 deletions(-) -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/4] nand: davinci: make davinci_nand_init() static
From: Bartosz Golaszewski This function is only used within the driver itself. No need to export it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/ti-common/davinci_nand.h | 2 -- drivers/mtd/nand/raw/davinci_nand.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/include/asm/ti-common/davinci_nand.h b/arch/arm/include/asm/ti-common/davinci_nand.h index e26381c7fd..28842c3b15 100644 --- a/arch/arm/include/asm/ti-common/davinci_nand.h +++ b/arch/arm/include/asm/ti-common/davinci_nand.h @@ -95,6 +95,4 @@ struct davinci_emif_regs { #define DAVINCI_ABCR_ASIZE_16BIT 1 #define DAVINCI_ABCR_ASIZE_8BIT0 -void davinci_nand_init(struct nand_chip *nand); - #endif diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index cfa9b535c8..e1c4498cb9 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -730,7 +730,7 @@ static int nand_davinci_dev_ready(struct mtd_info *mtd) return __raw_readl(&davinci_emif_regs->nandfsr) & 0x1; } -void davinci_nand_init(struct nand_chip *nand) +static void davinci_nand_init(struct nand_chip *nand) { #if defined CONFIG_KEYSTONE_RBL_NAND int i; -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/4] davinci: omapl138-lcdk: enable driver model for NAND
From: Bartosz Golaszewski Enable the driver-model on da850-lcdk. We need to add a dummy nand node to the device tree, as the real nand node is a sub-node of the aemif device. On linux the aemif driver populates all its child nodes, but we can't do it in u-boot currently. Signed-off-by: Bartosz Golaszewski --- arch/arm/dts/da850-lcdk-u-boot.dtsi | 4 configs/omapl138_lcdk_defconfig | 1 + include/configs/omapl138_lcdk.h | 4 3 files changed, 9 insertions(+) diff --git a/arch/arm/dts/da850-lcdk-u-boot.dtsi b/arch/arm/dts/da850-lcdk-u-boot.dtsi index 80dda8ef58..541f4ca200 100644 --- a/arch/arm/dts/da850-lcdk-u-boot.dtsi +++ b/arch/arm/dts/da850-lcdk-u-boot.dtsi @@ -9,4 +9,8 @@ aliases { i2c0 = &i2c0; }; + + nand { + compatible = "ti,davinci-nand"; + }; }; diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 48f251ebb8..94609f9a34 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -39,6 +39,7 @@ CONFIG_DM_I2C=y CONFIG_DM_I2C_COMPAT=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y +CONFIG_MTD=y CONFIG_NAND=y CONFIG_NAND_DAVINCI=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index da615e5063..a4dc060634 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -176,6 +176,10 @@ #define CONFIG_SPL_NAND_DRIVERS #define CONFIG_SPL_NAND_ECC #define CONFIG_SPL_NAND_LOAD + +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_NAND_SELF_INIT +#endif #endif #ifdef CONFIG_SYS_USE_NOR -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/4] davinci: da850-evm: enable driver model for NAND
From: Bartosz Golaszewski Enable the driver-model on da850-evm. We need to add a dummy nand node to the device tree, as the real nand node is a sub-node of the aemif device. On linux the aemif driver populates all its child nodes, but we can't do it in u-boot currently. Signed-off-by: Bartosz Golaszewski --- arch/arm/dts/da850-evm-u-boot.dtsi| 4 configs/da850evm_defconfig| 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/da850evm_nand_defconfig | 1 + include/configs/da850evm.h| 4 5 files changed, 11 insertions(+) diff --git a/arch/arm/dts/da850-evm-u-boot.dtsi b/arch/arm/dts/da850-evm-u-boot.dtsi index 1683f3472e..d9e8b9926a 100644 --- a/arch/arm/dts/da850-evm-u-boot.dtsi +++ b/arch/arm/dts/da850-evm-u-boot.dtsi @@ -10,6 +10,10 @@ soc@1c0 { u-boot,dm-spl; }; + + nand { + compatible = "ti,davinci-nand"; + }; }; &flash { diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig index c095058282..8a891eb8aa 100644 --- a/configs/da850evm_defconfig +++ b/configs/da850evm_defconfig @@ -52,6 +52,7 @@ CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y +CONFIG_MTD=y CONFIG_MTD_DEVICE=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig index 166e77b8e3..85c96f9951 100644 --- a/configs/da850evm_direct_nor_defconfig +++ b/configs/da850evm_direct_nor_defconfig @@ -42,6 +42,7 @@ CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y # CONFIG_MMC is not set +CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_SYS_FLASH_PROTECTION=y diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig index 7271016346..187087768f 100644 --- a/configs/da850evm_nand_defconfig +++ b/configs/da850evm_nand_defconfig @@ -49,6 +49,7 @@ CONFIG_DM_GPIO=y CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y CONFIG_DM_MMC=y +CONFIG_MTD=y CONFIG_NAND=y CONFIG_NAND_DAVINCI=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index ccdac0abec..b8556adbb1 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -182,6 +182,10 @@ #define CONFIG_SPL_NAND_DRIVERS #define CONFIG_SPL_NAND_ECC #define CONFIG_SPL_NAND_LOAD + +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_NAND_SELF_INIT +#endif #endif /* -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4] nand: davinci: enable driver model for NAND
czw., 6 cze 2019 o 17:58 Adam Ford napisał(a): > > On Thu, Jun 6, 2019 at 10:50 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > This series enables the driver model for NAND on davinci da850 boards. > > > > The first patch is a simple tweak for an unnecessarily exported function. > > > > The second patch extends the NAND driver to support both legacy and > > driver-model users. For now we don't parse the device-tree as it's a > > bit complicated on da850, namely: the nand node is a child of the > > aemif node for which we don't have a driver in u-boot (unlike on linux > > where the aemif driver populates all its subnodes). In order for the > > nand device to be probed, we're adding a dummy node to the u-boot dts > > extensions with an appropriate compatible. > > > > Two last patches enable driver model for NAND on da850-lcdk and da850-evm. > > We don't enable the driver model in SPL as first: the patches enabling > > CONFIG_SPL_DM are still waiting to be merged, and second: the > > nand_spl_simple driver used by davinci SPL doesn't support driver model > > users. This is planned for future series once some basic support is > > merged. > > What happens when the board is booting SPL from NAND? Will it still > work as expected? I know the da850-evm has at least one configuration > which this is intended to boot from NAND instead of the default SPI > flash. > The driver works just like before in SPL. The support for the driver model is added incrementally. In fact I tested it on da850-lcdk with SPL loading u-boot from NAND. On da850-evm we could probably enable driver-model in SPL as well for NAND, but I prefer to do it at once for both boards. Bart > adam > > > > > Bartosz Golaszewski (4): > > nand: davinci: make davinci_nand_init() static > > nand: davinci: add support for driver model > > davinci: omapl138-lcdk: enable driver model for NAND > > davinci: da850-evm: enable driver model for NAND > > > > arch/arm/dts/da850-evm-u-boot.dtsi| 4 ++ > > arch/arm/dts/da850-lcdk-u-boot.dtsi | 4 ++ > > arch/arm/include/asm/ti-common/davinci_nand.h | 2 - > > configs/da850evm_defconfig| 1 + > > configs/da850evm_direct_nor_defconfig | 1 + > > configs/da850evm_nand_defconfig | 1 + > > configs/omapl138_lcdk_defconfig | 1 + > > drivers/mtd/nand/raw/davinci_nand.c | 48 ++- > > include/configs/da850evm.h| 4 ++ > > include/configs/omapl138_lcdk.h | 4 ++ > > 10 files changed, 66 insertions(+), 4 deletions(-) > > > > -- > > 2.21.0 > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4] davinci: fix build warnings
pon., 27 maj 2019 o 10:57 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > There are several build warnings related to driver-model usage emitted > when building u-boot for da850-evm and da850-lcdk. This series fixes them > and - while we're at it - removes the i2c compatiblity layer as davinci > was the last user of it. > > Bartosz Golaszewski (4): > davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs > sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs > i2c: remove i2c driver-model compatibility layer > omapl138_lcdk_defconfig: don't build support for SPI > > Makefile | 7 -- > configs/da850_am18xxevm_defconfig | 1 - > configs/omapl138_lcdk_defconfig| 7 +- > configs/sandbox64_defconfig| 1 - > configs/sandbox_defconfig | 1 - > configs/sandbox_flattree_defconfig | 1 - > configs/sandbox_noblk_defconfig| 1 - > configs/sandbox_spl_defconfig | 1 - > configs/tools-only_defconfig | 1 - > drivers/i2c/Kconfig| 13 +-- > drivers/i2c/Makefile | 1 - > drivers/i2c/i2c-uclass-compat.c| 128 - > include/_exports.h | 3 +- > include/configs/am3517_evm.h | 1 - > include/configs/da850evm.h | 8 -- > include/configs/omapl138_lcdk.h| 8 -- > include/exports.h | 3 +- > include/i2c.h | 80 -- > 18 files changed, 4 insertions(+), 262 deletions(-) > delete mode 100644 drivers/i2c/i2c-uclass-compat.c > > -- > 2.21.0 > Ping Bart ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4] davinci: omapl138-lcdk: enable CONFIG_SPL_DM
wt., 28 maj 2019 o 11:58 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > This series enables the driver model in SPL on omapl138-lcdk. First two > patches enable size-reducing options in defconfig. The third patch is > just a cleanup of the board file. Last patch enables the driver model > and defines the serial device so that we don't have to disable > CONFIG_SPL_DM_SERIAL which is enabled by default when selecting > CONFIG_SPL_DM. > > Bartosz Golaszewski (4): > davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE > davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF > davinci: omapl138-lcdk: remove unneeded includes > davinci: omapl138-lcdk: enable driver-model in SPL > > board/davinci/da8xxevm/omapl138_lcdk.c | 18 -- > configs/omapl138_lcdk_defconfig| 7 +++ > 2 files changed, 23 insertions(+), 2 deletions(-) > > -- > 2.21.0 > Gentle ping Bart ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] net: davinci_emac: convert to using the driver model
śr., 12 cze 2019 o 18:46 Adam Ford napisał(a): > > On Mon, Jun 3, 2019 at 10:29 AM Bartosz Golaszewski wrote: > > > > pon., 3 cze 2019 o 15:03 Adam Ford napisał(a): > > > > > > On Mon, Jun 3, 2019 at 3:12 AM Bartosz Golaszewski wrote: > > > > > > > > sob., 1 cze 2019 o 05:24 Adam Ford napisał(a): > > > > > > > > > > On Fri, May 31, 2019 at 8:32 AM Bartosz Golaszewski > > > > > wrote: > > > > > > > > > > > > From: Bartosz Golaszewski > > > > > > > > > > > > Now that we removed all legacy boards selecting TI_EMAC we can > > > > > > completely convert the driver code to using the driver model. > > > > > > This patch also updates all remaining users of davinci_emac. > > > > > > > > > > > > > > > > I took a break from this to come back, and I'm going to give some > > > > > feedback about how the driver was written. I still do not know why I > > > > > cannot get an IP address with this patch on the AM3517-evm. > > > > > > > > > > > > > Hi Adam, > > > > > > > > thanks for all the testing. Unfortunately I can only test with > > > > da850-evm and da850-lcdk. > > > > > > > > I was wondering if it is possible that the problem is caused by > > > > cpu_eth_init() from ./arch/arm/mach-omap2/omap3/emac. not being called > > > > with CONFIG_DM_ETH? The comments say that it brings the module out of > > > > reset, so maybe this is what causes the problem you're seeing? > > > > > > I looked into that nearly right away, but there is a chunk of code in > > > board/logicpd/am3517evm/am3517evm.c which has a function called > > > misc_init_r() which does the same thing. Looking through the debug > > > data, it appears as if the drive is communicating for a bit, but at > > > some point it dies. I'm not going to be able to look at it for a few > > > days. Is there any way you can submit a V2 to use #ifdef's to allow > > > users to use the same driver with and without DM_ETH? That would give > > > the da850/L138 boards the DM_ETH, and give me some time to > > > troubleshoot the am3517-evm. I know Sekhar works for TI and the AM3517 > > > was the official development kit for TI back in the day. If TI has > > > some ideas, I'm open to trying them as well when I can get back to it. > > > > > > adam > > > > Hi Adam, > > > > I'm trying to find out if I can get my hands on one of these boards somehow. > > > > My priority for this week is the nand driver conversion. I'll also be > > off next week and the one after. I think that since we already removed > > a bunch of boards to make it possible to avoid the ifdef hell, it's > > better to wait a bit more than to merge something that we'll remove > > soon anyway. > > > > If Sekhar agrees, we can push back merging of this patch until it's fixed. > > > > There's also a big backlog of my other davinci patches on the list > > anyway, maybe they'll get picked up before we get back to it. > > > > Bart > > > > > > > > > > > > > > > Signed-off-by: Bartosz Golaszewski > > > > > > --- > > > > > > arch/arm/mach-davinci/cpu.c| 13 - > > > > > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > > > > > board/davinci/da8xxevm/da850evm.c | 6 -- > > > > > > board/davinci/da8xxevm/omapl138_lcdk.c | 14 - > > > > > > board/logicpd/am3517evm/am3517evm.c| 1 - > > > > > > board/ti/ti816x/evm.c | 3 +- > > > > > > configs/am3517_evm_defconfig | 1 + > > > > > > configs/da850evm_defconfig | 1 + > > > > > > configs/da850evm_direct_nor_defconfig | 1 + > > > > > > configs/da850evm_nand_defconfig| 1 + > > > > > > configs/omapl138_lcdk_defconfig| 1 + > > > > > > configs/ti816x_evm_defconfig | 1 + > > > > > > drivers/net/ti/davinci_emac.c | 77 > > > > > > ++ > > > > > > include/netdev.h | 1 - > > > > > > 14 files changed, 51 insertions(+), 73 deletions(-) > > > > &g
Re: [U-Boot] [PATCH] net: davinci_emac: convert to using the driver model
śr., 12 cze 2019 o 18:46 Adam Ford napisał(a): > > On Mon, Jun 3, 2019 at 10:29 AM Bartosz Golaszewski wrote: > > > > pon., 3 cze 2019 o 15:03 Adam Ford napisał(a): > > > > > > On Mon, Jun 3, 2019 at 3:12 AM Bartosz Golaszewski wrote: > > > > > > > > sob., 1 cze 2019 o 05:24 Adam Ford napisał(a): > > > > > > > > > > On Fri, May 31, 2019 at 8:32 AM Bartosz Golaszewski > > > > > wrote: > > > > > > > > > > > > From: Bartosz Golaszewski > > > > > > > > > > > > Now that we removed all legacy boards selecting TI_EMAC we can > > > > > > completely convert the driver code to using the driver model. > > > > > > This patch also updates all remaining users of davinci_emac. > > > > > > > > > > > > > > > > I took a break from this to come back, and I'm going to give some > > > > > feedback about how the driver was written. I still do not know why I > > > > > cannot get an IP address with this patch on the AM3517-evm. > > > > > > > > > > > > > Hi Adam, > > > > > > > > thanks for all the testing. Unfortunately I can only test with > > > > da850-evm and da850-lcdk. > > > > > > > > I was wondering if it is possible that the problem is caused by > > > > cpu_eth_init() from ./arch/arm/mach-omap2/omap3/emac. not being called > > > > with CONFIG_DM_ETH? The comments say that it brings the module out of > > > > reset, so maybe this is what causes the problem you're seeing? > > > > > > I looked into that nearly right away, but there is a chunk of code in > > > board/logicpd/am3517evm/am3517evm.c which has a function called > > > misc_init_r() which does the same thing. Looking through the debug > > > data, it appears as if the drive is communicating for a bit, but at > > > some point it dies. I'm not going to be able to look at it for a few > > > days. Is there any way you can submit a V2 to use #ifdef's to allow > > > users to use the same driver with and without DM_ETH? That would give > > > the da850/L138 boards the DM_ETH, and give me some time to > > > troubleshoot the am3517-evm. I know Sekhar works for TI and the AM3517 > > > was the official development kit for TI back in the day. If TI has > > > some ideas, I'm open to trying them as well when I can get back to it. > > > > > > adam > > > > Hi Adam, > > > > I'm trying to find out if I can get my hands on one of these boards somehow. > > > > My priority for this week is the nand driver conversion. I'll also be > > off next week and the one after. I think that since we already removed > > a bunch of boards to make it possible to avoid the ifdef hell, it's > > better to wait a bit more than to merge something that we'll remove > > soon anyway. > > > > If Sekhar agrees, we can push back merging of this patch until it's fixed. > > > > There's also a big backlog of my other davinci patches on the list > > anyway, maybe they'll get picked up before we get back to it. > > > > Bart > > > > > > > > > > > > > > > Signed-off-by: Bartosz Golaszewski > > > > > > --- > > > > > > arch/arm/mach-davinci/cpu.c| 13 - > > > > > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > > > > > board/davinci/da8xxevm/da850evm.c | 6 -- > > > > > > board/davinci/da8xxevm/omapl138_lcdk.c | 14 - > > > > > > board/logicpd/am3517evm/am3517evm.c| 1 - > > > > > > board/ti/ti816x/evm.c | 3 +- > > > > > > configs/am3517_evm_defconfig | 1 + > > > > > > configs/da850evm_defconfig | 1 + > > > > > > configs/da850evm_direct_nor_defconfig | 1 + > > > > > > configs/da850evm_nand_defconfig| 1 + > > > > > > configs/omapl138_lcdk_defconfig| 1 + > > > > > > configs/ti816x_evm_defconfig | 1 + > > > > > > drivers/net/ti/davinci_emac.c | 77 > > > > > > ++ > > > > > > include/netdev.h | 1 - > > > > > > 14 files changed, 51 insertions(+), 73 deletions(-) > > > > &g
[U-Boot] [PATCH v2] net: davinci_emac: convert to using the driver model
From: Bartosz Golaszewski Now that we removed all legacy boards selecting TI_EMAC we can completely convert the driver code to using the driver model. This patch also updates all remaining users of davinci_emac. Signed-off-by: Bartosz Golaszewski --- v1 -> v2: - moved the packetp assignment to the top of the recv() callback which fixes a crash on am3517_evm - dropped a redundant call to net_process_received_packet(): this is already called from eth core Thanks goes to Adam Ford for much appreciated testing and help. Tested on da850-lcdk and da850-evm. arch/arm/mach-davinci/cpu.c| 13 - arch/arm/mach-omap2/omap3/emac.c | 3 +- board/davinci/da8xxevm/da850evm.c | 6 -- board/davinci/da8xxevm/omapl138_lcdk.c | 14 - board/logicpd/am3517evm/am3517evm.c| 1 - board/ti/ti816x/evm.c | 3 +- configs/am3517_evm_defconfig | 1 + configs/da850evm_defconfig | 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/da850evm_nand_defconfig| 1 + configs/omapl138_lcdk_defconfig| 1 + configs/ti816x_evm_defconfig | 1 + drivers/net/ti/davinci_emac.c | 77 ++ include/netdev.h | 1 - 14 files changed, 50 insertions(+), 74 deletions(-) diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c index f97ad3fc74..9fd6564d04 100644 --- a/arch/arm/mach-davinci/cpu.c +++ b/arch/arm/mach-davinci/cpu.c @@ -5,7 +5,6 @@ */ #include -#include #include #include @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) gd->bd->bi_dsp_freq = 0; return 0; } - -/* - * Initializes on-chip ethernet controllers. - * to override, implement board_eth_init() - */ -int cpu_eth_init(bd_t *bis) -{ -#if defined(CONFIG_DRIVER_TI_EMAC) - davinci_emac_initialize(); -#endif - return 0; -} diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c index c79e870183..fb0c9188f5 100644 --- a/arch/arm/mach-omap2/omap3/emac.c +++ b/arch/arm/mach-omap2/omap3/emac.c @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis) reset &= ~CPGMACSS_SW_RST; writel(reset, &am35x_scm_general_regs->ip_sw_reset); - return davinci_emac_initialize(); + return 0; } diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index a90b7a3538..a5c583444d 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -472,11 +471,6 @@ int board_eth_init(bd_t *bis) if (rmii_hw_init()) printf("RMII hardware init failed!!!\n"); #endif - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } - return 0; } #endif /* CONFIG_DRIVER_TI_EMAC */ diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index fe1bf44101..dd11551428 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -229,19 +228,6 @@ int board_init(void) #ifdef CONFIG_DRIVER_TI_EMAC -/* - * Initializes on-board ethernet controllers. - */ -int board_eth_init(bd_t *bis) -{ - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } - - return 0; -} - #endif /* CONFIG_DRIVER_TI_EMAC */ #define CFG_MAC_ADDR_SPI_BUS 0 diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index 10031a4801..bfd4e78274 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "am3517evm.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c index 07a084bab8..240df8cbe1 100644 --- a/board/ti/ti816x/evm.c +++ b/board/ti/ti816x/evm.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ int board_eth_init(bd_t *bis) printf("Unable to read MAC address. Set \n"); } - return davinci_emac_initialize(); + return 0; } #ifdef CONFIG_SPL_BUILD diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig index b9f59f3291..5cb76322df 100644 --- a/configs/am3517_evm_defconfig +++ b/configs/am3517_evm_defconfig @@ -44,6 +44,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x8 CONFIG_SPL_NAND_SIMPLE=y +CONFIG_DM_ETH=y CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y CONFIG_PINCTRL=y diff --git a/co
Re: [U-Boot] [PATCH] net: davinci_emac: convert to using the driver model
pon., 24 cze 2019 o 15:39 Adam Ford napisał(a): > > On Mon, Jun 24, 2019 at 7:07 AM Bartosz Golaszewski wrote: > > > > śr., 12 cze 2019 o 18:46 Adam Ford napisał(a): > > > > > > On Mon, Jun 3, 2019 at 10:29 AM Bartosz Golaszewski wrote: > > > > > > > > pon., 3 cze 2019 o 15:03 Adam Ford napisał(a): > > > > > > > > > > On Mon, Jun 3, 2019 at 3:12 AM Bartosz Golaszewski > > > > > wrote: > > > > > > > > > > > > sob., 1 cze 2019 o 05:24 Adam Ford napisał(a): > > > > > > > > > > > > > > On Fri, May 31, 2019 at 8:32 AM Bartosz Golaszewski > > > > > > > wrote: > > > > > > > > > > > > > > > > From: Bartosz Golaszewski > > > > > > > > > > > > > > > > Now that we removed all legacy boards selecting TI_EMAC we can > > > > > > > > completely convert the driver code to using the driver model. > > > > > > > > This patch also updates all remaining users of davinci_emac. > > > > > > > > > > > > > > > > > > > > > > I took a break from this to come back, and I'm going to give some > > > > > > > feedback about how the driver was written. I still do not know > > > > > > > why I > > > > > > > cannot get an IP address with this patch on the AM3517-evm. > > > > > > > > > > > > > > > > > > > Hi Adam, > > > > > > > > > > > > thanks for all the testing. Unfortunately I can only test with > > > > > > da850-evm and da850-lcdk. > > > > > > > > > > > > I was wondering if it is possible that the problem is caused by > > > > > > cpu_eth_init() from ./arch/arm/mach-omap2/omap3/emac. not being > > > > > > called > > > > > > with CONFIG_DM_ETH? The comments say that it brings the module out > > > > > > of > > > > > > reset, so maybe this is what causes the problem you're seeing? > > > > > > > > > > I looked into that nearly right away, but there is a chunk of code in > > > > > board/logicpd/am3517evm/am3517evm.c which has a function called > > > > > misc_init_r() which does the same thing. Looking through the debug > > > > > data, it appears as if the drive is communicating for a bit, but at > > > > > some point it dies. I'm not going to be able to look at it for a few > > > > > days. Is there any way you can submit a V2 to use #ifdef's to allow > > > > > users to use the same driver with and without DM_ETH? That would give > > > > > the da850/L138 boards the DM_ETH, and give me some time to > > > > > troubleshoot the am3517-evm. I know Sekhar works for TI and the AM3517 > > > > > was the official development kit for TI back in the day. If TI has > > > > > some ideas, I'm open to trying them as well when I can get back to it. > > > > > > > > > > adam > > > > > > > > Hi Adam, > > > > > > > > I'm trying to find out if I can get my hands on one of these boards > > > > somehow. > > > > > > > > My priority for this week is the nand driver conversion. I'll also be > > > > off next week and the one after. I think that since we already removed > > > > a bunch of boards to make it possible to avoid the ifdef hell, it's > > > > better to wait a bit more than to merge something that we'll remove > > > > soon anyway. > > > > > > > > If Sekhar agrees, we can push back merging of this patch until it's > > > > fixed. > > > > > > > > There's also a big backlog of my other davinci patches on the list > > > > anyway, maybe they'll get picked up before we get back to it. > > > > > > > > Bart > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Bartosz Golaszewski > > > > > > > > --- > > > > > > > > arch/arm/mach-davinci/cpu.c| 13 - > > > > > > > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > > > > > > > board/davinci/da8xxevm/da850evm.c | 6 -- &g
[U-Boot] [PATCH 0/5] arm: remove leftover code for dm* SoCs
From: Bartosz Golaszewski Commit 6761946fb716 ("arm: Remove unmaintained davinci boards") removed support for certain DaVinci platforms. We still want to support the da850 chips though and I'm currently working on converting all remaining drivers to using the driver model (please don't remove it yet :)). This series is the first step: let's remove all leftover dead code. This will make things easier when adding support for driver model to NAND and EMAC drivers. Bartosz Golaszewski (5): net: davinci_emac: drop support for unused PHYs arm: davinci: remove dead code for PHYs used by DaVinci DM* boards nand: davinci: remove dead code for dm644x usb: musb_hcd: remove unnecessary ifdefs for dm* SoCs arm: davinci: remove leftover code for dm* SoCs arch/arm/mach-davinci/Makefile| 1 - arch/arm/mach-davinci/cpu.c | 116 - arch/arm/mach-davinci/dm355.c | 29 -- arch/arm/mach-davinci/dm365.c | 19 - arch/arm/mach-davinci/dm365_lowlevel.c| 459 -- arch/arm/mach-davinci/dm644x.c| 80 --- arch/arm/mach-davinci/dm646x.c| 25 - arch/arm/mach-davinci/dp83848.c | 127 - arch/arm/mach-davinci/et1011c.c | 41 -- .../mach-davinci/include/mach/davinci_misc.h | 4 +- .../arm/mach-davinci/include/mach/emac_defs.h | 56 --- arch/arm/mach-davinci/include/mach/gpio.h | 14 +- arch/arm/mach-davinci/include/mach/hardware.h | 216 - arch/arm/mach-davinci/include/mach/i2c_defs.h | 4 - .../mach-davinci/include/mach/syscfg_defs.h | 49 -- arch/arm/mach-davinci/ksz8873.c | 52 -- arch/arm/mach-davinci/lxt972.c| 112 - arch/arm/mach-davinci/misc.c | 5 +- arch/arm/mach-davinci/psc.c | 76 --- arch/arm/mach-davinci/spl.c | 5 - drivers/mtd/nand/raw/davinci_nand.c | 39 -- drivers/net/ti/davinci_emac.c | 55 +-- drivers/usb/musb/musb_hcd.c | 6 - 23 files changed, 9 insertions(+), 1581 deletions(-) delete mode 100644 arch/arm/mach-davinci/dm355.c delete mode 100644 arch/arm/mach-davinci/dm365.c delete mode 100644 arch/arm/mach-davinci/dm365_lowlevel.c delete mode 100644 arch/arm/mach-davinci/dm644x.c delete mode 100644 arch/arm/mach-davinci/dm646x.c delete mode 100644 arch/arm/mach-davinci/dp83848.c delete mode 100644 arch/arm/mach-davinci/et1011c.c delete mode 100644 arch/arm/mach-davinci/include/mach/syscfg_defs.h delete mode 100644 arch/arm/mach-davinci/ksz8873.c delete mode 100644 arch/arm/mach-davinci/lxt972.c -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/5] net: davinci_emac: drop support for unused PHYs
From: Bartosz Golaszewski The boards with SoCs from the DaVinci DM* family used to come with different PHYs that needed special support implemented in mach-davinci. Since the support for these chips has long been removed, we can now drop this unnused code from the emac driver. Signed-off-by: Bartosz Golaszewski --- drivers/net/ti/davinci_emac.c | 55 --- 1 file changed, 6 insertions(+), 49 deletions(-) diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c index bb879d8d4f..9d53984973 100644 --- a/drivers/net/ti/davinci_emac.c +++ b/drivers/net/ti/davinci_emac.c @@ -816,55 +816,12 @@ int davinci_emac_initialize(void) phy_id |= tmp & 0x; - switch (phy_id) { -#ifdef PHY_KSZ8873 - case PHY_KSZ8873: - sprintf(phy[i].name, "KSZ8873 @ 0x%02x", - active_phy_addr[i]); - phy[i].init = ksz8873_init_phy; - phy[i].is_phy_connected = ksz8873_is_phy_connected; - phy[i].get_link_speed = ksz8873_get_link_speed; - phy[i].auto_negotiate = ksz8873_auto_negotiate; - break; -#endif -#ifdef PHY_LXT972 - case PHY_LXT972: - sprintf(phy[i].name, "LXT972 @ 0x%02x", - active_phy_addr[i]); - phy[i].init = lxt972_init_phy; - phy[i].is_phy_connected = lxt972_is_phy_connected; - phy[i].get_link_speed = lxt972_get_link_speed; - phy[i].auto_negotiate = lxt972_auto_negotiate; - break; -#endif -#ifdef PHY_DP83848 - case PHY_DP83848: - sprintf(phy[i].name, "DP83848 @ 0x%02x", - active_phy_addr[i]); - phy[i].init = dp83848_init_phy; - phy[i].is_phy_connected = dp83848_is_phy_connected; - phy[i].get_link_speed = dp83848_get_link_speed; - phy[i].auto_negotiate = dp83848_auto_negotiate; - break; -#endif -#ifdef PHY_ET1011C - case PHY_ET1011C: - sprintf(phy[i].name, "ET1011C @ 0x%02x", - active_phy_addr[i]); - phy[i].init = gen_init_phy; - phy[i].is_phy_connected = gen_is_phy_connected; - phy[i].get_link_speed = et1011c_get_link_speed; - phy[i].auto_negotiate = gen_auto_negotiate; - break; -#endif - default: - sprintf(phy[i].name, "GENERIC @ 0x%02x", - active_phy_addr[i]); - phy[i].init = gen_init_phy; - phy[i].is_phy_connected = gen_is_phy_connected; - phy[i].get_link_speed = gen_get_link_speed; - phy[i].auto_negotiate = gen_auto_negotiate; - } + sprintf(phy[i].name, "GENERIC @ 0x%02x", + active_phy_addr[i]); + phy[i].init = gen_init_phy; + phy[i].is_phy_connected = gen_is_phy_connected; + phy[i].get_link_speed = gen_get_link_speed; + phy[i].auto_negotiate = gen_auto_negotiate; debug("Ethernet PHY: %s\n", phy[i].name); -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/5] arm: davinci: remove dead code for PHYs used by DaVinci DM* boards
From: Bartosz Golaszewski The support for DaVinci DM* boards has been dropped a while ago. The code for all those PHYs is no longer used and they have their own proper PHY drivers in drivers/net/phy anyway. Remove all dead code. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/Makefile| 1 - arch/arm/mach-davinci/dp83848.c | 127 -- arch/arm/mach-davinci/et1011c.c | 41 -- .../arm/mach-davinci/include/mach/emac_defs.h | 21 --- arch/arm/mach-davinci/ksz8873.c | 52 --- arch/arm/mach-davinci/lxt972.c| 112 --- 6 files changed, 354 deletions(-) delete mode 100644 arch/arm/mach-davinci/dp83848.c delete mode 100644 arch/arm/mach-davinci/et1011c.c delete mode 100644 arch/arm/mach-davinci/ksz8873.c delete mode 100644 arch/arm/mach-davinci/lxt972.c diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index df43b1d7e0..6887fe05dd 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile @@ -12,7 +12,6 @@ obj-$(CONFIG_SOC_DM365) += dm365.o obj-$(CONFIG_SOC_DM644X) += dm644x.o obj-$(CONFIG_SOC_DM646X) += dm646x.o obj-$(CONFIG_SOC_DA850)+= da850_pinmux.o -obj-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_FRAMEWORK)+= spl.o diff --git a/arch/arm/mach-davinci/dp83848.c b/arch/arm/mach-davinci/dp83848.c deleted file mode 100644 index 7115d7bad2..00 --- a/arch/arm/mach-davinci/dp83848.c +++ /dev/null @@ -1,127 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * National Semiconductor DP83848 PHY Driver for TI DaVinci - * (TMS320DM644x) based boards. - * - * Copyright (C) 2007 Sergey Kubushyn - * - * - */ - -#include -#include -#include -#include -#include "../../../drivers/net/ti/davinci_emac.h" - -#ifdef CONFIG_DRIVER_TI_EMAC - -#ifdef CONFIG_CMD_NET - -int dp83848_is_phy_connected(int phy_addr) -{ - u_int16_t id1, id2; - - if (!davinci_eth_phy_read(phy_addr, DP83848_PHYID1_REG, &id1)) - return(0); - if (!davinci_eth_phy_read(phy_addr, DP83848_PHYID2_REG, &id2)) - return(0); - - if ((id1 == DP83848_PHYID1_OUI) && (id2 == DP83848_PHYID2_OUI)) - return(1); - - return(0); -} - -int dp83848_get_link_speed(int phy_addr) -{ - u_int16_t tmp; - volatile emac_regs* emac = (emac_regs *)EMAC_BASE_ADDR; - - if (!davinci_eth_phy_read(phy_addr, DP83848_STAT_REG, &tmp)) - return(0); - - if (!(tmp & DP83848_LINK_STATUS)) /* link up? */ - return(0); - - if (!davinci_eth_phy_read(phy_addr, DP83848_PHY_STAT_REG, &tmp)) - return(0); - - /* Speed doesn't matter, there is no setting for it in EMAC... */ - if (tmp & DP83848_DUPLEX) { - /* set DM644x EMAC for Full Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | - EMAC_MACCONTROL_FULLDUPLEX_ENABLE; - } else { - /*set DM644x EMAC for Half Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE; - } - - return(1); -} - - -int dp83848_init_phy(int phy_addr) -{ - int ret = 1; - - if (!dp83848_get_link_speed(phy_addr)) { - /* Try another time */ - udelay(10); - ret = dp83848_get_link_speed(phy_addr); - } - - /* Disable PHY Interrupts */ - davinci_eth_phy_write(phy_addr, DP83848_PHY_INTR_CTRL_REG, 0); - - return(ret); -} - - -int dp83848_auto_negotiate(int phy_addr) -{ - u_int16_t tmp; - - - if (!davinci_eth_phy_read(phy_addr, DP83848_CTL_REG, &tmp)) - return(0); - - /* Restart Auto_negotiation */ - tmp &= ~DP83848_AUTONEG;/* remove autonegotiation enable */ - tmp |= DP83848_ISOLATE; /* Electrically isolate PHY */ - davinci_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp); - - /* Set the Auto_negotiation Advertisement Register -* MII advertising for Next page, 100BaseTxFD and HD, -* 10BaseTFD and HD, IEEE 802.3 -*/ - tmp = DP83848_NP | DP83848_TX_FDX | DP83848_TX_HDX | - DP83848_10_FDX | DP83848_10_HDX | DP83848_AN_IEEE_802_3; - davinci_eth_phy_write(phy_addr, DP83848_ANA_REG, tmp); - - - /* Read Control Register */ - if (!davinci_eth_phy_read(phy_addr, DP83848_CTL_REG, &tmp)) - return(0); - - tmp |= DP83848_SPEED_SELECT | DP83848_AUTONEG | DP83848_DUPLEX_MODE; - davinci_eth_phy_write(phy_addr, DP83848_CTL_REG, tmp); - - /* Restart Auto_negotiation */ - tmp |= DP83848_RESTART_AUTONEG; - davinci_eth_phy_write(phy_addr
[U-Boot] [PATCH 5/5] arm: davinci: remove leftover code for dm* SoCs
From: Bartosz Golaszewski The support for DaVinci DM* SoCs has been dropped a while ago. There's still a lot of leftover code in mach-davinci though. Entirely remove certain files and modify the common code to no longer reference unsupported chips. Note: all DaVinci platforms supported in u-boot now define SOC_DA8XX but not all define SOC_DA850 (e.g. omapl138). We can safely remove all ifdefs for the former, but let's leave the ones for the latter. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/cpu.c | 116 - arch/arm/mach-davinci/dm355.c | 29 -- arch/arm/mach-davinci/dm365.c | 19 - arch/arm/mach-davinci/dm365_lowlevel.c| 459 -- arch/arm/mach-davinci/dm644x.c| 80 --- arch/arm/mach-davinci/dm646x.c| 25 - .../mach-davinci/include/mach/davinci_misc.h | 4 +- .../arm/mach-davinci/include/mach/emac_defs.h | 35 -- arch/arm/mach-davinci/include/mach/gpio.h | 14 +- arch/arm/mach-davinci/include/mach/hardware.h | 216 - arch/arm/mach-davinci/include/mach/i2c_defs.h | 4 - .../mach-davinci/include/mach/syscfg_defs.h | 49 -- arch/arm/mach-davinci/misc.c | 5 +- arch/arm/mach-davinci/psc.c | 76 --- arch/arm/mach-davinci/spl.c | 5 - 15 files changed, 3 insertions(+), 1133 deletions(-) delete mode 100644 arch/arm/mach-davinci/dm355.c delete mode 100644 arch/arm/mach-davinci/dm365.c delete mode 100644 arch/arm/mach-davinci/dm365_lowlevel.c delete mode 100644 arch/arm/mach-davinci/dm644x.c delete mode 100644 arch/arm/mach-davinci/dm646x.c delete mode 100644 arch/arm/mach-davinci/include/mach/syscfg_defs.h diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c index aca2f2961d..f97ad3fc74 100644 --- a/arch/arm/mach-davinci/cpu.c +++ b/arch/arm/mach-davinci/cpu.c @@ -27,25 +27,6 @@ DECLARE_GLOBAL_DATA_PTR; #define PLLC_PLLDIV8 0x170 #define PLLC_PLLDIV9 0x174 -/* SOC-specific pll info */ -#ifdef CONFIG_SOC_DM355 -#define ARM_PLLDIV PLLC_PLLDIV1 -#define DDR_PLLDIV PLLC_PLLDIV1 -#endif - -#ifdef CONFIG_SOC_DM644X -#define ARM_PLLDIV PLLC_PLLDIV2 -#define DSP_PLLDIV PLLC_PLLDIV1 -#define DDR_PLLDIV PLLC_PLLDIV2 -#endif - -#ifdef CONFIG_SOC_DM646X -#define DSP_PLLDIV PLLC_PLLDIV1 -#define ARM_PLLDIV PLLC_PLLDIV2 -#define DDR_PLLDIV PLLC_PLLDIV1 -#endif - -#ifdef CONFIG_SOC_DA8XX unsigned int sysdiv[9] = { PLLC_PLLDIV1, PLLC_PLLDIV2, PLLC_PLLDIV3, PLLC_PLLDIV4, PLLC_PLLDIV5, PLLC_PLLDIV6, PLLC_PLLDIV7, PLLC_PLLDIV8, PLLC_PLLDIV9 @@ -110,103 +91,6 @@ int set_cpu_clk_info(void) return 0; } -#else /* CONFIG_SOC_DA8XX */ - -static unsigned pll_div(volatile void *pllbase, unsigned offset) -{ - u32 div; - - div = REG(pllbase + offset); - return (div & BIT(15)) ? (1 + (div & 0x1f)) : 1; -} - -static inline unsigned pll_prediv(volatile void *pllbase) -{ -#ifdef CONFIG_SOC_DM355 - /* this register read seems to fail on pll0 */ - if (pllbase == (volatile void *)DAVINCI_PLL_CNTRL0_BASE) - return 8; - else - return pll_div(pllbase, PLLC_PREDIV); -#elif defined(CONFIG_SOC_DM365) - return pll_div(pllbase, PLLC_PREDIV); -#endif - return 1; -} - -static inline unsigned pll_postdiv(volatile void *pllbase) -{ -#if defined(CONFIG_SOC_DM355) || defined(CONFIG_SOC_DM365) - return pll_div(pllbase, PLLC_POSTDIV); -#elif defined(CONFIG_SOC_DM6446) - if (pllbase == (volatile void *)DAVINCI_PLL_CNTRL0_BASE) - return pll_div(pllbase, PLLC_POSTDIV); -#endif - return 1; -} - -static unsigned pll_sysclk_mhz(unsigned pll_addr, unsigned div) -{ - volatile void *pllbase = (volatile void *) pll_addr; -#ifdef CONFIG_SOC_DM646X - unsignedbase = CONFIG_REFCLK_FREQ / 1000; -#else - unsignedbase = CONFIG_SYS_HZ_CLOCK / 1000; -#endif - - /* the PLL might be bypassed */ - if (readl(pllbase + PLLC_PLLCTL) & BIT(0)) { - base /= pll_prediv(pllbase); -#if defined(CONFIG_SOC_DM365) - base *= 2 * (readl(pllbase + PLLC_PLLM) & 0x0ff); -#else - base *= 1 + (REG(pllbase + PLLC_PLLM) & 0x0ff); -#endif - base /= pll_postdiv(pllbase); - } - return DIV_ROUND_UP(base, 1000 * pll_div(pllbase, div)); -} - -#ifdef DAVINCI_DM6467EVM -unsigned int davinci_arm_clk_get() -{ - return pll_sysclk_mhz(DAVINCI_PLL_CNTRL0_BASE, ARM_PLLDIV) * 100; -} -#endif - -#if defined(CONFIG_SOC_DM365) -unsigned int davinci_clk_get(unsigned int div) -{ - return pll_sysclk_mhz(DAVINCI_PLL_CNTRL0_BASE, div) * 100; -} -#endif - -int set_cpu_clk_info(void) -{ - unsigned int pllbase = DAVINCI_PLL_CNTRL0_BASE; -#if defined(CONFIG_SOC_DM365) - pllbase = DAVINCI_PLL_CNTRL1_BASE; -#endif - gd->bd->
[U-Boot] [PATCH 4/5] usb: musb_hcd: remove unnecessary ifdefs for dm* SoCs
From: Bartosz Golaszewski The support for DaVinci DM* SoCs has been dropped. The ifdefs in the musb_hcd driver are no longer needed. Remove them. Signed-off-by: Bartosz Golaszewski --- drivers/usb/musb/musb_hcd.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 2ee0f23b7e..1f2805270a 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -327,9 +327,7 @@ static int ctrlreq_out_data_phase(struct usb_device *dev, u32 len, void *buffer) csr = readw(&musbr->txcsr); csr |= MUSB_CSR0_TXPKTRDY; -#if !defined(CONFIG_SOC_DM365) csr |= MUSB_CSR0_H_DIS_PING; -#endif writew(csr, &musbr->txcsr); result = wait_until_ep0_ready(dev, MUSB_CSR0_TXPKTRDY); if (result < 0) @@ -352,9 +350,7 @@ static int ctrlreq_out_status_phase(struct usb_device *dev) /* Set the StatusPkt bit */ csr = readw(&musbr->txcsr); csr |= (MUSB_CSR0_TXPKTRDY | MUSB_CSR0_H_STATUSPKT); -#if !defined(CONFIG_SOC_DM365) csr |= MUSB_CSR0_H_DIS_PING; -#endif writew(csr, &musbr->txcsr); /* Wait until TXPKTRDY bit is cleared */ @@ -372,9 +368,7 @@ static int ctrlreq_in_status_phase(struct usb_device *dev) /* Set the StatusPkt bit and ReqPkt bit */ csr = MUSB_CSR0_H_REQPKT | MUSB_CSR0_H_STATUSPKT; -#if !defined(CONFIG_SOC_DM365) csr |= MUSB_CSR0_H_DIS_PING; -#endif writew(csr, &musbr->txcsr); result = wait_until_ep0_ready(dev, MUSB_CSR0_H_REQPKT); -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/5] nand: davinci: remove dead code for dm644x
From: Bartosz Golaszewski The support for DaVinci DM* SoCs has been dropped. The code that used to be relevant to dm644x is no longer needed. Remove it. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 39 - 1 file changed, 39 deletions(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index e6a84a52b4..cfa9b535c8 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -730,43 +730,6 @@ static int nand_davinci_dev_ready(struct mtd_info *mtd) return __raw_readl(&davinci_emif_regs->nandfsr) & 0x1; } -static void nand_flash_init(void) -{ - /* This is for DM6446 EVM and *very* similar. DO NOT GROW THIS! -* Instead, have your board_init() set EMIF timings, based on its -* knowledge of the clocks and what devices are hooked up ... and -* don't even do that unless no UBL handled it. -*/ -#ifdef CONFIG_SOC_DM644X - u_int32_t acfg1 = 0x3ffc; - - /*--* -* NAND FLASH CHIP TIMEOUT @ 459 MHz * -* * -* AEMIF.CLK freq = PLL1/6 = 459/6 = 76.5 MHz* -* AEMIF.CLK period = 1/76.5 MHz = 13.1 ns * -* * -*--*/ -acfg1 = 0 - | (0 << 31) /* selectStrobe */ - | (0 << 30) /* extWait */ - | (1 << 26) /* writeSetup 10 ns */ - | (3 << 20) /* writeStrobe 40 ns */ - | (1 << 17) /* writeHold10 ns */ - | (1 << 13) /* readSetup10 ns */ - | (5 << 7) /* readStrobe 60 ns */ - | (1 << 4) /* readHold 10 ns */ - | (3 << 2) /* turnAround ?? ns */ - | (0 << 0) /* asyncSize8-bit bus */ - ; - - __raw_writel(acfg1, &davinci_emif_regs->ab1cr); /* CS2 */ - - /* NAND flash on CS2 */ - __raw_writel(0x0101, &davinci_emif_regs->nandfcr); -#endif -} - void davinci_nand_init(struct nand_chip *nand) { #if defined CONFIG_KEYSTONE_RBL_NAND @@ -820,8 +783,6 @@ void davinci_nand_init(struct nand_chip *nand) nand->write_buf = nand_davinci_write_buf; nand->dev_ready = nand_davinci_dev_ready; - - nand_flash_init(); } int board_nand_init(struct nand_chip *chip) __attribute__((weak)); -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] README: davinci: update the documentation for DaVinci
From: Bartosz Golaszewski The DM* family of SOCs is no longer supported. We now support the omap-l138 lcdk board and Lego EV3 platform. Reflect those changes in the README. Signed-off-by: Bartosz Golaszewski --- doc/README.davinci | 125 - 1 file changed, 22 insertions(+), 103 deletions(-) diff --git a/doc/README.davinci b/doc/README.davinci index aa7c85011a..6522c24eea 100644 --- a/doc/README.davinci +++ b/doc/README.davinci @@ -1,108 +1,47 @@ Summary === -This README is about U-Boot support for TI's ARM 926EJS based family of SoCs. -These SOCs are used for cameras, video security and surveillance, DVR's, etc. -DaVinci SOC's comprise of DM644x, DM646x, DM35x and DM36x series of SOC's -Additionally there are some SOCs meant for the audio market which though have -an OMAP part number are very similar to the DaVinci series of SOC's -Additionally, some family members contain a TI DSP and/or graphics -co processors along with a host of other peripherals. +Note: this document used to be about the entire family of DaVinci SOCs but the +support for the DM* family and DA830 has since been dropped. -Currently the following boards are supported: - -* TI DaVinci DM644x EVM - -* TI DaVinci DM646x EVM - -* TI DaVinci DM355 EVM - -* TI DaVinci DM365 EVM +This README is about U-Boot support for TI's DA850 SoC. This SOC has an OMAP +part number but is very similar to the DaVinci series. -* TI DA830 EVM +Currently the following boards are supported: * TI DA850 EVM -* DM355 based Leopard board - -* DM644x based schmoogie board - -* DM644x based sffsdr board +* TI OMAP-L138 LCDK -* DM644x based sonata board +* Lego EV3 Build = -* TI DaVinci DM644x EVM: - -make davinci_dvevm_config -make - -* TI DaVinci DM646x EVM: - -make davinci_dm6467evm_config -make - -* TI DaVinci DM355 EVM: - -make davinci_dm355evm_config -make - -* TI DaVinci DM365 EVM: - -make davinci_dm365evm_config -make - -* TI DA830 EVM: - -make da830evm_config -make - * TI DA850 EVM: make da850evm_config make -* DM355 based Leopard board: - -make davinci_dm355leopard_config -make - -* DM644x based schmoogie board: +* TI OMAP-L138 LCDK -make davinci_schmoogie_config +make omapl138_lcdk_defconfig make -* DM644x based sffsdr board: +* Lego EV3 -make davinci_sffsdr_config -make - -* DM644x based sonata board: - -make davinci_sonata_config +make legoev3_defconfig make Bootloaders === -The DaVinci SOC's use 2 bootloaders. The low level initialization -is done by a UBL(user boot loader). The UBL is written to a NAND/NOR/SPI flash -by a programmer. During initial bootup, the ROM Bootloader reads the UBL -from a storage device and loads it into the IRAM. The UBL then loads the U-Boot -into the RAM. -The programmers and UBL are always released as part of any standard TI -software release associated with an SOC. - -Alternative boot method (DA850 EVM only): -For the DA850 EVM an SPL (secondary program loader, see doc/README.SPL) -is provided to load U-Boot directly from SPI flash. In this case, the -SPL does the low level initialization that is otherwise done by the SPL. -To build U-Boot with this SPL, do -make da850evm_config -make u-boot.ais -and program the resulting u-boot.ais file to the SPI flash of the DA850 EVM. +For DA850 an SPL (secondary program loader, see doc/README.SPL) is provided +to load U-Boot directly from SPI flash. The SPL takes care of the low level +initialization. + +The SPL is built as u-boot.ais for all DA850 defconfigs. The resulting +image file can be programmed to the SPI flash of the DA850 EVM/LCDK. Environment Variables = @@ -121,34 +60,14 @@ is used to obtain this information. Links = -1) TI DaVinci DM355 EVM: -http://focus.ti.com/docs/prod/folders/print/tms320dm355.html -http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=203&osCsid=c499af6087317f11b3da19b4e8f1af32 - -2) TI DaVinci DM365 EVM: -http://focus.ti.com/docs/prod/folders/print/tms320dm365.html?247SEM= -http://support.spectrumdigital.com/boards/evmdm365/revc/ - -3) DaVinci DM355 based leopard board -http://designsomething.org/leopardboard/default.aspx -http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=192&osCsid=67c20335668ffc57cb35727106eb24b1 - -4) TI DaVinci DM6467 EVM: -http://focus.ti.com/docs/prod/folders/print/tms320dm6467.html -http://support.spectrumdigital.com/boards/evmdm6467/revf/ - -5) TI DaVinci DM6446 EVM: -http://focus.ti.com/docs/prod/folders/print/tms320dm6446.html -http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=222 - -6) TI DA830 EVM -http://focus.ti.com/apps/docs/gencontent.tsp?appId=1&contentId=52385 -http://www.spectrumdigital.com/product_info.php?cPath=37&products_id=214 - -7) TI DA850 EVM +1) TI DA850 EVM http://focus.ti.com/docs/prod/folders/print/omap-l138.html http://www.logicpd.com/produc
Re: [U-Boot] [PATCH] README: davinci: update the documentation for DaVinci
wt., 30 kwi 2019 o 11:08 Adam Ford napisał(a): > > On Tue, Apr 30, 2019 at 2:39 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > The DM* family of SOCs is no longer supported. We now support the > > omap-l138 lcdk board and Lego EV3 platform. Reflect those changes > > Don't forget about the da850 EVM > I meant: we now support omap-l138 lcdk and Lego EV3 on top of da850-evm. I'll try to make it clearer next time. > > in the README. > > > > Signed-off-by: Bartosz Golaszewski > > --- > > doc/README.davinci | 125 - > > 1 file changed, 22 insertions(+), 103 deletions(-) > > > > diff --git a/doc/README.davinci b/doc/README.davinci > > index aa7c85011a..6522c24eea 100644 > > --- a/doc/README.davinci > > +++ b/doc/README.davinci > > @@ -1,108 +1,47 @@ > > Summary > > === > > > > -This README is about U-Boot support for TI's ARM 926EJS based family of > > SoCs. > > -These SOCs are used for cameras, video security and surveillance, DVR's, > > etc. > > -DaVinci SOC's comprise of DM644x, DM646x, DM35x and DM36x series of SOC's > > -Additionally there are some SOCs meant for the audio market which though > > have > > -an OMAP part number are very similar to the DaVinci series of SOC's > > -Additionally, some family members contain a TI DSP and/or graphics > > -co processors along with a host of other peripherals. > > +Note: this document used to be about the entire family of DaVinci SOCs but > > the > > +support for the DM* family and DA830 has since been dropped. > > > > -Currently the following boards are supported: > > - > > -* TI DaVinci DM644x EVM > > - > > -* TI DaVinci DM646x EVM > > - > > -* TI DaVinci DM355 EVM > > - > > -* TI DaVinci DM365 EVM > > +This README is about U-Boot support for TI's DA850 SoC. This SOC has an > > OMAP > > +part number but is very similar to the DaVinci series. > > > > -* TI DA830 EVM > > +Currently the following boards are supported: > > > > * TI DA850 EVM > > > > -* DM355 based Leopard board > > - > > -* DM644x based schmoogie board > > - > > -* DM644x based sffsdr board > > +* TI OMAP-L138 LCDK > > > > -* DM644x based sonata board > > +* Lego EV3 > > > > Build > > = > > > > -* TI DaVinci DM644x EVM: > > - > > -make davinci_dvevm_config > > -make > > - > > -* TI DaVinci DM646x EVM: > > - > > -make davinci_dm6467evm_config > > -make > > - > > -* TI DaVinci DM355 EVM: > > - > > -make davinci_dm355evm_config > > -make > > - > > -* TI DaVinci DM365 EVM: > > - > > -make davinci_dm365evm_config > > -make > > - > > -* TI DA830 EVM: > > - > > -make da830evm_config > > -make > > - > > * TI DA850 EVM: > > > > make da850evm_config > > make > > > > -* DM355 based Leopard board: > > - > > -make davinci_dm355leopard_config > > -make > > - > > -* DM644x based schmoogie board: > > +* TI OMAP-L138 LCDK > > > > -make davinci_schmoogie_config > > +make omapl138_lcdk_defconfig > > make > > > > -* DM644x based sffsdr board: > > +* Lego EV3 > > > > -make davinci_sffsdr_config > > -make > > - > > -* DM644x based sonata board: > > - > > -make davinci_sonata_config > > +make legoev3_defconfig > > make > > > > Bootloaders > > === > > > > -The DaVinci SOC's use 2 bootloaders. The low level initialization > > -is done by a UBL(user boot loader). The UBL is written to a NAND/NOR/SPI > > flash > > -by a programmer. During initial bootup, the ROM Bootloader reads the UBL > > -from a storage device and loads it into the IRAM. The UBL then loads the > > U-Boot > > -into the RAM. > > -The programmers and UBL are always released as part of any standard TI > > -software release associated with an SOC. > > - > > -Alternative boot method (DA850 EVM only): > > -For the DA850 EVM an SPL (secondary program loader, see doc/README.SPL) > > -is provided to load U-Boot directly from SPI flash. In this case, the > > -SPL does the low level initialization that is otherwise done by the SPL. > > -To build U-Boot with this SPL, do > > -make da850evm_config > > -make u-boot.ais > > -and program the resulting u-boot.ais file to the SP
[U-Boot] [PATCH] net: davinci_emac: use driver model (CONFIG_DM_ETH)
From: Bartosz Golaszewski Add support for CONFIG_DM_ETH to the davinci_emac driver. Optimally we should only support DM-enabled platforms but there are several non-DT boards that still use it so either we need to keep supporting it or drop the boards from u-boot. For now we're stuck with ugly ifdefs. This patch adds support for driver-model to the driver and converts all platforms that use the driver model to selecting CONFIG_DM_ETH. Tested on da850-evm and da850-lcdk. Signed-off-by: Bartosz Golaszewski --- NOTE: I'm currently working on modernizing da850 support in u-boot. This patch is just the first step - I plan on improving the emac driver in general but I'll be OoO until end of next week, so I decided to post it already for reviews. Does anyone know what the status is on boards like twister, ea20 etc. that use davinci_emac, but don't use the driver model? Dropping them would make it easier to clean up this driver. This patch applies on top of my previous series[1]. [1] https://lists.denx.de/pipermail/u-boot/2019-April/367236.html arch/arm/mach-davinci/cpu.c| 13 --- arch/arm/mach-omap2/omap3/emac.c | 3 +- board/davinci/da8xxevm/da850evm.c | 5 -- board/davinci/da8xxevm/omapl138_lcdk.c | 14 board/logicpd/am3517evm/am3517evm.c| 1 - board/ti/ti816x/evm.c | 3 +- configs/am3517_evm_defconfig | 1 + configs/da850_am18xxevm_defconfig | 1 + configs/da850evm_defconfig | 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/omapl138_lcdk_defconfig| 1 + configs/ti816x_evm_defconfig | 1 + drivers/net/ti/davinci_emac.c | 109 + 13 files changed, 100 insertions(+), 54 deletions(-) diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c index f97ad3fc74..9fd6564d04 100644 --- a/arch/arm/mach-davinci/cpu.c +++ b/arch/arm/mach-davinci/cpu.c @@ -5,7 +5,6 @@ */ #include -#include #include #include @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) gd->bd->bi_dsp_freq = 0; return 0; } - -/* - * Initializes on-chip ethernet controllers. - * to override, implement board_eth_init() - */ -int cpu_eth_init(bd_t *bis) -{ -#if defined(CONFIG_DRIVER_TI_EMAC) - davinci_emac_initialize(); -#endif - return 0; -} diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c index c79e870183..fb0c9188f5 100644 --- a/arch/arm/mach-omap2/omap3/emac.c +++ b/arch/arm/mach-omap2/omap3/emac.c @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis) reset &= ~CPGMACSS_SW_RST; writel(reset, &am35x_scm_general_regs->ip_sw_reset); - return davinci_emac_initialize(); + return 0; } diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 1bc26828bf..0d2bc5fb32 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -472,10 +471,6 @@ int board_eth_init(bd_t *bis) if (rmii_hw_init()) printf("RMII hardware init failed!!!\n"); #endif - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } return 0; } diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 2c2f885d43..ef9656add8 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -229,19 +228,6 @@ int board_init(void) #ifdef CONFIG_DRIVER_TI_EMAC -/* - * Initializes on-board ethernet controllers. - */ -int board_eth_init(bd_t *bis) -{ - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } - - return 0; -} - #endif /* CONFIG_DRIVER_TI_EMAC */ #define CFG_MAC_ADDR_SPI_BUS 0 diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index 10031a4801..bfd4e78274 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "am3517evm.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c index 07a084bab8..240df8cbe1 100644 --- a/board/ti/ti816x/evm.c +++ b/board/ti/ti816x/evm.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ int board_eth_init(bd_t *bis) printf("Unable to read MAC address. Set \n"); } - return davinci_emac_initialize(); + return 0; } #ifdef CO
Re: [U-Boot] [PATCH] net: davinci_emac: use driver model (CONFIG_DM_ETH)
czw., 9 maj 2019 o 20:48 Joe Hershberger napisał(a): > > On Tue, Apr 30, 2019 at 11:04 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > Add support for CONFIG_DM_ETH to the davinci_emac driver. Optimally > > we should only support DM-enabled platforms but there are several > > non-DT boards that still use it so either we need to keep supporting > > it or drop the boards from u-boot. For now we're stuck with ugly > > ifdefs. > > Which boards are still not using DM that you refer to here? > The following configs define CONFIG_DRIVER_TI_EMAC=y and don't define CONFIG_DM=y: am3517_evm_defconfig calimain_defconfig cm_t3517_defconfig ea20_defconfig eco5pk_defconfig ipam390_defconfig mcx_defconfig mt_ventoux_defconfig twister_defconfig Are these still maintained? Best regards, Bartosz Golaszewski > > > > This patch adds support for driver-model to the driver and converts > > all platforms that use the driver model to selecting CONFIG_DM_ETH. > > > > Tested on da850-evm and da850-lcdk. > > > > Signed-off-by: Bartosz Golaszewski > > --- > > NOTE: I'm currently working on modernizing da850 support in u-boot. > > This patch is just the first step - I plan on improving the emac driver > > in general but I'll be OoO until end of next week, so I decided to post > > it already for reviews. > > > > Does anyone know what the status is on boards like twister, ea20 etc. > > that use davinci_emac, but don't use the driver model? Dropping them > > would make it easier to clean up this driver. > > > > This patch applies on top of my previous series[1]. > > > > [1] https://lists.denx.de/pipermail/u-boot/2019-April/367236.html > > > > arch/arm/mach-davinci/cpu.c| 13 --- > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > board/davinci/da8xxevm/da850evm.c | 5 -- > > board/davinci/da8xxevm/omapl138_lcdk.c | 14 > > board/logicpd/am3517evm/am3517evm.c| 1 - > > board/ti/ti816x/evm.c | 3 +- > > configs/am3517_evm_defconfig | 1 + > > configs/da850_am18xxevm_defconfig | 1 + > > configs/da850evm_defconfig | 1 + > > configs/da850evm_direct_nor_defconfig | 1 + > > configs/omapl138_lcdk_defconfig| 1 + > > configs/ti816x_evm_defconfig | 1 + > > drivers/net/ti/davinci_emac.c | 109 + > > 13 files changed, 100 insertions(+), 54 deletions(-) > > > > diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c > > index f97ad3fc74..9fd6564d04 100644 > > --- a/arch/arm/mach-davinci/cpu.c > > +++ b/arch/arm/mach-davinci/cpu.c > > @@ -5,7 +5,6 @@ > > */ > > > > #include > > -#include > > #include > > #include > > > > @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) > > gd->bd->bi_dsp_freq = 0; > > return 0; > > } > > - > > -/* > > - * Initializes on-chip ethernet controllers. > > - * to override, implement board_eth_init() > > - */ > > -int cpu_eth_init(bd_t *bis) > > -{ > > -#if defined(CONFIG_DRIVER_TI_EMAC) > > - davinci_emac_initialize(); > > -#endif > > - return 0; > > -} > > diff --git a/arch/arm/mach-omap2/omap3/emac.c > > b/arch/arm/mach-omap2/omap3/emac.c > > index c79e870183..fb0c9188f5 100644 > > --- a/arch/arm/mach-omap2/omap3/emac.c > > +++ b/arch/arm/mach-omap2/omap3/emac.c > > @@ -7,7 +7,6 @@ > > */ > > > > #include > > -#include > > #include > > #include > > > > @@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis) > > reset &= ~CPGMACSS_SW_RST; > > writel(reset, &am35x_scm_general_regs->ip_sw_reset); > > > > - return davinci_emac_initialize(); > > + return 0; > > } > > diff --git a/board/davinci/da8xxevm/da850evm.c > > b/board/davinci/da8xxevm/da850evm.c > > index 1bc26828bf..0d2bc5fb32 100644 > > --- a/board/davinci/da8xxevm/da850evm.c > > +++ b/board/davinci/da8xxevm/da850evm.c > > @@ -13,7 +13,6 @@ > > #include > > #include > > #include > > -#include > > #include > > #include > > #include > > @@ -472,10 +471,6 @@ int board_eth_init(bd_t *bis) > > if (rmii_hw_init()) > > printf("RMII hardware init failed!!!\n"); > > #endif > > - if (!davinci_emac_initialize()) { > > -
Re: [U-Boot] [PATCH] net: davinci_emac: use driver model (CONFIG_DM_ETH)
pt., 10 maj 2019 o 14:31 Adam Ford napisał(a): > > On Fri, May 10, 2019 at 7:22 AM Bartosz Golaszewski wrote: > > > > czw., 9 maj 2019 o 20:48 Joe Hershberger > > napisał(a): > > > > > > On Tue, Apr 30, 2019 at 11:04 AM Bartosz Golaszewski > > > wrote: > > > > > > > > From: Bartosz Golaszewski > > > > > > > > Add support for CONFIG_DM_ETH to the davinci_emac driver. Optimally > > > > we should only support DM-enabled platforms but there are several > > > > non-DT boards that still use it so either we need to keep supporting > > > > it or drop the boards from u-boot. For now we're stuck with ugly > > > > ifdefs. > > > > > > Which boards are still not using DM that you refer to here? > > > > > > > The following configs define CONFIG_DRIVER_TI_EMAC=y and don't define > > CONFIG_DM=y: > > > > am3517_evm_defconfig > > calimain_defconfig > > cm_t3517_defconfig > > ea20_defconfig > > eco5pk_defconfig > > ipam390_defconfig > > mcx_defconfig > > mt_ventoux_defconfig > > twister_defconfig > > > > Are these still maintained? > > I am still maintaining the am3517_evm. Config DM is being set for it. > The following are set in Kconfig: > select DM > select DM_GPIO > select DM_I2C > select DM_MMC > select DM_SERIAL > imply CMD_DM > > The last time I ran some spot checks the ethernet was working. I > haven't checked lately. Is there something you need me to check? > Ok, so I need to go through these and see if DM is not selected from Kconfig. I'm pretty sure there was at least one for which the build broke if I dropped the emac initialization function. Let me check... Bart > adam > > > > Best regards, > > Bartosz Golaszewski > > > > > > > > > > This patch adds support for driver-model to the driver and converts > > > > all platforms that use the driver model to selecting CONFIG_DM_ETH. > > > > > > > > Tested on da850-evm and da850-lcdk. > > > > > > > > Signed-off-by: Bartosz Golaszewski > > > > --- > > > > NOTE: I'm currently working on modernizing da850 support in u-boot. > > > > This patch is just the first step - I plan on improving the emac driver > > > > in general but I'll be OoO until end of next week, so I decided to post > > > > it already for reviews. > > > > > > > > Does anyone know what the status is on boards like twister, ea20 etc. > > > > that use davinci_emac, but don't use the driver model? Dropping them > > > > would make it easier to clean up this driver. > > > > > > > > This patch applies on top of my previous series[1]. > > > > > > > > [1] https://lists.denx.de/pipermail/u-boot/2019-April/367236.html > > > > > > > > arch/arm/mach-davinci/cpu.c| 13 --- > > > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > > > board/davinci/da8xxevm/da850evm.c | 5 -- > > > > board/davinci/da8xxevm/omapl138_lcdk.c | 14 > > > > board/logicpd/am3517evm/am3517evm.c| 1 - > > > > board/ti/ti816x/evm.c | 3 +- > > > > configs/am3517_evm_defconfig | 1 + > > > > configs/da850_am18xxevm_defconfig | 1 + > > > > configs/da850evm_defconfig | 1 + > > > > configs/da850evm_direct_nor_defconfig | 1 + > > > > configs/omapl138_lcdk_defconfig| 1 + > > > > configs/ti816x_evm_defconfig | 1 + > > > > drivers/net/ti/davinci_emac.c | 109 + > > > > 13 files changed, 100 insertions(+), 54 deletions(-) > > > > > > > > diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c > > > > index f97ad3fc74..9fd6564d04 100644 > > > > --- a/arch/arm/mach-davinci/cpu.c > > > > +++ b/arch/arm/mach-davinci/cpu.c > > > > @@ -5,7 +5,6 @@ > > > > */ > > > > > > > > #include > > > > -#include > > > > #include > > > > #include > > > > > > > > @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) > > > > gd->bd->bi_dsp_freq = 0; > > > > return 0; > > > > } > > > > - > > > > -/* > > > > - * Initializes on-chip ethernet controllers. > > &
Re: [U-Boot] [PATCH] net: davinci_emac: use driver model (CONFIG_DM_ETH)
pt., 10 maj 2019 o 14:51 Bartosz Golaszewski napisał(a): > > pt., 10 maj 2019 o 14:31 Adam Ford napisał(a): > > > > On Fri, May 10, 2019 at 7:22 AM Bartosz Golaszewski wrote: > > > > > > czw., 9 maj 2019 o 20:48 Joe Hershberger > > > napisał(a): > > > > > > > > On Tue, Apr 30, 2019 at 11:04 AM Bartosz Golaszewski > > > > wrote: > > > > > > > > > > From: Bartosz Golaszewski > > > > > > > > > > Add support for CONFIG_DM_ETH to the davinci_emac driver. Optimally > > > > > we should only support DM-enabled platforms but there are several > > > > > non-DT boards that still use it so either we need to keep supporting > > > > > it or drop the boards from u-boot. For now we're stuck with ugly > > > > > ifdefs. > > > > > > > > Which boards are still not using DM that you refer to here? > > > > > > > > > > The following configs define CONFIG_DRIVER_TI_EMAC=y and don't define > > > CONFIG_DM=y: > > > > > > am3517_evm_defconfig > > > calimain_defconfig > > > cm_t3517_defconfig > > > ea20_defconfig > > > eco5pk_defconfig > > > ipam390_defconfig > > > mcx_defconfig > > > mt_ventoux_defconfig > > > twister_defconfig > > > > > > Are these still maintained? > > > > I am still maintaining the am3517_evm. Config DM is being set for it. > > The following are set in Kconfig: > > select DM > > select DM_GPIO > > select DM_I2C > > select DM_MMC > > select DM_SERIAL > > imply CMD_DM > > > > The last time I ran some spot checks the ethernet was working. I > > haven't checked lately. Is there something you need me to check? > > > > Ok, so I need to go through these and see if DM is not selected from > Kconfig. I'm pretty sure there was at least one for which the build > broke if I dropped the emac initialization function. Let me check... > Ok, confirmed that the following configs DO NOT select CONFIG_DM in any way: calimain_defconfig cm_t3517_defconfig ea20_defconfig eco5pk_defconfig ipam390_defconfig mcx_defconfig mt_ventoux_defconfig twister_defconfig I Cc'ed some of the maintainers: + Manfred, Christoph, Igor, Sefano, Raphael, Heiko, Anatloij Hi guys, do you have any plans to add support for the driver model for these platforms? Best regards, Bartosz Golaszewski > Bart > > > adam > > > > > > Best regards, > > > Bartosz Golaszewski > > > > > > > > > > > > > This patch adds support for driver-model to the driver and converts > > > > > all platforms that use the driver model to selecting CONFIG_DM_ETH. > > > > > > > > > > Tested on da850-evm and da850-lcdk. > > > > > > > > > > Signed-off-by: Bartosz Golaszewski > > > > > --- > > > > > NOTE: I'm currently working on modernizing da850 support in u-boot. > > > > > This patch is just the first step - I plan on improving the emac > > > > > driver > > > > > in general but I'll be OoO until end of next week, so I decided to > > > > > post > > > > > it already for reviews. > > > > > > > > > > Does anyone know what the status is on boards like twister, ea20 etc. > > > > > that use davinci_emac, but don't use the driver model? Dropping them > > > > > would make it easier to clean up this driver. > > > > > > > > > > This patch applies on top of my previous series[1]. > > > > > > > > > > [1] https://lists.denx.de/pipermail/u-boot/2019-April/367236.html > > > > > > > > > > arch/arm/mach-davinci/cpu.c| 13 --- > > > > > arch/arm/mach-omap2/omap3/emac.c | 3 +- > > > > > board/davinci/da8xxevm/da850evm.c | 5 -- > > > > > board/davinci/da8xxevm/omapl138_lcdk.c | 14 > > > > > board/logicpd/am3517evm/am3517evm.c| 1 - > > > > > board/ti/ti816x/evm.c | 3 +- > > > > > configs/am3517_evm_defconfig | 1 + > > > > > configs/da850_am18xxevm_defconfig | 1 + > > > > > configs/da850evm_defconfig | 1 + > > > > > configs/da850evm_direct_nor_defconfig | 1 + > > > > > configs/omapl138_lcdk_defconfig| 1 +
[U-Boot] [PATCH 0/8] davinci: remove older unmaintained boards
From: Bartosz Golaszewski I'm working on updating the driver-model support for da850-lcdk and da850-evm. There are several boards in the tree that don't use the driver model but depend on DaVinci drivers. Since supporting both legacy and DM in driver code makes it messy, I'd like to propose to remove the following boards: calimain, ea20, eco5pk, ipam390, cm_t3517, mt_ventoux, twister and mcx. They don't seem to still be maintained, don't use device-tree and don't select CONFIG_DM. Bartosz Golaszewski (8): calimain: remove board ea20: remove board eco5pk: remove board ipam390: remove board cm_t3517: remove board mt_ventoux: remove board twister: remove board mcx: remove board arch/arm/include/asm/mach-types.h | 6 - arch/arm/mach-davinci/Kconfig | 19 - arch/arm/mach-omap2/omap3/Kconfig | 31 -- board/8dtech/eco5pk/Kconfig| 12 - board/8dtech/eco5pk/MAINTAINERS| 6 - board/8dtech/eco5pk/Makefile | 8 - board/8dtech/eco5pk/eco5pk.c | 48 --- board/8dtech/eco5pk/eco5pk.h | 391 board/Barix/ipam390/Kconfig| 12 - board/Barix/ipam390/MAINTAINERS| 6 - board/Barix/ipam390/Makefile | 8 - board/Barix/ipam390/README.ipam390 | 229 board/Barix/ipam390/ipam390-ais-uart.cfg | 202 --- board/Barix/ipam390/ipam390.c | 335 - board/Barix/ipam390/u-boot-spl-ipam390.lds | 57 --- board/compulab/cm_t3517/Kconfig| 12 - board/compulab/cm_t3517/MAINTAINERS| 6 - board/compulab/cm_t3517/Makefile | 7 - board/compulab/cm_t3517/cm_t3517.c | 240 board/compulab/cm_t3517/mux.c | 235 board/compulab/common/eeprom.c | 2 +- board/davinci/ea20/Kconfig | 12 - board/davinci/ea20/MAINTAINERS | 6 - board/davinci/ea20/Makefile| 8 - board/davinci/ea20/ea20.c | 337 - board/htkw/mcx/Kconfig | 12 - board/htkw/mcx/MAINTAINERS | 6 - board/htkw/mcx/Makefile| 7 - board/htkw/mcx/mcx.c | 141 --- board/htkw/mcx/mcx.h | 400 board/omicron/calimain/Kconfig | 12 - board/omicron/calimain/MAINTAINERS | 7 - board/omicron/calimain/Makefile| 8 - board/omicron/calimain/calimain.c | 145 board/technexion/twister/Kconfig | 12 - board/technexion/twister/MAINTAINERS | 6 - board/technexion/twister/Makefile | 7 - board/technexion/twister/twister.c | 160 board/technexion/twister/twister.h | 400 board/teejet/mt_ventoux/Kconfig| 12 - board/teejet/mt_ventoux/MAINTAINERS| 6 - board/teejet/mt_ventoux/Makefile | 7 - board/teejet/mt_ventoux/mt_ventoux.c | 342 - board/teejet/mt_ventoux/mt_ventoux.h | 403 - configs/calimain_defconfig | 37 -- configs/cm_t3517_defconfig | 60 --- configs/ea20_defconfig | 48 --- configs/eco5pk_defconfig | 45 --- configs/ipam390_defconfig | 45 --- configs/mcx_defconfig | 58 --- configs/mt_ventoux_defconfig | 54 --- configs/twister_defconfig | 52 --- include/configs/calimain.h | 272 -- include/configs/cm_t3517.h | 219 --- include/configs/ea20.h | 227 include/configs/eco5pk.h | 45 --- include/configs/ipam390.h | 237 include/configs/mcx.h | 294 --- include/configs/mt_ventoux.h | 46 --- include/configs/twister.h | 34 -- scripts/config_whitelist.txt | 1 - 61 files changed, 1 insertion(+), 6101 deletions(-) delete mode 100644 board/8dtech/eco5pk/Kconfig delete mode 100644 board/8dtech/eco5pk/MAINTAINERS delete mode 100644 board/8dtech/eco5pk/Makefile delete mode 100644 board/8dtech/eco5pk/eco5pk.c delete mode 100644 board/8dtech/eco5pk/eco5pk.h delete mode 100644 board/Barix/ipam390/Kconfig delete mode 100644 board/Barix/ipam390/MAINTAINERS delete mode 100644 board/Barix/ipam390/Makefile delete mode 100644 board/Barix/ipam390/README.ipam390 delete mode 100644 board/Barix/ipam390/ipam390-ais-uart.cfg delete mode 100644 board/Barix/ipam390/ipam390.c delete mode 100644 board/Barix/ipam390/u-boot-spl-ipam390.lds delete mode 100644 board/compulab/cm_t3517/Kconfig delete mode 100644 board/compulab/cm_t3517/MAINTAINERS delete mode 100644 board/comp
[U-Boot] [PATCH 1/8] calimain: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/mach-types.h | 1 - arch/arm/mach-davinci/Kconfig | 5 - board/omicron/calimain/Kconfig | 12 -- board/omicron/calimain/MAINTAINERS | 7 - board/omicron/calimain/Makefile| 8 - board/omicron/calimain/calimain.c | 145 --- configs/calimain_defconfig | 37 include/configs/calimain.h | 272 - 8 files changed, 487 deletions(-) delete mode 100644 board/omicron/calimain/Kconfig delete mode 100644 board/omicron/calimain/MAINTAINERS delete mode 100644 board/omicron/calimain/Makefile delete mode 100644 board/omicron/calimain/calimain.c delete mode 100644 configs/calimain_defconfig delete mode 100644 include/configs/calimain.h diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 9f82efe007..da2cc565f2 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -3475,7 +3475,6 @@ #define MACH_TYPE_SGH_I710 3525 #define MACH_TYPE_INTEGREPROSCB3526 #define MACH_TYPE_MONZA3527 -#define MACH_TYPE_CALIMAIN 3528 #define MACH_TYPE_MX6Q_SABREAUTO 3529 #define MACH_TYPE_GMA01X 3530 #define MACH_TYPE_SBC513531 diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 12b1e682e6..6031a0c0c7 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -27,10 +27,6 @@ config TARGET_OMAPL138_LCDK select SOC_DA8XX select SUPPORT_SPL -config TARGET_CALIMAIN - bool "Calimain board" - select SOC_DA850 - config TARGET_LEGOEV3 bool "LEGO MINDSTORMS EV3" select MACH_DAVINCI_DA850_EVM @@ -149,7 +145,6 @@ endif source "board/Barix/ipam390/Kconfig" source "board/davinci/da8xxevm/Kconfig" source "board/davinci/ea20/Kconfig" -source "board/omicron/calimain/Kconfig" source "board/lego/ev3/Kconfig" config SPL_LDSCRIPT diff --git a/board/omicron/calimain/Kconfig b/board/omicron/calimain/Kconfig deleted file mode 100644 index 1ec48e6b55..00 --- a/board/omicron/calimain/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_CALIMAIN - -config SYS_BOARD - default "calimain" - -config SYS_VENDOR - default "omicron" - -config SYS_CONFIG_NAME - default "calimain" - -endif diff --git a/board/omicron/calimain/MAINTAINERS b/board/omicron/calimain/MAINTAINERS deleted file mode 100644 index ad788a6dba..00 --- a/board/omicron/calimain/MAINTAINERS +++ /dev/null @@ -1,7 +0,0 @@ -CALIMAIN BOARD -M: Manfred Rudigier -M: Christoph Rüdisser -S: Maintained -F: board/omicron/calimain/ -F: include/configs/calimain.h -F: configs/calimain_defconfig diff --git a/board/omicron/calimain/Makefile b/board/omicron/calimain/Makefile deleted file mode 100644 index d873f0d736..00 --- a/board/omicron/calimain/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# Copyright (C) 2007 Sergey Kubushyn - -obj-y := calimain.o diff --git a/board/omicron/calimain/calimain.c b/board/omicron/calimain/calimain.c deleted file mode 100644 index 6f7b2b8cb1..00 --- a/board/omicron/calimain/calimain.c +++ /dev/null @@ -1,145 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2011 OMICRON electronics GmbH - * - * Based on da850evm.c. Original Copyrights follow: - * - * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ - * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. - * Copyright (C) 2007 Sergey Kubushyn - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../../drivers/gpio/da8xx_gpio.h" - -DECLARE_GLOBAL_DATA_PTR; - -#define CALIMAIN_HWVERSION_MASK0x7f00 -#define CALIMAIN_HWVERSION_SHIFT 24 - -/* Hardware version pinmux settings */ -const struct pinmux_config hwversion_pins[] = { - { pinmux(16), 8, 2 }, /* GP7[15] */ - { pinmux(16), 8, 3 }, /* GP7[14] */ - { pinmux(16), 8, 4 }, /* GP7[13] */ - { pinmux(16), 8, 5 }, /* GP7[12] */ - { pinmux(16), 8, 6 }, /* GP7[11] */ - { pinmux(16), 8, 7 }, /* GP7[10] */ - { pinmux(17), 8, 0 }, /* GP7[9] */ - { pinmux(17), 8, 1 } /* GP7[8] */ -}; - -const struct pinmux_resource pinmuxes[] = { - PINMUX_ITEM(uart2_pins_txrx), - PINMUX_ITEM(emac_pins
[U-Boot] [PATCH 2/8] ea20: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/mach-types.h | 1 - arch/arm/mach-davinci/Kconfig | 7 - board/davinci/ea20/Kconfig| 12 -- board/davinci/ea20/MAINTAINERS| 6 - board/davinci/ea20/Makefile | 8 - board/davinci/ea20/ea20.c | 337 -- configs/ea20_defconfig| 48 - include/configs/ea20.h| 227 8 files changed, 646 deletions(-) delete mode 100644 board/davinci/ea20/Kconfig delete mode 100644 board/davinci/ea20/MAINTAINERS delete mode 100644 board/davinci/ea20/Makefile delete mode 100644 board/davinci/ea20/ea20.c delete mode 100644 configs/ea20_defconfig delete mode 100644 include/configs/ea20.h diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index da2cc565f2..d882f19b81 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -2960,7 +2960,6 @@ #define MACH_TYPE_AX8008 2999 #define MACH_TYPE_GNET_SGCE3000 #define MACH_TYPE_PXWNAS_500_1000 3001 -#define MACH_TYPE_EA20 3002 #define MACH_TYPE_AWM2 3003 #define MACH_TYPE_TI8148EVM3004 #define MACH_TYPE_SEABOARD 3005 diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 6031a0c0c7..c2a5759f45 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -16,12 +16,6 @@ config TARGET_DA850EVM select SOC_DA850 select SUPPORT_SPL -config TARGET_EA20 - bool "EA20 board" - select BOARD_LATE_INIT - select MACH_DAVINCI_DA850_EVM - select SOC_DA850 - config TARGET_OMAPL138_LCDK bool "OMAPL138 LCDK" select SOC_DA8XX @@ -144,7 +138,6 @@ endif source "board/Barix/ipam390/Kconfig" source "board/davinci/da8xxevm/Kconfig" -source "board/davinci/ea20/Kconfig" source "board/lego/ev3/Kconfig" config SPL_LDSCRIPT diff --git a/board/davinci/ea20/Kconfig b/board/davinci/ea20/Kconfig deleted file mode 100644 index ae5b16e142..00 --- a/board/davinci/ea20/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_EA20 - -config SYS_BOARD - default "ea20" - -config SYS_VENDOR - default "davinci" - -config SYS_CONFIG_NAME - default "ea20" - -endif diff --git a/board/davinci/ea20/MAINTAINERS b/board/davinci/ea20/MAINTAINERS deleted file mode 100644 index 5c300a3cbf..00 --- a/board/davinci/ea20/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -EA20 BOARD -M: Stefano Babic -S: Maintained -F: board/davinci/ea20/ -F: include/configs/ea20.h -F: configs/ea20_defconfig diff --git a/board/davinci/ea20/Makefile b/board/davinci/ea20/Makefile deleted file mode 100644 index 2ea42d9967..00 --- a/board/davinci/ea20/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# Copyright (C) 2007 Sergey Kubushyn - -obj-y += ea20.o diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c deleted file mode 100644 index 573e0ae97a..00 --- a/board/davinci/ea20/ea20.c +++ /dev/null @@ -1,337 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2010 - * Stefano Babic, DENX Software Engineering, sba...@denx.de - * - * Based on da850evm.c, original Copyrights follow: - * - * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ - * - * Based on da830evm.c. Original Copyrights follow: - * - * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. - * Copyright (C) 2007 Sergey Kubushyn - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../../../drivers/video/da8xx-fb.h" - -DECLARE_GLOBAL_DATA_PTR; - -static const struct da8xx_panel lcd_panel = { - /* Casio COM57H531x */ - .name = "Casio_COM57H531x", - .width = 640, - .height = 480, - .hfp = 12, - .hbp = 144, - .hsw = 30, - .vfp = 10, - .vbp = 35, - .vsw = 3, - .pxl_clk = 2500, - .invert_pxl_clk = 0, -}; - -static const struct display_panel disp_panel = { - QVGA, - 16, - 16, - COLOR_ACTIVE, -}; - -static const struct lcd_ctrl_config lcd_cfg = { - &disp_panel, - .ac_bias= 255, - .ac_bias_intrpt = 0, - .dma_burst_sz = 16, - .bpp= 16, - .fdd= 255, - .tft_alt_m
[U-Boot] [PATCH 3/8] eco5pk: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-omap2/omap3/Kconfig | 5 - board/8dtech/eco5pk/Kconfig | 12 - board/8dtech/eco5pk/MAINTAINERS | 6 - board/8dtech/eco5pk/Makefile | 8 - board/8dtech/eco5pk/eco5pk.c | 48 board/8dtech/eco5pk/eco5pk.h | 391 -- configs/eco5pk_defconfig | 45 include/configs/eco5pk.h | 45 8 files changed, 560 deletions(-) delete mode 100644 board/8dtech/eco5pk/Kconfig delete mode 100644 board/8dtech/eco5pk/MAINTAINERS delete mode 100644 board/8dtech/eco5pk/Makefile delete mode 100644 board/8dtech/eco5pk/eco5pk.c delete mode 100644 board/8dtech/eco5pk/eco5pk.h delete mode 100644 configs/eco5pk_defconfig delete mode 100644 include/configs/eco5pk.h diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig index 0286b0daa3..bc2b6f180c 100644 --- a/arch/arm/mach-omap2/omap3/Kconfig +++ b/arch/arm/mach-omap2/omap3/Kconfig @@ -112,10 +112,6 @@ config TARGET_OMAP3_PANDORA select OMAP3_GPIO_4 select OMAP3_GPIO_6 -config TARGET_ECO5PK - bool "ECO5PK" - select OMAP3_GPIO_5 if USB_EHCI_HCD - config TARGET_TRICORDER bool "Tricorder" select OMAP3_GPIO_2 @@ -210,7 +206,6 @@ source "board/overo/Kconfig" source "board/logicpd/zoom1/Kconfig" source "board/ti/am3517crane/Kconfig" source "board/pandora/Kconfig" -source "board/8dtech/eco5pk/Kconfig" source "board/corscience/tricorder/Kconfig" source "board/htkw/mcx/Kconfig" source "board/logicpd/omap3som/Kconfig" diff --git a/board/8dtech/eco5pk/Kconfig b/board/8dtech/eco5pk/Kconfig deleted file mode 100644 index 55535669fa..00 --- a/board/8dtech/eco5pk/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_ECO5PK - -config SYS_BOARD - default "eco5pk" - -config SYS_VENDOR - default "8dtech" - -config SYS_CONFIG_NAME - default "eco5pk" - -endif diff --git a/board/8dtech/eco5pk/MAINTAINERS b/board/8dtech/eco5pk/MAINTAINERS deleted file mode 100644 index 20c1c8c87e..00 --- a/board/8dtech/eco5pk/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -ECO5PK BOARD -M: Raphael Assenat -S: Maintained -F: board/8dtech/eco5pk/ -F: include/configs/eco5pk.h -F: configs/eco5pk_defconfig diff --git a/board/8dtech/eco5pk/Makefile b/board/8dtech/eco5pk/Makefile deleted file mode 100644 index 114fe1b215..00 --- a/board/8dtech/eco5pk/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# Adapted from ti/evm/Makefile - -obj-y := eco5pk.o diff --git a/board/8dtech/eco5pk/eco5pk.c b/board/8dtech/eco5pk/eco5pk.c deleted file mode 100644 index dcbd4835b3..00 --- a/board/8dtech/eco5pk/eco5pk.c +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * eco5pk.c - board file for 8D Technology's AM3517 based eco5pk board - * - * Based on am3517evm.c - * - * Copyright (C) 2011-2012 8D Technologies inc. - * Copyright (C) 2009 Texas Instruments Incorporated - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "eco5pk.h" - -DECLARE_GLOBAL_DATA_PTR; - -/* - * Routine: board_init - * Description: Early hardware init. - */ -int board_init(void) -{ - gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ - gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); - - gpio_request(30, "RESOUT"); - gpio_direction_output(30, 1); - return 0; -} - -/* - * Routine: set_muxconf_regs - * Description: Setting up the configuration Mux registers specific to the - * hardware. Many pins need to be moved from protect to primary - * mode. - */ -void set_muxconf_regs(void) -{ - MUX_ECO5_PK(); -} diff --git a/board/8dtech/eco5pk/eco5pk.h b/board/8dtech/eco5pk/eco5pk.h deleted file mode 100644 index 7c8fcb0be3..00 --- a/board/8dtech/eco5pk/eco5pk.h +++ /dev/null @@ -1,391 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * eco5.h - Header file for the 8D Technologies ECO5 board. - * - * Based on am3517evm.h - * Based on ti/evm/evm.h - * - * Copyright (C) 2011 8D Technologies inc. - * Copyright (C) 2009 Texas Instruments Incorporated - */ - -#ifndef _ECO5PK_H__ -#define _ECO5PK_H__ - -const omap3_sysinfo sysinfo = { - DDR_DISCRETE, - "ECO5 Board", - "NAND", -}; - -/* - * IEN - Input Enable - * IDIS - Inpu
[U-Boot] [PATCH 6/8] mt_ventoux: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/mach-types.h| 1 - arch/arm/mach-omap2/omap3/Kconfig| 6 - board/teejet/mt_ventoux/Kconfig | 12 - board/teejet/mt_ventoux/MAINTAINERS | 6 - board/teejet/mt_ventoux/Makefile | 7 - board/teejet/mt_ventoux/mt_ventoux.c | 342 --- board/teejet/mt_ventoux/mt_ventoux.h | 403 --- configs/mt_ventoux_defconfig | 54 include/configs/mt_ventoux.h | 46 --- 9 files changed, 877 deletions(-) delete mode 100644 board/teejet/mt_ventoux/Kconfig delete mode 100644 board/teejet/mt_ventoux/MAINTAINERS delete mode 100644 board/teejet/mt_ventoux/Makefile delete mode 100644 board/teejet/mt_ventoux/mt_ventoux.c delete mode 100644 board/teejet/mt_ventoux/mt_ventoux.h delete mode 100644 configs/mt_ventoux_defconfig delete mode 100644 include/configs/mt_ventoux.h diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index a3a2b729b1..9b38e36c87 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -3772,7 +3772,6 @@ #define MACH_TYPE_IMXT_NAV 3829 #define MACH_TYPE_IMXT_FULL3830 #define MACH_TYPE_AG09015 3831 -#define MACH_TYPE_AM3517_MT_VENTOUX3832 #define MACH_TYPE_DP1ARM9 3833 #define MACH_TYPE_PICASSO_M3834 #define MACH_TYPE_VIDEO_GADGET 3835 diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig index 9bc616c286..96579e5de9 100644 --- a/arch/arm/mach-omap2/omap3/Kconfig +++ b/arch/arm/mach-omap2/omap3/Kconfig @@ -34,11 +34,6 @@ config TARGET_AM3517_EVM select DM_SERIAL imply CMD_DM -config TARGET_MT_VENTOUX - bool "TeeJet Mt.Ventoux" - select OMAP3_GPIO_4 - select OMAP3_GPIO_5 if USB_EHCI_HCD - config TARGET_OMAP3_BEAGLE bool "TI OMAP3 BeagleBoard" select DM @@ -189,7 +184,6 @@ config SYS_SOC default "omap3" source "board/logicpd/am3517evm/Kconfig" -source "board/teejet/mt_ventoux/Kconfig" source "board/ti/beagle/Kconfig" source "board/compulab/cm_t35/Kconfig" source "board/timll/devkit8000/Kconfig" diff --git a/board/teejet/mt_ventoux/Kconfig b/board/teejet/mt_ventoux/Kconfig deleted file mode 100644 index fd7196a6f9..00 --- a/board/teejet/mt_ventoux/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_MT_VENTOUX - -config SYS_BOARD - default "mt_ventoux" - -config SYS_VENDOR - default "teejet" - -config SYS_CONFIG_NAME - default "mt_ventoux" - -endif diff --git a/board/teejet/mt_ventoux/MAINTAINERS b/board/teejet/mt_ventoux/MAINTAINERS deleted file mode 100644 index d23464c20f..00 --- a/board/teejet/mt_ventoux/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -MT_VENTOUX BOARD -M: Stefano Babic -S: Maintained -F: board/teejet/mt_ventoux/ -F: include/configs/mt_ventoux.h -F: configs/mt_ventoux_defconfig diff --git a/board/teejet/mt_ventoux/Makefile b/board/teejet/mt_ventoux/Makefile deleted file mode 100644 index f007156286..00 --- a/board/teejet/mt_ventoux/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2011 Ilya Yanok, Emcraft Systems -# -# Based on ti/evm/Makefile - -obj-y := mt_ventoux.o diff --git a/board/teejet/mt_ventoux/mt_ventoux.c b/board/teejet/mt_ventoux/mt_ventoux.c deleted file mode 100644 index 33de7a2131..00 --- a/board/teejet/mt_ventoux/mt_ventoux.c +++ /dev/null @@ -1,342 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2011 - * Stefano Babic, DENX Software Engineering, sba...@denx.de. - * - * Copyright (C) 2009 TechNexion Ltd. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_USB_EHCI_HCD -#include -#include -#endif -#include "mt_ventoux.h" - -DECLARE_GLOBAL_DATA_PTR; - -#define BUZZER 140 -#define SPEAKER141 -#define USB1_PWR 127 -#define USB2_PWR 149 - -#ifndef CONFIG_FPGA -#error "The Teejet mt_ventoux must have CONFIG_FPGA enabled" -#endif - -#define FPGA_RESET 62 -#define FPGA_PROG 116 -#define FPGA_CCLK 117 -#define FPGA_DIN 118 -#define FPGA_INIT 119 -#define FPGA_DONE 154 - -#define LCD_PWR138 -#define LCD_PON_PIN139 - -#if defined(CONFIG_VIDEO) && !defined(CONFIG_SPL_BUILD) -static struct { - u32 xres; - u32 yres; -
[U-Boot] [PATCH 7/8] twister: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/mach-types.h| 1 - arch/arm/mach-omap2/omap3/Kconfig| 6 - board/technexion/twister/Kconfig | 12 - board/technexion/twister/MAINTAINERS | 6 - board/technexion/twister/Makefile| 7 - board/technexion/twister/twister.c | 160 --- board/technexion/twister/twister.h | 400 --- configs/twister_defconfig| 52 include/configs/twister.h| 34 --- 9 files changed, 678 deletions(-) delete mode 100644 board/technexion/twister/Kconfig delete mode 100644 board/technexion/twister/MAINTAINERS delete mode 100644 board/technexion/twister/Makefile delete mode 100644 board/technexion/twister/twister.c delete mode 100644 board/technexion/twister/twister.h delete mode 100644 configs/twister_defconfig delete mode 100644 include/configs/twister.h diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 9b38e36c87..d6d9f71033 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -629,7 +629,6 @@ #define MACH_TYPE_ECIA 623 #define MACH_TYPE_CM4008 624 #define MACH_TYPE_P2001625 -#define MACH_TYPE_TWISTER 626 #define MACH_TYPE_MUDSHARK 627 #define MACH_TYPE_HB2 628 #define MACH_TYPE_IQ80332 629 diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig index 96579e5de9..f192b92626 100644 --- a/arch/arm/mach-omap2/omap3/Kconfig +++ b/arch/arm/mach-omap2/omap3/Kconfig @@ -133,11 +133,6 @@ config TARGET_TAO3530 select OMAP3_GPIO_5 select OMAP3_GPIO_6 -config TARGET_TWISTER - bool "Twister" - select OMAP3_GPIO_2 - select OMAP3_GPIO_5 if USB_EHCI_HCD - config TARGET_OMAP3_CAIRO bool "QUIPOS CAIRO" select DM @@ -198,7 +193,6 @@ source "board/htkw/mcx/Kconfig" source "board/logicpd/omap3som/Kconfig" source "board/nokia/rx51/Kconfig" source "board/technexion/tao3530/Kconfig" -source "board/technexion/twister/Kconfig" source "board/quipos/cairo/Kconfig" source "board/lg/sniper/Kconfig" diff --git a/board/technexion/twister/Kconfig b/board/technexion/twister/Kconfig deleted file mode 100644 index 4c0ace8edd..00 --- a/board/technexion/twister/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_TWISTER - -config SYS_BOARD - default "twister" - -config SYS_VENDOR - default "technexion" - -config SYS_CONFIG_NAME - default "twister" - -endif diff --git a/board/technexion/twister/MAINTAINERS b/board/technexion/twister/MAINTAINERS deleted file mode 100644 index 1ce2b37026..00 --- a/board/technexion/twister/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -TWISTER BOARD -M: Stefano Babic -S: Maintained -F: board/technexion/twister/ -F: include/configs/twister.h -F: configs/twister_defconfig diff --git a/board/technexion/twister/Makefile b/board/technexion/twister/Makefile deleted file mode 100644 index 3408dc04b2..00 --- a/board/technexion/twister/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2011 Ilya Yanok, Emcraft Systems -# -# Based on ti/evm/Makefile - -obj-y := twister.o diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c deleted file mode 100644 index 0590e5f8af..00 --- a/board/technexion/twister/twister.c +++ /dev/null @@ -1,160 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2011 - * Stefano Babic, DENX Software Engineering, sba...@denx.de. - * - * Copyright (C) 2009 TechNexion Ltd. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "twister.h" - -DECLARE_GLOBAL_DATA_PTR; - -/* Timing definitions for Ethernet Controller */ -static const u32 gpmc_smc911[] = { - NET_GPMC_CONFIG1, - NET_GPMC_CONFIG2, - NET_GPMC_CONFIG3, - NET_GPMC_CONFIG4, - NET_GPMC_CONFIG5, - NET_GPMC_CONFIG6, -}; - -static const u32 gpmc_XR16L2751[] = { - XR16L2751_GPMC_CONFIG1, - XR16L2751_GPMC_CONFIG2, - XR16L2751_GPMC_CONFIG3, - XR16L2751_GPMC_CONFIG4, - XR16L2751_GPMC_CONFIG5, - XR16L2751_GPMC_CONFIG6, -}; - -#ifdef CONFIG_USB_EHCI_OMAP -static struct omap_usbhs_board_data usbhs_bdata = { - .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, - .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, - .po
[U-Boot] [PATCH 8/8] mcx: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/mach-types.h | 1 - arch/arm/mach-omap2/omap3/Kconfig | 7 - board/htkw/mcx/Kconfig| 12 - board/htkw/mcx/MAINTAINERS| 6 - board/htkw/mcx/Makefile | 7 - board/htkw/mcx/mcx.c | 141 --- board/htkw/mcx/mcx.h | 400 -- configs/mcx_defconfig | 58 - include/configs/mcx.h | 294 -- 9 files changed, 926 deletions(-) delete mode 100644 board/htkw/mcx/Kconfig delete mode 100644 board/htkw/mcx/MAINTAINERS delete mode 100644 board/htkw/mcx/Makefile delete mode 100644 board/htkw/mcx/mcx.c delete mode 100644 board/htkw/mcx/mcx.h delete mode 100644 configs/mcx_defconfig delete mode 100644 include/configs/mcx.h diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index d6d9f71033..32532b3ca4 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -3596,7 +3596,6 @@ #define MACH_TYPE_TAISHAN 3653 #define MACH_TYPE_TOUCHLINK3654 #define MACH_TYPE_STM32F103ZE 3655 -#define MACH_TYPE_MCX 3656 #define MACH_TYPE_STM_NMHDK_FLI76103657 #define MACH_TYPE_TOP28X 3658 #define MACH_TYPE_OKL4VP_MICROVISOR3659 diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig index f192b92626..d75fab1530 100644 --- a/arch/arm/mach-omap2/omap3/Kconfig +++ b/arch/arm/mach-omap2/omap3/Kconfig @@ -105,12 +105,6 @@ config TARGET_TRICORDER bool "Tricorder" select OMAP3_GPIO_2 -config TARGET_MCX - bool "MCX" - select BOARD_LATE_INIT - select OMAP3_GPIO_2 if USB_EHCI_HCD - select OMAP3_GPIO_5 if USB_EHCI_HCD - config TARGET_OMAP3_LOGIC bool "OMAP3 Logic" select BOARD_LATE_INIT @@ -189,7 +183,6 @@ source "board/logicpd/zoom1/Kconfig" source "board/ti/am3517crane/Kconfig" source "board/pandora/Kconfig" source "board/corscience/tricorder/Kconfig" -source "board/htkw/mcx/Kconfig" source "board/logicpd/omap3som/Kconfig" source "board/nokia/rx51/Kconfig" source "board/technexion/tao3530/Kconfig" diff --git a/board/htkw/mcx/Kconfig b/board/htkw/mcx/Kconfig deleted file mode 100644 index 25ba548dab..00 --- a/board/htkw/mcx/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_MCX - -config SYS_BOARD - default "mcx" - -config SYS_VENDOR - default "htkw" - -config SYS_CONFIG_NAME - default "mcx" - -endif diff --git a/board/htkw/mcx/MAINTAINERS b/board/htkw/mcx/MAINTAINERS deleted file mode 100644 index 513d19daa7..00 --- a/board/htkw/mcx/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -MCX BOARD -M: Anatolij Gustschin -S: Maintained -F: board/htkw/mcx/ -F: include/configs/mcx.h -F: configs/mcx_defconfig diff --git a/board/htkw/mcx/Makefile b/board/htkw/mcx/Makefile deleted file mode 100644 index 54bfc13781..00 --- a/board/htkw/mcx/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2011 Ilya Yanok, Emcraft Systems -# -# Based on ti/evm/Makefile - -obj-y := mcx.o diff --git a/board/htkw/mcx/mcx.c b/board/htkw/mcx/mcx.c deleted file mode 100644 index ee29fe7cf9..00 --- a/board/htkw/mcx/mcx.c +++ /dev/null @@ -1,141 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2011 Ilya Yanok, Emcraft Systems - * - * Based on ti/evm/evm.c - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_USB_EHCI_HCD -#include -#include -#endif -#include "mcx.h" - -DECLARE_GLOBAL_DATA_PTR; - -#define HOT_WATER_BUTTON 42 -#define LCD_OUTPUT 55 - -/* Address of the framebuffer in RAM. */ -#define FB_START_ADDRESS 0x8800 - -#ifdef CONFIG_USB_EHCI_HCD -static struct omap_usbhs_board_data usbhs_bdata = { - .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, - .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, - .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, -}; - -int ehci_hcd_init(int index, enum usb_init_type init, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); -} - -int ehci_hcd_stop(int index) -{ - return omap_ehci_hcd_stop(); -} -#endif - -/* - * Routine: board_init - * Description: Early hardware init. - */ -int board_init(void) -{ - gpmc_init(); /* in SRAM or
[U-Boot] [PATCH 5/8] cm_t3517: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/mach-types.h | 1 - arch/arm/mach-omap2/omap3/Kconfig | 7 - board/compulab/cm_t3517/Kconfig | 12 -- board/compulab/cm_t3517/MAINTAINERS | 6 - board/compulab/cm_t3517/Makefile| 7 - board/compulab/cm_t3517/cm_t3517.c | 240 board/compulab/cm_t3517/mux.c | 235 --- board/compulab/common/eeprom.c | 2 +- configs/cm_t3517_defconfig | 60 --- include/configs/cm_t3517.h | 219 - scripts/config_whitelist.txt| 1 - 11 files changed, 1 insertion(+), 789 deletions(-) delete mode 100644 board/compulab/cm_t3517/Kconfig delete mode 100644 board/compulab/cm_t3517/MAINTAINERS delete mode 100644 board/compulab/cm_t3517/Makefile delete mode 100644 board/compulab/cm_t3517/cm_t3517.c delete mode 100644 board/compulab/cm_t3517/mux.c delete mode 100644 configs/cm_t3517_defconfig delete mode 100644 include/configs/cm_t3517.h diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index d882f19b81..a3a2b729b1 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -2716,7 +2716,6 @@ #define MACH_TYPE_VPNEXT_MPU 2747 #define MACH_TYPE_BCMRING_TABLET_V12748 #define MACH_TYPE_SGARM10 2749 -#define MACH_TYPE_CM_T3517 2750 #define MACH_TYPE_OMAP3_CPS2751 #define MACH_TYPE_AXAR1500_RECEIVER2752 #define MACH_TYPE_WBD222 2753 diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig index bc2b6f180c..9bc616c286 100644 --- a/arch/arm/mach-omap2/omap3/Kconfig +++ b/arch/arm/mach-omap2/omap3/Kconfig @@ -54,12 +54,6 @@ config TARGET_CM_T35 select OMAP3_GPIO_5 select OMAP3_GPIO_6 if LED_STATUS -config TARGET_CM_T3517 - bool "CompuLab CM-T3517 boards" - select OMAP3_GPIO_2 - select OMAP3_GPIO_5 - select OMAP3_GPIO_6 if LED_STATUS - config TARGET_DEVKIT8000 bool "TimLL OMAP3 Devkit8000" select DM @@ -198,7 +192,6 @@ source "board/logicpd/am3517evm/Kconfig" source "board/teejet/mt_ventoux/Kconfig" source "board/ti/beagle/Kconfig" source "board/compulab/cm_t35/Kconfig" -source "board/compulab/cm_t3517/Kconfig" source "board/timll/devkit8000/Kconfig" source "board/ti/evm/Kconfig" source "board/isee/igep00x0/Kconfig" diff --git a/board/compulab/cm_t3517/Kconfig b/board/compulab/cm_t3517/Kconfig deleted file mode 100644 index 2f5473d76a..00 --- a/board/compulab/cm_t3517/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_CM_T3517 - -config SYS_BOARD - default "cm_t3517" - -config SYS_VENDOR - default "compulab" - -config SYS_CONFIG_NAME - default "cm_t3517" - -endif diff --git a/board/compulab/cm_t3517/MAINTAINERS b/board/compulab/cm_t3517/MAINTAINERS deleted file mode 100644 index fbb6882138..00 --- a/board/compulab/cm_t3517/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -CM_T3517 BOARD -M: Igor Grinberg -S: Maintained -F: board/compulab/cm_t3517/ -F: include/configs/cm_t3517.h -F: configs/cm_t3517_defconfig diff --git a/board/compulab/cm_t3517/Makefile b/board/compulab/cm_t3517/Makefile deleted file mode 100644 index bfcb75f98f..00 --- a/board/compulab/cm_t3517/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2014 CompuLab, Ltd. -# -# Authors: Igor Grinberg - -obj-y += cm_t3517.o mux.o diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c deleted file mode 100644 index 668bb7631a..00 --- a/board/compulab/cm_t3517/cm_t3517.c +++ /dev/null @@ -1,240 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2014 CompuLab, Ltd. - * - * Authors: Igor Grinberg - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../common/common.h" -#include "../common/eeprom.h" - -DECLARE_GLOBAL_DATA_PTR; - -const omap3_sysinfo sysinfo = { - DDR_DISCRETE, - "CM-T3517 board", - "NAND 128/512M", -}; - -#ifdef CONFIG_USB_MUSB_AM35X -static struct musb_hdrc_config cm_t3517_musb_config = { - .multipoint = 1, - .dyn_fifo = 1, - .num_eps= 16, - .ram_bits = 12, -}; - -static struct omap_musb_board_data cm_t3517_musb_bo
[U-Boot] [PATCH 4/8] ipam390: remove board
From: Bartosz Golaszewski This board still doesn't select CONFIG_DM and seems to be umaintained. As it makes progress on modernizing several DaVinci drivers more difficult and the maintainer has not expressed interest in updating it, this patch proposes to remove it. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/Kconfig | 7 - board/Barix/ipam390/Kconfig| 12 - board/Barix/ipam390/MAINTAINERS| 6 - board/Barix/ipam390/Makefile | 8 - board/Barix/ipam390/README.ipam390 | 229 -- board/Barix/ipam390/ipam390-ais-uart.cfg | 202 - board/Barix/ipam390/ipam390.c | 335 - board/Barix/ipam390/u-boot-spl-ipam390.lds | 57 configs/ipam390_defconfig | 45 --- include/configs/ipam390.h | 237 --- 10 files changed, 1138 deletions(-) delete mode 100644 board/Barix/ipam390/Kconfig delete mode 100644 board/Barix/ipam390/MAINTAINERS delete mode 100644 board/Barix/ipam390/Makefile delete mode 100644 board/Barix/ipam390/README.ipam390 delete mode 100644 board/Barix/ipam390/ipam390-ais-uart.cfg delete mode 100644 board/Barix/ipam390/ipam390.c delete mode 100644 board/Barix/ipam390/u-boot-spl-ipam390.lds delete mode 100644 configs/ipam390_defconfig delete mode 100644 include/configs/ipam390.h diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index c2a5759f45..61e84e5129 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -4,12 +4,6 @@ choice prompt "DaVinci board select" optional -config TARGET_IPAM390 - bool "IPAM390 board" - select MACH_DAVINCI_DA850_EVM - select SOC_DA850 - select SUPPORT_SPL - config TARGET_DA850EVM bool "DA850 EVM board" select MACH_DAVINCI_DA850_EVM @@ -136,7 +130,6 @@ config SYS_DA850_PLL1_PLLDIV3 endif -source "board/Barix/ipam390/Kconfig" source "board/davinci/da8xxevm/Kconfig" source "board/lego/ev3/Kconfig" diff --git a/board/Barix/ipam390/Kconfig b/board/Barix/ipam390/Kconfig deleted file mode 100644 index b85d4da44b..00 --- a/board/Barix/ipam390/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_IPAM390 - -config SYS_BOARD - default "ipam390" - -config SYS_VENDOR - default "Barix" - -config SYS_CONFIG_NAME - default "ipam390" - -endif diff --git a/board/Barix/ipam390/MAINTAINERS b/board/Barix/ipam390/MAINTAINERS deleted file mode 100644 index 640e34fc8d..00 --- a/board/Barix/ipam390/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -IPAM390 BOARD -M: Heiko Schocher -S: Maintained -F: board/Barix/ipam390/ -F: include/configs/ipam390.h -F: configs/ipam390_defconfig diff --git a/board/Barix/ipam390/Makefile b/board/Barix/ipam390/Makefile deleted file mode 100644 index 735250a1e2..00 --- a/board/Barix/ipam390/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. -# -# Copyright (C) 2007 Sergey Kubushyn - -obj-y += ipam390.o diff --git a/board/Barix/ipam390/README.ipam390 b/board/Barix/ipam390/README.ipam390 deleted file mode 100644 index be09280dd8..00 --- a/board/Barix/ipam390/README.ipam390 +++ /dev/null @@ -1,229 +0,0 @@ -Summary -=== -The README is for the boot procedure on the ipam390 board - -In the context of U-Boot, the board is booted in three stages. The initial -bootloader which executes upon reset is the ROM Boot Loader (RBL) and sits -in the internal ROM. The RBL initializes the internal memory and then -depending on the exact board and pin configurations will initialize another -controller (such as NAND) to continue the boot process by loading -the secondary program loader (SPL). The SPL will initialize the system -further (some clocks, SDRAM). As on this board is used the falcon boot -mode, now 2 ways are possible depending on the GPIO 7_14 input pin, -connected with the "soft reset switch" - -If this pin is logical 1 (high level): -spl code starts the kernel image without delay - -If this pin is logical 0 (low level): -spl code starts the u-boot image - -AIS is an image format defined by TI for the images that are to be loaded -to memory by the RBL. The image is divided into a series of sections and -the image's entry point is specified. Each section comes with meta data -like the target address the section is to be copied to and the size of the -section, which is used by the RBL to load the image. At the end of the -image the RBL jumps to the image entry point. The AIS format allows for -other things such as programming the clocks and SDRAM if the header is -programmed for it. We do not take advantage of this and instead use SPL as -it allows for
[U-Boot] [PATCH] cmd: define CMD_DATA_SIZE when CONFIG_CMD_SETEXPR is selected
From: Bartosz Golaszewski The setexpr shell command calls cmd_get_data_size() which is only built when CMD_DATA_SIZE is defined. We need to define CMD_DATA_SIZE if CONFIG_CMD_SETEXPR is selected or the build will fail if no other command selecting this option is enabled. Signed-off-by: Bartosz Golaszewski --- include/command.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/command.h b/include/command.h index be74f6ac92..2bfee89df3 100644 --- a/include/command.h +++ b/include/command.h @@ -109,7 +109,8 @@ int cmd_process_error(cmd_tbl_t *cmdtp, int err); #if defined(CONFIG_CMD_MEMORY) || \ defined(CONFIG_CMD_I2C) || \ defined(CONFIG_CMD_ITEST) || \ - defined(CONFIG_CMD_PCI) + defined(CONFIG_CMD_PCI) || \ + defined(CONFIG_CMD_SETEXPR) #define CMD_DATA_SIZE extern int cmd_get_data_size(char* arg, int default_size); #endif -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 0/5] arm: remove leftover code for dm* SoCs
pon., 20 maj 2019 o 17:39 Adam Ford napisał(a): > > On Mon, Apr 29, 2019 at 11:37 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > Commit 6761946fb716 ("arm: Remove unmaintained davinci boards") removed > > support for certain DaVinci platforms. We still want to support the > > da850 chips though and I'm currently working on converting all remaining > > drivers to using the driver model (please don't remove it yet :)). > > > > This series is the first step: let's remove all leftover dead code. This > > will make things easier when adding support for driver model to NAND and > > EMAC drivers. > > > > Bartosz Golaszewski (5): > > net: davinci_emac: drop support for unused PHYs > > arm: davinci: remove dead code for PHYs used by DaVinci DM* boards > > nand: davinci: remove dead code for dm644x > > usb: musb_hcd: remove unnecessary ifdefs for dm* SoCs > > arm: davinci: remove leftover code for dm* SoCs > > > > arch/arm/mach-davinci/Makefile| 1 - > > arch/arm/mach-davinci/cpu.c | 116 - > > arch/arm/mach-davinci/dm355.c | 29 -- > > arch/arm/mach-davinci/dm365.c | 19 - > > arch/arm/mach-davinci/dm365_lowlevel.c| 459 -- > > arch/arm/mach-davinci/dm644x.c| 80 --- > > arch/arm/mach-davinci/dm646x.c| 25 - > > arch/arm/mach-davinci/dp83848.c | 127 - > > arch/arm/mach-davinci/et1011c.c | 41 -- > > .../mach-davinci/include/mach/davinci_misc.h | 4 +- > > .../arm/mach-davinci/include/mach/emac_defs.h | 56 --- > > arch/arm/mach-davinci/include/mach/gpio.h | 14 +- > > arch/arm/mach-davinci/include/mach/hardware.h | 216 - > > arch/arm/mach-davinci/include/mach/i2c_defs.h | 4 - > > .../mach-davinci/include/mach/syscfg_defs.h | 49 -- > > arch/arm/mach-davinci/ksz8873.c | 52 -- > > arch/arm/mach-davinci/lxt972.c| 112 - > > arch/arm/mach-davinci/misc.c | 5 +- > > arch/arm/mach-davinci/psc.c | 76 --- > > arch/arm/mach-davinci/spl.c | 5 - > > drivers/mtd/nand/raw/davinci_nand.c | 39 -- > > drivers/net/ti/davinci_emac.c | 55 +-- > > drivers/usb/musb/musb_hcd.c | 6 - > > 23 files changed, 9 insertions(+), 1581 deletions(-) > > delete mode 100644 arch/arm/mach-davinci/dm355.c > > delete mode 100644 arch/arm/mach-davinci/dm365.c > > delete mode 100644 arch/arm/mach-davinci/dm365_lowlevel.c > > delete mode 100644 arch/arm/mach-davinci/dm644x.c > > delete mode 100644 arch/arm/mach-davinci/dm646x.c > > delete mode 100644 arch/arm/mach-davinci/dp83848.c > > delete mode 100644 arch/arm/mach-davinci/et1011c.c > > delete mode 100644 arch/arm/mach-davinci/include/mach/syscfg_defs.h > > delete mode 100644 arch/arm/mach-davinci/ksz8873.c > > delete mode 100644 arch/arm/mach-davinci/lxt972.c > > What about the references to CONFIG_SOC_DM644X inside lowlevel_init.S? > > I am not even sure anyone calls this. > > > > -- > > 2.21.0 > > Right, seems like nobody uses it anymore. I'll send a follow-up. Bart ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] arm: davinci: remove leftover assembly
From: Bartosz Golaszewski There are no more users of lowlevel_init.S. Remove the file. Suggested-by: Adam Ford Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/Makefile| 4 - arch/arm/mach-davinci/lowlevel_init.S | 692 -- 2 files changed, 696 deletions(-) delete mode 100644 arch/arm/mach-davinci/lowlevel_init.S diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 6887fe05dd..ed88274072 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile @@ -18,7 +18,3 @@ obj-$(CONFIG_SPL_FRAMEWORK) += spl.o obj-$(CONFIG_SOC_DM365)+= dm365_lowlevel.o obj-$(CONFIG_SOC_DA8XX)+= da850_lowlevel.o endif - -ifndef CONFIG_SKIP_LOWLEVEL_INIT -obj-y += lowlevel_init.o -endif diff --git a/arch/arm/mach-davinci/lowlevel_init.S b/arch/arm/mach-davinci/lowlevel_init.S deleted file mode 100644 index b82dafad2b..00 --- a/arch/arm/mach-davinci/lowlevel_init.S +++ /dev/null @@ -1,692 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Low-level board setup code for TI DaVinci SoC based boards. - * - * Copyright (C) 2007 Sergey Kubushyn - * - * Partially based on TI sources, original copyrights follow: - */ - -/* - * Board specific setup info - * - * (C) Copyright 2003 - * Texas Instruments, - * Kshitij Gupta - * - * Modified for OMAP 1610 H2 board by Nishant Kamat, Jan 2004 - * - * Modified for OMAP 5912 OSK board by Rishi Bhattacharya, Apr 2004 - * - * Modified for DV-EVM board by Rishi Bhattacharya, Apr 2005 - * - * Modified for DV-EVM board by Swaminathan S, Nov 2005 - */ - -#include - -#define MDSTAT_STATE 0x3f - -.globl lowlevel_init -lowlevel_init: -#ifdef CONFIG_SOC_DM644X - - /*---* -* Mask all IRQs by setting all bits in the EINT default * -*---*/ - mov r1, $0 - ldr r0, =EINT_ENABLE0 - str r1, [r0] - ldr r0, =EINT_ENABLE1 - str r1, [r0] - - /*--* -* Put the GEM in reset * -*--*/ - - /* Put the GEM in reset */ - ldr r8, PSC_GEM_FLAG_CLEAR - ldr r6, MDCTL_GEM - ldr r7, [r6] - and r7, r7, r8 - str r7, [r6] - - /* Enable the Power Domain Transition Command */ - ldr r6, PTCMD - ldr r7, [r6] - orr r7, r7, $0x02 - str r7, [r6] - - /* Check for Transition Complete(PTSTAT) */ -checkStatClkStopGem: - ldr r6, PTSTAT - ldr r7, [r6] - andsr7, r7, $0x02 - bne checkStatClkStopGem - - /* Check for GEM Reset Completion */ -checkGemStatClkStop: - ldr r6, MDSTAT_GEM - ldr r7, [r6] - andsr7, r7, $0x100 - bne checkGemStatClkStop - - /* Do this for enabling a WDT initiated reset this is a workaround - for a chip bug. Not required under normal situations */ - ldr r6, P1394 - mov r10, $0 - str r10, [r6] - - /*--* -* Enable L1 & L2 Memories in Fast mode * -*--*/ - ldr r6, DFT_ENABLE - mov r10, $0x01 - str r10, [r6] - - ldr r6, MMARG_BRF0 - ldr r10, MMARG_BRF0_VAL - str r10, [r6] - - ldr r6, DFT_ENABLE - mov r10, $0 - str r10, [r6] - - /*--* -* DDR2 PLL Initialization * -*--*/ - - /* Select the Clock Mode Depending on the Value written in the Boot Table by the run script */ - mov r10, $0 - ldr r6, PLL2_CTL - ldr r7, PLL_CLKSRC_MASK - ldr r8, [r6] - and r8, r8, r7 - mov r9, r10, lsl $8 - orr r8, r8, r9 - str r8, [r6] - - /* Select the PLLEN source */ - ldr r7, PLL_ENSRC_MASK - and r8, r8, r7 - str r8, [r6] - - /* Bypass the PLL */ - ldr r7, PLL_BYPASS_MASK - and r8, r8, r7 - str r8, [r6] - - /* Wait for few cycles to allow PLLEN Mux switch properly to bypass Clock */ - mov r10, $0x20 -WaitPPL2Loop: - subsr10, r10, $1 - bne WaitPPL2Loop - - /* Reset the PLL */ - ldr r7, PLL_RESET_MASK - and r8, r8, r7 - str r8, [r6] - - /* Power up the PLL */ - ldr r7, PLL_PWRUP_MASK - and r8, r8, r7 - str r8, [r6] - - /* Enable the PLL from Disable Mode */ - ldr r7, PLL_DISABLE_ENABLE_
[U-Boot] [PATCH 0/4] davinci: fix build warnings
From: Bartosz Golaszewski There are several build warnings related to driver-model usage emitted when building u-boot for da850-evm and da850-lcdk. This series fixes them and - while we're at it - removes the i2c compatiblity layer as davinci was the last user of it. Bartosz Golaszewski (4): davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs i2c: remove i2c driver-model compatibility layer omapl138_lcdk_defconfig: don't build support for SPI Makefile | 7 -- configs/da850_am18xxevm_defconfig | 1 - configs/omapl138_lcdk_defconfig| 7 +- configs/sandbox64_defconfig| 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_noblk_defconfig| 1 - configs/sandbox_spl_defconfig | 1 - configs/tools-only_defconfig | 1 - drivers/i2c/Kconfig| 13 +-- drivers/i2c/Makefile | 1 - drivers/i2c/i2c-uclass-compat.c| 128 - include/_exports.h | 3 +- include/configs/am3517_evm.h | 1 - include/configs/da850evm.h | 8 -- include/configs/omapl138_lcdk.h| 8 -- include/exports.h | 3 +- include/i2c.h | 80 -- 18 files changed, 4 insertions(+), 262 deletions(-) delete mode 100644 drivers/i2c/i2c-uclass-compat.c -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/4] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
From: Bartosz Golaszewski This option is no longer used on any davinci board but still selected in defconfigs which causes the following warning: = WARNING == This board uses CONFIG_DM_I2C_COMPAT. Please remove (possibly in a subsequent patch in your series) before sending patches to the mailing list. Remove all references to CONFIG_DM_I2C_COMPAT from davinci. Signed-off-by: Bartosz Golaszewski --- configs/da850_am18xxevm_defconfig | 1 - configs/omapl138_lcdk_defconfig | 1 - include/configs/am3517_evm.h | 1 - include/configs/da850evm.h| 8 include/configs/omapl138_lcdk.h | 8 5 files changed, 19 deletions(-) diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig index f098222113..ad01957fa1 100644 --- a/configs/da850_am18xxevm_defconfig +++ b/configs/da850_am18xxevm_defconfig @@ -44,7 +44,6 @@ CONFIG_DM=y CONFIG_SPL_DM=y CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y -CONFIG_DM_I2C_COMPAT=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_MTD_DEVICE=y CONFIG_DM_SPI_FLASH=y diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index e43141844a..b03d8160af 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -37,7 +37,6 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_DM_I2C=y -CONFIG_DM_I2C_COMPAT=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y CONFIG_NAND=y diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 9475e9975d..11f8f6d213 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -14,7 +14,6 @@ #include -#undef CONFIG_DM_I2C_COMPAT #define CONFIG_REVISION_TAG /* Hardware drivers */ diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index ccdac0abec..5d02c35279 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -18,14 +18,6 @@ #define CONFIG_USE_SPIFLASH #endif -/* -* Disable DM_* for SPL build and can be re-enabled after adding -* DM support in SPL -*/ -#ifdef CONFIG_SPL_BUILD -#undef CONFIG_DM_I2C -#undef CONFIG_DM_I2C_COMPAT -#endif /* * SoC Configuration */ diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index da615e5063..db4a663c53 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -16,14 +16,6 @@ #undef CONFIG_USE_SPIFLASH #undef CONFIG_SYS_USE_NOR -/* -* Disable DM_* for SPL build and can be re-enabled after adding -* DM support in SPL -*/ -#ifdef CONFIG_SPL_BUILD -#undef CONFIG_DM_I2C -#undef CONFIG_DM_I2C_COMPAT -#endif /* * SoC Configuration */ -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/4] sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
From: Bartosz Golaszewski There are no more "real" users of CONFIG_DM_I2C_COMPAT and we'll soon remove it altogether. Stop building it in sandbox mode. Signed-off-by: Bartosz Golaszewski --- Makefile | 2 +- configs/sandbox64_defconfig| 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_noblk_defconfig| 1 - configs/sandbox_spl_defconfig | 1 - configs/tools-only_defconfig | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 059978bfe6..ff38b5d19f 100644 --- a/Makefile +++ b/Makefile @@ -918,7 +918,7 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \ $(srctree)/scripts/config_whitelist.txt $(srctree) all: $(ALL-y) -ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y) +ifeq ($(CONFIG_DM_I2C_COMPAT),y) @echo >&2 "= WARNING ==" @echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove" @echo >&2 "(possibly in a subsequent patch in your series)" diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index 1bc3bd3801..85226f5009 100644 --- a/configs/sandbox64_defconfig +++ b/configs/sandbox64_defconfig @@ -89,7 +89,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 4877f1099a..9bc567b672 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -104,7 +104,6 @@ CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y CONFIG_DM_HWSPINLOCK=y CONFIG_HWSPINLOCK_SANDBOX=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig index 40593ee3a1..f78d45ad1c 100644 --- a/configs/sandbox_flattree_defconfig +++ b/configs/sandbox_flattree_defconfig @@ -74,7 +74,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig index 24ff4b41da..653341699b 100644 --- a/configs/sandbox_noblk_defconfig +++ b/configs/sandbox_noblk_defconfig @@ -81,7 +81,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index bebd78d55b..6b8b923dda 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -95,7 +95,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index fb06076785..e3b3018158 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -11,7 +11,6 @@ CONFIG_OF_HOSTFILE=y CONFIG_DEFAULT_DEVICE_TREE="sandbox" # CONFIG_UDP_FUNCTION_FASTBOOT is not set CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_PCI=y CONFIG_DM_PCI=y CONFIG_PCI_SANDBOX=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/4] omapl138_lcdk_defconfig: don't build support for SPI
From: Bartosz Golaszewski The following warning is emited when building u-boot for da850-lcdk: = WARNING == This board does not use CONFIG_DM_SPI. Please update the board before v2019.04 for no dm conversion and v2019.07 for partially dm converted drivers. Failure to update can lead to driver/board removal See doc/driver-model/MIGRATION.txt for more info. = WARNING == This board does not use CONFIG_DM_SPI_FLASH. Please update the board to use CONFIG_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info. While we could fix it by selecting CONFIG_DM_SPI, there's no need to build it at all as SPI is disabled on da850-lcdk. Remove all unneeded options from the defconfig. Signed-off-by: Bartosz Golaszewski --- configs/omapl138_lcdk_defconfig | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index b03d8160af..1c232b47f3 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -27,6 +27,7 @@ CONFIG_CRC32_VERIFY=y # CONFIG_CMD_FLASH is not set # CONFIG_CMD_GPIO is not set CONFIG_CMD_NAND=y +# CONFIG_CMD_SPI is not set # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MTDPARTS=y CONFIG_CMD_DIAG=y @@ -45,13 +46,8 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x28000 CONFIG_SPL_NAND_SIMPLE=y -CONFIG_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=3000 -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_SPI_FLASH_WINBOND=y CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y -CONFIG_SPI=y -CONFIG_DAVINCI_SPI=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/4] i2c: remove i2c driver-model compatibility layer
From: Bartosz Golaszewski There are no more users of the compatibility layer for i2c. Remove the driver and all references to it. Signed-off-by: Bartosz Golaszewski --- Makefile| 7 -- drivers/i2c/Kconfig | 13 +--- drivers/i2c/Makefile| 1 - drivers/i2c/i2c-uclass-compat.c | 128 include/_exports.h | 3 +- include/exports.h | 3 +- include/i2c.h | 80 7 files changed, 3 insertions(+), 232 deletions(-) delete mode 100644 drivers/i2c/i2c-uclass-compat.c diff --git a/Makefile b/Makefile index ff38b5d19f..bc5774d975 100644 --- a/Makefile +++ b/Makefile @@ -918,13 +918,6 @@ cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \ $(srctree)/scripts/config_whitelist.txt $(srctree) all: $(ALL-y) -ifeq ($(CONFIG_DM_I2C_COMPAT),y) - @echo >&2 "= WARNING ==" - @echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove" - @echo >&2 "(possibly in a subsequent patch in your series)" - @echo >&2 "before sending patches to the mailing list." - @echo >&2 "" -endif ifeq ($(CONFIG_MMC),y) ifneq ($(CONFIG_DM_MMC)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) @echo >&2 "= WARNING ==" diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 095a9bc6a4..9c26471f94 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -12,18 +12,7 @@ config DM_I2C write and speed, is implemented with the bus drivers operations, which provide methods for bus setting and data transfer. Each chip device (bus child) info is kept as parent platdata. The interface - is defined in include/i2c.h. When i2c bus driver supports the i2c - uclass, but the device drivers not, then DM_I2C_COMPAT config can - be used as compatibility layer. - -config DM_I2C_COMPAT - bool "Enable I2C compatibility layer" - depends on DM - help - Enable old-style I2C functions for compatibility with existing code. - This option can be enabled as a temporary measure to avoid needing - to convert all code for a board in a single commit. It should not - be enabled for any board in an official release. + is defined in include/i2c.h. config I2C_CROS_EC_TUNNEL tristate "Chrome OS EC tunnel I2C bus" diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index dc40055efb..c2f75d8755 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -3,7 +3,6 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, w...@denx.de. obj-$(CONFIG_DM_I2C) += i2c-uclass.o -obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o diff --git a/drivers/i2c/i2c-uclass-compat.c b/drivers/i2c/i2c-uclass-compat.c deleted file mode 100644 index b3ade88113..00 --- a/drivers/i2c/i2c-uclass-compat.c +++ /dev/null @@ -1,128 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2014 Google, Inc - */ - -#include -#include -#include -#include - -static int cur_busnum __attribute__((section(".data"))); - -static int i2c_compat_get_device(uint chip_addr, int alen, -struct udevice **devp) -{ - struct dm_i2c_chip *chip; - int ret; - - ret = i2c_get_chip_for_busnum(cur_busnum, chip_addr, alen, devp); - if (ret) - return ret; - chip = dev_get_parent_platdata(*devp); - if (chip->offset_len != alen) { - printf("I2C chip %x: requested alen %d does not match chip offset_len %d\n", - chip_addr, alen, chip->offset_len); - return -EADDRNOTAVAIL; - } - - return 0; -} - -int i2c_probe(uint8_t chip_addr) -{ - struct udevice *bus, *dev; - int ret; - - ret = uclass_get_device_by_seq(UCLASS_I2C, cur_busnum, &bus); - if (ret) { - debug("Cannot find I2C bus %d: err=%d\n", cur_busnum, ret); - return ret; - } - - if (!bus) - return -ENOENT; - - return dm_i2c_probe(bus, chip_addr, 0, &dev); -} - -int i2c_read(uint8_t chip_addr, unsigned int addr, int alen, uint8_t *buffer, -int len) -{ - struct udevice *dev; - int ret; - - ret = i2c_compat_get_device(chip_addr, alen, &dev); - if (ret) - return ret; - - return dm_i2c_read(dev, addr, buffer, len); -} - -int i2c_write(uint8_t chip_addr, unsigned int addr, int al
[U-Boot] [PATCH 0/4] davinci: omapl138-lcdk: enable CONFIG_SPL_DM
From: Bartosz Golaszewski This series enables the driver model in SPL on omapl138-lcdk. First two patches enable size-reducing options in defconfig. The third patch is just a cleanup of the board file. Last patch enables the driver model and defines the serial device so that we don't have to disable CONFIG_SPL_DM_SERIAL which is enabled by default when selecting CONFIG_SPL_DM. Bartosz Golaszewski (4): davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF davinci: omapl138-lcdk: remove unneeded includes davinci: omapl138-lcdk: enable driver-model in SPL board/davinci/da8xxevm/omapl138_lcdk.c | 18 -- configs/omapl138_lcdk_defconfig| 7 +++ 2 files changed, 23 insertions(+), 2 deletions(-) -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/4] davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE
From: Bartosz Golaszewski We're working towards enabling the driver model in SPL for da850-lcdk. Enable SPL_SYS_MALLOC_SIMPLE in defconfig to reduce SPL size. Signed-off-by: Bartosz Golaszewski --- configs/omapl138_lcdk_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index e43141844a..c8c20b0de1 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -19,6 +19,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_TEXT_BASE=0x8000 CONFIG_SPL_BOARD_INIT=y +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5 CONFIG_SPL_NAND_SUPPORT=y CONFIG_HUSH_PARSER=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 3/4] davinci: omapl138-lcdk: remove unneeded includes
From: Bartosz Golaszewski There's no SPI on da850-lcdk. Remove unnecessary includes. Signed-off-by: Bartosz Golaszewski --- board/davinci/da8xxevm/omapl138_lcdk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 2c2f885d43..156d61d9fb 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include #include -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/4] davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF
From: Bartosz Golaszewski We're working towards enabling the driver-model in SPL for da850-lcdk. Enable CONFIG_USE_TINY_PRINTF in defconfig to reduce SPL size. Signed-off-by: Bartosz Golaszewski --- configs/omapl138_lcdk_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index c8c20b0de1..b375da50df 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -57,3 +57,4 @@ CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DAVINCI_SPI=y +CONFIG_USE_TINY_PRINTF=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/4] davinci: omapl138-lcdk: enable driver-model in SPL
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 --- board/davinci/da8xxevm/omapl138_lcdk.c | 16 configs/omapl138_lcdk_defconfig| 5 + 2 files changed, 21 insertions(+) diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 156d61d9fb..b20747ba01 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include #include @@ -369,3 +371,17 @@ int board_mmc_init(bd_t *bis) } #endif #endif + +#ifdef CONFIG_SPL_BUILD +static const struct ns16550_platdata serial_pdata = { + .base = DAVINCI_UART2_BASE, + .reg_shift = 2, + .clock = 22800, + .fcr = UART_FCR_DEFVAL, +}; + +U_BOOT_DEVICE(omapl138_uart) = { + .name = "ns16550_serial", + .platdata = &serial_pdata, +}; +#endif diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index b375da50df..f53a51321c 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y CONFIG_CMD_DIAG=y CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk" +CONFIG_SPL_OF_PLATDATA=y CONFIG_ENV_IS_IN_NAND=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y +CONFIG_SPL_DM=y CONFIG_DM_I2C=y CONFIG_DM_I2C_COMPAT=y CONFIG_SYS_I2C_DAVINCI=y @@ -53,8 +56,10 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y +CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DAVINCI_SPI=y CONFIG_USE_TINY_PRINTF=y +# CONFIG_SPL_OF_LIBFDT is not set -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 2/2] arm: davinci: remove leftover assembly
From: Bartosz Golaszewski There are no more users of lowlevel_init.S. Remove the file. Suggested-by: Adam Ford Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/Makefile| 4 - arch/arm/mach-davinci/lowlevel_init.S | 692 -- 2 files changed, 696 deletions(-) delete mode 100644 arch/arm/mach-davinci/lowlevel_init.S diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index 6887fe05dd..ed88274072 100644 --- a/arch/arm/mach-davinci/Makefile +++ b/arch/arm/mach-davinci/Makefile @@ -18,7 +18,3 @@ obj-$(CONFIG_SPL_FRAMEWORK) += spl.o obj-$(CONFIG_SOC_DM365)+= dm365_lowlevel.o obj-$(CONFIG_SOC_DA8XX)+= da850_lowlevel.o endif - -ifndef CONFIG_SKIP_LOWLEVEL_INIT -obj-y += lowlevel_init.o -endif diff --git a/arch/arm/mach-davinci/lowlevel_init.S b/arch/arm/mach-davinci/lowlevel_init.S deleted file mode 100644 index b82dafad2b..00 --- a/arch/arm/mach-davinci/lowlevel_init.S +++ /dev/null @@ -1,692 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Low-level board setup code for TI DaVinci SoC based boards. - * - * Copyright (C) 2007 Sergey Kubushyn - * - * Partially based on TI sources, original copyrights follow: - */ - -/* - * Board specific setup info - * - * (C) Copyright 2003 - * Texas Instruments, - * Kshitij Gupta - * - * Modified for OMAP 1610 H2 board by Nishant Kamat, Jan 2004 - * - * Modified for OMAP 5912 OSK board by Rishi Bhattacharya, Apr 2004 - * - * Modified for DV-EVM board by Rishi Bhattacharya, Apr 2005 - * - * Modified for DV-EVM board by Swaminathan S, Nov 2005 - */ - -#include - -#define MDSTAT_STATE 0x3f - -.globl lowlevel_init -lowlevel_init: -#ifdef CONFIG_SOC_DM644X - - /*---* -* Mask all IRQs by setting all bits in the EINT default * -*---*/ - mov r1, $0 - ldr r0, =EINT_ENABLE0 - str r1, [r0] - ldr r0, =EINT_ENABLE1 - str r1, [r0] - - /*--* -* Put the GEM in reset * -*--*/ - - /* Put the GEM in reset */ - ldr r8, PSC_GEM_FLAG_CLEAR - ldr r6, MDCTL_GEM - ldr r7, [r6] - and r7, r7, r8 - str r7, [r6] - - /* Enable the Power Domain Transition Command */ - ldr r6, PTCMD - ldr r7, [r6] - orr r7, r7, $0x02 - str r7, [r6] - - /* Check for Transition Complete(PTSTAT) */ -checkStatClkStopGem: - ldr r6, PTSTAT - ldr r7, [r6] - andsr7, r7, $0x02 - bne checkStatClkStopGem - - /* Check for GEM Reset Completion */ -checkGemStatClkStop: - ldr r6, MDSTAT_GEM - ldr r7, [r6] - andsr7, r7, $0x100 - bne checkGemStatClkStop - - /* Do this for enabling a WDT initiated reset this is a workaround - for a chip bug. Not required under normal situations */ - ldr r6, P1394 - mov r10, $0 - str r10, [r6] - - /*--* -* Enable L1 & L2 Memories in Fast mode * -*--*/ - ldr r6, DFT_ENABLE - mov r10, $0x01 - str r10, [r6] - - ldr r6, MMARG_BRF0 - ldr r10, MMARG_BRF0_VAL - str r10, [r6] - - ldr r6, DFT_ENABLE - mov r10, $0 - str r10, [r6] - - /*--* -* DDR2 PLL Initialization * -*--*/ - - /* Select the Clock Mode Depending on the Value written in the Boot Table by the run script */ - mov r10, $0 - ldr r6, PLL2_CTL - ldr r7, PLL_CLKSRC_MASK - ldr r8, [r6] - and r8, r8, r7 - mov r9, r10, lsl $8 - orr r8, r8, r9 - str r8, [r6] - - /* Select the PLLEN source */ - ldr r7, PLL_ENSRC_MASK - and r8, r8, r7 - str r8, [r6] - - /* Bypass the PLL */ - ldr r7, PLL_BYPASS_MASK - and r8, r8, r7 - str r8, [r6] - - /* Wait for few cycles to allow PLLEN Mux switch properly to bypass Clock */ - mov r10, $0x20 -WaitPPL2Loop: - subsr10, r10, $1 - bne WaitPPL2Loop - - /* Reset the PLL */ - ldr r7, PLL_RESET_MASK - and r8, r8, r7 - str r8, [r6] - - /* Power up the PLL */ - ldr r7, PLL_PWRUP_MASK - and r8, r8, r7 - str r8, [r6] - - /* Enable the PLL from Disable Mode */ - ldr r7, PLL_DISABLE_ENABLE_
[U-Boot] [PATCH v2 0/2] davinci: remove leftover low-level routines
From: Bartosz Golaszewski I'm resending my earlier patch together with David's commit that makes this series not break the build for LEGO EV3. Bartosz Golaszewski (1): arm: davinci: remove leftover assembly David Lechner (1): configs/legoev3: define CONFIG_SKIP_LOWLEVEL_INIT arch/arm/mach-davinci/Makefile| 4 - arch/arm/mach-davinci/lowlevel_init.S | 692 -- include/configs/legoev3.h | 1 + 3 files changed, 1 insertion(+), 696 deletions(-) delete mode 100644 arch/arm/mach-davinci/lowlevel_init.S -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] configs/legoev3: define CONFIG_SKIP_LOWLEVEL_INIT
From: David Lechner This adds a define for CONFIG_SKIP_LOWLEVEL_INIT in the legoev3 config. On the EV3, U-Boot is loaded into RAM by another bootloader, so we don't need the lowlevel init in U-Boot. Signed-off-by: David Lechner Signed-off-by: Bartosz Golaszewski --- include/configs/legoev3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h index 1e239ecadd..36ca3b201e 100644 --- a/include/configs/legoev3.h +++ b/include/configs/legoev3.h @@ -22,6 +22,7 @@ #define CONFIG_SYS_OSCIN_FREQ 2400 #define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE #define CONFIG_SYS_HZ_CLOCKclk_get(DAVINCI_AUXCLK_CLKID) +#define CONFIG_SKIP_LOWLEVEL_INIT /* * Memory Info -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] davinci: omapl138-lcdk: enable driver-model in SPL
wt., 28 maj 2019 o 17:05 Adam Ford napisał(a): > > On Tue, May 28, 2019 at 2:58 AM 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 > > --- > > board/davinci/da8xxevm/omapl138_lcdk.c | 16 > > configs/omapl138_lcdk_defconfig| 5 + > > 2 files changed, 21 insertions(+) > > > > diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c > > b/board/davinci/da8xxevm/omapl138_lcdk.c > > index 156d61d9fb..b20747ba01 100644 > > --- a/board/davinci/da8xxevm/omapl138_lcdk.c > > +++ b/board/davinci/da8xxevm/omapl138_lcdk.c > > @@ -15,6 +15,8 @@ > > #include > > #include > > #include > > +#include > > +#include > > #include > > #include > > #include > > @@ -369,3 +371,17 @@ int board_mmc_init(bd_t *bis) > > } > > #endif > > #endif > > + > > +#ifdef CONFIG_SPL_BUILD > > +static const struct ns16550_platdata serial_pdata = { > > + .base = DAVINCI_UART2_BASE, > > + .reg_shift = 2, > > + .clock = 22800, > > + .fcr = UART_FCR_DEFVAL, > > +}; > > + > > +U_BOOT_DEVICE(omapl138_uart) = { > > + .name = "ns16550_serial", > > + .platdata = &serial_pdata, > > +}; > > +#endif > > diff --git a/configs/omapl138_lcdk_defconfig > > b/configs/omapl138_lcdk_defconfig > > index b375da50df..f53a51321c 100644 > > --- a/configs/omapl138_lcdk_defconfig > > +++ b/configs/omapl138_lcdk_defconfig > > @@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y > > CONFIG_CMD_DIAG=y > > CONFIG_CMD_UBI=y > > CONFIG_OF_CONTROL=y > > +CONFIG_SPL_OF_CONTROL=y > > If SPL_OF_CONTROL is being added, why do you need to manually add the > stuff above for the serial port? Checkout the da850-evm-u-boot.dtsi > file. I adds the device tree entries for the serial port to appear in > the SPL DTB. > > See > http://git.denx.de/?p=u-boot.git;a=commit;h=f7c1d53605d9ec528abacda9ba1763c67221fc88 > I tried to follow the example from this patch but for some reason adding u-boot,dm-spl; to the soc@1c0 node in da850-lcdk-u-boot.dtsi results in the final image being reported as corrupted by the aisimage tool: [...] COPYspl/u-boot-spl.dtb CC spl/common/spl/spl.o LD spl/common/spl/built-in.o CC spl/lib/display_options.o LD spl/lib/built-in.o LD spl/u-boot-spl OBJCOPY spl/u-boot-spl-nodtb.bin CAT spl/u-boot-spl-dtb.bin COPYspl/u-boot-spl.bin MKIMAGE spl/u-boot-spl.ais Error: - AIS Image corrupted CAT u-boot.ais CFGCHK u-boot.cfg The image doen't boot (or at least there's nothing on the console). I'm not sure what's causing it. Any idea? Bart > > > CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk" > > +CONFIG_SPL_OF_PLATDATA=y > > CONFIG_ENV_IS_IN_NAND=y > > CONFIG_NET_RANDOM_ETHADDR=y > > CONFIG_DM=y > > +CONFIG_SPL_DM=y > > CONFIG_DM_I2C=y > > CONFIG_DM_I2C_COMPAT=y > > CONFIG_SYS_I2C_DAVINCI=y > > @@ -53,8 +56,10 @@ CONFIG_SPI_FLASH_STMICRO=y > > CONFIG_SPI_FLASH_WINBOND=y > > CONFIG_MII=y > > CONFIG_DRIVER_TI_EMAC=y > > +CONFIG_SPECIFY_CONSOLE_INDEX=y > > CONFIG_DM_SERIAL=y > > CONFIG_SYS_NS16550=y > > CONFIG_SPI=y > > CONFIG_DAVINCI_SPI=y > > CONFIG_USE_TINY_PRINTF=y > > +# CONFIG_SPL_OF_LIBFDT is not set > > -- > > 2.21.0 > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] configs/legoev3: define CONFIG_SKIP_LOWLEVEL_INIT
śr., 29 maj 2019 o 03:55 David Lechner napisał(a): > > On 5/28/19 8:52 PM, Adam Ford wrote: > > On Tue, May 28, 2019 at 7:03 PM David Lechner wrote: > >> > >> This adds a define for CONFIG_SKIP_LOWLEVEL_INIT in the legoev3 config. > >> On the EV3, U-Boot is loaded into RAM by another bootloader, so we > >> don't need the lowlevel init in U-Boot. > >> > >> Signed-off-by: David Lechner > >> --- > >> include/configs/legoev3.h | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h > >> index 1e239ecadd..36ca3b201e 100644 > >> --- a/include/configs/legoev3.h > >> +++ b/include/configs/legoev3.h > >> @@ -22,6 +22,7 @@ > >> #define CONFIG_SYS_OSCIN_FREQ 2400 > >> #define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE > >> #define CONFIG_SYS_HZ_CLOCKclk_get(DAVINCI_AUXCLK_CLKID) > >> +#define CONFIG_SKIP_LOWLEVEL_INIT > > > > If that's the case, does this mean that the NAK'd patch from Bartosz > > removing the dead code can be accepted? > > Probably I will resend the two patches in a single series to avoid confusion. Bart ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] davinci: omapl138-lcdk: enable driver-model in SPL
śr., 29 maj 2019 o 15:04 Adam Ford napisał(a): > > On Wed, May 29, 2019 at 4:40 AM Bartosz Golaszewski wrote: > > > > wt., 28 maj 2019 o 17:05 Adam Ford napisał(a): > > > > > > On Tue, May 28, 2019 at 2:58 AM 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 > > > > --- > > > > board/davinci/da8xxevm/omapl138_lcdk.c | 16 > > > > configs/omapl138_lcdk_defconfig| 5 + > > > > 2 files changed, 21 insertions(+) > > > > > > > > diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c > > > > b/board/davinci/da8xxevm/omapl138_lcdk.c > > > > index 156d61d9fb..b20747ba01 100644 > > > > --- a/board/davinci/da8xxevm/omapl138_lcdk.c > > > > +++ b/board/davinci/da8xxevm/omapl138_lcdk.c > > > > @@ -15,6 +15,8 @@ > > > > #include > > > > #include > > > > #include > > > > +#include > > > > +#include > > > > #include > > > > #include > > > > #include > > > > @@ -369,3 +371,17 @@ int board_mmc_init(bd_t *bis) > > > > } > > > > #endif > > > > #endif > > > > + > > > > +#ifdef CONFIG_SPL_BUILD > > > > +static const struct ns16550_platdata serial_pdata = { > > > > + .base = DAVINCI_UART2_BASE, > > > > + .reg_shift = 2, > > > > + .clock = 22800, > > > > + .fcr = UART_FCR_DEFVAL, > > > > +}; > > > > + > > > > +U_BOOT_DEVICE(omapl138_uart) = { > > > > + .name = "ns16550_serial", > > > > + .platdata = &serial_pdata, > > > > +}; > > > > +#endif > > > > diff --git a/configs/omapl138_lcdk_defconfig > > > > b/configs/omapl138_lcdk_defconfig > > > > index b375da50df..f53a51321c 100644 > > > > --- a/configs/omapl138_lcdk_defconfig > > > > +++ b/configs/omapl138_lcdk_defconfig > > > > @@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y > > > > CONFIG_CMD_DIAG=y > > > > CONFIG_CMD_UBI=y > > > > CONFIG_OF_CONTROL=y > > > > +CONFIG_SPL_OF_CONTROL=y > > > > > > If SPL_OF_CONTROL is being added, why do you need to manually add the > > > stuff above for the serial port? Checkout the da850-evm-u-boot.dtsi > > > file. I adds the device tree entries for the serial port to appear in > > > the SPL DTB. > > > > > > See > > > http://git.denx.de/?p=u-boot.git;a=commit;h=f7c1d53605d9ec528abacda9ba1763c67221fc88 > > > > > > > I tried to follow the example from this patch but for some reason > > adding u-boot,dm-spl; to the soc@1c0 node in > > da850-lcdk-u-boot.dtsi results in the final image being reported as > > corrupted by the aisimage tool: > > > > [...] > > COPYspl/u-boot-spl.dtb > > CC spl/common/spl/spl.o > > LD spl/common/spl/built-in.o > > CC spl/lib/display_options.o > > LD spl/lib/built-in.o > > LD spl/u-boot-spl > > OBJCOPY spl/u-boot-spl-nodtb.bin > > CAT spl/u-boot-spl-dtb.bin > > COPYspl/u-boot-spl.bin > > MKIMAGE spl/u-boot-spl.ais > > Error: - AIS Image corrupted > > CAT u-boot.ais > > CFGCHK u-boot.cfg > > > > The image doen't boot (or at least there's nothing on the console). > > > > I'm not sure what's causing it. Any idea? > > I got the same 'AIS Image corrupted' message if the SPL + DTB image is > too large. > > I enabled SPL_SYS_MALLOC_SIMPLE along with USE_TINY_PRINTF reduced my code > size: > (see commit c4fa049a121457ff38b74daac32e18d7afbd4538) > Original: > textdata bss dec hex filename > 207601216 80 220565628 spl/u-boot-spl > > Tiny Printf >textdata bss dec hex filename > 179471216 80 192434b2b spl/u-boot-spl > > Malloc Simple + Tiny Printf >textdata bss dec hex filename > 15187 176 28 153913c1f spl/u-boot-spl > > I think you can also setup CONFIG_SPL_SYS_THUMB_BUILD to also reduce > size. The DA850 evm has
Re: [U-Boot] [PATCH 4/4] davinci: omapl138-lcdk: enable driver-model in SPL
śr., 29 maj 2019 o 15:47 Adam Ford napisał(a): > > On Wed, May 29, 2019 at 8:23 AM Bartosz Golaszewski wrote: > > > > śr., 29 maj 2019 o 15:04 Adam Ford napisał(a): > > > > > > On Wed, May 29, 2019 at 4:40 AM Bartosz Golaszewski wrote: > > > > > > > > wt., 28 maj 2019 o 17:05 Adam Ford napisał(a): > > > > > > > > > > On Tue, May 28, 2019 at 2:58 AM 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 > > > > > > --- > > > > > > board/davinci/da8xxevm/omapl138_lcdk.c | 16 > > > > > > configs/omapl138_lcdk_defconfig| 5 + > > > > > > 2 files changed, 21 insertions(+) > > > > > > > > > > > > diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c > > > > > > b/board/davinci/da8xxevm/omapl138_lcdk.c > > > > > > index 156d61d9fb..b20747ba01 100644 > > > > > > --- a/board/davinci/da8xxevm/omapl138_lcdk.c > > > > > > +++ b/board/davinci/da8xxevm/omapl138_lcdk.c > > > > > > @@ -15,6 +15,8 @@ > > > > > > #include > > > > > > #include > > > > > > #include > > > > > > +#include > > > > > > +#include > > > > > > #include > > > > > > #include > > > > > > #include > > > > > > @@ -369,3 +371,17 @@ int board_mmc_init(bd_t *bis) > > > > > > } > > > > > > #endif > > > > > > #endif > > > > > > + > > > > > > +#ifdef CONFIG_SPL_BUILD > > > > > > +static const struct ns16550_platdata serial_pdata = { > > > > > > + .base = DAVINCI_UART2_BASE, > > > > > > + .reg_shift = 2, > > > > > > + .clock = 22800, > > > > > > + .fcr = UART_FCR_DEFVAL, > > > > > > +}; > > > > > > + > > > > > > +U_BOOT_DEVICE(omapl138_uart) = { > > > > > > + .name = "ns16550_serial", > > > > > > + .platdata = &serial_pdata, > > > > > > +}; > > > > > > +#endif > > > > > > diff --git a/configs/omapl138_lcdk_defconfig > > > > > > b/configs/omapl138_lcdk_defconfig > > > > > > index b375da50df..f53a51321c 100644 > > > > > > --- a/configs/omapl138_lcdk_defconfig > > > > > > +++ b/configs/omapl138_lcdk_defconfig > > > > > > @@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y > > > > > > CONFIG_CMD_DIAG=y > > > > > > CONFIG_CMD_UBI=y > > > > > > CONFIG_OF_CONTROL=y > > > > > > +CONFIG_SPL_OF_CONTROL=y > > > > > > > > > > If SPL_OF_CONTROL is being added, why do you need to manually add the > > > > > stuff above for the serial port? Checkout the da850-evm-u-boot.dtsi > > > > > file. I adds the device tree entries for the serial port to appear in > > > > > the SPL DTB. > > > > > > > > > > See > > > > > http://git.denx.de/?p=u-boot.git;a=commit;h=f7c1d53605d9ec528abacda9ba1763c67221fc88 > > > > > > > > > > > > > I tried to follow the example from this patch but for some reason > > > > adding u-boot,dm-spl; to the soc@1c0 node in > > > > da850-lcdk-u-boot.dtsi results in the final image being reported as > > > > corrupted by the aisimage tool: > > > > > > > > [...] > > > > COPYspl/u-boot-spl.dtb > > > > CC spl/common/spl/spl.o > > > > LD spl/common/spl/built-in.o > > > > CC spl/lib/display_options.o > > > > LD spl/lib/built-in.o > > > > LD spl/u-boot-spl > > > > OBJCOPY spl/u-boot-spl-nodtb.bin > > > > CAT spl/u-boot-spl-dtb.bin > > > > COPYspl/u-boot-spl.bin > > > > MKIMAGE spl/u-boot-spl.ais > > > > Error: - AIS Image cor
Re: [U-Boot] [PATCH] arm: davinci: remove leftover assembly
śr., 29 maj 2019 o 19:18 Tom Rini napisał(a): > > On Mon, May 20, 2019 at 06:29:38PM +0200, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > There are no more users of lowlevel_init.S. Remove the file. > > > > Suggested-by: Adam Ford > > Signed-off-by: Bartosz Golaszewski > > Applied to u-boot/master, thanks! > > -- > Tom Hi Tom, I don't see this patch in master. I think you didn't push it. Bart ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: davinci: Remove ipam390 linker script from Kconfig
pt., 31 maj 2019 o 01:04 Adam Ford napisał(a): > > With ipam390 support removed in we can remove the reference to the > linker script since that case will never be true. > > Signed-off-by: Adam Ford > > diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig > index 61e84e5129..adc50922c8 100644 > --- a/arch/arm/mach-davinci/Kconfig > +++ b/arch/arm/mach-davinci/Kconfig > @@ -134,7 +134,6 @@ source "board/davinci/da8xxevm/Kconfig" > source "board/lego/ev3/Kconfig" > > config SPL_LDSCRIPT > - default "board/$(BOARDDIR)/u-boot-spl-ipam390.lds" if TARGET_IPAM390 > default "board/$(BOARDDIR)/u-boot-spl-da850evm.lds" > > endif > -- > 2.17.1 > Reviewed-by: Bartosz Golaszewski ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] net: davinci_emac: convert to using the driver model
From: Bartosz Golaszewski Now that we removed all legacy boards selecting TI_EMAC we can completely convert the driver code to using the driver model. This patch also updates all remaining users of davinci_emac. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/cpu.c| 13 - arch/arm/mach-omap2/omap3/emac.c | 3 +- board/davinci/da8xxevm/da850evm.c | 6 -- board/davinci/da8xxevm/omapl138_lcdk.c | 14 - board/logicpd/am3517evm/am3517evm.c| 1 - board/ti/ti816x/evm.c | 3 +- configs/am3517_evm_defconfig | 1 + configs/da850evm_defconfig | 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/da850evm_nand_defconfig| 1 + configs/omapl138_lcdk_defconfig| 1 + configs/ti816x_evm_defconfig | 1 + drivers/net/ti/davinci_emac.c | 77 ++ include/netdev.h | 1 - 14 files changed, 51 insertions(+), 73 deletions(-) diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c index f97ad3fc74..9fd6564d04 100644 --- a/arch/arm/mach-davinci/cpu.c +++ b/arch/arm/mach-davinci/cpu.c @@ -5,7 +5,6 @@ */ #include -#include #include #include @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) gd->bd->bi_dsp_freq = 0; return 0; } - -/* - * Initializes on-chip ethernet controllers. - * to override, implement board_eth_init() - */ -int cpu_eth_init(bd_t *bis) -{ -#if defined(CONFIG_DRIVER_TI_EMAC) - davinci_emac_initialize(); -#endif - return 0; -} diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c index c79e870183..fb0c9188f5 100644 --- a/arch/arm/mach-omap2/omap3/emac.c +++ b/arch/arm/mach-omap2/omap3/emac.c @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis) reset &= ~CPGMACSS_SW_RST; writel(reset, &am35x_scm_general_regs->ip_sw_reset); - return davinci_emac_initialize(); + return 0; } diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 1bc26828bf..d090c00466 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -472,11 +471,6 @@ int board_eth_init(bd_t *bis) if (rmii_hw_init()) printf("RMII hardware init failed!!!\n"); #endif - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } - return 0; } #endif /* CONFIG_DRIVER_TI_EMAC */ diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 2c2f885d43..ef9656add8 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -229,19 +228,6 @@ int board_init(void) #ifdef CONFIG_DRIVER_TI_EMAC -/* - * Initializes on-board ethernet controllers. - */ -int board_eth_init(bd_t *bis) -{ - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } - - return 0; -} - #endif /* CONFIG_DRIVER_TI_EMAC */ #define CFG_MAC_ADDR_SPI_BUS 0 diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index 10031a4801..bfd4e78274 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "am3517evm.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c index 07a084bab8..240df8cbe1 100644 --- a/board/ti/ti816x/evm.c +++ b/board/ti/ti816x/evm.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ int board_eth_init(bd_t *bis) printf("Unable to read MAC address. Set \n"); } - return davinci_emac_initialize(); + return 0; } #ifdef CONFIG_SPL_BUILD diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig index b9f59f3291..5cb76322df 100644 --- a/configs/am3517_evm_defconfig +++ b/configs/am3517_evm_defconfig @@ -44,6 +44,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x8 CONFIG_SPL_NAND_SIMPLE=y +CONFIG_DM_ETH=y CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y CONFIG_PINCTRL=y diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig index 8c16d5c4f5..ca304ed78a 100644 --- a/configs/da850evm_defconfig +++ b/configs/da850evm_defconfig @@ -60,6 +60,7 @@ CONFIG_SF_DEFAULT_SPEED=3000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_SPI_FLASH_MTD=y +CONFIG_DM_ETH=y CONFIG_MI
Re: [U-Boot] [PATCH 00/14] ARM: davinci: driver-model improvements
wt., 9 lip 2019 o 09:55 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > Hi Tom, > > the following series contains all the patches for davinci that have > been sent to the mailing list recently rebased on top of v2019.07 and > retested on da850-lcdk and da850-evm. I collected all the review and > test tags too. > > The first patch is the emac driver conversion to driver model. Patches > 2-5 fix build warnings due to legacy interfaces usage. Patches 6-9 add > support for driver model to the davinci NAND driver. Patches 10-13 > enable driver-model support in SPL for davinci. Last patch enables the > driver model for NAND in SPL. > > These patches (except for the last, trivial one) have spent a lot of > time on the list and have been validated. I think they are ready to be > picked up for upstream. > Gentle ping. Bart > Bartosz Golaszewski (14): > net: davinci_emac: convert to using the driver model > davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs > sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs > i2c: remove i2c driver-model compatibility layer > omapl138_lcdk_defconfig: don't build support for SPI > nand: davinci: make davinci_nand_init() static > nand: davinci: add support for driver model > davinci: omapl138-lcdk: enable driver model for NAND > davinci: da850-evm: enable driver model for NAND > davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE > davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF > davinci: omapl138-lcdk: remove unneeded includes > davinci: omapl138-lcdk: enable driver-model in SPL > configs: omapl138_lcdk: enable NAND self-init in SPL > > Makefile | 7 - > arch/arm/dts/da850-evm-u-boot.dtsi| 4 + > arch/arm/dts/da850-lcdk-u-boot.dtsi | 4 + > arch/arm/include/asm/ti-common/davinci_nand.h | 2 - > arch/arm/mach-davinci/cpu.c | 13 -- > arch/arm/mach-omap2/omap3/emac.c | 3 +- > board/davinci/da8xxevm/da850evm.c | 6 - > board/davinci/da8xxevm/omapl138_lcdk.c| 32 ++--- > board/logicpd/am3517evm/am3517evm.c | 1 - > board/ti/ti816x/evm.c | 3 +- > configs/am3517_evm_defconfig | 1 + > configs/da850_am18xxevm_defconfig | 1 - > configs/da850evm_defconfig| 2 + > configs/da850evm_direct_nor_defconfig | 2 + > configs/da850evm_nand_defconfig | 2 + > configs/omapl138_lcdk_defconfig | 16 ++- > configs/sandbox64_defconfig | 1 - > configs/sandbox_defconfig | 1 - > configs/sandbox_flattree_defconfig| 1 - > configs/sandbox_noblk_defconfig | 1 - > configs/sandbox_spl_defconfig | 1 - > configs/ti816x_evm_defconfig | 1 + > configs/tools-only_defconfig | 1 - > drivers/i2c/Kconfig | 13 +- > drivers/i2c/Makefile | 1 - > drivers/i2c/i2c-uclass-compat.c | 128 -- > drivers/mtd/nand/raw/davinci_nand.c | 48 ++- > drivers/net/ti/davinci_emac.c | 77 ++- > include/_exports.h| 3 +- > include/configs/am3517_evm.h | 1 - > include/configs/da850evm.h| 12 +- > include/configs/omapl138_lcdk.h | 8 -- > include/exports.h | 3 +- > include/i2c.h | 80 --- > include/netdev.h | 1 - > 35 files changed, 139 insertions(+), 342 deletions(-) > delete mode 100644 drivers/i2c/i2c-uclass-compat.c > > -- > 2.21.0 > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] net: davinci_emac: convert to using the driver model
śr., 24 lip 2019 o 01:22 Joe Hershberger napisał(a): > > On Mon, Jun 24, 2019 at 9:22 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > Now that we removed all legacy boards selecting TI_EMAC we can > > completely convert the driver code to using the driver model. > > This patch also updates all remaining users of davinci_emac. > > > > Signed-off-by: Bartosz Golaszewski > > --- > > v1 -> v2: > > - moved the packetp assignment to the top of the recv() callback which fixes > > a crash on am3517_evm > > - dropped a redundant call to net_process_received_packet(): this is already > > called from eth core > > > > Thanks goes to Adam Ford for much appreciated testing and help. > > > > Tested on da850-lcdk and da850-evm. > > Looks like a build failure on this patch... > > https://travis-ci.org/jhershbe/u-boot/jobs/562799958 > > Can you have a look? > > Thanks, > -Joe This board was missing CONFIG_DM_ETH=y in my patch. I fixed it and v2 of the integration series is on the way. Bart ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 01/14] net: davinci_emac: convert to using the driver model
From: Bartosz Golaszewski Now that we removed all legacy boards selecting TI_EMAC we can completely convert the driver code to using the driver model. This patch also updates all remaining users of davinci_emac. Signed-off-by: Bartosz Golaszewski Tested-by: Adam Ford #am3517-evm & da850-evm Reviewed-by: Ramon Fried --- arch/arm/mach-davinci/cpu.c| 13 - arch/arm/mach-omap2/omap3/emac.c | 3 +- board/davinci/da8xxevm/da850evm.c | 6 -- board/davinci/da8xxevm/omapl138_lcdk.c | 14 - board/logicpd/am3517evm/am3517evm.c| 1 - board/ti/ti816x/evm.c | 3 +- configs/am3517_evm_defconfig | 1 + configs/da850_am18xxevm_defconfig | 1 + configs/da850evm_defconfig | 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/da850evm_nand_defconfig| 1 + configs/omapl138_lcdk_defconfig| 1 + configs/ti816x_evm_defconfig | 1 + drivers/net/ti/davinci_emac.c | 77 ++ include/netdev.h | 1 - 15 files changed, 51 insertions(+), 74 deletions(-) diff --git a/arch/arm/mach-davinci/cpu.c b/arch/arm/mach-davinci/cpu.c index f97ad3fc74..9fd6564d04 100644 --- a/arch/arm/mach-davinci/cpu.c +++ b/arch/arm/mach-davinci/cpu.c @@ -5,7 +5,6 @@ */ #include -#include #include #include @@ -90,15 +89,3 @@ int set_cpu_clk_info(void) gd->bd->bi_dsp_freq = 0; return 0; } - -/* - * Initializes on-chip ethernet controllers. - * to override, implement board_eth_init() - */ -int cpu_eth_init(bd_t *bis) -{ -#if defined(CONFIG_DRIVER_TI_EMAC) - davinci_emac_initialize(); -#endif - return 0; -} diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c index c79e870183..fb0c9188f5 100644 --- a/arch/arm/mach-omap2/omap3/emac.c +++ b/arch/arm/mach-omap2/omap3/emac.c @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -24,5 +23,5 @@ int cpu_eth_init(bd_t *bis) reset &= ~CPGMACSS_SW_RST; writel(reset, &am35x_scm_general_regs->ip_sw_reset); - return davinci_emac_initialize(); + return 0; } diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 5180128db4..43483d526a 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -482,11 +481,6 @@ int board_eth_init(bd_t *bis) if (rmii_hw_init()) printf("RMII hardware init failed!!!\n"); #endif - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } - return 0; } #endif /* CONFIG_DRIVER_TI_EMAC */ diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index fe1bf44101..dd11551428 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -229,19 +228,6 @@ int board_init(void) #ifdef CONFIG_DRIVER_TI_EMAC -/* - * Initializes on-board ethernet controllers. - */ -int board_eth_init(bd_t *bis) -{ - if (!davinci_emac_initialize()) { - printf("Error: Ethernet init failed!\n"); - return -1; - } - - return 0; -} - #endif /* CONFIG_DRIVER_TI_EMAC */ #define CFG_MAC_ADDR_SPI_BUS 0 diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index 10031a4801..bfd4e78274 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "am3517evm.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c index 07a084bab8..240df8cbe1 100644 --- a/board/ti/ti816x/evm.c +++ b/board/ti/ti816x/evm.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ int board_eth_init(bd_t *bis) printf("Unable to read MAC address. Set \n"); } - return davinci_emac_initialize(); + return 0; } #ifdef CONFIG_SPL_BUILD diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig index b9f59f3291..5cb76322df 100644 --- a/configs/am3517_evm_defconfig +++ b/configs/am3517_evm_defconfig @@ -44,6 +44,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x8 CONFIG_SPL_NAND_SIMPLE=y +CONFIG_DM_ETH=y CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y CONFIG_PINCTRL=y diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig index 7ecdc361ce..adcbe1d35d 100644 --- a/configs/da850_am18xxevm_defconfig +++ b/configs/da850_am18xxevm_defconfig @@ -50,6 +50,7 @
[U-Boot] [PATCH v2 00/14] ARM: davinci: driver-model improvements
From: Bartosz Golaszewski The following series contains all the patches for davinci that have been sent to the mailing list recently rebased on top of v2019.07 and retested on da850-lcdk and da850-evm. I collected all the review and test tags too. The first patch is the emac driver conversion to driver model. Patches 2-5 fix build warnings due to legacy interfaces usage. Patches 6-9 add support for driver model to the davinci NAND driver. Patches 10-13 enable driver-model support in SPL for davinci. Last patch enables the driver model for NAND in SPL. These patches (except for the last, trivial one) have spent a lot of time on the list and have been validated. I think they are ready to be picked up for upstream. v1 -> v2: - fixed a build error on da850_am18xx due to missing CONFIG_DM_ETH=y Bartosz Golaszewski (14): net: davinci_emac: convert to using the driver model davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs i2c: remove i2c driver-model compatibility layer omapl138_lcdk_defconfig: don't build support for SPI nand: davinci: make davinci_nand_init() static nand: davinci: add support for driver model davinci: omapl138-lcdk: enable driver model for NAND davinci: da850-evm: enable driver model for NAND davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF davinci: omapl138-lcdk: remove unneeded includes davinci: omapl138-lcdk: enable driver-model in SPL configs: omapl138_lcdk: enable NAND self-init in SPL Makefile | 7 - arch/arm/dts/da850-evm-u-boot.dtsi| 4 + arch/arm/dts/da850-lcdk-u-boot.dtsi | 4 + arch/arm/include/asm/ti-common/davinci_nand.h | 2 - arch/arm/mach-davinci/cpu.c | 13 -- arch/arm/mach-omap2/omap3/emac.c | 3 +- board/davinci/da8xxevm/da850evm.c | 6 - board/davinci/da8xxevm/omapl138_lcdk.c| 32 ++--- board/logicpd/am3517evm/am3517evm.c | 1 - board/ti/ti816x/evm.c | 3 +- configs/am3517_evm_defconfig | 1 + configs/da850_am18xxevm_defconfig | 2 +- configs/da850evm_defconfig| 2 + configs/da850evm_direct_nor_defconfig | 2 + configs/da850evm_nand_defconfig | 2 + configs/omapl138_lcdk_defconfig | 16 ++- configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig| 1 - configs/sandbox_noblk_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - configs/ti816x_evm_defconfig | 1 + configs/tools-only_defconfig | 1 - drivers/i2c/Kconfig | 13 +- drivers/i2c/Makefile | 1 - drivers/i2c/i2c-uclass-compat.c | 128 -- drivers/mtd/nand/raw/davinci_nand.c | 48 ++- drivers/net/ti/davinci_emac.c | 77 ++- include/_exports.h| 3 +- include/configs/am3517_evm.h | 1 - include/configs/da850evm.h| 12 +- include/configs/omapl138_lcdk.h | 8 -- include/exports.h | 3 +- include/i2c.h | 80 --- include/netdev.h | 1 - 35 files changed, 140 insertions(+), 342 deletions(-) delete mode 100644 drivers/i2c/i2c-uclass-compat.c -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 02/14] davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
From: Bartosz Golaszewski This option is no longer used on any davinci board but still selected in defconfigs which causes the following warning: = WARNING == This board uses CONFIG_DM_I2C_COMPAT. Please remove (possibly in a subsequent patch in your series) before sending patches to the mailing list. Remove all references to CONFIG_DM_I2C_COMPAT from davinci. Signed-off-by: Bartosz Golaszewski Acked-by: Heiko Schocher --- configs/da850_am18xxevm_defconfig | 1 - configs/omapl138_lcdk_defconfig | 1 - include/configs/am3517_evm.h | 1 - include/configs/da850evm.h| 8 include/configs/omapl138_lcdk.h | 8 5 files changed, 19 deletions(-) diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig index adcbe1d35d..2291c548ba 100644 --- a/configs/da850_am18xxevm_defconfig +++ b/configs/da850_am18xxevm_defconfig @@ -43,7 +43,6 @@ CONFIG_DM=y CONFIG_SPL_DM=y CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y -CONFIG_DM_I2C_COMPAT=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_MTD_DEVICE=y CONFIG_DM_SPI_FLASH=y diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 466ae860cd..b5d41bd3f6 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -36,7 +36,6 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_DM_I2C=y -CONFIG_DM_I2C_COMPAT=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y CONFIG_NAND=y diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index e0521abe90..8afbe2d333 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -14,7 +14,6 @@ #include -#undef CONFIG_DM_I2C_COMPAT #define CONFIG_REVISION_TAG /* Hardware drivers */ diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index ccdac0abec..5d02c35279 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -18,14 +18,6 @@ #define CONFIG_USE_SPIFLASH #endif -/* -* Disable DM_* for SPL build and can be re-enabled after adding -* DM support in SPL -*/ -#ifdef CONFIG_SPL_BUILD -#undef CONFIG_DM_I2C -#undef CONFIG_DM_I2C_COMPAT -#endif /* * SoC Configuration */ diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index da615e5063..db4a663c53 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -16,14 +16,6 @@ #undef CONFIG_USE_SPIFLASH #undef CONFIG_SYS_USE_NOR -/* -* Disable DM_* for SPL build and can be re-enabled after adding -* DM support in SPL -*/ -#ifdef CONFIG_SPL_BUILD -#undef CONFIG_DM_I2C -#undef CONFIG_DM_I2C_COMPAT -#endif /* * SoC Configuration */ -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 10/14] davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE
From: Bartosz Golaszewski We're working towards enabling the driver model in SPL for da850-lcdk. Enable SPL_SYS_MALLOC_SIMPLE in defconfig to reduce SPL size. Signed-off-by: Bartosz Golaszewski --- configs/omapl138_lcdk_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index fa4ce692ff..bfb88e397a 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -18,6 +18,7 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_TEXT_BASE=0x8000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5 CONFIG_SPL_NAND_SUPPORT=y CONFIG_HUSH_PARSER=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 06/14] nand: davinci: make davinci_nand_init() static
From: Bartosz Golaszewski This function is only used within the driver itself. No need to export it. Signed-off-by: Bartosz Golaszewski --- arch/arm/include/asm/ti-common/davinci_nand.h | 2 -- drivers/mtd/nand/raw/davinci_nand.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/include/asm/ti-common/davinci_nand.h b/arch/arm/include/asm/ti-common/davinci_nand.h index e26381c7fd..28842c3b15 100644 --- a/arch/arm/include/asm/ti-common/davinci_nand.h +++ b/arch/arm/include/asm/ti-common/davinci_nand.h @@ -95,6 +95,4 @@ struct davinci_emif_regs { #define DAVINCI_ABCR_ASIZE_16BIT 1 #define DAVINCI_ABCR_ASIZE_8BIT0 -void davinci_nand_init(struct nand_chip *nand); - #endif diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index cfa9b535c8..e1c4498cb9 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -730,7 +730,7 @@ static int nand_davinci_dev_ready(struct mtd_info *mtd) return __raw_readl(&davinci_emif_regs->nandfsr) & 0x1; } -void davinci_nand_init(struct nand_chip *nand) +static void davinci_nand_init(struct nand_chip *nand) { #if defined CONFIG_KEYSTONE_RBL_NAND int i; -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 09/14] davinci: da850-evm: enable driver model for NAND
From: Bartosz Golaszewski Enable the driver-model on da850-evm. We need to add a dummy nand node to the device tree, as the real nand node is a sub-node of the aemif device. On linux the aemif driver populates all its child nodes, but we can't do it in u-boot currently. Signed-off-by: Bartosz Golaszewski Tested-by: Adam Ford #da850-evm --- arch/arm/dts/da850-evm-u-boot.dtsi| 4 configs/da850evm_defconfig| 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/da850evm_nand_defconfig | 1 + include/configs/da850evm.h| 4 5 files changed, 11 insertions(+) diff --git a/arch/arm/dts/da850-evm-u-boot.dtsi b/arch/arm/dts/da850-evm-u-boot.dtsi index 1683f3472e..d9e8b9926a 100644 --- a/arch/arm/dts/da850-evm-u-boot.dtsi +++ b/arch/arm/dts/da850-evm-u-boot.dtsi @@ -10,6 +10,10 @@ soc@1c0 { u-boot,dm-spl; }; + + nand { + compatible = "ti,davinci-nand"; + }; }; &flash { diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig index f7c679d3b5..0f93d88cc6 100644 --- a/configs/da850evm_defconfig +++ b/configs/da850evm_defconfig @@ -52,6 +52,7 @@ CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y +CONFIG_MTD=y CONFIG_MTD_DEVICE=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig index 9b1da07384..152ec7ae9a 100644 --- a/configs/da850evm_direct_nor_defconfig +++ b/configs/da850evm_direct_nor_defconfig @@ -42,6 +42,7 @@ CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y # CONFIG_MMC is not set +CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_SYS_FLASH_PROTECTION=y diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig index 8f06b8592b..30ffba2d73 100644 --- a/configs/da850evm_nand_defconfig +++ b/configs/da850evm_nand_defconfig @@ -49,6 +49,7 @@ CONFIG_DM_GPIO=y CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y CONFIG_DM_MMC=y +CONFIG_MTD=y CONFIG_NAND=y CONFIG_NAND_DAVINCI=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 5d02c35279..9b4b8f2c94 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -174,6 +174,10 @@ #define CONFIG_SPL_NAND_DRIVERS #define CONFIG_SPL_NAND_ECC #define CONFIG_SPL_NAND_LOAD + +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_NAND_SELF_INIT +#endif #endif /* -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 07/14] nand: davinci: add support for driver model
From: Bartosz Golaszewski Extend the davinci NAND driver to support the driver model. For now this doesn't add any device-tree parsing due to the fact that we can't access the actual nand node on the device-tree - it's a subnode of the aemif device and we don't have an aemif driver on davinci at the moment. Signed-off-by: Bartosz Golaszewski --- drivers/mtd/nand/raw/davinci_nand.c | 46 - 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index e1c4498cb9..33c2f16be8 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -31,6 +31,7 @@ #include #include #include +#include #include /* Definitions for 4-bit hardware ECC */ @@ -785,10 +786,53 @@ static void davinci_nand_init(struct nand_chip *nand) nand->dev_ready = nand_davinci_dev_ready; } -int board_nand_init(struct nand_chip *chip) __attribute__((weak)); +#ifdef CONFIG_SYS_NAND_SELF_INIT +static int davinci_nand_probe(struct udevice *dev) +{ + struct nand_chip *nand = dev_get_priv(dev); + struct mtd_info *mtd = nand_to_mtd(nand); + int ret; + + nand->IO_ADDR_R = (void __iomem *)CONFIG_SYS_NAND_BASE; + nand->IO_ADDR_W = (void __iomem *)CONFIG_SYS_NAND_BASE; + + davinci_nand_init(nand); + + ret = nand_scan(mtd, CONFIG_SYS_NAND_MAX_CHIPS); + if (ret) + return ret; + + return nand_register(0, mtd); +} + +static const struct udevice_id davinci_nand_ids[] = { + { .compatible = "ti,davinci-nand" }, + { } +}; + +U_BOOT_DRIVER(davinci_nand) = { + .name = "davinci-nand", + .id = UCLASS_MTD, + .of_match = davinci_nand_ids, + .probe = davinci_nand_probe, + .priv_auto_alloc_size = sizeof(struct nand_chip), +}; + +void board_nand_init(void) +{ + struct udevice *dev; + int ret; + ret = uclass_get_device_by_driver(UCLASS_MTD, + DM_GET_DRIVER(davinci_nand), &dev); + if (ret && ret != -ENODEV) + pr_err("Failed to initialize %s: %d\n", dev->name, ret); +} +#else +int board_nand_init(struct nand_chip *chip) __attribute__((weak)); int board_nand_init(struct nand_chip *chip) { davinci_nand_init(chip); return 0; } +#endif /* CONFIG_SYS_NAND_SELF_INIT */ -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 04/14] i2c: remove i2c driver-model compatibility layer
From: Bartosz Golaszewski There are no more users of the compatibility layer for i2c. Remove the driver and all references to it. Signed-off-by: Bartosz Golaszewski Acked-by: Heiko Schocher --- Makefile| 7 -- drivers/i2c/Kconfig | 13 +--- drivers/i2c/Makefile| 1 - drivers/i2c/i2c-uclass-compat.c | 128 include/_exports.h | 3 +- include/exports.h | 3 +- include/i2c.h | 80 7 files changed, 3 insertions(+), 232 deletions(-) delete mode 100644 drivers/i2c/i2c-uclass-compat.c diff --git a/Makefile b/Makefile index 57ffa4c99f..4341a0494e 100644 --- a/Makefile +++ b/Makefile @@ -936,13 +936,6 @@ ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) endif endif endif -ifeq ($(CONFIG_DM_I2C_COMPAT),y) - @echo >&2 "= WARNING ==" - @echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove" - @echo >&2 "(possibly in a subsequent patch in your series)" - @echo >&2 "before sending patches to the mailing list." - @echo >&2 "" -endif ifeq ($(CONFIG_MMC),y) ifneq ($(CONFIG_DM_MMC)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) @echo >&2 "= WARNING ==" diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 4772db3837..03d2fed341 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -12,18 +12,7 @@ config DM_I2C write and speed, is implemented with the bus drivers operations, which provide methods for bus setting and data transfer. Each chip device (bus child) info is kept as parent platdata. The interface - is defined in include/i2c.h. When i2c bus driver supports the i2c - uclass, but the device drivers not, then DM_I2C_COMPAT config can - be used as compatibility layer. - -config DM_I2C_COMPAT - bool "Enable I2C compatibility layer" - depends on DM - help - Enable old-style I2C functions for compatibility with existing code. - This option can be enabled as a temporary measure to avoid needing - to convert all code for a board in a single commit. It should not - be enabled for any board in an official release. + is defined in include/i2c.h. config I2C_CROS_EC_TUNNEL tristate "Chrome OS EC tunnel I2C bus" diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index dc40055efb..c2f75d8755 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -3,7 +3,6 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, w...@denx.de. obj-$(CONFIG_DM_I2C) += i2c-uclass.o -obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o diff --git a/drivers/i2c/i2c-uclass-compat.c b/drivers/i2c/i2c-uclass-compat.c deleted file mode 100644 index b3ade88113..00 --- a/drivers/i2c/i2c-uclass-compat.c +++ /dev/null @@ -1,128 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2014 Google, Inc - */ - -#include -#include -#include -#include - -static int cur_busnum __attribute__((section(".data"))); - -static int i2c_compat_get_device(uint chip_addr, int alen, -struct udevice **devp) -{ - struct dm_i2c_chip *chip; - int ret; - - ret = i2c_get_chip_for_busnum(cur_busnum, chip_addr, alen, devp); - if (ret) - return ret; - chip = dev_get_parent_platdata(*devp); - if (chip->offset_len != alen) { - printf("I2C chip %x: requested alen %d does not match chip offset_len %d\n", - chip_addr, alen, chip->offset_len); - return -EADDRNOTAVAIL; - } - - return 0; -} - -int i2c_probe(uint8_t chip_addr) -{ - struct udevice *bus, *dev; - int ret; - - ret = uclass_get_device_by_seq(UCLASS_I2C, cur_busnum, &bus); - if (ret) { - debug("Cannot find I2C bus %d: err=%d\n", cur_busnum, ret); - return ret; - } - - if (!bus) - return -ENOENT; - - return dm_i2c_probe(bus, chip_addr, 0, &dev); -} - -int i2c_read(uint8_t chip_addr, unsigned int addr, int alen, uint8_t *buffer, -int len) -{ - struct udevice *dev; - int ret; - - ret = i2c_compat_get_device(chip_addr, alen, &dev); - if (ret) - return ret; - - return dm_i2c_read(dev, addr, buffer, len); -} - -int i2c_write(uint8_t chip_addr, unsigned int addr, int alen, uint8_t *buffer, - int len) -{
[U-Boot] [PATCH v2 13/14] davinci: omapl138-lcdk: enable driver-model in SPL
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 --- board/davinci/da8xxevm/omapl138_lcdk.c | 16 configs/omapl138_lcdk_defconfig| 5 + 2 files changed, 21 insertions(+) diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 7f8c28b953..578d928443 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #include #include @@ -355,3 +357,17 @@ int board_mmc_init(bd_t *bis) } #endif #endif + +#ifdef CONFIG_SPL_BUILD +static const struct ns16550_platdata serial_pdata = { + .base = DAVINCI_UART2_BASE, + .reg_shift = 2, + .clock = 22800, + .fcr = UART_FCR_DEFVAL, +}; + +U_BOOT_DEVICE(omapl138_uart) = { + .name = "ns16550_serial", + .platdata = &serial_pdata, +}; +#endif diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index c4eebb3612..26b4950f8f 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -33,10 +33,13 @@ CONFIG_CMD_MTDPARTS=y CONFIG_CMD_DIAG=y CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk" +CONFIG_SPL_OF_PLATDATA=y CONFIG_ENV_IS_IN_NAND=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y +CONFIG_SPL_DM=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y @@ -51,6 +54,8 @@ CONFIG_SF_DEFAULT_SPEED=3000 CONFIG_DM_ETH=y CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y +CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_USE_TINY_PRINTF=y +# CONFIG_SPL_OF_LIBFDT is not set -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 05/14] omapl138_lcdk_defconfig: don't build support for SPI
From: Bartosz Golaszewski The following warning is emited when building u-boot for da850-lcdk: = WARNING == This board does not use CONFIG_DM_SPI. Please update the board before v2019.04 for no dm conversion and v2019.07 for partially dm converted drivers. Failure to update can lead to driver/board removal See doc/driver-model/MIGRATION.txt for more info. = WARNING == This board does not use CONFIG_DM_SPI_FLASH. Please update the board to use CONFIG_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info. While we could fix it by selecting CONFIG_DM_SPI, there's no need to build it at all as SPI is disabled on da850-lcdk. Remove all unneeded options from the defconfig. Signed-off-by: Bartosz Golaszewski Acked-by: Heiko Schocher --- configs/omapl138_lcdk_defconfig | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index b5d41bd3f6..7752308564 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -26,6 +26,7 @@ CONFIG_CRC32_VERIFY=y # CONFIG_CMD_FLASH is not set # CONFIG_CMD_GPIO is not set CONFIG_CMD_NAND=y +# CONFIG_CMD_SPI is not set # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MTDPARTS=y CONFIG_CMD_DIAG=y @@ -44,14 +45,9 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x28000 CONFIG_SPL_NAND_SIMPLE=y -CONFIG_SPI_FLASH=y CONFIG_SF_DEFAULT_SPEED=3000 -CONFIG_SPI_FLASH_STMICRO=y -CONFIG_SPI_FLASH_WINBOND=y CONFIG_DM_ETH=y CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y -CONFIG_SPI=y -CONFIG_DAVINCI_SPI=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 08/14] davinci: omapl138-lcdk: enable driver model for NAND
From: Bartosz Golaszewski Enable the driver-model on da850-lcdk. We need to add a dummy nand node to the device tree, as the real nand node is a sub-node of the aemif device. On linux the aemif driver populates all its child nodes, but we can't do it in u-boot currently. Signed-off-by: Bartosz Golaszewski --- arch/arm/dts/da850-lcdk-u-boot.dtsi | 4 configs/omapl138_lcdk_defconfig | 1 + include/configs/omapl138_lcdk.h | 4 3 files changed, 9 insertions(+) diff --git a/arch/arm/dts/da850-lcdk-u-boot.dtsi b/arch/arm/dts/da850-lcdk-u-boot.dtsi index 80dda8ef58..541f4ca200 100644 --- a/arch/arm/dts/da850-lcdk-u-boot.dtsi +++ b/arch/arm/dts/da850-lcdk-u-boot.dtsi @@ -9,4 +9,8 @@ aliases { i2c0 = &i2c0; }; + + nand { + compatible = "ti,davinci-nand"; + }; }; diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 7752308564..fa4ce692ff 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -39,6 +39,7 @@ CONFIG_DM=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y CONFIG_DM_MMC=y +CONFIG_MTD=y CONFIG_NAND=y CONFIG_NAND_DAVINCI=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index db4a663c53..20fd7ff713 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -168,6 +168,10 @@ #define CONFIG_SPL_NAND_DRIVERS #define CONFIG_SPL_NAND_ECC #define CONFIG_SPL_NAND_LOAD + +#ifndef CONFIG_SPL_BUILD +#define CONFIG_SYS_NAND_SELF_INIT +#endif #endif #ifdef CONFIG_SYS_USE_NOR -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 03/14] sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
From: Bartosz Golaszewski There are no more "real" users of CONFIG_DM_I2C_COMPAT and we'll soon remove it altogether. Stop building it in sandbox mode. Signed-off-by: Bartosz Golaszewski Acked-by: Heiko Schocher --- Makefile | 2 +- configs/sandbox64_defconfig| 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_noblk_defconfig| 1 - configs/sandbox_spl_defconfig | 1 - configs/tools-only_defconfig | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 73fdf70cdd..57ffa4c99f 100644 --- a/Makefile +++ b/Makefile @@ -936,7 +936,7 @@ ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) endif endif endif -ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y) +ifeq ($(CONFIG_DM_I2C_COMPAT),y) @echo >&2 "= WARNING ==" @echo >&2 "This board uses CONFIG_DM_I2C_COMPAT. Please remove" @echo >&2 "(possibly in a subsequent patch in your series)" diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index 827b8761cd..c177ff8ad5 100644 --- a/configs/sandbox64_defconfig +++ b/configs/sandbox64_defconfig @@ -89,7 +89,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 61391a7acd..068d311dca 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -104,7 +104,6 @@ CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y CONFIG_DM_HWSPINLOCK=y CONFIG_HWSPINLOCK_SANDBOX=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig index af335285c9..a574144cd9 100644 --- a/configs/sandbox_flattree_defconfig +++ b/configs/sandbox_flattree_defconfig @@ -74,7 +74,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig index da9229fc79..381bad2003 100644 --- a/configs/sandbox_noblk_defconfig +++ b/configs/sandbox_noblk_defconfig @@ -81,7 +81,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index 27034cfaa9..c40a79cc73 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -95,7 +95,6 @@ CONFIG_BOARD=y CONFIG_BOARD_SANDBOX=y CONFIG_PM8916_GPIO=y CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y CONFIG_I2C_CROS_EC_LDO=y CONFIG_DM_I2C_GPIO=y diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index aa73661a92..4808b49850 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -12,7 +12,6 @@ CONFIG_DEFAULT_DEVICE_TREE="sandbox" CONFIG_IP_DEFRAG=y # CONFIG_UDP_FUNCTION_FASTBOOT is not set CONFIG_SANDBOX_GPIO=y -CONFIG_DM_I2C_COMPAT=y CONFIG_PCI=y CONFIG_DM_PCI=y CONFIG_PCI_SANDBOX=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 14/14] configs: omapl138_lcdk: enable NAND self-init in SPL
From: Bartosz Golaszewski Now that we have enabled the driver-model in SPL, we can remove the code disabling NAND self-init in SPL from the config include for omapl138-lcdk. Signed-off-by: Bartosz Golaszewski --- include/configs/omapl138_lcdk.h | 4 1 file changed, 4 deletions(-) diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 20fd7ff713..db4a663c53 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -168,10 +168,6 @@ #define CONFIG_SPL_NAND_DRIVERS #define CONFIG_SPL_NAND_ECC #define CONFIG_SPL_NAND_LOAD - -#ifndef CONFIG_SPL_BUILD -#define CONFIG_SYS_NAND_SELF_INIT -#endif #endif #ifdef CONFIG_SYS_USE_NOR -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 12/14] davinci: omapl138-lcdk: remove unneeded includes
From: Bartosz Golaszewski There's no SPI on da850-lcdk. Remove unnecessary includes. Signed-off-by: Bartosz Golaszewski --- board/davinci/da8xxevm/omapl138_lcdk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index dd11551428..7f8c28b953 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 11/14] davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF
From: Bartosz Golaszewski We're working towards enabling the driver-model in SPL for da850-lcdk. Enable CONFIG_USE_TINY_PRINTF in defconfig to reduce SPL size. Signed-off-by: Bartosz Golaszewski --- configs/omapl138_lcdk_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index bfb88e397a..c4eebb3612 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -53,3 +53,4 @@ CONFIG_MII=y CONFIG_DRIVER_TI_EMAC=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y +CONFIG_USE_TINY_PRINTF=y -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 00/14] ARM: davinci: driver-model improvements
śr., 24 lip 2019 o 21:06 Joe Hershberger napisał(a): > > On Wed, Jul 24, 2019 at 3:12 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > The following series contains all the patches for davinci that have > > been sent to the mailing list recently rebased on top of v2019.07 and > > retested on da850-lcdk and da850-evm. I collected all the review and > > test tags too. > > > > The first patch is the emac driver conversion to driver model. Patches > > 2-5 fix build warnings due to legacy interfaces usage. Patches 6-9 add > > support for driver model to the davinci NAND driver. Patches 10-13 > > enable driver-model support in SPL for davinci. Last patch enables the > > driver model for NAND in SPL. > > > > These patches (except for the last, trivial one) have spent a lot of > > time on the list and have been validated. I think they are ready to be > > picked up for upstream. > > > > v1 -> v2: > > - fixed a build error on da850_am18xx due to missing CONFIG_DM_ETH=y > > Heiko, want me to take this through my tree? > > Thanks, > -Joe Hi Tom, could you pick up the rest of the patches? They've been on the list for several weeks now. Bart ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot