16 #include <asm/hw_breakpoint.h>
18 #define UBC_CBR(idx) (0xff200000 + (0x20 * idx))
19 #define UBC_CRR(idx) (0xff200004 + (0x20 * idx))
20 #define UBC_CAR(idx) (0xff200008 + (0x20 * idx))
21 #define UBC_CAMR(idx) (0xff20000c + (0x20 * idx))
23 #define UBC_CCMFR 0xff200600
24 #define UBC_CBCR 0xff200620
27 #define UBC_CRR_PCB (1 << 1)
28 #define UBC_CRR_BIE (1 << 0)
31 #define UBC_CBR_CE (1 << 0)
33 static struct sh_ubc sh4a_ubc;
47 static void sh4a_ubc_enable_all(
unsigned long mask)
51 for (i = 0; i < sh4a_ubc.num_events; i++)
57 static void sh4a_ubc_disable_all(
void)
61 for (i = 0; i < sh4a_ubc.num_events; i++)
66 static unsigned long sh4a_ubc_active_mask(
void)
71 for (i = 0; i < sh4a_ubc.num_events; i++)
78 static unsigned long sh4a_ubc_triggered_mask(
void)
83 static void sh4a_ubc_clear_triggered_mask(
unsigned long mask)
88 static struct sh_ubc sh4a_ubc = {
92 .enable = sh4a_ubc_enable,
93 .disable = sh4a_ubc_disable,
94 .enable_all = sh4a_ubc_enable_all,
95 .disable_all = sh4a_ubc_disable_all,
96 .active_mask = sh4a_ubc_active_mask,
97 .triggered_mask = sh4a_ubc_triggered_mask,
98 .clear_triggered_mask = sh4a_ubc_clear_triggered_mask,
101 static int __init sh4a_ubc_init(
void)
110 if (IS_ERR(ubc_iclk))
129 sh4a_ubc.
clk = ubc_iclk;