From: Marek Vasut Date: Wed, 26 Jun 2019 12:48:36 +0200 Subject: [U-Boot] Watchdog DM conversion, sram overflow(SPL) In-Reply-To: References: Message-ID: <78de000a-d559-4df7-be0f-30a2c3f775c3@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On 6/26/19 12:37 PM, Stefan Roese wrote: > On 26.06.19 11:53, Suniel Mahesh wrote: >> Hi, >> >> I am trying to convert watchdog driver(omap3_wdt) on TI AM33XX >> platform to Driver Model. >> Since DM is also enabled in SPL, size of SPL image generated(with >> watchdog DM enabled) is >> bigger compared to the SRAM size(.u_boot_list section doesn't fit in >> the region alloted) >> and build is failing with the following error: >> >>    LD      spl/drivers/usb/gadget/built-in.o >>    LD      spl/drivers/usb/musb-new/built-in.o >>    LD      spl/drivers/built-in.o >>    LD      spl/u-boot-spl >> arm-linux-ld.bfd: u-boot-spl section `.u_boot_list' will not fit in >> region `.sram' >> arm-linux-ld.bfd: region `.sram' overflowed by 48 bytes >> make[1]: *** [spl/u-boot-spl] Error 1 >> make: *** [spl/u-boot-spl] Error 2 >> >> The SRAM size in the device is 130047 bytes, of which 110592 bytes are >> allocated for SPL >> Image, 6144 bytes for stack and the rest 12799 bytes for RAM Exec >> vectors, tracing data >> and static variables. >> >> Maximum SPL image size is fixed at 110592 bytes >> >> SPL size without Watchdog driver model is 110880 bytes. >> >> So, the reason for such error is straight forward. >> >> I can think of two possible approaches (might be wrong): >> >> 1. either disable DM in SPL for watchdog ? >> (dm: mmc: Allow disabling driver model in SPL - by Simon Glass) >>   2. The stack allocated for SPL in SRAM is 6KB and 12799 bytes for  >> RAM Exec vectors, >> tracing data and static variables. can we do something here, by >> borrowing some bytes ? >> >> Or any possible solutions ? > > You could also disable the watchdog in SPL and only enable it > later in U-Boot proper. Agreed -- Best regards, Marek Vasut