1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28#ifndef _SMC91111_H_
29#define _SMC91111_H_
30
31#include <asm/types.h>
32#include <config.h>
33
34
35
36
37
38
39void smc_set_mac_addr (const unsigned char *addr);
40
41
42
43
44typedef unsigned char byte;
45typedef unsigned short word;
46typedef unsigned long int dword;
47
48struct smc91111_priv{
49 u8 dev_num;
50};
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66#define SMC_IO_EXTENT 16
67
68#ifdef CONFIG_CPU_PXA25X
69
70#ifdef CONFIG_XSENGINE
71#define SMC_inl(a,r) (*((volatile dword *)((a)->iobase+((r)<<1))))
72#define SMC_inw(a,r) (*((volatile word *)((a)->iobase+((r)<<1))))
73#define SMC_inb(a,p) ({ \
74 unsigned int __p = (unsigned int)((a)->iobase + ((p)<<1)); \
75 unsigned int __v = *(volatile unsigned short *)((__p) & ~2); \
76 if (__p & 2) __v >>= 8; \
77 else __v &= 0xff; \
78 __v; })
79#else
80#define SMC_inl(a,r) (*((volatile dword *)((a)->iobase+(r))))
81#define SMC_inw(a,r) (*((volatile word *)((a)->iobase+(r))))
82#define SMC_inb(a,p) ({ \
83 unsigned int __p = (unsigned int)((a)->iobase + (p)); \
84 unsigned int __v = *(volatile unsigned short *)((__p) & ~1); \
85 if (__p & 1) __v >>= 8; \
86 else __v &= 0xff; \
87 __v; })
88#endif
89
90#ifdef CONFIG_XSENGINE
91#define SMC_outl(a,d,r) (*((volatile dword *)((a)->iobase+(r<<1))) = d)
92#define SMC_outw(a,d,r) (*((volatile word *)((a)->iobase+(r<<1))) = d)
93#else
94#define SMC_outl(a,d,r) (*((volatile dword *)((a)->iobase+(r))) = d)
95#define SMC_outw(a,d,r) (*((volatile word *)((a)->iobase+(r))) = d)
96#endif
97
98#define SMC_outb(a,d,r) ({ word __d = (byte)(d); \
99 word __w = SMC_inw((a),(r)&~1); \
100 __w &= ((r)&1) ? 0x00FF : 0xFF00; \
101 __w |= ((r)&1) ? __d<<8 : __d; \
102 SMC_outw((a),__w,(r)&~1); \
103 })
104
105#define SMC_outsl(a,r,b,l) ({ int __i; \
106 dword *__b2; \
107 __b2 = (dword *) b; \
108 for (__i = 0; __i < l; __i++) { \
109 SMC_outl((a), *(__b2 + __i), r); \
110 } \
111 })
112
113#define SMC_outsw(a,r,b,l) ({ int __i; \
114 word *__b2; \
115 __b2 = (word *) b; \
116 for (__i = 0; __i < l; __i++) { \
117 SMC_outw((a), *(__b2 + __i), r); \
118 } \
119 })
120
121#define SMC_insl(a,r,b,l) ({ int __i ; \
122 dword *__b2; \
123 __b2 = (dword *) b; \
124 for (__i = 0; __i < l; __i++) { \
125 *(__b2 + __i) = SMC_inl((a),(r)); \
126 SMC_inl((a),0); \
127 }; \
128 })
129
130#define SMC_insw(a,r,b,l) ({ int __i ; \
131 word *__b2; \
132 __b2 = (word *) b; \
133 for (__i = 0; __i < l; __i++) { \
134 *(__b2 + __i) = SMC_inw((a),(r)); \
135 SMC_inw((a),0); \
136 }; \
137 })
138
139#define SMC_insb(a,r,b,l) ({ int __i ; \
140 byte *__b2; \
141 __b2 = (byte *) b; \
142 for (__i = 0; __i < l; __i++) { \
143 *(__b2 + __i) = SMC_inb((a),(r)); \
144 SMC_inb((a),0); \
145 }; \
146 })
147
148#elif defined(CONFIG_LEON)
149
150#define SMC_LEON_SWAP16(_x_) ({ word _x = (_x_); ((_x << 8) | (_x >> 8)); })
151
152#define SMC_LEON_SWAP32(_x_) \
153 ({ dword _x = (_x_); \
154 ((_x << 24) | \
155 ((0x0000FF00UL & _x) << 8) | \
156 ((0x00FF0000UL & _x) >> 8) | \
157 (_x >> 24)); })
158
159#define SMC_inl(a,r) (SMC_LEON_SWAP32((*(volatile dword *)((a)->iobase+((r)<<0)))))
160#define SMC_inl_nosw(a,r) ((*(volatile dword *)((a)->iobase+((r)<<0))))
161#define SMC_inw(a,r) (SMC_LEON_SWAP16((*(volatile word *)((a)->iobase+((r)<<0)))))
162#define SMC_inw_nosw(a,r) ((*(volatile word *)((a)->iobase+((r)<<0))))
163#define SMC_inb(a,p) ({ \
164 word ___v = SMC_inw((a),(p) & ~1); \
165 if ((p) & 1) ___v >>= 8; \
166 else ___v &= 0xff; \
167 ___v; })
168
169#define SMC_outl(a,d,r) (*(volatile dword *)((a)->iobase+((r)<<0))=SMC_LEON_SWAP32(d))
170#define SMC_outl_nosw(a,d,r) (*(volatile dword *)((a)->iobase+((r)<<0))=(d))
171#define SMC_outw(a,d,r) (*(volatile word *)((a)->iobase+((r)<<0))=SMC_LEON_SWAP16(d))
172#define SMC_outw_nosw(a,d,r) (*(volatile word *)((a)->iobase+((r)<<0))=(d))
173#define SMC_outb(a,d,r) do{ word __d = (byte)(d); \
174 word __w = SMC_inw((a),(r)&~1); \
175 __w &= ((r)&1) ? 0x00FF : 0xFF00; \
176 __w |= ((r)&1) ? __d<<8 : __d; \
177 SMC_outw((a),__w,(r)&~1); \
178 }while(0)
179#define SMC_outsl(a,r,b,l) do{ int __i; \
180 dword *__b2; \
181 __b2 = (dword *) b; \
182 for (__i = 0; __i < l; __i++) { \
183 SMC_outl_nosw((a), *(__b2 + __i), r); \
184 } \
185 }while(0)
186#define SMC_outsw(a,r,b,l) do{ int __i; \
187 word *__b2; \
188 __b2 = (word *) b; \
189 for (__i = 0; __i < l; __i++) { \
190 SMC_outw_nosw((a), *(__b2 + __i), r); \
191 } \
192 }while(0)
193#define SMC_insl(a,r,b,l) do{ int __i ; \
194 dword *__b2; \
195 __b2 = (dword *) b; \
196 for (__i = 0; __i < l; __i++) { \
197 *(__b2 + __i) = SMC_inl_nosw((a),(r)); \
198 }; \
199 }while(0)
200
201#define SMC_insw(a,r,b,l) do{ int __i ; \
202 word *__b2; \
203 __b2 = (word *) b; \
204 for (__i = 0; __i < l; __i++) { \
205 *(__b2 + __i) = SMC_inw_nosw((a),(r)); \
206 }; \
207 }while(0)
208
209#define SMC_insb(a,r,b,l) do{ int __i ; \
210 byte *__b2; \
211 __b2 = (byte *) b; \
212 for (__i = 0; __i < l; __i++) { \
213 *(__b2 + __i) = SMC_inb((a),(r)); \
214 }; \
215 }while(0)
216#elif defined(CONFIG_MS7206SE)
217#define SWAB7206(x) ({ word __x = x; ((__x << 8)|(__x >> 8)); })
218#define SMC_inw(a, r) *((volatile word*)((a)->iobase + (r)))
219#define SMC_inb(a, r) (*((volatile byte*)((a)->iobase + ((r) ^ 0x01))))
220#define SMC_insw(a, r, b, l) \
221 do { \
222 int __i; \
223 word *__b2 = (word *)(b); \
224 for (__i = 0; __i < (l); __i++) { \
225 *__b2++ = SWAB7206(SMC_inw(a, r)); \
226 } \
227 } while (0)
228#define SMC_outw(a, d, r) (*((volatile word *)((a)->iobase+(r))) = d)
229#define SMC_outb(a, d, r) ({ word __d = (byte)(d); \
230 word __w = SMC_inw((a), ((r)&(~1))); \
231 if (((r) & 1)) \
232 __w = (__w & 0x00ff) | (__d << 8); \
233 else \
234 __w = (__w & 0xff00) | (__d); \
235 SMC_outw((a), __w, ((r)&(~1))); \
236 })
237#define SMC_outsw(a, r, b, l) \
238 do { \
239 int __i; \
240 word *__b2 = (word *)(b); \
241 for (__i = 0; __i < (l); __i++) { \
242 SMC_outw(a, SWAB7206(*__b2), r); \
243 __b2++; \
244 } \
245 } while (0)
246#else
247
248#ifndef CONFIG_SMC_USE_IOFUNCS
249
250
251
252
253#ifdef CONFIG_ADNPESC1
254#define SMC_inw(a,r) (*((volatile word *)((a)->iobase+((r)<<1))))
255#elif CONFIG_ARM64
256#define SMC_inw(a, r) (*((volatile word*)((a)->iobase+((dword)(r)))))
257#else
258#define SMC_inw(a, r) (*((volatile word*)((a)->iobase+(r))))
259#endif
260#define SMC_inb(a,r) (((r)&1) ? SMC_inw((a),(r)&~1)>>8 : SMC_inw((a),(r)&0xFF))
261
262#ifdef CONFIG_ADNPESC1
263#define SMC_outw(a,d,r) (*((volatile word *)((a)->iobase+((r)<<1))) = d)
264#elif CONFIG_ARM64
265#define SMC_outw(a, d, r) \
266 (*((volatile word*)((a)->iobase+((dword)(r)))) = d)
267#else
268#define SMC_outw(a, d, r) \
269 (*((volatile word*)((a)->iobase+(r))) = d)
270#endif
271#define SMC_outb(a,d,r) ({ word __d = (byte)(d); \
272 word __w = SMC_inw((a),(r)&~1); \
273 __w &= ((r)&1) ? 0x00FF : 0xFF00; \
274 __w |= ((r)&1) ? __d<<8 : __d; \
275 SMC_outw((a),__w,(r)&~1); \
276 })
277#if 0
278#define SMC_outsw(a,r,b,l) outsw((a)->iobase+(r), (b), (l))
279#else
280#define SMC_outsw(a,r,b,l) ({ int __i; \
281 word *__b2; \
282 __b2 = (word *) b; \
283 for (__i = 0; __i < l; __i++) { \
284 SMC_outw((a), *(__b2 + __i), r); \
285 } \
286 })
287#endif
288
289#if 0
290#define SMC_insw(a,r,b,l) insw((a)->iobase+(r), (b), (l))
291#else
292#define SMC_insw(a,r,b,l) ({ int __i ; \
293 word *__b2; \
294 __b2 = (word *) b; \
295 for (__i = 0; __i < l; __i++) { \
296 *(__b2 + __i) = SMC_inw((a),(r)); \
297 SMC_inw((a),0); \
298 }; \
299 })
300#endif
301
302#endif
303
304#if defined(CONFIG_SMC_USE_32_BIT)
305
306#ifdef CONFIG_XSENGINE
307#define SMC_inl(a,r) (*((volatile dword *)((a)->iobase+(r<<1))))
308#else
309#define SMC_inl(a,r) (*((volatile dword *)((a)->iobase+(r))))
310#endif
311
312#define SMC_insl(a,r,b,l) ({ int __i ; \
313 dword *__b2; \
314 __b2 = (dword *) b; \
315 for (__i = 0; __i < l; __i++) { \
316 *(__b2 + __i) = SMC_inl((a),(r)); \
317 SMC_inl((a),0); \
318 }; \
319 })
320
321#ifdef CONFIG_XSENGINE
322#define SMC_outl(a,d,r) (*((volatile dword *)((a)->iobase+(r<<1))) = d)
323#else
324#define SMC_outl(a,d,r) (*((volatile dword *)((a)->iobase+(r))) = d)
325#endif
326#define SMC_outsl(a,r,b,l) ({ int __i; \
327 dword *__b2; \
328 __b2 = (dword *) b; \
329 for (__i = 0; __i < l; __i++) { \
330 SMC_outl((a), *(__b2 + __i), r); \
331 } \
332 })
333
334#endif
335
336#endif
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358#define BANK_SELECT 14
359
360
361
362#define TCR_REG 0x0000
363#define TCR_ENABLE 0x0001
364#define TCR_LOOP 0x0002
365#define TCR_FORCOL 0x0004
366#define TCR_PAD_EN 0x0080
367#define TCR_NOCRC 0x0100
368#define TCR_MON_CSN 0x0400
369#define TCR_FDUPLX 0x0800
370#define TCR_STP_SQET 0x1000
371#define TCR_EPH_LOOP 0x2000
372#define TCR_SWFDUP 0x8000
373
374#define TCR_CLEAR 0
375
376
377#define TCR_DEFAULT TCR_ENABLE
378
379
380
381
382#define EPH_STATUS_REG 0x0002
383#define ES_TX_SUC 0x0001
384#define ES_SNGL_COL 0x0002
385#define ES_MUL_COL 0x0004
386#define ES_LTX_MULT 0x0008
387#define ES_16COL 0x0010
388#define ES_SQET 0x0020
389#define ES_LTXBRD 0x0040
390#define ES_TXDEFR 0x0080
391#define ES_LATCOL 0x0200
392#define ES_LOSTCARR 0x0400
393#define ES_EXC_DEF 0x0800
394#define ES_CTR_ROL 0x1000
395#define ES_LINK_OK 0x4000
396#define ES_TXUNRN 0x8000
397
398
399
400
401#define RCR_REG 0x0004
402#define RCR_RX_ABORT 0x0001
403#define RCR_PRMS 0x0002
404#define RCR_ALMUL 0x0004
405#define RCR_RXEN 0x0100
406#define RCR_STRIP_CRC 0x0200
407#define RCR_ABORT_ENB 0x0200
408#define RCR_FILT_CAR 0x0400
409#define RCR_SOFTRST 0x8000
410
411
412#define RCR_DEFAULT (RCR_STRIP_CRC | RCR_RXEN)
413#define RCR_CLEAR 0x0
414
415
416
417#define COUNTER_REG 0x0006
418
419
420
421#define MIR_REG 0x0008
422
423
424
425#define RPC_REG 0x000A
426#define RPC_SPEED 0x2000
427#define RPC_DPLX 0x1000
428#define RPC_ANEG 0x0800
429#define RPC_LSXA_SHFT 5
430#define RPC_LSXB_SHFT 2
431#define RPC_LED_100_10 (0x00)
432#define RPC_LED_RES (0x01)
433#define RPC_LED_10 (0x02)
434#define RPC_LED_FD (0x03)
435#define RPC_LED_TX_RX (0x04)
436#define RPC_LED_100 (0x05)
437#define RPC_LED_TX (0x06)
438#define RPC_LED_RX (0x07)
439#if defined(CONFIG_DK1C20) || defined(CONFIG_DK1S10)
440
441#define RPC_DEFAULT ( RPC_SPEED | RPC_DPLX | RPC_ANEG \
442 | (RPC_LED_TX_RX << RPC_LSXA_SHFT) \
443 | (RPC_LED_100_10 << RPC_LSXB_SHFT) )
444#elif defined(CONFIG_ADNPESC1)
445
446#define RPC_DEFAULT ( RPC_SPEED | RPC_DPLX | RPC_ANEG \
447 | (RPC_LED_TX_RX << RPC_LSXA_SHFT) \
448 | (RPC_LED_100_10 << RPC_LSXB_SHFT) )
449#else
450
451#define RPC_DEFAULT ( RPC_SPEED | RPC_DPLX | RPC_ANEG \
452 | (RPC_LED_100_10 << RPC_LSXA_SHFT) \
453 | (RPC_LED_TX_RX << RPC_LSXB_SHFT) )
454#endif
455
456
457
458
459
460#define BSR_REG 0x000E
461
462
463
464
465#define CONFIG_REG 0x0000
466#define CONFIG_EXT_PHY 0x0200
467#define CONFIG_GPCNTRL 0x0400
468#define CONFIG_NO_WAIT 0x1000
469#define CONFIG_EPH_POWER_EN 0x8000
470
471
472#define CONFIG_DEFAULT (CONFIG_EPH_POWER_EN)
473
474
475
476
477#define BASE_REG 0x0002
478
479
480
481
482#define ADDR0_REG 0x0004
483#define ADDR1_REG 0x0006
484#define ADDR2_REG 0x0008
485
486
487
488
489#define GP_REG 0x000A
490
491
492
493
494#define CTL_REG 0x000C
495#define CTL_RCV_BAD 0x4000
496#define CTL_AUTO_RELEASE 0x0800
497#define CTL_LE_ENABLE 0x0080
498#define CTL_CR_ENABLE 0x0040
499#define CTL_TE_ENABLE 0x0020
500#define CTL_EEPROM_SELECT 0x0004
501#define CTL_RELOAD 0x0002
502#define CTL_STORE 0x0001
503#define CTL_DEFAULT (0x1A10)
504
505
506
507#define MMU_CMD_REG 0x0000
508#define MC_BUSY 1
509#define MC_NOP (0<<5)
510#define MC_ALLOC (1<<5)
511#define MC_RESET (2<<5)
512#define MC_REMOVE (3<<5)
513#define MC_RELEASE (4<<5)
514#define MC_FREEPKT (5<<5)
515#define MC_ENQUEUE (6<<5)
516#define MC_RSTTXFIFO (7<<5)
517
518
519
520
521#define PN_REG 0x0002
522
523
524
525
526#define AR_REG 0x0003
527#define AR_FAILED 0x80
528
529
530
531
532#define RXFIFO_REG 0x0004
533#define RXFIFO_REMPTY 0x8000
534
535
536
537
538#define TXFIFO_REG RXFIFO_REG
539#define TXFIFO_TEMPTY 0x80
540
541
542
543
544#define PTR_REG 0x0006
545#define PTR_RCV 0x8000
546#define PTR_AUTOINC 0x4000
547#define PTR_READ 0x2000
548#define PTR_NOTEMPTY 0x0800
549
550
551
552
553#define SMC91111_DATA_REG 0x0008
554
555
556
557
558#define SMC91111_INT_REG 0x000C
559
560
561
562
563#define IM_REG 0x000D
564#define IM_MDINT 0x80
565#define IM_ERCV_INT 0x40
566#define IM_EPH_INT 0x20
567#define IM_RX_OVRN_INT 0x10
568#define IM_ALLOC_INT 0x08
569#define IM_TX_EMPTY_INT 0x04
570#define IM_TX_INT 0x02
571#define IM_RCV_INT 0x01
572
573
574
575
576#define MCAST_REG1 0x0000
577#define MCAST_REG2 0x0002
578#define MCAST_REG3 0x0004
579#define MCAST_REG4 0x0006
580
581
582
583
584#define MII_REG 0x0008
585#define MII_MSK_CRS100 0x4000
586#define MII_MDOE 0x0008
587#define MII_MCLK 0x0004
588#define MII_MDI 0x0002
589#define MII_MDO 0x0001
590
591
592
593
594#define REV_REG 0x000A
595
596
597
598
599
600#define ERCV_REG 0x000C
601#define ERCV_RCV_DISCRD 0x0080
602#define ERCV_THRESHOLD 0x001F
603
604
605
606#define EXT_REG 0x0000
607
608
609#define CHIP_9192 3
610#define CHIP_9194 4
611#define CHIP_9195 5
612#define CHIP_9196 6
613#define CHIP_91100 7
614#define CHIP_91100FD 8
615#define CHIP_91111FD 9
616
617#if 0
618static const char * chip_ids[ 15 ] = {
619 NULL, NULL, NULL,
620 "SMC91C90/91C92",
621 "SMC91C94",
622 "SMC91C95",
623 "SMC91C96",
624 "SMC91C100",
625 "SMC91C100FD",
626 "SMC91C111",
627 NULL, NULL,
628 NULL, NULL, NULL};
629#endif
630
631
632
633
634#define TS_SUCCESS 0x0001
635#define TS_LOSTCAR 0x0400
636#define TS_LATCOL 0x0200
637#define TS_16COL 0x0010
638
639
640
641
642#define RS_ALGNERR 0x8000
643#define RS_BRODCAST 0x4000
644#define RS_BADCRC 0x2000
645#define RS_ODDFRAME 0x1000
646#define RS_TOOLONG 0x0800
647#define RS_TOOSHORT 0x0400
648#define RS_MULTICAST 0x0001
649#define RS_ERRORS (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT)
650
651
652
653enum {
654 PHY_LAN83C183 = 1,
655 PHY_LAN83C180
656};
657
658
659
660
661
662#define PHY_CNTL_REG 0x00
663#define PHY_CNTL_RST 0x8000
664#define PHY_CNTL_LPBK 0x4000
665#define PHY_CNTL_SPEED 0x2000
666#define PHY_CNTL_ANEG_EN 0x1000
667#define PHY_CNTL_PDN 0x0800
668#define PHY_CNTL_MII_DIS 0x0400
669#define PHY_CNTL_ANEG_RST 0x0200
670#define PHY_CNTL_DPLX 0x0100
671#define PHY_CNTL_COLTST 0x0080
672
673
674#define PHY_STAT_REG 0x01
675#define PHY_STAT_CAP_T4 0x8000
676#define PHY_STAT_CAP_TXF 0x4000
677#define PHY_STAT_CAP_TXH 0x2000
678#define PHY_STAT_CAP_TF 0x1000
679#define PHY_STAT_CAP_TH 0x0800
680#define PHY_STAT_CAP_SUPR 0x0040
681#define PHY_STAT_ANEG_ACK 0x0020
682#define PHY_STAT_REM_FLT 0x0010
683#define PHY_STAT_CAP_ANEG 0x0008
684#define PHY_STAT_LINK 0x0004
685#define PHY_STAT_JAB 0x0002
686#define PHY_STAT_EXREG 0x0001
687
688
689#define PHY_ID1_REG 0x02
690#define PHY_ID2_REG 0x03
691
692
693#define PHY_AD_REG 0x04
694#define PHY_AD_NP 0x8000
695#define PHY_AD_ACK 0x4000
696#define PHY_AD_RF 0x2000
697#define PHY_AD_T4 0x0200
698#define PHY_AD_TX_FDX 0x0100
699#define PHY_AD_TX_HDX 0x0080
700#define PHY_AD_10_FDX 0x0040
701#define PHY_AD_10_HDX 0x0020
702#define PHY_AD_CSMA 0x0001
703
704
705#define PHY_RMT_REG 0x05
706
707
708
709#define PHY_CFG1_REG 0x10
710#define PHY_CFG1_LNKDIS 0x8000
711#define PHY_CFG1_XMTDIS 0x4000
712#define PHY_CFG1_XMTPDN 0x2000
713#define PHY_CFG1_BYPSCR 0x0400
714#define PHY_CFG1_UNSCDS 0x0200
715#define PHY_CFG1_EQLZR 0x0100
716#define PHY_CFG1_CABLE 0x0080
717#define PHY_CFG1_RLVL0 0x0040
718#define PHY_CFG1_TLVL_SHIFT 2
719#define PHY_CFG1_TLVL_MASK 0x003C
720#define PHY_CFG1_TRF_MASK 0x0003
721
722
723
724#define PHY_CFG2_REG 0x11
725#define PHY_CFG2_APOLDIS 0x0020
726#define PHY_CFG2_JABDIS 0x0010
727#define PHY_CFG2_MREG 0x0008
728#define PHY_CFG2_INTMDIO 0x0004
729
730
731#define PHY_INT_REG 0x12
732#define PHY_INT_INT 0x8000
733#define PHY_INT_LNKFAIL 0x4000
734#define PHY_INT_LOSSSYNC 0x2000
735#define PHY_INT_CWRD 0x1000
736#define PHY_INT_SSD 0x0800
737#define PHY_INT_ESD 0x0400
738#define PHY_INT_RPOL 0x0200
739#define PHY_INT_JAB 0x0100
740#define PHY_INT_SPDDET 0x0080
741#define PHY_INT_DPLXDET 0x0040
742
743
744#define PHY_MASK_REG 0x13
745
746
747
748
749
750
751
752
753
754
755#define SMC_SELECT_BANK(a,x) { SMC_outw((a), (x), BANK_SELECT ); }
756
757
758#define SMC_ENABLE_INT(a,x) {\
759 unsigned char mask;\
760 SMC_SELECT_BANK((a),2);\
761 mask = SMC_inb((a), IM_REG );\
762 mask |= (x);\
763 SMC_outb( (a), mask, IM_REG ); \
764}
765
766
767
768#define SMC_DISABLE_INT(a,x) {\
769 unsigned char mask;\
770 SMC_SELECT_BANK(2);\
771 mask = SMC_inb( (a), IM_REG );\
772 mask &= ~(x);\
773 SMC_outb( (a), mask, IM_REG ); \
774}
775
776
777
778
779
780
781
782
783
784
785#define SMC_INTERRUPT_MASK (IM_EPH_INT | IM_RX_OVRN_INT | IM_RCV_INT | \
786 IM_MDINT)
787
788#endif
789