]> git.sur5r.net Git - u-boot/blobdiff - drivers/timer/altera_timer.c
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
[u-boot] / drivers / timer / altera_timer.c
index 89fe05b704589c45696a09b7db8b026ceca70bc2..bc76819674be7a2a1a6c7d08d13a21333c904260 100644 (file)
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000-2002
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
  * Scott McNutt <smcnutt@psyent.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -14,8 +13,6 @@
 #include <timer.h>
 #include <asm/io.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /* control register */
 #define ALTERA_TIMER_CONT      BIT(1)  /* Continuous mode */
 #define ALTERA_TIMER_START     BIT(2)  /* Start timer */
@@ -71,7 +68,7 @@ static int altera_timer_ofdata_to_platdata(struct udevice *dev)
 {
        struct altera_timer_platdata *plat = dev_get_platdata(dev);
 
-       plat->regs = map_physmem(dev_get_addr(dev),
+       plat->regs = map_physmem(devfdt_get_addr(dev),
                                 sizeof(struct altera_timer_regs),
                                 MAP_NOCACHE);