Merge pull request #24 from brs332/master

Habanero Live VPD
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/habanero_defconfig
new file mode 100644
index 0000000..c979e18
--- /dev/null
+++ b/openpower/configs/habanero_defconfig
@@ -0,0 +1,51 @@
+BR2_powerpc64=y
+BR2_powerpc_power8=y
+BR2_OPENPOWER_PLATFORM=y
+
+BR2_OPENPOWER_CONFIG_NAME="habanero"
+BR2_HOSTBOOT_CONFIG_FILE="habanero.config"
+
+BR2_HOSTBOOT_BINARY_SBE_FILENAME="venice_sbe.img.ecc"
+BR2_HOSTBOOT_BINARY_SBEC_FILENAME="centaur_sbec_pad.img.ecc"
+
+BR2_OPENPOWER_TARGETING_SYSTEM_XML_FILENAME="HABANERO_hb.system.xml"
+BR2_OPENPOWER_TARGETING_MRW_XML_FILENAME="HABANERO_hb.mrw.xml"
+BR2_OPENPOWER_TARGETING_BIN_FILENAME="HABANERO_HB.targeting.bin"
+BR2_OPENPOWER_TARGETING_ECC_FILENAME="HABANERO_HB.targeting.bin.ecc"
+
+BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME="HabaneroPnorLayout.xml"
+BR2_OPENPOWER_PNOR_FILENAME="habanero.pnor"
+
+# skiboot requirements
+BR2_TARGET_SKIBOOT=y
+BR2_TARGET_SKIBOOT_EMBED_PAYLOAD=y
+
+# petitboot requirements
+BR2_ENABLE_LOCALE_PURGE=y
+BR2_ENABLE_LOCALE_WHITELIST="C en_US"
+BR2_GENERATE_LOCALE="en_US.UTF-8"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
+BR2_ROOTFS_OVERLAY="overlay"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/open-power/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="c04097526152ef45ed87b4a89c5e52fc8f856d34"
+BR2_LINUX_KERNEL_USE_DEFCONFIG=y
+BR2_LINUX_KERNEL_DEFCONFIG="skiroot"
+BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
+BR2_PACKAGE_LINUX_FIRMWARE_CXGB4=y
+BR2_PACKAGE_I2C_TOOLS=y
+BR2_PACKAGE_NCURSES_WCHAR=y
+BR2_PACKAGE_DROPBEAR=y
+# BR2_PACKAGE_DROPBEAR_SERVER is not set
+BR2_PACKAGE_ETHTOOL=y
+BR2_PACKAGE_NETCAT=y
+BR2_PACKAGE_RSYNC=y
+BR2_PACKAGE_PETITBOOT=y
+BR2_PACKAGE_IPMITOOL=y
+BR2_TARGET_ROOTFS_CPIO_XZ=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
diff --git a/openpower/configs/hostboot/habanero.config b/openpower/configs/hostboot/habanero.config
new file mode 100755
index 0000000..d68c6c9
--- /dev/null
+++ b/openpower/configs/hostboot/habanero.config
@@ -0,0 +1,35 @@
+# The Serial Flash Controller is the AST2400 BMC.
+set   SFC_IS_AST2400
+set   BMC_DOES_SFC_INIT
+unset SFC_IS_IBM_DPSS
+set   ALLOW_MICRON_PNOR
+set   ALLOW_MACRONIX_PNOR
+
+# VPD options.
+set MVPD_READ_FROM_HW
+unset MVPD_READ_FROM_PNOR
+set DJVPD_READ_FROM_HW
+unset DJVPD_READ_FROM_PNOR
+set CVPD_READ_FROM_HW
+#set CVPD_WRITE_TO_HW
+unset CVPD_READ_FROM_PNOR
+set SKIP_RESTRICT_EX_UNITS
+
+# gpio config
+set GPIODD
+set PALMETTO_VDDR
+
+# disable sbe updates
+set NO_SBE_UPDATES
+
+unset PCIE_HOTPLUG_CONTROLLER
+
+# turn on console output
+set CONSOLE
+set CONSOLE_AST2400
+
+# Enable Kingston dimm voltage workaround
+set KINGSTON_1_35_VOLT
+
+set NO_DMI_EREPAIR
+set DISABLE_HOSTBOOT_RUNTIME
diff --git a/openpower/package/hostboot/hostboot-0002-Changes-for-Habanero-bringup-uart-delay-and-centaur.patch b/openpower/package/hostboot/hostboot-0002-Changes-for-Habanero-bringup-uart-delay-and-centaur.patch
new file mode 100644
index 0000000..8a7d93c
--- /dev/null
+++ b/openpower/package/hostboot/hostboot-0002-Changes-for-Habanero-bringup-uart-delay-and-centaur.patch
@@ -0,0 +1,64 @@
+From 0c69e87e86e62253bc5a33cadf41e3d5f80971f0 Mon Sep 17 00:00:00 2001
+From: Brian Silver <bsilver@us.ibm.com>
+Date: Wed, 5 Nov 2014 14:16:36 -0600
+Subject: [PATCH] Changes for Habanero bringup, uart delay and centaur/vddr
+
+Change-Id: I381732be6facd25fb27bbd1f8ac0d75eb5b4980e
+---
+ src/usr/console/uart.C                         |  2 +-
+ src/usr/hwpf/hwp/dram_training/palmetto_vddr.C | 18 +++++++++++++-----
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/src/usr/console/uart.C b/src/usr/console/uart.C
+index 385a05c..a269168 100644
+--- a/src/usr/console/uart.C
++++ b/src/usr/console/uart.C
+@@ -116,7 +116,7 @@ namespace CONSOLE
+             // Wait for transmit FIFO to have space.
+             {
+                 const uint64_t DELAY_NS = 100;
+-                const uint64_t DELAY_LOOPS = 10000;
++                const uint64_t DELAY_LOOPS = 1000000;
+ 
+                 uint8_t data = 0;
+                 uint64_t loops = 0;
+diff --git a/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C b/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C
+index 5286d26..9642a36 100644
+--- a/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C
++++ b/src/usr/hwpf/hwp/dram_training/palmetto_vddr.C
+@@ -88,19 +88,27 @@ static errlHndl_t for_each_centaur(errlHndl_t (*func)(Target *))
+ 
+     errlHndl_t l_err = NULL;
+ 
+-    for (TargetHandleList::iterator
+-            l_membuf_iter = l_membufTargetList.begin();
+-            l_membuf_iter != l_membufTargetList.end();
+-            ++l_membuf_iter)
++    for (TargetHandleList::iterator l_membuf_iter = l_membufTargetList.begin();
++         l_membuf_iter != l_membufTargetList.end();
++         ++l_membuf_iter)
+     {
+         Target* l_pCentaur = *l_membuf_iter;
+ 
+-        l_err = (*func)(l_pCentaur);
++        TRACFCOMP(g_trac_vddr, "Performing VDDR for %x", l_pCentaur->getAttr<ATTR_HUID>());
++        if (2 == l_pCentaur->getAttr<ATTR_FSI_MASTER_PORT>())
++        {
++            l_err = (*func)(l_pCentaur);
++        }
++        else
++        {
++            TRACFCOMP(g_trac_vddr, "Skipped VDDR");
++        }
+ 
+         if( l_err )
+         {
+             break;
+         }
++        TRACFCOMP(g_trac_vddr, "No error in VDDR.");
+     }
+ 
+     return l_err;
+-- 
+1.9.1
+
diff --git a/openpower/package/hostboot/hostboot.mk b/openpower/package/hostboot/hostboot.mk
index 26491ac..5bc18cb 100644
--- a/openpower/package/hostboot/hostboot.mk
+++ b/openpower/package/hostboot/hostboot.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-HOSTBOOT_VERSION ?= 5dccc9bcd198b69cb33fc824a6a721ab1e88ff36
+HOSTBOOT_VERSION ?= 6c5f08212c150d69a931fa4fa1354b6a3aac61e8
 HOSTBOOT_SITE ?= $(call github,open-power,hostboot,$(HOSTBOOT_VERSION))
 HOSTBOOT_LICENSE = Apache-2.0
 HOSTBOOT_DEPENDENCIES = host-binutils
diff --git a/openpower/package/openpower-pnor/openpower-pnor.mk b/openpower/package/openpower-pnor/openpower-pnor.mk
index bea360c..adff008 100644
--- a/openpower/package/openpower-pnor/openpower-pnor.mk
+++ b/openpower/package/openpower-pnor/openpower-pnor.mk
@@ -4,7 +4,8 @@
 #
 ################################################################################
 
-OPENPOWER_PNOR_VERSION ?= aa4f2ef89ed6b0e12cbadc076f2e748fe7c2a3bc
+
+OPENPOWER_PNOR_VERSION ?= 121e1ff744eb87b2bcfa277f5eb10511fd78019e
 OPENPOWER_PNOR_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_VERSION))
 OPENPOWER_PNOR_LICENSE = Apache-2.0
 OPENPOWER_PNOR_DEPENDENCIES = hostboot hostboot-binaries openpower-targeting skiboot host-openpower-ffs
