1
/* Copyright 2016 Ingrasys.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
7
* http://www.apache.org/licenses/LICENSE-2.0
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
26
static const struct slot_table_entry barreleye_phb0_0_slot[] = {
28
.etype = st_pluggable_slot,
29
.location = ST_LOC_DEVFN(0,0),
35
static const struct slot_table_entry barreleye_plx_slots[] = {
37
.etype = st_builtin_dev,
38
.location = ST_LOC_DEVFN(1,0),
39
.name = "IO Board SATA",
42
.etype = st_builtin_dev,
43
.location = ST_LOC_DEVFN(2,0),
44
.name = "IO Board USB",
47
.etype = st_builtin_dev,
48
.location = ST_LOC_DEVFN(3,0),
49
.name = "IO Board BMC",
52
.etype = st_builtin_dev,
53
.location = ST_LOC_DEVFN(4,0),
54
.name = "IO Board NIC",
59
static const struct slot_table_entry barreleye_plx_up[] = {
61
.etype = st_builtin_dev,
62
.location = ST_LOC_DEVFN(0,0),
63
.children = barreleye_plx_slots,
68
static const struct slot_table_entry barreleye_phb0_1_slot[] = {
70
.etype = st_builtin_dev,
71
.location = ST_LOC_DEVFN(0,0),
73
.children = barreleye_plx_up,
78
static const struct slot_table_entry barreleye_phb0_2_slot[] = {
80
.etype = st_pluggable_slot,
81
.location = ST_LOC_DEVFN(0,0),
82
.name = "Network Mezz",
87
static const struct slot_table_entry barreleye_phb8_0_slot[] = {
89
.etype = st_pluggable_slot,
90
.location = ST_LOC_DEVFN(0,0),
91
.name = "Storage Mezz",
96
static const struct slot_table_entry barreleye_phb8_1_slot[] = {
98
.etype = st_pluggable_slot,
99
.location = ST_LOC_DEVFN(0,0),
105
static const struct slot_table_entry barreleye_phb8_2_slot[] = {
107
.etype = st_pluggable_slot,
108
.location = ST_LOC_DEVFN(0,0),
114
static const struct slot_table_entry barreleye_phb_table[] = {
117
.location = ST_LOC_PHB(0,0),
118
.children = barreleye_phb0_0_slot,
122
.location = ST_LOC_PHB(0,1),
123
.children = barreleye_phb0_1_slot,
127
.location = ST_LOC_PHB(0,2),
128
.children = barreleye_phb0_2_slot,
132
.location = ST_LOC_PHB(8,0),
133
.children = barreleye_phb8_0_slot,
137
.location = ST_LOC_PHB(8,1),
138
.children = barreleye_phb8_1_slot,
142
.location = ST_LOC_PHB(8,2),
143
.children = barreleye_phb8_2_slot,
148
static bool barreleye_probe(void)
150
if (!dt_node_is_compatible(dt_root, "ingrasys,barreleye"))
153
/* Lot of common early inits here */
155
slot_table_init(barreleye_phb_table);
161
DECLARE_PLATFORM(barreleye) = {
163
.probe = barreleye_probe,
165
.pci_get_slot_info = slot_table_get_slot_info,
166
.external_irq = astbmc_ext_irq_serirq_cpld,
167
.cec_power_down = astbmc_ipmi_power_down,
168
.cec_reboot = astbmc_ipmi_reboot,
169
.elog_commit = ipmi_elog_commit,
170
.start_preload_resource = flash_start_preload_resource,
171
.resource_loaded = flash_resource_loaded,
172
.exit = ipmi_wdt_final_reset,
173
.terminate = ipmi_terminate,