You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/11/21 11:37:39 UTC
[GitHub] mkiiskila closed pull request #1526: spiflash;
add support for EON2580.
mkiiskila closed pull request #1526: spiflash; add support for EON2580.
URL: https://github.com/apache/mynewt-core/pull/1526
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/hw/drivers/flash/spiflash/chips/syscfg.yml b/hw/drivers/flash/spiflash/chips/syscfg.yml
index b8b178e22d..421c570a01 100644
--- a/hw/drivers/flash/spiflash/chips/syscfg.yml
+++ b/hw/drivers/flash/spiflash/chips/syscfg.yml
@@ -488,3 +488,6 @@ syscfg.defs:
SPIFLASH_AT25QL321:
description: Add support for AT25QL321
value: 0
+ SPIFLASH_EON2580B:
+ description: Add support for EON2580B
+ value: 0
diff --git a/hw/drivers/flash/spiflash/include/spiflash/spiflash.h b/hw/drivers/flash/spiflash/include/spiflash/spiflash.h
index 02808d43fc..d2cb1a1659 100644
--- a/hw/drivers/flash/spiflash/include/spiflash/spiflash.h
+++ b/hw/drivers/flash/spiflash/include/spiflash/spiflash.h
@@ -78,6 +78,7 @@ struct spiflash_chip {
#define JEDEC_MFC_MICRON 0x20
#define JEDEC_MFC_MICROCHIP 0xBF
#define JEDEC_MFC_ADESTO 0x1F
+#define JEDEC_MFC_EON 0x1C
#define FLASH_CAPACITY_256KBIT 0x09
#define FLASH_CAPACITY_512KBIT 0x10
diff --git a/hw/drivers/flash/spiflash/src/spiflash.c b/hw/drivers/flash/spiflash/src/spiflash.c
index 679becf2ff..43fda29ab9 100644
--- a/hw/drivers/flash/spiflash/src/spiflash.c
+++ b/hw/drivers/flash/spiflash/src/spiflash.c
@@ -77,6 +77,8 @@ void spiflash_release_power_down(struct spiflash_dev *dev);
STD_FLASH_CHIP(name, JEDEC_MFC_MICRON, typ, cap, spiflash_release_power_down)
#define ADESTO_CHIP(name, typ, cap) \
STD_FLASH_CHIP(name, JEDEC_MFC_ADESTO, typ, cap, spiflash_release_power_down)
+#define EON_CHIP(name, typ, cap) \
+ STD_FLASH_CHIP(name, JEDEC_MFC_EON, typ, cap, spiflash_release_power_down)
static struct spiflash_chip supported_chips[] = {
#if MYNEWT_VAL(SPIFLASH_MANUFACTURER) && MYNEWT_VAL(SPIFLASH_MEMORY_TYPE) && MYNEWT_VAL(SPIFLASH_MEMORY_CAPACITY)
@@ -555,6 +557,9 @@ static struct spiflash_chip supported_chips[] = {
#if MYNEWT_VAL(SPIFLASH_AT25QL321)
ADESTO_CHIP(AT25QL321, 0x42, FLASH_CAPACITY_32MBIT),
#endif
+#if MYNEWT_VAL(SPIFLASH_EON2580B)
+ EON_CHIP(EN80B, 0x30, FLASH_CAPACITY_8MBIT),
+#endif
{ {0} },
};
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services