From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 9 Oct 2012 14:38:23 -0700 Subject: [U-Boot] [PATCH 67/72] serial: Unconditionally enable CONFIG_SERIAL_MULTI In-Reply-To: <50748A2F.5040900@wwwdotorg.org> References: <1348878687-14194-1-git-send-email-marex@denx.de> <1348955586-7109-1-git-send-email-marex@denx.de> <1348955586-7109-68-git-send-email-marex@denx.de> <50748A2F.5040900@wwwdotorg.org> Message-ID: <20121009213823.GF1137@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Oct 09, 2012 at 02:33:51PM -0600, Stephen Warren wrote: > On 09/29/2012 03:53 PM, Marek Vasut wrote: > > Enable CONFIG_SERIAL_MULTI for all builds of U-Boot. That includes > > both SPL builds and non-SPL builds, everything. To avoid poluting > > this patch with removal of ifdef-endif constructions containing > > CONFIG_SERIAL_MULTI, the CONFIG_SERIAL_MULTI is temporarily added > > into CPPFLAGS in config.mk . This will be again removed in following > > patch. > > Marek, > > This patch (at least, the version of it checked into u-boot/next) breaks > U-Boot on Tegra. > > I believe the reason is because nothing ever calls serial_initialize() > in the SPL on Tegra. If I edit arch/arm/cpu/arm720t/tegra20/spl.c > function preloader_console_init() to call serial_initialize() right > before it calls serial_init(), then everything works fine. Without this, > drivers/serial/serial.c is never initialised (not even BSS cleared!) and > so it's left set to some bogus value, and so get_current() doesn't > replace it with default_serial_console(), so an invalid pointer is > accessed, causing a hang or crash. > > I'm not sure quite what the correct solution is here. Is Tegra's custom > spl.c doing too much; stuff that should come from the common spl.c is > cut/paste here? Or, is adding the call to serial_initialize() the > correct fix? Or, is the root-cause of the problem that BSS > (serial_current) isn't being cleared to 0? Tegra SPL needs to either be updated ala common/spl/ (preloader_console_init() calls serial_init()) or switched over to it. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: