diff options
author | Stefan Roese <sr@denx.de> | 2008-07-18 12:24:41 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2008-07-18 12:31:25 +0200 |
commit | 60204d06ed9f8c2a67cc79eb67fd2b1d22bcbc8c (patch) | |
tree | 922577031775f896fe4c2e8a777cb2090b9b10f8 /cpu/ppc4xx/uic.c | |
parent | 086511fc96a8a9bb56e5e19a3d84c40f4dba80cc (diff) | |
download | u-boot-imx-60204d06ed9f8c2a67cc79eb67fd2b1d22bcbc8c.zip u-boot-imx-60204d06ed9f8c2a67cc79eb67fd2b1d22bcbc8c.tar.gz u-boot-imx-60204d06ed9f8c2a67cc79eb67fd2b1d22bcbc8c.tar.bz2 |
ppc4xx: Minor coding style cleanup of Xilinx Virtex5 ml507 support
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'cpu/ppc4xx/uic.c')
-rw-r--r-- | cpu/ppc4xx/uic.c | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/cpu/ppc4xx/uic.c b/cpu/ppc4xx/uic.c index fbf0c2b..7944c6c 100644 --- a/cpu/ppc4xx/uic.c +++ b/cpu/ppc4xx/uic.c @@ -59,27 +59,19 @@ DECLARE_GLOBAL_DATA_PTR; void pic_enable(void) { - #if (UIC_MAX > 1) /* Install the UIC1 handlers */ - irq_install_handler(VECNUM_UIC1NCI, (void *)(void *)external_interrupt, - 0); - irq_install_handler(VECNUM_UIC1CI, (void *)(void *)external_interrupt, - 0); + irq_install_handler(VECNUM_UIC1NCI, (void *)(void *)external_interrupt, 0); + irq_install_handler(VECNUM_UIC1CI, (void *)(void *)external_interrupt, 0); #endif #if (UIC_MAX > 2) - irq_install_handler(VECNUM_UIC2NCI, (void *)(void *)external_interrupt, - 0); - irq_install_handler(VECNUM_UIC2CI, (void *)(void *)external_interrupt, - 0); + irq_install_handler(VECNUM_UIC2NCI, (void *)(void *)external_interrupt, 0); + irq_install_handler(VECNUM_UIC2CI, (void *)(void *)external_interrupt, 0); #endif #if (UIC_MAX > 3) - irq_install_handler(VECNUM_UIC3NCI, (void *)(void *)external_interrupt, - 0); - irq_install_handler(VECNUM_UIC3CI, (void *)(void *)external_interrupt, - 0); + irq_install_handler(VECNUM_UIC3NCI, (void *)(void *)external_interrupt, 0); + irq_install_handler(VECNUM_UIC3CI, (void *)(void *)external_interrupt, 0); #endif - } /* Handler for UIC interrupt */ @@ -147,21 +139,14 @@ void external_interrupt(struct pt_regs *regs) void pic_irq_ack(unsigned int vec) { - if ((vec >= 0) && (vec < 32)) mtdcr(uicsr, UIC_MASK(vec)); -#if (UIC_MAX > 1) else if ((vec >= 32) && (vec < 64)) mtdcr(uic1sr, UIC_MASK(vec)); -#endif -#if (UIC_MAX > 2) else if ((vec >= 64) && (vec < 96)) mtdcr(uic2sr, UIC_MASK(vec)); -#endif -#if (UIC_MAX > 3) else if (vec >= 96) mtdcr(uic3sr, UIC_MASK(vec)); -#endif } /* @@ -172,38 +157,24 @@ void pic_irq_enable(unsigned int vec) if ((vec >= 0) && (vec < 32)) mtdcr(uicer, mfdcr(uicer) | UIC_MASK(vec)); -#if (UIC_MAX > 1) else if ((vec >= 32) && (vec < 64)) mtdcr(uic1er, mfdcr(uic1er) | UIC_MASK(vec)); -#endif -#if (UIC_MAX > 2) else if ((vec >= 64) && (vec < 96)) mtdcr(uic2er, mfdcr(uic2er) | UIC_MASK(vec)); -#endif -#if (UIC_MAX > 3) else if (vec >= 96) mtdcr(uic3er, mfdcr(uic3er) | UIC_MASK(vec)); -#endif debug("Install interrupt for vector %d ==> %p\n", vec, handler); } void pic_irq_disable(unsigned int vec) { - if ((vec >= 0) && (vec < 32)) mtdcr(uicer, mfdcr(uicer) & ~UIC_MASK(vec)); -#if (UIC_MAX > 1) else if ((vec >= 32) && (vec < 64)) mtdcr(uic1er, mfdcr(uic1er) & ~UIC_MASK(vec)); -#endif -#if (UIC_MAX > 2) else if ((vec >= 64) && (vec < 96)) mtdcr(uic2er, mfdcr(uic2er) & ~UIC_MASK(vec)); -#endif -#if (UIC_MAX > 3) else if (vec >= 96) mtdcr(uic3er, mfdcr(uic3er) & ~UIC_MASK(vec)); -#endif - } |