flash/nor: use target_addr_t for flash bank base
This should allow users to configure flash at >32-bit addresses. Change-Id: I7c9d3c5762579011a2d9708e5317e5765349845c Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: http://openocd.zylin.com/4919 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Matthias Welwarsky
parent
57e30102ea
commit
c3b90c052a
@@ -91,7 +91,7 @@ struct flash_bank {
|
||||
void *driver_priv; /**< Private driver storage pointer */
|
||||
|
||||
int bank_number; /**< The 'bank' (or chip number) of this instance. */
|
||||
uint32_t base; /**< The base address of this bank */
|
||||
target_addr_t base; /**< The base address of this bank */
|
||||
uint32_t size; /**< The size of this chip bank, in bytes */
|
||||
|
||||
int chip_width; /**< Width of the chip in bytes (1,2,4 bytes) */
|
||||
@@ -149,9 +149,9 @@ int flash_register_commands(struct command_context *cmd_ctx);
|
||||
* @returns ERROR_OK if successful; otherwise, an error code.
|
||||
*/
|
||||
int flash_erase_address_range(struct target *target,
|
||||
bool pad, uint32_t addr, uint32_t length);
|
||||
bool pad, target_addr_t addr, uint32_t length);
|
||||
|
||||
int flash_unlock_address_range(struct target *target, uint32_t addr,
|
||||
int flash_unlock_address_range(struct target *target, target_addr_t addr,
|
||||
uint32_t length);
|
||||
|
||||
/**
|
||||
@@ -263,7 +263,7 @@ struct flash_bank *get_flash_bank_by_num_noprobe(int num);
|
||||
* @param check return ERROR_OK and result_bank NULL if the bank does not exist
|
||||
* @returns The struct flash_bank located at @a addr, or NULL.
|
||||
*/
|
||||
int get_flash_bank_by_addr(struct target *target, uint32_t addr, bool check,
|
||||
int get_flash_bank_by_addr(struct target *target, target_addr_t addr, bool check,
|
||||
struct flash_bank **result_bank);
|
||||
/**
|
||||
* Allocate and fill an array of sectors or protection blocks.
|
||||
|
||||
Reference in New Issue
Block a user