blob: 25897fbfd35333192796cc03f84efaedbc64ce07 [file] [log] [blame]
Stewart Smithb0662472017-06-22 13:45:33 +10001From 399620b8282f89728ab94fd0c273882063bf32b1 Mon Sep 17 00:00:00 2001
2From: Alistair Popple <alistair@popple.id.au>
3Date: Thu, 22 Jun 2017 13:26:01 +1000
4Subject: [PATCH] NOT FOR UPSTREAM: Add support for Redbud
5
6Add support for Redbud. This is mutually exclusive with support for Sequoia so
7anything built with this patch will not work on Sequoia.
8
9Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
10---
11 platforms/astbmc/Makefile.inc | 2 +-
12 platforms/astbmc/{witherspoon.c => redbud.c} | 68 +++++++---------------------
13 2 files changed, 18 insertions(+), 52 deletions(-)
14 rename platforms/astbmc/{witherspoon.c => redbud.c} (91%)
15
16diff --git a/platforms/astbmc/Makefile.inc b/platforms/astbmc/Makefile.inc
17index 49292c10601c..797a03c323ad 100644
18--- a/platforms/astbmc/Makefile.inc
19+++ b/platforms/astbmc/Makefile.inc
20@@ -4,7 +4,7 @@ ASTBMC_OBJS = pnor.o common.o slots.o \
21 palmetto.o habanero.o firestone.o \
22 p8dtu.o p8dnu.o \
23 garrison.o barreleye.o \
24- witherspoon.o zaius.o romulus.o p9dsu.o
25+ redbud.o zaius.o romulus.o p9dsu.o
26
27 ASTBMC = $(PLATDIR)/astbmc/built-in.o
28 $(ASTBMC): $(ASTBMC_OBJS:%=$(PLATDIR)/astbmc/%)
29diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/redbud.c
30similarity index 91%
31rename from platforms/astbmc/witherspoon.c
32rename to platforms/astbmc/redbud.c
33index 6a773061db74..90373f66961f 100644
34--- a/platforms/astbmc/witherspoon.c
35+++ b/platforms/astbmc/redbud.c
36@@ -51,7 +51,7 @@ static const struct slot_table_entry witherspoon_gpu1[] = {
37 static const struct slot_table_entry witherspoon_gpu2[] = {
38 {
39 .etype = st_pluggable_slot,
40- .location = ST_LOC_DEVFN(0xc0,0),
41+ .location = ST_LOC_DEVFN(0x60,0),
42 .name = "GPU2",
43 },
44 { .etype = st_end },
45@@ -60,26 +60,8 @@ static const struct slot_table_entry witherspoon_gpu2[] = {
46 static const struct slot_table_entry witherspoon_gpu3[] = {
47 {
48 .etype = st_pluggable_slot,
49- .location = ST_LOC_DEVFN(0x60,0),
50- .name = "GPU3",
51- },
52- { .etype = st_end },
53-};
54-
55-static const struct slot_table_entry witherspoon_gpu4[] = {
56- {
57- .etype = st_pluggable_slot,
58 .location = ST_LOC_DEVFN(0x80,0),
59- .name = "GPU4",
60- },
61- { .etype = st_end },
62-};
63-
64-static const struct slot_table_entry witherspoon_gpu5[] = {
65- {
66- .etype = st_pluggable_slot,
67- .location = ST_LOC_DEVFN(0xa0,0),
68- .name = "GPU5",
69+ .name = "GPU3",
70 },
71 { .etype = st_end },
72 };
73@@ -97,12 +79,6 @@ static const struct slot_table_entry witherspoon_plx0_down[] = {
74 .children = witherspoon_gpu1,
75 .name = "GPU1 down",
76 },
77- {
78- .etype = st_builtin_dev,
79- .location = ST_LOC_DEVFN(0x4c,0),
80- .children = witherspoon_gpu2,
81- .name = "GPU2 down",
82- },
83 { .etype = st_end },
84 };
85
86@@ -110,20 +86,14 @@ static const struct slot_table_entry witherspoon_plx1_down[] = {
87 {
88 .etype = st_builtin_dev,
89 .location = ST_LOC_DEVFN(0x44,0),
90- .children = witherspoon_gpu3,
91- .name = "GPU3 down",
92+ .children = witherspoon_gpu2,
93+ .name = "GPU2 down",
94 },
95 {
96 .etype = st_builtin_dev,
97 .location = ST_LOC_DEVFN(0x45,0),
98- .children = witherspoon_gpu4,
99- .name = "GPU4 down",
100- },
101- {
102- .etype = st_builtin_dev,
103- .location = ST_LOC_DEVFN(0x4d,0),
104- .children = witherspoon_gpu5,
105- .name = "GPU5 down",
106+ .children = witherspoon_gpu3,
107+ .name = "GPU3 down",
108 },
109 { .etype = st_end },
110 };
111@@ -175,11 +145,6 @@ static const struct slot_table_entry witherspoon_npu0_slots[] = {
112 .location = ST_LOC_NPU_GROUP(1),
113 .name = "GPU1",
114 },
115- {
116- .etype = st_npu_slot,
117- .location = ST_LOC_NPU_GROUP(2),
118- .name = "GPU2",
119- },
120 { .etype = st_end },
121 };
122
123@@ -187,17 +152,12 @@ static const struct slot_table_entry witherspoon_npu8_slots[] = {
124 {
125 .etype = st_npu_slot,
126 .location = ST_LOC_NPU_GROUP(0),
127- .name = "GPU3",
128+ .name = "GPU2",
129 },
130 {
131 .etype = st_npu_slot,
132 .location = ST_LOC_NPU_GROUP(1),
133- .name = "GPU4",
134- },
135- {
136- .etype = st_npu_slot,
137- .location = ST_LOC_NPU_GROUP(2),
138- .name = "GPU5",
139+ .name = "GPU3",
140 },
141 { .etype = st_end },
142 };
143@@ -290,10 +250,10 @@ static void dt_create_npu2(void)
144
145 create_link(npu, 0, 0);
146 create_link(npu, 0, 1);
147- create_link(npu, 1, 2);
148+ create_link(npu, 0, 2);
149 create_link(npu, 1, 3);
150- create_link(npu, 2, 4);
151- create_link(npu, 2, 5);
152+ create_link(npu, 1, 4);
153+ create_link(npu, 1, 5);
154 }
155 }
156
157@@ -304,6 +264,12 @@ static bool witherspoon_probe(void)
158 if (!dt_node_is_compatible(dt_root, "ibm,witherspoon"))
159 return false;
160
161+ prerror("********************************************************************************\n");
162+ prerror("* README: THIS BUILD IS ONLY FOR SYSTEMS SUPPORTING A MAXIMUM OF 4 GPUS *\n");
163+ prerror("* *\n");
164+ prerror("* !!! THIS BUILD WILL NOT WORK ON SYSTEMS WHICH SUPPORT 6 GPUS !!! *\n");
165+ prerror("********************************************************************************\n");
166+
167 /* Lot of common early inits here */
168 astbmc_early_init();
169
170--
1712.9.4
172