nuvoton: move npcm7xx support into meta-nuvoton layer

Move support for the npcm7xx SOCs directly into the meta-nuvoton BSP
layer. This matches the layout for other chip vendors' BSPs.

Change-Id: I47ac7a5b02cf87f6dd60d0f6fba2463c18e9fdf1
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/README.md b/meta-openbmc-bsp/meta-nuvoton/README.md
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/README.md
rename to meta-openbmc-bsp/meta-nuvoton/README.md
diff --git a/meta-openbmc-bsp/meta-nuvoton/conf/layer.conf b/meta-openbmc-bsp/meta-nuvoton/conf/layer.conf
index 62d1a53..1fefedb 100644
--- a/meta-openbmc-bsp/meta-nuvoton/conf/layer.conf
+++ b/meta-openbmc-bsp/meta-nuvoton/conf/layer.conf
@@ -1,9 +1,9 @@
 # We have a conf and classes directory, add to BBPATH
 BBPATH .= ":${LAYERDIR}"
 
-BBFILES += "${LAYERDIR}/common/recipes-*/*/*.bb \
-            ${LAYERDIR}/common/recipes-*/*/*.bbappend"
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+            ${LAYERDIR}/recipes-*/*/*.bbappend"
 
-BBFILE_COLLECTIONS += "nuvoton"
-BBFILE_PATTERN_nuvoton = ""
-LAYERVERSION_nuvoton = "1"
+BBFILE_COLLECTIONS += "nuvoton-layer"
+BBFILE_PATTERN_nuvoton-layer = ""
+LAYERVERSION_nuvoton-layer = "1"
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/evb-npcm750.conf b/meta-openbmc-bsp/meta-nuvoton/conf/machine/evb-npcm750.conf
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/evb-npcm750.conf
rename to meta-openbmc-bsp/meta-nuvoton/conf/machine/evb-npcm750.conf
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/npcm7xx.inc b/meta-openbmc-bsp/meta-nuvoton/conf/machine/include/npcm7xx.inc
similarity index 69%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/npcm7xx.inc
rename to meta-openbmc-bsp/meta-nuvoton/conf/machine/include/npcm7xx.inc
index e2fd260..3d8847d 100644
--- a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/npcm7xx.inc
+++ b/meta-openbmc-bsp/meta-nuvoton/conf/machine/include/npcm7xx.inc
@@ -2,13 +2,11 @@
 #@NAME: Nuvoton NPCM7XX
 #@DESCRIPTION: Common machine configuration for Nuvoton NPCM7XX Chip
 
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-nuvoton"
+require conf/machine/include/nuvoton.inc
+
 KERNEL_IMAGETYPE ?= "uImage"
 KERNEL_EXTRA_ARGS ?= "UIMAGE_LOADADDR=0x00008000"
 
-PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-nuvoton"
-PREFERRED_PROVIDER_u-boot ?= "u-boot-nuvoton"
-PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-nuvoton"
 UBOOT_MACHINE ?= "PolegSVB_config"
 UBOOT_ENTRYPOINT ?= "0x00008000"
 UBOOT_LOADADDRESS ?= "0x00008000"
diff --git a/meta-openbmc-bsp/meta-nuvoton/conf/machine/include/nuvoton.inc b/meta-openbmc-bsp/meta-nuvoton/conf/machine/include/nuvoton.inc
new file mode 100644
index 0000000..068fe35
--- /dev/null
+++ b/meta-openbmc-bsp/meta-nuvoton/conf/machine/include/nuvoton.inc
@@ -0,0 +1,6 @@
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-nuvoton"
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-nuvoton"
+PREFERRED_PROVIDER_u-boot ?= "u-boot-nuvoton"
+PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-nuvoton"
+
+MACHINEOVERRIDES .= ":nuvoton"
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/tune-arm7a-novfp.inc b/meta-openbmc-bsp/meta-nuvoton/conf/machine/include/tune-arm7a-novfp.inc
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/machine/include/tune-arm7a-novfp.inc
rename to meta-openbmc-bsp/meta-nuvoton/conf/machine/include/tune-arm7a-novfp.inc
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/layer.conf b/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/layer.conf
deleted file mode 100644
index 1bc7e6a..0000000
--- a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/conf/layer.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH .= ":${LAYERDIR}"
-
-# We have recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-            ${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_PATTERN_npcm7xx = "^${LAYERDIR}/"
-BBFILE_COLLECTIONS += "npcm7xx"
-LAYERVERSION_npcm7xx = "1"
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb b/meta-openbmc-bsp/meta-nuvoton/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb
rename to meta-openbmc-bsp/meta-nuvoton/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-bsp/u-boot/u-boot-nuvoton_git.bb b/meta-openbmc-bsp/meta-nuvoton/recipes-bsp/u-boot/u-boot-nuvoton_git.bb
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-bsp/u-boot/u-boot-nuvoton_git.bb
rename to meta-openbmc-bsp/meta-nuvoton/recipes-bsp/u-boot/u-boot-nuvoton_git.bb
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton.inc b/meta-openbmc-bsp/meta-nuvoton/recipes-kernel/linux/linux-nuvoton.inc
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton.inc
rename to meta-openbmc-bsp/meta-nuvoton/recipes-kernel/linux/linux-nuvoton.inc
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton/defconfig b/meta-openbmc-bsp/meta-nuvoton/recipes-kernel/linux/linux-nuvoton/defconfig
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton/defconfig
rename to meta-openbmc-bsp/meta-nuvoton/recipes-kernel/linux/linux-nuvoton/defconfig
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton_git.bb b/meta-openbmc-bsp/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes-kernel/linux/linux-nuvoton_git.bb
rename to meta-openbmc-bsp/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb
diff --git a/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes.txt b/meta-openbmc-bsp/meta-nuvoton/recipes.txt
similarity index 100%
rename from meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx/recipes.txt
rename to meta-openbmc-bsp/meta-nuvoton/recipes.txt
diff --git a/meta-openbmc-machines/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample b/meta-openbmc-machines/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample
index 6298c5d..fa35e4d 100644
--- a/meta-openbmc-machines/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample
+++ b/meta-openbmc-machines/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample
@@ -14,7 +14,6 @@
   ##OEROOT##/import-layers/meta-virtualization \
   ##OEROOT##/meta-phosphor \
   ##OEROOT##/meta-openbmc-bsp/meta-nuvoton \
-  ##OEROOT##/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx \
   ##OEROOT##/meta-openbmc-machines/meta-evb \
   ##OEROOT##/meta-openbmc-machines/meta-evb/meta-evb-nuvoton \
   ##OEROOT##/meta-openbmc-machines/meta-evb/meta-evb-nuvoton/meta-evb-npcm750 \
@@ -28,7 +27,6 @@
   ##OEROOT##/import-layers/meta-virtualization \
   ##OEROOT##/meta-phosphor \
   ##OEROOT##/meta-openbmc-bsp/meta-nuvoton \
-  ##OEROOT##/meta-openbmc-bsp/meta-nuvoton/meta-npcm7xx \
   ##OEROOT##/meta-openbmc-machines/meta-evb \
   ##OEROOT##/meta-openbmc-machines/meta-evb/meta-evb-nuvoton \
   ##OEROOT##/meta-openbmc-machines/meta-evb/meta-evb-nuvoton/meta-evb-npcm750 \