summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/b1lli.h4
-rw-r--r--include/linux/cuda.h1
-rw-r--r--include/linux/ide.h65
-rw-r--r--include/linux/input.h3
-rw-r--r--include/linux/isdn/capilli.h24
-rw-r--r--include/linux/kernelcapi.h4
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/pmu.h41
-rw-r--r--include/linux/sched.h4
9 files changed, 69 insertions, 79 deletions
diff --git a/include/linux/b1lli.h b/include/linux/b1lli.h
index 24ec4670a033..713f712685d3 100644
--- a/include/linux/b1lli.h
+++ b/include/linux/b1lli.h
@@ -61,12 +61,12 @@ typedef struct avmb1_extcarddef {
} avmb1_extcarddef;
#define AVMB1_LOAD 0 /* load image to card */
-#define AVMB1_ADDCARD 1 /* add a new card */
+#define AVMB1_ADDCARD 1 /* add a new card - OBSOLETE */
#define AVMB1_RESETCARD 2 /* reset a card */
#define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */
#define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */
#define AVMB1_GET_CARDINFO 5 /* get cardtype */
-#define AVMB1_REMOVECARD 6 /* remove a card (useful for T1) */
+#define AVMB1_REMOVECARD 6 /* remove a card - OBSOLETE */
#define AVMB1_REGISTERCARD_IS_OBSOLETE
diff --git a/include/linux/cuda.h b/include/linux/cuda.h
index 75549da3fc6a..6a3e6385d3f3 100644
--- a/include/linux/cuda.h
+++ b/include/linux/cuda.h
@@ -29,7 +29,6 @@
#ifdef __KERNEL__
extern int find_via_cuda(void);
-extern int via_cuda_start(void);
extern int cuda_request(struct adb_request *req,
void (*done)(struct adb_request *), int nbytes, ...);
extern void cuda_poll(void);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 8e2950781b00..f43f83e807f9 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -264,8 +264,6 @@ void ide_setup_ports(hw_regs_t *hw,
#define ATA_SCSI 0x21
#define ATA_NO_LUN 0x7f
-struct ide_settings_s;
-
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
@@ -329,8 +327,6 @@ struct ata_device {
unsigned long sleep; /* sleep until this time */
- u8 XXX_tune_req; /* requested drive tuning setting */
-
byte using_dma; /* disk is using dma for read/write */
byte using_tcq; /* disk is using queueing */
byte retry_pio; /* retrying dma capable host in pio */
@@ -379,7 +375,6 @@ struct ata_device {
void *driver_data; /* extra driver data */
devfs_handle_t de; /* directory for device */
- struct ide_settings_s *settings; /* ioctl entires */
char driver_req[10]; /* requests specific driver */
int last_lun; /* last logical unit */
@@ -418,6 +413,9 @@ struct ata_channel {
int unit; /* channel number */
struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */
+ struct timer_list timer; /* failsafe timer */
+ int (*expiry)(struct ata_device *, struct request *); /* irq handler, if active */
+ struct ata_device *drive; /* last serviced drive */
ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
hw_regs_t hw; /* Hardware info */
@@ -569,50 +567,10 @@ typedef struct hwgroup_s {
*/
ide_startstop_t (*handler)(struct ata_device *, struct request *); /* irq handler, if active */
unsigned long flags; /* BUSY, SLEEPING */
- struct ata_device *XXX_drive; /* current drive */
struct request *rq; /* current request */
- struct timer_list timer; /* failsafe timer */
- int (*expiry)(struct ata_device *, struct request *); /* irq handler, if active */
} ide_hwgroup_t;
-/* structure attached to the request for IDE_TASK_CMDS */
-
-/*
- * configurable drive settings
- */
-
-#define TYPE_INT 0
-#define TYPE_INTA 1
-#define TYPE_BYTE 2
-#define TYPE_SHORT 3
-
-#define SETTING_READ (1 << 0)
-#define SETTING_WRITE (1 << 1)
-#define SETTING_RW (SETTING_READ | SETTING_WRITE)
-
-typedef int (ide_procset_t)(struct ata_device *, int);
-typedef struct ide_settings_s {
- char *name;
- int rw;
- int read_ioctl;
- int write_ioctl;
- int data_type;
- int min;
- int max;
- int mul_factor;
- int div_factor;
- void *data;
- ide_procset_t *set;
- int auto_remove;
- struct ide_settings_s *next;
-} ide_settings_t;
-
-extern void ide_add_setting(struct ata_device *, const char *, int, int, int, int, int, int, int, int, void *, ide_procset_t *);
-extern void ide_remove_setting(struct ata_device *, char *);
-extern int ide_read_setting(struct ata_device *, ide_settings_t *);
-extern int ide_write_setting(struct ata_device *, ide_settings_t *, int);
-extern void ide_add_generic_settings(struct ata_device *);
-
+/* FIXME: kill this as soon as possible */
#define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0;
/*
@@ -683,13 +641,10 @@ extern void ide_set_handler(struct ata_device *drive, ata_handler_t handler,
/*
* Error reporting, in human readable form (luxurious, but a memory hog).
*/
-extern byte ide_dump_status(struct ata_device *, const char *, byte);
+extern u8 ide_dump_status(struct ata_device *, struct request *rq, const char *, u8);
-/*
- * ide_error() takes action based on the error returned by the controller.
- * The caller should return immediately after invoking this.
- */
-extern ide_startstop_t ide_error(struct ata_device *, const char *, byte);
+extern ide_startstop_t ide_error(struct ata_device *, struct request *rq,
+ const char *, byte);
/*
* Issue a simple drive command
@@ -713,7 +668,9 @@ void ide_fixstring(byte *s, const int bytecount, const int byteswap);
* caller should return the updated value of "startstop" in this case.
* "startstop" is unchanged when the function returns 0;
*/
-extern int ide_wait_stat(ide_startstop_t *, struct ata_device *, byte, byte, unsigned long);
+extern int ide_wait_stat(ide_startstop_t *,
+ struct ata_device *, struct request *rq,
+ byte, byte, unsigned long);
extern int ide_wait_noerr(struct ata_device *, byte, byte, unsigned long);
@@ -759,7 +716,7 @@ extern int ide_do_drive_cmd(struct ata_device *, struct request *, ide_action_t)
/*
* Clean up after success/failure of an explicit drive cmd.
*/
-extern void ide_end_drive_cmd(struct ata_device *, byte, byte);
+extern void ide_end_drive_cmd(struct ata_device *, struct request *, u8, u8);
struct ata_taskfile {
struct hd_drive_task_hdr taskfile;
diff --git a/include/linux/input.h b/include/linux/input.h
index 7ebdaaa7ae3f..aa5e80d60330 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -325,6 +325,9 @@ struct input_event {
#define KEY_UNKNOWN 240
+#define KEY_BRIGHTNESSDOWN 224
+#define KEY_BRIGHTNESSUP 225
+
#define BTN_MISC 0x100
#define BTN_0 0x100
#define BTN_1 0x101
diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h
index 76eb4e1d2fad..cd10cf67b6f3 100644
--- a/include/linux/isdn/capilli.h
+++ b/include/linux/isdn/capilli.h
@@ -12,7 +12,10 @@
#ifndef __CAPILLI_H__
#define __CAPILLI_H__
+#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/capi.h>
+#include <linux/kernelcapi.h>
typedef struct capiloaddatapart {
int user; /* data in userspace ? */
@@ -60,10 +63,6 @@ struct capi_ctr {
void (*handle_capimsg)(struct capi_ctr * card,
__u16 appl, struct sk_buff *skb);
- void (*new_ncci)(struct capi_ctr * card,
- __u16 appl, __u32 ncci, __u32 winsize);
- void (*free_ncci)(struct capi_ctr * card, __u16 appl, __u32 ncci);
-
/* management information for kcapi */
unsigned long nrecvctlpkt;
@@ -81,11 +80,10 @@ struct capi_driver {
char revision[32];
int (*load_firmware)(struct capi_ctr *, capiloaddata *);
void (*reset_ctr)(struct capi_ctr *);
- void (*remove_ctr)(struct capi_ctr *);
void (*register_appl)(struct capi_ctr *, __u16 appl,
capi_register_params *);
void (*release_appl)(struct capi_ctr *, __u16 appl);
- void (*send_message)(struct capi_ctr *, struct sk_buff *skb);
+ u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb);
char *(*procinfo)(struct capi_ctr *);
int (*ctr_read_proc)(char *page, char **start, off_t off,
@@ -93,8 +91,6 @@ struct capi_driver {
int (*driver_read_proc)(char *page, char **start, off_t off,
int count, int *eof, struct capi_driver *driver);
- int (*add_card)(struct capi_driver *driver, capicardparams *data);
-
/* intitialized by kcapi */
struct list_head contr_head; /* list of controllers */
struct list_head driver_list;
@@ -109,4 +105,16 @@ void detach_capi_driver(struct capi_driver *driver);
struct capi_ctr *attach_capi_ctr(struct capi_driver *driver, char *name, void *data);
int detach_capi_ctr(struct capi_ctr *);
+
+
+// ---------------------------------------------------------------------------
+// library functions for use by hardware controller drivers
+
+void capilib_new_ncci(struct list_head *head, u16 applid, u32 ncci, u32 winsize);
+void capilib_free_ncci(struct list_head *head, u16 applid, u32 ncci);
+void capilib_release_appl(struct list_head *head, u16 applid);
+void capilib_release(struct list_head *head);
+void capilib_data_b3_conf(struct list_head *head, u16 applid, u32 ncci, u16 msgid);
+u16 capilib_data_b3_req(struct list_head *head, u16 applid, u32 ncci, u16 msgid);
+
#endif /* __CAPILLI_H__ */
diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h
index c162ff96f53b..e6312ebffbc4 100644
--- a/include/linux/kernelcapi.h
+++ b/include/linux/kernelcapi.h
@@ -32,7 +32,7 @@ typedef struct kcapi_carddef {
/* new ioctls >= 10 */
#define KCAPI_CMD_TRACE 10
-#define KCAPI_CMD_ADDCARD 11 /* add card to named driver */
+#define KCAPI_CMD_ADDCARD 11 /* OBSOLETE */
/*
* flag > 2 => trace also data
@@ -47,6 +47,8 @@ typedef struct kcapi_carddef {
#ifdef __KERNEL__
+#include <linux/skbuff.h>
+
struct capi_interface {
__u16 (*capi_isinstalled) (void);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 9d92b69a8c36..2f0b56f0183b 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -311,8 +311,6 @@ extern mem_map_t * mem_map;
extern void show_free_areas(void);
extern void show_free_areas_node(pg_data_t *pgdat);
-extern void clear_page_tables(struct mm_struct *, unsigned long, int);
-
extern int fail_writepage(struct page *);
struct page * shmem_nopage(struct vm_area_struct * vma, unsigned long address, int unused);
struct file *shmem_file_setup(char * name, loff_t size);
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 1186ebc301a8..b8e09e891eb9 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -113,11 +113,12 @@ enum {
#define PMU_IOC_HAS_ADB _IOR('B', 4, sizeof(__u32*))
/* out param: u32* can_sleep: 0 or 1 */
#define PMU_IOC_CAN_SLEEP _IOR('B', 5, sizeof(__u32*))
+/* no param */
+#define PMU_IOC_GRAB_BACKLIGHT _IOR('B', 6, 0)
#ifdef __KERNEL__
extern int find_via_pmu(void);
-extern int via_pmu_start(void);
extern int pmu_request(struct adb_request *req,
void (*done)(struct adb_request *), int nbytes, ...);
@@ -168,19 +169,41 @@ struct pmu_sleep_notifier
/* priority levels in notifiers */
#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */
-#define SLEEP_LEVEL_SOUND 90 /* Sound driver */
-#define SLEEP_LEVEL_MEDIABAY 80 /* Media bay driver */
-#define SLEEP_LEVEL_BLOCK 70 /* IDE, SCSI */
-#define SLEEP_LEVEL_NET 60 /* bmac */
-#define SLEEP_LEVEL_ADB 50 /* ADB */
-#define SLEEP_LEVEL_MISC 30 /* Anything */
-#define SLEEP_LEVEL_LAST 0 /* Reserved for apm_emu */
+#define SLEEP_LEVEL_MEDIABAY 90 /* Media bay driver */
+#define SLEEP_LEVEL_BLOCK 80 /* IDE, SCSI */
+#define SLEEP_LEVEL_NET 70 /* bmac, gmac */
+#define SLEEP_LEVEL_MISC 60 /* Anything else */
+#define SLEEP_LEVEL_USERLAND 55 /* Reserved for apm_emu */
+#define SLEEP_LEVEL_ADB 50 /* ADB (async) */
+#define SLEEP_LEVEL_SOUND 40 /* Sound driver (blocking) */
/* special register notifier functions */
int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier);
int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier);
-#endif /* CONFIG_PMAC_PBOOK */
+#define PMU_MAX_BATTERIES 2
+
+/* values for pmu_power_flags */
+#define PMU_PWR_AC_PRESENT 0x00000001
+/* values for pmu_battery_info.flags */
+#define PMU_BATT_PRESENT 0x00000001
+#define PMU_BATT_CHARGING 0x00000002
+
+struct pmu_battery_info
+{
+ unsigned int flags;
+ unsigned int charge; /* current charge */
+ unsigned int max_charge; /* maximum charge */
+ signed int current; /* current, positive if charging */
+ unsigned int voltage; /* voltage */
+ unsigned int time_remaining; /* remaining time */
+};
+
+extern int pmu_battery_count;
+extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES];
+extern unsigned int pmu_power_flags;
+
+#endif /* CONFIG_PMAC_PBOOK */
#endif /* __KERNEL__ */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index fdf83faccdde..392d2174d84a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -39,7 +39,7 @@ struct exec_domain;
#define CLONE_FS 0x00000200 /* set if fs info shared between processes */
#define CLONE_FILES 0x00000400 /* set if open files shared between processes */
#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */
-#define CLONE_PID 0x00001000 /* set if pid shared */
+#define CLONE_IDLETASK 0x00001000 /* set if new pid should be 0 (kernel only)*/
#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */
@@ -663,7 +663,7 @@ extern void daemonize(void);
extern task_t *child_reaper;
extern int do_execve(char *, char **, char **, struct pt_regs *);
-extern int do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long);
+extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long);
extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));
extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait));