This is an automated email from Gerrit. Andreas Kemnade ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/3850
-- gerrit commit 8321028b1ee980a91f1ef57a989196a562402041 Author: Andreas Kemnade <[email protected]> Date: Sat Oct 29 00:35:29 2016 +0200 support for efr32 (bluegecko, etc.) This patch adds support for Blue Gecko and Mighty Gecko chips from Silabs. They have a slightly different EFM32_MSC_REGBASE than the other chips and one of the MSC registers is changed. At the moment it simply changes EFM32_MSC_REGBASE and so breaks the other efm32 chips. Because I am not sure what is you preferred way to do that in a clean way, I send the patch as-is. Of course it cannot be accepted as-is. Change-Id: I4ed2c8da9a039940da8fe062a0430797239784d6 Signed-off-by: Andreas Kemnade <[email protected]> diff --git a/src/flash/nor/efm32.c b/src/flash/nor/efm32.c index 0b33829..5af2307 100644 --- a/src/flash/nor/efm32.c +++ b/src/flash/nor/efm32.c @@ -48,6 +48,8 @@ #define EFM_FAMILY_ID_HAPPY_GECKO 77 #define EZR_FAMILY_ID_WONDER_GECKO 120 #define EZR_FAMILY_ID_LEOPARD_GECKO 121 +#define EFR_FAMILY_ID_MIGHTY_GECKO 16 +#define EFR_FAMILY_ID_BLUE_GECKO 20 #define EFM32_FLASH_ERASE_TMO 100 #define EFM32_FLASH_WDATAREADY_TMO 100 @@ -70,7 +72,7 @@ #define EFM32_MSC_DI_PART_FAMILY (EFM32_MSC_DEV_INFO+0x1fe) #define EFM32_MSC_DI_PROD_REV (EFM32_MSC_DEV_INFO+0x1ff) -#define EFM32_MSC_REGBASE 0x400c0000 +#define EFM32_MSC_REGBASE 0x400e0000 #define EFM32_MSC_WRITECTRL (EFM32_MSC_REGBASE+0x008) #define EFM32_MSC_WRITECTRL_WREN_MASK 0x1 #define EFM32_MSC_WRITECMD (EFM32_MSC_REGBASE+0x00c) @@ -86,7 +88,7 @@ #define EFM32_MSC_STATUS_WDATAREADY_MASK 0x8 #define EFM32_MSC_STATUS_WORDTIMEOUT_MASK 0x10 #define EFM32_MSC_STATUS_ERASEABORTED_MASK 0x20 -#define EFM32_MSC_LOCK (EFM32_MSC_REGBASE+0x03c) +#define EFM32_MSC_LOCK (EFM32_MSC_REGBASE+0x040) #define EFM32_MSC_LOCK_LOCKKEY 0x1b71 struct efm32x_flash_bank { @@ -206,7 +208,9 @@ static int efm32x_read_info(struct flash_bank *bank, } } else if (EFM_FAMILY_ID_WONDER_GECKO == efm32_info->part_family || EZR_FAMILY_ID_WONDER_GECKO == efm32_info->part_family || - EZR_FAMILY_ID_LEOPARD_GECKO == efm32_info->part_family) { + EZR_FAMILY_ID_LEOPARD_GECKO == efm32_info->part_family || + EFR_FAMILY_ID_BLUE_GECKO == efm32_info->part_family || + EFR_FAMILY_ID_MIGHTY_GECKO == efm32_info->part_family) { uint8_t pg_size = 0; ret = target_read_u8(bank->target, EFM32_MSC_DI_PAGE_SIZE, &pg_size); @@ -238,6 +242,10 @@ static int efm32x_decode_info(struct efm32_info *info, char *buf, int buf_size) case EZR_FAMILY_ID_LEOPARD_GECKO: printed = snprintf(buf, buf_size, "EZR32 "); break; + case EFR_FAMILY_ID_MIGHTY_GECKO: + case EFR_FAMILY_ID_BLUE_GECKO: + printed = snprintf(buf, buf_size, "EFR32 "); + break; default: printed = snprintf(buf, buf_size, "EFM32 "); } @@ -272,6 +280,12 @@ static int efm32x_decode_info(struct efm32_info *info, char *buf, int buf_size) case EFM_FAMILY_ID_HAPPY_GECKO: printed = snprintf(buf, buf_size, "Happy Gecko"); break; + case EFR_FAMILY_ID_BLUE_GECKO: + printed = snprintf(buf, buf_size, "Blue Gecko"); + break; + case EFR_FAMILY_ID_MIGHTY_GECKO: + printed = snprintf(buf, buf_size, "Mighty Gecko"); + break; } buf += printed; -- ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
