mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 23:43:42 +02:00
Support for Realtek RTL8139 network card flashing
Corresponding to flashrom svn r1002. Signed-off-by: Joerg Fischer <turboj@gmx.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
parent
6d1dea1ff0
commit
5665ef35a1
9
Makefile
9
Makefile
@ -110,6 +110,9 @@ CONFIG_DUMMY ?= yes
|
|||||||
# Always enable Dr. Kaiser for now.
|
# Always enable Dr. Kaiser for now.
|
||||||
CONFIG_DRKAISER ?= yes
|
CONFIG_DRKAISER ?= yes
|
||||||
|
|
||||||
|
# Always enable Realtek NICs for now.
|
||||||
|
CONFIG_NICREALTEK ?= yes
|
||||||
|
|
||||||
# Always enable Bus Pirate SPI for now.
|
# Always enable Bus Pirate SPI for now.
|
||||||
CONFIG_BUSPIRATESPI ?= yes
|
CONFIG_BUSPIRATESPI ?= yes
|
||||||
|
|
||||||
@ -181,6 +184,12 @@ PROGRAMMER_OBJS += drkaiser.o
|
|||||||
NEED_PCI := yes
|
NEED_PCI := yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_NICREALTEK), yes)
|
||||||
|
FEATURE_CFLAGS += -D'NICREALTEK_SUPPORT=1'
|
||||||
|
PROGRAMMER_OBJS += nicrealtek.o
|
||||||
|
NEED_PCI := yes
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUSPIRATESPI), yes)
|
ifeq ($(CONFIG_BUSPIRATESPI), yes)
|
||||||
FEATURE_CFLAGS += -D'BUSPIRATE_SPI_SUPPORT=1'
|
FEATURE_CFLAGS += -D'BUSPIRATE_SPI_SUPPORT=1'
|
||||||
PROGRAMMER_OBJS += buspirate_spi.o
|
PROGRAMMER_OBJS += buspirate_spi.o
|
||||||
|
18
flash.h
18
flash.h
@ -46,6 +46,10 @@ enum programmer {
|
|||||||
#if NIC3COM_SUPPORT == 1
|
#if NIC3COM_SUPPORT == 1
|
||||||
PROGRAMMER_NIC3COM,
|
PROGRAMMER_NIC3COM,
|
||||||
#endif
|
#endif
|
||||||
|
#if NICREALTEK_SUPPORT == 1
|
||||||
|
PROGRAMMER_NICREALTEK,
|
||||||
|
PROGRAMMER_NICREALTEK2,
|
||||||
|
#endif
|
||||||
#if GFXNVIDIA_SUPPORT == 1
|
#if GFXNVIDIA_SUPPORT == 1
|
||||||
PROGRAMMER_GFXNVIDIA,
|
PROGRAMMER_GFXNVIDIA,
|
||||||
#endif
|
#endif
|
||||||
@ -330,7 +334,7 @@ uint32_t pcidev_init(uint16_t vendor_id, uint32_t bar, struct pcidev_status *dev
|
|||||||
/* print.c */
|
/* print.c */
|
||||||
char *flashbuses_to_text(enum chipbustype bustype);
|
char *flashbuses_to_text(enum chipbustype bustype);
|
||||||
void print_supported(void);
|
void print_supported(void);
|
||||||
#if (NIC3COM_SUPPORT == 1) || (GFXNVIDIA_SUPPORT == 1) || (DRKAISER_SUPPORT == 1) || (SATASII_SUPPORT == 1) || (ATAHPT_SUPPORT == 1)
|
#if (NIC3COM_SUPPORT == 1) || (GFXNVIDIA_SUPPORT == 1) || (DRKAISER_SUPPORT == 1) || (SATASII_SUPPORT == 1) || (ATAHPT_SUPPORT == 1) || (NICREALTEK_SUPPORT == 1)
|
||||||
void print_supported_pcidevs(struct pcidev_status *devs);
|
void print_supported_pcidevs(struct pcidev_status *devs);
|
||||||
#endif
|
#endif
|
||||||
void print_supported_wiki(void);
|
void print_supported_wiki(void);
|
||||||
@ -462,6 +466,18 @@ uint8_t drkaiser_chip_readb(const chipaddr addr);
|
|||||||
extern struct pcidev_status drkaiser_pcidev[];
|
extern struct pcidev_status drkaiser_pcidev[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* nicrealtek.c */
|
||||||
|
#if NICREALTEK_SUPPORT == 1
|
||||||
|
int nicrealtek_init(void);
|
||||||
|
int nicsmc1211_init(void);
|
||||||
|
int nicrealtek_shutdown(void);
|
||||||
|
void nicrealtek_chip_writeb(uint8_t val, chipaddr addr);
|
||||||
|
uint8_t nicrealtek_chip_readb(const chipaddr addr);
|
||||||
|
extern struct pcidev_status nics_realtek[];
|
||||||
|
extern struct pcidev_status nics_realteksmc1211[];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* satasii.c */
|
/* satasii.c */
|
||||||
#if SATASII_SUPPORT == 1
|
#if SATASII_SUPPORT == 1
|
||||||
int satasii_init(void);
|
int satasii_init(void);
|
||||||
|
42
flashrom.c
42
flashrom.c
@ -47,13 +47,17 @@ enum programmer programmer = PROGRAMMER_DUMMY;
|
|||||||
* if more than one of them is selected. If only one is selected, it is clear
|
* if more than one of them is selected. If only one is selected, it is clear
|
||||||
* that the user wants that one to become the default.
|
* that the user wants that one to become the default.
|
||||||
*/
|
*/
|
||||||
#if NIC3COM_SUPPORT+GFXNVIDIA_SUPPORT+DRKAISER_SUPPORT+SATASII_SUPPORT+ATAHPT_SUPPORT+FT2232_SPI_SUPPORT+SERPROG_SUPPORT+BUSPIRATE_SPI_SUPPORT+DEDIPROG_SUPPORT > 1
|
#if NIC3COM_SUPPORT+GFXNVIDIA_SUPPORT+DRKAISER_SUPPORT+SATASII_SUPPORT+ATAHPT_SUPPORT+FT2232_SPI_SUPPORT+SERPROG_SUPPORT+BUSPIRATE_SPI_SUPPORT+DEDIPROG_SUPPORT+NICREALTEK_SUPPORT > 1
|
||||||
#error Please enable either CONFIG_DUMMY or CONFIG_INTERNAL or disable support for all external programmers except one.
|
#error Please enable either CONFIG_DUMMY or CONFIG_INTERNAL or disable support for all external programmers except one.
|
||||||
#endif
|
#endif
|
||||||
enum programmer programmer =
|
enum programmer programmer =
|
||||||
#if NIC3COM_SUPPORT == 1
|
#if NIC3COM_SUPPORT == 1
|
||||||
PROGRAMMER_NIC3COM
|
PROGRAMMER_NIC3COM
|
||||||
#endif
|
#endif
|
||||||
|
#if NICREALTEK_SUPPORT == 1
|
||||||
|
PROGRAMMER_NICREALTEK
|
||||||
|
PROGRAMMER_NICREALTEK2
|
||||||
|
#endif
|
||||||
#if GFXNVIDIA_SUPPORT == 1
|
#if GFXNVIDIA_SUPPORT == 1
|
||||||
PROGRAMMER_GFXNVIDIA
|
PROGRAMMER_GFXNVIDIA
|
||||||
#endif
|
#endif
|
||||||
@ -159,6 +163,42 @@ const struct programmer_entry programmer_table[] = {
|
|||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if NICREALTEK_SUPPORT == 1
|
||||||
|
{
|
||||||
|
.name = "nicrealtek",
|
||||||
|
.init = nicrealtek_init,
|
||||||
|
.shutdown = nicrealtek_shutdown,
|
||||||
|
.map_flash_region = fallback_map,
|
||||||
|
.unmap_flash_region = fallback_unmap,
|
||||||
|
.chip_readb = nicrealtek_chip_readb,
|
||||||
|
.chip_readw = fallback_chip_readw,
|
||||||
|
.chip_readl = fallback_chip_readl,
|
||||||
|
.chip_readn = fallback_chip_readn,
|
||||||
|
.chip_writeb = nicrealtek_chip_writeb,
|
||||||
|
.chip_writew = fallback_chip_writew,
|
||||||
|
.chip_writel = fallback_chip_writel,
|
||||||
|
.chip_writen = fallback_chip_writen,
|
||||||
|
.delay = internal_delay,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "nicsmc1211",
|
||||||
|
.init = nicsmc1211_init,
|
||||||
|
.shutdown = nicrealtek_shutdown,
|
||||||
|
.map_flash_region = fallback_map,
|
||||||
|
.unmap_flash_region = fallback_unmap,
|
||||||
|
.chip_readb = nicrealtek_chip_readb,
|
||||||
|
.chip_readw = fallback_chip_readw,
|
||||||
|
.chip_readl = fallback_chip_readl,
|
||||||
|
.chip_readn = fallback_chip_readn,
|
||||||
|
.chip_writeb = nicrealtek_chip_writeb,
|
||||||
|
.chip_writew = fallback_chip_writew,
|
||||||
|
.chip_writel = fallback_chip_writel,
|
||||||
|
.chip_writen = fallback_chip_writen,
|
||||||
|
.delay = internal_delay,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if GFXNVIDIA_SUPPORT == 1
|
#if GFXNVIDIA_SUPPORT == 1
|
||||||
{
|
{
|
||||||
.name = "gfxnvidia",
|
.name = "gfxnvidia",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user