aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini2015-10-27 19:08:19 -0400
committerTom Rini2015-10-27 19:08:19 -0400
commit2431492aef1de33bd222c97ecc131a338d9c454e (patch)
tree4e57720bbefe998dbafcce6a1fb015baa936a73e /common
parentc139b5ff0999ec3d44a02ebdb623a92e5782e53e (diff)
parent4ea5243a3a2fbc59bbcdd401d75f1744bcd6280f (diff)
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'common')
-rw-r--r--common/board_r.c3
-rw-r--r--common/cmd_tpm.c13
-rw-r--r--common/cmd_usb.c10
-rw-r--r--common/usb_hub.c4
-rw-r--r--common/usb_storage.c2
5 files changed, 12 insertions, 20 deletions
diff --git a/common/board_r.c b/common/board_r.c
index a412bb7554d..c4fd3eaf8cc 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -449,6 +449,9 @@ static int initr_env(void)
env_relocate();
else
set_default_env(NULL);
+#ifdef CONFIG_OF_CONTROL
+ setenv_addr("fdtcontroladdr", gd->fdt_blob);
+#endif
/* Initialize from environment */
load_addr = getenv_ulong("loadaddr", 16, load_addr);
diff --git a/common/cmd_tpm.c b/common/cmd_tpm.c
index 97501cc3d18..add6bfb416e 100644
--- a/common/cmd_tpm.c
+++ b/common/cmd_tpm.c
@@ -443,7 +443,6 @@ TPM_COMMAND_NO_ARG(tpm_force_clear)
TPM_COMMAND_NO_ARG(tpm_physical_enable)
TPM_COMMAND_NO_ARG(tpm_physical_disable)
-#ifdef CONFIG_DM_TPM
static int get_tpm(struct udevice **devp)
{
int rc;
@@ -476,11 +475,11 @@ static int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
-#endif
static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag,
int argc, char * const argv[])
{
+ struct udevice *dev;
void *command;
uint8_t response[1024];
size_t count, response_length = sizeof(response);
@@ -492,17 +491,11 @@ static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
}
-#ifdef CONFIG_DM_TPM
- struct udevice *dev;
-
rc = get_tpm(&dev);
if (rc)
return rc;
rc = tpm_xfer(dev, command, count, response, &response_length);
-#else
- rc = tis_sendrecv(command, count, response, &response_length);
-#endif
free(command);
if (!rc) {
puts("tpm response:\n");
@@ -657,9 +650,7 @@ TPM_COMMAND_NO_ARG(tpm_end_oiap)
U_BOOT_CMD_MKENT(cmd, 0, 1, do_tpm_ ## cmd, "", "")
static cmd_tbl_t tpm_commands[] = {
-#ifdef CONFIG_DM_TPM
U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
-#endif
U_BOOT_CMD_MKENT(init, 0, 1,
do_tpm_init, "", ""),
U_BOOT_CMD_MKENT(startup, 0, 1,
@@ -730,9 +721,7 @@ U_BOOT_CMD(tpm, CONFIG_SYS_MAXARGS, 1, do_tpm,
"cmd args...\n"
" - Issue TPM command <cmd> with arguments <args...>.\n"
"Admin Startup and State Commands:\n"
-#ifdef CONFIG_DM_TPM
" info - Show information about the TPM\n"
-#endif
" init\n"
" - Put TPM into a state where it waits for 'startup' command.\n"
" startup mode\n"
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 6bdbbc5c052..1ef55dcd1c7 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -281,7 +281,7 @@ static struct usb_device *usb_find_device(int devnum)
if (!device_active(hub))
continue;
- udev = dev_get_parentdata(hub);
+ udev = dev_get_parent_priv(hub);
if (udev->devnum == devnum)
return udev;
@@ -291,7 +291,7 @@ static struct usb_device *usb_find_device(int devnum)
if (!device_active(hub))
continue;
- udev = dev_get_parentdata(dev);
+ udev = dev_get_parent_priv(dev);
if (udev->devnum == devnum)
return udev;
}
@@ -407,7 +407,7 @@ static void usb_show_tree_graph(struct usb_device *dev, char *pre)
if (!device_active(child))
continue;
- udev = dev_get_parentdata(child);
+ udev = dev_get_parent_priv(child);
/* Ignore emulators, we only want real devices */
if (device_get_uclass_id(child) != UCLASS_USB_EMUL) {
@@ -553,7 +553,7 @@ static void show_info(struct udevice *dev)
struct udevice *child;
struct usb_device *udev;
- udev = dev_get_parentdata(dev);
+ udev = dev_get_parent_priv(dev);
usb_display_desc(udev);
usb_display_config(udev);
for (device_find_first_child(dev, &child);
@@ -641,7 +641,7 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
device_find_first_child(bus, &dev);
if (dev && device_active(dev)) {
- udev = dev_get_parentdata(dev);
+ udev = dev_get_parent_priv(dev);
usb_show_tree(udev);
}
}
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 415b45c1f13..a92c9fb73d0 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -230,7 +230,7 @@ int legacy_hub_port_reset(struct usb_device *dev, int port,
#ifdef CONFIG_DM_USB
int hub_port_reset(struct udevice *dev, int port, unsigned short *portstat)
{
- struct usb_device *udev = dev_get_parentdata(dev);
+ struct usb_device *udev = dev_get_parent_priv(dev);
return legacy_hub_port_reset(udev, port, portstat);
}
@@ -610,7 +610,7 @@ int usb_hub_probe(struct usb_device *dev, int ifnum)
#ifdef CONFIG_DM_USB
int usb_hub_scan(struct udevice *hub)
{
- struct usb_device *udev = dev_get_parentdata(hub);
+ struct usb_device *udev = dev_get_parent_priv(hub);
return usb_hub_configure(udev);
}
diff --git a/common/usb_storage.c b/common/usb_storage.c
index b390310ee35..0ccaeb4a140 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1408,7 +1408,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
static int usb_mass_storage_probe(struct udevice *dev)
{
- struct usb_device *udev = dev_get_parentdata(dev);
+ struct usb_device *udev = dev_get_parent_priv(dev);
int ret;
usb_disable_asynch(1); /* asynch transfer not allowed */