2 * Copyright (C) Eicon Technology Corporation, 2000.
4 * Eicon File Revision : 1.10
6 * This software may be used and distributed according to the terms
7 * of the GNU General Public License, incorporated herein by reference.
11 #include <linux/sched.h>
13 #include <linux/tqueue.h>
15 #include <linux/smp.h>
17 #include <linux/interrupt.h>
18 #include <linux/ioport.h>
27 int Divas4BRIInitPCI(card_t *card, dia_card_t *cfg)
29 /* Use UxPciConfigWrite routines to initialise PCI config space */
31 /* wPCIcommand = 0x03;
32 cm_write_devconfig16(CMKey, PCI_COMMAND, &wPCIcommand);
35 cm_write_devconfig16(CMKey, PCI_STATUS, &wPCIcommand);
38 cm_write_devconfig16(CMKey, PCI_STATUS, &wPCIcommand);
43 int DivasPRIInitPCI(card_t *card, dia_card_t *cfg)
45 /* Use UxPciConfigWrite routines to initialise PCI config space */
47 /* wPCIcommand = 0x03;
48 cm_write_devconfig16(CMKey, PCI_COMMAND, &wPCIcommand);
51 cm_write_devconfig16(CMKey, PCI_STATUS, &wPCIcommand);
54 cm_write_devconfig8(CMKey, PCI_LATENCY, &bPCIcommand);*/
59 int DivasBRIInitPCI(card_t *card, dia_card_t *cfg)
61 /* Need to set these platform dependent values after patching */
63 card->hw->reset_base = card->cfg.reset_base;
64 card->hw->io_base = card->cfg.io_base;
66 request_region(card->hw->reset_base,0x80,"Divas");
67 request_region(card->hw->io_base,0x20,"Divas");
71 return DivasPRIInitPCI(card, cfg);
74 /* ######################### Stubs of routines that are not done yet ################## */
75 /*void DivasLogIdi(card_t *card, ENTITY *e, int request)
80 int DivasDpcSchedule(void)
82 static struct tq_struct DivasTask;
84 DivasTask.routine = DivasDoDpc;
85 DivasTask.data = (void *) 0;
87 queue_task(&DivasTask, &tq_immediate);
88 mark_bh(IMMEDIATE_BH);
93 int DivasScheduleRequestDpc(void)
95 static struct tq_struct DivasTask;
97 DivasTask.routine = DivasDoRequestDpc;
98 DivasTask.data = (void *) 0;
100 queue_task(&DivasTask, &tq_immediate);
101 mark_bh(IMMEDIATE_BH);
106 void DivasLogAdd(void *buffer, int length)
109 boolean_t overflow = FALSE;
111 boolean_t busy = FALSE;
113 /* make sure we're not interrupting ourselves */
117 printk(KERN_DEBUG "Divas: Logging interrupting self !\n");
122 /* ignore call if daemon isn't running and we've reached limit */
124 if (DivasLogFifoFull())
128 printk(KERN_DEBUG "Divas: Trace buffer full\n");
135 DivasLogFifoWrite(buffer, length);
141 /* #################################################################################### */