Merge pull request #921 from shenki/linux-4.10.3

Release Linux 4.10.3-openpower1
diff --git a/openpower/configs/barreleye_defconfig b/openpower/configs/barreleye_defconfig
index 63c7d38..fe06069 100644
--- a/openpower/configs/barreleye_defconfig
+++ b/openpower/configs/barreleye_defconfig
@@ -16,7 +16,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/firenze_defconfig b/openpower/configs/firenze_defconfig
index 39a6fc5..49360e6 100644
--- a/openpower/configs/firenze_defconfig
+++ b/openpower/configs/firenze_defconfig
@@ -15,7 +15,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/firestone_defconfig b/openpower/configs/firestone_defconfig
index c5bbef8..93de9af 100644
--- a/openpower/configs/firestone_defconfig
+++ b/openpower/configs/firestone_defconfig
@@ -16,7 +16,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/garrison_defconfig b/openpower/configs/garrison_defconfig
index 09ca66b..3ffcc92 100644
--- a/openpower/configs/garrison_defconfig
+++ b/openpower/configs/garrison_defconfig
@@ -16,7 +16,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/habanero_defconfig
index 0951980..f198f64 100644
--- a/openpower/configs/habanero_defconfig
+++ b/openpower/configs/habanero_defconfig
@@ -16,7 +16,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/openpower_mambo_defconfig b/openpower/configs/openpower_mambo_defconfig
index e420017..8aa9704 100644
--- a/openpower/configs/openpower_mambo_defconfig
+++ b/openpower/configs/openpower_mambo_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/openpower_p9_mambo_defconfig b/openpower/configs/openpower_p9_mambo_defconfig
index a74325b..b8fb374 100644
--- a/openpower/configs/openpower_p9_mambo_defconfig
+++ b/openpower/configs/openpower_p9_mambo_defconfig
@@ -14,7 +14,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
 BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/palmetto_defconfig b/openpower/configs/palmetto_defconfig
index 4bb4359..d71f68a 100644
--- a/openpower/configs/palmetto_defconfig
+++ b/openpower/configs/palmetto_defconfig
@@ -15,7 +15,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/romulus_defconfig b/openpower/configs/romulus_defconfig
index 40f70aa..60a1e4e 100644
--- a/openpower/configs/romulus_defconfig
+++ b/openpower/configs/romulus_defconfig
@@ -16,7 +16,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
 BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/witherspoon_defconfig b/openpower/configs/witherspoon_defconfig
index 44dba50..0e2f5d0 100644
--- a/openpower/configs/witherspoon_defconfig
+++ b/openpower/configs/witherspoon_defconfig
@@ -16,7 +16,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
 BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/zaius_defconfig b/openpower/configs/zaius_defconfig
index ecd3cdf..f2acc86 100644
--- a/openpower/configs/zaius_defconfig
+++ b/openpower/configs/zaius_defconfig
@@ -16,7 +16,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
 BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/zz_defconfig b/openpower/configs/zz_defconfig
index d0e8217..a74e63e 100644
--- a/openpower/configs/zz_defconfig
+++ b/openpower/configs/zz_defconfig
@@ -15,7 +15,7 @@
 BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.1"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.10.3"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
 BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/linux/0001-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch b/openpower/linux/0001-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch
index 97fe3f6..b6226cf 100644
--- a/openpower/linux/0001-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch
+++ b/openpower/linux/0001-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Thadeu Lima De Souza Cascardo <thadeul@br.ibm.com>
 Date: Tue, 25 Mar 2014 10:45:16 -0400
-Subject: [PATCH 01/15] xhci: Use xhci_pci_remove for xhci device shutdown
+Subject: [PATCH 01/12] xhci: Use xhci_pci_remove for xhci device shutdown
 
 Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
 Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/openpower/linux/0002-xhci-do-not-halt-the-secondary-HCD.patch b/openpower/linux/0002-xhci-do-not-halt-the-secondary-HCD.patch
index 44cb3f0..92c5a95 100644
--- a/openpower/linux/0002-xhci-do-not-halt-the-secondary-HCD.patch
+++ b/openpower/linux/0002-xhci-do-not-halt-the-secondary-HCD.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Joel Stanley <joel@jms.id.au>
 Date: Tue, 19 Jul 2016 22:43:26 +0930
-Subject: [PATCH 02/15] xhci: do not halt the secondary HCD
+Subject: [PATCH 02/12] xhci: do not halt the secondary HCD
 
 We can't halt the secondary HCD, because it's also the primary HCD,
 which will cause problems if we have devices attached to the primary
