summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2014-11-23 11:52:20 +0800
committerStefano Babic <sbabic@denx.de>2014-12-19 10:43:04 +0100
commiteb412d79e476e871374ed1b8e561287746609018 (patch)
tree4d7fe29e1dc01688b631fdd2e344e2dc40fce69b
parentd8bec60c1b0de7770f9b56ad092ab9be801d99af (diff)
downloadu-boot-imx-eb412d79e476e871374ed1b8e561287746609018.zip
u-boot-imx-eb412d79e476e871374ed1b8e561287746609018.tar.gz
u-boot-imx-eb412d79e476e871374ed1b8e561287746609018.tar.bz2
imx:mx6 fix return value of mxc_get_clock
mxc_get_clock's return type is unsigned int. 'return -1' is same with 'return 0xffffffff', so 0 should be used as the return value when unsupported mxc_clock type is passed to mxc_get_clock. Also include an err message when unsupported mxc_clock type is passed to mxc_get_clock. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
-rw-r--r--arch/arm/cpu/armv7/mx6/clock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index 93a02ad..b6983e6 100644
--- a/arch/arm/cpu/armv7/mx6/clock.c
+++ b/arch/arm/cpu/armv7/mx6/clock.c
@@ -746,10 +746,11 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
case MXC_SATA_CLK:
return get_ahb_clk();
default:
+ printf("Unsupported MXC CLK: %d\n", clk);
break;
}
- return -1;
+ return 0;
}
/*