aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-10-20 14:17:17 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-24 12:14:58 +1100
commit18d590eee08be63b5971a4e2a80d571c86b3a305 (patch)
tree10d07db8d12e5fd4faa4146682851300391c6358 /platforms
parentda11e003fa1a77199a6fd67b2215d0a51e4f731d (diff)
downloadskiboot-18d590eee08be63b5971a4e2a80d571c86b3a305.zip
skiboot-18d590eee08be63b5971a4e2a80d571c86b3a305.tar.gz
skiboot-18d590eee08be63b5971a4e2a80d571c86b3a305.tar.bz2
pci: make PCI slot state as incremental to base number
Various backends define their own PCI slot states for flexibility with numbers [A]. PCI core also defines its PCI slot states [B]. For one specific PCI slot state, the major number of [A] and [B] should be same so that the corresponding operation can be found. It means [A] and [B] are relevant to some extent, but the code where defines the PCI slots in backends doesn't reflect it. This makes the major PCI slot state defined in backend same to the corresponding one defined in PCI core. The minor PCI slot states are made to be incremental to their base number (major PCI slot state). No functional changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/ibm-fsp/firenze-pci.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c
index 2b8c0c6..ff14a4c 100644
--- a/platforms/ibm-fsp/firenze-pci.c
+++ b/platforms/ibm-fsp/firenze-pci.c
@@ -39,27 +39,27 @@
* Refer to pci-slot.h for the default PCI state set
* when you're going to change below values.
*/
-#define FIRENZE_PCI_SLOT_NORMAL 0x00000000
-#define FIRENZE_PCI_SLOT_LINK 0x00000100
-#define FIRENZE_PCI_SLOT_LINK_START 0x00000101
-#define FIRENZE_PCI_SLOT_HRESET 0x00000200
-#define FIRENZE_PCI_SLOT_HRESET_START 0x00000201
-#define FIRENZE_PCI_SLOT_FRESET 0x00000300
-#define FIRENZE_PCI_SLOT_FRESET_START 0x00000301
-#define FIRENZE_PCI_SLOT_FRESET_WAIT_RSP 0x00000302
-#define FIRENZE_PCI_SLOT_FRESET_DELAY 0x00000303
-#define FIRENZE_PCI_SLOT_FRESET_POWER_STATE 0x00000304
-#define FIRENZE_PCI_SLOT_FRESET_POWER_OFF 0x00000305
-#define FIRENZE_PCI_SLOT_FRESET_POWER_ON 0x00000306
-#define FIRENZE_PCI_SLOT_PERST_DEASSERT 0x00000307
-#define FIRENZE_PCI_SLOT_PERST_DELAY 0x00000308
-#define FIRENZE_PCI_SLOT_PFRESET 0x00000400
-#define FIRENZE_PCI_SLOT_PFRESET_START 0x00000401
-#define FIRENZE_PCI_SLOT_GPOWER 0x00000600
-#define FIRENZE_PCI_SLOT_GPOWER_START 0x00000601
-#define FIRENZE_PCI_SLOT_SPOWER 0x00000700
-#define FIRENZE_PCI_SLOT_SPOWER_START 0x00000701
-#define FIRENZE_PCI_SLOT_SPOWER_DONE 0x00000702
+#define FIRENZE_PCI_SLOT_NORMAL PCI_SLOT_STATE_NORMAL
+#define FIRENZE_PCI_SLOT_LINK PCI_SLOT_STATE_LINK
+#define FIRENZE_PCI_SLOT_LINK_START (FIRENZE_PCI_SLOT_LINK + 1)
+#define FIRENZE_PCI_SLOT_HRESET PCI_SLOT_STATE_HRESET
+#define FIRENZE_PCI_SLOT_HRESET_START (FIRENZE_PCI_SLOT_HRESET + 1)
+#define FIRENZE_PCI_SLOT_FRESET PCI_SLOT_STATE_FRESET
+#define FIRENZE_PCI_SLOT_FRESET_START (FIRENZE_PCI_SLOT_FRESET + 1)
+#define FIRENZE_PCI_SLOT_FRESET_WAIT_RSP (FIRENZE_PCI_SLOT_FRESET + 2)
+#define FIRENZE_PCI_SLOT_FRESET_DELAY (FIRENZE_PCI_SLOT_FRESET + 3)
+#define FIRENZE_PCI_SLOT_FRESET_POWER_STATE (FIRENZE_PCI_SLOT_FRESET + 4)
+#define FIRENZE_PCI_SLOT_FRESET_POWER_OFF (FIRENZE_PCI_SLOT_FRESET + 5)
+#define FIRENZE_PCI_SLOT_FRESET_POWER_ON (FIRENZE_PCI_SLOT_FRESET + 6)
+#define FIRENZE_PCI_SLOT_PERST_DEASSERT (FIRENZE_PCI_SLOT_FRESET + 7)
+#define FIRENZE_PCI_SLOT_PERST_DELAY (FIRENZE_PCI_SLOT_FRESET + 8)
+#define FIRENZE_PCI_SLOT_PFRESET PCI_SLOT_STATE_PFRESET
+#define FIRENZE_PCI_SLOT_PFRESET_START (FIRENZE_PCI_SLOT_PFRESET + 1)
+#define FIRENZE_PCI_SLOT_GPOWER PCI_SLOT_STATE_GPOWER
+#define FIRENZE_PCI_SLOT_GPOWER_START (FIRENZE_PCI_SLOT_GPOWER + 1)
+#define FIRENZE_PCI_SLOT_SPOWER PCI_SLOT_STATE_SPOWER
+#define FIRENZE_PCI_SLOT_SPOWER_START (FIRENZE_PCI_SLOT_SPOWER + 1)
+#define FIRENZE_PCI_SLOT_SPOWER_DONE (FIRENZE_PCI_SLOT_SPOWER + 2)
/* Timeout for power status */
#define FIRENZE_PCI_SLOT_RETRIES 500