We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47cfbcd commit 1beafe0Copy full SHA for 1beafe0
ltchiptool/soc/ambz2/flash.py
@@ -16,6 +16,7 @@
16
AMBZ2_CODE_ADDR,
17
AMBZ2_DATA_ADDR,
18
AMBZ2_EFUSE_PHYSICAL_SIZE,
19
+ AmbZ2FlashMode,
20
AmbZ2Tool,
21
)
22
@@ -156,7 +157,14 @@ def flash_get_chip_info_string(self) -> str:
156
157
158
def flash_get_size(self, memory: FlashMemoryType = FlashMemoryType.FLASH) -> int:
159
if memory == FlashMemoryType.FLASH:
- return 0x400000
160
+ self.flash_connect()
161
+ assert self.amb
162
+ self.amb.flash_init(configure=False)
163
+ return (
164
+ 0x200_000
165
+ if self.amb.flash_mode == AmbZ2FlashMode.RTL8720CF
166
+ else 0x400_000
167
+ )
168
if memory == FlashMemoryType.ROM:
169
return 384 * 1024
170
if memory == FlashMemoryType.EFUSE:
0 commit comments