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 <sjg@chromium.org>
This commit is contained in:
Simon Glass 2020-12-03 16:55:20 -07:00
parent 4f50086ad6
commit c69cda25c9
333 changed files with 1009 additions and 1009 deletions

View File

@ -295,7 +295,7 @@ static int stm32mp_bsec_read_otp(struct udevice *dev, u32 *val, u32 otp)
STM32_SMC_READ_OTP,
otp, 0, val);
plat = dev_get_platdata(dev);
plat = dev_get_plat(dev);
/* read current shadow value */
ret = bsec_read_shadow(plat->base, &tmp_data, otp);
@ -326,14 +326,14 @@ static int stm32mp_bsec_read_shadow(struct udevice *dev, u32 *val, u32 otp)
STM32_SMC_READ_SHADOW,
otp, 0, val);
plat = dev_get_platdata(dev);
plat = dev_get_plat(dev);
return bsec_read_shadow(plat->base, val, otp);
}
static int stm32mp_bsec_read_lock(struct udevice *dev, u32 *val, u32 otp)
{
struct stm32mp_bsec_platdata *plat = dev_get_platdata(dev);
struct stm32mp_bsec_platdata *plat = dev_get_plat(dev);
/* return OTP permanent write lock status */
*val = bsec_read_lock(plat->base + BSEC_WRLOCK_OFF, otp);
@ -350,7 +350,7 @@ static int stm32mp_bsec_write_otp(struct udevice *dev, u32 val, u32 otp)
STM32_SMC_PROG_OTP,
otp, val);
plat = dev_get_platdata(dev);
plat = dev_get_plat(dev);
return bsec_program_otp(plat->base, val, otp);
@ -365,7 +365,7 @@ static int stm32mp_bsec_write_shadow(struct udevice *dev, u32 val, u32 otp)
STM32_SMC_WRITE_SHADOW,
otp, val);
plat = dev_get_platdata(dev);
plat = dev_get_plat(dev);
return bsec_write_shadow(plat->base, val, otp);
}
@ -475,7 +475,7 @@ static const struct misc_ops stm32mp_bsec_ops = {
static int stm32mp_bsec_ofdata_to_platdata(struct udevice *dev)
{
struct stm32mp_bsec_platdata *plat = dev_get_platdata(dev);
struct stm32mp_bsec_platdata *plat = dev_get_plat(dev);
plat->base = (u32)dev_read_addr_ptr(dev);
@ -493,7 +493,7 @@ static int stm32mp_bsec_probe(struct udevice *dev)
*/
if (!IS_ENABLED(CONFIG_TFABOOT) && !IS_ENABLED(CONFIG_SPL_BUILD)) {
plat = dev_get_platdata(dev);
plat = dev_get_plat(dev);
for (otp = 57; otp <= BSEC_OTP_MAX_VALUE; otp++)
if (!bsec_read_SR_lock(plat->base, otp))
@ -531,7 +531,7 @@ bool bsec_dbgswenable(void)
return false;
}
plat = dev_get_platdata(dev);
plat = dev_get_plat(dev);
if (readl(plat->base + BSEC_DENABLE_OFF) & BSEC_DENABLE_DBGSWENABLE)
return true;

View File

@ -158,7 +158,7 @@ static const struct nhlt_endp_descriptor dmic_4ch_descriptors[] = {
static int apl_hostbridge_early_init_pinctrl(struct udevice *dev)
{
struct apl_hostbridge_platdata *plat = dev_get_platdata(dev);
struct apl_hostbridge_platdata *plat = dev_get_plat(dev);
struct udevice *pinctrl;
int ret;
@ -172,7 +172,7 @@ static int apl_hostbridge_early_init_pinctrl(struct udevice *dev)
static int apl_hostbridge_early_init(struct udevice *dev)
{
struct apl_hostbridge_platdata *plat = dev_get_platdata(dev);
struct apl_hostbridge_platdata *plat = dev_get_plat(dev);
u32 region_size;
ulong base;
u32 reg;
@ -223,7 +223,7 @@ static int apl_hostbridge_early_init(struct udevice *dev)
static int apl_hostbridge_ofdata_to_platdata(struct udevice *dev)
{
struct apl_hostbridge_platdata *plat = dev_get_platdata(dev);
struct apl_hostbridge_platdata *plat = dev_get_plat(dev);
struct udevice *pinctrl;
int ret;

View File

@ -111,7 +111,7 @@ static int apl_global_reset_set_enable(struct udevice *dev, bool enable)
int apl_pmc_ofdata_to_uc_platdata(struct udevice *dev)
{
struct acpi_pmc_upriv *upriv = dev_get_uclass_priv(dev);
struct apl_pmc_platdata *plat = dev_get_platdata(dev);
struct apl_pmc_platdata *plat = dev_get_plat(dev);
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
u32 base[6];
@ -169,7 +169,7 @@ int apl_pmc_ofdata_to_uc_platdata(struct udevice *dev)
static int enable_pmcbar(struct udevice *dev)
{
struct acpi_pmc_upriv *upriv = dev_get_uclass_priv(dev);
struct apl_pmc_platdata *priv = dev_get_platdata(dev);
struct apl_pmc_platdata *priv = dev_get_plat(dev);
pci_dev_t pmc = priv->bdf;
/*

View File

@ -77,7 +77,7 @@ void apl_uart_init(pci_dev_t bdf, ulong base)
static int apl_ns16550_probe(struct udevice *dev)
{
struct ns16550_platdata *plat = dev_get_platdata(dev);
struct ns16550_platdata *plat = dev_get_plat(dev);
if (!CONFIG_IS_ENABLED(PCI))
apl_uart_init(plat->bdf, plat->base);
@ -88,7 +88,7 @@ static int apl_ns16550_probe(struct udevice *dev)
static int apl_ns16550_ofdata_to_platdata(struct udevice *dev)
{
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct dtd_intel_apl_ns16550 *dtplat = dev_get_platdata(dev);
struct dtd_intel_apl_ns16550 *dtplat = dev_get_plat(dev);
struct ns16550_platdata *plat;
/*

View File

@ -41,7 +41,7 @@ struct sata_platdata {
static void broadwell_sata_init(struct udevice *dev)
{
struct sata_platdata *plat = dev_get_platdata(dev);
struct sata_platdata *plat = dev_get_plat(dev);
u32 reg32;
u8 *abar;
u16 reg16;
@ -211,7 +211,7 @@ static void broadwell_sata_init(struct udevice *dev)
static int broadwell_sata_enable(struct udevice *dev)
{
struct sata_platdata *plat = dev_get_platdata(dev);
struct sata_platdata *plat = dev_get_plat(dev);
struct gpio_desc desc;
u16 map;
int ret;
@ -234,7 +234,7 @@ static int broadwell_sata_enable(struct udevice *dev)
static int broadwell_sata_ofdata_to_platdata(struct udevice *dev)
{
struct sata_platdata *plat = dev_get_platdata(dev);
struct sata_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
int node = dev_of_offset(dev);

View File

@ -184,7 +184,7 @@ static int itss_ofdata_to_platdata(struct udevice *dev)
int ret;
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct itss_platdata *plat = dev_get_platdata(dev);
struct itss_platdata *plat = dev_get_plat(dev);
struct dtd_intel_itss *dtplat = &plat->dtplat;
/*

View File

@ -57,7 +57,7 @@ struct p2sb_platdata {
*/
static int p2sb_early_init(struct udevice *dev)
{
struct p2sb_platdata *plat = dev_get_platdata(dev);
struct p2sb_platdata *plat = dev_get_plat(dev);
pci_dev_t pdev = plat->bdf;
/*
@ -93,7 +93,7 @@ static int p2sb_spl_init(struct udevice *dev)
int p2sb_ofdata_to_platdata(struct udevice *dev)
{
struct p2sb_uc_priv *upriv = dev_get_uclass_priv(dev);
struct p2sb_platdata *plat = dev_get_platdata(dev);
struct p2sb_platdata *plat = dev_get_plat(dev);
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
int ret;

View File

@ -348,7 +348,7 @@ int board_init(void)
uclass_find_first_device(UCLASS_VIDEO, &dev);
if (dev) {
struct atmel_lcd_platdata *plat = dev_get_platdata(dev);
struct atmel_lcd_platdata *plat = dev_get_plat(dev);
plat->timing_index = 1;
}

View File

@ -74,7 +74,7 @@ int do_demo_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
printf("entry %d - instance %08x, ops %08x, plat %08x\n",
i++, (uint)map_to_sysmem(dev),
(uint)map_to_sysmem(dev->driver->ops),
(uint)map_to_sysmem(dev_get_platdata(dev)));
(uint)map_to_sysmem(dev_get_plat(dev)));
}
return cmd_process_error(cmdtp, ret);

View File

@ -91,7 +91,7 @@ static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,
struct host_block_dev *host_dev;
#ifdef CONFIG_BLK
host_dev = dev_get_platdata(blk_dev->bdev);
host_dev = dev_get_plat(blk_dev->bdev);
#else
host_dev = blk_dev->priv;
#endif

View File

@ -207,7 +207,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
* is shared by all LUNs (block devices) attached to this mass storage
* device.
*/
data = dev_get_platdata(udev->dev);
data = dev_get_plat(udev->dev);
if (!usb_storage_probe(udev, 0, data))
return 0;
max_lun = usb_get_max_lun(data);

View File

@ -282,7 +282,7 @@ in drivers/demo/demo-simple.c:
static int simple_hello(struct udevice *dev, int ch)
{
const struct dm_demo_pdata *pdata = dev_get_platdata(dev);
const struct dm_demo_pdata *pdata = dev_get_plat(dev);
printf("Hello from %08x: %s %d\n", map_to_sysmem(dev),
pdata->colour, pdata->sides);

View File

@ -171,7 +171,7 @@ accessed using:
.. code-block:: c
struct udevice *dev;
struct dtd_rockchip_rk3288_dw_mshc *plat = dev_get_platdata(dev);
struct dtd_rockchip_rk3288_dw_mshc *plat = dev_get_plat(dev);
This avoids the code overhead of converting the device tree data to
platform data in the driver. The ofdata_to_platdata() method should
@ -258,7 +258,7 @@ For example:
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
/* Decode the device tree data */
struct mmc_platdata *plat = dev_get_platdata(dev);
struct mmc_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
int node = dev_of_offset(dev);
@ -270,7 +270,7 @@ For example:
static int mmc_probe(struct udevice *dev)
{
struct mmc_platdata *plat = dev_get_platdata(dev);
struct mmc_platdata *plat = dev_get_plat(dev);
#if CONFIG_IS_ENABLED(OF_PLATDATA)
/* Decode the of-platdata from the C structures */

View File

@ -357,7 +357,7 @@ what you can copy out to set things up.
static int exynos_spi_probe(struct udevice *bus)
{
struct exynos_spi_platdata *plat = dev_get_platdata(bus);
struct exynos_spi_platdata *plat = dev_get_plat(bus);
struct exynos_spi_priv *priv = dev_get_priv(bus);
priv->regs = plat->regs;
@ -585,7 +585,7 @@ The new version looks like this:
static void spi_cs_activate(struct udevice *dev)
{
struct udevice *bus = dev->parent;
struct exynos_spi_platdata *pdata = dev_get_platdata(bus);
struct exynos_spi_platdata *pdata = dev_get_plat(bus);
struct exynos_spi_priv *priv = dev_get_priv(bus);
/* If it's too soon to do another transaction, wait */

View File

@ -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);

View File

@ -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 */

View File

@ -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];

View File

@ -34,7 +34,7 @@ static unsigned long host_block_read(struct udevice *dev,
unsigned long start, lbaint_t blkcnt,
void *buffer)
{
struct host_block_dev *host_dev = dev_get_platdata(dev);
struct host_block_dev *host_dev = dev_get_plat(dev);
struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#else
@ -65,7 +65,7 @@ static unsigned long host_block_write(struct udevice *dev,
unsigned long start, lbaint_t blkcnt,
const void *buffer)
{
struct host_block_dev *host_dev = dev_get_platdata(dev);
struct host_block_dev *host_dev = dev_get_plat(dev);
struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#else
static unsigned long host_block_write(struct blk_desc *block_dev,
@ -133,7 +133,7 @@ int host_dev_bind(int devnum, char *filename)
if (ret)
goto err_file;
host_dev = dev_get_platdata(dev);
host_dev = dev_get_plat(dev);
host_dev->fd = fd;
host_dev->filename = fname;

View File

@ -73,7 +73,7 @@ struct v5l2_plat {
static int v5l2_enable(struct udevice *dev)
{
struct v5l2_plat *plat = dev_get_platdata(dev);
struct v5l2_plat *plat = dev_get_plat(dev);
volatile struct l2cache *regs = plat->regs;
if (regs)
@ -84,7 +84,7 @@ static int v5l2_enable(struct udevice *dev)
static int v5l2_disable(struct udevice *dev)
{
struct v5l2_plat *plat = dev_get_platdata(dev);
struct v5l2_plat *plat = dev_get_plat(dev);
volatile struct l2cache *regs = plat->regs;
u8 hart = gd->arch.boot_hart;
void __iomem *cctlcmd = (void __iomem *)CCTL_CMD_REG(regs, hart);
@ -106,7 +106,7 @@ static int v5l2_disable(struct udevice *dev)
static int v5l2_ofdata_to_platdata(struct udevice *dev)
{
struct v5l2_plat *plat = dev_get_platdata(dev);
struct v5l2_plat *plat = dev_get_plat(dev);
struct l2cache *regs;
regs = (struct l2cache *)dev_read_addr(dev);
@ -130,7 +130,7 @@ static int v5l2_ofdata_to_platdata(struct udevice *dev)
static int v5l2_probe(struct udevice *dev)
{
struct v5l2_plat *plat = dev_get_platdata(dev);
struct v5l2_plat *plat = dev_get_plat(dev);
struct l2cache *regs = plat->regs;
u32 ctl_val;

View File

@ -236,7 +236,7 @@ static u32 calc_vocalib_pll(u32 pllm, u32 pllglob)
static void clk_basic_init(struct udevice *dev,
const struct cm_config * const cfg)
{
struct socfpga_clk_platdata *plat = dev_get_platdata(dev);
struct socfpga_clk_platdata *plat = dev_get_plat(dev);
u32 vcocalib;
if (!cfg)
@ -585,7 +585,7 @@ static u32 clk_get_emac_clk_hz(struct socfpga_clk_platdata *plat, u32 emac_id)
static ulong socfpga_clk_get_rate(struct clk *clk)
{
struct socfpga_clk_platdata *plat = dev_get_platdata(clk->dev);
struct socfpga_clk_platdata *plat = dev_get_plat(clk->dev);
switch (clk->id) {
case AGILEX_MPU_CLK:
@ -630,7 +630,7 @@ static int socfpga_clk_probe(struct udevice *dev)
static int socfpga_clk_ofdata_to_platdata(struct udevice *dev)
{
struct socfpga_clk_platdata *plat = dev_get_platdata(dev);
struct socfpga_clk_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
addr = dev_read_addr(dev);

View File

@ -43,7 +43,7 @@ struct socfpga_a10_clk_platdata {
static int socfpga_a10_clk_get_upstream(struct clk *clk, struct clk **upclk)
{
struct socfpga_a10_clk_platdata *plat = dev_get_platdata(clk->dev);
struct socfpga_a10_clk_platdata *plat = dev_get_plat(clk->dev);
u32 reg, maxval;
if (plat->clks.count == 0)
@ -84,7 +84,7 @@ static int socfpga_a10_clk_get_upstream(struct clk *clk, struct clk **upclk)
static int socfpga_a10_clk_endisable(struct clk *clk, bool enable)
{
struct socfpga_a10_clk_platdata *plat = dev_get_platdata(clk->dev);
struct socfpga_a10_clk_platdata *plat = dev_get_plat(clk->dev);
struct clk *upclk = NULL;
int ret;
@ -120,7 +120,7 @@ static int socfpga_a10_clk_disable(struct clk *clk)
static ulong socfpga_a10_clk_get_rate(struct clk *clk)
{
struct socfpga_a10_clk_platdata *plat = dev_get_platdata(clk->dev);
struct socfpga_a10_clk_platdata *plat = dev_get_plat(clk->dev);
struct clk *upclk = NULL;
ulong rate = 0, reg, numer, denom;
int ret;
@ -190,7 +190,7 @@ static struct clk_ops socfpga_a10_clk_ops = {
*/
static void socfpga_a10_handoff_workaround(struct udevice *dev)
{
struct socfpga_a10_clk_platdata *plat = dev_get_platdata(dev);
struct socfpga_a10_clk_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
struct clk_bulk *bulk = &plat->clks;
int i, ret, offset = dev_of_offset(dev);
@ -274,7 +274,7 @@ static int socfpga_a10_clk_bind(struct udevice *dev)
static int socfpga_a10_clk_probe(struct udevice *dev)
{
struct socfpga_a10_clk_platdata *plat = dev_get_platdata(dev);
struct socfpga_a10_clk_platdata *plat = dev_get_plat(dev);
struct socfpga_a10_clk_platdata *pplat;
struct udevice *pdev;
const void *fdt = gd->fdt_blob;
@ -291,7 +291,7 @@ static int socfpga_a10_clk_probe(struct udevice *dev)
if (!pdev)
return -ENODEV;
pplat = dev_get_platdata(pdev);
pplat = dev_get_plat(pdev);
if (!pplat)
return -EINVAL;
@ -321,7 +321,7 @@ static int socfpga_a10_clk_probe(struct udevice *dev)
static int socfpga_a10_ofdata_to_platdata(struct udevice *dev)
{
struct socfpga_a10_clk_platdata *plat = dev_get_platdata(dev);
struct socfpga_a10_clk_platdata *plat = dev_get_plat(dev);
unsigned int divreg[3], gatereg[2];
int ret;

View File

@ -45,7 +45,7 @@ U_BOOT_DRIVER(at91_pmc) = {
static int at91_pmc_core_probe(struct udevice *dev)
{
struct pmc_platdata *plat = dev_get_platdata(dev);
struct pmc_platdata *plat = dev_get_plat(dev);
dev = dev_get_parent(dev);
@ -115,7 +115,7 @@ int at91_clk_of_xlate(struct clk *clk, struct ofnode_phandle_args *args)
int at91_clk_probe(struct udevice *dev)
{
struct udevice *dev_periph_container, *dev_pmc;
struct pmc_platdata *plat = dev_get_platdata(dev);
struct pmc_platdata *plat = dev_get_plat(dev);
dev_periph_container = dev_get_parent(dev);
dev_pmc = dev_get_parent(dev_periph_container);
@ -191,7 +191,7 @@ U_BOOT_DRIVER(at91_master_clk) = {
/* Main osc clock specific code. */
static int main_osc_clk_enable(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
if (readl(&pmc->sr) & AT91_PMC_MOSCSELS)
@ -232,7 +232,7 @@ U_BOOT_DRIVER(at91sam9x5_main_osc_clk) = {
/* PLLA clock specific code. */
static int plla_clk_enable(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
if (readl(&pmc->sr) & AT91_PMC_LOCKA)
@ -278,7 +278,7 @@ static int at91_plladiv_clk_enable(struct clk *clk)
static ulong at91_plladiv_clk_get_rate(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
struct clk source;
ulong clk_rate;
@ -297,7 +297,7 @@ static ulong at91_plladiv_clk_get_rate(struct clk *clk)
static ulong at91_plladiv_clk_set_rate(struct clk *clk, ulong rate)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
struct clk source;
ulong parent_rate;
@ -401,7 +401,7 @@ static ulong system_clk_set_rate(struct clk *clk, ulong rate)
static int system_clk_enable(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
u32 mask;
@ -483,7 +483,7 @@ U_BOOT_DRIVER(sam9x5_periph_clk) = {
static int periph_clk_enable(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
enum periph_clk_type clk_type;
void *addr;
@ -552,7 +552,7 @@ U_BOOT_DRIVER(clk_periph) = {
static int utmi_clk_enable(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
struct clk clk_dev;
ulong clk_rate;
@ -640,7 +640,7 @@ static struct clk_ops utmi_clk_ops = {
static int utmi_clk_ofdata_to_platdata(struct udevice *dev)
{
struct pmc_platdata *plat = dev_get_platdata(dev);
struct pmc_platdata *plat = dev_get_plat(dev);
struct udevice *syscon;
uclass_get_device_by_phandle(UCLASS_SYSCON, dev,
@ -681,7 +681,7 @@ U_BOOT_DRIVER(at91sam9x5_utmi_clk) = {
static ulong sama5d4_h32mx_clk_get_rate(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
ulong rate = gd->arch.mck_rate_hz;
@ -754,7 +754,7 @@ struct generic_clk_priv {
static ulong generic_clk_get_rate(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
struct clk parent;
ulong clk_rate;
@ -782,7 +782,7 @@ static ulong generic_clk_get_rate(struct clk *clk)
static ulong generic_clk_set_rate(struct clk *clk, ulong rate)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
struct generic_clk_priv *priv = dev_get_priv(clk->dev);
struct clk parent, best_parent;
@ -895,7 +895,7 @@ struct at91_usb_clk_priv {
static ulong at91_usb_clk_get_rate(struct clk *clk)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
struct clk source;
u32 tmp, usbdiv;
@ -916,7 +916,7 @@ static ulong at91_usb_clk_get_rate(struct clk *clk)
static ulong at91_usb_clk_set_rate(struct clk *clk, ulong rate)
{
struct pmc_platdata *plat = dev_get_platdata(clk->dev);
struct pmc_platdata *plat = dev_get_plat(clk->dev);
struct at91_pmc *pmc = plat->reg_base;
struct at91_usb_clk_priv *priv = dev_get_priv(clk->dev);
struct clk source, best_source;

View File

@ -28,7 +28,7 @@ static uint32_t ext_field(uint32_t val, uint32_t mask)
static ulong clk_boston_get_rate(struct clk *clk)
{
struct clk_boston *state = dev_get_platdata(clk->dev);
struct clk_boston *state = dev_get_plat(clk->dev);
uint32_t in_rate, mul, div;
uint mmcmdiv;
int err;
@ -60,7 +60,7 @@ const struct clk_ops clk_boston_ops = {
static int clk_boston_ofdata_to_platdata(struct udevice *dev)
{
struct clk_boston *state = dev_get_platdata(dev);
struct clk_boston *state = dev_get_plat(dev);
struct udevice *syscon;
int err;

View File

@ -18,7 +18,7 @@ struct clk_fixed_factor {
};
#define to_clk_fixed_factor(dev) \
((struct clk_fixed_factor *)dev_get_platdata(dev))
((struct clk_fixed_factor *)dev_get_plat(dev))
static ulong clk_fixed_factor_get_rate(struct clk *clk)
{

View File

@ -561,7 +561,7 @@ static int rk3188_clk_probe(struct udevice *dev)
#ifdef CONFIG_SPL_BUILD
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3188_clk_plat *plat = dev_get_platdata(dev);
struct rk3188_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
#endif

View File

@ -975,7 +975,7 @@ static int rk3288_clk_probe(struct udevice *dev)
return PTR_ERR(priv->grf);
#ifdef CONFIG_SPL_BUILD
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3288_clk_plat *plat = dev_get_platdata(dev);
struct rk3288_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
#endif

View File

@ -582,7 +582,7 @@ static int rk3368_clk_probe(struct udevice *dev)
{
struct rk3368_clk_priv __maybe_unused *priv = dev_get_priv(dev);
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3368_clk_plat *plat = dev_get_platdata(dev);
struct rk3368_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
#endif

View File

@ -1378,7 +1378,7 @@ static int rk3399_clk_probe(struct udevice *dev)
bool init_clocks = false;
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3399_clk_plat *plat = dev_get_platdata(dev);
struct rk3399_clk_plat *plat = dev_get_plat(dev);
priv->cru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
#endif
@ -1599,7 +1599,7 @@ static int rk3399_pmuclk_probe(struct udevice *dev)
#endif
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3399_pmuclk_plat *plat = dev_get_platdata(dev);
struct rk3399_pmuclk_plat *plat = dev_get_plat(dev);
priv->pmucru = map_sysmem(plat->dtd.reg[0], plat->dtd.reg[1]);
#endif

View File

@ -517,7 +517,7 @@ fail:
return ret;
}
void *dev_get_platdata(const struct udevice *dev)
void *dev_get_plat(const struct udevice *dev)
{
if (!dev) {
dm_warn("%s: null device\n", __func__);

View File

@ -56,7 +56,7 @@ static int syscon_pre_probe(struct udevice *dev)
* using OF_PLATDATA will need to ensure that this is true.
*/
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct syscon_base_platdata *plat = dev_get_platdata(dev);
struct syscon_base_platdata *plat = dev_get_plat(dev);
return regmap_init_mem_platdata(dev, plat->reg, ARRAY_SIZE(plat->reg),
&priv->regmap);

View File

@ -27,7 +27,7 @@ const char *at91_cpu_get_name(void)
int at91_cpu_get_desc(const struct udevice *dev, char *buf, int size)
{
struct at91_cpu_platdata *plat = dev_get_platdata(dev);
struct at91_cpu_platdata *plat = dev_get_plat(dev);
snprintf(buf, size, "%s\n"
"Crystal frequency: %8lu MHz\n"
@ -41,7 +41,7 @@ int at91_cpu_get_desc(const struct udevice *dev, char *buf, int size)
static int at91_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
{
struct at91_cpu_platdata *plat = dev_get_platdata(dev);
struct at91_cpu_platdata *plat = dev_get_plat(dev);
info->cpu_freq = plat->cpufreq_mhz * 1000000;
info->features = BIT(CPU_FEAT_L1_CACHE);
@ -75,7 +75,7 @@ static const struct udevice_id at91_cpu_ids[] = {
static int at91_cpu_probe(struct udevice *dev)
{
struct at91_cpu_platdata *plat = dev_get_platdata(dev);
struct at91_cpu_platdata *plat = dev_get_plat(dev);
struct clk clk;
ulong rate;
int ret;

View File

@ -55,7 +55,7 @@ const char *get_imx8_rev(u32 rev)
static void set_core_data(struct udevice *dev)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
struct cpu_imx_platdata *plat = dev_get_plat(dev);
if (device_is_compatible(dev, "arm,cortex-a35")) {
plat->cpu_rsrc = SC_R_A35;
@ -102,7 +102,7 @@ static int cpu_imx_get_temp(struct cpu_imx_platdata *plat)
int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
struct cpu_imx_platdata *plat = dev_get_plat(dev);
int ret, temp;
if (size < 100)
@ -128,7 +128,7 @@ int cpu_imx_get_desc(const struct udevice *dev, char *buf, int size)
static int cpu_imx_get_info(const struct udevice *dev, struct cpu_info *info)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
struct cpu_imx_platdata *plat = dev_get_plat(dev);
info->cpu_freq = plat->freq_mhz * 1000;
info->features = BIT(CPU_FEAT_L1_CACHE) | BIT(CPU_FEAT_MMU);
@ -165,7 +165,7 @@ static int cpu_imx_get_vendor(const struct udevice *dev, char *buf, int size)
static int cpu_imx_is_current(struct udevice *dev)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
struct cpu_imx_platdata *plat = dev_get_plat(dev);
if (plat->mpidr == (read_mpidr() & 0xffff))
return 1;
@ -190,7 +190,7 @@ static const struct udevice_id cpu_imx8_ids[] = {
static ulong imx8_get_cpu_rate(struct udevice *dev)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
struct cpu_imx_platdata *plat = dev_get_plat(dev);
ulong rate;
int ret;
@ -206,7 +206,7 @@ static ulong imx8_get_cpu_rate(struct udevice *dev)
static int imx8_cpu_probe(struct udevice *dev)
{
struct cpu_imx_platdata *plat = dev_get_platdata(dev);
struct cpu_imx_platdata *plat = dev_get_plat(dev);
u32 cpurev;
set_core_data(dev);

View File

@ -28,7 +28,7 @@ struct shape_data {
/* Crazy little function to draw shapes on the console */
static int shape_hello(struct udevice *dev, int ch)
{
const struct dm_demo_pdata *pdata = dev_get_platdata(dev);
const struct dm_demo_pdata *pdata = dev_get_plat(dev);
struct shape_data *data = dev_get_priv(dev);
static const struct shape {
int start;
@ -142,7 +142,7 @@ static const struct demo_ops shape_ops = {
static int shape_ofdata_to_platdata(struct udevice *dev)
{
struct dm_demo_pdata *pdata = dev_get_platdata(dev);
struct dm_demo_pdata *pdata = dev_get_plat(dev);
int ret;
/* Parse the data that is common with all demo devices */

View File

@ -14,7 +14,7 @@
static int simple_hello(struct udevice *dev, int ch)
{
const struct dm_demo_pdata *pdata = dev_get_platdata(dev);
const struct dm_demo_pdata *pdata = dev_get_plat(dev);
printf("Hello from %08x: %s %d\n", (uint)map_to_sysmem(dev), pdata->colour,
pdata->sides);

View File

@ -65,7 +65,7 @@ int demo_set_light(struct udevice *dev, int light)
int demo_parse_dt(struct udevice *dev)
{
struct dm_demo_pdata *pdata = dev_get_platdata(dev);
struct dm_demo_pdata *pdata = dev_get_plat(dev);
int dn = dev_of_offset(dev);
pdata->sides = fdtdec_get_int(gd->fdt_blob, dn, "sides", 0);

View File

@ -27,7 +27,7 @@ struct altera_pio_platdata {
static int altera_pio_direction_input(struct udevice *dev, unsigned pin)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
struct altera_pio_platdata *plat = dev_get_plat(dev);
struct altera_pio_regs *const regs = plat->regs;
clrbits_le32(&regs->direction, 1 << pin);
@ -38,7 +38,7 @@ static int altera_pio_direction_input(struct udevice *dev, unsigned pin)
static int altera_pio_direction_output(struct udevice *dev, unsigned pin,
int val)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
struct altera_pio_platdata *plat = dev_get_plat(dev);
struct altera_pio_regs *const regs = plat->regs;
if (val)
@ -53,7 +53,7 @@ static int altera_pio_direction_output(struct udevice *dev, unsigned pin,
static int altera_pio_get_value(struct udevice *dev, unsigned pin)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
struct altera_pio_platdata *plat = dev_get_plat(dev);
struct altera_pio_regs *const regs = plat->regs;
return !!(readl(&regs->data) & (1 << pin));
@ -62,7 +62,7 @@ static int altera_pio_get_value(struct udevice *dev, unsigned pin)
static int altera_pio_set_value(struct udevice *dev, unsigned pin, int val)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
struct altera_pio_platdata *plat = dev_get_plat(dev);
struct altera_pio_regs *const regs = plat->regs;
if (val)
@ -76,7 +76,7 @@ static int altera_pio_set_value(struct udevice *dev, unsigned pin, int val)
static int altera_pio_probe(struct udevice *dev)
{
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct altera_pio_platdata *plat = dev_get_platdata(dev);
struct altera_pio_platdata *plat = dev_get_plat(dev);
uc_priv->gpio_count = plat->gpio_count;
uc_priv->bank_name = plat->bank_name;
@ -86,7 +86,7 @@ static int altera_pio_probe(struct udevice *dev)
static int altera_pio_ofdata_to_platdata(struct udevice *dev)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
struct altera_pio_platdata *plat = dev_get_plat(dev);
plat->regs = map_physmem(dev_read_addr(dev),
sizeof(struct altera_pio_regs),

View File

@ -590,7 +590,7 @@ static const struct dm_gpio_ops gpio_at91_ops = {
static int at91_gpio_probe(struct udevice *dev)
{
struct at91_port_priv *port = dev_get_priv(dev);
struct at91_port_platdata *plat = dev_get_platdata(dev);
struct at91_port_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct clk clk;
int ret;

View File

@ -183,7 +183,7 @@ struct atmel_pio4_platdata {
static struct atmel_pio4_port *atmel_pio4_bank_base(struct udevice *dev,
u32 bank)
{
struct atmel_pio4_platdata *plat = dev_get_platdata(dev);
struct atmel_pio4_platdata *plat = dev_get_plat(dev);
struct atmel_pio4_port *port_base =
(struct atmel_pio4_port *)((u32)plat->reg_base +
ATMEL_PIO_BANK_OFFSET * bank);
@ -281,7 +281,7 @@ static int atmel_pio4_bind(struct udevice *dev)
static int atmel_pio4_probe(struct udevice *dev)
{
struct atmel_pio4_platdata *plat = dev_get_platdata(dev);
struct atmel_pio4_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct atmel_pioctrl_data *pioctrl_data;
struct clk clk;

View File

@ -102,7 +102,7 @@ static const struct dm_gpio_ops gpio_bcm2835_ops = {
static int bcm2835_gpio_probe(struct udevice *dev)
{
struct bcm2835_gpios *gpios = dev_get_priv(dev);
struct bcm2835_gpio_platdata *plat = dev_get_platdata(dev);
struct bcm2835_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
uc_priv->bank_name = "GPIO";
@ -118,7 +118,7 @@ static int bcm2835_gpio_probe(struct udevice *dev)
#if CONFIG_IS_ENABLED(OF_CONTROL)
static int bcm2835_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct bcm2835_gpio_platdata *plat = dev_get_platdata(dev);
struct bcm2835_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
addr = dev_read_addr(dev);

View File

@ -522,7 +522,7 @@ static const struct dm_gpio_ops gpio_davinci_ops = {
static int davinci_gpio_probe(struct udevice *dev)
{
struct davinci_gpio_bank *bank = dev_get_priv(dev);
struct davinci_gpio_platdata *plat = dev_get_platdata(dev);
struct davinci_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
@ -542,7 +542,7 @@ static const struct udevice_id davinci_gpio_ids[] = {
static int davinci_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct davinci_gpio_platdata *plat = dev_get_platdata(dev);
struct davinci_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
addr = dev_read_addr(dev);

View File

@ -45,7 +45,7 @@ struct gpio_dwapb_platdata {
static int dwapb_gpio_direction_input(struct udevice *dev, unsigned pin)
{
struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);
struct gpio_dwapb_platdata *plat = dev_get_plat(dev);
clrbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin);
return 0;
@ -54,7 +54,7 @@ static int dwapb_gpio_direction_input(struct udevice *dev, unsigned pin)
static int dwapb_gpio_direction_output(struct udevice *dev, unsigned pin,
int val)
{
struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);
struct gpio_dwapb_platdata *plat = dev_get_plat(dev);
setbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin);
@ -68,7 +68,7 @@ static int dwapb_gpio_direction_output(struct udevice *dev, unsigned pin,
static int dwapb_gpio_set_value(struct udevice *dev, unsigned pin, int val)
{
struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);
struct gpio_dwapb_platdata *plat = dev_get_plat(dev);
if (val)
setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin);
@ -80,7 +80,7 @@ static int dwapb_gpio_set_value(struct udevice *dev, unsigned pin, int val)
static int dwapb_gpio_get_function(struct udevice *dev, unsigned offset)
{
struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);
struct gpio_dwapb_platdata *plat = dev_get_plat(dev);
u32 gpio;
gpio = readl(plat->base + GPIO_SWPORT_DDR(plat->bank));
@ -93,7 +93,7 @@ static int dwapb_gpio_get_function(struct udevice *dev, unsigned offset)
static int dwapb_gpio_get_value(struct udevice *dev, unsigned pin)
{
struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);
struct gpio_dwapb_platdata *plat = dev_get_plat(dev);
u32 value;
if (dwapb_gpio_get_function(dev, pin) == GPIOF_OUTPUT)
@ -156,7 +156,7 @@ static int gpio_dwapb_probe(struct udevice *dev)
static int gpio_dwapb_bind(struct udevice *dev)
{
struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);
struct gpio_dwapb_platdata *plat = dev_get_plat(dev);
struct udevice *subdev;
fdt_addr_t base;
int ret, bank = 0;
@ -215,7 +215,7 @@ static int gpio_dwapb_bind(struct udevice *dev)
static int gpio_dwapb_remove(struct udevice *dev)
{
struct gpio_dwapb_platdata *plat = dev_get_platdata(dev);
struct gpio_dwapb_platdata *plat = dev_get_plat(dev);
struct gpio_dwapb_priv *priv = dev_get_priv(dev);
if (!plat && priv)

View File

@ -241,7 +241,7 @@ struct gpio_hog_data {
static int gpio_hog_ofdata_to_platdata(struct udevice *dev)
{
struct gpio_hog_data *plat = dev_get_platdata(dev);
struct gpio_hog_data *plat = dev_get_plat(dev);
const char *nodename;
int ret;
@ -272,7 +272,7 @@ static int gpio_hog_ofdata_to_platdata(struct udevice *dev)
static int gpio_hog_probe(struct udevice *dev)
{
struct gpio_hog_data *plat = dev_get_platdata(dev);
struct gpio_hog_data *plat = dev_get_plat(dev);
struct gpio_hog_priv *priv = dev_get_priv(dev);
int ret;

View File

@ -66,7 +66,7 @@ static const struct dm_gpio_ops gpio_hi6220_ops = {
static int hi6220_gpio_probe(struct udevice *dev)
{
struct gpio_bank *bank = dev_get_priv(dev);
struct hikey_gpio_platdata *plat = dev_get_platdata(dev);
struct hikey_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev->uclass_priv;
char name[18], *str;

View File

@ -132,7 +132,7 @@ static const struct dm_gpio_ops imx_rgpio2p_ops = {
static int imx_rgpio2p_probe(struct udevice *dev)
{
struct imx_rgpio2p_data *bank = dev_get_priv(dev);
struct imx_rgpio2p_plat *plat = dev_get_platdata(dev);
struct imx_rgpio2p_plat *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
int banknum;
char name[18], *str;

View File

@ -117,7 +117,7 @@ static int broadwell_gpio_get_function(struct udevice *dev, unsigned offset)
static int broadwell_gpio_probe(struct udevice *dev)
{
struct broadwell_bank_platdata *plat = dev_get_platdata(dev);
struct broadwell_bank_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct broadwell_bank_priv *priv = dev_get_priv(dev);
struct udevice *pinctrl;
@ -141,7 +141,7 @@ static int broadwell_gpio_probe(struct udevice *dev)
static int broadwell_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct broadwell_bank_platdata *plat = dev_get_platdata(dev);
struct broadwell_bank_platdata *plat = dev_get_plat(dev);
u32 gpiobase;
int bank;
int ret;

View File

@ -95,7 +95,7 @@ static int _ich6_gpio_set_direction(uint16_t base, unsigned offset, int dir)
static int gpio_ich6_ofdata_to_platdata(struct udevice *dev)
{
struct ich6_bank_platdata *plat = dev_get_platdata(dev);
struct ich6_bank_platdata *plat = dev_get_plat(dev);
u32 gpiobase;
int offset;
int ret;
@ -119,7 +119,7 @@ static int gpio_ich6_ofdata_to_platdata(struct udevice *dev)
static int ich6_gpio_probe(struct udevice *dev)
{
struct ich6_bank_platdata *plat = dev_get_platdata(dev);
struct ich6_bank_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct ich6_bank_priv *bank = dev_get_priv(dev);
const void *prop;

View File

@ -127,7 +127,7 @@ static u32 iproc_get_pctrl_from_gpio(struct iproc_gpio_platdata *plat, u32 gpio)
*/
static int iproc_get_gpio_pctrl_mapping(struct udevice *dev)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
struct iproc_gpio_pctrl_map *range = NULL;
struct ofnode_phandle_args args;
int index = 0, ret;
@ -153,7 +153,7 @@ static int iproc_get_gpio_pctrl_mapping(struct udevice *dev)
static int iproc_gpio_request(struct udevice *dev, u32 gpio, const char *label)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
u32 pctrl;
/* nothing to do if there is no corresponding pinctrl device */
@ -167,7 +167,7 @@ static int iproc_gpio_request(struct udevice *dev, u32 gpio, const char *label)
static int iproc_gpio_direction_input(struct udevice *dev, u32 gpio)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
iproc_gpio_set_bit(plat, OUT_EN_OFFSET, gpio, false);
dev_dbg(dev, "gpio:%u set input\n", gpio);
@ -177,7 +177,7 @@ static int iproc_gpio_direction_input(struct udevice *dev, u32 gpio)
static int iproc_gpio_direction_output(struct udevice *dev, u32 gpio, int value)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
iproc_gpio_set_bit(plat, OUT_EN_OFFSET, gpio, true);
iproc_gpio_set_bit(plat, DATA_OUT_OFFSET, gpio, value);
@ -188,7 +188,7 @@ static int iproc_gpio_direction_output(struct udevice *dev, u32 gpio, int value)
static int iproc_gpio_get_value(struct udevice *dev, u32 gpio)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
int value;
value = iproc_gpio_get_bit(plat, DATA_IN_OFFSET, gpio);
@ -199,7 +199,7 @@ static int iproc_gpio_get_value(struct udevice *dev, u32 gpio)
static int iproc_gpio_set_value(struct udevice *dev, u32 gpio, int value)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
if (iproc_gpio_get_bit(plat, OUT_EN_OFFSET, gpio))
iproc_gpio_set_bit(plat, DATA_OUT_OFFSET, gpio, value);
@ -210,7 +210,7 @@ static int iproc_gpio_set_value(struct udevice *dev, u32 gpio, int value)
static int iproc_gpio_get_function(struct udevice *dev, u32 gpio)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
if (iproc_gpio_get_bit(plat, OUT_EN_OFFSET, gpio))
return GPIOF_OUTPUT;
@ -220,7 +220,7 @@ static int iproc_gpio_get_function(struct udevice *dev, u32 gpio)
static int iproc_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct iproc_gpio_platdata *plat = dev_get_platdata(dev);
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
int ret;
char name[10];

View File

@ -63,7 +63,7 @@ static int mpc83xx_spisel_boot_get_function(struct udevice *dev, uint gpio)
#if CONFIG_IS_ENABLED(OF_CONTROL)
static int mpc83xx_spisel_boot_ofdata_to_platdata(struct udevice *dev)
{
struct mpc8xxx_gpio_plat *plat = dev_get_platdata(dev);
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
fdt_addr_t addr;
u32 reg[2];
@ -81,7 +81,7 @@ static int mpc83xx_spisel_boot_ofdata_to_platdata(struct udevice *dev)
static int mpc83xx_spisel_boot_platdata_to_priv(struct udevice *dev)
{
struct mpc83xx_spisel_boot *priv = dev_get_priv(dev);
struct mpc8xxx_gpio_plat *plat = dev_get_platdata(dev);
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
unsigned long size = plat->size;
ulong driver_data = dev_get_driver_data(dev);

View File

@ -185,7 +185,7 @@ static int mpc8xxx_gpio_get_function(struct udevice *dev, uint gpio)
#if CONFIG_IS_ENABLED(OF_CONTROL)
static int mpc8xxx_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct mpc8xxx_gpio_plat *plat = dev_get_platdata(dev);
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
struct mpc8xxx_gpio_data *data = dev_get_priv(dev);
fdt_addr_t addr;
u32 i;
@ -222,7 +222,7 @@ static int mpc8xxx_gpio_ofdata_to_platdata(struct udevice *dev)
static int mpc8xxx_gpio_platdata_to_priv(struct udevice *dev)
{
struct mpc8xxx_gpio_data *priv = dev_get_priv(dev);
struct mpc8xxx_gpio_plat *plat = dev_get_platdata(dev);
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
unsigned long size = plat->size;
ulong driver_data = dev_get_driver_data(dev);

View File

@ -51,7 +51,7 @@ static u32 reg_offs(struct mediatek_gpio_platdata *plat, int reg)
static int mediatek_gpio_get_value(struct udevice *dev, unsigned int offset)
{
struct mediatek_gpio_platdata *plat = dev_get_platdata(dev);
struct mediatek_gpio_platdata *plat = dev_get_plat(dev);
return !!(ioread32(mediatek_gpio_membase +
reg_offs(plat, GPIO_REG_DATA)) & BIT(offset));
@ -60,7 +60,7 @@ static int mediatek_gpio_get_value(struct udevice *dev, unsigned int offset)
static int mediatek_gpio_set_value(struct udevice *dev, unsigned int offset,
int value)
{
struct mediatek_gpio_platdata *plat = dev_get_platdata(dev);
struct mediatek_gpio_platdata *plat = dev_get_plat(dev);
iowrite32(BIT(offset), mediatek_gpio_membase +
reg_offs(plat, value ? GPIO_REG_DSET : GPIO_REG_DCLR));
@ -70,7 +70,7 @@ static int mediatek_gpio_set_value(struct udevice *dev, unsigned int offset,
static int mediatek_gpio_direction_input(struct udevice *dev, unsigned int offset)
{
struct mediatek_gpio_platdata *plat = dev_get_platdata(dev);
struct mediatek_gpio_platdata *plat = dev_get_plat(dev);
clrbits_le32(mediatek_gpio_membase + reg_offs(plat, GPIO_REG_CTRL),
BIT(offset));
@ -81,7 +81,7 @@ static int mediatek_gpio_direction_input(struct udevice *dev, unsigned int offse
static int mediatek_gpio_direction_output(struct udevice *dev, unsigned int offset,
int value)
{
struct mediatek_gpio_platdata *plat = dev_get_platdata(dev);
struct mediatek_gpio_platdata *plat = dev_get_plat(dev);
setbits_le32(mediatek_gpio_membase + reg_offs(plat, GPIO_REG_CTRL),
BIT(offset));
@ -92,7 +92,7 @@ static int mediatek_gpio_direction_output(struct udevice *dev, unsigned int offs
static int mediatek_gpio_get_function(struct udevice *dev, unsigned int offset)
{
struct mediatek_gpio_platdata *plat = dev_get_platdata(dev);
struct mediatek_gpio_platdata *plat = dev_get_plat(dev);
u32 t;
t = ioread32(mediatek_gpio_membase + reg_offs(plat, GPIO_REG_CTRL));
@ -112,7 +112,7 @@ static const struct dm_gpio_ops gpio_mediatek_ops = {
static int gpio_mediatek_probe(struct udevice *dev)
{
struct mediatek_gpio_platdata *plat = dev_get_platdata(dev);
struct mediatek_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
/* Tell the uclass how many GPIOs we have */

View File

@ -281,7 +281,7 @@ static const struct dm_gpio_ops gpio_mxc_ops = {
static int mxc_gpio_probe(struct udevice *dev)
{
struct mxc_bank_info *bank = dev_get_priv(dev);
struct mxc_gpio_plat *plat = dev_get_platdata(dev);
struct mxc_gpio_plat *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
int banknum;
char name[18], *str;
@ -309,7 +309,7 @@ static int mxc_gpio_probe(struct udevice *dev)
static int mxc_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct mxc_gpio_plat *plat = dev_get_platdata(dev);
struct mxc_gpio_plat *plat = dev_get_plat(dev);
if (!CONFIG_IS_ENABLED(OF_PLATDATA)) {
fdt_addr_t addr;
addr = dev_read_addr(dev);

View File

@ -235,7 +235,7 @@ static const struct dm_gpio_ops gpio_mxs_ops = {
static int mxs_gpio_probe(struct udevice *dev)
{
struct mxs_gpio_platdata *plat = dev_get_platdata(dev);
struct mxs_gpio_platdata *plat = dev_get_plat(dev);
struct mxs_gpio_priv *priv = dev_get_priv(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
char name[16], *str;

View File

@ -44,7 +44,7 @@ struct nx_gpio_platdata {
static int nx_alive_gpio_is_check(struct udevice *dev)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
const char *bank_name = plat->bank_name;
if (!strcmp(bank_name, "gpio_alv"))
@ -55,7 +55,7 @@ static int nx_alive_gpio_is_check(struct udevice *dev)
static int nx_alive_gpio_direction_input(struct udevice *dev, unsigned int pin)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
setbits_le32(&regs->outputenb_reset, 1 << pin);
@ -66,7 +66,7 @@ static int nx_alive_gpio_direction_input(struct udevice *dev, unsigned int pin)
static int nx_alive_gpio_direction_output(struct udevice *dev, unsigned int pin,
int val)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
if (val)
@ -81,7 +81,7 @@ static int nx_alive_gpio_direction_output(struct udevice *dev, unsigned int pin,
static int nx_alive_gpio_get_value(struct udevice *dev, unsigned int pin)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
unsigned int mask = 1UL << pin;
unsigned int value;
@ -94,7 +94,7 @@ static int nx_alive_gpio_get_value(struct udevice *dev, unsigned int pin)
static int nx_alive_gpio_set_value(struct udevice *dev, unsigned int pin,
int val)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
if (val)
@ -107,7 +107,7 @@ static int nx_alive_gpio_set_value(struct udevice *dev, unsigned int pin,
static int nx_alive_gpio_get_function(struct udevice *dev, unsigned int pin)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
unsigned int mask = (1UL << pin);
unsigned int output;
@ -122,7 +122,7 @@ static int nx_alive_gpio_get_function(struct udevice *dev, unsigned int pin)
static int nx_gpio_direction_input(struct udevice *dev, unsigned int pin)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
if (nx_alive_gpio_is_check(dev))
@ -136,7 +136,7 @@ static int nx_gpio_direction_input(struct udevice *dev, unsigned int pin)
static int nx_gpio_direction_output(struct udevice *dev, unsigned int pin,
int val)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
if (nx_alive_gpio_is_check(dev))
@ -154,7 +154,7 @@ static int nx_gpio_direction_output(struct udevice *dev, unsigned int pin,
static int nx_gpio_get_value(struct udevice *dev, unsigned int pin)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
unsigned int mask = 1UL << pin;
unsigned int value;
@ -169,7 +169,7 @@ static int nx_gpio_get_value(struct udevice *dev, unsigned int pin)
static int nx_gpio_set_value(struct udevice *dev, unsigned int pin, int val)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
if (nx_alive_gpio_is_check(dev))
@ -185,7 +185,7 @@ static int nx_gpio_set_value(struct udevice *dev, unsigned int pin, int val)
static int nx_gpio_get_function(struct udevice *dev, unsigned int pin)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
unsigned int mask = (1UL << pin);
unsigned int output;
@ -204,7 +204,7 @@ static int nx_gpio_get_function(struct udevice *dev, unsigned int pin)
static int nx_gpio_probe(struct udevice *dev)
{
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
uc_priv->gpio_count = plat->gpio_count;
uc_priv->bank_name = plat->bank_name;
@ -214,7 +214,7 @@ static int nx_gpio_probe(struct udevice *dev)
static int nx_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct nx_gpio_platdata *plat = dev_get_platdata(dev);
struct nx_gpio_platdata *plat = dev_get_plat(dev);
plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct nx_gpio_regs),

View File

@ -285,7 +285,7 @@ static const struct dm_gpio_ops gpio_omap_ops = {
static int omap_gpio_probe(struct udevice *dev)
{
struct gpio_bank *bank = dev_get_priv(dev);
struct omap_gpio_platdata *plat = dev_get_platdata(dev);
struct omap_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
char name[18], *str;
@ -302,7 +302,7 @@ static int omap_gpio_probe(struct udevice *dev)
#if !CONFIG_IS_ENABLED(OF_CONTROL)
static int omap_gpio_bind(struct udevice *dev)
{
struct omap_gpio_platdata *plat = dev_get_platdata(dev);
struct omap_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t base_addr;
if (plat)
@ -344,7 +344,7 @@ static const struct udevice_id omap_gpio_ids[] = {
static int omap_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct omap_gpio_platdata *plat = dev_get_platdata(dev);
struct omap_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
addr = dev_read_addr(dev);

View File

@ -76,7 +76,7 @@ struct pca953x_info {
static int pca953x_write_single(struct udevice *dev, int reg, u8 val,
int offset)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
int bank_shift = fls((info->gpio_count - 1) / BANK_SZ);
int off = offset / BANK_SZ;
int ret = 0;
@ -93,7 +93,7 @@ static int pca953x_write_single(struct udevice *dev, int reg, u8 val,
static int pca953x_read_single(struct udevice *dev, int reg, u8 *val,
int offset)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
int bank_shift = fls((info->gpio_count - 1) / BANK_SZ);
int off = offset / BANK_SZ;
int ret;
@ -112,7 +112,7 @@ static int pca953x_read_single(struct udevice *dev, int reg, u8 *val,
static int pca953x_read_regs(struct udevice *dev, int reg, u8 *val)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
int ret = 0;
if (info->gpio_count <= 8) {
@ -137,7 +137,7 @@ static int pca953x_read_regs(struct udevice *dev, int reg, u8 *val)
static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
int ret = 0;
if (info->gpio_count <= 8) {
@ -160,7 +160,7 @@ static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val)
static int pca953x_is_output(struct udevice *dev, int offset)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
int bank = offset / BANK_SZ;
int off = offset % BANK_SZ;
@ -185,7 +185,7 @@ static int pca953x_get_value(struct udevice *dev, uint offset)
static int pca953x_set_value(struct udevice *dev, uint offset, int value)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
int bank = offset / BANK_SZ;
int off = offset % BANK_SZ;
u8 val;
@ -207,7 +207,7 @@ static int pca953x_set_value(struct udevice *dev, uint offset, int value)
static int pca953x_set_direction(struct udevice *dev, uint offset, int dir)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
int bank = offset / BANK_SZ;
int off = offset % BANK_SZ;
u8 val;
@ -271,7 +271,7 @@ static const struct dm_gpio_ops pca953x_ops = {
static int pca953x_probe(struct udevice *dev)
{
struct pca953x_info *info = dev_get_platdata(dev);
struct pca953x_info *info = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
char name[32], label[8], *str;
int addr;

View File

@ -85,7 +85,7 @@ static int pcf8575_i2c_read_le16(struct udevice *dev)
static int pcf8575_direction_input(struct udevice *dev, unsigned offset)
{
struct pcf8575_chip *plat = dev_get_platdata(dev);
struct pcf8575_chip *plat = dev_get_plat(dev);
int status;
plat->out |= BIT(offset);
@ -97,7 +97,7 @@ static int pcf8575_direction_input(struct udevice *dev, unsigned offset)
static int pcf8575_direction_output(struct udevice *dev,
unsigned int offset, int value)
{
struct pcf8575_chip *plat = dev_get_platdata(dev);
struct pcf8575_chip *plat = dev_get_plat(dev);
int ret;
if (value)
@ -127,7 +127,7 @@ static int pcf8575_set_value(struct udevice *dev, unsigned int offset,
static int pcf8575_ofdata_platdata(struct udevice *dev)
{
struct pcf8575_chip *plat = dev_get_platdata(dev);
struct pcf8575_chip *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
int n_latch;

View File

@ -15,7 +15,7 @@
static int sifive_gpio_probe(struct udevice *dev)
{
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
char name[18], *str;
@ -49,7 +49,7 @@ static void sifive_update_gpio_reg(void *bptr, u32 offset, bool value)
static int sifive_gpio_direction_input(struct udevice *dev, u32 offset)
{
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
if (offset > uc_priv->gpio_count)
@ -65,7 +65,7 @@ static int sifive_gpio_direction_input(struct udevice *dev, u32 offset)
static int sifive_gpio_direction_output(struct udevice *dev, u32 offset,
int value)
{
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
if (offset > uc_priv->gpio_count)
@ -83,7 +83,7 @@ static int sifive_gpio_direction_output(struct udevice *dev, u32 offset,
static int sifive_gpio_get_value(struct udevice *dev, u32 offset)
{
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
int val;
int dir;
@ -104,7 +104,7 @@ static int sifive_gpio_get_value(struct udevice *dev, u32 offset)
static int sifive_gpio_set_value(struct udevice *dev, u32 offset, int value)
{
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
if (offset > uc_priv->gpio_count)
@ -117,7 +117,7 @@ static int sifive_gpio_set_value(struct udevice *dev, u32 offset, int value)
static int sifive_gpio_get_function(struct udevice *dev, unsigned int offset)
{
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
u32 outdir, indir, val;
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
@ -156,7 +156,7 @@ static const struct dm_gpio_ops sifive_gpio_ops = {
static int sifive_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct sifive_gpio_platdata *plat = dev_get_platdata(dev);
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
addr = dev_read_addr(dev);

View File

@ -158,7 +158,7 @@ int sunxi_name_to_gpio(const char *name)
static int sunxi_gpio_direction_input(struct udevice *dev, unsigned offset)
{
struct sunxi_gpio_platdata *plat = dev_get_platdata(dev);
struct sunxi_gpio_platdata *plat = dev_get_plat(dev);
sunxi_gpio_set_cfgbank(plat->regs, offset, SUNXI_GPIO_INPUT);
@ -168,7 +168,7 @@ static int sunxi_gpio_direction_input(struct udevice *dev, unsigned offset)
static int sunxi_gpio_direction_output(struct udevice *dev, unsigned offset,
int value)
{
struct sunxi_gpio_platdata *plat = dev_get_platdata(dev);
struct sunxi_gpio_platdata *plat = dev_get_plat(dev);
u32 num = GPIO_NUM(offset);
sunxi_gpio_set_cfgbank(plat->regs, offset, SUNXI_GPIO_OUTPUT);
@ -179,7 +179,7 @@ static int sunxi_gpio_direction_output(struct udevice *dev, unsigned offset,
static int sunxi_gpio_get_value(struct udevice *dev, unsigned offset)
{
struct sunxi_gpio_platdata *plat = dev_get_platdata(dev);
struct sunxi_gpio_platdata *plat = dev_get_plat(dev);
u32 num = GPIO_NUM(offset);
unsigned dat;
@ -192,7 +192,7 @@ static int sunxi_gpio_get_value(struct udevice *dev, unsigned offset)
static int sunxi_gpio_set_value(struct udevice *dev, unsigned offset,
int value)
{
struct sunxi_gpio_platdata *plat = dev_get_platdata(dev);
struct sunxi_gpio_platdata *plat = dev_get_plat(dev);
u32 num = GPIO_NUM(offset);
clrsetbits_le32(&plat->regs->dat, 1 << num, value ? (1 << num) : 0);
@ -201,7 +201,7 @@ static int sunxi_gpio_set_value(struct udevice *dev, unsigned offset,
static int sunxi_gpio_get_function(struct udevice *dev, unsigned offset)
{
struct sunxi_gpio_platdata *plat = dev_get_platdata(dev);
struct sunxi_gpio_platdata *plat = dev_get_plat(dev);
int func;
func = sunxi_gpio_get_cfgbank(plat->regs, offset);
@ -260,7 +260,7 @@ static char *gpio_bank_name(int bank)
static int gpio_sunxi_probe(struct udevice *dev)
{
struct sunxi_gpio_platdata *plat = dev_get_platdata(dev);
struct sunxi_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
/* Tell the uclass how many GPIOs we have */

View File

@ -93,7 +93,7 @@ static const struct dm_gpio_ops gpio_vybrid_ops = {
static int vybrid_gpio_probe(struct udevice *dev)
{
struct vybrid_gpios *gpios = dev_get_priv(dev);
struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
struct vybrid_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
uc_priv->bank_name = plat->port_name;
@ -106,7 +106,7 @@ static int vybrid_gpio_probe(struct udevice *dev)
static int vybrid_gpio_odata_to_platdata(struct udevice *dev)
{
struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
struct vybrid_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t base_addr;
base_addr = dev_read_addr(dev);

View File

@ -36,7 +36,7 @@ struct xilinx_gpio_privdata {
static int xilinx_gpio_get_bank_pin(unsigned offset, u32 *bank_num,
u32 *bank_pin_num, struct udevice *dev)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
u32 bank, max_pins;
/* the first gpio is 0 not 1 */
u32 pin_num = offset;
@ -59,7 +59,7 @@ static int xilinx_gpio_get_bank_pin(unsigned offset, u32 *bank_num,
static int xilinx_gpio_set_value(struct udevice *dev, unsigned offset,
int value)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
struct xilinx_gpio_privdata *priv = dev_get_priv(dev);
int val, ret;
u32 bank, pin;
@ -87,7 +87,7 @@ static int xilinx_gpio_set_value(struct udevice *dev, unsigned offset,
static int xilinx_gpio_get_value(struct udevice *dev, unsigned offset)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
struct xilinx_gpio_privdata *priv = dev_get_priv(dev);
int val, ret;
u32 bank, pin;
@ -114,7 +114,7 @@ static int xilinx_gpio_get_value(struct udevice *dev, unsigned offset)
static int xilinx_gpio_get_function(struct udevice *dev, unsigned offset)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
int val, ret;
u32 bank, pin;
@ -143,7 +143,7 @@ static int xilinx_gpio_get_function(struct udevice *dev, unsigned offset)
static int xilinx_gpio_direction_output(struct udevice *dev, unsigned offset,
int value)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
int val, ret;
u32 bank, pin;
@ -168,7 +168,7 @@ static int xilinx_gpio_direction_output(struct udevice *dev, unsigned offset,
static int xilinx_gpio_direction_input(struct udevice *dev, unsigned offset)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
int val, ret;
u32 bank, pin;
@ -194,7 +194,7 @@ static int xilinx_gpio_direction_input(struct udevice *dev, unsigned offset)
static int xilinx_gpio_xlate(struct udevice *dev, struct gpio_desc *desc,
struct ofnode_phandle_args *args)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
desc->offset = args->args[0];
@ -239,7 +239,7 @@ static const struct dm_gpio_ops xilinx_gpio_ops = {
static int xilinx_gpio_probe(struct udevice *dev)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
struct xilinx_gpio_privdata *priv = dev_get_priv(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
const void *label_ptr;
@ -265,7 +265,7 @@ static int xilinx_gpio_probe(struct udevice *dev)
static int xilinx_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct xilinx_gpio_platdata *plat = dev_get_platdata(dev);
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
int is_dual;
plat->regs = (struct gpio_regs *)dev_read_addr(dev);

View File

@ -193,7 +193,7 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num,
unsigned int *bank_pin_num,
struct udevice *dev)
{
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
u32 bank;
for (bank = 0; bank < plat->p_data->max_bank; bank++) {
@ -215,7 +215,7 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num,
static int gpio_is_valid(unsigned gpio, struct udevice *dev)
{
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
return gpio < plat->p_data->ngpio;
}
@ -233,7 +233,7 @@ static int zynq_gpio_get_value(struct udevice *dev, unsigned gpio)
{
u32 data;
unsigned int bank_num, bank_pin_num;
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
if (check_gpio(gpio, dev) < 0)
return -1;
@ -249,7 +249,7 @@ static int zynq_gpio_get_value(struct udevice *dev, unsigned gpio)
static int zynq_gpio_set_value(struct udevice *dev, unsigned gpio, int value)
{
unsigned int reg_offset, bank_num, bank_pin_num;
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
if (check_gpio(gpio, dev) < 0)
return -1;
@ -281,7 +281,7 @@ static int zynq_gpio_direction_input(struct udevice *dev, unsigned gpio)
{
u32 reg;
unsigned int bank_num, bank_pin_num;
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
if (check_gpio(gpio, dev) < 0)
return -1;
@ -305,7 +305,7 @@ static int zynq_gpio_direction_output(struct udevice *dev, unsigned gpio,
{
u32 reg;
unsigned int bank_num, bank_pin_num;
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
if (check_gpio(gpio, dev) < 0)
return -1;
@ -331,7 +331,7 @@ static int zynq_gpio_get_function(struct udevice *dev, unsigned offset)
{
u32 reg;
unsigned int bank_num, bank_pin_num;
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
if (check_gpio(offset, dev) < 0)
return -1;
@ -369,7 +369,7 @@ static const struct udevice_id zynq_gpio_ids[] = {
static int zynq_gpio_probe(struct udevice *dev)
{
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
const void *label_ptr;
@ -390,7 +390,7 @@ static int zynq_gpio_probe(struct udevice *dev)
static int zynq_gpio_ofdata_to_platdata(struct udevice *dev)
{
struct zynq_gpio_platdata *plat = dev_get_platdata(dev);
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
plat->base = (phys_addr_t)dev_read_addr(dev);

View File

@ -281,7 +281,7 @@ U_BOOT_I2C_ADAP_COMPLETE(lpc32xx_2, lpc32xx_i2c_init, NULL,
#else /* CONFIG_DM_I2C */
static int lpc32xx_i2c_probe(struct udevice *bus)
{
struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus);
struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
bus->seq = dev->index;
__i2c_init(dev->base, dev->speed, 0, dev->index);
@ -291,14 +291,14 @@ static int lpc32xx_i2c_probe(struct udevice *bus)
static int lpc32xx_i2c_probe_chip(struct udevice *bus, u32 chip_addr,
u32 chip_flags)
{
struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus);
struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
return __i2c_probe_chip(dev->base, chip_addr);
}
static int lpc32xx_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
int nmsgs)
{
struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus);
struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
struct i2c_msg *dmsg, *omsg, dummy;
uint i = 0, address = 0;
@ -330,13 +330,13 @@ static int lpc32xx_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
static int lpc32xx_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
{
struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus);
struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
return __i2c_set_bus_speed(dev->base, speed, dev->index);
}
static int lpc32xx_i2c_reset(struct udevice *bus)
{
struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus);
struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
__i2c_init(dev->base, dev->speed, 0, dev->index);
return 0;

View File

@ -1049,7 +1049,7 @@ static int omap_i2c_probe_chip(struct udevice *bus, uint chip_addr,
static int omap_i2c_probe(struct udevice *bus)
{
struct omap_i2c *priv = dev_get_priv(bus);
struct omap_i2c_platdata *plat = dev_get_platdata(bus);
struct omap_i2c_platdata *plat = dev_get_plat(bus);
priv->speed = plat->speed;
priv->regs = map_physmem(plat->base, sizeof(void *),
@ -1065,7 +1065,7 @@ static int omap_i2c_probe(struct udevice *bus)
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
static int omap_i2c_ofdata_to_platdata(struct udevice *bus)
{
struct omap_i2c_platdata *plat = dev_get_platdata(bus);
struct omap_i2c_platdata *plat = dev_get_plat(bus);
plat->base = dev_read_addr(bus);
plat->speed = dev_read_u32_default(bus, "clock-frequency",

View File

@ -136,7 +136,7 @@ static int ca_led_ofdata_to_platdata(struct udevice *dev)
/* Top-level LED node */
if (!uc_plat->label) {
struct cortina_led_platdata *plt = dev_get_platdata(dev);
struct cortina_led_platdata *plt = dev_get_plat(dev);
plt->rate1 =
dev_read_u32_default(dev, "Cortina,blink-rate1", 256);
@ -169,7 +169,7 @@ static int cortina_led_probe(struct udevice *dev)
/* Top-level LED node */
if (!uc_plat->label) {
struct cortina_led_platdata *plat = dev_get_platdata(dev);
struct cortina_led_platdata *plat = dev_get_plat(dev);
u32 reg_value, val;
u16 rate1, rate2;

View File

@ -71,7 +71,7 @@ static int altera_sysid_read(struct udevice *dev,
static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
{
struct altera_sysid_platdata *plat = dev_get_platdata(dev);
struct altera_sysid_platdata *plat = dev_get_plat(dev);
plat->regs = map_physmem(dev_read_addr(dev),
sizeof(struct altera_sysid_regs),

View File

@ -36,14 +36,14 @@ struct sandbox_i2c_flash {
void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
enum sandbox_i2c_eeprom_test_mode mode)
{
struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->test_mode = mode;
}
void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len)
{
struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->offset_len = offset_len;
}
@ -51,7 +51,7 @@ void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len)
void sandbox_i2c_eeprom_set_chip_addr_offset_mask(struct udevice *dev,
uint mask)
{
struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->chip_addr_offset_mask = mask;
}
@ -74,7 +74,7 @@ static int sandbox_i2c_eeprom_xfer(struct udevice *emul, struct i2c_msg *msg,
int nmsgs)
{
struct sandbox_i2c_flash *priv = dev_get_priv(emul);
struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(emul);
struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(emul);
uint offset = msg->addr & plat->chip_addr_offset_mask;
debug("\n%s\n", __func__);
@ -151,7 +151,7 @@ struct dm_i2c_ops sandbox_i2c_emul_ops = {
static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
{
struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->size = dev_read_u32_default(dev, "sandbox,size", 32);
plat->filename = dev_read_string(dev, "sandbox,filename");
@ -169,7 +169,7 @@ static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
static int sandbox_i2c_eeprom_probe(struct udevice *dev)
{
struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
struct sandbox_i2c_flash *priv = dev_get_priv(dev);
priv->data = calloc(1, plat->size);

View File

@ -158,7 +158,7 @@ static int sc_ipc_write(struct mu_type *base, void *data)
static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg,
int tx_size, void *rx_msg, int rx_size)
{
struct imx8_scu *plat = dev_get_platdata(dev);
struct imx8_scu *plat = dev_get_plat(dev);
sc_err_t result;
int ret;
@ -182,7 +182,7 @@ static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg,
static int imx8_scu_probe(struct udevice *dev)
{
struct imx8_scu *plat = dev_get_platdata(dev);
struct imx8_scu *plat = dev_get_plat(dev);
fdt_addr_t addr;
debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat);

View File

@ -23,7 +23,7 @@ struct microchip_flexcom_platdata {
static int microchip_flexcom_ofdata_to_platdata(struct udevice *dev)
{
struct microchip_flexcom_platdata *plat = dev_get_platdata(dev);
struct microchip_flexcom_platdata *plat = dev_get_plat(dev);
int ret;
plat->regs = map_physmem(dev_read_addr(dev),

View File

@ -53,7 +53,7 @@ static int sandbox_p2sb_emul_read_config(const struct udevice *emul,
uint offset, ulong *valuep,
enum pci_size_t size)
{
struct p2sb_emul_platdata *plat = dev_get_platdata(emul);
struct p2sb_emul_platdata *plat = dev_get_plat(emul);
switch (offset) {
case PCI_COMMAND:
@ -106,7 +106,7 @@ static int sandbox_p2sb_emul_read_config(const struct udevice *emul,
static int sandbox_p2sb_emul_write_config(struct udevice *emul, uint offset,
ulong value, enum pci_size_t size)
{
struct p2sb_emul_platdata *plat = dev_get_platdata(emul);
struct p2sb_emul_platdata *plat = dev_get_plat(emul);
switch (offset) {
case PCI_COMMAND:
@ -134,7 +134,7 @@ static int sandbox_p2sb_emul_write_config(struct udevice *emul, uint offset,
static int sandbox_p2sb_emul_find_bar(struct udevice *emul, unsigned int addr,
int *barnump, unsigned int *offsetp)
{
struct p2sb_emul_platdata *plat = dev_get_platdata(emul);
struct p2sb_emul_platdata *plat = dev_get_plat(emul);
int barnum;
for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) {

View File

@ -86,7 +86,7 @@ U_BOOT_CMD(
static int rockchip_rk3399_efuse_read(struct udevice *dev, int offset,
void *buf, int size)
{
struct rockchip_efuse_platdata *plat = dev_get_platdata(dev);
struct rockchip_efuse_platdata *plat = dev_get_plat(dev);
struct rockchip_efuse_regs *efuse =
(struct rockchip_efuse_regs *)plat->base;
@ -139,7 +139,7 @@ static const struct misc_ops rockchip_efuse_ops = {
static int rockchip_efuse_ofdata_to_platdata(struct udevice *dev)
{
struct rockchip_efuse_platdata *plat = dev_get_platdata(dev);
struct rockchip_efuse_platdata *plat = dev_get_plat(dev);
plat->base = dev_read_addr_ptr(dev);
return 0;

View File

@ -102,7 +102,7 @@ static int rockchip_otp_ecc_enable(struct rockchip_otp_platdata *otp,
static int rockchip_px30_otp_read(struct udevice *dev, int offset,
void *buf, int size)
{
struct rockchip_otp_platdata *otp = dev_get_platdata(dev);
struct rockchip_otp_platdata *otp = dev_get_plat(dev);
u8 *buffer = buf;
int ret = 0;
@ -147,7 +147,7 @@ static const struct misc_ops rockchip_otp_ops = {
static int rockchip_otp_ofdata_to_platdata(struct udevice *dev)
{
struct rockchip_otp_platdata *otp = dev_get_platdata(dev);
struct rockchip_otp_platdata *otp = dev_get_plat(dev);
otp->base = dev_read_addr_ptr(dev);

View File

@ -100,7 +100,7 @@ struct sifive_otp_platdata {
static int sifive_otp_read(struct udevice *dev, int offset,
void *buf, int size)
{
struct sifive_otp_platdata *plat = dev_get_platdata(dev);
struct sifive_otp_platdata *plat = dev_get_plat(dev);
struct sifive_otp_regs *regs = (struct sifive_otp_regs *)plat->regs;
/* Check if offset and size are multiple of BYTES_PER_FUSE */
@ -162,7 +162,7 @@ static int sifive_otp_read(struct udevice *dev, int offset,
static int sifive_otp_write(struct udevice *dev, int offset,
const void *buf, int size)
{
struct sifive_otp_platdata *plat = dev_get_platdata(dev);
struct sifive_otp_platdata *plat = dev_get_plat(dev);
struct sifive_otp_regs *regs = (struct sifive_otp_regs *)plat->regs;
/* Check if offset and size are multiple of BYTES_PER_FUSE */
@ -241,7 +241,7 @@ static int sifive_otp_write(struct udevice *dev, int offset,
static int sifive_otp_ofdata_to_platdata(struct udevice *dev)
{
struct sifive_otp_platdata *plat = dev_get_platdata(dev);
struct sifive_otp_platdata *plat = dev_get_plat(dev);
int ret;
plat->regs = dev_read_addr_ptr(dev);

View File

@ -100,7 +100,7 @@ static int sandbox_swap_case_read_config(const struct udevice *emul,
uint offset, ulong *valuep,
enum pci_size_t size)
{
struct swap_case_platdata *plat = dev_get_platdata(emul);
struct swap_case_platdata *plat = dev_get_plat(emul);
/*
* The content of the EA capability structure is handled elsewhere to
@ -200,7 +200,7 @@ static int sandbox_swap_case_read_config(const struct udevice *emul,
static int sandbox_swap_case_write_config(struct udevice *emul, uint offset,
ulong value, enum pci_size_t size)
{
struct swap_case_platdata *plat = dev_get_platdata(emul);
struct swap_case_platdata *plat = dev_get_plat(emul);
switch (offset) {
case PCI_COMMAND:
@ -228,7 +228,7 @@ static int sandbox_swap_case_write_config(struct udevice *emul, uint offset,
static int sandbox_swap_case_find_bar(struct udevice *emul, unsigned int addr,
int *barnump, unsigned int *offsetp)
{
struct swap_case_platdata *plat = dev_get_platdata(emul);
struct swap_case_platdata *plat = dev_get_plat(emul);
int barnum;
for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) {

View File

@ -129,7 +129,7 @@ static void am654_sdhci_set_control_reg(struct sdhci_host *host)
static int am654_sdhci_set_ios_post(struct sdhci_host *host)
{
struct udevice *dev = host->mmc->dev;
struct am654_sdhci_plat *plat = dev_get_platdata(dev);
struct am654_sdhci_plat *plat = dev_get_plat(dev);
unsigned int speed = host->mmc->clock;
int sel50, sel100, freqsel;
u32 otap_del_sel;
@ -269,7 +269,7 @@ int am654_sdhci_init(struct am654_sdhci_plat *plat)
static int am654_sdhci_deferred_probe(struct sdhci_host *host)
{
struct udevice *dev = host->mmc->dev;
struct am654_sdhci_plat *plat = dev_get_platdata(dev);
struct am654_sdhci_plat *plat = dev_get_plat(dev);
unsigned long start;
int val;
@ -311,7 +311,7 @@ const struct am654_driver_data j721e_8bit_drv_data = {
static int j721e_4bit_sdhci_set_ios_post(struct sdhci_host *host)
{
struct udevice *dev = host->mmc->dev;
struct am654_sdhci_plat *plat = dev_get_platdata(dev);
struct am654_sdhci_plat *plat = dev_get_plat(dev);
u32 otap_del_sel, mask, val;
otap_del_sel = plat->otap_del_sel[host->mmc->selected_mode];
@ -335,7 +335,7 @@ const struct am654_driver_data j721e_4bit_drv_data = {
static int sdhci_am654_get_otap_delay(struct udevice *dev,
struct mmc_config *cfg)
{
struct am654_sdhci_plat *plat = dev_get_platdata(dev);
struct am654_sdhci_plat *plat = dev_get_plat(dev);
int ret;
int i;
@ -367,7 +367,7 @@ static int am654_sdhci_probe(struct udevice *dev)
{
struct am654_driver_data *drv_data =
(struct am654_driver_data *)dev_get_driver_data(dev);
struct am654_sdhci_plat *plat = dev_get_platdata(dev);
struct am654_sdhci_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct sdhci_host *host = dev_get_priv(dev);
struct mmc_config *cfg = &plat->cfg;
@ -410,7 +410,7 @@ static int am654_sdhci_probe(struct udevice *dev)
static int am654_sdhci_ofdata_to_platdata(struct udevice *dev)
{
struct am654_sdhci_plat *plat = dev_get_platdata(dev);
struct am654_sdhci_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
struct mmc_config *cfg = &plat->cfg;
u32 drv_strength;
@ -463,7 +463,7 @@ static int am654_sdhci_bind(struct udevice *dev)
{
struct am654_driver_data *drv_data =
(struct am654_driver_data *)dev_get_driver_data(dev);
struct am654_sdhci_plat *plat = dev_get_platdata(dev);
struct am654_sdhci_plat *plat = dev_get_plat(dev);
plat->flags = drv_data->flags;

View File

@ -418,7 +418,7 @@ static void arm_pl180_mmc_init(struct pl180_mmc_host *host)
static int arm_pl180_mmc_probe(struct udevice *dev)
{
struct arm_pl180_mmc_plat *pdata = dev_get_platdata(dev);
struct arm_pl180_mmc_plat *pdata = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct mmc *mmc = &pdata->mmc;
struct pl180_mmc_host *host = dev->priv;
@ -486,7 +486,7 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
int arm_pl180_mmc_bind(struct udevice *dev)
{
struct arm_pl180_mmc_plat *plat = dev_get_platdata(dev);
struct arm_pl180_mmc_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -19,7 +19,7 @@ struct aspeed_sdhci_plat {
static int aspeed_sdhci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct aspeed_sdhci_plat *plat = dev_get_platdata(dev);
struct aspeed_sdhci_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
u32 max_clk;
struct clk clk;
@ -67,7 +67,7 @@ free:
static int aspeed_sdhci_bind(struct udevice *dev)
{
struct aspeed_sdhci_plat *plat = dev_get_platdata(dev);
struct aspeed_sdhci_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -54,7 +54,7 @@ struct atmel_sdhci_plat {
static int atmel_sdhci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct atmel_sdhci_plat *plat = dev_get_platdata(dev);
struct atmel_sdhci_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
u32 max_clk;
struct clk clk;
@ -111,7 +111,7 @@ static int atmel_sdhci_probe(struct udevice *dev)
static int atmel_sdhci_bind(struct udevice *dev)
{
struct atmel_sdhci_plat *plat = dev_get_platdata(dev);
struct atmel_sdhci_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -166,7 +166,7 @@ static const struct sdhci_ops bcm2835_ops = {
static int bcm2835_sdhci_bind(struct udevice *dev)
{
struct bcm2835_sdhci_plat *plat = dev_get_platdata(dev);
struct bcm2835_sdhci_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}
@ -174,7 +174,7 @@ static int bcm2835_sdhci_bind(struct udevice *dev)
static int bcm2835_sdhci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct bcm2835_sdhci_plat *plat = dev_get_platdata(dev);
struct bcm2835_sdhci_plat *plat = dev_get_plat(dev);
struct bcm2835_sdhci_host *priv = dev_get_priv(dev);
struct sdhci_host *host = &priv->host;
fdt_addr_t base;

View File

@ -755,7 +755,7 @@ static void bcm2835_add_host(struct bcm2835_host *host)
static int bcm2835_probe(struct udevice *dev)
{
struct bcm2835_plat *plat = dev_get_platdata(dev);
struct bcm2835_plat *plat = dev_get_plat(dev);
struct bcm2835_host *host = dev_get_priv(dev);
struct mmc *mmc = mmc_get_mmc_dev(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
@ -795,7 +795,7 @@ static const struct dm_mmc_ops bcm2835_ops = {
static int bcm2835_bind(struct udevice *dev)
{
struct bcm2835_plat *plat = dev_get_platdata(dev);
struct bcm2835_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -49,7 +49,7 @@ struct sdhci_bcmstb_plat {
static int sdhci_bcmstb_bind(struct udevice *dev)
{
struct sdhci_bcmstb_plat *plat = dev_get_platdata(dev);
struct sdhci_bcmstb_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}
@ -57,7 +57,7 @@ static int sdhci_bcmstb_bind(struct udevice *dev)
static int sdhci_bcmstb_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct sdhci_bcmstb_plat *plat = dev_get_platdata(dev);
struct sdhci_bcmstb_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
fdt_addr_t base;
int ret;

View File

@ -124,7 +124,7 @@ struct dm_mmc_ops ca_dwmci_dm_ops;
static int ca_dwmmc_probe(struct udevice *dev)
{
struct ca_mmc_plat *plat = dev_get_platdata(dev);
struct ca_mmc_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct ca_dwmmc_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
@ -148,7 +148,7 @@ static int ca_dwmmc_probe(struct udevice *dev)
static int ca_dwmmc_bind(struct udevice *dev)
{
struct ca_mmc_plat *plat = dev_get_platdata(dev);
struct ca_mmc_plat *plat = dev_get_plat(dev);
return dwmci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -478,7 +478,7 @@ int davinci_mmc_init(struct bd_info *bis, struct davinci_mmc *host)
static int davinci_mmc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct davinci_mmc_plat *plat = dev_get_platdata(dev);
struct davinci_mmc_plat *plat = dev_get_plat(dev);
struct davinci_mmc_priv *priv = dev_get_priv(dev);
priv->reg_base = plat->reg_base;
@ -495,7 +495,7 @@ static int davinci_mmc_probe(struct udevice *dev)
static int davinci_mmc_bind(struct udevice *dev)
{
struct davinci_mmc_plat *plat = dev_get_platdata(dev);
struct davinci_mmc_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}
@ -503,7 +503,7 @@ static int davinci_mmc_bind(struct udevice *dev)
#if CONFIG_IS_ENABLED(OF_CONTROL)
static int davinci_mmc_ofdata_to_platdata(struct udevice *dev)
{
struct davinci_mmc_plat *plat = dev_get_platdata(dev);
struct davinci_mmc_plat *plat = dev_get_plat(dev);
struct mmc_config *cfg = &plat->cfg;
plat->reg_base = (struct davinci_mmc_regs *)dev_read_addr(dev);

View File

@ -263,7 +263,7 @@ int exynos_dwmmc_init(const void *blob)
#ifdef CONFIG_DM_MMC
static int exynos_dwmmc_probe(struct udevice *dev)
{
struct exynos_mmc_plat *plat = dev_get_platdata(dev);
struct exynos_mmc_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct dwmci_exynos_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
@ -288,7 +288,7 @@ static int exynos_dwmmc_probe(struct udevice *dev)
static int exynos_dwmmc_bind(struct udevice *dev)
{
struct exynos_mmc_plat *plat = dev_get_platdata(dev);
struct exynos_mmc_plat *plat = dev_get_plat(dev);
return dwmci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -955,7 +955,7 @@ int fsl_esdhc_mmc_init(struct bd_info *bis)
static int fsl_esdhc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
u32 caps, hostver;
fdt_addr_t addr;
@ -1022,7 +1022,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
static int fsl_esdhc_get_cd(struct udevice *dev)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
if (plat->cfg.host_caps & MMC_CAP_NONREMOVABLE)
@ -1034,7 +1034,7 @@ static int fsl_esdhc_get_cd(struct udevice *dev)
static int fsl_esdhc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
struct mmc_data *data)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
return esdhc_send_cmd_common(priv, &plat->mmc, cmd, data);
@ -1042,7 +1042,7 @@ static int fsl_esdhc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
static int fsl_esdhc_set_ios(struct udevice *dev)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
return esdhc_set_ios_common(priv, &plat->mmc);
@ -1050,7 +1050,7 @@ static int fsl_esdhc_set_ios(struct udevice *dev)
static int fsl_esdhc_reinit(struct udevice *dev)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
return esdhc_init_common(priv, &plat->mmc);
@ -1059,7 +1059,7 @@ static int fsl_esdhc_reinit(struct udevice *dev)
#ifdef MMC_SUPPORTS_TUNING
static int fsl_esdhc_execute_tuning(struct udevice *dev, uint32_t opcode)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
struct fsl_esdhc *regs = priv->esdhc_regs;
u32 val, irqstaten;
@ -1124,7 +1124,7 @@ static const struct udevice_id fsl_esdhc_ids[] = {
static int fsl_esdhc_bind(struct udevice *dev)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -851,7 +851,7 @@ static void esdhc_stop_tuning(struct mmc *mmc)
static int fsl_esdhc_execute_tuning(struct udevice *dev, uint32_t opcode)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
struct fsl_esdhc *regs = priv->esdhc_regs;
struct mmc *mmc = &plat->mmc;
@ -1474,7 +1474,7 @@ static int fsl_esdhc_ofdata_to_platdata(struct udevice *dev)
static int fsl_esdhc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
struct esdhc_soc_data *data =
(struct esdhc_soc_data *)dev_get_driver_data(dev);
@ -1617,7 +1617,7 @@ static int fsl_esdhc_get_cd(struct udevice *dev)
static int fsl_esdhc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
struct mmc_data *data)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
return esdhc_send_cmd_common(priv, &plat->mmc, cmd, data);
@ -1625,7 +1625,7 @@ static int fsl_esdhc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
static int fsl_esdhc_set_ios(struct udevice *dev)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
return esdhc_set_ios_common(priv, &plat->mmc);
@ -1691,7 +1691,7 @@ static const struct udevice_id fsl_esdhc_ids[] = {
#if CONFIG_IS_ENABLED(BLK)
static int fsl_esdhc_bind(struct udevice *dev)
{
struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
struct fsl_esdhc_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -424,7 +424,7 @@ static int ftsdc010_mmc_ofdata_to_platdata(struct udevice *dev)
static int ftsdc010_mmc_probe(struct udevice *dev)
{
struct ftsdc010_plat *plat = dev_get_platdata(dev);
struct ftsdc010_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct ftsdc_priv *priv = dev_get_priv(dev);
struct ftsdc010_chip *chip = &priv->chip;
@ -459,7 +459,7 @@ static int ftsdc010_mmc_probe(struct udevice *dev)
int ftsdc010_mmc_bind(struct udevice *dev)
{
struct ftsdc010_plat *plat = dev_get_platdata(dev);
struct ftsdc010_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -91,7 +91,7 @@ static inline void mci_set_blklen(atmel_mci_t *mci, int blklen)
#ifdef CONFIG_DM_MMC
static void mci_set_mode(struct udevice *dev, u32 hz, u32 blklen)
{
struct atmel_mci_plat *plat = dev_get_platdata(dev);
struct atmel_mci_plat *plat = dev_get_plat(dev);
struct atmel_mci_priv *priv = dev_get_priv(dev);
struct mmc *mmc = &plat->mmc;
u32 bus_hz = priv->bus_clk_rate;
@ -242,7 +242,7 @@ io_fail:
static int atmel_mci_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
struct mmc_data *data)
{
struct atmel_mci_plat *plat = dev_get_platdata(dev);
struct atmel_mci_plat *plat = dev_get_plat(dev);
struct atmel_mci_priv *priv = dev_get_priv(dev);
atmel_mci_t *mci = plat->mci;
#else
@ -373,7 +373,7 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
#ifdef CONFIG_DM_MMC
static int atmel_mci_set_ios(struct udevice *dev)
{
struct atmel_mci_plat *plat = dev_get_platdata(dev);
struct atmel_mci_plat *plat = dev_get_plat(dev);
struct mmc *mmc = mmc_get_mmc_dev(dev);
atmel_mci_t *mci = plat->mci;
#else
@ -424,7 +424,7 @@ static int mci_set_ios(struct mmc *mmc)
#ifdef CONFIG_DM_MMC
static int atmel_mci_hw_init(struct udevice *dev)
{
struct atmel_mci_plat *plat = dev_get_platdata(dev);
struct atmel_mci_plat *plat = dev_get_plat(dev);
atmel_mci_t *mci = plat->mci;
#else
/* Entered into mmc structure during driver init */
@ -525,7 +525,7 @@ static const struct dm_mmc_ops atmel_mci_mmc_ops = {
static void atmel_mci_setup_cfg(struct udevice *dev)
{
struct atmel_mci_plat *plat = dev_get_platdata(dev);
struct atmel_mci_plat *plat = dev_get_plat(dev);
struct atmel_mci_priv *priv = dev_get_priv(dev);
struct mmc_config *cfg;
u32 version;
@ -584,7 +584,7 @@ failed:
static int atmel_mci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct atmel_mci_plat *plat = dev_get_platdata(dev);
struct atmel_mci_plat *plat = dev_get_plat(dev);
struct mmc *mmc;
int ret;
@ -608,7 +608,7 @@ static int atmel_mci_probe(struct udevice *dev)
static int atmel_mci_bind(struct udevice *dev)
{
struct atmel_mci_plat *plat = dev_get_platdata(dev);
struct atmel_mci_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -50,7 +50,7 @@ static int hi6220_dwmmc_ofdata_to_platdata(struct udevice *dev)
static int hi6220_dwmmc_probe(struct udevice *dev)
{
struct hi6220_dwmmc_plat *plat = dev_get_platdata(dev);
struct hi6220_dwmmc_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct hi6220_dwmmc_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
@ -74,7 +74,7 @@ static int hi6220_dwmmc_probe(struct udevice *dev)
static int hi6220_dwmmc_bind(struct udevice *dev)
{
struct hi6220_dwmmc_plat *plat = dev_get_platdata(dev);
struct hi6220_dwmmc_plat *plat = dev_get_plat(dev);
int ret;
ret = dwmci_bind(dev, &plat->mmc, &plat->cfg);

View File

@ -172,7 +172,7 @@ struct iproc_sdhci_plat {
static int iproc_sdhci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct iproc_sdhci_plat *plat = dev_get_platdata(dev);
struct iproc_sdhci_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
struct sdhci_iproc_host *iproc_host;
int node = dev_of_offset(dev);
@ -230,7 +230,7 @@ static int iproc_sdhci_probe(struct udevice *dev)
static int iproc_sdhci_bind(struct udevice *dev)
{
struct iproc_sdhci_plat *plat = dev_get_platdata(dev);
struct iproc_sdhci_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -446,7 +446,7 @@ static const struct dm_mmc_ops jz_msc_ops = {
static int jz_mmc_ofdata_to_platdata(struct udevice *dev)
{
struct jz_mmc_priv *priv = dev_get_priv(dev);
struct jz_mmc_plat *plat = dev_get_platdata(dev);
struct jz_mmc_plat *plat = dev_get_plat(dev);
struct mmc_config *cfg;
int ret;
@ -473,7 +473,7 @@ static int jz_mmc_ofdata_to_platdata(struct udevice *dev)
static int jz_mmc_bind(struct udevice *dev)
{
struct jz_mmc_plat *plat = dev_get_platdata(dev);
struct jz_mmc_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}
@ -482,7 +482,7 @@ static int jz_mmc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct jz_mmc_priv *priv = dev_get_priv(dev);
struct jz_mmc_plat *plat = dev_get_platdata(dev);
struct jz_mmc_plat *plat = dev_get_plat(dev);
plat->mmc.priv = priv;
upriv->mmc = &plat->mmc;

View File

@ -243,7 +243,7 @@ static const struct dm_mmc_ops meson_dm_mmc_ops = {
static int meson_mmc_ofdata_to_platdata(struct udevice *dev)
{
struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
struct meson_mmc_platdata *pdata = dev_get_plat(dev);
fdt_addr_t addr;
addr = dev_read_addr(dev);
@ -257,7 +257,7 @@ static int meson_mmc_ofdata_to_platdata(struct udevice *dev)
static int meson_mmc_probe(struct udevice *dev)
{
struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
struct meson_mmc_platdata *pdata = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct mmc *mmc = &pdata->mmc;
struct mmc_config *cfg = &pdata->cfg;
@ -320,7 +320,7 @@ static int meson_mmc_probe(struct udevice *dev)
int meson_mmc_bind(struct udevice *dev)
{
struct meson_mmc_platdata *pdata = dev_get_platdata(dev);
struct meson_mmc_platdata *pdata = dev_get_plat(dev);
return mmc_bind(dev, &pdata->mmc, &pdata->cfg);
}

View File

@ -411,7 +411,7 @@ done:
static int mmc_spi_probe(struct udevice *dev)
{
struct mmc_spi_priv *priv = dev_get_priv(dev);
struct mmc_spi_plat *plat = dev_get_platdata(dev);
struct mmc_spi_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
char *name;
@ -446,7 +446,7 @@ static int mmc_spi_probe(struct udevice *dev)
static int mmc_spi_bind(struct udevice *dev)
{
struct mmc_spi_plat *plat = dev_get_platdata(dev);
struct mmc_spi_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -87,7 +87,7 @@ static int msm_sdc_clk_init(struct udevice *dev)
static int msm_sdc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct msm_sdhc_plat *plat = dev_get_platdata(dev);
struct msm_sdhc_plat *plat = dev_get_plat(dev);
struct msm_sdhc *prv = dev_get_priv(dev);
struct sdhci_host *host = &prv->host;
u32 core_version, core_minor, core_major;
@ -189,7 +189,7 @@ static int msm_ofdata_to_platdata(struct udevice *dev)
static int msm_sdc_bind(struct udevice *dev)
{
struct msm_sdhc_plat *plat = dev_get_platdata(dev);
struct msm_sdhc_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -885,7 +885,7 @@ static void msdc_set_mclk(struct udevice *dev,
static int msdc_ops_set_ios(struct udevice *dev)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc *mmc = &plat->mmc;
uint clock = mmc->clock;
@ -1031,7 +1031,7 @@ static inline void msdc_set_data_delay(struct msdc_host *host, u32 value)
static int hs400_tune_response(struct udevice *dev, u32 opcode)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc *mmc = &plat->mmc;
u32 cmd_delay = 0;
@ -1081,7 +1081,7 @@ static int hs400_tune_response(struct udevice *dev, u32 opcode)
static int msdc_tune_response(struct udevice *dev, u32 opcode)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc *mmc = &plat->mmc;
u32 rise_delay = 0, fall_delay = 0;
@ -1185,7 +1185,7 @@ skip_internal:
static int msdc_tune_data(struct udevice *dev, u32 opcode)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc *mmc = &plat->mmc;
u32 rise_delay = 0, fall_delay = 0;
@ -1276,7 +1276,7 @@ skip_fall:
*/
static int msdc_tune_together(struct udevice *dev, u32 opcode)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc *mmc = &plat->mmc;
u32 rise_delay = 0, fall_delay = 0;
@ -1334,7 +1334,7 @@ skip_fall:
static int msdc_execute_tuning(struct udevice *dev, uint opcode)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc *mmc = &plat->mmc;
int ret = 0;
@ -1511,7 +1511,7 @@ static void msdc_ungate_clock(struct msdc_host *host)
static int msdc_drv_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc_config *cfg = &plat->cfg;
@ -1547,7 +1547,7 @@ static int msdc_drv_probe(struct udevice *dev)
static int msdc_ofdata_to_platdata(struct udevice *dev)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
struct mmc_config *cfg = &plat->cfg;
fdt_addr_t base, top_base;
@ -1598,7 +1598,7 @@ static int msdc_ofdata_to_platdata(struct udevice *dev)
static int msdc_drv_bind(struct udevice *dev)
{
struct msdc_plat *plat = dev_get_platdata(dev);
struct msdc_plat *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -107,7 +107,7 @@ struct mv_sdhci_plat {
static int mv_sdhci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct mv_sdhci_plat *plat = dev_get_platdata(dev);
struct mv_sdhci_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
int ret;
@ -134,7 +134,7 @@ static int mv_sdhci_probe(struct udevice *dev)
static int mv_sdhci_bind(struct udevice *dev)
{
struct mv_sdhci_plat *plat = dev_get_platdata(dev);
struct mv_sdhci_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -310,7 +310,7 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
static int
mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data)
{
struct mxsmmc_platdata *plat = dev_get_platdata(dev);
struct mxsmmc_platdata *plat = dev_get_plat(dev);
struct mxsmmc_priv *priv = dev_get_priv(dev);
struct mxs_ssp_regs *ssp_regs = priv->regs;
struct mmc *mmc = &plat->mmc;
@ -490,7 +490,7 @@ mxsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data)
static int mxsmmc_get_cd(struct udevice *dev)
{
struct mxsmmc_platdata *plat = dev_get_platdata(dev);
struct mxsmmc_platdata *plat = dev_get_plat(dev);
struct mxsmmc_priv *priv = dev_get_priv(dev);
struct mxs_ssp_regs *ssp_regs = priv->regs;
@ -502,7 +502,7 @@ static int mxsmmc_get_cd(struct udevice *dev)
static int mxsmmc_set_ios(struct udevice *dev)
{
struct mxsmmc_platdata *plat = dev_get_platdata(dev);
struct mxsmmc_platdata *plat = dev_get_plat(dev);
struct mxsmmc_priv *priv = dev_get_priv(dev);
struct mxs_ssp_regs *ssp_regs = priv->regs;
struct mmc *mmc = &plat->mmc;
@ -567,7 +567,7 @@ static int mxsmmc_init(struct udevice *dev)
static int mxsmmc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct mxsmmc_platdata *plat = dev_get_platdata(dev);
struct mxsmmc_platdata *plat = dev_get_plat(dev);
struct mxsmmc_priv *priv = dev_get_priv(dev);
struct blk_desc *bdesc;
struct mmc *mmc;
@ -653,7 +653,7 @@ static int mxsmmc_probe(struct udevice *dev)
#if CONFIG_IS_ENABLED(BLK)
static int mxsmmc_bind(struct udevice *dev)
{
struct mxsmmc_platdata *plat = dev_get_platdata(dev);
struct mxsmmc_platdata *plat = dev_get_plat(dev);
return mmc_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -179,7 +179,7 @@ static int nexell_dwmmc_ofdata_to_platdata(struct udevice *dev)
static int nexell_dwmmc_probe(struct udevice *dev)
{
struct nexell_mmc_plat *plat = dev_get_platdata(dev);
struct nexell_mmc_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct nexell_dwmmc_priv *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
@ -214,7 +214,7 @@ static int nexell_dwmmc_probe(struct udevice *dev)
static int nexell_dwmmc_bind(struct udevice *dev)
{
struct nexell_mmc_plat *plat = dev_get_platdata(dev);
struct nexell_mmc_plat *plat = dev_get_plat(dev);
return dwmci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -180,7 +180,7 @@ static inline struct omap_hsmmc_data *omap_hsmmc_get_data(struct mmc *mmc)
static inline struct mmc_config *omap_hsmmc_get_cfg(struct mmc *mmc)
{
#if CONFIG_IS_ENABLED(DM_MMC)
struct omap_hsmmc_plat *plat = dev_get_platdata(mmc->dev);
struct omap_hsmmc_plat *plat = dev_get_plat(mmc->dev);
return &plat->cfg;
#else
return &((struct omap_hsmmc_data *)mmc->priv)->cfg;
@ -1900,7 +1900,7 @@ __weak const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
{
struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
struct omap_hsmmc_plat *plat = dev_get_plat(dev);
struct omap_mmc_of_data *of_data = (void *)dev_get_driver_data(dev);
struct mmc_config *cfg = &plat->cfg;
@ -1949,14 +1949,14 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
static int omap_hsmmc_bind(struct udevice *dev)
{
struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
struct omap_hsmmc_plat *plat = dev_get_plat(dev);
plat->mmc = calloc(1, sizeof(struct mmc));
return mmc_bind(dev, plat->mmc, &plat->cfg);
}
#endif
static int omap_hsmmc_probe(struct udevice *dev)
{
struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
struct omap_hsmmc_plat *plat = dev_get_plat(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct omap_hsmmc_data *priv = dev_get_priv(dev);
struct mmc_config *cfg = &plat->cfg;

View File

@ -31,7 +31,7 @@ struct pci_mmc_priv {
static int pci_mmc_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct pci_mmc_plat *plat = dev_get_platdata(dev);
struct pci_mmc_plat *plat = dev_get_plat(dev);
struct pci_mmc_priv *priv = dev_get_priv(dev);
struct sdhci_host *host = &priv->host;
int ret;
@ -61,7 +61,7 @@ static int pci_mmc_ofdata_to_platdata(struct udevice *dev)
static int pci_mmc_bind(struct udevice *dev)
{
struct pci_mmc_plat *plat = dev_get_platdata(dev);
struct pci_mmc_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}

View File

@ -18,7 +18,7 @@ struct pic32_sdhci_plat {
static int pic32_sdhci_probe(struct udevice *dev)
{
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
struct pic32_sdhci_plat *plat = dev_get_platdata(dev);
struct pic32_sdhci_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
struct clk clk;
@ -71,7 +71,7 @@ static int pic32_sdhci_probe(struct udevice *dev)
static int pic32_sdhci_bind(struct udevice *dev)
{
struct pic32_sdhci_plat *plat = dev_get_platdata(dev);
struct pic32_sdhci_plat *plat = dev_get_plat(dev);
return sdhci_bind(dev, &plat->mmc, &plat->cfg);
}

Some files were not shown because too many files have changed in this diff Show More