Commit af7dbd5e authored by Russell King's avatar Russell King

[ARM] Merge Linus' tree with current ARM tree.

parents 23d2f992 1b473f09
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-algo-bit.h> #include <linux/i2c-algo-bit.h>
#include <linux/fs.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -306,7 +307,7 @@ static struct i2c_adapter ioc_ops = { ...@@ -306,7 +307,7 @@ static struct i2c_adapter ioc_ops = {
.id = I2C_HW_B_IOC, .id = I2C_HW_B_IOC,
.algo_data = &ioc_data, .algo_data = &ioc_data,
.client_register = ioc_client_reg, .client_register = ioc_client_reg,
.client_unregister = ioc_client_unreg .client_unregister = ioc_client_unreg,
.dev = { .dev = {
.name = "IOC/IOMD", .name = "IOC/IOMD",
}, },
......
...@@ -34,7 +34,7 @@ static struct i2c_client_address_data addr_data = { ...@@ -34,7 +34,7 @@ static struct i2c_client_address_data addr_data = {
.force = ignore, .force = ignore,
}; };
#define DAT(x) ((unsigned int)(x->data)) #define DAT(x) ((unsigned int)(x->dev.driver_data))
static int static int
pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags, pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
...@@ -51,13 +51,13 @@ pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags, ...@@ -51,13 +51,13 @@ pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
if (!c) if (!c)
return -ENOMEM; return -ENOMEM;
strcpy(c->name, "PCF8583"); strcpy(c->dev.name, "PCF8583");
c->id = pcf8583_driver.id; c->id = pcf8583_driver.id;
c->flags = 0; c->flags = 0;
c->addr = addr; c->addr = addr;
c->adapter = adap; c->adapter = adap;
c->driver = &pcf8583_driver; c->driver = &pcf8583_driver;
c->data = NULL; c->dev.driver_data = NULL;
if (i2c_transfer(c->adapter, msgs, 2) == 2) if (i2c_transfer(c->adapter, msgs, 2) == 2)
DAT(c) = buf[0]; DAT(c) = buf[0];
......
...@@ -25,7 +25,7 @@ struct button_callback { ...@@ -25,7 +25,7 @@ struct button_callback {
/* Function prototypes: */ /* Function prototypes: */
static void button_sequence_finished (unsigned long parameters); static void button_sequence_finished (unsigned long parameters);
static void button_handler (int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t button_handler (int irq, void *dev_id, struct pt_regs *regs);
static int button_read (struct file *filp, char *buffer, static int button_read (struct file *filp, char *buffer,
size_t count, loff_t *ppos); size_t count, loff_t *ppos);
int button_init (void); int button_init (void);
......
This diff is collapsed.
...@@ -20,8 +20,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -20,8 +20,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
hw_regs_t hw; hw_regs_t hw;
int i, ret; int i, ret;
ecard_claim(ec);
memset(&hw, 0, sizeof(hw)); memset(&hw, 0, sizeof(hw));
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
...@@ -49,7 +47,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -49,7 +47,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
static void __devexit rapide_remove(struct expansion_card *ec) static void __devexit rapide_remove(struct expansion_card *ec)
{ {
/* need to do more */ /* need to do more */
ecard_release(ec);
} }
static struct ecard_id rapide_ids[] = { static struct ecard_id rapide_ids[] = {
......
...@@ -347,7 +347,6 @@ static struct sa1111_driver ps2_driver = { ...@@ -347,7 +347,6 @@ static struct sa1111_driver ps2_driver = {
.drv = { .drv = {
.name = "sa1111-ps2", .name = "sa1111-ps2",
.bus = &sa1111_bus_type, .bus = &sa1111_bus_type,
.devclass = &input_devclass,
.probe = ps2_probe, .probe = ps2_probe,
.remove = ps2_remove, .remove = ps2_remove,
.suspend = ps2_suspend, .suspend = ps2_suspend,
......
...@@ -221,14 +221,7 @@ config MII ...@@ -221,14 +221,7 @@ config MII
or internal device. It is safe to say Y or M here even if your or internal device. It is safe to say Y or M here even if your
ethernet card lack MII. ethernet card lack MII.
config ARM_AM79C961A source "drivers/net/arm/Kconfig"
bool "ARM EBSA110 AM79C961A support"
depends on NET_ETHERNET && ARM && ARCH_EBSA110
help
If you wish to compile a kernel for the EBSA-110, then you should
always answer Y to this.
source "drivers/acorn/net/Kconfig"
config MACE config MACE
tristate "MACE (Power Mac ethernet) support" tristate "MACE (Power Mac ethernet) support"
......
...@@ -77,7 +77,6 @@ obj-$(CONFIG_HP100) += hp100.o ...@@ -77,7 +77,6 @@ obj-$(CONFIG_HP100) += hp100.o
obj-$(CONFIG_SMC9194) += smc9194.o obj-$(CONFIG_SMC9194) += smc9194.o
obj-$(CONFIG_FEC) += fec.o obj-$(CONFIG_FEC) += fec.o
obj-$(CONFIG_68360_ENET) += 68360enet.o obj-$(CONFIG_68360_ENET) += 68360enet.o
obj-$(CONFIG_ARM_AM79C961A) += am79c961a.o
obj-$(CONFIG_ARM_ETHERH) += 8390.o obj-$(CONFIG_ARM_ETHERH) += 8390.o
obj-$(CONFIG_WD80x3) += wd.o 8390.o obj-$(CONFIG_WD80x3) += wd.o 8390.o
obj-$(CONFIG_EL2) += 3c503.o 8390.o obj-$(CONFIG_EL2) += 3c503.o 8390.o
...@@ -179,7 +178,7 @@ obj-$(CONFIG_AMD8111_ETH) += amd8111e.o ...@@ -179,7 +178,7 @@ obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
# non-drivers/net drivers who want mii lib # non-drivers/net drivers who want mii lib
obj-$(CONFIG_PCMCIA_SMC91C92) += mii.o obj-$(CONFIG_PCMCIA_SMC91C92) += mii.o
obj-$(CONFIG_ARCH_ACORN) += ../acorn/net/ obj-$(CONFIG_ARM) += arm/
obj-$(CONFIG_NET_FC) += fc/ obj-$(CONFIG_NET_FC) += fc/
obj-$(CONFIG_DEV_APPLETALK) += appletalk/ obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_TR) += tokenring/ obj-$(CONFIG_TR) += tokenring/
......
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
# Acorn Network device configuration # Acorn Network device configuration
# These are for Acorn's Expansion card network interfaces # These are for Acorn's Expansion card network interfaces
# #
config ARM_AM79C961A
bool "ARM EBSA110 AM79C961A support"
depends on NET_ETHERNET && ARM && ARCH_EBSA110
help
If you wish to compile a kernel for the EBSA-110, then you should
always answer Y to this.
config ARM_ETHER1 config ARM_ETHER1
tristate "Acorn Ether1 support" tristate "Acorn Ether1 support"
depends on NET_ETHERNET && ARM && ARCH_ACORN depends on NET_ETHERNET && ARM && ARCH_ACORN
...@@ -23,3 +30,16 @@ config ARM_ETHERH ...@@ -23,3 +30,16 @@ config ARM_ETHERH
If you have an Acorn system with one of these network cards, you If you have an Acorn system with one of these network cards, you
should say Y to this option if you wish to use it with Linux. should say Y to this option if you wish to use it with Linux.
config ARM_ETHER00
tristate "Altera Ether00 support"
depends on NET_ETHERNET && ARM && ARCH_CAMELOT
help
This is the driver for Altera's ether00 ethernet mac IP core. Say
Y here if you want to build support for this into the kernel. It
is also available as a module (say M here) that can be inserted/
removed from the kernel at the same time as the PLD is configured.
If this driver is running on an epxa10 development board then it
will generate a suitable hw address based on the board serial
number (MTD support is required for this). Otherwise you will
need to set a suitable hw address using ifconfig.
# File: drivers/acorn/net/Makefile # File: drivers/net/arm/Makefile
# #
# Makefile for the Acorn ethercard network device drivers # Makefile for the ARM network device drivers
# #
obj-$(CONFIG_ARM_AM79C961A) += am79c961a.o
obj-$(CONFIG_ARM_ETHER00) += ether00.o
obj-$(CONFIG_ARM_ETHERH) += etherh.o obj-$(CONFIG_ARM_ETHERH) += etherh.o
obj-$(CONFIG_ARM_ETHER3) += ether3.o obj-$(CONFIG_ARM_ETHER3) += ether3.o
obj-$(CONFIG_ARM_ETHER1) += ether1.o obj-$(CONFIG_ARM_ETHER1) += ether1.o
This diff is collapsed.
...@@ -450,6 +450,7 @@ ether1_init_for_open (struct net_device *dev) ...@@ -450,6 +450,7 @@ ether1_init_for_open (struct net_device *dev)
struct ether1_priv *priv = (struct ether1_priv *)dev->priv; struct ether1_priv *priv = (struct ether1_priv *)dev->priv;
int i, status, addr, next, next2; int i, status, addr, next, next2;
int failures = 0; int failures = 0;
unsigned long timeout;
outb (CTRL_RST|CTRL_ACK, REG_CONTROL); outb (CTRL_RST|CTRL_ACK, REG_CONTROL);
...@@ -515,19 +516,19 @@ ether1_init_for_open (struct net_device *dev) ...@@ -515,19 +516,19 @@ ether1_init_for_open (struct net_device *dev)
outb (CTRL_CA, REG_CONTROL); outb (CTRL_CA, REG_CONTROL);
/* 586 should now unset iscp.busy */ /* 586 should now unset iscp.busy */
i = jiffies + HZ/2; timeout = jiffies + HZ/2;
while (ether1_inw (dev, ISCP_ADDR, iscp_t, iscp_busy, DISABLEIRQS) == 1) { while (ether1_inw (dev, ISCP_ADDR, iscp_t, iscp_busy, DISABLEIRQS) == 1) {
if (time_after(jiffies, i)) { if (time_after(jiffies, timeout)) {
printk (KERN_WARNING "%s: can't initialise 82586: iscp is busy\n", dev->name); printk (KERN_WARNING "%s: can't initialise 82586: iscp is busy\n", dev->name);
return 1; return 1;
} }
} }
/* check status of commands that we issued */ /* check status of commands that we issued */
i += HZ/10; timeout += HZ/10;
while (((status = ether1_inw (dev, CFG_ADDR, cfg_t, cfg_status, DISABLEIRQS)) while (((status = ether1_inw (dev, CFG_ADDR, cfg_t, cfg_status, DISABLEIRQS))
& STAT_COMPLETE) == 0) { & STAT_COMPLETE) == 0) {
if (time_after(jiffies, i)) if (time_after(jiffies, timeout))
break; break;
} }
...@@ -541,10 +542,10 @@ ether1_init_for_open (struct net_device *dev) ...@@ -541,10 +542,10 @@ ether1_init_for_open (struct net_device *dev)
failures += 1; failures += 1;
} }
i += HZ/10; timeout += HZ/10;
while (((status = ether1_inw (dev, SA_ADDR, sa_t, sa_status, DISABLEIRQS)) while (((status = ether1_inw (dev, SA_ADDR, sa_t, sa_status, DISABLEIRQS))
& STAT_COMPLETE) == 0) { & STAT_COMPLETE) == 0) {
if (time_after(jiffies, i)) if (time_after(jiffies, timeout))
break; break;
} }
...@@ -558,10 +559,10 @@ ether1_init_for_open (struct net_device *dev) ...@@ -558,10 +559,10 @@ ether1_init_for_open (struct net_device *dev)
failures += 1; failures += 1;
} }
i += HZ/10; timeout += HZ/10;
while (((status = ether1_inw (dev, MC_ADDR, mc_t, mc_status, DISABLEIRQS)) while (((status = ether1_inw (dev, MC_ADDR, mc_t, mc_status, DISABLEIRQS))
& STAT_COMPLETE) == 0) { & STAT_COMPLETE) == 0) {
if (time_after(jiffies, i)) if (time_after(jiffies, timeout))
break; break;
} }
...@@ -575,10 +576,10 @@ ether1_init_for_open (struct net_device *dev) ...@@ -575,10 +576,10 @@ ether1_init_for_open (struct net_device *dev)
failures += 1; failures += 1;
} }
i += HZ; timeout += HZ;
while (((status = ether1_inw (dev, TDR_ADDR, tdr_t, tdr_status, DISABLEIRQS)) while (((status = ether1_inw (dev, TDR_ADDR, tdr_t, tdr_status, DISABLEIRQS))
& STAT_COMPLETE) == 0) { & STAT_COMPLETE) == 0) {
if (time_after(jiffies, i)) if (time_after(jiffies, timeout))
break; break;
} }
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "../../net/8390.h" #include "../8390.h"
#define NET_DEBUG 0 #define NET_DEBUG 0
#define DEBUG_INIT 2 #define DEBUG_INIT 2
......
...@@ -636,13 +636,14 @@ static void sa1100_irda_fir_irq(struct net_device *dev) ...@@ -636,13 +636,14 @@ static void sa1100_irda_fir_irq(struct net_device *dev)
sa1100_irda_rx_dma_start(si); sa1100_irda_rx_dma_start(si);
} }
static void sa1100_irda_irq(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t sa1100_irda_irq(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
if (IS_FIR(((struct sa1100_irda *)dev->priv))) if (IS_FIR(((struct sa1100_irda *)dev->priv)))
sa1100_irda_fir_irq(dev); sa1100_irda_fir_irq(dev);
else else
sa1100_irda_hpsir_irq(dev); sa1100_irda_hpsir_irq(dev);
return IRQ_HANDLED;
} }
/* /*
......
...@@ -1602,7 +1602,7 @@ config SCSI_MAC53C94 ...@@ -1602,7 +1602,7 @@ config SCSI_MAC53C94
whenever you want). If you want to compile it as a module, say M whenever you want). If you want to compile it as a module, say M
here and read <file:Documentation/modules.txt>. here and read <file:Documentation/modules.txt>.
source "drivers/acorn/scsi/Kconfig" source "drivers/scsi/arm/Kconfig"
config JAZZ_ESP config JAZZ_ESP
bool "MIPS JAZZ FAS216 SCSI support" bool "MIPS JAZZ FAS216 SCSI support"
......
...@@ -114,7 +114,7 @@ obj-$(CONFIG_SCSI_CPQFCTS) += cpqfc.o ...@@ -114,7 +114,7 @@ obj-$(CONFIG_SCSI_CPQFCTS) += cpqfc.o
obj-$(CONFIG_SCSI_LASI700) += lasi700.o 53c700.o obj-$(CONFIG_SCSI_LASI700) += lasi700.o 53c700.o
obj-$(CONFIG_SCSI_NSP32) += nsp32.o obj-$(CONFIG_SCSI_NSP32) += nsp32.o
obj-$(CONFIG_ARCH_ACORN) += ../acorn/scsi/ obj-$(CONFIG_ARM) += arm/
obj-$(CONFIG_CHR_DEV_ST) += st.o obj-$(CONFIG_CHR_DEV_ST) += st.o
obj-$(CONFIG_CHR_DEV_OSST) += osst.o obj-$(CONFIG_CHR_DEV_OSST) += osst.o
......
# #
# Makefile for drivers/acorn/scsi # Makefile for drivers/scsi/arm
# #
acornscsi_mod-objs := acornscsi.o acornscsi-io.o acornscsi_mod-objs := acornscsi.o acornscsi-io.o
......
...@@ -149,8 +149,8 @@ ...@@ -149,8 +149,8 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/ecard.h> #include <asm/ecard.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#include "acornscsi.h" #include "acornscsi.h"
#include "msgqueue.h" #include "msgqueue.h"
#include "scsi.h" #include "scsi.h"
...@@ -2931,6 +2931,35 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -2931,6 +2931,35 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset,
} }
} }
p += sprintf(p, "\nAttached devices:\n");
list_for_each_entry(scd, &instance->my_devices, siblings) {
p += sprintf(p, "Device/Lun TaggedQ Sync\n");
p += sprintf(p, " %d/%d ", scd->id, scd->lun);
if (scd->tagged_supported)
p += sprintf(p, "%3sabled(%3d) ",
scd->tagged_queue ? "en" : "dis",
scd->current_tag);
else
p += sprintf(p, "unsupported ");
if (host->device[scd->id].sync_xfer & 15)
p += sprintf(p, "offset %d, %d ns\n",
host->device[scd->id].sync_xfer & 15,
acornscsi_getperiod(host->device[scd->id].sync_xfer));
else
p += sprintf(p, "async\n");
pos = p - buffer;
if (pos + begin < offset) {
begin += pos;
p = buffer;
}
pos = p - buffer;
if (pos + begin > offset + length)
break;
}
pos = p - buffer; pos = p - buffer;
*start = buffer + (offset - begin); *start = buffer + (offset - begin);
......
...@@ -298,7 +298,6 @@ typedef struct acornscsi_hostdata { ...@@ -298,7 +298,6 @@ typedef struct acornscsi_hostdata {
unsigned short last_message; /* last message to be sent */ unsigned short last_message; /* last message to be sent */
unsigned char disconnectable:1; /* this command can be disconnected */ unsigned char disconnectable:1; /* this command can be disconnected */
unsigned char interrupt:1; /* interrupt active */
} scsi; } scsi;
/* statistics information */ /* statistics information */
......
...@@ -29,14 +29,15 @@ ...@@ -29,14 +29,15 @@
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/ecard.h> #include <asm/ecard.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#include "fas216.h" #include "fas216.h"
struct arxescsi_info { struct arxescsi_info {
...@@ -238,10 +239,10 @@ static int ...@@ -238,10 +239,10 @@ static int
arxescsi_proc_info(char *buffer, char **start, off_t offset, int length, arxescsi_proc_info(char *buffer, char **start, off_t offset, int length,
int host_no, int inout) int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct arxescsi_info *info; struct arxescsi_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -251,26 +252,13 @@ arxescsi_proc_info(char *buffer, char **start, off_t offset, int length, ...@@ -251,26 +252,13 @@ arxescsi_proc_info(char *buffer, char **start, off_t offset, int length,
if (inout == 1) if (inout == 1)
return -EINVAL; return -EINVAL;
begin = 0; p += sprintf(p, "ARXE 16-bit SCSI driver v%s\n", VERSION);
pos = sprintf(buffer, "ARXE 16-bit SCSI driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += fas216_print_stats(&info->info, p);
pos += fas216_print_stats(&info->info, buffer + pos); p += fas216_print_devices(&info->info, p);
pos += sprintf (buffer+pos, "\nAttached devices:\n"); *start = buffer + offset;
pos = p - buffer - offset;
list_for_each_entry(scd, &host->my_devices, siblings) {
pos += fas216_print_device(&info->info, scd, buffer + pos);
if (pos + begin < offset) {
begin += pos;
pos = 0;
}
if (pos + begin > offset + length)
break;
}
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/system.h> #include <asm/system.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#include <scsi/scsicam.h> #include <scsi/scsicam.h>
...@@ -41,7 +41,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset, ...@@ -41,7 +41,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset,
#define BOARD_NORMAL 0 #define BOARD_NORMAL 0
#define BOARD_NCR53C400 1 #define BOARD_NCR53C400 1
#include "../../scsi/NCR5380.h" #include "../NCR5380.h"
void cumanascsi_setup(char *str, int *ints) void cumanascsi_setup(char *str, int *ints)
{ {
...@@ -239,7 +239,7 @@ static void cumanascsi_write(struct Scsi_Host *instance, int reg, int value) ...@@ -239,7 +239,7 @@ static void cumanascsi_write(struct Scsi_Host *instance, int reg, int value)
#undef CTRL #undef CTRL
#include "../../scsi/NCR5380.c" #include "../NCR5380.c"
static Scsi_Host_Template cumanascsi_template = { static Scsi_Host_Template cumanascsi_template = {
.module = THIS_MODULE, .module = THIS_MODULE,
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#include "fas216.h" #include "fas216.h"
#include "scsi.h" #include "scsi.h"
...@@ -356,10 +356,10 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length) ...@@ -356,10 +356,10 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset, int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset,
int length, int host_no, int inout) int length, int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct cumanascsi2_info *info; struct cumanascsi2_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -370,18 +370,16 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset, ...@@ -370,18 +370,16 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset,
info = (struct cumanascsi2_info *)host->hostdata; info = (struct cumanascsi2_info *)host->hostdata;
begin = 0; p += sprintf(p, "Cumana SCSI II driver v%s\n", VERSION);
pos = sprintf(buffer, "Cumana SCSI II driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += sprintf(p, "Term : o%s\n",
pos += sprintf(buffer + pos, "Term : o%s\n",
info->terms ? "n" : "ff"); info->terms ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos); p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
pos += sprintf(buffer+pos, "\nAttached devices:\n"); *start = buffer + offset;
pos = p - buffer - offset;
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
......
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#define NCR5380_implementation_fields int port, ctrl #define NCR5380_implementation_fields int port, ctrl
#define NCR5380_local_declare() struct Scsi_Host *_instance #define NCR5380_local_declare() struct Scsi_Host *_instance
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#define NCR5380_queue_command ecoscsi_queue_command #define NCR5380_queue_command ecoscsi_queue_command
#define NCR5380_proc_info ecoscsi_proc_info #define NCR5380_proc_info ecoscsi_proc_info
#include "../../scsi/NCR5380.h" #include "../NCR5380.h"
#define ECOSCSI_PUBLIC_RELEASE 1 #define ECOSCSI_PUBLIC_RELEASE 1
...@@ -239,7 +239,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset, ...@@ -239,7 +239,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset,
#define BOARD_NORMAL 0 #define BOARD_NORMAL 0
#define BOARD_NCR53C400 1 #define BOARD_NCR53C400 1
#include "../../scsi/NCR5380.c" #include "../NCR5380.c"
static Scsi_Host_Template ecoscsi_template = { static Scsi_Host_Template ecoscsi_template = {
.module = THIS_MODULE, .module = THIS_MODULE,
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
#include <asm/ecard.h> #include <asm/ecard.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#include "fas216.h" #include "fas216.h"
#include "scsi.h" #include "scsi.h"
...@@ -430,10 +430,10 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) ...@@ -430,10 +430,10 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
int eesoxscsi_proc_info(char *buffer, char **start, off_t offset, int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
int length, int host_no, int inout) int length, int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct eesoxscsi_info *info; struct eesoxscsi_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -444,16 +444,15 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -444,16 +444,15 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
info = (struct eesoxscsi_info *)host->hostdata; info = (struct eesoxscsi_info *)host->hostdata;
begin = 0; p += sprintf(p, "EESOX SCSI driver v%s\n", VERSION);
pos = sprintf(buffer, "EESOX SCSI driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += sprintf(p, "Term : o%s\n",
pos += sprintf(buffer + pos, "Term : o%s\n",
info->control & EESOX_TERM_ENABLE ? "n" : "ff"); info->control & EESOX_TERM_ENABLE ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos); pos += fas216_print_stats(&info->info, buffer + pos);
p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
......
...@@ -177,7 +177,6 @@ typedef enum { ...@@ -177,7 +177,6 @@ typedef enum {
PHASE_SELSTEPS, /* selection with command steps */ PHASE_SELSTEPS, /* selection with command steps */
PHASE_COMMAND, /* command sent */ PHASE_COMMAND, /* command sent */
PHASE_MESSAGESENT, /* selected, and we're sending cmd */ PHASE_MESSAGESENT, /* selected, and we're sending cmd */
PHASE_RECONNECTED, /* reconnected */
PHASE_DATAOUT, /* data out to device */ PHASE_DATAOUT, /* data out to device */
PHASE_DATAIN, /* data in from device */ PHASE_DATAIN, /* data in from device */
PHASE_MSGIN, /* message in from device */ PHASE_MSGIN, /* message in from device */
...@@ -244,12 +243,6 @@ typedef struct { ...@@ -244,12 +243,6 @@ typedef struct {
const char *type; /* chip type */ const char *type; /* chip type */
unsigned int irq; /* interrupt */ unsigned int irq; /* interrupt */
struct {
unsigned char target; /* reconnected target */
unsigned char lun; /* reconnected lun */
unsigned char tag; /* reconnected tag */
} reconnected;
Scsi_Pointer SCp; /* current commands data pointer */ Scsi_Pointer SCp; /* current commands data pointer */
MsgQueue_t msgs; /* message queue for connected device */ MsgQueue_t msgs; /* message queue for connected device */
...@@ -368,7 +361,7 @@ extern void fas216_release (struct Scsi_Host *instance); ...@@ -368,7 +361,7 @@ extern void fas216_release (struct Scsi_Host *instance);
extern int fas216_print_host(FAS216_Info *info, char *buffer); extern int fas216_print_host(FAS216_Info *info, char *buffer);
extern int fas216_print_stats(FAS216_Info *info, char *buffer); extern int fas216_print_stats(FAS216_Info *info, char *buffer);
extern int fas216_print_device(FAS216_Info *info, Scsi_Device *scd, char *buffer); extern int fas216_print_devices(FAS216_Info *info, char *buffer);
/* Function: int fas216_eh_abort(Scsi_Cmnd *SCpnt) /* Function: int fas216_eh_abort(Scsi_Cmnd *SCpnt)
* Purpose : abort this command * Purpose : abort this command
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#define AUTOSENSE #define AUTOSENSE
/*#define PSEUDO_DMA*/ /*#define PSEUDO_DMA*/
...@@ -40,7 +40,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset, ...@@ -40,7 +40,7 @@ int NCR5380_proc_info(char *buffer, char **start, off_t offset,
#define BOARD_NORMAL 0 #define BOARD_NORMAL 0
#define BOARD_NCR53C400 1 #define BOARD_NCR53C400 1
#include "../../scsi/NCR5380.h" #include "../NCR5380.h"
#undef START_DMA_INITIATOR_RECEIVE_REG #undef START_DMA_INITIATOR_RECEIVE_REG
#define START_DMA_INITIATOR_RECEIVE_REG (7 + 128) #define START_DMA_INITIATOR_RECEIVE_REG (7 + 128)
...@@ -112,7 +112,7 @@ printk("reading %p len %d\n", addr, len); ...@@ -112,7 +112,7 @@ printk("reading %p len %d\n", addr, len);
#undef STAT #undef STAT
#include "../../scsi/NCR5380.c" #include "../NCR5380.c"
static Scsi_Host_Template oakscsi_template = { static Scsi_Host_Template oakscsi_template = {
.module = THIS_MODULE, .module = THIS_MODULE,
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#include "../../scsi/hosts.h" #include "../hosts.h"
#include "fas216.h" #include "fas216.h"
#include "scsi.h" #include "scsi.h"
...@@ -242,10 +242,10 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length) ...@@ -242,10 +242,10 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
int powertecscsi_proc_info(char *buffer, char **start, off_t offset, int powertecscsi_proc_info(char *buffer, char **start, off_t offset,
int length, int host_no, int inout) int length, int host_no, int inout)
{ {
int pos, begin;
struct Scsi_Host *host; struct Scsi_Host *host;
struct powertec_info *info; struct powertec_info *info;
Scsi_Device *scd; char *p = buffer;
int pos;
host = scsi_host_hn_get(host_no); host = scsi_host_hn_get(host_no);
if (!host) if (!host)
...@@ -256,29 +256,16 @@ int powertecscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -256,29 +256,16 @@ int powertecscsi_proc_info(char *buffer, char **start, off_t offset,
info = (struct powertec_info *)host->hostdata; info = (struct powertec_info *)host->hostdata;
begin = 0; p += sprintf(p, "PowerTec SCSI driver v%s\n", VERSION);
pos = sprintf(buffer, "PowerTec SCSI driver v%s\n", VERSION); p += fas216_print_host(&info->info, p);
pos += fas216_print_host(&info->info, buffer + pos); p += sprintf(p, "Term : o%s\n",
pos += sprintf(buffer + pos, "Term : o%s\n",
info->term_ctl ? "n" : "ff"); info->term_ctl ? "n" : "ff");
pos += fas216_print_stats(&info->info, buffer + pos); p += fas216_print_stats(&info->info, p);
p += fas216_print_devices(&info->info, p);
pos += sprintf(buffer+pos, "\nAttached devices:\n"); *start = buffer + offset;
pos = p - buffer - offset;
list_for_each_entry(scd, &host->my_devices, siblings) {
pos += fas216_print_device(&info->info, scd, buffer + pos);
if (pos + begin < offset) {
begin += pos;
pos = 0;
}
if (pos + begin > offset + length)
break;
}
*start = buffer + (offset - begin);
pos -= offset - begin;
if (pos > length) if (pos > length)
pos = length; pos = length;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/init.h> #include <linux/init.h>
#include "../../scsi/scsi.h" #include "../scsi.h"
#define DEBUG #define DEBUG
......
...@@ -146,7 +146,7 @@ cyber2000_seqw(unsigned int reg, unsigned int val, struct cfb_info *cfb) ...@@ -146,7 +146,7 @@ cyber2000_seqw(unsigned int reg, unsigned int val, struct cfb_info *cfb)
* Hardware Cyber2000 Acceleration * Hardware Cyber2000 Acceleration
*/ */
static void static void
cyber2000fb_fillrect(struct fb_info *info, struct fb_fillrect *rect) cyber2000fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{ {
struct cfb_info *cfb = (struct cfb_info *)info; struct cfb_info *cfb = (struct cfb_info *)info;
unsigned long dst, col; unsigned long dst, col;
...@@ -178,7 +178,7 @@ cyber2000fb_fillrect(struct fb_info *info, struct fb_fillrect *rect) ...@@ -178,7 +178,7 @@ cyber2000fb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
} }
static void static void
cyber2000fb_copyarea(struct fb_info *info, struct fb_copyarea *region) cyber2000fb_copyarea(struct fb_info *info, const struct fb_copyarea *region)
{ {
struct cfb_info *cfb = (struct cfb_info *)info; struct cfb_info *cfb = (struct cfb_info *)info;
unsigned int cmd = CO_CMD_L_PATTERN_FGCOL; unsigned int cmd = CO_CMD_L_PATTERN_FGCOL;
...@@ -189,24 +189,25 @@ cyber2000fb_copyarea(struct fb_info *info, struct fb_copyarea *region) ...@@ -189,24 +189,25 @@ cyber2000fb_copyarea(struct fb_info *info, struct fb_copyarea *region)
return; return;
} }
cyber2000fb_writeb(0, CO_REG_CONTROL, cfb);
cyber2000fb_writew(region->width - 1, CO_REG_PIXWIDTH, cfb);
cyber2000fb_writew(region->height - 1, CO_REG_PIXHEIGHT, cfb);
src = region->sx + region->sy * cfb->fb.var.xres_virtual;
dst = region->dx + region->dy * cfb->fb.var.xres_virtual;
if (region->sx < region->dx) { if (region->sx < region->dx) {
region->sx += region->width - 1; src += region->width - 1;
region->dx += region->width - 1; dst += region->width - 1;
cmd |= CO_CMD_L_INC_LEFT; cmd |= CO_CMD_L_INC_LEFT;
} }
if (region->sy < region->dy) { if (region->sy < region->dy) {
region->sy += region->height - 1; src += (region->height - 1) * cfb->fb.var.xres_virtual;
region->dy += region->height - 1; dst += (region->height - 1) * cfb->fb.var.xres_virtual;
cmd |= CO_CMD_L_INC_UP; cmd |= CO_CMD_L_INC_UP;
} }
cyber2000fb_writeb(0, CO_REG_CONTROL, cfb);
cyber2000fb_writew(region->width - 1, CO_REG_PIXWIDTH, cfb);
cyber2000fb_writew(region->height - 1, CO_REG_PIXHEIGHT, cfb);
src = region->sx + region->sy * cfb->fb.var.xres_virtual;
dst = region->dx + region->dy * cfb->fb.var.xres_virtual;
if (cfb->fb.var.bits_per_pixel == 24) { if (cfb->fb.var.bits_per_pixel == 24) {
cyber2000fb_writeb(dst, CO_REG_X_PHASE, cfb); cyber2000fb_writeb(dst, CO_REG_X_PHASE, cfb);
src *= 3; src *= 3;
...@@ -221,9 +222,9 @@ cyber2000fb_copyarea(struct fb_info *info, struct fb_copyarea *region) ...@@ -221,9 +222,9 @@ cyber2000fb_copyarea(struct fb_info *info, struct fb_copyarea *region)
} }
static void static void
cyber2000fb_imageblit(struct fb_info *info, struct fb_image *image) cyber2000fb_imageblit(struct fb_info *info, const struct fb_image *image)
{ {
struct cfb_info *cfb = (struct cfb_info *)info; // struct cfb_info *cfb = (struct cfb_info *)info;
// if (!(cfb->fb.var.accel_flags & FB_ACCELF_TEXT)) { // if (!(cfb->fb.var.accel_flags & FB_ACCELF_TEXT)) {
cfb_imageblit(info, image); cfb_imageblit(info, image);
...@@ -754,7 +755,6 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -754,7 +755,6 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->blue.msb_right = 0; var->blue.msb_right = 0;
switch (var->bits_per_pixel) { switch (var->bits_per_pixel) {
#ifdef FBCON_HAS_CFB8
case 8: /* PSEUDOCOLOUR, 256 */ case 8: /* PSEUDOCOLOUR, 256 */
var->transp.offset = 0; var->transp.offset = 0;
var->transp.length = 0; var->transp.length = 0;
...@@ -765,8 +765,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -765,8 +765,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->blue.offset = 0; var->blue.offset = 0;
var->blue.length = 8; var->blue.length = 8;
break; break;
#endif
#ifdef FBCON_HAS_CFB16
case 16:/* DIRECTCOLOUR, 64k or 32k */ case 16:/* DIRECTCOLOUR, 64k or 32k */
switch (var->green.length) { switch (var->green.length) {
case 6: /* RGB565, 64k */ case 6: /* RGB565, 64k */
...@@ -804,8 +803,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -804,8 +803,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
break; break;
} }
break; break;
#endif
#ifdef FBCON_HAS_CFB24
case 24:/* TRUECOLOUR, 16m */ case 24:/* TRUECOLOUR, 16m */
var->transp.offset = 0; var->transp.offset = 0;
var->transp.length = 0; var->transp.length = 0;
...@@ -816,8 +814,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -816,8 +814,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->blue.offset = 0; var->blue.offset = 0;
var->blue.length = 8; var->blue.length = 8;
break; break;
#endif
#ifdef FBCON_HAS_CFB32
case 32:/* TRUECOLOUR, 16m */ case 32:/* TRUECOLOUR, 16m */
var->transp.offset = 24; var->transp.offset = 24;
var->transp.length = 8; var->transp.length = 8;
...@@ -828,7 +825,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -828,7 +825,7 @@ cyber2000fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->blue.offset = 0; var->blue.offset = 0;
var->blue.length = 8; var->blue.length = 8;
break; break;
#endif
default: default:
return -EINVAL; return -EINVAL;
} }
...@@ -1601,15 +1598,17 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1601,15 +1598,17 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
/* /*
* Use MCLK from BIOS. FIXME: what about hotplug? * Use MCLK from BIOS. FIXME: what about hotplug?
*/ */
#ifndef __arm__
cfb->mclk_mult = cyber2000_grphr(EXT_MCLK_MULT, cfb); cfb->mclk_mult = cyber2000_grphr(EXT_MCLK_MULT, cfb);
cfb->mclk_div = cyber2000_grphr(EXT_MCLK_DIV, cfb); cfb->mclk_div = cyber2000_grphr(EXT_MCLK_DIV, cfb);
#else
#ifdef __arm__
/* /*
* MCLK on the NetWinder and the Shark is fixed at 75MHz * MCLK on the NetWinder and the Shark is fixed at 75MHz
*/ */
cfb->mclk_mult = 0xdb; if (machine_is_netwinder()) {
cfb->mclk_div = 0x54; cfb->mclk_mult = 0xdb;
cfb->mclk_div = 0x54;
}
#endif #endif
err = cyberpro_common_probe(cfb); err = cyberpro_common_probe(cfb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment