Commit 13d75651 authored by Pavel Boldin's avatar Pavel Boldin

RT #89962: EA LPC4357 fixes

parent 3571c279
......@@ -106,16 +106,15 @@ struct lpc_emc_regs {
/*
* Set the EMC clock freq.
*/
#ifndef CONFIG_LPC18XX_EMC_HALFCPU
#ifdef CONFIG_LPC18XX_EMC_HALFCPU
# define LPC18XX_EMC_CLK_OUT (LPC18XX_PLL1_CLK_OUT / 2)
#else
# define LPC18XX_EMC_CLK_OUT LPC18XX_PLL1_CLK_OUT
#endif
//#define NS2CLK(time) (((LPC18XX_EMC_CLK_OUT / 1000000) * (time)) / 1000)
static inline uint32_t NS2CLK(uint32_t time){
uint32_t tmp = LPC18XX_EMC_CLK_OUT/1000000;
return (tmp * time + 999) / 1000;
return (tmp * time) / 1000;
}
......
......@@ -64,6 +64,11 @@
*/
#define LPC18XX_IOMUX_EMC_CONFIG(func) \
(LPC18XX_IOMUX_CONFIG(func, 0, 1, 1, 1, 1))
/*
* Pin settings for EMC output only pins
*/
#define LPC18XX_IOMUX_EMC_OUTPUT_CONFIG(func) \
(LPC18XX_IOMUX_CONFIG(func, 0, 1, 1, 0, 1))
/*
* Pin settings for slow EMC pins (SPIFI)
*/
......
......@@ -248,6 +248,12 @@
*/
#define CONFIG_SYS_NS16550_CLK clock_get(CLOCK_UART0)
#define CONFIG_CONS_INDEX 1
#if 0
# define CONFIG_UART0_CLOCK_XTAL
# define CONFIG_SERIAL0_SPECIAL_BAUDRATE 0xC10006
#endif
/*
* USART0 registers base: 0x40081000
* UART1 registers base: 0x40082000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment