cros_bundle_firmware: Add support for exynos memory frequency

Support the 'f' machine parameter so that the memory frequency can be
controlled from the fdt.

BUG=chromium-os:31121
BRANCH=none
TEST=manual
Change memory controller node in U-Boot's cros5250-common.dts to use a
clock-frequency of 533MHz instead of 800MHz.

	dmc@10C00000 {
		mem-interleave-size = <0x1f>;
		mem-type = "ddr3";
		clock-frequency = <533000000>;
		arm-frequency = <1700000000>;
	};

boot on snow with the SPL code manually changed to print the speed, and see
that it is 533MHz. Unfortunately the normal boot message gives a warning:

U-Boot 2011.12-02475-g0e7346a-dirty (Sep 14 2012 - 11:31:21) for SMDK5250

CPU:   S5PC520 @ 1700MHz
I2C:   ready
DRAM:  2 GiB Elpida DDR3 @ 800MHz (Warning: 533MHz requested)
MMC:   S5P MSHC0: 0, S5P MSHC1: 1
Using default environment

Change-Id: Ifbc5e2598c1987eac7903a22aa43a14b241a5e51
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33336
Reviewed-by: Randall Spangler <rspangler@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index 6d9418c..323fae2 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -642,6 +642,12 @@
           raise CmdError("Unknown memory manufacturer: '%s'" % mem_manuf)
         value = mem_manufs.index(mem_manuf)
         self._out.Info('  Memory manufacturer: %s (%d)' % (mem_manuf, value))
+      elif param == 'f' :
+        mem_freq = fdt.GetInt('/dmc', 'clock-frequency') / 1000000
+        if not mem_freq in [533, 667, 800]:
+          self._out.Warning("Unexpected memory speed '%s'" % mem_freq)
+        value = mem_freq
+        self._out.Info('  Memory speed: %d' % mem_freq)
       elif param == 'v':
         value = 31
         self._out.Info('  Memory interleave: %#0x' % value)