Deleted Added
full compact
versatile_pci.c (281092) versatile_pci.c (287882)
1/*
2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/arm/versatile/versatile_pci.c 281092 2015-04-04 23:03:11Z andrew $");
28__FBSDID("$FreeBSD: head/sys/arm/versatile/versatile_pci.c 287882 2015-09-16 23:34:51Z zbb $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/bus.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/malloc.h>
36#include <sys/rman.h>

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

261 (class_id == 0xffffffff))
262 continue;
263
264 val = versatile_pci_conf_read_4((slot << 11) + PCIR_COMMAND);
265 val |= PCIM_CMD_MEMEN | PCIM_CMD_PORTEN;
266 versatile_pci_conf_write_4((slot << 11) + PCIR_COMMAND, val);
267 }
268
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/bus.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/malloc.h>
36#include <sys/rman.h>

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

261 (class_id == 0xffffffff))
262 continue;
263
264 val = versatile_pci_conf_read_4((slot << 11) + PCIR_COMMAND);
265 val |= PCIM_CMD_MEMEN | PCIM_CMD_PORTEN;
266 versatile_pci_conf_write_4((slot << 11) + PCIR_COMMAND, val);
267 }
268
269 device_add_child(dev, "pci", 0);
269 device_add_child(dev, "pci", -1);
270 return (bus_generic_attach(dev));
271}
272
273static int
274versatile_pci_read_ivar(device_t dev, device_t child, int which,
275 uintptr_t *result)
276{
277 struct versatile_pci_softc *sc = device_get_softc(dev);

--- 244 unchanged lines hidden ---
270 return (bus_generic_attach(dev));
271}
272
273static int
274versatile_pci_read_ivar(device_t dev, device_t child, int which,
275 uintptr_t *result)
276{
277 struct versatile_pci_softc *sc = device_get_softc(dev);

--- 244 unchanged lines hidden ---