Commit ad5ce3b6 authored by Timothy Pearson's avatar Timothy Pearson

Add support for programming SPI devices attached to the AST2400 BMC

All possible (five) Flash devices are supported with the programmer-
specific parameter spibus=<n>, along with a special setting spibus=host
to access the dedicated SPI controller (often used for the host BIOS).

Change-Id: I3d49c73b6f5da97af23cace89759923265c256dc
Signed-off-by: Timothy Pearson's avatarTimothy Pearson <tpearson@raptorengineering.com>
parent acf6d534
...@@ -214,6 +214,11 @@ UNSUPPORTED_FEATURES += CONFIG_GFXNVIDIA=yes ...@@ -214,6 +214,11 @@ UNSUPPORTED_FEATURES += CONFIG_GFXNVIDIA=yes
else else
override CONFIG_GFXNVIDIA = no override CONFIG_GFXNVIDIA = no
endif endif
ifeq ($(CONFIG_AST2400), yes)
UNSUPPORTED_FEATURES += CONFIG_AST2400=yes
else
override CONFIG_AST2400 = no
endif
ifeq ($(CONFIG_SATASII), yes) ifeq ($(CONFIG_SATASII), yes)
UNSUPPORTED_FEATURES += CONFIG_SATASII=yes UNSUPPORTED_FEATURES += CONFIG_SATASII=yes
else else
...@@ -441,6 +446,11 @@ UNSUPPORTED_FEATURES += CONFIG_GFXNVIDIA=yes ...@@ -441,6 +446,11 @@ UNSUPPORTED_FEATURES += CONFIG_GFXNVIDIA=yes
else else
override CONFIG_GFXNVIDIA = no override CONFIG_GFXNVIDIA = no
endif endif
ifeq ($(CONFIG_AST2400), yes)
UNSUPPORTED_FEATURES += CONFIG_AST2400=yes
else
override CONFIG_AST2400 = no
endif
ifeq ($(CONFIG_SATASII), yes) ifeq ($(CONFIG_SATASII), yes)
UNSUPPORTED_FEATURES += CONFIG_SATASII=yes UNSUPPORTED_FEATURES += CONFIG_SATASII=yes
else else
...@@ -569,6 +579,9 @@ CONFIG_NIC3COM ?= yes ...@@ -569,6 +579,9 @@ CONFIG_NIC3COM ?= yes
# Enable NVIDIA graphics cards. Note: write and erase do not work properly. # Enable NVIDIA graphics cards. Note: write and erase do not work properly.
CONFIG_GFXNVIDIA ?= yes CONFIG_GFXNVIDIA ?= yes
# Enable AST2400 BMC SoCs.
CONFIG_AST2400 ?= yes
# Always enable SiI SATA controllers for now. # Always enable SiI SATA controllers for now.
CONFIG_SATASII ?= yes CONFIG_SATASII ?= yes
...@@ -668,6 +681,7 @@ ifeq ($(CONFIG_ENABLE_LIBPCI_PROGRAMMERS), no) ...@@ -668,6 +681,7 @@ ifeq ($(CONFIG_ENABLE_LIBPCI_PROGRAMMERS), no)
override CONFIG_INTERNAL = no override CONFIG_INTERNAL = no
override CONFIG_NIC3COM = no override CONFIG_NIC3COM = no
override CONFIG_GFXNVIDIA = no override CONFIG_GFXNVIDIA = no
override CONFIG_AST2400 = no
override CONFIG_SATASII = no override CONFIG_SATASII = no
override CONFIG_ATAHPT = no override CONFIG_ATAHPT = no
override CONFIG_ATAVIA = no override CONFIG_ATAVIA = no
...@@ -780,6 +794,12 @@ PROGRAMMER_OBJS += gfxnvidia.o ...@@ -780,6 +794,12 @@ PROGRAMMER_OBJS += gfxnvidia.o
NEED_LIBPCI += CONFIG_GFXNVIDIA NEED_LIBPCI += CONFIG_GFXNVIDIA
endif endif
ifeq ($(CONFIG_AST2400), yes)
FEATURE_CFLAGS += -D'CONFIG_AST2400=1'
PROGRAMMER_OBJS += ast2400.o
NEED_LIBPCI += CONFIG_AST2400
endif
ifeq ($(CONFIG_SATASII), yes) ifeq ($(CONFIG_SATASII), yes)
FEATURE_CFLAGS += -D'CONFIG_SATASII=1' FEATURE_CFLAGS += -D'CONFIG_SATASII=1'
PROGRAMMER_OBJS += satasii.o PROGRAMMER_OBJS += satasii.o
......
This diff is collapsed.
...@@ -134,6 +134,18 @@ const struct programmer_entry programmer_table[] = { ...@@ -134,6 +134,18 @@ const struct programmer_entry programmer_table[] = {
}, },
#endif #endif
#if CONFIG_AST2400 == 1
{
.name = "ast2400",
.type = PCI,
.devs.dev = bmc_aspeed,
.init = ast2400_init,
.map_flash_region = fallback_map,
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
},
#endif
#if CONFIG_DRKAISER == 1 #if CONFIG_DRKAISER == 1
{ {
.name = "drkaiser", .name = "drkaiser",
......
...@@ -45,6 +45,9 @@ enum programmer { ...@@ -45,6 +45,9 @@ enum programmer {
#if CONFIG_GFXNVIDIA == 1 #if CONFIG_GFXNVIDIA == 1
PROGRAMMER_GFXNVIDIA, PROGRAMMER_GFXNVIDIA,
#endif #endif
#if CONFIG_AST2400 == 1
PROGRAMMER_AST2400,
#endif
#if CONFIG_DRKAISER == 1 #if CONFIG_DRKAISER == 1
PROGRAMMER_DRKAISER, PROGRAMMER_DRKAISER,
#endif #endif
...@@ -399,6 +402,12 @@ int gfxnvidia_init(void); ...@@ -399,6 +402,12 @@ int gfxnvidia_init(void);
extern const struct dev_entry gfx_nvidia[]; extern const struct dev_entry gfx_nvidia[];
#endif #endif
/* ast2400.c */
#if CONFIG_AST2400 == 1
int ast2400_init(void);
extern const struct dev_entry bmc_aspeed[];
#endif
/* drkaiser.c */ /* drkaiser.c */
#if CONFIG_DRKAISER == 1 #if CONFIG_DRKAISER == 1
int drkaiser_init(void); int drkaiser_init(void);
...@@ -600,6 +609,10 @@ enum spi_controller { ...@@ -600,6 +609,10 @@ enum spi_controller {
#if CONFIG_CH341A_SPI == 1 #if CONFIG_CH341A_SPI == 1
SPI_CONTROLLER_CH341A_SPI, SPI_CONTROLLER_CH341A_SPI,
#endif #endif
#if CONFIG_AST2400 == 1
SPI_CONTROLLER_AST2400,
#endif
}; };
#define MAX_DATA_UNSPECIFIED 0 #define MAX_DATA_UNSPECIFIED 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment