public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Possible bug in U-Boot Exynos clock driver
@ 2014-08-22  6:38 Thierry Reding
  0 siblings, 0 replies; only message in thread
From: Thierry Reding @ 2014-08-22  6:38 UTC (permalink / raw)
  To: u-boot

Hi,

I've been running a couple of builds for a patch that I'm working on and
I noticed the following errors happening for all Exynos boards:

	arch/arm/cpu/armv7/exynos/clock.c: In function 'clock_get_periph_rate':
	arch/arm/cpu/armv7/exynos/clock.c:263:47: warning: array subscript is above array bounds [-Warray-bounds]
	  struct clk_bit_info *bit_info = &clk_bit_info[peripheral];
                                               ^
The problem seems to be that clock_get_periph_rate() is called with the
PERIPH_ID_PWM0 parameter in get_pwm_clk(). clock_get_periph_rate() in
turn calls exynos5_get_periph_rate() which uses the peripheral parameter
to index into the clk_bit_info array. However, PERIPH_ID_PWM0 seems to
evaluate to 132, but the clk_bit_info contains only 29 elements.

I don't know how to properly fix this, but perhaps the clk_bit_info
table needs to be extended to cover other clocks?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140822/10db3df5/attachment.pgp>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-22  6:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22  6:38 [U-Boot] Possible bug in U-Boot Exynos clock driver Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox