Remove unused variables.diff -r1.35 -r1.36 src/sys/arch/arm/footbridge/footbridge_com.c
(skrll)
--- src/sys/arch/arm/footbridge/footbridge_com.c 2012/10/10 21:53:09 1.35
+++ src/sys/arch/arm/footbridge/footbridge_com.c 2013/11/17 08:32:55 1.36
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: footbridge_com.c,v 1.35 2012/10/10 21:53:09 skrll Exp $ */ | 1 | /* $NetBSD: footbridge_com.c,v 1.36 2013/11/17 08:32:55 skrll Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997 Mark Brinicombe | 4 | * Copyright (c) 1997 Mark Brinicombe | |
5 | * Copyright (c) 1997 Causality Limited | 5 | * Copyright (c) 1997 Causality Limited | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -26,27 +26,27 @@ | @@ -26,27 +26,27 @@ | |||
26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
27 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 27 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
31 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
32 | */ | 32 | */ | |
33 | 33 | |||
34 | /* | 34 | /* | |
35 | * COM driver, using the footbridge UART | 35 | * COM driver, using the footbridge UART | |
36 | */ | 36 | */ | |
37 | 37 | |||
38 | #include <sys/cdefs.h> | 38 | #include <sys/cdefs.h> | |
39 | __KERNEL_RCSID(0, "$NetBSD: footbridge_com.c,v 1.35 2012/10/10 21:53:09 skrll Exp $"); | 39 | __KERNEL_RCSID(0, "$NetBSD: footbridge_com.c,v 1.36 2013/11/17 08:32:55 skrll Exp $"); | |
40 | 40 | |||
41 | #include "opt_ddb.h" | 41 | #include "opt_ddb.h" | |
42 | #include "opt_ddbparam.h" | 42 | #include "opt_ddbparam.h" | |
43 | 43 | |||
44 | #include <sys/param.h> | 44 | #include <sys/param.h> | |
45 | #include <sys/systm.h> | 45 | #include <sys/systm.h> | |
46 | #include <sys/ioctl.h> | 46 | #include <sys/ioctl.h> | |
47 | #include <sys/select.h> | 47 | #include <sys/select.h> | |
48 | #include <sys/tty.h> | 48 | #include <sys/tty.h> | |
49 | #include <sys/proc.h> | 49 | #include <sys/proc.h> | |
50 | #include <sys/conf.h> | 50 | #include <sys/conf.h> | |
51 | #include <sys/syslog.h> | 51 | #include <sys/syslog.h> | |
52 | #include <sys/device.h> | 52 | #include <sys/device.h> | |
@@ -732,32 +732,32 @@ fcominitcons(bus_space_tag_t iot, bus_sp | @@ -732,32 +732,32 @@ fcominitcons(bus_space_tag_t iot, bus_sp | |||
732 | 732 | |||
733 | delay(10000); | 733 | delay(10000); | |
734 | 734 | |||
735 | (void)splx(s); | 735 | (void)splx(s); | |
736 | } | 736 | } | |
737 | #endif | 737 | #endif | |
738 | 738 | |||
739 | int | 739 | int | |
740 | fcomcngetc(dev_t dev) | 740 | fcomcngetc(dev_t dev) | |
741 | { | 741 | { | |
742 | int s = splserial(); | 742 | int s = splserial(); | |
743 | bus_space_tag_t iot = fcomconstag; | 743 | bus_space_tag_t iot = fcomconstag; | |
744 | bus_space_handle_t ioh = fcomconsioh; | 744 | bus_space_handle_t ioh = fcomconsioh; | |
745 | u_char stat, c; | 745 | u_char c; | |
746 | 746 | |||
747 | while ((bus_space_read_4(iot, ioh, UART_FLAGS) & UART_RX_FULL) != 0) | 747 | while ((bus_space_read_4(iot, ioh, UART_FLAGS) & UART_RX_FULL) != 0) | |
748 | ; | 748 | ; | |
749 | c = bus_space_read_4(iot, ioh, UART_DATA); | 749 | c = bus_space_read_4(iot, ioh, UART_DATA); | |
750 | stat = bus_space_read_4(iot, ioh, UART_RX_STAT); | 750 | (void)bus_space_read_4(iot, ioh, UART_RX_STAT); | |
751 | (void)splx(s); | 751 | (void)splx(s); | |
752 | #if defined(DDB) && DDB_KEYCODE > 0 | 752 | #if defined(DDB) && DDB_KEYCODE > 0 | |
753 | /* | 753 | /* | |
754 | * Temporary hack so that I can force the kernel into | 754 | * Temporary hack so that I can force the kernel into | |
755 | * the debugger via the serial port | 755 | * the debugger via the serial port | |
756 | */ | 756 | */ | |
757 | if (c == DDB_KEYCODE) Debugger(); | 757 | if (c == DDB_KEYCODE) Debugger(); | |
758 | #endif | 758 | #endif | |
759 | 759 | |||
760 | return (c); | 760 | return (c); | |
761 | } | 761 | } | |
762 | 762 | |||
763 | /* | 763 | /* |
--- src/sys/arch/arm/footbridge/isa/isa_machdep.c 2012/10/27 17:17:37 1.19
+++ src/sys/arch/arm/footbridge/isa/isa_machdep.c 2013/11/17 08:32:55 1.20
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: isa_machdep.c,v 1.19 2012/10/27 17:17:37 chs Exp $ */ | 1 | /* $NetBSD: isa_machdep.c,v 1.20 2013/11/17 08:32:55 skrll Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996-1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996-1998 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Mark Brinicombe, Charles M. Hannum and by Jason R. Thorpe of the | 8 | * by Mark Brinicombe, Charles M. Hannum and by Jason R. Thorpe of the | |
9 | * Numerical Aerospace Simulation Facility, NASA Ames Research Center. | 9 | * Numerical Aerospace Simulation Facility, NASA Ames Research Center. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | * | 63 | * | |
64 | * @(#)isa.c 7.2 (Berkeley) 5/13/91 | 64 | * @(#)isa.c 7.2 (Berkeley) 5/13/91 | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | #include <sys/cdefs.h> | 67 | #include <sys/cdefs.h> | |
68 | __KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.19 2012/10/27 17:17:37 chs Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.20 2013/11/17 08:32:55 skrll Exp $"); | |
69 | 69 | |||
70 | #include "opt_irqstats.h" | 70 | #include "opt_irqstats.h" | |
71 | 71 | |||
72 | #include <sys/param.h> | 72 | #include <sys/param.h> | |
73 | #include <sys/systm.h> | 73 | #include <sys/systm.h> | |
74 | #include <sys/kernel.h> | 74 | #include <sys/kernel.h> | |
75 | #include <sys/syslog.h> | 75 | #include <sys/syslog.h> | |
76 | #include <sys/device.h> | 76 | #include <sys/device.h> | |
77 | #include <sys/malloc.h> | 77 | #include <sys/malloc.h> | |
78 | #include <sys/proc.h> | 78 | #include <sys/proc.h> | |
79 | 79 | |||
80 | #define _ARM32_BUS_DMA_PRIVATE | 80 | #define _ARM32_BUS_DMA_PRIVATE | |
81 | #include <sys/bus.h> | 81 | #include <sys/bus.h> | |
@@ -419,50 +419,49 @@ isa_intr_disestablish(isa_chipset_tag_t | @@ -419,50 +419,49 @@ isa_intr_disestablish(isa_chipset_tag_t | |||
419 | if (TAILQ_EMPTY(&(iq->iq_list))) | 419 | if (TAILQ_EMPTY(&(iq->iq_list))) | |
420 | iq->iq_ist = IST_NONE; | 420 | iq->iq_ist = IST_NONE; | |
421 | } | 421 | } | |
422 | 422 | |||
423 | /* | 423 | /* | |
424 | * isa_intr_init() | 424 | * isa_intr_init() | |
425 | * | 425 | * | |
426 | * Initialise the ISA ICU and attach an ISA interrupt handler to the | 426 | * Initialise the ISA ICU and attach an ISA interrupt handler to the | |
427 | * ISA interrupt line on the footbridge. | 427 | * ISA interrupt line on the footbridge. | |
428 | */ | 428 | */ | |
429 | void | 429 | void | |
430 | isa_intr_init(void) | 430 | isa_intr_init(void) | |
431 | { | 431 | { | |
432 | static void *isa_ih; | |||
433 | struct intrq *iq; | 432 | struct intrq *iq; | |
434 | int i; | 433 | int i; | |
435 | 434 | |||
436 | /* | 435 | /* | |
437 | * should get the parent here, but initialisation order being so | 436 | * should get the parent here, but initialisation order being so | |
438 | * strange I need to check if it's available | 437 | * strange I need to check if it's available | |
439 | */ | 438 | */ | |
440 | for (i = 0; i < ICU_LEN; i++) { | 439 | for (i = 0; i < ICU_LEN; i++) { | |
441 | iq = &isa_intrq[i]; | 440 | iq = &isa_intrq[i]; | |
442 | TAILQ_INIT(&iq->iq_list); | 441 | TAILQ_INIT(&iq->iq_list); | |
443 | 442 | |||
444 | sprintf(iq->iq_name, "irq %d", i); | 443 | sprintf(iq->iq_name, "irq %d", i); | |
445 | evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR, | 444 | evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR, | |
446 | NULL, "isa", iq->iq_name); | 445 | NULL, "isa", iq->iq_name); | |
447 | } | 446 | } | |
448 | 447 | |||
449 | isa_icu_init(); | 448 | isa_icu_init(); | |
450 | intr_calculatemasks(); | 449 | intr_calculatemasks(); | |
451 | /* something to break the build in an informative way */ | 450 | /* something to break the build in an informative way */ | |
452 | #ifndef ISA_FOOTBRIDGE_IRQ | 451 | #ifndef ISA_FOOTBRIDGE_IRQ | |
453 | #warning Before using isa with footbridge you must define ISA_FOOTBRIDGE_IRQ | 452 | #warning Before using isa with footbridge you must define ISA_FOOTBRIDGE_IRQ | |
454 | #endif | 453 | #endif | |
455 | isa_ih = footbridge_intr_claim(ISA_FOOTBRIDGE_IRQ, IPL_BIO, "isabus", | 454 | footbridge_intr_claim(ISA_FOOTBRIDGE_IRQ, IPL_BIO, "isabus", | |
456 | isa_irqdispatch, NULL); | 455 | isa_irqdispatch, NULL); | |
457 | 456 | |||
458 | } | 457 | } | |
459 | 458 | |||
460 | /* Static array of ISA DMA segments. We only have one on CATS */ | 459 | /* Static array of ISA DMA segments. We only have one on CATS */ | |
461 | #if NISADMA > 0 | 460 | #if NISADMA > 0 | |
462 | struct arm32_dma_range machdep_isa_dma_ranges[1]; | 461 | struct arm32_dma_range machdep_isa_dma_ranges[1]; | |
463 | #endif | 462 | #endif | |
464 | 463 | |||
465 | void | 464 | void | |
466 | isa_footbridge_init(u_int iobase, u_int membase) | 465 | isa_footbridge_init(u_int iobase, u_int membase) | |
467 | { | 466 | { | |
468 | #if NISADMA > 0 | 467 | #if NISADMA > 0 |