Commit ecaedfa3 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh64-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh64-2.6:
  sh64: mach-cayman: Build fixes.
  sh64: Symbol export fixups.
  sh64: linker script tidying and alignment fixups.
  sh64: Set KBUILD_IMAGE to make the rpm target happy.
  sh64: Kill off obsolete linux/blk.h reference.
  sh64: cleanup struct irqaction initializers.
  sh64: Kill off dead gdb stub symbol.
  sh64: alphanumeric display only on Cayman.
  sh64: Add defconfigs for mach-sim and mach-harp.
  sh64: update cayman defconfig.
  sh64: Tidy up Kconfig dependencies.
  sh64: Move consistent DMA routines to arch/sh64/mm/.
  sh64: Some symbol exports and build fixes.
  sh64: mach-sim: Build fixes.
  sh64: mach-harp: Build fixes.
  sh64: Kill off duplicate frame pointer option.
  sh64: Kill off dead ROM-RAM and generic boards.
  sh64: Tidy up includes for Cayman board.
  sh64: Move *_p() I/O routine variants to io.h.
parents dcf397f0 cb0f3fe0
...@@ -36,6 +36,14 @@ config GENERIC_CALIBRATE_DELAY ...@@ -36,6 +36,14 @@ config GENERIC_CALIBRATE_DELAY
bool bool
default y default y
config GENERIC_HARDIRQS
bool
default y
config GENERIC_IRQ_PROBE
bool
default y
config RWSEM_XCHGADD_ALGORITHM config RWSEM_XCHGADD_ALGORITHM
bool bool
...@@ -58,18 +66,12 @@ choice ...@@ -58,18 +66,12 @@ choice
prompt "SuperH system type" prompt "SuperH system type"
default SH_SIMULATOR default SH_SIMULATOR
config SH_GENERIC
bool "Generic"
config SH_SIMULATOR config SH_SIMULATOR
bool "Simulator" bool "Simulator"
config SH_CAYMAN config SH_CAYMAN
bool "Cayman" bool "Cayman"
config SH_ROMRAM
bool "ROM/RAM"
config SH_HARP config SH_HARP
bool "ST50-Harp" bool "ST50-Harp"
...@@ -152,60 +154,54 @@ comment "Memory options" ...@@ -152,60 +154,54 @@ comment "Memory options"
config CACHED_MEMORY_OFFSET config CACHED_MEMORY_OFFSET
hex "Cached Area Offset" hex "Cached Area Offset"
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
default "20000000" default "20000000"
config MEMORY_START config MEMORY_START
hex "Physical memory start address" hex "Physical memory start address"
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
default "80000000" default "80000000"
config MEMORY_SIZE_IN_MB config MEMORY_SIZE_IN_MB
int "Memory size (in MB)" if SH_HARP || SH_CAYMAN || SH_SIMULATOR int "Memory size (in MB)"
default "64" if SH_HARP || SH_CAYMAN
default "8" if SH_SIMULATOR default "8" if SH_SIMULATOR
default "64"
comment "Cache options" comment "Cache options"
config DCACHE_DISABLED
bool "DCache Disabling"
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
choice choice
prompt "DCache mode" prompt "DCache mode"
depends on !DCACHE_DISABLED && !SH_SIMULATOR default DCACHE_DISABLED if SH_SIMULATOR
default DCACHE_WRITE_BACK default DCACHE_WRITE_BACK
config DCACHE_WRITE_BACK config DCACHE_WRITE_BACK
bool "Write-back" bool "Write-back"
depends on !SH_SIMULATOR
config DCACHE_WRITE_THROUGH config DCACHE_WRITE_THROUGH
bool "Write-through" bool "Write-through"
depends on !SH_SIMULATOR
config DCACHE_DISABLED
bool "Disabled"
endchoice endchoice
config ICACHE_DISABLED config ICACHE_DISABLED
bool "ICache Disabling" bool "ICache Disabling"
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
config PCIDEVICE_MEMORY_START config PCIDEVICE_MEMORY_START
hex hex
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
default "C0000000" default "C0000000"
config DEVICE_MEMORY_START config DEVICE_MEMORY_START
hex hex
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
default "E0000000" default "E0000000"
config FLASH_MEMORY_START config FLASH_MEMORY_START
hex "Flash memory/on-chip devices start address" hex "Flash memory/on-chip devices start address"
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
default "00000000" default "00000000"
config PCI_BLOCK_START config PCI_BLOCK_START
hex "PCI block start address" hex "PCI block start address"
depends on SH_HARP || SH_CAYMAN || SH_SIMULATOR
default "40000000" default "40000000"
comment "CPU Subtype specific options" comment "CPU Subtype specific options"
...@@ -214,8 +210,10 @@ config SH64_ID2815_WORKAROUND ...@@ -214,8 +210,10 @@ config SH64_ID2815_WORKAROUND
bool "Include workaround for SH5-101 cut2 silicon defect ID2815" bool "Include workaround for SH5-101 cut2 silicon defect ID2815"
comment "Misc options" comment "Misc options"
config HEARTBEAT config HEARTBEAT
bool "Heartbeat LED" bool "Heartbeat LED"
depends on SH_CAYMAN
config HDSP253_LED config HDSP253_LED
bool "Support for HDSP-253 LED" bool "Support for HDSP-253 LED"
...@@ -242,6 +240,7 @@ config SBUS ...@@ -242,6 +240,7 @@ config SBUS
config PCI config PCI
bool "PCI support" bool "PCI support"
depends on SH_CAYMAN
help help
Find out whether you have a PCI motherboard. PCI is the name of a Find out whether you have a PCI motherboard. PCI is the name of a
bus system, i.e. the way the CPU talks to the other stuff inside bus system, i.e. the way the CPU talks to the other stuff inside
...@@ -294,15 +293,3 @@ source "security/Kconfig" ...@@ -294,15 +293,3 @@ source "security/Kconfig"
source "crypto/Kconfig" source "crypto/Kconfig"
source "lib/Kconfig" source "lib/Kconfig"
#
# Use the generic interrupt handling code in kernel/irq/:
#
config GENERIC_HARDIRQS
bool
default y
config GENERIC_IRQ_PROBE
bool
default y
...@@ -5,9 +5,6 @@ source "lib/Kconfig.debug" ...@@ -5,9 +5,6 @@ source "lib/Kconfig.debug"
config EARLY_PRINTK config EARLY_PRINTK
bool "Early SCIF console support" bool "Early SCIF console support"
config DEBUG_KERNEL_WITH_GDB_STUB
bool "GDB Stub kernel debug"
config SH64_PROC_TLB config SH64_PROC_TLB
bool "Debug: report TLB fill/purge activity through /proc/tlb" bool "Debug: report TLB fill/purge activity through /proc/tlb"
depends on PROC_FS depends on PROC_FS
...@@ -28,17 +25,9 @@ config POOR_MANS_STRACE ...@@ -28,17 +25,9 @@ config POOR_MANS_STRACE
config SH_ALPHANUMERIC config SH_ALPHANUMERIC
bool "Enable debug outputs to on-board alphanumeric display" bool "Enable debug outputs to on-board alphanumeric display"
depends on SH_CAYMAN
config SH_NO_BSS_INIT config SH_NO_BSS_INIT
bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)" bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
config FRAME_POINTER
bool "Compile the kernel with frame pointers"
default y if KGDB
help
If you say Y here the resulting kernel image will be slightly larger
and slower, but it will give very useful debugging information.
If you don't debug the kernel, you can say N, but we may not be able
to solve problems without frame pointers.
endmenu endmenu
...@@ -40,6 +40,8 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S ...@@ -40,6 +40,8 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S
# #
KBUILD_DEFCONFIG := cayman_defconfig KBUILD_DEFCONFIG := cayman_defconfig
KBUILD_IMAGE := arch/$(ARCH)/boot/zImage
ifdef LOADADDR ifdef LOADADDR
LINKFLAGS += -Ttext $(word 1,$(LOADADDR)) LINKFLAGS += -Ttext $(word 1,$(LOADADDR))
endif endif
...@@ -47,7 +49,6 @@ endif ...@@ -47,7 +49,6 @@ endif
machine-$(CONFIG_SH_CAYMAN) := cayman machine-$(CONFIG_SH_CAYMAN) := cayman
machine-$(CONFIG_SH_SIMULATOR) := sim machine-$(CONFIG_SH_SIMULATOR) := sim
machine-$(CONFIG_SH_HARP) := harp machine-$(CONFIG_SH_HARP) := harp
machine-$(CONFIG_SH_ROMRAM) := romram
head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
...@@ -106,6 +107,5 @@ arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S ...@@ -106,6 +107,5 @@ arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S
CLEAN_FILES += arch/$(ARCH)/lib/syscalltab.h CLEAN_FILES += arch/$(ARCH)/lib/syscalltab.h
define archhelp define archhelp
@echo ' zImage - Compressed kernel image (arch/sh64/boot/zImage)' @echo '* zImage - Compressed kernel image'
endef endef
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -25,7 +25,7 @@ obj-$(CONFIG_SH_DMA) += dma.o ...@@ -25,7 +25,7 @@ obj-$(CONFIG_SH_DMA) += dma.o
obj-$(CONFIG_SH_FPU) += fpu.o obj-$(CONFIG_SH_FPU) += fpu.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_KALLSYMS) += unwind.o obj-$(CONFIG_KALLSYMS) += unwind.o
obj-$(CONFIG_PCI) += pci-dma.o pcibios.o obj-$(CONFIG_PCI) += pcibios.o
obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULES) += module.o
ifeq ($(CONFIG_PCI),y) ifeq ($(CONFIG_PCI),y)
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/sched.h> #include <linux/sched.h>
void mach_alphanum(int pos, unsigned char val); void mach_alphanum(int pos, unsigned char val);
void mach_led(int pos, int val);
void print_seg(char *file, int line) void print_seg(char *file, int line)
{ {
......
...@@ -31,16 +31,11 @@ extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); ...@@ -31,16 +31,11 @@ extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
/* platform dependent support */ /* platform dependent support */
EXPORT_SYMBOL(dump_fpu); EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(kernel_thread);
/* Networking helper routines. */ /* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy_nocheck); EXPORT_SYMBOL(csum_partial_copy_nocheck);
EXPORT_SYMBOL(strstr);
#ifdef CONFIG_VT #ifdef CONFIG_VT
EXPORT_SYMBOL(screen_info); EXPORT_SYMBOL(screen_info);
#endif #endif
...@@ -50,27 +45,18 @@ EXPORT_SYMBOL(__down_trylock); ...@@ -50,27 +45,18 @@ EXPORT_SYMBOL(__down_trylock);
EXPORT_SYMBOL(__up); EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(__put_user_asm_l); EXPORT_SYMBOL(__put_user_asm_l);
EXPORT_SYMBOL(__get_user_asm_l); EXPORT_SYMBOL(__get_user_asm_l);
EXPORT_SYMBOL(memcmp); EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memset); EXPORT_SYMBOL(udelay);
EXPORT_SYMBOL(memscan); EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(strchr); EXPORT_SYMBOL(ndelay);
EXPORT_SYMBOL(strlen); EXPORT_SYMBOL(__ndelay);
EXPORT_SYMBOL(flush_dcache_page); EXPORT_SYMBOL(flush_dcache_page);
/* For ext3 */
EXPORT_SYMBOL(sh64_page_clear); EXPORT_SYMBOL(sh64_page_clear);
/* Ugh. These come in from libgcc.a at link time. */ /* Ugh. These come in from libgcc.a at link time. */
#define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL(name)
extern void __sdivsi3(void); DECLARE_EXPORT(__sdivsi3);
extern void __muldi3(void); DECLARE_EXPORT(__muldi3);
extern void __udivsi3(void); DECLARE_EXPORT(__udivsi3);
extern char __div_table;
EXPORT_SYMBOL(__sdivsi3);
EXPORT_SYMBOL(__muldi3);
EXPORT_SYMBOL(__udivsi3);
EXPORT_SYMBOL(__div_table);
...@@ -476,8 +476,18 @@ static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id) ...@@ -476,8 +476,18 @@ static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; static struct irqaction irq0 = {
static struct irqaction irq1 = { sh64_rtc_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "rtc", NULL, NULL}; .handler = timer_interrupt,
.flags = IRQF_DISABLED,
.mask = CPU_MASK_NONE,
.name = "timer",
};
static struct irqaction irq1 = {
.handler = sh64_rtc_interrupt,
.flags = IRQF_DISABLED,
.mask = CPU_MASK_NONE,
.name = "rtc",
};
void __init time_init(void) void __init time_init(void)
{ {
......
...@@ -30,14 +30,6 @@ ...@@ -30,14 +30,6 @@
#define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET #define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#ifdef NOTDEF
#ifdef CONFIG_LITTLE_ENDIAN
OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux")
#else
OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64")
#endif
#endif
OUTPUT_ARCH(sh:sh5) OUTPUT_ARCH(sh:sh5)
#define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET) #define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
...@@ -74,10 +66,12 @@ SECTIONS ...@@ -74,10 +66,12 @@ SECTIONS
__ex_table : C_PHYS(__ex_table) { *(__ex_table) } __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
__stop___ex_table = .; __stop___ex_table = .;
RODATA
_etext = .; /* End of text section */ _etext = .; /* End of text section */
NOTES
RODATA
.data : C_PHYS(.data) { /* Data */ .data : C_PHYS(.data) { /* Data */
DATA_DATA DATA_DATA
CONSTRUCTORS CONSTRUCTORS
...@@ -86,13 +80,9 @@ SECTIONS ...@@ -86,13 +80,9 @@ SECTIONS
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
.data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) } .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
. = ALIGN(PAGE_SIZE); PERCPU(PAGE_SIZE)
__per_cpu_start = .;
.data.percpu : C_PHYS(.data.percpu) { . = ALIGN(L1_CACHE_BYTES);
*(.data.percpu)
*(.data.percpu.shared_aligned)
}
__per_cpu_end = . ;
.data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) } .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
_edata = .; /* End of data section */ _edata = .; /* End of data section */
...@@ -145,38 +135,6 @@ SECTIONS ...@@ -145,38 +135,6 @@ SECTIONS
*(.exitcall.exit) *(.exitcall.exit)
} }
/* Stabs debugging sections. */ STABS_DEBUG
.stab 0 : C_PHYS(.stab) { *(.stab) } DWARF_DEBUG
.stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) }
.stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) }
.stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) }
.stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) }
.stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) }
.comment 0 : C_PHYS(.comment) { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging section are relative to the beginning
of the section so we begin .debug at 0. */
/* DWARF 1 */
.debug 0 : C_PHYS(.debug) { *(.debug) }
.line 0 : C_PHYS(.line) { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) }
.debug_sfnames 0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : C_PHYS(.debug_aranges) { *(.debug_aranges) }
.debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : C_PHYS(.debug_info) { *(.debug_info) }
.debug_abbrev 0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) }
.debug_line 0 : C_PHYS(.debug_line) { *(.debug_line) }
.debug_frame 0 : C_PHYS(.debug_frame) { *(.debug_frame) }
.debug_str 0 : C_PHYS(.debug_str) { *(.debug_str) }
.debug_loc 0 : C_PHYS(.debug_loc) { *(.debug_loc) }
.debug_macinfo 0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) }
.debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) }
.debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) }
.debug_varnames 0 : C_PHYS(.debug_varnames) { *(.debug_varnames) }
/* These must appear regardless of . */
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -110,7 +111,7 @@ static unsigned long do_csum(const unsigned char *buff, int len) ...@@ -110,7 +111,7 @@ static unsigned long do_csum(const unsigned char *buff, int len)
if (odd) if (odd)
result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
pr_debug("\nCHECKSUM is 0x%x\n", result); pr_debug("\nCHECKSUM is 0x%lx\n", result);
out: out:
return result; return result;
......
...@@ -11,30 +11,11 @@ ...@@ -11,30 +11,11 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/module.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/io.h> #include <asm/io.h>
/*
* readX/writeX() are used to access memory mapped devices. On some
* architectures the memory mapped IO stuff needs to be accessed
* differently. On the SuperH architecture, we just read/write the
* memory location directly.
*/
/* This is horrible at the moment - needs more work to do something sensible */
#define IO_DELAY()
#define OUT_DELAY(x,type) \
void out##x##_p(unsigned type value,unsigned long port){out##x(value,port);IO_DELAY();}
#define IN_DELAY(x,type) \
unsigned type in##x##_p(unsigned long port) {unsigned type tmp=in##x(port);IO_DELAY();return tmp;}
#if 1
OUT_DELAY(b, long) OUT_DELAY(w, long) OUT_DELAY(l, long)
IN_DELAY(b, long) IN_DELAY(w, long) IN_DELAY(l, long)
#endif
/* Now for the string version of these functions */ /* Now for the string version of these functions */
void outsb(unsigned long port, const void *addr, unsigned long count) void outsb(unsigned long port, const void *addr, unsigned long count)
{ {
...@@ -45,6 +26,7 @@ void outsb(unsigned long port, const void *addr, unsigned long count) ...@@ -45,6 +26,7 @@ void outsb(unsigned long port, const void *addr, unsigned long count)
outb(*p, port); outb(*p, port);
} }
} }
EXPORT_SYMBOL(outsb);
void insb(unsigned long port, void *addr, unsigned long count) void insb(unsigned long port, void *addr, unsigned long count)
{ {
...@@ -55,6 +37,7 @@ void insb(unsigned long port, void *addr, unsigned long count) ...@@ -55,6 +37,7 @@ void insb(unsigned long port, void *addr, unsigned long count)
*p = inb(port); *p = inb(port);
} }
} }
EXPORT_SYMBOL(insb);
/* For the 16 and 32 bit string functions, we have to worry about alignment. /* For the 16 and 32 bit string functions, we have to worry about alignment.
* The SH does not do unaligned accesses, so we have to read as bytes and * The SH does not do unaligned accesses, so we have to read as bytes and
...@@ -74,6 +57,7 @@ void outsw(unsigned long port, const void *addr, unsigned long count) ...@@ -74,6 +57,7 @@ void outsw(unsigned long port, const void *addr, unsigned long count)
outw(tmp, port); outw(tmp, port);
} }
} }
EXPORT_SYMBOL(outsw);
void insw(unsigned long port, void *addr, unsigned long count) void insw(unsigned long port, void *addr, unsigned long count)
{ {
...@@ -87,6 +71,7 @@ void insw(unsigned long port, void *addr, unsigned long count) ...@@ -87,6 +71,7 @@ void insw(unsigned long port, void *addr, unsigned long count)
p[1] = (tmp >> 8) & 0xff; p[1] = (tmp >> 8) & 0xff;
} }
} }
EXPORT_SYMBOL(insw);
void outsl(unsigned long port, const void *addr, unsigned long count) void outsl(unsigned long port, const void *addr, unsigned long count)
{ {
...@@ -100,6 +85,7 @@ void outsl(unsigned long port, const void *addr, unsigned long count) ...@@ -100,6 +85,7 @@ void outsl(unsigned long port, const void *addr, unsigned long count)
outl(tmp, port); outl(tmp, port);
} }
} }
EXPORT_SYMBOL(outsl);
void insl(unsigned long port, void *addr, unsigned long count) void insl(unsigned long port, void *addr, unsigned long count)
{ {
...@@ -116,6 +102,7 @@ void insl(unsigned long port, void *addr, unsigned long count) ...@@ -116,6 +102,7 @@ void insl(unsigned long port, void *addr, unsigned long count)
} }
} }
EXPORT_SYMBOL(insl);
void memcpy_toio(void __iomem *to, const void *from, long count) void memcpy_toio(void __iomem *to, const void *from, long count)
{ {
...@@ -126,6 +113,7 @@ void memcpy_toio(void __iomem *to, const void *from, long count) ...@@ -126,6 +113,7 @@ void memcpy_toio(void __iomem *to, const void *from, long count)
writeb(*p++, to++); writeb(*p++, to++);
} }
} }
EXPORT_SYMBOL(memcpy_toio);
void memcpy_fromio(void *to, void __iomem *from, long count) void memcpy_fromio(void *to, void __iomem *from, long count)
{ {
...@@ -137,3 +125,4 @@ void memcpy_fromio(void *to, void __iomem *from, long count) ...@@ -137,3 +125,4 @@ void memcpy_fromio(void *to, void __iomem *from, long count)
from++; from++;
} }
} }
EXPORT_SYMBOL(memcpy_fromio);
...@@ -17,12 +17,15 @@ ioport_map(unsigned long port, unsigned int len) ...@@ -17,12 +17,15 @@ ioport_map(unsigned long port, unsigned int len)
{ {
return (void __iomem *)port; return (void __iomem *)port;
} }
EXPORT_SYMBOL(ioport_map);
void ioport_unmap(void __iomem *addr) void ioport_unmap(void __iomem *addr)
{ {
/* Nothing .. */ /* Nothing .. */
} }
EXPORT_SYMBOL(ioport_unmap);
#ifdef CONFIG_PCI
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
{ {
unsigned long start = pci_resource_start(dev, bar); unsigned long start = pci_resource_start(dev, bar);
...@@ -41,14 +44,11 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) ...@@ -41,14 +44,11 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
/* What? */ /* What? */
return NULL; return NULL;
} }
EXPORT_SYMBOL(pci_iomap);
void pci_iounmap(struct pci_dev *dev, void __iomem *addr) void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
{ {
/* Nothing .. */ /* Nothing .. */
} }
EXPORT_SYMBOL(ioport_map);
EXPORT_SYMBOL(ioport_unmap);
EXPORT_SYMBOL(pci_iomap);
EXPORT_SYMBOL(pci_iounmap); EXPORT_SYMBOL(pci_iounmap);
#endif
...@@ -18,19 +18,11 @@ ...@@ -18,19 +18,11 @@
* lethal@linux-sh.org: 15th May 2003 * lethal@linux-sh.org: 15th May 2003
* Use the generic procfs cpuinfo interface, just return a valid board name. * Use the generic procfs cpuinfo interface, just return a valid board name.
*/ */
#include <linux/stddef.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/delay.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/seq_file.h>
#include <asm/processor.h>
#include <asm/platform.h> #include <asm/platform.h>
#include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h> #include <asm/io.h>
/* /*
* Platform Dependent Interrupt Priorities. * Platform Dependent Interrupt Priorities.
......
#
# Makefile for the ST50 Harp specific parts of the kernel
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
O_TARGET := harp.o
obj-y := setup.o obj-y := setup.o
include $(TOPDIR)/Rules.make
...@@ -17,20 +17,10 @@ ...@@ -17,20 +17,10 @@
* lethal@linux-sh.org: 15th May 2003 * lethal@linux-sh.org: 15th May 2003
* Use the generic procfs cpuinfo interface, just return a valid board name. * Use the generic procfs cpuinfo interface, just return a valid board name.
*/ */
#include <linux/stddef.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/delay.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <asm/processor.h>
#include <asm/platform.h> #include <asm/platform.h>
#include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h>
#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
/* /*
* Platform Dependent Interrupt Priorities. * Platform Dependent Interrupt Priorities.
...@@ -78,8 +68,10 @@ struct resource io_resources[] = { ...@@ -78,8 +68,10 @@ struct resource io_resources[] = {
}; };
struct resource kram_resources[] = { struct resource kram_resources[] = {
{ "Kernel code", 0, 0 }, /* These must be last in the array */ /* These must be last in the array */
{ "Kernel data", 0, 0 } /* These must be last in the array */ { .name = "Kernel code", .start = 0, .end = 0 },
/* These must be last in the array */
{ .name = "Kernel data", .start = 0, .end = 0 }
}; };
struct resource xram_resources[] = { struct resource xram_resources[] = {
...@@ -95,13 +87,13 @@ struct sh64_platform platform_parms = { ...@@ -95,13 +87,13 @@ struct sh64_platform platform_parms = {
.initial_root_dev = 0x0100, .initial_root_dev = 0x0100,
.loader_type = 1, .loader_type = 1,
.io_res_p = io_resources, .io_res_p = io_resources,
.io_res_count = RES_COUNT(io_resources), .io_res_count = ARRAY_SIZE(io_resources),
.kram_res_p = kram_resources, .kram_res_p = kram_resources,
.kram_res_count = RES_COUNT(kram_resources), .kram_res_count = ARRAY_SIZE(kram_resources),
.xram_res_p = xram_resources, .xram_res_p = xram_resources,
.xram_res_count = RES_COUNT(xram_resources), .xram_res_count = ARRAY_SIZE(xram_resources),
.rom_res_p = rom_resources, .rom_res_p = rom_resources,
.rom_res_count = RES_COUNT(rom_resources), .rom_res_count = ARRAY_SIZE(rom_resources),
}; };
int platform_int_priority[NR_INTC_IRQS] = { int platform_int_priority[NR_INTC_IRQS] = {
...@@ -135,4 +127,3 @@ const char *get_system_type(void) ...@@ -135,4 +127,3 @@ const char *get_system_type(void)
{ {
return "ST50 Harp"; return "ST50 Harp";
} }
#
# Makefile for the SH-5 ROM/RAM specific parts of the kernel
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
O_TARGET := romram.o
obj-y := setup.o
include $(TOPDIR)/Rules.make
/*
* 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.
*
* arch/sh64/mach-romram/setup.c
*
* SH-5 ROM/RAM Platform Support
*
* This file handles the architecture-dependent parts of initialization
*
* Copyright (C) 2000, 2001 Paolo Alberelli
*
* benedict.gaster@superh.com: 3rd May 2002
* Added support for ramdisk, removing statically linked romfs at the same time. *
*
* lethal@linux-sh.org: 15th May 2003
* Use the generic procfs cpuinfo interface, just return a valid board name.
*
* Sean.McGoogan@superh.com 17th Feb 2004
* copied from arch/sh64/mach-harp/setup.c
*/
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <asm/processor.h>
#include <asm/platform.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/page.h>
#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
/*
* Platform Dependent Interrupt Priorities.
*/
/* Using defaults defined in irq.h */
#define RES NO_PRIORITY /* Disabled */
#define IR0 IRL0_PRIORITY /* IRLs */
#define IR1 IRL1_PRIORITY
#define IR2 IRL2_PRIORITY
#define IR3 IRL3_PRIORITY
#define PCA INTA_PRIORITY /* PCI Ints */
#define PCB INTB_PRIORITY
#define PCC INTC_PRIORITY
#define PCD INTD_PRIORITY
#define SER TOP_PRIORITY
#define ERR TOP_PRIORITY
#define PW0 TOP_PRIORITY
#define PW1 TOP_PRIORITY
#define PW2 TOP_PRIORITY
#define PW3 TOP_PRIORITY
#define DM0 NO_PRIORITY /* DMA Ints */
#define DM1 NO_PRIORITY
#define DM2 NO_PRIORITY
#define DM3 NO_PRIORITY
#define DAE NO_PRIORITY
#define TU0 TIMER_PRIORITY /* TMU Ints */
#define TU1 NO_PRIORITY
#define TU2 NO_PRIORITY
#define TI2 NO_PRIORITY
#define ATI NO_PRIORITY /* RTC Ints */
#define PRI NO_PRIORITY
#define CUI RTC_PRIORITY
#define ERI SCIF_PRIORITY /* SCIF Ints */
#define RXI SCIF_PRIORITY
#define BRI SCIF_PRIORITY
#define TXI SCIF_PRIORITY
#define ITI TOP_PRIORITY /* WDT Ints */
/*
* Platform dependent structures: maps and parms block.
*/
struct resource io_resources[] = {
/* To be updated with external devices */
};
struct resource kram_resources[] = {
{ "Kernel code", 0, 0 }, /* These must be last in the array */
{ "Kernel data", 0, 0 } /* These must be last in the array */
};
struct resource xram_resources[] = {
/* To be updated with external devices */
};
struct resource rom_resources[] = {
/* To be updated with external devices */
};
struct sh64_platform platform_parms = {
.readonly_rootfs = 1,
.initial_root_dev = 0x0100,
.loader_type = 1,
.io_res_p = io_resources,
.io_res_count = RES_COUNT(io_resources),
.kram_res_p = kram_resources,
.kram_res_count = RES_COUNT(kram_resources),
.xram_res_p = xram_resources,
.xram_res_count = RES_COUNT(xram_resources),
.rom_res_p = rom_resources,
.rom_res_count = RES_COUNT(rom_resources),
};
int platform_int_priority[NR_INTC_IRQS] = {
IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD, /* IRQ 0- 7 */
RES, RES, RES, RES, SER, ERR, PW3, PW2, /* IRQ 8-15 */
PW1, PW0, DM0, DM1, DM2, DM3, DAE, RES, /* IRQ 16-23 */
RES, RES, RES, RES, RES, RES, RES, RES, /* IRQ 24-31 */
TU0, TU1, TU2, TI2, ATI, PRI, CUI, ERI, /* IRQ 32-39 */
RXI, BRI, TXI, RES, RES, RES, RES, RES, /* IRQ 40-47 */
RES, RES, RES, RES, RES, RES, RES, RES, /* IRQ 48-55 */
RES, RES, RES, RES, RES, RES, RES, ITI, /* IRQ 56-63 */
};
void __init platform_setup(void)
{
/* ROM/RAM platform leaves the decision to head.S, for now */
platform_parms.fpu_flags = fpu_in_use;
}
void __init platform_monitor(void)
{
/* Nothing yet .. */
}
void __init platform_reserve(void)
{
/* Nothing yet .. */
}
const char *get_system_type(void)
{
return "ROM/RAM";
}
#
# Makefile for the SH-5 Simulator specific parts of the kernel
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
O_TARGET := sim.o
obj-y := setup.o obj-y := setup.o
include $(TOPDIR)/Rules.make
...@@ -14,46 +14,10 @@ ...@@ -14,46 +14,10 @@
* lethal@linux-sh.org: 15th May 2003 * lethal@linux-sh.org: 15th May 2003
* Use the generic procfs cpuinfo interface, just return a valid board name. * Use the generic procfs cpuinfo interface, just return a valid board name.
*/ */
#include <linux/stddef.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/delay.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <asm/addrspace.h>
#include <asm/processor.h>
#include <asm/platform.h> #include <asm/platform.h>
#include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h>
#ifdef CONFIG_BLK_DEV_INITRD
#include "../rootfs/rootfs.h"
#endif
static __init void platform_monitor(void);
static __init void platform_setup(void);
static __init void platform_reserve(void);
#define PHYS_MEMORY CONFIG_MEMORY_SIZE_IN_MB*1024*1024
#if (PHYS_MEMORY < P1SEG_FOOTPRINT_RAM)
#error "Invalid kernel configuration. Physical memory below footprint requirements."
#endif
#define RAM_DISK_START CONFIG_MEMORY_START+P1SEG_INITRD_BLOCK /* Top of 4MB */
#ifdef PLATFORM_ROMFS_SIZE
#define RAM_DISK_SIZE (PAGE_ALIGN(PLATFORM_ROMFS_SIZE)) /* Variable Top */
#if ((RAM_DISK_START + RAM_DISK_SIZE) > (CONFIG_MEMORY_START + PHYS_MEMORY))
#error "Invalid kernel configuration. ROM RootFS exceeding physical memory."
#endif
#else
#define RAM_DISK_SIZE P1SEG_INITRD_BLOCK_SIZE /* Top of 4MB */
#endif
#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
/* /*
* Platform Dependent Interrupt Priorities. * Platform Dependent Interrupt Priorities.
...@@ -101,8 +65,10 @@ struct resource io_resources[] = { ...@@ -101,8 +65,10 @@ struct resource io_resources[] = {
}; };
struct resource kram_resources[] = { struct resource kram_resources[] = {
{ "Kernel code", 0, 0 }, /* These must be last in the array */ /* These must be last in the array */
{ "Kernel data", 0, 0 } /* These must be last in the array */ { .name = "Kernel code", .start = 0, .end = 0 },
/* These must be last in the array */
{ .name = "Kernel data", .start = 0, .end = 0 }
}; };
struct resource xram_resources[] = { struct resource xram_resources[] = {
...@@ -117,16 +83,14 @@ struct sh64_platform platform_parms = { ...@@ -117,16 +83,14 @@ struct sh64_platform platform_parms = {
.readonly_rootfs = 1, .readonly_rootfs = 1,
.initial_root_dev = 0x0100, .initial_root_dev = 0x0100,
.loader_type = 1, .loader_type = 1,
.initrd_start = RAM_DISK_START,
.initrd_size = RAM_DISK_SIZE,
.io_res_p = io_resources, .io_res_p = io_resources,
.io_res_count = RES_COUNT(io_resources), .io_res_count = ARRAY_SIZE(io_resources),
.kram_res_p = kram_resources, .kram_res_p = kram_resources,
.kram_res_count = RES_COUNT(kram_resources), .kram_res_count = ARRAY_SIZE(kram_resources),
.xram_res_p = xram_resources, .xram_res_p = xram_resources,
.xram_res_count = RES_COUNT(xram_resources), .xram_res_count = ARRAY_SIZE(xram_resources),
.rom_res_p = rom_resources, .rom_res_p = rom_resources,
.rom_res_count = RES_COUNT(rom_resources), .rom_res_count = ARRAY_SIZE(rom_resources),
}; };
int platform_int_priority[NR_IRQS] = { int platform_int_priority[NR_IRQS] = {
...@@ -160,4 +124,3 @@ const char *get_system_type(void) ...@@ -160,4 +124,3 @@ const char *get_system_type(void)
{ {
return "SH-5 Simulator"; return "SH-5 Simulator";
} }
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
# unless it's something special (ie not a .c file). # unless it's something special (ie not a .c file).
# #
obj-y := init.o fault.o ioremap.o extable.o cache.o tlbmiss.o tlb.o obj-y := cache.o consistent.o extable.o fault.o init.o ioremap.o \
tlbmiss.o tlb.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
...@@ -41,4 +42,3 @@ CFLAGS_tlbmiss.o += -ffixed-r7 \ ...@@ -41,4 +42,3 @@ CFLAGS_tlbmiss.o += -ffixed-r7 \
-ffixed-r41 -ffixed-r42 -ffixed-r43 \ -ffixed-r41 -ffixed-r42 -ffixed-r43 \
-ffixed-r60 -ffixed-r61 -ffixed-r62 \ -ffixed-r60 -ffixed-r61 -ffixed-r62 \
-fomit-frame-pointer -fomit-frame-pointer
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/module.h>
#include <asm/io.h> #include <asm/io.h>
void *consistent_alloc(struct pci_dev *hwdev, size_t size, void *consistent_alloc(struct pci_dev *hwdev, size_t size,
...@@ -36,6 +37,7 @@ void *consistent_alloc(struct pci_dev *hwdev, size_t size, ...@@ -36,6 +37,7 @@ void *consistent_alloc(struct pci_dev *hwdev, size_t size,
return vp; return vp;
} }
EXPORT_SYMBOL(consistent_alloc);
void consistent_free(struct pci_dev *hwdev, size_t size, void consistent_free(struct pci_dev *hwdev, size_t size,
void *vaddr, dma_addr_t dma_handle) void *vaddr, dma_addr_t dma_handle)
...@@ -47,4 +49,4 @@ void consistent_free(struct pci_dev *hwdev, size_t size, ...@@ -47,4 +49,4 @@ void consistent_free(struct pci_dev *hwdev, size_t size,
iounmap(vaddr); iounmap(vaddr);
} }
EXPORT_SYMBOL(consistent_free);
...@@ -22,10 +22,6 @@ ...@@ -22,10 +22,6 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/tlb.h> #include <asm/tlb.h>
#ifdef CONFIG_BLK_DEV_INITRD
#include <linux/blk.h>
#endif
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
/* /*
......
...@@ -19,11 +19,12 @@ ...@@ -19,11 +19,12 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/module.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
static void shmedia_mapioaddr(unsigned long, unsigned long); static void shmedia_mapioaddr(unsigned long, unsigned long);
static unsigned long shmedia_ioremap(struct resource *, u32, int); static unsigned long shmedia_ioremap(struct resource *, u32, int);
...@@ -80,6 +81,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag ...@@ -80,6 +81,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag
} }
return (void *) (offset + (char *)addr); return (void *) (offset + (char *)addr);
} }
EXPORT_SYMBOL(__ioremap);
void iounmap(void *addr) void iounmap(void *addr)
{ {
...@@ -94,6 +96,7 @@ void iounmap(void *addr) ...@@ -94,6 +96,7 @@ void iounmap(void *addr)
kfree(area); kfree(area);
} }
EXPORT_SYMBOL(iounmap);
static struct resource shmedia_iomap = { static struct resource shmedia_iomap = {
.name = "shmedia_iomap", .name = "shmedia_iomap",
......
...@@ -119,6 +119,13 @@ void insw(unsigned long port, void *addr, unsigned long count); ...@@ -119,6 +119,13 @@ void insw(unsigned long port, void *addr, unsigned long count);
void outsl(unsigned long port, const void *addr, unsigned long count); void outsl(unsigned long port, const void *addr, unsigned long count);
void insl(unsigned long port, void *addr, unsigned long count); void insl(unsigned long port, void *addr, unsigned long count);
#define inb_p(addr) inb(addr)
#define inw_p(addr) inw(addr)
#define inl_p(addr) inl(addr)
#define outb_p(x,addr) outb(x,addr)
#define outw_p(x,addr) outw(x,addr)
#define outl_p(x,addr) outl(x,addr)
#define __raw_readb readb #define __raw_readb readb
#define __raw_readw readw #define __raw_readw readw
#define __raw_readl readl #define __raw_readl readl
......
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