boot: Add cc310 options to CMakeLists, Kconfig and mcuboot config

Adds `CC310` define which wraps the generic CC310 interface adds
includes for using `NRF_CC310_BL` to CMakeLists. This requires `nrfxlib`
to be located outside of the mcuboot folder by 1 directory level. Also
add the Kconfig defines needed for this to build while trying to make it
generic enough to be used by other vendors that have implemented
`CC310`.

Signed-off-by: Sigvart Hovland <sigvart.m@gmail.com>
diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig
index b44ca68..ac0176d 100644
--- a/boot/zephyr/Kconfig
+++ b/boot/zephyr/Kconfig
@@ -44,6 +44,29 @@
 	help
 	  Use TinyCrypt for crypto primitives.
 
+config BOOT_USE_CC310
+	bool
+	# Hidden option
+	default n
+	# When building for ECDSA, we use our own copy of mbedTLS, so the
+	# Zephyr one must not be enabled or the MBEDTLS_CONFIG_FILE macros
+	# will collide.
+	depends on ! MBEDTLS
+	help
+	  Use cc310 for crypto primitives.
+
+config BOOT_USE_NRF_CC310_BL
+	bool
+	default n
+
+config NRFXLIB_CRYPTO
+	bool
+	default n
+
+config NRF_CC310_BL
+	bool
+	default n
+
 menu "MCUBoot settings"
 
 choice
@@ -57,8 +80,22 @@
 
 config BOOT_SIGNATURE_TYPE_ECDSA_P256
 	bool "Elliptic curve digital signatures with curve P-256"
-	select BOOT_USE_TINYCRYPT
 
+if BOOT_SIGNATURE_TYPE_ECDSA_P256
+choice
+	prompt "Ecdsa implementation"
+	default BOOT_TINYCRYPT
+config BOOT_TINYCRYPT
+	bool "Use tinycrypt"
+	select BOOT_USE_TINYCRYPT
+config BOOT_CC310
+	bool "Use CC310"
+	select BOOT_USE_NRF_CC310_BL if HAS_HW_NRF_CC310
+	select NRF_CC310_BL if HAS_HW_NRF_CC310
+	select NRFXLIB_CRYPTO if SOC_FAMILY_NRF
+	select BOOT_USE_CC310
+endchoice
+endif
 endchoice
 
 config BOOT_SIGNATURE_KEY_FILE