summaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/hd64461.h37
-rw-r--r--include/asm-sh/hitachi_se.h16
-rw-r--r--include/asm-sh/ide.h22
-rw-r--r--include/asm-sh/io.h3
-rw-r--r--include/asm-sh/irq.h4
-rw-r--r--include/asm-sh/keyboard.h43
-rw-r--r--include/asm-sh/linux_logo.h48
-rw-r--r--include/asm-sh/pgtable.h14
-rw-r--r--include/asm-sh/processor.h1
-rw-r--r--include/asm-sh/ptrace.h8
-rw-r--r--include/asm-sh/uaccess.h10
11 files changed, 183 insertions, 23 deletions
diff --git a/include/asm-sh/hd64461.h b/include/asm-sh/hd64461.h
new file mode 100644
index 000000000..67110806d
--- /dev/null
+++ b/include/asm-sh/hd64461.h
@@ -0,0 +1,37 @@
+#ifndef __ASM_SH_HD64461
+#define __ASM_SH_HD64461
+/*
+ * $Id: hd64461.h,v 1.1 2000/06/10 21:45:48 yaegashi Exp $
+ * Copyright (C) 2000 YAEGASHI Takeshi
+ * Hitachi HD64461 companion chip support
+ */
+
+#define HD64461_CPTWAR 0x1030
+#define HD64461_CPTWDR 0x1032
+#define HD64461_CPTRAR 0x1034
+#define HD64461_CPTRDR 0x1036
+
+#define HD64461_PCC0ISR 0x2000
+#define HD64461_PCC0GCR 0x2002
+#define HD64461_PCC0CSCR 0x2004
+#define HD64461_PCC0CSCIER 0x2006
+#define HD64461_PCC0SCR 0x2008
+#define HD64461_PCC1ISR 0x2010
+#define HD64461_PCC1GCR 0x2012
+#define HD64461_PCC1CSCR 0x2014
+#define HD64461_PCC1CSCIER 0x2016
+#define HD64461_PCC1SCR 0x2018
+#define HD64461_P0OCR 0x202a
+#define HD64461_P1OCR 0x202c
+#define HD64461_PGCR 0x202e
+
+#define HD64461_NIRR 0x5000
+#define HD64461_NIMR 0x5002
+
+#ifndef CONFIG_HD64461_IOBASE
+#define CONFIG_HD64461_IOBASE 0xb0000000
+#endif
+
+#define HD64461_IRQBASE 64
+
+#endif
diff --git a/include/asm-sh/hitachi_se.h b/include/asm-sh/hitachi_se.h
index 282bbce8f..05b701e1f 100644
--- a/include/asm-sh/hitachi_se.h
+++ b/include/asm-sh/hitachi_se.h
@@ -39,6 +39,22 @@
#define PA_BCR 0xb1400000 /* FPGA */
#define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controler */
+#define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */
+#define PA_MRSHPC_MW2 0xb8500000 /* MR-SHPC-01 attribute window base */
+#define PA_MRSHPC_IO 0xb8600000 /* MR-SHPC-01 I/O window base */
+#define MRSHPC_OPTION (PA_MRSHPC + 6)
+#define MRSHPC_CSR (PA_MRSHPC + 8)
+#define MRSHPC_ISR (PA_MRSHPC + 10)
+#define MRSHPC_ICR (PA_MRSHPC + 12)
+#define MRSHPC_CPWCR (PA_MRSHPC + 14)
+#define MRSHPC_MW0CR1 (PA_MRSHPC + 16)
+#define MRSHPC_MW1CR1 (PA_MRSHPC + 18)
+#define MRSHPC_IOWCR1 (PA_MRSHPC + 20)
+#define MRSHPC_MW0CR2 (PA_MRSHPC + 22)
+#define MRSHPC_MW1CR2 (PA_MRSHPC + 24)
+#define MRSHPC_IOWCR2 (PA_MRSHPC + 26)
+#define MRSHPC_CDCR (PA_MRSHPC + 28)
+#define MRSHPC_PCIC_INFO (PA_MRSHPC + 30)
#define BCR_ILCRA (PA_BCR + 0)
#define BCR_ILCRB (PA_BCR + 2)
diff --git a/include/asm-sh/ide.h b/include/asm-sh/ide.h
index cc30fac03..1112ea36c 100644
--- a/include/asm-sh/ide.h
+++ b/include/asm-sh/ide.h
@@ -17,7 +17,7 @@
#include <linux/config.h>
#ifndef MAX_HWIFS
-#define MAX_HWIFS 1 /* XXX: For my board -- gniibe */
+#define MAX_HWIFS 1
#endif
#define ide__sti() __sti()
@@ -25,8 +25,13 @@
static __inline__ int ide_default_irq(ide_ioreg_t base)
{
switch (base) {
- case 0xba0001f0: return 14;
- case 0xba000170: return 14;
+#ifdef CONFIG_SH_HP600
+ case 0x201f0: return 77;
+ case 0x20170: return 77;
+#else
+ case 0x01f0: return 14;
+ case 0x0170: return 15;
+#endif
default:
return 0;
}
@@ -35,10 +40,17 @@ static __inline__ int ide_default_irq(ide_ioreg_t base)
static __inline__ ide_ioreg_t ide_default_io_base(int index)
{
switch (index) {
+#ifdef CONFIG_SH_HP600
+ case 0:
+ return 0x201f0;
+ case 1:
+ return 0x20170;
+#else
case 0:
- return 0xba0001f0;
+ return 0x1f0;
case 1:
- return 0xba000170;
+ return 0x170;
+#endif
default:
return 0;
}
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index c6de2a42a..0d516620c 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -85,9 +85,6 @@ extern unsigned long sh_isa_slot(unsigned long offset);
#define isa_memcpy_toio(a,b,c) \
memcpy((void *)(sh_isa_slot((unsigned long)(a))),(b),(c))
-#define ctrl_in(addr) *(addr)
-#define ctrl_out(data,addr) *(addr) = (data)
-
extern __inline__ unsigned long ctrl_inb(unsigned long addr)
{
return *(volatile unsigned char*)addr;
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index d013f35fc..951ad2e9f 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -43,8 +43,12 @@
#elif defined(CONFIG_CPU_SUBTYPE_SH7708)
#define NR_IRQS 32
#elif defined(CONFIG_CPU_SUBTYPE_SH7709)
+#ifdef CONFIG_HD64461
+#define NR_IRQS 80 /* HD64461_IRQBASE+16, see hd64461.h */
+#else
#define NR_IRQS 61
#endif
+#endif
extern void disable_irq(unsigned int);
extern void disable_irq_nosync(unsigned int);
diff --git a/include/asm-sh/keyboard.h b/include/asm-sh/keyboard.h
new file mode 100644
index 000000000..3a3f56940
--- /dev/null
+++ b/include/asm-sh/keyboard.h
@@ -0,0 +1,43 @@
+#ifndef __ASM_SH_KEYBOARD_H
+#define __ASM_SH_KEYBOARD_H
+/*
+ * $Id: keyboard.h,v 1.1 2000/06/10 21:45:48 yaegashi Exp $
+ */
+
+static __inline__ int kbd_setkeycode(unsigned int scancode,
+ unsigned int keycode)
+{
+ return -EOPNOTSUPP;
+}
+
+static __inline__ int kbd_getkeycode(unsigned int scancode)
+{
+ return scancode > 127 ? -EINVAL : scancode;
+}
+
+static __inline__ int kbd_translate(unsigned char scancode,
+ unsigned char *keycode, char raw_mode)
+{
+ *keycode = scancode;
+ return 1;
+}
+
+static __inline__ char kbd_unexpected_up(unsigned char keycode)
+{
+ return 0200;
+}
+
+static __inline__ void kbd_leds(unsigned char leds)
+{
+}
+
+#ifdef CONFIG_SH_HP600
+void __init hp600_kbd_init_hw(void);
+#define kbd_init_hw hp600_kbd_init_hw
+#else
+static __inline__ void kbd_init_hw(void)
+{
+}
+#endif
+
+#endif
diff --git a/include/asm-sh/linux_logo.h b/include/asm-sh/linux_logo.h
new file mode 100644
index 000000000..b7d11eddb
--- /dev/null
+++ b/include/asm-sh/linux_logo.h
@@ -0,0 +1,48 @@
+/* $Id: linux_logo.h,v 1.1 2000/06/10 21:45:48 yaegashi Exp $
+ * include/asm-sh/linux_logo.h: This is a linux logo
+ * to be displayed on boot.
+ *
+ * Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu)
+ * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ *
+ * You can put anything here, but:
+ * LINUX_LOGO_COLORS has to be less than 224
+ * image size has to be 80x80
+ * values have to start from 0x20
+ * (i.e. RGB(linux_logo_red[0],
+ * linux_logo_green[0],
+ * linux_logo_blue[0]) is color 0x20)
+ * BW image has to be 80x80 as well, with MS bit
+ * on the left
+ * Serial_console ascii image can be any size,
+ * but should contain %s to display the version
+ */
+
+#include <linux/init.h>
+#include <linux/version.h>
+
+#define linux_logo_banner "Linux/SuperH version " UTS_RELEASE
+
+#define LINUX_LOGO_COLORS 214
+
+#ifdef INCLUDE_LINUX_LOGO_DATA
+
+#define INCLUDE_LINUX_LOGOBW
+#define INCLUDE_LINUX_LOGO16
+
+#include <linux/linux_logo.h>
+
+#else
+
+/* prototypes only */
+extern unsigned char linux_logo_red[];
+extern unsigned char linux_logo_green[];
+extern unsigned char linux_logo_blue[];
+extern unsigned char linux_logo[];
+extern unsigned char linux_logo_bw[];
+extern unsigned char linux_logo16_red[];
+extern unsigned char linux_logo16_green[];
+extern unsigned char linux_logo16_blue[];
+extern unsigned char linux_logo16[];
+
+#endif
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index f39d88aaa..31920c13b 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -89,26 +89,26 @@ extern unsigned long empty_zero_page[1024];
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
#define VMALLOC_END P4SEG
-#define _PAGE_READ 0x001 /* software: read access allowed */
+#define _PAGE_PRESENT 0x001 /* software: page is present */
#define _PAGE_ACCESSED 0x002 /* software: page referenced */
#define _PAGE_DIRTY 0x004 /* D-bit : page changed */
#define _PAGE_CACHABLE 0x008 /* C-bit : cachable */
-/* 0x010 */
+/* 0x010 SZ-bit : size of page */
#define _PAGE_RW 0x020 /* PR0-bit : write access allowed */
#define _PAGE_USER 0x040 /* PR1-bit : user space access allowed */
#define _PAGE_PROTNONE 0x080 /* software: if not present */
-#define _PAGE_PRESENT 0x100 /* V-bit : page is valid */
+/* 0x100 V-bit : page is valid */
#if defined(__sh3__)
/* Mask which drop software flags */
-#define _PAGE_FLAGS_HARDWARE_MASK 0x1ffff16c
+#define _PAGE_FLAGS_HARDWARE_MASK 0x1ffff06c
/* Flags defalult: SZ=1 (4k-byte), C=0 (non-cachable), SH=0 (not shared) */
-#define _PAGE_FLAGS_HARDWARE_DEFAULT 0x00000010
+#define _PAGE_FLAGS_HARDWARE_DEFAULT 0x00000110
#elif defined(__SH4__)
/* Mask which drops software flags */
-#define _PAGE_FLAGS_HARDWARE_MASK 0x1ffff16c
+#define _PAGE_FLAGS_HARDWARE_MASK 0x1ffff06c
/* Flags defalult: SZ=01 (4k-byte), C=0 (non-cachable), SH=0 (not shared), WT=0 */
-#define _PAGE_FLAGS_HARDWARE_DEFAULT 0x00000010
+#define _PAGE_FLAGS_HARDWARE_DEFAULT 0x00000110
#endif
#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h
index 1fcfb1300..cf59dbb88 100644
--- a/include/asm-sh/processor.h
+++ b/include/asm-sh/processor.h
@@ -36,6 +36,7 @@ struct sh_cpuinfo {
unsigned long *pgd_quick;
unsigned long *pte_quick;
unsigned long pgtable_cache_sz;
+ unsigned int cpu_clock, master_clock, bus_clock, module_clock;
};
extern struct sh_cpuinfo boot_cpu_data;
diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h
index a61cd3aba..e716331ee 100644
--- a/include/asm-sh/ptrace.h
+++ b/include/asm-sh/ptrace.h
@@ -92,11 +92,11 @@ extern void show_regs(struct pt_regs *);
#define BAMR_ASID (1 << 2)
#define BAMR_NONE 0
-#define BAMR_10 0x1
-#define BAMR_12 0x2
+#define BAMR_10 0x1
+#define BAMR_12 0x2
#define BAMR_ALL 0x3
-#define BAMR_16 0x8
-#define BAMR_20 0x9
+#define BAMR_16 0x8
+#define BAMR_20 0x9
#define BBR_INST (1 << 4)
#define BBR_DATA (2 << 4)
diff --git a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h
index 65ed58fd8..2237d34a4 100644
--- a/include/asm-sh/uaccess.h
+++ b/include/asm-sh/uaccess.h
@@ -209,6 +209,7 @@ __asm__ __volatile__( \
extern void __put_user_unknown(void);
/* Generic arbitrary sized copy. */
+/* Return the number of bytes NOT copied */
/* XXX: should be such that: 4byte and the rest. */
extern __inline__ __kernel_size_t
__copy_user(void *__to, const void *__from, __kernel_size_t __n)
@@ -216,6 +217,7 @@ __copy_user(void *__to, const void *__from, __kernel_size_t __n)
unsigned long __dummy, _f, _t;
__kernel_size_t res;
+ if ((res = __n))
__asm__ __volatile__(
"9:\n\t"
"mov.b @%2+, %1\n\t"
@@ -229,17 +231,17 @@ __copy_user(void *__to, const void *__from, __kernel_size_t __n)
"3:\n\t"
"mov.l 5f, %1\n\t"
"jmp @%1\n\t"
- " mov %7, %0\n\t"
+ " add #1, %0\n\t"
".balign 4\n"
"5: .long 2b\n"
".previous\n"
".section __ex_table,\"a\"\n"
" .balign 4\n"
- " .long 9b,3b\n"
- " .long 1b,2b\n"
+ " .long 9b,2b\n"
+ " .long 1b,3b\n"
".previous"
: "=r" (res), "=&z" (__dummy), "=r" (_f), "=r" (_t)
- : "2" (__from), "3" (__to), "0" (__n), "i" (-EFAULT)
+ : "2" (__from), "3" (__to), "0" (res)
: "memory");
return res;