diff options
author | Simon Glass <sjg@chromium.org> | 2020-04-08 16:57:20 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-04-16 14:36:28 +0800 |
commit | 600f584d8191799acc19464c4a07f3056083057a (patch) | |
tree | 87bbba5d9ad49ad045b524d5ce9a1a8d60abd508 /test | |
parent | 98036fbdaf0ac1d6dc3ab3cb6db24c020bb65d6f (diff) | |
download | u-boot-600f584d8191799acc19464c4a07f3056083057a.tar.gz |
cpu: Support querying the address width
Different CPUs may support different address widths, meaning the amount of
memory they can address. Add a property for this to the cpu_info struct.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/cpu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dm/cpu.c b/test/dm/cpu.c index f5f1caef71..e6dc576ea3 100644 --- a/test/dm/cpu.c +++ b/test/dm/cpu.c @@ -33,6 +33,7 @@ static int dm_test_cpu(struct unit_test_state *uts) ut_assertok(cpu_get_info(dev, &info)); ut_asserteq(info.cpu_freq, 42 * 42 * 42 * 42 * 42); ut_asserteq(info.features, 0x42424242); + ut_asserteq(info.address_width, 32); ut_asserteq(cpu_get_count(dev), 42); |