[parisc-linux-cvs] 2.4.16-pa11 diff
Thomas Bogendoerfer
tsbogend@alpha.franken.de
Tue, 4 Dec 2001 00:18:12 +0100
Endian fixes to complete read/write endian change.
Index: 53c700.h
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/scsi/53c700.h,v
retrieving revision 1.1
diff -u -r1.1 53c700.h
--- 53c700.h 2001/10/08 21:46:02 1.1
+++ 53c700.h 2001/12/03 21:23:43
@@ -503,7 +503,7 @@
static inline __u32
NCR_700_readl(struct Scsi_Host *host, __u32 reg)
{
- __u32 value = readl(host->base + reg);
+ __u32 value = __raw_readl(host->base + reg);
const struct NCR_700_Host_Parameters *hostdata __attribute__((unused))
= (struct NCR_700_Host_Parameters *)host->hostdata[0];
#if 1
@@ -536,7 +536,7 @@
BUG();
#endif
- writel(bS_to_host(value), host->base + reg);
+ __raw_writel(bS_to_host(value), host->base + reg);
}
#elif defined(CONFIG_53C700_IO_MAPPED)
static inline __u8
Index: sticore.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticore.c,v
retrieving revision 1.28
diff -u -r1.28 sticore.c
--- sticore.c 2001/11/29 20:18:00 1.28
+++ sticore.c 2001/12/03 21:26:46
@@ -26,7 +26,6 @@
#include <video/font.h>
#include <asm/pgalloc.h>
-#include <asm/gsc.h>
#include <asm/hardware.h>
#include "sticore.h"
@@ -226,13 +225,13 @@
/* this still needs to be revisited (see arch/parisc/mm/init.c:246) ! */
while (count >= 4) {
count -= 4;
- *(u32 *)dest = gsc_readl(base);
+ *(u32 *)dest = __raw_readl(base);
base += 4;
dest += 4;
}
while (count) {
count--;
- *(u8 *)dest = gsc_readb(base);
+ *(u8 *)dest = __raw_readb(base);
base++;
dest++;
}
@@ -633,7 +632,7 @@
while (count) {
count--;
- *(u8 *)dest = gsc_readl(base);
+ *(u8 *)dest = __raw_readl(base);
base += 4;
dest++;
}
@@ -683,7 +682,7 @@
unsigned long size;
/* read the ROM size directly from the struct in ROM */
- size = gsc_readl(address + offsetof(struct sti_rom,last_addr));
+ size = __raw_readl(address + offsetof(struct sti_rom,last_addr));
raw = kmalloc(size, GFP_KERNEL);
if(raw)
@@ -786,13 +785,13 @@
if (pdc_add_valid(address))
goto out_err;
- sig = gsc_readl(address);
+ sig = __raw_readl(address);
/* check for a PCI ROM structure */
if ((le32_to_cpu(sig)==0xaa55)) {
unsigned int i, rm_offset;
u32 *rm;
- i = gsc_readl(address+0x04);
+ i = __raw_readl(address+0x04);
if (i != 1) {
/* FIXME: The ROM could have multiple architecture
* dependend images (e.g. iA32, parisc,...) */
@@ -804,17 +803,17 @@
sti->pd = pd;
- i = gsc_readl(address+0x0c);
+ i = __raw_readl(address+0x0c);
DPRINTK(("PCI ROM size (from header) = %d kB\n",
le16_to_cpu(i>>16)*512/1024));
rm_offset = le16_to_cpu(i & 0xffff);
if (rm_offset) {
/* read 16 bytes from the pci region mapper array */
rm = (u32*) &sti->rm_entry;
- *rm++ = gsc_readl(address+rm_offset+0x00);
- *rm++ = gsc_readl(address+rm_offset+0x04);
- *rm++ = gsc_readl(address+rm_offset+0x08);
- *rm++ = gsc_readl(address+rm_offset+0x0c);
+ *rm++ = __raw_readl(address+rm_offset+0x00);
+ *rm++ = __raw_readl(address+rm_offset+0x04);
+ *rm++ = __raw_readl(address+rm_offset+0x08);
+ *rm++ = __raw_readl(address+rm_offset+0x0c);
DPRINTK(("PCI region Mapper offset = %08x: ",
rm_offset));
for (i=0; i<16; i++)
@@ -822,7 +821,7 @@
DPRINTK(("\n"));
}
- address += le32_to_cpu(gsc_readl(address+8));
+ address += le32_to_cpu(__raw_readl(address+8));
printk("sig %04x, PCI STI ROM at %08lx\n",
sig, address);
goto test_rom;
@@ -923,7 +922,7 @@
printk("Trying PCI STI ROM at %08lx, PCI hpa at %08lx\n",
rom_base, fb_base);
-#if 1
+#if 0
/* FIXME: */
printk("I'm not trying to set up the PCI graphic card now... It would freeze your machine\n");
sti = NULL;
Index: stifb.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/stifb.c,v
retrieving revision 1.24
diff -u -r1.24 stifb.c
--- stifb.c 2001/11/03 23:06:00 1.24
+++ stifb.c 2001/12/03 21:24:56
@@ -72,7 +72,6 @@
#include <video/fbcon-cfb32.h>
#include <asm/grfioctl.h> /* for HP-UX compatibility */
-#include <asm/gsc.h> /* for gsc_readb */
#include "sticore.h"
@@ -165,10 +164,10 @@
#define REG_44 0x210030
#define REG_45 0x210034
-#define READ_BYTE(fb,reg) readb((fb)->fix.mmio_start + (reg))
-#define READ_WORD(fb,reg) readl((fb)->fix.mmio_start + (reg))
-#define WRITE_BYTE(value,fb,reg) writeb((value),(fb)->fix.mmio_start + (reg))
-#define WRITE_WORD(value,fb,reg) writel((value),(fb)->fix.mmio_start + (reg))
+#define READ_BYTE(fb,reg) __raw_readb((fb)->fix.mmio_start + (reg))
+#define READ_WORD(fb,reg) __raw_readl((fb)->fix.mmio_start + (reg))
+#define WRITE_BYTE(value,fb,reg) __raw_writeb((value),(fb)->fix.mmio_start + (reg))
+#define WRITE_WORD(value,fb,reg) __raw_writel((value),(fb)->fix.mmio_start + (reg))
#define ENABLE 1 /* for enabling/disabling screen */
#define DISABLE 0
@@ -1280,7 +1279,7 @@
sti_rom_address = fb->sti->regions_phys[0];
else
sti_rom_address = fb->sti->regions_phys[1];
- fb->deviceSpecificConfig = gsc_readl(sti_rom_address);
+ fb->deviceSpecificConfig = __raw_readl(sti_rom_address);
if (IS_24_DEVICE(fb)) {
if (force_bpp == 8 || force_bpp == 32)
bpp = force_bpp;
Index: fbcon.h
===================================================================
RCS file: /home/cvs/parisc/linux/include/video/fbcon.h,v
retrieving revision 1.10
diff -u -r1.10 fbcon.h
--- fbcon.h 2001/11/09 23:37:17 1.10
+++ fbcon.h 2001/12/03 22:31:38
@@ -206,18 +206,8 @@
#define fb_writel sbus_writel
#define fb_memset sbus_memset_io
-#elif defined(__hppa__)
-
-/* This is generic. Why isn't it the defaut? */
-#define fb_readb readb
-#define fb_readw readw
-#define fb_readl readl
-#define fb_writeb writeb
-#define fb_writew writew
-#define fb_writel writel
-#define fb_memset memset_io
-
-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__)
+#elif defined(__i386__) || defined(__alpha__) || \
+ defined(__x86_64__) || defined(__hppa__)
#define fb_readb __raw_readb
#define fb_readw __raw_readw
Index: sym53c8xx_defs.h
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/scsi/sym53c8xx_defs.h,v
retrieving revision 1.13
diff -u -r1.13 sym53c8xx_defs.h
--- sym53c8xx_defs.h 2001/12/03 05:10:00 1.13
+++ sym53c8xx_defs.h 2001/12/03 22:50:39
@@ -404,16 +404,20 @@
#define readl_l2b __raw_readl
#define writew_b2l __raw_writew
#define writel_b2l __raw_writel
+#define readw_raw __raw_readw
+#define readl_raw __raw_readl
+#define writew_raw __raw_writew
+#define writel_raw __raw_writel
#else /* Other bid-endian */
#define readw_l2b readw
#define readl_l2b readl
#define writew_b2l writew
#define writel_b2l writel
-#endif
#define readw_raw readw
#define readl_raw readl
#define writew_raw writew
#define writel_raw writel
+#endif
#else /* little endian */
Index: zalon7xx.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/scsi/zalon7xx.c,v
retrieving revision 1.12
diff -u -r1.12 zalon7xx.c
--- zalon7xx.c 2001/10/22 05:10:04 1.12
+++ zalon7xx.c 2001/12/03 21:43:41
@@ -88,14 +88,14 @@
int irq;
unsigned long zalon = dev->hpa;
- writel(CMD_RESET, zalon + IO_MODULE_IO_COMMAND);
- while (!(readl(zalon + IO_MODULE_IO_STATUS) & IOSTATUS_RY))
+ __raw_writel(CMD_RESET, zalon + IO_MODULE_IO_COMMAND);
+ while (!(__raw_readl(zalon + IO_MODULE_IO_STATUS) & IOSTATUS_RY))
;
- writel(IOIIDATA_MINT5EN | IOIIDATA_PACKEN | IOIIDATA_PREFETCHEN,
+ __raw_writel(IOIIDATA_MINT5EN | IOIIDATA_PACKEN | IOIIDATA_PREFETCHEN,
zalon + IO_MODULE_II_CDATA);
/* XXX: Save the Zalon version for bug workarounds? */
- zalon_vers = gsc_readl(dev->hpa + IO_MODULE_II_CDATA) & 0x07000000;
+ zalon_vers = __raw_readl(dev->hpa + IO_MODULE_II_CDATA) & 0x07000000;
zalon_vers >>= 24;
/* Setup the interrupts first.
@@ -106,7 +106,7 @@
printk(__FUNCTION__ ": Zalon vers field is 0x%x, IRQ %d\n",
zalon_vers, irq);
- gsc_writel(gsc_irq.txn_addr | gsc_irq.txn_data, dev->hpa + IO_MODULE_EIM);
+ __raw_writel(gsc_irq.txn_addr | gsc_irq.txn_data, dev->hpa + IO_MODULE_EIM);
if ( zalon_vers == 0)
printk(KERN_WARNING __FUNCTION__ ": Zalon 1.1 or earlier\n");
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ Alexander Viro on linux-kernel ]