diff --git a/openpower/linux/0003-drm-ast-Fix-AST2400-POST-failure-without-BMC-FW-or-V.patch b/openpower/linux/0003-drm-ast-Fix-AST2400-POST-failure-without-BMC-FW-or-V.patch
deleted file mode 100644
index f988f8a..0000000
--- a/openpower/linux/0003-drm-ast-Fix-AST2400-POST-failure-without-BMC-FW-or-V.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Y.C. Chen" <yc_chen@aspeedtech.com>
-Date: Thu, 23 Feb 2017 15:52:33 +0800
-Subject: [PATCH 03/15] drm/ast: Fix AST2400 POST failure without BMC FW or
- VBIOS
-
-The current POST code for the AST2300/2400 family doesn't work properly
-if the chip hasn't been initialized previously by either the BMC own FW
-or the VBIOS. This fixes it.
-
-Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
-Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-Signed-off-by: Joel Stanley <joel@jms.id.au>
----
- drivers/gpu/drm/ast/ast_post.c | 38 +++++++++++++++++++++++++++++++++++---
- 1 file changed, 35 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index 5331ee1df086..6c5391cb90eb 100644
---- a/drivers/gpu/drm/ast/ast_post.c
-+++ b/drivers/gpu/drm/ast/ast_post.c
-@@ -1638,12 +1638,44 @@ static void ast_init_dram_2300(struct drm_device *dev)
- 		temp |= 0x73;
- 		ast_write32(ast, 0x12008, temp);
- 
-+		param.dram_freq = 396;
- 		param.dram_type = AST_DDR3;
-+		temp = ast_mindwm(ast, 0x1e6e2070);
- 		if (temp & 0x01000000)
- 			param.dram_type = AST_DDR2;
--		param.dram_chipid = ast->dram_type;
--		param.dram_freq = ast->mclk;
--		param.vram_size = ast->vram_size;
-+                switch (temp & 0x18000000) {
-+		case 0:
-+			param.dram_chipid = AST_DRAM_512Mx16;
-+			break;
-+		default:
-+		case 0x08000000:
-+			param.dram_chipid = AST_DRAM_1Gx16;
-+			break;
-+		case 0x10000000:
-+			param.dram_chipid = AST_DRAM_2Gx16;
-+			break;
-+		case 0x18000000:
-+			param.dram_chipid = AST_DRAM_4Gx16;
-+			break;
-+		}
-+                switch (temp & 0x0c) {
-+                default:
-+		case 0x00:
-+			param.vram_size = AST_VIDMEM_SIZE_8M;
-+			break;
-+
-+		case 0x04:
-+			param.vram_size = AST_VIDMEM_SIZE_16M;
-+			break;
-+
-+		case 0x08:
-+			param.vram_size = AST_VIDMEM_SIZE_32M;
-+			break;
-+
-+		case 0x0c:
-+			param.vram_size = AST_VIDMEM_SIZE_64M;
-+			break;
-+		}
- 
- 		if (param.dram_type == AST_DDR3) {
- 			get_ddr3_info(ast, &param);
--- 
-2.11.0
-
diff --git a/openpower/linux/0005-drm-ast-const-ify-mode-setting-tables.patch b/openpower/linux/0003-drm-ast-const-ify-mode-setting-tables.patch
similarity index 99%
rename from openpower/linux/0005-drm-ast-const-ify-mode-setting-tables.patch
rename to openpower/linux/0003-drm-ast-const-ify-mode-setting-tables.patch
index c14c5a3..c9670e5 100644
--- a/openpower/linux/0005-drm-ast-const-ify-mode-setting-tables.patch
+++ b/openpower/linux/0003-drm-ast-const-ify-mode-setting-tables.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
 Date: Fri, 17 Feb 2017 13:45:24 +1100
-Subject: [PATCH 05/15] drm/ast: const'ify mode setting tables
+Subject: [PATCH 03/12] drm/ast: const'ify mode setting tables
 
 And fix some comment alignment & space/tabs while at it
 
diff --git a/openpower/linux/0004-drm-ast-Handle-configuration-without-P2A-bridge.patch b/openpower/linux/0004-drm-ast-Handle-configuration-without-P2A-bridge.patch
deleted file mode 100644
index acc3fbd..0000000
--- a/openpower/linux/0004-drm-ast-Handle-configuration-without-P2A-bridge.patch
+++ /dev/null
@@ -1,434 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Russell Currey <ruscur@russell.cc>
-Date: Fri, 17 Feb 2017 14:33:01 +1100
-Subject: [PATCH 04/15] drm/ast: Handle configuration without P2A bridge
-
-The ast driver configures a window to enable access into BMC
-memory space in order to read some configuration registers.
-
-If this window is disabled, which it can be from the BMC side,
-the ast driver can't function.
-
-Closing this window is a necessity for security if a machine's
-host side and BMC side are controlled by different parties;
-i.e. a cloud provider offering machines "bare metal".
-
-A recent patch went in to try to check if that window is open
-but it does so by trying to access the registers in question
-and testing if the result is 0xffffffff.
-
-This method will trigger a PCIe error when the window is closed
-which on some systems will be fatal (it will trigger an EEH
-for example on POWER which will take out the device).
-
-This patch improves this in two ways:
-
- - First, if the firmware has put properties in the device-tree
-containing the relevant configuration information, we use these.
-
- - Otherwise, a bit in one of the SCU scratch registers (which
-are readable via the VGA register space and writeable by the BMC)
-will indicate if the BMC has closed the window. This bit has been
-defined by Y.C Chen from Aspeed.
-
-If the window is closed and the configuration isn't available from
-the device-tree, some sane defaults are used. Those defaults are
-hopefully sufficient for standard video modes used on a server.
-
-Signed-off-by: Russell Currey <ruscur@russell.cc>
-Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
-
-v2. [BenH]
-    - Reworked on top of Aspeed P2A patch
-    - Cleanup overall detection via a "config_mode" and log the
-      selected mode for diagnostics purposes
-    - Add a property for the SCU straps
-
-v3. [BenH]
-    - Moved the config mode detection to a separate functionn
-    - Add reading of SCU 0x40 D[12] to detect the window is
-      closed as to not trigger a bus error by just "trying".
-      (change provided by Y.C. Chen)
-v4. [BenH]
-    - Only devices with the AST2000 PCI ID have a P2A bridge
-    - Update the P2A presence test to account for VGA only
-      mode as provided by Y.C. Chen.
-v5. [BenH]
-    - Fixup prefix of OF properties based on Joel Stanley
-      review comments.
-
-Signed-off-by: Joel Stanley <joel@jms.id.au>
----
- drivers/gpu/drm/ast/ast_drv.h  |   6 +-
- drivers/gpu/drm/ast/ast_main.c | 264 +++++++++++++++++++++++++----------------
- drivers/gpu/drm/ast/ast_post.c |   7 +-
- 3 files changed, 168 insertions(+), 109 deletions(-)
-
-diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
-index 7abda94fc2cf..3bedcf7ddd2a 100644
---- a/drivers/gpu/drm/ast/ast_drv.h
-+++ b/drivers/gpu/drm/ast/ast_drv.h
-@@ -113,7 +113,11 @@ struct ast_private {
- 	struct ttm_bo_kmap_obj cache_kmap;
- 	int next_cursor;
- 	bool support_wide_screen;
--	bool DisableP2A;
-+	enum {
-+		ast_use_p2a,
-+		ast_use_dt,
-+		ast_use_defaults
-+	} config_mode;
- 
- 	enum ast_tx_chip tx_chip_type;
- 	u8 dp501_maxclk;
-diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
-index 533e762d036d..fb9976254224 100644
---- a/drivers/gpu/drm/ast/ast_main.c
-+++ b/drivers/gpu/drm/ast/ast_main.c
-@@ -62,13 +62,84 @@ uint8_t ast_get_index_reg_mask(struct ast_private *ast,
- 	return ret;
- }
- 
-+static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev)
-+{
-+	struct device_node *np = dev->pdev->dev.of_node;
-+	struct ast_private *ast = dev->dev_private;
-+	uint32_t data, jregd0, jregd1;
-+
-+	/* Defaults */
-+	ast->config_mode = ast_use_defaults;
-+	*scu_rev = 0xffffffff;
-+
-+	/* Check if we have device-tree properties */
-+	if (np && !of_property_read_u32(np, "aspeed,scu-revision-id",
-+					scu_rev)) {
-+		/* We do, disable P2A access */
-+		ast->config_mode = ast_use_dt;
-+		DRM_INFO("Using device-tree for configuration\n");
-+		return;
-+	}
-+
-+	/* Not all families have a P2A bridge */
-+	if (dev->pdev->device != PCI_CHIP_AST2000)
-+		return;
-+
-+	/*
-+	 * The BMC will set SCU 0x40 D[12] to 1 if the P2 bridge
-+	 * is disabled. We force using P2A if VGA only mode bit
-+	 * is set D[7]
-+	 */
-+	jregd0 = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd0, 0xff);
-+	jregd1 = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff);
-+	if (!(jregd0 & 0x80) || !(jregd1 & 0x10)) {
-+		/* Double check it's actually working */
-+		data = ast_read32(ast, 0xf004);
-+		if (data != 0xFFFFFFFF) {
-+			/* P2A works, grab silicon revision */
-+			ast->config_mode = ast_use_p2a;
-+
-+			DRM_INFO("Using P2A bridge for configuration\n");
-+
-+			/* Read SCU7c (silicon revision register) */
-+			ast_write32(ast, 0xf004, 0x1e6e0000);
-+			ast_write32(ast, 0xf000, 0x1);
-+			*scu_rev = ast_read32(ast, 0x1207c);
-+			return;
-+		}
-+	}
-+
-+	/* We have a P2A bridge but it's disabled */
-+	DRM_INFO("P2A bridge disabled, using default configuration\n");
-+}
- 
- static int ast_detect_chip(struct drm_device *dev, bool *need_post)
- {
- 	struct ast_private *ast = dev->dev_private;
--	uint32_t data, jreg;
-+	uint32_t jreg, scu_rev;
-+
-+	/*
-+	 * If VGA isn't enabled, we need to enable now or subsequent
-+	 * access to the scratch registers will fail. We also inform
-+	 * our caller that it needs to POST the chip
-+	 * (Assumption: VGA not enabled -> need to POST)
-+	 */
-+	if (!ast_is_vga_enabled(dev)) {
-+		ast_enable_vga(dev);
-+		DRM_INFO("VGA not enabled on entry, requesting chip POST\n");
-+		*need_post = true;
-+	} else
-+		*need_post = false;
-+
-+
-+	/* Enable extended register access */
-+	ast_enable_mmio(dev);
- 	ast_open_key(ast);
- 
-+	/* Find out whether P2A works or whether to use device-tree */
-+	ast_detect_config_mode(dev, &scu_rev);
-+
-+	/* Identify chipset */
- 	if (dev->pdev->device == PCI_CHIP_AST1180) {
- 		ast->chip = AST1100;
- 		DRM_INFO("AST 1180 detected\n");
-@@ -80,12 +151,7 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
- 			ast->chip = AST2300;
- 			DRM_INFO("AST 2300 detected\n");
- 		} else if (dev->pdev->revision >= 0x10) {
--			uint32_t data;
--			ast_write32(ast, 0xf004, 0x1e6e0000);
--			ast_write32(ast, 0xf000, 0x1);
--
--			data = ast_read32(ast, 0x1207c);
--			switch (data & 0x0300) {
-+			switch (scu_rev & 0x0300) {
- 			case 0x0200:
- 				ast->chip = AST1100;
- 				DRM_INFO("AST 1100 detected\n");
-@@ -110,26 +176,6 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
- 		}
- 	}
- 
--	/*
--	 * If VGA isn't enabled, we need to enable now or subsequent
--	 * access to the scratch registers will fail. We also inform
--	 * our caller that it needs to POST the chip
--	 * (Assumption: VGA not enabled -> need to POST)
--	 */
--	if (!ast_is_vga_enabled(dev)) {
--		ast_enable_vga(dev);
--		ast_enable_mmio(dev);
--		DRM_INFO("VGA not enabled on entry, requesting chip POST\n");
--		*need_post = true;
--	} else
--		*need_post = false;
--
--	/* Check P2A Access */
--	ast->DisableP2A = true;
--	data = ast_read32(ast, 0xf004);
--	if (data != 0xFFFFFFFF)
--		ast->DisableP2A = false;
--
- 	/* Check if we support wide screen */
- 	switch (ast->chip) {
- 	case AST1180:
-@@ -146,17 +192,12 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
- 			ast->support_wide_screen = true;
- 		else {
- 			ast->support_wide_screen = false;
--			if (ast->DisableP2A == false) {
--				/* Read SCU7c (silicon revision register) */
--				ast_write32(ast, 0xf004, 0x1e6e0000);
--				ast_write32(ast, 0xf000, 0x1);
--				data = ast_read32(ast, 0x1207c);
--				data &= 0x300;
--				if (ast->chip == AST2300 && data == 0x0) /* ast1300 */
--					ast->support_wide_screen = true;
--				if (ast->chip == AST2400 && data == 0x100) /* ast1400 */
--					ast->support_wide_screen = true;
--			}
-+			if (ast->chip == AST2300 &&
-+			    (scu_rev & 0x300) == 0x0) /* ast1300 */
-+				ast->support_wide_screen = true;
-+			if (ast->chip == AST2400 &&
-+			    (scu_rev & 0x300) == 0x100) /* ast1400 */
-+				ast->support_wide_screen = true;
- 		}
- 		break;
- 	}
-@@ -220,85 +261,102 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
- 
- static int ast_get_dram_info(struct drm_device *dev)
- {
-+	struct device_node *np = dev->pdev->dev.of_node;
- 	struct ast_private *ast = dev->dev_private;
--	uint32_t data, data2;
--	uint32_t denum, num, div, ref_pll;
-+	uint32_t mcr_cfg, mcr_scu_mpll, mcr_scu_strap;
-+	uint32_t denum, num, div, ref_pll, dsel;
- 
--	if (ast->DisableP2A)
--	{
-+	switch (ast->config_mode) {
-+	case ast_use_dt:
-+		/*
-+		 * If some properties are missing, use reasonable
-+		 * defaults for AST2400
-+		 */
-+		if (of_property_read_u32(np, "aspeed,mcr-configuration",
-+					 &mcr_cfg))
-+			mcr_cfg = 0x00000577;
-+		if (of_property_read_u32(np, "aspeed,mcr-scu-mpll",
-+					 &mcr_scu_mpll))
-+			mcr_scu_mpll = 0x000050C0;
-+		if (of_property_read_u32(np, "aspeed,mcr-scu-strap",
-+					 &mcr_scu_strap))
-+			mcr_scu_strap = 0;
-+		break;
-+	case ast_use_p2a:
-+		ast_write32(ast, 0xf004, 0x1e6e0000);
-+		ast_write32(ast, 0xf000, 0x1);
-+		mcr_cfg = ast_read32(ast, 0x10004);
-+		mcr_scu_mpll = ast_read32(ast, 0x10120);
-+		mcr_scu_strap = ast_read32(ast, 0x10170);
-+		break;
-+	case ast_use_defaults:
-+	default:
- 		ast->dram_bus_width = 16;
- 		ast->dram_type = AST_DRAM_1Gx16;
- 		ast->mclk = 396;
-+		return 0;
- 	}
--	else
--	{
--		ast_write32(ast, 0xf004, 0x1e6e0000);
--		ast_write32(ast, 0xf000, 0x1);
--		data = ast_read32(ast, 0x10004);
--
--		if (data & 0x40)
--			ast->dram_bus_width = 16;
--		else
--			ast->dram_bus_width = 32;
- 
--		if (ast->chip == AST2300 || ast->chip == AST2400) {
--			switch (data & 0x03) {
--			case 0:
--				ast->dram_type = AST_DRAM_512Mx16;
--				break;
--			default:
--			case 1:
--				ast->dram_type = AST_DRAM_1Gx16;
--				break;
--			case 2:
--				ast->dram_type = AST_DRAM_2Gx16;
--				break;
--			case 3:
--				ast->dram_type = AST_DRAM_4Gx16;
--				break;
--			}
--		} else {
--			switch (data & 0x0c) {
--			case 0:
--			case 4:
--				ast->dram_type = AST_DRAM_512Mx16;
--				break;
--			case 8:
--				if (data & 0x40)
--					ast->dram_type = AST_DRAM_1Gx16;
--				else
--					ast->dram_type = AST_DRAM_512Mx32;
--				break;
--			case 0xc:
--				ast->dram_type = AST_DRAM_1Gx32;
--				break;
--			}
--		}
-+	if (mcr_cfg & 0x40)
-+		ast->dram_bus_width = 16;
-+	else
-+		ast->dram_bus_width = 32;
- 
--		data = ast_read32(ast, 0x10120);
--		data2 = ast_read32(ast, 0x10170);
--		if (data2 & 0x2000)
--			ref_pll = 14318;
--		else
--			ref_pll = 12000;
--
--		denum = data & 0x1f;
--		num = (data & 0x3fe0) >> 5;
--		data = (data & 0xc000) >> 14;
--		switch (data) {
--		case 3:
--			div = 0x4;
-+	if (ast->chip == AST2300 || ast->chip == AST2400) {
-+		switch (mcr_cfg & 0x03) {
-+		case 0:
-+			ast->dram_type = AST_DRAM_512Mx16;
- 			break;
--		case 2:
-+		default:
- 		case 1:
--			div = 0x2;
-+			ast->dram_type = AST_DRAM_1Gx16;
- 			break;
--		default:
--			div = 0x1;
-+		case 2:
-+			ast->dram_type = AST_DRAM_2Gx16;
-+			break;
-+		case 3:
-+			ast->dram_type = AST_DRAM_4Gx16;
-+			break;
-+		}
-+	} else {
-+		switch (mcr_cfg & 0x0c) {
-+		case 0:
-+		case 4:
-+			ast->dram_type = AST_DRAM_512Mx16;
-+			break;
-+		case 8:
-+			if (mcr_cfg & 0x40)
-+				ast->dram_type = AST_DRAM_1Gx16;
-+			else
-+				ast->dram_type = AST_DRAM_512Mx32;
-+			break;
-+		case 0xc:
-+			ast->dram_type = AST_DRAM_1Gx32;
- 			break;
- 		}
--		ast->mclk = ref_pll * (num + 2) / (denum + 2) * (div * 1000);
- 	}
-+
-+	if (mcr_scu_strap & 0x2000)
-+		ref_pll = 14318;
-+	else
-+		ref_pll = 12000;
-+
-+	denum = mcr_scu_mpll & 0x1f;
-+	num = (mcr_scu_mpll & 0x3fe0) >> 5;
-+	dsel = (mcr_scu_mpll & 0xc000) >> 14;
-+	switch (dsel) {
-+	case 3:
-+		div = 0x4;
-+		break;
-+	case 2:
-+	case 1:
-+		div = 0x2;
-+		break;
-+	default:
-+		div = 0x1;
-+		break;
-+	}
-+	ast->mclk = ref_pll * (num + 2) / (denum + 2) * (div * 1000);
- 	return 0;
- }
- 
-diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index 6c5391cb90eb..64549cebcc5b 100644
---- a/drivers/gpu/drm/ast/ast_post.c
-+++ b/drivers/gpu/drm/ast/ast_post.c
-@@ -379,17 +379,14 @@ void ast_post_gpu(struct drm_device *dev)
- 	ast_open_key(ast);
- 	ast_set_def_ext_reg(dev);
- 
--	if (ast->DisableP2A == false)
--	{
-+	if (ast->config_mode == ast_use_p2a) {
- 		if (ast->chip == AST2300 || ast->chip == AST2400)
- 			ast_init_dram_2300(dev);
- 		else
- 			ast_init_dram_reg(dev);
- 
- 		ast_init_3rdtx(dev);
--	}
--	else
--	{
-+	} else {
- 		if (ast->tx_chip_type != AST_TX_NONE)
- 			ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xcf, 0x80);	/* Enable DVO */
- 	}
--- 
-2.11.0
-
diff --git a/openpower/linux/0006-drm-ast-Remove-spurrious-include.patch b/openpower/linux/0004-drm-ast-Remove-spurrious-include.patch
similarity index 93%
rename from openpower/linux/0006-drm-ast-Remove-spurrious-include.patch
rename to openpower/linux/0004-drm-ast-Remove-spurrious-include.patch
index 9b6d7a1..ffa2606 100644
--- a/openpower/linux/0006-drm-ast-Remove-spurrious-include.patch
+++ b/openpower/linux/0004-drm-ast-Remove-spurrious-include.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
 Date: Fri, 17 Feb 2017 13:55:58 +1100
-Subject: [PATCH 06/15] drm/ast: Remove spurrious include
+Subject: [PATCH 04/12] drm/ast: Remove spurrious include
 
 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
 Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/openpower/linux/0007-drm-ast-Fix-calculation-of-MCLK.patch b/openpower/linux/0005-drm-ast-Fix-calculation-of-MCLK.patch
similarity index 96%
rename from openpower/linux/0007-drm-ast-Fix-calculation-of-MCLK.patch
rename to openpower/linux/0005-drm-ast-Fix-calculation-of-MCLK.patch
index 5cc3e2c..e72a789 100644
--- a/openpower/linux/0007-drm-ast-Fix-calculation-of-MCLK.patch
+++ b/openpower/linux/0005-drm-ast-Fix-calculation-of-MCLK.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
 Date: Fri, 17 Feb 2017 13:57:30 +1100
-Subject: [PATCH 07/15] drm/ast: Fix calculation of MCLK
+Subject: [PATCH 05/12] drm/ast: Fix calculation of MCLK
 
 Some braces were missing causing an incorrect calculation.
 
diff --git a/openpower/linux/0008-drm-ast-Base-support-for-AST2500.patch b/openpower/linux/0006-drm-ast-Base-support-for-AST2500.patch
similarity index 99%
rename from openpower/linux/0008-drm-ast-Base-support-for-AST2500.patch
rename to openpower/linux/0006-drm-ast-Base-support-for-AST2500.patch
index c081740..34fb54a 100644
--- a/openpower/linux/0008-drm-ast-Base-support-for-AST2500.patch
+++ b/openpower/linux/0006-drm-ast-Base-support-for-AST2500.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: "Y.C. Chen" <yc_chen@aspeedtech.com>
 Date: Fri, 17 Feb 2017 14:36:46 +1100
-Subject: [PATCH 08/15] drm/ast: Base support for AST2500
+Subject: [PATCH 06/12] drm/ast: Base support for AST2500
 
 Add detection and mode setting updates for AST2500 generation chip,
 code originally from Aspeed and slightly reworked for coding style
diff --git a/openpower/linux/0009-drm-ast-Fixed-vram-size-incorrect-issue-on-POWER.patch b/openpower/linux/0007-drm-ast-Fixed-vram-size-incorrect-issue-on-POWER.patch
similarity index 90%
rename from openpower/linux/0009-drm-ast-Fixed-vram-size-incorrect-issue-on-POWER.patch
rename to openpower/linux/0007-drm-ast-Fixed-vram-size-incorrect-issue-on-POWER.patch
index 0879919..da79871 100644
--- a/openpower/linux/0009-drm-ast-Fixed-vram-size-incorrect-issue-on-POWER.patch
+++ b/openpower/linux/0007-drm-ast-Fixed-vram-size-incorrect-issue-on-POWER.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: "Y.C. Chen" <yc_chen@aspeedtech.com>
 Date: Fri, 17 Feb 2017 10:56:47 +0800
-Subject: [PATCH 09/15] drm/ast: Fixed vram size incorrect issue on POWER
+Subject: [PATCH 07/12] drm/ast: Fixed vram size incorrect issue on POWER
 
 The default value of VGA scratch may incorrect.
 Should initial h/w before get vram info.
@@ -38,10 +38,10 @@
  	if (ret)
  		goto out_free;
 diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index 64549cebcc5b..e8024502e749 100644
+index c7c58becb25d..5b7db846a2c1 100644
 --- a/drivers/gpu/drm/ast/ast_post.c
 +++ b/drivers/gpu/drm/ast/ast_post.c
-@@ -79,7 +79,7 @@ ast_set_def_ext_reg(struct drm_device *dev)
+@@ -75,7 +75,7 @@ ast_set_def_ext_reg(struct drm_device *dev)
  	const u8 *ext_reg_info;
  
  	/* reset scratch */
diff --git a/openpower/linux/0010-drm-ast-Factor-mmc_test-code-in-POST-code.patch b/openpower/linux/0008-drm-ast-Factor-mmc_test-code-in-POST-code.patch
similarity index 94%
rename from openpower/linux/0010-drm-ast-Factor-mmc_test-code-in-POST-code.patch
rename to openpower/linux/0008-drm-ast-Factor-mmc_test-code-in-POST-code.patch
index 855c7d8..f85a1ce 100644
--- a/openpower/linux/0010-drm-ast-Factor-mmc_test-code-in-POST-code.patch
+++ b/openpower/linux/0008-drm-ast-Factor-mmc_test-code-in-POST-code.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
 Date: Sat, 18 Feb 2017 14:19:10 +1100
-Subject: [PATCH 10/15] drm/ast: Factor mmc_test code in POST code
+Subject: [PATCH 08/12] drm/ast: Factor mmc_test code in POST code
 
 There's a some duplication for what's essentially copies of
 two loops, so factor it. The upcoming AST2500 POST code adds
@@ -22,10 +22,10 @@
  1 file changed, 31 insertions(+), 51 deletions(-)
 
 diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index e8024502e749..c55067ccb0b1 100644
+index 5b7db846a2c1..89b09d60b2be 100644
 --- a/drivers/gpu/drm/ast/ast_post.c
 +++ b/drivers/gpu/drm/ast/ast_post.c
-@@ -445,85 +445,65 @@ static const u32 pattern[8] = {
+@@ -441,85 +441,65 @@ static const u32 pattern[8] = {
  	0x7C61D253
  };
  
@@ -135,7 +135,7 @@
  }
  
  static int cbr_test(struct ast_private *ast)
-@@ -601,16 +581,16 @@ static u32 cbr_scan2(struct ast_private *ast)
+@@ -597,16 +577,16 @@ static u32 cbr_scan2(struct ast_private *ast)
  	return data2;
  }
  
@@ -157,7 +157,7 @@
  {
  	u32 patcnt, loop;
  
-@@ -621,9 +601,9 @@ static u32 cbr_scan3(struct ast_private *ast)
+@@ -617,9 +597,9 @@ static u32 cbr_scan3(struct ast_private *ast)
  				break;
  		}
  		if (loop == 2)
diff --git a/openpower/linux/0011-drm-ast-Rename-ast_init_dram_2300-to-ast_post_chip_2.patch b/openpower/linux/0009-drm-ast-Rename-ast_init_dram_2300-to-ast_post_chip_2.patch
similarity index 86%
rename from openpower/linux/0011-drm-ast-Rename-ast_init_dram_2300-to-ast_post_chip_2.patch
rename to openpower/linux/0009-drm-ast-Rename-ast_init_dram_2300-to-ast_post_chip_2.patch
index 0bdfc10..d0dc48f 100644
--- a/openpower/linux/0011-drm-ast-Rename-ast_init_dram_2300-to-ast_post_chip_2.patch
+++ b/openpower/linux/0009-drm-ast-Rename-ast_init_dram_2300-to-ast_post_chip_2.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
 Date: Fri, 17 Feb 2017 13:51:34 +1100
-Subject: [PATCH 11/15] drm/ast: Rename ast_init_dram_2300 to
+Subject: [PATCH 09/12] drm/ast: Rename ast_init_dram_2300 to
  ast_post_chip_2300
 
 The function does more than initializing the DRAM and in turns
@@ -15,7 +15,7 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index c55067ccb0b1..561fd7d3a0cf 100644
+index 89b09d60b2be..3716795d27c8 100644
 --- a/drivers/gpu/drm/ast/ast_post.c
 +++ b/drivers/gpu/drm/ast/ast_post.c
 @@ -31,7 +31,7 @@
@@ -27,7 +27,7 @@
  
  void ast_enable_vga(struct drm_device *dev)
  {
-@@ -381,7 +381,7 @@ void ast_post_gpu(struct drm_device *dev)
+@@ -377,7 +377,7 @@ void ast_post_gpu(struct drm_device *dev)
  
  	if (ast->config_mode == ast_use_p2a) {
  		if (ast->chip == AST2300 || ast->chip == AST2400)
@@ -36,7 +36,7 @@
  		else
  			ast_init_dram_reg(dev);
  
-@@ -1589,7 +1589,7 @@ static void ddr2_init(struct ast_private *ast, struct ast2300_dram_param *param)
+@@ -1585,7 +1585,7 @@ static void ddr2_init(struct ast_private *ast, struct ast2300_dram_param *param)
  
  }
  
diff --git a/openpower/linux/0012-drm-ast-POST-code-for-the-new-AST2500.patch b/openpower/linux/0010-drm-ast-POST-code-for-the-new-AST2500.patch
similarity index 97%
rename from openpower/linux/0012-drm-ast-POST-code-for-the-new-AST2500.patch
rename to openpower/linux/0010-drm-ast-POST-code-for-the-new-AST2500.patch
index 34ad9aa..6e42f86 100644
--- a/openpower/linux/0012-drm-ast-POST-code-for-the-new-AST2500.patch
+++ b/openpower/linux/0010-drm-ast-POST-code-for-the-new-AST2500.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: "Y.C. Chen" <yc_chen@aspeedtech.com>
 Date: Fri, 17 Feb 2017 14:45:07 +1100
-Subject: [PATCH 12/15] drm/ast: POST code for the new AST2500
+Subject: [PATCH 10/12] drm/ast: POST code for the new AST2500
 
 This is used when the BMC isn't running any code and thus has
 to be initialized by the host.
@@ -95,7 +95,7 @@
 +
  #endif
 diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index 561fd7d3a0cf..c15f643915af 100644
+index 3716795d27c8..f7d421359d56 100644
 --- a/drivers/gpu/drm/ast/ast_post.c
 +++ b/drivers/gpu/drm/ast/ast_post.c
 @@ -32,6 +32,7 @@
@@ -106,7 +106,7 @@
  
  void ast_enable_vga(struct drm_device *dev)
  {
-@@ -82,7 +83,8 @@ ast_set_def_ext_reg(struct drm_device *dev)
+@@ -78,7 +79,8 @@ ast_set_def_ext_reg(struct drm_device *dev)
  	for (i = 0x81; i <= 0x9f; i++)
  		ast_set_index_reg(ast, AST_IO_CRTC_PORT, i, 0x00);
  
@@ -116,7 +116,7 @@
  		if (dev->pdev->revision >= 0x20)
  			ext_reg_info = extreginfo_ast2300;
  		else
-@@ -106,7 +108,8 @@ ast_set_def_ext_reg(struct drm_device *dev)
+@@ -102,7 +104,8 @@ ast_set_def_ext_reg(struct drm_device *dev)
  
  	/* Enable RAMDAC for A1 */
  	reg = 0x04;
@@ -126,7 +126,7 @@
  		reg |= 0x20;
  	ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xff, reg);
  }
-@@ -380,7 +383,9 @@ void ast_post_gpu(struct drm_device *dev)
+@@ -376,7 +379,9 @@ void ast_post_gpu(struct drm_device *dev)
  	ast_set_def_ext_reg(dev);
  
  	if (ast->config_mode == ast_use_p2a) {
@@ -137,7 +137,7 @@
  			ast_post_chip_2300(dev);
  		else
  			ast_init_dram_reg(dev);
-@@ -506,6 +511,11 @@ static u32 mmc_test_single2(struct ast_private *ast, u32 datagen)
+@@ -502,6 +507,11 @@ static u32 mmc_test_single2(struct ast_private *ast, u32 datagen)
  	return mmc_test2(ast, datagen, 0x05);
  }
  
@@ -149,7 +149,7 @@
  static int cbr_test(struct ast_private *ast)
  {
  	u32 data;
-@@ -1672,3 +1682,404 @@ static void ast_post_chip_2300(struct drm_device *dev)
+@@ -1668,3 +1678,404 @@ static void ast_post_chip_2300(struct drm_device *dev)
  	} while ((reg & 0x40) == 0);
  }
  
diff --git a/openpower/linux/0011-scsi-lpfc-Add-shutdown-method-for-kexec.patch b/openpower/linux/0011-scsi-lpfc-Add-shutdown-method-for-kexec.patch
new file mode 100644
index 0000000..f4600c2
--- /dev/null
+++ b/openpower/linux/0011-scsi-lpfc-Add-shutdown-method-for-kexec.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Anton Blanchard <anton@samba.org>
+Date: Thu, 2 Mar 2017 10:20:30 -0300
+Subject: [PATCH 11/12] scsi: lpfc: Add shutdown method for kexec
+
+We see lpfc devices regularly fail during kexec. Fix this by adding
+a shutdown method which mirrors the remove method.
+
+( mfoliveira: this patch has been submitted upstream at: )
+( http://www.spinics.net/lists/linux-scsi/msg105102.html )
+
+Signed-off-by: Anton Blanchard <anton@samba.org>
+Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ drivers/scsi/lpfc/lpfc_init.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
+index 4776fd85514f..10f75ad2b9e8 100644
+--- a/drivers/scsi/lpfc/lpfc_init.c
++++ b/drivers/scsi/lpfc/lpfc_init.c
+@@ -11447,6 +11447,7 @@ static struct pci_driver lpfc_driver = {
+ 	.id_table	= lpfc_id_table,
+ 	.probe		= lpfc_pci_probe_one,
+ 	.remove		= lpfc_pci_remove_one,
++	.shutdown	= lpfc_pci_remove_one,
+ 	.suspend        = lpfc_pci_suspend_one,
+ 	.resume		= lpfc_pci_resume_one,
+ 	.err_handler    = &lpfc_err_handler,
+-- 
+2.11.0
+
diff --git a/openpower/linux/0015-Release-OpenPower-kernel.patch b/openpower/linux/0012-Release-OpenPower-kernel.patch
similarity index 82%
rename from openpower/linux/0015-Release-OpenPower-kernel.patch
rename to openpower/linux/0012-Release-OpenPower-kernel.patch
index db8831f..552c6b5 100644
--- a/openpower/linux/0015-Release-OpenPower-kernel.patch
+++ b/openpower/linux/0012-Release-OpenPower-kernel.patch
@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Joel Stanley <joel@jms.id.au>
 Date: Tue, 28 Feb 2017 12:15:10 +1030
-Subject: [PATCH 15/15] Release OpenPower kernel
+Subject: [PATCH 12/12] Release OpenPower kernel
 
 Signed-off-by: Joel Stanley <joel@jms.id.au>
 ---
@@ -9,13 +9,13 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 09eccff4f569..e291929b4fd0 100644
+index 190a684303c1..f0aedaf5fabb 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -1,7 +1,7 @@
  VERSION = 4
  PATCHLEVEL = 10
- SUBLEVEL = 1
+ SUBLEVEL = 3
 -EXTRAVERSION =
 +EXTRAVERSION = -openpower1
  NAME = Fearless Coyote
diff --git a/openpower/linux/0013-drm-ast-Fix-test-for-VGA-enabled.patch b/openpower/linux/0013-drm-ast-Fix-test-for-VGA-enabled.patch
deleted file mode 100644
index f27d6c1..0000000
--- a/openpower/linux/0013-drm-ast-Fix-test-for-VGA-enabled.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Y.C. Chen" <yc_chen@aspeedtech.com>
-Date: Wed, 22 Feb 2017 15:10:50 +1100
-Subject: [PATCH 13/15] drm/ast: Fix test for VGA enabled
-
-The test to see if VGA was already enabled is doing an unnecessary
-second test from a register that may or may not have been initialized
-to a valid value. Remove it.
-
-Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
-Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-Signed-off-by: Joel Stanley <joel@jms.id.au>
----
- drivers/gpu/drm/ast/ast_post.c | 8 ++------
- 1 file changed, 2 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index c15f643915af..a5a780921553 100644
---- a/drivers/gpu/drm/ast/ast_post.c
-+++ b/drivers/gpu/drm/ast/ast_post.c
-@@ -59,13 +59,9 @@ bool ast_is_vga_enabled(struct drm_device *dev)
- 		/* TODO 1180 */
- 	} else {
- 		ch = ast_io_read8(ast, AST_IO_VGA_ENABLE_PORT);
--		if (ch) {
--			ast_open_key(ast);
--			ch = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xff);
--			return ch & 0x04;
--		}
-+		return !!(ch & 0x01);
- 	}
--	return 0;
-+	return false;
- }
- 
- static const u8 extreginfo[] = { 0x0f, 0x04, 0x1c, 0xff };
--- 
-2.11.0
-
diff --git a/openpower/linux/0014-drm-ast-Call-open_key-before-enable_mmio-in-POST-cod.patch b/openpower/linux/0014-drm-ast-Call-open_key-before-enable_mmio-in-POST-cod.patch
deleted file mode 100644
index b84131e..0000000
--- a/openpower/linux/0014-drm-ast-Call-open_key-before-enable_mmio-in-POST-cod.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Y.C. Chen" <yc_chen@aspeedtech.com>
-Date: Wed, 22 Feb 2017 15:14:19 +1100
-Subject: [PATCH 14/15] drm/ast: Call open_key before enable_mmio in POST code
-
-open_key enables access the registers used by enable_mmio
-
-Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
-Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-Signed-off-by: Joel Stanley <joel@jms.id.au>
----
- drivers/gpu/drm/ast/ast_post.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
-index a5a780921553..f7d421359d56 100644
---- a/drivers/gpu/drm/ast/ast_post.c
-+++ b/drivers/gpu/drm/ast/ast_post.c
-@@ -374,8 +374,8 @@ void ast_post_gpu(struct drm_device *dev)
- 	pci_write_config_dword(ast->dev->pdev, 0x04, reg);
- 
- 	ast_enable_vga(dev);
--	ast_enable_mmio(dev);
- 	ast_open_key(ast);
-+	ast_enable_mmio(dev);
- 	ast_set_def_ext_reg(dev);
- 
- 	if (ast->config_mode == ast_use_p2a) {
--- 
-2.11.0
-