arch: add support for the csky architecture
authorGuo Ren <ren_guo@c-sky.com>
Fri, 3 Mar 2017 01:20:20 +0000 (09:20 +0800)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 4 Mar 2017 13:35:55 +0000 (14:35 +0100)
This commit provides basic support for the C-SKY architecture.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
[Thomas: minor tweaks.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
DEVELOPERS
arch/Config.in
arch/Config.in.csky [new file with mode: 0644]
toolchain/Config.in

index 678a9a9c7769125fb53dfcb83f1ac5d4ec50374d..361f902fe558525a9c7707adbd8a7baf2b53ce44 100644 (file)
@@ -593,6 +593,9 @@ F:  package/sdl2/
 N:     Guillaume William Brs <guillaume.bressaix@gmail.com>
 F:     package/liquid-dsp/
 
+N:     Guo Ren <ren_guo@c-sky.com>
+F:     arch/Config.in.csky
+
 N:     Gustavo Zacarias <gustavo@zacarias.com.ar>
 F:     arch/Config.in.powerpc
 F:     board/qemu/
index 7149b2cb31ae5c37bee59a04e9d6e221921417f2..65a33fbb64aee2a45a7ad2525c37b7755e25fe8c 100644 (file)
@@ -85,6 +85,14 @@ config BR2_bfin
          http://www.analog.com/
          http://en.wikipedia.org/wiki/Blackfin
 
+config BR2_csky
+       bool "csky"
+       select BR2_ARCH_HAS_MMU_MANDATORY
+       help
+         csky is processor IP from china.
+         http://www.c-sky.com/
+         http://www.github.com/c-sky
+
 config BR2_i386
        bool "i386"
        select BR2_ARCH_HAS_MMU_MANDATORY
@@ -369,6 +377,10 @@ if BR2_bfin
 source "arch/Config.in.bfin"
 endif
 
+if BR2_csky
+source "arch/Config.in.csky"
+endif
+
 if BR2_m68k
 source "arch/Config.in.m68k"
 endif
diff --git a/arch/Config.in.csky b/arch/Config.in.csky
new file mode 100644 (file)
index 0000000..7029c60
--- /dev/null
@@ -0,0 +1,46 @@
+choice
+       prompt "Target Architecture Variant"
+       default BR2_ck610
+       help
+         Specific CPU variant to use
+
+config BR2_ck610
+       bool "ck610"
+
+config BR2_ck807
+       bool "ck807"
+
+config BR2_ck810
+       bool "ck810"
+
+endchoice
+
+config BR2_CSKY_FPU
+       bool "Enable FPU coprocessor"
+       depends on BR2_ck810 || BR2_ck807
+       help
+         You can say N here if your C-SKY CPU doesn't have a
+         Floating-Point Coprocessor or if you don't need FPU support
+         for your user-space programs.
+
+config BR2_CSKY_DSP
+       bool "Enable DSP enhanced instructions"
+       depends on BR2_ck810 || BR2_ck807
+
+config BR2_ARCH
+       default "csky"
+
+config BR2_ENDIAN
+       default "LITTLE"
+
+config BR2_GCC_TARGET_CPU
+       default "ck610"         if (BR2_ck610 && !BR2_CSKY_FPU && !BR2_CSKY_DSP)
+       default "ck807"         if (BR2_ck807 && !BR2_CSKY_FPU && !BR2_CSKY_DSP)
+       default "ck807e"        if (BR2_ck807 && !BR2_CSKY_FPU &&  BR2_CSKY_DSP)
+       default "ck807f"        if (BR2_ck807 &&  BR2_CSKY_FPU && !BR2_CSKY_DSP)
+       default "ck807ef"       if (BR2_ck807 &&  BR2_CSKY_FPU &&  BR2_CSKY_DSP)
+       default "ck810"         if (BR2_ck810 && !BR2_CSKY_FPU && !BR2_CSKY_DSP)
+       default "ck810e"        if (BR2_ck810 && !BR2_CSKY_FPU &&  BR2_CSKY_DSP)
+       default "ck810f"        if (BR2_ck810 &&  BR2_CSKY_FPU && !BR2_CSKY_DSP)
+       default "ck810ef"       if (BR2_ck810 &&  BR2_CSKY_FPU &&  BR2_CSKY_DSP)
+
index de01585670fe389c504bd2d8231e1705029d6f4f..652c9d8c1df416d576b0f09ac914a86037fc5c6c 100644 (file)
@@ -46,6 +46,7 @@ config BR2_TOOLCHAIN_BUILDROOT
        depends on !BR2_bf607
        depends on !BR2_bf608
        depends on !BR2_bf609
+       depends on !BR2_csky
 
 config BR2_TOOLCHAIN_EXTERNAL
        bool "External toolchain"