summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dm/device.h119
-rw-r--r--include/linux/compat.h37
-rw-r--r--include/linux/mtd/mtd.h3
-rw-r--r--include/linux/mtd/ubi.h55
-rw-r--r--include/mtd/cfi_flash.h8
-rw-r--r--include/pci.h2
-rw-r--r--include/spi.h2
-rw-r--r--include/tis.h60
-rw-r--r--include/tpm.h6
-rw-r--r--include/usb.h2
10 files changed, 160 insertions, 134 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 85196124b4..28ba4ca404 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -21,13 +21,13 @@
struct driver_info;
/* Driver is active (probed). Cleared when it is removed */
-#define DM_FLAG_ACTIVATED (1 << 0)
+#define DM_FLAG_ACTIVATED (1 << 0)
/* DM is responsible for allocating and freeing platdata */
-#define DM_FLAG_ALLOC_PDATA (1 << 1)
+#define DM_FLAG_ALLOC_PDATA (1 << 1)
/* DM should init this device prior to relocation */
-#define DM_FLAG_PRE_RELOC (1 << 2)
+#define DM_FLAG_PRE_RELOC (1 << 2)
/* DM is responsible for allocating and freeing parent_platdata */
#define DM_FLAG_ALLOC_PARENT_PDATA (1 << 3)
@@ -36,10 +36,10 @@ struct driver_info;
#define DM_FLAG_ALLOC_UCLASS_PDATA (1 << 4)
/* Allocate driver private data on a DMA boundary */
-#define DM_FLAG_ALLOC_PRIV_DMA (1 << 5)
+#define DM_FLAG_ALLOC_PRIV_DMA (1 << 5)
/* Device is bound */
-#define DM_FLAG_BOUND (1 << 6)
+#define DM_FLAG_BOUND (1 << 6)
/**
* struct udevice - An instance of a driver
@@ -78,6 +78,10 @@ struct driver_info;
* @req_seq: Requested sequence number for this device (-1 = any)
* @seq: Allocated sequence number for this device (-1 = none). This is set up
* when the device is probed and will be unique within the device's uclass.
+ * @devres_head: List of memory allocations associated with this device.
+ * When CONFIG_DEVRES is enabled, devm_kmalloc() and friends will
+ * add to this list. Memory so-allocated will be freed
+ * automatically when the device is removed / unbound
*/
struct udevice {
const struct driver *driver;
@@ -166,10 +170,6 @@ struct udevice_id {
* @per_child_auto_alloc_size: Each device can hold private data owned by
* its parent. If required this will be automatically allocated if this
* value is non-zero.
- * TODO(sjg@chromium.org): I'm considering dropping this, and just having
- * device_probe_child() pass it in. So far the use case for allocating it
- * is SPI, but I found that unsatisfactory. Since it is here I will leave it
- * until things are clearer.
* @per_child_platdata_auto_alloc_size: A bus likes to store information about
* its children. If non-zero this is the size of this data, to be allocated
* in the child's parent_platdata pointer.
@@ -233,20 +233,6 @@ void *dev_get_parent_platdata(struct udevice *dev);
void *dev_get_uclass_platdata(struct udevice *dev);
/**
- * dev_get_parentdata() - Get the parent data for a device
- *
- * The parent data is data stored in the device but owned by the parent.
- * For example, a USB device may have parent data which contains information
- * about how to talk to the device over USB.
- *
- * This checks that dev is not NULL, but no other checks for now
- *
- * @dev Device to check
- * @return parent data, or NULL if none
- */
-void *dev_get_parentdata(struct udevice *dev);
-
-/**
* dev_get_priv() - Get the private data for a device
*
* This checks that dev is not NULL, but no other checks for now
@@ -257,12 +243,18 @@ void *dev_get_parentdata(struct udevice *dev);
void *dev_get_priv(struct udevice *dev);
/**
- * struct dev_get_parent() - Get the parent of a device
+ * dev_get_parent_priv() - Get the parent private data for a device
*
- * @child: Child to check
- * @return parent of child, or NULL if this is the root device
+ * The parent private data is data stored in the device but owned by the
+ * parent. For example, a USB device may have parent data which contains
+ * information about how to talk to the device over USB.
+ *
+ * This checks that dev is not NULL, but no other checks for now
+ *
+ * @dev Device to check
+ * @return parent data, or NULL if none
*/
-struct udevice *dev_get_parent(struct udevice *child);
+void *dev_get_parent_priv(struct udevice *dev);
/**
* dev_get_uclass_priv() - Get the private uclass data for a device
@@ -275,16 +267,37 @@ struct udevice *dev_get_parent(struct udevice *child);
void *dev_get_uclass_priv(struct udevice *dev);
/**
+ * struct dev_get_parent() - Get the parent of a device
+ *
+ * @child: Child to check
+ * @return parent of child, or NULL if this is the root device
+ */
+struct udevice *dev_get_parent(struct udevice *child);
+
+/**
* dev_get_driver_data() - get the driver data used to bind a device
*
* When a device is bound using a device tree node, it matches a
- * particular compatible string as in struct udevice_id. This function
+ * particular compatible string in struct udevice_id. This function
* returns the associated data value for that compatible string. This is
* the 'data' field in struct udevice_id.
*
+ * As an example, consider this structure:
+ * static const struct udevice_id tegra_i2c_ids[] = {
+ * { .compatible = "nvidia,tegra114-i2c", .data = TYPE_114 },
+ * { .compatible = "nvidia,tegra20-i2c", .data = TYPE_STD },
+ * { .compatible = "nvidia,tegra20-i2c-dvc", .data = TYPE_DVC },
+ * { }
+ * };
+ *
+ * When driver model finds a driver for this it will store the 'data' value
+ * corresponding to the compatible string it matches. This function returns
+ * that value. This allows the driver to handle several variants of a device.
+ *
* For USB devices, this is the driver_info field in struct usb_device_id.
*
* @dev: Device to check
+ * @return driver data (0 if none is provided)
*/
ulong dev_get_driver_data(struct udevice *dev);
@@ -299,7 +312,7 @@ ulong dev_get_driver_data(struct udevice *dev);
*/
const void *dev_get_driver_ops(struct udevice *dev);
-/*
+/**
* device_get_uclass_id() - return the uclass ID of a device
*
* @dev: Device to check
@@ -307,7 +320,7 @@ const void *dev_get_driver_ops(struct udevice *dev);
*/
enum uclass_id device_get_uclass_id(struct udevice *dev);
-/*
+/**
* dev_get_uclass_name() - return the uclass name of a device
*
* This checks that dev is not NULL.
@@ -512,7 +525,7 @@ void *_devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
#endif
/**
- * devres_alloc - Allocate device resource data
+ * devres_alloc() - Allocate device resource data
* @release: Release function devres will be associated with
* @size: Allocation size
* @gfp: Allocation flags
@@ -528,7 +541,7 @@ void *_devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
_devres_alloc(release, size, gfp | __GFP_ZERO)
/**
- * devres_free - Free device resource data
+ * devres_free() - Free device resource data
* @res: Pointer to devres data to free
*
* Free devres created with devres_alloc().
@@ -536,7 +549,7 @@ void *_devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
void devres_free(void *res);
/**
- * devres_add - Register device resource
+ * devres_add() - Register device resource
* @dev: Device to add resource to
* @res: Resource to register
*
@@ -547,7 +560,7 @@ void devres_free(void *res);
void devres_add(struct udevice *dev, void *res);
/**
- * devres_find - Find device resource
+ * devres_find() - Find device resource
* @dev: Device to lookup resource from
* @release: Look for resources associated with this release function
* @match: Match function (optional)
@@ -557,14 +570,13 @@ void devres_add(struct udevice *dev, void *res);
* and for which @match returns 1. If @match is NULL, it's considered
* to match all.
*
- * RETURNS:
- * Pointer to found devres, NULL if not found.
+ * @return pointer to found devres, NULL if not found.
*/
void *devres_find(struct udevice *dev, dr_release_t release,
dr_match_t match, void *match_data);
/**
- * devres_get - Find devres, if non-existent, add one atomically
+ * devres_get() - Find devres, if non-existent, add one atomically
* @dev: Device to lookup or add devres for
* @new_res: Pointer to new initialized devres to add if not found
* @match: Match function (optional)
@@ -574,14 +586,13 @@ void *devres_find(struct udevice *dev, dr_release_t release,
* as @new_res and for which @match return 1. If found, @new_res is
* freed; otherwise, @new_res is added atomically.
*
- * RETURNS:
- * Pointer to found or added devres.
+ * @return ointer to found or added devres.
*/
void *devres_get(struct udevice *dev, void *new_res,
dr_match_t match, void *match_data);
/**
- * devres_remove - Find a device resource and remove it
+ * devres_remove() - Find a device resource and remove it
* @dev: Device to find resource from
* @release: Look for resources associated with this release function
* @match: Match function (optional)
@@ -592,14 +603,13 @@ void *devres_get(struct udevice *dev, void *new_res,
* match all. If found, the resource is removed atomically and
* returned.
*
- * RETURNS:
- * Pointer to removed devres on success, NULL if not found.
+ * @return ointer to removed devres on success, NULL if not found.
*/
void *devres_remove(struct udevice *dev, dr_release_t release,
dr_match_t match, void *match_data);
/**
- * devres_destroy - Find a device resource and destroy it
+ * devres_destroy() - Find a device resource and destroy it
* @dev: Device to find resource from
* @release: Look for resources associated with this release function
* @match: Match function (optional)
@@ -613,14 +623,13 @@ void *devres_remove(struct udevice *dev, dr_release_t release,
* only the devres-allocated data will be freed. The caller becomes
* responsible for freeing any other data.
*
- * RETURNS:
- * 0 if devres is found and freed, -ENOENT if not found.
+ * @return 0 if devres is found and freed, -ENOENT if not found.
*/
int devres_destroy(struct udevice *dev, dr_release_t release,
dr_match_t match, void *match_data);
/**
- * devres_release - Find a device resource and destroy it, calling release
+ * devres_release() - Find a device resource and destroy it, calling release
* @dev: Device to find resource from
* @release: Look for resources associated with this release function
* @match: Match function (optional)
@@ -631,15 +640,14 @@ int devres_destroy(struct udevice *dev, dr_release_t release,
* match all. If found, the resource is removed atomically, the
* release function called and the resource freed.
*
- * RETURNS:
- * 0 if devres is found and freed, -ENOENT if not found.
+ * @return 0 if devres is found and freed, -ENOENT if not found.
*/
int devres_release(struct udevice *dev, dr_release_t release,
dr_match_t match, void *match_data);
/* managed devm_k.alloc/kfree for device drivers */
/**
- * devm_kmalloc - Resource-managed kmalloc
+ * devm_kmalloc() - Resource-managed kmalloc
* @dev: Device to allocate memory for
* @size: Allocation size
* @gfp: Allocation gfp flags
@@ -648,8 +656,7 @@ int devres_release(struct udevice *dev, dr_release_t release,
* automatically freed on driver detach. Like all other devres
* resources, guaranteed alignment is unsigned long long.
*
- * RETURNS:
- * Pointer to allocated memory on success, NULL on failure.
+ * @return pointer to allocated memory on success, NULL on failure.
*/
void *devm_kmalloc(struct udevice *dev, size_t size, gfp_t gfp);
static inline void *devm_kzalloc(struct udevice *dev, size_t size, gfp_t gfp)
@@ -670,13 +677,13 @@ static inline void *devm_kcalloc(struct udevice *dev,
}
/**
- * devm_kfree - Resource-managed kfree
+ * devm_kfree() - Resource-managed kfree
* @dev: Device this memory belongs to
- * @p: Memory to free
+ * @ptr: Memory to free
*
* Free memory allocated with devm_kmalloc().
*/
-void devm_kfree(struct udevice *dev, void *p);
+void devm_kfree(struct udevice *dev, void *ptr);
#else /* ! CONFIG_DEVRES */
@@ -750,9 +757,9 @@ static inline void *devm_kcalloc(struct udevice *dev,
return kmalloc(n * size, flags | __GFP_ZERO);
}
-static inline void devm_kfree(struct udevice *dev, void *p)
+static inline void devm_kfree(struct udevice *dev, void *ptr)
{
- kfree(p);
+ kfree(ptr);
}
#endif /* ! CONFIG_DEVRES */
diff --git a/include/linux/compat.h b/include/linux/compat.h
index fbebf910ad..59937de960 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -4,6 +4,7 @@
#include <malloc.h>
#include <linux/types.h>
#include <linux/err.h>
+#include <linux/kernel.h>
struct unused {};
typedef struct unused unused_t;
@@ -49,22 +50,47 @@ static inline void *kzalloc(size_t size, gfp_t flags)
{
return kmalloc(size, flags | __GFP_ZERO);
}
+
+static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)
+{
+ if (size != 0 && n > SIZE_MAX / size)
+ return NULL;
+ return kmalloc(n * size, flags | __GFP_ZERO);
+}
+
+static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
+{
+ return kmalloc_array(n, size, flags | __GFP_ZERO);
+}
+
#define vmalloc(size) kmalloc(size, 0)
#define __vmalloc(size, flags, pgsz) kmalloc(size, flags)
static inline void *vzalloc(unsigned long size)
{
return kzalloc(size, 0);
}
-#define kfree(ptr) free(ptr)
-#define vfree(ptr) free(ptr)
+static inline void kfree(const void *block)
+{
+ free((void *)block);
+}
+static inline void vfree(const void *addr)
+{
+ free((void *)addr);
+}
struct kmem_cache { int sz; };
struct kmem_cache *get_mem(int element_sz);
#define kmem_cache_create(a, sz, c, d, e) get_mem(sz)
void *kmem_cache_alloc(struct kmem_cache *obj, int flag);
-#define kmem_cache_free(obj, size) free(size)
-#define kmem_cache_destroy(obj) free(obj)
+static inline void kmem_cache_free(struct kmem_cache *cachep, void *obj)
+{
+ free(obj);
+}
+static inline void kmem_cache_destroy(struct kmem_cache *cachep)
+{
+ free(cachep);
+}
#define DECLARE_WAITQUEUE(...) do { } while (0)
#define add_wait_queue(...) do { } while (0)
@@ -159,6 +185,8 @@ typedef unsigned long blkcnt_t;
#define class_create(...) __builtin_return_address(0)
#define class_create_file(...) 0
+#define class_register(...) 0
+#define class_unregister(...)
#define class_remove_file(...)
#define class_destroy(...)
#define misc_register(...) 0
@@ -171,6 +199,7 @@ typedef unsigned long blkcnt_t;
#define dev_set_name(...) do { } while (0)
#define device_register(...) 0
+#define device_unregister(...)
#define volume_sysfs_init(...) 0
#define volume_sysfs_close(...) do { } while (0)
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index bc4d9bf8f9..e3d3fc73fd 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -244,6 +244,7 @@ struct mtd_info {
#ifndef __UBOOT__
int (*_suspend) (struct mtd_info *mtd);
void (*_resume) (struct mtd_info *mtd);
+ void (*_reboot) (struct mtd_info *mtd);
#endif
/*
* If the driver is something smart, like UBI, it may need to maintain
@@ -478,6 +479,8 @@ static inline int mtd_is_bitflip_or_eccerr(int err) {
return mtd_is_bitflip(err) || mtd_is_eccerr(err);
}
+unsigned mtd_mmap_capabilities(struct mtd_info *mtd);
+
#ifdef __UBOOT__
/* drivers/mtd/mtdcore.h */
int add_mtd_device(struct mtd_info *mtd);
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h
index 05d0ab54c0..036779b347 100644
--- a/include/linux/mtd/ubi.h
+++ b/include/linux/mtd/ubi.h
@@ -12,6 +12,7 @@
#include <linux/types.h>
#ifndef __UBOOT__
#include <linux/ioctl.h>
+#include <linux/scatterlist.h>
#include <mtd/ubi-user.h>
#endif
@@ -19,16 +20,25 @@
#define UBI_ALL -1
/*
+ * Maximum number of scatter gather list entries,
+ * we use only 64 to have a lower memory foot print.
+ */
+#define UBI_MAX_SG_COUNT 64
+
+/*
* enum ubi_open_mode - UBI volume open mode constants.
*
* UBI_READONLY: read-only mode
* UBI_READWRITE: read-write mode
* UBI_EXCLUSIVE: exclusive mode
+ * UBI_METAONLY: modify only the volume meta-data,
+ * i.e. the data stored in the volume table, but not in any of volume LEBs.
*/
enum {
UBI_READONLY = 1,
UBI_READWRITE,
- UBI_EXCLUSIVE
+ UBI_EXCLUSIVE,
+ UBI_METAONLY
};
/**
@@ -106,6 +116,37 @@ struct ubi_volume_info {
};
/**
+ * struct ubi_sgl - UBI scatter gather list data structure.
+ * @list_pos: current position in @sg[]
+ * @page_pos: current position in @sg[@list_pos]
+ * @sg: the scatter gather list itself
+ *
+ * ubi_sgl is a wrapper around a scatter list which keeps track of the
+ * current position in the list and the current list item such that
+ * it can be used across multiple ubi_leb_read_sg() calls.
+ */
+struct ubi_sgl {
+ int list_pos;
+ int page_pos;
+#ifndef __UBOOT__
+ struct scatterlist sg[UBI_MAX_SG_COUNT];
+#endif
+};
+
+/**
+ * ubi_sgl_init - initialize an UBI scatter gather list data structure.
+ * @usgl: the UBI scatter gather struct itself
+ *
+ * Please note that you still have to use sg_init_table() or any adequate
+ * function to initialize the unterlaying struct scatterlist.
+ */
+static inline void ubi_sgl_init(struct ubi_sgl *usgl)
+{
+ usgl->list_pos = 0;
+ usgl->page_pos = 0;
+}
+
+/**
* struct ubi_device_info - UBI device description data structure.
* @ubi_num: ubi device number
* @leb_size: logical eraseblock size on this UBI device
@@ -214,6 +255,8 @@ int ubi_unregister_volume_notifier(struct notifier_block *nb);
void ubi_close_volume(struct ubi_volume_desc *desc);
int ubi_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset,
int len, int check);
+int ubi_leb_read_sg(struct ubi_volume_desc *desc, int lnum, struct ubi_sgl *sgl,
+ int offset, int len, int check);
int ubi_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf,
int offset, int len);
int ubi_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf,
@@ -234,4 +277,14 @@ static inline int ubi_read(struct ubi_volume_desc *desc, int lnum, char *buf,
{
return ubi_leb_read(desc, lnum, buf, offset, len, 0);
}
+
+/*
+ * This function is the same as the 'ubi_leb_read_sg()' function, but it does
+ * not provide the checking capability.
+ */
+static inline int ubi_read_sg(struct ubi_volume_desc *desc, int lnum,
+ struct ubi_sgl *sgl, int offset, int len)
+{
+ return ubi_leb_read_sg(desc, lnum, sgl, offset, len, 0);
+}
#endif /* !__LINUX_UBI_H__ */
diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h
index 048b4773fc..52572b9b02 100644
--- a/include/mtd/cfi_flash.h
+++ b/include/mtd/cfi_flash.h
@@ -105,10 +105,10 @@
#define NUM_ERASE_REGIONS 4 /* max. number of erase regions */
typedef union {
- unsigned char c;
- unsigned short w;
- unsigned long l;
- unsigned long long ll;
+ u8 w8;
+ u16 w16;
+ u32 w32;
+ u64 w64;
} cfiword_t;
/* CFI standard query structure */
diff --git a/include/pci.h b/include/pci.h
index e24c970130..ed135a5122 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -797,7 +797,7 @@ struct udevice;
*
* Every device on a PCI bus has this per-child data.
*
- * It can be accessed using dev_get_parentdata(dev) if dev->parent is a
+ * It can be accessed using dev_get_parent_priv(dev) if dev->parent is a
* PCI bus (i.e. UCLASS_PCI)
*
* @devfn: Encoded device and function index - see PCI_DEVFN()
diff --git a/include/spi.h b/include/spi.h
index 51fdfd6d73..b4d27232ec 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -88,7 +88,7 @@ struct dm_spi_slave_platdata {
* struct spi_slave - Representation of a SPI slave
*
* For driver model this is the per-child data used by the SPI bus. It can
- * be accessed using dev_get_parentdata() on the slave device. The SPI uclass
+ * be accessed using dev_get_parent_priv() on the slave device. The SPI uclass
* sets uip per_child_auto_alloc_size to sizeof(struct spi_slave), and the
* driver should not override it. Two platform data fields (max_hz and mode)
* are copied into this structure to provide an initial value. This allows
diff --git a/include/tis.h b/include/tis.h
deleted file mode 100644
index 1985d9e60e..0000000000
--- a/include/tis.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef __TIS_H
-#define __TIS_H
-
-#ifndef CONFIG_DM_TPM
-
-#include <common.h>
-
-/* Low-level interface to access TPM */
-
-/*
- * tis_init()
- *
- * Initialize the TPM device. Returns 0 on success or -1 on
- * failure (in case device probing did not succeed).
- */
-int tis_init(void);
-
-/*
- * tis_open()
- *
- * Requests access to locality 0 for the caller. After all commands have been
- * completed the caller is supposed to call tis_close().
- *
- * Returns 0 on success, -1 on failure.
- */
-int tis_open(void);
-
-/*
- * tis_close()
- *
- * terminate the currect session with the TPM by releasing the locked
- * locality. Returns 0 on success of -1 on failure (in case lock
- * removal did not succeed).
- */
-int tis_close(void);
-
-/*
- * tis_sendrecv()
- *
- * Send the requested data to the TPM and then try to get its response
- *
- * @sendbuf - buffer of the data to send
- * @send_size size of the data to send
- * @recvbuf - memory to save the response to
- * @recv_len - pointer to the size of the response buffer
- *
- * Returns 0 on success (and places the number of response bytes at recv_len)
- * or -1 on failure.
- */
-int tis_sendrecv(const uint8_t *sendbuf, size_t send_size, uint8_t *recvbuf,
- size_t *recv_len);
-#endif
-
-#endif /* __TIS_H */
diff --git a/include/tpm.h b/include/tpm.h
index 086b672718..9a6585d3d4 100644
--- a/include/tpm.h
+++ b/include/tpm.h
@@ -8,8 +8,6 @@
#ifndef __TPM_H
#define __TPM_H
-#include <tis.h>
-
/*
* Here is a partial implementation of TPM commands. Please consult TCG Main
* Specification for definitions of TPM commands.
@@ -196,8 +194,6 @@ struct tpm_permanent_flags {
u8 disable_full_da_logic_info;
} __packed;
-#ifdef CONFIG_DM_TPM
-
/* Max buffer size supported by our tpm */
#define TPM_DEV_BUFSIZE 1260
@@ -375,8 +371,6 @@ int tpm_get_desc(struct udevice *dev, char *buf, int size);
int tpm_xfer(struct udevice *dev, const uint8_t *sendbuf, size_t send_size,
uint8_t *recvbuf, size_t *recv_size);
-#endif /* CONFIG_DM_TPM */
-
/**
* Initialize TPM device. It must be called before any TPM commands.
*
diff --git a/include/usb.h b/include/usb.h
index 88ebbe6e3f..3d0facbed9 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -96,7 +96,7 @@ enum {
* (the hubs) have this as parent data. Hubs are children of controllers or
* other hubs and there is always a single root hub for each controller.
* Therefore struct usb_device can always be accessed with
- * dev_get_parentdata(dev), where dev is a USB device.
+ * dev_get_parent_priv(dev), where dev is a USB device.
*
* Pointers exist for obtaining both the device (could be any uclass) and
* controller (UCLASS_USB) from this structure. The controller does not have
OpenPOWER on IntegriCloud