summaryrefslogtreecommitdiffstats
path: root/include/dm
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-05-17 13:58:27 -0400
committerTom Rini <trini@konsulko.com>2016-05-17 13:58:27 -0400
commit4b6e1fda107e5244e80ebc41865650ac2873dc88 (patch)
treef448089740af77c2987d12e2dd5b753b7659586f /include/dm
parent27bec5c12757c80f598b704477c1bc6c250bcb4c (diff)
parent341392dd115f1385c31bb0b034ec15f542730e30 (diff)
downloadtalos-obmc-uboot-4b6e1fda107e5244e80ebc41865650ac2873dc88.tar.gz
talos-obmc-uboot-4b6e1fda107e5244e80ebc41865650ac2873dc88.zip
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device.h16
-rw-r--r--include/dm/platform_data/serial_coldfire.h23
-rw-r--r--include/dm/uclass-id.h2
3 files changed, 40 insertions, 1 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 8970fc015c..e9a8ec72c9 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -41,6 +41,9 @@ struct driver_info;
/* Device is bound */
#define DM_FLAG_BOUND (1 << 6)
+/* Device name is allocated and should be freed on unbind() */
+#define DM_NAME_ALLOCED (1 << 7)
+
/**
* struct udevice - An instance of a driver
*
@@ -523,6 +526,9 @@ bool device_is_last_sibling(struct udevice *dev);
* this is unnecessary but for probed devices which don't get a useful name
* this function can be helpful.
*
+ * The name is allocated and will be freed automatically when the device is
+ * unbound.
+ *
* @dev: Device to update
* @name: New name (this string is allocated new memory and attached to
* the device)
@@ -532,6 +538,16 @@ bool device_is_last_sibling(struct udevice *dev);
int device_set_name(struct udevice *dev, const char *name);
/**
+ * device_set_name_alloced() - note that a device name is allocated
+ *
+ * This sets the DM_NAME_ALLOCED flag for the device, so that when it is
+ * unbound the name will be freed. This avoids memory leaks.
+ *
+ * @dev: Device to update
+ */
+void device_set_name_alloced(struct udevice *dev);
+
+/**
* device_is_on_pci_bus - Test if a device is on a PCI bus
*
* @dev: device to test
diff --git a/include/dm/platform_data/serial_coldfire.h b/include/dm/platform_data/serial_coldfire.h
new file mode 100644
index 0000000000..5d86456f1e
--- /dev/null
+++ b/include/dm/platform_data/serial_coldfire.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2015 Angelo Dureghello <angelo@sysam.it>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __serial_coldfire_h
+#define __serial_coldfire_h
+
+/*
+ * struct coldfire_serial_platdata - information about a coldfire port
+ *
+ * @base: Uart port base register address
+ * @port: Uart port index, for cpu with pinmux for uart / gpio
+ * baudrtatre: Uart port baudrate
+ */
+struct coldfire_serial_platdata {
+ unsigned long base;
+ int port;
+ int baudrate;
+};
+
+#endif /* __serial_coldfire_h */
diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h
index cbf9b2ca23..a5cf6e201c 100644
--- a/include/dm/uclass-id.h
+++ b/include/dm/uclass-id.h
@@ -26,11 +26,11 @@ enum uclass_id {
/* U-Boot uclasses start here - in alphabetical order */
UCLASS_ADC, /* Analog-to-digital converter */
+ UCLASS_AHCI, /* SATA disk controller */
UCLASS_BLK, /* Block device */
UCLASS_CLK, /* Clock source, e.g. used by peripherals */
UCLASS_CPU, /* CPU, typically part of an SoC */
UCLASS_CROS_EC, /* Chrome OS EC */
- UCLASS_DISK, /* Disk controller, e.g. SATA */
UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */
UCLASS_DMA, /* Direct Memory Access */
UCLASS_RAM, /* RAM controller */
OpenPOWER on IntegriCloud