diff options
author | Tom Rini <trini@konsulko.com> | 2018-01-26 07:46:34 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-26 07:46:34 -0500 |
commit | 1d12a7c8cd4e58d5c3989bc239d5fa9577079dfd (patch) | |
tree | 00550f8c91498b648d95c0c1c9f642deb324c4a5 /arch/arm/mach-socfpga/clock_manager_gen5.c | |
parent | a3f77c810b1a57853e4d5fee3014ac8cbbd03a9a (diff) | |
parent | 58c125b9e2b232ce73ed7b24ba7b1ca5ff41c5bd (diff) |
Merge git://git.denx.de/u-boot-spi
Diffstat (limited to 'arch/arm/mach-socfpga/clock_manager_gen5.c')
-rw-r--r-- | arch/arm/mach-socfpga/clock_manager_gen5.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-socfpga/clock_manager_gen5.c b/arch/arm/mach-socfpga/clock_manager_gen5.c index 31fd51097a..3d048ba3e4 100644 --- a/arch/arm/mach-socfpga/clock_manager_gen5.c +++ b/arch/arm/mach-socfpga/clock_manager_gen5.c @@ -6,6 +6,7 @@ #include <common.h> #include <asm/io.h> +#include <dm.h> #include <asm/arch/clock_manager.h> #include <wait_bit.h> @@ -37,15 +38,13 @@ static int cm_write_with_phase(u32 value, u32 reg_address, u32 mask) int ret; /* poll until phase is zero */ - ret = wait_for_bit(__func__, (const u32 *)reg_address, mask, - false, 20000, false); + ret = wait_for_bit_le32(reg_address, mask, false, 20000, false); if (ret) return ret; writel(value, reg_address); - return wait_for_bit(__func__, (const u32 *)reg_address, mask, - false, 20000, false); + return wait_for_bit_le32(reg_address, mask, false, 20000, false); } /* @@ -509,6 +508,14 @@ unsigned int cm_get_spi_controller_clk_hz(void) return clock; } +/* Override weak dw_spi_get_clk implementation in designware_spi.c driver */ +int dw_spi_get_clk(struct udevice *bus, ulong *rate) +{ + *rate = cm_get_spi_controller_clk_hz(); + + return 0; +} + void cm_print_clock_quick_summary(void) { printf("MPU %10ld kHz\n", cm_get_mpu_clk_hz() / 1000); |