pci_write_config_byte(dev, 0x41, 0xa1);
#endif
#else
- struct scsi_platdata *plat = dev_get_platdata(dev);
+ struct scsi_platdata *plat = dev_get_uclass_platdata(dev);
probe_ent->mmio_base = (void *)plat->base;
#endif
static int dwc_ahci_ofdata_to_platdata(struct udevice *dev)
{
struct dwc_ahci_priv *priv = dev_get_priv(dev);
- struct scsi_platdata *plat = dev_get_platdata(dev);
+ struct scsi_platdata *plat = dev_get_uclass_platdata(dev);
fdt_addr_t addr;
plat->max_id = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
.ofdata_to_platdata = dwc_ahci_ofdata_to_platdata,
.probe = dwc_ahci_probe,
.priv_auto_alloc_size = sizeof(struct dwc_ahci_priv),
- .platdata_auto_alloc_size = sizeof(struct scsi_platdata),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
};
static int sata_ceva_probe(struct udevice *dev)
{
- struct scsi_platdata *plat = dev_get_platdata(dev);
+ struct scsi_platdata *plat = dev_get_uclass_platdata(dev);
ceva_init_sata(plat->base);
return 0;
static int sata_ceva_ofdata_to_platdata(struct udevice *dev)
{
- struct scsi_platdata *plat = dev_get_platdata(dev);
+ struct scsi_platdata *plat = dev_get_uclass_platdata(dev);
plat->base = devfdt_get_addr(dev);
if (plat->base == FDT_ADDR_T_NONE)
.of_match = sata_ceva_ids,
.probe = sata_ceva_probe,
.ofdata_to_platdata = sata_ceva_ofdata_to_platdata,
- .platdata_auto_alloc_size = sizeof(struct scsi_platdata),
};
.id = UCLASS_SCSI,
.name = "scsi",
.post_probe = scsi_post_probe,
+ .per_device_platdata_auto_alloc_size = sizeof(struct scsi_platdata),
};
return ret;
/* Get controller platdata */
- plat = dev_get_platdata(dev);
+ plat = dev_get_uclass_platdata(dev);
for (i = 0; i < plat->max_id; i++)
for (lun = 0; lun < plat->max_lun; lun++)