]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/cyclades.h
x86: remove set_kernel_exec()
[linux-2.6-omap-h63xx.git] / include / linux / cyclades.h
index 4c5b4763f5b88d7570cddf61c97b367896c31b15..8f3dcd30828fbb149ef7ee30c788ebf2e312e6e6 100644 (file)
@@ -110,7 +110,6 @@ struct cyclades_idle_stats {
 #define CYZSETPOLLCYCLE                0x43590e
 #define CYZGETPOLLCYCLE                0x43590f
 #define CYGETCD1400VER         0x435910
-#define CYGETCARDINFO          0x435911
 #define        CYSETWAIT               0x435912
 #define        CYGETWAIT               0x435913
 
@@ -506,46 +505,30 @@ struct ZFW_CTRL {
 /****************** ****************** *******************/
 #endif
 
+#ifdef __KERNEL__
+
 /* Per card data structure */
-struct resource;
 struct cyclades_card {
-    unsigned long base_phys;
-    unsigned long ctl_phys;
     void __iomem *base_addr;
     void __iomem *ctl_addr;
     int irq;
-    int num_chips;     /* 0 if card absent, -1 if Z/PCI, else Y */
-    int first_line;    /* minor number of first channel on card */
-    int nports;                /* Number of ports in the card */
-    int bus_index;     /* address shift - 0 for ISA, 1 for PCI */
-    int        intr_enabled;   /* FW Interrupt flag - 0 disabled, 1 enabled */
-    struct pci_dev *pdev;
-#ifdef __KERNEL__
+    unsigned int num_chips;    /* 0 if card absent, -1 if Z/PCI, else Y */
+    unsigned int first_line;   /* minor number of first channel on card */
+    unsigned int nports;       /* Number of ports in the card */
+    int bus_index;             /* address shift - 0 for ISA, 1 for PCI */
+    int intr_enabled;          /* FW Interrupt flag - 0 disabled, 1 enabled */
     spinlock_t card_lock;
-#else
-    unsigned long filler;
-#endif
+    struct cyclades_port *ports;
 };
 
-struct cyclades_chip {
-  int filler;
-};
-
-
-#ifdef __KERNEL__
-
 /***************************************
  * Memory access functions/macros      *
  * (required to support Alpha systems) *
  ***************************************/
 
-#define cy_writeb(port,val)     {writeb((val),(port)); mb();}
-#define cy_writew(port,val)     {writew((val),(port)); mb();}
-#define cy_writel(port,val)     {writel((val),(port)); mb();}
-
-#define cy_readb(port)  readb(port)
-#define cy_readw(port)  readw(port)
-#define cy_readl(port)  readl(port)
+#define cy_writeb(port,val)     do { writeb((val), (port)); mb(); } while (0)
+#define cy_writew(port,val)     do { writew((val), (port)); mb(); } while (0)
+#define cy_writel(port,val)     do { writel((val), (port)); mb(); } while (0)
 
 /*
  * Statistics counters
@@ -567,7 +550,7 @@ struct cyclades_icount {
 
 struct cyclades_port {
        int                     magic;
-       int                     card;
+       struct cyclades_card    *card;
        int                     line;
        int                     flags;          /* defined in tty.h */
        int                     type;           /* UART type */
@@ -583,11 +566,9 @@ struct cyclades_port {
        int                     rtsdtr_inv;
        int                     chip_rev;
        int                     custom_divisor;
-       int                     x_char; /* to be pushed out ASAP */
+       u8                      x_char; /* to be pushed out ASAP */
        int                     close_delay;
        unsigned short          closing_wait;
-       unsigned long           event;
-       unsigned long           last_active;
        int                     count;  /* # of fd on device */
        int                     breakon;
        int                     breakoff;
@@ -598,32 +579,17 @@ struct cyclades_port {
        int                     xmit_cnt;
         int                     default_threshold;
         int                     default_timeout;
-       unsigned long           jiffies[3];
        unsigned long           rflush_count;
        struct cyclades_monitor mon;
        struct cyclades_idle_stats      idle_stats;
        struct cyclades_icount  icount;
-       struct work_struct      tqueue;
        wait_queue_head_t       open_wait;
        wait_queue_head_t       close_wait;
-       wait_queue_head_t       shutdown_wait;
+       struct completion       shutdown_wait;
        wait_queue_head_t       delta_msr_wait;
        int throttle;
 };
 
-/*
- * Events are used to schedule things to happen at timer-interrupt
- * time, instead of at cy interrupt time.
- */
-#define Cy_EVENT_READ_PROCESS          0
-#define Cy_EVENT_WRITE_WAKEUP          1
-#define Cy_EVENT_HANGUP                        2
-#define Cy_EVENT_BREAK                 3
-#define Cy_EVENT_OPEN_WAKEUP           4
-#define Cy_EVENT_SHUTDOWN_WAKEUP       5
-#define        Cy_EVENT_DELTA_WAKEUP           6
-#define        Cy_EVENT_Z_RX_FULL              7
-
 #define        CLOSING_WAIT_DELAY      30*HZ
 #define CY_CLOSING_WAIT_NONE   65535
 #define CY_CLOSING_WAIT_INF    0