pmc.c (f2e5d078f7f02d4289db31f5f63e23e39914075e) pmc.c (d472ba840d622e48f5c94369263ef3af18ab64f8)
1/* pmc - Driver implementation for power management functions
2 * of Power Management Controller (PMC) on SPARCstation-Voyager.
3 *
4 * Copyright (c) 2002 Eric Brower (ebrower@usa.net)
5 */
6
7#include <linux/kernel.h>
8#include <linux/fs.h>
9#include <linux/errno.h>
10#include <linux/init.h>
11#include <linux/pm.h>
12#include <linux/of.h>
13#include <linux/of_device.h>
14#include <linux/module.h>
15
16#include <asm/io.h>
17#include <asm/oplib.h>
18#include <asm/uaccess.h>
19#include <asm/auxio.h>
1/* pmc - Driver implementation for power management functions
2 * of Power Management Controller (PMC) on SPARCstation-Voyager.
3 *
4 * Copyright (c) 2002 Eric Brower (ebrower@usa.net)
5 */
6
7#include <linux/kernel.h>
8#include <linux/fs.h>
9#include <linux/errno.h>
10#include <linux/init.h>
11#include <linux/pm.h>
12#include <linux/of.h>
13#include <linux/of_device.h>
14#include <linux/module.h>
15
16#include <asm/io.h>
17#include <asm/oplib.h>
18#include <asm/uaccess.h>
19#include <asm/auxio.h>
20#include <asm/processor.h>
20
21/* Debug
22 *
23 * #define PMC_DEBUG_LED
24 * #define PMC_NO_IDLE
25 */
26
27#define PMC_OBPNAME "SUNW,pmc"

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

58 resource_size(&op->resource[0]), PMC_OBPNAME);
59 if (!regs) {
60 printk(KERN_ERR "%s: unable to map registers\n", PMC_DEVNAME);
61 return -ENODEV;
62 }
63
64#ifndef PMC_NO_IDLE
65 /* Assign power management IDLE handler */
21
22/* Debug
23 *
24 * #define PMC_DEBUG_LED
25 * #define PMC_NO_IDLE
26 */
27
28#define PMC_OBPNAME "SUNW,pmc"

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

59 resource_size(&op->resource[0]), PMC_OBPNAME);
60 if (!regs) {
61 printk(KERN_ERR "%s: unable to map registers\n", PMC_DEVNAME);
62 return -ENODEV;
63 }
64
65#ifndef PMC_NO_IDLE
66 /* Assign power management IDLE handler */
66 pm_idle = pmc_swift_idle;
67 sparc_idle = pmc_swift_idle;
67#endif
68
69 printk(KERN_INFO "%s: power management initialized\n", PMC_DEVNAME);
70 return 0;
71}
72
73static struct of_device_id pmc_match[] = {
74 {

--- 25 unchanged lines hidden ---
68#endif
69
70 printk(KERN_INFO "%s: power management initialized\n", PMC_DEVNAME);
71 return 0;
72}
73
74static struct of_device_id pmc_match[] = {
75 {

--- 25 unchanged lines hidden ---