-void cf_outb(unsigned char val, volatile unsigned char *addr)
-{
- /*
- * Set PF1 PF0 respectively to 0 1 to divert address
- * to the expansion memory banks
- */
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- *(addr) = val;
- SSYNC();
-
- /* Setback PF1 PF0 to 0 0 to address external
- * memory banks */
- *(volatile unsigned short *)pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();
-}
-
-unsigned char cf_inb(volatile unsigned char *addr)
-{
- volatile unsigned char c;
-
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- c = *(addr);
- SSYNC();
-
- *pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();
-
- return c;
-}
-
-void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words)
-{
- int i;
-
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- for (i = 0; i < words; i++) {
- *(sect_buf + i) = *(addr);
- SSYNC();
- }
-
- *pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();
-}
-
-void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
-{
- int i;
-
- *pFIO_FLAG_S = CF_PF0;
- *pFIO_FLAG_C = CF_PF1;
- SSYNC();
-
- for (i = 0; i < words; i++) {
- *(addr) = *(sect_buf + i);
- SSYNC();
- }
-
- *pFIO_FLAG_C = CF_PF1_PF0;
- SSYNC();