@@ -19,13 +20,15 @@
 
 define OPENPOWER_PNOR_INSTALL_IMAGES_CMDS
         mkdir -p $(OPENPOWER_PNOR_SCRATCH_DIR)
-        $(TARGET_MAKE_ENV) $(@D)/update_image_$(BR2_OPENPOWER_CONFIG_NAME).pl \
+        $(TARGET_MAKE_ENV) $(@D)/update_image.pl \
             -op_target_dir $(STAGING_DIR)/openpower_targeting/ \
             -hb_image_dir $(HOSTBOOT_IMAGE_DIR) \
             -scratch_dir $(OPENPOWER_PNOR_SCRATCH_DIR) \
             -hb_binary_dir $(HOSTBOOT_BINARY_DIR) \
             -targeting_binary_filename $(BR2_OPENPOWER_TARGETING_ECC_FILENAME) \
-            -targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME)
+            -targeting_binary_source $(BR2_OPENPOWER_TARGETING_BIN_FILENAME) \
+            -sbe_binary_filename $(BR2_HOSTBOOT_BINARY_SBE_FILENAME) \
+            -sbec_binary_filename $(BR2_HOSTBOOT_BINARY_SBEC_FILENAME)
 
         mkdir -p $(STAGING_DIR)/pnor/
         $(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl \
diff --git a/openpower/package/openpower-targeting/openpower-targeting.mk b/openpower/package/openpower-targeting/openpower-targeting.mk
index 1c333bf..78e21e0 100644
--- a/openpower/package/openpower-targeting/openpower-targeting.mk
+++ b/openpower/package/openpower-targeting/openpower-targeting.mk
@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-OPENPOWER_TARGETING_VERSION ?= 2edcd0986d27a35910bee8718eb28f4bb7df496e
+OPENPOWER_TARGETING_VERSION ?= 958009410a875d8b259c39a97a057126f25e1881
 OPENPOWER_TARGETING_SITE ?= $(call github,open-power,hostboot-targeting,$(OPENPOWER_TARGETING_VERSION))
+
 OPENPOWER_TARGETING_LICENSE = Apache-2.0
 OPENPOWER_TARGETING_DEPENDENCIES = hostboot-install-images