xtensa: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same level as boards and architectures allowing both SoCs and boards to be maintained outside the tree. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
f183444682
commit
cea0b3a9c2
58 changed files with 9 additions and 17 deletions
3
soc/xtensa/intel_s1000/CMakeLists.txt
Normal file
3
soc/xtensa/intel_s1000/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
zephyr_library()
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
zephyr_library_sources(soc.c)
|
15
soc/xtensa/intel_s1000/Kconfig.defconfig
Normal file
15
soc/xtensa/intel_s1000/Kconfig.defconfig
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Kconfig - XTENSA board configuration
|
||||
#
|
||||
# Copyright (c) 2017 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_INTEL_S1000
|
||||
|
||||
config SOC
|
||||
string
|
||||
default "intel_s1000"
|
||||
|
||||
config IRQ_OFFLOAD_INTNUM
|
||||
default 0
|
||||
|
||||
endif
|
6
soc/xtensa/intel_s1000/Kconfig.soc
Normal file
6
soc/xtensa/intel_s1000/Kconfig.soc
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2017 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_INTEL_S1000
|
||||
bool "intel_s1000"
|
||||
|
49
soc/xtensa/intel_s1000/dts.fixup
Normal file
49
soc/xtensa/intel_s1000/dts.fixup
Normal file
|
@ -0,0 +1,49 @@
|
|||
/* SoC level DTS fixup file */
|
||||
|
||||
#define CONFIG_UART_NS16550_PORT_0_BASE_ADDR NS16550_80800_BASE_ADDRESS
|
||||
#define CONFIG_UART_NS16550_PORT_0_BAUD_RATE NS16550_80800_CURRENT_SPEED
|
||||
#define CONFIG_UART_NS16550_PORT_0_NAME NS16550_80800_LABEL
|
||||
#define CONFIG_UART_NS16550_PORT_0_IRQ ((NS16550_80800_IRQ_0 << 16) | \
|
||||
(SNPS_DESIGNWARE_INTC_81800_IRQ_0 << 8) | \
|
||||
(INTEL_CAVS_INTC_78800_IRQ_0 << 0))
|
||||
|
||||
#define CONFIG_UART_NS16550_PORT_0_IRQ_PRI NS16550_80800_IRQ_0_PRIORITY
|
||||
#define CONFIG_UART_NS16550_PORT_0_IRQ_FLAGS NS16550_80800_IRQ_0_SENSE
|
||||
#define CONFIG_UART_NS16550_PORT_0_CLK_FREQ NS16550_80800_CLOCK_FREQUENCY
|
||||
|
||||
#define L2_SRAM_BASE CONFIG_SRAM_BASE_ADDRESS
|
||||
#define L2_SRAM_SIZE CONFIG_SRAM_SIZE * 1024
|
||||
|
||||
#define CAVS_ICTL_BASE_ADDR INTEL_CAVS_INTC_78800_BASE_ADDRESS
|
||||
#define CAVS_ICTL_0_IRQ INTEL_CAVS_INTC_78800_IRQ_0
|
||||
#define CONFIG_CAVS_ICTL_0_IRQ_PRI INTEL_CAVS_INTC_78800_IRQ_0_PRIORITY
|
||||
#define CAVS_ICTL_0_IRQ_FLAGS INTEL_CAVS_INTC_78800_IRQ_0_SENSE
|
||||
|
||||
#define CAVS_ICTL_1_IRQ INTEL_CAVS_INTC_78810_IRQ_0
|
||||
#define CONFIG_CAVS_ICTL_1_IRQ_PRI INTEL_CAVS_INTC_78810_IRQ_0_PRIORITY
|
||||
#define CAVS_ICTL_1_IRQ_FLAGS INTEL_CAVS_INTC_78810_IRQ_0_SENSE
|
||||
|
||||
#define CAVS_ICTL_2_IRQ INTEL_CAVS_INTC_78820_IRQ_0
|
||||
#define CONFIG_CAVS_ICTL_2_IRQ_PRI INTEL_CAVS_INTC_78820_IRQ_0_PRIORITY
|
||||
#define CAVS_ICTL_2_IRQ_FLAGS INTEL_CAVS_INTC_78820_IRQ_0_SENSE
|
||||
|
||||
#define CAVS_ICTL_3_IRQ INTEL_CAVS_INTC_78830_IRQ_0
|
||||
#define CONFIG_CAVS_ICTL_3_IRQ_PRI INTEL_CAVS_INTC_78830_IRQ_0_PRIORITY
|
||||
#define CAVS_ICTL_3_IRQ_FLAGS INTEL_CAVS_INTC_78830_IRQ_0_SENSE
|
||||
|
||||
#define DW_ICTL_BASE_ADDR SNPS_DESIGNWARE_INTC_81800_BASE_ADDRESS
|
||||
#define DW_ICTL_IRQ ((SNPS_DESIGNWARE_INTC_81800_IRQ_0 << 8) | \
|
||||
(INTEL_CAVS_INTC_78800_IRQ_0 << 0))
|
||||
#define CONFIG_DW_ICTL_IRQ_PRI SNPS_DESIGNWARE_INTC_81800_IRQ_0_PRIORITY
|
||||
#define DW_ICTL_IRQ_FLAGS SNPS_DESIGNWARE_INTC_81800_IRQ_0_SENSE
|
||||
|
||||
#define CONFIG_I2C_0_BASE_ADDR SNPS_DESIGNWARE_I2C_80400_BASE_ADDRESS
|
||||
#define CONFIG_I2C_0_BITRATE SNPS_DESIGNWARE_I2C_80400_CLOCK_FREQUENCY
|
||||
#define CONFIG_I2C_0_NAME SNPS_DESIGNWARE_I2C_80400_LABEL
|
||||
#define CONFIG_I2C_0_IRQ ((SNPS_DESIGNWARE_I2C_80400_IRQ_0 << 16) | \
|
||||
(SNPS_DESIGNWARE_INTC_81800_IRQ_0 << 8) | \
|
||||
(INTEL_CAVS_INTC_78800_IRQ_0 << 0))
|
||||
|
||||
#define CONFIG_I2C_0_IRQ_FLAGS SNPS_DESIGNWARE_I2C_80400_IRQ_0_SENSE
|
||||
#define CONFIG_I2C_0_IRQ_PRI SNPS_DESIGNWARE_I2C_80400_IRQ_0_PRIORITY
|
||||
/* End of SoC Level DTS fixup file */
|
470
soc/xtensa/intel_s1000/linker.ld
Normal file
470
soc/xtensa/intel_s1000/linker.ld
Normal file
|
@ -0,0 +1,470 @@
|
|||
/*
|
||||
* Copyright (c) 2016 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Linker command/script file
|
||||
*
|
||||
* Linker script for the intel_s1000_crb platform
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(xtensa)
|
||||
#define _LINKER
|
||||
#define _ASMLANGUAGE
|
||||
|
||||
#include <generated_dts_board.h>
|
||||
#include "memory.h"
|
||||
#include <autoconf.h>
|
||||
#include <linker/sections.h>
|
||||
|
||||
#include <linker/linker-defs.h>
|
||||
#include <linker/linker-tool.h>
|
||||
|
||||
#define RAMABLE_REGION data :data_phdr
|
||||
#define ROMABLE_REGION text :text_phdr
|
||||
|
||||
MEMORY
|
||||
{
|
||||
vector_reset_text :
|
||||
org = XCHAL_RESET_VECTOR0_PADDR_SRAM,
|
||||
len = MEM_RESET_TEXT_SIZE
|
||||
vector_reset_lit :
|
||||
org = XCHAL_RESET_VECTOR0_PADDR_SRAM + MEM_RESET_TEXT_SIZE,
|
||||
len = MEM_RESET_LIT_SIZE
|
||||
vector_memory_lit :
|
||||
org = XCHAL_MEMERROR_VECTOR_PADDR + MEM_ERROR_LIT_SIZE,
|
||||
len = MEM_ERROR_LIT_SIZE
|
||||
vector_memory_text :
|
||||
org = XCHAL_MEMERROR_VECTOR_PADDR,
|
||||
len = MEM_ERROR_TEXT_SIZE
|
||||
vector_base_text :
|
||||
org = XCHAL_VECBASE_RESET_PADDR_SRAM,
|
||||
len = MEM_VECBASE_LIT_SIZE
|
||||
vector_int2_lit :
|
||||
org = XCHAL_INTLEVEL2_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_int2_text :
|
||||
org = XCHAL_INTLEVEL2_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_int3_lit :
|
||||
org = XCHAL_INTLEVEL3_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_int3_text :
|
||||
org = XCHAL_INTLEVEL3_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_int4_lit :
|
||||
org = XCHAL_INTLEVEL4_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_int4_text :
|
||||
org = XCHAL_INTLEVEL4_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_int5_lit :
|
||||
org = XCHAL_INTLEVEL5_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_int5_text :
|
||||
org = XCHAL_INTLEVEL5_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_int6_lit :
|
||||
org = XCHAL_INTLEVEL6_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_int6_text :
|
||||
org = XCHAL_INTLEVEL6_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_int7_lit :
|
||||
org = XCHAL_INTLEVEL7_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_int7_text :
|
||||
org = XCHAL_INTLEVEL7_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_kernel_lit :
|
||||
org = XCHAL_KERNEL_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_kernel_text :
|
||||
org = XCHAL_KERNEL_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_user_lit :
|
||||
org = XCHAL_USER_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_user_text :
|
||||
org = XCHAL_USER_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
vector_double_lit :
|
||||
org = XCHAL_DOUBLEEXC_VECTOR_PADDR_SRAM - MEM_VECT_LIT_SIZE,
|
||||
len = MEM_VECT_LIT_SIZE
|
||||
vector_double_text :
|
||||
org = XCHAL_DOUBLEEXC_VECTOR_PADDR_SRAM,
|
||||
len = MEM_VECT_TEXT_SIZE
|
||||
text :
|
||||
org = TEXT_BASE,
|
||||
len = TEXT_SIZE,
|
||||
#ifdef CONFIG_GEN_ISR_TABLES
|
||||
IDT_LIST :
|
||||
org = TEXT_BASE + TEXT_SIZE,
|
||||
len = IDT_SIZE,
|
||||
#endif
|
||||
data :
|
||||
org = TEXT_BASE + TEXT_SIZE + IDT_SIZE,
|
||||
len = DATA_SIZE
|
||||
bss_data :
|
||||
org = TEXT_BASE + TEXT_SIZE + IDT_SIZE + DATA_SIZE,
|
||||
len = BSS_DATA_SIZE
|
||||
}
|
||||
|
||||
PHDRS
|
||||
{
|
||||
vector_reset_text_phdr PT_LOAD;
|
||||
vector_reset_lit_phdr PT_LOAD;
|
||||
vector_memory_lit_phdr PT_LOAD;
|
||||
vector_memory_text_phdr PT_LOAD;
|
||||
vector_base_text_phdr PT_LOAD;
|
||||
vector_int2_lit_phdr PT_LOAD;
|
||||
vector_int2_text_phdr PT_LOAD;
|
||||
vector_int3_lit_phdr PT_LOAD;
|
||||
vector_int3_text_phdr PT_LOAD;
|
||||
vector_int4_lit_phdr PT_LOAD;
|
||||
vector_int4_text_phdr PT_LOAD;
|
||||
vector_int5_lit_phdr PT_LOAD;
|
||||
vector_int5_text_phdr PT_LOAD;
|
||||
vector_int6_lit_phdr PT_LOAD;
|
||||
vector_int6_text_phdr PT_LOAD;
|
||||
vector_int7_lit_phdr PT_LOAD;
|
||||
vector_int7_text_phdr PT_LOAD;
|
||||
vector_kernel_lit_phdr PT_LOAD;
|
||||
vector_kernel_text_phdr PT_LOAD;
|
||||
vector_user_lit_phdr PT_LOAD;
|
||||
vector_user_text_phdr PT_LOAD;
|
||||
vector_double_lit_phdr PT_LOAD;
|
||||
vector_double_text_phdr PT_LOAD;
|
||||
text_phdr PT_LOAD;
|
||||
data_phdr PT_LOAD;
|
||||
bss_data_phdr PT_LOAD;
|
||||
}
|
||||
_rom_store_table = 0;
|
||||
PROVIDE(_memmap_vecbase_reset = XCHAL_VECBASE_RESET_PADDR_SRAM);
|
||||
|
||||
ENTRY(CONFIG_KERNEL_ENTRY)
|
||||
|
||||
/* Various memory-map dependent cache attribute settings: */
|
||||
_memmap_cacheattr_wb_base = 0x44024000;
|
||||
_memmap_cacheattr_wt_base = 0x11021000;
|
||||
_memmap_cacheattr_bp_base = 0x22022000;
|
||||
_memmap_cacheattr_unused_mask = 0x00F00FFF;
|
||||
_memmap_cacheattr_wb_trapnull = 0x4422422F;
|
||||
_memmap_cacheattr_wba_trapnull = 0x4422422F;
|
||||
_memmap_cacheattr_wbna_trapnull = 0x25222222;
|
||||
_memmap_cacheattr_wt_trapnull = 0x1122122F;
|
||||
_memmap_cacheattr_bp_trapnull = 0x2222222F;
|
||||
_memmap_cacheattr_wb_strict = 0x44F24FFF;
|
||||
_memmap_cacheattr_wt_strict = 0x11F21FFF;
|
||||
_memmap_cacheattr_bp_strict = 0x22F22FFF;
|
||||
_memmap_cacheattr_wb_allvalid = 0x44224222;
|
||||
_memmap_cacheattr_wt_allvalid = 0x11221222;
|
||||
_memmap_cacheattr_bp_allvalid = 0x22222222;
|
||||
_memmap_cacheattr_intel_s1000 = 0xf2ff4242;
|
||||
PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_intel_s1000);
|
||||
SECTIONS
|
||||
{
|
||||
.ResetVector.text : ALIGN(4)
|
||||
{
|
||||
_ResetVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.ResetVector.text))
|
||||
_ResetVector_text_end = ABSOLUTE(.);
|
||||
} >vector_reset_text :vector_reset_text_phdr
|
||||
.ResetVector.literal : ALIGN(4)
|
||||
{
|
||||
_ResetVector_literal_start = ABSOLUTE(.);
|
||||
*(.ResetVector.literal)
|
||||
_ResetVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_reset_lit :vector_reset_lit_phdr
|
||||
.MemoryExceptionVector.literal : ALIGN(4)
|
||||
{
|
||||
_MemoryExceptionVector_literal_start = ABSOLUTE(.);
|
||||
KEEP (*(.MemoryExceptionVector.literal))
|
||||
_MemoryExceptionVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_memory_lit :vector_memory_lit_phdr
|
||||
.MemoryExceptionVector.text : ALIGN(4)
|
||||
{
|
||||
_MemoryExceptionVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.MemoryExceptionVector.text))
|
||||
_MemoryExceptionVector_text_end = ABSOLUTE(.);
|
||||
} >vector_memory_text :vector_memory_text_phdr
|
||||
.WindowVectors.text : ALIGN(4)
|
||||
{
|
||||
_WindowVectors_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.WindowVectors.text))
|
||||
_WindowVectors_text_end = ABSOLUTE(.);
|
||||
} >vector_base_text :vector_base_text_phdr
|
||||
.Level2InterruptVector.literal : ALIGN(4)
|
||||
{
|
||||
_Level2InterruptVector_literal_start = ABSOLUTE(.);
|
||||
*(.Level2InterruptVector.literal)
|
||||
_Level2InterruptVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_int2_lit :vector_int2_lit_phdr
|
||||
.Level2InterruptVector.text : ALIGN(4)
|
||||
{
|
||||
_Level2InterruptVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.Level2InterruptVector.text))
|
||||
_Level2InterruptVector_text_end = ABSOLUTE(.);
|
||||
} >vector_int2_text :vector_int2_text_phdr
|
||||
.Level3InterruptVector.literal : ALIGN(4)
|
||||
{
|
||||
_Level3InterruptVector_literal_start = ABSOLUTE(.);
|
||||
*(.Level3InterruptVector.literal)
|
||||
_Level3InterruptVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_int3_lit :vector_int3_lit_phdr
|
||||
.Level3InterruptVector.text : ALIGN(4)
|
||||
{
|
||||
_Level3InterruptVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.Level3InterruptVector.text))
|
||||
_Level3InterruptVector_text_end = ABSOLUTE(.);
|
||||
} >vector_int3_text :vector_int3_text_phdr
|
||||
.Level4InterruptVector.literal : ALIGN(4)
|
||||
{
|
||||
_Level4InterruptVector_literal_start = ABSOLUTE(.);
|
||||
*(.Level4InterruptVector.literal)
|
||||
_Level4InterruptVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_int4_lit :vector_int4_lit_phdr
|
||||
.Level4InterruptVector.text : ALIGN(4)
|
||||
{
|
||||
_Level4InterruptVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.Level4InterruptVector.text))
|
||||
_Level4InterruptVector_text_end = ABSOLUTE(.);
|
||||
} >vector_int4_text :vector_int4_text_phdr
|
||||
.Level5InterruptVector.literal : ALIGN(4)
|
||||
{
|
||||
_Level5InterruptVector_literal_start = ABSOLUTE(.);
|
||||
*(.Level5InterruptVector.literal)
|
||||
_Level5InterruptVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_int5_lit :vector_int5_lit_phdr
|
||||
.Level5InterruptVector.text : ALIGN(4)
|
||||
{
|
||||
_Level5InterruptVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.Level5InterruptVector.text))
|
||||
_Level5InterruptVector_text_end = ABSOLUTE(.);
|
||||
} >vector_int5_text :vector_int5_text_phdr
|
||||
.DebugExceptionVector.literal : ALIGN(4)
|
||||
{
|
||||
_DebugExceptionVector_literal_start = ABSOLUTE(.);
|
||||
*(.DebugExceptionVector.literal)
|
||||
_DebugExceptionVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_int6_lit :vector_int6_lit_phdr
|
||||
.DebugExceptionVector.text : ALIGN(4)
|
||||
{
|
||||
_DebugExceptionVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.DebugExceptionVector.text))
|
||||
_DebugExceptionVector_text_end = ABSOLUTE(.);
|
||||
} >vector_int6_text :vector_int6_text_phdr
|
||||
.NMIExceptionVector.literal : ALIGN(4)
|
||||
{
|
||||
_NMIExceptionVector_literal_start = ABSOLUTE(.);
|
||||
*(.NMIExceptionVector.literal)
|
||||
_NMIExceptionVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_int7_lit :vector_int7_lit_phdr
|
||||
.NMIExceptionVector.text : ALIGN(4)
|
||||
{
|
||||
_NMIExceptionVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.NMIExceptionVector.text))
|
||||
_NMIExceptionVector_text_end = ABSOLUTE(.);
|
||||
} >vector_int7_text :vector_int7_text_phdr
|
||||
.KernelExceptionVector.literal : ALIGN(4)
|
||||
{
|
||||
_KernelExceptionVector_literal_start = ABSOLUTE(.);
|
||||
*(.KernelExceptionVector.literal)
|
||||
_KernelExceptionVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_kernel_lit :vector_kernel_lit_phdr
|
||||
.KernelExceptionVector.text : ALIGN(4)
|
||||
{
|
||||
_KernelExceptionVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.KernelExceptionVector.text))
|
||||
_KernelExceptionVector_text_end = ABSOLUTE(.);
|
||||
} >vector_kernel_text :vector_kernel_text_phdr
|
||||
.UserExceptionVector.literal : ALIGN(4)
|
||||
{
|
||||
_UserExceptionVector_literal_start = ABSOLUTE(.);
|
||||
*(.UserExceptionVector.literal)
|
||||
_UserExceptionVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_user_lit :vector_user_lit_phdr
|
||||
.UserExceptionVector.text : ALIGN(4)
|
||||
{
|
||||
_UserExceptionVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.UserExceptionVector.text))
|
||||
_UserExceptionVector_text_end = ABSOLUTE(.);
|
||||
} >vector_user_text :vector_user_text_phdr
|
||||
.DoubleExceptionVector.literal : ALIGN(4)
|
||||
{
|
||||
_DoubleExceptionVector_literal_start = ABSOLUTE(.);
|
||||
*(.DoubleExceptionVector.literal)
|
||||
_DoubleExceptionVector_literal_end = ABSOLUTE(.);
|
||||
} >vector_double_lit :vector_double_lit_phdr
|
||||
.DoubleExceptionVector.text : ALIGN(4)
|
||||
{
|
||||
_DoubleExceptionVector_text_start = ABSOLUTE(.);
|
||||
KEEP (*(.DoubleExceptionVector.text))
|
||||
_DoubleExceptionVector_text_end = ABSOLUTE(.);
|
||||
} >vector_double_text :vector_double_text_phdr
|
||||
|
||||
.text : ALIGN(4)
|
||||
{
|
||||
_stext = .;
|
||||
_text_start = ABSOLUTE(.);
|
||||
*(.entry.text)
|
||||
*(.init.literal)
|
||||
KEEP(*(.init))
|
||||
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
||||
*(.fini.literal)
|
||||
KEEP(*(.fini))
|
||||
*(.gnu.version)
|
||||
_text_end = ABSOLUTE(.);
|
||||
_etext = .;
|
||||
} >text :text_phdr
|
||||
#include <linker/common-rom.ld>
|
||||
|
||||
.noinit : ALIGN(4)
|
||||
{
|
||||
*(.noinit)
|
||||
*(.noinit.*)
|
||||
} >data :data_phdr
|
||||
.rodata : ALIGN(4)
|
||||
{
|
||||
_rodata_start = ABSOLUTE(.);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.gnu.linkonce.r.*)
|
||||
*(.rodata1)
|
||||
__XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
|
||||
KEEP (*(.xt_except_table))
|
||||
KEEP (*(.gcc_except_table))
|
||||
*(.gnu.linkonce.e.*)
|
||||
*(.gnu.version_r)
|
||||
KEEP (*(.eh_frame))
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
__XT_EXCEPTION_DESCS__ = ABSOLUTE(.);
|
||||
*(.xt_except_desc)
|
||||
*(.gnu.linkonce.h.*)
|
||||
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
|
||||
*(.xt_except_desc_end)
|
||||
*(.dynamic)
|
||||
*(.gnu.version_d)
|
||||
. = ALIGN(4);
|
||||
_bss_table_start = ABSOLUTE(.);
|
||||
LONG(_bss_start)
|
||||
LONG(_bss_end)
|
||||
_bss_table_end = ABSOLUTE(.);
|
||||
_rodata_end = ABSOLUTE(.);
|
||||
} >data :data_phdr
|
||||
.data : ALIGN(4)
|
||||
{
|
||||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
*(.gnu.linkonce.s.*)
|
||||
*(.sdata2)
|
||||
*(.sdata2.*)
|
||||
*(.gnu.linkonce.s2.*)
|
||||
KEEP(*(.jcr))
|
||||
_data_end = ABSOLUTE(.);
|
||||
} >data :data_phdr
|
||||
.lit4 : ALIGN(4)
|
||||
{
|
||||
_lit4_start = ABSOLUTE(.);
|
||||
*(*.lit4)
|
||||
*(.lit4.*)
|
||||
*(.gnu.linkonce.lit4.*)
|
||||
_lit4_end = ABSOLUTE(.);
|
||||
} >data :data_phdr
|
||||
#include <linker/common-ram.ld>
|
||||
|
||||
.bss (NOLOAD) : ALIGN(8)
|
||||
{
|
||||
. = ALIGN (8);
|
||||
_bss_start = ABSOLUTE(.);
|
||||
*(.dynsbss)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
*(.sbss2)
|
||||
*(.sbss2.*)
|
||||
*(.gnu.linkonce.sb2.*)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN (8);
|
||||
_bss_end = ABSOLUTE(.);
|
||||
} >bss_data :bss_data_phdr
|
||||
|
||||
/* stack */
|
||||
_end = ALIGN(8);
|
||||
PROVIDE(end = ALIGN(8));
|
||||
__stack = L2_SRAM_BASE + L2_SRAM_SIZE;
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
.xt.insn 0 :
|
||||
{
|
||||
KEEP (*(.xt.insn))
|
||||
KEEP (*(.gnu.linkonce.x.*))
|
||||
}
|
||||
.xt.prop 0 :
|
||||
{
|
||||
KEEP (*(.xt.prop))
|
||||
KEEP (*(.xt.prop.*))
|
||||
KEEP (*(.gnu.linkonce.prop.*))
|
||||
}
|
||||
.xt.lit 0 :
|
||||
{
|
||||
KEEP (*(.xt.lit))
|
||||
KEEP (*(.xt.lit.*))
|
||||
KEEP (*(.gnu.linkonce.p.*))
|
||||
}
|
||||
.xt.profile_range 0 :
|
||||
{
|
||||
KEEP (*(.xt.profile_range))
|
||||
KEEP (*(.gnu.linkonce.profile_range.*))
|
||||
}
|
||||
.xt.profile_ranges 0 :
|
||||
{
|
||||
KEEP (*(.xt.profile_ranges))
|
||||
KEEP (*(.gnu.linkonce.xt.profile_ranges.*))
|
||||
}
|
||||
.xt.profile_files 0 :
|
||||
{
|
||||
KEEP (*(.xt.profile_files))
|
||||
KEEP (*(.gnu.linkonce.xt.profile_files.*))
|
||||
}
|
||||
#ifdef CONFIG_GEN_ISR_TABLES
|
||||
#include <linker/intlist.ld>
|
||||
#endif
|
||||
}
|
59
soc/xtensa/intel_s1000/memory.h
Normal file
59
soc/xtensa/intel_s1000/memory.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Intel Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __INC_MEMORY_H
|
||||
#define __INC_MEMORY_H
|
||||
|
||||
/* L2 HP SRAM */
|
||||
#define L2_VECTOR_SIZE 0x1000
|
||||
|
||||
/* The reset vector address in SRAM and its size */
|
||||
#define XCHAL_RESET_VECTOR0_PADDR_SRAM L2_SRAM_BASE
|
||||
#define MEM_RESET_TEXT_SIZE 0x268
|
||||
#define MEM_RESET_LIT_SIZE 0x8
|
||||
|
||||
/* This is the base address of all the vectors defined in SRAM */
|
||||
#define XCHAL_VECBASE_RESET_PADDR_SRAM (L2_SRAM_BASE + 0x400)
|
||||
#define MEM_VECBASE_LIT_SIZE 0x178
|
||||
|
||||
/* The addresses of the vectors in SRAM.
|
||||
* Only the memerror vector continues to point to its ROM address.
|
||||
*/
|
||||
#define XCHAL_INTLEVEL2_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x580)
|
||||
#define XCHAL_INTLEVEL3_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x5C0)
|
||||
#define XCHAL_INTLEVEL4_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x600)
|
||||
#define XCHAL_INTLEVEL5_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x640)
|
||||
#define XCHAL_INTLEVEL6_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x680)
|
||||
#define XCHAL_INTLEVEL7_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x6C0)
|
||||
#define XCHAL_KERNEL_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x700)
|
||||
#define XCHAL_USER_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x740)
|
||||
#define XCHAL_DOUBLEEXC_VECTOR_PADDR_SRAM (L2_SRAM_BASE + 0x7C0)
|
||||
|
||||
/* Vector and literal sizes */
|
||||
#define MEM_VECT_LIT_SIZE 0x8
|
||||
#define MEM_VECT_TEXT_SIZE 0x38
|
||||
#define MEM_VECT_SIZE (MEM_VECT_TEXT_SIZE +\
|
||||
MEM_VECT_LIT_SIZE)
|
||||
|
||||
/* The memerror vector address is copied as is from core-isa.h */
|
||||
#define XCHAL_MEMERROR_VECTOR_PADDR 0xBEFE0400
|
||||
|
||||
#define MEM_ERROR_TEXT_SIZE 0x180
|
||||
#define MEM_ERROR_LIT_SIZE 0x8
|
||||
|
||||
/* text and data share the same L2 HP SRAM on Intel S1000 */
|
||||
#define TEXT_BASE (L2_SRAM_BASE + L2_VECTOR_SIZE)
|
||||
#define TEXT_SIZE 0x16000
|
||||
|
||||
/* size of the Interrupt Descriptor Table (IDT) */
|
||||
#define IDT_SIZE 0x2000
|
||||
|
||||
/* initialized data */
|
||||
#define DATA_SIZE 0x10000
|
||||
|
||||
/* bss data */
|
||||
#define BSS_DATA_SIZE 0x8000
|
||||
|
||||
#endif /* __INC_MEMORY_H */
|
231
soc/xtensa/intel_s1000/soc.c
Normal file
231
soc/xtensa/intel_s1000/soc.c
Normal file
|
@ -0,0 +1,231 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define SYS_LOG_LEVEL SYS_LOG_LEVEL_INFO
|
||||
#define SYS_LOG_DOMAIN "soc/s1000"
|
||||
|
||||
#include <device.h>
|
||||
#include <xtensa_api.h>
|
||||
#include <xtensa/xtruntime.h>
|
||||
#include <logging/sys_log.h>
|
||||
#include <board.h>
|
||||
#include <irq_nextlevel.h>
|
||||
#include <xtensa/hal.h>
|
||||
#include <init.h>
|
||||
|
||||
static u32_t ref_clk_freq;
|
||||
|
||||
void _soc_irq_enable(u32_t irq)
|
||||
{
|
||||
struct device *dev_cavs, *dev_ictl;
|
||||
|
||||
switch (XTENSA_IRQ_NUMBER(irq)) {
|
||||
case CAVS_ICTL_0_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_0_NAME);
|
||||
break;
|
||||
case CAVS_ICTL_1_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_1_NAME);
|
||||
break;
|
||||
case CAVS_ICTL_2_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_2_NAME);
|
||||
break;
|
||||
case CAVS_ICTL_3_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_3_NAME);
|
||||
break;
|
||||
default:
|
||||
/* regular interrupt */
|
||||
_xtensa_irq_enable(XTENSA_IRQ_NUMBER(irq));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dev_cavs) {
|
||||
SYS_LOG_DBG("board: CAVS device binding failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the control comes here it means the specified interrupt
|
||||
* is in either CAVS interrupt logic or DW interrupt controller
|
||||
*/
|
||||
_xtensa_irq_enable(XTENSA_IRQ_NUMBER(irq));
|
||||
|
||||
switch (CAVS_IRQ_NUMBER(irq)) {
|
||||
case DW_ICTL_IRQ_CAVS_OFFSET:
|
||||
dev_ictl = device_get_binding(CONFIG_DW_ICTL_NAME);
|
||||
break;
|
||||
default:
|
||||
/* The source of the interrupt is in CAVS interrupt logic */
|
||||
irq_enable_next_level(dev_cavs, CAVS_IRQ_NUMBER(irq));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dev_ictl) {
|
||||
SYS_LOG_DBG("board: DW intr_control device binding failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the control comes here it means the specified interrupt
|
||||
* is in DW interrupt controller
|
||||
*/
|
||||
irq_enable_next_level(dev_cavs, CAVS_IRQ_NUMBER(irq));
|
||||
|
||||
/* Manipulate the relevant bit in the interrupt controller
|
||||
* register as needed
|
||||
*/
|
||||
irq_enable_next_level(dev_ictl, INTR_CNTL_IRQ_NUM(irq));
|
||||
}
|
||||
|
||||
void _soc_irq_disable(u32_t irq)
|
||||
{
|
||||
struct device *dev_cavs, *dev_ictl;
|
||||
|
||||
switch (XTENSA_IRQ_NUMBER(irq)) {
|
||||
case CAVS_ICTL_0_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_0_NAME);
|
||||
break;
|
||||
case CAVS_ICTL_1_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_1_NAME);
|
||||
break;
|
||||
case CAVS_ICTL_2_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_2_NAME);
|
||||
break;
|
||||
case CAVS_ICTL_3_IRQ:
|
||||
dev_cavs = device_get_binding(CONFIG_CAVS_ICTL_3_NAME);
|
||||
break;
|
||||
default:
|
||||
/* regular interrupt */
|
||||
_xtensa_irq_disable(XTENSA_IRQ_NUMBER(irq));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dev_cavs) {
|
||||
SYS_LOG_DBG("board: CAVS device binding failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the control comes here it means the specified interrupt
|
||||
* is in either CAVS interrupt logic or DW interrupt controller
|
||||
*/
|
||||
|
||||
switch (CAVS_IRQ_NUMBER(irq)) {
|
||||
case DW_ICTL_IRQ_CAVS_OFFSET:
|
||||
dev_ictl = device_get_binding(CONFIG_DW_ICTL_NAME);
|
||||
break;
|
||||
default:
|
||||
/* The source of the interrupt is in CAVS interrupt logic */
|
||||
irq_disable_next_level(dev_cavs, CAVS_IRQ_NUMBER(irq));
|
||||
|
||||
/* Disable the parent IRQ if all children are disabled */
|
||||
if (!irq_is_enabled_next_level(dev_cavs)) {
|
||||
_xtensa_irq_disable(XTENSA_IRQ_NUMBER(irq));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dev_ictl) {
|
||||
SYS_LOG_DBG("board: DW intr_control device binding failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the control comes here it means the specified interrupt
|
||||
* is in DW interrupt controller.
|
||||
* Manipulate the relevant bit in the interrupt controller
|
||||
* register as needed
|
||||
*/
|
||||
irq_disable_next_level(dev_ictl, INTR_CNTL_IRQ_NUM(irq));
|
||||
|
||||
/* Disable the parent IRQ if all children are disabled */
|
||||
if (!irq_is_enabled_next_level(dev_ictl)) {
|
||||
irq_disable_next_level(dev_cavs, CAVS_IRQ_NUMBER(irq));
|
||||
|
||||
if (!irq_is_enabled_next_level(dev_cavs)) {
|
||||
_xtensa_irq_disable(XTENSA_IRQ_NUMBER(irq));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void soc_set_resource_ownership(void)
|
||||
{
|
||||
volatile struct soc_resource_alloc_regs *regs =
|
||||
(volatile struct soc_resource_alloc_regs *)
|
||||
SOC_RESOURCE_ALLOC_REG_BASE;
|
||||
int index;
|
||||
|
||||
|
||||
/* set ownership of DMA controllers and channels */
|
||||
for (index = 0; index < SOC_NUM_LPGPDMAC; index++) {
|
||||
regs->lpgpdmacxo[index] = SOC_LPGPDMAC_OWNER_DSP;
|
||||
}
|
||||
|
||||
/* set ownership of I2S and DMIC controllers */
|
||||
regs->dspiopo = SOC_DSPIOP_I2S_OWNSEL_DSP |
|
||||
SOC_DSPIOP_DMIC_OWNSEL_DSP;
|
||||
|
||||
/* set ownership of timestamp and M/N dividers */
|
||||
regs->geno = SOC_GENO_TIMESTAMP_OWNER_DSP |
|
||||
SOC_GENO_MNDIV_OWNER_DSP;
|
||||
}
|
||||
|
||||
void dcache_writeback_region(void *addr, size_t size)
|
||||
{
|
||||
xthal_dcache_region_writeback(addr, size);
|
||||
}
|
||||
|
||||
void dcache_invalidate_region(void *addr, size_t size)
|
||||
{
|
||||
xthal_dcache_region_invalidate(addr, size);
|
||||
}
|
||||
|
||||
u32_t soc_get_ref_clk_freq(void)
|
||||
{
|
||||
return ref_clk_freq;
|
||||
}
|
||||
|
||||
static void soc_set_power_and_clock(void)
|
||||
{
|
||||
volatile struct soc_dsp_shim_regs *regs =
|
||||
(volatile struct soc_dsp_shim_regs *)
|
||||
SOC_DSP_SHIM_REG_BASE;
|
||||
|
||||
regs->clkctl |= SOC_CLKCTL_REQ_FAST_CLK | SOC_CLKCTL_OCS_FAST_CLK;
|
||||
regs->pwrctl |= SOC_PWRCTL_DISABLE_PWR_GATING_DSP1 |
|
||||
SOC_PWRCTL_DISABLE_PWR_GATING_DSP0;
|
||||
}
|
||||
|
||||
static void soc_read_bootstraps(void)
|
||||
{
|
||||
u32_t bootstrap;
|
||||
|
||||
bootstrap = *((volatile u32_t *)SOC_S1000_GLB_CTRL_STRAPS);
|
||||
|
||||
bootstrap &= SOC_S1000_STRAP_REF_CLK;
|
||||
|
||||
switch (bootstrap) {
|
||||
case SOC_S1000_STRAP_REF_CLK_19P2:
|
||||
ref_clk_freq = 19200000;
|
||||
break;
|
||||
case SOC_S1000_STRAP_REF_CLK_24P576:
|
||||
ref_clk_freq = 24576000;
|
||||
break;
|
||||
case SOC_S1000_STRAP_REF_CLK_38P4:
|
||||
default:
|
||||
ref_clk_freq = 38400000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int soc_init(struct device *dev)
|
||||
{
|
||||
soc_read_bootstraps();
|
||||
|
||||
ref_clk_freq = soc_get_ref_clk_freq();
|
||||
SYS_LOG_INF("Reference clock frequency: %u Hz", ref_clk_freq);
|
||||
|
||||
soc_set_resource_ownership();
|
||||
soc_set_power_and_clock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(soc_init, PRE_KERNEL_1, 99);
|
161
soc/xtensa/intel_s1000/soc.h
Normal file
161
soc/xtensa/intel_s1000/soc.h
Normal file
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Intel Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __INC_SOC_H
|
||||
#define __INC_SOC_H
|
||||
|
||||
/* macros related to interrupt handling */
|
||||
#define XTENSA_IRQ_NUM_SHIFT 0
|
||||
#define CAVS_IRQ_NUM_SHIFT 8
|
||||
#define INTR_CNTL_IRQ_NUM_SHIFT 16
|
||||
#define XTENSA_IRQ_NUM_MASK 0xff
|
||||
#define CAVS_IRQ_NUM_MASK 0xff
|
||||
#define INTR_CNTL_IRQ_NUM_MASK 0xff
|
||||
|
||||
/*
|
||||
* IRQs are mapped on 3 levels. 4th level is left 0x00.
|
||||
*
|
||||
* 1. Peripheral Register bit offset.
|
||||
* 2. CAVS logic bit offset.
|
||||
* 3. Core interrupt number.
|
||||
*/
|
||||
#define XTENSA_IRQ_NUMBER(_irq) \
|
||||
((_irq >> XTENSA_IRQ_NUM_SHIFT) & XTENSA_IRQ_NUM_MASK)
|
||||
#define CAVS_IRQ_NUMBER(_irq) \
|
||||
(((_irq >> CAVS_IRQ_NUM_SHIFT) & CAVS_IRQ_NUM_MASK) - 1)
|
||||
#define INTR_CNTL_IRQ_NUM(_irq) \
|
||||
(((_irq >> INTR_CNTL_IRQ_NUM_SHIFT) & INTR_CNTL_IRQ_NUM_MASK) - 1)
|
||||
|
||||
#define IOAPIC_EDGE 0
|
||||
#define IOAPIC_HIGH 0
|
||||
|
||||
/* DW interrupt controller */
|
||||
#define DW_ICTL_IRQ_CAVS_OFFSET CAVS_IRQ_NUMBER(DW_ICTL_IRQ)
|
||||
#define DW_ICTL_NUM_IRQS 9
|
||||
|
||||
/* GPIO */
|
||||
#define GPIO_DW_0_BASE_ADDR 0x00080C00
|
||||
#define GPIO_DW_0_BITS 32
|
||||
#define GPIO_DW_PORT_0_INT_MASK 0
|
||||
#define GPIO_DW_0_IRQ_FLAGS 0
|
||||
#define GPIO_DW_0_IRQ 0x00040706
|
||||
#define GPIO_DW_0_IRQ_ICTL_OFFSET INTR_CNTL_IRQ_NUM(GPIO_DW_0_IRQ)
|
||||
|
||||
/* low power DMACs */
|
||||
#define LP_GP_DMA_SIZE 0x00001000
|
||||
#define DW_DMA0_BASE_ADDR 0x0007C000
|
||||
#define DW_DMA1_BASE_ADDR (0x0007C000 +\
|
||||
1 * LP_GP_DMA_SIZE)
|
||||
#define DW_DMA2_BASE_ADDR (0x0007C000 +\
|
||||
2 * LP_GP_DMA_SIZE)
|
||||
|
||||
#define DW_DMA0_IRQ 0x00001110
|
||||
#define DW_DMA1_IRQ 0x0000010A
|
||||
#define DW_DMA2_IRQ 0x0000010D
|
||||
|
||||
/* address of DMA ownership register. We need to properly configure
|
||||
* this register in order to access the DMA registers.
|
||||
*/
|
||||
#define CAVS_DMA0_OWNERSHIP_REG (0x00071A60)
|
||||
#define CAVS_DMA1_OWNERSHIP_REG (0x00071A62)
|
||||
#define CAVS_DMA2_OWNERSHIP_REG (0x00071A64)
|
||||
|
||||
#define DMA_HANDSHAKE_SSP0_TX 2
|
||||
#define DMA_HANDSHAKE_SSP0_RX 3
|
||||
#define DMA_HANDSHAKE_SSP1_TX 4
|
||||
#define DMA_HANDSHAKE_SSP1_RX 5
|
||||
#define DMA_HANDSHAKE_SSP2_TX 6
|
||||
#define DMA_HANDSHAKE_SSP2_RX 7
|
||||
#define DMA_HANDSHAKE_SSP3_TX 8
|
||||
#define DMA_HANDSHAKE_SSP3_RX 9
|
||||
|
||||
/* I2S */
|
||||
#define I2S0_CAVS_IRQ 0x00000010
|
||||
#define I2S1_CAVS_IRQ 0x00000110
|
||||
#define I2S2_CAVS_IRQ 0x00000210
|
||||
#define I2S3_CAVS_IRQ 0x00000310
|
||||
|
||||
#define SSP_SIZE 0x0000200
|
||||
#define SSP_BASE(x) (0x00077000 + (x) * SSP_SIZE)
|
||||
#define SSP_MN_DIV_SIZE (8)
|
||||
#define SSP_MN_DIV_BASE(x) (0x00078D00 + ((x) * SSP_MN_DIV_SIZE))
|
||||
|
||||
#define PDM_BASE 0x00010000
|
||||
|
||||
#define SOC_NUM_LPGPDMAC 3
|
||||
#define SOC_NUM_CHANNELS_IN_DMAC 8
|
||||
|
||||
/* SOC Resource Allocation Registers */
|
||||
#define SOC_RESOURCE_ALLOC_REG_BASE 0x00071A60
|
||||
/* bit field definition for LP GPDMA ownership register */
|
||||
#define SOC_LPGPDMAC_OWNER_DSP \
|
||||
(BIT(15) | BIT_MASK(SOC_NUM_CHANNELS_IN_DMAC))
|
||||
|
||||
#define SOC_NUM_I2S_INSTANCES 4
|
||||
/* bit field definition for IO peripheral ownership register */
|
||||
#define SOC_DSPIOP_I2S_OWNSEL_DSP \
|
||||
(BIT_MASK(SOC_NUM_I2S_INSTANCES) << 8)
|
||||
#define SOC_DSPIOP_DMIC_OWNSEL_DSP BIT(0)
|
||||
|
||||
/* bit field definition for general ownership register */
|
||||
#define SOC_GENO_TIMESTAMP_OWNER_DSP BIT(2)
|
||||
#define SOC_GENO_MNDIV_OWNER_DSP BIT(1)
|
||||
|
||||
struct soc_resource_alloc_regs {
|
||||
union {
|
||||
u16_t lpgpdmacxo[SOC_NUM_LPGPDMAC];
|
||||
u16_t reserved[4];
|
||||
};
|
||||
u32_t dspiopo;
|
||||
u32_t geno;
|
||||
};
|
||||
|
||||
/* SOC DSP SHIM Registers */
|
||||
#define SOC_DSP_SHIM_REG_BASE 0x00071F00
|
||||
/* SOC DSP SHIM Register - Clock Control */
|
||||
#define SOC_CLKCTL_REQ_FAST_CLK BIT(31)
|
||||
#define SOC_CLKCTL_REQ_SLOW_CLK BIT(30)
|
||||
#define SOC_CLKCTL_OCS_FAST_CLK BIT(2)
|
||||
/* SOC DSP SHIM Register - Power Control */
|
||||
#define SOC_PWRCTL_DISABLE_PWR_GATING_DSP0 BIT(0)
|
||||
#define SOC_PWRCTL_DISABLE_PWR_GATING_DSP1 BIT(1)
|
||||
|
||||
struct soc_dsp_shim_regs {
|
||||
u32_t reserved[8];
|
||||
u64_t walclk;
|
||||
u64_t dspwctcs;
|
||||
u64_t dspwct0c;
|
||||
u64_t dspwct1c;
|
||||
u32_t reserved1[14];
|
||||
u32_t clkctl;
|
||||
u32_t clksts;
|
||||
u32_t reserved2[4];
|
||||
u16_t pwrctl;
|
||||
u16_t pwrsts;
|
||||
u32_t lpsctl;
|
||||
u32_t lpsdmas0;
|
||||
u32_t lpsdmas1;
|
||||
u32_t reserved3[22];
|
||||
};
|
||||
|
||||
#define USB_DW_BASE 0x000A0000
|
||||
#define USB_DW_IRQ 0x00000806
|
||||
|
||||
/* Global Control registers */
|
||||
#define SOC_S1000_GLB_CTRL_BASE (0x00081C00)
|
||||
|
||||
#define SOC_S1000_GLB_CTRL_STRAPS (SOC_S1000_GLB_CTRL_BASE + 0x40)
|
||||
#define SOC_S1000_STRAP_REF_CLK (BIT_MASK(2) << 3)
|
||||
#define SOC_S1000_STRAP_REF_CLK_38P4 (0 << 3)
|
||||
#define SOC_S1000_STRAP_REF_CLK_19P2 (1 << 3)
|
||||
#define SOC_S1000_STRAP_REF_CLK_24P576 (2 << 3)
|
||||
|
||||
extern void _soc_irq_enable(u32_t irq);
|
||||
extern void _soc_irq_disable(u32_t irq);
|
||||
extern void dcache_writeback_region(void *addr, size_t size);
|
||||
extern void dcache_invalidate_region(void *addr, size_t size);
|
||||
extern u32_t soc_get_ref_clk_freq(void);
|
||||
|
||||
#endif /* __INC_SOC_H */
|
Loading…
Add table
Add a link
Reference in a new issue