coreboot/src/cpu
David Hendricks 401da25827 exynos5420: re-factor clock_get_periph_rate()
This re-factors clock_get_periph_rate() to be a simpler and also
make a few corrections along the way. To summarize:

- clk_bit_info is no longer used. It had numerous errors and was
  really painful anyway since it was just a bunch of opaque magic
  numbers that made bugs non-obvious.

- Clock source bitfields for peripherals handled in the switch
  statement are 3 bits, not 4. Some divider values are 3 bits,
  some are 4. The earlier code always assumed 4 bits for both
  which included reserved bits in many cases.

- UART source clock and divider shift values were wrong.

- PWM clock divider was being read from the wrong register.

- SPI3 divider value was being read from the wrong register.

- There was a really confusing calculation for SDMMC0 and SDMMC2
  clock rates, but it was never actually used since the switch
  statement never handled PERIPH_ID_SDMMC{0,2} and would thus
  return if they were ever passed into this function.

Signed-off-by: David Hendricks <dhendrix@chromium.org>

Change-Id: I0a03a64d8b42fbe83dbf377292597ce681b22f4b
Reviewed-on: https://gerrit.chromium.org/gerrit/65284
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Reviewed-on: http://review.coreboot.org/4463
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2013-12-21 22:46:38 +01:00
..
amd cpu/amd: Remove error messages on non-matching microcode patches 2013-12-13 09:07:46 +01:00
armltd qemu-armv7 CPU: Move Kconfig code into CPU directory 2013-12-05 00:38:06 +01:00
dmp dmp/vortex86ex: Add timeout for keyboard system flag checking. 2013-11-30 20:18:06 +01:00
intel haswell: Update microcode revision 2013-12-21 07:39:04 +01:00
qemu-x86 qemu: add q35 support 2013-06-17 17:04:17 +02:00
samsung exynos5420: re-factor clock_get_periph_rate() 2013-12-21 22:46:38 +01:00
ti am335x: Update the config vars selected by CPU_TI_AM335X. 2013-09-17 00:41:01 +02:00
via cpu: Rename CPU_MICROCODE_IN_CBFS to SUPPORT_CPU_UCODE_IN_CBFS 2013-12-13 01:28:36 +01:00
x86 Update SMM for FSP systems 2013-12-04 19:35:34 +01:00
Kconfig cpu: Rename CPU_MICROCODE_IN_CBFS to SUPPORT_CPU_UCODE_IN_CBFS 2013-12-13 01:28:36 +01:00
Makefile.inc Add the Intel FSP 206ax CPU core support 2013-12-04 18:45:42 +01:00