ppc: Fix DBSR_IAx defines in <bedbug/regs.h>
PATCH 2/2 ppc: Fix DBSR_IAx defines in <bedbug/regs.h>
While adding asm/cache.h to common.h for PPC targets, I got an error about multiple definitions of some DBSR_ macros. While scanning these defines, I noticed that some where defined not correctly for all PPC variants. So I removed all unused defines, and corrected the ones really used by bedbug (book-e vs. ppc40x).
--- include/bedbug/regs.h | 31 +++++++++++++++---------------- 1 files changed, 15 insertions(+), 16 deletions(-)
include/bedbug/regs.h +15 -16
@@ -143,22 +143,21 @@#define DBCR1_DV1BE 0x0000F000#define DBCR1_DV2BE 0x00000F00 -/* Bits for the DBSR register */ -#define DBSR_IC 0x80000000 -#define DBSR_BT 0x40000000 -#define DBSR_EDE 0x20000000 -#define DBSR_TIE 0x10000000 -#define DBSR_UDE 0x08000000 -#define DBSR_IA1 0x04000000 -#define DBSR_IA2 0x02000000 -#define DBSR_DR1 0x01000000 -#define DBSR_DW1 0x00800000 -#define DBSR_DR2 0x00400000 -#define DBSR_DW2 0x00200000 -#define DBSR_IDE 0x00100000 -#define DBSR_IA3 0x00080000 -#define DBSR_IA4 0x00040000 -#define DBSR_MRR 0x00000300 +/* +* DBSR bits which have conflicting definitions on true Book E versus PPC40x +*/ +#ifdef CONFIG_BOOKE +#define DBSR_IA1 0x00800000/* Instr Address Compare 1 Event */ +#define DBSR_IA2 0x00400000/* Instr Address Compare 2 Event */ +#define DBSR_IA3 0x00200000/* Instr Address Compare 3 Event */ +#define DBSR_IA4 0x00100000/* Instr Address Compare 4 Event */ +#endif +#ifndef CONFIG_440 +#define DBSR_IA1 0x04000000/* Instr Address Compare 1 Event */ +#define DBSR_IA2 0x02000000/* Instr Address Compare 2 Event */ +#define DBSR_IA3 0x00080000/* Instr Address Compare 3 Event */ +#define DBSR_IA4 0x00040000/* Instr Address Compare 4 Event */ +#endif struct spr_info {int spr_val;
Signature · 1 line
1.7.6.1
Wolfgang Denk
AppliedPATCH 2/2 ppc: Fix DBSR_IAx defines in <bedbug/regs.h>
Dear Stefan Roese,
Quoted 11 lines · In message <[email protected]> you wrote:
While adding
asm/cache.htocommon.hfor PPC targets, I got an error about multiple definitions of someDBSR_macros. While scanning these defines, I noticed that some where defined not correctly for all PPC variants. So I removed all unused defines, and corrected the ones really used by bedbug (book-e vs. ppc40x).Signed-off-by Stefan Roese <[email protected]>Cc Wolfgang Denk <[email protected]>--- include/bedbug/regs.h | 31 +++++++++++++++---------------- 1 files changed, 15 insertions(+), 16 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There is an old custom among my people. When a woman saves a man's life, he is grateful. -- Nona, the Kanuto which woman, "A Private Little War", stardate 4211.8.