#include <common.h>
#include <dm.h>
+#include <log.h>
#include <pci.h>
#include <asm/test.h>
#include <power/acpi_pmc.h>
static int sandbox_pmc_emul_read_config(const struct udevice *emul, uint offset,
ulong *valuep, enum pci_size_t size)
{
- struct pmc_emul_platdata *plat = dev_get_platdata(emul);
+ struct pmc_emul_platdata *plat = dev_get_plat(emul);
switch (offset) {
case PCI_COMMAND:
static int sandbox_pmc_emul_write_config(struct udevice *emul, uint offset,
ulong value, enum pci_size_t size)
{
- struct pmc_emul_platdata *plat = dev_get_platdata(emul);
+ struct pmc_emul_platdata *plat = dev_get_plat(emul);
switch (offset) {
case PCI_COMMAND:
static int sandbox_pmc_emul_find_bar(struct udevice *emul, unsigned int addr,
int *barnump, unsigned int *offsetp)
{
- struct pmc_emul_platdata *plat = dev_get_platdata(emul);
+ struct pmc_emul_platdata *plat = dev_get_plat(emul);
int barnum;
for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) {
.of_match = sandbox_pmc_emul_ids,
.ops = &sandbox_pmc_emul_emul_ops,
.probe = sandbox_pmc_probe,
- .priv_auto_alloc_size = sizeof(struct pmc_emul_priv),
- .platdata_auto_alloc_size = sizeof(struct pmc_emul_platdata),
+ .priv_auto = sizeof(struct pmc_emul_priv),
+ .plat_auto = sizeof(struct pmc_emul_platdata),
};
static struct pci_device_id sandbox_pmc_emul_supported[] = {