OCC: Add ability to have OP920 version

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
diff --git a/openpower/configs/p9dsu_dev_defconfig b/openpower/configs/p9dsu_dev_defconfig
index c41b21b..4efeb98 100644
--- a/openpower/configs/p9dsu_dev_defconfig
+++ b/openpower/configs/p9dsu_dev_defconfig
@@ -61,6 +61,7 @@
 BR2_PACKAGE_PETITBOOT=y
 BR2_PACKAGE_PETITBOOT_MTD=y
 BR2_HCODE_LATEST_VERSION=y
+BR2_OCC_LATEST_VERSION=y
 BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
 BR2_PACKAGE_LOADKEYS=y
 BR2_IMA_CATALOG_DTS="POWER9"
diff --git a/openpower/configs/witherspoon_dev_defconfig b/openpower/configs/witherspoon_dev_defconfig
index ddbe7a9..dbebdae 100644
--- a/openpower/configs/witherspoon_dev_defconfig
+++ b/openpower/configs/witherspoon_dev_defconfig
@@ -61,6 +61,7 @@
 BR2_PACKAGE_PETITBOOT_MTD=y
 BR2_HCODE_LATEST_VERSION=y
 BR2_OCC_GPU_BIN_BUILD=y
+BR2_OCC_LATEST_VERSION=y
 BR2_CAPP_UCODE_BIN_FILENAME="cappucode.bin"
 BR2_PACKAGE_LOADKEYS=y
 BR2_IMA_CATALOG_DTS="POWER9"
diff --git a/openpower/package/occ/Config.in b/openpower/package/occ/Config.in
index 2512e24..aa363ee 100644
--- a/openpower/package/occ/Config.in
+++ b/openpower/package/occ/Config.in
@@ -25,5 +25,31 @@
         help
             String used to define name of the OCC GPUE GPE binary image file
 
+choice
+	prompt "OCC version"
+	default BR2_OCC_OP920_VERSION
+
+config BR2_OCC_OP920_VERSION
+	bool "Use latest OCC stable version (OP920)"
+
+config BR2_OCC_LATEST_VERSION
+	bool "Use latest OCC master"
+
+config BR2_OCC_CUSTOM_VERSION
+	bool "Custom OCC version"
+
+endchoice
+
+config BR2_OCC_CUSTOM_VERSION_VALUE
+	string "OCC version"
+	depends on BR2_OCC_CUSTOM_VERSION
+
+config BR2_OCC_VERSION
+	string
+	default "cd30b100eee09956a27b69f7893349451400e5ba" if BR2_OCC_LATEST_VERSION
+	default "cd30b100eee09956a27b69f7893349451400e5ba" if BR2_OCC_OP920_VERSION
+	default BR2_OCC_CUSTOM_VERSION_VALUE \
+		if BR2_OCC_CUSTOM_VERSION
+
 endif
 
diff --git a/openpower/package/occ/occ.mk b/openpower/package/occ/occ.mk
index f6b27cf..39ad15e 100644
--- a/openpower/package/occ/occ.mk
+++ b/openpower/package/occ/occ.mk
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-OCC_VERSION ?= cd30b100eee09956a27b69f7893349451400e5ba
+OCC_VERSION = $(call qstrip,$(BR2_OCC_VERSION))
+OCC_SITE = $(call github,open-power,occ,$(OCC_VERSION))
 
-OCC_SITE ?= $(call github,open-power,occ,$(OCC_VERSION))
 OCC_LICENSE = Apache-2.0
 
 OCC_LICENSE_FILES = LICENSE