Commit b2fc3aad authored by Timothy Pearson's avatar Timothy Pearson

Add support for programming SPI devices attached to the AST1100 BMC

All possible (three) Flash devices are supported with the programmer-
specific parameter spibus=<n>.  The AST2050 device is compatible with
this driver.

Read and write tested on ASUS KGPE-D16 with ASMB4 BMC module installed.

Change-Id: I5b17061a7f308eabe50d87127311dc88cc96e16c
Signed-off-by: Timothy Pearson's avatarTimothy Pearson <tpearson@raptorengineering.com>
parent 6c3b9415
......@@ -214,6 +214,11 @@ UNSUPPORTED_FEATURES += CONFIG_GFXNVIDIA=yes
else
override CONFIG_GFXNVIDIA = no
endif
ifeq ($(CONFIG_AST1100), yes)
UNSUPPORTED_FEATURES += CONFIG_AST1100=yes
else
override CONFIG_AST1100 = no
endif
ifeq ($(CONFIG_AST2400), yes)
UNSUPPORTED_FEATURES += CONFIG_AST2400=yes
else
......@@ -446,6 +451,11 @@ UNSUPPORTED_FEATURES += CONFIG_GFXNVIDIA=yes
else
override CONFIG_GFXNVIDIA = no
endif
ifeq ($(CONFIG_AST1100), yes)
UNSUPPORTED_FEATURES += CONFIG_AST1100=yes
else
override CONFIG_AST1100 = no
endif
ifeq ($(CONFIG_AST2400), yes)
UNSUPPORTED_FEATURES += CONFIG_AST2400=yes
else
......@@ -579,6 +589,9 @@ CONFIG_NIC3COM ?= yes
# Enable NVIDIA graphics cards. Note: write and erase do not work properly.
CONFIG_GFXNVIDIA ?= yes
# Enable AST1100 BMC SoCs.
CONFIG_AST1100 ?= yes
# Enable AST2400 BMC SoCs.
CONFIG_AST2400 ?= yes
......@@ -681,6 +694,7 @@ ifeq ($(CONFIG_ENABLE_LIBPCI_PROGRAMMERS), no)
override CONFIG_INTERNAL = no
override CONFIG_NIC3COM = no
override CONFIG_GFXNVIDIA = no
override CONFIG_AST1100 = no
override CONFIG_AST2400 = no
override CONFIG_SATASII = no
override CONFIG_ATAHPT = no
......@@ -794,6 +808,12 @@ PROGRAMMER_OBJS += gfxnvidia.o
NEED_LIBPCI += CONFIG_GFXNVIDIA
endif
ifeq ($(CONFIG_AST1100), yes)
FEATURE_CFLAGS += -D'CONFIG_AST1100=1'
PROGRAMMER_OBJS += ast1100.o
NEED_LIBPCI += CONFIG_AST1100
endif
ifeq ($(CONFIG_AST2400), yes)
FEATURE_CFLAGS += -D'CONFIG_AST2400=1'
PROGRAMMER_OBJS += ast2400.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,6 +5,7 @@
* Copyright (C) 2004 Tyan Corp <yhlu@tyan.com>
* Copyright (C) 2005-2008 coresystems GmbH
* Copyright (C) 2008,2009 Carl-Daniel Hailfinger
* Copyright (C) 2016-2017 Raptor Engineering, LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -134,11 +135,23 @@ const struct programmer_entry programmer_table[] = {
},
#endif
#if CONFIG_AST1100 == 1
{
.name = "ast1100",
.type = PCI,
.devs.dev = bmc_aspeed_ast1100,
.init = ast1100_init,
.map_flash_region = fallback_map,
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
},
#endif
#if CONFIG_AST2400 == 1
{
.name = "ast2400",
.type = PCI,
.devs.dev = bmc_aspeed,
.devs.dev = bmc_aspeed_ast2400,
.init = ast2400_init,
.map_flash_region = fallback_map,
.unmap_flash_region = fallback_unmap,
......
......@@ -5,6 +5,7 @@
* Copyright (C) 2000 Ronald G. Minnich <rminnich@gmail.com>
* Copyright (C) 2005-2009 coresystems GmbH
* Copyright (C) 2006-2009 Carl-Daniel Hailfinger
* Copyright (C) 2016-2017 Raptor Engineering, LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -45,6 +46,9 @@ enum programmer {
#if CONFIG_GFXNVIDIA == 1
PROGRAMMER_GFXNVIDIA,
#endif
#if CONFIG_AST1100 == 1
PROGRAMMER_AST1100,
#endif
#if CONFIG_AST2400 == 1
PROGRAMMER_AST2400,
#endif
......@@ -402,10 +406,16 @@ int gfxnvidia_init(void);
extern const struct dev_entry gfx_nvidia[];
#endif
/* ast1100.c */
#if CONFIG_AST1100 == 1
int ast1100_init(void);
extern const struct dev_entry bmc_aspeed_ast1100[];
#endif
/* ast2400.c */
#if CONFIG_AST2400 == 1
int ast2400_init(void);
extern const struct dev_entry bmc_aspeed[];
extern const struct dev_entry bmc_aspeed_ast2400[];
#endif
/* drkaiser.c */
......@@ -610,6 +620,10 @@ enum spi_controller {
SPI_CONTROLLER_CH341A_SPI,
#endif
#if CONFIG_AST1100 == 1
SPI_CONTROLLER_AST1100,
#endif
#if CONFIG_AST2400 == 1
SPI_CONTROLLER_AST2400,
#endif
......
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