spapr_drc: add spapr_drc_populate_dt()
commite4b798bb53447ba4608fc7e6ed91927bdb1c3d5d
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 7 May 2015 05:33:51 +0000 (7 15:33 +1000)
committerAlexander Graf <agraf@suse.de>
Wed, 3 Jun 2015 21:56:54 +0000 (3 23:56 +0200)
treeb53bed947313b95a65d34bd203c1231dbb2a4450
parent79853e18d904b0a4bcef62701d48559688007c93
spapr_drc: add spapr_drc_populate_dt()

This function handles generation of ibm,drc-* array device tree
properties to describe DRC topology to guests. This will by used
by the guest to direct RTAS calls to manage any dynamic resources
we associate with a particular DR Connector as part of
hotplug/unplug.

Since general management of boot-time device trees are handled
outside of sPAPRDRConnector, we insert these values blindly given
an FDT and offset. A mask of sPAPRDRConnector types is given to
instruct us on what types of connectors entries should be generated
for, since descriptions for different connectors may live in
different parts of the device tree.

Based on code originally written by Nathan Fontenot.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr_drc.c
include/hw/ppc/spapr_drc.h