si_isa.c (302408) | si_isa.c (335087) |
---|---|
1/*- 2 * Device driver for Specialix range (SI/XIO) of serial line multiplexors. 3 * 4 * Copyright (C) 2000, Peter Wemm <peter@netplex.com.au> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 6 unchanged lines hidden (view full) --- 15 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 * NO EVENT SHALL THE AUTHORS BE LIABLE. 19 * 20 */ 21 22#include <sys/cdefs.h> | 1/*- 2 * Device driver for Specialix range (SI/XIO) of serial line multiplexors. 3 * 4 * Copyright (C) 2000, Peter Wemm <peter@netplex.com.au> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 6 unchanged lines hidden (view full) --- 15 * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 * NO EVENT SHALL THE AUTHORS BE LIABLE. 19 * 20 */ 21 22#include <sys/cdefs.h> |
23__FBSDID("$FreeBSD: stable/11/sys/dev/si/si_isa.c 296137 2016-02-27 03:38:01Z jhibbits $"); | 23__FBSDID("$FreeBSD: stable/11/sys/dev/si/si_isa.c 335087 2018-06-13 20:33:52Z dim $"); |
24 25#include "opt_debug_si.h" 26 27#include <sys/param.h> 28#include <sys/systm.h> 29#include <sys/kernel.h> 30#include <sys/module.h> 31#include <sys/bus.h> --- 28 unchanged lines hidden (view full) --- 60 sc->sc_mem_rid = 0; 61 sc->sc_mem_res = bus_alloc_resource_anywhere(dev, SYS_RES_MEMORY, 62 &sc->sc_mem_rid, 63 SIPROBEALLOC, RF_ACTIVE); 64 if (!sc->sc_mem_res) { 65 device_printf(dev, "cannot allocate memory resource\n"); 66 return ENXIO; 67 } | 24 25#include "opt_debug_si.h" 26 27#include <sys/param.h> 28#include <sys/systm.h> 29#include <sys/kernel.h> 30#include <sys/module.h> 31#include <sys/bus.h> --- 28 unchanged lines hidden (view full) --- 60 sc->sc_mem_rid = 0; 61 sc->sc_mem_res = bus_alloc_resource_anywhere(dev, SYS_RES_MEMORY, 62 &sc->sc_mem_rid, 63 SIPROBEALLOC, RF_ACTIVE); 64 if (!sc->sc_mem_res) { 65 device_printf(dev, "cannot allocate memory resource\n"); 66 return ENXIO; 67 } |
68 paddr = (caddr_t)rman_get_start(sc->sc_mem_res);/* physical */ | 68 paddr = (caddr_t)(uintptr_t)rman_get_start(sc->sc_mem_res);/* physical */ |
69 maddr = rman_get_virtual(sc->sc_mem_res); /* in kvm */ 70 71 DPRINT((0, DBG_AUTOBOOT, "si%d: probe at virtual=0x%x physical=0x%x\n", 72 unit, maddr, paddr)); 73 74 /* 75 * this is a lie, but it's easier than trying to handle caching 76 * and ram conflicts in the >1M and <16M region. --- 197 unchanged lines hidden (view full) --- 274 sc->sc_mem_rid = 0; 275 sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, 276 &sc->sc_mem_rid, 277 RF_ACTIVE); 278 if (!sc->sc_mem_res) { 279 device_printf(dev, "couldn't map memory\n"); 280 goto fail; 281 } | 69 maddr = rman_get_virtual(sc->sc_mem_res); /* in kvm */ 70 71 DPRINT((0, DBG_AUTOBOOT, "si%d: probe at virtual=0x%x physical=0x%x\n", 72 unit, maddr, paddr)); 73 74 /* 75 * this is a lie, but it's easier than trying to handle caching 76 * and ram conflicts in the >1M and <16M region. --- 197 unchanged lines hidden (view full) --- 274 sc->sc_mem_rid = 0; 275 sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, 276 &sc->sc_mem_rid, 277 RF_ACTIVE); 278 if (!sc->sc_mem_res) { 279 device_printf(dev, "couldn't map memory\n"); 280 goto fail; 281 } |
282 sc->sc_paddr = (caddr_t)rman_get_start(sc->sc_mem_res); | 282 sc->sc_paddr = (caddr_t)(uintptr_t)rman_get_start(sc->sc_mem_res); |
283 sc->sc_maddr = rman_get_virtual(sc->sc_mem_res); 284 285 sc->sc_irq_rid = 0; 286 sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, 287 &sc->sc_irq_rid, 288 RF_ACTIVE | RF_SHAREABLE); 289 if (!sc->sc_irq_res) { 290 device_printf(dev, "couldn't allocate interrupt\n"); --- 48 unchanged lines hidden --- | 283 sc->sc_maddr = rman_get_virtual(sc->sc_mem_res); 284 285 sc->sc_irq_rid = 0; 286 sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, 287 &sc->sc_irq_rid, 288 RF_ACTIVE | RF_SHAREABLE); 289 if (!sc->sc_irq_res) { 290 device_printf(dev, "couldn't allocate interrupt\n"); --- 48 unchanged lines hidden --- |