dm: treewide: Rename auto_alloc_size members to be shorter
[platform/kernel/u-boot.git] / drivers / timer / cadence-ttc.c
index 75263c5..7107bf2 100644 (file)
@@ -4,10 +4,14 @@
  */
 
 #include <common.h>
+#include <bootstage.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <timer.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
+#include <linux/err.h>
 
 #define CNT_CNTRL_RESET                BIT(4)
 
@@ -53,13 +57,11 @@ ulong timer_get_boot_us(void)
 }
 #endif
 
-static int cadence_ttc_get_count(struct udevice *dev, u64 *count)
+static u64 cadence_ttc_get_count(struct udevice *dev)
 {
        struct cadence_ttc_priv *priv = dev_get_priv(dev);
 
-       *count = readl(&priv->regs->counter_val1);
-
-       return 0;
+       return readl(&priv->regs->counter_val1);
 }
 
 static int cadence_ttc_probe(struct udevice *dev)
@@ -108,7 +110,7 @@ U_BOOT_DRIVER(cadence_ttc) = {
        .id = UCLASS_TIMER,
        .of_match = cadence_ttc_ids,
        .ofdata_to_platdata = cadence_ttc_ofdata_to_platdata,
-       .priv_auto_alloc_size = sizeof(struct cadence_ttc_priv),
+       .priv_auto      = sizeof(struct cadence_ttc_priv),
        .probe = cadence_ttc_probe,
        .ops = &cadence_ttc_ops,
 };