Skip to content
Snippets Groups Projects
Commit f58bf804 authored by Mike Frysinger's avatar Mike Frysinger
Browse files

Blackfin: avoid get_sclk() with early serial debug


When the clock functions were changed to use cached values (and thereby
avoiding expensive math functions), early serial debug broke because the
baud programming is called before external memory is available.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 02778f2f
No related branches found
No related tags found
No related merge requests found
......@@ -81,11 +81,6 @@
#ifndef __ASSEMBLY__
/* We cannot use get_sclk() in initcode as it is defined elsewhere. */
#ifdef BFIN_IN_INITCODE
# define get_sclk() (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT / CONFIG_SCLK_DIV)
#endif
#ifdef __ADSPBF54x__
# define ACCESS_LATCH()
# define ACCESS_PORT_IER()
......@@ -190,6 +185,11 @@ static inline uint16_t serial_early_get_div(void)
return divisor;
}
/* We cannot use get_sclk() early on as it uses caches in external memory */
#if defined(BFIN_IN_INITCODE) || defined(CONFIG_DEBUG_EARLY_SERIAL)
# define get_sclk() (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT / CONFIG_SCLK_DIV)
#endif
__attribute__((always_inline))
static inline void serial_early_set_baud(uint32_t baud)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment