diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2017-04-28 16:41:41 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-05-03 13:51:22 +0200 |
commit | d5c8bc3ff1a795cb9ef44abd518f5dae6f9000fa (patch) | |
tree | a3dbd48b1feef91687bd75e9227870debbbbf9cb /arch/arm/mach-socfpga/include/mach/debug_ll.h | |
parent | db3feb61d19060a0589f3906a8a081bebd934ace (diff) | |
download | barebox-d5c8bc3ff1a795cb9ef44abd518f5dae6f9000fa.tar.gz barebox-d5c8bc3ff1a795cb9ef44abd518f5dae6f9000fa.tar.xz |
ARM: socfpga: add arria10 support
Arria10 is a SoC + FPGA like the Cyclone5 SoCFPGA that
is already supported in barebox.
Both a the same in some parts, but totaly different in
others. Most of the hardware blocks are the same in the
SoC parts. The OCRAM is larger on the Arria10 and the
SDRAM controller is different.
The serial core only supports 32bit accesses (different to
the 8bit accesses on the Cyclone5).
As Arria10 has 256KB of OCRAM, it is possible to fit a larger
barebox (and/or use PBL) instead of the two stage bootprocess
used on the Cyclone5 and its 64KB OCRAM.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-socfpga/include/mach/debug_ll.h')
-rw-r--r-- | arch/arm/mach-socfpga/include/mach/debug_ll.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/include/mach/debug_ll.h b/arch/arm/mach-socfpga/include/mach/debug_ll.h index 4e906ea66e..f41258c504 100644 --- a/arch/arm/mach-socfpga/include/mach/debug_ll.h +++ b/arch/arm/mach-socfpga/include/mach/debug_ll.h @@ -53,6 +53,17 @@ static inline void INIT_LL(void) writel(FCRVAL, UART_BASE + FCR); } +#ifdef CONFIG_ARCH_SOCFPGA_ARRIA10 +static inline void PUTC_LL(char c) +{ + /* Wait until there is space in the FIFO */ + while ((readl(UART_BASE + LSR) & LSR_THRE) == 0); + /* Send the character */ + writel(c, UART_BASE + THR); + /* Wait to make sure it hits the line, in case we die too soon. */ + while ((readl(UART_BASE + LSR) & LSR_THRE) == 0); +} +#else static inline void PUTC_LL(char c) { /* Wait until there is space in the FIFO */ @@ -62,6 +73,7 @@ static inline void PUTC_LL(char c) /* Wait to make sure it hits the line, in case we die too soon. */ while ((readb(UART_BASE + LSR) & LSR_THRE) == 0); } +#endif #else static inline unsigned int ns16550_calc_divisor(unsigned int clk, |