Blackfin: debug-mmrs: generalize pint logic
Don't bind the code to specific CPU defines. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
@@ -322,6 +322,29 @@ bfin_debug_mmrs_hmdma(struct dentry *parent, unsigned long base, int num)
|
|||||||
}
|
}
|
||||||
#define HMDMA(num) bfin_debug_mmrs_hmdma(parent, HMDMA##num##_CONTROL, num)
|
#define HMDMA(num) bfin_debug_mmrs_hmdma(parent, HMDMA##num##_CONTROL, num)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Peripheral Interrupts (PINT/GPIO)
|
||||||
|
*/
|
||||||
|
#ifdef PINT0_MASK_SET
|
||||||
|
#define __PINT(uname, lname) __REGS(pint, #uname, lname)
|
||||||
|
static void __init __maybe_unused
|
||||||
|
bfin_debug_mmrs_pint(struct dentry *parent, unsigned long base, int num)
|
||||||
|
{
|
||||||
|
char buf[32], *_buf = REGS_STR_PFX(buf, PINT, num);
|
||||||
|
__PINT(MASK_SET, mask_set);
|
||||||
|
__PINT(MASK_CLEAR, mask_clear);
|
||||||
|
__PINT(REQUEST, request);
|
||||||
|
__PINT(ASSIGN, assign);
|
||||||
|
__PINT(EDGE_SET, edge_set);
|
||||||
|
__PINT(EDGE_CLEAR, edge_clear);
|
||||||
|
__PINT(INVERT_SET, invert_set);
|
||||||
|
__PINT(INVERT_CLEAR, invert_clear);
|
||||||
|
__PINT(PINSTATE, pinstate);
|
||||||
|
__PINT(LATCH, latch);
|
||||||
|
}
|
||||||
|
#define PINT(num) bfin_debug_mmrs_pint(parent, PINT##num##_MASK_SET, num)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Port/GPIO
|
* Port/GPIO
|
||||||
*/
|
*/
|
||||||
@@ -1270,6 +1293,14 @@ static int __init bfin_debug_mmrs_init(void)
|
|||||||
D32(OTP_DATA3);
|
D32(OTP_DATA3);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PINT0_MASK_SET
|
||||||
|
parent = debugfs_create_dir("pint", top);
|
||||||
|
PINT(0);
|
||||||
|
PINT(1);
|
||||||
|
PINT(2);
|
||||||
|
PINT(3);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PIXC_CTL
|
#ifdef PIXC_CTL
|
||||||
parent = debugfs_create_dir("pixc", top);
|
parent = debugfs_create_dir("pixc", top);
|
||||||
D16(PIXC_CTL);
|
D16(PIXC_CTL);
|
||||||
@@ -1833,7 +1864,6 @@ static int __init bfin_debug_mmrs_init(void)
|
|||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
unsigned long base;
|
unsigned long base;
|
||||||
char *_buf, buf[32];
|
|
||||||
|
|
||||||
base = PORTA_FER;
|
base = PORTA_FER;
|
||||||
for (num = 0; num < 10; ++num) {
|
for (num = 0; num < 10; ++num) {
|
||||||
@@ -1841,24 +1871,6 @@ static int __init bfin_debug_mmrs_init(void)
|
|||||||
base += sizeof(struct bfin_gpio_regs);
|
base += sizeof(struct bfin_gpio_regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __PINT(uname, lname) __REGS(pint, #uname, lname)
|
|
||||||
parent = debugfs_create_dir("pint", top);
|
|
||||||
base = PINT0_MASK_SET;
|
|
||||||
for (num = 0; num < 4; ++num) {
|
|
||||||
_buf = REGS_STR_PFX(buf, PINT, num);
|
|
||||||
__PINT(MASK_SET, mask_set);
|
|
||||||
__PINT(MASK_CLEAR, mask_clear);
|
|
||||||
__PINT(REQUEST, request);
|
|
||||||
__PINT(ASSIGN, assign);
|
|
||||||
__PINT(EDGE_SET, edge_set);
|
|
||||||
__PINT(EDGE_CLEAR, edge_clear);
|
|
||||||
__PINT(INVERT_SET, invert_set);
|
|
||||||
__PINT(INVERT_CLEAR, invert_clear);
|
|
||||||
__PINT(PINSTATE, pinstate);
|
|
||||||
__PINT(LATCH, latch);
|
|
||||||
base += sizeof(struct bfin_pint_regs);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* BF54x */
|
#endif /* BF54x */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user