aspeed/sdmc: Simplify calculation of RAM bits
commit9951133e467e1936180263907d51ef42237c7851
authorCédric Le Goater <clg@kaod.org>
Tue, 1 Sep 2020 12:21:51 +0000 (1 14:21 +0200)
committerCédric Le Goater <clg@kaod.org>
Tue, 1 Sep 2020 12:21:51 +0000 (1 14:21 +0200)
treedf252418a3d39367456d72928d28b5655610fcc7
parent57de884d551dda5b58548168e6a88f428dd59524
aspeed/sdmc: Simplify calculation of RAM bits

Changes in commit 533eb415df2e ("arm/aspeed: actually check RAM size")
introduced a 'valid_ram_sizes' array which can be used to compute the
associated bit field value encoding the RAM size. The field is simply
the index of the array.

Reviewed-by: Joel Stanley <joel@jms.id.au>
Message-Id: <20200819100956.2216690-19-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/misc/aspeed_sdmc.c