~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-ppc/feature.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  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.
  5  *
  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
  8  * for more details.
  9  *
 10  * Copyright (C) 1998 Paul Mackerras &
 11  *                    Ben. Herrenschmidt.
 12  *
 13  * 
 14  */
 15 #ifdef __KERNEL__
 16 #ifndef __ASM_PPC_FEATURE_H
 17 #define __ASM_PPC_FEATURE_H
 18 
 19 /*
 20  * The FCR selector for particular features vary somewhat between
 21  * different machines.  So we abstract a list of features here
 22  * and let the feature_* routines map them to the actual bits.
 23  */
 24 enum system_feature {
 25         FEATURE_null,
 26         FEATURE_Serial_reset,
 27         FEATURE_Serial_enable,
 28         FEATURE_Serial_IO_A,
 29         FEATURE_Serial_IO_B,
 30         FEATURE_SWIM3_enable,
 31         FEATURE_MESH_enable,
 32         FEATURE_IDE0_enable,            /* Internal IDE */
 33         FEATURE_IDE0_reset,             /* Internal IDE */
 34         FEATURE_IOBUS_enable,           /* Internal IDE */
 35         FEATURE_Mediabay_reset,
 36         FEATURE_Mediabay_power,
 37         FEATURE_Mediabay_PCI_enable,
 38         FEATURE_IDE1_enable,            /* MediaBay IDE */
 39         FEATURE_IDE1_reset,             /* MediaBay IDE */
 40         FEATURE_Mediabay_floppy_enable,
 41         FEATURE_BMac_reset,
 42         FEATURE_BMac_IO_enable,
 43         FEATURE_Modem_power,
 44         FEATURE_Slow_SCC_PCLK,
 45         FEATURE_Sound_power,
 46         FEATURE_Sound_CLK_enable,
 47         FEATURE_IDE2_enable,
 48         FEATURE_IDE2_reset,
 49         FEATURE_Mediabay_IDE_switch,    /* MB IDE bus switch */
 50         FEATURE_Mediabay_content,       /* MB content indicator enable */
 51         FEATURE_Airport_reset,          /* Is it actually a reset ? */
 52         FEATURE_last,
 53 };
 54 
 55 /* Note about the device parameter: Each device gives it's own entry. If NULL,
 56    the feature function will just do nothing and return -EINVAL.
 57    The feature management will walk up the device tree until in reaches a recognized
 58    chip for which features can be changed and it will then apply the necessary
 59    features to that chip. If it's not found, -ENODEV is returned.
 60    Note also that feature_test/set/clear are interrupt-safe provided that they are
 61    called _after_ feature_init() is completed.
 62  */
 63 
 64 /* Test whether a particular feature is enabled. May return -ENODEV*/
 65 extern int      feature_test(struct device_node* device, enum system_feature f);
 66 
 67 /* Set a particular feature. Returns 0 or -ENODEV */
 68 extern int      feature_set(struct device_node* device, enum system_feature f);
 69 
 70 /* Clear a particular feature */
 71 extern int      feature_clear(struct device_node* device, enum system_feature f);
 72 
 73 /* Initialize feature stuff */
 74 extern void     feature_init(void);
 75 
 76 
 77 /*
 78  * Additional functions related to Core99 machines
 79  */
 80 extern void     feature_set_gmac_power(struct device_node* device, int power);
 81 
 82         /* use constants in KeyLargo.h for the reset parameter */
 83 extern void     feature_set_gmac_phy_reset(struct device_node* device, int reset);
 84 
 85 extern void     feature_set_usb_power(struct device_node* device, int power);
 86 
 87 extern void     feature_set_firewire_power(struct device_node* device, int power);
 88 
 89 /*
 90  * Sleep related functions. At term, they should be high-priority notifiers
 91  */
 92 extern void     feature_prepare_for_sleep(void);
 93 
 94 extern void     feature_wake_up(void);
 95 
 96 #endif /* __ASM_PPC_FEATURE_H */
 97 #endif /* __KERNEL__ */
 98 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.