Deleted Added
full compact
powernow.c (184104) powernow.c (185349)
1/*-
2 * Copyright (c) 2004-2005 Bruno Ducrot
3 * Copyright (c) 2004 FUKUDA Nobuhiko <nfukuda@spa.is.uec.ac.jp>
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

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

24 */
25
26/*
27 * Many thanks to Nate Lawson for his helpful comments on this driver and
28 * to Jung-uk Kim for testing.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004-2005 Bruno Ducrot
3 * Copyright (c) 2004 FUKUDA Nobuhiko <nfukuda@spa.is.uec.ac.jp>
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

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

24 */
25
26/*
27 * Many thanks to Nate Lawson for his helpful comments on this driver and
28 * to Jung-uk Kim for testing.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/i386/cpufreq/powernow.c 184104 2008-10-21 00:52:20Z jkim $");
32__FBSDID("$FreeBSD: head/sys/i386/cpufreq/powernow.c 185349 2008-11-26 22:33:55Z jkim $");
33
34#include <sys/param.h>
35#include <sys/bus.h>
36#include <sys/cpu.h>
37#include <sys/kernel.h>
38#include <sys/malloc.h>
39#include <sys/module.h>
40#include <sys/pcpu.h>

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

860 }
861
862 return (0);
863}
864
865static void
866pn_identify(driver_t *driver, device_t parent)
867{
33
34#include <sys/param.h>
35#include <sys/bus.h>
36#include <sys/cpu.h>
37#include <sys/kernel.h>
38#include <sys/malloc.h>
39#include <sys/module.h>
40#include <sys/pcpu.h>

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

860 }
861
862 return (0);
863}
864
865static void
866pn_identify(driver_t *driver, device_t parent)
867{
868 device_t child;
869
870 if ((amd_pminfo & AMDPM_FID) == 0 || (amd_pminfo & AMDPM_VID) == 0)
871 return;
872 switch (cpu_id & 0xf00) {
873 case 0x600:
874 case 0xf00:
875 break;
876 default:
877 return;
878 }
879 if (device_find_child(parent, "powernow", -1) != NULL)
880 return;
868
869 if ((amd_pminfo & AMDPM_FID) == 0 || (amd_pminfo & AMDPM_VID) == 0)
870 return;
871 switch (cpu_id & 0xf00) {
872 case 0x600:
873 case 0xf00:
874 break;
875 default:
876 return;
877 }
878 if (device_find_child(parent, "powernow", -1) != NULL)
879 return;
881 if ((child = BUS_ADD_CHILD(parent, 10, "powernow", -1)) == NULL)
880 if (BUS_ADD_CHILD(parent, 10, "powernow", -1) == NULL)
882 device_printf(parent, "powernow: add child failed\n");
883}
884
885static int
886pn_probe(device_t dev)
887{
888 struct pn_softc *sc;
889 uint64_t status;

--- 82 unchanged lines hidden ---
881 device_printf(parent, "powernow: add child failed\n");
882}
883
884static int
885pn_probe(device_t dev)
886{
887 struct pn_softc *sc;
888 uint64_t status;

--- 82 unchanged lines hidden ---