Skip to content

Commit

Permalink
Use SoC instead of platform.
Browse files Browse the repository at this point in the history
Change terminology and use SoC instead of platform. An SoC provides
features and default configurations available with an SoC. A board
implements the SoC and adds more features and IP block specific to the
board to extend the SoC functionality such as sensors and debugging
features.

Change-Id: I15e8d78a6d4ecd5cfb3bc25ced9ba77e5ea1122f
Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Feb 6, 2016
1 parent f5f9b71 commit 10bb38c
Show file tree
Hide file tree
Showing 175 changed files with 220 additions and 232 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -333,19 +333,18 @@ endif
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := -include $(CURDIR)/include/generated/autoconf.h

PLATFORM_NAME = $(subst $(DQUOTE),,$(CONFIG_PLATFORM))
SOC_NAME = $(subst $(DQUOTE),,$(CONFIG_SOC))
ARCH = $(subst $(DQUOTE),,$(CONFIG_ARCH))
BOARD_NAME = $(subst $(DQUOTE),,$(CONFIG_BOARD))
KERNEL_NAME = $(subst $(DQUOTE),,$(CONFIG_KERNEL_BIN_NAME))
KERNEL_ELF_NAME = $(KERNEL_NAME).elf

export PLATFORM_NAME SOC_NAME BOARD_NAME ARCH KERNEL_NAME KERNEL_ELF_NAME
export SOC_NAME BOARD_NAME ARCH KERNEL_NAME KERNEL_ELF_NAME
# Use ZEPHYRINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
ZEPHYRINCLUDE = \
-I$(srctree)/arch/$(ARCH)/include \
-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME) \
-I$(srctree)/arch/$(ARCH)/soc/$(SOC_NAME) \
-I$(srctree)/boards/$(BOARD_NAME) \
$(if $(KBUILD_SRC), -I$(srctree)/include) \
-I$(srctree)/include \
Expand Down Expand Up @@ -739,7 +738,7 @@ export KBUILD_ZEPHYR_MAIN := $(drivers-y) $(core-y) $(libs-y) $(app-y)
ifdef CONFIG_HAVE_CUSTOM_LINKER_SCRIPT
export KBUILD_LDS := $(subst $(DQUOTE),,$(CONFIG_CUSTOM_LINKER_SCRIPT))
else
export KBUILD_LDS := $(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)/linker.cmd
export KBUILD_LDS := $(srctree)/arch/$(ARCH)/soc/$(SOC_NAME)/linker.cmd
endif
export LDFLAGS_zephyr
# used by scripts/pacmage/Makefile
Expand Down Expand Up @@ -950,7 +949,7 @@ help:
@echo '* zephyr - Build the bare kernel'
@echo ' qemu - Build the bare kernel and runs the emulation with qemu'
@echo ''
@echo 'Supported platforms:'
@echo 'Supported Boards:'
@echo ''
@$(if $(boards), \
$(foreach b, $(boards), \
Expand Down
5 changes: 0 additions & 5 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ config ARCH
System architecture string.

config SOC
string
help
SOC being used.

config PLATFORM
string
help
This option holds the directory name used by the build system to locate
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ subdir-ccflags-y +=-I$(srctree)/drivers
subdir-asflags-y += $(subdir-ccflags-y)

obj-y = core/
obj-y += platforms/$(PLATFORM_NAME)/
obj-y += soc/$(SOC_NAME)/
8 changes: 3 additions & 5 deletions arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ config ARCH_DEFCONFIG
default "arch/arc/defconfig"

choice
prompt "Platform Selection"
default PLATFORM_GENERIC_ARC

source "arch/arc/platforms/*/Kconfig.platform"
prompt "SoC Selection"
source "arch/arc/soc/*/Kconfig.soc"
endchoice

menu "ARC EM4 processor options"
Expand Down Expand Up @@ -248,6 +246,6 @@ config ARCH_HAS_NANO_FIBER_ABORT
endmenu


source "arch/arc/platforms/*/Kconfig"
source "arch/arc/soc/*/Kconfig"

endmenu
2 changes: 1 addition & 1 deletion arch/arc/defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIG_ARC=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000
CONFIG_PLATFORM_GENERIC_ARC=y
CONFIG_SOC_GENERIC_ARC=y
CONFIG_CPU_ARCEM4=y
CONFIG_CPU_ARCV2=y
CONFIG_RAM_START=0xa8000000
Expand Down
3 changes: 0 additions & 3 deletions arch/arc/platforms/generic_arc/Kconfig.platform

This file was deleted.

3 changes: 0 additions & 3 deletions arch/arc/platforms/quark_se_ss/Kconfig.platform

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# limitations under the License.
#

if PLATFORM_GENERIC_ARC
config PLATFORM
if SOC_GENERIC_ARC
config SOC
default generic_arc

config NUM_IRQ_PRIO_LEVELS
Expand Down
3 changes: 3 additions & 0 deletions arch/arc/soc/generic_arc/Kconfig.soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

config SOC_GENERIC_ARC
bool
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
obj-y = platform.o
obj-y = soc.o
obj-$(CONFIG_IRQ_VECTOR_TABLE_BSP) += irq_vector_table.o
obj-$(CONFIG_SW_ISR_TABLE_BSP) += sw_isr_table.o
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

#include <nanokernel.h>
#include "platform.h"
#include "soc.h"
#include <init.h>
#include <uart.h>

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# limitations under the License.
#

if PLATFORM_QUARK_SE_SS
if SOC_QUARK_SE_SS

config PLATFORM
config SOC
default quark_se_ss

config NUM_IRQ_PRIO_LEVELS
Expand Down Expand Up @@ -166,4 +166,4 @@ config GPIO_DW_INIT_PRIORITY
config I2C_INIT_PRIORITY
default 60

endif #PLATFORM_QUARK_SE_ARC
endif #SOC_QUARK_SE_ARC
3 changes: 3 additions & 0 deletions arch/arc/soc/quark_se_ss/Kconfig.soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

config SOC_QUARK_SE_SS
bool "Intel Quark SE - Sensor Sub System"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ccflags-y +=-I$(srctree)/arch/x86/platforms/
ccflags-y +=-I$(srctree)/arch/x86/soc/
ccflags-y +=-I$(srctree)/include
ccflags-y +=-I$(srctree)/include/drivers
ccflags-y +=-I$(srctree)/drivers
ccflags-$(CONFIG_ADC) +=-I$(srctree)/drivers/adc

asflags-y := ${ccflags-y}

obj-y = platform.o platform_config.o
obj-y = soc.o soc_config.o
obj-$(CONFIG_IRQ_VECTOR_TABLE_BSP) += irq_vector_table.o
obj-$(CONFIG_SW_ISR_TABLE_BSP) += sw_isr_table.o
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

#include <nanokernel.h>
#include "platform.h"
#include "soc.h"
#include <init.h>
#include <quark_se/shared_mem.h>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <device.h>
#include <init.h>
#include "platform.h"
#include "soc.h"

#if CONFIG_IPM_QUARK_SE
#include <ipm.h>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion arch/arm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ subdir-ccflags-y +=-I$(srctree)/drivers
subdir-asflags-y := ${subdir-ccflags-y}

obj-y += core/
obj-y += platforms/$(PLATFORM_NAME)/
obj-y += soc/$(SOC_NAME)/
10 changes: 4 additions & 6 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ config ARCH_DEFCONFIG
menu "General Platform Configuration"

choice
prompt "Platform Selection"
default PLATFORM_FSL_FRDM_K64F

source "arch/arm/platforms/*/Kconfig.platform"

prompt "SoC Selection"
default SOC_FSL_FRDM_K64F
source "arch/arm/soc/*/Kconfig.soc"
endchoice


Expand Down Expand Up @@ -71,6 +69,6 @@ source "arch/arm/core/Kconfig"

endmenu

source "arch/arm/platforms/*/Kconfig"
source "arch/arm/soc/*/Kconfig"

endmenu
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ config IRQ_VECTOR_TABLE_CUSTOM
- ISRs must notify the kernel manually by invoking _IntExit() when
then are about to return.

config IRQ_VECTOR_TABLE_PLATFORM
config IRQ_VECTOR_TABLE_SOC
bool
# omit prompt to signify a "hidden" option
depends on SW_ISR_TABLE || !IRQ_VECTOR_TABLE_CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ccflags-y +=-I$(srctree)/include/drivers
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(PLATFORM_NAME)
ccflags-y +=-I$(srctree)/arch/$(ARCH)/platforms/$(SOC_NAME)

asflags-y = $(ccflags-y)

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIG_ARM=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12000000
CONFIG_PLATFORM_QEMU_ARM=y
CONFIG_SOC_TI_LM3S6965=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0"
Expand Down
5 changes: 0 additions & 5 deletions arch/arm/platforms/fsl_frdm_k64f/Kconfig.platform

This file was deleted.

6 changes: 0 additions & 6 deletions arch/arm/platforms/fsl_frdm_k64f/Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions arch/arm/platforms/ti_lm3s6965/Makefile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# limitations under the License.
#

if PLATFORM_FSL_FRDM_K64F
config PLATFORM
if SOC_FSL_FRDM_K64F
config SOC
default fsl_frdm_k64f

config NUM_IRQ_PRIO_BITS
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/soc/fsl_frdm_k64f/Kconfig.soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

config SOC_FSL_FRDM_K64F
bool "Freescale FRDM-K64F"
select CPU_CORTEX_M
select CPU_CORTEX_M4
6 changes: 6 additions & 0 deletions arch/arm/soc/fsl_frdm_k64f/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
obj-y += soc_config.o
obj-y += soc.o
obj-y += nmi_on_reset.o
obj-y += wdog.o

obj-$(CONFIG_IRQ_VECTOR_TABLE_SOC) += irq_vector_table.o
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
#include <sections.h>

#if defined(CONFIG_CONSOLE_HANDLER)
#include <platform.h>
#include <soc.h>
#include <console/uart_console.h>
#endif /* CONFIG_CONSOLE_HANDLER */

#if defined(CONFIG_BLUETOOTH_UART)
#include <platform.h>
#include <soc.h>
#include <bluetooth/uart.h>
#endif /* CONFIG_BLUETOOTH_UART */

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <nanokernel.h>
#include <device.h>
#include <init.h>
#include <platform.h>
#include <soc.h>
#include <drivers/k20_mcg.h>
#include <uart.h>
#include <drivers/k20_pcr.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* 'fsl_frdm_k64f' platform.
*/

#ifndef _PLATFORM__H_
#define _PLATFORM__H_
#ifndef _SOC__H_
#define _SOC__H_

#include <misc/util.h>

Expand Down Expand Up @@ -163,4 +163,4 @@

#endif /* !_ASMLANGUAGE */

#endif /* _PLATFORM__H_ */
#endif /* _SOC__H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <nanokernel.h>

#include "platform.h"
#include "soc.h"

#ifdef CONFIG_UART_K20
#include <uart.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define _ASMLANGUAGE

#include <platform.h>
#include <soc.h>
#include <toolchain.h>
#include <sections.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# limitations under the License.
#

if PLATFORM_TI_LM3S6965
config PLATFORM
if SOC_TI_LM3S6965
config SOC
default ti_lm3s6965

config NUM_IRQ_PRIO_BITS
Expand All @@ -30,7 +30,7 @@ config NUM_IRQS
# - include the UART interrupts
default 34

config PLATFORM_TI_LM3S6965_QEMU
config SOC_TI_LM3S6965_QEMU
def_bool y
# Platform has only been tested on QEMU, not on real hardware, so always
# assume it is used for a QEMU target.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

config PLATFORM_TI_LM3S6965
config SOC_TI_LM3S6965
bool "TI LM3S6965"
select CPU_CORTEX_M
select CPU_CORTEX_M3
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/soc/ti_lm3s6965/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
obj-y += soc_config.o
obj-y += soc.o
obj-y += nmi_on_reset.o
obj-y += scp.o

obj-$(CONFIG_IRQ_VECTOR_TABLE_SOC) += irq_vector_table.o
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
#include <sections.h>

#if defined(CONFIG_CONSOLE_HANDLER)
#include <platform.h>
#include <soc.h>
#include <console/uart_console.h>
#endif /* CONFIG_CONSOLE_HANDLER */

#if defined(CONFIG_BLUETOOTH_UART)
#include <platform.h>
#include <soc.h>
#include <bluetooth/uart.h>
#endif /* CONFIG_BLUETOOTH_UART */

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <nanokernel.h>
#include <device.h>
#include <init.h>
#include <platform.h>
#include <soc.h>

#ifdef CONFIG_RUNTIME_NMI
extern void _NmiInit(void);
Expand Down
File renamed without changes.
Loading

0 comments on commit 10bb38c

Please sign in to comment.