svn commit: r260285 - head/sys/dev/fdt
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sat Jan 4 21:19:21 UTC 2014
Author: nwhitehorn
Date: Sat Jan 4 21:19:20 2014
New Revision: 260285
URL: http://svnweb.freebsd.org/changeset/base/260285
Log:
Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer
used by anything. The equivalent functionality is provided by the PIC drivers
themselves on PowerPC and this is a no-op on MIPS and x86.
Modified:
head/sys/dev/fdt/fdt_mips.c
head/sys/dev/fdt/fdt_powerpc.c
head/sys/dev/fdt/fdt_x86.c
Modified: head/sys/dev/fdt/fdt_mips.c
==============================================================================
--- head/sys/dev/fdt/fdt_mips.c Sat Jan 4 21:18:54 2014 (r260284)
+++ head/sys/dev/fdt/fdt_mips.c Sat Jan 4 21:19:20 2014 (r260285)
@@ -49,45 +49,3 @@ struct fdt_fixup_entry fdt_fixup_table[]
{ NULL, NULL }
};
-/*
- * For PIC-free boards, provide a PIC decoder to be used with mips4k CP0
- * interrupt control directly.
- */
-static int
-fdt_pic_decode_mips4k_cp0(phandle_t node, pcell_t *intr, int *interrupt,
- int *trig, int *pol)
-{
-
- if (!fdt_is_compatible(node, "mips,mips4k"))
- return (ENXIO);
-
- *interrupt = fdt32_to_cpu(intr[0]);
- *trig = INTR_TRIGGER_CONFORM;
- *pol = INTR_POLARITY_CONFORM;
-
- return (0);
-}
-
-/*
- * CHERI PIC decoder.
- */
-static int
-fdt_pic_decode_beri(phandle_t node, pcell_t *intr, int *interrupt,
- int *trig, int *pol)
-{
-
- if (!fdt_is_compatible(node, "sri-cambridge,beri-pic"))
- 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_pic_decode_mips4k_cp0,
- &fdt_pic_decode_beri,
- NULL
-};
Modified: head/sys/dev/fdt/fdt_powerpc.c
==============================================================================
--- head/sys/dev/fdt/fdt_powerpc.c Sat Jan 4 21:18:54 2014 (r260284)
+++ head/sys/dev/fdt/fdt_powerpc.c Sat Jan 4 21:19:20 2014 (r260285)
@@ -81,89 +81,3 @@ struct fdt_fixup_entry fdt_fixup_table[]
{ NULL, NULL }
};
-static int
-fdt_pic_decode_iic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
- int *pol)
-{
- if (!fdt_is_compatible(node, "chrp,iic"))
- return (ENXIO);
-
- *interrupt = intr[0];
-
- switch (intr[1]) {
- case 0:
- /* Active L level */
- *trig = INTR_TRIGGER_LEVEL;
- *pol = INTR_POLARITY_LOW;
- break;
- case 1:
- /* Active H level */
- *trig = INTR_TRIGGER_LEVEL;
- *pol = INTR_POLARITY_HIGH;
- break;
- case 2:
- /* H to L edge */
- *trig = INTR_TRIGGER_EDGE;
- *pol = INTR_POLARITY_LOW;
- break;
- case 3:
- /* L to H edge */
- *trig = INTR_TRIGGER_EDGE;
- *pol = INTR_POLARITY_HIGH;
- break;
- default:
- *trig = INTR_TRIGGER_CONFORM;
- *pol = INTR_POLARITY_CONFORM;
- }
- return (0);
-}
-
-static int
-fdt_pic_decode_openpic(phandle_t node, pcell_t *intr, int *interrupt,
- int *trig, int *pol)
-{
-
- if (!fdt_is_compatible(node, "chrp,open-pic") &&
- !fdt_is_type(node, "open-pic"))
- return (ENXIO);
-
- /*
- * XXX The interrupt number read out from the MPC85XX device tree is
- * already offset by 16 to reflect the 'internal' IRQ range shift on
- * the OpenPIC.
- */
- *interrupt = intr[0];
-
- switch (intr[1]) {
- case 0:
- /* L to H edge */
- *trig = INTR_TRIGGER_EDGE;
- *pol = INTR_POLARITY_HIGH;
- break;
- case 1:
- /* Active L level */
- *trig = INTR_TRIGGER_LEVEL;
- *pol = INTR_POLARITY_LOW;
- break;
- case 2:
- /* Active H level */
- *trig = INTR_TRIGGER_LEVEL;
- *pol = INTR_POLARITY_HIGH;
- break;
- case 3:
- /* H to L edge */
- *trig = INTR_TRIGGER_EDGE;
- *pol = INTR_POLARITY_LOW;
- break;
- default:
- *trig = INTR_TRIGGER_CONFORM;
- *pol = INTR_POLARITY_CONFORM;
- }
- return (0);
-}
-
-fdt_pic_decode_t fdt_pic_table[] = {
- &fdt_pic_decode_iic,
- &fdt_pic_decode_openpic,
- NULL
-};
Modified: head/sys/dev/fdt/fdt_x86.c
==============================================================================
--- head/sys/dev/fdt/fdt_x86.c Sat Jan 4 21:18:54 2014 (r260284)
+++ head/sys/dev/fdt/fdt_x86.c Sat Jan 4 21:19:20 2014 (r260285)
@@ -46,6 +46,3 @@ struct fdt_fixup_entry fdt_fixup_table[]
{ NULL, NULL }
};
-fdt_pic_decode_t fdt_pic_table[] = {
- NULL
-};
More information about the svn-src-head
mailing list