aboutsummaryrefslogtreecommitdiff
path: root/platforms
AgeCommit message (Collapse)AuthorFilesLines
2014-12-10PLAT/i2c: Fix the i2c device node name and add target propertyskiboot-4.1Neelesh Gupta1-13/+29
Fix the i2c device node name that should show the functionality and use a dedicated 'target' name property to tell targets being controlled. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02astbmc: Add a system-id device tree propertyAlistair Popple1-0/+13
The pel logging code requires a system-id device tree property. This should be passed to us from Hostboot but at present we don't seem to get one. This patch adds a default value of "unavailable" if it doesn't exist. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02esel: Add a logging backend for bmc based machinesAlistair Popple2-0/+4
This patch adds a backend for bmc based machines running AMI firmware supporting the OEM extended sel commands. Errors are logged in pel format to the bmc. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02ipmi/fru: Add support for populating fru dataAlistair Popple1-0/+1
This patch adds basic support for populating some fru data. Currently we only support adding the skiboot version number to the product information area. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-28Remove sprintf: there's no good reason to have this in firmwareStewart Smith3-7/+7
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-28PLAT: Add i2c busses on firenzeNeelesh Gupta2-1/+133
Set up the device tree nodes of i2c masters and their busses, eventually all this has to come from hostboot. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-25palmetto: Use the right model of VPD eepromBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-14platforms/astbmc: Temporary reboot workaroundJoel Stanley1-1/+3
The BMC does not currently support the IPMI_RESET (03h) chassis power control command. In order to have reboot working in the interim, send a POWER_CYCLE (02h) instead. This should be reverted once the BMC has support for 03h to ensure we follow the specification. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-14i2c: Update DT bindings and minor changesBenjamin Herrenschmidt1-6/+8
The i2c bus frequency is now per port and we use more standard properties this and the clock frequency of the master cell itself. Also use "ibm,opal-i2c" as a compatible match to indicate that the DT node is compatible with the OPAL APIs, whether it's a P8 i2c bus or something else (we will eventually expose the centaur i2c's too for example). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-11i2c: Move bus management and OPAL API to core i2c codeBenjamin Herrenschmidt1-2/+0
And start adding interfaces to lookup i2c busses. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-07PLAT: Add i2c busses on palmetto/habaneroBenjamin Herrenschmidt1-0/+92
We add engine 1 only for now. Eventually, HostBoot will provide the device nodes and we'll filter what Linux can access. We expose the VPD eeprom so that the Linux AT24 driver can pick it up Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-30platform: add a platform hook for loading external resourcesJeremy Kerr2-0/+2
Currently, in core/init.c we do a fsp-specific load procedure to grab the kernel image. We'd like to do two things: allow other types of resources, and have paths for non-FSP platforms to perform loads. This change adds a platform-specific load_resource hook, and moves the currently loading code to fsp_load_resource. To allow other resource types, we add an identifier to indicate the type of resouce to load. Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-30ipmi: Add an opal interface to the ipmi stackAlistair Popple1-1/+1
This patch adds two opal calls (opal_ipmi_send and opal_ipmi_recv) to allow an operating system to send and receive arbitrary ipmi messages to the BMC. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-22fsp/elog: Make the logging backend platform specificAlistair Popple3-1/+5
OpenPOWER boxes don't have an FSP and therefore implement their own method for passing log messages to a support processor. This patch makes the logging method platform specific. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-15uart: Give UART it's own OPAL console callbacks instead of dummy consoleBenjamin Herrenschmidt2-3/+7
This means the Linux output no longer gets into our internal log, which makes dumping of it from Linux a lot nicer. It will also allow us to improve the way we do the bufferring for Linux and to exploit eventually the TX interrupts. It will also allow us to implement some form of timeouts for the OPAL console variant of it so we don't get stuck of the BMC doesn't consume from the virtual UART. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-15console: Move dummy_console_add_nodes() to common codeBenjamin Herrenschmidt3-9/+0
All the platforms basically do the same thing Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-15Firenze platform: quieten logging of sending PCI info to FSPStewart Smith1-13/+9
We don't need the debug level printouts by default, set to PR_DEBUG Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-08Change DBG macro to prlog calls for platforms/ibm-fsp/lxvpd.cStewart Smith1-18/+23
No functional changes, when running with higher log level, you'll get debug messages without recompiling! Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-05platform: Add Habanero platformBenjamin Herrenschmidt2-1/+53
For now identical to Palmetto. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05platform: Rename "bmc" to "astbmc"Benjamin Herrenschmidt7-8/+8
We might have a different BMC in the future.. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05plat/palmetto: Move most code to a common file & reorder inits a bitBenjamin Herrenschmidt5-217/+252
This moves most of the palmetto platform code to a "common" file to share with other platforms using AST BMC. We also initialize IPMI later. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05ipmi/bt: Rework iBT register accessBenjamin Herrenschmidt1-0/+1
The bits in the control register are mostly write-1-to-clear, so the rmw sequences in bt_setmask() and bt_clearmask() don't work. Additionally, H_BUSY is weird as it's a write-1-to-toggle, so let's write a "safe" function that sets it to the desired state based on its previous state. (We can optimize that further later). Also enable interrupt operations. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05plat/palmetto: Fix SIO UART vs UART setup and iBT setupBenjamin Herrenschmidt1-2/+17
The AMI images use the virtual UART, not the SIO UART, so configuring the SIO the way we do is incorrect. Additionally, they don't configure the interrupts properly (bad polarity for VUART and bad number for iBT). This reworks the inits to fix that up: - All SIO interrupts are set to level low - Check if VUART is enabled. If yes, configure and use it (and disable SIO UART which hostboot might have left enabled). - Else, reconfigure VUART LPC address and IRQ properly - Configure iBT LPC address and IRQ properly Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01ipmi/power: Add power state IPMI commandJoel Stanley1-0/+3
This sends command 20.7, Set ACPI Power State. It is to be used to inform a BMC of the runtime state of the system. We drop the ACPI part from the function name to avoid confusion. As soon as IPMI is up, the palmetto platform init code will set the power ptate to S0/working. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01ipmi/power: Update chassis control commandJoel Stanley1-10/+8
Linux sends us a 0 when shutting down. This means we don't need to pass the u64 to the IPMI driver. Add a check that the value is what we expect in case Linux changes it's behaviour in the future. When rebooting, we should send the BMC a HARD_RESET command (0x03), not POWER_CYCLE (0x02). While we are here, trim some whitespace and drop opal from the IPMI function name for readability. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-01ipmi: Refactored ipmi layer to use generic backendAlistair Popple1-3/+4
The initial implementation of the ipmi stack was still tightly coupled with the backend (in this case bt). This patch refactors the ipmi code to use a generic backend device. The core ipmi messaging functionality and the implementation of specific commands has also been split into different files. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-29occ: Make timeout platform dependentBenjamin Herrenschmidt1-0/+7
Keep it 0 for open-power platforms where OCC is going to be preloaded, also avoids a annoying 1mn delay on early openpower and bml when there is no OCC firmware to wait for. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-15ipmi: Correct chassis control messageJoel Stanley1-2/+2
I misread the spec when implementing the chassis control message. This fixes the message, as well as correcting the naming of the IPMI fields to better reflect what they represent. Signed-off-by: Joel Stanley <joel@jms.id.au> Acked-by: Jeremy Kerr <jeremy.kerr@au.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-13dpo: Move the FSP async messagae handling into a separate fileAnshuman Khandual1-0/+4
This patch moves the DPO message handling from FSP core code into a separate file to make it more cleaner and to add OPAL interfaces in the subsequent patch. It does not change anything functionally. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-13plat/palmetto: Add shutdown and rebootJoel Stanley1-0/+19
Rebooting and power down for the Palmetto is done by the BMC, which we speak to over the BT interface using IPMI. Implement the IPMI chassis commands which are used for power control, and hook them up to the palmetto platform callbacks for shutdown and reboot. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-13plat/palmetto: Initialise BT/IPMI interface on PalmettoAlistair Popple1-1/+33
This patch adds a device tree entry for the BT interface on Palmetto and a call to initialise the BT/IPMI driver to allow interaction with the BMC via IPMI commands. [ Minor changes to device-tree representation -- BenH ] Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-08-01ATTN: Set up attention area to handle attentionAruna Balakrishnaiah1-0/+3
At present CPU control area ntuple in SPIRA structure is NULL. ATTN component in Service Processor side checks for this field and if its empty, it logs hardcoded SRC (0xBB821410) and generates SYSDUMP. So we have 1 SRC for all failure (assert call) from OPAL side. This makes difficult to debug the issue. Service processor provides attention area interface (FIPS PHyp Attentions spec), so that we can pass SRC and user data (error message) to service processor. This will helps us identify different failures in OPAL. This patch enables attention area and provides interface (update_sp_attn_area()) to add src and user data (error message) through assert macro. Attention SRC format: 1st byte - Opal src type 2-4 bytes - Holds the address of the assert function call Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-30epow: Enable Environment and Power Warning support in FSP machinesAnshuman Khandual1-0/+4
EPOW informs about the environmental and power situation regarding the system, so thet corrective action can be taken if required. Sapphire interacts in two distinct ways with respect to EPOW events with FSP. FSP sends notification regarding changes in system-panel status (classified as normal ,extended_1, extended_2 depending on information contained). These intimations carry details regarding the prevailing EPOW situation which triggered the notification in the first place. Sapphire can also query about these system-panel status synchronously with FSP, independent of these explicit notifications. This patch enables processing of these explicit FSP notifications related to EPOW events and map them to generic OPAL EPOW events which in turn get communicated to the host above. Host communication has been implemented with OPAL message event interface with OPAL_MSG_EPOW class messages. Host gets notified about the presence of valid EPOW status in the system and subsequently calls for the complete EPOW system status through an exclussive OPAL calls with the token OPAL_GET_EPOW_STATUS. This delivers the entire array of system EPOW status which can then be processed in the host kernel to be forwarded up the stack. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt14-0/+1578
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>