Sun Jan 29 15:32:52 2012 UTC ()
adapt to extent(9) changes


(para)
diff -r1.5 -r1.6 src/sys/arch/amiga/pci/mppb.c
diff -r1.7 -r1.8 src/sys/arch/amiga/pci/p5pb.c

cvs diff -r1.5 -r1.6 src/sys/arch/amiga/pci/mppb.c (expand / switch to unified diff)

--- src/sys/arch/amiga/pci/mppb.c 2012/01/19 00:14:08 1.5
+++ src/sys/arch/amiga/pci/mppb.c 2012/01/29 15:32:52 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mppb.c,v 1.5 2012/01/19 00:14:08 rkujawa Exp $ */ 1/* $NetBSD: mppb.c,v 1.6 2012/01/29 15:32:52 para Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2011 The NetBSD Foundation, Inc. 4 * Copyright (c) 2011 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 Radoslaw Kujawa. 8 * by Radoslaw Kujawa.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -158,29 +158,29 @@ mppb_attach(device_t parent, device_t se @@ -158,29 +158,29 @@ mppb_attach(device_t parent, device_t se
158 sc->apc.pc_conf_write = mppb_pci_conf_write; 158 sc->apc.pc_conf_write = mppb_pci_conf_write;
159 sc->apc.pc_attach_hook = mppb_pci_attach_hook; 159 sc->apc.pc_attach_hook = mppb_pci_attach_hook;
160 160
161 sc->apc.pc_intr_map = mppb_pci_intr_map; 161 sc->apc.pc_intr_map = mppb_pci_intr_map;
162 sc->apc.pc_intr_string = amiga_pci_intr_string; 162 sc->apc.pc_intr_string = amiga_pci_intr_string;
163 sc->apc.pc_intr_establish = amiga_pci_intr_establish; 163 sc->apc.pc_intr_establish = amiga_pci_intr_establish;
164 sc->apc.pc_intr_disestablish = amiga_pci_intr_disestablish; 164 sc->apc.pc_intr_disestablish = amiga_pci_intr_disestablish;
165 165
166 sc->apc.pc_conf_hook = amiga_pci_conf_hook; 166 sc->apc.pc_conf_hook = amiga_pci_conf_hook;
167 sc->apc.pc_conf_interrupt = amiga_pci_conf_interrupt; 167 sc->apc.pc_conf_interrupt = amiga_pci_conf_interrupt;
168 168
169#ifdef PCI_NETBSD_CONFIGURE 169#ifdef PCI_NETBSD_CONFIGURE
170 ioext = extent_create("mppbio", MPPB_IO_BASE,  170 ioext = extent_create("mppbio", MPPB_IO_BASE,
171 MPPB_IO_BASE + MPPB_IO_SIZE, M_DEVBUF, NULL, 0, EX_NOWAIT); 171 MPPB_IO_BASE + MPPB_IO_SIZE, NULL, 0, EX_NOWAIT);
172 memext = extent_create("mppbmem", MPPB_MEM_BASE,  172 memext = extent_create("mppbmem", MPPB_MEM_BASE,
173 MPPB_MEM_BASE + MPPB_MEM_SIZE, M_DEVBUF, NULL, 0, EX_NOWAIT); 173 MPPB_MEM_BASE + MPPB_MEM_SIZE, NULL, 0, EX_NOWAIT);
174 174
175#ifdef MPPB_DEBUG  175#ifdef MPPB_DEBUG
176 aprint_normal("mppb: reconfiguring the bus!\n"); 176 aprint_normal("mppb: reconfiguring the bus!\n");
177#endif /* MPPB_DEBUG */ 177#endif /* MPPB_DEBUG */
178 pci_configure_bus(pc, ioext, memext, NULL, 0, CACHELINE_SIZE); 178 pci_configure_bus(pc, ioext, memext, NULL, 0, CACHELINE_SIZE);
179 179
180 extent_destroy(ioext); 180 extent_destroy(ioext);
181 extent_destroy(memext); 181 extent_destroy(memext);
182#endif /* PCI_NETBSD_CONFIGURE */ 182#endif /* PCI_NETBSD_CONFIGURE */
183 183
184 pba.pba_iot = &(sc->pci_io_area); 184 pba.pba_iot = &(sc->pci_io_area);
185 pba.pba_memt = &(sc->pci_mem_area); 185 pba.pba_memt = &(sc->pci_mem_area);
186 pba.pba_dmat = NULL;  186 pba.pba_dmat = NULL;

cvs diff -r1.7 -r1.8 src/sys/arch/amiga/pci/p5pb.c (expand / switch to unified diff)

--- src/sys/arch/amiga/pci/p5pb.c 2012/01/24 00:20:45 1.7
+++ src/sys/arch/amiga/pci/p5pb.c 2012/01/29 15:32:52 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: p5pb.c,v 1.7 2012/01/24 00:20:45 rkujawa Exp $ */ 1/* $NetBSD: p5pb.c,v 1.8 2012/01/29 15:32:52 para Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc. 4 * Copyright (c) 2011, 2012 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 Radoslaw Kujawa. 8 * by Radoslaw Kujawa.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -442,31 +442,31 @@ p5pb_cvppc_probe(struct p5pb_softc *sc)  @@ -442,31 +442,31 @@ p5pb_cvppc_probe(struct p5pb_softc *sc)
442 return rv;  442 return rv;
443} 443}
444 444
445#ifdef PCI_NETBSD_CONFIGURE  445#ifdef PCI_NETBSD_CONFIGURE
446/* Reconfigure the bus. */ 446/* Reconfigure the bus. */
447bool 447bool
448p5pb_bus_reconfigure(struct p5pb_softc *sc)  448p5pb_bus_reconfigure(struct p5pb_softc *sc)
449{ 449{
450 struct extent *ioext, *memext;  450 struct extent *ioext, *memext;
451 pci_chipset_tag_t pc; 451 pci_chipset_tag_t pc;
452 452
453 pc = &sc->apc; 453 pc = &sc->apc;
454 454
455 ioext = extent_create("p5pbio", 0, P5BUS_PCI_IO_SIZE, M_DEVBUF, NULL, 0, 455 ioext = extent_create("p5pbio", 0, P5BUS_PCI_IO_SIZE, NULL, 0,
456 EX_NOWAIT);  456 EX_NOWAIT);
457 457
458 memext = extent_create("p5pbmem", sc->pci_mem_lowest,  458 memext = extent_create("p5pbmem", sc->pci_mem_lowest,
459 sc->pci_mem_highest, M_DEVBUF, NULL, 0, EX_NOWAIT); 459 sc->pci_mem_highest, NULL, 0, EX_NOWAIT);
460  460
461 if ( (!ioext) || (!memext) )  461 if ( (!ioext) || (!memext) )
462 return false; 462 return false;
463 463
464#ifdef P5PB_DEBUG  464#ifdef P5PB_DEBUG
465 aprint_normal("p5pb: reconfiguring the bus!\n"); 465 aprint_normal("p5pb: reconfiguring the bus!\n");
466#endif /* P5PB_DEBUG */ 466#endif /* P5PB_DEBUG */
467 pci_configure_bus(pc, ioext, memext, NULL, 0, CACHELINE_SIZE); 467 pci_configure_bus(pc, ioext, memext, NULL, 0, CACHELINE_SIZE);
468 468
469 extent_destroy(ioext); 469 extent_destroy(ioext);
470 extent_destroy(memext); 470 extent_destroy(memext);
471 471
472 return true; /* TODO: better error handling */ 472 return true; /* TODO: better error handling */