Date: Thu, 16 Feb 2012 15:04:11 +0000 (UTC) From: Damjan Marion <dmarion@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r231826 - projects/armv6/sys/arm/ti Message-ID: <201202161504.q1GF4BT3021940@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dmarion Date: Thu Feb 16 15:04:11 2012 New Revision: 231826 URL: http://svn.freebsd.org/changeset/base/231826 Log: Keep FDT interrupt decode in arm/ti/common.c Approved by: cognet (mentor) Modified: projects/armv6/sys/arm/ti/aintc.c projects/armv6/sys/arm/ti/common.c Modified: projects/armv6/sys/arm/ti/aintc.c ============================================================================== --- projects/armv6/sys/arm/ti/aintc.c Thu Feb 16 14:54:51 2012 (r231825) +++ projects/armv6/sys/arm/ti/aintc.c Thu Feb 16 15:04:11 2012 (r231826) @@ -167,25 +167,3 @@ arm_unmask_irq(uintptr_t nb) { aintc_write_4(INTC_MIR_CLEAR(nb >> 5), (1UL << (nb & 0x1F))); } - -static int -fdt_ti_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, - int *pol) -{ - - if (!fdt_is_compatible(node, "ti,aintc")) - return (ENXIO); - - *interrupt = fdt32_to_cpu(intr[0]); - *trig = INTR_TRIGGER_CONFORM; - *pol = INTR_POLARITY_CONFORM; - - return (0); -} - -fdt_pic_decode_t fdt_pic_table[] = { - &fdt_ti_aintc_decode_ic, - NULL -}; - - Modified: projects/armv6/sys/arm/ti/common.c ============================================================================== --- projects/armv6/sys/arm/ti/common.c Thu Feb 16 14:54:51 2012 (r231825) +++ projects/armv6/sys/arm/ti/common.c Thu Feb 16 15:04:11 2012 (r231826) @@ -53,6 +53,7 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; +#ifdef SOC_OMAP4 static int fdt_gic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, int *pol) @@ -67,8 +68,31 @@ fdt_gic_decode_ic(phandle_t node, pcell_ return (0); } +#endif + +#ifdef SOC_TI_AM335X +static int +fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + + if (!fdt_is_compatible(node, "ti,aintc")) + return (ENXIO); + + *interrupt = fdt32_to_cpu(intr[0]); + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + + return (0); +} +#endif fdt_pic_decode_t fdt_pic_table[] = { +#ifdef SOC_OMAP4 &fdt_gic_decode_ic, +#endif +#ifdef SOC_TI_AM335X + &fdt_aintc_decode_ic, +#endif NULL };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202161504.q1GF4BT3021940>