aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-20 12:24:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-20 12:24:31 -0500
commit8cf7a16ee949204e71127fd7270d1b5ce5577005 (patch)
treea9cf874c3f327290dcd400e6b527af94fe3bdc38 /drivers
parentf479c01c8e81096e01eb20cec67dbaebae669aee (diff)
parent56931d73697c99ecf7aba6ae86c94d3a2d15d596 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven: - Zorro bus cleanups and UAPI revival - Bootinfo cleanups and UAPI revival - Kexec support - Memory size reductions and bug fixes for multi-platform kernels - Polled interrupt support for Atari EtherNAT, EtherNEC and NetUSBee - Machine-specific random_get_entropy() - Defconfig updates and cleanups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (46 commits) m68k/mac: Make SCC reset work more reliably m68k/irq - Use polled IRQ flag for MFP timer cascaded interrupts m68k: Update defconfigs for v3.13-rc1 m68k/defconfig: Enable EARLY_PRINTK m68k/mm: kmap spelling/grammar fixes m68k: Convert arch/m68k/kernel/traps.c to pr_*() m68k: Convert arch/m68k/mm/fault.c to pr_*() m68k/mm: Check for mm != NULL in do_page_fault() debug code m68k/defconfig: Disable /sbin/hotplug fork-bomb by default m68k/atari: Hide RTC_PORT() macro from rtc-cmos m68k/amiga,atari: Fix specifying multiple debug= parameters m68k/defconfig: Use ext4 for ext2/ext3 file systems m68k: Add support to export bootinfo in procfs m68k: Add kexec support m68k/mac: Mark Mac IIsi ADB driver BROKEN m68k/amiga: Provide mach_random_get_entropy() m68k: Add infrastructure for machine-specific random_get_entropy() m68k/atari: Call paging_init() before nf_init() m68k: Remove superfluous inclusions of <asm/bootinfo.h> m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/z2ram.c7
-rw-r--r--drivers/ide/buddha.c2
-rw-r--r--drivers/macintosh/Kconfig2
-rw-r--r--drivers/net/ethernet/8390/hydra.c2
-rw-r--r--drivers/net/ethernet/8390/zorro8390.c4
-rw-r--r--drivers/net/ethernet/amd/a2065.c13
-rw-r--r--drivers/net/ethernet/amd/ariadne.c13
-rw-r--r--drivers/net/ethernet/natsemi/macsonic.c1
-rw-r--r--drivers/parport/parport_mfc3.c2
-rw-r--r--drivers/scsi/a2091.c2
-rw-r--r--drivers/scsi/a3000.c2
-rw-r--r--drivers/scsi/a4000t.c2
-rw-r--r--drivers/scsi/gvp11.c2
-rw-r--r--drivers/scsi/zorro7xx.c2
-rw-r--r--drivers/video/amifb.c2
-rw-r--r--drivers/video/cirrusfb.c4
-rw-r--r--drivers/video/macfb.c1
-rw-r--r--drivers/video/valkyriefb.c1
-rw-r--r--drivers/zorro/Makefile3
-rw-r--r--drivers/zorro/names.c11
-rw-r--r--drivers/zorro/proc.c10
-rw-r--r--drivers/zorro/zorro-driver.c11
-rw-r--r--drivers/zorro/zorro-sysfs.c22
-rw-r--r--drivers/zorro/zorro.c27
-rw-r--r--drivers/zorro/zorro.h5
25 files changed, 89 insertions, 64 deletions
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 5a95baf4b104..27de5046708a 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -43,9 +43,6 @@
43#include <linux/zorro.h> 43#include <linux/zorro.h>
44 44
45 45
46extern int m68k_realnum_memory;
47extern struct mem_info m68k_memory[NUM_MEMINFO];
48
49#define Z2MINOR_COMBINED (0) 46#define Z2MINOR_COMBINED (0)
50#define Z2MINOR_Z2ONLY (1) 47#define Z2MINOR_Z2ONLY (1)
51#define Z2MINOR_CHIPONLY (2) 48#define Z2MINOR_CHIPONLY (2)
@@ -116,8 +113,8 @@ get_z2ram( void )
116 if ( test_bit( i, zorro_unused_z2ram ) ) 113 if ( test_bit( i, zorro_unused_z2ram ) )
117 { 114 {
118 z2_count++; 115 z2_count++;
119 z2ram_map[ z2ram_size++ ] = 116 z2ram_map[z2ram_size++] = (unsigned long)ZTWO_VADDR(Z2RAM_START) +
120 ZTWO_VADDR( Z2RAM_START ) + ( i << Z2RAM_CHUNKSHIFT ); 117 (i << Z2RAM_CHUNKSHIFT);
121 clear_bit( i, zorro_unused_z2ram ); 118 clear_bit( i, zorro_unused_z2ram );
122 } 119 }
123 } 120 }
diff --git a/drivers/ide/buddha.c b/drivers/ide/buddha.c
index b1d38590ac01..46eaf58d881b 100644
--- a/drivers/ide/buddha.c
+++ b/drivers/ide/buddha.c
@@ -198,7 +198,7 @@ fail_base2:
198 continue; 198 continue;
199 } 199 }
200 } 200 }
201 buddha_board = ZTWO_VADDR(board); 201 buddha_board = (unsigned long)ZTWO_VADDR(board);
202 202
203 /* write to BUDDHA_IRQ_MR to enable the board IRQ */ 203 /* write to BUDDHA_IRQ_MR to enable the board IRQ */
204 /* X-Surf doesn't have this. IRQs are always on */ 204 /* X-Surf doesn't have this. IRQs are always on */
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
index d26a312f117a..3067d56b11a6 100644
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -32,7 +32,7 @@ config ADB_MACII
32 32
33config ADB_MACIISI 33config ADB_MACIISI
34 bool "Include Mac IIsi ADB driver" 34 bool "Include Mac IIsi ADB driver"
35 depends on ADB && MAC 35 depends on ADB && MAC && BROKEN
36 help 36 help
37 Say Y here if want your kernel to support Macintosh systems that use 37 Say Y here if want your kernel to support Macintosh systems that use
38 the Mac IIsi style ADB. This includes the IIsi, IIvi, IIvx, Classic 38 the Mac IIsi style ADB. This includes the IIsi, IIvi, IIvx, Classic
diff --git a/drivers/net/ethernet/8390/hydra.c b/drivers/net/ethernet/8390/hydra.c
index fb3dd4399cf3..f615fdec0f1b 100644
--- a/drivers/net/ethernet/8390/hydra.c
+++ b/drivers/net/ethernet/8390/hydra.c
@@ -113,7 +113,7 @@ static const struct net_device_ops hydra_netdev_ops = {
113static int hydra_init(struct zorro_dev *z) 113static int hydra_init(struct zorro_dev *z)
114{ 114{
115 struct net_device *dev; 115 struct net_device *dev;
116 unsigned long board = ZTWO_VADDR(z->resource.start); 116 unsigned long board = (unsigned long)ZTWO_VADDR(z->resource.start);
117 unsigned long ioaddr = board+HYDRA_NIC_BASE; 117 unsigned long ioaddr = board+HYDRA_NIC_BASE;
118 const char name[] = "NE2000"; 118 const char name[] = "NE2000";
119 int start_page, stop_page; 119 int start_page, stop_page;
diff --git a/drivers/net/ethernet/8390/zorro8390.c b/drivers/net/ethernet/8390/zorro8390.c
index 85ec4c2d2645..ae2a12b7db62 100644
--- a/drivers/net/ethernet/8390/zorro8390.c
+++ b/drivers/net/ethernet/8390/zorro8390.c
@@ -287,7 +287,7 @@ static const struct net_device_ops zorro8390_netdev_ops = {
287}; 287};
288 288
289static int zorro8390_init(struct net_device *dev, unsigned long board, 289static int zorro8390_init(struct net_device *dev, unsigned long board,
290 const char *name, unsigned long ioaddr) 290 const char *name, void __iomem *ioaddr)
291{ 291{
292 int i; 292 int i;
293 int err; 293 int err;
@@ -354,7 +354,7 @@ static int zorro8390_init(struct net_device *dev, unsigned long board,
354 start_page = NESM_START_PG; 354 start_page = NESM_START_PG;
355 stop_page = NESM_STOP_PG; 355 stop_page = NESM_STOP_PG;
356 356
357 dev->base_addr = ioaddr; 357 dev->base_addr = (unsigned long)ioaddr;
358 dev->irq = IRQ_AMIGA_PORTS; 358 dev->irq = IRQ_AMIGA_PORTS;
359 359
360 /* Install the Interrupt handler */ 360 /* Install the Interrupt handler */
diff --git a/drivers/net/ethernet/amd/a2065.c b/drivers/net/ethernet/amd/a2065.c
index 0866e7627433..56139184b801 100644
--- a/drivers/net/ethernet/amd/a2065.c
+++ b/drivers/net/ethernet/amd/a2065.c
@@ -57,6 +57,7 @@
57#include <linux/zorro.h> 57#include <linux/zorro.h>
58#include <linux/bitops.h> 58#include <linux/bitops.h>
59 59
60#include <asm/byteorder.h>
60#include <asm/irq.h> 61#include <asm/irq.h>
61#include <asm/amigaints.h> 62#include <asm/amigaints.h>
62#include <asm/amigahw.h> 63#include <asm/amigahw.h>
@@ -678,6 +679,7 @@ static int a2065_init_one(struct zorro_dev *z,
678 unsigned long base_addr = board + A2065_LANCE; 679 unsigned long base_addr = board + A2065_LANCE;
679 unsigned long mem_start = board + A2065_RAM; 680 unsigned long mem_start = board + A2065_RAM;
680 struct resource *r1, *r2; 681 struct resource *r1, *r2;
682 u32 serial;
681 int err; 683 int err;
682 684
683 r1 = request_mem_region(base_addr, sizeof(struct lance_regs), 685 r1 = request_mem_region(base_addr, sizeof(struct lance_regs),
@@ -702,6 +704,7 @@ static int a2065_init_one(struct zorro_dev *z,
702 r1->name = dev->name; 704 r1->name = dev->name;
703 r2->name = dev->name; 705 r2->name = dev->name;
704 706
707 serial = be32_to_cpu(z->rom.er_SerialNumber);
705 dev->dev_addr[0] = 0x00; 708 dev->dev_addr[0] = 0x00;
706 if (z->id != ZORRO_PROD_AMERISTAR_A2065) { /* Commodore */ 709 if (z->id != ZORRO_PROD_AMERISTAR_A2065) { /* Commodore */
707 dev->dev_addr[1] = 0x80; 710 dev->dev_addr[1] = 0x80;
@@ -710,11 +713,11 @@ static int a2065_init_one(struct zorro_dev *z,
710 dev->dev_addr[1] = 0x00; 713 dev->dev_addr[1] = 0x00;
711 dev->dev_addr[2] = 0x9f; 714 dev->dev_addr[2] = 0x9f;
712 } 715 }
713 dev->dev_addr[3] = (z->rom.er_SerialNumber >> 16) & 0xff; 716 dev->dev_addr[3] = (serial >> 16) & 0xff;
714 dev->dev_addr[4] = (z->rom.er_SerialNumber >> 8) & 0xff; 717 dev->dev_addr[4] = (serial >> 8) & 0xff;
715 dev->dev_addr[5] = z->rom.er_SerialNumber & 0xff; 718 dev->dev_addr[5] = serial & 0xff;
716 dev->base_addr = ZTWO_VADDR(base_addr); 719 dev->base_addr = (unsigned long)ZTWO_VADDR(base_addr);
717 dev->mem_start = ZTWO_VADDR(mem_start); 720 dev->mem_start = (unsigned long)ZTWO_VADDR(mem_start);
718 dev->mem_end = dev->mem_start + A2065_RAM_SIZE; 721 dev->mem_end = dev->mem_start + A2065_RAM_SIZE;
719 722
720 priv->ll = (volatile struct lance_regs *)dev->base_addr; 723 priv->ll = (volatile struct lance_regs *)dev->base_addr;
diff --git a/drivers/net/ethernet/amd/ariadne.c b/drivers/net/ethernet/amd/ariadne.c
index c178eb4c8166..b08101b31b8b 100644
--- a/drivers/net/ethernet/amd/ariadne.c
+++ b/drivers/net/ethernet/amd/ariadne.c
@@ -51,6 +51,7 @@
51#include <linux/zorro.h> 51#include <linux/zorro.h>
52#include <linux/bitops.h> 52#include <linux/bitops.h>
53 53
54#include <asm/byteorder.h>
54#include <asm/amigaints.h> 55#include <asm/amigaints.h>
55#include <asm/amigahw.h> 56#include <asm/amigahw.h>
56#include <asm/irq.h> 57#include <asm/irq.h>
@@ -718,6 +719,7 @@ static int ariadne_init_one(struct zorro_dev *z,
718 struct resource *r1, *r2; 719 struct resource *r1, *r2;
719 struct net_device *dev; 720 struct net_device *dev;
720 struct ariadne_private *priv; 721 struct ariadne_private *priv;
722 u32 serial;
721 int err; 723 int err;
722 724
723 r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960"); 725 r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960");
@@ -741,14 +743,15 @@ static int ariadne_init_one(struct zorro_dev *z,
741 r1->name = dev->name; 743 r1->name = dev->name;
742 r2->name = dev->name; 744 r2->name = dev->name;
743 745
746 serial = be32_to_cpu(z->rom.er_SerialNumber);
744 dev->dev_addr[0] = 0x00; 747 dev->dev_addr[0] = 0x00;
745 dev->dev_addr[1] = 0x60; 748 dev->dev_addr[1] = 0x60;
746 dev->dev_addr[2] = 0x30; 749 dev->dev_addr[2] = 0x30;
747 dev->dev_addr[3] = (z->rom.er_SerialNumber >> 16) & 0xff; 750 dev->dev_addr[3] = (serial >> 16) & 0xff;
748 dev->dev_addr[4] = (z->rom.er_SerialNumber >> 8) & 0xff; 751 dev->dev_addr[4] = (serial >> 8) & 0xff;
749 dev->dev_addr[5] = z->rom.er_SerialNumber & 0xff; 752 dev->dev_addr[5] = serial & 0xff;
750 dev->base_addr = ZTWO_VADDR(base_addr); 753 dev->base_addr = (unsigned long)ZTWO_VADDR(base_addr);
751 dev->mem_start = ZTWO_VADDR(mem_start); 754 dev->mem_start = (unsigned long)ZTWO_VADDR(mem_start);
752 dev->mem_end = dev->mem_start + ARIADNE_RAM_SIZE; 755 dev->mem_end = dev->mem_start + ARIADNE_RAM_SIZE;
753 756
754 dev->netdev_ops = &ariadne_netdev_ops; 757 dev->netdev_ops = &ariadne_netdev_ops;
diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c
index 346a4e025c34..04b3ec1352f1 100644
--- a/drivers/net/ethernet/natsemi/macsonic.c
+++ b/drivers/net/ethernet/natsemi/macsonic.c
@@ -52,7 +52,6 @@
52#include <linux/bitrev.h> 52#include <linux/bitrev.h>
53#include <linux/slab.h> 53#include <linux/slab.h>
54 54
55#include <asm/bootinfo.h>
56#include <asm/pgtable.h> 55#include <asm/pgtable.h>
57#include <asm/io.h> 56#include <asm/io.h>
58#include <asm/hwtest.h> 57#include <asm/hwtest.h>
diff --git a/drivers/parport/parport_mfc3.c b/drivers/parport/parport_mfc3.c
index 7578d79b3688..2f650f68af14 100644
--- a/drivers/parport/parport_mfc3.c
+++ b/drivers/parport/parport_mfc3.c
@@ -300,7 +300,7 @@ static int __init parport_mfc3_init(void)
300 if (!request_mem_region(piabase, sizeof(struct pia), "PIA")) 300 if (!request_mem_region(piabase, sizeof(struct pia), "PIA"))
301 continue; 301 continue;
302 302
303 pp = (struct pia *)ZTWO_VADDR(piabase); 303 pp = ZTWO_VADDR(piabase);
304 pp->crb = 0; 304 pp->crb = 0;
305 pp->pddrb = 255; /* all data pins output */ 305 pp->pddrb = 255; /* all data pins output */
306 pp->crb = PIA_DDR|32|8; 306 pp->crb = PIA_DDR|32|8;
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index 30fa38a0ad39..9176bfbd5745 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -201,7 +201,7 @@ static int a2091_probe(struct zorro_dev *z, const struct zorro_device_id *ent)
201 instance->irq = IRQ_AMIGA_PORTS; 201 instance->irq = IRQ_AMIGA_PORTS;
202 instance->unique_id = z->slotaddr; 202 instance->unique_id = z->slotaddr;
203 203
204 regs = (struct a2091_scsiregs *)ZTWO_VADDR(z->resource.start); 204 regs = ZTWO_VADDR(z->resource.start);
205 regs->DAWR = DAWR_A2091; 205 regs->DAWR = DAWR_A2091;
206 206
207 wdregs.SASR = &regs->SASR; 207 wdregs.SASR = &regs->SASR;
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c
index c0f4f4290dd6..dd5b64726ddc 100644
--- a/drivers/scsi/a3000.c
+++ b/drivers/scsi/a3000.c
@@ -220,7 +220,7 @@ static int __init amiga_a3000_scsi_probe(struct platform_device *pdev)
220 220
221 instance->irq = IRQ_AMIGA_PORTS; 221 instance->irq = IRQ_AMIGA_PORTS;
222 222
223 regs = (struct a3000_scsiregs *)ZTWO_VADDR(res->start); 223 regs = ZTWO_VADDR(res->start);
224 regs->DAWR = DAWR_A3000; 224 regs->DAWR = DAWR_A3000;
225 225
226 wdregs.SASR = &regs->SASR; 226 wdregs.SASR = &regs->SASR;
diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c
index 70c521f79f7c..f5a2ab41543b 100644
--- a/drivers/scsi/a4000t.c
+++ b/drivers/scsi/a4000t.c
@@ -56,7 +56,7 @@ static int __init amiga_a4000t_scsi_probe(struct platform_device *pdev)
56 scsi_addr = res->start + A4000T_SCSI_OFFSET; 56 scsi_addr = res->start + A4000T_SCSI_OFFSET;
57 57
58 /* Fill in the required pieces of hostdata */ 58 /* Fill in the required pieces of hostdata */
59 hostdata->base = (void __iomem *)ZTWO_VADDR(scsi_addr); 59 hostdata->base = ZTWO_VADDR(scsi_addr);
60 hostdata->clock = 50; 60 hostdata->clock = 50;
61 hostdata->chip710 = 1; 61 hostdata->chip710 = 1;
62 hostdata->dmode_extra = DMODE_FC2; 62 hostdata->dmode_extra = DMODE_FC2;
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index 2203ac281103..3b6f83ffddc4 100644
--- a/drivers/scsi/gvp11.c
+++ b/drivers/scsi/gvp11.c
@@ -310,7 +310,7 @@ static int gvp11_probe(struct zorro_dev *z, const struct zorro_device_id *ent)
310 if (!request_mem_region(address, 256, "wd33c93")) 310 if (!request_mem_region(address, 256, "wd33c93"))
311 return -EBUSY; 311 return -EBUSY;
312 312
313 regs = (struct gvp11_scsiregs *)(ZTWO_VADDR(address)); 313 regs = ZTWO_VADDR(address);
314 314
315 error = check_wd33c93(regs); 315 error = check_wd33c93(regs);
316 if (error) 316 if (error)
diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c
index cbf3476c68cd..aff31991aea9 100644
--- a/drivers/scsi/zorro7xx.c
+++ b/drivers/scsi/zorro7xx.c
@@ -104,7 +104,7 @@ static int zorro7xx_init_one(struct zorro_dev *z,
104 if (ioaddr > 0x01000000) 104 if (ioaddr > 0x01000000)
105 hostdata->base = ioremap(ioaddr, zorro_resource_len(z)); 105 hostdata->base = ioremap(ioaddr, zorro_resource_len(z));
106 else 106 else
107 hostdata->base = (void __iomem *)ZTWO_VADDR(ioaddr); 107 hostdata->base = ZTWO_VADDR(ioaddr);
108 108
109 hostdata->clock = 50; 109 hostdata->clock = 50;
110 hostdata->chip710 = 1; 110 hostdata->chip710 = 1;
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index 0dac36ce09d6..518f790ef88a 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -3710,7 +3710,7 @@ default_chipset:
3710 if (!videomemory) { 3710 if (!videomemory) {
3711 dev_warn(&pdev->dev, 3711 dev_warn(&pdev->dev,
3712 "Unable to map videomem cached writethrough\n"); 3712 "Unable to map videomem cached writethrough\n");
3713 info->screen_base = (char *)ZTWO_VADDR(info->fix.smem_start); 3713 info->screen_base = ZTWO_VADDR(info->fix.smem_start);
3714 } else 3714 } else
3715 info->screen_base = (char *)videomemory; 3715 info->screen_base = (char *)videomemory;
3716 3716
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 5aab9b9dc210..d992aa5eb3f0 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -2256,7 +2256,7 @@ static int cirrusfb_zorro_register(struct zorro_dev *z,
2256 2256
2257 info->fix.mmio_start = regbase; 2257 info->fix.mmio_start = regbase;
2258 cinfo->regbase = regbase > 16 * MB_ ? ioremap(regbase, 64 * 1024) 2258 cinfo->regbase = regbase > 16 * MB_ ? ioremap(regbase, 64 * 1024)
2259 : (caddr_t)ZTWO_VADDR(regbase); 2259 : ZTWO_VADDR(regbase);
2260 if (!cinfo->regbase) { 2260 if (!cinfo->regbase) {
2261 dev_err(info->device, "Cannot map registers\n"); 2261 dev_err(info->device, "Cannot map registers\n");
2262 error = -EIO; 2262 error = -EIO;
@@ -2266,7 +2266,7 @@ static int cirrusfb_zorro_register(struct zorro_dev *z,
2266 info->fix.smem_start = rambase; 2266 info->fix.smem_start = rambase;
2267 info->screen_size = ramsize; 2267 info->screen_size = ramsize;
2268 info->screen_base = rambase > 16 * MB_ ? ioremap(rambase, ramsize) 2268 info->screen_base = rambase > 16 * MB_ ? ioremap(rambase, ramsize)
2269 : (caddr_t)ZTWO_VADDR(rambase); 2269 : ZTWO_VADDR(rambase);
2270 if (!info->screen_base) { 2270 if (!info->screen_base) {
2271 dev_err(info->device, "Cannot map video RAM\n"); 2271 dev_err(info->device, "Cannot map video RAM\n");
2272 error = -EIO; 2272 error = -EIO;
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c
index 5bd2eb8d4f39..cda7587cbc86 100644
--- a/drivers/video/macfb.c
+++ b/drivers/video/macfb.c
@@ -34,7 +34,6 @@
34#include <linux/fb.h> 34#include <linux/fb.h>
35 35
36#include <asm/setup.h> 36#include <asm/setup.h>
37#include <asm/bootinfo.h>
38#include <asm/macintosh.h> 37#include <asm/macintosh.h>
39#include <asm/io.h> 38#include <asm/io.h>
40 39
diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c
index e287ebc47817..97cb9bd1d1dd 100644
--- a/drivers/video/valkyriefb.c
+++ b/drivers/video/valkyriefb.c
@@ -56,7 +56,6 @@
56#include <linux/cuda.h> 56#include <linux/cuda.h>
57#include <asm/io.h> 57#include <asm/io.h>
58#ifdef CONFIG_MAC 58#ifdef CONFIG_MAC
59#include <asm/bootinfo.h>
60#include <asm/macintosh.h> 59#include <asm/macintosh.h>
61#else 60#else
62#include <asm/prom.h> 61#include <asm/prom.h>
diff --git a/drivers/zorro/Makefile b/drivers/zorro/Makefile
index f62172603215..7dc5332ff984 100644
--- a/drivers/zorro/Makefile
+++ b/drivers/zorro/Makefile
@@ -2,8 +2,9 @@
2# Makefile for the Zorro bus specific drivers. 2# Makefile for the Zorro bus specific drivers.
3# 3#
4 4
5obj-$(CONFIG_ZORRO) += zorro.o zorro-driver.o zorro-sysfs.o names.o 5obj-$(CONFIG_ZORRO) += zorro.o zorro-driver.o zorro-sysfs.o
6obj-$(CONFIG_PROC_FS) += proc.o 6obj-$(CONFIG_PROC_FS) += proc.o
7obj-$(CONFIG_ZORRO_NAMES) += names.o
7 8
8hostprogs-y := gen-devlist 9hostprogs-y := gen-devlist
9 10
diff --git a/drivers/zorro/names.c b/drivers/zorro/names.c
index e8517c3d8e82..6f3fd9903ac3 100644
--- a/drivers/zorro/names.c
+++ b/drivers/zorro/names.c
@@ -15,8 +15,6 @@
15#include <linux/zorro.h> 15#include <linux/zorro.h>
16 16
17 17
18#ifdef CONFIG_ZORRO_NAMES
19
20struct zorro_prod_info { 18struct zorro_prod_info {
21 __u16 prod; 19 __u16 prod;
22 unsigned short seen; 20 unsigned short seen;
@@ -69,7 +67,6 @@ void __init zorro_name_device(struct zorro_dev *dev)
69 } while (--i); 67 } while (--i);
70 68
71 /* Couldn't find either the manufacturer nor the product */ 69 /* Couldn't find either the manufacturer nor the product */
72 sprintf(name, "Zorro device %08x", dev->id);
73 return; 70 return;
74 71
75 match_manuf: { 72 match_manuf: {
@@ -98,11 +95,3 @@ void __init zorro_name_device(struct zorro_dev *dev)
98 } 95 }
99 } 96 }
100} 97}
101
102#else
103
104void __init zorro_name_device(struct zorro_dev *dev)
105{
106}
107
108#endif
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c
index ea1ce822a8e0..6ac2579da0eb 100644
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -14,6 +14,8 @@
14#include <linux/seq_file.h> 14#include <linux/seq_file.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/export.h> 16#include <linux/export.h>
17
18#include <asm/byteorder.h>
17#include <asm/uaccess.h> 19#include <asm/uaccess.h>
18#include <asm/amigahw.h> 20#include <asm/amigahw.h>
19#include <asm/setup.h> 21#include <asm/setup.h>
@@ -41,10 +43,10 @@ proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *
41 /* Construct a ConfigDev */ 43 /* Construct a ConfigDev */
42 memset(&cd, 0, sizeof(cd)); 44 memset(&cd, 0, sizeof(cd));
43 cd.cd_Rom = z->rom; 45 cd.cd_Rom = z->rom;
44 cd.cd_SlotAddr = z->slotaddr; 46 cd.cd_SlotAddr = cpu_to_be16(z->slotaddr);
45 cd.cd_SlotSize = z->slotsize; 47 cd.cd_SlotSize = cpu_to_be16(z->slotsize);
46 cd.cd_BoardAddr = (void *)zorro_resource_start(z); 48 cd.cd_BoardAddr = cpu_to_be32(zorro_resource_start(z));
47 cd.cd_BoardSize = zorro_resource_len(z); 49 cd.cd_BoardSize = cpu_to_be32(zorro_resource_len(z));
48 50
49 if (copy_to_user(buf, (void *)&cd + pos, nbytes)) 51 if (copy_to_user(buf, (void *)&cd + pos, nbytes))
50 return -EFAULT; 52 return -EFAULT;
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c
index ac1db7f1bcab..eacae1434b73 100644
--- a/drivers/zorro/zorro-driver.c
+++ b/drivers/zorro/zorro-driver.c
@@ -161,11 +161,12 @@ static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env)
161} 161}
162 162
163struct bus_type zorro_bus_type = { 163struct bus_type zorro_bus_type = {
164 .name = "zorro", 164 .name = "zorro",
165 .match = zorro_bus_match, 165 .dev_name = "zorro",
166 .uevent = zorro_uevent, 166 .match = zorro_bus_match,
167 .probe = zorro_device_probe, 167 .uevent = zorro_uevent,
168 .remove = zorro_device_remove, 168 .probe = zorro_device_probe,
169 .remove = zorro_device_remove,
169}; 170};
170EXPORT_SYMBOL(zorro_bus_type); 171EXPORT_SYMBOL(zorro_bus_type);
171 172
diff --git a/drivers/zorro/zorro-sysfs.c b/drivers/zorro/zorro-sysfs.c
index 26f7184ef9e1..36b210f9b6b2 100644
--- a/drivers/zorro/zorro-sysfs.c
+++ b/drivers/zorro/zorro-sysfs.c
@@ -16,6 +16,8 @@
16#include <linux/stat.h> 16#include <linux/stat.h>
17#include <linux/string.h> 17#include <linux/string.h>
18 18
19#include <asm/byteorder.h>
20
19#include "zorro.h" 21#include "zorro.h"
20 22
21 23
@@ -33,10 +35,20 @@ static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL);
33 35
34zorro_config_attr(id, id, "0x%08x\n"); 36zorro_config_attr(id, id, "0x%08x\n");
35zorro_config_attr(type, rom.er_Type, "0x%02x\n"); 37zorro_config_attr(type, rom.er_Type, "0x%02x\n");
36zorro_config_attr(serial, rom.er_SerialNumber, "0x%08x\n");
37zorro_config_attr(slotaddr, slotaddr, "0x%04x\n"); 38zorro_config_attr(slotaddr, slotaddr, "0x%04x\n");
38zorro_config_attr(slotsize, slotsize, "0x%04x\n"); 39zorro_config_attr(slotsize, slotsize, "0x%04x\n");
39 40
41static ssize_t
42show_serial(struct device *dev, struct device_attribute *attr, char *buf)
43{
44 struct zorro_dev *z;
45
46 z = to_zorro_dev(dev);
47 return sprintf(buf, "0x%08x\n", be32_to_cpu(z->rom.er_SerialNumber));
48}
49
50static DEVICE_ATTR(serial, S_IRUGO, show_serial, NULL);
51
40static ssize_t zorro_show_resource(struct device *dev, struct device_attribute *attr, char *buf) 52static ssize_t zorro_show_resource(struct device *dev, struct device_attribute *attr, char *buf)
41{ 53{
42 struct zorro_dev *z = to_zorro_dev(dev); 54 struct zorro_dev *z = to_zorro_dev(dev);
@@ -60,10 +72,10 @@ static ssize_t zorro_read_config(struct file *filp, struct kobject *kobj,
60 /* Construct a ConfigDev */ 72 /* Construct a ConfigDev */
61 memset(&cd, 0, sizeof(cd)); 73 memset(&cd, 0, sizeof(cd));
62 cd.cd_Rom = z->rom; 74 cd.cd_Rom = z->rom;
63 cd.cd_SlotAddr = z->slotaddr; 75 cd.cd_SlotAddr = cpu_to_be16(z->slotaddr);
64 cd.cd_SlotSize = z->slotsize; 76 cd.cd_SlotSize = cpu_to_be16(z->slotsize);
65 cd.cd_BoardAddr = (void *)zorro_resource_start(z); 77 cd.cd_BoardAddr = cpu_to_be32(zorro_resource_start(z));
66 cd.cd_BoardSize = zorro_resource_len(z); 78 cd.cd_BoardSize = cpu_to_be32(zorro_resource_len(z));
67 79
68 return memory_read_from_buffer(buf, count, &off, &cd, sizeof(cd)); 80 return memory_read_from_buffer(buf, count, &off, &cd, sizeof(cd));
69} 81}
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index 858c9714b2f3..707c1a5a0317 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -18,6 +18,7 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20 20
21#include <asm/byteorder.h>
21#include <asm/setup.h> 22#include <asm/setup.h>
22#include <asm/amigahw.h> 23#include <asm/amigahw.h>
23 24
@@ -29,7 +30,8 @@
29 */ 30 */
30 31
31unsigned int zorro_num_autocon; 32unsigned int zorro_num_autocon;
32struct zorro_dev zorro_autocon[ZORRO_NUM_AUTO]; 33struct zorro_dev_init zorro_autocon_init[ZORRO_NUM_AUTO] __initdata;
34struct zorro_dev *zorro_autocon;
33 35
34 36
35 /* 37 /*
@@ -38,6 +40,7 @@ struct zorro_dev zorro_autocon[ZORRO_NUM_AUTO];
38 40
39struct zorro_bus { 41struct zorro_bus {
40 struct device dev; 42 struct device dev;
43 struct zorro_dev devices[0];
41}; 44};
42 45
43 46
@@ -125,18 +128,22 @@ static struct resource __init *zorro_find_parent_resource(
125static int __init amiga_zorro_probe(struct platform_device *pdev) 128static int __init amiga_zorro_probe(struct platform_device *pdev)
126{ 129{
127 struct zorro_bus *bus; 130 struct zorro_bus *bus;
131 struct zorro_dev_init *zi;
128 struct zorro_dev *z; 132 struct zorro_dev *z;
129 struct resource *r; 133 struct resource *r;
130 unsigned int i; 134 unsigned int i;
131 int error; 135 int error;
132 136
133 /* Initialize the Zorro bus */ 137 /* Initialize the Zorro bus */
134 bus = kzalloc(sizeof(*bus), GFP_KERNEL); 138 bus = kzalloc(sizeof(*bus) +
139 zorro_num_autocon * sizeof(bus->devices[0]),
140 GFP_KERNEL);
135 if (!bus) 141 if (!bus)
136 return -ENOMEM; 142 return -ENOMEM;
137 143
144 zorro_autocon = bus->devices;
138 bus->dev.parent = &pdev->dev; 145 bus->dev.parent = &pdev->dev;
139 dev_set_name(&bus->dev, "zorro"); 146 dev_set_name(&bus->dev, zorro_bus_type.name);
140 error = device_register(&bus->dev); 147 error = device_register(&bus->dev);
141 if (error) { 148 if (error) {
142 pr_err("Zorro: Error registering zorro_bus\n"); 149 pr_err("Zorro: Error registering zorro_bus\n");
@@ -151,15 +158,23 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
151 158
152 /* First identify all devices ... */ 159 /* First identify all devices ... */
153 for (i = 0; i < zorro_num_autocon; i++) { 160 for (i = 0; i < zorro_num_autocon; i++) {
161 zi = &zorro_autocon_init[i];
154 z = &zorro_autocon[i]; 162 z = &zorro_autocon[i];
155 z->id = (z->rom.er_Manufacturer<<16) | (z->rom.er_Product<<8); 163
164 z->rom = zi->rom;
165 z->id = (be16_to_cpu(z->rom.er_Manufacturer) << 16) |
166 (z->rom.er_Product << 8);
156 if (z->id == ZORRO_PROD_GVP_EPC_BASE) { 167 if (z->id == ZORRO_PROD_GVP_EPC_BASE) {
157 /* GVP quirk */ 168 /* GVP quirk */
158 unsigned long magic = zorro_resource_start(z)+0x8000; 169 unsigned long magic = zi->boardaddr + 0x8000;
159 z->id |= *(u16 *)ZTWO_VADDR(magic) & GVP_PRODMASK; 170 z->id |= *(u16 *)ZTWO_VADDR(magic) & GVP_PRODMASK;
160 } 171 }
172 z->slotaddr = zi->slotaddr;
173 z->slotsize = zi->slotsize;
161 sprintf(z->name, "Zorro device %08x", z->id); 174 sprintf(z->name, "Zorro device %08x", z->id);
162 zorro_name_device(z); 175 zorro_name_device(z);
176 z->resource.start = zi->boardaddr;
177 z->resource.end = zi->boardaddr + zi->boardsize - 1;
163 z->resource.name = z->name; 178 z->resource.name = z->name;
164 r = zorro_find_parent_resource(pdev, z); 179 r = zorro_find_parent_resource(pdev, z);
165 error = request_resource(r, &z->resource); 180 error = request_resource(r, &z->resource);
@@ -167,9 +182,9 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
167 dev_err(&bus->dev, 182 dev_err(&bus->dev,
168 "Address space collision on device %s %pR\n", 183 "Address space collision on device %s %pR\n",
169 z->name, &z->resource); 184 z->name, &z->resource);
170 dev_set_name(&z->dev, "%02x", i);
171 z->dev.parent = &bus->dev; 185 z->dev.parent = &bus->dev;
172 z->dev.bus = &zorro_bus_type; 186 z->dev.bus = &zorro_bus_type;
187 z->dev.id = i;
173 } 188 }
174 189
175 /* ... then register them */ 190 /* ... then register them */
diff --git a/drivers/zorro/zorro.h b/drivers/zorro/zorro.h
index b682d5ccd63f..34119fb4e560 100644
--- a/drivers/zorro/zorro.h
+++ b/drivers/zorro/zorro.h
@@ -1,4 +1,9 @@
1 1
2#ifdef CONFIG_ZORRO_NAMES
2extern void zorro_name_device(struct zorro_dev *z); 3extern void zorro_name_device(struct zorro_dev *z);
4#else
5static inline void zorro_name_device(struct zorro_dev *dev) { }
6#endif
7
3extern int zorro_create_sysfs_dev_files(struct zorro_dev *z); 8extern int zorro_create_sysfs_dev_files(struct zorro_dev *z);
4 9