ast2400: add SMC controllers (FMC and SPI)
commit7c1c69bca43c345481b778382e605e1d49a12d56
authorCédric Le Goater <clg@kaod.org>
Mon, 4 Jul 2016 12:06:37 +0000 (4 13:06 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 4 Jul 2016 12:15:22 +0000 (4 13:15 +0100)
tree65c85892cd86ac05bd267d9397111047aa940dc8
parent73bce5187ba93b34944aab08d1da5712c1183a68
ast2400: add SMC controllers (FMC and SPI)

The Aspeed AST2400 soc includes a static memory controller for the BMC
which supports NOR, NAND and SPI flash memory modules. This controller
has two modes : the SMC for the legacy interface which supports only
one module and the FMC for the new interface which supports up to five
modules. The AST2400 also includes a SPI only controller used for the
host firmware, commonly called BIOS on Intel. It can be used in three
mode : a SPI master, SPI slave and SPI pass-through

Below is the initial framework for the SMC controller (FMC mode only)
and the SPI controller: the sysbus object, MMIO for registers
configuration and controls. Each controller has a SPI bus and a
configurable number of CS lines for SPI flash slaves.

The differences between the controllers are small, so they are
abstracted using indirections on the register numbers.

Only SPI flash modules are supported.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-id: 1467138270-32481-7-git-send-email-clg@kaod.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: added one missing error_propagate]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/ast2400.c
hw/ssi/Makefile.objs
hw/ssi/aspeed_smc.c [new file with mode: 0644]
include/hw/arm/ast2400.h
include/hw/ssi/aspeed_smc.h [new file with mode: 0644]