]> git.sur5r.net Git - u-boot/blobdiff - drivers/timer/omap-timer.c
video: arm: rpi: Add brcm,bcm2708-fb compatible
[u-boot] / drivers / timer / omap-timer.c
index 3bb38c522c07ac0f2bbfea694041f5e8b9c65ea7..3f847984cb993f9d47a83a7864c922f134ddc556 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * TI OMAP timer driver
  *
  * Copyright (C) 2015, Texas Instruments, Incorporated
- *
- * SPDX-License-Identifier: GPL-2.0+
  */
 
 #include <common.h>
@@ -13,8 +12,6 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* Timer register bits */
 #define TCLR_START                     BIT(0)  /* Start=1 */
 #define TCLR_AUTO_RELOAD               BIT(1)  /* Auto reload */
@@ -79,7 +76,8 @@ static int omap_timer_ofdata_to_platdata(struct udevice *dev)
 {
        struct omap_timer_priv *priv = dev_get_priv(dev);
 
-       priv->regs = (struct omap_gptimer_regs *)dev_get_addr(dev);
+       priv->regs = map_physmem(devfdt_get_addr(dev),
+                                sizeof(struct omap_gptimer_regs), MAP_NOCACHE);
 
        return 0;
 }