Merge branch 'sti/soc' into next/late
From Srinivas Kandagatla <srinivas.kandagatla@st.com>: This patch-set adds basic support for STMicroelectronics STi series SOCs which includes STiH415 and STiH416 with B2000 and B2020 board support. STiH415 and STiH416 are dual-core ARM Cortex-A9 CPU, designed for use in Set-top-boxes. The SOC support is available in mach-sti which contains support code for STiH415, STiH416 SOCs including the generic board support. The reason for adding two SOCs at this patch set is to show that no new C code is required for second SOC(STiH416) support. * sti/soc: ARM: stih41x: Add B2020 board support ARM: stih41x: Add B2000 board support ARM: sti: Add DEBUG_LL console support ARM: sti: Add STiH416 SOC support ARM: sti: Add STiH415 SOC support Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
61
arch/arm/include/debug/sti.S
Normal file
61
arch/arm/include/debug/sti.S
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* arch/arm/include/debug/sti.S
|
||||
*
|
||||
* Debugging macro include header
|
||||
* Copyright (C) 2013 STMicroelectronics (R&D) Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#define STIH41X_COMMS_BASE 0xfed00000
|
||||
#define STIH41X_ASC2_BASE (STIH41X_COMMS_BASE+0x32000)
|
||||
|
||||
#define STIH41X_SBC_LPM_BASE 0xfe400000
|
||||
#define STIH41X_SBC_COMMS_BASE (STIH41X_SBC_LPM_BASE + 0x100000)
|
||||
#define STIH41X_SBC_ASC1_BASE (STIH41X_SBC_COMMS_BASE + 0x31000)
|
||||
|
||||
|
||||
#define VIRT_ADDRESS(x) (x - 0x1000000)
|
||||
|
||||
#if IS_ENABLED(CONFIG_STIH41X_DEBUG_ASC2)
|
||||
#define DEBUG_LL_UART_BASE STIH41X_ASC2_BASE
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_STIH41X_DEBUG_SBC_ASC1)
|
||||
#define DEBUG_LL_UART_BASE STIH41X_SBC_ASC1_BASE
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG_LL_UART_BASE
|
||||
#error "DEBUG UART is not Configured"
|
||||
#endif
|
||||
|
||||
#define ASC_TX_BUF_OFF 0x04
|
||||
#define ASC_CTRL_OFF 0x0c
|
||||
#define ASC_STA_OFF 0x14
|
||||
|
||||
#define ASC_STA_TX_FULL (1<<9)
|
||||
#define ASC_STA_TX_EMPTY (1<<1)
|
||||
|
||||
|
||||
.macro addruart, rp, rv, tmp
|
||||
ldr \rp, =DEBUG_LL_UART_BASE @ physical base
|
||||
ldr \rv, =VIRT_ADDRESS(DEBUG_LL_UART_BASE) @ virt base
|
||||
.endm
|
||||
|
||||
.macro senduart,rd,rx
|
||||
strb \rd, [\rx, #ASC_TX_BUF_OFF]
|
||||
.endm
|
||||
|
||||
.macro waituart,rd,rx
|
||||
1001: ldr \rd, [\rx, #ASC_STA_OFF]
|
||||
tst \rd, #ASC_STA_TX_FULL
|
||||
bne 1001b
|
||||
.endm
|
||||
|
||||
.macro busyuart,rd,rx
|
||||
1001: ldr \rd, [\rx, #ASC_STA_OFF]
|
||||
tst \rd, #ASC_STA_TX_EMPTY
|
||||
beq 1001b
|
||||
.endm
|
Reference in New Issue
Block a user