2022-06-26 23:24:07 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
|
2007-01-25 10:30:42 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2007 by Dominic Rath *
|
|
|
|
* Dominic.Rath@gmx.de *
|
|
|
|
***************************************************************************/
|
2012-02-05 12:03:04 +00:00
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#ifndef OPENOCD_TARGET_ARM926EJS_H
|
|
|
|
#define OPENOCD_TARGET_ARM926EJS_H
|
2007-01-25 10:30:42 +00:00
|
|
|
|
2009-12-13 20:52:23 +00:00
|
|
|
#include "arm9tdmi.h"
|
|
|
|
#include "armv4_5_mmu.h"
|
2007-01-25 10:30:42 +00:00
|
|
|
|
2022-05-26 08:01:45 +00:00
|
|
|
#define ARM926EJS_COMMON_MAGIC 0xa926a926U
|
2007-01-25 10:30:42 +00:00
|
|
|
|
2012-02-05 12:03:04 +00:00
|
|
|
struct arm926ejs_common {
|
2022-05-26 08:01:45 +00:00
|
|
|
unsigned int common_magic;
|
|
|
|
|
2009-11-17 09:09:50 +00:00
|
|
|
struct arm7_9_common arm7_9_common;
|
2009-11-13 16:41:27 +00:00
|
|
|
struct armv4_5_mmu_common armv4_5_mmu;
|
2012-02-05 12:03:04 +00:00
|
|
|
int (*read_cp15)(struct target *target, uint32_t op1, uint32_t op2,
|
2021-04-27 13:58:26 +00:00
|
|
|
uint32_t crn, uint32_t crm, uint32_t *value);
|
2012-02-05 12:03:04 +00:00
|
|
|
int (*write_cp15)(struct target *target, uint32_t op1, uint32_t op2,
|
2021-04-27 13:58:26 +00:00
|
|
|
uint32_t crn, uint32_t crm, uint32_t value);
|
2009-06-18 07:08:52 +00:00
|
|
|
uint32_t cp15_control_reg;
|
|
|
|
uint32_t d_fsr;
|
|
|
|
uint32_t i_fsr;
|
|
|
|
uint32_t d_far;
|
2009-11-13 16:40:15 +00:00
|
|
|
};
|
2007-01-25 10:30:42 +00:00
|
|
|
|
2012-02-05 12:03:04 +00:00
|
|
|
static inline struct arm926ejs_common *target_to_arm926(struct target *target)
|
2009-11-06 05:59:39 +00:00
|
|
|
{
|
2012-02-05 12:03:04 +00:00
|
|
|
return container_of(target->arch_info, struct arm926ejs_common, arm7_9_common.arm);
|
2009-11-06 05:59:39 +00:00
|
|
|
}
|
|
|
|
|
2009-11-13 18:11:13 +00:00
|
|
|
int arm926ejs_init_arch_info(struct target *target,
|
2009-11-13 16:40:15 +00:00
|
|
|
struct arm926ejs_common *arm926ejs, struct jtag_tap *tap);
|
2009-11-13 18:11:13 +00:00
|
|
|
int arm926ejs_arch_state(struct target *target);
|
|
|
|
int arm926ejs_write_memory(struct target *target,
|
2013-09-23 08:27:03 +00:00
|
|
|
target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer);
|
2009-11-13 18:11:13 +00:00
|
|
|
int arm926ejs_soft_reset_halt(struct target *target);
|
2008-02-21 11:43:04 +00:00
|
|
|
|
2009-11-23 16:17:01 +00:00
|
|
|
extern const struct command_registration arm926ejs_command_handlers[];
|
|
|
|
|
2015-09-21 19:07:46 +00:00
|
|
|
#endif /* OPENOCD_TARGET_ARM926EJS_H */
|