diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-zynq/Kconfig | 25 | ||||
-rw-r--r-- | arch/arm/mach-zynq/include/mach/hardware.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-zynq/spl.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-zynq/timer.c | 83 |
4 files changed, 25 insertions, 86 deletions
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index 483c3a0..1de5b07 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig @@ -1,5 +1,13 @@ if ARCH_ZYNQ +config ZYNQ_CUSTOM_INIT + bool "Use custom ps7_init provided by Xilinx tool" + help + U-Boot includes ps7_init_gpl.[ch] for some Zynq board variants. + If you want to override them with customized ones + or ps7_init code for your board is missing, please say Y here + and add ones into board/xilinx/zynq/custom_hw_platform/ directory. + choice prompt "Xilinx Zynq board select" optional @@ -14,13 +22,25 @@ config TARGET_ZYNQ_PICOZED bool "Zynq PicoZed" config TARGET_ZYNQ_ZC70X - bool "Zynq ZC702/ZC706 Board" + bool "Zynq ZC702/ZC706 Board (deprecated)" + select ZYNQ_CUSTOM_INIT + help + This option is deprecated. Use TARGET_ZYNQ_ZC702 + or TARGET_ZYNQ_706. + +config TARGET_ZYNQ_ZC702 + bool "Zynq ZC702 Board" + +config TARGET_ZYNQ_ZC706 + bool "Zynq ZC706 Board" config TARGET_ZYNQ_ZC770 bool "Zynq ZC770 Board" + select ZYNQ_CUSTOM_INIT config TARGET_ZYNQ_ZYBO bool "Zynq Zybo Board" + select ZYNQ_CUSTOM_INIT endchoice @@ -37,7 +57,8 @@ config SYS_CONFIG_NAME default "zynq_zed" if TARGET_ZYNQ_ZED default "zynq_microzed" if TARGET_ZYNQ_MICROZED default "zynq_picozed" if TARGET_ZYNQ_PICOZED - default "zynq_zc70x" if TARGET_ZYNQ_ZC70X + default "zynq_zc70x" if TARGET_ZYNQ_ZC702 || TARGET_ZYNQ_ZC706 \ + || TARGET_ZYNQ_ZC70X default "zynq_zc770" if TARGET_ZYNQ_ZC770 default "zynq_zybo" if TARGET_ZYNQ_ZYBO diff --git a/arch/arm/mach-zynq/include/mach/hardware.h b/arch/arm/mach-zynq/include/mach/hardware.h index e2e0b73..9a51d6b 100644 --- a/arch/arm/mach-zynq/include/mach/hardware.h +++ b/arch/arm/mach-zynq/include/mach/hardware.h @@ -12,7 +12,6 @@ #define ZYNQ_SYS_CTRL_BASEADDR 0xF8000000 #define ZYNQ_DEV_CFG_APB_BASEADDR 0xF8007000 #define ZYNQ_SCU_BASEADDR 0xF8F00000 -#define ZYNQ_SCUTIMER_BASEADDR 0xF8F00600 #define ZYNQ_GEM_BASEADDR0 0xE000B000 #define ZYNQ_GEM_BASEADDR1 0xE000C000 #define ZYNQ_SDHCI_BASEADDR0 0xE0100000 diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c index 13025f0..e7df6d3 100644 --- a/arch/arm/mach-zynq/spl.c +++ b/arch/arm/mach-zynq/spl.c @@ -85,6 +85,6 @@ __weak void ps7_init(void) { /* * This function is overridden by the one in - * board/xilinx/zynq/ps7_init_gpl.c, if it exists. + * board/xilinx/zynq/(platform)/ps7_init_gpl.c, if it exists. */ } diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c index 5ed9642..8ff82dc 100644 --- a/arch/arm/mach-zynq/timer.c +++ b/arch/arm/mach-zynq/timer.c @@ -78,91 +78,10 @@ int timer_init(void) } /* - * This function is derived from PowerPC code (read timebase as long long). - * On ARM it just returns the timer value. - */ -ulong get_timer_masked(void) -{ - ulong now; - - now = readl(&timer_base->counter) / - (gd->arch.timer_rate_hz / CONFIG_SYS_HZ); - - if (gd->arch.lastinc >= now) { - /* Normal mode */ - gd->arch.tbl += gd->arch.lastinc - now; - } else { - /* We have an overflow ... */ - gd->arch.tbl += gd->arch.lastinc + (TIMER_LOAD_VAL / - (gd->arch.timer_rate_hz / CONFIG_SYS_HZ)) - - now + 1; - } - gd->arch.lastinc = now; - - return gd->arch.tbl; -} - -void __udelay(unsigned long usec) -{ - u32 countticks; - u32 timeend; - u32 timediff; - u32 timenow; - - if (usec == 0) - return; - - countticks = lldiv(((unsigned long long)gd->arch.timer_rate_hz * usec), - 1000000); - - /* decrementing timer */ - timeend = readl(&timer_base->counter) - countticks; - -#if TIMER_LOAD_VAL != 0xFFFFFFFF - /* do not manage multiple overflow */ - if (countticks >= TIMER_LOAD_VAL) - countticks = TIMER_LOAD_VAL - 1; -#endif - - do { - timenow = readl(&timer_base->counter); - - if (timenow >= timeend) { - /* normal case */ - timediff = timenow - timeend; - } else { - if ((TIMER_LOAD_VAL - timeend + timenow) <= - countticks) { - /* overflow */ - timediff = TIMER_LOAD_VAL - timeend + timenow; - } else { - /* missed the exact match */ - break; - } - } - } while (timediff > 0); -} - -/* Timer without interrupts */ -ulong get_timer(ulong base) -{ - return get_timer_masked() - base; -} - -/* - * This function is derived from PowerPC code (read timebase as long long). - * On ARM it just returns the timer value. - */ -unsigned long long get_ticks(void) -{ - return get_timer(0); -} - -/* * This function is derived from PowerPC code (timebase clock frequency). * On ARM it returns the number of timer ticks per second. */ ulong get_tbclk(void) { - return CONFIG_SYS_HZ; + return gd->arch.timer_rate_hz; } |