flash/nor/efm32: Support EZR32HG devices.
Recognise the family number for Silicon Labs EZR32HG devices and select the correct flash page size. Change-Id: I876e930f3a9f679557fa0d0acac33e9bbfb28c46 Signed-off-by: Richard Watts <rrw@kynesim.co.uk> Reviewed-on: http://openocd.zylin.com/3934 Tested-by: jenkins Reviewed-by: Fredrik Hederstierna <fredrik@hederstierna.com> Reviewed-by: Jonas Norling <jonas.norling@cyanconnode.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
This commit is contained in:
parent
868a100143
commit
b3cf9a665c
|
@ -48,6 +48,7 @@
|
|||
#define EFM_FAMILY_ID_HAPPY_GECKO 77
|
||||
#define EZR_FAMILY_ID_WONDER_GECKO 120
|
||||
#define EZR_FAMILY_ID_LEOPARD_GECKO 121
|
||||
#define EZR_FAMILY_ID_HAPPY_GECKO 122
|
||||
|
||||
#define EFM32_FLASH_ERASE_TMO 100
|
||||
#define EFM32_FLASH_WDATAREADY_TMO 100
|
||||
|
@ -178,7 +179,8 @@ static int efm32x_read_info(struct flash_bank *bank,
|
|||
EFM_FAMILY_ID_TINY_GECKO == efm32_info->part_family)
|
||||
efm32_info->page_size = 512;
|
||||
else if (EFM_FAMILY_ID_ZERO_GECKO == efm32_info->part_family ||
|
||||
EFM_FAMILY_ID_HAPPY_GECKO == efm32_info->part_family)
|
||||
EFM_FAMILY_ID_HAPPY_GECKO == efm32_info->part_family ||
|
||||
EZR_FAMILY_ID_HAPPY_GECKO == efm32_info->part_family)
|
||||
efm32_info->page_size = 1024;
|
||||
else if (EFM_FAMILY_ID_GIANT_GECKO == efm32_info->part_family ||
|
||||
EFM_FAMILY_ID_LEOPARD_GECKO == efm32_info->part_family) {
|
||||
|
@ -236,6 +238,7 @@ static int efm32x_decode_info(struct efm32_info *info, char *buf, int buf_size)
|
|||
switch (info->part_family) {
|
||||
case EZR_FAMILY_ID_WONDER_GECKO:
|
||||
case EZR_FAMILY_ID_LEOPARD_GECKO:
|
||||
case EZR_FAMILY_ID_HAPPY_GECKO:
|
||||
printed = snprintf(buf, buf_size, "EZR32 ");
|
||||
break;
|
||||
default:
|
||||
|
@ -270,6 +273,7 @@ static int efm32x_decode_info(struct efm32_info *info, char *buf, int buf_size)
|
|||
printed = snprintf(buf, buf_size, "Zero Gecko");
|
||||
break;
|
||||
case EFM_FAMILY_ID_HAPPY_GECKO:
|
||||
case EZR_FAMILY_ID_HAPPY_GECKO:
|
||||
printed = snprintf(buf, buf_size, "Happy Gecko");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue