From c69cda25c9b59e53a6bc8969ada58942549f5b5d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:20 -0700 Subject: dm: treewide: Rename dev_get_platdata() to dev_get_plat() Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass --- drivers/ata/fsl_sata.c | 8 ++++---- drivers/ata/sata_mv.c | 40 ++++++++++++++++++++-------------------- drivers/ata/sata_sil.c | 8 ++++---- 3 files changed, 28 insertions(+), 28 deletions(-) (limited to 'drivers/ata') diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c index 99af1d4475..9c4171117f 100644 --- a/drivers/ata/fsl_sata.c +++ b/drivers/ata/fsl_sata.c @@ -746,7 +746,7 @@ ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer) static ulong sata_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - struct fsl_ata_priv *priv = dev_get_platdata(dev); + struct fsl_ata_priv *priv = dev_get_plat(dev); fsl_sata_t *sata = priv->fsl_sata; #endif u32 rc; @@ -768,7 +768,7 @@ ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer) static ulong sata_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - struct fsl_ata_priv *priv = dev_get_platdata(dev); + struct fsl_ata_priv *priv = dev_get_plat(dev); fsl_sata_t *sata = priv->fsl_sata; #endif u32 rc; @@ -809,7 +809,7 @@ int scan_sata(int dev) static int scan_sata(struct udevice *dev) { struct blk_desc *desc = dev_get_uclass_plat(dev); - struct fsl_ata_priv *priv = dev_get_platdata(dev); + struct fsl_ata_priv *priv = dev_get_plat(dev); fsl_sata_t *sata = priv->fsl_sata; #endif @@ -969,7 +969,7 @@ static int fsl_ata_probe(struct udevice *dev) continue; } - blk_priv = dev_get_platdata(blk); + blk_priv = dev_get_plat(blk); blk_priv->fsl_sata = priv->fsl_sata; /* Scan SATA port */ ret = scan_sata(blk); diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index bb17392e5a..b78e311fc3 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -290,7 +290,7 @@ static int ata_wait_register(u32 *addr, u32 mask, u32 val, u32 timeout_msec) /* Cut from sata_mv in linux kernel */ static int mv_stop_edma_engine(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); int i; /* Disable eDMA. The disable bit auto clears. */ @@ -311,7 +311,7 @@ static int mv_stop_edma_engine(struct udevice *dev, int port) static int mv_start_edma_engine(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); u32 tmp; /* Check preconditions */ @@ -363,7 +363,7 @@ static int mv_start_edma_engine(struct udevice *dev, int port) static int mv_reset_channel(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); /* Make sure edma is stopped */ mv_stop_edma_engine(dev, port); @@ -378,7 +378,7 @@ static int mv_reset_channel(struct udevice *dev, int port) static void mv_reset_port(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); mv_reset_channel(dev, port); @@ -404,7 +404,7 @@ static void mv_reset_one_hc(void) static int probe_port(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); int tries, tries2, set15 = 0; u32 tmp; @@ -467,7 +467,7 @@ static int probe_port(struct udevice *dev, int port) /* Get request queue in pointer */ static int get_reqip(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); u32 tmp; tmp = in_le32(priv->regbase + EDMA_RQIPR) & EDMA_RQIPR_IPMASK; @@ -478,7 +478,7 @@ static int get_reqip(struct udevice *dev, int port) static void set_reqip(struct udevice *dev, int port, int reqin) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); u32 tmp; tmp = in_le32(priv->regbase + EDMA_RQIPR) & ~EDMA_RQIPR_IPMASK; @@ -497,7 +497,7 @@ static int get_next_reqip(struct udevice *dev, int port) /* Get response queue in pointer */ static int get_rspip(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); u32 tmp; tmp = in_le32(priv->regbase + EDMA_RSIPR) & EDMA_RSIPR_IPMASK; @@ -509,7 +509,7 @@ static int get_rspip(struct udevice *dev, int port) /* Get response queue out pointer */ static int get_rspop(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); u32 tmp; tmp = in_le32(priv->regbase + EDMA_RSOPR) & EDMA_RSOPR_OPMASK; @@ -526,7 +526,7 @@ static int get_next_rspop(struct udevice *dev, int port) /* Set response queue pointer */ static void set_rspop(struct udevice *dev, int port, int reqin) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); u32 tmp; tmp = in_le32(priv->regbase + EDMA_RSOPR) & ~EDMA_RSOPR_OPMASK; @@ -552,7 +552,7 @@ static int wait_dma_completion(struct udevice *dev, int port, int index, static void process_responses(struct udevice *dev, int port) { #ifdef DEBUG - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); #endif u32 tmp; u32 outind = get_rspop(dev, port); @@ -580,7 +580,7 @@ static int mv_ata_exec_ata_cmd(struct udevice *dev, int port, struct sata_fis_h2d *cfis, u8 *buffer, u32 len, u32 iswrite) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); struct crqb *req; int slot; u32 start; @@ -772,7 +772,7 @@ static int mv_ata_exec_ata_cmd_nondma(struct udevice *dev, int port, struct sata_fis_h2d *cfis, u8 *buffer, u32 len, u32 iswrite) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); int i; u16 *tp; @@ -823,7 +823,7 @@ static int mv_sata_identify(struct udevice *dev, int port, u16 *id) static void mv_sata_xfer_mode(struct udevice *dev, int port, u16 *id) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); priv->pio = id[ATA_ID_PIO_MODES]; priv->mwdma = id[ATA_ID_MWDMA_MODES]; @@ -834,7 +834,7 @@ static void mv_sata_xfer_mode(struct udevice *dev, int port, u16 *id) static void mv_sata_set_features(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); struct sata_fis_h2d cfis; u8 udma_cap; @@ -886,7 +886,7 @@ static void mvsata_ide_conf_mbus_windows(void) static int sata_mv_init_sata(struct udevice *dev, int port) { - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); debug("Initialize sata dev: %d\n", port); @@ -944,7 +944,7 @@ static int sata_mv_init_sata(struct udevice *dev, int port) static int sata_mv_scan_sata(struct udevice *dev, int port) { struct blk_desc *desc = dev_get_uclass_plat(dev); - struct mv_priv *priv = dev_get_platdata(dev); + struct mv_priv *priv = dev_get_plat(dev); unsigned char serial[ATA_ID_SERNO_LEN + 1]; unsigned char firmware[ATA_ID_FW_REV_LEN + 1]; unsigned char product[ATA_ID_PROD_LEN + 1]; @@ -1006,7 +1006,7 @@ static int sata_mv_scan_sata(struct udevice *dev, int port) static ulong sata_mv_read(struct udevice *blk, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - struct mv_priv *priv = dev_get_platdata(blk); + struct mv_priv *priv = dev_get_plat(blk); return ata_low_level_rw(blk, priv->dev_nr, blknr, blkcnt, buffer, READ_CMD); @@ -1015,7 +1015,7 @@ static ulong sata_mv_read(struct udevice *blk, lbaint_t blknr, static ulong sata_mv_write(struct udevice *blk, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - struct mv_priv *priv = dev_get_platdata(blk); + struct mv_priv *priv = dev_get_plat(blk); return ata_low_level_rw(blk, priv->dev_nr, blknr, blkcnt, (void *)buffer, WRITE_CMD); @@ -1055,7 +1055,7 @@ static int sata_mv_probe(struct udevice *dev) return ret; } - priv = dev_get_platdata(blk); + priv = dev_get_plat(blk); priv->dev_nr = i; /* Init SATA port */ diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 2bc3d228b2..7e4e97d803 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c @@ -492,7 +492,7 @@ ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer) static ulong sata_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - struct sil_sata_priv *priv = dev_get_platdata(dev); + struct sil_sata_priv *priv = dev_get_plat(dev); int port_number = priv->port_num; struct sil_sata *sata = priv->sil_sata_desc[port_number]; #endif @@ -517,7 +517,7 @@ ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer) ulong sata_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - struct sil_sata_priv *priv = dev_get_platdata(dev); + struct sil_sata_priv *priv = dev_get_plat(dev); int port_number = priv->port_num; struct sil_sata *sata = priv->sil_sata_desc[port_number]; #endif @@ -542,7 +542,7 @@ static int sil_init_sata(int dev) #else static int sil_init_sata(struct udevice *uc_dev, int dev) { - struct sil_sata_priv *priv = dev_get_platdata(uc_dev); + struct sil_sata_priv *priv = dev_get_plat(uc_dev); #endif struct sil_sata *sata; void *port; @@ -709,7 +709,7 @@ int scan_sata(int dev) static int scan_sata(struct udevice *blk_dev, int dev) { struct blk_desc *desc = dev_get_uclass_plat(blk_dev); - struct sil_sata_priv *priv = dev_get_platdata(blk_dev); + struct sil_sata_priv *priv = dev_get_plat(blk_dev); struct sil_sata *sata = priv->sil_sata_desc[dev]; #endif unsigned char serial[ATA_ID_SERNO_LEN + 1]; -- cgit v1.2.3