diff options
author | Harald Koerfgen <hkoerfg@web.de> | 1999-07-26 19:42:38 +0000 |
---|---|---|
committer | Harald Koerfgen <hkoerfg@web.de> | 1999-07-26 19:42:38 +0000 |
commit | 14ab59aa8aba8687dc957c2186e115ac0b8ab542 (patch) | |
tree | c2eb55db21b6b46ddd983e2d40196fa61f19b64c /drivers | |
parent | 552f7f2f262b8ea12edc36f9a260b068bd10f423 (diff) |
The remaining R3000 changes. From now on the CVS will be R3000 aware. R3000 Indigo anyone? :-)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/declance.c | 6 | ||||
-rw-r--r-- | drivers/scsi/NCR53C9x.c | 22 | ||||
-rw-r--r-- | drivers/tc/zs.c | 11 |
3 files changed, 34 insertions, 5 deletions
diff --git a/drivers/net/declance.c b/drivers/net/declance.c index b0183061c..b5c5b4f42 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c @@ -60,6 +60,7 @@ static char *lancestr = "LANCE"; #include <asm/dec/machtype.h> #include <asm/dec/tc.h> #include <asm/dec/kn01.h> +#include <asm/wbflush.h> #include <asm/addrspace.h> #include <linux/config.h> @@ -301,6 +302,7 @@ int dec_lance_debug = 2; static inline void writereg(volatile unsigned short *regptr, short value) { *regptr = value; + wbflush(); } /* Load the CSR registers */ @@ -380,6 +382,7 @@ void cp_to_buf(void *to, const void *from, __kernel_size_t len) } } + wbflush(); } void cp_from_buf(void *to, unsigned char *from, int len) @@ -515,6 +518,7 @@ static void lance_init_ring(struct device *dev) if (i < 3 && ZERO) printk("%d: 0x%8.8x(0x%8.8x)\n", i, leptr, (int) lp->rx_buf_ptr_cpu[i]); } + wbflush(); } static int init_restart_lance(struct lance_private *lp) @@ -752,6 +756,7 @@ static void lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) * re-enable LANCE DMA */ *(unsigned long *) (system_base + IOCTL + SSR) |= (1 << 16); + wbflush(); } writereg(&ll->rdp, LE_C0_STOP); @@ -1071,6 +1076,7 @@ __initfunc(static int dec_lance_init(struct device *dev, const int type)) lp->dma_ptr_reg = (unsigned long *) (system_base + IOCTL + LANCE_DMA_P); *(lp->dma_ptr_reg) = PHYSADDR(dev->mem_start) << 3; *(unsigned long *) (system_base + IOCTL + SSR) |= (1 << 16); + wbflush(); break; case PMAD_LANCE: diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c index c997cba65..875889706 100644 --- a/drivers/scsi/NCR53C9x.c +++ b/drivers/scsi/NCR53C9x.c @@ -9,6 +9,9 @@ * * Set up to use GETREG/SETREG (preprocessor macros in NCR53c9x.h) by * Tymm Twillman (tymm@coe.missouri.edu) + * + * Support for IOASIC DECstations by + * Harald Koerfgen (harald@unix-ag.org) */ /* TODO: @@ -52,6 +55,13 @@ #undef SYMBIOS_HACK #endif +#ifdef CONFIG_DECSTATION +/* IOASIC DECstations only! */ +#include <asm/wbflush.h> +#else +#define wbflush() +#endif + #include <asm/system.h> #include <asm/ptrace.h> #include <asm/pgtable.h> @@ -302,6 +312,7 @@ extern inline void esp_cmd(struct NCR_ESP *esp, struct ESP_regs *eregs, esp->espcmdent = (esp->espcmdent + 1) & 31; #endif SETREG(eregs->esp_cmnd, cmd); + wbflush(); } /* How we use the various Linux SCSI data structures for operation. @@ -442,6 +453,7 @@ static inline void esp_reset_esp(struct NCR_ESP *esp, struct ESP_regs *eregs) SETREG(eregs->esp_timeo, esp->neg_defp); esp->max_period = (esp->max_period + 3)>>2; esp->min_period = (esp->min_period + 3)>>2; + wbflush(); SETREG(eregs->esp_cfg1, esp->config1); switch(esp->erev) { @@ -492,6 +504,7 @@ static inline void esp_reset_esp(struct NCR_ESP *esp, struct ESP_regs *eregs) panic("esp: what could it be... I wonder..."); break; }; + wbflush(); /* Eat any bitrot in the chip */ trash = GETREG(eregs->esp_intrpt); @@ -515,6 +528,7 @@ inline void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs) esp_cmd(esp, eregs, ESP_CMD_RS); udelay(400); SETREG(eregs->esp_cfg1, esp->config1); + wbflush(); /* Eat any bitrot in the chip and we are done... */ trash = GETREG(eregs->esp_intrpt); @@ -655,6 +669,7 @@ void esp_initialize(struct NCR_ESP *esp) esp->config1 = (ESP_CONFIG1_PENABLE | (esp->scsi_id & 7)); esp->config2 = (ESP_CONFIG2_SCSI2ENAB | ESP_CONFIG2_REGPARITY); SETREG(eregs->esp_cfg2, esp->config2); + wbflush(); #ifndef SYMBIOS_HACK if((GETREG(eregs->esp_cfg2) & ~(ESP_CONFIG2_MAGIC)) != (ESP_CONFIG2_SCSI2ENAB | ESP_CONFIG2_REGPARITY)) { @@ -667,6 +682,7 @@ void esp_initialize(struct NCR_ESP *esp) SETREG(eregs->esp_cfg3, 0); esp->config3[0] = 5; SETREG(eregs->esp_cfg3, esp->config3[0]); + wbflush(); #ifndef SYMBIOS_HACK if(GETREG(eregs->esp_cfg3) != 5) { printk("NCR53C90A(esp100a) detected\n"); @@ -695,6 +711,7 @@ void esp_initialize(struct NCR_ESP *esp) esp->config2 = 0; SETREG(eregs->esp_cfg2, esp->config2); } + wbflush(); } #endif } @@ -1676,6 +1693,7 @@ static inline void esp_setcount(struct ESP_regs *eregs, int cnt, int hme) SETREG(eregs->fas_rlo, 0); SETREG(eregs->fas_rhi, 0); } + wbflush(); } static inline int esp_getcount(struct ESP_regs *eregs) @@ -1831,6 +1849,7 @@ static inline void esp_connect(struct NCR_ESP *esp, struct ESP_regs *eregs, SETREG(eregs->esp_busid, (sp->target & 0xf) | (ESP_BUSID_RESELID | ESP_BUSID_CTR32BIT)); esp->current_SC = sp; + wbflush(); } /* This will place the current working command back into the issue queue @@ -2951,6 +2970,7 @@ static inline int check_multibyte_msg(struct NCR_ESP *esp, } SETREG(eregs->esp_soff, SDptr->sync_min_period); SETREG(eregs->esp_stp, SDptr->sync_max_offset); + wbflush(); ESPSDTR(("soff=%2x stp=%2x cfg3=%2x\n", SDptr->sync_max_offset, @@ -2975,6 +2995,7 @@ static inline int check_multibyte_msg(struct NCR_ESP *esp, esp->config3[SCptr->target] &= ~bit; SETREG(eregs->esp_cfg3, esp->config3[SCptr->target]); + wbflush(); } } @@ -3025,6 +3046,7 @@ static inline int check_multibyte_msg(struct NCR_ESP *esp, esp->config3[SCptr->target] &= ~(ESP_CONFIG3_EWIDE); } SETREG(eregs->esp_cfg3, esp->config3[SCptr->target]); + wbflush(); /* Regardless, next try for sync transfers. */ build_sync_nego_msg(esp, esp->sync_defp, 15); diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index 84111ee1a..667387bc8 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c @@ -42,6 +42,7 @@ #include <asm/segment.h> #include <asm/bitops.h> #include <asm/uaccess.h> +#include <asm/wbflush.h> #include <asm/dec/interrupts.h> #include <asm/dec/machtype.h> #include <asm/dec/tc.h> @@ -195,7 +196,7 @@ static inline unsigned char read_zsreg(struct dec_zschannel *channel, if (reg != 0) { *channel->control = reg & 0xf; - RECOVERY_DELAY; + wbflush(); RECOVERY_DELAY; } retval = *channel->control; RECOVERY_DELAY; @@ -207,10 +208,10 @@ static inline void write_zsreg(struct dec_zschannel *channel, { if (reg != 0) { *channel->control = reg & 0xf; - RECOVERY_DELAY; + wbflush(); RECOVERY_DELAY; } *channel->control = value; - RECOVERY_DELAY; + wbflush(); RECOVERY_DELAY; return; } @@ -227,7 +228,7 @@ static inline void write_zsdata(struct dec_zschannel *channel, unsigned char value) { *channel->data = value; - RECOVERY_DELAY; + wbflush(); RECOVERY_DELAY; return; } @@ -1829,7 +1830,7 @@ zs_console_putchar(struct dec_serial *info, char ch) while (!(*(info->zs_channel->control) & Tx_BUF_EMP) && --loops) RECOVERY_DELAY; *(info->zs_channel->data) = ch; - RECOVERY_DELAY; + wbflush(); RECOVERY_DELAY; restore_flags(flags); } |