projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-i2c
[oweals/u-boot.git]
/
cpu
/
blackfin
/
serial.h
diff --git
a/cpu/blackfin/serial.h
b/cpu/blackfin/serial.h
index ce39148f83f68446bb4a10f419c322cc301fe641..6cbc564b532b974ebbf5ecd1a2fb8893545b3959 100644
(file)
--- a/
cpu/blackfin/serial.h
+++ b/
cpu/blackfin/serial.h
@@
-81,11
+81,6
@@
#ifndef __ASSEMBLY__
#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()
#ifdef __ADSPBF54x__
# define ACCESS_LATCH()
# define ACCESS_PORT_IER()
@@
-146,7
+141,7
@@
static inline void serial_early_init(void)
/* handle portmux crap on different Blackfins */
serial_do_portmux();
/* handle portmux crap on different Blackfins */
serial_do_portmux();
- /*
Enable UART
*/
+ /*
always enable UART -- avoids anomalies 05000309 and 05000350
*/
*pUART_GCTL = UCEN;
/* Set LCR to Word Lengh 8-bit word select */
*pUART_GCTL = UCEN;
/* Set LCR to Word Lengh 8-bit word select */
@@
-190,6
+185,11
@@
static inline uint16_t serial_early_get_div(void)
return divisor;
}
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)
{
__attribute__((always_inline))
static inline void serial_early_set_baud(uint32_t baud)
{