If you don't want to compile a kernel exclusively for a Sun 3, say N.
config X68000
- bool "SHARP X68000 support"
- depends on !MMU
- select M68000
+ bool "SHARP X680x0 support"
+ select M68000 if !MMU
+ select M68030 if MMU
+ select MMU_MOTOROLA if MMU
select GENERIC_CLOCKEVENTS
help
- This option enbales support for SHARP X68000 series (exclude X68030).
+ This option enbales support for SHARP X680x0 series.
endif # M68KCLASSIC
head-$(CONFIG_SUN3) := arch/m68k/kernel/sun3-head.o
head-$(CONFIG_M68000) := arch/m68k/68000/head.o
head-$(CONFIG_COLDFIRE) := arch/m68k/coldfire/head.o
+ifndef CONFIG_MMU
head-$(CONFIG_X68000) := arch/m68k/x68k/head.o
+endif
core-y += arch/m68k/kernel/ arch/m68k/mm/
libs-y += arch/m68k/lib/
#define MACH_SUN3X 11
#define MACH_M54XX 12
#define MACH_M5441X 13
-
+#define MACH_X68000 14
/*
* CPU, FPU and MMU types (BI_CPUTYPE, BI_FPUTYPE, BI_MMUTYPE)
extra-$(CONFIG_HP300) := head.o
extra-$(CONFIG_Q40) := head.o
extra-$(CONFIG_SUN3X) := head.o
+extra-$(CONFIG_X68000) := head.o
extra-$(CONFIG_SUN3) := sun3-head.o
extra-y += vmlinux.lds
#define is_not_apollo(lab) cmpl &MACH_APOLLO,%pc@(m68k_machtype); jne lab
#define is_not_q40(lab) cmpl &MACH_Q40,%pc@(m68k_machtype); jne lab
#define is_not_sun3x(lab) cmpl &MACH_SUN3X,%pc@(m68k_machtype); jne lab
+#define is_not_x68000(lab) cmpl &MACH_X68000,%pc@(m68k_machtype); jne lab
#define hasnt_leds(lab) cmpl &MACH_HP300,%pc@(m68k_machtype); \
jeq 42f; \
jbra L(mmu_init_done)
#endif
+#ifdef CONFIG_X68000
+ is_not_x68000(L(notx68000))
+
+ putc 'X'
+ mmu_map #0xff000000,#0x00000000,#0x01000000,#_PAGE_NOCACHE030
+
+L(notx68000):
+ jbra L(mmu_init_done)
+#endif
+
L(mmu_init_done):
putc 'G'
#endif
#endif /* CONFIG_ATARI */
+#ifdef CONFIG_X68000
+/* Initialisation table for SCC with 5 MHz PCLK */
+L(scc_initable_x68000):
+ .byte 4,0x44 /* x16, 1 stopbit, no parity */
+ .byte 3,0xc0 /* receiver: 8 bpc */
+ .byte 5,0xe2 /* transmitter: 8 bpc, assert dtr/rts */
+ .byte 14,0x00 /* Baud rate generator disable */
+ .byte 12,2,13,0 /* 38400 baud */
+ .byte 14,0x03 /* Baud rate generator enable */
+ .byte 3,0xc1 /* enable receiver */
+ .byte 5,0xea /* enable transmitter */
+ .byte -1
+ .even
+#endif /* CONFIG_X68000 */
+
/*
* Serial port output support.
*/
* a0 = address of SCC
* a1 = address of scc_initable_mac
* d0 = init data for serial port
+ * CONFIG_X68000
+ * a0 = address of SCC
+ * a1 = address of scc_initable_mac
+ * d0 = init data for serial port
*/
#ifdef CONFIG_AMIGA
/* We count on the boot loader initialising the UART */
#endif
+#ifdef CONFIG_X68000
+ is_not_x68000(1f)
+ movel #X68K_SCC_CTRL_A,%a0
+ /* Reset SCC register pointer */
+ moveb %a0@,%d0
+ /* Reset SCC device: write register pointer then register value */
+ moveb #9,%a0@
+ moveb #0xc0,%a0@
+ /* Wait for 5 PCLK cycles, which is about 33 CPU cycles */
+ /* 5 / 5 MHz = approx. 0.1 us = 33 MHz */
+ movel #10,%d0
+3:
+ subq #1,%d0
+ jne 3b
+ lea %pc@(L(scc_initable_x68000)),%a1
+2: moveb %a1@+,%d0
+ jmi 1f
+ moveb %d0,%a0@
+ moveb %a1@+,%a0@
+ jra 2b
+1:
+#endif
L(serial_init_done):
func_return serial_init
jbra L(serial_putc_done)
3:
#endif
+#ifdef CONFIG_X68000
+ is_not_x68000(5f)
+3: btst #2,X68K_SCC_CTRL_A
+ jeq 3b
+ moveb %d0,X68K_SCC_DATA_A
+ jra L(serial_putc_done)
+5:
+#endif /* CONFIG_X68000 */
L(serial_putc_done):
func_return serial_putc
.long -1
#endif
+#if defined (CONFIG_X68000)
+X68K_SCC_CTRL_A = 0xffe98005
+X68K_SCC_DATA_A = 0xffe98007
+#endif
+
__FINIT
.data
.align 4
extern void config_hp300(void);
extern void config_q40(void);
extern void config_sun3x(void);
+extern void config_x68k(void);
#define MASK_256K 0xfffc0000
config_BSP(NULL, 0);
break;
#endif
+#ifdef CONFIG_X68000
+ case MACH_X68000:
+ config_x68k();
+ break;
+#endif
default:
panic("No configuration setup");
}
#
# Copyright 2016 Yoshinori Sato
+ifndef CONFIG_MMU
extra-y := head.o
-obj-y += entry.o ints.o mfp-timer.o x68k.o zs_earlyprintk.o
+obj-y += entry.o ints.o
+endif
+obj-y += mfp-timer.o x68k.o
+obj-$(CONFIG_MMU) += x68kints.o
targets := vmlinux.bin vmlinux.bin.gz
#include <linux/clockchips.h>
#define INPUT_FREQ (4000000 / 200)
-#define MFP_IRQ 0x44
+#define MFP_IRQ 12
+#if !defined(CONFIG_MMU)
#define TDDR (void *)0xe88025
#define TCDCR (void *)0xe8801d
#define IERB (void *)0xe88009
#define IMRB (void *)0xe88015
+#else
+#define TDDR (void *)0xffe88025
+#define TCDCR (void *)0xffe8801d
+#define IERB (void *)0xffe88009
+#define IMRB (void *)0xffe88015
+#endif
static irqreturn_t interrupt(int irq, void *dev_id)
{
void __init hw_timer_init(irq_handler_t handler)
{
- if (request_irq(MFP_IRQ, interrupt, IRQF_TIMER, "timer", &mfp_ced) < 0) {
- pr_err("%s: Failed to request_irq\n", __func__);
+ int ret;
+ ret = request_irq(MFP_IRQ, interrupt, IRQF_TIMER, "timer", &mfp_ced);
+ if (ret < 0) {
+ pr_err("%s: Failed to request_irq %d\n", __func__, ret);
return;
}
clockevents_config_and_register(&mfp_ced, INPUT_FREQ, 2, 0xff);
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <asm/machdep.h>
+#include <asm/io.h>
#include <asm/scsi_spc.h>
+extern void x68k_init_IRQ(void);
+
/***************************************************************************/
static void reset(void)
{
- __asm__ volatile("movw #0x2700,%sr\n\t"
- "movel #0xff0000, %a0\n\t"
+ local_irq_disable(); /* lets not screw this up, ok? */
+ if (CPU_IS_030) {
+
+ /* 030-specific reset routine. The idea is general, but the
+ * specific registers to reset are '030-specific. Until I
+ * have a non-030 machine, I can't test anything else.
+ * -- C. Scott Ananian <cananian@alumni.princeton.edu>
+ */
+
+ unsigned long rombase = 0x40000000;
+
+ /* make a 1-to-1 mapping, using the transparent tran. reg. */
+ unsigned long virt = (unsigned long) reset;
+ unsigned long phys = virt_to_phys(reset);
+ unsigned long addr = (phys&0xFF000000)|0x8777;
+ unsigned long offset = phys-virt;
+
+ __asm__ __volatile__(".chip 68030\n\t"
+ "pmove %0,%/tt0\n\t"
+ ".chip 68k"
+ : : "m" (addr));
+ /* Now jump to physical address so we can disable MMU */
+ __asm__ __volatile__(
+ ".chip 68030\n\t"
+ "lea %/pc@(1f),%/a0\n\t"
+ "addl %0,%/a0\n\t"/* fixup target address and stack ptr */
+ "addl %0,%/sp\n\t"
+ "pflusha\n\t"
+ "jmp %/a0@\n\t" /* jump into physical memory */
+ "0:.long 0\n\t" /* a constant zero. */
+ /* OK. Now reset everything and jump to reset vector. */
+ "1:\n\t"
+ "lea %/pc@(0b),%/a0\n\t"
+ "pmove %/a0@, %/tc\n\t" /* disable mmu */
+ "pmove %/a0@, %/tt0\n\t" /* disable tt0 */
+ "pmove %/a0@, %/tt1\n\t" /* disable tt1 */
+ "movel #0, %/a0\n\t"
+ "movec %/a0, %/vbr\n\t" /* clear vector base register */
+ "movec %/a0, %/cacr\n\t" /* disable caches */
+ "movel #0x0808,%/a0\n\t"
+ "movec %/a0, %/cacr\n\t" /* flush i&d caches */
+ "movew #0x2700,%/sr\n\t" /* set up status register */
+ "movel %1@(0x0),%/a0\n\t"/* load interrupt stack pointer */
+ "movec %/a0, %/isp\n\t"
+ ".chip 68k"
+ : : "r" (offset), "a" (rombase) : "a0");
+ } else {
+ __asm__ volatile( "movel #0xff0000, %a0\n\t"
"movel %a0@+,%sp\n\t"
"movel %a0@+,%a1\n\t"
"jmp %a1@");
+ }
}
+#if !defined(CONFIG_MMU)
+#define SYSPORT6 0xe8e00f
+#else
+#define SYSPORT6 0xffe8e00f
+#endif
+
static void poweroff(void)
{
- __raw_writeb(0x00, (void *)0xe8e00f);
- __raw_writeb(0x0f, (void *)0xe8e00f);
- __raw_writeb(0x0f, (void *)0xe8e00f);
+ __raw_writeb(0x00, (void *)SYSPORT6);
+ __raw_writeb(0x0f, (void *)SYSPORT6);
+ __raw_writeb(0x0f, (void *)SYSPORT6);
}
+#if !defined(CONFIG_MMU)
void __init config_BSP(char *command, int len)
{
mach_sched_init = hw_timer_init;
mach_power_off = poweroff;
memcpy(command, (void *)0x7e00, len);
}
+#else
+void __init config_x68k(void)
+{
+ mach_sched_init = hw_timer_init;
+ mach_init_IRQ = x68k_init_IRQ;
+ mach_hwclk = NULL;
+ mach_reset = reset;
+ mach_max_dma_address = 0xffffff;
+ mach_power_off = poweroff;
+}
+
+#endif
struct resource scc_a_rsrcs[] = {
{
.flags = IORESOURCE_MEM,
- .start = 0xe98005,
- .end = 0xe98007,
+ .start = 0xffe98005,
+ .end = 0xffe98007,
},
{
.flags = IORESOURCE_IRQ,
- .start = 0x50,
+ .start = 24,
},
};
static struct resource spc_rsrcs[] = {
{
.flags = IORESOURCE_MEM,
- .start = 0xe96020,
- .end = 0xe96040,
+ .start = 0xffe96020,
+ .end = 0xffe96040,
},
{
.flags = IORESOURCE_IRQ,
- .start = 0x6c,
+ .start = 52,
},
};
static int __init x68k_platform_init(void)
{
- __raw_writeb(0, (void *)0xe86001);
+ __raw_writeb(0, (void *)0xffe86001);
platform_add_devices(x68k_devices, ARRAY_SIZE(x68k_devices));
return 0;
#include <linux/io.h>
#include <linux/platform_device.h>
+#if !defined(CONFIG_MMU)
#define CMD ((void *)0xe98005)
#define DATA ((void *)0xe98007)
+#else
+#define CMD ((void *)0xffe98005)
+#define DATA ((void *)0xffe98007)
+#endif
static void zs_write(struct console *co, const char *ptr,
unsigned len)
struct x68k_partition_info *pi;
int slot;
- rs = read_part_sector(state, 4, §);
+ rs = read_part_sector(state, 2 * 2, §);
if (!rs)
return -1;
pi = &rs->partition[0];
for (slot = 1; slot < 16; slot++, pi++) {
- if (pi->start >= 0x01000000 || !pi->start)
+ if (!pi->start)
continue;
put_partition(state, slot,
- be32_to_cpu(pi->start) * 2,
- be32_to_cpu(pi->length) * 2);
+ (be32_to_cpu(pi->start) & 0xffffff) * 2,
+ (be32_to_cpu(pi->length) & 0xffffff) * 2);
}
strlcat(state->pp_buf, "\n", PAGE_SIZE);
MODULE_DESCRIPTION("X68000 MFP serial driver");
MODULE_LICENSE("GPL");
-#define MFP_USART (void *)0xe88027
+#define MFP_USART (void *)0xffe88027
#define MFP_CSR (MFP_USART + 0)
#define MFP_UCR (MFP_USART + 2)
#define MFP_RSR (MFP_USART + 4)
#define MFP_CTL_TIMEOUT 1000
#define MFP_KBD_PHYS_DESC "X68Kbus/serio"
-#define MFP_KBD_IRQ 0x4c
+#define MFP_KBD_IRQ 20
/*
* mfp_lock protects serialization between mfp_command and
/* Some macros to manipulate ports and their bits */
#define SETPORT(VAL, PORT) outb( (VAL), shpnt->base + (PORT) )
+
#define GETPORT(PORT) inb( shpnt->base + PORT )
*
*/
struct spc_hostdata {
- Scsi_Cmnd *issue_SC;
+ struct scsi_cmnd *issue_SC;
/* pending commands to issue */
- Scsi_Cmnd *current_SC;
+ struct scsi_cmnd *current_SC;
/* current command on the bus */
- Scsi_Cmnd *disconnected_SC;
+ struct scsi_cmnd *disconnected_SC;
/* commands that disconnected */
- Scsi_Cmnd *done_SC;
+ struct scsi_cmnd *done_SC;
/* command that was completed */
spinlock_t lock;
*
*/
struct spc_scdata {
- Scsi_Cmnd *next; /* next sc in queue */
+ struct scsi_cmnd *next; /* next sc in queue */
struct completion *done;/* semaphore to block on */
struct scsi_eh_save ses;
};
/* setup & interrupt */
static irqreturn_t spc_intr(int irq, void *dev_id);
-static void reset_ports(struct Scsi_Host *shpnt);
static void spc_error(struct Scsi_Host *shpnt, char *msg);
static void done(struct Scsi_Host *shpnt, int error);
/* diagnostics */
-static void show_command(Scsi_Cmnd * ptr);
+static void show_command(struct scsi_cmnd * ptr);
static void show_queues(struct Scsi_Host *shpnt);
* queue services:
*
*/
-static inline void append_SC(Scsi_Cmnd **SC, Scsi_Cmnd *new_SC)
+static inline void append_SC(struct scsi_cmnd **SC, struct scsi_cmnd *new_SC)
{
- Scsi_Cmnd *end;
+ struct scsi_cmnd *end;
SCNEXT(new_SC) = NULL;
if (!*SC)
}
}
-static inline Scsi_Cmnd *remove_first_SC(Scsi_Cmnd ** SC)
+static inline struct scsi_cmnd *remove_first_SC(struct scsi_cmnd ** SC)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
ptr = *SC;
if (ptr) {
return ptr;
}
-static inline Scsi_Cmnd *remove_lun_SC(Scsi_Cmnd ** SC, int target, int lun)
+static inline struct scsi_cmnd *remove_lun_SC(struct scsi_cmnd ** SC, int target, int lun)
{
- Scsi_Cmnd *ptr, *prev;
+ struct scsi_cmnd *ptr, *prev;
for (ptr = *SC, prev = NULL;
ptr && ((ptr->device->id != target) || (ptr->device->lun != lun));
return ptr;
}
-static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, Scsi_Cmnd *SCp)
+static inline struct scsi_cmnd *remove_SC(struct scsi_cmnd **SC, struct scsi_cmnd *SCp)
{
- Scsi_Cmnd *ptr, *prev;
+ struct scsi_cmnd *ptr, *prev;
for (ptr = *SC, prev = NULL;
ptr && SCp!=ptr;
/*
* Queue a command and setup interrupts for a free bus.
*/
-static int spc_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
- int phase, void (*done)(Scsi_Cmnd *))
+static int spc_internal_queue(struct scsi_cmnd *SCpnt, struct completion *complete,
+ int phase, void (*done)(struct scsi_cmnd *))
{
struct Scsi_Host *shpnt = SCpnt->device->host;
unsigned long flags;
* queue a command
*
*/
-static int spc_queue_lck(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+static int spc_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
return spc_internal_queue(SCpnt, NULL, 0, done);
}
/*
*
*/
-static void reset_done(Scsi_Cmnd *SCpnt)
+static void reset_done(struct scsi_cmnd *SCpnt)
{
if(SCSEM(SCpnt)) {
complete(SCSEM(SCpnt));
* Abort a command
*
*/
-static int spc_abort(Scsi_Cmnd *SCpnt)
+static int spc_abort(struct scsi_cmnd *SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->device->host;
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
unsigned long flags;
DO_LOCK(flags);
* Reset a device
*
*/
-static int spc_device_reset(Scsi_Cmnd * SCpnt)
+static int spc_device_reset(struct scsi_cmnd * SCpnt)
{
struct Scsi_Host *shpnt = SCpnt->device->host;
DECLARE_COMPLETION(done);
return ret;
}
-static void free_hard_reset_SCs(struct Scsi_Host *shpnt, Scsi_Cmnd **SCs)
+static void free_hard_reset_SCs(struct Scsi_Host *shpnt, struct scsi_cmnd **SCs)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
ptr=*SCs;
while(ptr) {
- Scsi_Cmnd *next;
+ struct scsi_cmnd *next;
if(SCDATA(ptr)) {
next = SCNEXT(ptr);
* Reset the bus
*
*/
-static int spc_bus_reset_host(struct Scsi_Host *shpnt)
+static int spc_bus_reset_host(struct scsi_cmnd *cmd)
{
+ struct Scsi_Host *shpnt = cmd->device->host;
unsigned long flags;
DO_LOCK(flags);
* Reset the host (bus and controller)
*
*/
-static int spc_host_reset(Scsi_Cmnd *SCpnt)
+static int spc_host_reset(struct scsi_cmnd *SCpnt)
{
spc_host_reset_host(SCpnt->device->host);
- spc_bus_reset_host(SCpnt->device->host);
+ spc_bus_reset_host(SCpnt);
return SUCCESS;
}
if(!(DONE_SC->SCp.phase & not_issued)) {
struct spc_scdata *sc;
- Scsi_Cmnd *ptr = DONE_SC;
+ struct scsi_cmnd *ptr = DONE_SC;
DONE_SC=NULL;
sc = SCDATA(ptr);
}
if(DONE_SC && DONE_SC->scsi_done) {
- Scsi_Cmnd *ptr = DONE_SC;
+ struct scsi_cmnd *ptr = DONE_SC;
DONE_SC=NULL;
HOSTDATA(shpnt)->commands--;
HOSTDATA(shpnt)->busfree_without_new_command++;
#endif
HOSTDATA(shpnt)->sctl = GETPORT(SCTL) |
- (DISCONNECTED_SC?0x04:0x00) & 0xfe;
+ ((DISCONNECTED_SC ? 0x04 : 0x00) & 0xfe);
SETPORT(0x00, PCTL);
}
static void datai_init(struct Scsi_Host *shpnt)
{
SETPORT(0x01, PCTL);
- SETPORT(0x80, SCMD);
DATA_LEN=0;
}
static void datai_run(struct Scsi_Host *shpnt)
{
- char *p;
- int i;
-
/*
* loop while the phase persists or the fifos are not empty
*
*/
- while((GETPORT(SSTS) & 0x11) == 0x10) {
- /* FIXME: maybe this should be done by setting up
- * STCNT to trigger ENSWRAP interrupt, instead of
- * polling for DFIFOFULL
- */
+ do {
- if(CURRENT_SC->SCp.this_residual>0) {
- SETPORT(CURRENT_SC->SCp.this_residual >> 16, TCH);
- SETPORT((CURRENT_SC->SCp.this_residual >> 8) & 0xff, TCM);
- SETPORT(CURRENT_SC->SCp.this_residual & 0xff, TCL);
- SETPORT(0x80, SCMD);
+ SETPORT(CURRENT_SC->SCp.this_residual >> 16, TCH);
+ SETPORT((CURRENT_SC->SCp.this_residual >> 8) & 0xff, TCM);
+ SETPORT(CURRENT_SC->SCp.this_residual & 0xff, TCL);
+ SETPORT(0x80, SCMD);
- while(CURRENT_SC->SCp.this_residual>0) {
- *CURRENT_SC->SCp.ptr++ = GETPORT(DREG);
- CURRENT_SC->SCp.this_residual--;
- DATA_LEN++;
- }
- if (CURRENT_SC->SCp.buffers_residual > 0) {
- /* advance to next buffer */
- CURRENT_SC->SCp.buffers_residual--;
- CURRENT_SC->SCp.buffer++;
- CURRENT_SC->SCp.ptr = SG_ADDRESS(CURRENT_SC->SCp.buffer);
- CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length;
- } else
- break;
+ for (;CURRENT_SC->SCp.this_residual > 0;
+ CURRENT_SC->SCp.this_residual--) {
+ *CURRENT_SC->SCp.ptr++ = GETPORT(DREG);
+ DATA_LEN++;
}
- }
-
+ if (CURRENT_SC->SCp.buffers_residual > 0) {
+ CURRENT_SC->SCp.buffer = sg_next(CURRENT_SC->SCp.buffer);
+ CURRENT_SC->SCp.this_residual = CURRENT_SC->SCp.buffer->length;
+ CURRENT_SC->SCp.ptr = sg_virt(CURRENT_SC->SCp.buffer);
+ }
+ CURRENT_SC->SCp.buffers_residual--;
+ } while(CURRENT_SC->SCp.buffers_residual >= 0);
}
static void datai_end(struct Scsi_Host *shpnt)
static void datao_run(struct Scsi_Host *shpnt)
{
- unsigned long the_time;
- int data_count;
-
/* until phase changes or all data sent */
while(CURRENT_SC->SCp.this_residual>0) {
SETPORT(CURRENT_SC->SCp.this_residual >> 16, TCH);
} else if(ints & 0x02) {
STATE=parerr;
HOSTDATA(shpnt)->ints &= ~0x02;
- } else if((GETPORT(SSTS) & 0xf0) == 0xa0) {
+ } else if((GETPORT(SSTS) & 0xc0) == 0x80) {
switch(GETPORT(PSNS) & P_MASK) {
case P_MSGI: STATE=msgi; break;
case P_MSGO: STATE=msgo; break;
if(STATE!=PREVSTATE) {
LASTSTATE=PREVSTATE;
}
-
return dataphase;
}
*/
static void rsti_run(struct Scsi_Host *shpnt)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
shost_printk(KERN_NOTICE, shpnt, "scsi reset in\n");
ptr=DISCONNECTED_SC;
while(ptr) {
- Scsi_Cmnd *next = SCNEXT(ptr);
+ struct scsi_cmnd *next = SCNEXT(ptr);
if (!ptr->device->soft_reset) {
remove_SC(&DISCONNECTED_SC, ptr);
{
int dataphase = 0;
unsigned long flags;
- int pending;
if(!shpnt)
return;
/*
* Show the command data of a command
*/
-static void show_command(Scsi_Cmnd *ptr)
+static void show_command(struct scsi_cmnd *ptr)
{
scsi_print_command(ptr);
scmd_printk(KERN_DEBUG, ptr,
"request_bufflen=%d; resid=%d; "
- "phase |%s%s%s%s%s%s%s%s%s; next=0x%p",
+ "phase |%s%s%s%s%s%s%s%s; next=0x%p",
scsi_bufflen(ptr), scsi_get_resid(ptr),
(ptr->SCp.phase & not_issued) ? "not issued|" : "",
(ptr->SCp.phase & selecting) ? "selecting|" : "",
*/
static void show_queues(struct Scsi_Host *shpnt)
{
- Scsi_Cmnd *ptr;
+ struct scsi_cmnd *ptr;
unsigned long flags;
DO_LOCK(flags);
.bios_param = spc_biosparam,
.can_queue = 1,
.sg_tablesize = SG_ALL,
- .use_clustering = DISABLE_CLUSTERING,
.slave_alloc = spc_adjust_queue,
};
struct Scsi_Host *shpnt;
const struct resource *res;
struct spc_platform_data *pdata = pdev->dev.platform_data;
- struct resource *ret;
+ int ret;
shpnt = scsi_host_alloc(&spc_driver_template, sizeof(struct Scsi_Host));
if (!shpnt)
SETPORT(0x00, SCTL);
mdelay(256);
- printk(KERN_INFO "spc: io=0x%08x, irq=%d, scsiid=%d\n",
+ printk(KERN_INFO "spc: io=0x%08lx, irq=%d, scsiid=%d\n",
shpnt->base,
shpnt->irq,
shpnt->this_id);
if (!request_mem_region(res->start, res->end - res->start, "spc")) {
- printk(KERN_ERR "spc: mem %08x busy. %d\n", res->start);
+ printk(KERN_ERR "spc: mem %08x busy.\n", res->start);
ret = -EBUSY;
goto out_host_put1;
}
- if (ret = request_irq(shpnt->irq, spc_intr, IRQF_SHARED, "spc", shpnt)) {
- printk(KERN_ERR "spc: irq %d busy.\n", shpnt->irq);
+ ret = request_irq(shpnt->irq, spc_intr, IRQF_SHARED, "spc", shpnt);
+ if (ret) {
+ printk(KERN_ERR "spc: irq %d busy. %d\n", shpnt->irq, ret);
goto out_host_put2;
}
- if(ret = scsi_add_host(shpnt, NULL) ) {
+ ret = scsi_add_host(shpnt, NULL);
+ if (ret) {
printk(KERN_ERR "spc%d: failed to add host.\n", shpnt->host_no);
goto out_host_put3;
}
info->pseudo_palette = info->par;
info->par = NULL;
info->flags = FBINFO_FLAG_DEFAULT;
- info->pseudo_palette = (void *)0xe82000;;
+ info->pseudo_palette = (void *)0xffe82000;;
retval = fb_alloc_cmap(&info->cmap, 256, 0);
if (retval < 0)