2 * Definitions for accessing the Feature Control Register (FCR)
3 * on Power Macintoshes and similar machines. The FCR lets us
4 * enable/disable, reset, and power up/down various peripherals.
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
10 * Copyright (C) 1998 Paul Mackerras.
12 #ifndef __ASM_PPC_FEATURE_H
13 #define __ASM_PPC_FEATURE_H
16 * The FCR bits for particular features vary somewhat between
17 * different machines. So we abstract a list of features here
18 * and let the feature_* routines map them to the actual bits.
23 FEATURE_Serial_enable
,
31 FEATURE_Mediabay_reset
,
32 FEATURE_Mediabay_enable
,
33 FEATURE_Mediabay_PCI_enable
,
34 FEATURE_Mediabay_IDE_enable
,
35 FEATURE_Mediabay_floppy_enable
,
37 FEATURE_BMac_IO_enable
,
39 FEATURE_IDE_DiskPower
,
44 /* Note about the device parameter: Each device gives it's own entry. If NULL,
45 the feature function will just do nothing and return -EINVAL.
46 The feature management will walk up the device tree until in reaches a recognized
47 chip for which features can be changed and it will then apply the necessary
48 features to that chip. If it's not found, -ENODEV is returned.
49 Note also that feature_test/set/clear are interrupt-safe provided that they are
50 called _after_ feature_init() is completed.
53 /* Test whether a particular feature is enabled. May return -ENODEV*/
54 extern int feature_test(struct device_node
* device
, enum system_feature f
);
56 /* Set a particular feature. Returns 0 or -ENODEV */
57 extern int feature_set(struct device_node
* device
, enum system_feature f
);
59 /* Clear a particular feature */
60 extern int feature_clear(struct device_node
* device
, enum system_feature f
);
62 /* Initialize feature stuff */
63 extern void feature_init(void);
66 #endif /* __ASM_PPC_FEATURE_H */