mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
sh: Kill off dead boards.
None of these have been maintained in years, and no one seems to be interested in doing so, so just get rid of them. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -89,12 +89,6 @@ config SH_7751_SYSTEMH
|
||||
Select SystemH if you are configuring for a Renesas SystemH
|
||||
7751R evaluation board.
|
||||
|
||||
config SH_STB1_HARP
|
||||
bool "STB1_Harp"
|
||||
|
||||
config SH_STB1_OVERDRIVE
|
||||
bool "STB1_Overdrive"
|
||||
|
||||
config SH_HP6XX
|
||||
bool "HP6XX"
|
||||
help
|
||||
@@ -102,19 +96,6 @@ config SH_HP6XX
|
||||
More information (hardware only) at
|
||||
<http://www.hp.com/jornada/>.
|
||||
|
||||
config SH_CQREEK
|
||||
bool "CqREEK"
|
||||
help
|
||||
Select CqREEK if configuring for a CqREEK SH7708 or SH7750.
|
||||
More information at
|
||||
<http://sources.redhat.com/ecos/hardware.html#SuperH>.
|
||||
|
||||
config SH_DMIDA
|
||||
bool "DMIDA"
|
||||
help
|
||||
Select DMIDA if configuring for a DataMyte 4000 Industrial
|
||||
Digital Assistant. More information at <http://www.dmida.com/>.
|
||||
|
||||
config SH_EC3104
|
||||
bool "EC3104"
|
||||
help
|
||||
@@ -136,25 +117,9 @@ config SH_DREAMCAST
|
||||
<http://www.m17n.org/linux-sh/dreamcast/>. There is a
|
||||
Dreamcast project is at <http://linuxdc.sourceforge.net/>.
|
||||
|
||||
config SH_CAT68701
|
||||
bool "CAT68701"
|
||||
|
||||
config SH_BIGSUR
|
||||
bool "BigSur"
|
||||
|
||||
config SH_SH2000
|
||||
bool "SH2000"
|
||||
select CPU_SUBTYPE_SH7709
|
||||
help
|
||||
SH-2000 is a single-board computer based around SH7709A chip
|
||||
intended for embedded applications.
|
||||
It has an Ethernet interface (CS8900A), direct connected
|
||||
Compact Flash socket, three serial ports and PC-104 bus.
|
||||
More information at <http://sh2000.sh-linux.org>.
|
||||
|
||||
config SH_ADX
|
||||
bool "ADX"
|
||||
|
||||
config SH_MPC1211
|
||||
bool "Interface MPC1211"
|
||||
help
|
||||
@@ -246,7 +211,7 @@ source "arch/sh/mm/Kconfig"
|
||||
|
||||
config CF_ENABLER
|
||||
bool "Compact Flash Enabler support"
|
||||
depends on SH_ADX || SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_CAT68701 || SH_SH03
|
||||
depends on SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_SH03
|
||||
---help---
|
||||
Compact Flash is a small, removable mass storage device introduced
|
||||
in 1994 originally as a PCMCIA device. If you say `Y' here, you
|
||||
@@ -274,7 +239,7 @@ config CF_AREA5
|
||||
- "Area5" if CompactFlash is connected to Area 5 (0x14000000)
|
||||
- "Area6" if it is connected to Area 6 (0x18000000)
|
||||
|
||||
"Area6" will work for most boards. For ADX, select "Area5".
|
||||
"Area6" will work for most boards.
|
||||
|
||||
config CF_AREA6
|
||||
bool "Area6"
|
||||
@@ -418,8 +383,8 @@ source "arch/sh/cchips/Kconfig"
|
||||
|
||||
config HEARTBEAT
|
||||
bool "Heartbeat LED"
|
||||
depends on SH_MPC1211 || SH_SH03 || SH_CAT68701 || \
|
||||
SH_STB1_HARP || SH_STB1_OVERDRIVE || SH_BIGSUR || \
|
||||
depends on SH_MPC1211 || SH_SH03 || \
|
||||
SH_BIGSUR || \
|
||||
SH_7751_SOLUTION_ENGINE || SH_7300_SOLUTION_ENGINE || \
|
||||
SH_73180_SOLUTION_ENGINE || SH_SOLUTION_ENGINE || \
|
||||
SH_RTS7751R2D || SH_SH4202_MICRODEV || SH_LANDISK
|
||||
|
||||
@@ -90,18 +90,11 @@ machdir-$(CONFIG_SH_SOLUTION_ENGINE) := se/770x
|
||||
machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) := se/7751
|
||||
machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) := se/7300
|
||||
machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se/73180
|
||||
machdir-$(CONFIG_SH_STB1_HARP) := harp
|
||||
machdir-$(CONFIG_SH_STB1_OVERDRIVE) := overdrive
|
||||
machdir-$(CONFIG_SH_HP6XX) := hp6xx
|
||||
machdir-$(CONFIG_SH_CQREEK) := cqreek
|
||||
machdir-$(CONFIG_SH_DMIDA) := dmida
|
||||
machdir-$(CONFIG_SH_EC3104) := ec3104
|
||||
machdir-$(CONFIG_SH_SATURN) := saturn
|
||||
machdir-$(CONFIG_SH_DREAMCAST) := dreamcast
|
||||
machdir-$(CONFIG_SH_CAT68701) := cat68701
|
||||
machdir-$(CONFIG_SH_BIGSUR) := bigsur
|
||||
machdir-$(CONFIG_SH_SH2000) := sh2000
|
||||
machdir-$(CONFIG_SH_ADX) := adx
|
||||
machdir-$(CONFIG_SH_MPC1211) := mpc1211
|
||||
machdir-$(CONFIG_SH_SH03) := sh03
|
||||
machdir-$(CONFIG_SH_SECUREEDGE5410) := snapgear
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# Makefile for ADX boards
|
||||
#
|
||||
|
||||
obj-y := setup.o irq.o irq_maskreq.o
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/adx/irq.c
|
||||
*
|
||||
* Copyright (C) 2001 A&D Co., Ltd.
|
||||
*
|
||||
* I/O routine and setup routines for A&D ADX Board
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <asm/irq.h>
|
||||
|
||||
void init_adx_IRQ(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* printk("init_adx_IRQ()\n");*/
|
||||
/* setup irq_mask_register */
|
||||
irq_mask_register = (unsigned short *)0xa6000008;
|
||||
|
||||
/* cover all external interrupt area by maskreg_irq_type
|
||||
* (Actually, irq15 doesn't exist)
|
||||
*/
|
||||
for (i = 0; i < 16; i++) {
|
||||
make_maskreg_irq(i);
|
||||
disable_irq(i);
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/kernel/irq_maskreg.c
|
||||
*
|
||||
* Copyright (C) 2001 A&D Co., Ltd. <http://www.aandd.co.jp>
|
||||
*
|
||||
* This file may be copied or modified under the terms of the GNU
|
||||
* General Public License. See linux/COPYING for more information.
|
||||
*
|
||||
* Interrupt handling for Simple external interrupt mask register
|
||||
*
|
||||
* This is for the machine which have single 16 bit register
|
||||
* for masking external IRQ individually.
|
||||
* Each bit of the register is for masking each interrupt.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/machvec.h>
|
||||
|
||||
/* address of external interrupt mask register
|
||||
* address must be set prior to use these (maybe in init_XXX_irq())
|
||||
* XXX : is it better to use .config than specifying it in code? */
|
||||
unsigned short *irq_mask_register = 0;
|
||||
|
||||
/* forward declaration */
|
||||
static unsigned int startup_maskreg_irq(unsigned int irq);
|
||||
static void shutdown_maskreg_irq(unsigned int irq);
|
||||
static void enable_maskreg_irq(unsigned int irq);
|
||||
static void disable_maskreg_irq(unsigned int irq);
|
||||
static void mask_and_ack_maskreg(unsigned int);
|
||||
static void end_maskreg_irq(unsigned int irq);
|
||||
|
||||
/* hw_interrupt_type */
|
||||
static struct hw_interrupt_type maskreg_irq_type = {
|
||||
.typename = " Mask Register",
|
||||
.startup = startup_maskreg_irq,
|
||||
.shutdown = shutdown_maskreg_irq,
|
||||
.enable = enable_maskreg_irq,
|
||||
.disable = disable_maskreg_irq,
|
||||
.ack = mask_and_ack_maskreg,
|
||||
.end = end_maskreg_irq
|
||||
};
|
||||
|
||||
/* actual implementatin */
|
||||
static unsigned int startup_maskreg_irq(unsigned int irq)
|
||||
{
|
||||
enable_maskreg_irq(irq);
|
||||
return 0; /* never anything pending */
|
||||
}
|
||||
|
||||
static void shutdown_maskreg_irq(unsigned int irq)
|
||||
{
|
||||
disable_maskreg_irq(irq);
|
||||
}
|
||||
|
||||
static void disable_maskreg_irq(unsigned int irq)
|
||||
{
|
||||
if (irq_mask_register) {
|
||||
unsigned long flags;
|
||||
unsigned short val, mask = 0x01 << irq;
|
||||
|
||||
/* Set "irq"th bit */
|
||||
local_irq_save(flags);
|
||||
val = ctrl_inw((unsigned long)irq_mask_register);
|
||||
val |= mask;
|
||||
ctrl_outw(val, (unsigned long)irq_mask_register);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void enable_maskreg_irq(unsigned int irq)
|
||||
{
|
||||
if (irq_mask_register) {
|
||||
unsigned long flags;
|
||||
unsigned short val, mask = ~(0x01 << irq);
|
||||
|
||||
/* Clear "irq"th bit */
|
||||
local_irq_save(flags);
|
||||
val = ctrl_inw((unsigned long)irq_mask_register);
|
||||
val &= mask;
|
||||
ctrl_outw(val, (unsigned long)irq_mask_register);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void mask_and_ack_maskreg(unsigned int irq)
|
||||
{
|
||||
disable_maskreg_irq(irq);
|
||||
}
|
||||
|
||||
static void end_maskreg_irq(unsigned int irq)
|
||||
{
|
||||
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
|
||||
enable_maskreg_irq(irq);
|
||||
}
|
||||
|
||||
void make_maskreg_irq(unsigned int irq)
|
||||
{
|
||||
disable_irq_nosync(irq);
|
||||
irq_desc[irq].chip = &maskreg_irq_type;
|
||||
disable_maskreg_irq(irq);
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/board/adx/setup.c
|
||||
*
|
||||
* Copyright (C) 2001 A&D Co., Ltd.
|
||||
*
|
||||
* I/O routine and setup routines for A&D ADX Board
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <asm/machvec.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
extern void init_adx_IRQ(void);
|
||||
extern void *cf_io_base;
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return "A&D ADX";
|
||||
}
|
||||
|
||||
unsigned long adx_isa_port2addr(unsigned long offset)
|
||||
{
|
||||
/* CompactFlash (IDE) */
|
||||
if (((offset >= 0x1f0) && (offset <= 0x1f7)) || (offset == 0x3f6)) {
|
||||
return (unsigned long)cf_io_base + offset;
|
||||
}
|
||||
|
||||
/* eth0 */
|
||||
if ((offset >= 0x300) && (offset <= 0x30f)) {
|
||||
return 0xa5000000 + offset; /* COMM BOARD (AREA1) */
|
||||
}
|
||||
|
||||
return offset + 0xb0000000; /* IOBUS (AREA 4)*/
|
||||
}
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
|
||||
struct sh_machine_vector mv_adx __initmv = {
|
||||
.mv_nr_irqs = 48,
|
||||
.mv_isa_port2addr = adx_isa_port2addr,
|
||||
.mv_init_irq = init_adx_IRQ,
|
||||
};
|
||||
ALIAS_MV(adx)
|
||||
|
||||
int __init platform_setup(void)
|
||||
{
|
||||
/* Nothing to see here .. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# Makefile for the CAT-68701 specific parts of the kernel
|
||||
#
|
||||
|
||||
obj-y := setup.o irq.o
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/cat68701/irq.c
|
||||
*
|
||||
* Copyright (C) 2000 Niibe Yutaka
|
||||
* 2001 Yutaro Ebihara
|
||||
*
|
||||
* Setup routines for A-ONE Corp CAT-68701 SH7708 Board
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <asm/irq.h>
|
||||
|
||||
int cat68701_irq_demux(int irq)
|
||||
{
|
||||
if(irq==13) return 14;
|
||||
if(irq==7) return 10;
|
||||
return irq;
|
||||
}
|
||||
|
||||
void init_cat68701_IRQ()
|
||||
{
|
||||
make_imask_irq(10);
|
||||
make_imask_irq(14);
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/cat68701/setup.c
|
||||
*
|
||||
* Copyright (C) 2000 Niibe Yutaka
|
||||
* 2001 Yutaro Ebihara
|
||||
*
|
||||
* Setup routines for A-ONE Corp CAT-68701 SH7708 Board
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/mach/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return "CAT-68701";
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HEARTBEAT
|
||||
void heartbeat_cat68701()
|
||||
{
|
||||
static unsigned int cnt = 0, period = 0 , bit = 0;
|
||||
cnt += 1;
|
||||
if (cnt < period) {
|
||||
return;
|
||||
}
|
||||
cnt = 0;
|
||||
|
||||
/* Go through the points (roughly!):
|
||||
* f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
|
||||
*/
|
||||
period = 110 - ( (300<<FSHIFT)/
|
||||
((avenrun[0]/5) + (3<<FSHIFT)) );
|
||||
|
||||
if(bit){ bit=0; }else{ bit=1; }
|
||||
outw(bit<<15,0x3fe);
|
||||
}
|
||||
#endif /* CONFIG_HEARTBEAT */
|
||||
|
||||
unsigned long cat68701_isa_port2addr(unsigned long offset)
|
||||
{
|
||||
/* CompactFlash (IDE) */
|
||||
if (((offset >= 0x1f0) && (offset <= 0x1f7)) || (offset==0x3f6))
|
||||
return 0xba000000 + offset;
|
||||
|
||||
/* INPUT PORT */
|
||||
if ((offset >= 0x3fc) && (offset <= 0x3fd))
|
||||
return 0xb4007000 + offset;
|
||||
|
||||
/* OUTPUT PORT */
|
||||
if ((offset >= 0x3fe) && (offset <= 0x3ff))
|
||||
return 0xb4007400 + offset;
|
||||
|
||||
return offset + 0xb4000000; /* other I/O (EREA 5)*/
|
||||
}
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
|
||||
struct sh_machine_vector mv_cat68701 __initmv = {
|
||||
.mv_nr_irqs = 32,
|
||||
.mv_isa_port2addr = cat68701_isa_port2addr,
|
||||
.mv_irq_demux = cat68701_irq_demux,
|
||||
|
||||
.mv_init_irq = init_cat68701_IRQ,
|
||||
#ifdef CONFIG_HEARTBEAT
|
||||
.mv_heartbeat = heartbeat_cat68701,
|
||||
#endif
|
||||
};
|
||||
ALIAS_MV(cat68701)
|
||||
|
||||
int __init platform_setup(void)
|
||||
{
|
||||
/* dummy read erea5 (CS8900A) */
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# Makefile for the CqREEK specific parts of the kernel
|
||||
#
|
||||
|
||||
obj-y := setup.o irq.o
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
/* $Id: irq.c,v 1.1.2.4 2002/11/04 20:33:56 lethal Exp $
|
||||
*
|
||||
* arch/sh/boards/cqreek/irq.c
|
||||
*
|
||||
* Copyright (C) 2000 Niibe Yutaka
|
||||
*
|
||||
* CqREEK IDE/ISA Bridge Support.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/irq.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/cqreek/cqreek.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/io_generic.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/machvec_init.h>
|
||||
#include <asm/rtc.h>
|
||||
|
||||
struct cqreek_irq_data {
|
||||
unsigned short mask_port; /* Port of Interrupt Mask Register */
|
||||
unsigned short stat_port; /* Port of Interrupt Status Register */
|
||||
unsigned short bit; /* Value of the bit */
|
||||
};
|
||||
static struct cqreek_irq_data cqreek_irq_data[NR_IRQS];
|
||||
|
||||
static void disable_cqreek_irq(unsigned int irq)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned short mask;
|
||||
unsigned short mask_port = cqreek_irq_data[irq].mask_port;
|
||||
unsigned short bit = cqreek_irq_data[irq].bit;
|
||||
|
||||
local_irq_save(flags);
|
||||
/* Disable IRQ */
|
||||
mask = inw(mask_port) & ~bit;
|
||||
outw_p(mask, mask_port);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static void enable_cqreek_irq(unsigned int irq)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned short mask;
|
||||
unsigned short mask_port = cqreek_irq_data[irq].mask_port;
|
||||
unsigned short bit = cqreek_irq_data[irq].bit;
|
||||
|
||||
local_irq_save(flags);
|
||||
/* Enable IRQ */
|
||||
mask = inw(mask_port) | bit;
|
||||
outw_p(mask, mask_port);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static void mask_and_ack_cqreek(unsigned int irq)
|
||||
{
|
||||
unsigned short stat_port = cqreek_irq_data[irq].stat_port;
|
||||
unsigned short bit = cqreek_irq_data[irq].bit;
|
||||
|
||||
disable_cqreek_irq(irq);
|
||||
/* Clear IRQ (it might be edge IRQ) */
|
||||
inw(stat_port);
|
||||
outw_p(bit, stat_port);
|
||||
}
|
||||
|
||||
static void end_cqreek_irq(unsigned int irq)
|
||||
{
|
||||
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
|
||||
enable_cqreek_irq(irq);
|
||||
}
|
||||
|
||||
static unsigned int startup_cqreek_irq(unsigned int irq)
|
||||
{
|
||||
enable_cqreek_irq(irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void shutdown_cqreek_irq(unsigned int irq)
|
||||
{
|
||||
disable_cqreek_irq(irq);
|
||||
}
|
||||
|
||||
static struct hw_interrupt_type cqreek_irq_type = {
|
||||
.typename = "CqREEK-IRQ",
|
||||
.startup = startup_cqreek_irq,
|
||||
.shutdown = shutdown_cqreek_irq,
|
||||
.enable = enable_cqreek_irq,
|
||||
.disable = disable_cqreek_irq,
|
||||
.ack = mask_and_ack_cqreek,
|
||||
.end = end_cqreek_irq
|
||||
};
|
||||
|
||||
int cqreek_has_ide, cqreek_has_isa;
|
||||
|
||||
/* XXX: This is just for test for my NE2000 ISA board
|
||||
What we really need is virtualized IRQ and demultiplexer like HP600 port */
|
||||
void __init init_cqreek_IRQ(void)
|
||||
{
|
||||
if (cqreek_has_ide) {
|
||||
cqreek_irq_data[14].mask_port = BRIDGE_IDE_INTR_MASK;
|
||||
cqreek_irq_data[14].stat_port = BRIDGE_IDE_INTR_STAT;
|
||||
cqreek_irq_data[14].bit = 1;
|
||||
|
||||
irq_desc[14].chip = &cqreek_irq_type;
|
||||
irq_desc[14].status = IRQ_DISABLED;
|
||||
irq_desc[14].action = 0;
|
||||
irq_desc[14].depth = 1;
|
||||
|
||||
disable_cqreek_irq(14);
|
||||
}
|
||||
|
||||
if (cqreek_has_isa) {
|
||||
cqreek_irq_data[10].mask_port = BRIDGE_ISA_INTR_MASK;
|
||||
cqreek_irq_data[10].stat_port = BRIDGE_ISA_INTR_STAT;
|
||||
cqreek_irq_data[10].bit = (1 << 10);
|
||||
|
||||
/* XXX: Err... we may need demultiplexer for ISA irq... */
|
||||
irq_desc[10].chip = &cqreek_irq_type;
|
||||
irq_desc[10].status = IRQ_DISABLED;
|
||||
irq_desc[10].action = 0;
|
||||
irq_desc[10].depth = 1;
|
||||
|
||||
disable_cqreek_irq(10);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/* $Id: setup.c,v 1.5 2003/08/04 01:51:58 lethal Exp $
|
||||
*
|
||||
* arch/sh/kernel/setup_cqreek.c
|
||||
*
|
||||
* Copyright (C) 2000 Niibe Yutaka
|
||||
*
|
||||
* CqREEK IDE/ISA Bridge Support.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
#include <asm/mach/cqreek.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/io_generic.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/rtc.h>
|
||||
|
||||
#define IDE_OFFSET 0xA4000000UL
|
||||
#define ISA_OFFSET 0xA4A00000UL
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return "CqREEK";
|
||||
}
|
||||
|
||||
static unsigned long cqreek_port2addr(unsigned long port)
|
||||
{
|
||||
if (0x0000<=port && port<=0x0040)
|
||||
return IDE_OFFSET + port;
|
||||
if ((0x01f0<=port && port<=0x01f7) || port == 0x03f6)
|
||||
return IDE_OFFSET + port;
|
||||
|
||||
return ISA_OFFSET + port;
|
||||
}
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
struct sh_machine_vector mv_cqreek __initmv = {
|
||||
#if defined(CONFIG_CPU_SH4)
|
||||
.mv_nr_irqs = 48,
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7708)
|
||||
.mv_nr_irqs = 32,
|
||||
#elif defined(CONFIG_CPU_SUBTYPE_SH7709)
|
||||
.mv_nr_irqs = 61,
|
||||
#endif
|
||||
|
||||
.mv_init_irq = init_cqreek_IRQ,
|
||||
|
||||
.mv_isa_port2addr = cqreek_port2addr,
|
||||
};
|
||||
ALIAS_MV(cqreek)
|
||||
|
||||
/*
|
||||
* Initialize the board
|
||||
*/
|
||||
void __init platform_setup(void)
|
||||
{
|
||||
int i;
|
||||
/* udelay is not available at setup time yet... */
|
||||
#define DELAY() do {for (i=0; i<10000; i++) ctrl_inw(0xa0000000);} while(0)
|
||||
|
||||
if ((inw (BRIDGE_FEATURE) & 1)) { /* We have IDE interface */
|
||||
outw_p(0, BRIDGE_IDE_INTR_LVL);
|
||||
outw_p(0, BRIDGE_IDE_INTR_MASK);
|
||||
|
||||
outw_p(0, BRIDGE_IDE_CTRL);
|
||||
DELAY();
|
||||
|
||||
outw_p(0x8000, BRIDGE_IDE_CTRL);
|
||||
DELAY();
|
||||
|
||||
outw_p(0xffff, BRIDGE_IDE_INTR_STAT); /* Clear interrupt status */
|
||||
outw_p(0x0f-14, BRIDGE_IDE_INTR_LVL); /* Use 14 IPR */
|
||||
outw_p(1, BRIDGE_IDE_INTR_MASK); /* Enable interrupt */
|
||||
cqreek_has_ide=1;
|
||||
}
|
||||
|
||||
if ((inw (BRIDGE_FEATURE) & 2)) { /* We have ISA interface */
|
||||
outw_p(0, BRIDGE_ISA_INTR_LVL);
|
||||
outw_p(0, BRIDGE_ISA_INTR_MASK);
|
||||
|
||||
outw_p(0, BRIDGE_ISA_CTRL);
|
||||
DELAY();
|
||||
outw_p(0x8000, BRIDGE_ISA_CTRL);
|
||||
DELAY();
|
||||
|
||||
outw_p(0xffff, BRIDGE_ISA_INTR_STAT); /* Clear interrupt status */
|
||||
outw_p(0x0f-10, BRIDGE_ISA_INTR_LVL); /* Use 10 IPR */
|
||||
outw_p(0xfff8, BRIDGE_ISA_INTR_MASK); /* Enable interrupt */
|
||||
cqreek_has_isa=1;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "CqREEK Setup (IDE=%d, ISA=%d)...done\n", cqreek_has_ide, cqreek_has_isa);
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#
|
||||
# Makefile for the DataMyte Industrial Digital Assistant(tm) specific parts
|
||||
# of the kernel
|
||||
#
|
||||
|
||||
obj-y := mach.o
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/dmida/mach.c
|
||||
*
|
||||
* by Greg Banks <gbanks@pocketpenguins.com>
|
||||
* (c) 2000 PocketPenguins Inc
|
||||
*
|
||||
* Derived from mach_hp600.c, which bore the message:
|
||||
* Copyright (C) 2000 Stuart Menefy (stuart.menefy@st.com)
|
||||
*
|
||||
* May be copied or modified under the terms of the GNU General Public
|
||||
* License. See linux/COPYING for more information.
|
||||
*
|
||||
* Machine vector for the DataMyte Industrial Digital Assistant(tm).
|
||||
* See http://www.dmida.com
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/rtc.h>
|
||||
#include <asm/machvec_init.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/hd64465/hd64465.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
|
||||
struct sh_machine_vector mv_dmida __initmv = {
|
||||
.mv_nr_irqs = HD64465_IRQ_BASE+HD64465_IRQ_NUM,
|
||||
|
||||
.mv_inb = hd64465_inb,
|
||||
.mv_inw = hd64465_inw,
|
||||
.mv_inl = hd64465_inl,
|
||||
.mv_outb = hd64465_outb,
|
||||
.mv_outw = hd64465_outw,
|
||||
.mv_outl = hd64465_outl,
|
||||
|
||||
.mv_inb_p = hd64465_inb_p,
|
||||
.mv_inw_p = hd64465_inw,
|
||||
.mv_inl_p = hd64465_inl,
|
||||
.mv_outb_p = hd64465_outb_p,
|
||||
.mv_outw_p = hd64465_outw,
|
||||
.mv_outl_p = hd64465_outl,
|
||||
|
||||
.mv_insb = hd64465_insb,
|
||||
.mv_insw = hd64465_insw,
|
||||
.mv_insl = hd64465_insl,
|
||||
.mv_outsb = hd64465_outsb,
|
||||
.mv_outsw = hd64465_outsw,
|
||||
.mv_outsl = hd64465_outsl,
|
||||
|
||||
.mv_irq_demux = hd64465_irq_demux,
|
||||
};
|
||||
ALIAS_MV(dmida)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#
|
||||
# Makefile for STMicroelectronics board specific parts of the kernel
|
||||
#
|
||||
|
||||
obj-y := irq.o setup.o mach.o led.o
|
||||
|
||||
obj-$(CONFIG_PCI) += pcidma.o
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000 David J. Mckay (david.mckay@st.com)
|
||||
*
|
||||
* May be copied or modified under the terms of the GNU General Public
|
||||
* License. See linux/COPYING for more information.
|
||||
*
|
||||
* Looks after interrupts on the HARP board.
|
||||
*
|
||||
* Bases on the IPR irq system
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/harp/harp.h>
|
||||
|
||||
|
||||
#define NUM_EXTERNAL_IRQS 16
|
||||
|
||||
// Early versions of the STB1 Overdrive required this nasty frig
|
||||
//#define INVERT_INTMASK_WRITES
|
||||
|
||||
static void enable_harp_irq(unsigned int irq);
|
||||
static void disable_harp_irq(unsigned int irq);
|
||||
|
||||
/* shutdown is same as "disable" */
|
||||
#define shutdown_harp_irq disable_harp_irq
|
||||
|
||||
static void mask_and_ack_harp(unsigned int);
|
||||
static void end_harp_irq(unsigned int irq);
|
||||
|
||||
static unsigned int startup_harp_irq(unsigned int irq)
|
||||
{
|
||||
enable_harp_irq(irq);
|
||||
return 0; /* never anything pending */
|
||||
}
|
||||
|
||||
static struct hw_interrupt_type harp_irq_type = {
|
||||
.typename = "Harp-IRQ",
|
||||
.startup = startup_harp_irq,
|
||||
.shutdown = shutdown_harp_irq,
|
||||
.enable = enable_harp_irq,
|
||||
.disable = disable_harp_irq,
|
||||
.ack = mask_and_ack_harp,
|
||||
.end = end_harp_irq
|
||||
};
|
||||
|
||||
static void disable_harp_irq(unsigned int irq)
|
||||
{
|
||||
unsigned val, flags;
|
||||
unsigned maskReg;
|
||||
unsigned mask;
|
||||
int pri;
|
||||
|
||||
if (irq < 0 || irq >= NUM_EXTERNAL_IRQS)
|
||||
return;
|
||||
|
||||
pri = 15 - irq;
|
||||
|
||||
if (pri < 8) {
|
||||
maskReg = EPLD_INTMASK0;
|
||||
} else {
|
||||
maskReg = EPLD_INTMASK1;
|
||||
pri -= 8;
|
||||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
mask = ctrl_inl(maskReg);
|
||||
mask &= (~(1 << pri));
|
||||
#if defined(INVERT_INTMASK_WRITES)
|
||||
mask ^= 0xff;
|
||||
#endif
|
||||
ctrl_outl(mask, maskReg);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static void enable_harp_irq(unsigned int irq)
|
||||
{
|
||||
unsigned flags;
|
||||
unsigned maskReg;
|
||||
unsigned mask;
|
||||
int pri;
|
||||
|
||||
if (irq < 0 || irq >= NUM_EXTERNAL_IRQS)
|
||||
return;
|
||||
|
||||
pri = 15 - irq;
|
||||
|
||||
if (pri < 8) {
|
||||
maskReg = EPLD_INTMASK0;
|
||||
} else {
|
||||
maskReg = EPLD_INTMASK1;
|
||||
pri -= 8;
|
||||
}
|
||||
|
||||
local_irq_save(flags);
|
||||
mask = ctrl_inl(maskReg);
|
||||
|
||||
|
||||
mask |= (1 << pri);
|
||||
|
||||
#if defined(INVERT_INTMASK_WRITES)
|
||||
mask ^= 0xff;
|
||||
#endif
|
||||
ctrl_outl(mask, maskReg);
|
||||
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
/* This functions sets the desired irq handler to be an overdrive type */
|
||||
static void __init make_harp_irq(unsigned int irq)
|
||||
{
|
||||
disable_irq_nosync(irq);
|
||||
irq_desc[irq].chip = &harp_irq_type;
|
||||
disable_harp_irq(irq);
|
||||
}
|
||||
|
||||
static void mask_and_ack_harp(unsigned int irq)
|
||||
{
|
||||
disable_harp_irq(irq);
|
||||
}
|
||||
|
||||
static void end_harp_irq(unsigned int irq)
|
||||
{
|
||||
enable_harp_irq(irq);
|
||||
}
|
||||
|
||||
void __init init_harp_irq(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#if !defined(INVERT_INTMASK_WRITES)
|
||||
// On the harp these are set to enable an interrupt
|
||||
ctrl_outl(0x00, EPLD_INTMASK0);
|
||||
ctrl_outl(0x00, EPLD_INTMASK1);
|
||||
#else
|
||||
// On the Overdrive the data is inverted before being stored in the reg
|
||||
ctrl_outl(0xff, EPLD_INTMASK0);
|
||||
ctrl_outl(0xff, EPLD_INTMASK1);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NUM_EXTERNAL_IRQS; i++) {
|
||||
make_harp_irq(i);
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/stboards/led.c
|
||||
*
|
||||
* Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com>
|
||||
*
|
||||
* May be copied or modified under the terms of the GNU General Public
|
||||
* License. See linux/COPYING for more information.
|
||||
*
|
||||
* This file contains ST40STB1 HARP and compatible code.
|
||||
*/
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/harp/harp.h>
|
||||
|
||||
/* Harp: Flash LD10 (front pannel) connected to EPLD (IC8) */
|
||||
/* Overdrive: Flash LD1 (front panel) connected to EPLD (IC4) */
|
||||
/* Works for HARP and overdrive */
|
||||
static void mach_led(int position, int value)
|
||||
{
|
||||
if (value) {
|
||||
ctrl_outl(EPLD_LED_ON, EPLD_LED);
|
||||
} else {
|
||||
ctrl_outl(EPLD_LED_OFF, EPLD_LED);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HEARTBEAT
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
||||
/* acts like an actual heart beat -- ie thump-thump-pause... */
|
||||
void heartbeat_harp(void)
|
||||
{
|
||||
static unsigned cnt = 0, period = 0, dist = 0;
|
||||
|
||||
if (cnt == 0 || cnt == dist)
|
||||
mach_led( -1, 1);
|
||||
else if (cnt == 7 || cnt == dist+7)
|
||||
mach_led( -1, 0);
|
||||
|
||||
if (++cnt > period) {
|
||||
cnt = 0;
|
||||
/* The hyperbolic function below modifies the heartbeat period
|
||||
* length in dependency of the current (5min) load. It goes
|
||||
* through the points f(0)=126, f(1)=86, f(5)=51,
|
||||
* f(inf)->30. */
|
||||
period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30;
|
||||
dist = period / 4;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* linux/arch/sh/boards/harp/mach.c
|
||||
*
|
||||
* Copyright (C) 2000 Stuart Menefy (stuart.menefy@st.com)
|
||||
*
|
||||
* May be copied or modified under the terms of the GNU General Public
|
||||
* License. See linux/COPYING for more information.
|
||||
*
|
||||
* Machine vector for the STMicroelectronics STB1 HARP and compatible boards
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/rtc.h>
|
||||
#include <asm/machvec_init.h>
|
||||
#include <asm/hd64465/io.h>
|
||||
#include <asm/hd64465/hd64465.h>
|
||||
|
||||
void setup_harp(void);
|
||||
void init_harp_irq(void);
|
||||
void heartbeat_harp(void);
|
||||
|
||||
/*
|
||||
* The Machine Vector
|
||||
*/
|
||||
|
||||
struct sh_machine_vector mv_harp __initmv = {
|
||||
.mv_nr_irqs = 89 + HD64465_IRQ_NUM,
|
||||
|
||||
.mv_inb = hd64465_inb,
|
||||
.mv_inw = hd64465_inw,
|
||||
.mv_inl = hd64465_inl,
|
||||
.mv_outb = hd64465_outb,
|
||||
.mv_outw = hd64465_outw,
|
||||
.mv_outl = hd64465_outl,
|
||||
|
||||
.mv_inb_p = hd64465_inb_p,
|
||||
.mv_inw_p = hd64465_inw,
|
||||
.mv_inl_p = hd64465_inl,
|
||||
.mv_outb_p = hd64465_outb_p,
|
||||
.mv_outw_p = hd64465_outw,
|
||||
.mv_outl_p = hd64465_outl,
|
||||
|
||||
.mv_insb = hd64465_insb,
|
||||
.mv_insw = hd64465_insw,
|
||||
.mv_insl = hd64465_insl,
|
||||
.mv_outsb = hd64465_outsb,
|
||||
.mv_outsw = hd64465_outsw,
|
||||
.mv_outsl = hd64465_outsl,
|
||||
|
||||
.mv_isa_port2addr = hd64465_isa_port2addr,
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
.mv_init_irq = init_harp_irq,
|
||||
#endif
|
||||
#ifdef CONFIG_HEARTBEAT
|
||||
.mv_heartbeat = heartbeat_harp,
|
||||
#endif
|
||||
};
|
||||
|
||||
ALIAS_MV(harp)
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
|
||||
*
|
||||
* May be copied or modified under the terms of the GNU General Public
|
||||
* License. See linux/COPYING for more information.
|
||||
*
|
||||
* Dynamic DMA mapping support.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/pci.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/addrspace.h>
|
||||
|
||||
|
||||
void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
|
||||
dma_addr_t * dma_handle)
|
||||
{
|
||||
void *ret;
|
||||
int gfp = GFP_ATOMIC;
|
||||
|
||||
ret = (void *) __get_free_pages(gfp, get_order(size));
|
||||
|
||||
if (ret != NULL) {
|
||||
/* Is it neccessary to do the memset? */
|
||||
memset(ret, 0, size);
|
||||
*dma_handle = virt_to_bus(ret);
|
||||
}
|
||||
/* We must flush the cache before we pass it on to the device */
|
||||
flush_cache_all();
|
||||
return P2SEGADDR(ret);
|
||||
}
|
||||
|
||||
void pci_free_consistent(struct pci_dev *hwdev, size_t size,
|
||||
void *vaddr, dma_addr_t dma_handle)
|
||||
{
|
||||
unsigned long p1addr=P1SEGADDR((unsigned long)vaddr);
|
||||
|
||||
free_pages(p1addr, get_order(size));
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* arch/sh/stboard/setup.c
|
||||
*
|
||||
* Copyright (C) 2001 Stuart Menefy (stuart.menefy@st.com)
|
||||
*
|
||||
* May be copied or modified under the terms of the GNU General Public
|
||||
* License. See linux/COPYING for more information.
|
||||
*
|
||||
* STMicroelectronics ST40STB1 HARP and compatible support.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/harp/harp.h>
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return "STB1 Harp";
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the board
|
||||
*/
|
||||
int __init platform_setup(void)
|
||||
{
|
||||
#ifdef CONFIG_SH_STB1_HARP
|
||||
unsigned long ic8_version, ic36_version;
|
||||
|
||||
ic8_version = ctrl_inl(EPLD_REVID2);
|
||||
ic36_version = ctrl_inl(EPLD_REVID1);
|
||||
|
||||
printk("STMicroelectronics STB1 HARP initialisaton\n");
|
||||
printk("EPLD versions: IC8: %d.%02d, IC36: %d.%02d\n",
|
||||
(ic8_version >> 4) & 0xf, ic8_version & 0xf,
|
||||
(ic36_version >> 4) & 0xf, ic36_version & 0xf);
|
||||
#elif defined(CONFIG_SH_STB1_OVERDRIVE)
|
||||
unsigned long version;
|
||||
|
||||
version = ctrl_inl(EPLD_REVID);
|
||||
|
||||
printk("STMicroelectronics STB1 Overdrive initialisaton\n");
|
||||
printk("EPLD version: %d.%02d\n",
|
||||
(version >> 4) & 0xf, version & 0xf);
|
||||
#else
|
||||
#error Undefined machine
|
||||
#endif
|
||||
|
||||
/* Currently all STB1 chips have problems with the sleep instruction,
|
||||
* so disable it here.
|
||||
*/
|
||||
disable_hlt();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* pcibios_map_platform_irq
|
||||
*
|
||||
* This is board specific and returns the IRQ for a given PCI device.
|
||||
* It is used by the PCI code (arch/sh/kernel/st40_pci*)
|
||||
*
|
||||
*/
|
||||
|
||||
#define HARP_PCI_IRQ 1
|
||||
#define HARP_BRIDGE_IRQ 2
|
||||
#define OVERDRIVE_SLOT0_IRQ 0
|
||||
|
||||
|
||||
int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
switch (slot) {
|
||||
#ifdef CONFIG_SH_STB1_HARP
|
||||
case 2: /*This is the PCI slot on the */
|
||||
return HARP_PCI_IRQ;
|
||||
case 1: /* this is the bridge */
|
||||
return HARP_BRIDGE_IRQ;
|
||||
#elif defined(CONFIG_SH_STB1_OVERDRIVE)
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
return slot - 1;
|
||||
#else
|
||||
#error Unknown board
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user