From: Masahiro Yamada Date: Tue, 16 Dec 2014 13:38:52 +0900 Subject: [U-Boot] [PATCH 17/19] serial: Support an early UART for debugging In-Reply-To: <1418653194-16873-18-git-send-email-sjg@chromium.org> References: <1418653194-16873-1-git-send-email-sjg@chromium.org> <1418653194-16873-18-git-send-email-sjg@chromium.org> Message-ID: <20141216133852.0545.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Mon, 15 Dec 2014 07:19:52 -0700 Simon Glass wrote: > This came up in a discussion on the mailing list here: > > https://patchwork.ozlabs.org/patch/384613/ > > My concerns at the time were: > - it doesn't need to be written in assembler Assembler can guarantee that stack is not used. > - it doesn't need to be ARM-specific OK. > This patch provides a possible alternative. It works by allowing any serial > driver to export one init function and provide a putc() function. These > can be used to output debug data before the real serial driver is available. > > This implementation does not depend on driver model, OK. > and it is possible for > it to operate without a stack on some architectures (e.g. PowerPC, ARM). It depends on the optimization option -O2 / -Os. In 18/19, you add "static inline" to calc_divisor(). "static inline" does not force-inline the code, but still leaves it to the compiler decision. (Marek Vasut also mentioned this in commit 4425e62856) Best Regards Masahiro Yamada