Deleted Added
full compact
ct_isa.c (280347) ct_isa.c (296137)
1/* $NecBSD: ct_isa.c,v 1.6 1999/07/26 06:32:01 honda Exp $ */
2
3#include <sys/cdefs.h>
1/* $NecBSD: ct_isa.c,v 1.6 1999/07/26 06:32:01 honda Exp $ */
2
3#include <sys/cdefs.h>
4__FBSDID("$FreeBSD: head/sys/dev/ct/ct_isa.c 280347 2015-03-22 16:10:28Z mav $");
4__FBSDID("$FreeBSD: head/sys/dev/ct/ct_isa.c 296137 2016-02-27 03:38:01Z jhibbits $");
5/* $NetBSD$ */
6
7/*-
8 * [NetBSD for NEC PC-98 series]
9 * Copyright (c) 1995, 1996, 1997, 1998
10 * NetBSD/pc98 porting staff. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without

--- 300 unchanged lines hidden (view full) ---

313ct_space_map(device_t dev, struct bshw *hw,
314 struct resource **iohp, struct resource **memhp)
315{
316 int port_rid, mem_rid;
317
318 *memhp = NULL;
319
320 port_rid = 0;
5/* $NetBSD$ */
6
7/*-
8 * [NetBSD for NEC PC-98 series]
9 * Copyright (c) 1995, 1996, 1997, 1998
10 * NetBSD/pc98 porting staff. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without

--- 300 unchanged lines hidden (view full) ---

313ct_space_map(device_t dev, struct bshw *hw,
314 struct resource **iohp, struct resource **memhp)
315{
316 int port_rid, mem_rid;
317
318 *memhp = NULL;
319
320 port_rid = 0;
321 *iohp = bus_alloc_resource(dev, SYS_RES_IOPORT, &port_rid, 0ul, ~0ul,
322 BSHW_IOSZ, RF_ACTIVE);
321 *iohp = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &port_rid,
322 BSHW_IOSZ, RF_ACTIVE);
323 if (*iohp == NULL)
324 return ENXIO;
325
326 if ((hw->hw_flags & BSHW_SMFIFO) == 0 || isa_get_maddr(dev) == -1)
327 return 0;
328
329 mem_rid = 0;
323 if (*iohp == NULL)
324 return ENXIO;
325
326 if ((hw->hw_flags & BSHW_SMFIFO) == 0 || isa_get_maddr(dev) == -1)
327 return 0;
328
329 mem_rid = 0;
330 *memhp = bus_alloc_resource(dev, SYS_RES_MEMORY, &mem_rid, 0ul, ~0ul,
331 BSHW_MEMSZ, RF_ACTIVE);
330 *memhp = bus_alloc_resource_anywhere(dev, SYS_RES_MEMORY, &mem_rid,
331 BSHW_MEMSZ, RF_ACTIVE);
332 if (*memhp == NULL) {
333 bus_release_resource(dev, SYS_RES_IOPORT, port_rid, *iohp);
334 return ENXIO;
335 }
336
337 return 0;
338}
339

--- 43 unchanged lines hidden ---
332 if (*memhp == NULL) {
333 bus_release_resource(dev, SYS_RES_IOPORT, port_rid, *iohp);
334 return ENXIO;
335 }
336
337 return 0;
338}
339

--- 43 unchanged lines hidden ---