Deleted Added
full compact
acpi_hpet.c (216490) acpi_hpet.c (222222)
1/*-
2 * Copyright (c) 2005 Poul-Henning Kamp
3 * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
4 * All rights reserved.
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:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Poul-Henning Kamp
3 * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
4 * All rights reserved.
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:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 216490 2010-12-16 17:05:28Z jhb $");
29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 222222 2011-05-23 20:12:36Z jkim $");
30
31#include "opt_acpi.h"
32#if defined(__amd64__) || defined(__ia64__)
33#define DEV_APIC
34#else
35#include "opt_apic.h"
36#endif
37#include <sys/param.h>

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

471 bus_free_resource(dev, SYS_RES_MEMORY, sc->mem_res);
472 return (ENXIO);
473 }
474 /* Announce first HPET as timecounter. */
475 if (device_get_unit(dev) == 0) {
476 sc->tc.tc_get_timecount = hpet_get_timecount,
477 sc->tc.tc_counter_mask = ~0u,
478 sc->tc.tc_name = "HPET",
30
31#include "opt_acpi.h"
32#if defined(__amd64__) || defined(__ia64__)
33#define DEV_APIC
34#else
35#include "opt_apic.h"
36#endif
37#include <sys/param.h>

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

471 bus_free_resource(dev, SYS_RES_MEMORY, sc->mem_res);
472 return (ENXIO);
473 }
474 /* Announce first HPET as timecounter. */
475 if (device_get_unit(dev) == 0) {
476 sc->tc.tc_get_timecount = hpet_get_timecount,
477 sc->tc.tc_counter_mask = ~0u,
478 sc->tc.tc_name = "HPET",
479 sc->tc.tc_quality = 900,
479 sc->tc.tc_quality = 950,
480 sc->tc.tc_frequency = sc->freq;
481 sc->tc.tc_priv = sc;
482 tc_init(&sc->tc);
483 }
484 /* If not disabled - setup and announce event timers. */
485 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
486 "clock", &i) == 0 && i == 0)
487 return (0);

--- 368 unchanged lines hidden ---
480 sc->tc.tc_frequency = sc->freq;
481 sc->tc.tc_priv = sc;
482 tc_init(&sc->tc);
483 }
484 /* If not disabled - setup and announce event timers. */
485 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
486 "clock", &i) == 0 && i == 0)
487 return (0);

--- 368 unchanged lines hidden ---