diff --git a/headers/os/drivers/pcmcia/cb_enabler.h b/headers/os/drivers/pcmcia/cb_enabler.h index 7dbd76e577..a706ddb93e 100644 --- a/headers/os/drivers/pcmcia/cb_enabler.h +++ b/headers/os/drivers/pcmcia/cb_enabler.h @@ -1,3 +1,32 @@ +/* + * cb_enabler.h + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License + * at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + * the License for the specific language governing rights and + * limitations under the License. + * + * The initial developer of the original code is David A. Hinds + * . Portions created by David A. Hinds + * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License version 2 (the "GPL"), in + * which case the provisions of the GPL are applicable instead of the + * above. If you wish to allow the use of your version of this file + * only under the terms of the GPL and not to allow others to use + * your version of this file under the MPL, indicate your decision by + * deleting the provisions above and replace them with the notice and + * other provisions required by the GPL. If you do not delete the + * provisions above, a recipient may use your version of this file + * under either the MPL or the GPL. + */ + #ifndef _CB_ENABLER_H #define _CB_ENABLER_H diff --git a/headers/os/drivers/pcmcia/cs_timer.h b/headers/os/drivers/pcmcia/cs_timer.h new file mode 100644 index 0000000000..615c97c094 --- /dev/null +++ b/headers/os/drivers/pcmcia/cs_timer.h @@ -0,0 +1,42 @@ +/* + * cs_timer.h + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License + * at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + * the License for the specific language governing rights and + * limitations under the License. + * + * The initial developer of the original code is David A. Hinds + * . Portions created by David A. Hinds + * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License version 2 (the "GPL"), in + * which case the provisions of the GPL are applicable instead of the + * above. If you wish to allow the use of your version of this file + * only under the terms of the GPL and not to allow others to use + * your version of this file under the MPL, indicate your decision by + * deleting the provisions above and replace them with the notice and + * other provisions required by the GPL. If you do not delete the + * provisions above, a recipient may use your version of this file + * under either the MPL or the GPL. + */ + +#define HZ 1000000 +#define jiffies (system_time()) +#define RUN_AT(t) (system_time()+(t)) + +typedef struct timer_list { + struct timer_list *next, *prev; + bigtime_t expires; + u_long data; + void (*function)(u_long data); +} timer_list; + +void my_add_timer(struct timer_list *t); +void my_del_timer(struct timer_list *t); diff --git a/headers/os/drivers/pcmcia/driver_ops.h b/headers/os/drivers/pcmcia/driver_ops.h index b6c7d69c54..9903e5bf54 100644 --- a/headers/os/drivers/pcmcia/driver_ops.h +++ b/headers/os/drivers/pcmcia/driver_ops.h @@ -68,15 +68,6 @@ typedef struct driver_operations { int register_driver(struct driver_operations *ops); void unregister_driver(struct driver_operations *ops); -#ifdef __BEOS__ -#define CB_ENABLER_MODULE_NAME "bus_managers/cb_enabler/v1" -typedef struct cb_enabler_module_info { - bus_manager_info binfo; - int (*register_driver)(struct driver_operations *ops); - void (*unregister_driver)(struct driver_operations *ops); -} cb_enabler_module_info; -#endif /* __BEOS__ */ - #endif /* __KERNEL__ */ #endif /* _LINUX_DRIVER_OPS_H */ diff --git a/headers/os/drivers/pcmcia/k_compat.h b/headers/os/drivers/pcmcia/k_compat.h index 8877756560..3f75da1fac 100644 --- a/headers/os/drivers/pcmcia/k_compat.h +++ b/headers/os/drivers/pcmcia/k_compat.h @@ -26,8 +26,16 @@ #include #include #include +#include +#include + +#define u32 uint32 +#define u16 uint16 +#define u8 uint8 #define __KERNEL__ +#define __init +#define __exit /* IO port access */ #define inb(p) (isa->read_io_8)(p) @@ -65,7 +73,7 @@ /* Virtual memory mapping: this is somewhat inelegant, but lets us use drop-in replacements for the Linux equivalents */ -#define PAGE_SIZE (0x1000) +// #define PAGE_SIZE (0x1000) static inline void *ioremap(u_long base, u_long size) { char tag[B_OS_NAME_LENGTH]; @@ -128,11 +136,11 @@ void free(void *); #define pcibios_read_config_dword(b,df,o,v) \ ((*(v) = pci->read_pci_config(b,(df)>>3,((df)&7),o,4)),0) #define pcibios_write_config_byte(b,df,o,v) \ - pci->write_pci_config(b,(df)>>3,((df)&7),o,1,v) + (pci->write_pci_config(b,(df)>>3,((df)&7),o,1,v),0) #define pcibios_write_config_word(b,df,o,v) \ - pci->write_pci_config(b,(df)>>3,((df)&7),o,2,v) + (pci->write_pci_config(b,(df)>>3,((df)&7),o,2,v),0) #define pcibios_write_config_dword(b,df,o,v) \ - pci->write_pci_config(b,(df)>>3,((df)&7),o,4,v) + (pci->write_pci_config(b,(df)>>3,((df)&7),o,4,v),0) #define PCI_VENDOR_ID PCI_vendor_id #define PCI_DEVICE_ID PCI_device_id #define PCI_COMMAND PCI_command @@ -172,11 +180,15 @@ void free(void *); do { release_spinlock(l); restore_interrupts(f); } while (0) /* Interrupt handling */ -#define REQUEST_IRQ(i,h,f,n,d) install_io_interrupt_handler(i,h,d,0) -#define FREE_IRQ(i,h,d) remove_io_interrupt(i,h) -#define IRQ(i,d,r) (d) +#define request_irq(i,h,f,n,d) install_io_interrupt_handler(i,h,d,0) +#define free_irq(i,h) remove_io_interrupt(i,h) +//#define REQUEST_IRQ(i,h,f,n,d) install_io_interrupt_handler(i,h,d,0) +//#define FREE_IRQ(i,h,d) remove_io_interrupt(i,h) +//#define IRQ(i,d,r) (d) +#define IRQ #define DEV_ID dev_id #define NR_IRQS 16 +#define SA_SHIRQ 1 #define init_waitqueue(w) memset((w), 0, sizeof(*w)) #define init_waitqueue_head(w) memset((w), 0, sizeof(*w)) @@ -204,6 +216,9 @@ typedef long long k_time_t; #define del_timer my_del_timer /* Module handling stuff */ +#define MODULE_AUTHOR(x) +#define MODULE_DESCRIPTION(x) +#define MODULE_LICENSE(x) #define MODULE_PARM(a,b) extern int __dummy_decl #define MOD_INC_USE_COUNT #define MOD_DEC_USE_COUNT diff --git a/headers/os/drivers/pcmcia/ss.h b/headers/os/drivers/pcmcia/ss.h index e4c68da3d4..d197e42d23 100644 --- a/headers/os/drivers/pcmcia/ss.h +++ b/headers/os/drivers/pcmcia/ss.h @@ -1,5 +1,5 @@ /* - * ss.h 1.23 1999/07/20 16:08:01 + * ss.h 1.31 2001/08/24 12:16:13 * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in @@ -12,8 +12,19 @@ * limitations under the License. * * The initial developer of the original code is David A. Hinds - * . Portions created by David A. Hinds - * are Copyright (C) 1998 David A. Hinds. All Rights Reserved. + * . Portions created by David A. Hinds + * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU General Public License version 2 (the "GPL"), in + * which case the provisions of the GPL are applicable instead of the + * above. If you wish to allow the use of your version of this file + * only under the terms of the GPL and not to allow others to use + * your version of this file under the MPL, indicate your decision by + * deleting the provisions above and replace them with the notice and + * other provisions required by the GPL. If you do not delete the + * provisions above, a recipient may use your version of this file + * under either the MPL or the GPL. */ #ifndef _LINUX_SS_H @@ -40,6 +51,7 @@ typedef struct ss_callback_t { #define SS_CARDBUS 0x0800 #define SS_3VCARD 0x1000 #define SS_XVCARD 0x2000 +#define SS_PENDING 0x4000 /* for InquireSocket */ typedef struct socket_cap_t { @@ -56,6 +68,7 @@ typedef struct socket_cap_t { #define SS_CAP_PAGE_REGS 0x0001 #define SS_CAP_VIRTUAL_BUS 0x0002 #define SS_CAP_MEM_ALIGN 0x0004 +#define SS_CAP_STATIC_MAP 0x0008 #define SS_CAP_PCCARD 0x4000 #define SS_CAP_CARDBUS 0x8000 @@ -74,6 +87,7 @@ typedef struct socket_state_t { #define SS_DMA_MODE 0x0080 #define SS_SPKR_ENA 0x0100 #define SS_OUTPUT_ENA 0x0200 +#define SS_ZVCARD 0x0400 /* Flags for I/O port and memory windows */ #define MAP_ACTIVE 0x01